Search Results

Search found 2672 results on 107 pages for 'michael cereda'.

Page 86/107 | < Previous Page | 82 83 84 85 86 87 88 89 90 91 92 93  | Next Page >

  • VB.NET Button Issue

    - by Michael
    I am having problem with a button the code of my button is. Private Sub btnCalculateCosts_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculateCosts.Click it handles: ' This Calculate Costs button click event handler edits the ' registration(costs) form to ensure it contains valid data. ' Then, after passing control to the business class, it ' displays the registration cost. Dim objCourse As Course Dim objCourseCostsFile As Course Dim InputError As Boolean = False ' Is student ID entered properly If Me.txtCorporateID.MaskFull = False Then MessageBox.Show("Enter your Corporate ID in the Corporate ID box", _ "Error") Me.txtCorporateID.Clear() Me.txtCorporateID.Focus() InputError = True ' Is student name entered properly ElseIf Me.txtFirstName.TextLength < 1 Or _ Me.txtFirstName.Text < "A" Then MessageBox.Show("Please enter your first name in the First Name box", "Error") Me.txtFirstName.Clear() Me.txtFirstName.Focus() InputError = True ' Is number of units entered properly ElseIf Me.txtLastName.TextLength < 1 Or _ Me.txtLastName.Text < "A" Then MessageBox.Show("Please enter your last name in the Last Name box", "Error") Me.txtLastName.Clear() Me.txtLastName.Focus() InputError = True ' Is number of units entered properly ElseIf Not IsNumeric(Me.txtNumberOfDays.Text) Then MessageBox.Show("Enter the units in the Number of Units box", _ "Error") Me.txtNumberOfDays.Clear() Me.txtNumberOfDays.Focus() InputError = True ' Has 1-4 units been entered ElseIf Convert.ToInt32(Me.txtNumberOfDays.Text) < 1 _ Or Convert.ToInt32(Me.txtNumberOfDays.Text) > 4 Then MessageBox.Show("Units must be 1 - 4", "Error") Me.txtNumberOfDays.Clear() Me.txtNumberOfDays.Focus() InputError = True End If ' If no input error, process the registration costs If Not InputError Then If Me.radPreConferenceCourse.Checked = False Then objCourse = New Course(txtCorporateID.Text, txtFirstName.Text, txtLastName.Text, txtNumberOfDays.Text) Me.lblCosts.Visible = True Me.lblCosts.Text = "Total Conference Costs Are: " _ & (objCourse.ComputeCosts()).ToString("C2") Else objCourse = New Course(txtCorporateID.Text, txtFirstName.Text, txtLastName.Text, txtNumberOfDays.Text, g) Me.lblCosts.Visible = True Me.lblCosts.Text = "Total Conference Costs Are: " _ & (objCourse.ComputeCosts()).ToString("C2") Receiving the error: Handles clause requrieres a WithEvents variable defined in the containing type or one of its base types.

    Read the article

  • Need recommendation for object serialization library in c++

    - by michael
    Hi, I am looking for recommendation for object serialization/deserialization library in c++? Which one are the most advanced and open-sourced? Can it handle Any class that users defined? Object hierarchy (parent and child classes)? A Tree of objects? Class A has an attribute of Class B which has an attribute of Class C? STL containers? Class A has a vector of Class B? A cyclic of objects? Class A has a pointer pointing to B which has a pointer to A? I find boost serialization library. I am not sure what is its limitation from http://www.boost.org/doc/libs/1_42_0/libs/serialization/doc/tutorial.html

    Read the article

  • Question about array subscripting in C#

    - by Michael J
    Back in the old days of C, one could use array subscripting to address storage in very useful ways. For example, one could declare an array as such. This array represents an EEPROM image with 8 bit words. BYTE eepromImage[1024] = { ... }; And later refer to that array as if it were really multi-dimensional storage BYTE mpuImage[2][512] = eepromImage; I'm sure I have the syntax wrong, but I hope you get the idea. Anyway, this projected a two dimension image of what is really single dimensional storage. The two dimensional projection represents the EEPROM image when loaded into the memory of an MPU with 16 bit words. In C one could reference the storage multi-dimensionaly and change values and the changed values would show up in the real (single dimension) storage almost as if by magic. Is it possible to do this same thing using C#? Our current solution uses multiple arrays and event handlers to keep things synchronized. This kind of works but it is additional complexity that we would like to avoid if there is a better way.

    Read the article

  • Geographic obstructions in radius searches

    - by Michael Papile
    Suppose I have an application a search for all gas stations within 10 mile radius of a certain location. However one side of this location is surrounded by a mountain range that you have to drive 50 miles to get around. You would not want to return results from the other side of the mountain. What are some good algorithms/techniques to deal with such a problem? I know with point to point searches you can use path costs but I am not sure what the technique is with radius searches.

    Read the article

  • Is `super` local variable?

    - by Michael
    // A : Parent @implementation A -(id) init { // change self here then return it } @end A A *a = [[A alloc] init]; a. Just wondering, if self is a local variable or global? If it's local then what is the point of self = [super init] in init? I can successfully define some local variable and use like this, why would I need to assign it to self. -(id) init { id tmp = [super init]; if(tmp != nil) { //do stuff } return tmp; } b. If [super init] returns some other object instance and I have to overwrite self then I will not be able to access A's methods any more, since it will be completely new object? Am I right? c. super and self pointing to the same memory and the major difference between them is method lookup order. Am I right? sorry, don't have Mac to try, learning theory as for now...

    Read the article

  • Deselecting an element in jQuery

    - by Michael Itzoe
    I have a collection of span elements. In the code I have a global variable that represents the "selected" object. Using the click event when a span is clicked I reset the object's class, reset the global variable, then set the object to the variable and change its class (to make it "highlighted"). This effectively toggles selection when clicking an object. var currentItem = null; $( ".item" ).click( function() { if( $( this ).hasClass( "selected" ) ) { $( this ).removeClass( "selected" ) currentItem = null; } else { if( $( ".item" ).hasClass( "selected" ) ){ $( ".item" ).removeClass( "selected" ) } $( this ).addClass( "selected" ); currentItem = $( this ); } } ); What I'd like to be able to do is unselect when clicking on an empty area of the page. I tried creating a click event on the body object, but that overrode the span click event so nothing was selected. I'm a complete jQuery noob and not sure where to go with this.

    Read the article

  • In an array of buttons, how can you tell which button was clicked?

    - by Michael Seltenreich
    If I have an array of buttons, how can I tell which button was clicked? example below var i=0 CreateButton = new function () { savebutton[i]=NewButton() i++ } every time a user runs the function a new button is generated. the first button is savebutton[0] the second is savebutton[1] and so on potentially infinity times. when later the user presses the button I want the screen to alert it's index number (or 'i'). is there any way to make this work in arrays?

    Read the article

  • Firefox DOMParser problem

    - by Michael
    For some reason DOMParser is adding some additional #text elements for each newline \n for this url http://rt.com/Root.rss ...as well as many other RSS I've tried. I checked cnn/bbc feeds, they don't have newlines and dom parser handling them nicely. So I have to add the following before parsing it var xmlText = htmlText.replace(/\n[ ]*/g, ""); var xmlDoc = parser.parseFromString(xmlText, "text/xml"); Server is returning text/xml. var channel = xmlDoc.documentElement.childNodes[0]; this returning \n without my code above and channel with correction.

    Read the article

  • MSBuild imported script directory

    - by Michael K.
    In Visual Studio 2010 we have MSBuild for C++ project. Also we can add additional custom properties files "*.props" to projects, which are just MSBuild scripts. Is it possible in imported "some.props" file know its directory? for example there is "project.vcxproj" file and "common.props" file. I would like to write something: <IncludeDir>$( [and something for common.props file directory here] )\include</IncludeDir> What should I write there?

    Read the article

  • Reading data from a MySQL database into a HTML Table?

    - by Michael McKay
    So i am working on a project and need some advice. I have a MySQL database that stores events, i know how to code this functionality in PHP but im just stuck of a few specifics. As the project that I am creating is a timetable, the most important attributes are the day of the event, starting time and finishing time. Once i have read this data from the MYSQL database using my PHP script, how do i go about inserting these events in to a html timetable? Lets say i have record like below in my events table: Event ID = 01 Event Day = Monday Event Start = 12:00 Event End = 14:00 How would I then put that into a html table, bearing in mind that i may have mutiple events for a day?

    Read the article

  • Looking for a good C++/.net book

    - by Michael Minerva
    I have recently started to feel that I need to greatly improve my C++ skills especially in the realm of .net. I graduated from a good four year university with a degree in computer science about 9 months ago and I have since been doing full time contract work for a small software company in my local area. Most of my work has been done using Java/lisp/cocoa/XML and before that most of my programming in my senior year was in java/C#. I did a decent amount of C++ in my Sophomore year and in my free time before that but I feel that my general knowledge of C++/.net is very lacking for the opportunities that are now coming my way. Can anyone recommend a good book that could help me get up too speed? I feel I do not need a very basic introduction to C++ but something that covers the fundamentals of .net would be good for me. So basically what I need is a book or books that would be good for a .net novice and a C++ developer who is just beyond novice. Also, a book that would help bein an interview by giving me a conversional understanding of C++ would be great. Thanks a lot!.

    Read the article

  • Are multiple asserts bad in a unit test? Even if chaining?

    - by Michael Haren
    Is there anything wrong with checking so many things in this unit test?: ActualModel = ActualResult.AssertViewRendered() // check 1 .ForView("Index") // check 2 .WithViewData<List<Page>>(); // check 3 CollectionAssert.AreEqual(Expected, ActualModel); // check 4 The primary goals of this test are to verify the right view is returned (check 2) and it contains the right data (check 4). Would I gain anything by splitting this into multiple tests? I'm all about doing things right, but I'm not going to split things up if it doesn't have practical value. I'm pretty new to unit testing, so be gentle.

    Read the article

  • PHP and MySQL - Printing rows matching a column value

    - by Michael
    Hello, I need to write a PHP script that will print out results from a MySQL database. For example, say I have 9 fields. Field 1 is an auto increasing number, field two is a three digit number. I need to be able to have a script read, find the matching number (it'll be from a POST), and then display all matching three digit results, and the 7 other fields as well. I am already logged in to the database in this script. I guess I'm really at a loss of where to begin. How would one start something like this? Thank you.

    Read the article

  • Does a syntax for this exist? In any language?

    - by Michael
    It seems pretty common to me to have an argument, in a dynamically typed language that is either an Object or a key to lookup that object. For instance when I'm working with a database I might have a method getMyRelatedStuff(person) All I really need to lookup the related stuff is the id of the person so my method could look like this in python: def getMyRelatedStuff(person_or_id): id = person_or_id.id if isinstance(person,User) else person_or_id #do some lookup Or going the other direction: def someFileStuff(file_or_name): file = file_or_name if hasattr(file,'write') else open(file_or_name)

    Read the article

  • Difference between two UIScrollView delegates

    - by Michael
    scrollViewDidEndScrollingAnimation and scrollViewDidEndDecelerating Looks like the last one is called when the bouncing effect is finished. But can't really understand what's the difference between first because they are called same time(well, decelerating called first).

    Read the article

  • Oauth2 External Browser Request - App Launches, Credentials received, Browser Not Updated

    - by Michael Drozdowski
    I'm using an external browser request to authenticate myself with the SoundCloudAPI in OSX. My app launches, and has a button that opens an external browser window to authenticate against SoundCloud. When I click "connect" in the new window, I get a "External Protocol Request" that is consistent with my custom launch URI scheme. Clicking this loads the app, and it gets the correct credentials. The trouble is, the browser window never changes - it simply says that it's connecting forever. There is no "connection confirmed" alert coming from SoundCloud. I know I'm logged in because I can make the correct calls to the API to get things such as my username. Why isn't the browser confirming the connection or dismissing? The same thing happens if I load the authentication in an internal WebView in the app.

    Read the article

  • Why does Application.Exit Prompt me twice?

    - by Michael Quiles
    How can I stop the message box from showing up twice when I press the X on the form ? FYI the butoon click works fine it's the X that prompts me twice. private void xGameForm_FormClosing(object sender, FormClosingEventArgs e) { //Yes or no message box to exit the application DialogResult Response; Response = MessageBox.Show("Are you sure you want to Exit?", "Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2); if (Response == DialogResult.Yes) Application.Exit(); } public void button1_Click(object sender, EventArgs e) { Application.Exit(); }

    Read the article

  • Make an animation using a loop

    - by Michael Quiles
    I need help making this loop to move a label move smoothly across the screen using count for the animation (its required). The labels location is currently in location 0,0 I'd like to make it go in a square right - down - left - back to its original position how can I accomplish this ? please give me an example using my code below. Thank You in advance. private void xAnimeTimer_Tick(object sender, EventArgs e) { int count; this.xAnimTimer.Stop(); for (count = 0; count <= 100; count++) { this.xAnimLabel.Left = count; } for (count = 0; count <= 150; count++) { this.xAnimLabel.Top = count; }

    Read the article

  • SqlCeCommand ExecuteNonQuery performance issue

    - by Michael
    I've been asked to resolve an issue with a .Net/SqlServerCe application. Specifically, after repeated inserts against the db, performance becomes increasingly degraded. In one instance at ~200 rows, in another at ~1000 rows. In the latter case the code being used looks like this: Dim cm1 As System.Data.SqlServerCe.SqlCeCommand = cn1.CreateCommand cm1.CommandText = "INSERT INTO Table1 Values(?,?,?,?,?,?,?,?,?,?,?,?,?)" For j = 0 To ds.Tables(0).Rows.Count - 1 'this is 3110 For i = 0 To 12 cm1.Parameters(tbl(i, 0)).Value = Vals(j,i) 'values taken from a different db Next cm1.ExecuteNonQuery() Next The specifics aren't super important (like what 'tbl' is, etc) but rather whether or not this code should be expected to handle this number of inserts, or if the crawl I'm witnessing is to be expected.

    Read the article

< Previous Page | 82 83 84 85 86 87 88 89 90 91 92 93  | Next Page >