« first day (580 days earlier)      last day (4385 days later) » 

12:01 AM
well, i can not get the class thing to work :(
i pasted the code and it did not find my progressbar
 
You need to add an instance of PercentageProgressBar to your form.
It should appear with a gear icon in the Toolbox.
You may need to build the project first.
 
you also need to replace all instances of progressbar1 in your code to this
 
In the graphics code, that is. After it goes into OnPaint()
 
oh, and OnPaint takes one argument
 
ok, thanks
 
12:04 AM
OnPaint(PaintEventArgs e)
 
@KyleTrauberman Oh, yeah, right.
 
I've tried overriding every single event
None of them fire haha.
 
Did you set that MakeItWork property?
 
@SpencerRuport Event or OnEvent method?
 
Isn't that MakeItWorkMagically ?
 
12:08 AM
something like that
 
Intellisense for the win? LOL
 
Thats it
 
@TonyHarmon using dynamic must be a nightmare.
 
I just created an internal bool MakeItWork {get; set;} in my project
<3 dynamic
 
I just wrote public magic Magic8Ball {get; set; solveworldpeace; } and it compliled... I'm scared :)
 
12:11 AM
lol
 
@TonyHarmon BS
 
if 'magic' is enum and those ; were commas, then yes it would compile
 
The cool thing is that setting MakeItWork = false; on almost any dynamic will do as it says.
@KyleTrauberman But they're not...
 
One can dream, can't he?
 
even my pc. Electric Sheep FTW
 
12:14 AM
@KendallFrey Well it's little known being in System.Data.Sql :P
 
@TonyHarmon BS again
 
Nope, cause I just imported using System.Data.Sql.TonyHarmonIsNeverWrong;
 
@TonyHarmon Can you link to the MSDN doc?
 
Nope... still in double secret beta :P
 
@TonyHarmon Can you provide a reference that you work for MS?
 
12:18 AM
Sure, but he's a dirty liar... Bill.Gates@microsoft.com
 
BS again...
 
Okay you got me... that's not really his email, but he is a dirty liar :)
 
ok, maybe he's a liar, but still.
 
Yeah this is way more trouble than it's worth.
First, you have to inherit the base progressbar class
Then you have to set UserPaint mode
but that gets rid of the progress bar completely and just draws the text
so then you have to get windows to draw a bitmap of the progress bar for you somehow
and drop it in
and then draw your text.
 
WPF FTW
 
12:20 AM
:P
1
Q: c#.Net Progress Bar Issue

Zeos6I am reading data from a file and would like to attach a progress bar to this operation. I found the following code on stackoverflow - this code is due to William Daniel, Sept 20, stackoverflow post titled, " How to Change Color of Progress Bar in C#.Net 3.5" class CustomProgressBar : ProgressBa...

 
WPF is different then MVC right? It's a seperate paradigm right?
Man.. I should get through these next three lessons but I feel like blowing up some tanks on World of Tanks and just powering through some lessons this weekend...
 
they are different yes
my preference is mvc, but WPF is good too
 
MVC is a design pattern, usually used with the ASP.NET platform. WPF is a platform, usually used with the MVVM design pattern.
MVC has gotten to the point where it is pretty much a platform for ASP.Net, though.
 
12:39 AM
Just discovered how much I hate Unicode.
 
ASP.NET MVC 3 is a framework.
I guess (4) now.
 
@TravisJ Yes. I would say that it is a framework based on the MVC design pattern.
 
It is really sleek though. I really like the NuGet packages and razor engine.
Areas are pretty nice too. Along with all the little hooks provided for extending base classes. Works really good for implementing injections such as dependency injections.
Furthermore, sorry if this is getting too verbose, the Stack Exchange is written using ASP.NET MVC.
 
 
2 hours later…
2:31 AM
CSS Selectors for .NET?
 
 
2 hours later…
4:53 AM
@KendallFrey @SPFiredrake I tried the code with breakpoint & found that it is placing the date as 05172012 in cell but actually problem is that it is saved as .csv extention & when I re-open it changes the date to 5172012.
So please if anyone can now help me out in this.
how could I preserve that in .csv on reopen
 
 
3 hours later…
7:43 AM
@EliteGamer @KendallFrey i just got ur messages about a paintbar and the percentage on top? I spent about 2 days f-cking around with this and finally decided i couldnt be arsed. So what i did, and i believe Kendall suggested this after we'd spent an hour of so on it, was just display the percentage off to one side (by all accounts its easier to override the onpaint() in wpf than winforms).
@EliteGamer @KendallFrey below is a screenshot of what mine looked like in the end. Note the highlighted code on the left, its a hack thats required to force the pb to update. On some small files i was finishing my checks even before the progressbar started. This extra piece of code solves that issue.
@EliteGamer @KendallFrey sorry i wasnt on sooner, i was sleeping and only got ur message at 4am. Is there a way to get email updates sooner?
 
 
2 hours later…
10:06 AM
Morning all
0
Q: Windows Gadget for Sharepoint 2007 List using SOAP, Javascript, C#, Webservices, jQuery

TimeToThineI am trying to develop a Gadget for Sharepoint 2007, which will authenticate a user and then fetch him a sharepoint list from a specific URL, For the last 4 days I have been working on it and came across different ways of making it, but because solutions are either half done, dont work or too co...

 
 
2 hours later…
12:21 PM
@Neha: That would have been nice to know. Anyway, here: howtogeek.com/howto/microsoft-office/…
 
@KendallFrey hello,
ok I ll check
@KendallFrey it saying some changes to be done but I won't tell my client that go & do like this
He needs data
 
Well, csv isn't the way to go then.
 
:(
but he needs .csv file
 
Why not an Excel file?
 
.csv can be opened from Excel.
 
12:30 PM
So can an Excel file. Excel files are designed for it. CSV files aren't
 
Sorry I am missing something here. What does he needs?
 
I don't know. That's what I'm trying to find out.
 
Neha, what do you need to accomplish?
 
a csv can opened in excel , but when I open it in that it remove the leading zero.
First when I view before saving It was fine but when I save & close & then re-open it, I found this issue
 
12:48 PM
What's wrong with an Excel file?
 
12:58 PM
but he wants his only
 
Excel file is in binary format. I guess Neha has plain CSV. The link you Kendall gave should be thesolution. The problem is that in the CSV file the numbers are not in quotes and the Excel will just trim them. However using the conversion tool or doing it manually you can quote the numbers with leading zero and Excel will preserve them untouched as text.
 
@KendallFrey dnt knw
 
1:14 PM
hello
 
@Neha Put simply, if you want to preserve formatting, you cannot use csv.
 
This is not what I meant. You just must use quotes around the numbers.
 
kendall do you use MVVM
 
Not really, but I know how it works.
 
as an example enabling or disabling a button would be done by a viewmodel?
 
1:19 PM
Yes.
 
so the purpose is when want to enable or disable the button from 20 differnt places from the code I do it by the VM command. in stead of button1.Enabled = true from the code
do you have a simple button example around"?
 
No, sorry. But you would probably do SomeViewModel.ButtonEnabled = true.
I'm assuming that a single button wouldn't be used as a model, only part of it.
 
hmm
 
1:33 PM
o/
 
1:55 PM
@kendallFrey
sup bro
did u get my message earlier?
 
About the pbar? Yeah, But I don't know if @EliteGamer read it.
 
@KendallFrey i had a read through the rest of the convo u guys had and it seems someone suggested the same thing so...
@KendallFrey hows things going today?
 
Not good. My VPN's down.
 
hey all
anyone here not good with XMLHTTPRequest :)
 
sh-t thats not good
 
2:01 PM
hey @HansRudel did you ever worked on XMLHTTPRequest
 
@HansRudel Well, it means I don't have to work, I just have to f around with it to try and get it to work. :)
 
@TimeToThine dude i have difficulties saying that let alone actually figure out what it is. Joking aside, sorry i havent
 
its okay :)
 
@KendallFrey sounds like an easy morning/afternoon ahead of u then.
i have a question for u but im going to write out a quick example first as i think its a better way of getting that data out the server. can i show u after please?
 
Possibly. The VPN got fixed now so...
 
2:08 PM
np
if u have time then cool, otherwise nae bother
 
Eh, I think I'll be waiting a while for my stuff to run updates.
 
I've gotta update some test data before I can use it. A quirk of the system.
 
ive never used vpn before but it sounds cool
 
2:38 PM
@KendallFrey have u got a minute?
namespace populating_a_combo_box
{
    public partial class Form1 : Form
    {
        DataTable dt = new DataTable();
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            ClassLibTest test = new ClassLibTest();
            test.FillDT(comboBox1, dt);


            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string temp = dt.Rows[i]["routine_name"].ToString();
im assuming declaring the dt in the original form1 class is ok?
i need it to be persistent over the whole class
 
I really don't know. I would guess so.
 
ok
thanks bro
 
@Neha If it's preserving it in the CSV itself, then you got what you wanted.
The point is that Excel will always trim off the start, no matter what.
If you're parsing/using the CSV in code itself, then you don't have to worry if it shows up in Excel properly.
Because no matter what, it won't show it properly.
 
hi all
can you guys check this question: stackoverflow.com/questions/10654512/…
 
2:56 PM
Nice questions. I do not have an answer for it but can you catch an error if GPS signal is lost? Then you could call Form2.Show();
Also you could use Timers to poll the GPS for signal. That way the Form2 will only be displayed if the signal is really lost and not just for a flick of a second.
 
I'm just waiting for FB to say "Nevermind, not gonna open up for trading". Biggest/best troll EVER.
2
 
FB?
 
FaceBook?
 
Fat B....
 
3:04 PM
Some private chat came to public?
 
Facebook is going on the public stock market. (I think)
 
really
no way
 
it is already on the nadaq
 
That's right.
 
Hasn't started trading yet.
 
3:27 PM
7 KB/s. I love my internet connection. :P
 
for (int i = 0; i < dt.Rows.Count; i++)
            {
                if (dt.Rows[i]["routine_name"].ToString() == temp1)
                {
                    label1.Text = dt.Rows[i]["Parameter_Name"].ToString();
                }
            }
how can i set this up so that label1 changes to label2 when the block of code is executed a second time
?
 
Label[] labels = new[] { label1, label2 };
foreach (Label label in labels)
{
    // ...
}
 
yeah ok cool
thanks
 
@hans did you understood? I did not.
Is the temp1 as label2?
 
yeah, i think so. give me 2 sec and i will post the code
 
3:32 PM
It's just using an array of labels and looping through them.
 
... and how is the switch done?
 
Do you know how a foreach works?
 
;)
 
@JPollack no switch is req'd
 
I meant the label swap. :D
 
3:36 PM
He is iterating through the Labels data structure , i guess that should work fine.
 
@Hans how is it coming?
 
ive made a silly mistake, give me a couple mins.
 
How can I get newly inserted record ID after SqlTransaction transaction = serverConnection.BeginTransaction() and before transaction.Commit()?
 
Is Microsoft slp code protector active
 
3:52 PM
Sorry?
 
4:06 PM
What would cause this? Message "The controller for path '/' was not found or does not implement IController." string
 
incorrect controller path?'
I.e. Controller part of the target is not specified
 
I have a controller for it
ugh... I had action instead of actionlink
Which web.config should the connection string be, the one in the views folder or the one at the project level?
 
Project level.
 
4:24 PM
hmmm well the connection string looks right
 
Not connecting though?
 
Well I'm not sure, this line "public RecipesDBEntities() : base("name=RecipesDBEntities", "RecipesDBEntities")
" is the one blowing up and that is from the designer of the datalayer project that I'm trying to access
 
What ORM are you using?
 
ORM? I got it working. I must of screwed up when I cut the connection string out of app.config on the datalayer that I created and put it in my web.config
 
4:46 PM
why property set private?any one have idea regading it?
 
@prjndhi Property setters (and getters) can be marked with private so that the class itself can set the value, but not the calling code.
 
@KendallFrey :u hv any idea to give privilege to the new user through check box.by using check box condition menu will be appeared to the new user .how it can done?
 
@prjndhi That's a huge question. I can't answer it quickly. You might be better off posting a question.
 
@TonyHarmon - How are you connecting to your database? ADO? EF? nHibernate?
 
ADO. I got it to work, connection string was screwed up somehow
 
4:56 PM
AccountBalanceSummaryList.Sum(x => Convert.ToDecimal(x.Value)) is the lambda exprssion?and what is the return type of x.
 
x doesn't have a return type. The return type of the lamda is decimal.
 
This is the most random assortment of questions I have ever seen.
 
Maybe he's taking a test
 
@TonyHarmon - You should look into using an ORM. ADO and dynamic sql gets out of hand quickly.
 
May i ask question?
what is the role of this method CommandManager.InvalidateRequerySuggested(); call??//
 
5:06 PM
0
A: Convert string into func

SPFiredrakeProblem is that there is no strong typing support here, so you can't even utilize expression trees. However, DynamicLinq already does this, so you can easily get this working with a few modifications. Just create a few static methods of your own in the DynamicExpression class to add this function...

I hate when people trying to reinvent the wheel...
 
I hate when people seem to be choosing runtime errors over compile errors.
 
what is the role of method CommandManager.InvalidateRequerySuggested()?public string this[string columnName]
{
get
{
string error = null;

if (columnName == "Name")
{
error = ValidateUniqueUnitName();
if (!string.IsNullOrEmpty(error)) return error;
}

error = (_unit as IDataErrorInfo)[columnName];
CommandManager.InvalidateRequerySuggested();

return error;
}
 
5:51 PM
I would just love to see Jon Skeet jumping in this chat. Man ... I would just tip my hat off.
 
I'm sure he's too busy to come on here.
Although it would be pretty sweet (Skeet) of him :P
 
He is never in this room.
If he ever has been, it was so long ago that it doesn't appear.
 
hey, anyone here?
 
Lots of us.
 
i need some more help...is there a way in C#, of course, to make form2 the main form instead of form1, so when i close form1, the whole program does not close
 
6:02 PM
yes
find program.cs
in your project
 
ok....
 
I think the line is Application.Run(new Form1());
change it to form2
 
ok, wait a sec
 
That will just show Form2 instead of Form1.
I think there's an easy way to do it in VB, but I don't know how in C#.
 
done, thanks'
 
6:10 PM
@JPollack @KendallFrey i couldnt get it to work with the foreach... couldnt get my head around how to use foreach in conjunction with the for/if loops. below is what i did instead
private void comboBox1_SelectionChangeCommitted(object sender, EventArgs e)
        {
            string temp1 = comboBox1.SelectedItem.ToString();

            int counter = 0;

            Label[] labels = new[] { label1, label2 };

            for (int i = 0; i < dt.Rows.Count; i++)
            {

                if (dt.Rows[i]["routine_name"].ToString() == temp1)
                {
                    labels[counter].Visible = true;
                    string tempString = dt.Rows[i]["Parameter_Name"].ToString();
+ sorry for the delay, was on the old dog n bone
 
@EliteGamer: Found it.
4
Q: How to Set Application Shutdown Mode in a C# Windows Forms Project?

Assi18I have just switched from VB.Net to C# and am writing a windows application. In VB.net you could easily change the Shutdown Mode by selecting the properties of the project and moving to a dropdown where you could choose between "When startup form closes" and "When last form closes". Please help ...

MS babies the VB devs. :P
The MSDN article has a code sample that shows how to wait until all forms are closed, as well as how to save app settings on shutdown. The former half is the relevant part for you.
@HansRudel Looks marvellous.
 
@KendallFrey sarcasum?
 
10-4
thanks
 
7:04 PM
Ugh I hate it when I make really stupid mistakes
That I figure out after I post a question on SO. :(
 
Don't worry, the rest of us hate it too. :P
 
Welcome to my world :P
 
haha
I knew you guys would understand <3
 
This will make you feel better... I spent almost 20 minutes trying to find why my connection string was working and then I copied and paste it again and it worked... I didn't get the whole string the first time
 
Happens way too often to me.
 
7:12 PM
silly question time... why do you put a semi-colon after a curly bracket sometimes, but most times you don't?
 
When the curly brackets are a statement block, they don't need a semicolon. When they are a collection initializer, they do.
Did I miss any edge cases?
 
Does var Test = new { Hello = "World" }; count as a collection initializer?
 
no, its an anonymous object
 
Oops, I missed object initializers. They require semicolons too.
 
I tend to think of semicolons as periods. They finish complete thoughts.
You don't put a period at the end of a paragraph.
 
7:21 PM
I know; That happens to me all the time;
Yes, you do.
 
Exactly;
No you put a period at the end of the last statement.
Otherwise it would be
In conclusion drugs are bad..
 
Which, in English, is the end of the paragraph.
 
Yeah but that's not the um...
Lexical definition? I forget the term.
 
I know what you mean.
In C#, though, a statement block is a statement.
 
7:25 PM
Yep.
 
It'd be interesting to see the BNF for c#
 
Painful too.
 
Really?
I always found those things so easy to read.
Once you identify the "ends"
 
I don't mind < 1 page, but...
 
I wonder how many pages it would be.
 
7:33 PM
Lots of hits on google.
 
7:51 PM
And Facebook has almost plummeted back to IPO levels.
 
+0.01
 
8:11 PM
what happend to FB?
Stock that is
price going down?
 
should have shorted, aw.
 
I was thinking about doing that.
But are there options for sale right away?
I can't imagine someone being dumb enough to sell contracts before the stock has even gone on the market.
 
i can
 
I know nothing about the stock market. And it doesn't help that every time I try to make any kind of investment, I get people telling me "LOL DONT EVEN TRY"
surprised no one told me that here :P
 
haha
well there is probably someone buying and selling out there
market makers essentially, given an open price of 42, they may sell calls and puts at 40 and 44 at a premium. They win either way with the premium.
 
8:27 PM
If I knew how .. I would buy Microsoft stocks
 
I don't know bout microsoft in the next 6 months
they are acting pretty querky
Huge bets on there new metro apps
 
win 8 + holiday season
 
But its expected
What we mainly need to ask is will metro be well recieved?
 
Have you tried it?
 
I think so
 
8:30 PM
Im worried Microsoft will disenfranchise its business users, who like the standard MDI stuff and menus
 
I don't think it will dominate the market, But it will take over any business mobile market. Think black berry
 
they are really bad at competing for the consumer/art space, they've failed against apple often
 
not this time
 
i haven't used metro, but I was freaking out when i tried VS2011 beta
 
I mean.. The phone works with sharepoint and outlook stuff
that is enough for business to switch over for
 
8:32 PM
hmm, i can see that working in the phone space, thats good
 
I went to a MS event where they showcased the phone and all of it's features
Really sold me on it.. only reason I am not switching is because of google voice
 
@Greg Why does everyone call it 2011? It's 11 everywhere I've seen.
 
because thats what microsoft calls it
ooh wait
11 right
 
i suppose we are extrapolating.
 
8:34 PM
Hey. If I have a password in my C# program that's used to decrypt files, should I be worried about reverse engineering? Can they get the password if they did that?
 
I don't know if it's going to be 11, 2011, or 2012.
@JoeyMorani Depends how you store your password.
 
The password is just a string.
Within the code of the program.
 
Then, yes, they can get it.
 
Ah
How would I prevent them getting it?
 
Use an encryption algorithm
 
8:37 PM
Encrypt the password?
 
maybe DSA, RSA, or SH1 depending on your application
 
Either get the user to supply the password, or use a custom encryption alg
@Greg SHA1 isn't encryption, it's hashing.
 
Okay. It's a password they users should never know.
*the
 
a 1 way hash is a type of encryption
 
Hmm.
 
8:38 PM
And im suggesting it because it may be right for his application
 
@Greg But he needs the password. Hashing is irreversible.
 
I don't think we've established that entirely.
So whats your application?
 
Basically downloads files from my server and then decrypts them using that password.
Need a way to prevent them ever finding out the password
But still have it usable
So hashing wouldn't work?
 
Could you possibly change the implementation on the other end?
 
So why are you encrypting them, to stop it from interception?
or are you trying to keep the end user out of the file?
 
8:42 PM
So only authorised users can use the files.
Otherwise they can't decrypt them
 
How do you know a user is authorized? Do they enter a password?
 
well you could have each user supply a public key, then encrypt per transmission.
but kendall's right, you do need to authenticate them
or are you just sticking this on a public site, and want anyone to dl it, but only users with your magic decrypt program to be able to read them?
 
Yeah
That ^
Anyone can download the files
Just only authorised users should be able to decrypt them
Hmm
 
How do you know a user is authorized? Just because they have a copy of the program?
 
Well anyone could reverse engineer your encryption program.
Well anyone talented.
 
8:46 PM
No. They have to login to the program. That part is sorted and working.
 
With a password?
 
So I know if they're authorised.
Yeah. Their own password
For their account.
 
But the files are encrypted with your password, right?
 
Perhaps I could get the password from the server?
 
you could, but it would still be reverse engineerable
 
8:47 PM
Yes. With the password that nobody should know.
Ah
Oh yeah
 
at least if you get it from the server, they won't have a copy on their desk, it would stay in memory
but if a authorized user had skills and intent, he could definately steal your encryption password.
 
How does a user create an account? Do they have to talk to you? If they can create an account by themself, they could 'authorize' themself.
 
I create the accounts
Hmm
This is hard. :P
 
if you wanted to roll your own encryption scheme, you could transmit that to authorized users, run it, then erase it.
that would increase the difficulty of reverse engineering
Something like that could increase reverse engineering time by hundred of hours
 
8:52 PM
Ah. How would I do that?
I'll google it :P
 
encrypt it using something like RSA, then do some random cypher or something to the file.
this way users couldn't just steal the private key and de-encrypt using a standard program
its essentially security through obscurity, just makes more work for crackers.
 
If you don't mind tripling network traffic, there is an encryption scheme where neither end needs to know the other end's secret. I forget the exact name.
 
ah that sounds neat.
 
Yeah, that would be good. I'll have a go at what you said Greg.
 
The idea is to send (for example, using XOR) encrypted data to the receiver, who encrypts with their own key, sends it back to you, you decrypt with your key, send it back, they decrypt the final message.
 

« first day (580 days earlier)      last day (4385 days later) »