« first day (1175 days earlier)      last day (3999 days later) » 

00:00
btw. you should consider overriding GetHashCode, Equals and == operator from the very beginning
can save you a lot of trouble later :)
ty ty
think I'm gonna use ushort just to be exotic, will prolly regret it later :)
:D
good luck :)
public struct Code : IEquatable<Code>, IXmlSerializable
{
    public Code(ushort major, ushort minor)
        : this()
    {
        Major = major;
        Minor = minor;
    }
    ...
}
is the : this() a struct thing?
yes
every struct has parameterless constructor defined by compiler which sets all fields to default
Would you implement TryParse the standard way with out TryParse(string s, out Code c)?
00:08
Yes, as a static method returning bool
out is pretty ugly but maybe convention is more important
it lets you control program flow without exceptions
I would follow the pattern from framework
that's how it's done for all primitive types
yeah
Equals et al. bloats the code :)
Why are week numbers such a pain
System.Globalization.Calendar seems to have a slight issue with conforming to ISO standards
Skeet wrote some time thing, think it is noda time, a port from java.
00:17
so we only have 36 tickets in the current sprint. whoo!
Is there any point in Numberstyles and culture when parsing ints?
@JohanLarsson if they're raw ASCII ints, usually no. But I'm sure there are some different codepages that might give you issues
I never met a codepage in my life :)
!!google codepage
00:23
@JohanLarsson Pheonix is right.
What's ROT13 for int?
I had fun with this one
this little struct is going to be 100 LOC
@JohanLarsson for example, C# uses Windows-1252 by default as its codepage.,
Where is TryParse? :)
my stuff is updated! MarcinJursazek, its user373782832423 :P i am devoted now
@Devoted Good for you! :)
@JohanLarsson I already see bugs
simply impossible :D
00:39
try call parse with null or empty string
ok writing a test
There are also 2 unnecessary boxing operations within ToString method
sigh, really starting to dislike week numbers
@MarcinJuraszek FormatException and NRE, is that not cool?
For example, if you were trying to determine the week number of Jan 1st, and the day of the week was saturday, then you would have to determine what the week number of Dec 31st was the prior year and then use that.
00:44
That's your call
I would rather throw ArgumentNullException on null
But never throw NRE yourself
Because if you do, I will hunt you down and give you a wedgie.
[TestCase("", 0, 0, ExpectedException = typeof(FormatException))]
[TestCase(null, 0, 0, ExpectedException = typeof(NullReferenceException))]
[TestCase("1", 1, 0)]
[TestCase("95.1", 95, 1)]
public void ParseTest(string s,int major, int minor)
{
    var code = Code.Parse(s);
    Assert.AreEqual(major, code.Major);
    Assert.AreEqual(minor, code.Minor);
}
YESSSSSSSSSS
new hat
@MarcinJuraszek ok fixing it but I must admit I see marginal benefit
@KendallFrey I just did not prevent the framework from throwing it
00:52
LMFAO
:)
so
oh god... I have a Java question... never mind
Ask Jon Skeet
I have a Java question too. The question is: Why?
@KendallFrey because Android
@KendallFrey yep, star
There are so many Java questions that begin with Why
00:56
quote of the day from a Korean coworker re: the company party: "damn white people, don't know how to drink"
lmfao
i like him
Why use it? Why does it exist? Why is it so slow? Why is it so verbose? Why doesn't it have properties? etc. etc.
i like java
@KendallFrey

because it's the platform's "native" language.

Because C/C++ multiplatform support used to suck.

Because it's a virtual machine language

Because it's generic to a fault

Because fuck you, that's why
I love Java, and by Java I mean your mother.
01:00
kendall, it wouldn't shock me that the only v you can get is from a 60 year old obese woman
hello
I'm just wondering...
can we stop flagging?
who flagged what
somebody flagged me didn't they*
@Jefffrey Just invalidate, son. Just invalidate
01:02
Yeah I'm with that Jefffrey
@Steve Yes, and me too
gone
@sehe I like to act like the flag police every now and then
> da flag police
Useful
@Jefffrey did somebody flag @Steve ?
Yes
01:03
Best to assume everything was flagged. Probably accurate too
you, frey and steve
wow... people are really sensitive in this room.
wait, somebody flagged me, too???
Erm. Don't act surprised
O_o somebody gets offended easily
Or bored
That, likely
01:03
may I ask for which message? I've been relatively inoffensive today.
I have the opportunity to throw in goto here :)
49 secs ago, by sehe
Best to assume everything was flagged. Probably accurate too
for the one that contains "fuck you"
@Pheonixblade9 I can vouch
meh, flags
01:04
uh oh, someone said fuck on the internet. better get the internet police.
Yup. Well, carry on :)
Night all
yeah, fuck flags
sorry about that, gents.
@sehe stay imo :)
well, I'm leaving too. I've accomplished my officer's duty.
bye
01:05
later man
@JohanLarsson What are you using goto for?
collapsed, why so huge
think goto could have cleaned that up a bit
Oi! @Johan!
01:13
I'm two clicks shy. I don't need pimping!
any clicks?
But thanks.
You're nice to me.
@ReedCopsey collapsed the code, see history if you are interested :)
@KitFox does that surprise you? If so why?
No.
It's probably our shared heritage.
Question is now, do I trust my TryParse or do I wrap it in a try-catch?
01:15
Although now that I'm over 500 views, I guess I should confess that I'm actually Norwegian.
I'm against try-catch on principle.
@KitFox have you started with C# yet?
@Pheonixblade9 look at #4
@KitFox have you started with C# yet?
01:19
that made me LOL so hard, but decided i shouldn't post it in the room
@JohanLarsson No. I changed jobs. C# isn't much different than VB though. I converted C# code a lot.
@Steve star imo
nah people have been flagging
don't want to draw attention to one of his old posts
ok removed it
oh you mean the search link, yeah thats fine, i just didn't want to permalink his post in here
01:24
Guillemets (, or , French: ), also called angle quotes or French quotation marks, are polylines, pointed as if arrows (« or »), sometimes forming a complementary set of punctuation marks used as a form of quotation mark. The symbol at either end—double « and » or single ‹ and ›—is a guillemet. They are used in a number of languages to indicate speech. They resemble the symbols for lesser than (), and for left and right bit shifts in some programming languages, as well as rewind and fast forward on various media players, such as VCRs, DVD players, and MP3 players. Etymology The word is a...
01:43
in Lounge<C++>, 3 mins ago, by Xeo
Messages containing "fuck": C# room - 2856 vs C++ room - 27047
02:10
Does someone want a logic puzzle?
I take that as a no
yeah, you got to consider I wrote a struct tonight
slow clap
structs aren't that hard, are they?
You should try writing REBEL
02:22
Tonight I actually started thinking about how verbose regex is
the code makes me a bit sad 100+ lines and it does almost nothing
strange, huh
yeah that is strange, I usually think the opposite
Should I parse or should I sleep?
@JohanLarsson You should implement Parse using TryParse
instead of having the same logic twice
just if(!TryParse(input, out temp)) throw new FormatException(); return temp;
just wrap it in try-catch?
oh, that way, yaeh
02:26
it will prevent code duplication
yep, true
+ there is still one boxing in ToString() method
oh
there is not ;)
you saw '.' ?
yes, I see it now
how did you come up with GetHashCode solution?
R# autogenerated it
02:29
I think it can be done better
!!afk dreaming about you
@KendallFrey Stay safe.
Major << 16 + Minor?
it will eliminate colisions
ah, very nice
just one more thing. Instead of strings.Count() > 2 you can use Lenght property. string.Split returns array, not IEnumerable
02:35
yes true, Count() will use .Length for array though. I think
still ty ty of course :)
Hmm
I wonder if my function still works
ccmsdn string.count
yeahhhhh
just remember that awesomeness, y'all
@MarcinJuraszek think it needed a parenthesis return (Major << 16) + Minor; gave expected results
02:54
thank you again for the reviews!
03:15
@Steve IM GLAD I SAID IT!
@JohanLarsson Count() will use ICollection.Count property but it will require one additional cast + if
.Length is the most correct no doubt
Yes, it is.
should probably reaplace Any() as well
Yes, you can
03:18
@Pheonixblade9 made me bust out laughing when i read that haha
 
4 hours later…
07:43
hey I have problem in stored procedure
I have a class for insert update and delete
and a stored procedure to insert value
any one here .......
morning all!!
heya @sandesh
08:22
hiii @RaZor
whatsup!?
still having that SQL problem?
I have to implement stored procedure using 3 tier
I have 3 tier class and a sp
in previous time when I didnt use sp
I directly pass the query of insert data to class
no what should I do ?
What is the flow
btn click -> sp -> class or btn click-> class -> sp
tell me
are you there @RaZor
yeah I am, but you need to use the @RaZor thingie more often
I'm writing code so not always looking
to answer your question: I suggest this...
You don't need a 3 tier class for executing that code. 3tier is often used when working with classes and objects, like I have an Object based on class 'X'
then I can use that object everywhere in my application.
What you should do is the following
Obtain the data needed to pass as parameter to the SP. Then call the method and pass parameters to the method. in the method your should execute the SP.
do you know how to execute an SP on SQL using C#?
yeh I know bt
how to execute sp in method...
may it be any tier
to execute sp you need to assign spname to commandObject.CommandText
and command.CommandType=Comandtype.StoredProcedure
08:33
@Vinay he doesn't know.........
ojj
ohh**
well.... @sandesh hold on... I'll get you a link
I guess you need a tutorial give me a moment while get a link for you
ha ha ha
XD
I use that alot lol it's 1 of my bookmarks hgaha
in the meantime you can also look into codeproject.com/Articles/361579/…
thats really brillaint saw it for the first time brilliant work ;)
lolll..... I am not asking how to search @RaZor lol
i know... :) but apperently you haven't searched since your asking a very very very simple question here...
08:39
oh I searched but I don't got what really I want
Let me explain one more time
public void operation(string operation,string str)
{
Opencon();
SqlCommand cmd = new SqlCommand(operation, str);
cmd.CommandType = CommandType.StoredProcedure;

cmd.ExecuteNonQuery();
Closecon();
}
This is my method to store data
an
yes?
my procedure is
you need to add parameters?
ALTER PROCEDURE dbo.CustMass

@flag char, @Cust_Id int , @Customer_Name varchar(50),@Mobile varchar(50)
AS
if(@flag='I')
begin
insert into tblCustmerMass (Cust_Id,Customer_Name,Mobile) values (@Cust_Id,@Customer_Name,@Mobile)
end
RETURN
this
ok
you need to add parameters?
08:42
ok I did when I didn't use method
bt now all of the project the same class will be used
then ?
I am first time using sp
it's very hard to understand what your problem is....
@VinayPandey your help is needed... :p
ok NOw listen
I have all the parameters of sp
you need microsoft application block and a sql helper to abstract application block for you
but that would be just to make a better DAL
you will still have to pass parameters and add them to your command there is no generic way of doing that, not a concrete one I would say
@Sandesh, get the basics corrected and there are loads of tools you can use
LINQ TO SQL, EntityFramework and others making things easier for you
I know this may not answer your question but other way you would always have such problems
if this is the specific question that you want to resolve, post the complete code and error you are getting
do you understand what i m askingb
create a question and there are people who can help you with that
@Sandesh, nope I am sorry for that
lets listen it again I could not understand
08:49
ok listen plz for last time
ok I use sp with out class
ok
and I use class without sp
keep on mind i have to insert data
using both of them
clear till now
when I use class
I dereclty pass value from btn click to class method
08:51
and same when I use only sp with out class the I add parameters to sp
now I have both sp and class
wht to do pass to sp then class or
pass to class then sp
Any ideas why Azure blob storage emulator is giving error to basic tutorial code samples? (Asp.net MVC project)
@VinayPandey are you understand wht I m saying ?
ok
not really but I get bit of it
I dont understand how you can have class in sp
or how can there two be related
do you want to insert values of a class object?
@Razor, you there?
yes
had a phone meeting
did you understand a bit of it
08:58
I had a phone call let me read back
I tried hard but could not understand what he was trying to say
neither can I......... his english is bad.... and it doesn't make any sense... Passing a class to an sp or an sp to a class???
Never heard of that before...
@Sandesh make a question on SO let other people look into it I can't help you because I simply don't understand what you are saying.... and @VinayPandey doesn't understand you aswell...
I thought he wants to serialized class object in form of xml and do some manipulation
me too....
but that ain't the case..
I thought his code would do the job of letting others understand what he is trying to say
before he could tell whether or not that was the case he left
09:04
He left? xD
omg.... guess he didn't need our help then lol
:)
ditto on the question not making any sense
09:07
Good afternoon
heya @shakthi
@TomW heya
morning
Hey @Razor
heya guys :)
if(heya) return 'heya'+@VinayPandey
09:10
lol
@shakthi I need your help with a service
I have this service which is manually made: Class Library... but now I need to make a service reference in mijn client project.. How can I do this?? Do I need to run my service and then create the service reference??
@shakthi
@TomW can you look into my question above?
your service needs to be hosted somewhere if you want to add reference
Okay, so if I run my service then I can add the reference?
otherwise it's not even possible?
okay kewl! thanks buddy!
09:16
no issues
no issues?
09:39
I mean glad it helped you
one more thing your service does not need to be up all the time for you to add reference, you can also create a proxy and use it
but then it needs to be up for execution
sorry for late reply was away for smoke
Ah okay :)
woot, I can finally nuke this old drive
moons ago, I set it up with two partitions, why, god knows. Since then I've not had the time or free space to back up everything I wanted off them so that I could format it. Until now
now you have that extra drive? :p
yeah, I've cannibalised several alternatives to back up to
nice!
09:53
have a great weekend guys
see you again
@RaZor yeah sure
cripes, full format is slow
lol yeah!
@shakthi fixed it :)
hello everybody! :D
heya @user3107180
10:03
O_o is that me?
Yup. I can see your name's changed. Maybe he can't?
@RaZor :) i was working with a colleague.
@shakthi np buddy :)
10:18
Damn, my service is going to be a badass service heheheh
Anybody have a good website to find sourcecodes at?
github
@user3107180 I suggest you to read and use tutorials. Using source code from others without knowing exactly how the code works is a bad idea ;)
I was told that looking at source codes and going through it until i understand it is a good idea
its not so much like I am just copy/pasting and saying I am a C# expert :P
well, as long as you read enough of it. A small sample can easily contain garbage and you'd be none the wiser
10:28
Just read the tutorials. Most tutorials have source code with very good explanations of the code :)
That's mostly how I learned everything I know so far :p
Can you get this to work?
I have not been able to since .net 3.5
what do you mean @JohanLarsson
I can't get it to step in
it just steps over
sorry can't help..
I suppose I really should set up a proper RAID
10:40
@TomW you could. or just make backups every week or so
all of those things
Get a NAS imo, I can recommend ReadyNas, insanely fast.
money no object, I'd build a RAID into my pc and another one as a NAS
then buy an offsite backup plan
@JohanLarsson synology is better, and even QNap is better than Netgear ReadyNas...
Hanselman's rule of thumb is minimum of three backups in three different formats of which at least 2 are off-site
10:41
Read so review about those 3 vendors
although he includes in his Rule of Three the tactic of sending DVDs full of photos of the kids to their grandparents
@RaZor Maybe, I have not tried, I have not have any problems with the ReadyNas and don't really know what could be better.
I've been coveting a Synology
but teh expensives
hmm, and the WD NAS edition drives seem to have quality problems, high DOA rate. Maybe I'll hang on....

« first day (1175 days earlier)      last day (3999 days later) »