-
Began Watching Problems in sorting element inside an array of object.
i have initialized the elements of the array by reading the strings from a file, however when I call the sort function, either the program crashes or it just outputs … -
Replied To a Post in not displaying the union and intersection of sets in output
Did you replace `criket` by `tennis` in line number 41? Do you receive any error message? -
Gave Reputation to Schol-R-LEA in not displaying the union and intersection of sets in output
Traditionally, sets are represented as bitfields, which could then be manipulated with the bitwise operators - `&` for union, `|` for intersection. Since you know the whole set has at … -
Replied To a Post in not displaying the union and intersection of sets in output
Line# 41 should be `tennis`, isn' it? Also, `n1, n2, n3` and `total` aren't intialized to zero. -
Began Watching not displaying the union and intersection of sets in output
#include<iostream> using namespace std; class Sports { public: int tennis; int badminton; int cricket; int setA[20],setB[20],setC[20]; int ab[20],bc[20],ca[20],abc[20]; int n1,n2,n3,n4=0,total; void accept(); // method for accept the input void intersection(); … -
Replied To a Post in sub of a event handler (dynamically generated, combobox, textbox, button)
You may do: Public Sub Btn_Click(sender As System.Object, ByVal e As System.EventArgs) Try Dim btn As Button Dim cbx As ComboBox Dim txt As TextBox Select Case sender.GetType Case GetType(Button) … -
Began Watching sub of a event handler (dynamically generated, combobox, textbox, button)
Hi all, I have created an Event handler to a function for clicking a generated button, now when this button is clicked need to paste in a textbox the Combobox.seleteditem … -
Replied To a Post in How to search in CSV-File and show specific cells
Try this: Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Try Dim sSearch As String = LCase(TextBox1.Text) If sSearch = "" Then Exit Try Dim line As Int32 … -
Began Watching How to search in CSV-File and show specific cells
Hi, I had a longer break, but now I want to continue working on my little project to make my work easier. I have an Excel file which I converted … -
Replied To a Post in get combined textbox text into a new one in sorted checkedbox order
Employ `CheckChanged` event: Private Sub CheckBox3_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox3.CheckedChanged If CheckBox3.Checked = True Then TextBox7.Text += fntext & vbCrLf End If End Sub Private Sub CheckBox4_CheckedChanged(sender … -
Began Watching get combined textbox text into a new one in sorted checkedbox order
Hi, I have a question, how can I achieve this, like I have declared 3 variable as string, each checkbox has a variable that will be created if clicked also … -
Replied To a Post in vb net reload filterbox from list saved from settings
Of course the for-next can be replaced by an `AddRange` -
Replied To a Post in vb net reload filterbox from list saved from settings
I would do the following: Private Sub TextBox3_TextChanged(sender As Object, e As EventArgs) Handles TextBox3.TextChanged Dim items = (From it In ListBox1.Items Select it Where it.ToString().IndexOf(TextBox3.Text, StringComparison.CurrentCultureIgnoreCase) >= 0).ToArray ListBox1.BeginUpdate() … -
Began Watching vb net reload filterbox from list saved from settings
Hi, I have a issues, I have to load again the listbox, after filtering trought a textbox if a string is the same. I tried this code, but doesn't work … -
Replied To a Post in Error with Day Function
Probably the code is missing the following `Imports`: Imports Microsoft.VisualBasic.DateAndTime -
Began Watching Error with Day Function
Hi all. I have this code and it is correct. Dim logDayName As String = WeekdayName(Weekday(LogDateTextBox.Text)) Dim logMonthName As String = MonthName(Month(LogDateTextBox.Text)) The following code is an error on the … -
Replied To a Post in I tried to do codes to get e^x by using maclaurin series but it gives 0 .
Here is the series solution and an alternative solution. In you can opt for any of both, solution #2 is more accurate, more concise and faster. I hope you can … -
Began Watching I tried to do codes to get e^x by using maclaurin series but it gives 0 .
#include <stdio.h> #include <math.h> int main() float i, x; double fact=0, sum=0; printf("Enter value of x as the power of e: "); scanf("%f", &x); printf("Enter n as the number of … -
Replied To a Post in Split a string into individual words
Hello. The most easiest way I see to do what you ask is the following: Dim Search1, Search2, Search3, Search4, Search5, Search6, Search7 As String Dim s As String = … -
Began Watching Split a string into individual words
Hi Group, I'm using the split function for the very first time. I understand what it's doing. However I don't know how to output each individual word into a specific … -
Replied To a Post in I need help with files, multidimensional arrays and structures
I found the following in your code: 1) There is missing a `Exit Sub` right after `Messagebox` in between lines 30 and 31. 2) Line 46 where variable `i` is … -
Began Watching I need help with files, multidimensional arrays and structures
The user is going to enter the product number, then the program must be able to open the file, read the information of a inventory in the company, capture the … -
Replied To a Post in regex matching a string with no single quotes in powershell
"Windows PowerShell is a programming language from Microsoft that is primarily designed for system administration. Since PowerShell is built on top of the .NET framework, .NET’s excellent regular expression support … -
Began Watching regex matching a string with no single quotes in powershell
Hi I'm trying to create a script in powershell that finds a string in a file and then modifies it but I'm having issues matching the string I want. So, … -
Replied To a Post in VB.net Check datatable for an existing account number
I imagine you are aware of SQL injection. If not you may read [here](https://docs.microsoft.com/en-us/sql/relational-databases/security/sql-injection?view=sql-server-2017) about it. -
Began Watching VB.net Check datatable for an existing account number
Hi group, I'm attempting to write code to check to see if an existing account number exists. The user is to input a 10 digit account number. The code then … -
Replied To a Post in Why is the ListView box showing same headings twice?
One question: where do you define `itemcoll`? -
Began Watching Why is the ListView box showing same headings twice?
Group, I've written some code to populate a listview using 3 fields from a database. When creating the listview, I named the individual columns for appearance purposes, (Account No, Company … -
Replied To a Post in How do I disconnect wi-fi
Take a look [Here](https://www.windows-commandline.com/disable-wifi-connection/) -
Began Watching How do I disconnect wi-fi
I have the following code to connect to wi-fi, which works fine. Dim p = "netsh.exe" Dim wi-fi-name as string = "My-Wi-Fi-Connection" Dim sInfo As New ProcessStartInfo(p, "wlan connect " … -
Replied To a Post in Not declared errors in VS 2017
I see tag `<asp:Panel` in line #9 open but never closed, is it? -
Replied To a Post in adding text to a text file using vb.net
Sorry for the inconvient. There were extra lines not needed. Sub Main() Try prependTextToAllLines("Append.txt") Console.Write("Process succeeded. Press Enter key to exit.") Console.ReadLine() Catch ex As Exception Console.WriteLine(ex.ToString) Console.ReadLine() End Try … -
Replied To a Post in adding text to a text file using vb.net
For some reason I don' t know, yesterday the code was working and today it fails. So, I've rewritten the code and it is: Sub Main() Try prependTextToAllLines("Append.txt") Catch ex … -
Replied To a Post in adding text to a text file using vb.net
@rproffitt: If the file is large and assuming we can buffer a first bunch of lines so that streamreader and streamwriter will never overlap: Try Dim path As String = … -
Replied To a Post in adding text to a text file using vb.net
Consider reading all the lines at the beginning and, then, prepending the line number, like in: Try Dim vLines() As String = IO.File.ReadAllLines("Append.txt") Using sw As New StreamWriter("Append.txt") For i … -
Began Watching adding text to a text file using vb.net
i want to add some text at the begining of every line in a text file. i'm only able to append text to the file Imports System.IO Module Module1 Sub … -
Replied To a Post in Not declared errors in VS 2017
Be sure to have all the tags 'closed' (e.g. `<asp:Panel ... />` or `<asp:Panel .... > ....</asp:Panel>`) and all enclosed inside `<form>...</form>`. For example: <body> <form id="form1" runat="server"> <div> <asp:Label … -
Began Watching Not declared errors in VS 2017
Hello I am getting 3 errors (same errors for all 3 lines) in my Visual Studio 2017 Web Forms project: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) … -
Replied To a Post in Datagridview Control class
Unexpectedly for me, when datasource is assigned, dessing mode seems to be bypassed. Commenting the `If` condition columns and rows can added to the datatable, directly to the control in … -
Replied To a Post in show connected USB Devices
Still the code was throwing exceptions until the function shifted to a shared function and the code was as below. Now it works smoothly. Shared Function SearchComPort(obj As sComObj) As … -
Replied To a Post in show connected USB Devices
I continue this thread because actually I've re-written some C# code, that communicates with a usb device, in Visual Basic. The thing is that when trying to find the COM … -
Replied To a Post in vb.net - IP-Input-Box like windows
I adjoint the project once again because I found it was throwing errors, did you find any? If you find any further error please let me know.  -
Began Watching Help! Search Button code error in vb.net
Please tell what's wrong in this code.. I am using 3 DateTimePicker.. I think that line has some problem...Please Help..  -
Replied To a Post in Search Button Error-System Null Reference Exception
To get error line number I would enclose inside a try-catch. -
Began Watching Search Button Error-System Null Reference Exception
"Error in Line 4- System.NullReferenceException: 'Object reference not set to an instance of an object." Private Sub btnsearch3_Click(sender As Object, e As EventArgs) Handles btnsearch3.Click Dim vSearch As String = … -
Replied To a Post in show connected USB Devices
I am very happy that you could resolve the issue. Thanks. -
Replied To a Post in show connected USB Devices
There should be no problem by name. Could you upload an image of the Console listing the name (option 2.) ? Use the snipping tool for that purpose. -
Replied To a Post in show connected USB Devices
¿Are you entering the complete name? The select command is NOT case sensitive, but if you want to use the percent wildcard '%', the function would be then: Function Find_Device_By_Name(name … -
Replied To a Post in show connected USB Devices
BTW you may cast from one type to another by means of `DirectCast()` or `CType()`. -
Replied To a Post in show connected USB Devices
Vendor ID (VID) and Product (ID) is not the same as serial number. Two equal devices from the same vendor will have the same VID & PID because are the …
The End.