« first day (1476 days earlier)      last day (3465 days later) » 

12:05 AM
well, watched all of it, pretty cool stuff
thanks for the link @Kendall, you are an interesting person lol
 
no, TED is an interesting show
Basically every talk blows your mind
If you haven't ever watched a shitload of TED talks, do so now.
 
Maybe I will turn some on in the background instead of netflix on my surface
 
Anywho I'm back.
Why are you suspicious of me D: I'm in here all the time lol.
 
You smell funny
 
 
6 hours later…
6:42 AM
posted on October 31, 2014

The last three weeks have been busy ones for Azure.  Two weeks ago we announced a partnership with Docker to enable great container-based development experiences on Linux, Windows Server and Microsoft Azure. Last week we held our Cloud Day event and announced our new G-Series of Virtual Machines as well as Premium Storage offering.  The G-Series VMs provide the largest VM sizes avail

 
6:57 AM
Hi anyone here
 
7:24 AM
hi
doubt
 
Hi @Lijo
 
yes
 
I had created an DataContext File
sorry DataLayer and used entity framework 6 in it
but when i try to instantiate the class
it gave me the error
Could not load file or assembly 'EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
 
 
1 hour later…
8:33 AM
Hi :D
 
Hi @SebastianL
 
Anyone knows what good coding style is for WSDL files?
 
 
2 hours later…
10:07 AM
hi guys
need some help in wpf
trying to bind data to my combobox like so pastie.org/9687370
with no luck
using winforms logic/understanding so might be totally klost
@Sippy wake up dude
 
@Gotalove I'm awake
I don't know shit about binding in WPF
I don't use peasant technologies! Muahahaha
 
aaaah fuckd
hahaha
who here might help.Ping someone you know can help Sippy.All my buddies in Asp couldnt help
@Sippy
 
Iunno
Shaun could LOL
I think he got fired, honestly
For being a n00b
 
@Gotalove there's a room called WPF

XAML

A friendly room for discussing XAML based technologies. Our Co...
greetings btw
 
@MosesAprico thanks let me try my luck
hahaha @Sippy
 
10:14 AM
anyone ever deal with XmlSerialization?
 
Hope not
 
        public void ReadXml(System.Xml.XmlReader reader)
        {
            if (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName == "Classroom")
            {
                Grade = int.Parse(reader.GetAttribute("Grade"));

                if (reader.ReadToDescendant("Students"))
                {
                    if (reader.ReadToDescendant("Student"))
                    {
                        while (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName == "Student")
and
        public void ReadXml(System.Xml.XmlReader reader)
        {
            if (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName == "Classroom")
            {
                Grade = int.Parse(reader.GetAttribute("Grade"));

                if (reader.ReadToDescendant("Students"))
                {
                    if (reader.ReadToDescendant("Student"))
                    {
                        while (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName == "Student")
they both make a solid file and identical
But, I'm kinda confused on reader.Read();
when exactly do I need to called it?
P.S. The top code has only 1 reader.Read(); while the bottom one have 2
 
What are you trying to achieve?
Parsing the file?
 
Yeah. Deserializing
It succeed either way, just curious, since I rarely found a case which different code produce the same.
(Even though it actually doesn't)
 
10:30 AM
It actually doesn't what?
 
doesn't the same behind code since if I use 2 reader.Read() then the last state of the reader is {None}
while if I use 1 reader.Read() then the last state of the reader is {EndElement, "Classroom"}
 
159
Q: How to Deserialize XML document

AlexHow do I Deserialize this XML document: <?xml version="1.0" encoding="utf-8"?> <Cars> <Car> <StockNumber>1020</StockNumber> <Make>Nissan</Make> <Model>Sentra</Model> </Car> <Car> <StockNumber>1010</StockNumber> <Make>Toyota</Make> <Model>Corolla</Model> </Car> <Car

I think the way you're doing it .. might be kinda laboured
And hardcoded.
 
I'm trying the hardcode way, since my actual application require that. (A lot of special cases, which fails if I use the express way) ;)
 
@MosesAprico Fair enough I guess .. I'd still try to find a better way around it.
 
@Sippy so, is it supposed to {None} or {EndElement, Name="Classroom"} ?
I'm guessing the latter
since if I add the third reader.Read() after the value is {None} it doesn't invoke any error
just still {None}
 
10:46 AM
I don't know, honestly
 
Morning
 
@MosesAprico reading a document is a lot easier with XmlDocument and SelectNodes & SelectSingleNode
 
11:18 AM
@MosesAprico XmlSerializer can deserialize an entire graph into POCOs in one go. Combining XmlReader and XmlSerializer can allow you to parse HUGE files in much the same way, but with little effort. There is often no real reason to take the approach you're currently on.
Furthermore, if mapping to a POCO is undesired, doing a XElement parse on the reader gives you DOM-like access and queries that can be tweaked to your desire.
 
@RoelvanUden I would really really avoid XmlSerializer if at all possible.
 
For simple POCOs it's quite efficient. Why would you avoid it @KendallFrey?
 
It does things strangely, thus when things go wrong it's hard to determine why
 
> The Partner Orchestration option allows us to implement two patterns: Forward Partner Orchestration Direct Binding and Inverse Partner Orchestration Direct Binding
Fuck BizTalk.
 
my anus clenched when reading that
 
11:29 AM
that's many people's reaction to BizTalk
I have an exam on monday.
BizTalk is kind of nice at its core and it's easy to forget the amount it does for you, but the tooling is largely dire and written by people who are obscenely awful at naming and organising
it's mostly declarative in a weird kind of way, so it mostly entails saying what you want rather than writing code that says how to do it, but it speaks this really eccentric dialect of SOA that takes a lot of learning
"I don't know where your server learned to communicate, but it has the most peculiar dialect..."
 
In our user db lets say the user have five different rights settings: normal, e1, elevated, e2, admin(they are all bools). And in the app we have things like if user is elevated or above then... would you create a enum Rights and check like user.Rights >= elevated or would you create additional bools in the user object, so you could do ´if (user.elevatedOrHigher)´?
 
@KendallFrey I lold
 
or would you do if(user.elevated || user.e2 || user.admin)
My feeling is to use the enum, but I thought that maybe you had some advise against it?
 
11:47 AM
@Markus are they mutually exclusive?
 
I'd say that they all work, but I'm asking because I thought that you maybe had something against one of them
since you (all) know better :)
 
@Markus If your permission logic is hierarchical then yeah
 
@Markus I meant the roles
are the roles mutually exclusive
 
Otherwise just use roles
 
can I be normal and admin?
 
11:49 AM
Ah ok, no, you could be both e1 and elevated
 
@Markus Then you're doing something wrong.
 
Then use roles as Sippy suggests
roles table with those in, users table and many-to-many relation table between the two
 
The way you're doing it is suggestive of progressive permission rights
So e1 can do e1 + normal
elevated can do elevated+e1+normal
But you're then trying to incorporate the ability to belong to specific rights
It won't be simple, even if you find a way to make that work.
The simplest answer for you is activity based authorisation based on user roles
So assign each user a logical business role and then for every activity store a list of roles that can use it.
 
Mm I see your point. thansk
 
Also with roles a user may belong to more than one
With little to no conflict.
 
11:55 AM
I saw a neat but initially baffling pattern for doing this in our code yesterday
for a [flags] enum, work out whether any of the values given are at least Nth in the list of enum values, where the enum is sorted by 'bigness' (or whatever); it did something like take the bitwise complement of the minimum desired value and & it with each of the specified values...or something
it used the ~ operator (bitwise complement) which I've never ever used before
</cool story bro>
 
I take it you've never codegolfed
~ is a cool little operator
 
nope, I'd probably suck at it
 
It's fun
also for obfuscation
I like using -~[]
not only because it resembles a sperm :D
 
@RoelvanUden Have you ever had a validated control that wouldn't validate like a normal validated control?
All the others work except this one
 
@Sippy I have no idea what you just said
 
12:02 PM
Hahaha
I realise that was retarded
I have an input element, it has an autocomplete. Every other element validates using jQuery validation and the dataannotation tags
But even though this input element has a dataannotation tag it doesn't display any validation errors.
 
@KendallFrey subtract the negation of empty array...hmmm..
 
HAPPY HALLOWEEN EVERYONE!!!!
11
 
Ah
I was trying to validate the hidden field that my autocomplete populates
$.validator.setDefaults({ ignore: null });
 
well presumably to negate the array has to cast implicitly to something numeric...a pointer? Is it just taking the memory address of that array and negating it? i.e. meaningless large number?
 
No Holiday Spirit from you people...
 
12:09 PM
@JLott BAH
 
:(
 
@JLott British. We don't Halloween. At least, the traditionally-minded of us don't
 
That is sad :(
 
@TomW no
 
I am 1970s Dolly Parton today :)
 
12:10 PM
That's not true at all of course, pumpkins have spread like a virus, but it's not 'traditional'
 
My family never did halloween cos it is an American holiday
 
people my parents' age consider it an American import and will have nothing to do with it
 
I love all holidays
 
And yet a lot of Brits still do valentines day
Both are equally comparable.
 
Oooo I love Valentine's day
 
12:16 PM
still gonna watch zombie films and drink [misc] tonight tho
 
^That's the spirit
My fiance says I have to wait until after Thanksgiving to put up Christmas stuff.. Totally not happy about that.
 
@JLott Lol you sound like a very quirky person.
As a Brit I am not used to that.
 
I am different I guess haha. I just get excited about fun things
user image
4
Rocking this hair today though
 
Even though none of you probably know who Dolly Parton is....
 
12:20 PM
I know the name
singer?
 
Yep!
Famous country artist :)
 
@JLott Fun things, blegh
 
that would be why I don't know her
 
I hide under da sea.
 
Brought my guitar to work haha just in case I get the urge to bust out some Jolene
I think it is required to know at least one Dolly Parton song in the South
 
12:26 PM
That hairdo is crazy
 
She is known for that
 
@JLott ooft
 
@Gotalove lol
 
@Sippy What????
 
@JLott That's the british equivalent of a wolf whistle.
Hahaha
 
12:30 PM
She is a fine woman haha
 
That hair is big.
like biiiiig.
 
That picture is probably about 40 years old btw. She old now.
 
the hair extensions or weaves or whatever their called on that head can be used by 3 bald women. :-P
 
so don't go googling for...you know, whatever you guys google for
 
hahaha @TomW 'you guys'
excluding yourself sneakily?
 
12:33 PM
I'm shrewdly following my own advice
 
haha perhaps a better alternative would be ~ in her youth :-D
 
F*ck I hate JavaScript sometimes.
 
:D random encounter is random
 
Haha yeah that pic is from the 70s. She was about my age then
I always hate JavaScript..
 
@JLott whyyyyyyyyy
 
12:35 PM
why
JS is not that bad or evil
 
just made a function call where I meant to do a callback
 
Hi,Is it good practise to use virtual methods in abstract class? Context- I have abstract customer class from which I derive Employee,Manager and Company classes.Employee and Manager have same methods functionality,but Company have different.
 
I am just learning it.. sooo I hate it right now lol
 
@SebastianL Yes, it mostly is
@JLott Protip: don't use ==
that'll take care of half of it right there
 
Hahaha that is difficult for me to break
 
12:50 PM
@KendallFrey I still don't get why == and === were differentiated in the first place.
 
They obviously came up with ==, then realized they were utter idiots, but couldn't replace it for fear of breaking code.
 
@KendallFrey That's a .. very concise and believable answer ..
I'm not a very intelligent person.
I used to be, I swear ...
 
@JLott Strict JSHint settings help you understand and code better.
 
whats the wpf combobox that allows you to type in?
basically the winform equivalent of combobox with attribute dropdown
 
a combobox by definition allows you to type into it
a WPF ComboBox can be either a combo box or a dropdown
 
1:19 PM
hey kendal
when you have a second could you look at this question?
in regards to yesterday
 
angular question: How do i ng-show depending on if an input field has the ng-pristine class?
&& test.city.$dirty
 
@QuestionQuestion That's not even remotely similar to a question
You seem to say "I have A, it does not give an error, but I have B and it does give an error. How do I make it not give an error?"
There's only one possible answer to that. "Use A"
 
@Steve i think there should be a field.$pristine variable available instead of checking if it has the ng-pristine class
 
1:45 PM
@Sippy RE intelligence: saw a good analogy on some guy's blog once: "Good programmers avoid nasty little problems for the same reason models avoid cheeseburgers. Nasty little problems make you stupid"
 
@TomW Heh
 
@Rovak yup that was it, i'm running into an issue now where the forms are dynamically created in an ng-repeat and I can't add a custom name to them.... how do I disable buttons? lol
#rageAgainstAngular
 
@KendallFrey I know what you are saying, but, and correct me if I am wrong, when trying to display the median, I shouldn't be calling the MAX or MIN values within the group. I want the value in the middle of the group to be displayed. A works in report builder and mngtstudio and b works in mngtstudio but not reportbuilder
so I am wondering how to overcome that
 
is a "Type-Safety check" (in the .NET CLR) in layman terms mean the compiler checks to make sure your not setting INT values to STRINGS etc?
 
that sounds like a college quiz question :p
 
1:57 PM
yes, self training.. just want to make sure I understand it
in layman terms
 
@QuestionQuestion I did see a 'fake' median somewhere, where you SELECT LAST 1 FROM (SELECT TOP 50 PERCENT FROM ...)
not sure if that's helpful or not
 
alright, thanks
 
2:10 PM
I don't know if that makes what I said any clearer or not.
but that's what I wanted to do.
Now I'm getting lunch.
 
I should answer more SO questions. Being called a GOD is kinda nice.
 
2:27 PM
Hello, can someone help me with a StackOverflowException? This is my controller action pastie.org/private/rhdkyqk1sn66vsyon49fw is runs, returns the view and model everything looks good, then two seconds later BAM! SOE.
 
@VictorioBerra Tried sticking breakpoints in places?
 
What up guys. Is there a way to have a property oberve another property?
I.e. I have one property that is bound. But then I have another property, on another viewmodel, that I want to be bound to the property of another viewmodel. That may change.
My only option is to use delegates, I was hoping theres another way?
 
@Asheh are your viewmodels INotifyPropertyChanged?
 
Ive just noticed, yes. I can subscribe to propertychanged?
 
that's one way to do it
 
2:43 PM
:D solved my own problem
 
not really abstract enough for my tastes but should work quite well
you have a reference to viewmodel a inside viewmodel b there, which smells a little
 
Hmm well ViewModelA is basically my Database
ViewModelB presents the data in a different way
from ViewModelA, to the View
 
Rx is a nice framework for that sort of thing, similar to events, a viewmodel can take an IObservable<T> and subscribe to it, doesn't have to care where it came from
 
@Rovak still around?
 
yep
 
2:50 PM
ng-disable doesn't get executed when the scope changes consistently....
$scope.areFieldsValid = function (addressId) {
return $("#boxLocation-" + addressId + " :input.ng-invalid-required").length === 0;
}
thats what i'm calling from the ng-enabled directive
i dont know what to do now lol
 
you should not use jquery code in a controller
 
@Asheh doesn't that make it a model then?
 
@Rovak i dont have an option at this point because I can't set dynamic form names
 
if there are not dynamic are they at least unique?
can you refer them by something like formObject['fieldname'] ?
formObject["boxLocation-" + addressId"].$valid
 
if i could ng-form={{'form-' + addressId}}

then ng-enabled="{{'form-' + addressId}}.$valid"
hm one sec
I don't know.
 
2:55 PM
@NETscape it could be described as a model. But the problem is it grabs the data from a Database using PInvoke and I have a view that directly binds itself to the data in ViewModelA
So its sort of a ViewModel ...
 
@Rovak What i'm looking at attemtping now is setting the form like: ng-form={{'form-' + addressId}}

Then in the ng-enabled method do something like:
// get form-asdfasfasdfasdf
// return theFormObject.$valid

Is that a bad path to go down?
yeah thats bad lol
 
its not that bad, its the angularjs way
 
how do i get the formobject at that point? I can't use the element id, or anything... and its dynamically created with the address id...
oh wait, you're saying wrap the entire page in the form?
 
the form should be inside a angularjs controller
 
huhhhhhhh
 
3:08 PM
and then you can refer it in the scope like $scope['form-' + addressId]
im not sure if the dash generates a valid angularjs formname
 
how do I add my forms to scope? The link doesn't show that
 
@RoelvanUden my app can't be serialized plainly. otherwise I would be very happy
 
@Steve if the form has a name then it will automatically be available in the scope
 
3:24 PM
can't dynamically set a form name... which puts me back at square 1 :(
ahha, might have gotten it
 
@Asheh Database should be a model. The PInvoke should be in a service class, and the viewmodel should be DatabaseViewModel, and the "other view" for it should be a DataTemplate, are my initial thoughts.
 
Anyone know of a book or an area where I can really learn the in and out of Sessions / Cookies. Especially for a security purpose?
I want to learn more about Sql Injection, Cross Scripting, DDoS, Bots, and other attacks that commonly focus on web-sites. So I can learn to better protect my projects against it.
 
@Greg DDoS protection isn't done by you.
 
@Steve what prevents you to dynamically set a formname?
 
3:32 PM
@Sippy I maintain a part of our network. :/
 
Your ISP prevents DDoS
Not you.
 
xss-game.appspot.com is pretty fun to learn about XSS
 
In cases where you want to protect an externally hosted website, the (DNS provider?) would take responsibility.
 
@Rovak angular is, i can't have an angular expression in the name field thats valid
 
Cloudflare has good DDoS protection iirc.
 
3:34 PM
@Sippy Thank you for that link.
@Rovak Yeah, I saw that. Looks good.
 
or maybe i'm just doing it wrong, idk, either way
 
@Greg Np, OWASP is a standard that is updated regularly to reflect top issues I think.
 
@Greg Use @Sippy link. Then scour along owasp and do their tutorials and shit (where you have to set up a VM and attack all kinds of vulnerabilities). It's a good lesson.
 
Hi all. I'm stuck with cookies. I'm not sure if this is something obvious or not. I set some cookies on a landing page, and the cookies appear as expected in Firebug. When I set the cookies, I also write Response.Cookies["Test"].Expires = DateTime.Now.AddDays(1);

The landing page has some querystring values, which is what populates the cookie values. WHen I remove the querystring from the URL and refresh the page all my cookies are lost. Is this issue with me? Or is this more likely a browser thing?
 
@Dave Have you got a handler in your 'cookie setting method' for when the query string is empty?
 
3:38 PM
Ah, this is a C# room :) I'm doing it all in C# ...
 
Assuming it runs every time your landing page does.
 
It runs every time my landing page does yes
I have an if else. If query string exists, here are the cookie values. If not, use the existing values
 
are you doing a redirect when you try to set the cookie?
 
@Steve, not at the moment, there is no redirect at all
 
hm
 
3:39 PM
I'm happy to share it so you can see it?
 
by all means, but i probably won't know the problem
 
It has to be my code really...
let me play with it more actually
no
 
@RoelvanUden I'll definately look into it.
 
actually, can you verify the same issue
Try http://tracking.amemailer.com/?mailid=10&email=myMail

And note, cookies set. Then, from the URL, remove the querystring, hit return and see no cookies. I can only assume the fault is most likely my code? But if someone can test and confirm
 
got the code for it?
 
3:42 PM
actually, the code is a mess (when isn't it!). I'm going to just test one more thing, doing a quick publish, then will share code
 
Oldschool printline debugging
Nice, lol
 
:)
 
Reminds me of PHP
 
the problem is, i'm setting the cookies on one site. It is mail shot tracking. When they visit the real site, it calls my site...
The cookies remain only on the tracking site, hence why I'm struggling with debugging a little because it is also on a different thread to ensure the forwarding happens very qucikly (eventually)
sigh, I have other things todo with guitars ...
 
@Dave Depending on the path, the cookie applies ONLY to the specified directory and domain and WILL NOT be sent to anything outside of the path or domain.
 
3:46 PM
That is fine @Roel - because I'm using the cookie to keep track of who - I then use the HTTP_REFERER to see what page they were on.
Thanks though for advice :)
This is the issue (to explain clearer). I visit mysite.com/?p=this and in the code behind, I set a cookie, based upon the querystring value p

If I go to any other page on the same domain and server, I'd expect the cookie to persist, but it doesn't
 
@RoelvanUden You know of a good book on the new ASP.NET vNext Stack?
 
@Greg Doubt there is one. They are still building it.
@Dave Perhaps I wasn't clear enough. Or you. If you set a cookie at /Local/Tracking and then send the browser to /Paint, the cookie is not sent because /Paint is not part of /Local/Tracking. Ergo, you need to set the cookie with the path / because everything on that domain is part of it. Not sure if this helps, but questions related to cookies are usually that.
For sanity; just look at the Set-Cookie HTTP header.
 
I'm starting with /local/index.default.aspx?querystring and then visiting /local/index.default.aspx - The only difference is the lack of querystring. Am I right in thinking the cookies should persist between these 2 pages?
 
@RoelvanUden What about MVC 5?
 
Or do I still misudnetsand you :(
 
3:55 PM
@Dave Yes, you are correct in that case, assuming of course the Set-Cookie is sent as expected, accepted by the browser, and correctly sent back to the server. Verify the HTTP headers.
 
Well, I need to Google that. HOwever, when I first visit tracking.amemailer.com/?mailid=5&email=something the cookies is set fine
It appears in firebug... but I don't know (as you're suggesting) how to check if it's all correct (is the expire set correctly)...
 
@Dave In Chrome, just pop over the dev tools and go to the network tab. You can see the request and response http there
 
OK, will fire up chrome
 
FireBug in Net tab does the same
 
@RoelvanUden Thank you.
@RoelvanUden Your always so helpful.
 
3:57 PM
@Greg :P no problemo~
 
odd. In network on Chrome, it remains empty...
 
Just refresh and hit the 'Preserve over navigation' checkbox to avoid it being cleared on redirect
 
Yes, I did that...
what have I done to this site...
ah, recording wasn't on :)(
:)
All I see in network is the 'get' for the query string... I can't see anything about cookies :S
But, they do exist in REsources -> Cookies
And it expires 2014-11-30T16:......
So, that appears to be correct?
Is this right?
If (there is querystirng) {
Response.Cookies["MailShot"]["Address"] = Request.QueryString["email"];
Response.Cookies["MailShot"]["MailId"] = Request.QueryString["mailid"];
Response.Cookies["MailShot"].Expires = DateTime.Now.AddDays(30);
}
phone brb
 
I don't care what your code says, look at the HTTP traffic. :-P
 
@RoelvanUden I'm a little rusty on the stack, so I really want to dive into it. Understand it in great detail.
 
4:04 PM
 
@RoelvanUden Do you know if that book goes into Sessions / Cookies through the stack?
 
@Greg That APress book does well. Otherwise just read up on HTTP protocl
It's a really, really, REALLY simple protocol especially concerning cookies/sessions
 
@RoelvanUden Okay, thank you.
 
Where does ildasm live again?
 
Odd... The cookie remains, but the values don't!
 
4:10 PM
@KendallFrey dunno but developer command prompt > echo path
 
 
hmm, stfu self, that doesn't work
 
Removing the querystirng, reoading the page shows
 
@KendallFrey C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\ildasm.exe
there are in fact 7 copies of ildasm on my machine. Wtf, microsoft
 
4:26 PM
Do any of you guys have the link to Lipperts bloig about benchmarking?
 
@TomW ah, shit, I was thinking Windows SDKs, thanks
 
@dav_i Fiddler shows that I recieve a 200 OK. Everything looks great. I have my data. But then VisualStudio crashes with this error: "An unhandled exception of type 'System.StackOverflowException' occurred in System.Runtime.Serialization.dll"
I dont know how to debug that.
 
@VictorioBerra its likely caused by your object graph being circular
if you send back a class that has a list with classes that back reference, it becomes a circular serialization problem
 
If I wanted to parse a SQL query using C# in order to perform some optimizations on the query, do I need to make a grammar or does someone know another way?
 
4:46 PM
@TyMorrow scary
 
How many programmers does it take to debug an internal framework written by said programmers?
So far: At least 3
 

« first day (1476 days earlier)      last day (3465 days later) »