« first day (836 days earlier)      last day (4112 days later) » 

5:00 PM
It's not necessary to use source control.
 
I don't think you're stupid because you have a healthy distrust for abusing VM-thrown exceptions
that's all very reasonable
 
I think you're wrong for suggesting that a CLR exception should be thrown by user code.
 
By all means throw that ANE
that's not the point!
 
What is the point?
 
the point is that the consumer can't tell the difference
 
5:01 PM
That wasn't the point, last I checked.
 
so that although your guidelines are wise, in this specific instance, they don't matter.
So I think an ANE is very appropriate - I just don't think you'll run into any trouble if someone chose an NRE.
 
If they don't matter here, then it would probably be OK there. And maybe there, and there and there and there.
 
Perhaps
They exist solely to help you write better programs
 
@EamonNerbonne The problem isn't broken code. The problem is disregarding normal operating procedure.
 
not as an end in and of themselves.
Sure. it's just not a particularly big problem
(here)
 
5:04 PM
ANE is a better indicator of a mistake I am making as an API consumer. NRE to me indicates you as the api producer are having an issue.
 
Right.
 
As an API producer, I specify what I support. Sometimes I'll help you detect errors outside that range
but not always
 
On convention, what exceptions other than NRE shouldn't be thrown from userland?
 
definitely StackoverflowException
 
5:05 PM
OOM, SO, ThreadAbort, etc.
 
why??!!

Cannot convert type `System.Collections.Generic.Dictionary<int,string>' to `System.Collections.Generic.Dictionary<object,object>'
 
well, unless you want your appdomain to die.
 
Anything that is caused without a throw statement aka CLR exceptions.
 
It seemed that there was an initial effort to fork Exception to SystemException and ApplicationException, the latter from which all userland exceptions should've been extended. That appears to have been abandoned.
 
@rogcg Because Dictionary doesn't have (Oh, what's the word again.)
@Bracketworks Aye.
 
5:07 PM
@rogcg because a dictionary of int to string does not support all operations an object-to-object dictionary does.
 
@KendallFrey ??
 
@rogcg Let me give you an example of why that would be bad.
 
@EamonNerbonne what If I want to convert a dict<int, string> to dict<string, object>
 
what's that mean?
a dictionary maps keys to values
if you're mapping numbers to text, how do you want to convert that to map text to objects?
 
So you have a Dictionary<int, string> and you pass it into a method asking for a Dictionary<object, object>. The method can add a <string, string> to the dictionary. That's a problem, because keys can only be ints.
 
5:09 PM
What kendal said.
 
Ah, just remembered the terms.
 
covariance
 
$g covariance contravariance
 
Yeah, so there are a few other issues here.
 
@KendallFrey so if it's a dict<string, object> is it ok?
 
but plain objects aren't variant at all.
 
@rogcg No, because the method could add an <int, string>
 
you could use IReadOnlyDictionary
but due to limitations in the .NET typesystem, that won't work for your specific scenario either
 
@rogcg I think you're approaching your problem the wrong way. What are you really trying to do?
 
(value types aren't co- or contra- variant)
 
5:11 PM
if you REALLY want to do that, use linq's ToDictionary.
although its still gross, and i agree with @KendallFrey
 
here is what I'm trying to do.. No matter which type of dictionary it receives, it will always be capable to cast it and process it.
http://paste.ubuntu.com/1586420/
 
Are you trying to modify a dictionary?
It won't work.
What are you really trying to do?
 
in this code, I receive a dictionary, and concatenate the key and value like this:

(@key1 = value1, @key2 =v alue2, @ky3 = value3, ...)
got it?
 
@rogcg You're trying to circumvent the type system. While that's possible, it's usually unwise. Why are you using reflection?
 
Uh, no.
 
5:15 PM
@KendallFrey lets say I have this dict:
dictionary.Add("cat", 2);
dictionary.Add("dog", 1);
dictionary.Add("llama", 0);
dictionary.Add("iguana", -1);
 
then you need : string.Join(", ",dictionary.Select(kv=>kv.Key + " = "+kv.Value))
 
what I'm trying to do in that code, is: it checks if it received a dictionary, than I'll parse it, to transform it to this string:

(@cat=2, @dog=1, @llama=0, @iguana=-1)
 
It looks to me as though you're converting a dictionary into a string. Amirite?
 
or something like that.
what you don't need is reflection.
 
so.. the rule is, all dictionaries must have int as key?
 
5:17 PM
Yeah, do what @EamonNerbonne said.
 
@rogcg No, where did you get that?
 
it's just that don't force a dictionary to be something it isn't
 
IDK
so a dict can have any type of keys, right?
 
don't convert a <string,int> dictionary to an <object,object> dictionary for no good reason.
pretty much, yeah.
Do you come from a javascript or similar background, btw?
it's not the simplest stuff to wrap your head around if you're used to an entirely different model.
oh I meant rogcg :-)
 
5:20 PM
Derp I saw that. I R DUM
 
seeing as rogcg seems to have trouble with static typing
 
@EamonNerbonne no.. I use to work with C++, python, java, etc..
 
well, this is just like C++ then: you can't convert a hash_map<int, string> to a hash_map<string,void*>, right?
or coming from JS: you can't reinterpret an array as an object or vice versa....
 
Uh...
 
well,
not entirely
 
5:22 PM
In JS, arrays are objects.
 
yeah, not the best example.
but for instance in JS the length property changes when you add items by number
but if you add items by number to an object, that doesn't happen
(and they're not really added by number)
anyhow, they're not the same
(will I get shot if I mention the NRE word?)
 
No, but your argument will be null.
;)
 
I take exception to that!
 
so.. this is what I'm trying to do.. paste.ubuntu.com/1586451
pay atention on the dicts on line 21 and 65
will this work? if not.. what should I do to make it works, independant of which type of the Dictionary it receives?
 
but it reminded me of this reference: lambda-the-ultimate.org/node/3186
Ok so I haven't looked in detail, but what's fishy for starters is this line:
public static string BuildMessage(object objectsTemplate)
 
5:30 PM
@EamonNerbonne I copied from my project... so in my project it must be static.
 
You proceeed to access members of the parameter objectsTemplate
 
I just pasted it in paste.ubuntu
 
the problem is that the parameter is declared object.
 
@EamonNerbonne but it should be, since I'll pass any value, or a dictionary, or a string, or a single int, etc..
 
What is it? Could it be a string? and IntPtr? a DateTime?
 
5:32 PM
@EamonNerbonne yes.. anything
the problem is in line 65. it should be able to accept any kind of dictionary. in this case, when I pass a Dictionary<int, string> will it fail?
 
If you want to accept any dictionary, you should make a generic method.
 
Yeah, but he's trying fancy reflection trickery - matching regex group names automagically to public property names
 
@EamonNerbonne I dont want to change my entire method.. I dont even know if it will fail, since I havent tested it for the case of a Dict<int, string>
 
it will fail
look, it's not hard to fix this problem
but I'm not sure you should
 
@EamonNerbonne what u suggest
 
5:36 PM
The issue is that you're trying to bend the language in ways it doesn't want you to go
it'll be error prone
are you sure that's what you want?
I mean, you'll be delving into details that are a lot more arcane that Dictionary<,> stuff, so if that's troubling you...
 
@EamonNerbonne first of all. you understood what that code should do?
 
It might be more practical to choose another approach.
yeah, you want to extract the map that the pattern refers to
but the pattern is a string
 
@EamonNerbonne but I tested it with Dictionary<String, String>, and it worked. Why it wouldnt work with Dictionary<int, String>?
 
because they're not the same
I think the best solution is not to use reflection.
objectsTemplate: you're passing any object.
I think you should pass a pre-processed Dictionary<string,string>.
sorry, I mean:
 
@EamonNerbonne that is extremelly needed for the project, and across the project it is highly used.
I cant change it.
 
5:40 PM
Dictionary<string, Dictionary<string,string>>
oh boy
 
hehehh
 
Then for starters:
prop.PropertyType.Name.Equals("Dictionary`2")
should be
typeof(IEnumerable).IsAssignableFrom(prop.PropertyType)
and:
Dictionary<string, object> dict = (Dictionary<string, object>)prop.GetValue(objectsTemplate, null);
should be
dynamic dict = prop.GetValue(objectsTemplate, null);
foreach (dynamic param in dict)
 
@EamonNerbonne this will solve my problem?
 
most likely
it's not ideal.
 
@EamonNerbonne ok.. i must test.
 
5:45 PM
an alternative is using the IDictionary interface.
probably good enough too; but if you're duck typing anyhow...
oh
and don't do string concatenation in a loop like that.
best bet is string.Join.
 
@EamonNerbonne ok..
@EamonNerbonne it says Using the generic type System.Collections.Generic.IEnumerable<T>' requires 1' type argument(s)
what would it be?
 
none; it's System.Collections.IEnumerable
not System.Collections.Generic.IEnumerable
 
well thats what the compiler returned. heheh
 
yeah, normal, the non-generic version isn't recommended anymore.
 
lemme test something
 
5:51 PM
but it's enough for you
 
it still complains about the missing parameter. I must see which it is..
 
it's not missing a parameter. It's the wrong interface.
 
@EamonNerbonne if I use it without the generic, I cant create dictionaries
 
how so?
you can use both
 
it works.
thank you!
 
5:57 PM
perhaps somewhat more robust would be:
if(typeof(IDictionary).IsAssignableFrom(prop.PropertyType)) {
	IDictionary dict = (IDictionary)prop.GetValue(objectsTemplate, null);
	List<string> pairs = new List<string>();
	foreach(DictionaryEntry kv in dict){
		pairs.Add(kv.Key+" = " +kv.Value);
	}
	value= string.Join(", ",pairs);
}
 
indeed.
 
but no feedback on the null reference tony hoare presentation? I thought it was apt :-).
anyhow, gotta go; cya!
 
cya!! thansk!
 
6:17 PM
lord are you guys still talking about the dictionary issue? heh
 
Has anyone already had an exception named : "Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"
 
if you seek amy
 
Amy who? Winehouse?
 
Huh ?
 
Oh baby baby have you seen Amy tonight?
Is she in the bathroom is she smokin' up outside? Oh
Oh baby baby does she take a piece of lime
For the drink that I'mma buy her do you know just what she likes? Oh
IF =f
YOU =u
SEEK= ck
AMY= me
 
6:23 PM
does anybody know a good ebook store? one able to sell in Brazil
 
@WileyMarques What book are you trying to get ?
 
@AndréSilva Lord of the Rings
 
@WileyMarques I doubt there is a portuguese ebook version.. But I'm almost sure it is easily possible to find it in english as pdf..
And Apple has an ebook store in Brazil..
 
@AndréSilva I'd like to read it in english
it's available in Kindle Store, but I don't like their reader app
 
I think there is english versions there..
And again, I think you'll only find it in portuguese :(
 
6:27 PM
hello kids
 
Hello infant
 
@AndréSilva LotR is still not available there
 
@WileyMarques Weird, they have the hobbit and no lotr..
Anyone already had this problem ? Named Pipes Provider, error: 40
SQL connection related.
 
@AndréSilva indeed
 
@WileyMarques Company proxy messes the style of this page, but look here : barnesandnoble.com/w/lord-of-the-rings-j-r-r-tolkien/…
 
6:31 PM
0
Q: Source files and MSBuild .proj file in different directories

KikaimaruI have a project (currently its .csproj, containing only .js files). I only use it for some post build events, and intellisense from Visual Studio. Can I somehow have following directory structure? Root/Projects/HelloWorld.(cs)proj Root/Sources/Test.js But Visual Studio seems to take source f...

 
@AndréSilva also not available in Brazil :X
 
Not even with international credit card ?
 
can't even download their android app
 
Well, fuck.
 
anyone have experience with I2C?
 
6:37 PM
@Steffen : Why is string in .net is immutable ? string intern refers hash table for existence of the same string , and your queries about security is a good concern. I am also thinkin about SecureString concept..still all of these sounds silly !?
 
just found a pdf version of the three LotR books
http://our-free-ebooks.blogspot.com.br/2009/01/lord-of-rings-collection.html
 
hmm, any idea how to write this regex? Trying to match all text between xs:annotation tags.

<xs:annotation>.*?</xs:annotation>
 
stupid mongodb. you are a dynamic document db, but you don't support dynamic objects.
 
<xs:annotation\b[^>]*>(.*?)</xs:annotation>
WHOA
WHAT DID I DO
<xs:annotation\b[^>]*>(.*?)</xs:annotation>
is anyone else seeing this shit?
 
Oh, that, lol.
No, only you.
 
6:50 PM
@ChadRuppert You should be able to implement the required BSON interface on a dynamic object yourself to use instead of a standard Expando.
 
@KendallFrey help me with my regex and I'll give you a cookie
 
SO thinks you're trying to parse HTML with a regex.
 
I can make my own cookies. Set-Cookie: foo=bar
 
got it.
@KendallFrey no, just trying to strip out xsd annotations so I can compare two versions of an ebay spec.
 
6:51 PM
@RoelvanUden yeah, it doesn't support Expando. I want something out of box. because im lazy today
 
If you can describe in plain english what you want to match, I can probably write a regex.
 
@KendallFrey I got it.
 
Regex for I got it !?!?
:-D
 
/i\s+got\s+it/i
 
6:56 PM
Rofl @ Kendall
 
does anyone have experience with NTLM and Kerberos authentication?
:P
 
Nope
 
@KyleTrauberman a tiny bit, actually
 
There isn’t any code that needs to be ran in order to impersonate a user. Authentication is handled by IIS, not user code. Basically, the reason the authentication works when I hardcode my user credentials, is because the “server” app has access to my password at that point, which NTLM requires to authenticate. When I use the default credentials, only the “client” app has access to my password. The client can Identify the user that is calling it via NTLM, but it can’t impersonate my user account without access to my password for authentication.
does that sound right? I don't have a lot of experience with it
basically the issue I'm having is this:
 
hi guys
 
7:09 PM
(local pc) -> (web app) -> (another webapp/sevice)
the web app sees my credentials and can impersonate me
but the second webapp/service can't impersonate me
 
I go an error ...could you please tell me where is the bug
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
I'm pretty sure it's due to the double hop issue.
@PeterJennings your app can't connect to sql server
 
where can i see for that
 
verify that it's working and you can connect to it using SSMS
 
in web.config
 
7:10 PM
@Peter check your datasource name mentioned in Connection string , username , password ..
 
sometimes being in here is depressing.
 
@Chad why !?
 
@ChadRuppert why? because you think "oh god... I might have to maintain these people's code someday..."
 
12.41am i.e., 00:41 am :-((
@ALL Good night !
 
that and just the level of ignorance. Its not a crime. it just depresses me sometimes.
 
7:13 PM
@ChadRuppert hey, at least he posted a full stack trace. That's better than most :)
 
not knowing where the connection string was stored was what got me this time. :)
 
eh, I've asked dumber things :)
 
like i said, not a crime. nothing wrong with being ignorant of something. some days its just depressing. Call me Marvin
 
You're Marvin.
 
dumber :-P whats that ? shall i assume it "dumbest !?
 
7:22 PM
guys
im wondering
 
@codebrain I'm dumbest :D
 
does visual studio only process 1000 records to a database?
its so annoying
i try to seed my data but it only does 1000
 
No..? Most GUI tools only show the first 1000 records when you look at them tho.
 
@RoelvanUden so...
@RoelvanUden how can i see how many records are ACTUALLY in the table?
 
Use a proper tool and execute a simple query yourself.
SELECT COUNT(*) FROM tableNameHere
For example.
 
7:29 PM
@RoelvanUden cheers
@RoelvanUden yeah youre right
 
hi @hamidrezamansouri
 
that was an exciting interchange.
 
your mom is an exciting interchange
 
Did the guy from yesterday fix his WPF project?
 
7:38 PM
you wouldn't say that if you met my mother.
 
7:57 PM
How is @Pheonixblade9 supposed to compete for stars when he cannot even see the leaderboard?
 
how can he not see the leaderboard?
 
A database error has occurred. Did you forget to run maintenance/update.php after upgrading?
 
because @JohanLarsson 's mother sat on the server and it exploded.
 
@JohanLarsson's mom sat on windows azure?
she must be FAAAAAAT
 
like, dimensionally transcendental. To be able to sit on a concept. Wow.
 
8:03 PM
Yep. She's that fat.
Her weight is non-euclidean.
 
is her ass cloud-based too?
 
But aside from all that. The wiki is down for the count.
 
btw, I updated it last night
and @TravisJ old news
 
@TomW Tom got the star!
 
@Kyle - It is still down.
 
8:04 PM
It's still old news
 
We need a new one.
 
I'll fix it. I just haven't had time.
 
Okay, fair enough.
 
seriously. my mother in law tried to commit suicide on sunday.
 
Can one of us fix it?
You told me, that is rough :(
 
8:06 PM
and it's been a stressful situation with her for the last few months.
 
Does she live near you?
nvm, that might be too personal
 
@TravisJ i doubt it. I need to figure out why mysql isn't giving me insert permissions to my db any more. It's a azure mysql db.
she lives with us.
like, in the den down stairs.
 
Ah, damn. That is close.
So, its your wife's mother then?
 
yes
she has epilepsy
so she can't live on her own
 
Bummer, my sisters had epilepsy when they were younger and it might come back as they age.
 
8:08 PM
that sucks
 
Seizures are pretty lame.
 
she's manipulative
which is what the problem is
she faked a seizure trying to manipulate my wife.
and we're pretty sure that's what the suicide attempt was.
she wasn't serious about it.
she took a bunch of stuff that she knew would only make her sleep
and called her sister while she was taking them
so the paramedics would get to her within minutes
 
Could you convince her that you'll throw her out if she continues like this?
I'm sure you won't
 
doubt it.
she's been homeless before, it doesn't phase her
and she always threatens to move out and leave as one of her manipulation tactics
 
not a problem then, throw her out!
 
8:12 PM
we're considering assisted living after sunday.
but, I agree. if she weren't there, my life would be so much better.
 
In all seriousness, don't listen to me. I'm from a family with the personal integrity and patience of saints, and have never lived 'with' anyone else. I have no reliable measure for this stuff
Acting like a jerk to your family is like an outside context problem for me
 
i know, same with me
this is all new to me, and I don't know how to react to a lot of it.
 
Much credit to Iain M. Banks for coining that phrase, by the by
it's incredibly useful
 
@Kyle - Sorry, I had to help an underling.
My gf's mom is manipulative too, although not quite that intensely.
 
System.Manipulation?
 
8:22 PM
Perhaps you can get her to do some group therapy with your wife and or you
Assisted living is expensive. Does she have income?
 
Yeah, that would probably cover half of it.
 
she's getting psych evaluated at the hospital, and my wife and her are going to go to therapy
anyways, I didn't mean to turn this room into a therapy session.
 
w/e
 
nice
 
8:26 PM
Boss came in though, have to go for a bit
 
I thought you were the boss.
 
Everyone has a boss. President Obama occasionally has to quit slacking off and do some work when Chuck Norris comes around
2
 
There is 1 person above me
 
8:45 PM
and one behind you, always is :)
 
looks behind Nope. looks under yup :P
 
I have a propertyGrid control in which I want to edit the values of an object that has another object as a public member. I want to make the property editor a drop-down list for the available objects... How exactly can I do that? I tried to set a TypeConverter but that did not work...
I receive a runtime error "The object of type "System.String" cannot be converted to "mytype"".
I guess I have to specify a String->mytype converter, but how do I do that?
and especially, isnt there a better method?
 

« first day (836 days earlier)      last day (4112 days later) »