Making A Tetravex Solving Program In Order To Practice My Code Writing Skills?

Feb 8, 2010

Well, i was thinking of making a Tetravex solving program in order to practice my code writing skills (language will propably be Visual Basic) and I need help finding an algorithm for solving it. For those that don't know what tetravex is see this http:[url]... . The only algorithm I can come up with is the brute force way, place a tile randomly in one corner and try every possible tile next to it and continue the same process, if it reaches a dead end revert to a previous state and place a different tile.

View 4 Replies


ADVERTISEMENT

VS 2010 - VB Training - Practice Exercises To Develop Skills

Mar 14, 2011

Can anyone suggest a book or a direction for some training other than bombarding you guys with posts all the time? I'd like something geared more for teaching than for just reference. Books really aren't cheap and I'd like to just buy one if possible. Free website tips and training would be nice too. I've built a calculator for fun and my project will be more database oriented but I'd like to build more form applications.

View 3 Replies

.net - Best Practice On IF/ELSE Statement Order?

Aug 20, 2009

Which is a better practice? (I'm coding in .Net if that makes a difference)

IF condition = true THEN
...true action--even if rare...
ELSE

[code].....

View 10 Replies

VB Express - Making A Program That Can Take A Text File Filled With Code?

Aug 21, 2009

okay so i was thinking of making a program that can take a text file filled with code so the text file would look like this

Title{Text = blah blah; text = blah blah; Title2{Text = blah blah blah; text = blah blah blah;} }

and have the program display

Title
Text = blah blah
text = blah blah
Title2

[code]...

View 3 Replies

Where Is Latest Link For Best Practice Of Inserting Code For Forums

Nov 1, 2010

be on topic but seems the best place to post since most code examples from users are included into their posts within this forum.Where is latest link for best practice of inserting code for Forums?here was an article and possible a plug-in or executable code regarding the issue of users posting code, (mainly mangled or unmanageable code) within the question body, I can't find the article and was hoping it was still available. I have seen some posts where the inserted code maintained the indention,

View 2 Replies

Using 'magic Numbers' In Code Is Not Good Practice And Makes Maintenance Difficult

Feb 26, 2012

"First of all please TURN OPTION STRICT ON.I make no apology for the capitals - I consider it that important.When you do you will see that you are still using HorizontalAlignment instead of ContentAlignment.VB is converting from one to the other for you.Although that works fine here there are many cases when it will not be what you intended and can cause some very hard to find bugs.Under Tools | Options | Projects and Solutions | VB Defaults Set: Option Strict ON, Option Explicit ON, Option Infer OFF".I did do this but it showed no errors, so I placed 'Option Strict On' at the start of the code, it then showed HorizontalAlignment with the squiggly line. I did edit my code to show this but I think you must have read it before I did. All other suggestions I will note and from now try to implement.Using "magic numbers" in the code is not good practice and makes maintenance difficult.Declare all such numbers at the top and use the names in the code.Is this what you mean? Const SpinTime As Integer = 500

Now when ever I refer in code to SpinTime it will always be 500..Change the NumberOfBoxes to 10 and run the app.In mine, to change boxes to 10 I needed to alter the code in 5 places, in yours 1 place! Talk about proof of the pudding etc.Now to my question, in the program when the start button is clicked and the five random numbers are displayed I have to stop and restart the program to generate five more. So I thought I would create another button 'Reset' this I did and all worked but it seemed a waste so I then just kept the start button in place and changed the text to Reset eg [code] This is fine the one thing I can't figure is how to replace the five numbers that were removed so that it is picking 5 from 500 every time. Now I'm at the end of all this writing I have it! just comment out the line 'Numbers.Remove(Number).

View 1 Replies

DataSet.WriteXml Not Writing Rows In Correct Order?

Mar 12, 2009

I have an XML file that is being updated via ASP.NET. The user should be able to add new nodes to the XML file AT ANY LOCATION in the node tree.

The XML file is read into a DataSet using DataSet.ReadXml(filename).

A new row is added to the appropriate DataTable, using InsertAt(row, index).

I have confirmed using a DataGrid, and using a loop (For Each dRow in Table, Response.Write..) that the new Row was inserted into the table at the correct spot (in my example code, the 3rd position).

However, The WriteXml() method is writing the node to the END of the XML tree! I can't get it to see the tree with the node in the correct location.

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim sXML_Lesson As String = "test.xml"

[Code]......

View 2 Replies

Making Array Display In Ascending Order

Dec 12, 2011

so this code works for making my array display in ascending order but i cant figure out how to make it work in descending order

[Code]...

View 3 Replies

Making A Button Perform Multiple Tasks In Order With Space In Between?

Dec 27, 2009

Like, I want a button to start five different timers, but at 1.5 second intervals. How could I make this button start timer1, wait 1.5 seconds, start timer2, wait 1.5 seconds, start timer 3, etc, etc?

View 2 Replies

Making A Printable Purchase Order Form Using Crystal Report?

Jun 9, 2011

I'm making a printable Purchase Order form using Crystal Report. This report retrieves data from two tables. Example, I have fields PONumber,DateofPO,Airline,DateofFlight,ETA,ETD from a table called tblFlight. I have fields PassengerName and Rate on another table called tblPassenger. Each PONumber can have multiple passengers. How can I get it so that I'll just be generating one PO that shows the multiple passengers while the rest of the items show only once? I've placed the PONumber and DateofPO on the PageHeader and the rest of the items on the Details section. But right now, on the Details section, if I have 3 passengers, the other fields also show 3 times on the report. Also, I'm considering to make a query but I have a conditional statement on my query, a WHERE clause that retrieves data dynamically. My problem is I'm not sure where to put the query, will it be on the .rpt or just on the Form? NOTE: I'm coding my SQL queries on the application itself, not inside the server, so no stored procedures/functions for me here.

View 1 Replies

Asp.net - Solving The Of SQLinjection?

May 18, 2011

For my login control I'm using parameters in an SQL statement. Trouble is if people use SQLinjection, I'm afraid they'll be able to get in too. I have two textboxes and the values are passed on to an SQL statement, this checks whether the values are found in the DB.

Is there a way to make sure this isn't possible? I know in PHP you need to use something infront of the textboxes.

View 5 Replies

C# - Will Learning WPF Improve Skills In ASP

Dec 2, 2010

I have worked in Windows Forms for years, and still do. I'm not acquainted at all with the ASP.NET technology and no other Web related technology. I have worked with:

Oracle Form Builder;
Visual dBase 7.5;
Delphi 2.0, 3.0 and 7.0;
Sybase Power Builder 10.5;
Visual Basic 6;
Visual Basic 2003/2005/2008;
And ultimately, Visual C# 2005/2008.

I'm mostly a C# programmer with a growing experience in VB.NET for the current year. What would be the way to go to learn WPF the best possible way while taking into account my experience? And I'd like to know, will learning WPF improve my skills in ASP.NET and the like?

View 4 Replies

Skills Checklist For Students?

Oct 24, 2009

For the assignment that I'm doing, there's certain skills I must demonstrate in my assignment. There are some standard ones, and some optional ones. The more optional ones I have, the better chance I have at achieving an A.Problem is, some of the things on the list are a bit wierd, and after Googling them, I still have no idea what they are. I will list them, if you could perhaps tell me what they are and how they work anInput Mask (Actually, I know what this is - when people input information, it's a method that inserts in the information in the correct frormat (eg. dd/mm/yyyy) but how do you do use this in Visual Basic?Use of procedures or modules

Optional
Validation rule andappropriate validation text message
Validating data input entry (eg data type, appropriate value, required)

[code].....

View 19 Replies

Display An Equation Prior To Solving It?

Jul 19, 2011

I want to display an equation prior to solving it. Obviously in MS word etc I can use equation editor to write an equation, but I'm writing my own program.

Is there an easy way to display an equation. Obviously I could use text to write eg as text "a=b^2-3(c-d)/5" and everyone here would have little problem interpretting what I want but I want this to be accessible to 12 year old children.

Alternatively I could try and manipulate lots of text boxes one on top of the other to try and explain what I'm doing

The third alternative I thought of was to write in equation editor export the graphic and then import a graphic.

I'm sure I must be trying to reinvent the wheel - which I believe is the one thing OE programming is supposed to avoid.

View 1 Replies

Embedding Exe: Solving The WaitForInputIdle Exception

Jan 29, 2009

Embedding exe's in a form, into a Panel, for example, is fine, for such apps as notepad.exe, calc.exe, etc, but NOT for cmd.exe which throws an exception, because it is not a UI. This code demonstrates: Form with one button and one panel:

[Code]...

View 7 Replies

Priority Skills For A Newbie VB Student To Plan Training For?

Nov 2, 2009

I'm planning my road in VB training on my own at home using various books and online resources, like MSDN and book publisher support sites, etc. My initial goal is to become familiar w/the VB 2008 language but then to build upon that w/other skills like perhaps, ASP. Net, ADO .Net and so on. Maybe concentrate on WPF/XAML? My question is, where do I go next after initially learning the VB 2008 language? Not only that, what should my learning "list" look like, assuming it a good idea to "add" to the lot w/other VB skills? What's a "real world" learning plan look like in VB? Which should I consider to be "priority" core VB skills to learn after initially learning the VB language?What is a realistic VB skill portfolio look like?

View 7 Replies

Randomizing Program - Making A Program Which Generates A Random Number Between 1 And 10

Oct 20, 2011

I am making a program which generates a random number between 1 and 10 and when 7 appears it is suppose to tell you how many tries it took to get the number 7 and then end the application. This is the code I have used:

CODE:

This code only generates the number 7 and exits the application, each time i click the random button but i want it to show the other number it randomizes too for example 1 2 3 4 .. etc, if u dont understand, please try it, but im trying to say, when i clikc random it just says number 7 (does randomizing in background) and tells you how much tries it took but i want it to show the other number it randomized also and when 7 appears, then exit the program

View 2 Replies

How Do Publish A Vb Express 2008 Program With "terms Of Use" Clause The User Must Agree To In Order To Install The Program?

May 26, 2009

I have a program in vb express 2008 which I would like to publish in a little more professional manner than provided in the standard vb express package. I would at least like to include a "Terms of Use" document the user must agree to before installing the program. I have dovnloaded and installed web developer, c# and vs 2008. Do any of these include a professional installer? If not are there any free installer packages available? I am 72 and live on a limited budget so I cannot aford an expensive package for one program.

View 3 Replies

C# - Eliminate These Order Dependencies From Code?

Sep 23, 2009

In ASP.Net Web Forms there are cases that I've come across that create order dependent code. As an obvious code smell I'm looking for solutions to solve this problem.

A pseudo-code example would be: Calling Code :: Page.aspx

protected void Page_Load(...) {
var control = LoadControl("ControlX.ascx");
// Ugly since the control's constructor is not used by LoadControl
control.SetDependencies(...);

[Code]...

LoadControl has two signatures, the one used above accepts a string for the control classes physical location and correctly creates the child controls. Whereas the second signature accepts the control class as a class type, and any parameters for the constructor, however the child controls are not created as detailed in TRULY Understanding Dynamic Controls.

So how can I eliminate this order dependency in the cleanest way? My first thought is that if I dynamically created the child controls in ControlX, but then that can be cumbersome for larger controls.

View 1 Replies

Code For Ascending Order In Vb 2010

Mar 29, 2012

I am currently trying to work out the code for ascending order in vb 2010. I have 12 textboxes with values in that i want to use to sort into ascending order but what ive tried so far isnt working.

View 5 Replies

VS 2008 Code Not Executing In Right Order?

May 13, 2009

i seem to be having issues with my simple count down project. The count down work how I want it, there is also a pic of a rocket that move up when the count down button (Button4 - the form was set up in class as a quick example, so there was no need to name the buttons) is pressed. The problem is that the count down "10....1...Blast Off" shows after the rocket has moved up, I want the countdown text to show, then the rocket to move.The countdown is outputted to a ListBox.Here is my code thus far: (I have re-worked is a bit, starting to look messy)

[Code]...

I am not sure if I should be doing it as a function, that was just one of my attempts to get it to output everything in the right order.

View 8 Replies

What Is The Code In Order To Have The Same Function As E.cancel

Sep 21, 2011

i want to do this:when user click save button, the form must be check first..if user did not insert the required data, user are not allow to save form..

the code:

Private Sub AssetMasterBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AssetMasterBindingNavigatorSaveItem.Click
'if group code is null, user are not allow save...

[code]....

what is the code in order to have the same function as e.cancel?e.cancel is used in formclosing event. which is to stop the form from closing

dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf'
dp.SyntaxHighlighter.HighlightAll('643bb21f2cc945e88ed0d584c122bc17')

View 3 Replies

Writing Sql Code In .net?

May 20, 2009

I have information entered into a text box on an ASP.net 3.5 page. when i click the submit button i would like this information written to a sql server database. what I need to do to accomplish this. The end-user should not see anything.

I am using visual web developer 2008. the event handling code is placed in a separate file using vb.

View 5 Replies

IDE :: Format Order Of Controls Instantiated By Code During Run Time

Feb 3, 2009

I am working on an application that requires buttons and links to be added during run time, it's a bit like a flow chart. The buttons are used to display information similar to a multi line text box, but I also use the click, double click and mouse events for these buttons. The links are drawn as label controls. My problem is that I want to control the format order of these controls with the buttons always being on the top layer and the labels one layer back so that when labels are added they aways pass behind the buttons. If this was done at design time it is very easy to use the menu Format > Order to get overlapping controls displayed the way I want. But, the controls placed on the form at run time do not have a Format or Order property.

View 1 Replies

VB 2010 Express- Changing Tab Order Of A Control In Code?

Nov 30, 2011

I'm trying to make a game with a friend. We have 4 sprites (pictureboxes)and we're trying to make them change tab order based on a value assigned to their variable.

View 9 Replies

Writing Code For Currency?

Jul 2, 2009

I am trying to write a code to set a service charge for a checking account to calculate by adding $4.50 to a value computed by using the following specifications: $0.14 per check if less than 10 checks were used, $0.13 per check if less than 25 checks were used, $0.10 per check if less than 50 checks were used, and $0.08 per check if more than 50 checks were used. How do I write $ in a code?

Here is the code I wrote:

Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If Val(TextBox1.Text) < 10 Then

[code]....

View 7 Replies

2008 - Order Form Code Get MR/IR/999 - Stuck And Won`t Get Increase The Number

Apr 16, 2011

I`m make program for order form, I use order form code with name MR/IR/001, when I start Program It`s fine but when the order form code get MR/IR/999, It`s Stuck and won`t get increase the number, I want it the order form code go to MR/IR/1000, MR/IR/1001, MR/IR/1002 until 5000 how to get code work,

THIS THE CODE USING VB 2008 and database using MS access 2007

Dim strTemp As String = ""
Dim strValue As String = ""
Dim sql As String

[CODE]...

View 6 Replies

Write A Code That Will Let Me Input 2 Alphabets And They Will Output In Alphabetical Order?

Sep 4, 2009

I am writing a program which was pretty easier until I got to a certain part. I need to write a code that will let me input 2 alphabets and they will output in alphabetical order

Ex:
Please Enter alphabet 1: b
Please Enter alphabet 2: a

[code]....

View 3 Replies

Store Order Status Strings In Program?

Nov 23, 2009

Store order status strings in program?How will this be in VB?[code]...

View 5 Replies

Getting A Code For Reading And Writing To Files?

Jul 18, 2012

I have been given the task of basically reading and writing to and from files. Below is the code from one sub:

If btnSaveRecipe.Enabled = True Then
FileName = "C:UsersLeylaDocumentsRecipe TaskRecipe.txt"
FileWriter = New IO.StreamWriter(FileName)

[code]....

I can't work out what i've done wrong, but when I open the file itself in the folder, it is empty.

View 1 Replies







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