How To Consolidate Identical Strings
Mar 1, 2012i have n-Strings. Something about 100. But most of them are identical. How could i remove these multiple string and have only each string one time?
View 7 Repliesi have n-Strings. Something about 100. But most of them are identical. How could i remove these multiple string and have only each string one time?
View 7 Replieswe worked our project in a team. i have 3 windows form with me, others have remaining forms. how to combine all the forms in a singe application
View 1 RepliesI am running the following query against a database of research reference works (books, articles, etc.):
SELECT [Names].[Last] AS Authors, [References].PubYear AS [Year], [References].ShortTitle AS Title, [References].SourceWork,
RefTypes.Description
FROM ((([References] INNER JOIN
Contributors ON [References].ID = Contributors.RefID) INNER JOIN
[code]....
This query returns one row for each Author (contributor type=1), of the specified reference. The rows will all be exactly the same except for the Author last names taken from the NAMES table. For example:
Author Year Title SourceWork Type
--------------- ------- --------------------------------- ----------- ----------
Rahner 1966 Revelation and Tradition Null Book
Ratzinger 1966 Revelation and Tradition Null Book
I'm looking for a way to consolidate the string data from the Author column into one string, so that this can return a single row with the Author field looking something like "Rahner, Ratzinger" -- like one could do if it were numeric data by using the GROUP BY clause with an aggregate function such as SUM or AVG.
Say I have a List(Of Tag) with Tag being an object. One member of Tag, Tag.Description, is a string, and I want to make a comma-separated concatenation of the Description members.Is there an easier way to do this than to read the Description members into a List(Of String) and then use the Join function?
View 2 RepliesI am working on a UDP Client/Server, and currently i have them sending back and forth strings, which i convert to bytes, and then open the bytes to read. I want to now send an Object instead of those strings, which includes multiple unsigned integers and strings.
View 39 RepliesMost of my check boxes look like these (on the left of the picture) (ignore the checked check box in the upper left corner , I am not talking about tat one) :However , ONLY on tab 2 the check boxes look differently in both cases the check boxes are Disabled , but they don't look the same . Why is that ? I even tried copying the check boxes from tab 3 to tab 2 but to my surprise they once again looked differently ! This only happens on tab 2 . How is this possible ?
View 20 RepliesWhat is the difference in the two blocks of code below? I expected them to return the same result, but they don't.
In the case where xml.@Type = "null", I want PatientMetricTypeID (a nullable Integer) to end up being Nothing.
Block #1: If()
In this case, it ends up as 0. It looks like Nothing is being treated as an Integer and converted to 0. I can sort of see why this might happen but not fully... I would like to understand exactly how this works, and if there is a workaround.
Dim PatientMetricTypeID As Integer? = If(xml.@Type = "null",
Nothing,
CType([Enum].Parse(GetType(PatientMetricTypes), xml.@Type), Integer))
Block #2: If
In this case, it ends up as Nothing -- expected behavior.
Dim PatientMetricTypeID As Integer?
If xml.@Type = "null" Then
[CODE]...
Are these two vb methods identical in function
[Code]....
1. This is probably really easy and I'm just missing it. I have 4 tabs in a controller. The contents in all four tabs will be identical (pictures, text boxes etc.) the end user would then add whatever to it. Whenever I try to copy the contents from tab 1 to any other tabs using ctrl+c and ctrl+v they get all out of alignment. Is there a way to duplicate a tab in the editor so that when flipping through the tabs all the text and pictures are in the exact same spot? I'm going out of mind on something that seams so simple.I don't want to have to write down the location of a couple of hundred controls and then retype them all 3 more times.
2. I can also only select text boxes, labels, and pictures at the same time. It will not let me select text boxes, labels, pictures and drawn lines all at the same time. So I can't really copy and paste everything at the same time I have to do it twice which makes the alignment get even more screwed up.
is there any listindex property is available like vb6 in vs.net ? .because i want in the combo box .when it loads at least very first item needs to be selected .so let me know any way to do it
View 3 RepliesI made a program with Visual Studio Express 2008, compiled for .Net Framework 3.5
I transferred the .exe and the other 2 files to my brothers laptop who also uses Windows 7, .Net Framework 3.5.
Every time I run the file it says "Windows Application has stopped working..."
However, I run it fine on my PC and it is also Windows 7, .Net Framework 3.5
Can anyone else think of a reason the program won't work on my brothers laptop?
I've just about scrambled my brain on this, searching and trying things, so I'm hoping someone sees something that I'm missing or can explain it to me. I'm new to .NET, used to do a lot of programming in VB but that was many years ago.
[Code]...
How can I copy form and make identical form
say want to copy the style of one form & coding and make identicel form 2
I have 8 comboBoxes and 8 identical items in each comboBox.If I select one of the items in comboBox1, how can make this item to disappear from all other comboBoxes ?
View 8 RepliesI'm on Windows Vista Home Premium, using Visual Express 2010, working on a visual basic program.
View 2 RepliesI have an application which has a tabcontrol that contains two tabpages. I have a custom made usercontrol docked to fill up each of those tabs. When I resize my main form to the minimum size allowed one tab resizes accordingly while the other seems to overflow the area and a couple ui items slip out of access/view.
One usercontrol was quite literally copied from the other and renamed and fields adjusted. The usercontrol size is the same between the two. Within the usercontrols there is a datagridview and a large panel full of textboxes and they have identical sizes and identical anchoring properties and even the same location coordinates.
I'm struggling to find a difference between the two but I really would like the resize behavior to match between the two usercontrols. I was wondering if anyone would have ideas of other things to check I did not mention here?
I wish to insert a row into an SQL table a multiple number of times. The only field that will change is the Primary key ID which will update automatically.
To enter the INSERT into a loop seems very inefficient (time). The only other way I can find to do this is build up an array of values and do a multiple INSERT but again this seems very inefficient (memory) when the values will all be identical.
Is there a way of saying insert this row a variable number of times?
is it possible to search and retrieve identical photos in a database using VB.NET platform
View 1 RepliesI have made a little Hotkeys utility for Poker Tables. I hook the keys and, depending from the key, I simulate a mouse click over the related table button.The Sub that make the job is this:
Private Sub DoMouse(ByVal flags As NativeMethods.MOUSEEVENTF, ByVal Wheel As Integer)
'wheel = +-120 if wheel event, 0 in other cases
'added hoping to improve the code, but nothing changes, Hwnd is a global variable
[code].....
The Sub that make the job is this:
Private Sub DoMouse(ByVal flags As NativeMethods.MOUSEEVENTF, ByVal Wheel As Integer)
'wheel = +-120 if wheel event, 0 in other cases
'added hoping to improve the code, but nothing changes, Hwnd is a global variable
[code].....
[code] I dont really understand what the error-msg means. I've used this bit of code in many of my projects but this time I get this error: [code]
View 2 RepliesI have a Class called People.I have an object called Roger, another called Sally.How can I copy my 'Roger' object over top of 'Sally' so they are identical?
View 6 RepliesI am trying to compare the text in a Dualist control. If an item is present in both left and right then delete the one in the left item.I have tried passing to array and comparing but There seems to be something wrong somewhere.
View 1 RepliesI've have found answers here frequently in the past just from browsing. But now I'm completely dumbfounded.
I'm using Visual Basic 2010 Express, on Win7 32bit. My application talks to an Arduino via a virtual com port provided by a cheap Bluetooth to serial adapter. I use a text based protocol that is working fairly well. BUT one method in my code, taht seems functionally equivvalent to the other methods is locking up my whole window.
It does this whether I'm debugging or running the exe.Below are the offending method, and a simmilar one defined above it that works with no problems.
[Code]...
If I comment out the cal to write, everything works fine. Aside from me setting some state bools and playing with button titles in the first method, I can't see the difference as to why one works fine and the other hangs.
I really hope someone has some experience in the SerialPort object and VB that can shed some light on this.I've tried everything I can think of. I thought maybe it was the inline concatenation, so I dim'd a local and assigned the string to it, and passed that to Write. But I have another method that uses inline concatenation that doesn't do this.
I am wondering how to detect that the values in the combobox are the same, as i am doing a application that will show the dates from the combobox. So if there is identical dates in the database, it will show only one date, and when the user clicks on that date which has many entries, it will show all relevant data to that date to a listbox for example.
VB.Net, Visual Std 2008 These 2 fields would use the same table for the display data, but "MyInfo.workState, ie KS" and "MyInfo.homeState, ie TX" would be 2 different fields. How do you avoid syncing the "Display Member" of these 2 comboboxes. In other words, if the user first selects "KS" for the workState combobox, how do you avoid the workState combobox display changing to "TX" when you change homeState combobox to "TX"? Do you have to use different databinding sources for each like combobox.
[Code]...
I added a table to my program and it generated two errors and not it will not build. I have added quite a few tables and this has never happened before. The reeors are:
1. public sub new ' has multiple definitions with identical signatures
2. 'Protected Overrides Sub OnCreateMainForm()' has multiple definitions with identical signatures.
I have deleted the table that I added and tried undoing everything having to do with it but nothing works.
I have a list of strings. For each string in that list, I want to prepend another string. I wrote a method to do it, but I was wondering if there was something already in .NET I could use to do this. It seems like something that could be built in, but I was not able to find anything.
Here is the method I wrote:
Private Function PrependToAllInList(ByRef inputList As List(Of String), ByRef prependString As String) As List(Of String)
Dim returnList As List(Of String) = New List(Of String)
For Each inputString As String In inputList
returnList.Add(String.Format("{0}{1}", prependString, inputString))
[code].....
It works, but I would rather use built in functions whenever possible.
I'm migrating from VB6 to VB.NET, in hence my questions below:
I have to write a function that returns array of strings.
How can I initiate it to empty array? I need it since I have to check if it's empty array after it returns from this function.
Is list of arrays better for this purpose? If I use a list - Is it empty when it firstly defined? How can I check it it's empty?
I have been trying to use Subsonic 3 in a test application in order to understand how it works. However, when it builds the vb files from the database the files are full of '' has multiple definitions with identical signatures errors. I am using Visual Studio 2008 configured for VB.
View 1 Replies