« first day (692 days earlier)      last day (3341 days later) » 

7:02 PM
What happen to the C troll ?
 
12
A: When does a local variable inside a function *actually* gets allocated

Eric LippertPeter Duniho's answer is correct. I want to draw attention to the more fundamental problem in your question: does the second one have the benefit of NOT allocating the variables when something is true? Why ought that to be a benefit? Your presumption is that allocating the space for a loca...

 
gone
 
Worth reading through
@Mat'sMug as in banned? Or left the room?
 
left the room all by herself
 
That was what I thought correct when I was 14-16yrs old. I thought assembly was the best language.
 
7:04 PM
You were right.
:)
 
Lol
 
The first person that comes in here claiming JavaScript is the best, we'll remove as well
 
I only wish I could write assembly so that I could tap into the VBA stack trace, wrap it and expose it to VBA code through a COM API written in a toy language
 
Do compilers compile to Assembly or machine code?
 
Everyone knows that Forth is best.
 
7:05 PM
C# compiles to IL
 
assembly
 
@JeroenVannevel Javascript? No..... is the best of course.
 
Mostly
 
@Edward I actually really like Forth. I rescued a project that uses it.
 
@Hosch250 actually, compilers generally compile to an internal representation and then generate assembly language from that.
 
7:06 PM
Then the assembler convert it to an object file, linker creates ELF(Linux) or PE(Windows) file
 
Evolve is nifty. I wish I had a server to run a simulation on.
 
Assembly is cool, but again, "the best" is objective, and most projects couldn't possibly be written in Assembly do to the prohibitive costs.
 
@JaDogg but.. let me guess... ELF is better than PE
 
10
Q: Reverse Polish Notation Compiler

JaDoggDescription A reverse polish notation based compiler. Very small subset of forth This is a proof of concept level compiler, no optimizations or over/underflow checking see the embedded POD for more information. NASM is used as assembler. gcc is used to link with glibc. 32bit ELF Binary is gene...

 
@RubberDuck It's an interesting little language, and worth studying, but I wouldn't want to write, say, a multi-user 3D rendering program with it.
 
7:08 PM
@Hosch250 ^ see the above link
 
@Edward No... but this is a cool project.
 
@Edward so, good enough for then
 
Ken Stauffer wrote it. It's in C or C++ I believe, but the "organisms" code is Forth.
 
@Mat'sMug Ha, I only know PE. Not sure why would one be better.
 
The genetic algorithm mutates their code each generation.
 
7:09 PM
I have yet to write a program that modifies itself.
Sounds awful to debug.
 
@RubberDuck Looks interesting. AI stuff has traditionally been done in LISP. Wonder why he chose Forth?
 
No idea. He and the project dropped off the face of the earth.
 
@Hosch250 They're not so bad if you have good tools.
 
I just happened to have a copy of the code/installer on my hard drive, so I preserved it.
 
@RubberDuck Raptors got him for not using LISP?
2
 
7:11 PM
Maybe.
 
I like how I can get starred for referring to stars and XKCD.
 
Not sure about VBA but VB6 compiles to Some Intermediate Assembly like .Net, Don't remember what It was called. msvbvm60
 
ByteCode I believe.
 
That's Java...
 
I wish I knew more about how that works actually.
 
7:14 PM
VB6 can compile to both PCode and ByteCode IIRC
 
@JeroenVannevel Oblivious teachers? cringes
 
@RubberDuck What you need is "The Dragon Book"
 
and it can run embedded assembly code
 
PCode that's the one.
 
P-Code
 
7:14 PM
but it's not a real language
 
Most of the internal representations are not real languages
 
@skiwi My teachers often use Chrome. They're pretty hip
 
Today the teacher forgot he left the beamer on... He was googling for someone on the university, then proceeded to search his phone number, and by the time he called it, I believe some other student called that guy as well so the line was busy
 
</sarcasm>
 
That's not real HTML.
 
7:15 PM
And wow... I just had to read up the chat for a bit, and that was an absolute troll
2
 
@skiwi Doorknob is a bit like that, only not so bad.
 
Looks like VB6 could also compile to native windows code. Hmm
 
Some of us merely have opinions. Others have OPINIONS!
4
 
@Edward no, but it's real XML. =)
2
 
@skiwi I use IE for content requiring Flash because it has Flash built-in.
 
7:16 PM
Everyone's having opinions, and I'm here all alone being out of stars
3
 
Here, have one of mine.
 
Me too. =(
3
 
And another
 
I use a variant of FF for most things, I originally used it because my school's site and some of the other sites I have to use only work on FF.
Boy, an absolute star wall going up.
 
Chat ninja throwing star target practice is going well.
4
 
7:19 PM
@RubberDuck but Windows is not a real OS
2
 
It would have been had they programmed it in JAVA.
 
@Mat'sMug I hope that is sarcasm.
 
Of course, 1337 h4ckors only use Linux
 
Unfortunately, Java came around after Windows.
 
I thought 1337 used BSD ?
lol
 
7:20 PM
Only script kiddies use Linux. Real l337 h4x0rs use transistors and wire.
 
user image
2
 
And here's me.... all out of stars
2
 
@JaDogg Just thinking of that.
@RubberDuck I'm not, yet.
 
didn't we have a TS (theoretical star) meme ?
 
Yep.
 
--/\--
\    /
 |/\|
I never remember how to make a tag. <sigh>
 
[tag:tag]
 
Yay!
 
 _/\_
 \  /
 //\\
 
@Hosch250 Your star has better legs, but my star has stronger shoulders.
 
7:27 PM
@Edward Looks like a gingerbread man with a glide suit on.
 
and a tiny little head. LOL
 
 -OO-
 _||_
 _/\_
 \  /
 //\\
 
Genetic enhancement?
 
Lol, nevermind xd
 
user image
3
 
7:29 PM
Are those two people standing on top of my star?
 
Stereoscopic periscope?
 
I don't know why I'm not doing my school.
 
Ever see those art school ads that ask, "Can you draw Sparky?" My answer: "no."
 
Who's Sparky?
I can't draw either.
 
put this question here. codereview.stackexchange.comADi 44 secs ago
 
7:33 PM
@Hosch250 It's from a very popular ad from years ago. It used to be on matchbooks and was a picture of a dog, and "can you draw Sparky?" on the outside. You open the matchbook and inside were instruction about where to send your drawing (with $$ of course) to some by-mail art school.
 
Oh.
I'm leaving now, I'm swamped.
 
0
Q: The importance of being concise: Should I be reworking my code or should I use intuition until I become concise?

alanbuchananI am working through the CodingBat exercises for Java. I just completed this one, an exercise that requests the comparison of substrings of two strings. Here is my method (which does work): public int stringMatch(String a, String b) { int count = 0; String sub2 = ""; String ar...

 
Haha, just read "The Evil Empire" exposing Ben and Jerry's.
Their Corporate Social Responsibility thing is a JOKE!
 
@Malachi ^^
 
Anyone around here able to answer a question about Unix/Linux (I'm not sure which)?
When I took a class last fall, we were studying OS design principles.
 
7:47 PM
Maybe. What's the question?
 
One design is modular, and another is layered, or something, where everything has to pass through layers to get to where it is supposed to be.
 
0
Q: How do I implement per-pixel shading in GLSL 4.3?

user3277234I've created a functional level in C++ and OpenGL. I am able to render it properly using a basic shader, but I need to add my own per-pixel shader for lighting. I have added per-pixel shading in GLSL 4.3, but it results in only creating a black screen when I run the level. I have written my shade...

 
Windows is modular, and the book said that modular systems are easier to modify.
Layered systems, according to the book, have to be rebooted every time you install a driver, and Unix or Linux (I don't have the book handy ATM) is layered.
Is it true that it is so difficult to modify the system?
 
It's a somewhat artificial distinction and oversimplified. Modern Linux is both modular and layered.
 
OK.
 
7:49 PM
I can (and have) written and loaded/unloaded device drivers many times on Linux without rebooting.
 
Because a true layered system wouldn't be able to do plug-n-play, if the book was right.
 
It's also modular in that device drivers are implemented (mostly) as loadable modules.
 
@Edward, you read up on the new kernel loader mechanism?
You can upgrade the entire kernel without rebooting or losing sessions/application state
 
@rolfl No, not yet.
 
i.e. complete OS upgrade without downtime
 
7:50 PM
@rolfl Wow, is this Linux?
 
@CaptainObvious Debugging shader code is a pain
 
@Hosch250 I update my Linux box often, including the kernel, and basically only reboot when changing physical hardware.
 
Cool.
 
I don't use Windows much these days.
 
I use Windows because I like how MS products work together and because I'm learning .NET.
I don't care for OSX very much, and I haven't tried Linux.
 
7:53 PM
I like Linux because if I want to dig into how something works, I can just fetch the source code and talk to the developers.
Or write my own...
 
That does sound interesting; I don't think I'm at that level yet :(
 
I'm looking forward to writing .NET for cross-system running.
 
I've been using kSplice on some servers for years.
 
@200_success Thanks for the link!
 
7:56 PM
One of the biggest inhibitors to Windows uptime is its filesystem semantics.
Opening a file automatically locks it.
The only way you can be guaranteed to delete a file is to kill all process (i.e. reboot).
 
Yes, that's annoying. Under Linux, I can leave a PDF viewer open, rerun LaTeX and see the updated PDF file. Not so under Windows.
I can imagine how that would be much more than mere inconvenience for upgrades.
 
So, Windows may be modular in theory, but it means squat when it comes to being "easier to modify".
 
@200_success: Would you say this should be closed? I may have already made a mess (irreversible, of course).
 
@200_success I suspect that your textbook is based on old information.
Something like this:
The Tanenbaum–Torvalds debate was a debate between Andrew S. Tanenbaum and Linus Torvalds, regarding Linux and kernel architecture in general. Tanenbaum began the debate in 1992 on the Usenet discussion group comp.os.minix, arguing that microkernels are superior to monolithic kernels and therefore Linux was, even in 1992, obsolete. Other notable hackers such as David S. Miller and Theodore Ts'o joined the debate. The debate has sometimes been considered a flame war. == The debate == While the debate initially started out as relatively moderate, with both parties involved making only bana...
Sorry, that was intended to be addressed to @Hosch250
 
@Jamal Looks like maybe a Programmers question.
 
8:08 PM
Could be. Someone has just posted a code review, though.
 
I know. I've locked it while I think it through.
 
Migration wasn't rejected with that lock? I'm just now discovering that.
 
Your first function is not correct. You are returning a reference to a local object that will be destroyed once the function ends. You should also take a look at this: codereview.stackexchange.com/questions/42958/…NathanOliver 21 secs ago
 
@Duga Phew. I was scared for a moment.
 
To those who read my blog entry, the weird cut off at the end should be fixed. I guess I forgot to save a draft?
The ending isn't what I originally wrote, but it at least makes more sense now.
 
8:20 PM
in VBA, 4 mins ago, by Mat's Mug
I need to learn to kick when it's time to kick
but waiting was probably the right thing to do... was it?
 
I'm glad I missed a really stupid conversation in here earlier.
I'd have been more glad if I somehow didn't get an @ mention in the midst of it which alerted my attention to it in the first place.
 
room topic changed to The 2nd Monitor: General discussion about Code Review -> codereview.stackexchange.com [addicted-to-cr] [just-saying-hi] [kick-the-trolls] [monkey-business] [my-code-is-compiling]
that should remind me
 
Next time there's a stupid conversation here, I'll remind everyone "don't mention @nhgrif !" :)
 
lol
 
@Marc-Andre Making the jump from C to almost any more modern programming language is kind of a large jump because it necessitates learning new concepts--primarily object-oriented-programming.
 
8:26 PM
I think we should all stick to hand-hewn ones and zeroes of solid oak, just like our forefathers.
3
 
I'm trying to figure out why exactly my name was mentioned at all.
@Hosch250, looking at you...
 
@Edward aw, no more stars!
 
I'll put it on your tab.
 
@nhgrif I said you wrote an ERP (a complex program), and you weren't using C.
 
@nhgrif Because you're a swift fanboy
 
8:29 PM
@Mat'sMug RSA
 
Why the fuck would you write a complex program in C?
 
Ask her.
She said you weren't a real programmer unless you wrote in C.
 
Based on what my first thought is when I hear "complex program", C is pretty much the last language I'd pick.
 
@Hosch250 No. Don't dare ping the troll.
 
And if anything, you're not a real programmer if you claim some singular language as being a requirement for being a "programmer".
 
8:30 PM
@nhgrif In fairness (unwarranted) one still does find a need to write complex programs in C, but mostly for embedded systems work.
 
@JeroenVannevel I'm not talking about Simon's ping.
@Edward I'm not saying there's not a need for C.
 
You mean Simon's?
 
There is...
Yes, Simons.
 
Yes, there is a need for C - especially in embedded systems.
 
@Hosch250 What you should have said isn't that I write an ERP system and don't use C.
 
8:31 PM
@nhgrif How are we going to get anywhere if you're going to be reasonable about this?
 
tsss... ERP system's not a real program
 
TS^
 
@Edward I didn't even see this when I wrote my comment about embedded systems!
 
What you should have said is that I work on an ERP system, for which I use .NET, and I also write iOS apps, for which I use Objective-C and Swift. And for all my database backends, I use Microsoft SQL Server, but anyone is welcome to tell me I should write my backend in C too...
 
Especially not a complex one!
 
8:32 PM
When I say "Swift is the best", part of me means it... but I hope everyone knows it's not at all serious.
Do you know what's best?
Having a big toolbox.
 
Is that a euphemism?
 
@Hosch250 The need is nearly gone these days, but there are still some small poorly supported MPUs that don't have many compiler choices available.
 
But, when you are first learning, it is probably a good idea to get one down good first, then enlarge your toolbox, no?
 
Want to be a good software developer? Tim "The Toolman" Taylor should be a role-model. It's all about the size of your tool collection.
 
@nhgrif Yes, and if you can't find or buy tools, make them.
Speaking of tools... anybody here ever added a custom device to QEMU?
 
8:36 PM
I think if you're really good at one language you can easily learn other languages, given you have an open mindset
 
If you're really good at one OOP language, you can easily write in any OOP language--just gotta learn the frameworks.
 
@skiwi That is what my teacher said.
 
@skiwi It's good to study other languages just to see alternative ways of accomplishing things.
 
If you're really good at one FP language, you can easily write in any FP language.
 
@Edward That's a fair point
 
8:37 PM
And there may be (probably are) other paradigms, but it's not exactly simple to jump from a non-OOP language into an OOP one.
 
I still have a hard time with OOP in C#.
 
A C developer will struggle to learn Java much more than a C++, Objective-C, Swift, C#, etc., developer would.
 
So I don't use Erlang or Scheme or Forth much these days, but they each have interesting notions behind them that are worth learning at least a little about.
By contrast, BASIC developers struggle to tie their shoes.
 
I find Haskell interesting, but I just honestly cannot find an application for it, given that I do know OOP well
 
0
Q: Random fadeIn has unwanted pauses

leftsideI have a title with each character and word split into a <span>, using lettering.js. I am relatively new to jQuery and Javascript. I've got it working so each letter fades opacity in randomly. BUT, there are unwanted pauses - not huge, and about 20% of the time it seems to be OK, but running a f...

 
8:38 PM
The trouble is, it is worth learning about everything, and there isn't enough time to :(
 
@Hosch250 I was going to the same thing, but about Haskell in particular.
 
@Phrancis I am sure that I could run the .NET on it too
 
@nhgrif C's procedural isn't it?
 
I don't know how all the languages are defined, but you get my point.
 
I think so.
Unless it is functional, but that doesn't sound right.
 
8:40 PM
@RubberDuck Yes, C is procedural.
 
All my PHP I wrote in my early days was also procedural... sadly
 
I thought so. Yes. Moving from C to anything OOP would be a jump.
 
Exactly.
 
@skiwi I did the same thing in VB for far too long. Don't feel bad about it.
 
As a general rule, if you were to only know ONE language today, I think C would be the wrong choice.
 
8:41 PM
Less of a jump than the leap required to even start thinking like a programmer.
 
Because if you only know C, you don't know OOP.
 
Tell that to the troll.
 
And you certainly don't know anything functional either.
 
BUT, with that said... no matter what OOP language is your language of choice, you can benefit greatly from spending time writing C.
 
Which is more and more important these days.
 
8:42 PM
I like that Java streams are FP-based for example, but at the same time it's still a far far way off
 
Oh. Agreed. It's far closer to the metal and worth learning.
 
Personally, I think .NET could really take off soon, the way it is expanding to be cross-system, like Java.
So, Java or .Net would be my picks for a single language.
 
@RubberDuck More importantly, there's a massive existing set of C libraries that aren't going away.
 
I'm just here hoping graphical programming will ever take an OOP direction... it's still stuck in the C-like mindset for ages, looking at OpenGL
 
Also very true.
@skiwi SSIS....
 
8:43 PM
@skiwi Are you talking about directly drawing lines and such, or GUI's in general?
 
If you don't know C, you can quickly run into trouble learning how to interact and consume the C library.
 
@Hosch250 The directly drawing lines stuff
 
OK.
 
@RubberDuck What's that?
 
SQL Server Integration Services
 
8:44 PM
One interesting thing is that just in the same way that going from procedural to OOP is a big switch, going from OOP to event-oriented is a similar leap.
 
It's a graphical ETL (Extract-Transform-Load) tool
 
Yeah, I was actually creating an OO-based graphical system in C++ as an assignment from my book.
@Edward What is that?
 
I should never have to explain to anyone how a C-string works if they have more than 6 months experience programming (or have had any programming classes). And yet, I've had to teach C-strings to someone with 10-years of .NET experience.
 
Is that like how we handle specific events in C#?
 
0
Q: Sorting a List takes a lot of time

Java NerdI have the following list to sort: A 0.53 B 0.56 C 0.56 D 0.98 E 0.33 Please not that my list may contains 1000's of such type of records. I am Sorting my list and put the sorted list into an array as: String str=""; for(String s: mylist){ str+=s+","; }...

 
8:46 PM
@nhgrif What are you talking about?sdfjiosjdf6468dfsd3sdfdsfdgdosd
 
@nhgrif You explained them to me a while back, at least the part about the null-terminator.
 
@nhgrif Explain that thought process, because why would a .Net developer need to understand a C string?
 
I knew about the char-array thing already.
 
@RubberDuck Want to write a .NET program that talks to an assembly-line machine over SCADA protocol?
 
Want to? No, but point taken.
 
8:47 PM
.NET application requests a data package from the machine over a TCIP connection, and these 14 bytes contain a string.
 
On the other hand, that's domain knowledge you would aquire given the need.
 
@Hosch250 Event oriented is what most GUI programmers do. Code reacts to inputs asynchronously rather than being run in more or less a "batch" mode.
 
Let's say original string was "Hello World!" and first poll gets that.
 
How many .Net devs need to understand COM Inteop?
 
The machine changes the string to just "Hello"
 
8:48 PM
Not many, but the project I'm working on required it, so I learned it.
 
But the actual memory after "Hello" (plus null char) isn't changed, so "World!" is still in that memory block.
 
@Edward Somewhat like I'm doing in WPF, with EventChanged and INotifyPropertyChanged, and the like?
 
If you don't know what you're doing, you'll now display "HelloWorld!" in your .NET application.
 
@Edward I'm unaware of why it would be hard, but perhaps that's because I"m already used to it... Part might be that you need to realize that you are not in control of your program, but the main loop is?
 
@Hosch250 Yes, that's it.
 
8:49 PM
And you'll spend an entire day before you ask "What's this \0 character?"
 
OK, yeah, I like that.
Yeah, you already explained that.
The null-terminator.
 
@skiwi Yes, it's because you're used to it. Shifting to it if you're not used to it comes easily to some, harder for others.
 
But, @RubberDuck, the reason why a .NET developer should know how C-strings work is because in every OOP language, the String class is built on top of the identical underlying principle. The String class adds a lot of niceties to it that make it easier to use, but under the covers, we still have a null-terminated char array.
 
Talking about other language paradigms... When reading trying to read Haskell in some CR questions around here, I'm always boggled by how you still have an overview of what your program does, it seems so "procedural", and totally not OOP
 
@nhgrif I would argue that goes against the principles of abstraction.
I don't need to know how String is implemented. I just need to know and understand its interface.
 
8:52 PM
Why doesn't the language just have a method to convert to/from C-strings?
 
Anyway. I've gotta go, but it was a fun conversation.
Cya guys.
 
@RubberDuck I'd agree that you should not have to know how a String is implemented in order to use it, but also agree that it's often useful to understand it to use it efficiently.
see ya!
 
later!
 
@Hosch250 I don't know. Objective-C does (and Swift does) because they're the best.
 
lol
 
8:57 PM
I should write one and post it for review.
It'll use Linq.
 
0
Q: Random fadeIn has unwanted pauses

leftsideI have a title with each character and word split into a <span>, using lettering.js. I am relatively new to jQuery and Javascript. I've got it working so each letter fades opacity in randomly. BUT, there are unwanted pauses - not huge, and about 20% of the time it seems to be OK, but running a f...

 
What will use LINQ?
 
no close vote on that one?
 
My to/from C-string methods.
 
Actually, the old Pascal compilers used to store them as counted strings rather than as NUL-terminated.
 
8:57 PM
@RubberDuck I agree you don't need to know. You just need to know how a C-string works if you're interacting with a C-library.
 
@Edward Wouldn't those be Pascal-strings, not C-strings?
 
By definition, yes.
 
@Hosch250 I can already write an answer to your post that asks "Why use LINQ?"
If you got a C-string in .NET, you most likely just have a raw data object--however you get raw data in C (like if you download a file of unknown type from the web)
 
Well, the to-function can use LINQ.
I'll need to study more for the from-function.
 
0
Q: Counting length-2 substrings that are common to two strings at the same offset -- Python

CaridorcI solved the CodingBat task: Given 2 strings, a and b, return the number of the positions where they contain the same length 2 substring. So "xxcaazz" and "xxbaaz" yields 3, since the "xx", "aa", and "az" substrings appear in the same place in both strings. stringMatch("xxcaazz", "xxbaaz...

 
9:01 PM
I'm busy finishing a couple papers, and I need to write a couple more, so it might be a while before I have time.
 
bye!
 
Bye.
 
bye!
 
9:13 PM
Bug report for the chat system.
I can't leave a room and stay left.
I keep leaving it, and it keeps sliding back into the "other rooms..." section.
 
9:27 PM
@nhgrif Would it be the same thing with C++?
 
@Marc-Andre C++ can be written procedurally and OO-ly.
But even so, given what her assignment probably is, she probably doesn't have a whole lot of OOP to do.
 
@Marc-Andre What, exactly?
 
If the code works as expected then yes, it would be a good fit for Code Review. — Phrancis 1 min ago
 
Jumping from C to C++? Or jumping from C++ to a more modern language?
 
@nhgrif From C++ to Java
 
9:31 PM
0
A: Creating an iOS form with many similar text field cells

bazolaI would subclass the Cell class and pass in arguments during initialization. The subclass would look something like this: Interface @interface MyBPFormInputTextFieldCell : BPFormInputTextFieldCell +(MyBPFormInputTextFieldCell *) cellWithBackgroundColor:(UIColor *)color ...

 
If you're writing OO C++, jumping from that to Java would be significantly easier than jumping from C to Java.
 
Good, I only had one class of C++ and the line was not wll drawn between C and C++. I'm more than often mixing up what belongs to one or the other, even if they are wayyy different. Those two languages are not my cup of tea atm. I will amend my "affirmation" about how easy it ease to learn a new language next time.
 
C++, IIRC, is basically C with an OO layer. You can write C++ procedurally, or so I've heard.
This information may be outdated, and they may have pulled further apart with the different releases.
 
0
A: Creating an iOS form with many similar text field cells

nhgrifAs far as I can tell, the only difference between these objects is the placeholder text, right? I'm not sure how valuable it is that we have so many text fields and don't have a way of accessing them individually (to know what the user input in each... but nonetheless...). So all we need is an ...

 
9:58 PM
Just found this old gem:
Your poetry is doggerel. <br/> Haiku is supreme <br/> why rhyme? — rolfl ♦ Dec 9 '13 at 16:46
 
-1
Q: Error in python script for Scatter plot

MaguilaI am trying to create a graph with this script, but I get an error if someone sees the error, please I ask you to help me find it, because I do not know python. "python mapit.py -f 1.3 -i mapdata.txt" give me this error Traceback (most recent call last): File "mapit.py", line 81, in <module>...

0
Q: Eight Queens on a Chess Board Puzzle JavaScript

IHaveAQuestionWhen I first saw the question: How to arrange eight queens on a chessboard such that they cannot attack each other I was intrigued by it. So I decided that the best way to answer the question was to do so using code. It may have been a mistake, but I decided to write it in JavaScript. I know that...

 
@Phrancis Ha, give me rhyme any day of the week.
Actually, I've written a few rhymes in my time, let me see if they are still around.
 
Dim i As Integer
For i = 1 To 100
    Case i Mod 15 = 0
        Debug.Print("WeekEnd!")
    Case i Mod 3 = 0
        Debug.Print("Week")
    Case i Mod 5 = 0
        Debut.Print("End!")
    Case Else
        Debug.Print i
Next i
 
Looks like they are gone.
 
For i As Integer = 1 To 100
Check your scope.
 
10:10 PM
You can declare Dims like that?
Anyways, back later, leaving you with this
 
Yes.
 
Ah OK, nice little bit of syntactic sugar
 
It's actually not syntactic sugar really. It changes the scope of i.
 
10:30 PM
@jfriend00: this post isn't acceptable for codereview.stackechange.com because the code example belongs to someone else. — shmuli 54 secs ago
 
Isn't it fun when a program you haven't written just takes over?
My brothers are playing a video game, and the computer started controlling their piece.
 
0
Q: Removing duplicate methods in different classes

user255572I have bunch of methods like this in different classes(Student, Course, GroupOfCourses): public double getAverageGrade() throws NoGradesForStudentException { double sum = 0; int totalGrades = 0; ArrayList<Subject> studentSubjects = getStudentSubjects(); for(Subject subject : ...

 
10:54 PM
1
Q: Song search app with dynamic tables

Doc torlyI decided to make a Ruby app to search for songs, it uses the tinysong API. Things got really cryptic and weird in the view, I managed to get dynamic tables that adjust to data length, but I feel like there must be a much better way to accomplish this output. require "rubygems" require 'json' re...

 
11:09 PM
0
Q: Processing 3 billion records using Python, better efficient approach maybe?

SiddarthI am processing around 3 billion records using this piece of code, it's pretty slow. It would be really helpful if u guys can suggest some better ways to do this. ''' Created on 27-Mar-2015 @author: siddarth ''' import rake import multiprocessing as mp import time import os import csv filenam...

 
11:23 PM
@MartinR Don't you just love random downvotes 3 and a half months after you've posted an answer, and no comment (or newly posted answer) to explain what's wrong with your answer?
0
A: How do I call CMSampleBufferGetAudioBufferListWithRetainedBlockBuffer?

Martin RDisclaimer: I have just tried to translate the code from Reading audio samples via AVAssetReader to Swift, and verified that it compiles. I have not tested if it really works. // Needs to be initialized somehow, even if we take only the address var audioBufferList = AudioBufferList(mNumberBuffer...

 
...CodeReviewSE?! — jonrsharpe 42 secs ago
You can post reasonable-sized-working-as-intended bits of code to Code Review, but please remember to read the help center before doing so (looks like you probably didn't read Stack Overflow's Help Center before posting this question...) — nhgrif 20 secs ago
 
@nhgrif I know that I shouldn't care, but it annoys me nonetheless :)
 
It bothers me too.
Good news is, linking it here got us both some upvotes, and might get some more when some people get more active in here. ;)
To me, the problem with the downvote is "Someone thinks this is wrong"... and all I want is for the answer to be correct. I even want this for your answer. It's not about my reputation.
 
11:38 PM
I don't like downvotes without comments.
I actually sometimes don't VTC when I should because I don't feel up to writing a nice comment.
 
I can't agree with that. VTC without comment is perfectly fine. If it's closed, it will leave a close reason when it closes.
And if no one agrees with your close vote, then your close vote doesn't impact anything.
 
Sometimes I VTC without a comment, but when it is a brand-new user, I prefer to leave a comment.
I don't feel sorry for people with a fair amount of rep posting bad questions.
They should know.
 
Next blog title:
> ALL YOUR SOURCE ARE CONTROL BY US
 
@nhgrif thank you for the quick reply, it is my second day with stackoverflow.com.. CodeReview seems to be what I need.. I somehow missed it.. I drop my question here. — darksaber 8 secs ago
 
I think technically, it should be "controlled".
 
11:46 PM
You only say that because you don't get the joke.
 
No, I don't.
 
Google: "All your base are belong to us"
 
Mmm.
Supper time, see you later.
 
0
Q: How to make 'variable loops' more efficient - javascript

Jammeh CarrIn my code, i have to loop through something every 20 code cycles, and i wanted to use setInterval but it didn't work and caused weird behaviour. I searched around and couldn't find a solution to my problem so i used this method and it works. if (releaseMobsCounter > 20){ if (redCount == 0){...

 
RELOAD!
 

« first day (692 days earlier)      last day (3341 days later) »