« first day (807 days earlier)      last day (4367 days later) » 

00:00
Hey guys I have a question from this guys question
0
Q: Should the GraphicsPath be disposed after use

Storefront DoorsI am making some utility classes that make different types of symbols to place onto an elevation of CAD drawings. I want to make sure that if I need to dispose of the GraphicsPath object that I do so. In the code below from inside the getCircle function it shows that I am passing the myPath "Gra...

Am I not right that the GC will not run since he is using ref?
@Billdr: MFLB
I don't know what that means.
I don't smoke weed any more... haven't in 12 years now, other than a trip to Amsterdam. Unless you're a chemist, I'm kinda ready to move back to my code :p
@JABFreeware no idea, sorry.
@Billdr that okay
no sorry, but you should google it. Small and transportable vaporizer I guess ;)
guys, can I treat decimal like an int for math if I'm only concerned with the first two decimal places?
00:04
@Billdr I know about that
you mean something like this 10.23 / 2.3 an answer like 5 is okay with you??? @Billdr
Sanity check, I wrote this but have a feeling it is not very nice, flame
@JohanLarsson hey do you know that answer to this (my question to his)
3 mins ago, by JABFreeware
Am I not right that the GC will not run since he is using ref?
@JABFreeware Even easier. decimal i = .03; decimal x = i*2;
I want that to be .06. For example.
:6929516 Am I not right that the GC will not run since he is using ref? See I'm trying to learn more about GC and since he is using ref to a return value what will happen?
@Billdr ummm no!
@JABFreeware ok, I'm tired :) checking it now
00:07
welll.... crap.
decimal wallet = 50;
decimal bet = .01;
wallet -= bet; //should be 49.99
That's kosher, ya?
@JABFreeware no sry, too tired
bet could, in theory, be any number between .01 and 50.
1.999998766543221?
@Billdr no wait!
sorry, any number rounded to the nearest hundreths position.
00:10
sorry I thought you were meaning something else
Yes this works just fine
if (blackJack)
                {
                    payout = bet*2.5;
                }
                else
                {
                    payout = bet*2;
                }
payout is a decimal, bet is a decimal
@Billdr yes it will be fine because they are both decimals
I thought you meant one was a dec and the other an int
but 2 isn't... I think 2.5 is a double.
@Billdr Its a decimal variable though
@Johan - Why not use linq?
00:11
I'll have to cast that as a decimal, won't I?
@Billdr well yes
@Billdr as far as I recall that results in an implicit conversion
...
@RobWhite I dont think so
I know from experience it certianly doesnt work with floats
I'm going to use the Nike slogan...Just Do It
yea, I know floats are busted
00:12
you can do 2.0
and see what happens
@CCInc yeah good idea
@TravisJ idk, brain freeze? I felt there should be a better way, but linq is not really meant to modify stuff?
I really should studying up on all this
That'll still be a double. I'll cast 2 and 2.5 to decimal.
00:13
@Johan - I posted a competing answer, sorry :(
myList.Where(l => l == 5).ToList().ForEach(l => l = 9);
then wait for KF who knows what the hell is going on with floating point numbers.
@TravisJ don't be sorry but I'm gonna test it :)
I probably should have tested it before I posted lol
There are also short codes such as 2M, 2F, 2L, 2d etc
00:15
@RobWhite I have no idea what that link means :/
ulong is something my wife says to me. Dunno what it does in C#.
Sigh, it still requires something else
The integral types are implicitly converted to decimal and the result evaluates to decimal. Therefore you can initialize a decimal variable using an integer literal, without the suffix, as follows:

decimal myMoney = 300;

There is no implicit conversion between floating-point types and the decimal type; therefore, a cast must be used to convert between these two types. For example:

decimal myMoney = 99.9m;
double x = (double)myMoney;
myMoney = (decimal)x;
@TravisJ You might want to remove it, it does not work when I test it
    [Test]
    public void LinqReplaceTest()
    {
        List<int> myList = new List<int>() { 8, 5, 6, 2, 3 };
        myList.Where(l => l == 5).ToList().ForEach(l => l = 9);
        Assert.IsTrue(new[]{8,9,6,2,3}.SequenceEqual(myList));
    }
whoever it was who said that is is implicitly casted is right @Billdr
@JABFreeware that would be me :P
00:17
@RobWhite Well good job :)
@Johan - I already did, I think it can still be done though.
EVERYONE: it was @RobWhite who said that decimals are implicitly casted!
@Billdr @JABFreeware the link I posted above shows what conversions are handled so you can see that int can be implicitly converted to long , float, double or decimal for example
@JABFreeware lol smartass
@TravisJ good thing before the haters found it :)
So payout = bet*2.5m; is going to give me correct numbers, to the hundredths place?
assuming payout and bet are both decimal
00:18
@Billdr you bet
non pun intended
LOL :)
I see what you did there.
@RobWhite star it!
@RobWhite Thanks I appreciate that
If I see more than two decimal positions in the wallet table after a week of running this I'm coming to you Jab.
You know its hard to remmeber all of the rule to conversions
@Billdr bet * 2.5 would work just fine too
decimalised numbers are defaulted to decimal datatype
in C# 2 = int, 2.5 = decimal, using 2.5M is just being more explicit
00:20
@RobWhite I haven't trusted floating point math since .09+.01 != .1. I'm going to be explicit from here out.
@Billdr I'm all for being explicit, just being explicit myself in explaining ;)
2.0 = decima
Heh, thanks
@CCInc yep
00:22
@Billdr LOL
@Billdr no problem
Hmm, I separated out a comment discussion into a chat discussion earlier but I'm not sure if it's automatically linked for the other person. Do I need to add a link to it into the comments or anything?
Can someoen asnwer this guys question I am truly curious to teh answer
6
Q: Find the point on a circle with given center point, radius, and degree

KyleIt's been 10 years since I did any math like this... I am programming a game in 2D and moving a player around. As I move the player around I am trying to calculate the point on a circle 200 pixels away from the player position given a positive OR negative angle(degree) between -360 to 360. The sc...

@RobWhite think its automatic
Doesn't C# use radians, not degrees?
so... job a is to convert degrees to radians
@Billdr oh okay
00:33
jaw drop rrr..rrrrrr... raddiannss?
radians all day
what is this evil u speak of!
a pita in every calculus and geometry text book printed since Newton.
this rooms gone boring :) so much constructive talk recently :)
My talk has been about blackjack. I'm not sure that can be counted as constructive.
Also, I'm just about done with the non-real-money mode of the game.
00:34
it is, cos ur working on it
oo.. match started
@Billdr is your website online?
which I will publish and expect you to attempt to hack.
@JABFreeware I don't think the live version is functional atm.
At least not fully functional
@Billdr Honestly? I dont hack websites
@JABFreeware Now's a good time to start
@Billdr I like to stay legal
00:38
It's illegal if you do it without permission. It's like going in to someone's home.
If they invite you, it's going for a visit. If they don't, it's trespass.
@Billdr Oh yeah if you ask thats another thing
then you just have to make sure the person asking you si really the owner
I am asking you to hack my website while I'm just messing around with fake money so that I know of any problems before I start putting in less fake money.
Make sense?
@Billdr yep
If this works out well, I'll give everyone who reports a database-impacting bug their very own white hat.
Is this a good way to generate prime numbers?
    private IEnumerable<int> GetPrimes()
    {
        int i = 2;
        var primes = new List<int> { 2 };
        yield return 2;
        while (true)
        {
            i++;
            if (!primes.Any(j => i % j == 0))
            {
                primes.Add(i);
                yield return i;
            }
        }
    }
00:43
@JohanLarsson generate!
no ;)
God damn math questions are breaking my head.
Is a prime a prime in every notation?
@BeatMe inefficient?
well finding if a number is prime is easy enough but why would you want to create them? @JohanLarsson
Sieve of Eratosthenes and Atkins are two good algorithms, depending on what you need
00:44
how do you determine if an oct number is prime?
...how do you do division in oct?
@BeatMe ty
@Billdr whats "oct"
?
base8
@Billdr forget it!
like hex
or bin
00:45
@JABFreeware I'm playing with this
can't believe you changed the room to "Skeet was here"
13
Q: Is a prime number still a prime when in a different base?

PramIs a prime number in the decimal system still a prime when converted to a different base?

@StuartBlackler not fan boi enough, I agree
SE is awesome.
you won't understand a word :P
00:47
@JohanLarsson Well Im too lazy to do math on sunday
@BeatMe Dense math notation reads poorly!
Thanks @BeatMe.
@BeatMe Is my implementation wrong or just inefficient/dumb?
@JohanLarsson, for reverence, I need <100ms for Problem 10 and 64ms for Problem 12
nope, I got it. The dec37=hex25!=hex5^2 makes sense.
00:49
just seen my first user that has got into the suspension box
penalty box / w/e
@BeatMe ok, getting there
@StuartBlackler who?
ahahaha
Shoulders of midgets.
haha, just seen that
@Billdr good job I know how to do it but I im too lazy on sundays
00:50
inefficient, but probably valid, don't know
@JABFreeware wha?
I did nothing
@Billdr I dont know. I think it is becasuse I sleep so late
maybe
@BeatMe took 720 ms to generate 10001 primes, (104743)
has anyone tried azure AD?
00:52
Did you guys ever hear the story about a guy who write a program to calculate pi on his apple IIe over the course of 10 years?
The model of the computer might be wrong... it's been a while since I heard it.
@Billdr LOL
you want a programming joke?
Anyway, he goes to check the result after 10 years. He forgot to output the answer.
@JohanLarsson, not 1ms ;)
Sure.
@BeatMe very nice
00:54
@Billdr "Susan did not stay with the company because she failed to get arrays"
get it? arrays == "a raise"
she left because she didnt get arrays and thus did not get a raise
haw!
@Billdr sorry the summary was wrong see my eidt
edit
she was not fired i dont think
LOL
@BeatMe had a look at the algo but too tired, will check again tomorrow
Found where I heard that story.
01:01
sieve or eratosthenes is nice for "generating x primes", sieve of atkins is better suited for "primes up to x"
and they're really fast
@BeatMe ty, ty pls lurk here more :)
I did a slight "optimization" that did absolutely nothing for performance :)
Hi C# room.
Wow, that math link used a Lemma! That is freaking awesome.
Ho @mootinator.
this looks a little boring, more work than fun but here we go
01:09
yep ^^
Are we using one line LINQ expressions to solve stupid set problems?
Some of us are. I'm writing blackjack.
poker ^^
really?
pokerhand evaluator
01:11
That'd be handy.
I should be writing a PlayOn plugin, but I got discouraged by the useless documentation, and haven't fired up Visual Studio since I got around to grabbing a decompiler.
I can't do the mat at the table, other than the gut "There's no way he can beat my pair of 6s!"
I've learned not to trust my gut.
PlayOn?
well, there are really good ones available already
propokertools.com for example
@Billdr Is a server for forwarding flash based video to devices which don't support flash, basically.
the difficult part is giving your opponent a range and calculate your odds against that
01:12
Oh neat.
I'm writing a plugin to support my cable company's video on demand service.
like that browser on android before supporting flash?
in an official capacity? :D
@Billdr did you notice how C# started to attract game theory guys since you started with the blackjack thing? Do you think they are here for the hookers?
@Billdr Not in the slightest ;)
@BeatMe Something like that.
01:14
@JohanLarsson Naw, Kinected ne Lemur is a game dev. The game theory duders were around before.
Although I haven't seen Kinected around in a while.
Basically, I own a Blackberry Playbook and it doesn't play anything :P
@mootinator ha!
You're the guy keeping RIM in business. I wish you'd stop.
Afternoon folks.
Hey Bracketworks
I'm trying to pass a collection of anonymous objects to a method (a razor helper) but I'm unable to get data from the objects in the method. No property, runtime exception, etc., but I don't believe I'm crossing assembly boundaries, so I can't see why it isn't working.
Moreover, if I simply "echo" the object, I get a nice string of the property/values passed in for each object, correct of course.
01:18
Razor helpers hate anonymous objects.
Well I'm starting to hate razor helpers
Razor don't need no help.
but seriously, is this something you can't do better in your controller or jquery?
@Billdr me?
01:20
Yea
lol @ controllers.
No, this is just a Razor website.
straight razor? no mvc?
Correct.
wha... I don... huh?
tilt
@Billdr Are you trying to access properties using the more reflective method?
I'm pretty sure that won't work, at any rate.
01:21
Wrong duder.
I thought that was the case. ^^
@Billdr ?
Do tell.
Anyway, is there something inherently wrong with the helpers? Do they compile into some space off in the weeds that anonymous types dare not go?
The code for the helpers is open source :D
You mean, the parser source?
01:24
@Bracketworks Let me be honest here. I have no idea what your actual problem is :)
I don't use SO a lot, but is it common that you'll get comments that the problem pointless or answers that aren't relevant? stackoverflow.com/questions/14096116/…
@mootinator I was starting to get that impression.
is my question bad?
I guess I have anonymous types crossing an assembly boundary somewhere, as that's the only logical reason I could gather from the intertubes; damn it.
@Bracketworks I just get the vague impression you were trying to write a strongly-typed view with an anonymous object.
01:27
@mootinator Oh, no no; just a helper method that takes a params dynamic[] argument. It does a few quick things and writes the selected one; nothing particularly complicated, and it could easily be fixed by introducing a one-off type. I just didn't want to do that.
More importantly, I'm interested in why I can't. Meh.
Boo.
I suggest writing a strongly-worded letter.
Anyone up for some date entry?
I'll do it for .02btc.
What're we looking at this time cc?
@BeatMe think it looks ok, you might want to thank the guy who answered though. He put some effort in after all
Is btc bitcoin?
01:34
Yes it is
cc/define btc
yes
cc/undo
lolz
cc/works
BLAZE THAT CHRONIC
01:34
@Billdr Command works does not exist.
you can always trust urban
cc/die
How much is .02 btc in usd?
what did urban say?
Like $.30
@Billdr Something about 4:20
that sounds about right.
01:36
@CCInc - Almaron and Susanna Dickinson settled in Gonzales about 1835 as members of DeWitt's Colony. present with her daughter, Angelina when the Alamo fell in March 1836, Susanna witnessed the deaths of Almaron and the other Texans. She was released by Mexican General Santa Anna after the battle, and with as escort made her way to Sam Houston with news of the Alamo. She married Joseph Hannig in 1857 and lived in Austin until her death.
Wow, thanks Travis.
He deserves some btc
@TravisJ manual typing?
@Johan - Nah, it typed itself while I got coffee ;P
I have 0.00628499 BTC remaining
WOA You are rich!
01:38
like 8c rich
Thats more than me
Susanna W. Dickinson
(1814-1883)
Almaron and Susanna Dickinson settled in Gonzales about 1835 as members of DeWitt's Colony. Present with her daughter, Angelina, when the Alamo fell in March 1836, Susanna witnessed the deaths of Almaron and the other Texans. She was released by Mexican General Santa anna after the battle, and with an escort made her way to Sam Houston with news of the Alamo. She married Joseph Hanning in 1857 and lived in Austin until her death.
recorded - 1993
I have no btc D:
but wait until it explodes ^^
I currently have 27.62539816 btc
01:39
Thanks @Billdr
and $757+change waiting to buy.
Silkroad? ;)
still bitcoin
didn't change in the last 2 minutes ;)
I've made about $10 playing $1,000 on the market.
01:40
@TravisJ CC sure have found cheap labor, I predict he will have a fortune 500 before he is 18. Then he will buy an island for each of us, and a boat so we can visit each other :)
Yup!
@BeatMe Naw. I think silkroad is cool, and have made money there in the past (cracking hashes) but it's mostly to day trade and fund seed this blackjack game
Now that my HW is out of the way, I can get back to making some $$$$$
@Billdr - I beat you twice :P
I've made about -$30 on Intrade.
01:41
so you're really playing blackjack with bitcoins?
@TravisJ Yea, I didn't decide to pull the trigger on it right away.
@mootinator I made -$100 on eTrade :(
@BeatMe Well, I'll be the house. So my script will be playing blackjack with bitcoins.
free moneyz, I understand
Ok, JAB gave me this OTHER idea for my interface and I need opinionz
I'm hoping the blackjack game and maybe a few others will get me enough cushion to quit my day job and start web deving for myself.
gnight C#
01:43
later Johan!
night Johan
nite
@CCInc I think you should fix your aspect ratio.
That was JAB photoshopping
01:47
Time to call it a night I think, may not be on tomorrow so early Happy New Year to you all for when the time comes!
Later Rob!
Happy new year Rob!
Happy New year! :D
I get a OutOfMemoryException after using short over 1GB, how can I higher the limit?
my blackjack logic takes ~460 lines of code (including white space). Does that seem excessive?
01:50
what logic exactly?
aren't there already reviewed solutions?
all of the logic for the game.
the dealer, hitting, standing, betting, splitting, doubling, paying
Probably.
hitting
You should probably use random cards instead of an actual deck, in order to anger people.
Heres what I have so far
The only problem is, those buttons look really lame.
01:53
@mootinator actually, higher deck counts can work in the player's favor.
What color can I make them to look nice?
so if there are infinite cards, 1) odds of a 20/20 push are super high, and 2) the dealer will likely bust on 12 through 16
well, the dealer will still likely bust on a 12-16, but if there are infinite ten value cards waiting... they'll likely get called more often than infinite non-ten value cards.
also, odds of splits go way up significantly...
But not in a different distribution than for a single deck. Shouldn't infinite cards just make counting impossible?
01:55
On a single game-shuffle rotation it's impossible to get a decent count.
Ah.
So the availability of the already pulled 10s increases player odds slightly.
I get it :)
check out blackjack odds calculators. compare single deck vs 6 deck shoes. 6 decks are significantly better for the player, apparently.
Yeah, that makes sense.
Statistics is rarely intuitive.
word
which is why casinos work :p
01:59
My second game is going to be a coin toss game. If the first two coins match, you get your bet back. If the third coin matches, you double it, etc.
Now I want to find somewhere to play craps.
I find rolling dice satisfying.
Play D&D, it's easier on your wallet.

« first day (807 days earlier)      last day (4367 days later) »