Posts
 
Reputation
Joined
Last Seen
Ranked #1K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
55% Quality Score
Upvotes Received
13
Posts with Upvotes
12
Upvoting Members
11
Downvotes Received
11
Posts with Downvotes
10
Downvoting Members
9
9 Commented Posts
3 Endorsements
Ranked #486
Ranked #914
~86.5K People Reached
PC Specs
win 8.1
Favorite Tags

86 Posted Topics

Member Avatar for Geekitygeek

Bogdan, the author is creating two independent forms, that are designed to be independent. Event processors are delegate handlers. You subscribe software by adding it to the event. In this case "child_FormClosed" is a subroutine that is built and owned by the parent form. By subscribing the child's FormClosed event …

Member Avatar for jacss1x
1
3K
Member Avatar for ddanbe

I apparently haven't had the math education in the dark ages (1960s) that I thought I had. I know: i^2 == -1 I haven't seen i used as an exponential value in any formula, but I've not studied Euler much either. How in the world does 2.718 raised to power …

Member Avatar for JOSheaIV
1
616
Member Avatar for mrbrightside10

I'm confused. This is obviously a homework problem. For that, you don't deserve a code answer. You are supposed to produce something like: Value: 1, Square: 1, Cube: 1, Sqrt: 1 Value: 2, Square: 4, Cube: 8, Sqrt: 1.4142135623731 Value: 3, Square: 9, Cube: 27, Sqrt: 1.73205080756888 Value: 4, Square: …

Member Avatar for ddanbe
0
1K
Member Avatar for J.C. SolvoTerra

To give you a little more insight in the English language, "in site" is basically a meaningless collection of two real words that would sound exactly like "insight". Site is (sort of) a specific location, you can't be in it, but you can be in a building or a hole …

Member Avatar for J.C. SolvoTerra
5
682
Member Avatar for cgeier

Note that this same technique can be used between a dll and a FORM. Note that the dll will have to run on a separate thread, the same as the two forms in this example do.

Member Avatar for kplcjl
4
5K
Member Avatar for ddanbe

Note that the name "Times" does not mean multiplication is being done, it means the routine defined is being repeated in a Linq expression, so maybe a better name may be called for. I can't think of a better name myself...

Member Avatar for kplcjl
0
384
Member Avatar for vadarfone

OK, I agree that you can't change the opacity of a textbox. That makes sense, because it resides on a form. If you could change it it would just disappear on the form itself. The Form.Opacity Property allows you to change the visability of the whole form. Instead I suggest …

Member Avatar for kplcjl
0
5K
Member Avatar for ddanbe

I didn't want to read the comments because they would probably come up with good answers and I didn't want to spoil my thoughts before trying something. There are several problems with this code. First off, strings are immutable. Every time you alter a string you add a new record …

Member Avatar for xrjf
0
1K
Member Avatar for Santanu.Das

JC: There are articles galore about sorting routines because people are interested in how they work. My gripe is that the authors pick the bubble sort because it is the easiest one to code. That is an N^2 routine. This is a shortened loop because it uses ((N+1) X N)/2 …

Member Avatar for David_50
0
524
Member Avatar for andrew909

FYI int[] IS a reference object, so if you change a value in the array, all objects that have access to the array also has access to the changes made. If you change the length of the array, you just created a new object, so if you change its values …

Member Avatar for kplcjl
0
285
Member Avatar for kegs88

The Padleft solution is another alternative, I used the string you supplied but didn't use. I suspect it is more efficient using Pad. Your delay seemed really short and that does produce a running man effect. When I added 100 to your delay, it was better but still had a …

Member Avatar for kplcjl
0
2K
Member Avatar for VIeditorlover

There has never EVER been a way to stop decompiling code. (You can ALWAYS get the assembler code.) Strong naming or using Authenticode on a strong named assembly WON'T protect you from someone decompiling your code. The only thing both will do is authenticate your modified stolen code didn't come …

Member Avatar for JOSheaIV
1
1K
Member Avatar for oussama_1

Line 302 has: control.text = String.Concat("Level ", levelNum.ToString, " Lives ", lives.ToString, " Money: ", rewards.ToString) This would do the same thing in a shorter format: control.text = String.Format("Level {0} Lives {1} Money: {2}", levelNum, lives, rewards)

Member Avatar for oussama_1
3
945
Member Avatar for ddanbe

It's been 45 years or so since I read flatland. My memory is fuzzy, so if you want to challenge me, I won't argue. Flatlanders never looked up or down because that dimension didn't exist to them. They were all circular in shape, their buildings were rectangular lines. They were …

Member Avatar for mattster
0
765
Member Avatar for Siberian

Don't know the language you are using. I do know C# and unless that is psudo-code, it won't even compile in C#. In C#, "this" is a keyword to point to the base object's values, something like "private string bat, bat2, bat3;" In that case the routine could look like …

Member Avatar for Siberian
0
131
Member Avatar for sknake

FYI, when talking about secure logins, providing any information on the validity of either the userID or the password is a complete no-no. Instead of just passing the userID, pass both the userID and the encrypted password to the connection making sure both are part of the where clause. It's …

Member Avatar for pritaeas
10
8K
Member Avatar for ddanbe

My version is Visual Studio 2010 Express. I believe that version is 4.0 but the express System Assembly does not include System.Speech. Dang. As far as the ASP.Net user, you are using the C# code to generate HTML and JScript (Looks exactly like JavaScript to me) to render on a …

Member Avatar for kplcjl
5
563
Member Avatar for kimbula...

[QUOTE=kimbula...;1243502]I'm having a problem with starting with KeyPress event. The program is derecting me to the TextChanged event. How to change it to the KeyPress event.[/QUOTE] I'm sure the purists are howling, but I say Keep the TextChanged event. use if (!int.TryParse(My_tbx.Text, out i) {//Error handling block } where "i" …

Member Avatar for kplcjl
0
5K
Member Avatar for kxjakkk

Sort of looks like a VB language version. Have no idea how that all works. In .NET you have Dictionary(TKey, TValue) Constructor (System.Collections.Generic) that can be used. This will NOT sort the data, but will efficiently determine if the word is unique. I don't see how the above code snippet …

Member Avatar for kxjakkk
0
643
Member Avatar for hxn xfir
Re: Help

No way would I try a one-liner. I tested this on 5 and 50 and both worked properly. /// <summary> /// Goes from 1 to 99, lists on Console the number list forward and backword /// Right adjusting the values. All values except the last number are repeated in reverse …

Member Avatar for JOSheaIV
0
815
Member Avatar for andreas.petrou.967

Andreas, Personally prefer: array2[j++]=array[i]; In your search function you have hardcoded 10. What happens when there are 5 items in the array? What happens when there are 20 and the 15'th has the number you are looking for?

Member Avatar for kplcjl
0
363
Member Avatar for ddanbe

One of the nice things C# has is the XML documentation. What's nice about that is that it activates intellisence so you can document it. Renaming the int parameter as suggested is a good idea because even if it is in a dll, you don't have to correct your calling …

Member Avatar for kplcjl
0
396
Member Avatar for Eternal Newbie

Congradulations, on solving it. A possible alternate solution would be to put the two forms into thread calls. That would free them from the parent thread and the calling form could close while they kept going.

Member Avatar for kplcjl
0
1K
Member Avatar for kingsonprisonic

I do have a question. In your regex expression you have [0-9a-zA-Z] sprinkled throughout. Since you also have ", RegexOptions.IgnoreCase" wouldn't [0-9a-z] serve just as well? If it doesn't, why do you use IgnoreCase? I might add, this might not work so well on the international front. FYI Your no_blank …

Member Avatar for Iamateur
4
1K
Member Avatar for riahc3

The following doesn't make sense: do { next = response.Content.IndexOf("\"", first); /*Not neccesary but in case Dani changes the array to something else....*/ if (next==-1) { break; } } while ((next==0)); I'm not a fan of do whiles, but even if Dani changes things around this is only going to …

Member Avatar for riahc3
4
466
Member Avatar for Lardmeister

hasnain..., I agree it's a very easy approach. However, I say it is a very INefficient approach. In type O notation it is N^2 which is bad. I tried to show an alternate approach that in O notation is still N^2 but would still be twice as fast. There are …

Member Avatar for kplcjl
0
1K
Member Avatar for Diamonddrake

You'd think 1000 would accurately represent 1 second. I found that if I compared ticks to the starting tick value that my elapsed time timer would occationally jump 2 seconds using 1000. By the time 5 minutes elapsed, you'd probably be off by about 5 seconds using this minute second …

Member Avatar for kplcjl
1
3K
Member Avatar for Reverend Jim

When I read the title, I had already figured out how to wrap when the whole word wouldn't fit on a line. I hadn't figured out how to find the split points on a word so it puts part of the word on the fir- st line and finishes the …

Member Avatar for tinstaafl
2
3K
Member Avatar for DIPY

[QUOTE=bokac1984;1099265]This is ok, but I have something else in mind, when I check checkbox I need my textbox to be false right away... This code doesnt exetuce that.[/QUOTE] That's completely opposite from what you said at first. You've gotten completely opposite answers to match your 2 requests. "right away"? The …

Member Avatar for hirenpatel53
0
3K
Member Avatar for SoftwareGuy

OK, you found a solution, but nobody suggested a delagate. I tried to build a puzzle solving code and display intermediate results and display them on my WinApp form. Didn't do a thing. Turns out, the form thread has to be idle to display changes and I wanted intermediate results …

Member Avatar for kplcjl
0
241
Member Avatar for codechrysalis

In the body of your code, you have defined a byte array called currentEnrolled. This data is only in the scope of your main function, it's invisible elsewhere. Further on compressed code: public static string checkClassSize() { byte currentEnrolled; for (i = 0; i < Array.currentEnrolled; i++ ) { Console.WriteLine(i); …

Member Avatar for codechrysalis
0
190
Member Avatar for kikiritce

[QUOTE=kikiritce;1756688]Yes, it is ok. the problem is how to display just one letter "u" or "U"? thank for your time[/QUOTE] Interesting that you are answering a quoted phrase that doesn't exist now and his post doesn't show as edited. Since his replaced text fully answers your question, you should either …

Member Avatar for thines01
0
142
Member Avatar for Shwetha Dali

You could start the first line with 5 blanks, use dash - or underscore _ to print the top edge of the cube. (1 short of the cube length followed by |) Next line 4 blanks, a /,2 short of the box length with spaces, followed by /|. For the …

Member Avatar for Shwetha Dali
0
1K
Member Avatar for pcolas

first thing I noticed was [CODE] private int currency; public void converter(int currency, int[] breakdown, int[] denom) [/CODE] It's OK, but it is a bad practice to use instance field names as local variables. If your last denom[] isn't 1, it is possible to create an infinite loop, except that …

Member Avatar for pcolas
0
2K
Member Avatar for AirWave

[CODE] string command = "xyz"; char x = command[0]; //char y = command[4]; compiles but blows up because index out of range. //string y = (string) command[0]; won't work. You can't implicitly or explicitly convert char to string //char[] y = (char[]) command; won't work. You can't implicitly or explicitly …

Member Avatar for kplcjl
0
171
Member Avatar for music613

Listviews are rather dumb. In the help it shows adding an array of text: [code] this.listBox1.Items.AddRange(new object[] { "Item 1, column 1", "Item 2, column 1", "Item 3, column 1", "Item 4, column 1", "Item 5, column 1", "Item 1, column 2", "Item 2, column 2", "Item 3, column 2"}); …

Member Avatar for kplcjl
0
147
Member Avatar for kplcjl

In a library file (dll) I know you can modify an existing property and the exe continues running without recompiling. If you add properties to the dll class and if it isn't critical that the exe knows about them, would the exe continue working without recompiling? Personally, I'll bet not, …

Member Avatar for Momerath
0
146
Member Avatar for rotten69

It's been too long, don't remember the directives, here are some guesses. 'WebApplication3.HumanCheckerService.HumanCheckerApplication' does not contain a definition for 'RandomNumberGenerator' Your web service directives need to define this method. (I thought you did without a type) no extension method 'RandomNumberGenerator' ... type 'WebApplication3.HumanCheckerService.HumanCheckerApplication' The (not shown) code is trying to …

Member Avatar for kplcjl
0
182
Member Avatar for yash_shukla

OK, still don't know what your problem is. Are you connecting to the database successfully? If not, what is the message? How are you connecting? Is there information in the database? Have you decided how you want to retrieve information from the Database? Does it work? (Do you see you …

Member Avatar for kplcjl
0
107
Member Avatar for ScubaSam

The point of having databases is to persist data. Why do you want a DB if you don't want to persist data? Have you thought about just creating an XML file? When you are creating a DB, before you enter data, you have to create the schema. Before you create …

Member Avatar for kplcjl
0
806
Member Avatar for anish99virgo

All the replies to you have been based on reasonable assumptions based on what you said. Because you aren't clear on what you want, you force people to guess. I'm guessing based on your not liking the responses you have gotten. I'm going to re-write your question and answer it. …

Member Avatar for kplcjl
0
186
Member Avatar for zachattack05

First off, SQL injection is prevented in parameters because the code is formatted to match the parameter's datatype. This is designed to be passed as a parameter in a stored procedure. So, you pass it @DBName SYSNAME in the parameter. The value can be: "YouLose;drop database msdb;drop database master" That …

Member Avatar for kplcjl
0
2K
Member Avatar for Coemgen3

Your loop is entirely readable, understandable and isn't wrong. Just a warning about standard C# coding practices. Maybe this comes from arrays, where you declare the array [n] where n is the actual size of the array. Then you loop "for (i = 0; i < n ; i++) {...}". …

Member Avatar for kplcjl
-1
133
Member Avatar for tammy2512

What, besides the comma that goes nowhere right after insumpo? Or the variable (invcount) that doesn't exist in the commented section? Or that you can't do derived calculations in an aggregate query? Or that this is an egregiously expensive query on a big table? Or you could get divide by …

Member Avatar for kplcjl
0
154
Member Avatar for kplcjl

OK SQL documentation sucks. I know that, I've known that for years, but it can be helpful and useful at times, so I use it. I thought I remembered correctly what "~" did, but looked it up anyway. I'm reading the usual @#$%, but getting the basic information (While thinking …

0
65
Member Avatar for jeevObe

Permalink came up with the basic problem of your description. It tells you what you want to do, but not what you are doing. You say it's not being stored on the database. So how are you storing your registration information? Does each session store it's own data table with …

Member Avatar for kplcjl
0
125
Member Avatar for 21KristianN

What sknake said, however he didn't give an example. You need to provide constants in the where clause, so calculate constants. If you are only recording current datetimes in the table you only need to find "WHERE SalesDate >= @dt1". If you are recording future dates as well or if …

Member Avatar for kplcjl
0
5K
Member Avatar for kplcjl

I don’t have a problem, but sometimes I just love the way this system works. I got the message {"Cannot convert object of type 'System.Int64' to object of type 'System.Data.SqlTypes.SqlInt32'."} {System.Data.DataException} This was the command System.Data.DataRow dr_Test0 = this.XML_DataSet.Tables[0].NewRow(); I also love how they obfuscate code. Finding the designer code: …

Member Avatar for Momerath
0
140
Member Avatar for CanYouHandstand
Member Avatar for sackymatt

I second Tom's suggestion to use parameters. This assures the types are compatible and takes care of formatting as well. Are you sure the datetimepicker will pick an exact date and time that you want? It's possible the query will never find the record even if it is formatted correctly.

Member Avatar for sweber25
0
146

The End.