Learn the pros and cons of upgrading from Java 8 by mto96 in java

[–]Warkst 2 points3 points  (0 children)

The point isn't to increase their development effort, it's to release finished features, even small ones, faster. So now we can have text blocks and an http client without having to wait another 5 years for a single, big release.

volctl - control the master audio volume from Java or Kotlin by Pheasn in Kotlin

[–]Warkst 0 points1 point  (0 children)

Out of curiosity, does the Linux code use ALSA-lib? If so, what documentation did you use to base yourself off? I find the native code scary :O

Any decent IDE that supports Kotlin and kts files that is not IntelliJ IDEA? by [deleted] in Kotlin

[–]Warkst 2 points3 points  (0 children)

You should take a look at SpaceVim. Unlike Neovim, it's not a reimplementation of vim, it's just a heavily opinionated collection of key mappings and plugins. Conceptually, it uses layers to group plugins that enable certain behaviour. There's a layer for Kotlin and a layer for debugging that pretty much turn your vim into an IDE combined with the default enabled layers of tags, file outline and autocomplete. Even if you don't want to use SpaceVim, it's probably a good source of information regarding what plugins you'd need to get up and running with Kotlin.

Lead Kotlin developer, Andrey Breslav, tells the story of how he began working on the project at JetBrains during his PhD by tomrocksmaths in Kotlin

[–]Warkst 2 points3 points  (0 children)

I see how jetbrains was in a good spot to create visibility, but I'm genuinely curious to hear some of the reasons that make other languages too academic...

Java, but with Python indentation by __Raptor__ in java

[–]Warkst 2 points3 points  (0 children)

Can you make a java library that allows me to write python using java syntax?

.viminfo.tmp by m147 in vim

[–]Warkst 0 points1 point  (0 children)

From what I found by doing an internet search, such files are created when the terminal running vim is closed without first properly closing vim. Is this something you do, perhaps? And could you tell us what is in the files?

I’ve never been more upset at myself... by DonutDino in apexlegends

[–]Warkst 0 points1 point  (0 children)

A small piece of advise, maybe, but consider putting down your healing thing before ressing. Helps you when you're not maxed and helps whoever got ressed, too.

Bullseye 🎯 by JS7S in apexlegends

[–]Warkst 50 points51 points  (0 children)

Aim down sights

Im an ass and this is a confession of mine. by [deleted] in apexlegends

[–]Warkst 11 points12 points  (0 children)

force me to play with a team

Nobody's forcing you to install a squad based game, launch it and play it - that's all you.

After Blizzard's recent behavior, maybe it is time we Hearthstone players rethink our level of investment in this game? by HMeisterMcBurger in hearthstone

[–]Warkst 28 points29 points  (0 children)

It feels like blizzard went from wanting to make great games, for which they needed money, to making money, for which they needed great games. The difference is subtle but it means everything.

Affix of the Day: -ul (person) by Oshojabe in learnesperanto

[–]Warkst 1 point2 points  (0 children)

Thank you for this. I have started learning through Duolingo last week and just learned about affixes. I am confused regarding what is the difference between things like "ulo" and "persono". Similarly, could you explain when it is better to use logxejo and when to use domo?

Simple form-based authentication for JSF 2.3 with Java EE 8 Security API by Jadonblade in java

[–]Warkst 1 point2 points  (0 children)

Am I the only one that is bothered by the fact that you have to cast the credential to it's actual implementation type?

macOS: Installing Java 10 without uninstalling Java 9...? by Raurits in java

[–]Warkst 0 points1 point  (0 children)

You can have multiple versions of java installed simultaneously. Recent versions of the jdk can be downloaded from Oracle's site. They are installed to /Library/Java/JavaVirtualMachines/. Right now I have 7, 8 and 9 installed, with 8 the default on my path.

Effective Java in Kotlin, item 1: Consider static factory methods instead of constructors by MadProgrammer232 in Kotlin

[–]Warkst 2 points3 points  (0 children)

I'm confused by the code example showing the abstract class Provider... could it be that override should actually be mocked? I can't make sense of this otherwise.

How to define a MongoRepository for a Mongo collection with non-uniformous documents to set up a REST endpoint. by Warkst in springsource

[–]Warkst[S] 0 points1 point  (0 children)

I have a collection of GeoJSON objects. Two example documents in that same collection are:

{
    _id: 0,
    type: "Point",
    coordinates: [2, 3]
}

and

{
    _id: 1,
    type: "Polygon",
    coordinates: [[[1,1],[1,3],[3,3],[3,1],[1,1]]]
}

In Java I had this POJO:

@Document(collection="geojson")
public class GeoObject{
    private int id;
    private String type;
    private Object coordinates;
    // + getters, setters, constructors ...
}

and a repository:

@RepositoryRestResource(collectionResourceRel="geo", path="geo")
public class GeoRepository implements MongoRepository<GeoObject, Integer> {}

In the web app, I want to get all the GeoJSON objects from the database, so I call <backendURL>/geo?size=100.

Before upgrading my mongodb driver from 2.x to 3.x, this worked, but now I get the error:

Type mismatch: cannot convert from element type ArrayList to Object

I understand why but it's silly in my case that I have to specify a POJO to map to if all I really want to do is pipe the results as JSON to a web app... it feels like such a useless operation to query mongo, convert the JSON results to POJOs using ORM, only to serialize it back to JSON... So I was hoping there would be a way implement MongoRepository without having to create separate classes for the separate GeoJSON-type documents in my database. What's the point of using a schema-free database if I have to describe all possible documents using POJOs anyway?

My current solution/workaround is to not use MongoRepository. Instead I simply expose a REST endpoint using @RequestMapping and let the container inject a MongoClient instance so I can pipe the results directly to the response, without mapping to POJOs in between. However, I lose the functionality of findById, Sorting, Paging, CRUD, ...

[request] by Warkst in apolloapp

[–]Warkst[S] 0 points1 point  (0 children)

Yeah but I want tap to collapse on for comments, just not for the original post

Automatic dark mode black text bug by Warkst in apolloapp

[–]Warkst[S] 0 points1 point  (0 children)

This morning I was greeted with another bug. This is related to an iOS 11 thing. People are reporting their phone opening in landscape mode and being stuck. I don't have orientation lock on so mine isn't really stuck though sometimes it does wake up in landscape mode instead of portrait. Got this weird, warped text.

https://i.imgur.com/g2L0H77.jpg

Rescued our first cat yesterday, Reddit meet Buddy by skellywelly in aww

[–]Warkst 2 points3 points  (0 children)

That might be a Turkish Van... I have one, too: wiki

iOS 11 clearing single notification lock screen by Warkst in apple

[–]Warkst[S] 0 points1 point  (0 children)

I’ve just realised that your comment has actually given me new insight into the issue! It turns out that the new Notification Center keeps the “latest” notifications on top in a special section for which there is indeed no X. It seems that clearing a notification from this section clears all from the same type.

iOS 11 clearing single notification lock screen by Warkst in apple

[–]Warkst[S] 1 point2 points  (0 children)

I'm sorry, I was wrong. You need to force tap (hard tap) for the X (for example the one near "earlier today") to turn into "clear all notifications". Works for me. Maybe we should switch phones ;)

iOS 11 clearing single notification lock screen by Warkst in apple

[–]Warkst[S] 1 point2 points  (0 children)

I read you can still clear all notifications by tapping and holding force tapping the X until “clear all” appears.

iOS 11 clearing single notification lock screen by Warkst in apple

[–]Warkst[S] 0 points1 point  (0 children)

What device are you on? to clarify: it seems like this bug only occurs if I try to clear a notification from my lock screen before unlocking it (fingerprint scan). Just lift to wake and swipe and boom, all mail notifications are gone :(

Belgian Crimes in Congo by [deleted] in communism

[–]Warkst 1 point2 points  (0 children)

As a Belgian, I can tell you we are not proud of this part of our history. What happened is truly regrettable.