1,857 Posted Topics
Re: What part has you confused? It seems pretty straight forward to me. This sounds like it's very similar to a game called [Black Box](https://en.wikipedia.org/wiki/Black_Box_(game)). Perhaps that wikipedia page will help. | |
Re: First thing I'd suggest is to upgrade your version of VS. The support for c++ is much better. As to your particular problem try this [post](https://blogs.msdn.microsoft.com/vcblog/2017/05/05/why-am-i-getting-these-_scl_secure_no_warnings-messages/) | |
Re: I think you have a misunderstanding. Obfuscation doesn't render code safe from hacking. It just makes it more difficult. In this day and age with smart compilers. How much of that obfuscation is actually being optimized into efficient code by the compiler? If code can be decompiled it can be … | |
Re: If you're using the latest version of VB.net, which you should be, you can use the interpolation operator: Dim Rows As DataRow() = TempTable.Select($"Code like '%{VerCode}%'") The advantages of this, are cleanliness, the code is more concise and simpler, and any variable used inside the curly brackets is automatically converted … | |
Re: What error does the second code give you? In the first code, the error is telling you exactly what is wrong. You are comparing a pointer to a string. Obviously this won't work. A pointer is a reference to a memory location you can't compare it to a string. Even … | |
Re: If you find out how long it takes let me know. After 30 years I'm still learning. lol | |
Re: I would suggest assign the item value to the text property of the control using the `ToString` function, and do away with the conditionals.This way if it is null it will become an empty string and will automatically clear the text of the control: txtLocation.Text = ds.Tables("Training").Rows(inc).Item(3).ToString | |
Re: My suggestion, if you're going to use c++ to program a Windows GUI, use Visual Studio. It will interface c++ with the .net library and make your programming much easier. | |
Re: The first thing that catches my eye, is that you're calling a function (`SW_SPI`) without passing it the argument it needs(`unsigned int Output`). | |
Re: Try this, put line 13 `int dank = dankestmemes();` after line 16 `do{`. | |
Re: If all the functions are in the same scope, use a variable that is global to that scope, and only moduify the arguments for and the calls to `func15`. Most modern IDE's will make that relatively easy. | |
Re: Error 1 - You don't have a method name `IsString` Error 2 - In line 58,`IsWithinRange(txtOperator, "Operator", "+", "-", "*", "/");`, you're trying to send a bunch of strings to the method when it expects a `TextBox`, a `string` and 2 `decimal`'s. Error 3 - `Simple_Calculator.Form1.Calculation(decimal, decimal, string)`, has no … | |
Re: What are the steps you refer to in your code? Adding comments to your code, to clarify this would help. | |
Re: With Mr. Robot, you really have to stick with into season 2, before it starts making sense. :) And you're right it is really off the wall, but it also touches on a lot of really current topics. | |
Re: The first place to start is with some online tutorials. Search for VB.net tutorials and .net database tutorials. Once you have some code that needs help, someone will be more than happy to help you. This isn't a free-code-it site, where people will just donate their time and do the … | |
Re: It seems to me that the exception is thrown by the file path not the file itself. Try placing the file where it has a shorter path and see if that helps. | |
Re: What have you tried? What errors do you get? The code you submitted doesn't seem to show much effort. | |
Re: For something like this you might want to look at indexing the words for efficient searching. I didn't notice if you've assigned each file a unique id but this will work with collection indexes as well. A `Dictionary(Of String, List(Of Integer)` is a simple structure to hold which videos contain … | |
Re: I think you'll find that C# is more akin to C++ than C. I also think that C# will take you in different directions than C, since it is Object Oriented and is fully integrated with the .net librairies, including creating windowed GUI's, web-based, and data based applications. Due to … | |
Re: > The following is the correct way to do encryption. What international authority supports this as the correct way to do encryption? What credentials do you have to make that statement? | |
Re: It looks to me that `fgets` is picking up whatever delimiter you're using after inputting `b2` and adding it to the front of the input string. Thus, throwing off your offset. One workaround for this is to get all your inputs at once: int main() { int b1, b2, len; … | |
Re: This: float length = float.Parse(txtL.Text); float.TryParse(txtL.Text, out length); float width = float.Parse(txtW.Text); float.TryParse(txtW.Text, out width); float radius = float.Parse(txtR.Text); float.TryParse(txtR.Text, out radius); float tribase= float.Parse(txtB.Text); float.TryParse(txtB.Text, out tribase); float height = float.Parse(txtH.Text); float.TryParse(txtH.Text, out height); looks very problematic. You're calling `Parse`, then calling `TryParse`. The `Parse` calls are giving you … | |
Re: For a problem like this I would suggest the following steps: Break the problem down: You need numbers to iterate over and you need 2 divisors which when multiplied will give you the third. You need a structure to output a collection for the answer. What if they decide to … | |
Re: > I really am having a hard time understanding linked lists and how the pointers work in this project I agree. I think maybe you need to go back study link lists again. Maybe take a supplementary tutorial. Here's a [pretty good one](https://www.codementor.io/codementorteam/a-comprehensive-guide-to-implementation-of-singly-linked-list-using-c_plus_plus-ondlm5azr) | |
Re: Your problem is one of perception. You have 2 statements printing that `max =`. One is reporting the value of `i` and the other is reporting the value of `max`. Change the first one to `i =` and you should start seeing things right. | |
Re: The `DataRow` class has an `ItemArray` property. Using this you can use `Min` and `Max` extensions to get what you want. If you don't want the whole row, there are other extensions available that can help you select only certain columns. Something like this: DataTable dt = new DataTable(); dt.Columns.AddRange(new … | |
Re: I see a couple of problems with your code: You can't use a changeable variable to declare an array. The value must either be a written constant or a constant variable. If it must be dynamic, then you'll have to use pointers and learn about memory allocation as well. The … | |
Re: As for your immediate problem it looks like your logic is a bit wrong. If you loop through the characters and add the words starting with that character your code will work much better. A few things to note: When concatenating strings continuously like this use a StringBuilder. This way … | |
Re: I would suggest a `List<Course>` of a separate class for `Course`. This should only have the information about a single course including a `List<Student>` of those students registered to that course, the name of the course, a description, a max capacity and a current count. By the way, since `Course` … | |
Re: This looks like one problem here(line 42): calcit(candidate, target, a, b, c, d); This sits outside the loop and for the life of me I can't see why you're sending the loop variables to your function. This whole function: void calcit(char candidate[10][6], char target[3][6], char a, char b, char c, … | |
Re: ''#region Header ' '' ' '' Name: ' '' ' '' QuickSort.vbs ' '' ' '' Description: ' '' ' '' Sort an array using the QuickSort algorithm. ' '' ' '' Usage: ' '' ' '' QuickSort(array,compare) ' '' ' '' array: a one dimensional array of data ' … | |
Re: I would suggest that you refactor your data table so that you store the hours each day a specific installer is available, with perhaps a flag to indicate that there are no available hours for that installer, that day. This would give you much more flexibility in your searches as … | |
Re: This line Dim reader3 As SqlDataReader = cmd3.ExecuteReader() doesn't look right to me. Where is `cmd3` coming from? | |
Re: I would suggest you look into using a [DataGridView](https://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview(v=vs.110).aspx) instead of a `ListView`. Once you load a `DataTable` with the data the `DataGridView` is designed to display that data, much more easily than a `ListView`. | |
Re: Adding the same question 2 hours later isn't going to get you anywhere. Continue the dialog started by the answer in your first post, if you want to arrive at a solution. FYI, I would be very surprised if anyone would put the time and energy into spoon feeding you … | |
Re: It looks to me your first most obvious problem is, this code can't run with the example you've given. Your example is a float value but all your variables are int, including your call to the scanner object. Once you have code that will run, now you can look at … | |
Re: I think your first step would be to get familiar with DataTables and the DataGridView control. These were specifically designed for viewing and editing the data to and from an SQL based database. There are plenty pf free tutorials that will help with this. | |
Re: Another suggestion would be a DataGridView which has the ability to sort the data by any column. With a DataTable as the data source you have the option to save/read the data to/from xml formatted text file. | |
Re: One way is to convert the table to a list of a custom class where each column is a member. Simply override the `ToString()` method to display the property you want. Setting the list as the datasource for the listbox will display your chosen property while mantaining the rest of … | |
Re: It allso helps if functions aren't nested inside one another. A modern IDE, like CodeBlocks, NetBeans, or Visual Studio, which can all be used for free, helps with gettting these kinds of syntax issues straightened out. | |
Re: What version of Office are you using? All the latest versions have an Auto Rcovery option to let you recover documents that didn't get saved properly. | |
Re: Actually your algorithm is mostly correct. what you were forgetting is that `2` is the first prime number, but you weren't printing that. Even though your algorithm is naive, there are some optimizations worth mentioning: The greatest number that needs to be checked if it's a factor is the square … | |
Re: Assuming the parent form is designated as an `MDIContainer`. You can achieve what you want by removing the parent's menustrip from its control collection and adding the menustrip from the child form. To reverse this, handle the `FormClosed` event in the child form and remove the child form's menustrip and … | |
Re: Aside from the obvious need to refactor. It's worth mentioning the root of your problem, since it will most likely occure again. When comparing strings you should always use the `.equals` function instead of the `==` operator. The `==` is for checking if 2 objects are the same object and … | |
Re: Your main problem appears to be, you're using one loop, but expect it to return to 2 different places. Using one loop just for the first choice and a second loop for the second choice, will fix the immediate problem. However, you should probably think about refactoring, and use a … | |
Re: It looks to me that you're trying to return a pointer to a variable that is going out of scope as soon as the function ends. Try declaring the array in the calling function and returning void instead: void getword (char temp[total], char max[total]) | |
Re: One problem you have is here: float calcstaxes(float *statetaxptr,float*countytaxptr) { float totalsale,statetax, countytax;//errors here float statetax= totalsale*.04; float countytax=totalsale *.02; *statetaxptr=statetax; *countytaxptr=countytax; } `statetax` and `countytax` are declared twice. This is one danger of declaring multiple variables on one line. Basically what you've done is this: float calcstaxes(float *statetaxptr,float*countytaxptr) { … | |
Re: It looks to me that you'd be better off learning from the beginning. Here's the [link](https://docs.oracle.com/javase/tutorial/java/TOC.html) for one place to start |
The End.