« first day (1752 days earlier)      last day (3182 days later) » 

4:02 AM
 
 
2 hours later…
5:43 AM
aww yeah, fully motivated for a new monday \o/
 
Fucking programmers and their memes. Told myself I'd wake up this morning and finish the design of my new site. Looked up "design inspiration" on Google, found a programming blog, saw a meme, read it, clicked next, read another meme, and another, and another... 3 hours later... still trying to come up with a new design.
 
That's webdev for you
 
6:01 AM
morning @BenjaminDiele
 
@scheien hai!
 
Morning monday
 
 
1 hour later…
7:08 AM
2
Q: Using “bindingRedirect” in app.config to redirect System.Net.Http references to a portable version

Samy S.RathoreI am working on a Windows Phone 8 project which has a PCL project as its business layer. The business layer project is shared with the Android(Xamarin) project solution, and uses a HttpClient which we realized is not available in WP 8 projects. So according to the blog here we decided to go with...

Hi
can someone help me with that?
 
7:30 AM
Damnit I hate caching on a development machine.
 
7:45 AM
Any of you guys know of a cheap windows vps?
I want to use it for some CI
 
@BenjaminDiele: no idea. What about Azure? Too expensive?
 
8:02 AM
if that's the quality to expect ..
 
8:33 AM
top o' the morning to you all
 
Good morning Sir Squiggle.
 
doffs
 
8:58 AM
hi guys
 
o/
 
Question: can I get a different username on chat than I have on SO.com?
 
happy mondays
 
@Henri Yeah if you use a different account.
 
9:08 AM
@Squiggle fancy
@Sippy ah kay. Well in that case: I used to be Action Hank, but for professional reasons I now go by 'Henri'.
 
Henri is probably fine ..
 
pronounced "on-ree"?
 
agh
help
 
@StevenLiekens?
 
it's weird to be on the other side of this error
last time I saw it, I only had 2.0 installed
 
9:12 AM
nice
 
now I'm on windows 10 and apparently it doesn't have net 3.0
 
@Squiggle oui! (pronounce 'wee')
 
well it does but it's disabled by default
 
@Henri trés bien.
@StevenLiekens apparently you can install it via the Programs and Features > Turn Windows features on or off'
option
I'm glad it's disabled by default. Progressive.
 
I can't enable it
error 0x800F081F
 
9:18 AM
Nice and detailed.
 
that's helpful
"Something happened"
 
@TravisJ bought MNDI this morning at 1542.85; currently down 3.99%. Thanks :P
Was I too late?
 
they need to invent brain implants that convert win32 error codes to localized strings
cheaper than providing support for every time they ship a broken installer
 
@Squiggle très
 
9:36 AM
@Loetn thanks. I use a UK keyboard and that accent isn't easy to reproduce :P
 
@Squiggle Isn't it a combination of the key under 'esc' + 'e'?
 
how do I combine that with an 'e'?
AltGr+e = é
 
` + e
è
Or does that only work with US international?
 
what, do I press them both together? is there a key combination? does it auto-format?
`e
:-/
 
strange
Probably in combination with the selected system language
 
9:49 AM
` is a dead key on some keyboard layouts
A dead key is a special kind of a modifier key on a typewriter or computer keyboard that is typically used to attach a specific diacritic to a base letter. The dead key does not generate a (complete) character by itself but modifies the character generated by the key struck immediately after. Thus, a dedicated key is not needed for each possible combination of a diacritic and a letter, but rather only one dead key for each diacritic is needed, in addition to the normal base letter keys. For example, if a keyboard has a dead key for the grave accent (`), the French character à can be generated by...
 
I've to hit space before ` appears
 
Dead keys are the most horrid things in keyboard inventions.
 
Anyone got a good programming keyboard recommendation?
 
Doesn't matter too much once you get used to your keyboard.
I use a m705 and mk710 from logitech but any is fine
 
Maybe.. I bought a microsoft.com/hardware/en-gb/p/natural-ergonomic-keyboard-4000 and it's horrible to use
 
9:52 AM
That's... bad.
 
I normally use "just above basic" ones, was going to treat myself
 
@AlexH Ow, looks horrible
I use a basic HP keyboard
 
@RoelvanUden that looks nice
 
9:53 AM
@AlexH It is. But the placement of the ; ' and \ keys is weird if you're not used to it. Expect to fuck up the first few days, once you've become accustomed, you can't use normal keyboards anymore either. But, it's great for comfort and accessibility. :P
 
@RoelvanUden nothing can be as bad as the one I just got, I was back to two finger typing most of the weekend
@Loetn that looks a bit like the one I used to have... I figured the 4000 would be similar, but it's just massive and horrible and klunky!
 
@AlexH It's the 3000.
If I'm correct
 
@RoelvanUden Images r 2 small :((((((
@RoelvanUden It's American layout, that's why
My keyboard at home is like that.
Fucking annoying.
I swapped it back to UK layout, but now I don't actually have a \ key xD
rip
 
@AlexH And whatever mouse you use, do yourself a favor and get yourself a comfortable mouse mat. I hear you think "A mouse mat?! This is 2015! We don't need them!". And that's mostly true, except you want a mouse mat with wrist rest (a cheap 7 euro one is A-OK). Combined with the MK710 that is my preferred setup :P
@Sippy Long live American layout. Ever seen Dutch layout? HORRIBLE.
 
Hello friends
I need your help on below topic
0
Q: Mulitple Payment Method Using Authoriz net credit card

user1474602I am trying to implement the Multiple Payment Method of Authorize net using credit card.I am using below sample code of site i.e String post_url = "https://test.authorize.net/gateway/transact.dll"; Dictionary<string, string> post_values = new Dictionary<string, string>(); ...

 
10:00 AM
@RoelvanUden Lol, I hate all layouts except UK layout
DVORAK is ultra wtf
 
@Sippy Because you're not used to it.
 
I'm used to the American one, I just dislike it
 
Let's all use AZERTY
 
I hate not having a large return key as well :P
 
@Loetn let's not. ever. DVORAK ftw
 
10:04 AM
@Henri Why not? If you're used to it :)
 
@Loetn I hate it when I'm on holiday in France and I can't use the keyboards there. France is 2 countries over!
 
@Henri Nono, not the French layout, the Belgian layout -_-
 
Only time I ever used a QWERTZ was during my job interview
that was awkward
 
@RoelvanUden why do you need a wrist support for? Isn't that what the table is for?
 
10:20 AM
@BenjaminDiele No, look at your hand while using the mouse and you'll see you actually are using your muscles to lift your hand to use the mouse effectively. Do that 10 hours a day and you'll end up with sore hands. At least, I do.
 
I only lift my mouse when I need to go past my screen. And I don't lift my wrist for that.
My forearm is always on the desk, completely.
 
abr
anyone up at this hour?^^
 
at this hour? it's gone noon!
 
It's almost lunchtime. Wonderful thing, timezones. There's always someone to talk to.
 
Lol
@Squiggle Can totally imagine someone saying "You're a programmer, surely you can touch type on any keyboard..."
 
10:26 AM
@Sippy I can touch tzpe on any kezboard, but mz fingers onlz understand one lazout.
 
@RoelvanUden Hm, never noticed a problem. Although I may be a bit of a slacker and not work quite that long. My elbows usually rest on the armrests of my chair while I'm mousing, though
 
@Squiggle touché
 
That uses a particular set of muscles better suited to holding one's forearm up, I guess
 
@Squiggle you spelt any with a y bro
 
crl
10:28 AM
What does Console.Write("{0,1} ", num); do? specifically the ,1 ?
I'm reading the doc on msdn, but it's rather "{number,letter}" --- oh sorry it's number:letter
 
Grow up, whoever that was :P
Link tenuous at best
 
crl
@Squiggle thanks, it's for padding with spaces so?
 
@crl Aye. the ',1' asserts a 1-character width for the 'num' value.
 
abr
peeps, give me some input about something
 
10:32 AM
really useful for logging tabluar-looking information to console.
@abr needs more red.
 
abr
I'm in windows form, got a gif running on a picture box and I want it to run while I get a response from the database, but I'm trying to figure out how to make that with async and await
I've googled but I can't get it to work
maybe some simple explanation could help :p
 
10:45 AM
@abr use async and await.
No but seriously what are you asking for? Help with async await? Or help with the db? Or Winforms?
 
abr
well, I've got a form that, when I click on a button, shows a loading gif, so far so good
but I want to execute a method in the meanwhile
 
hello guys ,
i have two web applications , they are on same server
when i click on link in first web application , it goes to second application
how can i pass data between them

i need to pass a connection string value from the first web app to the second
 
abr
and then stop the gif according to this method's response
@Bassem are you using http posts to connect between them?
 
yes
wait
sorry what do u mean
 
abr
what do you mean by
click on link
 
10:51 AM
each web app is a seprated web app
i only have link on menu that redirect me to another app
 
@abr what's wrong with the other threading primitives? Or you just want to use Async Await?
 
when i click on this link i can pass the connection string id via query string but i don't like it
 
abr
@AlexH Never worked with threads before :x
@Bassem you are establishing a connection between two applications and you have a need to send a connection string (dont know why you need that)
why dont you say
when you click on something the first api, it creates a temporary file somewhere and call teh 2nd api
and the 2nd api, when it loads
it searches for this temporary file?
Don't know what's your idea
 
@abr I see... well trying to use async await without any background is probably pushing it a bit
 
abr
@AlexH how would you implement this idea? Having a loading gif run when you click on something
and request information to a database?
 
10:55 AM
@abr check out Thread and Task first maybe? Might be a bit easier
 
abr
and when it receives information, the gif stops
I've search about it but I can't figure out how they work
 
Well what's the DB?
 
abr
sqlserver
 
@abr
look man
my application work on 4 database , they are same structure but has different data

there are 2 different web application using those same 4 databases
if i am on application one and use database A
i need when i click on link there , redirect me to the second application and the connection string will use database A

if i work on database B on the first application
and click link there , it will take me to second application and the connection string will use database B

Do u understand me now ?
 
@abr and you're accessing it via ORM or...?
 
abr
10:58 AM
@AlexH the database is created on code-first, have implemented a repository pattern with unit of work
(learnt in class)
 
Hello everybody
 
abr
@Bassem I'm assuming your web application has a visual, by that I'm assuming when you click the link, it's an http post (a post method is when you for example, access google.com and press enter)
 
so the answer for ur question @abr is yes
 
abr
there are easier ways, and maybe you don't need 2 api's but let's assume you really need that connection string
if they are supposed to be on the same server
if you are going to send with post, you need to pay attention of possible exploits
 
for now they are on same server but later i don't know
 
abr
11:02 AM
like foreigners sending a request to ur 2nd api with incorrect connection strings that might crash or exploir ur api
if they are going to be on the same server in the future
then the best way - to avoid foreigners to send info to the 2nd api (because you clickin' a link with connection string attached can be sent from anywhere)
would be to create or write a temporary file with it and let the other api know
 
Hey guys, I'm having an issue where, when I send a date across to a webapi in the form dd/mm/yyyy its trying to bind it as mm/dd/yyyy and so the model state fails.
 
abr
that he should read that when it's called
 
is there a simply way to sort this please?
 
abr
otherwise, why dont you just send an int or a name and let the 2nd api choose which database should use depending on the name?
and have the 2nd api build the connection string based on the name received?
this would be the lesser evil I think
 
@abr I think you would be better off looking at a basic intro to threading/tasks like this codeproject.com/Articles/99143/…
 
11:05 AM
@user3545438 what locale is your server configured with? Also, you should really treat all dates as yyyy-MM-dd to avoid this issue.
 
"why dont you just send an int"

yes i am planning to sent the id of connection string but the question is how
 
abr
@user3545438 you are sending data in dd/mm/yyy to the api, and the api probably is reading it as mm/dd/yyyy
 
i don't want query string
 
abr
you need to change its format
 
yyyy-MM-dd <-- srsly. Use this.
 
abr
11:06 AM
you're probably receiving a datetime? dotnetperls.com/datetime-format
 
@Squiggle @abr Sorry I was going to provide some code lol. I think its the newtonsoft Json convertor?
Just running to debug now.
 
abr
@user3545438 I currently am developing a web api also, I dont send data over but I do send objects
 
And objects aren't data?
 
abr
sending them with newton json convertor ye
yes they are, I'm an idiot
pardon me :(
been up almost 36h, my brain doens't work as it should
 
@abr trying to understand threading/async/await after 36 hours awake having not done it before is not advisable
 
abr
11:18 AM
@AlexH It's a must-know thing that I should've learned by now :/
@AlexH I'm stubborn xD
 
I'm like that with expression trees
 
Thanks guys I'll look at it seems strange as it I do send it back from the api in the format yyyy-mm-dd
but for some reason when I deserialse to an object my date time is localising it as dd/mm/yyyy
so when I serialize to send back (as an edit) its messing up the conversion
one more question I have to open multiple versions of a partial view and register the scripts (devexpress) is there anyway I can include a ViewBag.Count in with the script id?
<script id="dxss_ArchiveCode@@ViewBag.Count" type="text/javascript">
isnt working?
 
abr
the thing about the data is how your date time is presented
you can change the datetime format according to region (can't think where I've seen this but you can check google)
or to pattern, like dd/mm/yyyy or dd/mmm/yy
your sending in dd/mm/yyyy and the api is trying to read it in another format
so you need to say in the api that it needs to read like the way you're sending it
 
11:34 AM
USE yyyy-MM-dd FORMAT
that way you never get confused
 
unix time ftw
 
@Squiggle yeah I'm going to. I have the api reuturning it this way, its mainly a coincidence as I'm just returning from newtonsoft json where thats the default. When I pick it up clientside I'm just deserialising to to an object with a DateTime and at the moment tostring() to a textbox. its here where its automatically converting to dd/MM/yyyy
 
your client and server are using different locales.
 
use datetime.ToString("yyyy-MM-dd")
wow
sql server management studio 2016 ctp 2 asked if I wanted to send customer feedback
I clicked no and it crashed
 
@KendallFrey just reading about the 2038 bug
 
abr
11:42 AM
I guess sql server is a woman
 
now every time I restart ssms, it pops up "Help make SQL Server Management Studio 2016 better!"
 
Looking forward to fish here: google.no/maps/@61.779493,7.01007,3a,75y,298.39h,88.87t/… (kind of funny that the google map car drives so far into the middle of nowhere)
 
Implies that someone, in the development of Unix, thought "Nah, nobody will still be using this in my lifetime, I'm sure this is fine". WAT.
 
@scheien woah. Me like.
 
any datetime representation in existence has that problem
some just hit that problem sooner than others
 
11:50 AM
@StevenLiekens extending out beyond the forecasted heat death of the universe probably is fine, though
 
@Squiggle: It's going to be awesome. A weekend with just silence. :)
 
@scheien you have kids?
 
@scheien I went here: https://www.google.co.uk/maps/@51.526909,-0.088688,3a,75y,177.87h,87.92t/data=!3m7!1e1!3m5!1stvlrca0zN8NRVWQb-s-hEw!2e0!5s20150401T000000!7i13312!8i6656
to get some peace and quiet
 
creating an object without calling object's constructor, or creating a new instance ?
 
11:53 AM
@TomW: Yep, two.
@Squiggle: ugh, guess that's everything other than quiet :)
 
@scheien Then I can fully appreciate the sentiment
 
@Learner What does a constructor do? Oh, right, it constructs an instance.
 
@RoelvanUden grrrrrrrrrrr
 
@scheien it was much quieter than home this past weekend. They installed a dance tent outside my bedroom window for the national day celebrations.
all I'm saying is that tranquility is relative
 
@Squiggle: yikes!
I got tired of living in the city, so we moved to "suburbia"
 
11:55 AM
var a = new Earth();
a.Age = 11;
a.TaxRate = 75;
a = new Earth(a); // use age and Taxrate to populate rest of Earth's properties
ManagerC.Add(a);
can anyone improve above code
without getting into Details
 
I feel like you'd do better in politics
 
var a = new Earth { Age = 11, TaxRate = 75 }
but why the hell would you initialize it with its own later on?
 
@BenjaminDiele doesn't really care about syntax, but yeah i don't know why i do that
 
copy ctor that calculates properties
 
or maybe because it works ?
 
11:58 AM
but it's a code smell
 
but i want to improve it
 
@Learner Do you understand what that code is doing?
 
@StevenLiekens which is why i asked if anyone could improve it :O
 
It creates an Earth, sets its properties, throws it away and creates a new one
 
@TomW Yes, otherwise I won't be asking for improvement
 
11:59 AM
use a factory pattern
EarthFactory.Create(age, taxrate) : Earth
 
@StevenLiekens for such a small code
 
What do you want from us? Write code that makes sense, don't write code that doesn't make sense.
 
well you need a place to calculate the additional properties
the constructor is not it
 
ok, I will try factory pattern
 
Keep it simple, dude. A constructor like public Earth(int age, int taxRate) is fine. Add properties that calculate, like, public int Something { get { return _age * _taxRate; }}. Complexity is not necessary.
 
12:00 PM
'Improvement' how?
 
@TomW using factory pattern
 
oh man, no one is solving the problem really
 
You don't have a problem. You just think you do, making shit needlessly complex.
 
@Learner What problem?
 
12:03 PM
^
 
@Loetn my code is using 2 constructors and looks ugly
no one tells me how to improve it
 
@Learner Remove one constructor?
Because two is unnecessary
 
@Learner the conversation has gone something like this:
You: How can I improve this code
Users: You could try x
You: No
 
Indeed. "I want to improve my code, but I don't want to change it."
 
Tuuut, error
 
12:07 PM
@TomW ok
I will change it
Yes to everything
suggestions please ?
 
ManagerC.Add(new Earth { Age = 11, TaxRate = 75 });
If you don't need the instance later..
 
Is it possible to get the users machine id in a windows form?
 
@AshSimpson Yes
 
How?
 
No idea. What do you even mean with a "machine id"? PCs don't have IDs.
 
12:16 PM
Hey guys, on success inside my ajax method, I want to go to another partial view, does that mean I have to make another ajax call inside succeed to go to my controller action, then return the view? Is there another way to do this without having nested ajax methods?
 
Is there any unique way of detecting PC to PC?
 
Components have IDs, but not the entire collection of things.
 
Except for the IP
 
Build some kind of hash based on the hardware in the machine
 
0
Q: Calling Constructors twice - What a code smell

LearnerThis is the code I wrote, I can't stand it myself, I am creating instance of same object to populate it's properties twice, I need to give this object to another developer who just don't need constructor at all, as he is sending me object through WCF service, var a = new Earth(); a.ID= 11; a.Upd...

@Loetn I need it. that's the issue
 
12:18 PM
I guess I could make a hash on the machine name and the ip
 
@AshSimpson The IP may be volatile, and the machine name may not be unique enough.
 
Are there any other simple parts I can use?
 
what exactly do you need to verify?
 
I want to detect pc's that connect to my server
using a socket.
 
the identity of the user? The unique installation of the software?
 
12:19 PM
@AshSimpson CPU id? Hard-disk id?
@AshSimpson ... What?
 
why PCs? Don't you have some way to authenticate clients?
 
All you need to care about is their IP, and possibly, user authentication.
 
yeahp
 
Okay, I can just use the IP then.
 
My shirt smells like cat pee.
It's fucking terrible.
 
12:24 PM
Thanks for sharing that.
 
@Griffin Ahaha
 
I am like slightly throwing up in my mouth
 
@Griffin Simple solution: change
 
@Griffin seriously man
 
@Loetn I don't have any clothes with me. I already am at work.
I was late this morning so I didn't even notice.
 
12:26 PM
@Griffin Ahah, your colleagues will love that
 
My mother is bringing me another shirt but it wont be for a bit.
 
@Griffin go home and WFH?
 
Like another half hour
 
go take a dump for half an hour
 
@Griffin No possibility to work naked?:P
2
 
12:27 PM
2 birds, one stone
 
@Loetn Yeahh that's how you get sexual harassment charges.
 
I just came across a piece of code that duplicates Enum.TryParse
you should take a look
 
@Griffin Depends on the colleagues
 
private static bool PerformEnumParse(Type type, string value, ref object result)
{
    try
    {
        var parsed = Enum.Parse(type, value, true);
        var success = parsed.GetType() == type;

        if (success)
        {
            result = parsed;
        }

        return success;
    }
    catch
    {
        return false;
    }
}
would this even work?
 
@StevenLiekens You should print that out and hang it above your desk as a motivational poster.
 
12:32 PM
there's something seriously wrong with this code
 
Double checked car.
I wish my mother would get here faster.
 
Always keep a spare change of clothes at the office
 
or work near a H&M.
 
or work close to home
 
@StevenLiekens It's beautiful.
 
12:36 PM
html5 battery life API can be used to uniquely identify devices - without explicit permission and without cookies
 
Can anyone help me with my code? I am sending a message from a windows form to a console app, the windows form is the client, and the console app is the server. I am sending a messaeg from client to server but the message that has been sent to server seems null when I check it on server?
public void OnReceiveMessageIncoming(IAsyncResult AR)
        {
            byte[] _buffer = new byte[1024];
            Socket socket = (Socket)AR.AsyncState;
            int received = socket.EndReceive(AR);
            byte[] dataBuf = new byte[received];
            Array.Copy(_buffer, dataBuf, received);
            string Message = Encoding.ASCII.GetString(dataBuf);

            Program.GetLog().Notification("Message from IncomingSocket: " + Message);
        }
 
Any reason you're not using TcpClient and async stuff I'm sure we've told you about on several occasions?
 
@AshSimpson You're never reading any data from the socket
 
because tutorials from 2004 are so much better
 
@RoelvanUden I prefer this, as I know it... and Kendall can you tell me where im going wrong? I got this code off a forum and just started with sockets.
There are no updated tutorials passed 2008... for sockets.
 
12:42 PM
@AshSimpson I just did
 
I just read that as "We've always done it this way. It must be the best and easiest way."
 
Presumably the data is in the buffer that you passed into BeginReceive, so you should be getting it from there
 
It is the easiest way, because there aren't any tutorials out there for updated socket methods.
 
@BenjaminDiele one of the parse methods in that class checks if the given System.Type has a static method that begins with the word "parse" and calls it using reflection
 
@Kendall Frey, here is how I do the BeginReceive.
byte[] _buffer = new byte[1024];
socket.BeginReceive(_buffer, 0, _buffer.Length, SocketFlags.None,
new AsyncCallback(OnReceiveMessageIncoming), socket);
 
12:48 PM
Because tutorials are the only way to learn amiright?
 
For me they are, yes.
 
@AshSimpson Then learn to read documentation
@AshSimpson so then you'll find the data you want in _buffer
 
I can see that _buffer is in the beginreceive method, but how do I get to that in my AsyncCallback method? (OnReceiveMessageIncoming)
 
@AshSimpson Pass it or make it available somehow
 
Before calling socket.BeginReceive, I make a new bufffer
byte[] _buffer = new byte[1024];
the exact same way I do in the asynccallback?
What's different..
 
12:52 PM
Nothing is different, except the second one doesn't just magically know to contain the data in the first one
 
I've attempted to pass it as a param, is that not allowed?
'method name expected'
 
I passed it like this
socket.BeginReceive(_buffer, 0, _buffer.Length, SocketFlags.None,
new AsyncCallback(OnReceiveMessageIncoming, _buffer), socket);
I added _buffer so the new AsyncCallback param in beginreceive to make it avalible in the onreceivemessageincoming
 
Keyboard mashing is not a valid way to write code
You have to know what you're doing
 
I have used a different way
 
12:55 PM
@RoelvanUden dur
 
I have just made it private byte.
 
@StevenLiekens That's just wonderful.
 
Also @KendallFrey , can I ask why my form always freezes when waiting for a response from the server, is that normal?
 
You have told me exactly nothing, so I have to guess
But my guess is, it's "waiting for a response from the server"
 

« first day (1752 days earlier)      last day (3182 days later) »