« first day (873 days earlier)      last day (4090 days later) » 
00:00 - 12:0012:00 - 22:00

12:02 PM
@drch drch one more question please...?
 
12:40 PM
Hello anybody here
 
i have one question please help me about sql
 
i can try
 
Where i give password when i connect sqlserver 2008 i mean when i start then
 
where u give password?
to connect to the sql server?
 
12:44 PM
yes
 
@SaimaMaheen Hi
 
@Ahadaghapour hi
 
@SaimaMaheen whats the problem?
 
Saima
u have to choose Sql Server Authentication under the "Authentications" tag and then u can type username and pw
here is an example: prntscr.com/vcreq
 
Ok Thanxxxxxxxxxxxxxxxxxxxxx
@SaiefAl-Faour And How can i change server name
 
12:49 PM
You server name is the one you get from you provider, I don't know the name of that hehe :-)
 
Can someone answer this question?
0
Q: How to Bind a GridView Column to a List?

ArbaazI have a List called dayList which has 12 dates in it. I am trying to Bind this List to a GridView Column. GridView2.DataSource = dayList; GridView2.DataBind(); for (int i = 0; i < dayList.Count; i++) { Label lbldate = (Label)GridView2.Rows[i].FindCon...

 
Arbaaz u have already got a answer for that
in the question page
Can anyone tell me why im getting a nullrefernceexception when trying to get data from a database and display them in different texboxs and dropdownlists?
anyone with knowledge on linq?
 
1:15 PM
if your select does not return any data from db, then of course u will get null refrence exception
 
:8129987
Hi Timsen Im testing with different tabels and the problem seems only with this table, but the others are fine
var sql = ie.Database.Where(a => a.name == txbname.text).FirstOrDefault();
and then ddl.text = sql.lastname;
etc
but im getting an error on elements which is set to be nullable fromt he database
 
can u debuf sql variable? is it filled up with any items? or is it null?
debug*
u make a compare on text, u might have problem with a space somewhere like : my random text(space) and my random text(without space) is not same
 
ill try to debug
well
my sql statement findes the element im searching for
and then it can display data in the first 2 controlls
then the third one (dropdownlist) it fails with the nullexception
 
how do u add in dropdown list?
 
@Timsen Hello I have a sqlquestion please help me
 
1:28 PM
timsen an example here: DropDownListCalculationPer.SelectedItem.Text = sql.CalculationPer;
Saima whats ur sql question?
 
I have a sqltable i want to serach data between two dates what is sqlstatement?
 
TextBoxServiceName.Text = sql.ServiceName;
DropDownListPriceType.SelectedItem.Text = sqltype.Type;
DropDownListCalculationPer.SelectedItem.Text = sql.CalculationPer;

Timsen first 2 are fine and the last fails
 
try this approach :
ListItem l = new ListItem("text", "value", true);l.Selected = true;
Dropdownlist.Items.Add(l);
 
@SaiefAl-Faour Select * from where date = ?
 
No
@SaimaMaheen Select * from Table where date BETWEEN date ...... AND you date is something like 12-12-2012 and 10-11-2013
You can use between or the <= , >= operators
i would use the operators
@Timsen Timsen where do i applay this approach and insted of what?
 
1:33 PM
@SaiefAl-Faour i have two dates 12-03-2013 and 15-03-2013 now and i see data between these days Select * from table where date = 12-03-2013 BETWEEN date = 15-03-2013
 
your sql.CalculationPer contains any text at all?
 
Go to Google Maps and get directions from Tokyo to San Francisco maps.google.com/maps?saddr=tokyo&daddr=San+Francisco,+CA
 
@SaimaMaheen Select * from Table where date >='12-03-2013' AND date <='15-03-2013'
 
@SaiefAl-Faour thanxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 
Timsen yes it's has a value from the database
 
1:40 PM
Okay thats a guess... but try to srite DropDownListPriceType.SelectedItem.Value = sqltype.Type; after DropDownListPriceType.SelectedItem.Text = sqltype.Type;
 
Hi all, any idea what this error could refer to? The interwebz are insanely vague about it. The runtime has encountered a fatal error. The address of the error was at 0x59d45d64, on thread 0x91c. The error code is 0xc0000005. This error may be a bug in the CLR or in the unsafe or non-verifiable portions of user code. Common sources of this bug include user marshaling errors for COM-interop or PInvoke, which may corrupt the stack.
 
timsen lol im already doing that ill try out now thanks ill brb with some feedback
 
guys... i need to submit a description about my software at my college ... but i have never written one in my life .... so any tips on how to write one..
 
ah... do u populate your DropDownListCalculationPer before u set selectedItem.text? cause if not then ofcourse it will fail
DropDownListCalculationPer.selecteditem will choose item with lowest index, and if there are none, then it will call uor friend null refrence exception
our*
@MishMish check my previous message
 
Timsen yes i do poplate the dropdown on pageload
could that be the problem
?
 
1:53 PM
Hi every body
I have question
 
but u load items into list before u call DropDownListCalculationPer.selecteditem or after?
 
after dragging and dropping a folder to solution explorer, whats happen?
Imagine you drag a folder which that folder has some wave file
how can we reach this wave file in runtime?
 
Timsen actully my calculation pr is empty after page postback so there is no data there
so it's always empty unless i update ddlType which updates ddlCalPer
 
@MishMish just make a check if there are any items in dropdown
but i relly cant help u of how u get around this, since i dont know your buisness logic
 
yeah iknoe its a bit complicated thank u alot for ur time
i know*
 
2:00 PM
np
 
2:18 PM
is it easy to set up a local host sql database?
 
@klut yes, its very easy
 
@KendallFrey ah HA! I was wondering where you were
@Ahadaghapour what have you tried? have you tried google?
 
I'd answer the question if you told me what you get when you drop the folder in solution explorer. I'm too lazy to try it myself.
 
 
edc
2:27 PM
@Ahadaghapour I usually play it safe and use the Add Existing Item option in the context menu. I never really understand what happens with dragging-and-dropping to Solution Explorer.
 
yes, but I didnt good result
@edc let me to clear my demand
 
Well, if grammar you, maybe can we make help.
 
@edc I wanna copy some wave file in run time
but my wave file in my solution explorer
 
File.Copy Next, please.
 
edc
@Ahadaghapour Ah, then dragging files in Solution Explorer will not help.
@Ahadaghapour like what kendall said. Directory.GetCurrentDirectory() will also help you find where you are at during runtime.
 
2:30 PM
What happens when you drop the folder? Is it added to your project? Is it moved or copied on disk?
 
@edc Firs time I add those wave file in resorce
but I can't convert it to wave file in run time
and after than I try to Create new folder in Solution explorer
 
edc
http://www.c-sharpcorner.com/UploadFile/casperboekhoudt/CreatingandusingResources11282005051810AM/CreatingandusingResources.aspx
So you did something like this?
And what's the problem with the conversion?
 
and drag that wave files to that folder
and now, I dont know How I use this file?
 
2 mins ago, by Kendall Frey
What happens when you drop the folder? Is it added to your project? Is it moved or copied on disk?
I can't help you until you answer that question.
 
edc
Take a look at my link. See if that describes your problem.
 
2:33 PM
yes
@KendallFrey lets me to clear my question
I wanna create some wave file in runtime in c#
 
You want a wave file to appear on disk out of the blue when you run your program?
 
the firs approach is that you add your wave file in project Resources and then use it in run time
but I can't do this approach
 
Why not?
I think that's how you're supposed to do it.
 
@KendallFrey not out of the blue, I have record them already
 
Well, yes, but you want them to be copied from inside your exe?
 
2:37 PM
@KendallFrey yes, its one of the solution
how can I do that,
 
Use a Resource.
 
@KendallFrey after using Resources, how can change UnmanagedMemoryStream to wave file?
 
Create a FileStream and copy it to that.
 
@KendallFrey in the resource it always return unmanagedMemoryStream to me
I tryed that but didn't succes
let me do another approach
 
2:44 PM
I tried to do this link:
1
Q: How to copy a embeded music file to a path using Windows Forms and C#

mishamosherI've made a new proyect on Visual Studio 2010. It's a Windows Forms one, and done with .NET Framework 4 Client Profile. I've put on it a embeded WAV sound file. The only thing that I want to is to copy it to some path, let's say desktop as example. How can I achieve this? I've already tried th...

 
That looks good to me. What error did you get?
 
@KendallFrey brb
 
BTW, no need to ping me every time.
 
I'll return right away (Internet Slang)
 
2:53 PM
lmfao
 
I'm not sure why anyone would think I'm 20 years behind in "internet slang".
 
kendall, brb mean Be Right Back. Read up on your internet slang
2
 
@KendallFrey Internal Server Error
 
2:58 PM
@KendallFrey can you turn your head slightly to the left?
 
wtf gravatar
 
I moustache you a question ...
 
lol
lmfao
that poor guy\
 
Open the chat tab: see a random guy with a fake mustache
 
Much respect for Automattic
 
3:03 PM
Ssh, don't ping him.
 
he's going to come back and see it lol
i dunno
 
We'll find out. Kendall, can you still see the notification?
 
Nope.
Yup.
 
@KendallFrey Hi dear, what is this?
are you joking?
 
O NOES shits brick
 
3:05 PM
Kendall must ask you a question.
 
QUICK! SCROLL IT UP
 
@KendallFrey lmfao
 
scrolled
and we're safe... unless Ahad has a super high resolution display
 
ok, don't do it here
here is a c# programming chat
not for joking
 
YES THIS PLACE IS FOR JOKING
 
edc
3:07 PM
last time I checked this is #joking
 
joke joke joke
 
@Ahadaghapour sorry
 
when trying to set up MS Server 2008, it asks for SQL Server 2008 Installation Media and I have to browse for a folder. anyone know which folder I have to choose?
 
@KendallFrey obligatory: Stop yelling. My ears hurt!
 
@KendallFrey ok, I try to show its error in my code
 
3:09 PM
Knock, knock.
Who's there?
Winnie.
Winnie who?
Winnie the Pooh!

Ahahahahahahaha.....
There went my star...
I think I'm going to turn them into skeet again
 
edc
@Steve but I quite like the moustache. I think Ahad should consider the new avatar.
 
Yay! Skeet!
 
@edc lol i was laughing over here, trying to hide it so my co-workers didn't hear, because then they'd know i wasn't working
not that i have anything to work on anyway
 
edc
I am writing a web service that generates powerpoints
 
neat
 
3:13 PM
can we install an wpf program in a windows tablet pc...
 
@aashish2s not sure if you can do that on Windows RT
 
edc
@aashish2s no to Windows RT, but there are also Windows 8 Pro-based tablet PC.
 
@KendallFrey Stream resource = System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("bee‌​p");
resource aleays return null
always
 
edc
maybe because you don't have the resource called beep? Or maybe the executing assembly is not the assembly where you store the resoruces?
 
did you try "honk" ?
 
3:17 PM
@edc beep is a wave file I added in my resource project
 
@edc can you tell me which model supports the feature...
 
@edc I solve this problem
Stream resource = Properties.Resources.ResourceManager.GetStream("beep");
 
So hey guys, why on earth does Visual Studio 2012 take up ~600,000KB of PWS memory? Is it just that bulky?
 
edc
@aashish2s Almost everything laptop out there that is not Microsoft Surface.
It's like asking me what are all the resolutions of all the Android phones out there.
 
3:22 PM
@edc There's a chart, somewhere...
http://tekeye.biz/2012/example-list-of-android-device-screen-resolutions-and-sizes
Might be obsolete by now, but here's a partial list.
 
no i just want to know if those new windows tablets can execute .exe files..
 
@aashish2s Not conventional on-the-metal executables compiled for x86 or x64.
 
edc
Some of them do. Some of them don't.
 
k ... thanks
 
And some executables will work, and some won't.
It's not a cut-and-dried solution; the "exe" file format isn't just some basic standard that everything adheres to.
 
edc
3:25 PM
Probably not the answer you wanted, but that's the cold hard reality.
 
I like how *nix doesn't put extensions on executable files; this clears up any false conceptions that they're all structured the same internally.
 
edc
@ShotgunNinja by the way, that chart is at least 1-2 years behind :(
 
@edc @ShotgunNinja thanks any way
 
@edc Oh, I'm sure. I made no claims as to its accuracy, only to the fact that such charts exist.
 
edc
It's alright. I don't need to bother with that... so far.
 
3:30 PM
i am so tired
i want to go home and go to sleep
 
3:42 PM
Console.CancelKeyPress +=
(sender, e) => {
Console.WriteLine("CTRL+C detected!\n");
e.Cancel = true;
};
You can chain the ?? operator so that you can do a bunch of null comparisons.

string result = value1 ?? value2 ?? value3 ?? String.Empty;
 
posted on March 07, 2013 by Eric Lippert

We are closing in on the actual requirements of the "monad pattern". So far we've seen that for a monadic type M<T>, there must be a simple way to "wrap up" any value of T into an M<T>. And last … Continue reading →

 
@Steve It would be a shame if someone just cancelled the stars for your message :D
 
@yas4891 what do you mean
 
"324 somebody star this, just once"
 
lol it wouldn't be a shame, it was a silly joke that probably has no reason to be on the star board
 
3:58 PM
Do you write comments in the middle of a statement like
    var item =
        (from o in _currentList                // query current list
        where o.Foo == Bar                   //where Foo is the current Bar
        select o).ToList();                      //convert to list of o's. Should only be one result.
 
edc
In my opinion, that's way too much comment. I rather have one line describing what the code block does. But then, everyone has his own style and justification for it.
My style is to describe the logic, not the code.
 
I was asking about comments before the ; regardless of content of comment. Sorry.
 
edc
I think i do that ocassionally
 
your code should be self documenting, which means that your comments shouldn't describe your code, your code should do it its self. comments should describe WHY you did what you did
 
@Steve I like it somehow.
@edc definitely has a point there: explain WHY the code does something, not how (reading further down, @Steve has a better explanation than me)
 
4:05 PM
^
 
@edc given the above example: What values are contained in _currentList, why do you select only the Foo == Bar etc.
 
edc
@kush I think the fact that kush needs to comment LINQ this way shows that LINQ sometimes can get exceedingly complex.
 
in really complex statements having the style presented above has its merits - IMHO
hey darn... sorry @edc - I totally misattributed the code snippet to you
 
@edc so you guys think there might be cases where commenting in the middle of the statement has value?
 
@kush I'll give you the Engineer's answer: "It depends"
 
4:08 PM
sounds more like a politician's answer
 
edc
I say do that only when necessary, and not in every single LINQ.
It makes it boring to write, makes it boring to read.
 
don't do X dogmatically... don't restrain yourself from doing Y dogmatically. Fool around, fail, try harder, you'll get a feeling for when to use one over the other
And for the love of the flying spaghetti monster: Please star only messages from people with more wits than me
@kush Which just shows that Engineers should run the country ;-)
 
edc
I'd have no problem with that.
We will get shiny new infrastructure all the time.
 
@edc True - we would also probably replace 30-50% of all employees in government with some very small shell scripts
 
edc
But probably US will start a War on Unit, because everyone else uses metric.
 
4:20 PM
we should use metrics too, americans are a strange... proud people
 
@Steve you are already using the metric system
 
If [insert your location's name] decided to switch time zones, how much of the code need to change in your current project?
 
Metrication is the process of introducing the International System of Units (abbreviated SI for Système international d'unités), the metric system of measurement, to replace the traditional or customary units of measurement of a country or region. Although all U.S customary units have been redefined in terms of SI units, the United States does not commonly mandate the use of SI, making it, according to the CIA Factbook, one of three countries that has not adopted the International System of Units (SI) metric system as their official system of weights and measures, along with Burma (Myanm...
@kush Don't make me think about that :-/
 
@yas4891 we use it when we have to, not when we have a choice
 
Mine is a glorified ETL script pretty much so nothing really changes for me
 
4:22 PM
@Steve yeah... most people in the US don't use it very often :D
Interestingly many people don't know the different values of the american system either
like 4 quarts = 1 galon, 2 pints = 1 quart
 
edc
I am a Chinese born in Hong Kong (colonial time) who moved to Canada a decade ago. My use of units is quite messed up.
 
Though I've been told that the metric system ist really common in academia / science
OTOH we use inches in Europe as well.
 
edc
When driving I think in km, but when thinking about how big an apartment is, I think in feet.
 
@yas4891 are you inching towards a metric system?
2
 
@kush here... have my star :-)
 
4:26 PM
haha, thank you. I am glad it amused you.
 
edc
Reminds me to google for videos about Pun competitions.
http://www.youtube.com/watch?v=sCeWleqdqLw
 
nice. :D
the dude in red owns it ^^
 
edc
4:44 PM
yup :p
I didn't know such competition exists.
 
Self-invoking anonymous methods; possible? I'm getting Method name expected in all of my syntax permutations.
int i = ((int x) => { return x; })(42);
 
code
 
I suppose this might suffer the same issue as assigning a lambda to an implicitly typed local variable.
Anonymous methods are indeed first-class, no?
This seems to be fine:
Func<Func<int>> f = () => () => 42;
var i = f()();
 
5:27 PM
@Bracketworks int t = new Func<int, int>(x => x)(26);
after rereading what you asked, that probably doesn't help
int t = new Func<int, int>(x => { return x; })(26);
 
@Steve Yea, that's essentially what I'm after; just with the brevity of implicit types.
 
ahh well i'd help but i'm a noob and that right there took me a half an hour to figure out
 
The safety signs in this building makes me think I am in some kind of Aperture Science facility.
 
lol @Steve it's alright; I guess its too implicit.
 
:p
 
5:40 PM
how to set server.mappath
 
@Bracketworks you could always create a generic extension method, but then that wouldn't be anonymous as what you're looking for
hmm anonymous extension method? no idea
 
@Steve Yea, the problem was I was trying to find a nice balance between brevity and power in declaring the properties of an anonymous type.
 
As i am writing nunit test. I cant cant rhino mock server.mappath
 
 
Something like:
var o = new {
    Property = () => {
        // compute value;
    }(),
};
Rather than:
var computedValue = // compute value;
var o = new {
    Property = computedValue
};
 
5:44 PM
yeah
 
Bah well.
 
gna... exams tomorrow... algorithm and datastructures in C++ :-/
 
@Bracketworks so, if its return type is going to be assigned to a variable of type int, why do you need it to be inferred? It'll have to be explicitely typed anyway, right?
or are you going to throw it in a var, in which case you won't know which type the var variable is, and that sounds like it'll be a disaster
 
6:15 PM
@CCInc ever talk to your friend about a pc?
 
not yet
 
6:29 PM
ughhhhhhhhhhhhhhhhhhhhhhhh
 
@Steve I put it up as a question now.
1
Q: Self-invoking anonymous functions

BracketworksIn JavaScript, it's not uncommon to see self-invoking functions: var i = (function(x) { return x; })(42); // i == 42 While I'm certainly not comparing the languages, I figured such a construct would be translatable to C#, provided a language version with support: var i = (delegate(int x)...

 
kk
 
@Bracketworks What exactly does a self invoked function accomplish in javascript?
I don't know the answer.
 
6:46 PM
It's often used to create a closure in which private variables can be declared. It's also syntactically sugary.
Also good for avoiding naming conflicts, aliasing longer names from frameworks within the scope of a function (like Prototype and jQuery)
(function($, _){ /*...*/ })(jQuery, Prototype);
 
DBA Y U NO SHOW UP TO MEETING
 
(I don't know if the Prototype object is called Prototype, but whatev)
 
our DBA works from europe, i don't care if its the middle of the night for him, run my script :(
i really need to learn wpf
@KendallFrey
i have no work and i'm bored as hell
and for once, nobod is active in chat... what the hell
 
7:07 PM
do my work
 
edc
or read a book
 
He's probably in the pub
Which is where I'm about to go
 
i dont have any books on my work computer because they're all pirated and they'll get pissed if i put pirated stuff on stuff connected to the network
 
nice
 
<---- poor college student
 
edc
7:12 PM
hmm, take a free course on udacity or something
 
@Steve Full-time student?
 
yep
 
Ah. I'm Full-time employed and part-time schooled.
 
i'm part time employed, 20 hours a week, 16 credit hours, and like 15 hours programming outside of class for class
 
edc
It's a good way to finish school
 
7:21 PM
its stressful
i need a beer just thinking about it
 
edc
You will realize it's worth it when you graduate and already have working experience, while your classmates struggle to get their first job.
 
this is true
my resume is awesome for a college graduate, when i was young me and a friend made a bunch of websites trying to become rich, we had our own webhosting company, i had a website marinestoday.com that was getting a few hundred thousand visitors/month
i created a whole ajax library because i didn't know about jquery lmao
 
edc
When you first discovered jquery, what do you feel?
 
dumb, very very dumb
 
edc
hehe
jQuery is really the best thing on the web for the past decade
 
7:51 PM
i disagree, i think porn is
 
I disagree with. I think Internet Explorer 6 dieing is the best thing for the web.
 
^ i change my answer to that
 
edc
jQuery is the second best then.
 
Am I the only one who's disappointed by the sheer number of NullReferenceException questions? Learn to use the debugger, people!
 
what about the sheer number of steve's in the c# channels
 
8:05 PM
lol, at least I'm brave enough to use my last name!
 
lol
i'm a huge chicken shit, i refuse to use my last name
what would be REALLY confusing is if i stole his avatar picture
 
edc
If it happens on a proprietary software, I can understand
it's the one most common exception that normal users will user if devs don't catch their shit properly
 
don't catch their shit properly?
you shouldn't be using try-catches to fix shitty code, you should fix the code. try-catches should only be used on external resources that you have no control over - files, network, database connections, etc..
 
how to move selected row into top in datagridview in C#.NET
 
8:21 PM
@SteveCzetty They are learning, that is why they asked for help with it.
With all of the nullref answers. I wonder if there is a single one that actually goes into detail about debugging nullrefs.
 
lmfao
 
edc
at first I thought it was a photoshopped work
But then I realize Hollywood is really capable of making something like this
 
8:54 PM
wtf are #includes so dumb?
i have a workspace with #include "folder/name.h" and i get no such file or directory.
doesn't make sense
 
where you compile your program do you have a folder named folder and a file in that folder named name.h?
 
yeah lol
 
whats in name.h?
 
just defines
memory locations
 
gotcha
are you using visual c++?
 
9:00 PM
no
eclipse
C
 
hm, should work
 
i got it
 
what was it?
 
I can set the include to include the whole project, then I could just to #include "name.h", that makes sense....
but in order to do #include "folder/name.h" I have to include my whole workspace folder and "/"
 
got it, never used an ide for c++ before (or c in your case)
so thats new for me as well
 
9:13 PM
yeah, i hate it haha
i had to then remove the library, not the library path! and add the reference to the library.
jesusss
 
00:00 - 12:0012:00 - 22:00

« first day (873 days earlier)      last day (4090 days later) »