« first day (596 days earlier)      last day (3412 days later) » 

10:00 PM
oh
 
I'd recommend doing it in the old-fashioned for-each way.
@skiwi has used some dirty tricks in the past to get past those, but ultimately, I think doing it with a good old for-each is better in this case
 
interesting
I had no clue about this
 
otherwise you'd have to add an additional method that takes some sort of lambda expression and either swallows the exceptions, or rethrows them
 
wanna earn some easy SO rep?
 
10:02 PM
0
Q: Compilation fails due to not declared exception, even though it is declared

janosThis method gives me a compilation and I don't understand why: private void invokeMethods(Object instance, List<Method> methods) throws InvocationTargetException, IllegalAccessException { methods.forEach(method -> method.invoke(instance)); } The error message is: unreported exc...

I was writing it up while waiting
lol that was fast
 
I'm always stressed when I'm writing SO answers
stupid FGITW-syndrome
 
this time, you didn't need to
this was all yours from the start
your fast answer kinda precludes the possibility of a pizza though
oh hey, this gets you Solstice on SO :)
 
Jumping in quickly, my bad there @janos
I'd surely go with a regular for loop in such simple case
 
no worries
 
@janos I don't want an SO-pizza!
 
10:12 PM
but I do!
 
@skiwi I'm ashamed from not discovering that problem in your review.
I guess we're all humans after all.
What's the pizza?
 
5 answers in less than 30 minutes
 
Aha
Instead, maybe I will get 5 up-votes in less than 30 minutes :)
 
it's alright, this was too simple a question to get many answers
(on a Sunday night)
 
0
Q: Roughly removing 'duplicate' photos based on filename

MVersteegI quickly wanted a script that'll go through a lot of photos in a folder and only keep one photo per minute (gotta love burst shots on iPhone). Fortunately, Dropbox names them with a timestamp upon import: I was thus allowed to base this one on the filename (an example filename is '2013-11-06 23...

 
10:18 PM
@janos Are you good with gradle by any chance?
 
not so good, but I build my android projects with it
 
I'm using gradle with my libgdx projects, and I just managed to add some JUnit to it, but I noticed that the task :desktop:dist does not run :core:test, so I'm trying to figure out how I can make it do that...
or if there is perhaps a good reason why it doesn't do that automatically
 
nicely done answer on SO! I'll accept after a few days, in case the delay helps you get more rep
never seen those names
does :desktop:dist imply packaging like mvn package ?
 
yup
it creates a distributable JAR file
but apparently it doesn't run tests...
 
then you're right to expect running tests
and I can't help you :-/
 
10:23 PM
perhaps I'm using the wrong task
 
gradle ain't easy
 
Neither was Maven, until I learned it.
Dear God, don't make me ask a Stack Overflow question....
 
10:46 PM
Morning morning
 
Yay, I didn't have to ask a Stack Overflow question!
5
@janos In case you're interested, I found this in a build.gradle:
task dist(type: Jar) {
    from files(sourceSets.main.output.classesDir)
    from files(sourceSets.main.output.resourcesDir)
    from {configurations.compile.collect {zipTree(it)}}
    from files(project.assetsDir);

    manifest {
        attributes 'Main-Class': project.mainClassName
    }
}
so I could easily modify it to add the task dependency I wanted
using 'dependsOn'
You earned Handegg on Stack Overflow!
Considering the voting on SO, that must be one of the rarest hats.
 
11:09 PM
0
Q: Reading options from .cfg file

RavishI have a bash script that reads a config file with key/value pairs and uses these values to modify the functioning of other scripts correspondingly. Example .cfg file: layout='true' code_compliance='true' .... .... variablename='false' output='true' The file consists of a very less amount...

 
@SimonAndréForsberg cool, thanks for sharing!
@SimonAndréForsberg both of my SO questions I pimped earned the brave answerers a Handegg ;)
there should be a hat for producing hats
 
too late here, can't click now
 
just saying, Will.i.am. would get such a hat if there was one
 
0
Q: Lock Using `Interlocked` vs lock Statement (`Monitor`)

Kaveh ShahbazianConsidering: Interlocked.CompareExchange generates a memory barrier, Intended to be used with very fast operations (like generating an id), SpinWait starts sleeping in milliseconds after 10 or so spins (and does some other smart stuff), What are characteristics (pros & cons) of this code? pu...

 
ttgtb, see you tomorrow
 
11:48 PM
Has anyone in here had experience with writing Firefox extensions?
 

« first day (596 days earlier)      last day (3412 days later) »