« first day (392 days earlier)      last day (3619 days later) » 
00:00 - 16:0016:00 - 00:00

4:04 PM
Why is it so hard to set the value of a series in a chart..
 
@JeroenVannevel Because you didn't create the software.
 
Which chart
SEDE?
 
Winforms
 
Sounds like an MS product?
Could that explain it?
 
I trust in MS. But not in their charts
 
4:06 PM
vvvv
All Stack Exchange Q&A sites are now making the trip to Oregon, hang on.
 
The Oregon Trail is a historic east-west large wheeled wagon route and emigrant trail that connected the Missouri River to valleys in Oregon. The eastern part of the Oregon Trail spanned part of the future state of Kansas and nearly all of what are now the states of Nebraska and Wyoming. The western half of the trail spanned most of the future states of Idaho and Oregon. The Oregon Trail was laid by fur trappers and traders from about 1811 to 1840 and was only passable on foot or by horseback. By 1836, when the first migrant wagon train was organized in Independence, Missouri, a wago...
 
Well, I have to phisically ID a hard drive.... based on it's logical location....
 
@rolfl What are they actually doing now?
 
You know, I don't know....
 
Making their secondary location primary or some sort?
That post isn't very informative :P
 
4:14 PM
This time next week, the Stack Exchange NYC data center will be powering down. Not as quickly as last time though.
 
Sounds like a one-time migration then
 
There was a power problem a couple of weeks ago. I imagine this is related.
 
I can believe so
Tonight I'll start with JavaFX 8 :)
Objective is simple: Split the console into a textarea mimicking the console, and an input field
 
Baahhhh!
Which is what I should be doing.... find that damn disk!
 
And I'll start up my Xbox.
 
4:20 PM
Still playing Russian Roulette IT style?
@Jamal You can also learn Java instead.
Java Java 8
 
The serial number is..... S1FOHKEN
 
@skiwi Nah, I'll start with JAVA. It's much, much easier to learn.
 
And the disk is SOF)KED
 
@rolfl I just read that as 's1 fokken'
 
irony
excellent. OK, I have to make a plan.... I have a RAID1 array. One of the drives is borked.
The other drive appears fine.
Do I trust the other drive?
It was bought at the same time as the first.
It is identical to two other drives I have.
If I add it to the same RAID array as the other two, I get an additional X Terrabytes of storage.
Alternatively, I can make it a new off-site backup disk.
I think I will do that....
Currently, though, for your kicks:
 
4:40 PM
hdparm -g /dev/sd[a-i]

/dev/sda:
 geometry      = 364801/255/63, sectors = 5860533168, start = 0

/dev/sdb:
 geometry      = 364801/255/63, sectors = 5860533168, start = 0

/dev/sdc:
 geometry      = 364801/255/63, sectors = 5860533168, start = 0

/dev/sdd:
 geometry      = 364801/255/63, sectors = 5860533168, start = 0

/dev/sde:
 geometry      = 243201/255/63, sectors = 3907029168, start = 0

/dev/sdf:
 geometry      = 243201/255/63, sectors = 3907029168, start = 0

/dev/sdg:
 geometry      = 486401/255/63, sectors = 7814037168, start = 0
That's 4 3TB drives, 2 2TB's, and 2 4TBs
Total 24TB.
(but sdb is broken).
reboot time/// bye
 
Hello
I am going to read through a couple of Programming books, so I don't look so dumb in the future.
going to start with C# and then on to Programming Logic and Design, and then we will see where I am after that.
 
5:03 PM
@Malachi: You could try to measure your progress on this: sijinjoseph.com/programmer-competency-matrix
6
 
5:26 PM
@Nobody Is there a special level for having heard (like really heard as in lectures) about the level 3 concepts, yet not knowing how they work? :D
> Thinks that all testing is the job of the tester
Made me laugh ^
 
@Nobody there is a lot that I need to learn....lol
 
Given that I'm only halfway through the length of my study, I feel very comfortable.
 
5:54 PM
@Nobody Interesting link, I gotta pin that
 
JavaFX 8 > Swing 10000000000 times
@SimonAndréForsberg You pin, you win.
 
JavaFX that good, huh?
 
Yes
Almost ready to share small piece of code
@SimonAndréForsberg This is my console in GUI implementation...
    public void start(final Stage primaryStage) {
        primaryStage.setTitle("Console in GUI");

        BorderPane borderPane = new BorderPane();

        TextArea textArea = new TextArea();
        textArea.setEditable(false);
        borderPane.setCenter(textArea);

        TextField textField = new TextField();
        textField.addEventHandler(KeyEvent.KEY_RELEASED, keyEvent -> {
            if (keyEvent.getCode() == KeyCode.ENTER) {
                textArea.appendText(textField.getText() + "\n");
That's all you need to mimick a console.
Isn't it wonderful
 
anyone here use github?
I have a question
 
@Malachi Yes
 
6:04 PM
if I upgrade to micro so that I can have a private repository can I create more than one that is private or will I have to pay more for each one?
 
I think it's up to 5?
Let me check though
 
I suppose this is the only one that I am working on at the moment, maybe I will start with the RPSLS game
 
'https://github.com/settings/billing
It's five
Only thing left to figure out in with JavaFX is how to implement when a message has been typed properly
Because honestly the design of System.in and System.out is horrible
 
thanks skiwi
I am going to figure out how to use it and stuff before I start paying for it...lol
 
Ever worked with git or github before?
Also I think Travis CI (Continious Integration) is quite awesome
Unfortunately if you're using a private repo, then you'll aalso need to pay for Travis, it's free for public
You can check an example at: travis-ci.org/skiwi2/TCG/builds
Basically every commit to your repo will be automatically build on some server in the cloud, and you can do whatever you want during/after building.
 
6:15 PM
I have an account but I have never worked with either
what is Travis CI?
 
What I just explained there above :)
@SimonAndréForsberg For extra fun in JavaFX 8, add this to all your text fields:
textField.addEventFilter(KeyEvent.KEY_PRESSED, keyEvent -> textField.setRotate(textField.getRotate() + 1d));
 
@skiwi lol, rotate the textfield on key press? No thanks :)
 
It's so fun that it just works.
With Swing that would be a hell of a headache to get working :)
 
@skiwi How do you deploy JavaFX apps though? Do they become webapps or are they pure JAR or what?
 
Pure JARs for sure
webapps I have no clue, given the history, that might also be possible
The history of Java I mean, not of JavaFX per se
 
6:22 PM
OK
 
Once I manage to get this working decently I might push it to github later tonight
 
6:33 PM
posted on May 31, 2014 by w_ahmed

Input is a file containing numbers in this format: 1.2 3 5.1 2 7 4 6 5 2 9.22 1 0.0 4 3 I am doing the sorting in the simplest way, using Collections.sort method. The running code is as follows: import java.io.FileNotFoundException; import java.io.FileReader; import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.Scann

 
@CaptainObvious We are currently offline for maintenance
 
I am. Or.... they are. For me.
 
Now we're online
 
0
A: Sorting numbers using Java Collections.sort()

rolflThere are a few improvements I can see, but not really related to performance (though it may run a bit faster anyway). If the files are small (less than 10Megabytes or so), then the relative performance of different approaches are slight (obviously, you can bork your code, but the IO part will r...

 
Probably cache invalidation
Seems like that inlining feature doesn't work?
 
6:51 PM
There we go, chat system found main
 
@rolfl I think I'm also going to answer that question
There's only 23 bottles of rep on the wall...
 
I had to copy paste stuff here but I put my existing RPSLS code to Git
I am trying to add versioning to Xamarin and be able to save what I already have done to a repository
 
Hey there, just saying hi - should I chip in on the not-so-on-topic VBA error handling meta-debate? ...I'll just create a chatroom for it otherwise.
 
@SimonAndréForsberg I thought this might be of interest. Stumbled upon this while doing my research on the close vote phenomenon on programmers
 
7:07 PM
By the way, I got my 100th bronze badge.
5
@Mat'sMug I think you should chip in on the why-it-is-not-on-topic-on-meta debate :)
 
does anyone of you have experience with "topcoder"?
 
Is "splitted" a word? I thought "to split" was an irregular verb, so splitLine would be descriptive and grammatically correct @sim (self-debating whether that answer should get my last vote for the day ;)
 
@rolfl I just reviewed the code in your answer....I saw the code and thought of a way it could be better or shorter or whatever.....
 
posted on May 31, 2014 by user3369309

I'm working on writing a code which gets several pieces of an image, and reconstructs them to one whole picture, the images are represented by matrices, two pieces should be "glued" if the right column of one matrix is the same as the left column in the other one. This is my code: from images import * def reconstruct_image(m): try: Matrix.load("./im1.

 
I'll post a meta-answer when I have a chance then. Hopefully the post won't be closed or locked then ;)
And congrats for your 100th bronze badge @simon!
2
 
7:26 PM
And back again... Okay, will be a challenge to get the code to github by this evening :)
I'm a bit confused on how to mix the fact that I have a continious game and the user input together
@SimonAndréForsberg Are you there for some halp?
(Unrelated, yet still AI related)
 
@skiwi: Watchdogs?
 
posted on May 31, 2014 by Schilcote

I've written these two command-line tools to be used to facilitate forestry surveys. For a little background, the idea here is that often a landowner needs to know precisely how much wood is coming out of his dirt. Not only that, but he has to account for the fact that you can't turn a cylinder (trees) into rectangular prisms (boards) without a bit of loss. So wha

 
@Nobody Yes,
The internet is filled with physics/logics/AI fail from Watchdogs
I don't know how good the game itself is, but 35 euro for purely testing out physics is too much here :p
 
7:52 PM
@skiwi I'm here!
 
@SimonAndréForsberg Good, I have a question
 
@skiwi Shoot
 
As you know, my game loop consists of continiously the self player and opponent player playing their turns
 
In the previous situation I was using System.in, which is a sort of blocking UI to process events
Now I have moved to the console thing and hence it's non-blocking anymore
I'm struggling how to get still hand over control to the players
A turn for example only ends when a player indicates so (by a typed command)
 
8:00 PM
I think that it's not correct to have a "game loop" at all. Your Game.play method would make sense if there's two AIs fighting, but it's not.
 
I am so confused
 
How would you make it work without a loop then alternatively?
@Malachi I am confused about what you're being confused
 
I am trying to get my Xamarin to let me commit to my Github
and I don't think I know what I am doing enough to do that.
 
I have no experience with Xamarin unfortuantely, are you able to connect to your github repo?
 
@skiwi Let me ask you a question first: Why do you have a game loop? What is it supposed to do?
 
8:15 PM
@SimonAndréForsberg "Play" the game, primarely help would be if one player is human and the other AI (or networked)
The AI and networked would both work in a blocking way I suppose, at least linear
 
I got my Files into the Repo for my BlackJack Game just now
so confusing.
I couldn't even do it through Xamarin
I had to do it through file explorer
it's public for now.
that is the blackjack game that I made like 3 years ago
 
Is it possible at all via Xamarin?
 
I am not sure. it seems really buggy to me to even code with it.
I am going to see if I can check it out or branch it or whatever
 
8:30 PM
@skiwi I think you should remove the loop. Or at least, don't use the game loop when you're using your UI. The UI creates the game object and starts the game, and then you can call performAction methods and endTurn method(s)
 
@skiwi not really, my XS doesn't have a publish option, I saw it before but I don't remember where that was, all the menus that say Version Control don't have Publish in them
I have a playfaire cipher application that has some parts that I didn't finish yet.... hope I can remember what I was doing
 
@SimonAndréForsberg I need to picture how that works
Is there also a way while still leaving the loop intact?
@Malachi github issues/tasks ;)
 
8:46 PM
I need to find a version system for my computer and then set one up on a personal server on my network. that would be cool for building apps and stuff
 
@skiwi You can still keep the code for the loop, but let the UI do what the loop does, so to speak.
 
@SimonAndréForsberg I'll go with the blocking approach for now, this code will surely be up for review ;)
 
@skiwi I unfortunately don't have so much time to help you right now, otherwise I could explain a bit more
Anyone here has experience in cloning git repositories across different computers (over the internet, I have a port open for git to use), without using github?
fatal: read error: Invalid argument
fatal: early EOF
fatal: index-pack failed
^^ That's the output we're getting right now
 
@SimonAndréForsberg It's no problem, just playing with some stuff now... As it is by no means git ready here :P
 
And on my machine (server-side) it says:
[3324] Ready to rumble
[8304] Connection from xx.xxx.x.196:63642
[8304] Extended attributes (29 bytes) exist <host=xxxx.xxx.xxxx:xxx>
[8304] Request upload-pack for '/gittest'
 
9:00 PM
What is it what you are using there?
 
I'm using git daemon to try and be a server for someone else to copy my repository
git daemon --port=xxxxx --verbose
 
I don't have experience with that unfortunately
That were too many typos.
Interesting...
Exception in thread "Thread-4" java.lang.IllegalStateException: Not on FX application thread; currentThread = Thread-4
It complains on a method call
 
I'm sure you know you can't manipulate the UI from background threads, right?
 
I don't think Swing ever raised an issue about that.
But it is logical actually
Then question is: How do I do it?
 
9:16 PM
Manipulate UI from a background thread?
Have the background thread tell the main thread to do it.
 
that would only be possible if I could obtain the main thread, will need to look into that
As here the main thread is kind of implicit
 
The main thread is "kind of implicit"? The main thread is the thread from which the application is launched, the thread which is in charge of the UI, and the thread from which any other thread originates (or originates from a thread which originated from here, etc)
 
Appereantly I need to wrap the calls in Platform.runLater(Runnable runnable)
That's the preferred way to make things run on the javafx thread
 
I actually don't know if it's a hard rule in Java that you can't manipulate the UI from background threads. In some languages, you simply can not do this at all. But in all languages, it is highly recommended against doing this.
The thing is, the UI thread is the one the user interacts with. You don't want to get in a race condition with a user click, etc.
 
As from experience with Swing (the second GUI stack), nobody pretty much cared
But I do understand the issues
 
9:24 PM
And it's the same reason why operations that take any amount of measurable time should be put in the background. If your UI thread is spending 2 seconds sorting an array, or fetching a file from the web, that's 2 seconds your UI is "locked up" and can't respond to user interaction.
 
The latter you explain (extensive tasks in background thread) is the easy part to understand
Why it isn't allowed the other way around is a bit more implicit
You would say this is easy... But without knowing JavaFX much, I have no clue how to get my Scene increase it's width as the width of my content increases (fit-to-content), will be a challenge to find out
 
And not only do you want race conditions between a background thread and the user, you don't want race conditions between two background threads trying to manipulate the same pixels, etc.
I'm not familiar enough with Java to know much about communicating between threads in there, and I know nothing about JavaFX. Just know the basic principles of what you should and should not be doing on what threads in general.
These things are relatively painless in Objective-C, fortunately. ;)
 
Enough code for today :)
 
@Malachi Which code, where ...?
 
@rolfl that one Java Question. I didn't leave the answer. I caught it before I posted
StringBuilder sb = new StringBuilder();
for (int i = 0; i < values.length; i++) {
    if (i > 0) {
        sb.append(", ");
    }
    sb.append(values[i]);
}
I was going to suggest this
StringBuilder sb = new StringBuilder();
sb.append(values[0]);
for (int i = 1; i < values.length; i++) {
    sb.append(", " + values[i]);
}
I have a question that I am about to post about a shift cipher
 
9:41 PM
In this case, your code is likely fine.
There are so many things wrong with my code, and so many things wrong with yours too.
In reality, neither of the versions (yuors, nor mine), is robust at all.
The reason I don't use the system you suggested often, is because I can't always guarantee the existance of element 0.
In this case, you can.
Right, what a day.
Reinstalled this computer, seems ot be working.
 
@rolfl Java is Zero Indexed always isn't it?
 
Yes, but an empty array has no member 0
 
oh
 
In this case, though, a split will never produce an empty array. At worst, it will produce a 1-member array of an empty string.
The Double.parseDouble() will throw exception on the empty string.
The values[0] will not matter.
 
I need to find me some Java Books and read everything I can get my hands on. I found out that I can make $30k more a year if I work for the same company that my dad works for, he does AS400 stuff but programming in Java would get me in the door pretty good there.
0
Q: Simple Caesar shifter in C#

MalachiI use these in a windows form with fun buttons, I wanted to see what the world thinks of my coding. This is something that I coded about 2-3 years ago, I did change some of the coding when I looked at it and thought "this could be better written like this" Let me know what you think and what I ...

my next one is going to be a playfaire cipher
 
10:07 PM
You Selfied that fast?
Well, there goes an enlightened badge.... Hmmm.
Anyway, @Malachi - you put in the same method twice, instead of toUCase ... ;-0
 
I removed it I thought you had the same answer
lol
@rolfl what is the LETTERCOUNT? I assume it's the amount of characters in the array?
You've earned the "Proofreader" badge (Approved or rejected 100 suggested edits).
 
1
Q: Simple Caesar shifter in C#

MalachiI use these in a windows form with fun buttons, I wanted to see what the world thinks of my coding. This is something that I coded about 2-3 years ago, I did change some of the coding when I looked at it and thought "this could be better written like this" Let me know what you think and what I ...

 
@Malachi LETTERCOUNT is the number of LETTERS (26)
Z - A + 1
 
I think I might have posted this code before? I remember a similar conversation.
the output from Convert.ToInt32("a") is 65 so I don't think that your code will work the way I anticipated it would. unless I add 65 to the result
those const variables are giving me trouble
@rolfl I must not be merging the code correctly because it isn't working
 
10:32 PM
Hmmmm... I can't get your code to compile.... "Public" is spelled "public".
 
0
Q: Is this tag dispatching?

user3502661Say I have some code: void barA() { } void barB() { } void fooA() { // Duplicate code... barA(); // More duplicate code... } void fooB() { // Duplicate code... barB(); // More duplicate code... } int main() { fooA(); fooB(); } And I want to remove the duplicate code between ...

 
@rolfl I am writing in C#
are you writing in Java?
 
11:04 PM
@Malachi - working ideone now... updated answer.
Dinner @McGuyver!
 
1
Q: Have I covered all the cases, for stripping out all /* */ comments from given paragraph?

user1071840I've written this code keeping the following cases in mind and I think I've covered them all. I'd really appreciate if someone could help me determine if I've covered all of them. Cases I considered: 1) No comments at all 2) Text /* Text */ Text 3) Text /* Text */ Text /* Text */ ...

 
11:24 PM
@rolfl will check it out in a little bit. anything that will make that little shift easier will make the next one easier I think.
 
@Malachi Am I allowed to point out that C++ makes the "shift" really easy? :-)
 
shift here is not the same as a C++ shift.
@JerryCoffin you see my SO Rep?
 
@rolfl Yes, I realize that. But C++ makes char just a small integer, so you can do math directly on them, just like any other type, so you wouldn't need any (explicit) conversions to do this in C++ at all.
 
@JerryCoffin LOL I know Right
 
@rolfl No, I hadn't. You're a brave man monkey!
 
11:35 PM
+155 today, 98 bottles mugs of rep on the wall! @Mat'sMug
 
@Malachi I didn't analyze your code carefully enough to check what it does with upper- vs. lower-case letters, but for the typical case where you only want to transform upper-case letters, you can write the entire program (including file I/O) as a single statement:
    int main(){
        std::transform(std::istream_iterator<char>(std::cin),
	               std::istream_iterator<char>(),
                   std::ostream_iterator<char>(std::cout),
                  [](char ch) { return std::isupper(ch) ? ((ch - 'A') + 3) % 26 + 'A' : ch;});
    }
 
^^^ bug in that.
 
@rolfl What bug would that be?
 
  ((ch - 'A') + 3) % 26 + 'A'
... the decode takes a negative shift.
So, you should, in theory, have:
 
@rolfl Yes, this is only encoding.
 
11:46 PM
true, the shift is a constant.
 
hi!
 
Hi! (to @200 too)
 
you could do it as something like:

int shift = /* 3 or -3 */;
// ...
[shift](char ch) { return ((ch-'A')+shift)%26+'A'; }
Hi!
 
You could also limit the shift to -26 < shift < 26 and have [shift](char ch) { return ((ch-'A')+(shift + 26))%26+'A'; }
Which will do the decode and encode botrh
 
@rolfl Looks pretty decent. You should post it as an answer... :-)
But first you should do the edit I suggested to your existing answer. :-)
 
11:58 PM
@SimonAndréForsberg I'm going to be slow 'till Monday, then I'll spend all week trying to catch up... again.. hmm at this rate I wouldn't be surprised to be around 17-18K when you win the race :)
 
00:00 - 16:0016:00 - 00:00

« first day (392 days earlier)      last day (3619 days later) »