« first day (689 days earlier)      last day (3343 days later) » 

5:00 PM
I'm from StackOverflow, and this is not the place to ask either. My point was that this might be an expected behaviour, I provided a workaround and am asking if it is ok. But indeed, it is a specific issue... Where can I ask this question ? — Brewal 1 min ago
 
@CaptainObvious That looks off topic, but I can't think of a good reason why exactly.
 
-1
Q: visual basic: get php Query from text box

Nasredine HabouriaHow can I get url Query from text box and put it line by line in richtextbox. exemple: I want to get query from textbox1.text : and put it in richtextbox or multilines textbox line by line : I'm Very appreciated for your help.

 
php, mysql, vs, and visual basic?
4
 
Ok then...
 
Hey Brewal.
 
5:03 PM
Thanks for your time :)
 
php.net/manual/en/… <-- see this.
The question is still off-topic, because we expect you to undersand the code you wrote ;-)
but, the answer is in the integer handling in PHP;.
 
guys, easy on DV'ing off-topic stuff. -2 gets the message across, -5 makes us look mean, -8 says "go away and never come back"
 
No prob' for the off topic, but I didn't know where to ask !
 
I understand that... it's not simple to figure out. I am uncertain often too.
What you really want to do is round the value to the nearest integer instead of truncating it.
That is what is happening when you print it as a String, it is rounding it.
 
Ok... But this is still a bit odd ! But I understand the binary format of 33.3 is not precise with float values
 
5:08 PM
You do know that 33.30 is not 33.30 ... right?
2
it may well be 33.2999999999999
 
indeed
 
0
Q: jQuery SHOW/HIDE Description

iamgraemeTrying to keep the code as clean as possible, is this the best approach? I don't use jQuery that often. // ============================================== // Trigger longer description on product page // ============================================== var longDescription = $j("#js-long-description...

 
and, when you multiply that by 10,0, you get 3329.999999999
 
@Mat'sMug but -4 gets it off the front page.
 
and converting that to int you get 3329
 
5:10 PM
Like I told you on Code Review, the visual studio tag is inappropriate here. Now, as for your question, you will need to figure out whether you're using vb.net or vba. They are not the same thing. — RubberDuck 1 min ago
 
Stupid meetings.
Gives me more time to beat the crap out of this Project Euler challenge, then!
 
OK thanks... rounding is important then
 
@RubberDuck Right
 
@Brewal Yup, rounding after the arithmetic will give the result you want.
 
but I was expecting in that case that var_dump would show the value of 3329.999...
Thanks for your time again !
See you :]
 
5:14 PM
{ (int *)&(const int &)int{9} } may be allowed by the standard, but certainly shouldn't be by any sane code reviewer. — Jerry Coffin 42 secs ago
 
@paul23 accept any of them. The one that helped you "the most"
 
0
Q: Asteroids game clone

Graeme StuartI have recently been teaching a JavaScript module on a games programming undergraduate course and I made this game as a learning exercise and as an example for my students to study. I have made games before but never in JavaScript. Could you have a look at my style and let me know if there are a...

0
Q: Update on Weave Merging n lists into single list

ForrestAThis is a follow up to my previous post from 7 months ago. I changed up the algorithm a little. Instead of inserting items into a new list, each item's final place is calculated up front. Sort of like if instead of resizing an array each time I add a new item, I'm sizing it up front and just sett...

 
@Brewal - interesting ideone: ideone.com/SewlcE
(and edited it again....).
$float = (float)('33.30'*100);
var_dump($float);
var_dump((int)$float);
var_dump((int)($float * 1000));
$str = (string)$float;
var_dump($str);
$int = intval((string)$float);
var_dump($int);
produces
float(3330)
int(3329)
int(3329999)
string(4) "3330"
int(3330)
PHP must have some magic in the (string) cast that does rounding for you.
I cannot find the reference in the documentation for that, though.
 
@SimonAndréForsberg in doubt, favor lower-rep reviewers! :)
 
Ahhh, that explains my slowdown ;-)
 
5:24 PM
lol
 
@Mat'sMug yeah, either that or bear-traps!
3
 
@rolfl Then quit smoking it.
 
0
Q: How to continuously inject objects into spark streaming + SQL

Christian BongiornoI am trying to migrate from Esper to either Spark or WS02. The problems I have been having with spark are manifest (apparently 3.0 APIs are just a complete mess). But given a previous version I have something working (see below). My problem now is I don't see how to continuously inject objects i...

 
5:57 PM
Found a new pastime - listening to music backwards!
2
 
6:18 PM
@JayBlanchard hehe the funny thing is that this question was closed on codereview.stackexchange.com with this comment "your question is explicitly focusing on a design review and dismissing the code aspect" before I psoted it here. It appears that this is an extremely unwanted questions on Stack forums... — luqo33 22 secs ago
 
@Duga Stack Exchange sites are not forums
 
Forums.stackexchange.com?
@Hosch250 will be a Satanist in no time.
 
@nhgrif No way.
Just listening to Paul Robeson singing Old Folks at Home backward in Premiere Elements while making a music video for class.
 
That's the path to Satanism.
 
I don't listen to that kind of music forward, even.
I don't listen to Rock or Country or Pop or any of that modern stuff that isn't even music.
 
6:27 PM
@Mat'sMug Don't tell that to me, tell that to them!
 
@Duga done
 
That's what all the Satanists say.
 
@Duga whenever you're ready
 
If you included your actual working code and were ok with receiving answers that can address any and all aspects of the code (see CR's help center), CR would be happy to review it. Design issues are often pointed out in answers, too, but taking out the "irrelevant implementation" and asking specifically to review the design makes it off-topic on Code Review, where opinion-based questions are off-topic as well, @JayBlanchard. ...and side note, Stack Exchange sites are Q&A's, not forums. — Mat's Mug 1 min ago
 
:)
 
6:34 PM
Well, @nhgrif, I'm an anti-satanist.
I can't be something and not be something.
That would be a logical impossibility.
And I'm not the type of person to pretend I'm something, and really be not it, or vice-versa.
BTW, I could create this video in PowerPoint more easily than in PS Premiere Elements.
And, PSPE crashes.
 
6:57 PM
-1
Q: shoping cart code with use loop and print multiple time

talal ahmed //SQL query define in array $query = array( "SELECT * FROM products WHERE rowno=1 and colno=1 and pageno=1 and productLine like '$cat'", "SELECT * FROM products WHERE rowno=1 and colno=2 and pageno=1 and productLine like '$cat'", "SELECT * FROM ...

 
@CaptainObvious Too bad it's off topic, I really like the OP's avatar
 
@Phrancis Do you ever use PS Premiere?
 
Photoshop?
 
Yeah.
 
I don't, sorry
 
7:03 PM
OK.
I'm trying to make some text roll over part of the video.
 
There's a graphic design SE site though, you might ask in their chatroom
 
Actually, I think I solved the problem, maybe.
No, I didn't.
I have the text beginning the roll perfectly, but it doesn't roll high enough on the screen.
It only rolls halfway.
 
Monking
 
Sounds like the work of Satan.
Did you tell the text to... DO A BARREL ROLL...?
 
I googled it
 
7:11 PM
I've halfway solved it now.
@nhgrif Sounds like the work of developers.
Got it, it needed some extra returns in the text block to make it taller.
 
0
Q: Using ASP.NET identity - changed a little bit

1110I need code review for using ASP.NET Identity in a new app. Goal: - Use int instead GUID for id's. - Separate identity from view layer I need code review if I did everything right. Yes it is working but maybe I did something that I shouldn't or maybe there is some place for improvement. Applicati...

0
Q: Control flow using exceptions

StuA colleague and I were discussing the following code today and had a disagreement over the return false in the catch (MalformedURLException e) block. For some background information this method is in a class which is going through legacy data to be migrated into a new system, parsing the text, f...

 
I need to fire an event only once in a program that runs hourly but only once if it is the 1st day of the month.....
 
That's a pretty big topic. There are lots of great designing resources out there. Perhaps you could post at Stack Exchange Programmers or Stack Exchange Code Review. Do some google searches for "dependency injection", "object oriented design composition", and "object oriented design patterns". Good luck! — Joseph Malicke 1 min ago
 
7:26 PM
@Malachi So, you need to fire an event on the first day of the month?
Would a Timer work?
 
yes, but this application runs on a task scheduler hourly, and I only want it to run once on the first day of the month.
Timer probably wouldn't work in this instance.
 
So, set the timer for the first day of the month.
Oh, would the timer be killed by the application closing?
 
I am altering someone else's code that is run on a scheduler.
@Hosch250 I think so
 
If it isn't, you could just set the timer manually each time the event fires.
Otherwise, you could check whether it is the first day of the month each time it runs, then somehow set a flag - maybe have a boolean array with 12 items.
 
I need to compare the date but not the month or the year. then compare the time. and I think that I could make it work
the boolean array wouldn't last in between the instances of the application
it's not a service, it's a task
 
7:30 PM
Well, you could load up a file, but...
 
run on a server in the task scheduler. I might end up rewriting this in the future
I should rephrase that, I want to rewrite this....lol
 
@CaptainObvious @Jamal I don't think it's off-topic.
 
It sounded like the OP was trying to understand it rather than asking for a review.
 
it looks rather opiniated and asking "what's the best practice regarding X" IMO
it's not clear that OP wants a code review out of it
 
Well, code reviews cover best practices, don't they?
 
7:39 PM
Asking for opinions on how to apply best practice to real code is on-topic.
Very opinion-based, maybe, but on-topic.
 
I'm going to reopen it. Downvote if you want, vote to close if you want, but this is not a case for moderator closure.
 
I'm just letting it be - no DV, no CV
 
I don't see a reason to close it.
I'm upvoting
 
7:45 PM
@SimonAndréForsberg it's clearly not the best CR question to ask
 
whether or not it's the best CR question to ask is not the question
the question is: Is it on-topic
 
I'd say it's on the fence of opinion-based, leaning on the off-topic side of it.
 
How do we define what is primarily opinion-based here?
 
> One of us said that using exceptions for control flow is an anti-pattern and the exception should be thrown/allowed to propagate up and handled elsewhere, while the other said that the error being thrown is a by-product of the API (this is Java code which doesn't have any of the tryParse() methods of C#) which needn't be thrown any further as it can be handled here.
the unsaid question is "who's right? who's wrong?"
 
And the answer is always: @Nobody
(damn I miss @Nobody)
2
 
7:49 PM
0
Q: Stack with getMin method

giulioImplement a stack that has a O(1) getMin method. I used an auxiliary stack. Any comments on my solution please? import org.junit.Test; public class Solution { @Test public void testEmptyStack(){ StackMin<Integer> s = new StackMin<Integer>(); System.out.println("--------------------...

 
@Mat'sMug If you can fix a question by simply omitting a part (i.e.: the "my coworker said..") then I don't think the question had a problem in the first place
2
 
good point (hence my non-voting)
but it should be edited then
 
@syb0rg took the Top Question of the Week in the newsletter.
 
@Hosch250 title.
@CaptainObvious that's a nice on-topic CR question
 
Recording Audio Continuously in C
 
7:57 PM
oh well
 
@Mat'sMug Uses tests. Gets my upvote.
 
:p
 
Tests don't have a single assert.
Proceed headbanging
THESE ARE NOT TESTSSSSSS
 
@JeroenVannevel I'm still not convinced of that "rule".
 
@RubberDuck Cuál reglo?
 
7:58 PM
Sometimes it seems to make sense to group certain asserts.
 
Writing a philosophy discussion in C#:
 
Oh no, I totally agree that multiple asserts can in a test
 
public abstract class Reality {}
 
It's just that these tests. Do not. Have asserts.
Not a single one.
 
lol
 
7:59 PM
public class Mind : Reality {}
 
@JeroenVannevel Oh! lol
Which ones?
 
well if all you're testing for is for expected exception...
 
3
Q: Stack with getMin method

giulioImplement a stack that has a O(1) getMin method. I used an auxiliary stack. Any comments on my solution please? import org.junit.Test; public class Solution { @Test public void testEmptyStack(){ StackMin<Integer> s = new StackMin<Integer>(); System.out.println("--------------------...

 
public class Matter : Reality {}
 
all of them
 
8:00 PM
  @Test
  public void testEmptyStack(){
    StackMin<Integer> s = new StackMin<Integer>();
    System.out.println("----------------------");
    System.out.println("Empty stack");
    System.out.println(s.getMin());
  }
 
if (Mind.Exists() && Matter.Exists()) { throw new Exception("Uh oh, we have a Dualist here.") }
 
^^
Okay. I'm with it now...
PRINTING TO THE CONSOLE IS NOT A TEST
2
 
allright. who's telling him? :)
 
Please tell me someone is working on a review.
 
I'm writing up a helpful rant
3
but just the testing
 
8:02 PM
Instant double-star.
 
s.push(2);
s.push(-1);
s.push(0);
s.push(7);
s.push(22);
System.out.println("Random stack");
5
Reminds me of this
 
Why did that post lose my star after you edited it?
 
I'm voting to close this question as off-topic because it's looking for a code review and belongs on codereview.stackexchange.comzzzzBov 1 min ago
 
@Duga it's hopeless
 
@Duga Yeah, sure, whatever.
 
8:12 PM
@zzzzBov Being on-topic at Code Review and off-topic at Stack Overflow are not the same thing. Being on-topic at Code Review is not a close reason. If you feel this would be better on Code Review, then flag it for migration using a custom flag. If you feel this is off-topic for Stack Overflow for a reason defined in the help center, vote to close for that reason. — Simon André Forsberg 36 secs ago
 
0
Q: TCP server/client application

user3472798I'm trying to figure out why my server will not print to my client when I run my java classes within the terminal. The client will correctly send information to the server, the server does it's work, and prints out the proper data in it's own terminal, but then for some reason it won't send the c...

 
@Duga I ♥ tin-can comments
 
@Mat'sMug So do ♥ I
 
@JeroenVannevel I almost spammed your post with a comment...
> Not only modern IDE's.. even the VBE has integrated unit tests nowadays :)
 
I consider VBE a modern IDE
all good
 
8:16 PM
Haha, 404 Not Found error.
 
forgot .html, fixed ;)
 
I wonder how much damage a 20k user could do on SO before being caught.
They could reopen bad posts and potentially kill certain good posts...
 
@JeroenVannevel It's getting there. We're working on it.
 
@RubberDuck 44 downloads (x86 has 30, x64 has 14)!
 
@Mat'sMug At least 2 of those are me.
 
8:20 PM
lol
 
and I have one
 
349 nuget downloads on my two packages!
 
:) Say maybe 2/3 are not from here...
 
lol
@JeroenVannevel nice!
 
I don't even use it on a daily basis.
 
8:21 PM
Do you use NuGet to track your downloads or how do you distribute it?
85 of these downloads are on my TinyType project which is totally useless and hasn't been touched after the initial 5 hours of development
 
127 downloads on my WP app, and 7953 on my WS app.
 
ahh
Github release downloads count for more than nuget downloads imo
more likely to actively use it
264 nuget downloads, 1 github download. Lol.
 
well 1.2 had 65 downloads, so I just hope none of these users went "that's utter shit. uninstall".
I like thinking that 80% of our users have upgraded from every subsequent release
 
Time to build-in some tracking
 
8:26 PM
I don't know how many people still have my app installed.
Once I set up my server and quizzes, I'll add a bit of tracking too, maybe.
 
thought of that. that and some "Quack! a new version is available! Download?"
 
For some reason, that reminded me of Octopi language in Penguins of Madagascar.
 
I think my SSIS Script Task just corrupted....
 
@RubberDuck source control?
 
@Mat'sMug Yeah yeah. I know. I tried, remember?
 
8:29 PM
My users used my app for 5.4 seconds per day for the past couple days.
I need to get them using it more!
 
if that's not a good selling point for management to say "hmm maybe we need that", I don't know what would be
 
@RubberDuck Why don't you just set it up for your personal use, anyway, even if you can't get an official version?
Or, is that not an option?
 
@Hosch250 It's work. I'm not allowed to install unauthorized software.
Yeah yeah I know. Why is git unauthorized software?
 
Who said anything about unauthorized software?
 
I don't know......
 
8:31 PM
Are you using VS?
 
is TFS Express 2013 unauthorized software?
 
I'm using Git in VS without installing anything.
Visual Studio has Git built-in.
I wouldn't be surprised if other IDE's do too.
 
@Hosch250 except publishing work stuff on a public GitHub repository might be a good way to lose a job
 
@Mat'sMug I didn't say GitHub - I said Git!
 
It's not even that.
If it's not approved by IT, we're not allowed to install it. It's a fireable offense.
 
8:34 PM
If you are using Visual Studio, it has Git built in.
 
Now, Why the flying spaghetti monster I'm not allowed to install a VCS is beyond my comprehension though.
 
There is no GitHub public repo business or anything.
I just learned this from Mehrad, and I have my app source-controlled now.
 
@Hosch250 all local?
 
In just a couple button clicks, you can set up an existing project to have Git source control.
Yes, all local.
 
@Hosch250 Get it onto BitBucket.
They have free private repositories.
 
8:36 PM
that would at least save a corrupted script component ;)
 
That way you have a backup.
 
@RubberDuck Do have a backup - a daily backup onto a 750GB HDD.
 
heck, map your local repo to your MyDocuments folder, IT will back it up without noticing
 
Free private repos as a student on github as well
 
@Hosch250 back up the back up
 
8:37 PM
I have it in Visual Studio/Projects/LearnOneNote
 
Sorry, the inner DBA just came out a bit.
@Mat'sMug Close BIDS, Open the script to "edit", Build
Problem solved.
 
BIDS! OMG!!
(sorry I just recalled you were jealous of me using 2013)
 
Lots of benefits as a student. You know what's better than all of those benefits? Not being a student.
4
 
StarCount++ ^^
Anyway, I only take advantage of the VS Pro for students offer.
I don't want to do anything because I'll just lose them once I'm not a student.
And, I'm going to get VS Community 2015 this time instead of Pro, anyway.
 
@Hosch250 easy: start working on an open-source project. then you get free VS Community, free ReSharper, etc.
 
8:48 PM
@Mat'sMug I know my project - RUBBERDUCK!
 
:D
 
But, isn't Community for everyone?
I thought it was OS?
 
I think in theory it's for working on OS projects
in practice... heck, it's a free download, no questions asked.
between VSC and Express....
 
can I set up a test after most of the code has been written without tests or a test project?
I have no clue about tests in code.... Total Noob
 
Darn, I knew I'd run out of sources!
 
8:51 PM
@Malachi Can you clarify?
Are you asking if you can write the tests after the code?
 
@JeroenVannevel yes
 
yes
That's what most people do probably, including me
 
I write the code first and tests afterward.
 
I am writing some code into a project that I want to only run on the first day of the month, and I only want it to run at a specific time
 
I don't like TDD but I do like unit-testing
 
8:52 PM
The tests won't compile if they call non-existent code, so you need at least the basic structure of the code done anyway.
 
The project I'm working on now also gets its code first and tests afterwards
 
I have no tests in my app.
 
@Hosch250 In TDD, you're supposed to have that. First tests that don't make sense, then add code that makes it compile
 
Oh.
I've tried to add tests, but it wasn't working.
 
Easy then: make it work
 
8:54 PM
@SimonAndréForsberg I think Duga just saved a user!
Please don't quit! We're here to help, we just like to make sure that questions are reasonably scoped! If it doesn't fare well, hop onto programmers chat (The whiteboard) for help on refining your question! — Ampt 1 min ago
 
I've not the time, ATM, I'm afraid.
I'm writing 2-4 papers right now, that have to be done by the end of this week/next week.
 
@Mat'sMug I was almost going to ask: How on earth did that happen?
 
@JeroenVannevel I think "tests that don't make sense" kind of misses the point of TDD. The tests absolutely should make sense.
 
so do I need to add a test project?
 
Wow... I'm writing really dirty right now.
 
8:58 PM
@RubberDuck The "don't make sense" refers to writing tests for code that isn't written yet. It won't compile since you're trying to call methods that don't exist yet
 
can I do it to older frameworks?
 
@Malachi VS/C#?
 
@Malachi Tell us what you're thinking.
 
@JeroenVannevel yes
this isn't even going to be a method really.
 
Just add a test project to your solution
tests go in the test project
2
 

« first day (689 days earlier)      last day (3343 days later) »