« first day (415 days earlier)      last day (3900 days later) » 
00:00 - 14:0014:00 - 00:00

00:00
"operand of a binary infix operator has an unknown type" WTF Code Hunt?
@Novo - if you're worried about your code being presentable...... don't stress too much
I am not certain what the expectations are for high-school students, but I would rank your code as at least as good as many university students' work.
If the app works, and the code is as well-structured as what your code appears to be, you should be more than satisfied.
Morning all
I didn't know we migrate questions from Code Review to Overflow :)
Evening @Mehrad
@Novo The monkey (rolfl) has a point, for being high-school student, it's very good.
@rolfl @SimonAndréForsberg Thanks for the feedback, that's certainly encouraging. Hopefully with the fixes I've made, it'll look polished for the interview
@Novo Going on a job interview, are you?
00:15
@SimonAndréForsberg Correct :)
@Novo Best of luck to you then :)
@SimonAndréForsberg Thank you! If all goes well, I'll be sure to let you and @rolfl know
00:38
TTGTB
Night folks
Good night
01:16
Hey all!
01:39
0
Q: Element index that has the highest value in Java

TylerSo I need to find the highest interest rate for a silly banking program I am working on. I have created a method to find the highest rate by searching through the element index. What I am having issues on is (probably quite simple) getting this highest rate to be displayed.. The issue is towards ...

0
Q: jQuery random image placement with no overlap: How to handle small viewports?

mhulseGoal: Randomly place images on full page and avoid overlap. Resize of viewport, or smaller screens, will re-position images and/or degrade gracefully. Live demo: Here's what I got so far: http://jsbin.com/fugopo/1 It's rough. I didn't want to spend too much time honing code until I found a ...

0
Q: Platform independant thread pool v3

Tom MylesThis is a continuation of this question. Taking the advise given previously, the deadlock was fixed in the non-yielding code. The next problem comes from the suggestion to make the interface, now renamed enqueue_task able to handle more generic tasks. The goal was to have the ability to return a...

@AlexL Hey!
01:55
@Jamal And how are you?
I'm okay. Haven't done much today. You?
Oh, my in-home server is acting up... Creating some difficulties I'd rathe rnot have
0
Q: How am I supposed to write a tree (S-Expression) pretty printer for binary trees in C?

DokkatOK, I feel like I am doing something really wrong here. I'm just trying to create a binary tree, and a pretty printer for it. My approach is looking so bad I can't even... #include <stdio.h> typedef unsigned long Leaf; struct NodeStruct { struct TreeStruct * left; struct TreeStruct * r...

02:23
0
Q: POST security with PDO?

user2981256So I have some code that works as PDO. But is it secure? I'm trying to prevent SQL injection. This is my first PDO script and was hoping to see if it was done correctly. Here it is. <?php echo 'Your query code has been submited'; $host = "localhost"; $pass = "root"; $user= "root"; $dbname = "u...

02:58
0
Q: Project Euler Problem 18 (Haskell)

csnateI've implemented the solution to Project Euler Problem 18 in Haskell and I'd like to get some thoughts on my implementation. Its the dynamic programming solution, working from the bottom up. http://projecteuler.net/problem=18 I believe its correct, but with Project Euler being partially down, ...

@CaptainObvious Looks like Project Euler is back up.
03:26
My Bejeweled question on SO has received a random upvote, and ugh, I'm reminded of the horrible code I used to write (mainly **board) before learning about storage containers.
03:42
every programmer ever, looking at stuff they wrote 6 months ago: "what is this crap?"
3
I guess I just don't do it often enough.
@Yuushi - it's more like: WTF - who wrote this crap? Oh, me.
@rolfl Yeah, there's that too
just saw Loki's comment on JerryCoffin's question, and am again reminded just how much more I need to learn about iostreams in general
My big fear is that some Java guru really will come to code review
it's good having people around who know more than you - makes it easier to learn things
03:50
wise man says: bed time
@rolfl g'night
1
Q: Merging time series

brooksbpIs there a better way to do this? A time series, data Model a where Variant :: [(Day, a)] -> Model a deriving (Show) ... where type a in [(Day, a)] basically represents the "total balance" e.g. bank account. Some example data, day1 = fromGregorian 1987 10 17 day2 = fromGregorian 1987 1...

04:22
0
Q: Optimization while mixing c style strings with c++ strings

nightshade#include <cstdio> #include <set> #include <vector> #include <string> using namespace std; int ordemup(char* s1, char *s2, char *s3) { if(s1[1] == s2[1] && s1[1] == s3[1]) { if(s1[0] < s2[0] && s2[0] < s3[0]) return 123; if(s1[0] < s3[0] && s3[0] < s2[0]) return 132; ...

05:08
0
Q: Implementation of merge sort and bubble sort

splashinnI'm new to Go and looking for a review of my merge sort and bubble sort implementations. What can be done better? Can my code be cleaner/clearer? // algos.go // (C) 2014 splashinn // Implement two types of sorting algorithms; merge sort and bubble sort package main import ( "fmt" "ti...

06:01
0
Q: Concatenate row values when grouping in SQL

ChathurangaIn a SQL query I'm trying to do two things. I have a table Attendance like this TABLE EID | PID | In_Time | Out_Time | Shift __________________________________________________________ 100 | S001 | 2014-05-01 07:10 | 2014-05-01 19:20 | D 100 | S001 | 2014-05-04 07:00 |...

morning @all
06:23
@CaptainObvious Someone experienced with SQL may want to look at this.
clearly not code what is right. more for SO
Now the OP may end up deleting it.
07:11
0
Q: How can I make a controller thinner?

Bruno RodriguesI spent a lot of time doing Go Horse Extreme programming , but now I want to be a better person :) How can I make this method smaller, better, more OOP? /** * @return \Illuminate\Http\RedirectResponse */ public function store() { if (!User::is_valid(Input::all())) { Flash::er...

07:24
Is this really a serious method name? RemoveSmallerLengthNumberListsThatContainSameNumberCombinationAsLargerLengthComb‌​inations :)
2
oh and evening ...
07:39
0
Q: Ignore exceptions when changing column formula in Excel table

KersijusThe new table feature on Excel is excellent and you can specify a column formula as well as exceptions on the column. However, if you want to change the column formula, Excel will rewrite the whole column including the exceptions. I've tried to avoid this issue with the following code: Private S...

 
1 hour later…
08:40
Monking
@dreza For an unit test method it would be... acceptable
So... this webserver only accepts charset=UTF-8, but not charset=utf-8
0
Q: "Element not found" exception when using the Windows.Web.Http.HttpClient#GetAsync method

Jeroen VannevelI am working on a Windows Runtime Component which makes API calls. Until earlier today I used the HttpClient and related models from System.Net but switched over to Windows.Web instead to leverage the WinRT streams. Aside from changing the using statements, swapping HttpContent to IHttpContent a...

Need some great minds up here
Sorry, my mind is not great with C#
Do you think it is acceptable to ask the webservice team lead to allow charset=utf-8 as well? Currently the webserver only accepts charset=UTF-8.
@JeroenVannevel At least you have tests!
1
Q: My first jQuery plugin

chuckfinleyI am writing my first jQuery plugin that converts li tags to horizontal responsive barcharts. I am looking for some feedback and suggestions regarding the implementation. Any help would be appreciated. Here's what I have so far: The code HTML: <ul class="bar-group"> <li class="bar-group-...

08:57
@JeroenVannevel Is it possible that the uri or subsequent new Uri(uri) in ExecuteRequestAsync takes form of some bogus value? Like null or what the C# standard is
Nah I could check up to that point with the debugger: the URI is fine
It would also have given a specific HResult error code
for some reason the two error codes I get back are not defined in the MSDN page
I found one instance slightly related to your issue: social.msdn.microsoft.com/Forums/windowsapps/en-US/…
But it seems to be on an other component of the library
hmmm
I don't think I do anything in the same nature
I don't know what the HResult is trying to tell you though
Like if that number (albeit not listed on known error codes), does actually mean something
C# source is not open source, or is it?
Good idea; guess I'll jump in there
09:03
That's what I do in Java usually... Though it has great integration with IDE's, I spent quite some time looking around in source
Bah
The Windows.Web components are not in there
Great..
They're part of WinRT, no .NET
My outer exception is in there: COR_E_EXCEPTION
my inner one isn't
I'm on its tail
lol
> "ERROR_NOT_FOUND (0x80070490)"
My error is "ERROR_NOT_FOUND"
3
@JeroenVannevel Really... damn
 
1 hour later…
10:37
320 mugs on the wall
Monking @SimonAndréForsberg
@rolfl Are you and I not already here?
Hey @skiwi
10:51
0
Q: Python Multiprocessing: Using mutable ctype arrays seems to work, yet I am not seeing significant speed-up. Why?

JSKAs a brief introduction, I am student working on a body of code which forms part of my Masters' research - this is my first question on SO. My background is in physics and mathematics, so I will accept any and all criticism of my code. I am looking to optimise an algorithm. Currently I am investi...

0
Q: TypeScript definitions for Server-Sent Events

yankeeI could not find any definitions of the EventSource object that belongs to Server-Sent Events, so I create the definitions. That's how they look like: declare var EventSource : sse.IEventSourceStatic; declare module sse { enum ReadyState {CONNECTING = 0, OPEN = 1, CLOSED = 2} interfac...

Fun fun...
0
Q: Charset issue in JAX-WS RI

skiwiI am using the JAX-WS RI, with files that have been auto-geenrated by Netbeans via File > Web Service and then entering the WSDL. The problem I am having is that the JAX-WS RI always attaches this header to the request: Content-Type: application/soap+xml; charset=utf-8;action="urn:getOrganizati...

It is hard to communicate to the other department of the company that I cannot change the charset=utf-8 to charset=UTF-8... Probably it is not an easy fix for them to accept the lowercased version as well
lol just funniest thing here at work
one guy added a group to sent an email (in group approx 22k people) and sent email
a lot of people react to that mail with reply all => mailservers down :p
Wow... :p
someone is gonna smoke a sigar
11:08
@skiwi It's not Friday!
@SimonAndréForsberg monking, how is code hunting going? :p
@chillworld Bah! Level 01.14 stinks!
need help?
@chillworld My wife is a teacher... and they regularly DOS their own mail server when someone sends an e-mail (often with like 1MB attachments), and, 10,000 people respond reply-all (with attachements). "Please don't e-mail these things to me!"
11:11
@SimonAndréForsberg This site helped me alot when I was stuck : davidbond.net/2014/05/…
Can't see solutions atm (browser not supported, updating FF now)
oke I can give answer if you want
@rolfl idiot's are all around the world :p
I got it. I saw the solution on the link you sent
what you got as solution?
(10 + x) % x
01.15 with THREE variables? That's it, I'm out!
11:18
Isnt (10 + x) % x always = 10?
@ckuhn203 no
(10 + 2) % 2 = 0
10%x I have
Ahh. Cool. I thought something seemed funny.
I don't understand this... How come that the JAX-WS RI stack (client for sending webservices) cannot send any other than charset=utf-8
@SimonAndréForsberg return (x+y+z)/3; for your 15
11:22
@chillworld You have no idea how stupid I feel right now...
@SimonAndréForsberg I do know it, searched that one a long time
I should check on that site as well once
@ckuhn203 Why don't I see your avatar?
Oh it's from facebook
Why the hell is your avatar from facebook?
Hi, @GhostRider
Hi 200, thanks for taking some time, greeting from London
11:26
Sure, no problem.
@skiwi No, you shouldn't. Avoid it. It's for your own good.
I'd just like to point out that sometimes, what's clear in your mind doesn't get communicated clearly, so I'd like to see if we can work out your question(s) a bit.
Did you get a chance to read this answer yet?
1
A: String sanitisation function

200_successJudging from your phrase "ways to secure an input string", I suspect you may have a misconception about security. A string contains data, and it makes no sense to call a string "secure" or "insecure". Rather, security depends entirely on what your code does with the string. As extreme hypothet...

What can I do to improve this question. I must say, admittedly some of my questions may indeed be very basic. I am a doctor and have been programming for 9 months (now I see, you say!).
@SimonAndréForsberg Whyyy
I understand.....its a matter of context - whats going to happen next with the string....
11:29
No problem. We're here to help programmers of all levels… as long as the questions contain working code and are reasonably understandable.
@skiwi You will just feel stupid when you're stuck.
@GhostRider You had my curiosity, now you have my attention. I vaguely remember helping a dentist starting to learn web development. Is that you?
So, on my site, Doctors are posting questions just like stack, and can add new categories as needed but this is central to the site, as questions are organised by categories so if this goes wrong this go awry
Not me Madara.....I'm an academic (Professor of Cardiothoracic imaging)
@GhostRider Try to adopt this way of thinking: Every time information moves from one point to the next, what are the attack vectors?
What can someone evil do to me?
Understand
11:31
Before you enter it to the database, it could be SQL injection, solved by prepared statements.
If you send it and generate JavaScript with that info, it could be XSS, solved by json_encode()
My site used PDO fully with place holders as suggested.
Sorry uses...
If you send it and generate HTML with it, it could still be XSS, solved by PHP's HTML escaping functions
Madara is basically saying the same thing as the String Sanitisation answer I quoted above.
Yes
The "security measures" you apply on a piece of information, is dependant on the context in which the information is used.
This is cool to get this help.But with a regex surely that prevents anything "other", no?
11:32
There's no point in doing HTML sanitation if you aren't going to use the string in HTML, for example
@GhostRider It could, or it may not.
Regex can be broken.
I got the impression you are forcing the user...
I am.
I most definitely am forcing the user to fit my demands.
Really....interesting. I need to force the user to comply to my demands too....
When you register to a site, and the site demands that the username would be all alphanumeric characters without spaces or other characters, you don't expect the site to strip away everything it doesn't like, you expect it to return an error and tell you "No! Fix it!"
So whats the buckles and braces approach. There can be no (almost no) room for error for me in this part of the site....
Ok Mandara, but that brings us back to regex no ....a carefully crafted regex...?
11:35
Also, consider why you want certain characters or strings to be illegal.
Apologies, Madara.
For example, if you're asking a user to enter an e-mail address, then it makes sense to do a sanity check.
@GhostRider A regex to validate, and before you output the string to HTML, you sanitize with PHP's built-in functions.
11:36
Well 200, I have been assuming to prevent a cunning attack via string manipulation of some kind. I am assuming the hacker is cleverer than me....
validation and sanitation are two different things, done for two entirely different purposes.
I prefer to avoid the term "sanitize" altogether, as it leads to confusion.
@GhostRider validation is to ensure that the information conforms to the format you expect.
sanitation is the term to take a string and make sure that you can output it in a specific context without trouble.
Also called escaping
"Escaping" and "encoding" are much better terms, in my opinion.
Agreed - I use htmlpurifier for the questions and answers section so that users can style their questions etc. But the disease category needs no style - just plain old string that may contain a hyphen or a number.
also htmlpurifier.....opinions?
11:38
@SimonAndréForsberg occupied with the second level?
@GhostRider Don't allow for HTML.
That's what I do. Allow for markdown or some similar syntax
And transform it to HTML when outputting.
Really? hmmm...I don't understand.....could you give an example...
May we step back for a minute...
Of course...
0
Q: Regex validation for Email Address

IdothisalldayI need to validate whether my regex is correct for below scenario. Suggestion's if the regex is correct: Wiki Link Local_part The local-part of the email address may use any of these ASCII characters.[4] RFC 6531 permits Unicode characters beyond the ASCII range: Uppercase and lowercase Engli...

11:39
Where is the input coming from? An <input> field in a browser?
Yes....input field
Hmm. Coincidentally somewhat relevant question just came in. Anyway...
Saw it....
How would HTML possibly end up in such a text field in the first place?
@200_success What kind of sanity check? If you aren't aware already, you'd be surprised at the valid e-mail addresses.
@chillworld I've closed that crap site.
11:41
I get that different types of data may need to be treated differently....e.g. email address versus a credit card number...but for this particular it need to be strict with rules on disease category
ok step back again.
@SimonAndréForsberg I know, RFC 822. Just play along for now. =)
@GhostRider The question was, would users actually type HTML into a text field?
Specifically in this input field, no HTML is allowed. I just need the string to conform to alphabet numbers and hyphen. Now, in another section I want to allow a user to use HTML to modify their input to add italics or bold etc but thats a different story. Just concentrating on the disease category input....
I remember having read somewhere (possibly in a CR answer) that for an e-mail address, the simplest and most effective validation you can do is to make sure it contains an @. Making it more restrictive than that can often be a risk of invalidating some valid e-mails.
@GhostRider What about quotes?
Someone's symptom
Sorry, yes, single quote allowed
11:44
@SimonAndréForsberg :D I should do better but here I don't find the logic
1 1 1 false
68 96 98 false
98 98 95 false
42 58 40 true
68 32 46 false
@SimonAndréForsberg You might want to just post that as an answer to the new question that just came in.
So is a regular expression to VALIDATE the incoming string to best approach?
in this particular instance I mean...
@GhostRider Yes.
OK thats the impression I have been getting from my reading....
Sure, you could do that. Personally, I'd just handle everything verbatim. Then the user will eventually see that their attempt to enter HTML into a text field resulted in garbage.
11:47
Regex is very good for validating simple strings
@GhostRider for the sake of UX, you can even use HTML5's form validation
The thing is I don't want garbage on the site. I don't want, for example a stack of crappy disease categories......I want to block them at the door
I am back. You may all run, screaming in terror.
2
The validation is really just to ensure the rejection of potentially malicious code...
I can understand blocking crappy disease categories.
But not rejecting malicious code.
As Madara and I are trying to tell you, security comes from safe string handling.
Not from censorship.
11:50
Hmm this is where my mind doesn't think like a programmer unfortunately.
@200_success Didn't see that it had been re-opened. Just posted.
OK so in your schema, are you saying that you would not censor, you would accept the input and then what...........you modify it or reject it? Yes seen HTMLspecialchars.....but that doesn't prevent non alphanumeric characters.....
Forgive me for being retarded, but 200, from user input to its end point what steps would you take.....I mean basically - input, validate with...., reject or enter in database is mine. Clearly I am seeing this the wrong way. I apologise for the time I have taken...
@200_success Sometimes it makes sense to validate though....
OK, backing up a bit...
11:54
Sometimes you want to make sure the input comes at a certain format. You want a date to actually be a date, and not something else.
The purpose of validation is to enforce business rules.
What Madara is saying I believe is what I am thinking...
It does not give you security.
So, "Disease categories can only contain letters, digits, spaces, and apostrophes" is a business rule.
You want to enforce that business rule in order to raise the quality of the disease categories that users contribute.
Right?
Yes, but where I believe I am wrong in terms of what you are saying is that I am assuming in doing that, I achieve security. If business rules are robust and the user adheres to them, then no chance of a hack.......(wrong?)
@GhostRider Validation has no impact on security. That's what 200 is saying and I agree with him
Validation is for your data to make sense for the rest of the application and the rest of the people.
11:58
Security comes from the correctness of your code.
Drats, I'm clueless. So in this case, validation could also be circumvented by an attacker?
What kind of threat are you thinking of defending against?
OK, so don't laugh. Cross site scripting for example...
@GhostRider XSS is not prevented by validation.
Don't worry, noone's laughing. We're here to help, remember?
12:00
Sometimes it does as a side effect of validation, but that's not the purpose of validation. And you can't rely on it
What does prevent XSS is htmlspecialchars().
OK. I am curious, and this to broaden my scope a little. How could someone possible get around a solid regex pattern?
Today you're validating disease names. Tomorrow you might validate math expressions that support < and >, which allows users to post html strings and pass validation.
Get around the regex for the purpose of doing what?
XSS?
Entering stupid disease names?
Madara, yes I agree but I mean just in the case of an alphanumeric, hyphen, single uote only string....
200, no, adding..............html characters. Ok I see where you are coming from. HTML special characters in this instance may be a better approach for security. But the regex pattern to enforce quality (i.e prevent some idiot messing around creating diseases with dollar signs....)....ok things are coming to me...
Am I right?
12:04
@GhostRider Correct
I would say that the primary reason for rejecting HTML special characters is that you don't want garbage disease names in your database.
validation is to enforce quality
escaping is to prevent attacks
Let's put it this way… at some other point in your web app, you're going to need to handle text areas where the user can enter arbitrary text.
Yes, for sure......its got a Q/A section...
@GhostRider So you can't apply "validation" there :)
12:08
Validation could very well reject a reasonable input string like "cholesterol > 240 mg/dL"
Correct.....there I will not use htmlspecialcharacters because I don't want to eliminate all HTML, just potential dangerous tags such a <script>.....therefore i will use HTMLpurifier (although I am told its v slow)
There will be no regex for theQ/A section.........
Is that going to be a plain text field or a rich text field?
(feel free to ask for clarification if you didn't understand that question)
200, this is where I think I am at a slight advantage........no category could be cholesterol > 240 mg/dL, but it could be Hypercholestrolaemia......
Please clarify....sounds like something I will learn from....
That example was for the free-form text area. I had moved on from the disease category discussion.
cholesterol > 240 mg/dL could be in the Q/A section under the category Hypercholestrolaemia
Got it apologies.....very good.
Proceed....
12:11
Out of the box, a web browser only supports certain input widgets.
There's <input type="text"> and <textarea>, for example.
Whatever the user types into one of those is what gets transmitted to your app.
If you want to let the user enter bold/italic text, how would you go about it?
(Do you need bold/italic support?)
Add appropriate tags......
It's not an easy task.
Stack Exchange's solution is to give you a textarea, and the user input will be interpreted as MarkDown.
Wikipedia does something similar, using their own wiki markup language.
Hmmmm. Fair point. I had read on Stack in a number of sections that users may be very irritated if they can't add bold or italics.....
When you say mark down do mean that you the entry goes into the DB with html and when outputted it is rendered using the HTML, sorry basic question...
You have to work to support rich text. Browsers are dumb.
^^^ That's what MarkDown is, and that's what Stack Exchange supports.
To achieve this is complex no?
12:17
It is a bit complex.
Alternatively, you could ask users to enter their rich text using a "safe" subset of HTML.
That's also complex.
OK so I think I will have to leave this out on my prototype.
Probably a good idea.
Once you drop the requirement for rich text support (bold/italics/hyperlinks etc.) then the security issue becomes much easier to handle.
Just escape everything through htmlspecialchars() when outputting.
Voilà, all XSS averted.
OK. I can see this is the case. Will try to keep it simple to begin with. Well, I have probably taken too much of your time. Very much appreciate the help, and now I can see why you though my question was vague, or at least reflected a lack of understanding regarding validation "sanitisation" and in my case enforcing "quality". If you need any advice on medical issues, hit me up...
No problem at all. Glad to help a fellow programmer.
Honoured.....
12:22
Sometimes we may seem harsh on users who have asked a poor question, but it seems that your question was based on a misconception to begin with, so I thought I'd try to clear that up.
Hope to see you around Code Review some more.
Perceptive. I have been harshly treated on Stackoverflow a few times....Its emabarrassing and demoralising, especially as this is a self taught skill (as a teacher myself I know that self taught skills can result in woeful bad habits, oversights and weak presumptions....) but still,...cheers pal.
@GhostRider Stack Overflow used to be a great place to learn
Today, not as much, not due to your own fault, but because your one semi-good question is drowned in the piles and piles of crap.
If you wish to learn on Stack Overflow, chat is your best option.
0
Q: One line check and assignment in javascript

Daniele BrugnaraWhat do you think about this one-line check and assignment? req.params.dv&&(options.dv = req.params.dv); // or err&&cb(err); Are those good practices or not? Thanks, Daniele.

Many thanks Madara........definitely some personalities there. But also lots of good stuff. Cheers
12:39
0
Q: Tic-tac-toe in SQL with optimal AI

200_successThe simplest introduction to this code is to play it! Here's an SQL Fiddle. However, to enjoy it fully, you'll need a more interactive environment, like the psql command prompt. If you don't have PostgreSQL installed already, this may be the killer app that makes you want to install it. Capab...

@GhostRider Taking the HTML apart and then constructing a program that acts like a browser, but circumvents all of your validation rules.
Hi everyone!
12:59
0
Q: Recursive implementation of palindrom string checker - refactoring issue

MulderI've tried to refactor my program to single return statement at the end of the program however it ruins the end statements of the recursion. because I want to return from function in specific line and not in the end of function. Any suggestions how can this code can work and elegantly designed t...

There is readily available site hacking software that does that kind of thing quite easily.
monking!
I just plugged XKCD #208 in an answer :)
Wait, forgot to escape a space.  Wheeeeee[taptaptap]eeeeee.
3
@SimonAndréForsberg +1 too :)
@ckuhn203 lol
13:15
=)
monking
I don't know if I completely agree with Simon though. You could be a little more complex than contains("@"). I would want to check for at least "[email protected]". But the best thing to do is use a library instead of trying to roll your own.
Hey @Mat'sMug and others
When you start the new job Mat?
@ckuhn203 OP's regex fails with simon.andré[email protected]
13:18
@ckuhn203 The problem there is to define "some chars", but if you want to make sure that there's at least one char before and after the @, then yeah
@Mat'sMug Is é allowed in e-mails? (it probably is)
I searched, and it should be. Although some websites that use regexes to validte email addresses might not accept it ;)
arrrg fuck you codehunt by letting me feel stopid
3
Very true @SimonAndréForsberg. I'd want it to be a very broad definition of what "somechars" is.
@Mat'sMug 270 mugs on the wall, you'd better buy more mugs soon.
@chillworld told you!
@SimonAndréForsberg told you!
13:21
@SimonAndréForsberg SMTP is designed to work over 7-bit transports.
@ckuhn203 July 7th
@SimonAndréForsberg can you see the logic?
Most exciting. Grats again.
Therefore, all non-ASCII characters have to be MIME-encoded.
And non-ASCII characters cannot appear in e-mail addresses.
@chillworld I don't do C. I can try to Java the logic though. What question?
13:22
non-ASCII domain names would have to be encoded using Punycode.
@ckuhn203 FYI if I remember correctly "somechar@somechar" is a valid email address
1 - 3 => false
2 - 3 => false
2 - 4 => true
791238781 - 1554001161 => true (and hint on the site square equality)
Really?!
@SimonAndréForsberg I do java also :p
13:23
What kind of nonsense is that? Lol
I would need to verify again but pretty sure
I guess I've learned my new thing for the day.
@ckuhn203 the day has only just started ;)
@Marc-Andre Indeed it is. @somechar can often be used for local servers.
@Mat'sMug No, it's been going on for 15 hours and 25 minutes.
@chillworld return Math.random() >= 0.5;
13:25
@Mat'sMug that's my quota. Going to the lake today. Unplugging for the day.
@SimonAndréForsberg well I'm writing that now :p
enjoy!
Planning on it. I'm about to go around the house waking everyone up. Lol
@SimonAndréForsberg Java API Method random is not supported
@Mat'sMug Thanks!
13:28
@200_success awesome tic-tac-toe you put together there, ...I feel like putting a bounty on that one! :)
I was going to write something like that to solve , but then @Phrancis asked a question about .
In the end, the easiest way to answer that question was with another question.
@chillworld Then that site doesn't support it's own algorithms.
Still waiting for an Ultimate TicTacToe implementation in :)
3
@200_success I love that you added an AI to the TTT.
@Mat'sMug If I knew SQL better, I would have done it already!
@SimonAndréForsberg I know!
13:32
Perhaps I'll make a clone of Magic: The Gathering with SQL instead?
.... or not...
This question needs more votes btw, unless the Mug is already out:
1
Q: Recursive implementation of palindrome string checker - refactoring issue

MulderI've tried to refactor my program to single return statement at the end of the program however it ruins the end statements of the recursion. because I want to return from function in specific line and not in the end of function. Any suggestions how can this code can work and elegantly designed t...

0
Q: Chunk Generation Performance in C#

user3765908I'm working on a game in C#, this game generate new chunk (infinite) when you move around. If have in my list > 1000 chunks it become laggy but I only load the necessary chunks on my screen. Tried all things to improve the code but nothing new :S. Stopwatch ChunkDetect = new Stopwatch(); publi...

13:46
some stuff that is almost "nice"
8
A: Justification of my current approach and possible suggestions about alternative to a Grid in a StackPanel form for an easier way of inserting new rows

BenVlodgiWPF readability To keep your xaml looking clean, I reccommend using self closing tags <RowDefinition /> vs <RowDefinition></RowDefinition> Explicitly set properties instead of using the > content area < of a tag. Doing such more explicitly shows what the content is used for. <Label Grid...

9
Q: Tweets per second, using linked list

BenVlodgiThis is a TalentBuddy Challenge Your task is to write a function that prints to the standard output (stdout) the highest number of tweets recorded between each second in the array and the past windowSize seconds before it Note that your function will receive the following arguments: ...

;)
Also almost nice (and still unanswered!)
9
Q: Analyzing Minesweeper Probabilities

Simon André ForsbergCalculating probabilities in Minesweeper might sound like an easy task, but I've seen so many probability calculators that's either incorrect, horribly slow, or with ugly code (or all of them) so I have to share my code for this. This code is used within my Minesweeper Flags online game by the A...

@SimonAndréForsberg Nice!
Thanks, Santa @skiwi
00:00 - 14:0014:00 - 00:00

« first day (415 days earlier)      last day (3900 days later) »