- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 4
- Posts with Upvotes
- 4
- Upvoting Members
- 4
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
IT Proffesional
- PC Specs
- Home Brew AMD
33 Posted Topics
Re: Here is an ugly but working entry List<string> dothis(int level) { string start = ""; string middle = ""; string end = ""; List<string> line = new List<string>(); for(int step = 1; step <= level; step++) { start += (step-1).ToString().Replace("0",""); middle = step.ToString(); end = new string(start.ToCharArray().Reverse().ToArray()); line.Add(start + middle … | |
Re: If I read this right, your fraction with the whole number should be 22/8 from your overload of the + operator. Hint one. The problem is in your reduce method. 22/8 = x/GCD or 22/8 = x/4 or (22 X 4)/8 = x or 11 = x. Hint two. Now … | |
Re: This is why Linq was created btw [URL="http://msdn.microsoft.com/en-us/vcsharp/aa336746"]Linq Examples[/URL] | |
Re: stitch the hour, minute by using Convert. Convert has many methods and ToInt32 is one of them. Be sure you add exception handling or your Forms.Timer, when you incorporate it, may just stop. Alteratively, Convert can be used twice to store a startTime and an end time to compare to … | |
Re: You should check out the. Net 4 Framework an the addition of Task. They did a really nice job with cancelling a threat orderly without the need for Abort. The reason I say this is for long running queries, you have to wait until they finish before thread cleanup really … | |
Re: Answer this in two statements, create a business access layer and a data access layer. In true OO fashion, your UI does not need to know how it gets the data and your data accessors just know how to get the data and not use them. The real question is, … | |
Re: Use thread pooling with callbacks. It seems like Checker runs a linear process that you want the results from when it is completed. | |
Re: Use the Clear() method to remove all element in the list. RemoveAll is a delegate predicate that allows you to specify what conditions to remove the elements. For example, lets say you had a list of integers and you wanted to remove only those that were a modulus of 2 … | |
Re: There is a cooler, and faster, way to accomplish this. [code] List<int> myInts = new List<int>(); //add the ints myInts.Add(5); myInts.Add(50); myInts.Add(15); ... List<int> foundInts = myInts.FindAll((delegate(SearchInt int) { return SearchInt == 5; }); [/code] Does basically the same as the examples for the foreach given. If you really have … | |
Re: Access doesnt have transactional and stored proc support and I really really really think you should migrate to MSDE aka SQL express. But if you have to use Access.... [ripped off MSDN] [code] private static OleDbDataAdapter CreateCustomerAdapter( OleDbConnection connection) { OleDbDataAdapter dataAdapter = new OleDbDataAdapter(); OleDbCommand command; OleDbParameter parameter; // … | |
Re: [QUOTE=johndoe444;1304647]Hi, I came across this code snippet: [CODE]new { genre = genreName }[/CODE] I am not sure what is the name of this thing and how this thing works? Thanks[/QUOTE] Hmmm, not sure i f this is enough to go on, although I think the code snippet should be [CODE]Genre … | |
Re: Same as above but use compiler directives so you wont have to create two code sets or comment bits and pieces out. I googled c# debug logging and got many hits, top one was the one above. [URL="http://blogs.msdn.com/b/csharpfaq/archive/2006/03/27/562555.aspx"]http://blogs.msdn.com/b/csharpfaq/archive/2006/03/27/562555.aspx[/URL] and the more complex can be found here [URL="http://csharp-source.net/open-source/logging"]Open Source Logging Tools … | |
Re: [QUOTE=magsaleh;1304728]Dear all, [CODE]string sqlWhere = select * from RESERVATIONS where check_in >= FORMAT(#1/11/2010#,'MM/DD/YYYY') and check_in <= FORMAT(#30/11/2010#,'MM/DD/YYYY') and record_status = 'n' or check_out >= FORMAT(#1/11/2010#,'MM/DD/YYYY') and check_out <= FORMAT(#30/11/2010#,'MM/DD/YYYY')and record_status = 'n' or check_in <= FORMAT(#1/11/2010#,'MM/DD/YYYY') and check_out >= FORMAT(#30/11/2010#,'MM/DD/YYYY')and record_status = 'n';[/CODE] [/QUOTE] Are you escaping your query string … | |
Re: Think of it this way, c# codebehind runs on the server not on the client. I can do things with the html document, sniff the request for variables and such but you cant execute client side scripts via serverside code. If you try this you will see what I am … | |
Re: Split and objects are really the fastest way to read in text files, but if you know that the file will be all comma delimited, try using MS Jet OLE DB driver [url]http://www.connectionstrings.com/textfile[/url] I used this to read in Google's GTFS files from other transit agencies so I could quickly … | |
Re: Totally agree with Powerbox. [URL="http://www.dofactory.com/Patterns/Patterns.aspx"]Web : Design Patterns [/URL] [URL="http://www.amazon.com/Design-Patterns-Steven-John-Metsker/dp/0321126971"]Book: Design Patterns in C#[/URL] However, you can create a list of generic objects [CODE] class MyObject { public Label myLabel {get;set;} } ... List<object> myObjects = new List<object>; myObjects.Add(new Label()); myObjects.Add(new MyObject()); ((Label)myObjects[0]).Text = "Hello World!"; ((MyObject)myObjects[1]).myLabel.Text = "!dlroW olleH"[/CODE] … | |
Re: Well first off 60+30+30+30+10 does not equal 100 so its kind of hard to say that SMILES HEARTS AND ARCHERS happen 30% of the time. Group them into the 30% and then pick one out of the 3. This will help with the distibution with APPLES appearing most and STARS … | |
Re: They do block. I have changed my ports and use a dns service to get around this. Lets say you changed the port of your web server to 11111. Set your linksys router to port forward 11111 to that machine. In the newer versions, you can use the UPnP to … | |
Re: Without giving the answer, you will need to print lineCount number of lines. If you loop and print say lineCount number of '*' starting with lineCount being 10 and you count down to 0 you would get the following [CODE]* ** *** **** ***** ****** ******* ******** ********* **********[/CODE] This … | |
Re: You wont be able to "see" the usb on the client because the codebehind is run on the server. | |
Re: This will open multiple forms of the same class, keeping track of where the last one was closed and opening the new ones there plus an offset. [code] class mychildforms { public in x,y; public string name; } [/code] on your MDI parent [code] List<mychildforms> childlist = new List<mychildforms>(); [/code] … | |
Re: in your dataadapter do [code] OleDBDataAdapter da = new OleDBDataAdapter("select tbl1.name, tbl2.address from table1 tbl1, table2 tbl2 where tbl1.id = tbl2.id", conn); [/code] From there, you can do a datareader or fill a datatable. As long as the join columns are of the same type, you should have no issues. … | |
Re: Need more info. I assume (hah) you are using List. This would make it so much easier for you. [code] List<byte> mybytes = new List<byte>(); mybytes.add(dabyte); [/code] You can then lay down the foreach [code] DataTable dt = new DataTable(); dt.Columns.Add("dabyte", byte); foreach (byte b in mybytes) { dt.Rows.Add(object[] {b}) … | |
Re: Ahh the good 'ol days! So the most fancy way to do this would be to use recursion. [CODE]function ulam(i: integer): integer; var x: integer; begin if i = 1 then return i else Begin if (i mod 2) > 0 //even then x:=ulam(i div 2) else x:=ulam(i * 3 … | |
Re: Round Robin is well documented on the Internet. Why? Because it is one of the fundamental algorithms used in OS development, network switching, load balancing, etc. Getting the Code will not help you understand it. Understanding it will unlock the ideas and theories that are based on it and that … | |
Re: I got a job through my co-op with my college as a trainer at a well known financial firm. It was the proverbial foot in the door. I applied for jobs in my senior year, everywhere. I got a call from a commuter railroad and 11 years later am still … | |
Re: First and foremost, a formal education is required for most jobs. A two year degree with certifications ( like Chubb or what ever ) would be the minimum to start off with. I am mostly self taught but I have a BS in Computer Science. Anyway... A Solid foundation in … | |
Re: If you are using windows 2K/NT/XP use the net time command in a batch file. You have to put several parameters in and a little knowledge of NTP (Network Time Protocol) is helpful. An example goes like this net time \\thecomputer /set This will set the time with the computer … | |
Re: Well, in my 10 years in the workforce, one thing stands out. I am glad I got a BS in Comp Sci! Most of my co-workers have gotten BA or BS in Information Technology and such or have gotten Certifications from Chubb and the like. The Comp Sci really prepares … | |
Re: MS has heard everyone saying that the OS is unsecure so they 'secured' it out of the box. I think this post may help : [url]http://www.daniweb.com/techtalkforums/showthread.php?p=6404#post6404[/url] There are a few techie things you need to do. Lemme know if you need more help. | |
Re: Seems straight forward to me. This is more academic than anything. You wouldn't do it in real life. You will wind up with 11 functions like string somefunc() float somefinc(int a) float somefunc(int a,b) ... string somefunc(char a) string soemfunc(char ab) The only vague part is returning a float sorta … | |
Re: I am going to assume that you can see the machine when you browse the network from Windows explorer and all machines are XP/Windows 2000. If you cant see them, then there may be other issues. So the issue here is Windows Networking. I won't get into the blah blah … |
The End.