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

3:00 AM
LOL
 
@AndréSilva billdlabs.com/?p=45 I need your feedback.
 
I used his real-fake name
 
tomorrow I have to do it for real.
 
I'll bet that's him
@Pheonixblade9 You better hurry before my 2 minute deletion time is up...
 
If that's not him, he knows him.
He's reviewing my code, leave him be.
 
3:06 AM
I'd bet my 0.03012342 BTC that that's him
 
no bet
 
49 mins ago, by Pheonixblade9
I think I'll go climbing tonight.
 
yep
I might know some of his distant family.
 
Time for me to sleep.
Good nights.
To all.
Yes.
Bye.
by.
b.
.
 
laters
 
3:12 AM
huh? I wasn't reviewing anything
where's my link
 
oh, the billdlabs link?
 
still right there
yea
 
jesus christ man, the font on your website is TINY
 
ctrl++
 
3:13 AM
I know
still
 
I'm probably going to shift over to an IIS server, I'm not sure wordpress will come with me.
 
I'd change the generic Exception to an ArgumentException msdn.microsoft.com/en-us/library/system.argumentexception.aspx
you should dispose your client earlier
change this:
 protected override IDictionary<string, string> GetUserData(string accessToken)
        {
            StackOverflowClientData graph;
            //SE returns the user data as a JSON formatted string, compressed with gzip. For my sanity's sake we're going after it with a WebClient instead of a WebRequest.
            using (var client = new WebClient())
            {
                //SE requests this be set, even if it 'fails back' to gzip anyway. We're nice folks.
                client.Headers[HttpRequestHeader.AcceptEncoding] = "gzip";
to this:
(gimme a sec)
 protected override IDictionary<string, string> GetUserData(string accessToken)
{
	StackOverflowClientData graph;
	//SE returns the user data as a JSON formatted string, compressed with gzip. For my sanity's sake we're going after it with a WebClient instead of a WebRequest.
	byte[] data;
	using (var client = new WebClient())
	{
		//SE requests this be set, even if it 'fails back' to gzip anyway. We're nice folks.
		client.Headers[HttpRequestHeader.AcceptEncoding] = "gzip";
		client.Headers[HttpRequestHeader.ContentType] = "application/json; charset=utf-8;";
 
no rush. Trying to get some low-hanging js rep before bed.
Er, what got changed?
 
using (var client = new WebClient())

ends after

data = client.DownloadData("https://api.stackexchange.com/2.1/me?site=stackoverflow&key=" +	HttpUtility.UrlEncode(key) + "&access_token=" +	HttpUtility.UrlEncode(accessToken));

now
as opposed to at the end of the method
you had your WebClient open for too long
 
ah
 
3:24 AM
I would go so far as to make it its own method
also, make this configurable via App.Config:
"https://api.stackexchange.com/2.1/me?site=stackoverflow&key="
 
I wanted to keep it as close to the derived class as possible.
I'm not sure why you want to move that. The classes job is to connect to that specific URL.
 
 protected override IDictionary<string, string> GetUserData(string accessToken)
{
	StackOverflowClientData graph;
	//SE returns the user data as a JSON formatted string, compressed with gzip. For my sanity's sake we're going after it with a WebClient instead of a WebRequest.
	byte[] data = GetData(accessToken);

	//this block decompresses the result and turns it into a string.
	using (var gzipStream = new GZipStream(new MemoryStream(data), CompressionMode.Decompress))
	{
		const int size = 4096;
because URLs change and it's a lot easier to change a config file than a source file :)
var tokenRequest = WebRequest.Create(TokenEndpoint);

declare the type here, not var. It's not clear what WebRequest.Create returns.
pretty sure you can chain this:
   var writer = new StreamWriter(requestStream).Write(entity).writer.Flush();
maybe not
            using (Stream responseStream = tokenResponse.GetResponseStream())
            {
                //SE gives us the response as a string. Not an argument appended to the callback but a string in the body of a page.
                // It looks like this: access_token=fdagfdsf4&expires=8600
                var response = tokenResponse.GetResponseStream();
                StreamReader reader = new StreamReader(responseStream);
                var responseString = reader.ReadToEnd();
                var tokenSection = responseString.Split('&')[0];
don't return inside of a using statement. That disposes the object twice. It's not an error, just inefficient.
 
er... I see no error. But I take your meaning.
 
no error :)
and actually, it's not even inefficient
it's just my opinion
 
If that was your biggest concern about that block, I'm pleased as punch
I felt that was the ugliest hack in the whole mess.
 
3:32 AM
well
var tokenSection = responseString.Split('&')[0];
return tokenSection.Split('=')[1];
couldn't that be done better with .Join('&') ?
 
?
 
wait nm
it's late. I'm going home
hope I helped
 
You did, thanks.
and good night.
 
night :)
 
4:29 AM
guys is this bad practice:
        var divNode = document.DocumentNode.SelectNodes("//div").Where(x => x.Attributes["id"] != null && x.Attributes["id"].Value == "imageBox").FirstOrDefault().
            ChildNodes.Where(y => y.Attributes["id"] != null && y.Attributes["id"].Value == "image").FirstOrDefault().ChildNodes.
            Where(z => z.Name != null && z.Name == "a").FirstOrDefault().ChildNodes.Where(w => w.Attributes["id"] != null && w.Attributes["id"].Value == "mainImgC").FirstOrDefault();
basically i got a tree node, and i filter each branch that points out to where i want
 
 
3 hours later…
7:19 AM
people??
 
7:39 AM
aloha
 
8:01 AM
can someone answer me ;(
 
way beyond me im afraid
 
man I wish I had a neighbour who can teach me more programming T_T
 
move house then
 
'road accident ' ..off from work ..waiting in hospital fr scan results :-(
@ Magikarp : find a programmer's daughter to date with ! solves all..
 
8:18 AM
@Kian You're welcome
@Kian I hope it's awesome :P
 
who's kian?
 
@Magikarp, reading your code, I considered for a moment of trying to kill myself. :p
 
sorry :/ I dont want to murder anyone. but each node has "childnodes" and i just find the childnode that has the attribute/name that i want
but i was just wondering if its bad practice to call method after method in one line
 
doesnt sound healthyto me
but im way outta my depth
my rule of life
if you think somethings wrong
it probably is
 
@Magikarp It depends on your context, but based on what you posted previously, yes, it is.
 
8:24 AM
I was just kidding about trying to kill myself. :p ... Anyway, I think that code may not be maintainable per se because it's highly dependent on the input structure.
 
mmm it doesnt give me errors but is there a way to do this more efficiently?
mmm.... true but basically im extracting a link from a pagesource of a website
i just get null anyway when it doesnt find it
:/
i just find it pointless to allocate a variable just to get its children
or am i wrong
 
hmmm... if you're looking for links, why don't you filter all <a />'s?
You can also filter further by providing a class, id or a custom attribute in the XPath...
 
but see thats what i dont know ;/ Im just using HtmlAgilityPack
and its not just links im taking out
and the <a>'s are children of the <div>'s
unless there's a more direct way of just getting the <a>'s
 
You can get the <a>'s by changing your XPath to "//a".
 
ahh... thanks very much
thank you
 
8:37 AM
It could be like this: var anchorNodesWithClass = document.DocumentNode.SelectNodes("//a[@class='css-styles']");
You're welcome. :)
 
Surely based on his code, all he needs is var divNode = document.DocumentNode.SelectNodes("//a[@id='mainImgC']").FirstOrDefault(); (FirstOrDefault thrown in for nully good measure)
Bye4Now
 
9:04 AM
Good meurning
122
Q: How should I deal with an employee who has slept with my wife?

Waiter JohnI'm the owner of a business with about 30-40 employees. Recently, I found out that one of my employees has been having an affair with my wife. The employee has worked for me for 4 years. I felt like I was his mentor, since I recruited straight from university, taught him the ropes, and promoted h...

 
morning
@ActionHank wow that's brilliant... I didn't know employers in the US are just allowed to fire people in some states
 
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?
 
lmfao hank
how was boxing?
are you sore?
 
Good morning all.
 
hey andre
 
9:14 AM
:)
 
Morning People!
 
Morning @Derek
 
morning @Derek
 
morning all
 
oh jesus, i just found out a work colleague name has an acronym of Terminal Virgin
 
9:15 AM
Morning @HansRudel
 
@Cylen I am surprised I'm still able to type!
 
@Billdr as soon as you log in. Talk to me.
 
@Cylen Thats classic!
I need to stop getting wired on coffee at work. But I aint sleeping well at all. Do any of you guys ever got o bed and start trying to work out code in your head! I know this sounds insane, but sometimes I just cant switch off from it. I'm thinking about what i need to get done the next day at work! I'm a sad man! lol
 
@Derek Try not drinking coffee after 2 or 3 in the afternoon, it should all be out of your system by the time you get to bed
Also, minor blunt trauma to the back of the head solves most sleeping problems.
2
 
Yeah, @Sean I tend not too, just first thing on a morning. Its more my mind over active lol.
 
9:23 AM
@Sean Dude. I thought Rudi was raping you.
 
@AndréSilva He might has well have been....
@Derek I have difficulties sleeping, for one reason or another.. There's not really a lot you can do about it aside from getting rid of whatever is causing your mind to stay active
Or at least that's what the doc told me. Not exactly very helpful =P
 
@Sean start attending boxing lessons. You'll sleep like a baby
(after ofcourse you first cried like a baby)
 
Just logged on to a customer's server to find out why their system has sent me 10 emails, forgetting that while I was migrating said system I created about 10 tickets on their helpdesk section... And there I was setting folder options to search file contents and wondering why I was getting no results on my email address....
WTB new brain, will trade in old one for discount.
@ActionHank Yeah but if I keep that up for any length of time I'm going to end up with no brains left at all
I'm not sure I could live with my brain being broken as well as dopey
 
@Sean it's just a matter of avoiding hits!
 
See with your average idiot I'm alright at that cos they have no idea how to actually hit people, but boxers have this thing where they flail until they smash you. Not overly fond of the idea myself
 
9:34 AM
fuck me it's @Sean
 
@JamieTownsend would you be offended if I didn't? Cos I'd really rather not if it's all the same to you...
I would really rather not be here either. Coming back into a loud office when you still have the headache from the bug you've just had really sucks.
 
I'd be very offended. Do your duties
 
Fucks sake man, I'm still ill! Are you really gonna risk that?!
 
Yeah, we don't kiss remember. I don't care if my cock gets a cold
 
:)
mine sneezes frequently
 
9:40 AM
ditto that
 
What if I sneeze and bite it off?
 
I cry and we go to hospital ?
 
We could skip that bit entirely by letting me off the hook
 
ok ok ok FFS - but you better make it up 2 me
 
Thanks lovie <3
 
9:45 AM
You and Rudi got the same bug? Bloody cheating on me :(
 
I've also managed to burn my mouth on soup. So now bits of my tongue and the roof of my mouth are falling off >_<
No, Rudi said we were a distraction to his goals for 2013, so he's shunning us until at least the 21st
 
little bitch ha
 
he was here earlier
 
good day everyone
 
@SteffenWinkler :) Hi
 
9:49 AM
did your bot die a painful death @AndréSilva ?
 
Not yet
I'm trying websockets
But my freaking coworker won't shut up
 
hit him/her with a large programming reference book
that always works
 
He probably think its a joke..
He is a retarded ape ( not in the racist way, talking about brain )
 
not if he is knocked out on the floor he won't
do you know his email address ?
spoof a message from him to your boss calling him a twat and that you quit hahaha
 
oh come on, be sane about this @JamieTownsend
@AndréSilva write a batch script that spams his computer with net send messages
 
9:52 AM
"Shut up."
 
also but a .bat file in his autostart directory that only has the 'reboot' command in it
 
"I don't like you."
"I'm still not listening."
 
"TWAT"
 
@SteffenWinkler That is a good idea.. Is it possible to mask the user who is sending it ?
That would be awesome
 
do it from the server lol
assuming you have an internal server :/
 
9:53 AM
@AndréSilva well, use some IP/MAC spoofing and nobody will ever know
 
@AndréSilva You'll always get the IP, so do it from the server
 
@Sean not if you spoof the IP
 
Good idea. Muahaha
After I finish this bot, I'll totally do that.
 
I still think you should physically assault him :/
 
@SteffenWinkler That's too much like hard work xD
 
9:54 AM
@Sean that's basic network google 101
 
Was just gonna say.... =P
IP spoofing would be under network security
 
@JamieTownsend I fear that he might enjoy it.
 
either way, do something to make them think it's not you
 
@all hey ..
 
@codebrain good morning. :)
 
10:00 AM
CSS question: I know relative still takes up the space where the element was supposed to be, and absolute doesn't... Can I use position: absolute; top: -270px; and it will still be right? Instead of position: relative; top: -270px; ?
 
@Andre good morning. !
 
@Sean ._. it will just move around your element..
Probably disappearing because of going out of screen
 
That's not what I want... ='[ I want it relative to where it was without taking up the space
 
@JamieTownsend u got a minute bro, im still stuck with this entity framework sh-t
 
cos it's pushing other shit down
 
10:02 AM
morning peeps
 
morning mav
 
o noe, shit all over the place!
 
I know..
 
where have you been? i've been searching for you all my life :P
well.. mostly yesterday XD
so whats keeping you so busy these days, haven't seen you on skype in ages
 
I thought I had got rid of whatever bug I picked up at my mum's over christmas but clearly not as it came back to bit me in the ass with a vengeance
 
10:04 AM
@sean absolute is calculated from top left ..and relative is where it supposed to be ..if you must place it with absolute check rendering with minimizing browser in various sizes n check...
 
oh hope you get well soon @Sean
i've finished DarkSiders II (disappointing ending!) and i need something to do
 
I'm well enough for work, still feel shit though =P
 
i thought that was a normal work thing :P
 
Well yeah, worse than normal shit
 
well @Maverik rudi n Sean were on a date ...
 
10:06 AM
oh!!
now it all makes sense!
well.. we're in an open relation
 
@codebrain Stop listening to @JamieTownsend, he's not wired right....
 
he didn't have to hide it :)
 
I don't usually have a headache and feel achy when I come into work though
 
:)
feel like throwing up ?
 
no not today
 
10:10 AM
I'm still in hospitall ..sucks worst day on a new year
 
that's usually how I test for viability to go to work, if I move and my stomach says no, I listen
 
:)
well i'd just blame rudi for that :P
 
the other one is if I open my eyes and the light sears my brain
those are pretty much my two criteria for not going to work
 
guys sitting next to me are talking about sickness over xmas & newyears too
 
may ne ...but I got into accident today ...
 
10:12 AM
I've not been sick, my stomach has felt like it wants to but I've bitch-slapped it into submission
@codebrain What are you in hospital for?
This is what I was after =]
 
on the way to office a drunk ahs hit my back..4 stitches n knees n scratches all left
 
._. ahs?
 
sue the fucker
I'm not into this whole sueing for the sake of it thing, but with idiots in car accidents they bloody well deserve it, it fucking hurts being hit by another car >_<
 
@Sean things like those strengthen my resolve about staying away from the web world and make me worry even more about future with all the Html / JS shizz coming up
 
Well hopefully we won't have to use nasty hacks as they're introducing some new stuff to manage layout
 
10:19 AM
@codebrain:Bro what happen are u alright now?
 
And back when HTML4 was being made, websites were much simpler and people didn't want to put buttons over images that couldn't be backgrounds
Like with a rotating banner, which is what I'm doing but the elements underneath are being shunted down
Which is no good
 
@andre that's a elaborate answer .. n good one ...
 
Being a good web developer is such a pain in the ass, you're constantly on the back foot, or at least it feels like it =\
 
or not very good :P
want some cold water for that BURN?
 
@codebrain they say lemon juice can heal wounds quickly.
 
10:29 AM
morning guys
I got a WCF question here
private void CreateChannel()
{
_channelFactory = new DuplexChannelFactory<IDateLogicDiaryService>(new InstanceContext(_callback), BindingCreator.SetBinding("NetTcp"), new EndpointAddress(_url));
foreach (OperationDescription op in _channelFactory.Endpoint.Contract.Operations)
{
var dataContractBehavior = op.Behaviors.Find<DataContractSerializerOperationBehavior>();
if (dataContractBehavior != null)
dataContractBehavior.MaxItemsInObjectGraph = int.MaxValue;
}

_client = _channelFactory.CreateChannel();
I create a channel manually with NetTcp Binding
and the binding that I create is like this
System.ServiceModel.NetTcpBinding binding = new System.ServiceModel.NetTcpBinding();
binding.Name = bindingname;
binding.ReliableSession.Enabled = true;
//binding.ReliableSession.InactivityTimeout = new TimeSpan(0, 0, 1);
binding.ReliableSession.InactivityTimeout = new TimeSpan(100,0,0);
binding.ReliableSession.Ordered = true;
binding.Security.Mode = System.ServiceModel.SecurityMode.None;
binding.OpenTimeout = new TimeSpan(0, 0, 5);
binding.CloseTimeout = new TimeSpan(0, 1, 0);
//binding.ReceiveTimeout = new TimeSpan(0, 0, 1);
 
@sean it was a motorbike accident and the so called "fucker" escaped from hospital after first aid and before the police arrival..police are the dumbest here ..
 
but the inactivity is still 10 mins rather than 100 hours which is what I set.
 
@Ianthe ll try ....!
 
@codebrain, noooooooooooo! lol
 
Hey...how can I give a group validation on controls like textboxes to have a single validation message for them using jquery's unobtrusive validations in mvc?
 
10:36 AM
@codebrain, can't they trace the hitman from CCTV or somethin?
 
Ianthe , he escaped from such a big hospital ..lol ..Chennai is only called metro city no cctv here:-p Google Chennai .:-D
 
@Larry, have you tried making ReceiveTimeout and InactivityTimeout have the same value?
 
@Cylen Cold water wouldn't be enough for a burn of that magnitude.
 
:)
 
10:54 AM
good bye for now... goin home...
 
wow, early :P
 
@codebrain get well dude
@Cylen yeah, I'm lazy today hehe
laters
 
@Larry have you also considered what the maximum Inactivity time can be (limits imposed by WCF internals) ?
 

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