432 Posted Topics
I tried this code and it did not do what I expected. byte byt = byte.MaxValue; BitArray bitArray = new BitArray(byt); Debug.WriteLine("bitarray " + bitArray.Get(0).ToString()); Debug.WriteLine("bitarray " + bitArray.Get(5).ToString()); What I expected was the opposite of what I got, which was the following. bitarray False bitarray False I thought `byte … | |
Re: if (a>b && b>c) { cout<<c<<" "<<b<<" "<<a; } If a>b equates to true and b>c equates to true, the cout will be called. If either do not then cout will not be called. A logical AND operator. & on its own is a bitwise AND operator. endl means end … | |
Re: I was fond of that too. But before entering thread, there is link to latest unread post in thread which is almost as good. Although first time I used it, it never worked as I expected and just took me to last post in thread. (edit) and for the record, … | |
Re: For your code to work safely without passing a size parameter, you would have to change it to something like this... #include <iostream> void printArray(int* pArr){ //find size of the array. It should be 5 but //below it is calculating it 2. Why? //int size = sizeof(pArr)/sizeof(int); //std::cout << "sizeof … | |
Re: By analysing it and writing it more efficiently. | |
For some time I have been using a utility called [forcebindip](http://old.r1ch.net/stuff/forcebindip/) It's purpose is to start an application and force it to use a specific network adapter. So if you wanted to start IE on an adapter that is not the default, you can start it with this commandline utility … | |
I had a function I used a while back to test the pixel colors in a given screen rect, it was something like this pseudo code. for (int y = t; y <= b; y++){ for (int x = l; x <= r; x++){ color = GetPixel(hdc_, x, y) & … | |
Re: For me, it's not a matter of liking it, rather getting used to it. I've never been a fan of the stackoverflow system, I mean it's great for getting answers from a google search but navigating it is a nighmare. If it helps daniweb with traffic then it's good, only … | |
Re: > This is supposed to show you the areas of the forum where you've been posting more I thought it was just the areas which are most posted in, by everyone. | |
Re: public string Encrypt(string input, string key = "012345678901234567890123") { byte[] inputArray = UTF8Encoding.UTF8.GetBytes(input); TripleDESCryptoServiceProvider tripleDES = new TripleDESCryptoServiceProvider(); tripleDES.Key = UTF8Encoding.UTF8.GetBytes(key); tripleDES.Mode = CipherMode.ECB; tripleDES.Padding = PaddingMode.PKCS7; ICryptoTransform cTransform = tripleDES.CreateEncryptor(); byte[] resultArray = cTransform.TransformFinalBlock(inputArray, 0, inputArray.Length); tripleDES.Clear(); return Convert.ToBase64String(resultArray, 0, resultArray.Length); } http://stackoverflow.com/questions/5632211/3des-key-size-matter-in-c-net | |
Re: What do the properties of the exception tell you? | |
Re: 2 things come to mind. Every Question / Answer site I've spent enough time reading has the same issues with people who just want their homework done or just want a simple answer and are never to be heard from again, most of the time not even a reply once … | |
Re: You'll get help right here. The Amount of help is usually directly proportional to the effort you are willing to put in yourself. Do you have anything at all, yet? I would start simple by creating simple classes for logic gates, for example. class AndGate { public bool GetOutput(bool a, … | |
Re: I think 1.2 literal is double by default, so... it has to be cast to float while (x != (float)1.2) or declared as float while (x != 1.2f) | |
Re: I've had a cash out pending for probably about a month now, nothing doing at my paypal account. which is the same as here. | |
Re: First search "login system" including the quotes. There are many articles to get you started. | |
Re: I don't think daniweb site can be called a forum anymore, in the classic sense at least. It does not have a forum structure. | |
Please excuse my terminoligy, as I'm not certain of it in regards winforms components. I have a ContextMenuStrip on my form and in it there are some SubItems created manually. I need to add more to SubItem dynamically. I'm unsure if I'm saying this correctly so I'll post a screen … | |
Re: Just as a quicj wild stab... { App.index2 = App.index - 1; } ;To { App.index2 = (App.index - 1); } | |
Re: Live a month without modern technology and electricity. Perhaps the apocolypse will not come in your lifetime, but your eyes will open and your character reinforced. ![]() | |
In my project I give user opportunity to add or remove a column of a DataGridView. I do not know at runtime how many columns there might be, so in order to remove it or add one at index *n* , I need to know the column index clicked. So … | |
Re: Second example simply because it's 8 or so less keystrokes. | |
Re: You can just bookmark https://www.daniweb.com/tags/c%23 ![]() | |
Re: I'd also be sure all my windows/forms are running in the same thread, else race conditions might also become an issue to deal with. | |
I load some data into a datagridview, I use a loop to do that. When I need to load new data I get rid of old data like so... foreach (DataGridViewRow row in dataGridView1.Rows) { dataGridView1.Rows.Remove(row); ; } Now I try to add new rows, because new data might different … | |
I have a class which is using IEnumerable and I now need to implement IDisposable class Class1 : IEnumerable<Class12> { ;stuff } How can I do that? My first thought was class Class1 : IEnumerable<Class12> : IDisposable { ;stuff } Which I obviously cannot do. (edit) Sorry, I believe it's … | |
I've had a real good look around at it seems to be quite difficult, all I can find is ones that claim to work in PHP, I tried them anyway and get invalid groupings, escape sequnses etc... I cannot find one for C#. I do not have the ipv6 to … | |
I have this string, it looks like this 1.2.3.4 sometext 9.8.7.6 othertext 5.6.7.8 moretext sometext has a space before new line and moretext has a tab at the end (and maybe a new line) I need to remove white space only at end of each line but excluding new line … | |
Re: You could probably knock up a script to do that in under an hour with [AutoIt](https://www.autoitscript.com) by automating via the DOM, an actual Internet Explorer instance. But requires you to use windows OS. But I suspect some sort of http voodoo would yield the same results. | |
I clicked the cashout button, nothing happens, just refreshes the page. Is it broken or something? | |
A friend set me a link on my facebook as a joke, but I never found it funny. I logs you out of many websites if of course you are logged into them, I think it's very scary that just navigating to a website can do that. I guess I'd … | |
Re: Try to ask questions properly, with some more detail. if ((pass==password) && (user==username)) | |
Re: The question is broad, and with no relevant code to work with. It is in you best interests to at least show the classes you are working with. ![]() | |
| |
Hi all. I have a need to use native/C++ code in C# application. I basically want the lower level functionality of C++ with a good looking C# GUI. Calling native functions from C# via Dllimport is not what I want to do. The native code will need to be running … | |
Re: It would be wise if you extended the information of "However I am having an issue in which it is not allowing me to start debugging or start without debugging." | |
In some threads (not all), and only the orignal post, it looks like this to me in (up to date at time of post) google chrome. http://s23.postimg.org/6faee72bv/badformatdaniweb.jpg That image is taken from [this thread](https://www.daniweb.com/community-center/geeks-lounge/threads/498761/psychometric-tests). | |
Re: Just turn off UAC in control panel if that's how you want it. Or try searching "UAC" in windows search to get to its setting. | |
Re: What's weirder is I can't even find that post in "forum view". (edit) ignore that, I'm terribly off form this evening. | |
Hi, I am looking into how programs like tcpview manage to know how many bytes are sent and received by an individual process. I notice that the task manager in windows 10 also has this information in the form of Mb/s for individual application. In my initial search I seen … | |
I cannot post the following in forum, but I can here. It's happened many times and it's a bit annoying to be honest, it says the code I posted is wrong, there is no code here, but it also does it when I try to comment some things. http://textuploader.com/aowvp | |
Re: Depends if you mean the internet disappeard or you just were not allowed to use it. I'd be fine with the latter, I go months without using internet on any kind of device. But the former would cause most of the modern world to crumble, we're almost totally dependant on … | |
Re: I live in the north west of England and we basically have nothing which could be considered a disaster. The snow panic in the UK is because we simply are not built for it and authorities are too tight to grit and clear roads and railway lines, so whenever we … | |
Re: Some people use const with every variable that is not meant to change, for the simple reason that it might reduce chance of bugs is complicated code due to dev error. | |
Hi I have encountered a problem where I cannot think of a solution. I'm attempting to work with event tracing but the problem is that a handle is not released even when the program exit, and the API appears such that once it is opened or started, it is closed … | |
| |
Re: The line just declares a char array and a char pointer. [strtok](http://www.cplusplus.com/reference/cstring/strtok/) returns a pointer to where the split begins. |
The End.