« first day (1012 days earlier)      last day (3940 days later) » 

user142019
5:00 PM
@Pyikun Oh yes.
 
@rightfold JS has those too.
 
user142019
JS = GTFO.
 
user142019
Time to shower and eat. See you later.
 
They can be implemented in C# too
 
user142019
If you do that, GTFO.
 
5:01 PM
I notice you didn't say C# GTFO
 
Nothing like discovering that one of your bosses is a dictatorship sympathizer
 
Can you imagine a world where C# was used for everything
 
"C Pound" according to my CEO
 
C-Octothorpe!
 
C-TicTacToe
 
5:02 PM
wtf
I wrote a tic-tac-toe OS
 
C-Hashtag
 
lawl
 
I'm doing it wrong.
 
@Pyikun It's called a hash, not a hashtag
 
@KendallFrey Dude.. go get laid. Stop developing weird stuff.
 
5:03 PM
#thisisahashtag #<-thisisahash
@AndréSilva Want to help me make a parser? :D
It's on Github!
 
@KendallFrey I was making a Twitter reference as best I could.
 
Ryan: Hey, [Dev], I'm doing a code review and I noticed the code doesn't compile
Dev: Well I did the changes you asked, I didn't know you wanted me to compile it before checking it in.
Ryan:....
 
@KendallFrey I'm going to make a woman.Parse(Kendall)..
 
Is there a 5 face, face palm anywhere?
 
Does this work ?
 
5:06 PM
Thank you
 
holy shit...
 
26 secs ago, by André Silva
user image
 
@Pyikun Haha nice one.
 
It's just not happening
 
5:07 PM
needs file extension
 
Upload link to imgur
 
Hey guys, I need help with a memory leak issue.
 
@RyanTernier he hasn't even got to the "fuck it, it compiles, commit" level of competence yet :P
I'm at the "run the test suite before checking in" level of competency, at least
I think that's pretty good
today, from NVIDIA's "compensating for something" division, the Quadro K6000!!!!! anandtech.com/show/7166/nvidia-announces-quadro-k6000
 
5:16 PM
We have in SVN:
Task Branch (Local development - do your test cases)
Release Branch (before you comit, you run BuildAndMakeDistribution. Makes install packages and runs tests. WHen this pases you can check in).
Trunk (God help us if anyone checks into this except the lead, after the project has hit production)
 
we have a dev branch that is built daily. People create feature branches, work off of them, and merge to dev when it's ready to test. When QA passes in dev, it gets set to a weekly release to test. It gets verified in test, then gets merged into release/current, then is built and released, then merged into master
 
Is it acceptable to ask quick questions in here?
 
You just did
 
@Hubrid Yes
 
Isn't the namespace to include for the GetSqlXml() method System.Data.SqlClient? I keep getting th error that there is no definition for GetSqlXml()
the*
 
5:21 PM
Did you add the reference to your reference folder ? Sometimes is an extension
 
Show us the code
 
SqlXml sqlXml = reader["ScenarioData"].GetSqlXml();
@Andre
oops sorry, well i'm not sure... i included the using System.... but I didn't manually add any reference to any reference folder
 
uhh... SqlXml is a type?
 
Not the using
The dll reference
 
don't you mean SqlXmlReader?
 
5:23 PM
@Pheonixblade9 GetSqlXml returns a SqlXml
 
and i've been reading the MSDN docs
 
Blarglemuffins
0
Q: Enforcing self-referential generic type constraints on implementors

BracketworksGiven the following interface definitions: public interface IFoo<TBar> where TBar : IBar<TBar> { } public interface IBar<TBar> where TBar : IBar<TBar> { IFoo<TBar> FooProperty { get; } } And some naive implementations: public class Foo<TBar> : IFoo<TBar> where TBar : IBar<TBar> { } publ...

 
0
Q: Google TTS string issue on c#

Sutharshan SuthanI am using google text to speech (TTS). Guys you all know it has only 100 character string support at a time. I have implemented TTS part correctly but not for greater than 100 characters. So as I said I'll get exception. public void Read(string text) // Lets say text has length 250 (>100) ...

 
@Hubrid Check if there is a DLL Reference to System.Data.SqlClient
And check if your project is compiled to ClientProfile
 
ok checking
 
5:26 PM
Kendall, sorry for not answering your question. I'm trying to use that RegEx to clean the keys and not the values of a string with JSON text. Based on your earlier suggestion for RegEx, I am only targetting the values and not the keys. I will paste a link to the evaluated results.
 
I really don't think you want to be using regex
 
I know... but I'm exhausting almost all my options. I need to clean the JSON so that I can convert the JSON into valid XML using Json.NET.
 
no i don't think the dll reference is there
 
add it
 
@Hubrid So Add Reference and add it. If you don't find, change your compilation method and get the same framework but without Client Profile.
 
5:29 PM
@ProfessorElm How about you deserialize it, process it manually, then convert it to xml?
 
its not under assemblies/framework
 
> Assembly: System.Data (in System.Data.dll)
 
@KendallFrey I've tried to and I can not seem to get it. I sincerely spent all night trying to.
 
What have you tried?
 
I tried deserializing the json. I tried walking through it and updating it. I don't quite understand the whole JProperty/JArray/JToken information.
 
5:32 PM
I just use JavaScriptSerializer :P
 
They named the royal baby after my son, they're so kind
 
@RyanTernier don't forget about baby north west
 
@RyanTernier He has a name?
 
George Alexander Louis is the baby's name.
My son: Aidan George Alexander Ternier
 
How does Google not know that?
 
5:37 PM
> This is not extra virgin olive oil. It tastes and smells like petroleum. I bought this because I thought that Rachel Ray wouldn't allow her name to be used on an inferior product. Very disappointed.
 
Isn't it Rachael Ray?
 
Guys I just had some coffee get ready for the best code to be written
Actually it will probably be terrible code but there will be A LOT of it
 
I have a byte[] b = new byte[1024]; which is filled with data. all the data in it could be represented by a ushort[512], however the byte pairs are in little endian. Is there a way I could take b, Reverse pairs of the bytes (i.e. flip index 0 and 1, index 2 and 3, etc.), and turn it into a ushort[]?
 
@NETscape do you want like, an elegant way of doing this? or just some way. Because you could probably just iterate through, switching the bytes, and then cast it as a ushort?
 
looking for least amount of clutter.
i would prefer efficient, but not unsafe code
I guess iterating through isn't too bad
 
5:47 PM
Yea, honestly I'm not sure how to do that, I'm kinda surprised you need to in a C# app. What are you working on, out of curiousity?
@NETscape found this, probably want you want to use: msdn.microsoft.com/en-us/library/system.bitconverter.aspx
 
file format
 
@NETscape I'm not sure what the problem is if it's little endian
If it was big endian, then you'd have a problem
My question is, what's the advantage of ushort over byte?
 
If you're just wanting to read values, write an indexer function that pulls the 2 bytes at the index, reverses them, and converts to ushort
 
FileStream doesn't have Read(ushort[], ...)
 
Why reverses them? He said it's little endian
 
5:54 PM
Well then don't reverse :p I just quickly read
 
@NETscape I have the same question for you. Why would it need reversing?
 
Do you just want to read data out as a ushort[] in the end?
You could just use a BinaryReader instead to build your array
 
yeah, I kind of took back the statement after I said I could iterate through
because BitConverter.ToUInt16 is fine
 
I also wonder why you would use ushort
Why not ulong? :P
 
using .net 3.5 I have an entity that when i initialize then try to call the tables (EF -> MSSQL) properties it wont show in the code for one table, all my other tables work fine
this one table does have a 1 to 1 relationship with another table which is its only difference
 
5:56 PM
@NETscap It's better to just read the data out in the correct format instead of using 2x the memory for no reason
 
@KendallFrey whats the advantage?
 
but I can't get the intellisense to register the tables properties i need to set
 
the values will eventually be passed through a .DLL that takes ushort
 
Where is 2x the memory being used? 16x512 == 8x1024
 
any help would be super appreciated
 
5:57 PM
@NETscape That's what I asked.
 
Reading the data as byte[1024] and converting to a ushort[512]
 
It's not as simple as doing an array re-cast like c
 
lol
You probably could, with pointers
 
IntPtr
 
5:58 PM
@NETscape yuck
 
It does work with unsafe code, but I'd highly recommend against it lol
 
Did you know IntPtr is a native type in MSIL?
 
@ton.yeung unfortunately that is waaay out of scope right now :(
 
Why is that surprising?
 
@KendallFrey If you want to run something slow
 
6:01 PM
@JohanLarsson What of it?
 
not much, tried to do syntax hightlighting, can't believe how slow that was.
 
oh
Pretty much all I know about syntax highlighting is that TinyPG makes it amazingly easy.
@JohanLarsson Check this out: gist.github.com/kendfrey/6072951 I call it from my tests.
 
if you do
if(true) { int i = 0; CreateDummy(i); } Does that create two references to 0, and once we leave scope the `int i` reference will be disposed?
 
@NETscape 1. You can't create a reference to 0. 2. Yes it goes out of scope.
I can simplify that code.
CreateDummy(0);
 
@KendallFrey Looks ok, I think I would name the class AssertJson and the methods AreEqual
but that is smaller than minor
 
6:07 PM
well my variable names are more descriptive... int seconds = data[0]; _timerTimes.Add( new MyTimer(seconds) );
 
The main issue I have is that it's not easy to pinpoint failures.
 
or should I just do new MyTimer(data[0]) and leave it up to the programmer to look at documentation
 
It's simpler.
The only thing you don't see is the type, which should be available by intellisense
 
but is anything "wasted" over the lifetime of the application using a variable like that?
 
It may be more readable as a two-liner though
 
6:09 PM
@KendallFrey yeah, perhaps throw in debug.Breaks for convenience. That parser test is more of an integration test. Not that it is dumb but it is so huge.
 
@NETscape Yeah, an extra variable gets allocated on the stack, so when that method is running, it's 4 bytes bigger.
It's not a big deal though. The compiler often generates temporary variables
 
okay. right, and when it goes out of scope, the 4 bytes is "given back"
ahh, optimizations I'm guessing
hence the unused variables warning
 
?
You shouldn't get a warning.
 
If you're getting unused variables, it's from something else beyond what you just posted.
 
for anyone that wants some rep points:
0
Q: Entity Framework (.net 3.5) Auto Generated class wont display (MSSQL) tables properties in code

BriOnHCan anyone help me understand why I can't get the auto generated classes properties and methods I would expect from initializing the class? Pictures and code example below:

 
6:12 PM
not in that code, i'm just saying if you have unused variables... the compiler can't optimize it, so thats why it produces a warning
 
<forms name="AuthCookie" loginUrl="Login.aspx" timeout="120" />
Timeout refers to minutes or seconds ?
 
or will unused code not even get compiled
 
I'm guessing seconds.
RTFM?
 
Makes sense. Freaking programmers.
 
@NETscape It usually gets compiled
 
6:14 PM
Love you KenDoll
 
God, this data.
Stringly typing FTL
 
@RyanTernier - Isn't that a cool approach? I really like using Dictionary<Type,Action>. I came across that approach when looking at DI Containers, because it is the basis used for making the composition root in DI Containers.
@Kendall - Stringly typed is awfulbad
 
DI is like encryption... never ever roll your own
 
Don't tell that to stackoverflow.
 
And like cars.
 
6:20 PM
Who made their own DI Container.
It is really easy to do with a controller factory.
And then there is also no singleton.
Win-win.
 
@TravisJ I would hardly call SO a standard case...
SO is so completely customized that it's not even really standard ASP.net anymore
 
What do you call an unattractive object that weighs 2000lb? A single ton.
 
@KendallFrey don't make me create a thread on meta asking for a chat flag for horrible jokes
 
@Mgetz - It isn't that customized. I have seen their code.
 
@KendallFrey Kendall Frey.
 
6:23 PM
The only thing separating me from a singleton is 1800lb.
 
@TravisJ I beg to differ, but only on the grounds that they have very very restrictive coding practices as well that most shops would never even think of.
 
Don't call SE a 'shop'.
 
@KendallFrey should I be hiding from the hit squad you just sent for me now?
 
@KendallFrey I would change that to, The only thing separating you from a singleton is five more carreer years.
 
@Kendall - Have you noticed that the blue flag doesn't go away at times?
 
6:31 PM
Yes, it does that for you too?
It's gone right now.
 
@Kendall - Yes, I opened a question on it in meta: meta.stackoverflow.com/questions/190191/…
I have one right now.
It is like a little eye squiggly. If I am intent on something I don't see it. But when I relax for a second, there it is.
 
aka 'floater'
I thought of posting on meta, but was too lazy. Enjoy your rep.
 
Don't want rep, just want to get rid of the dang 'floater' /glares at floater
...it is still there btw
 
I'm so used to saying I use Opera on bug reports :D
 
haha
 
6:46 PM
@KendallFrey my apologies for calling SE a shop.
 
@KendallFrey you could be using lynx
 
People are always so harsh on the javascript room. Sure sometimes they are curt but I think that they also deal with the noobest people.
 
That's right, I could be.
 
can you imagine the glowers from meta... that would be epic
"SE is not usable in text based browser"
 
6:49 PM
I think we should send the javascript room a shout out for a day.
 
@TravisJ Have you noticed any performance impacts because of it? (Dictionary<key,action>
 
room topic changed to C#: Javascript chat room appreciation day [.net] [asp.net] [asp.net-mvc] [c#] [entity-framework] [linq] [visual-studio] [wcf] [wpf]
 
Whaaa
tempted to change the JS room description
 
@Ryan - I have not done any tests as far as performance goes. However, I do have a factory which creates my dropdowns that uses it and I saw no difference. I do not have a large test case available to do anything substantial.
 
6:52 PM
LPad(match[1] * 1 + (match[3] == "A" ? 0 : 12) + "", 2, "0") + ":" + match[2]
God help us all.
 
yikes
 
I just wrote that.
 
public interface IFoo {}

public abstract class MyClass<T>
    where T : class, IFoo
{
}

What is the above doing?
 
That's easy.
 
I asume whenever you create a new MyClass, you specify the inherited class?
 
6:55 PM
It's a generic type, so you specify a type parameter.
 
That says that whenever you use T it must be of type IFoo (I think the class part is redundant)
 
No, the class is not redundant
Without it, you could specify interfaces
 
You can have an :IFoo that isn't a class?
hm
 
@TravisJ or structs
 
@Ryan - The reason I usually do stuff like that is when I want to use <T> in most of the methods in the class.
 
6:57 PM
remember structs can inherit as many interfaces as they like
 
@Mgetz - Multiple inheritance doesn't apply to structs?
I don't use struct often (if ever).
 
@TravisJ structs can't inherit from anything BUT interfaces, but they can inherit as many of them as they like, just like classes
 
Structs can inherit... oh, yeah...
 

« first day (1012 days earlier)      last day (3940 days later) »