Search results

  1. iamjon.smith

    JavaScript EXTJS Combobox problems

    I figured out what the problem was, so in case someone else runs across this post, here is the fix... success: function (data) { for (var i = 0; i < data.length; i++) { var store = Ext.StoreMgr.lookup("stationStore")...
  2. iamjon.smith

    JavaScript EXTJS Combobox problems

    I am creating the following combobox: //stations store var stationStore = Ext.create('Ext.data.Store', { id: 'stationStore', fields:[{name: 'station'}] }); the store is build on app load, and is empty to start. At this point the combobox is hidden Once the user runs a search...
  3. iamjon.smith

    Comp Sci C++ search algorithm with 3 sublists

    Fixed it...it seems that cin>> can leave a trailing \n character that was getting read as an enter key strike... changing: cout << "Do you want to search again (Y/N)?" << endl; cout << "You must type a 'Y' or an 'N' :"; cin >> ans; To: cout << "Do you want to search again (Y/N)?" << endl...
  4. iamjon.smith

    Comp Sci C++ search algorithm with 3 sublists

    Ok, First of all, immense thanks goes to Mark44 for helping step my way through to a solution that appears to work correctly. The code now searches and displays the proper index (working code to follow). The last step is to get the Do you wish to continue logic working. The program runs...
  5. iamjon.smith

    Comp Sci C++ search algorithm with 3 sublists

    I will rewrite using your suggestions. As for the debugger, I usually do, but I have been having issues with the Dev-C++ IDE and haven't been able to get the debugger to run, which is causing me no end of trouble. Thanks so much for the continued help, I am really trying to get a handle on this...
  6. iamjon.smith

    Comp Sci C++ search algorithm with 3 sublists

    new code still just returns the first array item infinitely, any pointers Mark? #include <iostream> #include <string> using namespace std; int mySearch(string songArray[], int arraySize, string songName, int songIndex){ for (int i = 0; i < arraySize; i+1){ cout <<...
  7. iamjon.smith

    Comp Sci C++ search algorithm with 3 sublists

    Update on requirements... Algorithm must be non-recursive... I feel like I am almost there, but I am still misunderstanding something about writing the search part of the algorithm. I have included my updated code. Now all it does is continually print the first song in the array infinitely...
  8. iamjon.smith

    Comp Sci C++ search algorithm with 3 sublists

    Moving forward I will only post the code for the searchForSongs function as everything seems to be right to this point: int searchForSongs(string songArray[], int arraySize, string songName, int targetSize){ for (int i = 0; i < arraySize; i++){ cout << songArray[i] << endl...
  9. iamjon.smith

    Comp Sci C++ search algorithm with 3 sublists

    Ok, got rid of the globals, and am now passing everything as params, I will continue to work on this as we go, now to actually splitting the arrays...I am honestly a bit confused about recursion here, but will continue to try to move forward... NEW CODE: #include <iostream> #include <string>...
  10. iamjon.smith

    Comp Sci C++ search algorithm with 3 sublists

    The following code returns the number of elements in my song array: sizeof(songArray)/sizeof(string); // Size of the array / size of each element gives the actual size of the array. Thanks for the pointer, I will keep trying to move forward from here.
  11. iamjon.smith

    Comp Sci C++ search algorithm with 3 sublists

    Ok, so I have made a bit more progress, but I'm getting stuck on splitting the array still, can anyone point me to the next step? #include <iostream> #include <string> using namespace std; string songName; string songArray[] = {"Against the Wind", "Bohemian Rhapsody", "California...
  12. iamjon.smith

    Comp Sci C++ search algorithm with 3 sublists

    Hi Mark, thanks for the reply. To start, I moved all of the search code into a search function as advised... *SEE CODE BELOW* #include <iostream> #include <string> using namespace std; string songName; string songArray[] = {"Against the Wind", "Bohemian Rhapsody", "California...
  13. iamjon.smith

    Comp Sci C++ search algorithm with 3 sublists

    Homework Statement This is the assignment instructions:[/B] In C++, code a search algorithm that searches a list of strings for a particular song. The searching algorithm will have two inputs: the playlist, which is a string array that contains a list of songs in alphabetical order; and a...
  14. iamjon.smith

    Java Serialization/Deserialization of objects in Java

    This was done by design. Part of the requirement was to not allow creation of a department until 3 employees had been added. I agree that the debugging would be simpler, but reqs have to be met. As for the dependencies, I was in a rush and didn't take the time to remove the ide specific...
  15. iamjon.smith

    Java Serialization/Deserialization of objects in Java

    Thanks Silicon, that was the key. I took this advice: and swapped out the displayTA and System.out lines. I then modded the displayTA line as follows, and now get the desired output! Thanks Again!!! displayTA.setText("Department ID: = " + d.getDeptID() + "\n" + "Department Name = " +...
  16. iamjon.smith

    Java Serialization/Deserialization of objects in Java

    Ok guys, I am working on a simple serialize/deserialize project. A user interface takes the following input: A Department ID (INT), A Department Name (String), and Three Employees (ArrayList) that have a Name, Department, and Salary. Once the Three employees are entered, the Department can be...
  17. iamjon.smith

    Dividing complex polynomials

    With the problem copied correctly and reworked, I came up with: (3y-2)/(y+3) - (3y+1)/(y+3)^2 (y+3)^2 LCD (y+3)(3y-2) = 3y^2-2y+9y-6 =3y^2+7y-6 so now the problem has been simplified to: (3y^2+7y-6)/(y+3)^2 - (3y+1)/(y+3)^2 (3y^2 + 7y - 6 - 3y -1)/(y+3)^2 (3y^2 + 4y - 7)/(y+3)^2...
  18. iamjon.smith

    Dividing complex polynomials

    Thanks, you caught where I copied the problem wrong, and where I misused the parenthesis, it was the latter, with +9 instead of -9!
  19. iamjon.smith

    Dividing complex polynomials

    My apologies to everyone that has attempted this so far, I transcribed the problem wrong, here is the actual problem: (3y-2)/(y+3) - (3y+1)/(y^2 + 6y + 9) In the original problem, I placed the parenthesis wrong AND put the wrong sign in one place...I am very sorry and need help with this...
  20. iamjon.smith

    Dividing complex polynomials

    Homework Statement (3y-2/y+3) - (3y+1)/(y2+6y-9) Homework Equations The Attempt at a Solution Ok, I have attempted to solve in 2 steps, step 1: solve 3y-2/y+3 step 2: solve 3y+1/y2+6y-9 and then subtract the answers. This doesn't seem to work, as I get: 3y-2/y+3 = 3 remainder 11 and...
  21. iamjon.smith

    Complex Radical or Complex Root?

    250^1/(3/2) = 250^2/3 = 39.685 Thanks for the direction!
  22. iamjon.smith

    Complex Radical or Complex Root?

    solve a radical expression: 1.5r250 (*r denotes the radical symbol) in a radical expression where the index of the root is 1.5 and the number is 250 Use Calculator, Show Steps Homework Equations The Attempt at a Solution First of all, using a calculator the answer comes out to 39.685, but...
  23. iamjon.smith

    Algebra 2, solve with steps

    Homework Statement [/B] a1b1/x1= a2b2/x2 solve for x2 Homework Equations no relevant questions apply, this is a stand alone review question The Attempt at a Solution [/B] multiply times reciprocal to get rid of denominator on left (x1) (a1b1/x1)= (a2b2/x2)(x1) a1b1 = (a2b2x1/x2)...
  24. iamjon.smith

    Comp Sci Getting VALID range of Excel Cells in javascript

    Solution function validateRange(coordinate) { // A little input validation if (typeof coordinate != "string" || !coordinate.length) return false; // Find the first occurrence of a digit var startIndex = coordinate.search(/[\d+]/); // The column is the part...
  25. iamjon.smith

    Comp Sci Getting VALID range of Excel Cells in javascript

    I guess the framework really doesn't affect the question. The issue is that I have a textbox that a user can enter a value into (rangeFrom). When the user hits the save button, I need to check and see if the value entered is a valid excel cell location where the value can be anything from A1...
  26. iamjon.smith

    Comp Sci Getting VALID range of Excel Cells in javascript

    Mod note: The OP has found an answer to his question. I am validating a text field in javascript in EXTJS 4 framework, based on the selected value of a text box: else if (record.get("type") === "CELL_VALUE" && record.get("apply_before") === true) { Ext.Msg.alert("Field Validation"...
  27. iamjon.smith

    Java JAVA, EntrySet(), iterator

    Using the following code: Set<Map.Entry<String,JsonElement>> mySet = jsonObject.entrySet(); for(Map.Entry<String,JsonElement> singleItem : mySet) { singleItem.getKey(); System.out.println("Set values: " + mySet); } mySet gets printed to the console as: Set values...
  28. iamjon.smith

    Java Decoding JSON object in JAVA

    I don't know how to mark as solved, but this issue has been resolved...
  29. iamjon.smith

    Java Decoding JSON object in JAVA

    Apparently I am still not being clear enough. I need an array that contains: myArray[0][0] = ["columnGridContainer"]["long string of data to dealt with later"] myArray[1][1] = ["header_row_2_enabled"]["N"] myArray[2][2] = ["header_row_3_enabled"]["N"] myArray[3][3] =...
Top