948 Posted Topics
Re: Without know the rest I can't say for sure, but usually the way to go is to have a "Permissions" table. With the permissions table you can add a row for each user which the permissions set that you require. So you could add a field for "Read Access", "Write … | |
Re: Maybe some details of an error you're getting would be beneficial to figuring out the cause of your problem? | |
Re: I'm still not quite sure what you mean. Could you give an example please? | |
Re: As far as I am aware you cannot alter this file from inside the application to which it belongs. You would be able to use a separate XML config file though, but you would obviously need to write the parsing algorithm yourself. | |
Re: You need to set the Culture setting in the String.Format method. It seems to use en-us by default. You would need to use something along the lines of: [icode]String.Format(System.Globalization.CultureInfo.CurrentCulture, "{0:C}", 12.99);[/icode] This will set the format template to whatever system regional settings are for this format command. | |
Re: You haven't initialised your List. Also, there is a pre-defined collection for this called "Dictionary" [icode]Dictionary<String, ConsoleColor> colorList = new Dictionary<String, ConsoleColor>();[/icode] | |
Re: None of you seem to have read the assignment properly ;) Let me highlight a section for you... [b]All digits are sent back through parameters by reference.[/b] This is an assignment to teach the students how to use reference variables =) There is a keyword called "ref" you can attach … | |
Re: [quote]I find it easy to avoid .NET because I don't see any purpose for it in my own projects (and I don't program with Microsoft products anyways). It is clear that for all basic programming purposes, .NET is not needed. Just stick to the C++ standard libraries (and no managed … | |
Re: Also, please remember that "q" != "Q". It may be wise to convert your input to upper case for the comparison. | |
Re: What you're looking for is how to create a [URL="http://www.codeproject.com/KB/cs/c__plugin_architecture.aspx"]Plugin Architecture[/URL] | |
Re: [QUOTE=dcyphert;1461279]I still haven't figured out how to write the method CountIt()..... I need to be able to count words and lines...I know that i need a bool to check and see if it's on a character or white space in order to distinguish words, and a counter for both words … | |
Re: HostMonster restricts access to the DB by IP address. Localhost is always allowed. In order to add your IP address you need to go into the MySQL Control panel on the control panel front page and goto remote connections. But you will only be able to put in a static … | |
Re: You can only pass in an array of type "char" not string. Change your string[] to char[] and instead of using "" use '' Also you're creating a new empty string array? Why? You don't even touch the argument you just passed in. A string array is an array like … | |
Re: [URL="http://msdn.microsoft.com/en-us/library/dd783499.aspx"]Enum.TryParse()[/URL] Come on man, took me 10 seconds to Google ;) | |
Re: You need to be a bit more specific here. What do you mean by polling? What restrictions do you have? What are you going to be polling? | |
Re: How about you don't take jobs you can't do? Put some effort in, then come back with a specific problem. Or, for a small fee, I'll do it for you. =) | |
Re: I don't understand what you mean by send the serialised object to the current user? The serialised object should be represented as a byte stream. In answer to the title of the thread, to send it over the send, you simply send these bytes over a Socket connection. [URL="http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.aspx"]MSDN Article[/URL] | |
Re: [URL="http://www.lmgtfy.com/?q=WPF+UI+automation"]WPF UI Automation[/URL] Wasn't so hard to find.. | |
Re: Make sure that "number" is actually a number greater than 0. Your number may actually be 0. In which case you would have a zero length array, or null. | |
Re: Please come back when you have tried something yourself and can give an example of what you tried, along with a specific problem you're having. Thanks. | |
Re: You could use [icode]String.Format(System.Globalization.Culture.CurrentCulture, "{0:C}", Math.Round(amount / 100.0, 2));[/icode] The format command sets the string conversion culture to your current culture, it then says, "My first parameter is of type currency", and then you round the amount / 100 to two decimal places. Please take care with rounding errors =) … | |
Re: [code]while ((strline = sr.ReadLine()) != null) { strline = sr.ReadLine(); /* Code and stuff... */ } [/code] These are lines 46 to 50 in your code. Now I've pointed it out, it should be easy to see why it only reads lines 2 and 4 from your csv file. | |
Re: Please paste your class definition and the method the error occurs | |
Re: Please read the information at the above link first to give you an idea of what static classes are. Hopefully this has allowed you to realise that static classes in abundance are also bad ;) The reason that you won't be able to make them work is probably because you're … | |
Re: There are two things you can do to check. 1. If the delegate is "crashing" then it's generally something in the method that's throwing the exception. Place a breakpoint on line 192 of the code you pasted above and follow the code execution. See if any exceptions are thrown. 2. … | |
Re: Well... Unfortunately I can't recommend any books on .net at all. I learnt through doing. I decided on a project, then tried to make it. I encounter all sorts of problems on the way and not knowing how to do anything, but with the help of logic and the internet, … | |
| |
Re: Unfortunately I don't know any "quick" utilities to do such things. However, in VS there is an option when you right click on a method or variable called "Find All References" This will show you where this method/variable has been referenced. It's a bit long winded but will help you … | |
Re: This appears to be close to what you want to do. [URL="http://social.msdn.microsoft.com/Forums/en/regexp/thread/7e4ad101-3f53-48f8-b7fe-45b6f2197715"]Regex to get href="#"[/URL] | |
Re: What data type is your key? The easiest way to solve this is to have an integer key type and have it auto_increment. Then you don't have to worry about duplicate keys. Otherwise I guess the only way is to generate your key, perform a select on the database and … | |
Re: You say you want to use XML for communication? In what sense? What you send over the socket needs to be converted into bytes. So build your XML in memory, then convert that into a byte array and send it over your socket and rebuild it at the other end. … | |
Re: What have you got already? | |
Re: Please give all details of the crash. Including any exception messages. | |
Re: You will need to copy the database along with it. You're effectively asking it to rain without water. You cannot connect to something that doesn't exist. | |
Re: You should be storing any user related data in the Users' AppData folder. You can get the Parent path from the variable [icode]Environment.SpecialFolder.ApplicationData[/icode] which is used in the following way [icode]String appDataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);[/icode] In there you can create a folder for your application and store/modify any files you wish. | |
Re: If you take Jonsca's idea and sodomise it slightly... On your form, keep a list of the selected items. (As in [icode]List<String> MySelectedItemNames;[/icode]) Every time you make a selection, clear this list and re-add all selected items again. Every time you make a selection, clear each box apart from the … | |
Re: Anything that creates or deletes random/small files that seem to have no purpose. Process execution code. Anything that alters the registry. Come on, think about what malware does and then look for that ^^ | |
Re: I don't think the problem is regarding his calling object. I [I]believe[/I] what is happening, is that when you disable the button, the events for that button are also disabled. So when you disable the button, you are no longer processing the MouseEnter event. A quick way to test this, … | |
Re: [QUOTE=ddanbe;1450848]First put the lines of your file in a List like this: [CODE=c#]// Read in all lines in the file, and then convert to List with LINQ. List<string> fileLines = File.ReadAllLines("file.txt").ToList();[/CODE] then select a random line by indexing the list. See here: [url]http://msdn.microsoft.com/en-us/library/0ebtbkkc.aspx[/url][/QUOTE] This is the thirst method I also … | |
Re: Have you plugged it in and turned it on? On a serious note, without any information regarding the device you will not succeed. Unless you have some software that already works with the device and a packet sniffer to inspect what data is being communicated between the device and the … | |
Re: Surely, your best bet for tutoring, if you want a PhD, is to take the course? In the UK at least, this takes around 6 years and so doesn't fit into your 1-2 year time scale. The fact also remains is, it's all well saying "I want a PhD in … | |
A while ago, I had a piece of XML you put in the application config file which made .net write all exceptions and traces into a log file, without any modifications to the code. (i.e. I didn't have any trace listeners or manual log files) I cannot for the life … | |
Re: A 10 year old on a computer programming course and their task is to create an operating system for children... 1. If he is indeed 10 years old and on a computer programming course and part of that course is the creation of Operating Systems, congratulations you have a genius … | |
Re: You will need to look into an Audio engine. There is no specific functionality to *create* a sound as far as I'm aware. | |
Re: Please indicate *how* it isn't working correctly. | |
Re: If all you need is the Computer name, I suggest you use [icode]Environment.MachineName[/icode] As for your error, when you try and open a registry key, if null is returned it means that it couldn't open the key. This could be due to the fact it couldn't find the key or … | |
Re: The "end" of the vector is not actually a value you've inserted but more of a marker. This is why you would use, for example, [icode]for(myIterator = vector.begin(); myIterator != vector.end(); ++myIterator)[/icode] The "begin" points to the first item in the vector, however, the "end" does not point to any … | |
Re: Have you tried inserting break points? Does the code get run at all? As with DiamondDrake, we need more information about what your playlist and playlist2 are and how they interact and why. | |
Re: You need to use an additional SDL Library. [url]http://www.ferzkopp.net/joomla/content/view/19/14/[/url] Build that library (in release mode) and it will generate a DLL file and a lib file. You need to link those in your project. | |
Re: You should return EXIT_SUCCESS or EXIT_FAILURE which are in the stdlib.h file. C99 defines that if left without a return statement it will return 0, but you should not get in the habit of doing so. What happens if one day, all hell breaks loose and EXIT_SUCCESS changes to 1 … |
The End.