« first day (1686 days earlier)      last day (3276 days later) » 

12:01 AM
@TravisJ yeah, she had a bad case of it though
@C4CodeE4Exe this help?
2
Q: Cant get the asp.net Web API token using http client

varunI am trying to use http Client to make a call to Web API to get the token.I have one MVC app and Web API app.below is the MVC controller action I have. [HttpPost] public ActionResult Login() { LoginModel m = new LoginModel(); m.grant_type = "password"; m.username ...

 
@SteveG let me check
but its not using await
any downside ?
 
await happens after all of this
so you can still use await
await just says "asynchronously wait for the response", it has nothing to do with the call
 
Damn you, EF!
For some reason my unit tests are using SQLEXPRESS instead of the connection string I provide in the app.config
 
weird
 
BTW - Happy Birthday @Pheonixblade9 :)
2
 
12:08 AM
hey! happy birthday!
 
thanks @ReedCopsey :)
 
@SteveG thank you very much ..it worked.. its fine then
 
great :)
 
@Pheonixblade9 happy birthday :-)
 
:D thanks much
 
12:10 AM
how old are you? 44? 45? jk, i think you're younger than me
later
 
how are you celebrating your day @Pheonixblade9
 
being annoyed by shitty code atm
dunno what I'm doing yet
I might buy myself a stand mixer
might go take a racing course
 
thats nice...I need one too
 
idk
I have no effing idea why this test is using SQLEXPRESS
I have a connection string defined
data-source is the server... initial-catalog is the DB
what the fuck is going on...
any ideas anyone?
 
12:49 AM
entity framework?
 
1:01 AM
check DefaultConnection
then DBContext if using EF
in web.config
 
 
4 hours later…
4:42 AM
 
5:27 AM
posted on May 29, 2015 by Scott Hanselman

One of the things I often talk about when I give presentations on Personal Productivity is that more people should Sync To Paper. I first had this idea in 2006 while working on a completely overwhelming project at my last job. I was already deeply into using OneNote, which was rather new at the time, so I was putting everything onto my laptop. I was convinced that my unorganized brain could

 
6:21 AM
@Feeds Yep.
 
7:01 AM
@VictorioBerra I haven't given much thought to unit testing the UoW itself. It seems like a pointless endeavour to put your data access tech under tests for me, so I never did that.
 
7:15 AM
ALMOST WEEKEND WHOOOOO
2
 
7:29 AM
@BenjaminDiele ALMOST.
 
8:08 AM
@RoelvanUden you take what you get eh :D
 
@BenjaminDiele It's all in the little victories :)
 
8:31 AM
Counting the days until the weekend
0.57
What does the 'C' stand for in 'C#'?
 
8:48 AM
Good bye SourceForge :( helb.github.io/goodbye-sourceforge
@Squiggle C in C# stands for COMPUTER!
 
Given what they did to it, I'm not sad to see it go
 
@Squiggle Found out pretty interesting post that explains what does C stands for: answers.yahoo.com/question/index?qid=20100704194832AAo2sAJ
"What C stands for is it was actually the 3rd generation of a series of developmental languages. Don't laugh to much, but they were labeled A, B, and finally C. If you dig (Google and do a lot of searching), you can find compilers for A and B though they are mostly for historical and amusement purposes. "
 
I know 'D' exists. Not sure about 'E'.
I've dabbled with F# and R.
 
@BenjaminDiele What's it like to work with?
 
@Squiggle I actually don't mind it. It has its fair share of warts though.
The more I work with this stuff, the less it bothers me (hello Stockholm!)
It is kinda sad that there's no decent tooling available. The standard source control is TFS, there's no real IDE, nor a decent debugger.
 
That sounds like PHP :D
 
But despite all that, people and businesses use it and make money using it. Which I find a good lesson that most developers don't know / learn. The tools don't really matter in the end.
@RoelvanUden No, X++ is designed :D
 
@BenjaminDiele That's a lesson every PHP dev has learned. How crappy a language/tooling is, you can still use it to build crap that sells!
 
9:12 AM
^ tru, dat
additionally, sales people often sell things that haven't even been built yet
 
Or something that's almost completely different from what WAS build
 
I've been fortunate enough to never have experienced that
I quite like working on internal business systems.
 
@Squiggle Same here. Except it's internal for the customer :D
My life is much better now that I don't need to care about what Sales promised. It's done when it's done. No sooner, no later.
 
9:28 AM
Yeah, that's nice.
 
Doc
0
Q: How to get GanttTask dependant task?

DocI'm using Telerik's wpf gantt control and I'm trying to find a way to get dependant task from a specific one. For example, given Task 2, I need to get a sort of task2.dependant which should be a list or an array with Task 3, Task 4, Task 5, etc. but task's dependencies have only a .FromTask p...

 
10:08 AM
Any one have used Xamarin Studio?
 
Briefly
 
I am using Xamarin Studio to build cross platform Mobile App
I am new to .net framework as I am Android dev.
 
Welcome :)
 
Thank you :)
I am getting version compatibilty error in refrencing library project
check this
 
hello all
0
Q: Get group by records from many to many relationship table

Vikas RanaI have 3 tables, Person | Book | PersonBook PersonBook table is relaton table between Person and Book Person Book PersonBooks Id Name Id Name Id PersonId BookId 1 rick 1 SQL 1 1 1 2 phil 2 ...

 
10:13 AM
I am not able to refrence library @Squiggle @RoelvanUden
 
@ArthTilva What .NET version is your app targetting?
 
@RoelvanUden My app will be in Android.... :)
So I dont know whether it is targeting it in .net platform or not...but then also let me check
 
Ah, then you are probably targeting some kind of Xamarin target. It's very unlikely you can just use a .NET4 library "as is" under that target. Can you change the lib to target the same Xamarin target, or, make it a PCL (Portable Class Library) lib?
 
Yes I have used PCL
 
@RoelvanUden can you help in above question ^
 
@ArthTilva Yes, exactly, they say to use a PortableLibrary
@ArthTilva I think you selected a wrong one.
 
@RoelvanUden what shoud I do?
 
@VikasRana PersonBooks.Where(x => BookIds.Contains(x.BookId)).GroupBy(x => x.PersonId).OrderByDescending(x => x.Count()).Select(x => x.Key).First() from memory
@ArthTilva Recreate the BouncingGame libray as a PCl library
@VikasRana Oh and a Where(x=>x>3) before the first
 
@RoelvanUden ok deleted
Should I continue as it is given?
 
thanks roel , let me try
 
10:27 AM
@ArthTilva Jup. The tutorial should be fine :P
 
@RoelvanUden (y)
 
10:39 AM
God MsTest is shit
 
@TomW why specifically?
I prefer the language that NUnit/MbUnit uses, for sure, but I haven't experienced any missing features
 
DeploymentItem doesn't work
Loading and running tests is very very slow
Running from some random folder it creates without asking is stupid
 
Hey, guys. Let me ask a question.
How do you think? What is an appropriate size of class (i.e. number of lines of code)? Some people say that more than 500 is not OK. Some people say that class should contain at most 100 lines of code. However, some large and popular open-source projects contain more than 1000 lines of code. What is you opinion?
 
10:57 AM
@YeldarKurmangaliyev my opinion is that it doesn't matter unless you find the class is too big to work with.
 
Argh, those annoying ants. Invasion incoming
permethrin 1, ants 0.
 
11:15 AM
@scheien switch to NAnt. We're in a C# chat room.
 
noted.
:)
Guess I have to replace that old window with a new one.
 
NAnt starts a tricky precedent for naming conventions
So called because it's Not Ant. There are any number of things I could name anything I write based on what it isn't
 
@TomW NWorking?
 
NMessiah. Because it's Not the Messiah! It's a very naughty boy!
 
@YeldarKurmangaliyev Just think SoR and whether it's still maintainable in your opinion
Don't hold to number of lines etc, its meaningless, clarity > all
 
11:35 AM
Hi guys
Anyone in the room with some client-side SOAP experience?
 
It's been years since I've used soap.
 
sure I've done quite a bit with SOAP. What specifically?
 
I tend to wash myself regularly with soap.
I do have quite a bit of experience with that.
 
@RoelvanUden followed by a nice REST?
 
@Squiggle Yes! Very often I rest not late after it too.
XD
 
11:43 AM
that's it. I'm all out of web service puns.
 
Nevermind, my colleague just pointed me to 'known issues' :P
 
Know Issue: Doesn't work
 
@TomW: So NHibernate is Not Hibernate?
 
apparently this SOAP service has an invalid WSDL
 
@scheien dunno if they're following the same convention. But logically, correct.
 
11:45 AM
as in: the sequence of elements in the wsdl doesn't match with what is produced in the response
 
There are probably a lot of other things it's Not
 
hehe
Ah, I love those debugging scenarios where you actually have up-to-date data to debug against.
 
@ActionHank I've had that issue before. It's a pain.
 
@scheien Wow! That's like getting an unicorn for christmas from the easter bunny while hell is freezing over.
 
!
 
11:50 AM
@ActionHank Weird. Is that a newly generated WSDL?
 
Indeed. I guess this is a once in a lifetime thing.
 
By the way, DataContractSerializer orders properties of the data contract type alphabetically - most of the time. It actually uses character ordinal sorting, which ends up as a weird non-standard form of alphabetical ordering that doesn't precisely match anyone else's, normal, notion of alphabetical ordering
I have an SO question about it, one sec
1
Q: XslCompiledTransform ignores ordering of XPathNodeIterator

Tom WI have an XSLT stylesheet that consumes a document and outputs a SOAP message, where the body is in a specific format defined by a WCF data contract (not specified here). The issue is that WCF has a peculiar notion of what constitutes 'alphabetical' ordering and considers the following order to b...

 
@TomW yeah that's the one. I had that when trying to integrate with eBay APIs.
 
Didnt someone else have trouble with sequence ordering? That was related to auto gen stuff?
 
@Squiggle thing is, the WSDL is generated such that the schema type embedded in it should match. It's only an issue if you try to craft your own messages, I've founbd
 
11:56 AM
@TomW indeed
 
@TomW No, it's a webservice for IPTV middleware, I only can develop the client side, the server side is (I believe) written in Java and we do not have the source code (proprietary).
 
@ActionHank hm, ok. Well, if you're calling from the client, you can annotate the data contract type with [DataMember(Order = N)] to force it to be serialized in the order the service expects
I guess you'd find out by trial and error what order it actually wants, if the WSDL is wrong
Who produces the middleware? Have you reported a bug with them?
If you have any contractual arrangement, just demand that they fix it?
 
The funny thing is: using the WSDL in a Service Reference you can actually send data 'as is' (it will take it in that order). However, receiving a response produces a lot of 'null' values as the client side (code generated by service reference) expects the WSDL order gets another order (I can prove that with SOAPui)
 
Yep, so if I understand correctly you can make the serialization mechanism expect the real order using Order=
 
It's from Nordija (Danish company). We have filed a report but up until now it wasn't really a problem as I have worked on the SOAP interface with Ruby (Savon), which just converts the XML to a Hash for me and I have to create my own objects
@TomW Yes, or correct the WSDL and re-create the service reference
 
12:12 PM
yeah, that could work. Probably easier than combing through the datacontract yourself
 
Hi guys
!!!
 
shhhh
 
but
ok
 
shh.
 
12:34 PM
@Squiggle another reason mstest is shit:
Occasionally refuses to copy required dlls to the test folder, causing things like EF to break
 
lolwut
Sounds like you're having a fun day, Mr. W.
 
1:05 PM
Boss to colleagues: Woss gahn on 'ere slapheads? (Both colleagues are bald)
 
classic Boss
wot a ledge
 
1:32 PM
here we see the Europeans in their natural habitat. Their behavior and mannerisms bear a striking resemblance to those in the Americas but with dramatic exception.
 
1:52 PM
Oh wise folk of the C# Chat Room, I have a question for you. Quite often my developers write code like this:
                try
                {
                    externalStorage = doc.SelectSingleNode("//EXTERNALSTORAGE").InnerText;
                    documentId = (Convert.ToInt32(doc.SelectSingleNode("//DOCUMENTID").InnerText));
                    TimeStamp = doc.SelectSingleNode("//TIMESTAMP").InnerText;
                }
                catch(Exception ex)
                {
                    externalStorage = string.Empty;
                    documentId = 0;
                    TimeStamp = string.Empty;
 
@SpencerRuport u wot m8
 
Am I crazy to prefer an extension method over it?
    public static XmlNode SelectSingleNodeOrEmptyElement(this XmlNode node, string xpath)
    {
        XmlNode selected = node.SelectSingleNode(xpath) ?? new XmlDocument().CreateNode(XmlNodeType.Element, Guid.NewGuid().ToString().Replace("-",String.Empty),null);
        return selected;
    }
 
@Darek not crazy at all. That's quite elegant.
Personally I prefer to deserialize XML into actual C# classes instead of navigating the DOM via XPath and extracting values
 
@Darek No. That's nicer.
 
Very true, but that's simply above their heads
 
1:55 PM
Educate them.
 
Spent 2 years trying ... Their resistance was not futile, my efforts where.
Leaving the account soon
 
I agree @Squiggle, even more so after yesterdays xml rant.
 
in fact, the first lot of code you posted is pretty awful. It uses exceptions as control flow.
 
Convert.* is a shame
 
They do love exception based programming style, I must say
 
1:59 PM
// if my code isn't good enough
try { /* flail wildly at the keyboard here */ }
// then give up
catch (Exception e) { /* dunno why this failed perhaps C# is broken */ }
 
Here is another version
    public static XmlNode SelectSingleNodeOrEmptyElement(this XmlNode node, string xpath, string defaultInnerText = "")
    {
        Func<string, XmlNode> emptyNode = s =>
        {
            var newNode = new XmlDocument().CreateNode(XmlNodeType.Element, Guid.NewGuid().ToString().Replace("-", String.Empty), null);
            newNode.InnerText = s;
            return newNode;
        };
        XmlNode selected = node.SelectSingleNode(xpath) ?? emptyNode.Invoke(defaultInnerText);
        return selected;
Permits an optional InnerText value
 
Why are you creating a new XML Element with a random guid name?
 
Just so it is truly unique. I agree it could be static.
I could parse the xpath too
but its Friday, and I am especially lazy this morning
:D
 
"truly unique"? It's an XML element. Aren't you working against a schema?
 
Guid are not guaranteed to be unique, but the chance of getting a match is really slim.
 
2:01 PM
But you are right @Squiggle, can be made better
 
:-]
 
<--- shoots the client that wants to use SBS as a webserver!! TGIF?
 
The CoCreateGuid function calls the RPC function UuidCreate, which creates a GUID, a globally unique 128-bit integer. Use CoCreateGuid when you need an absolutely unique number that you will use as a persistent identifier in a distributed environment.To a very high degree of certainty, this function returns a unique value – no other invocation, on the same or any other system (networked or not), should return the same value.
    public static XmlNode SelectSingleNodeOrEmptyElement(this XmlNode node, string xpath, string defaultInnerText = "")
    {
        Func<string, XmlNode> emptyNode = s =>
        {
            var newNode = new XmlDocument().CreateNode(XmlNodeType.Element, "EMPTY_ELEMENT_FROM_XPATH", null);
            newNode.InnerText = s;
            return newNode;
        };
        XmlNode selected = node.SelectSingleNode(xpath) ?? emptyNode.Invoke(defaultInnerText);
        return selected;
    }
 
<root>
    <child><6dcfe2664a0984278720f41b6ac6483c>awesomesauce</6dcfe2664a0984278720f41b6ac6483c>
    </child>
</root>
like that?
 
@juanvan - Are they living in 2005?
 
2:06 PM
1995 - with a splash of Dual core
 
ha :)
 
@Squiggle, the code flow is only interested in the InnerText if exists or default value if it does not. The resulting node is not processed in any other way.
 
/me makes a face
 
hello
 
XML as anything other than a namespaced serialization format makes me go ¬.¬
 
2:15 PM
I have a question about Microsoft.Speech
2
Q: C# Microsoft Speech Recognition for Numbers

Kasparov92I want to build my grammar to accept multiple number. It has a bug when I repeat the number like saying 'twenty-one'. So I kept reducing my code to find the problem. I reached the following piece of code for the grammar builder: string[] numberString = { "one" }; Choices numberChoices = new Cho...

 
i prefer linq2xml myself
Also, its friday! So close to putting in a 2 week notice today.
and its only 9:18am
 
really?
what's pushing you over the edge?
 
Publishing on Friday afternoon? Sounds like a solid plan. Goes for it
@CharlieBrown Whaddup over there?
 
lol believe or not, i just did a deploy like 15 minutes ago
 
@tweray Haha. I did this too, now. In my case, it's only an internal app. :P
 
2:29 PM
it's a internal service update here... 80% of the code is done by a junior guy, so i am now crossing my finger and hope it at least won't break anything else lol
 
2:41 PM
hola
 
@CharlieBrown what's making you do that?
 
hi
 
Hy
 
why I'm getting this error Parsor Error Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="CSASPNETSearchEngine.Default" %>
 
2:57 PM
Does it contain a class that derives from Page?
Does that code behind exits?
 
yes it has code behind file too
 

« first day (1686 days earlier)      last day (3276 days later) »