« first day (320 days earlier)      last day (3683 days later) » 

8:21 AM
@skiwi Morning
 
You ever have this issue?
0
Q: How to remove varargs suggested variables in Netbeans 8?

skiwiConsider the following Java method: Paths.get(String first, String... more) It is nice that you have access to the varargs when needed, however Netbeans 8, and earlier versions, insist that you will use at least one varargs element. So assume you have the following: String a = ""; String b = ...

 
hi all
 
@skiwi Does Paths.get(a); not compile or is the problem just that you want it to print that by default?
@Nobody Saying hi to you would be saying hi to @Nobody, which is kinda pointless.
 
yet, you talk to me, altough, by the same reasoning ...
 
@SimonAndréForsberg Paths.get(a) compiles fine, but Netbeans insists that I always use at least one second argument (first of the varargs)
Which is annoying the heck out of me.
Also appereantly generics are not that easy than I thought, still can't get the Player thing from yesterday to work properly
 
8:28 AM
@skiwi And by 'insists' you mean that it prints that when you use Ctrl + Space?
 
0
Q: window phone - method is not run?

user39096I create a method in class : public async void Foo() { ..... string response = await Utilities.sendData(data); .... } I create break point and run,when it call foo method,but break point run at string response = await Utilities.sendData(data) and then break point is di...

 
Yeah, or when I type the . (I prefer on the fly autocomplete opposed to Ctrl + Space)
 
Yeah, generics are not that easy once you start using them like crazy..
I haven't been bothered by that as much. I don't know how the behavior in Eclipse is
 
Well, I'll be heading to bed now. You may cast close votes on the above question. It seems to not work, and I cannot quite understand what the OP is saying.
 
To bed?
 
8:35 AM
Yep. 3:35 AM. I had to stay up later to finish calc III homework.
 
Ah you live in... somewhere than me, that explains.
6 hours behind = somewhere in America I suppose
 
Right. Central Standard Time.
 
That explains :p
Work day here started an hour ago
 
you are 1 hr before me or you start at 8 then...
 
Started at 8.30
Fun, I get to replace all File occurences with Path occurences...
 
8:41 AM
which IDE do you use?
 
Netbeans 8
It's more as just replacing, functionality, etc. also changed.
 
never worked with that
 
Also I noticed that I have been using Netbeans 7.4 Beta for the past two years.
 
does it have semantic search and replace?
 
It does, but won't help you in this case
Well... Not enough
 
8:42 AM
why not?
 
Simply put, a Path is a whole different object than a File, so different methods, etc. Yet they serve a similar purpose.
 
yeah but I assume the construction looks similar
and when you replace all the constructors (which would be quite trivial using semantik s&r) then you get all other locations where it is used wrongly
 
True at that
 
@skiwi Speaking of generics, for the Card Fighting challenge I plan on making my code use a whole lot of generics... we'll see how that goes.
 
@SimonAndréForsberg Good luck with generics there :D
 
8:52 AM
@skiwi Thanks, I'll need it. I've already tried it once. (yes, I already have a lot of Card Fighting code, but it will be interesting to see how others will do it)
 
Do you think there is something wrong with this code?
        for (String line : lines) {
            if (line.startsWith(entryKeyCopy)) {
                String value = line.replaceAll(entryKeyCopy, "");
                line = entryKeyCopy + operator.apply(value);
            }
            bufferedWriter.write(line);
            bufferedWriter.newLine();
        }
Netbeans complains on the line = ... that I am overwriting a for-loop variable. (Just a warning)
I'm trying to figure out if I should disable that warning
 
I am very much against disabling warnings
they saved my ass some times
however, sometimes there warnings that you can safely ignore
but to do so you must be 100% sure that it will never be relevant to you
 
@skiwi I suggest you use a variable inside the loop. String write = line; and then you modify write
 
Ok
 
Actually, why not this...?
    for (String line : lines) {
        if (line.startsWith(entryKeyCopy)) {
            String value = line.replaceAll(entryKeyCopy, "");
            bufferedWriter.write(entryKeyCopy + operator.apply(value));
        }
        else bufferedWriter.write(line);
        bufferedWriter.newLine();
    }
 
9:08 AM
I found such a warning only once. It is from GCC for c++ when I use complex<double> where it warns that the ABI has changed since GCC 4.5 (or even lower) which is pretty annoying because I never used that version an cannot be affected by an ABI change and even worse: it seems you can't turn this warning off
 
It's not super explicit then, so I'll roll with String write = line
I'm almost there for an answer on a SO question... I'm stuck with this though:
Map<Integer, List<Map.Entry<Integer, String>>> response
 
What SO question?
I think the for-loop warning you got is mainly for for-loops like for (int i = 0; i < xx; i++) <--- modifying that variable inside the loop might not do what you want, in which case a while is likely better.
 
Yeah, I got it done... posting answer now
yeah I know @SimonAndréForsberg so that's why I thought it is odd to give on an enhanced for-loop, as the looper is never used again.
Is this Java 8 enough?
    Map<Integer, List<String>> response = mapList.stream()
            .flatMap(map -> map.entrySet().stream())
            .collect(
                    Collectors.groupingBy(
                            Map.Entry::getKey,
                            Collectors.mapping(
                                    Map.Entry::getValue,
                                    Collectors.toList()
                            )
                    )
            );
 
@skiwi I don't understand much of it, so yes. That's absolutely Java 8 enough.
Indeed it's a bit strange warning. I blame NetBeans ;)
 
Good morning gentlemen!
 
9:16 AM
hello there
 
Morning
@SimonAndréForsberg here is the answer
0
A: Create a map from a list of maps

skiwiYou can do it the following with Java 8: private void init() { List<Map<Integer, String>> mapList = new ArrayList<>(); Map<Integer, String> map1 = new HashMap<>(); map1.put(1, "String1"); mapList.add(map1); Map<Integer, String> map2 = new HashMap<>(); map2.put(2, "Strin...

Also Netbeans does not make the distinction of regular for-loop and enhanced for-loop in that warning :(
 
@skiwi you even explain what you do, +1
 
9:37 AM
@Vogel612 Well... How else are people going to understand it :P
 
yeah. the problem is. not many ppl. do that on SO..
someone comes with a stoopid jQuery Question and people write 3 lines of code as answer.
 
@Vogel612: shouldn't good code explain itself? ;)
 
I think I should make my advanced Sudoku Solver to Java 8 so that I can learn all those cool features :)
 
Heh, why is this stupid thing not working, I want a lambda from a String to a String:
int newId = FileUtils.modifyFileEntry(StageRename.ID_FILE, "id", idString -> String.valueOf(Integer.parseInt(idString) + 1));
How is (String idString) -> String.valueOf(Integer.parseInt(idString) + 1) giving this: String cannot be converted to int
 
The number of C++ zombies grew again during the night, we're doomed :o
 
9:43 AM
Obtain a String, convert it to int, add 1 to it, convert it back to String.
 
Incoming closable question:
0
Q: How to implement Boost::mutex locks for sharing data without blocking the execution

user39100I am having only one boost::mutex lock while writing data to database i m locking the mutex at that time i have to allow the user to do any thing what they wants except modifying data which type of lock is good implement this concept? Thanks in Advance...

 
sometimes I wonder if we are to picky with "forbidding" design reviews
is there a place where these questions can be asked?
 
0
Q: How to implement Boost::mutex locks for sharing data without blocking the execution

user39100I am having only one boost::mutex lock while writing data to database i m locking the mutex at that time i have to allow the user to do any thing what they wants except modifying data which type of lock is good implement this concept? Thanks in Advance...

 
@Nobody Programmer is the place.
Once the code has be written, it can still be reviewed here though :)
 
@skiwi Are you already using Java 8 in production? What sector do you work in?
 
9:51 AM
Generally speaking, here is how you shall use SE: ask for design on Programmers, debug on SO, have your code reviewed on CR.
Profit.
 
@abuzittingillifirca I'm working on a project by myself in a company as a partial internship
It's about preparing invoices for an external OCR, and processing the output
 
somehow I never saw programmers fit for "real programming" questions
but I can't say what kind of questions I expected there
 
Nobody knows what Programmers is really for.
2
 
more along the lines of the job side
 
If you have a question about the history of computer science, it's probably the best place, though.
 
9:53 AM
Houston, Java8 has a problem.
This is not looking good
 
is Houston responsible for that?
 
Yes
 
My best question is still on Programmers :D
 
algorithm and data structure concepts
design patterns
**developer testing**
**development methodologies**
**freelancing and business concerns**
**quality assurance**
software architecture
*software engineering*
**software licensing**
I marked what I thought programmers.SE is about
on their list of what programmers.SE is about
 
@skiwi Do not leave parens on their own on a line. That doesn't look functional enough that way ;)
 
9:57 AM
@Nobody Freelancing and business concerns would probably be redirected to The Workplace, though.
And there is a site proposal for licensing.
 
Oh I was stupid, nevermind it's not a Java 8 issue.
the method returns a String and I took a int :p
 
@Morwenn: Then they should remove business from their on topic list
the whole licensing issue definitely deserves some special place
 
Ouch at this:
8
Q: JDK8 and Javadoc has become very strict

nolan6000You'll quickly realize that JDK8 is a lot more strict (by default) when it comes to Javadoc. (link - see last bullet point) If you never generate any Javadoc then of course you'll not experience any problems but things like Maven release process and possibly your CI builds will suddenly fail whe...

 
78
Open source licensing

Proposed Q&A site for people who want to use or publish open source software, data, texts, creative works, etc. and have questions regarding which license is best, what the differences between the different licenses are, & what restrictions regarding commercial use exist.

Currently in commitment.

 
1
Q: Angular promise in service

TibI'm new with Angular promise and I would like to know how to improve my code. I have a service which preload medias or datas by calling an API. The medias API return an array of urls to preload. 'use strict'; angular.module('myApp').service('PreloaderService', ['$http', '$q', 'localStorageServ...

 
10:00 AM
It's only open source licensing though. Programmers might get a share of the cake.
 
why this restriction?
 
At first, it was "open source softawre licensing".
They already leveled down the restriction.
(And I have no fucking idea whether I can use "level down" this way in a sentence)
(Whatever...)
 
why not?
(and I think its levelled?)
 
But your question is already being discussed over there.
 
I saw it
I find the answer not very satisfying ^^
by the same reasoning you could say: SO should focus only on C#
it has a large enough community and the C# experts are not (necessarily) experts in other languages and vice versa
 
10:05 AM
Hmm I just realised that AtomicReference<T> is almost exactly the same as AtomicInteger etc in Java
 
@Nobody There are always problem with the "too broad/too narrow" topics when creating a new SE website. Many think that a narrower topic will be enough for a website.
 
0
Q: How to structure a master page?

froadieI have a small coldfusion section of our site that all uses similar js and css files and page structure. The code is currently repeated for each file, and I'd like to factor it out and set something up using a master page and templates. Master.cfm page: <!--- Master template, includes all neces...

 
For example, Homebrew and Beer are kind of a disaster. Alcohol would have been more successful.
 
I did not hear much about them, what happened?
 
2.3 questions per day for Homebrewing, 0.8 qpd for Beer.
 
10:08 AM
how did they make it into beta?
 
Many people like beer and commintted, only to realize there is not much to say about beer and you better just drink it.
 
^^
what are their topics anyway?
 
Other examples: Game of Go has been closed after 27 days in beta and Gamification after 16 days in beta.
 
isn't there a (non beta) chess site?
 
While Boarding and Card games which is broad enough has only 3.6 questions a day.
There is only a beta Chess site. 2.5 questions per day.
 
10:11 AM
many of these topics are missing internet affinity
I bet homebrew/beer would have thrice the traffic if it was necessary to connect to the internet to drink/homebrew
 
Most of the questions on Boarding and Card Games are about Magic: The Gathering. That's fun.
 
hm never played this kind of card games
 
The game is great. It was the first game of his kind and I still consider it one of the best :)
 
I probably got driven away from it by an idiot playing it
 
There are many rules and the game is quite complicated. It takes time to get into it. But once have a fun deck deck to play (possibly many fun decks), it gets really good.
And you can choose between, like, 30k different cards to build a deck. Therefore, you can always play against decks that you don't know about :)
 
10:22 AM
I'm with stupid, I asked a question on SO of which I already had a working implementation.
 
Grats! :D
 
well then you can now answer yourself ^^
@Morwenn: To come back at your SE usage recommendation
the debug part sounds like it will result in many too localized questions
 
Someone else answered it as I realised it way late and made it way more complicated as it should have been for my own brain.
 
10:42 AM
@Morwenn You think Boarding and Card Games would accept questions about our own Card Games (for the Coding Challenge)
@Morwenn Unless you only play Standard, in which case you "only" have about 1.6k cards to choose from.
@skiwi It seems like every time you get a compiler error these days your first thought is that it's a Java 8 error...?
 
More my last thought @SimonAndréForsberg, compiler errors are quite common :p
Much interesting... Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: ocr.base.BaseChecker.<init>
a RunTimeException of uncompilable source code?!
 
OCR?
 
A clean and rebuild fixed it though
 
sounds like it has to decipher your code using OCR at first ^^
no wonder it is not compiling
 
Lies: Exception in thread "Thread-0" java.lang.IllegalArgumentException: The original path ("D:\OCR\input\Flynth01.pdf") has no extension., it does have an extension.
 
10:51 AM
Well, I think I've experienced before that you can get RuntimeExceptions because there are compiler errors in the code.
Can't remember how exactly I got that. Possibly loading an external JAR...
 
@SimonAndréForsberg But I find it funnier to be able to use all the cards (ok, I apply the legacy/vintage restrictions).
 
@Morwenn I especially like the Unhinged cards :P
 
Too bad, that's Unglued.
 
Close enough
 
Haha, I'm just being boring :D
 
10:57 AM
It becomes Glued when you glue the pieces back together again so that you can use it again.
 
Well, unglued and unhinged cards were fun to play at first, but I actually got bored of them fast enough :/
 
Btw @SimonAndréForsberg the generics ended up like this now, which I am not too happy with:
abstract public class GesturePlayer<A extends Action, R extends Result, P extends GesturePlayer<A, R, P>> implements Player<A, R, P> { }
 
I have never played with them for real actually
@skiwi Why are you not too happy about that?
 
Because it looks complicated and does not 100% do what I want.
 
By the way, Chaos Confetti is useless, you can already do that with Chaos Orb x)
 
11:00 AM
Do Magic: The Gathering cards also come in booster packs?
 
@Morwenn I started Magic during Zendikar, more or less stopped (at least IRL playing) after just a year or two.
 
I remember buying Pokemon and Yu-Gi-Oh boosters and decks loong ago
 
@skiwi Yes they do. 15 cards in each
 
@SimonAndréForsberg I started with Shards of Alara and stopped like three years later. I still buy some cards like once or twice a year to complete my decks since I still play casually :)
@skiwi Pokemon was a good card game :D
 
@Morwenn Yeah, I just play it with Cockatrice every now and then, and play on my Android tablet.
 
11:19 AM
Did SE just resend a notification for others aswell? Like I got my last 2 notifications again, also on mobile with SE app.
 
not on my end
if you mean the inbox
 
 
1 hour later…
12:21 PM
0
Q: Python: Simple OpenID server that always returns "allow"

aragaerI have an application that uses OpenID for authentication. To test that application I've come up with the following: from openid.server.server import Server as OpenIDServer from openid.store.memstore import MemoryStore from tornado.web import RequestHandler from urllib.parse import parse_qsl _O...

0
Q: WPF textblock needs to fill entire stackpanel contents

user969172How can I have that the textblock fills the entire stack panel space minus the radio button's width? The radio button must pad right and the textblock must stretch the remaining area. <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presen...

0
Q: Converting a numerical string to the equivalent multipled by 100

barak manosMethod: Input: a string which represents an integer or a non-integer value. Output: a string which represents the same value multiplied by 100. Requirements: No floating-point unless needed. No leading 0s in part left of the floating-point. No trailing 0s in part right of the floating-point...

0
Q: Construct date sequence in scala

jilenI want to have a continuous day sequence like ['2014-01-01','2014-01-02', ...] Then I define a stream to do that. def daySeq(start: Date): Stream[Date] = Stream.cons(start, daySeq(plusDays(start, 1))) I get the sequence within range [start, end) by calling daySeq(from).takeWhile(_.getTime <...

 
Generics are the holy grail buried in the hell.
3
 
@skiwi Sometimes yes, but sometimes they're just lovely.
The fact that you're having so many problems with them right now tells me that you might want to explore other solutions.
 
0
Q: Improving the performance of my "type" function

ProgoI writing a JavaScript library, and I am using this function for type detection: function type(obj){ return Object.prototype.toString.call(obj).replace(/([\[\]]|object|\s)/gi, ""); } Their works great, but look at how it does in firefox: (look at the green bars) How can I improve it's ...

 
12:38 PM
I it is working now @SimonAndréForsberg but it does mean that a lot of objects need additional types, however the final objects (leafs) do not need them, so you can still use it without a problem.
 
0
Q: Optimizing a function to read bigger files in php

Bazinga777I have the following function that reads data from a csv file and it is supposed to take in data which is from a certain certain timeinterval in this case 07:59 and saves them up in another csv file. The problem is that it is very slow when I process large files. Takes quite a while to process da...

 
Runs program in normal run mode, is confused that debug view is not popping up
2
Is it normal behaviour that exceptions get triggered in normal mode, but not in debug mode? (If you put a breakpoint on the line where the exception occured, and still step over it)
 
Sounds like a Heisenbug
(a bug that changes behavior when debugging)
 
morning
 
12:47 PM
morning
if I'd say that around here now, people would shake their heads about another student getting up late
 
@skiwi Probably you are having a problem with class reloading if it is a web application.
an Java
 
It's just a standalone application
How can this even happen:
Caused by: java.util.NoSuchElementException
	at java.util.Scanner.throwFor(Scanner.java:862)
	at java.util.Scanner.next(Scanner.java:1371)
It's a Scanner(System.in), that never ends.
 
1:01 PM
Are you trying to read in a token longer than buffer size 1024/2048 chars per chance_
?
 
Hello @all
 
Oh, hi @all .
 
hello you two
 
@abuzittingillifirca Nope, just very small strings
Hi @rolfl and @syb0rg
What a coincidence, since Java 8 got released, I am maxing out my rep on SO everyday.
 
Oh hi :D
 
1:07 PM
Huh
private Optional<RPSGesture> askInput() {
    try (Scanner scanner = new Scanner(System.in)) {
        System.out.println("Please enter your gesture: ");
        String s = scanner.next();
        return parseRaw(s);
    }
}
It literally gives NoSuchElementException on String s = scanner.next();.
 
0
Q: Should I create two seperate Services and then combine them or have one large?

JakkyDBasically, I have two separate tables, Campaign and CampaignDetails. They relate via CampaignID. I want a service that can handle both at the same time, as they're closely related and when one gets updated- so will the other. At the moment I'm combining the two but it's starting to get a bit har...

 
You should download JDK sources and debug into the abyss.
 
1:22 PM
@skiwi the documentation is also quite clear that you should check hasNext() before calling next().
 
@Corbin @BenVlodgi it wouldn't have been malformed if they had been properly using brackets and not trying to "one-line" everything!!!
 
I kind of forgot @rolfl, I'll try to use it now.
 
Sorry @BenVlodgi but I like @Mat'sMug answer for that question
 
"Welcome to Code Review. Your very first question sucks, so we are going to delete it right now to be sure that you feel terrible will not want to ask questions ever again :)"
 
it throws:

> NoSuchElementException - if no more tokens are available
It needs to be able to match the delimiting pattern after the input data in order for there to be a next().
 
1:27 PM
@Morwenn: It is much more efficient to heavily downvote, poke fun at them and ultimately get them prevented from posting by having to many downvotes
 
Well the issue is that I have multiple threads accessing new Scanner(System.in)
Which is still no issue, until they want to do it concurrently
 
concurrency problems are not the same as having problems when two threads are accessing an object at the same time.
 
I sort of got it working now, with more problems
 
@Nobody Obviously, I won't ever post this as a comment, but it's sadly the feeling I have whenever I vote "close" on a first question :/
 
you can have concurrency problems even though you don't access common resources simultaneously
 
1:29 PM
>A Scanner is not safe for multithreaded use without external synchronization.
 
Oh... interesting @rolfl I still sort of thought they were the same
 
@Morwenn: If you are feeling guilty then offer your help in the comment :)
 
@skiwi - it is relatively complicated, but, in any language (not just Java), if you have accesses being modified on one CPU, that CPU will only be modifying the values in that CPU's L1 cache. This may get swapped out to more distant caches like L2, (perhaps L3 if you have it), and finally back to main memory. Another thread, running on a different CPU, will have it's own copy of the data in it's L1 cache. They are operating on completetely different copies of the data.
 
I'm quite lost on explaining what exactly is going on, so that it is going to be an issue.
 
The one CPU will not see any of the changes the other CPU is making.
 
1:33 PM
Hey @Doorknob
 
If there is no reason to flush the values back up the cache lines, then the CPU's will never see the same data.
 
Again, the @syb0rg robot is forever watching :-P
 
I see all, and know little all ;)
 
Synchronization, any atomic accesses, and some other instructions cause the Cache-lines to be flushed, and the copies of the memory on different cpu's to be synchronized (all fushed back to a common point in the memory hierarchy.
 
And that is the issues that arrise when there is no synchronization and thus issues when two threads are accessing the same objects @rolfl?
 
1:34 PM
1
Q: Avoiding unnecessary memory consumption in Python and wxPython

pssI am working with python v2.7 and wxPython v3.0 on Windows 7 OS. In my application I have a panel named as myPanel. I have a image as a background on myPanel the image names is green.bmp The myPanel contains a button named as myButton. This myButton also contains an image as a background named as...

0
Q: How can I solve SICP 2.4 in C++11

ZhenThis exercise ask for implement cons, car and cdr functions using only lambda functions. The function cons(a,b) create a list of a followed by b, car(l) returns the first element of list l, and cdr(l) returns the rest of the list. I got it working with lists of only two elements, but when you t...

 
Yes, but, you could modify an object on CPU1 at time x, and that modification will not be seen by CPU2 at time x+y unless the cache-lines have been synchronized.
 
@StackExchange The second question specifies that code does not work.
 
y can be a long time (I have seen evidence of it being in the order of seconds sometimes).
 
ok
My issue now has to do with FutureTasks, which read from the System.in via a Scanner
If I type within time, then everything is fine
 
In other words, even if you have two threads that access a single resource, but not at the same time, you should make sure there is some form of synchronization in the memory model so that happens-before, happens before.
 
1:37 PM
But once the FutureTask reaches the max specified time (futureTask.get(period, unit);), then the whole scanner on System.in will behave very weird, basicaly it is broken then
 
Java memory model makes the synchronization points relatively clear.... if you have the stomach for it.
Having two scanners on one input stream is broken.....
 
They should not be there at the same time though, if execution goes as it is supposed to go
one thread captures the scanner, then it times out, then that thread should be called, and then a new thread comes in and captures the scanner
 
Unless you use synchronization, there may be two copies of the scanner.
In computer science, the happened-before relation (denoted: \to \;) is a relation between the result of two events, such that if one event should happen before another event, the result must reflect that. Even if those events are in reality executed out of order (usually to optimize program flow). This involves ordering events based on the potential causal relationship of pairs of events in a concurrent system, especially asynchronous distributed systems. It was formulated by Leslie Lamport. In Java specifically, a happens-before relationship is a guarantee that memory written to by stateme...
 
Ah...
Now onto figuring out how to establish it
 
0
Q: Unit testing - test class inheritance vs single test class

PellaredWhich unit testing approach and WHY do you prefer? Inheritance-driven-testing public class GivenSynchronizedDataLink : TestBase { internal SynchronizedDataLink Subject { get; private set; } protected Mock<IDataLink> DataLinkFake { get; private set; } protected Mock<IAutoReaderWrite...

 
1:40 PM
(it is not trival to acquire a lock or something)
The problem in my opinion boils down to that scanner.next() will wait forever, while the thread gets blatantly killed after 10 seconds
 
The Java memory model describes how threads in the Java programming language interact through memory. Together with the description of single-threaded execution of code, the memory model provides the semantics of the Java programming language. The original Java memory model, developed in 1995, was widely perceived as broken, preventing many runtime optimizations and not providing strong enough guarantees for code safety. It was updated through the Java Community Process, as Java Specification Request 133 (JSR-133), which took effect in 2004, for Tiger (Java 5.0). Context The Java pro...
 
@SimonAndréForsberg Have you seen the answers to this question yet?
 
@StackExchange Isn't that more of a general question more suited for Programmers ?
This is also specifically asking for opinions..
 
@syb0rg No, I haven't. Have you seen the horrible code I have to deal with at work?
 
@SimonAndréForsberg No. Are you allowed to show it? I kinda want to see.
 
1:46 PM
@skiwi - if you want to become really good at Java, I recommend you read JCIP - Java Concurrency in Practice - you will thank me for that one day. But, it will make you wonder how things actually worked for you before you read it.
 
I'll try to pick that up soon tm
if I can find it for free somewhere
 
A friend of mine had a very good surprise at work: they changed "indentation = 4 spaces" to "indentation = 2 spaces" in their coding norm, "because our screens aren't large enough". I don't ever want to review the code written there.
 
There really is something wrong in my design with having Scanner(System.in) inside a FutureTask I think
 
You may want to check the editions, I think there is a newer one.
 
[Join 20 users in this chatroom]
'morning!
 
1:48 PM
It is.... still.
 
@Malachi thanks for the checkmark!
 
Wish me luck, roll-up-the-rim time!
 
Hey coffee mug!
 
But I do not know yet how to do it else, as it is called in a RPSPlayer implementation... And scanner.next() waits indefinately
 
Hey!
 
1:49 PM
@Mat'sMug you're welcome. and now I go to work and get sh....tuff done
 
@skiwi are you supplying any data to System.in?
(and is it terminated with a token?)
 
Supplying to System.in?
 
> Please play again
 
That is System.out where I write to
 
@skiwi it is like winning a lottery.
You have to buy a ticket to win.
If you have a Scanner on System.in new Scanner(System.in)
 
1:51 PM
@BenVlodgi i hear that. I am kind of old school in a way where I learn better from doing and making mistakes and fixing and figuring it out on my own, in some cases. in other cases I see what other people are doing and try to figure that out.
anyway I am outta here
 
Then you have to have something sending data to your progrm's Standard Input before the Scanner will read something.
 
And that is me myself
 
@BenVlodgi I did upvote your answer too Notmal.BTW
 
@Malachi BTW == Back To Work or By The Way .... you keep changing that
 
0
Q: Is this the Clojure way?

Fu86Is there a way to write this better or more Clojure way? Especially the last part with with-open and the let. Should I put the -> form into a separate function? Is this function to overloaded (to much stuff) or is this still ok? (defn scrape-book-cover [url image-filename] (let [out-stream (...

 
1:53 PM
@syb0rg I can show you an example of what I have to deal with
        if(!useAsSelectionDialog) {
            refreshNewList();
            MyLog.info("refreshList called from public interface but refreshNewList should have been used");
            return; //FORCE the correct list to refresh (if wrong method called from public interface)
        }
 
nice comments
 
    for(char c : template.toCharArray()) {
        if(c=='>') {
            read = false;
            f.add(tmpstr);
            tmpstr = "";
        }
        if(read) {
            tmpstr = tmpstr + c;
        }
        if(c=='<')
            read = true;
    }
 
There are more serious issues to solve in my code..
I just noticed I by accident am using raw types
public class RPSGame<P extends RPSPlayer<P>> extends AbstractGame<RPSGesture, RPSResult, P> { }
The idea is that it can take all types of RPSPlayer, but the generics here (to fix something else) messed that up
As now it only takes one specific subclass of RPSPlayer
 
P extends RPSPlayer<P> -.- got similar stuff here...
 
"maybe you are right, its posible to move the question to stackoverflow or I should create again there" -> I have to admit that I have no idea how to move a question.
 
1:59 PM
0
Q: Two script completing the same task, which is the best way?

DijonI have the following two methods of completing the same task, however I'd like to know which is the preferred method and WHY? Or if there are any suggestions to complete the task in an even better, cleaner way. The task Find part 1 of $string in the example $string = '1/2/3/4'; so the first par...

0
Q: improving recursive function

KarelGI have a multidimensional array as a result from a webservice called from PHP. I cannot edit the webservice, but the result is as array (size=5) 'id' => int 0 'name' => array (size=7) 'it' => string 'Tutti' (length=5) 'ca' => string 'Tots' (length=4) 'es' => string 'To...

 

« first day (320 days earlier)      last day (3683 days later) »