Sequential Files - Displaying Winning Percentage Of Teams?
Jun 11, 2011
Suppose a sequential file contains the information shown below. I need to write a program to use the file and produce a new list where the teams are in descending order by the percentage of games won, and also displaying the winning percentage
Team Won Lost
Baltimore 69 93
Boston 96 66
New York 94 68
Tampa Bay 66 96
Toronto 83 79
View 2 Replies
ADVERTISEMENT
Mar 13, 2012
I have a datagrid displaying details from a sequential text file. I need to have a button to search through this textfile and display only that line of data in my datagrid. I am using an input box to enter the persons name they wish to search for. The datafile contains several lines of info like : John, Murphy, 35, etc.
[Code]...
View 1 Replies
May 27, 2009
Im working on a program that will display a price when an item number is entered in the search box. I have the information in a text file for the program to find it but am unable. I have successfully made it so the items show up in a list box and will show the price when clicked on, but cant get the other one to work.
Here is my code for searching from a search box:
Option Explicit On
Option Strict On
Public Class TryonServices
[code]....
View 5 Replies
Mar 5, 2012
I am getting data from an SQL Server database and displaying the data on a Windows form.How do I navigate through the data in a Sequential Order or Sort Order using the the REP_ID number? Example: When I use the navigation to move from one data to the other, can I go from; example: 100001 to 100002 and so on?
Finally is there any hint as to why I am getting the time with the dates? I know it is converted to text but not sure how to remove the time and just get the dates.Here is the entire project code:
Imports System.Data
Imports System.Data.SqlClient
Public Class frmBindingData[code]......
View 5 Replies
Feb 13, 2010
i am coding an application where I want to populate an array with the contents of a sequential file that is already populated as salary.txt in the debug folder. Basically, I want to copy the contents of that file to an array so that I may use a code to go with the intSubscript of the array. Right now it functions as just an array for this purpose, but I want to populate the array with the sequential file first. All attempts to do this, with stream writer etc and readline, I am just getting the first item in the file. I have tried to loop it and still only the first is accessable. Driving me batty, turning to the masses for guidence.[code]
View 1 Replies
Mar 2, 2010
I am suppose to create a module level array name Product and populate a list box with the contents of a file (ItemInfo.txt) The file contains the Item ID and price of the item. (Line 1 is an item, Line 2 is a price for Line 1, Line 3 is an item, Line 4 is a price for Line 3, and so on.) The problem i'm having is when i populated the list box, I only wanted to populate the list box with the items, not everyline from the file. I guess I wanted to put elements [0], [2], [4], [6], and [8] from the Product array in the list box, but I am putting everything in there. What am I missing?here is my code so far:
' Name: Glovers Project
' Purpose: Displays the price of an item
' Programmer: <Paul J. Williams> on <February 27, 2010>
[code]......
View 2 Replies
Oct 15, 2009
how do i create sequential files and use objects at the same time. can i get a program and its code if that's possible?
View 1 Replies
Jun 12, 2009
I am trying to copy the values to another sheet but not in any sequence eg.A1,B2,C4,D7 ........and so on. I am trying this slick way of doing it by the code below ( found on the web) without success so far but I got a feeling I am close to the solution. I am new to any kind of Programming. This is my first attempt. (so a chuckle or two is ok after seeing my "difficult" problem)
(This is an excel VBA Prblem)
Sub justdoit()
Dim s As Variant
[code].....
View 2 Replies
Aug 28, 2011
I'm trying to figure a way to select multiple files from a folder and rename them and also add a sequential number to the end.Example: Take img_001.jpg, img_002.jpg and rename them to picture1.jpg, picture2.jpg and so on. There is a maximum of 50 files in each folder..
View 4 Replies
May 20, 2011
does a big business in shirts, especially for groups and teams. They need a project that will calculate the price for individual orders, as well as a summary for all orders.The store employee will enter the orders in an order form that has text boxes for customer name and order number. To specify the shirts, use a text box for the quantity, radio buttons to select the size (small, medium, large, extra large, and XXL), and check boxes to specify a monogram and/or a pocket. Display the shirt price for the current order and the order total in labels.
Include buttons to add a shirt to an order, clear the current item, complete the order, and display the summary of all orders. Do not allow the summary to display if the current order is not complete. Also, disable the text boxes for customer name and order number after an order is started; enable them again when the user clicks on the button to begin a new order. Confirm the operation before clearing the current order.
When the user adds shirts to an order, validate the quantity, which must be greater than zero. If the entry does not pass the validation, do not perform any calculation but display a message box and allow the user to correct the value. Determine the price of the shirts from the radio buttons and check boxes for the monogram and pockets. Multiply the quantity by the price to determine the extended price, and add to the order total and summary total
The assignment also requires a pop up message "Daily Summary" with total shirts sold, total sales, and average sale per customer.So far I have this as my code but I am not sure what needs to change in order to display the correct total shirts- mine only displays the last accepted shirt order.
[Code]...
View 1 Replies
Feb 24, 2009
I'm trying to make a database program in VB 2008 and have come across a problem with a query that I'm not sure how to solve. I have a combo box which contains names of teams that are held within the database, when a team name is selected I have 4 queries that will separate players (in that team) by their position, using this information I will then be able to display information about the players in a collection objects so that it can be edited and what not.
My problem is that I need to be able to refer to the records in the query so that I can assign a players details to objects on the form, I've used a piece of code to do so that I used previously to select individual records from a table, however when I click on a team in the combo box it throws up the error: "Could not format node 'ClientQuery' for execution as SQL.". Not being a particularly experienced VB programmer this error doesn't exactly mean too much to me, although I am not exactly sure of another way to tackle the problem.
The code for this query is:
Dim GK(3, 2) As String
Dim c As Integer = 0
For Each Record In GoalkeeperQuery
[CODE]...
All the fields in the query are strings. If this is not enough information I can post the query I used to select the records in the query used above or anything else that's related.
View 12 Replies
Apr 2, 2009
I wrote a program that allow two classes to "fight". For whatever reason C# always wins. What's wrong with VB.NET ?[code]...
View 4 Replies
Jun 23, 2012
I am coding myself a Visual Basic.Net 2005 Slot Machine program. I've been hard at work on this for about a week and half now. From what I have with it it works and all. However there are so many annoying errors with the program.
LIST: - I am not winning when I should be. My winning conditions is set when you get 3 of the same picture you are to be awarded with some credits. It works but sometimes when it does land on 3 of the same pictures it still says that I've lost. This is the main problem and I am about to pull my hair out about this - The image with the lowest value is showing up the least and the picture with the most value is showing up more frequent? I don't want to change them around to fix that.
[Code]...
View 6 Replies
Mar 8, 2012
The application I want to make is what I would call quite simple, you will have two text boxes where you enter in two team names.
i.e.
Team 1 v Team 2
Then below a little search button. And then when you click the button it will show a percentage of whom is most likely to win. Now I know that I would have to most likely enter something like
Team 1 v Team 2 WIN Team 1
Team 1 v Team 3 LOSS Team 1
Team 1 v Team 4 WIN Team 1
In some kind of script for this to work so when you search for
TEAM 1 v Team 2 it will show WIN Team 1
View 2 Replies
Feb 7, 2012
I've been pulling my hair for three days trying to figure out what has gone wrong in what little code I have in my first attempt at both the minimax algorithm, and recursive calls in general (I'm relatively new to programming). Basically, I have everything working in the application except for the thing I wanted to actually learn and work on in it: The minimax algorithm. Basically, whenever a player makes a move, the computer will do one of two things:
If there is a winning move right next to it, it will use that move. Easy as pie.
However, if this move isn't in direct sight, it will pick whatever move lets the player win. The exact opposite of what it should be doing. I know it's not coming from:
[Code]....
View 2 Replies
Oct 14, 2009
I want to be able to display a file in windows explorer. I have been able to open the parent folder, but I would like to have a specific file selected in explorer. What VB .Net Code would I use to do this?
View 3 Replies
Aug 14, 2011
i have a problem on displaying the files inside a listbox i cant see files like .wav or .mp3 or .wmv or any video or movie related files...
on my forms load this is the code
Private Sub Subjects_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label4.Text = System.IO.Path.GetFullPath(Application.StartupPath & "....
[Code].....
View 10 Replies
Mar 13, 2009
I have a ListView capable of displaying files in all available views (Large Icon, Small Icon, Tile, List, Details). Now I am wondering how to properly use the SmallImagelist and LargeImagelist for the small and large icons...the ListView is actually a modified listview (inheriting from ListView), using a modified ListViewItemCollection.In this custom ListViewItemCollection I use the Add override function to add a few details to my ListViewItem:
vb.net Public Overrides Function Add(ByVal value As System.Windows.Forms.ListViewItem) As System.Windows.Forms.ListViewItem
Dim file As clsTexture = TryCast(value, clsTexture)
If file IsNot Nothing Then
[Code]...
I realize it is a pretty complex post to read and will probably not get very many answers, but I really want to make the most of my Listviews...Of course, one work around is to just always use the LargeIcon which then gets scaled down automatically when the SmallImagelist is used but I am pretty sure there are icons that are very different in Large or Small view...
View 3 Replies
Oct 27, 2011
Out of Memory displaying Thumbnails in Windows 7 64-Bit with 12GB installed
See more: .NET4
'My VB Code:
Private Sub Thumb()
[code]...
View 3 Replies
Nov 15, 2011
This idea of mine is basically more of an experiment ive wanted to play around with so here are some features im after.Firstly some of the conditions i would like to have are to give me total amount of combinations possible for a 1-45 number game. I would like to have some input in this app in regards to possibly entering previous lotto winning combinations and the app to remember what i've previously entered and to eliminate them from total overall combinations left as well update odds at the same time.another condition i would like would be to be able to retrieve a list of all combinations of a required sum i.e a required sum being all 6 numbers added up together, also to be able to remember odds and combinations left To be able to eliminate all even or all odd combinations or even say 5 even or 5 odd combinations basically a filter with these sorts of conditions and of course to update odds and combinations left meanwhile retaining all other possible, or id like to possibly be able to apply filter after filter where i feel the need too i also have a few more conditions id like to have though see what happens if some people can help me out or not guess i might discuss the other conditions id like.
View 5 Replies
Oct 13, 2009
My teacher as asked me to allow a user to input three pieces of information about a DVD (the ID, the title and the running time) and for the program to add that data to a sequential file. My textbook fails to explain it and I am at a loss as to where my book from last semester is located at the moment.
1. What is a sequential file?
2. How do I display information from it into a messge box?
View 3 Replies
May 23, 2010
I am trying to get a percentage that just does not seem to work.I am using WMI to get the Total Physical memory of my system and then the Free Physical Memory. Then get the percentage.
2147483648 - Total Memory
838028 - Free memory
According to Task Manager my physical memory is 59%. This is the code I am using but I can not get 59% or 41% that is free.
temp = FM/TM
temp = temp * 100
percent = FM * temp
View 5 Replies
Feb 23, 2009
How can I round a percentage off to the nearest whole number? [code]
View 5 Replies
May 6, 2009
First... does the array subscript have to be sequential? (0,1,2,3,4) Or could I pull the system date and use that? i.e. dim Beer() could have Beer(33939) for today, and then not record anything for three weeks and the next entry would be Beer(33960), etc.Along the same lines, and pointless if the answer above is yes...I'm writing a prog to handle inventory for a bar. The bar has 230 different beers at the moment. Could I create a 2-dimensional array using a product number, date for the subscript?
i.e. - for received data... recBeer(a,b)recBeer(229,33939) = 48(Meaning 48 bottles of beer #229 arrived on date 33939)SO... a is the product, b is the date. Any searches for (229,*) would provide me with the complete history of that product being received. any searches for (*,33939) would tell me all of what was received on that date.Will that work?(And yes, I'm stuck with a flat file to make this work. Much rather have a db involved.)
View 1 Replies
Jul 9, 2009
I have a working piece of code that checks that 4 out of 5 random numbers are in sequence. The numbers correspond to 5 dice rolls. I'm trying to learn VB and I think the code can be improved since it's so cumbersome. The sub checks to see if any of the numbers are duplicated and reassigns one of the duplicates to an arbitrary "11" which is outside of the 1-6 range of a single dice roll. Then the values are inserted in an array and sorted and the sequence check takes place. score of 30 is assigned if 4 of 5 of the (sorted) numbers are in order. If not in order, a score of 0 is set.
Code follows:
Private Sub OtherScores4()
'Check if any of the rolls are duplicated and reset one of the die to arbitrary "11".
If Dice1 = Dice2 Then
Dice1 = 11
End If
If Dice1 = Dice3 Then
Dice1 = 11
[Code] .....
View 3 Replies
Jun 16, 2009
My project uses an MS Access Database, and amongst other things records the current cost of a series of categories which are regularly updated, thereby erasing the previous entry. However, I need to retain all previous costs to produce a history graph for given periods. I have considered importing an Excel spreadsheet, but having a functioning database it seems sensible to use it.
View 4 Replies
Apr 27, 2012
I am working on a program in Visual Basic that incorporates using a sequential access file for a ballot type program. Each type the user clicks the save vote button, the amount of votes gets stored.
What I am trying to do is in my access file is to display the number of votes as an actual number. The way my program is written right now, the name of the candidate appears as many times as the vote was saved.
for example, if perez was voted for 4 times, in the access file perez is displayed on 4 different lines. How do I display the actual number of how many time they were voted for. I'm thinking using a counter variable, but not really sure how to really implement it in. this is what i have so far.
[code...]
View 1 Replies
Nov 14, 2010
I am making an application that requires a sequential search to search the arrays. The search searches the user's input in the array,and if found, then it's valid, else it's invalid. I have initialized the array and done the sequential search, but apparently even the wrong input is coming out to be valid.
'initialize an array
Dim intChargeAccounts() As Integer = {5658845, 4520125, 7895122, 8777541, 8451277, 1302850, 8080152, 4562555, 5552012,
5050552, 7825877, 1250255, 1005231, 6545231, 3852085, 7576651, 7881200, 4581002}
[code]....
View 8 Replies
Apr 21, 2010
How i would generate sequential number in vb.net.[code]...
View 18 Replies
Jan 5, 2010
Is there a better way to parse percentage to double like this?
Dim Buffer As String = "50.00%"
Dim Value As Double = Double.Parse(Buffer.Replace("%",""), NumberStyles.Any, CultureInfo.InvariantCulture) / 100
View 4 Replies