« first day (817 days earlier)      last day (4138 days later) » 

12:08 AM
@James it's in the bottom bar in VS.
 
@Pheonixblade9 I can't see, when I click console I get a text bar. Is this the same thing?
I've actually resolved me issue without needing the watch, however it sounds very useful so I'm trying to understand it anyway.
 
Anyone on here ever taken the A+ exams?
 
@JABFreeware You got your SQL questions answered or still wondering?
 
no, but a few of my friends have, said they were pretty easy
 
thats good, I'll be taking mine a couple of days

Any hints or anything?
 
12:14 AM
Go sober
 
@CCInc just wondering what the dif is between a paramater and how it protects anything
@TravisJ I always am
 
Ah, OK
I'll give you an example
from my code
This is use of parameters:
mycommand.CommandText = "insert or ignore into moz_places" +
                        " (id, url, title, visit_count, frecency, last_visit_date) values (@dbID,@url,@title,@visit,@frecency,@time)";
dbID = getLastHistoryID("moz_places") + countPlaces;
mycommand.Parameters.Add(new SQLiteParameter("@dbID", dbID));
mycommand.Parameters.Add(new SQLiteParameter("@url", mark.url));
mycommand.Parameters.Add(new SQLiteParameter("@title", mark.title));
mycommand.Parameters.Add(new SQLiteParameter("@visit", frequency));
Now
 
When you use a parameter, the value of the parameter is no longer included in the command, and thus cannot be executed.
 
This is use of not parameters:
mycommand.CommandText = "insert or ignore into moz_places" +
                        " (id, url, title, visit_count, frecency, last_visit_date) values ("value","value","value","value","value",)";
What will happen is that they can actually ADD stuff TOO your command if you let them:
In most cases, they will add an escape sequence
 
@CCInc realy!
 
12:18 AM
So what will happen:
 
is there an example online that I can see?
 
They will, instead of inserting "value" etc, they can do this:
<sql_comment> "malicious value", "bad value" etc
Becasue of the comment all of your code will be nullified
 
I might be a little late, but reverse lambdas made me laugh.
 
@CCInc Okay this is what I dont understand:
 
Plus what @TravisJ said
 
12:19 AM
How can they ADD stuff to your code?
 
OK, I'll find an example
 
how can they change that value to something bad
?
 
By adding a comment
It's like umm
this C# code
var something = /* normal code comemnted out*/ OTHER CODE;
See, they COMMENT OUT your code
 
Eve
Is there a way to find which was the 400k'th C# question?
 
And thus THERE code is executed
 
12:21 AM
@CCInc I follow how the comment and add what i mean is HOW HOW HOW they are able to change code. Isnt it compiled?
 
Not Found

The requested URL /techtips/sql-injection.htm was not found on this server.

Apache/2.2.3 (CentOS) Server at www.unixwiz.net Port 80
 
lol' AND 1=(DROP TABLE *);
 
Eve
Ah, seems to be this one.
0
Q: ArcObject IWMSServiceDescription.get_LayerDescription C# error

ZaneMy goal is to connect to a WMS Service and display a layer on my application's map using ESRI's ArcObject API for .NET. Here is the part of my code I am struggling with: ... String url = "some value"; String layerTitle = "another value"; ... PropertySet props = new PropertySet(); props.SetPro...

 
12:21 AM
did someone perform an injection? :D
 
Yea, what Travis did is an example
 
@CCInc Now i see!
Okay
Got it
THanks
So how programmaticaly do they avoid that with parameters?
 
SELECT data
          FROM table
              WHERE Emailinput = '$email_input';
hacker@programmerinterview.com' is what is entered
SELECT data
      FROM table
         WHERE Emailinput = 'hacker@programmerinterview.com'';
Now, what would happen if the SQL above is executed by the application? Well, the SQL parser would see that there is an extra quote mark at the end, and it will abort with a syntax error.
6 mins ago, by Travis J
When you use a parameter, the value of the parameter is no longer included in the command, and thus cannot be executed.
 
@CCInc so thats how it works?
But cant that be fooled if you are really clever?
 
Well, instead of the extra quotation mark, they COULD do this to NOT get an erorr:
Y';
     UPDATE table
      SET email = 'hacker@ymail.com'
      WHERE email = 'joe@ymail.com';
@JABFreeware What do you mean?
 
12:24 AM
@James sorry, went to talk with our architect. The immediate window and watch window are very useful, go look em up on msdn
 
Please vote for this site
3
Parapsychology

Proposed Q&A site for the study of apparent paranormal phenomena.

Currently in definition.

 
@CCInc never ind stupid question
 
@CCInc I think he means if you put something like ";DROP TABLES" in the email
 
See, and that's why you don't want your app being sql injecteed
 
@Pheonixblade9 yeah kind of
 
12:25 AM
@CCInc when you "parameterize" SQL stuff it means you do this: codinghorror.com/blog/2005/04/…
 
See that JAB ^
 
bad SQL:

SELECT email, passwd, login_id, full_name
  FROM members
 WHERE email = 'x';
slightly better but still bad:

SELECT email, passwd, login_id, full_name
  FROM members
 WHERE email = 'x' OR full_name LIKE '%Bob%';
best:
SqlConnection conn = new SqlConnection(_connectionString);
conn.Open();
string s = "SELECT email, passwd, login_id, full_name " +
  "FROM members WHERE email = @email";
SqlCommand cmd = new SqlCommand(s);
cmd.Parameters.Add("@email", email);
SqlDataReader reader = cmd.ExecuteReader();
 
Yay for parameters
 
@CCInc I see now
Who invented them?
anyone know?
 
@JABFreeware who invented what?
 
12:27 AM
You doing like a history essay or something? :P
 
@CCInc LOL just curious
 
@zneak any word from graphics guy?
 
@JohanLarsson is that me?
 
@JABFreeware yes I guess but there are also others
 
@JohanLarsson What can I do for you?
 
12:31 AM
@JABFreeware I was checking i zneak had made progress with his nasty bug
 
@JohanLarsson what bug was that?
 
@JABFreeware it was something advanced with the graphics card overwriting memory
@Eve you there?
 
Eve
Yes
 
@JohanLarsson I dont quite follow you :)
never mind!
 
I have shut down VS, can you try the hashset<long> and add int.minvalue, int.maxvalue and int.maxvalue +1 and count elements?
 
Eve
12:36 AM
I'm not sure I understand.
 
My thinking is that if the hash is int32 that would give a collision
 
@JABFreeware - In 1996, Andrew Eisenberg introduced parameters to SQL.
 
@TravisJ Who cares?
 
Eve
@JohanLarsson Something like this?
var set = new HashSet<long>();
            foreach (var n in Enumerable.Repeat(0, int.MinValue))
                set.Add(n);
            foreach (var n in Enumerable.Repeat(0, int.MaxValue))
                set.Add(n);
            set.Add(0L);
            foreach (var n in Enumerable.Repeat(0, set.Count))
                set.Add(n);
 
@JABFreeware you?
You asked who invented them. (see the arrow)
 
12:38 AM
LOL
LOL LOL LOL LOL
 
@TravisJ But you are saying who Introduced it
 
@Eve no I was thinking just adding three longs this time
 
(not really, of course)
 
Eve
Oh, adding the longs, okay.
 
And by introduced, I mean he wrote the standard into SQL.
 
12:39 AM
Half the time the true inventor doesnt get to introduce his inventing
 
Look him up if you are curious, pretty accomplished guy.
 
@TravisJ K
 
Eve
var set = new HashSet<long>();
set.Add(int.MinValue);
set.Add(int.MaxValue);
set.Add((long)int.MaxValue + 1);
var c = set.Count;
Is that what you meant?
 
Eve
If you're interested in c, it's 3.
 
12:41 AM
ok, ty
now I can sleep :)
 
Hey guys, Can I use validation messages from the database for my model while using the Validationattributes - Dataannotations? i.e. not hard coded in the model itself, needs to be fetched from a database?
 
@JohanLarsson night!
 
@CCInc you will have me beaten by Sunday (rep vise)
 
;) I'm not sure about that, it's all about my luck!
 
@CCInc good things happen to those who work hard them|those?
 
12:47 AM
those
 
:)
 
Something strange is happening
My program does not show up in the taskbar unless I click on it
and even then sometimes it doesnt' open
I don't know if it is an issue with my computer or my rpogram
 
o<-< -- "Everything in Java is an object...I know! I will call my new class Object."
 
@TravisJ thought that was a reserved keyword?
Im new to Java*
 
12:57 AM
object is, but apparently not Object.
 
@TravisJ BAD practice
 
I agree
 
@TravisJ LOL
 
@JABFreeware Did you see the joke?
2 hours ago, by Eve
If football players were programs:
2 hours ago, by Eve
            try
            {
                Run();
            }
            catch (Ball)
            {
                throw;
            }
 
l8r
 
1:01 AM
@CCInc LOL thats pretty good!
 
DataContractJsonSerializer is the worst. Now you know.
 
1:22 AM
YES! I have written an class that interfaces cleanly with DotNetoAuth for SO!
Like, clean enough that I might submit it to the git.
 
"the git"?
LOL
 
splinter.azurewebsites.net <---would someone click 'login' and try to sign in with their SO account?
the git repo, blah
 
Surz
YAY IT WORKS
 
Woo!
 
posted on January 10, 2013 by Scott Hanselman

Sometimes I write apps for charities on the side. Recently I've been doing some charity coding on the side for The Red Pump Project. They are a non-profit focused on raising awareness about the impact of HIV/AIDS on women and girls. I encourage you to check them out, donate some money, or join their mailing list. Side Note: Folks often ask me how they can get more experience and wonder

 
1:26 AM
I'm going to clean up my code a little then publish the hell out of this.
 
like wow that was strange
@Billdr The blackjack?
 
the so oAuth thing
 
good morning/afternoon/evening :)
 
no one should ever need to write this again.
 
oh
 
1:27 AM
Hi @Ianthe
 
@Ianthe Hello! Is it about hmm...
9:00 where you are?
no 9:30
assuming you ate lunch at 12
 
9:30am to be exact @CCInc :)
 
So you did eat lunch at exactly 12!
~
 
12:30 :) I'm a fan of half-hours
 
9:30? That puts you in... Iceland?
South America somewhere?
 
1:29 AM
Nope, Singapore... between Malaysia and Indonesia.
 
@JohanLarsson, he said "oh purée" (a very SFW French swear, it was funny how serious he was when he said it considering pretty much everyone else goes by the F word and other offensive slurs), and although he was able to identify the texture, he has no clue how it got there, so we're going to wait for the return of our specialist
 
I was asking CC
 
@Billdr Umm, no...
I guessed that through this process:
At 10:30 PM last night, he said he was eating lunch (at 12:30 PM)
SOOO
 
Oh, you were guessing his time, not saying yours.
 
I simply assumed he ate lunch was at 12, and I THOUGHT he ate it at 10 my time
therefor I calculated his time
 
1:31 AM
Good work!
 
hey @James thanks for accepting my answer :)
 
My brain prefers to work at night so it took me a while to understand 8 messages. :p
 
it is my time to shine
 
@kush, are you Ellie Goulding? :p
 
no I am not
If I was her, I'd probably spend all day in front of the mirror though
 
1:38 AM
Is there a way to pull up SO questions you've commented on?
 
Just wondered coz you said "my time"... @kush
 
@Billdr Like on the site?
I think so
 
yea
 
@Billdr I think so
 
Should be on your Profile > Activity > Comments...
 
1:40 AM
Yea
 
Not a unique list though...
 
I didn't find it your way Ianthe, but I had the good sense to upvote it.
 
@Billdr, upvote what? sorry...
 
^
 
This is a comment to push Ellie Goulding's pic out of view.

This is a comment to push Ellie Goulding's pic out of view.


This is a comment to push Ellie Goulding's pic out of view. :p
This is a comment to push Ellie Goulding's pic out of view.
This is a comment to push Ellie Goulding's pic out of view.
 
1:46 AM
@Ianthe You should use Travis's message hider thingy
 
Sorry I had to do that @kush ... The pic makes me look like I'm not working lol... everyone behind me can see it...
 
5
A: Hide or collapse individual comments in chat

Travis JI made this simple script I use sometimes. You can run this either in the console of the browser or from the url with javascript: Version 2: New and improved! This actually adds the functionality to hide a message inside of the message actions :D Note the top of the popout for the example "Cl...

 
ah nice thanks!
@CCInc, how's your craziness level today? Ever made the psi-ball thing work? lol
 
I upvoted the question I wanted to get back to.
It took me 11 hours to write this answer.
0
A: OAuth with custom oauth provider in MVC 4

BilldrOkay, I spent the 11 hours since my comment writing a custom oAuth provider for SO. Tomorrow I get to do one of sales force. I'm not excited. Here's what I did: Create a DataContract class for your expected Json/Xml. I went ahead and implemented everything that SO returns, but if you're only d...

 
@Ianthe Didn't try it :P
It took me ~4 hours to write this answer
2
A: netduino check email

CC IncThere are a couple of ways you can get a gmail inbox. OpenPop If you do want to just use POP, and you do not mind using external libraries, this looks like the best/easiest way to go. OpenPop allows you to access a secure/unsecure email account and lets you choose the port. See this post to ge...

 
1:58 AM
You missed a big one: oAuth :p
google will roll the email out in a nice json ball for you.
 
I +1'ed you
 
Oh yea? Well I +1'ed you!
 
LOL
So... why did you have to make a login API?
 
I really hate when people downvote without explanation
0
A: java.lang.NullPointerException Issue

Pheonixblade9Your downloadUrl method is failing. InputStream stream = null; XMLparser xmlParser = new XMLparser(); List<Customer> customers = null; String parseUrl = URL + getCustID.getText().toString(); try { stream = downloadUrl(parseUrl); customers = xmlParser.parse(stream); } finally { ...

 
I saw
 
2:00 AM
I've got to implement oAuth to consume an API at work. I use splinter as my 'try shit out' site.
also, I now have +100 identity federation exp.
 
Yayz
Total reward: 0.02648442 BTC
 
@Billdr I had to implement RSA for credit card encryption for an Android app at work. That was no fun
@CCInc how are you getting BTC? You running a rig?
 
miner yea
 
@Pheonixblade9 That sounds great
 
I failed horribly
 
2:02 AM
After I get this degree wrapped up I want to do more shit like that
 
ended up using this: bouncycastle.org
 
doing ui work is BOOOORING
 
haha, I do everything work
if you're a fucking good engineer, you could come work here.
 
Seattle, right?
 
we're very picky
 
2:03 AM
Also, I never said I was good.
 
but it's an awesome place to work
 
I'd say I did this really well.
 
ah, never mind then. Go fuck yourself.
:P
kidding...
I know what you mean, though.
 
Hello guys... I have a file called Delta.txt under Resources. Now I want to read this file how I can do it? I wrote this ResourceReader rr = new ResourceReader(Properties.Resources.Delta); Is this correct? If yes then what?
 
I'm going to publish this code to my blog, I'd really like to hear smart people's comments on it.
 
2:04 AM
ahh no i don't think so @Loclip
 
hopefully I can publish before Kendall shows up.
 
lol
 
@CCInc do you know how I can do that?
 
ahh no
 
more like this:
System.Drawing.Bitmap bitmap1 = myProject.Properties.Resources.Image01;
 
2:05 AM
Yea
 
I tried before string x = File.ReadAllLines(Properties.Resources.Delta) and its not worked too
 
that's what I would have guessed
Do this
using (Stream stream = Assembly.GetExecutingAssembly()
                               .GetManifestResourceStream("Your assembly namespace" + "file1.txt"))
using (StreamReader reader = new StreamReader(stream))
{
    string result = reader.ReadToEnd();
}
37
Q: How to read embedded resource text file

Me.CloseHow do I read using Streamreader an embedded resource (txt file)? (and return it as a string?) My current script uses a windows form and texbox that allows the user to find and replace text in a text file that is not embedded. private void button1_Click(object sender, EventArgs e) { StringC...

 
Is it sad that I'm staying at work because I have nothing better to do at home atm?
 
yes and no
yes
but also no
but mainly yes
Hey, do you see my rep? Haha
1234
 
says 1224 to me
 
2:11 AM
ah
 
lol screwed it up for you
 
meh, I actually have 1234
 
not any more
I screwed it up for you
 
@CCInc thank you.. with what i must replace "Your assembly namespace"
 
Your assembly namespace
 
2:12 AM
my namespace is WL
what is assembly namespace?
 
@Pheonixblade9 Aww how sad (yay!)
@Loclip Try "WL"
OH YEAAAAAAAAAAAAAAAAAAAAAA
 
error WL is namespace but used like variable
 
Try "WL"!
"WL"
 
stream getting null
 
code?
 
2:15 AM
@CCInc OMG YOU'RE BEATING JONSKEET HOLYSHITDONKEYBALLS
 
LOL
yea
 
I think I'll go climbing tonight.
 
2:33 AM
 
isn't the <pre> tag supposed to escape braces?
or at least, tell the browser to ignore them
billdlabs.com/?p=45 <---DotNetOpenAuth classes to authenticate against SO. Or, what ate my entire day.
 
yayz
a new billdr post
If anything needs clarification, please contact me or leave a comment below.
woa how do I contact you
 
man, this chat window keeps freezing in Chrome.
just got this IM from a girl I went on a first date with last night: Sorry, I can be a bit of a sex addict SCORE
 
2:48 AM
LOL
 
@Pheonixblade9 I had the same issue a few months back. Reformatting my pc resolved it.
I think there's a 'contact' page on the site. Also, I posted my SO information there :p
 
@Billdr I know right! Except this actually is a real person...
 
@Billdr If it's there, I can't find it.
 
Woah, context.
you're right, it's not @CCInc. bill@billdlabs.com
not sure what happened to that page.
 
YEAH, I GOT A BLOG, TOO www.isthisonthetest.com
 
2:53 AM
I found Pheonixblade9's google + profile...
 
gasp
did you really? :P
from my name?
 
yes
 
how do you know that it's not andrew, though? hmm...
HAHAHAHAHAHA that's not me
 
uhh, what?
no?
 
Works at Computer Sciences Corporation
lmfao
 
2:55 AM
but you do!
ok, give me a hint
 
uhm
I don't suck as many cocks as @johanLarsson's mother
 
so, x-1=>infinity
 
do you have a twitter?
 
Any, Pheonix... gimmie a free code review.
 
Sure
Gist
 
2:58 AM
AGHHH
 
what's the deal with all these people named Pheonixblade9's name ??!!!
 
then ctrl++
how many people can't spell phoenix?
 
I copied his name
which he spelled wrong
 
2:59 AM
I know
which is why I'm shocked you're getting a lot of hits.
 

« first day (817 days earlier)      last day (4138 days later) »