« first day (638 days earlier)      last day (3362 days later) » 

12:00 AM
[Vincentyification/JavaBot‌​] 8 commits. 2 closed issues. 2 issue comments.
[Vogel612/JavaBot] 12 commits.
 
Gosh, I'm almost half way to rep capping already.
I am halfway.
@Legato Watch out.
All these votes will probably be overturned by the system for serial voting.
 
@Hosch250 after 10 minutes?
 
I finished up a while ago, I just looked at what you've done and up-voted what I liked. Though I'll admit if you had 9 votes already I gave you the 10.
 
Oh, OK.
Thanks.
@SimonAndréForsberg Yeah, I just can back, and I almost had a heart attack.
The thing said +80., then +90 came in.
Then, +10 (I'd already opened it).
 
@Hosch250 I just hope you're not being serially upvoted
 
12:13 AM
I am sure I am.
They were all separate posts.
 
then that will be reversed :/
 
Yeah, -100.
No matter, really.
 
:/
 
Are you sure it wasn't you, @Legato?
It stopped now.
Either way, it is past the time limit to remove them.
 
^ It was me, I was saying I was finished, I went through all your JS stuff. I didn't think it'd be a negative, I up-voted a lot of the questions, and competing answers too.
 
12:19 AM
Yeah, it will probably get reversed.
It doesn't matter really, serial voting shouldn't be allowed.
It would be unfair to other people.
You gave me +170 in a matter of about 20-30 minutes.
Supper's going on, see you later.
 
@Hosch250 holy crap that's going to get reversed!
 
45 Minutes.
 
if you succeed with this serial upvote, @Legato, I'm taking lessons from you!
3
 
Couple minutes to go.
For supper, I mean.
 
@Legato if you upvoted other answers and questions too, it might not get reversed (I was never a reversed @Santa) ;)
Serial voting script usually runs at 3am UTC I think
 
12:32 AM
That I did. I understand why the system's in place, and even the reason it would get reversed, but I hope it doesn't and don't feel it should. I didn't blindly up vote all his stuff. The entire reason I favored JS over C# was that I'm actually familiar with that, and even then I skipped a lot of stuff(no offense), he just had a lot to look at and they were all short.
Anyone here use @skiwi 's hearth monitor?
 
@Legato Only @skiwi. It is still a bit away from being usable.
 
-2
Q: Need help outputting result as fraction (ex .05 = 1/2)

androidguyHow can I output the result as a fraction instead of a decimal? I know that I need a separate function but I'm not sure how to implement this. Also I need to allow the user to input something like "1/2 + 3/4" with spaces then output the result as fraction. Any help would be appreciated. The code ...

 
12:49 AM
@Legato I don't understand JS myself.
I mostly know HTML and CSS.
I'm learning C#.
Anyone want to vote on this (Meta post)?
0
A: Code Prettify - Choose your favorite or make your own!

Hosch250"Hosch250" theme (for lack of a better name): Image of code blocks (line stripes didn't show up, for some reason):

 
1:07 AM
0
Q: Converting Delphi colors between TColor, RGB, CMYK, and HSV

Jerry DodgeI wrote a record which encapsulates conversion of colors between TColor, RGB values, CMYK values, and HSV/HSB values. It seems to work (at least for the purpose I made it), but I'm not too confident about the rest. Specifically the conversion between RGB and HSV. This record supports implicit con...

 
1:28 AM
1:30 minutes and no reversal.
1:30 minutes to go, if it does run at 3:00 UTC.
 
parts of it was today though, so it might trigger in 24 hours
anyways, TTGTB here
 
See you.
 
1:48 AM
This new user seems nice enough, and edited their code: codereview.stackexchange.com/questions/79025/…
Anyone want to re-evaluate it?
 
2:17 AM
@Mat'sMug You around?
0
A: How about an interesting newsletter?

Hosch250I designed this mockup (stats estimated). What do you think?

 
2:29 AM
A question asking for core review is not suited for StackOverflow, it is for codereview.stackexchange.com , see the rules: stackoverflow.com/help/on-topicSuseika 5 mins ago
 
2:44 AM
0
Q: php pdo myql insert function

mosespublic function insert($table, $fields = array(), $values = array()) { $fields = '`' . implode ( '`,`', $fields ) . '`'; $values = "'" . implode ( "','", $values ) . "'"; $sql = "INSERT INTO {$table} ($fields) VALUES($values)"; if ($this->_pdo->prepare ( $sql )) { if ($this-

 
3:06 AM
@Hosch250 Late to the party, but if I was writing a paper I probably would have went Nietzsche personally
 
0
Q: Getters and Setters

james13Okay so I'm totally a beginner and just learning this in class. Can anyone tell me what I'm doing wrong? When I run this code it's supposed to tell me that myMonkey and myFavoriteMonkey are the same color... but I keep getting a null value for the output... I've got this on another java page(?)...

 
3:45 AM
@Hosch250 +1'd :)
@Duga Wut!? Comment scraper works already?! Awesome!
2
 
0
Q: PHP MySQL questions

PhrancisWe get very many questions asking about basically the same thing. At the time of this writing there are 266 questions tagged with php and mysql. Could we possibly come up with a way to handle these repetitive questions?

 
@Phrancis repetitive questions? 2 words: fizz. buzz.
4
 
@Mat'sMug Back.
Two upvotes now.
 
gtg / hitting the road
 
OK.
s/hitting the road/
 
4:01 AM
0
Q: PHP MySQL questions

PhrancisWe get very many questions asking about basically the same thing. At the time of this writing there are 266 questions tagged with php and mysql. Could we possibly come up with a way to handle these repetitive questions?

 
See you later.
 
4:18 AM
0
Q: 99 bottles of beer on the wall

citylightsI'm super new to this so please be nice. I tried solving Chris Pine's challenge to print the entire lyrics to 99 bottles of beer on the wall. This seems to work, but is there a better/more efficient way to do it? Just want to learn how to improve it if I can. var1 = 99 loop do puts (var1.to_...

 
4:35 AM
@CaptainObvious Man, Ruby is like the opposite of Java, as far as being verbose is concerned.
Probably takes more characters to type public static void main(String args[]) {} than this whole 99 bottles script
 
lol
2
 
I do find this construct a bit weird... loop do ... puts ... Shouldn't it be either loop do ... put or loops does ... puts? ;)
 
hai
i have a query in python wrt local frames
 
HAI
 
4:51 AM
 
0
Q: More javascripty way of iterating list to make API calls?

Grant David BachmanI'm newer to javascript and was hoping there was a cleaner way to write this. It's a block of code that looks at a group of documents in a collection (called Messages), and makes a call to the GitHub API for each one. If any of the API calls finds a certain string in the response, the function re...

 
javascripty??
 
when interpreter is in adder method's local scope to compute k+n , how can interpreter get access to F1 local frame to know the value of n? Does that local frame F1 still exist? This is something different compared to Java / C execution model.
 
Word of the day; Javascripty
3
 
5:22 AM
-1
Q: java quicksort almost correct, can anyone spot the bug?

Pablo Fernandezhere's the code: public class Qsort { public void sort(int[] arr) { doSort(arr, 0, arr.length); } private void doSort(int[] arr, int start, int end) { if (start >= end) { return; } else { int at = pivot(arr, start, end); doSort(arr, start, at - 1); doS...

0
Q: Applet Ping Pong

LuffyWhen I run my code the applet isn't showing anything. It only shows a white screen. Also, when I compile I get the message: Note: pong.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. import java.applet.*; import java.awt.*; import java.awt.event.*;...

 
 
1 hour later…
6:49 AM
This question belongs on Code Review, not here. — Fundamental 36 secs ago
I'm voting to close this question as off-topic because this question belongs on Code Review. — Joe 2 mins ago
 
7:04 AM
Anyone bored... this is really funny. PS: there is one single bad word, at exactly 5:20, everything else is clean.
 
7:15 AM
0
Q: Kruskal's algorithm in Java - follow-up

coderoddeThe previous and initial iteration at Kruskal's algorithm in Java Now what I did is remove the fields and let the actual Kruskal-routine create the required data structures in the local scope, which leads to thread safety. The only file that changed is KruskalMSTFinder.java: package net.codero...

 
7:30 AM
0
Q: Current best practice for Java package, interface, and implementation organization?

DogweatherWhen I last did a lot of Java programming, I'd do this: All classes in a package would be default (package) visibility. Each package would have a public PackageNamePack factory class, e.g. BusinessPack. And the package would have a number of interfaces. The package factory would have methods l...

 
7:54 AM
0
Q: ASP.NET - A webpage with code behind - fill out a form and email it somewhere

piofuscoThis is my first post to code review! I started messing around in ASP.NET recently, so please go easy on me. I only have 2 classes, Register.aspx and Register.aspx.cs. I want the user to fill out the form and hit submit and have the contents of the big text box sent to an email address using lo...

 
8:39 AM
This might be better asked at codereview.stackexchange.comGábor Bakos 49 secs ago
 
8:50 AM
0
Q: Dynamic display of number converted to different numeral system

user2496523The program is displaying given number (right now it is only signed int) converted to different numeral system (binary,octal and hexadecimal for now). Number can be input in the text box and the display updates automatically in the ConvrterDisplay UserControl. Form has a possibility to enable au...

 
9:12 AM
also if you want your code rewritten you should look at the code review stack exchange — chiliNUT 3 mins ago
 
9:25 AM
@T.J.Crowder codereview.stackexchange.com is definitely another good option (thanks!), but I still think my question is appropriate for SO. — istos 52 secs ago
 
9:46 AM
0
Q: Best way to write this javascript accordion/collapsible i wrote

eqizThe code I wrote to do this affect so that the divs stay "fixed" top or bottom no matter what is extremely ugly. I did it the manual hard-coded way and wanted some advice on the best way to write something like this... http://jsfiddle.net/t8Le7qqv/ - working example <script type="text/javascr...

 
This belongs on codereview.stackexchange.com :) — Silviu Burcea 38 secs ago
 
0
Q: Edmonds-Karp algorithm for maximum flow in Java

coderoddeI have this implementation of Edmonds-Karp algorithm for finding maximum flow in networks. It runs in $$\mathcal{O}(VE^2)$$ time. AbstractMaximumFlowFinder.java: package net.coderodde.graph.model.flow; import java.util.ArrayDeque; import java.util.ArrayList; import java.util.Collections; impor...

 
10:11 AM
0
Q: print "n" number of "hello world" in haskell

k4vinI had come up with the following code hello_worlds 0 = putStr "" hello_worlds x = do putStrLn "Hello World" hello_worlds (x-1) main = do n <- readLn :: IO Int hello_worlds n Is there any better way doing this ? If it is so please give some advice regarding why I shoul...

 
10:23 AM
This question is probably better suited for CodeReview. — MAV 5 mins ago
 
Java question... clone() vs new vs Serialize -> Deserialize?
*for shallow duplication
 
0
Q: Improving a program which reads digits of a number

JavaPersonI made a program which reads digits of series of numbers and then tells you which would need the largest number of "lines" to be written with a classic digital calculator (example: for 1 you need two "lines" and for 0 six). The problem is that this code is too slow and I wonder how to improve it....

 
11:03 AM
0
Q: Optimize class using Cython and NumPy

ArtimiI'm trying to implement algorithm for RCPSP problem. I have several resources, resource constraints and all of this is in integer time domain. With my class ResourceUtilization I want to assure that resource constraints are not violated in all time. Key element of my class is array utilization wi...

 
wow... quite in here
I can see my own comments from a day ago without scrolling
 
@Mehrad (quiet*)
 
@Unihedro yep
trying not to break the silence
@Unihedro you're good with Regex. would you want a little question
 
@Duga Holy crap, you've been busy!
Monking
@Unihedro avoid using clone. What is it you want to copy? I'd recommend using a copy-constructor mostly.
 
morning
 
11:14 AM
@Mehrad I'm not particularly good with regular expressions, but do ask :p
@SimonAndréForsberg What's a copy-constructor?
 
@SilviuBurcea No, it does not. This sentence makes it off-topic for Code Review: "I am now at the point where I need the user input to put the pieces in the correct column for each row but am struggling to do so". Code Review does not help in adding new functionality. — Simon André Forsberg 2 mins ago
 
a constructor that takes an argument that it can copy information from, thus creating a copy of the object
 
Oh, I see.
 
the other day I needed to find an expression which can find duplicates in the comma delimited string @Unihedro. and I was getting all sorts of errors using this as a part of it (?<=,|^)
 
@Mehrad Which flavour?
 
11:17 AM
why it's not possible to have multiple conditions inside a look behind?
well the online engines were giving me errors and the one in the Sublime basically didn't catch anything
not sure how c# would react to it
 
Because you're not using a .NET engine, and if you're in Java your pattern is fundamentally pointless.
 
So C# would be okay with it
 
@Mehrad "The online engines" -> The lookbehind constructs are not present in Javascript, and in PCRE all lookbehinds must be constant length where alternations are absent.
 
I was getting that constant length error. What is not constant length about this?
 
@Mehrad "where alternations are absent" <- your subpattern failed this criteria, it had a lookbehind with alternations within
 
11:21 AM
I mean I got around it with something like (?:(?<=,)|^) if I remember right, but just like to understand it
 
Note that later versions of PCRE (should be after v5, not sure) can alternate in lookbehinds.
@Mehrad Depending on what you really need, (?<![^,]) may suffice.
 
@T.J.Crowder In this case, I think SO is the better option. Code Review would likely close this as example code, as it has been stripped of a lot of context. Please read meta.stackoverflow.com/questions/253975/…Simon André Forsberg 1 min ago
 
Or, using \K instead of back assertion: (?:,\K|^)
 
interesting. makes sense
 
@chiliNUT This is definitely not Code Review material. Please read Be careful when recommending Code Review to askersSimon André Forsberg 3 mins ago
@GáborBakos No, it definitely does not. This is nowhere near Code Revieww material. Please check meta.stackoverflow.com/questions/253975/…Simon André Forsberg 4 mins ago
 
11:22 AM
Thanks @Unihedro
 
However, \K is a PCRE / Python-regex-module construct, so you won't get it working in C#. :/
 
the explanation was as straight to the point as it could be
it's quite sad that, a tool this powerful isn't standardized over all the platforms
 
There's an ECMA for regex.
But it's kinda crappy and meh.
Though, this:
52
Q: Reference - What does this regex mean?

HamZaWhat is this? This is a collection of common Q&A. This is also a Community Wiki, so everyone is invited to participate in maintaining it. Why is this? regex is suffering from give me ze code type of questions and poor answers with no explanation. This reference is meant to provide links to qua...

 
interesting
@Unihedro so far I have used this
and it got me going. I like the little examples
however, I should say I never needed to do anything SUPER in regex though
simple stuff
I'll keep this post handy as well.
 
@rolfl @Jamal @200_success @others I hope you agree that having @Duga post comments from SO here is a good idea. I was surprised at how many comments were intercepted by Duga this morning.
 
11:52 AM
0
Q: JAVA Array size dinamically assigned

zaaHow can i assign the size of an Array dinamically ? Something like : int p[]; size = p.length; if(condition) size++;

 
@CaptainObvious lolwtf
 
agree on that ^^
 
@SimonAndréForsberg I was thinking of implementing something similar, but never got around to doing it. Thanks for taking the initiative.
 
0
Q: function that searches for user inputted characters in a string

Alex HunterIt is working correctly as far as I can tell, the only problem being the title, trying to display the 'count' in there and it comes back as undefined? function searchMsg() { var msgTitle = '<font color="blue">Search Msg: '+count+'</font><br\> '; var phrase = ''; var searchFor = (document.getE...

 
@200_success no problems :) glad I could help out.
 
12:00 PM
@SimonAndréForsberg @Legato Expect it to still take a few weeks months, or if I'm in a real good mood maybe a few days
 
@skiwi few days vs months? Wow, talk about specific :)
6-8 weeks 3-90 days
 
@Unihedro It's generally good to stay away from clone() is what I've learned
Monking
@SimonAndréForsberg I'd say it's a good amount, and nowhere near annoying or anything :) I like it!
 
@skiwi @Duga has a purpose now! :)
 
@SimonAndréForsberg Lies, it already had!
 
@skiwi What about the other two? Is it generally more preferable to use new or re-un-serialize?
 
12:04 PM
@Unihedro If it is more in-program usage I'd go with the copy constructor
Only serialize when going over network or storing to file, etc.
 
k thanks!
 
12:16 PM
@Mat'sMug, @RubberDuck still no luck on getting the PIA to install correctly but some interesting learnings about why. Will let you guys know if I can shine some light on this
 
12:35 PM
@Mehrad that's interesting. I didn't have any trouble at all. I just ran the installer and they were there. Auto-magic.
I wish I could help...
 
yeah its more complicated than that.
apparently Microsoft is trying to get rid of PIA with a project called No PIA and if you have a recent office and want to work on a project which has been build with older version you need to use PIA and if it works your good. if not => Microsoft
 
12:51 PM
0
Q: Partition a list of numbers into even and uneven numbers

Syd KerckhoveInput: An array of integers. Output: That same array, but with the even numbers at the front and the uneven numbers at the back of the array. I wrote three different solutions, depending on the needs of the client. First solution: // linear time not stable and not in-place private static void...

 
1:12 PM
Consider repeating suchquestion on codereview.stackexchange.com next time. — Dirk Horsten 5 mins ago
 
@Duga holy ¤")U¤"=, yes! That one does belong here!
 
@DirkHorsten Agreed! I'm a regular on Code Review and this particular question definitely is better on Code Review. — Simon André Forsberg 1 min ago
 
Meanwhile, Simon: I want that question, I wants it
 
@Unihedro you want to answer it? I can understand that.
If I knew VBA, I might have done so too.
 
@SimonAndréForsberg Yes, I do want to answer it, but lack practical knowledge.
Realistically, I do want to answer every single one of those questions out there, except... I can't
 
1:21 PM
I'd also want to answer this one, I could probably figure it out but I feel this is something for @Mat'sMug to answer
 
in Tavern on the Meta on Meta Stack Exchange Chat, 1 min ago, by rene
@ShadowWizard I can't handle conflicting guidance. some users want me to comment and now a high-rep/respected member of this room tells me to keep quiet. Confused/puzzled ... O_o
 
@Unihedro you really want to answer all the crappy PHP/SQL questions too?
 
@SimonAndréForsberg Yes. Points!!!!!
 
@SimonAndréForsberg - @Duga does good.
 
@rolfl Thank you, you do too.
 
1:29 PM
Gracie
 
0
Q: Scheme sum of 2 largest numbers out of a list of 3 numbers

guestThe problem is is: Define a procedure that takes 3 number arguments and returns the sum of the squares of the 2 largest numbers. (in Scheme) I am a CS graduate and I am revising my university notes. This is my code so far: (define (square n) (* n n)) (define (square_of_larger_numbs a b c) (...

 
1:45 PM
@Mat'sMug, @RubberDuck finally
I had to look door to door and test everything to find this s#cker
Microsoft office developer tools for visual studio 2013 - March 2014 Update
performed a repair on it and all the assemblies and PIA folder showed up
Also needed to replace the Interop.core with version 15 to make it work
 
No kidding? Huh...
 
I guess this one is because I have office 2013 installed
 
@SimonAndréForsberg which one is for Mug? Maybe I'll scoop him. =;)-
 
0
Q: setting "Find(What:=" to a column in a different xls file

Justin Captain WypijI currently have a code that opens up an empty workbook and then a master file with 5000+ rows of info. A pop up then appears and asks for a ID. i type in my 6 digit id and the macro goes through column b and copys the row with that id and pastes it into the empty workbook. My issues is this: I ...

 
:) it's 10 mins to midnight and tomorrow Monday. so I probably should go to bed. But at least I will sleep happy @RubberDuck
was killing me not to be able to sort this out
TTGB
 
1:53 PM
@SimonAndréForsberg - coding standards!!! github.com/Zomis/GithubHookSEChatService/commit/…
 
@rolfl four space tabs!!!
 
No, you have some places with 4-spaces, and other places with tabs, and for example, 3 lines up from that link, you have 4 spaces and 1 tab
2 lines, the if-statement is indented with 4-spaces + 1 tab
 
Why? Why doesn't windows recognize my password?! Ugh!
 
caps?
 
No. And I'm also positive it's the right one. I'm gonna try a restart.
Hope I saved everything.
It's not just my account. It's all of them. wtf?!
 
2:10 PM
@rolfl alright, I guess I will do an auto-format in the IDE
 
This question would be more at home on Code Review — DennisW 15 secs ago
 
Looks like my numlock key doesn't just affect the keypad... Ugh.
Interesting new feature @Duga!
2
 
I say I like it.
 
Yeah. I can dig it.
 
0
Q: What can be done to make data access code better?

Ahmed KamalI 'm looking to improve my code design. I have three entities, Order, Order Type and Order Type Items. Order can have 1-N Order Type and Order Type can have 1-N Order Type Items. I'm working on Xamarin so using ado.net is my only option and I'm still new to ADO.NET. (I was using EF a lot in .NET...

 
2:21 PM
@RubberDuck yup, @Unihedro suggested me to use the SE API for it, and it turns out that it was not that complicated :)
 
@SimonAndréForsberg :)
 
2:37 PM
0
Q: Problem with jquery waypoints

candhI'm using jquery waypoints to animate some of my elements. Here's the HTML section : <section class="content-section-a" id="content-section-a"> <div class="container"> <div class="col-md-8 col-md-offset-2 text-center wp1"> <h1 class="arrow">We create the awesome</h1

 
lost their way, eh?
 
Stack n skate!!
 
^^ @Vogel612 Can you see the original message I posted there?
 
nope (checking something here)
but I could try something..
 
(removed)
 
2:51 PM
No "history" button when you click on the left?
 
nope, but I think I can hack around it..
 
I guess only room owners can view the history of removed messages.
and moderators, of course
 
hrmph.. yes I can't get to it via the relevant URL
also that's not completely true
 
 
if you get suspended from chat because one of your messages got flagged, the notification includes a link to the message's history
 
2:53 PM
@rolfl Ice!
 
@Vogel612 You can see your own deleted messages.
 
anyways: ~food
 
afternoon all :)
 
@rolfl Canada looks cold today
 
3:08 PM
-17 and feels like -25 with the wind
 
I'm really glad it's not so cold over here!
 
Me and mine...
2
 
0
Q: makefile for making my project

karimi'm starting with make, i made my first makefile to build my project, i don't know if its the good way to do it or not, so i share with you my makefile to get your opinion on it : Direcory structure : ├── LICENSE ├── Makefile ├── objs │   └── parser.o ├── out │   ├── libsip.a │   └── parser.h ├...

 
3:40 PM
@skiwi I play HS from time to time, wish I had enough know-how to help! Seems cool, though I'm not even sure exactly what you want to display.
@rolfl Nice. :D :D :D :D
 
@Legato I bet @skiwi's not sure of that either
@rolfl You got a monster in the family as well!?
 
@Legato That's still a bit tricky to answer, definitely my original goal was to show if you could do lethal damage in a turn... But I'm actually more focusing on a desktop part where you can "view" your actions right now
 
I was thinking of maybe working on something that just counts off which cards of your own BG were played, and what was left. Problem was I only had an idea how to do it manually, haha.
 
I think that's good thinking. You need all the data before you can analyze it.
 
Still cool.
this is such a good answer.
 
3:46 PM
@Legato calculating the probability of what to draw next? That's easy. I think @skiwi would not be far from that, if he only knows how to calculate probabilities.
 
0
Q: Another attempt of "real private" methods in JS

rabbit.aaronURL: http://jsfiddle.net/rabbit_aaron/ve7deecw/ This is again, a JUST FOR FUN project. In this attempt, I use a closure instead of validating caller to ensure only member methods can access private methods. Pros: Easy to implement Works in strict mode All class instances has the same private ...

 
@Legato BG?
 
Sorry, 'deck' I tend to think of these as 'battlegroups' from an old game I played.
 
I'm right now playing FFXIV (an MMORPG), but that's really hard to get into, I think it's about 15 months since I last played it, and it's one of those were you have like 30 hotkeys
 
@SimonAndréForsberg I actually would do that mentally, I only wanted to display what was left to draw. That'd be something additional.
 
3:48 PM
I believe I made it use 1-6 + Alt+1-4 + Ctrl+1-3 and then 8 buttons on my gaming mouse, of which I have completely no clue where they are located :D
@Legato Ah, I see, yeah that's currently almost possible, the only bugger is if there's effects that put or take cards from decks
 
@Legato you know combinatoric mathematics?
 
@SimonAndréForsberg Why do you ask? I've never actually seen that term used, but sounds interesting. Seems like it's big in CompSci from my search.
@skiwi Awesome. I'll be looking forward to the finished product.
 
@Legato because calculating the probabilities is purely about combinatorics.
I've used a lot of combinatorics here:
21
Q: Advanced and Detailed Minesweeper Probabilities

Simon André ForsbergIn an earlier question, I showed my code for calculating the mine probability for each and every field in a Minesweeper board. But it doesn't stop there. In that very same Minesweeper Analyze project, there is also an algorithm for calculating the probability of each and every number for each and...

 
That'd probably relegate it to a term people don't know but something they use all the time then (I wonder if there's a word for that too?)
I've seen that, I up-voted it. :D
 
normal people don't use that much combinatorics in fact
but every now and then, you have use for it
 
3:53 PM
I still have a class on combinatorics, I believe
I've passed Probability Theory already, but that's a year orso ago...
Only need to have Statistics now, but guess what, it's no longer given as a sole subject for Computer Science students... So either I take Probablity Theory & Statistics (CS version) or I take a different Statistics class, but that's a hard-core math version
 
Maybe it's something I'll take soon, I'm taking applied statistics next semester and am taking Discrete Structures now, so if that doesn't really help me understand the field it should give me more of an idea, no?
 
@Legato Discrete Structures, fun, fun, fun, it's not that bad though
 
I think that sentence perfectly encapsulates why I love this place.
 
hey guys
what do Java guys think about this:
for each is slower than the loop I propose as the length of arr can still change. Thus the compiler optimization in for each is worse than the manual optimization of computing the size once and considering that the size does not change. — barq 14 mins ago
 
4:08 PM
@janos Premature de-optimization
 
that too, good point
 
I can't really care anything else about it right now..
 
@janos if the size change while iterating, that's a ConcurrentModificationException
 
29 mins ago, by Simon André Forsberg
@rolfl You got a monster in the family as well!?
^^ yeah, and my son too ;-)
 
how do you change the size of an int[] in the middle of iterating?
 
4:12 PM
@janos yeah, that too. (Didn't realize we were talking about arrays)
 
@janos Ah yeah, I think for (int elem : intArray) it doesn't matter at all
 
@janos for (int i : array) { array = new [array.length + 1]; }
 
the android perf-tips page says the behavior is vastly different for arrays and arraylist
 
hmm... Java uses Iterator<T> for for-each over objects, but what does it use for primitive arrays?
 
Arguing about the performance of for-each vs. for-with-loop-variable is pointless without a specific test case, on a specific machine, fully-compiled JIT assembler output code, and profile data in a real use case. — rolfl ♦ 23 secs ago
 
4:14 PM
You should take your question here codereview.stackexchange.comAK_ 2 mins ago
 
note that for (int i : array) { array = new [array.length + 1]; } is untested code, I have no clue on what wwould happen :)
 
probably nothing. The iteration will complete on the now unreferenced old array
 
@Duga holy crap, you're effective!
@janos correct, that's precisely what happened.
 
awesome
 
@AK_ For Code Review, fixing the bug before posting there is the first problem. Please see meta.stackoverflow.com/questions/253975/…Simon André Forsberg 3 mins ago
@AK_ Once the code works does what it is supposed to do, we'd gladly review it and make it do the same thing in a better way, but in the current state of this question, this is off-topic for Code Review. — Simon André Forsberg 4 mins ago
 
4:25 PM
@rolfl I think @Duga did not post your comment because it only checks once every 6 minutues currently, which is too slow. I have not yet figured out when the API reset occurs. It is not at reload time, as I thought.
so this means that currently, there is a small risk that @Duga won't detect a comment suggesting Code Review.
"quota_max":300,"quota_remaining":70
@Duga spreads these 70 remaining requests out over a period of 7.5 hours (until reload). I think it will be reset before that though
 
@AK_ Have you read Code Review's Help Center? I know, this is not good code. That doesn't matter, it has to work before being posted on Code Review. Suggesting the author to go to CR after this bug is fixed is acceptable. — Simon André Forsberg 3 mins ago
 
@rolfl If you could use your influence with the PTB, I would love an answer to this question:
7
Q: Why is my API quota not resetting after UTC reset?

jmort253According to How API Keys Work, the default daily API limit -- which is per site, per day -- is 300. I started with 300, as expected, but over a period of days, I've noticed that the remaining quota has now been whittled down to about 70 something: { "items": [ { "user_id":0000,"di...

 
4:39 PM
@SimonAndréForsberg Investigating.
 
I appreciate that!
 
Hmmm... now's not a good time. Remind me at about..... 18:00 UTC on a weekday
 
To sub or to not sub... that's the question
 
0
Q: Animated Score Amounts for Game

bazolaThis is a simple class for a label with a score that animates counting up or down. When someone in the game scores points, the numbers count up or down to the new total. Here is an example of what it looks like: I ran into a few problems when building this class. It was important to preven...

 
5:08 PM
@user3502786: You should learn how to use function parameters ($1, $2, ...) and local variables. And also, remember that if statement; tests whether statement succeeds or fails, so there is no need to play games with [[ and $? if you just want to know if a command succeeded or failed. But all of that belongs on codereview.stackexchange.comrici 2 mins ago
 
0
Q: A shorter way for getting variables

MaxKorlaarI have the following piece of code in my project, and that a few times: $this->uniqueSessionKey = $settings->get('uniqueSessionKey') ? $settings->get('uniqueSessionKey') : $_SERVER['HTTP_USER_AGENT'] . time(); I was wondering if there's a better way of writing this, especially the part where i...

 
@Duga pretty damn impressive.
5
 
0
Q: Refactoring MySQL Query - Finding Max Rating for a Movie

user245185I am taking Stanford's Introduction to Databases Self-Paced online course. I have gone through the videos in the SQL mini-course, and I am having trouble completing the exercises. The following is the question from the SQL Movie-Rating Query Exercises, Question 7: For each movie that has ...

 
5:23 PM
@Mat'sMug which part of it?
 
@SimonAndréForsberg all of it. It's what the word "awesome" exists for :)
Are you putting it up on CR?
 
@Mat'sMug you didn't say "awesome" though :)
 
0
Q: Exponentiation in logarithmic time

Syd Kerckhove Input: Real number y and Integer number x Output: x^y Constraint: Must be done in O(log(y)) time. Notice that O(log(y)) is O(length-of(y)). public static double expon(double x, int y){ double result = 1.0; double part = x; for (int i = 0; i < 32; i++){ if (((y >> i) & 1)...

 
@Mat'sMug I plan on doing so, yes. I already have a title for it.
 
@Duga must be blushing. Been called "impressive", and now "awesome" too ;)
3
 
5:28 PM
I first want to improve the rate-limit thing though... so that I know better when the quota reset occurs.
 
@janos After all, I am a bot who's name is Duga (that is so much funnier in Swedish)
 
I'll never understand what that name means
 
Good enough.
I like the Bosnian translation better - Rainbow.
 
or, when used as "who's name is Duga", it means "is awesome"
 
Good pun.
Well, not a pun.
Good wordplay, anyway.
 
Bing doesn't get Duga:
a bot named duga
 
so, can you say in a sentence, "your code formatting style is duga" (= good enough)
 
No, because "duga" is not officially part of the English language.
 
She's a gold digga duga
 
That would be mixing languages.
 
5:35 PM
@janos that would be, "your code formatting duger".
 
Did you guys see this yet?
2
A: How about an interesting newsletter?

Hosch250I designed this mockup (stats estimated). What do you think?

 
yeah I didn't mean mixing languages, I meant if you replace the English words with Swedish (duga already is), would it work
 
Duga as a name is different than duga as a word.
 
ok we're back where we started:
9 mins ago, by janos
I'll never understand what that name means
 
lol
 
5:39 PM
that's not asking for more explanation...
 
"det duger" means "good enough"
"en bot som heter Duga" *literally* means "a bot named Duga" but is meant as "a bot out of the ordinary"
 
that is to say, I'm just gonna leave Duga alone. Duga is Duga, a fine lad, and that's good enough for me
 
I think you meant "literally," not "literrary."
 
I should edit @Duga's profile and write it there...
@Hosch250 I can't spell today apparently
 
I think you meant lass.
 
5:41 PM
@janos fine lad gal ;)
 
hmm
despite my SEDE efforts, the good Naruto's are not decreasing much
btw guess who's top voter of the year so far codereview.stackexchange.com/users?tab=Voters&filter=year
 
Even if I get 40 votes a day, it'll be a while to catch up.
 
come on lads. This outstanding answer needs a bit more recognition. — vba4all 3 hours ago
 
@janos hmm, I'm only 11th. I'm losing my touch...
 
@janos Well done!
 
5:56 PM
indeed WWell done
 
WWWell done, indeed
 
the W key on my keyboard accidentally gets pressed twwice sometimes
I DID NOT DO THAT ON PURPOSE ^^
2
 

« first day (638 days earlier)      last day (3362 days later) »