« first day (509 days earlier)      last day (3487 days later) » 

@Phrancis you mean votes right? ..or you want someone to award it a bounty?
Er yeah, votes
Been a stressful day
Have I ever told you how much I hate VB?
9:19 PM
Q: Excel Data Collection Sheet

Faizan RazaI enter monthly payments in one sheet with the voucher codes. I then enter each voucher in front of each member manually in another sheet. Is there a way that if i enter in one sheet of voucher records, the other sheet with the score of member payments gets updated automatically. Do tell me if a...

Regex for Letters Numbers and spaces. anyone? I keep searching Google but they throw other stuff in there..... ugh!
@Malachi the regex depends on (a) what regex engine you're using, (b) what you consider to be a “letter”, a “number”, and a “space”, and (c) what you're trying to do with such a regex.
Monking all.
@Malachi [\d\s\a]
@rolfl Monking :)
@amon ASP.NET Upper and lower case letters and 0-9
9:27 PM
@rolfl Could you pin my link to the CppCon2014 slides? It may help people to reading interesting stuff when they are bored :p
When I have to write a regex I find very helpful to play with http://www.regexr.com/
Write your regex, write some test cases and see live what matches
@Malachi ah, but only ASCII letters or the whole Unicode bunch (I'm not sure what .NET exactly supports). In case of ASCII, [a-zA-Z0-9 ] matches a character as you specified.
I need first and last name or username
which could include numbers.
@Morwenn Pinned, but.... "interesting" is.... subjective.
I skimmed through the first set of slide (0xBADC0DE) and the NASA ones. Quite interesting and luckily without heavy code details. After a day at work refactoring some very old code and not knowing much C++ it would have been too hard
9:29 PM
@rolfl Well, I know, but it is not the first time this week that I have to share them ^^"
[a-zA-Z0-9 ]+ works
I came up with 33165 for Project Euler #1, does that sound right?
Wait, no that's wrong
(sanity check time)
@Malachi for usernames, an ASCII constraint can be sensible. For real names, please please please allow arbitrary unicode (see also: falsehood programmers believe about names)
@Malachi That maybe works for one set of 'character', but, what about é
And, what about _ or -?
then, what you have is [-_\w\d]+
Also, you generally want to assert that the string contains no forbidden characters … which is why you want to assert that a regex such as /[^a-zA-Z0-9 ]/ (ASCII) or /[^\p{L}0-9 ]/ (Unicode) fails.
9:33 PM
will any of those be inserted into Active Directory on the regular?
I am basically searching an active directory of first and last names. the name is split by a space.
but I don't want people inserting symbols at this point
@amon Number 40 is great.
> In Germany, the over-educated go by names such as “Prof. Dr. Dr. Hans Schmidt” – a professor with two PhD’s.
Found the bug... I had used && in my if statement, instead of || beginner mistake :)
@Morwenn yes. for example, the Borg don't have names, they have designations ;-)
cough cough <--- that question from a few days ago did not get enough eyes on.... just saying pimp-cough ... cough
40 views in 3 days... huh
9:39 PM
Is it related to your answer having no upvote? :D
Not at all.... cough cough.
See, the thing is, it would be my only not-upvoted answer, and I would wonder if it was low-quality.
@rolfl That's a nasty cough. If you're coughing up blood or links, you should definitively see a doctor.
Reading the CppCon2014 slides, it seems that some people just wrote their slides on the fly during the convetion. Some are even able to reference other talks of the convention.
9 views from Eric Lipperts Blogs on my Blog lol
$word = 'INCOMING!';
print "@CaptainObvious: " . $word;
9:54 PM
Q: How to make the program exit when a user presses 0

user53801#include<stdio.h> #include<conio.h> #include<stdlib.h> int numPositive(int x); int numNegative(int y); int main () { int x; int y; numPositive(x); numNegative(y); x = getchar(); if(x == '0') { exit(0); } printf("The end."); return 0; } int nu...

Q: Project Euler #1 in PHP

PhrancisThe code below works & as far as I can tell the result is correct. Would you please review and let me know what I could have done better? I tried to use variables as much as possible, that way it could easily be adapted to using other numbers instead of 3 & 5. I learned quite a bit just writing...

It's a pretty tiny script, hopefully you guys find some stuff in there to critique :)
And... I got @Jamalized lol.
good night
Night @Christoph
10:11 PM
Ugh, one of the talks is about "Want speed? Unlearn abstraction". It is hard to see all your beloved abstractions broken into pieces and converted back to good old cache-friendly C code.
@Morwenn sometimes you need to trade abstraction for speed, unfortunately. What really matters in that cases is to keep the code optimised for speed to the bare minimum and to try to maintain a good design
@mariosangiorgio Caches make our life harder.
@Morwenn out of curiosity, do they mention what application they optimised and what is the speedup they gained?
@mariosangiorgio Yeah, it's for video games. They even analyze the generated assembly.
@Morwenn on the same topic, have a look at this website/book gameprogrammingpatterns.com/optimization-patterns.html
10:23 PM
It's the data-oriented programming talk. Strikes right where it hurts.
@mariosangiorgio It seems that I already read the "data locality" part some times ago.
@Morwenn I think sometimes last year it got a bit of popularity. And IMHO it was well deserved
Is it claiming that data is the center of gravity?
Something like that.
I cried enough for tonight. I'm going to sleep. See you soon :)
Bye. I'm off too. See you!
10:38 PM
Bye @mariosangiorgio @Morwenn
Hm. Just found out my Euler answer is wrong. Crap.
I shall temporarily delete the question until I have the correct answer.
Well, I can't since it's got an answer. The answer seems interesting, except I don't understand hardly any of it because I suck at math right now...
I realized I apparently misread the question. Wish it were worded a little more clearly. I flagged it to be closed until I can edit it to work correctly.
11:14 PM
A: Reading and Parsing JSON from a Game Server

nhgrifA good starting point for any question regarding Objective-C will always be the official Apple documentation on the subject, and in this case, more specifically, we want this page: Reading from Input Streams. There are a few things about reading from input streams that you miss here. First, we...

@Phrancis what's wrong with the code? is it $index <= $endingIndex instead of $index < $endingIndex?
I don't think so. The problem is that I checked the answer on Euler and the answer is wrong. I did not know that at the time of posting, because I couldn't check.
right, but i think it's an easy fix (i think it's just that you want <)
Well, maybe it is. Let me try it.
11:20 PM
well what's the expected answer?
Sure enough, that's all it was! Let me edit
Did not pay attention to "below 1000"
I fixed the code by replacing $index <= $endingIndex to $index < $endingIndex newbie mistake! — Phrancis 12 secs ago
@mjolka here have a star lol.
@Phrancis thanks! and congrats on solving it!
Gotta start somewhere lol. Thanks
From the answers so far, you'd think this is Math.SE lol. I keep seeing that epsilon symbol, is there something I can read about what it means in math?
11:42 PM
yeah project euler is heavily maths-based (from my understanding). you mean the E-looking symbol?
Summation is the operation of adding a sequence of numbers; the result is their sum or total. If numbers are added sequentially from left to right, any intermediate result is a partial sum, prefix sum, or running total of the summation. The numbers to be summed (called addends, or sometimes summands) may be integers, rational numbers, real numbers, or complex numbers. Besides numbers, other types of values can be added as well: vectors, matrices, polynomials and, in general, elements of any additive group (or even monoid). For finite sequences of such elements, summation always produces a well...
np :)
oh! there's another site you might like codeeval.com . the questions there are less maths-based
OK I'll check it out. Never been thoroughly interested in math (says the database guy)
11:45 PM
yeah, unless you really love prime numbers and prime number algorithms and ... prime... everything ... i don't think PE is that much fun (i don't find it fun)
Q: My API factory for a realtime chat site

JamerTheProgrammerapp.factory('apiFactory', ['$http', function($http){ var apiFactory = {}; apiFactory.initUser = function(){ return $http({ method: "POST", url: "api/new_user.php", headers: {"Content-Type": "application/x-www-form-urlencoded"} }); ...

I don't particularly... more interested in decimal and datetime stuff :)
They seem a lot more useful in the business environment!
> Problem: Calculate quarterly earnings using multiples of prime numbers.

« first day (509 days earlier)      last day (3487 days later) »