« first day (52 days earlier)      last day (4889 days later) » 
07:00 - 22:0022:00 - 00:00

7:11 AM
hi guys
i have List of string it consists of A-Z ex([0]=>A,[1]=>B..., i like to find the index C using linq
 
7:44 AM
var index = list.Select((i, v) => new { i, v }).Where(e => e.v == "C").Select(e => e.i);
 
 
2 hours later…
9:19 AM
hi all 'Sub !!
 
9:30 AM
@ratty: Why use Linq when you have FindIndex and IndexOf ?
 
He's not here any more
 
Well even so! :)
 
9:47 AM
can we ask for help in here or is that for the questions area only?
 
You can ask for help, but if your question is a typical SO question, you're best off on SO itself
 
10:53 AM
Hello masters, Any one can sujest me links for Rotating object using mouse in WPF.
 
 
2 hours later…
1:07 PM
any windows phone developers here?
 
 
4 hours later…
4:59 PM
hi all
 
howdy
 
udt problem using odp.net
 
I hate those :(
 
I have asked the question at:stackoverflow.com/questions/4379121/…
any ideas are welcomed.
 
what happens when you try to insert number or date types?
 
5:08 PM
it is not inserted
 
Any errors?
 
I didnt want to bother with long text here. Details are at the question. There are no errors on both sides neither .net nor Oracle DBMS
Oracle 11gr2
coding, it is odd , it inserts NVARCHAR2 only.
 
so the other columns just end up being NULL??
 
we have used the custom table that we have created.. UDT classes for .net are created using the objects
yes
I have used NVL to be sure about it. We are not sending all the fields at once. We are trying to go by iteration.
 
wow, that's weird... sorry no ideas =\
 
5:13 PM
I mean if it goes ok with one , than insert 2 fields etc.
anyway, thanks for your time coding. :)
 
np, wish I had an idea for ya... haven't done much with odp.net UDT's though
 
there is a type mismatch of data types .. .net developer is loosing his hair here.
 
what .net data type are you using for the NUMBER and DATE fields?
 
at ORACLE -> NUMBER
at .NET -> Decimal
but it is generated by the odp.net plugin
as is
 
5:22 PM
seems good. at the bottom , it gave some ideas. .net developer is mumbling about Factory class.. I guess there is a misuse of something
thank you very much. We are going on it.
 
no problem, good luck
 
thank you all . must go to work . thanks again
good bye
 
5:47 PM
What's the name of this variable type?
myVariable["firstKey"]["secondKey"].Value = "some string";
hash? dictionary? table? nested array? associative array?
specifically looking for the case with two "key" values
 
6:02 PM
it looks just like a multi-dimensional array
nope.. scratch that
 
well, it could be a multi-dimensional array that returns an object that has a property called Value
 
I think I want a jagged array, I'm not sure
but I want to use it like a dictionary
 
yea, sorry a jagged array... gogo terminology
what do you mean "like a dictionary"?
 
don't worry, took me 20 minutes of looking to find it ;) I knew I knew it but had forgotten
I mean using the notation of .Value and using strings as keys
 
6:06 PM
hmmm... not sure you're really gonna be able to pull that off
 
Yeah I think I'm gonna need to do something funky for myself ...
 
can you do multiple indexers in c#?
 
idk, that's what I want tho
 
you could do it, but it isn't going to be pretty, and I sure wouldn't want to maintain it :P
 
4
Q: Multi-key dictionary in c#?

SuperSuperDev1234I know there isn't one in the BCL but can anyone point me to a good opensource one? By Multi I mean 2 keys. ;-)

 
6:14 PM
that doesn't give you the notation you were looking for, close though
 
6:25 PM
close
I think one can be whipped up quickly enough ... Key1 will always exist, but Key2 may not exist, so a nested Dictionary with a wrapper and modified lookups may be enough...
 
6:54 PM
Ok so now I need to know how to do something like public object this[string key] but with two values so I can myVariable["firstKey"]["secondKey"].Value = "some string"; since I have my internal structure sorted out ... I don't seem to be able to public object this[string key1][string key2] so ... anyways, going to stretch my legs, I shall return I'm sure
 
7:05 PM
that's what I was saying earlier, AFAIK you can't do that
 
7:42 PM
Does anyone know in MSSQL what the equivalent datatype to long is?
 
bigint I believe
yea, bigint is 64 bit integer
 
sweet thanks
 
sure thing
 
8:08 PM
howdy
 
hey... that's my line!
you responded first... all yours @CodingGorilla
I love the hide feature
 
@CodingGorilla ahhhhhh
 
Just flag all his messages, when enough of them are flagged, he'll get banned by someone
 
oh, too late, I just ignored him everywhere
 
Yeah, or you can do that :)
 
8:21 PM
@LasseVKarlsen so if I flag it as spam how does someone else know he's been flagged by me, besides the mods?
hey you might know the answer to my question there @LasseVKarlsen
 
Which question @drach?
 
public object this[string key1]... let's me do myObject[myString] but what's the best way to allow me to myObject[myString][myString]?
 
You need to return something with a this[] property from the first one
 
something like this: public object this[string key1][string key2] except I don't think that code is permitted
 
like a dictionary
no, that's not legal
 
8:23 PM
well I was thinking about nesting it like Dictionary<string, Dictionary<string, string>>
 
that's what I said, but no one listens to me :(
 
but I wanted to wrap it and keep things simple
 
you could do: public IDictionary<string, string> this[string key]
 
@CodingGorilla I listened, but I don't know the best way to make it have the least code in the page
I was thinking custom class as a wrapper, but I still need to tuck the extras in somewhere
 
Why not use an indexer with two arguments, or a tuple?
 
8:24 PM
public object this[string key1, string key2] <-- can I do this?
 
Just out of curiosity, why are you hell bent on this kind of notation?
 
Yes, that you can do
 
@CodingGorilla no
 
FxCop will complain, but perfectly doable
 
@akmad No what?
 
8:25 PM
haha... damn me and my fast (wrong) answers!
 
@CodingGorilla coworkers...
 
Pfft.. I prefer to make my coworkers life difficult, just proves I'm smarter than them :D
 
@LasseVKarlsen is this what I posted about 3 seconds after you?
@CodingGorilla haha, I wish I could do that here ;)
 
@LasseVKarlsen can I do an anonymous tuple?
 
8:27 PM
Only if you type it as object
 
myObject[<myString1, myString2>]?
 
public object this[object key]
but not sure anonymous types qualifies as keys
 
I mean in the calling code
@LasseVKarlsen I'm pretty sure this is valid code, or is that not what you meant?
 
myObject[Tuple<T1, T2>] ?
 
@CodingGorilla yeah trying to avoid typing everytime we have to make a call
 
8:28 PM
if you make the index argument an object, you can use anonymous objects
ie. myObject[new { a, b }]
but as I said, I'm not sure anonymous objects qualifies as keys
ie. implement GetHashCode and Equals correctly
 
@LasseVKarlsen Or if you do some horrible trick with generics and type inference
 
I'll stick with public object this[string key1, string key2]
@Joren Yeah I'll avoid that today ;)
 
looks like they qualify as keys
 
Why wouldn't they? All you need is Object.GetHashCode and Equals, right?
 
Yep, and those two methods are correctly implemented for anonymous types
 
8:34 PM
The default implementation should be correct anyway
 
default? you mean the one inherited from object?
 
Yeah
 
no, that isn't enough
that does identity check only
ie. reference equality, it doesn't look at members
 
Oh yes, if you want value equality for the anonymous types, then that won't do
And I suppose value equality makes sense
 
to qualify as dictionary keys, a type has to implement value equality and gethashcode
 
8:37 PM
But it's possible for equality for your class to be equivalent to reference equality
 
very unlikely
 
I have that all the time
 
you do?
for what kind of types?
 
Lots of classes that don't have a sensible explicit notion of equality
But reference identity is always sensible
Things like graph nodes
 
if you want to look up that object in a dictionary, sure, but then you can just use the object methods
 
8:39 PM
Yes, exactly
 
What I meant was... if you actually implement GetHashCode and Equals, you almost always do a member comparison
 
ah, right
That's true of course
I thought you meant in general
That the non-overridden object implementation is very rarely sensible
I misunderstood then
 
and I was a bit vague :)
 
Hey
 
Hey @RobertPitt
 
8:48 PM
Whats the topic here then?
 
anything but "net romance" =P
 
C#, the language, programming in it, etc.
 
@CodingGorilla lol
 
I gathered that hehe, i mean what sub-section of C# are we talking about
Threading, Winforms, WPF ?
 
@RobertPitt If it pertains, it's valid
 
8:50 PM
All of the above
 
"Can a softball be written using C#?" <-- valid question (if an odd-ball)
It'll be a shortlived discussion ;)
 
Valid Answer: No, as a softball is not a piece of software, rather a material object
 
lol, ok so here's a question, Why isn't there no simple and abstract tutorials . SO Posts on MVC pattern in Winforms, i have been looking for months but i can't find any
 
Strictly speaking, threading, winforms and wpf isn't C# at all, it's .NET
what do you mean by simple and abstract?
 
Winforms doesn't support MVC very well, there are some projects out there that are attempting to "shoe-horn" MVC onto Winforms, but IMO it's one of those things that's just better left alone
 
8:53 PM
Well simple is self explanitory really, and Abstract, A style of MVC i can adopt on many projects
So whats the most adoptive pattern when it comes to C#
 
many programmers usually end up with the big ball of yarn
 
I'm sorry, but I would hate to have a simple tutorial, and I dislike the ones I come across. I want to see tutorials with lots of experience and custom solutions, so I can learn more. Granted, I'm no longer a noob with a pacifier, so theres' that. But often a "simple" tutorial tells me nothing more than MSDN would... YMMV
 
though I wouldn't advice it as a "pattern"
 
@drachenstern You're a vetern with a pacifier? :P
 
I wanted a Simple Abstract Pattern, when i said simple i mean a lightweight structure
 
8:55 PM
@LasseVKarlsen It's spaghetti isn't it? ;)
 
@CodingGorilla I think so ;)
 
@RobertPitt have you seen the MVP pattern?
 
@CodingGorilla I have a fork tho!
 
Heard about it, haven't really read about it so far
 
@CodingGorilla Yup
 
8:56 PM
We've had some success with that in WebForms, and we're looking into modifying our approach to it in a WinForms project here (not sure how successful that will be).
 
@drachenstern Can we get some garlic bread to go with that spaghetti code?
 
MVP has brought to our WebForms development some of the advantages (separation of concerns not the least among them) brought by MVC.
 
Anyone done any documentation generation from C# code lately? is sandcastle still the best tool?
 
The problem is with me and C# is that I Can never get the feel for Application Structure, It always feels so messy, is that just me not being as advanced or do you guys feel that way sometimes ?
 
@RobertPitt Have you considered using WPF? It's much more suited to those kinds of patterns
 
8:58 PM
@RobertPitt I feel that way a lot but I work with other people so ;)
 
@c
whoops
 
@RobertPitt Depends on the application, and particulalry with WinForms I usually get that feeling too
(BTW you can press the up-arrow to edit your last line ;) )
 
@CodingGorilla i feel as im still learning .NET i decided get the WinForms out the way as thats focused more on the core
@CodingGorilla I have to click the User Name when it appears, the up arrow does not select it :/
 
The problem with that is that Winforms is nothing like WPF, so you'll be very alienated if/when you make the move
and if you're comfortable with HTML, then WPF/XAML is going to be a shorter leap imo
 
Well, PHP,HTML5,CSS3,JS etc is what i started out in, I can build a framework like CodeIgniter in 2-3 hours.. gets boring as its just scripting
 
9:03 PM
yep, I hate web development, it's way over-used imo
give me a good old fashioned "smart client" any day
 
Im Currently working on a project for my company, its an LDAP User Management System (LUMS) and its going pretty well, but the code does not feel as organized as i wish it to be :(
Winforms
 
How do you identify/measure the disorganization, exactly?
 
By having blocks of code in places i dont think there belong, such as thread Creating in the ApplicationContext
they*
they should be in a Organized Threading Utility
 
So, maybe it would help if you simply went on a refactoring spree?
 
What do you mean by refactoring spree?
 
9:08 PM
Moving responsibility from objects where it doesn't belong into objects where it does belong (where you feel comfortable finding it).
 
Code refactoring is the process of changing a computer program's source code without modifying its external functional behavior in order to improve some of the nonfunctional attributes of the software. Advantages include improved code readability and reduced complexity to improve the maintainability of the source code, as well as a more expressive internal architecture or object model to improve extensibility. Overview Refactoring is usually motivated by noticing a code smell. For example the method at hand may be very long, or it may be a near duplicate of another nearby method. Once ...
 
Yea im with you thanks, I do try and do that, but as a perfectionist i dont think ill ever get it how i like it should be.
 
I have good news on that front.
 
@RobertPitt I used to be like that, I think that's just a tendancy you have to get past
there is no "perfect"
 
You get to decide "how it should be".
there is no...
Dammit Gorilla!
 
9:10 PM
hehe
 
The most important thing is that whatever code you write today should embarrass you in six months. :)
26
 
it should embarrass me???
 
but i have to pop your bubbly, because in some previus web applications i sat back and smiled at the perfectness that i had been trying to get, so its possible to keep me happy, just work work work
 
I'm exaggerating, but that's one way I measure growth -- looking at my "best work" from sometime in the past and deciding it's sub-par by today's standards.
 
9:13 PM
I do that all the time too
 
You look at my code and decide it's sub-par compared to what you're doing today? :)
 
IMO, if it runs, performns well, does what its supposed to do without crashing, and the "client" is happy. It's done right
 
If there's ever a time that I can look on work I did a year earlier and not think it's bad, then I'll be depressed that I haven't improved in a year :P
 
I try to add one thing to that list: the code's ability to retain those traits after the next developer inherits it and has to modify it.
 
Yea thats another thing, Debug Management, Whats the best way to debug applications after release :)
 
9:14 PM
And that's where clean code becomes very important (in my experience*).
 
@Robert: Debug after release? That's a contradiction: Release is the time when all bugs become features :P
 
I can't speak to debugging remotely.
 
@Joren lol you beat me to it
 
There's no such thing as bug free applications
 
Console.WriteLine("Hello, World!");
 
9:15 PM
@RobertPitt All mine are bug free, they just have a lot of undiscovered features (wasn't that a star trek movie?)
 
No bugs.
 
i was waiting for that
 
It's certainly possible to have bug-free programs. 'All' you need to do is prove that your code is correct. If you just code normally, you can of course still have bug-free programs, it just becomes very unlikely :P
 
but you do not have a STAThread ? you code is bugged
 
actually, that code doesn't even have a Main() so it's really bugged :P
there's no entry point!
 
9:19 PM
That's a feature.
 
yup
so you call a program that does not compile a feature ?
 
You win this time, PITT.
 
Wait, I'm all for "its not a bug it's a feature", but it's hard to call the fact that the program won't even run a "feature" :P
 
Depends on what the program does ;)
 
Compile errors are not bugs though, in my opinion
 
9:20 PM
Haha, From wiki: Feature (software design) is distinguishing characteristic of a software item (e.g., performance, portability, or functionality).
 
@LasseVKarlsen it doesn't do anything, it wont run!
 
 
perhaps that's a good thing? :)
 
you application is not functional therefore it cannot have features
 
@RobertPitt ok, now I think you're just taking the whole thing too seriously ;)
 
9:22 PM
hehe, im only having fun Mr CG
 
Seriousness is in the eye of the beholder!
Just like bugs ;)
 
Does C# have a callback system for every error thrown, where you can create a report and so on ?
 
its called Exception Handling
 
@CodingGorilla, Yea but lets i imported a library that i use to run a task, and that task does not throw any errors but triggers one, Can track them ?
or is the only method a standard Exception
 
How do you mean, triggers an error?
 
9:27 PM
Exceptions bubble up, so unless the method you called caught and ignored the exception, then your calling code will receive the exception and have the opportunity to handle it or allow it to continue "bubbling"
 
9:39 PM
anyone trying out windows phone stuff?
 
@brendan I've just played breifly with the beta bits when they were released... nothing significant
 
just trying to get started and everything I read says to down load visual studio express for windows phone, can't I just download the tools and use my existing visual studio?
 
If you download the tools, they will install VS Express, but the tools will be integrated into your existing version as well
again, that's based on my experience with the beta
 
ah - ok - thanks
 
yay, looks like Sandcastle runs nicely from my CI system :)
 
9:43 PM
@brendan sure thing
 
Means I will have live help online later tonight for my projects :)
 
CI = ???
 
Continuous Integration
aka TeamCity
 
oh... der...
I just upgraded our TeamCity to 6.0 here, I still can't get any of the neanderthall "programmers" to use it tho
 
@LasseVKarlsen nice!
 
9:45 PM
@CodingGorilla what's new in TC 6?
 
main thing I liked was the ability to have multiple build-steps per build configuration
 
the big new feature seems to ... be what he just said :(
 
hrm, i'll have to look into that
 
and yea, I like that too
 
glad you mentioned the new version... didn't see that it was out
 
9:47 PM
we use cruise control, it's decent, I guess it's good in that I don't have to think about it often which is what CI should be
 
I've heard CC.net is very nice, but I'm taken by TeamCity's sexy UI :)
 
we started with CC.Net and moved to TC... it's sooooo much nicer
 
@LasseVKarlsen Mercurial isn't free is it?
 
Mercurial is free
 
9:49 PM
@CodingGorilla yes it is
specific implementations (such as KilnHg which we use) may not be
 
@akmad good to know, we considered a bit back, might revisit
 
@akmad The new VSTS is awesome, but too expensive
 
@CodingGorilla oh yeah, we've looked at it a couple of times and the cost was always prohibitive
 
Re: Mercurial, ok that's good to know, I thought it was a pay product, what do you guys use for VS integration (if anything)
 
@CodingGorilla we tried VSTS2010 but it blew up on us a bit too much at first (first 30 days) so we quit trying and I moved the team to Hg instead
but we had just come from VSS, so anything at all was way better, even if it did give us fits ;)
 
9:50 PM
running build-script in full now, hopefully the help pages will appear again
 
@CodingGorilla BitBucket has free private repositories as well!
 
then everything is automatic :)
 
I use VisualHg on my box in VS, and tortoiseHg in the shell
 
@drachenstern I'm trying to convince the people here to move from VSS to subversion (smaller jump than git/hg)
 
yeah, VisualHg + TortoiseHg
that's what I use as well
 
9:51 PM
@drachenstern the first version seemed fragile to me, but the 2010 versions are very nice and they have all the features you could ever want
I'll have to check out mercurial, something new to play with :)
 
@akmad don't do that, go straight to Hg
0
Q: TF203015 The Item $/path/file has an incompatible pending change. While trying to unshelve.

drachensternI'm using Visual Studio 2010 Pro against Team Server 2010 and I had my project opened (apparently) as a solution from the repo, but I should've opened it as "web site". I found this out during compile, so I went to shelve my new changes and deleted the project from my local disk, then opened the ...

ever get that one?
now that I've had to much with it, it seems reasonable, but the fact that it took me two days to figure it out ... not good
and no documentation on it
 
@drachenstern I'm getting pushback in moving to svn... I can't imagine how much worse it would be if I was trying to move them to a dvcs
 
try and get them to follow that
 
I've used vss - > svn -> hg
hg is heads above the rest
 
@drachenstern Nope, but I've never been able to get anyone to spring for it, so I've only ever used trial versions
 
9:55 PM
@drachenstern thanks for that link. I read that a while ago but forgot about it...
 
this alone makes me want to switch (and oops I didnt mean to paste the whole thing)
 
@akmad it's an annoying bug when you don't understand the why of it
 
Branching causes problems in Subversion because Subversion doesn’t store enough information to make merging work. In Mercurial, merging is painless and easy, and so branching is commonplace and harmless.
^ -- I constantly have problems with branching in SVN
 
@drachenstern I think part of my problem is that I lumped git and hg together, and I think you'd all agree that git on windows is a hard sell to people used to VSS
 
I never really branched and merged before hg because it was such a pain
 
9:59 PM
@akmad I would agree with that instantly
 
@akmad definitely tough to sell git to that crowd, kilnhg is a very nice implementation though - very friendly gui
 
I have problems with writing code when conversing with you guys :p , so I'm gonna leave now ;) ... ttyl
 
@brendan good to know... looks like I've got to spend some time learning it
 
07:00 - 22:0022:00 - 00:00

« first day (52 days earlier)      last day (4889 days later) »