« first day (937 days earlier)      last day (3083 days later) » 

9:00 PM
This hard drive can't handle 2MB/s transfer.
 
My advice: backup and back up
 
This is what Git is for. :)
3
 
I only use it to share some code
Thanks for reminding me of git
I have a question, to anyone who can answer
It kinda is language-agnostic
Should I head to the Nth Monitor and ask there or it is fine here?
 
Why do you ask if you can ask a question? If it's not appropriate here someone will likely move it.
 
Right, forgot about that
Anyway
I have an array of integers
And I want to convert it into bytes
The values will be between 0 and 0xFFFF (forgot the real number)
 
9:06 PM
So 0 to 65535?
 
Hmm... Curious. A UInt32 should be exactly 4 bytes... Why am I getting 255.255.255.0???
 
And I want to do like this:
 
@RubberDuck Doing what?
 
244, <2 bytes>, <2 bytes>
 
9:07 PM
    [StructLayout(LayoutKind.Explicit)]
    public struct Ip4Address
    {
        [FieldOffset(0)] public byte Octet1;
        [FieldOffset(1)] public byte Octet2;
        [FieldOffset(3)] public byte Octet3;
        [FieldOffset(4)] public byte Octet4;

        [FieldOffset(0)] public UInt32 Address;
Setting Address = UInt32.MaxValue results in 255.255.255.0
 
Interesting, let me try it here quick.
@IsmaelMiguel So what's the problem?
 
@RubberDuck Can you show the bit where you "split" the value into bytes?
@EBrown I'm doing number & 255, (number >> 8) & 255
 
I already did. =)
LOL. I see the bug now...
[FieldOffset(1)] public byte Octet2;
[FieldOffset(3)] public byte Octet3;
 
@RubberDuck That would do it...lol
 
@RubberDuck off by one, in 2 places?
 
9:10 PM
@IsmaelMiguel That should work fine (in many languages).
 
@EBrown Exactly, and it "works"
 
The only change I would make is to use the hex codes (to make it more clear).
 
But then, I do byte[0] << 8 | byte[1]
And it doesn't work
 
Is byte[0] a byte, or an int?
 
A value between 0 and 255
 
9:11 PM
It needs to be an int for that bitshift to work.
Right, but what type is it?
 
Float.
(Javascript)
 
I don't think you can do that with float values.
 
But I can't get a number in Javascript.
Numbers are floats
 
Ah, JS. Do you have a fiddle for it?
 
Yes
Sorta
1 second
It's a VERY huge thing
 
9:13 PM
Minimize the example for me.
 
Can't, but I can comment it
 
> You've earned the "Convention" badge (10 posts with score of 2 on meta).
2
Didn't know there was such a thing. :)
 
Nice!
 
Congrats dude!
Sorry the delay, still preparing it
 
9:17 PM
@Mat'sMug Today I learned. :)
Oh wow, only 51 people have that badge.
 
0
Q: Php Login Class - Security and Logic check

Ahtsham KhanI write a simple php login class that only operate on php sessions to login user in the system. My Question is that this class is secure enough to be used on production environment ? NOTE : Die Statements are used only for testing of scripts class.login.inc.php class Login { //setSessionFun...

0
Q: Dictionary operations on a Binary Search Tree data structure?

AnkitSabloktoday I tried to code all the dictionary operations such as Search, Successor, Predecessor, Minimum, Maximum, Insert, Delete etc. for a Binary Search Tree data structure using the Java programming language. I would be grateful to you guys if you can review my code and suggest me some cool tricks ...

 
@CaptainObvious
2
 
//Logout Function
public function logout(){
 
@Phrancis Excessive comments are (most of the time) not a bad thing, but this may be an exception.
 
@Phrancis No-shit
 
9:22 PM
@CaptainObvious The further you scroll down the longer the lines get.
 
@EBrown throw new Exception(); //throws an exception
 
@EBrown even better, !
 
@Mat'sMug hah, as if it exists
 
@skiwi Addendum: throw new Exception(); // throws a new exception
 
9:24 PM
@Mat'sMug Seeing and next to each other always get me laughing.
 
IKR
 
(Not just because the idea is laughable, but because the tags spell "poop" when arranged properly.)
 
@Mat'sMug Don't forget !
 
Review queue needs some attention.
 
9:27 PM
@RubberDuck I don't have the icon anymore.
Plus I suck at reviewing.
 
@EBrown jsfiddle.net/zkngv517/1 (Doesn't work on the latest Firefox. Use Chrome or IE)
 
-1
Q: First the Image is not going on and it says the applet hasnt started

user5600875First the Image is not going on and it says the applet hasnt started at the bottom of this applet. Please help me its fursrtating me a lot. And i tried to do this based of this youtube viedo if it will help you. THANKS!!! This is my Main Class: import java.applet.*; import java.awt.*; public cl...

-1
Q: python file accessing

python_prog0-43-920211-6 0-814-72759- 1-88-496422-2 0-30-016235-2 0-76-568038-6 0-67-400751-4 1-81-604371-X 1-55-652802-7 0-405-98881-0 0-06-181605-1 0-69-115027-3 1-58-729815-5 0-313-3417-X 0-13-027491-7 0-78-948330-X 0-84-190595-9 0-87-436123-0 0-69-107006-7 0-295-97947-4 0-47-087623-9 I have a file cont...

 
@IsmaelMiguel That's way too long for me...lol
 
@EBrown Look for the comments that say "255" somewhere. That's where the problem is
 
@EBrown that's precisely why I brought it up. A lot of people lost access to the queue.
 
9:29 PM
@RubberDuck I can still access it, but the number no longer shows up anymore.
 
@Captain dude, ......
 
@Mat'sMug Did you checked the 404 page? On that deleted question?
 
@IsmaelMiguel If you need another way to do the shifting, / 256 should be the same as >> 8, and * 256 should be the same as << 8.
 
yup
I don't get a 404 on deleted posts....
 
@EBrown What I need is to get 2 separate bytes for values above 255
 
9:31 PM
@IsmaelMiguel Well num & 0xFF and num / 256 will get you them.
 
@Mat'sMug Oh... Well, it is a Mac Window saying "404 page not found". Nobody programs on Mac...
@EBrown But when I try to "re-assemble" into a single number, it craps out on me
 
@Mat'sMug speaking of which, what do you guys think about our 404 page design?
 
@IsmaelMiguel Don't try doing << 8, try doing * 256.
@janos I don't like that OSX is singled out. >.>
 
@IsmaelMiguel hence, "not found" ;-)
 
1 min ago, by Ismael Miguel
@Mat'sMug Oh... Well, it is a Mac Window saying "404 page not found". Nobody programs on Mac...
 
9:32 PM
I'd say OK, but I don't get what the OSX style window is doing there
@EBrown ^^^ @EBrown I thought the same
 
Other than that, it looks fine.
 
@EBrown Didn't worked. Will try later with attention and care
 
Alright. I'm leaving work in about 30 minutes and won't be back on after that for a couple days.
 
@IsmaelMiguel I program on Mac ;p
 
I happen to program on a Mac... (though I'm really a Linux guy...)
 
9:36 PM
@Phrancis You are 1 in a million
 
@Phrancis for some values of "program" :p
3
 
Now, I don't program for Mac, although maybe I will try it at some point
 
@janos You are 1 in a million as well
 
Linus Torvalds seems to program on a Mac too, though he's running Linux on it (naturally)
 
@EBrown I should have left 2:37 ago
 
9:37 PM
@Mat'sMug OK, I don't really program, I mostly just script :P
 
My mistake, I was under the impression it was still a Linux disto.
 
I remember OS 9, man that thing was not pretty
I was wondering why my data made no sense... then realized I was connected to the wrong database :|
 
Any time now Captain...
 
^^^ EBRown FGITW
 
@janos ??
 
9:52 PM
the duck's question hasn't even arrived here but you already answered it ;-)
 
1
Q: IPv4 struct utilizing explicit layout

RubberDuckI was inspired by Processing a list to build an IP in String Format to reinvent the wheel a little bit and play around with explicit struct layouts. You see, an IP address is really made up of four, 1-byte numbers. Each Octet of an IP address is one byte. So, this means that an IP address can ...

0
Q: Create a rotation matrix

Jeff MeltonI adapted this piece of code from a math book for game developers and the result is correct albeit with slight floating point errors. void rotate(matrix44_t &m, const float32_t x, const float32_t y, const float32_t z) { float32_t sin_x = math::sin(x), cos_x = math::cos(x); ...

 
@janos I'm quick like that. :)
@RubberDuck Made a slight edit.
 
I saw. Good call. Not sure I like it though.
 
> R# would also like me to remind you to use uint instead of UInt32. ;)
 
@EBrown bah. I ignored that one on purpose. I felt it was more important to be explicit about it being a 32 bit uint.
 
9:55 PM
@RubberDuck I'm not done yet.
Forgot the bit about making them readonly fields.
 
I also use the upper case ones for static methods, because they're class methods. It feels weird to call a method on a "type"...
byte.Parse() just feels wrong to me.
 
Ah, that makes sense.
 
This should not be posted as an answer as it appears to be a question. If your code works as expected and your question is more of a "clean up my code" request, post to codereview.stackexchange.com. If the code isn't working the way you want, describe what is your expected vs. actual output in a new question post or edit your original question. — E. Moffat 57 secs ago
 
And one closer!
Thanks Santas!
 
@FrancescoTurco you don't need to recommend it. People looking for answers search, and find SE all by themselves. — Mat's Mug 5 secs ago
 
9:59 PM
+39 here.
 
> You can also make address.Split('.').Select(a => Byte.Parse(a)).ToArray() into a method group:
 
+10 here
 
Should anything need to be paid for then? Rent? Food? — random 1 hour ago
 
0
A: Finding an exact "phrase" with a given string (as typed/in order)

Elias Van OotegemBasically, Alex has already made some good suggestions (especially the bit about using \b). However, your function will fail in certain cases like this one: //looking for chars like *, +, ? and such filterExactPhrase("some *markdown* string", "*markdown*"); The string could contain special reg...

 
@EBrown yeah. ReSharper told me that too. I've never gotten comfortable with that syntax
 
10:00 PM
@RubberDuck how does this sorcery work, in plain English?
 
@RubberDuck I like them.
 
    public Ip4Address(string address)
        :this(address.Split('.').Select(a => Byte.Parse(a)).ToArray())
    { }
 
address.Split('.').Select(Byte.Parse).ToArray()
 
@RubberDuck May I ask something stupid?
 
Can't believe you have +6 and I only have +1. :(
 
10:01 PM
0
Q: Infix to Postfix Formula Parser Java

MSuraiThis is volunteer homework so I don't have to do it and I won't get any grades for doing it anyway, but I don't get my parser to work correctly and it's driving me insane. Basically I just want to read an infix formula and convert it to postfix and it is working with smaller formulas like 1 + 5 /...

 
(Probably because I've edited the answer like 5 times now.)
 
@Phrancis split the string on each period and return an IEnumerable<string>, then convert each string into a Byte and return IEnumerable<byte>, then cast the IEnumerable<byte> to an array.
 
method groups are awesome
 
@IsmaelMiguel No such thing as a stupid question.
 
@RubberDuck wait, you do see deleted posts, right?
;-)
 
10:02 PM
@Mat'sMug I should still see them, why?
 
51 secs ago, by RubberDuck
@IsmaelMiguel No such thing as a stupid question.
 
@RubberDuck Damn. That's one hell of a one-liner. No wonder people like so much!
 
sometimes...
 
@RubberDuck This one is. Will an UInt32 complain about a 64-bit integer? What about a byte?
 
TTGH
 
10:03 PM
@IsmaelMiguel It's a very good question, and I don't know the answer to that.
 
@EBrown Have fun, still stuck at work
 
^^ditto
 
@IsmaelMiguel I believe it will not compile.
 
@IsmaelMiguel I can't see why a 32 bit number would complain about a byte, but I don't know how C# would act.
 
@RubberDuck Will it be considered as "broken" if it barfs?
@Hosch250 It may throw an Exception?
 
10:05 PM
@Phrancis
 
@SirPython Me neither. Me neither...
 
you can't assign an Int64 to a UInt32, won't compile.
there are no narrowing implicit conversions in C#
write VB if you want that don't
2
 
I believe... that ^^. You can only implicitly convert from a smaller number to a bigger one.
 
Compiler error, like I thought:
> Error CS0266 Cannot implicitly convert type 'long' to 'uint'. An explicit conversion exists (are you missing a cast?)
 
@Mat'sMug What type does 3575514386 have?
 
10:07 PM
FML
 
@Hosch250 That means that @RubberDuck forgot a very important part
 
@IsmaelMiguel 8-Byte, Windows Calculator says.
 
@IsmaelMiguel I only think in Hex these days...
 
@IsmaelMiguel as a literal, it's an UInt32 unless declared otherwise
 
@Hosch250 64-bytes. That is Google's IP.
 
10:08 PM
Been playing with C too much.
 
Oh, I entered it as decimal.
 
@Mat'sMug Will C# complain?
 
@IsmaelMiguel google has an IPv6 address.
 
Is that hex or base-255?
 
@RubberDuck IPv4. 3575514386 (click the number)
@Hosch250 Decimal
 
10:10 PM
> ‭1101 0101 0001 1110 0000 0101 0001 0010‬
 
That is binary
 
0
Q: Improvements of this VBA code

manuIt is my first time here in Code Review so i will welcome all comments in order to improve my post. So I am looking to see if my code can be improved by all ways. What my code does is: Find the best match between a Private Company and a listed company based on 3 ratios in order to report the ra...

0
Q: Correction implementation - tabInt() , tabDouble(), tabChar(), etc

J.GMy name is Michael, 13 years, and I began to do C++ programming recently. I have a book with following exercise: Create a class myArray that solves the overflow problem when handling arrays. In addition, this new class will allow a user to provide any integer (positive or negative) as t...

 
There are 8 of those chunks, so shouldn't that be 8 bytes?
 
uint.MaxValue == 4,294,967,295
3,575,514,386
 
Or is a byte 8-bits?
 
10:11 PM
@CaptainObvious On Error Resume Next
 
I can never remember this stuff :(
 
@Hosch250 1 byte = 8 bits
 
Bother. So, would that be 4 bytes, then?
 
Exactly
 
half a byte
or, a bite-size byte
2
 
10:12 PM
@Mat'sMug You can swallow a whole byte
2
 
damn, you're right
 
You might choke on it, though.
 
wait, you said 4 bytes? 4 bytes is 4 bytes dude
 
4 bytes is a dword, I think.
 
@Mat'sMug It is actually 32 bits, or 4 chars
 
10:13 PM
uh-huh
 
I usually take more than 4 bytes each meal.
2
4 bytes is a small snack.
 
Do you give 4 bytes on your soup before swallowing?
 
If it has chunks.
 
I'm confused. Are we talking about food or data sizes?
 
Sometimes I take megabytes. Those are usually hard to chew.
@SirPython I don't know.
 
10:15 PM
I think it's the data size of foods
3
not sure
 
@Hosch250 Don't try a gigabyte
 
sounds like Friday afternoon
 
@IsmaelMiguel I couldn't get that in my mouth.
@Mat'sMug LOL.
 
@IsmaelMiguel That looks like a very bad joke.
 
10:16 PM
" -My love, do you think I'm getting fat ?" " -No dear, you are a very cute whale" — Emmanuel yesterday
 
Yeah, it does :/
@Mat'sMug But... But... But whales are cute!
 
Reminds me of my favourite joke. Guy's being interviewed, and is asked what his biggest weakness is. "I'd have to say honesty". The interviewer replies "Honesty? What's wrong with that? I don't think honesty is a weakness?!" Interviewee says "I don't give a **** what you think". — Alex yesterday
 
Hello.
 
@Emmanuel: "Does this dress make me look fat?" "Stop blaming the dress!" (sotrry. Just couldn't help it) — Burki 10 hours ago
 
@TheCoffeeCup Greetings
@Hosch250 Saw it before, always laugh at it
 
10:19 PM
First I've seen it.
Bet that guy didn't get the job.
 
<Nothing to see here, I though it was joke>
 
two consecutive days, max rep.
3
 
@TheCoffeeCup Nice!
 
Thanks.
 
Can't help but star that
 
10:20 PM
@TheCoffeeCup I'm out of stars, else I'd gladly put one on that.
 
@RubberDuck :)
 
I bet I'm going to run out soon.
 
@RubberDuck RSA
3
 
@Hosch250 I'm sure you will
 
I don't usually.
 
10:21 PM
UGH
 
Starring RSA? What?
 
@TheCoffeeCup real star applied
 
@TheCoffeeCup Don't try to understand. You won't be able to.
 
I stargreed because I'd RSA'ed too. I don't know who the other guy is, but they have no right to.
 
@Hosch250 So, you stargreed?
 
10:22 PM
@RubberDuck I know, I've done some RSAs. But why are people starring the RSA message?
 
@TheCoffeeCup I did because I RSA'ed too.
 
I don't know who the other guy is, but they have no right to because they didn't RSA.
 
@RubberDuck I just need some help a little. To know that I can delete my question as soon as someone has answered the question. — J.G 3 mins ago
WTF? ^
 
@RubberDuck Wow. Just wow.
 
10:24 PM
It's always September somewhere I guess.
 
0
Q: C++ histogram, create a histogram depending on user input

raheem khanI wrote this code but it seams it doesn't create a histogram how I want it. #include<iostream> #include<string> using namespace std; int main(){ int Range1 = 0; // 0 to 29 int Range2 = 0; // 30 to 39 int Range3 = 0; // 40 to 69 int Range4 = 0; // 70 to 100 int Grade; // Gr...

 
TTQW
@RubberDuck nuked
 
@RubberDuck Translation, please?
 
@IsmaelMiguel September is the month when college starts (well, the end of August here).
 
Look at me, 17:30 on a Friday holiday, at work by myself, joining 6 tables to send a report to a vendor...
 
10:26 PM
In Usenet slang, Eternal September (or the September that never ended) began in September 1993, the month that Internet service provider America Online began offering Usenet access to its tens of thousands, and later millions, of users. Before then, Usenet was largely restricted to colleges and universities. Every year in September, a large number of incoming freshmen would acquire access to Usenet for the first time, and would take some time to become accustomed to Usenet's standards of conduct and "netiquette". But, after a month or so, these new users would either learn to comply with the networks...
3
 
That used to mean a rush of terrible quality on the internet until people learned the rules.
 
@RubberDuck Thank you!
 
@Mat'sMug LOL. Scared me for a sec. I thought you actually nuked it.
s/nuked/hammered
 
> A SQL query went into a bar. He walked up to two six tables and said, "Hi, can I join you?
 
@Phrancis And I'm working late to finish some crappy stuff in a table. Just annoying HTML. I should have left at 7pm and it is 10:28pm.
 
10:28 PM
@IsmaelMiguel I hate HTML tables with a passion
2
 
@Phrancis Me too, me too... But I hav to do this. And I'm so tired!
 
Contractor cheating:
> An IT contractor goes to the gates of Heaven. Very indignantly, he says to St Peter, "Look here, I was only 45 so why did I have to die? It's not fair." St Peter stares back with a puzzled frown, and leafs through the golden book. "Hey, that's odd. According to the hours you've claimed for, you're 120.
6
 
Query looks pretty clean, I think...
 
@Phrancis ... But does it rock?
 
bbiab. #Gotham is calling.
 
10:31 PM
> You have fully used your vote allowance for today
 
Either that, or he was working around the clock since he was 15.
 
^^ Why...
 
> Q: Why do programmers always mix up Halloween and Christmas?

A: Because Oct 31 == Dec 25!
 
@Hosch250 I don't get it.
 
10:33 PM
@Hosch250 I've made that joke before,
@TheCoffeeCup Octal 31 = Decimal 25
 
@IsmaelMiguel Oh...
 
Oct is also October, and October 31st is Halloween
 
@IsmaelMiguel I know.
 
A SQL query goes into a bar, walks up to two tables and asks, "Can I join you?", "yes naturally". — Guillermo Phillips Oct 22 '09 at 9:03
Even better ^
 
OK, TTQW, I can't take any more of this
 
10:36 PM
Modern versions of Windows reply, "happy was unexpected at this time", which I think is even funnier :-) — Simon Howard Nov 25 '08 at 11:27
 
I don't get it
 
Read the post.
 
Sorry, I'm stuck on "Keyboard not found. Press F1 to continue."
 
F1 is on the keyboard.
 
@RubberDuck Are you... Batman!?
 
10:39 PM
I prefer multiple inheritance. — phkahler Feb 25 '10 at 18:30
 
C:\>If you're happy and you know it, syntax error!
Syntax error
2
That's hilarious
 
@Phrancis TS
 
> I called the janitor the other day to see what he could do about my dingy linoleum floor. He said he would have been happy to loan me a polisher, but that he hadn't the slightest idea what he had done with it. I told him not to worry about it - that as a programmer it wasn't the first time I had experienced a buffer allocation failure due to a memory error.
Is it bad that I lost? — Cyclone Aug 14 '09 at 15:24
 
Damn, this is scarier than actual Russian roulette. At least with the real thing you don't have to deal with the consequences. — Manos Dilaverakis Nov 11 '09 at 16:22
 
> Stallman: "God told me I have programmed the best editor in the world!"

Torvalds: "Well, God told me that I have programmed the best operating system in the world!"

Knuth: "Wait, wait, I never said that."
 
10:50 PM
God, I'm tired!!!
 
> ASCII stupid question, get a stupid ANSI
 
@Hosch250 I don't get it
 
Ask a stupid question, get a stupid answer.
I giggled at the 'useful deadlock' one, even though it was naughty.
The lawyer says he needs a mistress and the doctor says he needs a wife.
 
A matress and a life misspelled?
 
The programmer says he needs both because when he isn't with the one, they will assume he is with the other, letting him spend time at the lab.
 
11:01 PM
> Q: Why don't jokes work in octal? A: Because 7 10 11.
Time to go home!!!
 
SQL: Pulling the trigger seems to take forever until you spend a good long time understanding how to join bullets with feet. — SingleNegationElimination Feb 22 '09 at 4:39
> A good programmer is someone who looks both ways before crossing a one-way street. ~ Doug Linder
So true.
 
11:28 PM
So, I have ideas for reworking the api, would asking the same question with the updated api be wrong?
Feels strange but editing an answered question must be worse
 
Editing an answered question isn't allowed.
A followup is perfectly fine as long as it is changed.
 
yeah very reasonable
I'll remove the composite format thing, maybe change it to "{0:F1} {1:mm}"
But I'll add an enum SymbolFormat { HatPower, SuperScriptPower, Fraction, Name, BaseUnits }
nice o avoid having to type unicode to get unicode results
 
-1
Q: read the information of the graph from file

guesteasI don't know why my code is't working, this code suppose to take the name of the text file then read the information of the graph from it.(this is't the full code) void graph(node* G[], FILE *fp){ int index; int n; fscanf(fp, "%d", &n); for (int i = 0; i < n; i++){ G[i] = new node; // creat ...

 
11:44 PM
Still the beta image :(
 
@Hosch250 You see a beta image? I see the non-beta.
 
Yup. Most people see non-beta now, I think.
 
What is the non-beta image?
 
^^ That's what I see.
 
11:53 PM
Shoot.
 

« first day (937 days earlier)      last day (3083 days later) »