Create A Specific Type Of Priorityqueue?

Mar 5, 2010

I want a priority queue that takes two or more entries and sorts by the first one. I already have a priority queue from some programmer named ookii. I had another one and tried that too. Both of them only take one entry, and that just seems useless to me.

Both of them are classes that say like, Dim pq new PriorityQueue(of T)You see, that of T is one element. I don't know what to do to make 2 or more linked elements that can be easily called from existing variables and stuck in a queue sorted by the first element. Basically what I'm used to using is like,Dim sl as new SortedList(thekey,thevalue)When i put things in there, I know what's going on at least.I don't have the experience required to create my own class unless you can walk me through what I need to alter in some other class. I barely know how to go to references and double-click a .dll file that someone else made so I can use functions from it.

I thought to put an array in the "of T" part of the priority queue I have already. But then I'm dimming a whole array every time I want a new entry to the queue. So I want like, a vector? Or some other multi-part entry for the "of T". Two "of T" parts would be ideal because I worked with Sortedlists well already.

View 10 Replies


ADVERTISEMENT

VS 2008 Intercept Specific URLS - Create A Listener Type Application

Sep 30, 2009

I'm wondering if it's possible to create a listener type application that would monitor webaddresses that the user attempts to go to. And can then either block or redirect the browser to another website. Purpose: I know this seems to sound a little weird but what I'm attempting to do is a NetNanny type application that can run on the user's PC and the allow, prevent, rewrite (would look for particular keywords and rewrite them "words I wouldn't want my 7yr old seeing or reading), or redirect to other webpages. I would also like to be able to handle both IE and Firefox browser with this one application.

[Code]...

View 6 Replies

VMWare Specific Or Perhaps The Type Of Install Specific?

Apr 27, 2010

Strange story... I downloaded VMWare but it has since advised of an available update. I downloaded the update and when I click to install it, a window comes up with VB Code from a project I created a while back in a completely separate folder from this install file. I then tried downloading the trial of VMWare Workstation and when running the installer it shows the same thing. I don't know of anyway to contact VMWare support since I don't pay for any services or products and all there is available is a FAQ type section. Of course this problem would not be in there, nor can I find any such related issue online. his is VMWare specific or perhaps the type of install specific. I have no other issues with any other app installations other than with VMWare installations.

View 2 Replies

Determine Whether Specific Control Type Is Currently Loaded?

Nov 14, 2010

I've created the following basic function to determine whether specific control type is currently loaded:

Private Function IsPreviewerTypeLoaded(Of T)() As Boolean
For Each previewer In LoadedPreviewers
If previewer.GetType().Equals(T) Then

[Code]....

I need to compare each control against the generic type supplied. Equals(T) fails to do the job, producing a compiler error. How to make it correctly?

UPDATE: is the following correct?

previewer.GetType().Equals(GetType(T))

View 2 Replies

More Specific Type From Base Shared Constructor?

Nov 26, 2010

How do I get using reflection the most generic type from a shared constructor in the base class :

Public Class Foo()
Shared Sub New()
'Here we have code to get the type[code]....

I expect the result to be Bar type and not the Foo. Is it possible?

View 1 Replies

Always Save Specific File Type In Windows To One Location?

Apr 14, 2012

I'm trying to do the following I'm not sure if it's possible using VB.NET. I want to specify default saving point for all files type for example: In my program you choose the path "C:UsersMarkusPictures" for pictures and everytime you download pictures files from website, or using skype or any other program when Save File Dialog opens up (external one not via my program or connected to vb.net just the windows default one) then it will show "C:UsersMarkusPictures" always for .jpg .gif type of files etc...

View 2 Replies

C# - Arrays - Use The IEnumerable<T> Interface And Make It Type Specific

Mar 1, 2011

In many projects I work on, whenever I have to return a read only collection, I use the IEnumerable<T> interface and make it type specific like so:

CODE:

Most of the time, I return a List but in some functions and read only properties I return an array which also serves the purpose alright by kind courtesy of Extension Methods.

My question is am I violating any design principles by returning IEnumerable<T>s instead of specific types (e.g.: List<T>, HashSet<T>, Stack<T> or Arrays)?

View 8 Replies

Delete A Specific Type Of Files After X Amount Of Days?

Feb 5, 2012

I have a service that produces .txt files to a folder every 30 seconds. Is there anyway to delete files that are older than x amount of days?

View 2 Replies

Find Objects Of A Specific Type In An Object Graph?

Jul 30, 2011

Given an object instance, how can I recurse its members (i.e. the whole object graph) for an object of a specific type, or one that inherits from a specific type?

View 1 Replies

Reading A Specific Row Of A Text Type Column Of Sql Database With VB?

Jul 2, 2011

I am reading data from the database with SQLCommand object SQLReader, all I want to know is I want to read a specific row from my column myData...e.g.I want to read row 11 or random row from mycolumn, what is the correct syntax I am reading all the data(rows) from mycolumn with the command

"SELECT mycolumn from Table1"

what is the syntax to read the 11 or any row of this column?

View 3 Replies

C# - Get ALL Child Controls Of A WinForm Of A Specific Type (Button/Textbox)?

Aug 5, 2010

I need to get all controls on a form that are of type x, I'm pretty sure I saw that code once in the past that used something like this:

dim ctrls() as Control
ctrls = Me.Controls(GetType(TextBox))

I know I can iterate over all controls getting children using a recursive function, but wondering if there is something more easier or straightforward, maybe:

Dim Ctrls = From ctrl In Me.Controls Where ctrl.GetType Is Textbox

View 8 Replies

OpenFileDialog - Getting Specific File Type From My Computer Using The .getfiles Function

Jun 10, 2011

I'm doing a project now. I'm having a problem on getting specific file type from my computer using the .getfiles function.

Here's my codes.

Private Sub dlgOpen_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles dlgOpen.FileOk

Dim filepath as String = "C:"
dlgOpen.CheckFileExists = True

[CODE]...

What I wanted to happen is when the openfiledialog prompted and once I've selected the file, the file information I've specified above must show on the application as a label. But nothing appears. The file name only appears on the text box beside the open button. It should also appear above the button and the text box as a label. How could i possibly do that? And how could I select just one file at a time from a folder with 150 other files in it? When I use getFiles, it only gets all at the same time everything that's in the folder even if i've only just selected one file.

View 8 Replies

Text Box Formatting - Force User To Use Specific Type Of Input

Dec 16, 2009

I have a text box labled QTY, which feeds the QTY column on a datatable. the table then is ran through a function that takes the data and converts it to a string which my production machine can read. My problem is this, and its probably really simple (these problems usually are) how to i force the user to use a specific type of input on the txtbox so they would have to put the QTY in the format of 01 02 03 etc etc, i have it set to default to 00 but i want to force the user to haver to input 2 chars.

View 5 Replies

Create A Function Which Have Either 1 Parameter With A String As Data Type Or 2 Parameters With Double As Data Type?

Jun 11, 2012

I need to create a function which have either 1 parameter with a string as data type or 2 parameters with double as data type.Something like the substring method.

View 2 Replies

Create A Chart With Specific Row Only?

Apr 18, 2011

how to create a chart with specific row only from datagrid in vb.net?

View 3 Replies

VS 2005 List(of T) - Create A List To Hold More Than One Control Type Or Create A List For Each Control Type?

Jan 20, 2011

If I create a list for a TextBox:

[Code]....

I am able to only add controls that are of type TextBox. My question to you is, can I create a List to hold more than one control type or do I have to create a list for each control type?

View 8 Replies

Create A Program In VB That Let Me Know Who Is Using A Specific File?

May 21, 2009

I want to create a program in vb .net that let me know who is using a specific file? Because I often update an .exe file but if it's in use I can't overwrite it. So if I know who is using the .exe I can call him to tell him o close the app.

View 1 Replies

Create A Treeview Of A Specific Location?

Feb 8, 2011

I want to create a treeview of a specific location, lets say D: drive. I cant seem to find any examples of how to populate a treeview with this info...

Can you anyone recommend any links with extremely easy to follow instructions, or even if its a short code perhaps an example here to get me started?

View 3 Replies

Create Specific Number Of Buttons At Runtime In .net?

Mar 23, 2010

i want to create buttons at runtime using vb.net. In my form have 1 textbox and 1 button. at runtime when we input number in textbox than click ok, the button will create follow in textbox and this value it remeber when we run again the buttons will load follow the last number in textbox, when we input new number in textbox it compare small or big than last value. if big add. for location like this

1 2 3
4 5 6
7 8 9

View 1 Replies

How To Create And Save Thumbnail For Specific File

Jul 27, 2009

Is there anyway to save a thumbnail of an image, then save it so that, when viewed through My Computer, the thumbnail is displayed for the file. Basically, what I mean is to do something similar to the way you can see a preview of a pdf file, or Microsoft Word file, or Microsoft Expression Design file. I want to be able to open the file's containing folder, then switch to thumbnail view, and the thumbnail will be displayed as the image for the file.

View 5 Replies

Create In Specific Spot - Text Box In The Top Left Corner

Mar 4, 2012

I had this code

[Code]....

That creates a text box in the top left corner. Is there a way to tell were it will be made?

View 2 Replies

Function To Create Specific Amount Of Random Numbers

Apr 5, 2009

I am currently taking a introductory level class to vb.net. For the assignment it asks to create two functions. One function should create a random number within a given range. I have completed that part. What I am having trouble with is the second function. It wants the next function to use the previous function three times so that it displays 3 separate random numbers within a given range and display it in a D2 string format.

View 1 Replies

Possible To Create A TCP Listener That Does Not Need A Specific Number Of Connections Initialized?

Jan 30, 2009

I am totally new to socket connections, so I've pieced together code from the internet to try and start a TCP Listener object. [code] Is it possible to create a TCP listener that does not need a specific number of connections initialized? Can I just have it listen on an open port until data is received? I will be receiving a lot of data at once from many servers...

View 1 Replies

Create A Program For Parental Control That Block Specific Websites?

Jun 12, 2011

I have used VB6 years ago. Few days ago I just got started again with VB 2010. So I'm newbie again, Almost forgot everything. I want to create a program for parental control that block specific websites.

What I exactly want to do is The code should check the titles of the open windows and see if it is blocked one. If it is, it will close the browser with a message showing it's blocked. For example If I put "yahoo" to check and someone opens yahoo.com it should be terminated.What I have done so far is, I made DOS batch file that will terminate all the browsers that are open and set that ready to run when the title matches blocked site name/address.But I am stuck at how I can check the titles of the window that are open.

[Code]...

View 3 Replies

Create A User In A Specific Active Directory Group Using A Form?

Mar 19, 2012

I'm simply trying to create a small tool, to create a username / password / OU group, and a few properties on a new user from a form with a few text boxes, and a button.I know how to connect to LDAP, though i'm having a problem getting this done.

View 3 Replies

VS 2008 : Create A Specific Area To Drag Form (ie: Image, Label)?

Sep 13, 2009

how to create a specific area to drag my form (ie: image, label). I found some code that works, however you can click anywhere and have it drag...

Const WM_NCHITTEST As Integer = &H84
Const HTCLIENT As Integer = &H1
Const HTCAPTION As Integer = &H2

[code]....

View 4 Replies

Could Not Create Instance Of Type

Jun 5, 2011

I have created a UserControl Popup window and called that xaml file into another file. Imported the namespace.When I am trying to build this project an error at this below given code:

<Popup x:Name="POP" IsOpen="False" PlacementTarget="{Binding}" Placement="Center" AllowsTransparency="True">
<a:PopUpWindow x:Name="pp" />
</Popup>

Error at

<a:PopUpWindow x:Name="pp" />

Could not create an instance of type 'PopUpWindow'.

View 1 Replies

Create Our Own Primitive Type?

Oct 31, 2009

there anyway that we can create our own primitive type? let's say we call this

Code:dim test = 4 then test will automatically be an integer right but i wanted this

Code:dim test = 4% and i want test not to be an integer, but a percentage_integer, in other words, my own primitive type. is that possible?

View 4 Replies

Create Something 'OF' A Variable's Type?

Sep 17, 2009

I have some code like:

Lookup(Of String)("Testing")
Lookup(Of Integer)("Testing")

And both of those Lookups work great. What I'm trying to is call the appropriate LookUp based on the type of another variable. Something that would look like...

Lookup(Of GetType(MyStringVariable))("Testing")

I've tried to Google this but I'm having a hard time coming up with an appropriate search.

View 4 Replies

.net - Create A New System.String Type With Other Name?

Jun 23, 2011

I try to describe my problem step by step because I do not know how to say it in correct programming terms.

When I use a System.String type, I do the following:

Declare the type: Dim Str1 as String
Assign its value: Str1 = "This is a string"

I want to create a new type that just like the System.String type but in different name. For example, I want to create a UrlString type for string like this:

Declare the type: Dim Str2 as UrlString
Assign its value: Str2 = "http://www.example.com"

My question is: How do I create the UrlString type?

The reason: I want to create the UrlString type to help me to identify the value of the content. For example, UrlString type means the string is in url format, PhoneString means the string is in phone format, CreditCardString type means the string is in credit card format and so on.

Class UrlString
Private ReadOnly value As String
Public Sub New(ByVal value As String)

[Code].....

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved