« first day (907 days earlier)      last day (4267 days later) » 

13:12
When I set the .Visible on my window the program exits... is there anyway to avoid that?
(it's the only window)
the thing is that I want my NotifyIcon to be the only thing visible to the user
Don't do it?
I used windowstate, but when minimizing, my window didn't dissapear, it only got really small and placed byt the startbutton...
the window's FormBorderStyle is FixedToolWindow
.Hide() does the same then?
mhmm
Sorry, my winforms are a 'lil rusty.
13:19
Hmm if I change to FixedSingle it works better... (with windowsState)
i don't get it though... why would the program exit?
You sure it does exit?
In my sample program it doesn't
the window is gone ofcourse but the process is still there
Maybe you just can't... See it? In mine it doesn't either.
my debug sessions terminates...
Oh well...
Are you calling anything else except visible?
13:23
you sure there is no code which might does that?
Guys, I want to discuss an answer I received to a question I asked a while back. Do I need to start a new thread or what? I am new to this aspect of the site...
You could discuss it, sure :).
if it concernes c# it's ok here
It does. The question is not massive or hard to understand. It is here stackoverflow.com/questions/15521204/…
@Markus you call Form.Visible = false, right?
13:25
this.Visible = false;
is notifyicon a child control or separate?
child
.visible applies to children as well
@Killercam whats your question?
The answer suggests (which I thought was correct - but am now having doubts over) that the resource strings that are referenced at run-time are cached... The issue I am having is that if you look at the auto-generated .cs file it uses GetString() method. is the answer correct?
13:26
@drch Don't you know what a notifyicon is?
The answer to the Q I posted above...
@KendallFrey: yes
but if its set up as a child control to that form, form.visible will make that not visible as well
you can create the notify icon wihout it being a child control
hmm, but why would the debug terminate?
it wouldn't
13:28
hello. Whats the easiest solution to compare an array of equality, no matters the order?
always forget that's not irc
yeah it shouldnt terminate. theres something missing there...
Enumerable.SequenceEquals()?
are you calling Application.Run() or is this just falling through Main() and terminating?
don't know about order though
13:29
@CSharper probably to sort the arrays and then do a sid-by-side comparison. It is the sorting that will provide efficiency here...
sequence equals is order dependant ;)
@drch Didn't read the whole question, sorry :).
@derape any chance you could take a look at my question above.
probably better to order it anyways
@Killercam I did, as far as I can see, the ResourceManager does not cache the strings...
13:31
@Killercam I want to compare a char array of CRLF, but the source can be LFCR or CRLF.
They say you can implement your own RM to do caching...
@CSharper if it's ordered you'd call [0] == [0], if not [0] == every element... Which one is more efficient?
@derape cheers. This is what I thought. You can clearly see that the ResourceManager auto-generated code is calling GetString().
yes, I also looked at the decompiled code
of GetString()
It just loops through the file
@CSharper wtf? array of crlf?
13:33
@StefanDenchev the ordered one? :D
like new[] { "\r\n", "\n\r" }
Yeah, I will probably need to cache the strings myself for the working parts of the code 9inner loops etc.)
@drch exactly
a.length == b.length
13:34
@CSharper I am not familiar with CLRF?
@Killercam why are you afraid of the performace? We have a quite large win forms application and it performs fine
@Killercam \r\n
Why not replace all \r with \n and then compare?
@derape Yes. Some parts of the 'CostingEngine' of our code is has vast loops and many embedded loops. Speed is of the utmost importance here...
@KendallFrey mhm.. this is complicated, when possible I want not change the underlying data stream..
13:36
So don't change the underlying stream, only the items you're comparing.
if you know that all of the elements are either \r\n \r \n or \n\r you can just check the length of the arrays
you dont really need to compare the actual elements. at least not from your description earlier
@derape I have serveral resource files. The ones that deal with messages are not a problem at all. it is those above that are the concern...
@drch This is not true, I can't assume that the stream readed bytes are now a CRLF
oh ok i think i follow now
@CSharper read... You meant read, right?
13:38
@Killercam Sorry, I think I was wrong here. I was looking at the wrong code, it indeed does caching
CRLF is chr 10 and chr 13
the solution at the moment that I have is this:

var crlf = PeekArray(2); // reads 2 chars from the stream (like normal peak)
return Environment.NewLine.ToCharArray().SequenceEqual(crlf);
you could do byte[].Sum() == 23 :P :P
@drch lol
@drch you bloody cheater :P
13:39
@CSharper Just project \r to \n. That way \n\n and \n\n will be equal.
@KendallFrey ok
mine is awesomer
@Killercam Once a resourcefile is loaded, all resources a read into a hashtable. So everytime you access a resource it is read from that hashtable. So as long as you dont have like 100 resource files, I think you are okay from a performance point of view
Also brokener.
possible
13:41
"hits" != "shit"
well a better example would be chr(0) and chr(23)
I'm enjoying this regex: .replace(/^\s*(.*\S|.*)\s*$/, '$1');
It's actually right, but it looks so wrong.
@KendallFrey who cares, there are... What? 22 ways it can go wrong?
That can't be right :)...
@KendallFrey what about compare to \r\n | \n\r?
byte[].Intersect(new[] {CR, LF }).Count == 2
byte[0] = 10 && byte[1] == 13 || byte[0] == 13 && byte[1] == 10
13:44
ROFL
@drch and that is more efficient?
byte[].length == 2 && byte[].Union(new[] CR, LF).Count == 0
er wait
lol no should be == 2
i would think byte[0] = 10 && byte[1] == 13 || byte[0] == 13 && byte[1] == 10 would be extremely fast
@drch Agree
Right...
byte[].Lenght == 2 && Encoding.ASCII.GetString(byte).Trim('\r', '\n').Length == 0
ok im done
That's 11 ways... i think...
13:49
i could do this all day
@StefanDenchev haha.. and 2-3 cheater ways ^^
@CSharper just compare for [0] only and take your chances :P.
@StefanDenchev :)
Is it to risky to compare only against to any char of CRLF?
like this: CrLf.Contains(next);
umm... 1/3 odds i think
13:55
worse than baccarat
:)
better than dice
Is there a way to figure out the parent of a modal form without setting the parent explicitly in ShowDialog()?
Don't do it... It screws up the program.
If you didn't set it, it has no parent to figure out.
@StefanDenchev You say that because you don't know why or how to do it properly.
@KendallFrey possible.
Why would you?
@CSharper: are you just trying to delimit strings?
13:58
To prevent the user from using the parent.
@KendallFrey why would you not set the parent?
If you want it to be a top-level (independent) window
well but the modal form is connected somehow to its parent right?
@KendallFrey isn't it modeless, then?
through the "modality"
14:02
@KendallFrey i wasn't talking about showing dialogs altogether...
> To make a form owned by another form, assign its Owner property a reference to the form that will be the owner.
> When a form is owned by another form, it is closed or hidden with the owner form. For example, consider a form named Form2 that is owned by a form named Form1. If Form1 is closed or minimized, Form2 is also closed or hidden. Owned forms are also never displayed behind their owner form.
> You can use owned forms for windows such as find and replace windows, which should not disappear when the owner form is selected. To determine the forms that are owned by a parent form, use the OwnedForms property.
Afternoon
...is in 2 hours
@derape I have just seen your reply. I have decompiled mscorlib.dll myself and have looked through the code. it is really not clear if it is caching. It is doing some complex look-up, but is this caching of some sort- I don't know? I have asked another question on this here stackoverflow.com/questions/15928233/…
@derape thanks for your time...
I need a list of two dates,

using Dictionary<DateTime, DateTime> will be alright ? or should I create a List class instead
14:12
Use a Tuple.
@Killercam I will have a look
@derape just seen this message. Where did you get this information from?
Do you mean a list with two items, or a list of pairs?
forgot to mention its .Net 2.0
list of pairs
Whhyyyyyyyyyy
14:14
@MuhammadRaja no don't use a dictionary like this. It is not good practice.
@Killercam I will post the information in your question
So make a custom class for your pair.
@derape thanks again for your time...
@MuhammadRaja I would use a List<DataTime[]>.
No, you shouldn't use collections for tuples.
If you really don't want to make a custom class, you could use KVP. But I highly encourage making a custom class.
I will be receiving parameters for a web method from an iPhone app
14:18
yeah create your own date tuple
or List<DateTime[]>
oh man
today has already been an eventful day
Passed a surprise C# midterm today, only missed two questions to my knowledge.
then had someone attempt to access my Facebook account from an unknown device in California, and had my account locked.
and it's only 9:30am.
I locked your account? lol
hey - if anyone uses the facebook sdk - this is the last day of my 150 point bounty
Did you?
2
Q: what is gr:get:User in Facebook Graph Api? Application Limit Reached Error

Scott SelbyI have an app using facebook's javascript and c# sdk. One day I was getting the error 4 : Application request limit reached. In the facebook app dashboard I see this. Too Many Calls - 1 hour, 50 minutes Method Fraction of Budget gr:get:User 115% gr:...

14:30
@ShotgunNinja Naw, haha
Well, all someone had to do was put in my email address into the login page on some device that wasn't mine, and Facebook would have flipped out about it.
IS it possible to create virtual sql database in Asp.net or C#?
1. Get Facebook
2. Never get a new computer
or...
never get facebook
Any one knows SQL fiddle site???
14:33
@KendallFrey Not that hard to try an email address on a different computer.
get as many computers as you want
Hey guys, just about to have a telephone interview for a .Net role. Any questions that you think i should ask?
whats better then this laptop,
@MuhammadRaja wrong chat^^
@StuartBlackler ask the framework version they use, if its < 5.0 just leave the interview =)
@StuartBlackler - ask the back end they use
14:35
ask if theres any office hotties
ask if you can drink beer at work
@derape how it wrong chat lol
the hotness of the receptionist has been a tie breaker on more than one contract of mine
@MuhammadRaja According to some quick Googling, they're decent, Atom-core laptops, but they have bad battery life.
@drch sorry for late answer. No, I read a file that is record based.
14:36
I found mostly 4/5 ratings.
@ScottSelby lol, my work has Miller High Life in the vending machine ("for promotional purposes only")
@ShotgunNinja atom-core VS i5 processors, you must be kidding me
@ShotgunNinja - yea we can drink on fridays , four loko is one of our clients , but that shit is kinda gross
@StuartBlackler: as where they see themselves in 5 years
HOW DO YOU LIKE SHITTY OPEN ENDED QUESTIONS MR INTERVIEWR
@ScottSelby FourLoko? Jeez...
14:38
we promote music fests and stuff like that
a lot of electronic music
Nice! I help out with grassroots electronic DJs, mostly at local anime conventions
Just setup and toting equipment, but still.
ive also got:

- Is there a chance for promotion in the future?
- In what way is performance measured and reviewed?
- How many other people are in the team I am potentially joining?
I don't think we're doing grassroots this year
By "grassroots" I just mean kids with turntables in their basements.
Guess I'm not even that.
14:40
oh... there is a festival called grassroots , in michigan I think
Yeah, sorry for the mixup
I know what Mixxx is.
And I have Audacity and BRELS MIDI Editor
I made the music for my game.
Reason + FL Studio + Sylenth1 ftw!
But I am not a DJ.
Yeah, my buddy from high school just started into DJing...
Even though I want to be.
see, you can win tickets and shit for sharing on facebook and getting friends to buy tickets , that kind of promoting stuff
Oh, sweet
where is @Igy when you need him
damn it - he works for facebook sdk - and I neeed him to answer my questioin
or @lgy , whatever his name is
14:45
does any one know how can i correctly nest this operation?
var model = new []
{
foreach (var i in lista)
{
new EstablishmentListingModel {Id = i.EstablishmentId, Checked=false, Name=i.Name};


}
}
why can't you message other users directly SO ?? whyyyyy?
it gives me an error on the foreach
seriously , that sucks , when we'd be willing to pay a couple hundred dollars just for him to answer
var model = lista.Select(i=>new EstablishBlah { ID=i.Foo, Checked = false, Name = i.Bar}).ToArray();
thanks!
14:59
Hey, was I made a room owner?
D:
I was.
in case anyone likes Metroid: harmonyofahunter.net
@ShotgunNinja haha
I went to the drop-down, and I saw "Pin this message". ehehehehehehe...
I was performing room-owner maintenance on Saturday.
Hmm, so why add me, I must ask?
15:10
You're a regular visitor, and not a regular dick.
Cool.
must... resist... starring...
Hi, I'm not sure if it's against the rules/frowned upon to link questions here when in need of help? Would anyone mind having a look at a problem I'm lost with?
it's not against the rules, but it still doesn't guarantee you an answer
It's okay to link questions, but no spamming.
If you repeatedly ask the same question, it will get binned.
In this room is in ok, in c++ it is not
15:13
Not spam, more my question has four views and while I find it challenging, I don't think it is for those of you with talent
Link it once, don't link it again for at least an hour :P
Fair enough, thanks guys (:
what was the q?
the code samples are in vb.net, as is my project, but I can't find a vb chatroom so this is it - stackoverflow.com/questions/15915545/…
15:16
There was a VB room once upon a time, but it didn't get enough activity and was deleted.
are you sure it did not just fall into the depths of the chat room list
No, it's gone.
0
Q: How do I connect to a c# chat server on ec2

SteveI created a chat server with c#. I can run this all on localhost and the client can connect to the server. I set up an Amazon EC2 cloud service. I set up the server on there and started it. I cannot connect to the server running in my ec2 instance from my client running on my home computer. I s...

Frozen, actually.
@KendallFrey We should have been on a schedule to go in there and write vb sux or something every day to keep it open.
@Steve Did you bind to localhost instead of IPAddress.All?
check windows firewall rules too
@RoelvanUden i'm not binding to anything on the server, i accept any connection and don't limit the source ip address. On the client I connect to the servers ip addy
ohhhhhhhhhhh
ahaha
wait
That moment...
its been a while since i wrote this, let me look at it really quick
15:22
@zneak not sure how to apply that to my code, I don't even know where web.config is, or if I have one, I'm not using IIS
no its set up right,
server = new TcpListener(System.Net.IPAddress.Parse("127.0.0.1"), 6789);
So... you're listening only to localhost?
6 mins ago, by Roel van Uden
@Steve Did you bind to localhost instead of IPAddress.All?
yeah you're right
i haven't opened this project up in like six months, sorry a little confused
External machines will connect via your public IP, not your loopback.
Just use IPAddress.All
.Any
15:27
yeah, i dont know why i was thinking "i want it to listen on this computer"... no shit its going to listen on the current computer, i'm running it on the current computer, dip shit steve
typical steve
lol fml
herp derp
I have a JS date. How do I subtract an hour from it?
new date(date.getTime() subtract 1 hour in millis)
15:32
Derpity derp. Of course.
var newDate = new Date(oldDate - 60000 * 60);
@KendallFrey I have a real date. You know how I subtract an hour from it? Taking her home before dessert.
dont tie her up before you put her in the trunk
G'day ladies and germs
15:35
Any TFS nuts around?
G'day Mr.Virus.
@Darek In a year, maybe.
hello. How can I sum ulongs?
ulongs.Sum()
there is no overload for ulong?
Does anyone know where TFS test case recordings from Test Manager go? A BLOB in the database?
15:37
ulongs.Aggregate or freakin for loop that shit
@CSharper Isn't a ulong just a base value type? Can't you just use the + operator like everything else?
@CSharper You could cast-sum-cast
probably bad unless you are casting up to bigint
overflow etc
@drch and that's probably slow as shit
Naw, you can cast to long.
15:37
in a sum operation!?
i dont think so tim
hang on
ugh still not working
steve: now tha tits bound to inaddr.Any, can you still connect locally?
@drch that it's*
ty
still thinkin about the trunk
15:39
TITS
I'm thinkin about tha tits
@Steve Team Information Technology System?
ulong[] ulongs = new ulong[] { 1, 11, 11111111111111111111 };
ulong sum = (ulong)ulongs.Cast<long>().Sum();
yup can still connect locally
What would you expect the result to be?
@KendallFrey something like this: ulong result = myClass.Sum(p => (long)p.uLongValue)
15:41
That would also work. It does the same thing in a different order.
@KendallFrey ok, thanks
er nonono
wtf
i dont think that will work
Why not?
if its over maxvalue/2 its giong to be interpreted as negaive when you cast
man this keyboard fucking sucks
15:42
That doesn't matter. Two's complement FTW
The code I posted correctly results in 11111111111111111123
Yeah, since it's just addition, it still works.
If it were multiplication, then there'd be issues.
As long as you don't multiply or divide, you're okay.
its addition only..
Then you're fine. Put a comment in your code to clarify that.
Yes, do.
Make sure you include "two's complement" and "FTW" somewhere in the comment.
:)
15:45
hang on
Something to the effect of "This may appear to overflow when casted from ulong to long, but because of two's complement and the fact that we're only doing addition, the binary equivalent still holds true."
Protip: If your comments are so long that they need comments, you're doing it wrong.
haha
is there a way to have pics as comments?
@JohanLarsson ASCII art!
15:47
yeah!
urls are also valid comments. without the // before.
troll comment!
http://www.google.com/ is a valid line of C# code.
urls are the most frequent comments I make, don't comment much
but I have often missed pic support for math stuff
If you want to see my academic form of comments that need comments, look no further than my project description for my AI Wumpus World project from last year.
474
Q: Why is this program erroneously rejected by three C++ compilers?

James McNellisI am having some difficulty compiling a C++ program that I've written. This program is very simple and, to the best of my knowledge, conforms to all the rules set forth in the C++ Standard. I've read over the entirety of ISO/IEC 14882:2003 twice to be sure. The program is as follows: Here i...

15:50
Pictures FTW.
no fuckin way
23-page writeup on the full implementation details of a week-long project. I got shingles while writing it.
@KendallFrey hahahahaha...
Number 1 NSFW song: Hey Baby by deadmau5 O_o
Thanks to all, for help with the ulong problematic.. it's solved now :)
15:59
I'm claiming the answer @Steve :P
@RoelvanUden it still doesn't work :(*
@Steve Boo! Firewall?
still working on it

« first day (907 days earlier)      last day (4267 days later) »