1,857 Posted Topics
Re: What language is this? The tag says c but it doesn't look like c to me. | |
Re: I noticed the same thing, but even further once you click next to get to page 2, clicking either forward or backward returns to page 2 in an endless cycle. Not sure if this helps, I'm using Chrome on Win7. | |
Re: Here's a fairly good [article](http://www.pcworld.com/article/2923941/how-to-create-an-insane-multiple-monitor-setup-with-three-four-or-more-displays.html) on what you need and how to set up multiple monitors. | |
Re: Your problem appears to be with the classes. The following appears to work. I changed the base class name so that it would be less confusing. It's usually good practice to avoid using keywords for class and class member names. [XmlRoot("ImageDataset")] public class ImageDataset { public string name; public string … | |
I recently noticed that while it is possible to access the [Recently Updated Articles](https://www.daniweb.com/articles/latest) page, there doesn't seem to be a specific link for it anywhere. | |
Re: First you need a formula, or series of calculations, that will yield the right answer. Once you have that, start putting your code together. When you have problems with your code, come back and we can help you. This may help, here's a formula using velocity,radius and time - ` … | |
Re: This [post about setting which monitor displays the form](http://stackoverflow.com/questions/1363374/showing-a-windows-form-on-a-secondary-monitor) should help. You might need a global variable, that every form can access in it's constructor, to get it to affect avery form. | |
![]() | Re: Use the Text property of the TextBox. Something like this: Process.Start(TextBox1.Text) One thing to remember, anytime you're using user input, it's good practice to validate the information before using it. |
Re: Another thought, it looks to me like you're attempting to use the variables inside the class for your functions. In that case you can leave out the parameters and make the calculations based on the variables inside the class directly. This way they can stay private. int add() { return(x … | |
Re: try this: Public Sub Main() Dim Values As Range Dim CurrentSheet As Worksheet Set CurrentSheet = ActiveWorkbook.ActiveSheet Set Values = Rows(5) For i = 2 To Values.Cells.Count - 1 If Values.Cells(i).Text <> "" Then 'here you can do what you want with each cell using the Values.Cells(i).Text property MsgBox (Values.Cells(i).Text) … | |
| |
Re: Another way would to show the external app in a dialog form. This way it can't be set to the background. The following will open Notepad in a dialog window: Dialog form with a panel that's dock filled using System; using System.Windows.Forms; using System.Diagnostics; using System.Runtime.InteropServices; using System.Threading; namespace ExternalModal___CS … | |
Re: As long as the items in an array or list have a ToString() method that returns the value of the item, you can populate a dropdownbox by assigning the collection to the datasource property. | |
Re: One way to pick and choose the data would be to use a new datatable to store the data then when you're ready it can be saved to the database. Using a listview for data is kind of out dated, I would suggest using a datagridview, which is designed to … | |
Re: Another way would be to use a bool that goes false if there are any values you don't like: bool correct = true foreach (string x in array) { if(x != "K") { correct = false; } } if(!correct) { //do stuff } | |
Re: You could use simple obfuscation, like base 64 encoding. If the data is fixed length, you could store it in the executable, or save it as a binary file, maybe a .bin or .dat extension. It will be readable as text but the data will be garbled. If you don't … | |
Re: Here's a thought would setting the `WebBrowser1.Document.Window.ResizeTo()` method shrink the document to the size of the screen? | |
Re: Since your code is C#, I would suggest using a LinkLabel which is designed to accept links. If necessary this could be used in a modal dialog form. If you need to, you can review this [code for a login form](https://www.daniweb.com/programming/software-development/code/454432/a-simple-login-form-for-c), which is simple enough to be modified for your … | |
Re: One relatively simple way is put, Database name , Server name , User name and Password, variables in a module, and have your new form have a series of textboxes that the user can enter the information. A command button can contain code to validate the information and then pass … | |
Hooray got my original user name and the login link works. Any eta on getting the rest of the Finder menu options? Most notably the Favorite Forums(none are shown) and Unanswered Posts are missing. And on a side note, this one post generated 4 email notifications. | |
Re: Basically because the data isn't retrieved all at once, the connection to the database remains active as the query pulls data to be processed in the foreach loop. | |
Re: Alternatively you could assign the array as the DataSource for the ListBox: Dim strings() As String = {"B", "C"} ListBox1.DataSource = strings | |
Re: To have an array of mixed data types, you'll have to use the generic `Object` type. To sort them you'll need to make your own algorithm. Here's [one that you might be able to use](http://stackoverflow.com/a/4347723/2403810). | |
Re: A few things I noticed: This line is backwards,`for Ts in TimeStep:`, it should be `for TimeStep in Ts:`. This line is backwards, `for Part in Particle:` it should be `for Particle in Part:' This line print("Pcid:%s,Lat:%s,Long:%s" % (Nr,x.firstChild.data,y.firstChild.data)) is trying to use the attributes as variables instead of the … | |
Re: With Visual Studio there most definitely are better ways. Here's a [help page](https://msdn.microsoft.com/en-CA/library/sc65sadd.aspx) that discusses and can help you learn those ways. | |
Re: A couple of things in your code, set Lid to the highest index instead of i and do the swap after the j loop finishes: void Selection_Sort(int SUM_1[], int n) { int Lid, tmp; for (int i = 0; i < n; i++) { Lid = n - 1; for … | |
![]() | Re: One way would be to replace: if (wordCounts.count(aToken) == 0) //the token is not in the map wordCounts.insert( pair<char*,unsigned>(aToken,1)); else wordCounts[aToken]+=1; with wordCounts[aToken]+=1; If atoken is present, in the map, the value will increment by 1. If, it isn't present it will be added with the default value(0) then incremented. ![]() |
Re: What error message(s) are you getting? It looks to me this,`print time_string`, could be a problem. Try `print (time_string)`. | |
Re: Actually VB 2010 Express can load the report viewer in design time. It works quite well. | |
Re: You stated your objective and you've supplied code. However you haven't said what problem(s) you're having with your code. | |
Re: Try declaring your methods as static: static Row CreateContentRow(int index, int personId, string lastName, string firstName, string userPass) static Cell CreateTextCell(string header, string text, int index) | |
Re: If I understand you correctly, your input will be 2 bytes uint, 4 bytes int, 5 bytes ASCII. For this you will need to create your own parser. The Parse method included in the byte, uint and int structs, includes the option to parse Hex strings. Simply pass in the … | |
Re: One way is to add a new line character to each line of data that you add to the textbox. This will automatically display multiline data. | |
Re: One way is by making a custom control that contains the 2 controls you want to use. You should be able to find several tutorials on how to do this. | |
Re: With seeing the relevant code, it's hard to come up with a definitive answer, one thing that may help, is to use a custom class that contains fields/properties for the different parts of the data, and a ToString overload that returns the language. When you read the file populate a … | |
Re: It looks to me that a node from one tree will never equal the node from another tree, since even if the data is the same, next won't be. You might need your own search function, something like this: node* FindNode(node* tree, node* element) { while(tree != NULL) { if … | |
Re: Have you looked at the explanation on this [page](https://msdn.microsoft.com/en-us/library/ms182328.aspx)? | |
Re: Another option,and possibly less confusing than trying to assign to an object of a different type, would be to use a constructor instead: b(a& other) { p = new a(other); } obj1 = b(obj2); | |
Re: Since your post is tagged Visual, I'll assume this is a Forms application. Examine the properties and methods of the ListView class, if necessary you can probably find tutorials on using it online. This class can be configured to show a grid and it can be set for any number … | |
Re: You could also create a List<TextBox> by filtering the Controls collection without any major changes to the code: Dim textBoxes = New List(Of TextBox)(Me.Controls.OfType(Of TextBox)) If you only want certain textboxes in the collection it's relatively easy to filter the collection even further by giving the textbox names a unique … | |
Re: In looking at your code, I don't see anyplace that the correct connection string is assigned to `connstring`. Instead of using a separate global variable, you might be better off using the SelectedText of `cmbSrv`. | |
Re: It's pretty hard to find the error without a sample of the data in the text file. | |
Re: If you have a question related to an existing post, you should create a new question and reference the other post with a link.If you have a question related to another post, you should create a new question and reference the other post with a link. | |
Re: If you have a question related to an existing post, you should create a new question and reference the other post with a link. | |
Re: Reading all the lines into an array is easily accomplished with the File class, which is part of the IO namespace, and includes a ReadAllLines functions that returns a string array containing all lines in the file. From that point it's a relatively easy matter to iterate through the array … | |
Re: What code are you using to set up the connection in the module? | |
Re: Actually I'm surprised that you get any answer at all, considering the syntax errors in this code: cout - is only used at the beginning of the statement not in the middle of it if you're going to specify a return type then you must return a value of that … | |
Re: Since this is a different question, you should mark this solved and start a new question. This way your new question is more liable to get the attention you want. | |
Re: There are quite a few programs that are available that have that capability, Google can tell you more. However remember that anything that has been overwritten since it was deleted will degrade the quality of what you can recover. | |
Re: See if something like this works to select all the data from only certain columns: "select username as username, regDate as regDate, birthdate as birthdate, LastSeen as LastSeen from mytable;" To display it a DataGridView works well DataGridView1.DataSource = dt |
The End.