« first day (893 days earlier)      last day (4047 days later) » 

Bob
4:05 PM
@ShotgunNinja I suppose I expected an MSDN article on .NET to be reliable. Hrmp.
 
Nope.
 
Bob
Heh.
 
The only thing I expect is the Spanish Inquisition.
 
Good morning, Guys
I have a Windows forms app C# question
I have a combobox with fixed width
 
edc
@pibcat Good morning pibcat. What's C#?
 
4:12 PM
if the selected item text is larger than that width, I want to do text wrap(multiliner) and increase the height of combobox so that all text of selected item is visible to read
any ideas?
@ed
@edc i meant to say Windows forms question
 
edc
@pibcat I was just joking. Seriously, if I recall correctly, this method will help you tremendously: msdn.microsoft.com/en-us/library/…
 
Bob
I'd offer to help but I don't think I'm even allowed to cast objects yet.
 
edc
@pibcat and then text wrapping, that's a whole different story ;-)
but it boils down to splitting your string and adding \n
 
in result of that form height will increase right?
@edc so can you outline an approach for me to follow?
for the whole scenario
 
edc
1. Figure out if your string is really longer than the the width of the control (MeasureString)
2. If it is, split the string and insert some \n to make it multi-line.
3. You might need to increase the height of the control as a result?
4. Profit.
 
4:20 PM
Yes, I have to increase the height of the control as well
 
edc
MeasureString will give you a SizeF instance, and it will contain the height of your text. You can use that together with the number of lines of text that you have (you can tell by counting by many \n you inserted), and viola.
 
@edc Oh my god, that's horrible.
 
edc
@KendallFrey That's WindowsForms for you :(
 
@edc Thank you, I will try that
 
Bob
4:40 PM
This must be what color blind people feel like when someone first tries to explain how they see things differently.
Does type safe code have a special meaning in .NET assigned by Microsoft that the rest of the world doesn't want to accept? forums.asp.net/t/1366671.aspx/1
 
In computer science, type safety is the extent to which a programming language discourages or prevents type errors. A type error is erroneous or undesirable program behaviour caused by a discrepancy between differing data types for the program's constants, variables, and methods (functions), e.g., treating an integer (int) as a floating-point number (float). Type safety is sometimes alternatively considered to be a property of a computer program rather than the language in which that program is written; that is, some languages have type-safe facilities that can be circumvented by progra...
The most common definition is strong typing.
The memory safety that MS is talking about is almost completely unrelated, and is a far less common definition of the term.
Memory safety is a concern in software development that aims to avoid software bugs that cause security vulnerabilities dealing with random-access memory (RAM) access, such as buffer overflows and dangling pointers. Computer languages such as C and C++ that support arbitrary pointer arithmetic, casting, and deallocation are typically not memory safe. There are several different approaches to find errors in such languages: see the Detection section below. The Cyclone language uses a hybrid approach, including "fat pointers" (pointers that carry their metadata directly) and regions to giv...
 
lol, Cyclone
 
@Bob Hi
 
Bob
I see, I think that explains it better.
@pradeep Hello :)
 
hey how ar u , i have Q for u
 
Bob
4:46 PM
You may not like the answer I give
But sure :)
 
in .Net 4.0 this works OpenBaseKey but in 3.5 It's does not work RegistryKey localMachineRegistry
= RegistryKey.OpenBaseKey(RegistryHive.LocalMachine,
Environment.Is64BitOperatingSystem
? RegistryView.Registry64
: RegistryView.Registry32);
 
What error message do you get?
 
Does .NET 3.5 even have RegistryView.Registry64 defined?
 
OpenBaseKey was only added in .NET 4.0 it seems msdn.microsoft.com/en-us/library/…
 
Well then of course it won't work.
 
4:49 PM
Error 4 'Microsoft.Win32.RegistryKey' does not contain a definition for 'OpenBaseKey'
 
So that method doesn't exist.
 
but it's work for 4.0 Microsoft.Win32
 
You're trying to use a method that doesn't exist in older versions.
 
Yeah, because it exists in 4.0
But you're now using 3.5, which was made before OpenBaseKey was added.
 
Either rewrite the code using 3.5 methods, or upgrade the .NET framework to 4.0 or higher.
 
4:51 PM
Versions change shit, man. Just like Vietnam.
 
@MikeF when convert to 4.0 it's cause matter or not >
 
I can't understand that level of English.
 
@pradeep I don't think this means what you think it means.
 
if i convert 3.5 to 4.0 there is any problem or it's not cause any problems , and also i am not an English bat man OK
2
 
It shouldn't cause problems.
 
4:56 PM
@KendallFrey thanks a lot buddy...
 
cc/image canada > usa
 
hung the hangbot...
 
the only problem would be if there are strange compatibility requirements, like if it's a web app that's going to be deployed on a server where the IT staff is stupidly paranoid and they don't allow .NET 4.0
 
@MikeF 4.0 is n-1 atm, and it has more security advances than 3.5
My software is still .net 2.0
 
4:58 PM
@pradeep Gosh, I wish I was an English bat man.
 
cc/image canadian batman
 
Bob
@ShotgunNinja I wanted to be polite, but this was my first thought: thezooom.com/wp-content/uploads/2012/06/…
 
5:01 PM
@MikeF Are u live with Bat man ... Lol
 
@MikeF Wait, who lives with Batman?
 
Bob
Alright... I'm gonna try this again.
 
@MikeF i think u are in left side of him
@Bob what are u trying ur going to become left to bat man .... lol try try one day u can die
 
ITALIAN SPIDERMAN
 
Bob
Actually I'm going to take a break and then try to get back at this.
 
5:38 PM
FFFFFFUUUUUUUUUUUUUUUUUUUUU
paid off, finally
anyone use Lending Club as an investment vehicle?
 
lololololol 7 cents
 
...yeah...
thankfully they let me pay it off, I didn't get the "payments must be >$1" BS
 
STW
I've had some $$$ invested there for a couple/few years... It's done decent, maybe around 7-8%. Overall it's not bad, but tying it up for 3-5 years is a bit iffy so I don't put much in
 
Yeah, my 401(k) has a minimum fee ratio of like 1.24% which is way too high
 
anybody here has experience of ServiceStack and protobuf format
 
5:52 PM
@STW any idea what the minimums are for being a lender?
 
STW
pretty low, when I enrolled there was a $500 minimum (if I recall) to use some of the tools, but otherwise I think you could start for just a few bucks
I've had way better returns with Vanguard index funds though, I'm looking at rolling my Roth IRA over there to get away from some higher fee/ratio American Funds
 
gotcha
yeah, I made the stupid mistake of putting about $3500 into my company 401(k)
no matching and the expense ratio is high (1.24% like I said)
I'm still paying off student loans though, so that's my first goal.
 
STW
it might not be the best idea but I wouldn't call it a stupid mistake. At least you're building a balance, it's better to have some money in a 401k with the ability to roll it over down the road than to wait until you need a lot in there and can't put it in fast enough
 
true, and I am 22
 
STW
although I favor a Roth IRA. You pay in post-tax, but I'm guessing by the time I'm looking at retiring taxes will have gone up
 
5:56 PM
I stopped contributing to it for now... going to focus on paying my student loans off, they're ~6.8% interest.
 
I managed to pay off all my college loans the day before the 6-month interest-free grace period ended.
 
STW
good call
 
@MikeF how much did you have in loans?
 
I was almost afraid I'd hit an edge case bug in their systems.
$16K.
 
I had $38k :/
 
STW
5:57 PM
lol, those off-by-one errors can hurt :P
 
I'm down to $28k
 
Speaking of retirement funds, I'm so glad I bought $675 of bitcoins when they were $8 each (plus tons of AMD mining)
 
yeah, aren't they like $60 each now?
 
lol
1100% RoR
 
STW
5:59 PM
nice!
 
Hopefully it's a wave-of-the-future non-bubble
I do kinda wish it was a more stable currency though
 
@MikeF I doubt they'll crash like everyone says they will, but they'll likely stabilize
all the ASICs that are coming out now are crazy
I just wish all that computing power was being put towards something useful, instead of just hashing numbers
 
@Pheonixblade9 Hashing numbers is useful... if you're into cryptography
 
as more merchants offer bitcoin-based prices, that should cause stability.
 
STW
anybody care to give me a "re-open" vote? stackoverflow.com/questions/15659875/…
 
6:01 PM
They should make Bitcoin use World Community Grid.
At least then the processing tasks have a positive effect on science, rather than just being bulk hash processors.
 
@STW sure, not sure why that was closed.
@ShotgunNinja exactly! Or something like BOINC.
although all the ASIC investment people have done would be useless now
 
STW
it was a littel vague before I added the explicit code--even though I think the question goes beyond that particular sample :)
 
@Pheonixblade9 You remember when everyone invested in Windows NT to make their business operations run more smoothly? Yeah, me neither.
I'm dismissing Bitcoin as a fad.
 
oh yeah, if I was @MikeF I would sell the BTC right now and put it in something more stable
 
Some day, there will be a Bitcoin ASIC somewhere in a museum, with a card reading, "Before the Digital Counterfeiting Act was passed in 2024, machines such as these were used to mass-produce digital currencies such as Bitcoins."
 
6:10 PM
that's what people said at $15
 
XTG
hi experts
i need some help
 
Pshhhhhhhhhhhh
He called us 'experts'
 
lololol
 
STW
lol
@XTG what's up?
 
on a sidenote, I just realized I'm practicing TDD for this project O_O
 
XTG
6:14 PM
what actually happens when we write new form();
 
STW
without calling Form.Open() (or .Show() or whatever it's called?)?
 
XTG
yeah
@STW u there ?
 
STW
quick test in LINQpad, it pops open anyways--I didn't expect that (but haven't worked with WinFomrs in 3 years).
nope
 
XTG
fine thnx
 
STW
I'm all experted out now
back to rolling a query-object parser for a fluent interface -> Solr engine :)
 
6:17 PM
Rests work password, gets locked out of computer. YOLO?
 
XTG
so can any body help ?
 
STW
starts billing @ $150/hr, 4 hr minimum
so... what are you looking for?
 
$150 hr? Damn man, that's extremely high even for Senior/Executive developers in the consulting field.
 
STW
I might be pricing myself out of his range. I smell a difficult customer
 
6:19 PM
@RyanTernier I charge $75/hr
 
@Pheonixblade9 But you probably get paid around 25-30/hr at your job right? ;)
 
@RyanTernier closer to 35-40
 
Hi guys.
 
not bad PB
You yanks get paid better than your northern, more manly neighbours
 
hahaha
well let's see
the typical formula is (salary / 250 work days) / 8 hours, right?
 
6:21 PM
hrm?
 
STW
I'd say the standard is 2000 hrs/year
 
Same thing
 
@STW yeah, so 250 days @ 8 hours/day
@RyanTernier yeah so I make ~$42/hr pretax
 
STW
oh, yeah....
 
I'm sallaried, but get paid out for OverTime, Stocks, proffit sharing, vacation, bonuses, and $2,000 bonus for birnging skilled people on
nice pb
for out of university. That's higher than may senior positions in Vancouver/Victoria
 
6:23 PM
@RyanTernier that's including bonus, though :)
 
then Canada gov comes in and says "ohhhh i want 40% of what you make"
and I say FUUUUU
 
hahaha
 
So much, really?
 
then my ex says "ohhh money..."
 
Washington is weird. No state income tax, but sales tax is 9.5%
 
6:23 PM
12% Tax
40% income tax
EI Tax, CPP Tax etc.
 
I get no 401k matching though :(
 
we dont' have any 401 stuff in BC
 
STW
so what percent of your gross salary goes bye-bye before you get your net income?
 
some jobs have a pension
with all deductions about 50%
 
I got like $5000 back in tax refund for 2012
 
6:24 PM
then I'll get about 25% of that back come tax time
 
but I got to deduct all of my school expenses (graduated spring 20120
 
i'll be getting around 5-7k back this tax season because of my ex
i'm also starting my home based business up again
to do some work for a friend so I can expense 40% of my rent
 
How would you experts parallelize the traversal of a tree in which every node can have up to 3 children of unknown length? With threads, tasks or parallel.for or something else? (The goal is to search one particular node, and the tree has no order.)
 
nice
@Kenji well, I would break up the tree first, otherwise you'll risk getting locks
 
do you care how they're traversed?
 
STW
6:26 PM
@Kenji -- very crudely until it works, and then tune it until it isn't too slow anymore :D
 
He could Lock the sub nodes PB
If you have a tree with nodes, take the root tree out of the picture and look at each node
 
The problem is, I can't just start a new task for every child, the overhead would be way too big.
 
Well yes if you're running like a 2-core processor
most dev computers have 4-32 now
 
It's probably going to be used on 2-4 cores. Linear speedup is probably impossible, right?
and no, I don't care how they're traversed, I just need one node that's randomly in there.
 
Break it down into tasks.
you have a tree with X nodes, and each of the nodes has up to 3 children. so max X*3 nodes you're looking at?
 
6:30 PM
@Kenji is it a b-tree? is it ordered in any way? If so, you can do a binary search
 
No order, and not binary, it's ternary.
 
like that?
 
yup, like that. but not so evenly distributed.
for example, maybe node 3 has no child at all.
 
yup
What version of .net?
 
nice graphic by the way.
i think I'm still stuck with 4.0 :O
 
6:31 PM
better than 1.1 ;)
 
Haha indeed.
 
So you could use TPL
 
Parallel.For()
 
ignore node 1, and focus on the 2, 3, 4 level
then you don't get into locking
 
yeah. if the thread only works downward, i need no locking at all anyways.
 
6:32 PM
using parallel methods, the framework will determine how to give the most efficient solution
You could build 1 recursive function that accepts a node
and searches the node for nodes and then calls itself for sub nodes
or you could try to use a lamda
 
Is there a way to tell TPL that I want, for example, 2 threads working on my tasks?
 
and then just parallel the biznitch out of it.
 
And not 4 even though 4 may be available?
 
Yeah, that sounds like a good solution. I can't get too recursive though because then the stack is overflowing.
 
6:35 PM
maybe use async tasks with cancellationtokens?
cancel once you find your thing
 
Yup, that's another problem. Since I can't abort tasks, I will need cancellation tokens, you're right.
 
I might be wrong, but MaxDegreeOfParallelism can determine how many parallel threads to use
Good idea Mike
 
Hmm, never heard of this before.
 
Hello, can I ask a question?
 
Anyways, thanks for the ideas, guys.
Sure, brano, but I probably can't answer it ;)
 
6:39 PM
Hehe...Its about Interfaces and abstract classes. Can you answer that?
 
i probably can
The answer is : Use them.
 
Probably not. But the other people here are awesome.
 
Excellent @RyanTernier! Now can I ask
?
 
ask away - don't need to ask permission here
 
Oki doki
LEts say I have a interface and one method within
And also lets say I have a abstract class and abstract method within that class
Then I have some class wich extends that abstract class and implements interface
Now...
Why does method implemented from abstract class require override modifier
and method from interface does not?
Aren't they same by all characteristics?
 
6:44 PM
Because abstract methods are virtual methods, whereas methods in interfaces aren't methods at all, just a signature that you have to implement.
 
hm...weird..
Can you clarify that a bit?
 
XTG
@Frey then what is the fun of having unddefined
 
XTG
signatures of functions
 
I thought that methods within interfaces are abstract by default too :S
 
6:46 PM
Classes (Abstract and regular) implement interfaces, which is basically a contract sayign "I'll implement everything you have there Mr Interface"
 
Nope, they don't have any sort of implementation whatsoever within the interface.
 
this is quite powerful because it allows you use your interface as a base type in your system for loser coupled code
 
loser coupled? That's a new term for me.
 
So basically interface methods != abstract methods right?
 
Right.
 
XTG
6:47 PM
guys may i ask a silly question
?
 
I HATE WINDOWS
 
6 mins ago, by Ryan Ternier
ask away - don't need to ask permission here
 
"this is quite powerful because it allows you use your interface as a base type in your system for loser coupled code" Everyone knows that, but whats a purpose of special interface method :S
 
1
A: How do I register a DLL on Windows 7 64-bit?

DragosIf the DLL is 64 bit: Copy the DLL to C:\Windows\SysWoW64\ In elevated cmd: %windir%\SysWoW64\regsvr32.exe %windir%\SysWoW64\namedll.dll if the DLL is 32 bit: Copy the DLL to C:\Windows\System32\ In elevated cmd: %windir%\System32\regsvr32.exe %windir%\System32\namedll.dll

 
XTG
lets us say class a and class b are there why are they not of same type
?
 
6:49 PM
how does that last answer have an upvote?!
 
@brano88 If an interface contains a method, you need to implement it in implementing classes.
 
Same as abstract method... :S
 
@XTG Because they're different.
@brano88 Yeah.
 
XTG
in what terms as they are just references to the locations of memory
 
So interface method == abstract method :))))))
 
6:51 PM
@brano88 can't you inherit the parents method if you don't want to implement your own, or are you required to implement its own method in both abstract and interface?
 
noooo
 
@brano88 No, they are different.
 
They both require to be implemented. Am I right or right?
And they both have no body
 
Yes.
 
So...
Whats a difference?
 
6:52 PM
If you will recall...
10 mins ago, by brano88
Why does method implemented from abstract class require override modifier
 
Yes..
 
XTG
@Frey can u please explain what happens when we write new Form();
 
Oh sorry I get it... abstract method require to be implemented only if its in abstract class.
My bad
 
?
An abstract method needs to be implemented in all non-abstract derived classes.
 
XTG
6:55 PM
i know but lets say i have a form with some controls with some data
and i create new instance of the form can i access the data of the controls if yes how
 
Thanks for the help guys! Bye.
 
WTF is your question? I have no idea what you're trying to do.
 
XTG
i want to say if i have controls on form a and i create an instance of from a in form b
will there be the controls on new form of type a ?
 
I think this is basically the question? pastebin.com/SGkkjWSf
 
Sure there will be controls, if you put some on in the designer.
 

« first day (893 days earlier)      last day (4047 days later) »