2,157 Posted Topics

Member Avatar for ctrl-alt-del

[QUOTE=ctrl-alt-del;1512914]Is this at all possible using C# (managed code vs unmanaged code and all that)?[/quote]Yes it's possible using unsafe code in C#. [quote]Can it be done if you don't have access to the code?[/quote]Yes, but you'll have to reverse engineer their code to figure out where to insert your detour/trampoline …

Member Avatar for pseudorandom21
0
163
Member Avatar for pdooley

You use a lot of buzzwords without defining them. Why should I care about OP?

Member Avatar for Momerath
-1
131
Member Avatar for getmepaid
Member Avatar for abd640

Most likely you want to take a look at [URL="http://msdn.microsoft.com/en-us/library/microsoft.win32.registrykey.setaccesscontrol.aspx"]RegistryKey.SetAccessControl[/URL]

Member Avatar for abd640
0
606
Member Avatar for ja0
Member Avatar for ntrncx

If you want exhaustive bruteforce then just have 8 loops going from column position 1 to 8. Each loop represents a row. Take the 8 positions and see if it is a solution. Continue until done. It's only 16,777,216 different positions.

Member Avatar for template<>
0
206
Member Avatar for slfisher

Car dealers in my area use a killswitch system. If you are over 1 month late on payments your car will fail to start until you are current. This is used by the 'we finance anyone' dealers.

Member Avatar for rubberman
0
755
Member Avatar for Arjun_Sarankulu

[code]String myString1 = null; // null string String myString2 = ""; // Empty string[/code] In the first case, there is no object assigned to the string. You can't call any of the string methods on it. In the second case, there is an object, it just contains nothing.

Member Avatar for Momerath
0
81
Member Avatar for virendra_sharma

[code]String[] lines = File.ReadAllLine("filename"); Array.Sort(lines); File.WriteAllLines("filename", lines);[/code] 50 MB is nothing to a modern computer. In memory sorting will be faster than anything else. As a test I created a 54 MB file consisting of 1,470,588 strings. It took 1.729 seconds to read the file, 17.487 seconds to sort it …

Member Avatar for virendra_sharma
0
112
Member Avatar for yousafc#

Check [URL="http://www.codeproject.com/KB/miscctrl/ruler.aspx"]here[/URL]

Member Avatar for Momerath
0
42
Member Avatar for VasquezPL

What have you got so far? You need to: Open file for reading While there are more lines Read a line Split line into parts Put parts into correct fields End While Close file Work on doing each one of those, and you'll be done.

Member Avatar for VasquezPL
0
212
Member Avatar for Usmaan

[code]string ChangeString(String word, String current, char test) { if (word.Length != current.Length) { throw new ArgumentException("Error: word and output must be same length"); } StringBuilder sb = new StringBuilder(); for (int i = 0; i < word.Length; i++) { if (word[i] == test) { sb.Append(word[i]); } else { sb.Append(current[i]); } …

Member Avatar for Nick Evan
0
182
Member Avatar for pseudorandom21

I've been programming in C# for over 6 years now, and I learn new stuff every day. And to answer your question, no, C++ doesn't count. HR people don't really understand programming, and are given requirements to hire people. They want to see 3+ years of documented C# programming.

Member Avatar for abelLazm
0
131
Member Avatar for arsheena.alam

You need to read [URL="http://msdn.microsoft.com/en-us/magazine/cc302121.aspx"]this[/URL], I know it's long, but it gives you everything you need to know to create the files you need to give so that your class documents are available to others.

Member Avatar for arsheena.alam
0
112
Member Avatar for dresposure

I'm not sure what more you want. The wikipedia page has all the information you need to understand TEA, with links to papers/websites that provide even more information. What you probably need is a better basic understanding of block cyphers.

Member Avatar for rubberman
0
333
Member Avatar for gunnerone

This might be beyond your current abilities but I'd keep a Dictionary<String, Dictionary<String, double>> of the values. The first key would be the from units, the 2nd key the to units and the value the conversion rate. You could then use Dictionary.Keys to populate a dropdown list of From units. …

Member Avatar for geekman92
0
334
Member Avatar for ja0

[code]this.dataGridView1.Columns["MyColumnName"].DefaultCellStyle.Format = "hh:mm";[/code] Should do the trick assuming you've converted the data to a DateTime.

Member Avatar for ja0
0
95
Member Avatar for Jessurider

wireless networks don't have the equivalent of a cross-over cable. You'll need some third device for them to connect to.

Member Avatar for Momerath
0
77
Member Avatar for NewOrder

In your BackgroundWorker you are accessing a collection in a Thread unsafe manor. You need to lock replay during the entire process or you'll have issues if something else accesses it. Does codeFile.ExecuteAll make changes to replay?

Member Avatar for NewOrder
0
295
Member Avatar for rannamaa

[QUOTE=Mitja Bonca;1509960]You cad do it like: [CODE] string answare = "j"; bool again = (answare == "j" || answare == "J") ? true : false; [/CODE] [/QUOTE] No need for the ? : part, it will return true/false anyway. You can also just do: [code]bool again = answare.ToUpper() == "J";[/code]

Member Avatar for rannamaa
0
95
Member Avatar for mrjohnka

In line 1 you declare that you are going to return a decimal. Where is the [icode]return[/icode] statement in your code?

Member Avatar for Xcelled194
0
157
Member Avatar for JudeV

Get rid of lines 24 and 25 (and all the extra blank lines). You are doing this in the do/while loop, which is what you need to do. Replace lines 41 and 50 with [icode]bError = true;[/icode] or you will only ever get one value even if it is wrong. …

Member Avatar for Xcelled194
0
210
Member Avatar for chintan_1671

The problem is that "manything to execute" is not allowing the UI thread any time to draw frm2. Put [icode]Application.DoEvents();[/icode] right after your frm2.Show() command. That should allow the UI thread to finish showing your frm2.

Member Avatar for chintan_1671
0
71
Member Avatar for frogboy77

I do it because I like to solve problems, educate people and educate myself. I tend to answer questions in the C# forum (with occasional trips to other languages). As of .NET 3.5 there are 11,417 different types. I can't even begin to think about how to learn anything about …

Member Avatar for jon.kiparsky
0
269
Member Avatar for Nitin Daphale

No mistake, from the documentation: "The computer running the instance SQL Server might not receive responses to the EnumAvailableSqlServers method in a timely manner. The returned list might not show all the available instances of SQL Server on the network. When you call the EnumAvailableSqlServers method in subsequent tries, more …

Member Avatar for Nitin Daphale
0
133
Member Avatar for shack99

The bad way is to change line 37 to read [icode] a += ...[/icode] (same with line 47, change it to [icode] b += ...[/icode]. The good way is to learn to use [URL="http://msdn.microsoft.com/en-us/library/system.text.stringbuilder.aspx"]StringBuilder[/URL]

Member Avatar for shack99
0
125
Member Avatar for rannamaa

Anything in the project will be compiled if it needs to be (if you compile, make changes to one file, then compile again it just recompiles the one file and the final exe/dll to save time).

Member Avatar for rannamaa
0
124
Member Avatar for gunnerone
Member Avatar for NOVICE3

What do you mean that the type of value is uint? uint doesn't have a .Text property so I have no idea what you are talking about. Post some code, because I can't recreate this issue at all.

Member Avatar for zachattack05
0
111
Member Avatar for hopefree
Member Avatar for Mitja Bonca
0
157
Member Avatar for frogboy77

I've solved 80 of them using F# as I'm trying to learn F# and figure this is a good way to go about it :)

Member Avatar for frogboy77
0
159
Member Avatar for Momerath

I'm considering contributing to Daniweb but I notice that you only use Paypal. Due to several things I refuse to use Paypal. Is there another way that we can contribute?

Member Avatar for royng
3
133
Member Avatar for Queen007

Get Firefox browser and the plugin YSlow. It will tell you exactly what is taking time on your page and suggest ways to fix it. For example, it gives this page: [I]Grade F on Make fewer HTTP requests This page has 40 external Javascript scripts. Try combining them into one. …

Member Avatar for Queen007
0
198
Member Avatar for NewOrder
Member Avatar for Kath_Fish

[code]private void CLICK2_Click(object sender, EventArgs e) { string file1 = @"C:\Users\Fish\Desktop\fyp-coding\sample1.txt"; string file2 = @"C:\Users\Fish\Desktop\fyp-coding\sample2.txt"; string[] lines = File.ReadAllLines(file2); File.AppendAllLines(file1, lines); myRichTextBox.Lines = File.ReadAllLines(file1); }[/code]

Member Avatar for agugglez
0
267
Member Avatar for pseudorandom21

To get a little technical, a DataSource is something that implements one of the following interfaces: [URL="http://msdn.microsoft.com/en-us/library/system.collections.ilist.aspx"]IList[/URL], [URL="http://msdn.microsoft.com/en-us/library/system.componentmodel.ilistsource.aspx"]IListSource[/URL], [URL="http://msdn.microsoft.com/en-us/library/system.componentmodel.ibindinglist.aspx"]IBindingList[/URL], [URL="http://msdn.microsoft.com/en-us/library/system.componentmodel.ibindinglistview.aspx"]IBindingListView[/URL]. You can read more about it [URL="http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.datasource.aspx"]here[/URL].

Member Avatar for Momerath
0
329
Member Avatar for mcodesmart

This will read lines and get new ones that are added to the file as they are added. You'll have to come up with a way to end the loop though :) [code]FileStream ins = File.Open(@"d:\test.txt", FileMode.Open, FileAccess.Read, FileShare.ReadWrite); StreamReader sr = new StreamReader(ins); String line; while (true) { if …

Member Avatar for Momerath
0
320
Member Avatar for judithSampathwa

[code] public string CheckingValue(string Value) { long value = 0; string str = null; if (Value.Length == 10 && long.TryParse(Value, out value)) { str = String.Format("{0:(###) ###-####}", value); } return str; }[/code] Check the return value for null and display an error message if it is.

Member Avatar for judithSampathwa
0
211
Member Avatar for tsfaridi

One cause of this error is having something else already running that is trying to use the same port. Check your processes and make sure you don't have something running that shouldn't be (like previous versions of your software). Otherwise, I'd contact the creators of the XMPP library you are …

Member Avatar for tsfaridi
0
90
Member Avatar for ?finish?

Get a copy of [URL="http://www-cs-faculty.stanford.edu/~uno/taocp.html"]The Art of Computer Programming[/URL]. Find a topic you like and look at the problems at the end of the chapter. They range from simple to "this is my PhD thesis". Solve one and present the problem and your solution.

Member Avatar for jwenting
0
134
Member Avatar for Momerath

This snippet shows how to use Mutex to prevent multiple copies of your software from running. For a WinForms application, this code goes into the Program.cs file. The magic starts in line 14 where we attempt to create a Mutex. A Mutex is a form of a lock, but it …

Member Avatar for CsharpChico
5
559
Member Avatar for arunair

[code]public void DeleteDirectories(String[] directories) { foreach (String dir in directories) { Directory.Delete(dir, true); } }[/code] Code will throw exceptions if it encounters problems which means some directories may have been deleted and others not.

Member Avatar for arunair
0
186
Member Avatar for hopefree
Member Avatar for simagen

Without your code it's hard to fix it, but set a boolean to indicate if the counter has been incremented.

Member Avatar for CsharpChico
0
149
Member Avatar for zachattack05

Line 7 is a reference to a function that takes a pointer to a string, a pointer to a character and returns an integer. In C# we call these delegates. It looks to be some form of SQL parser.

Member Avatar for CsharpChico
0
798
Member Avatar for Arjun_Sarankulu
Member Avatar for wishesqq
0
240
Member Avatar for techevar

I'm unemployed because my work was given to two people in India. That count for you?

Member Avatar for Rashakil Fol
0
319
Member Avatar for NewOrder

[QUOTE=NewOrder;1505825]cant i modify one object type without effecting the other?[/QUOTE] Yes you can, somewhere in your code you are setting them to the same reference. Or you've never set any of the values in the first place.

Member Avatar for ddanbe
0
119
Member Avatar for samp4ever

Checking who's logged in won't work if the system is accessing the file. There is no real way to check who is accessing a file in C# as it requires hooking into the OS. There is a command you can download from Microsoft called [B]handle[/B] that will tell you what …

Member Avatar for makman99
0
114
Member Avatar for Kath_Fish

[code]private void button1_Click(object sender, EventArgs e) { SortedList<String, int> items = new SortedList<string,int>(); String fileName = SelectFile(); if (fileName != null) { using (StreamReader sr = new StreamReader(fileName)) { while (sr.EndOfStream == false) { String line = sr.ReadLine(); String[] parts = line.Split(); Combination<String> c = new Combination<string>(parts, 2); foreach (String[] …

Member Avatar for Momerath
0
182

The End.