Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

Binary0110

@Binary0110
About
Posts
32
Topics
18
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Database help
    B Binary0110

    I experimenting with Writing database applications and trying to do different things with different controls. My current problem is I've been working on a feature to search a database containg my DVD collection. It is an Access 2003 Database with only one table. Here is my code thus far with the area where the program bombs in bold, any help would be greatly appreciated.Also the code that is supposed to check for a database is'nt working either, but I commented it out for now: 'Search 'If they have no active dataset, refuse: 'If ds.Tables.Count = 0 Then ' MsgBox("Please use the file menu to open a dataset, or create 'a new one first.") ' Exit Sub 'End If 'search for the target in both columns, then display it Dim searchfor As String = InputBox("Enter you Search Term", "Search") searchfor = searchfor.ToLower lstResults.Items.Clear() Dim i, x, y, count As Integer **dt = ds.Tables!DVDLIST ' set dt to point to this table** TotalRows = dt.Rows.Count For i = 0 To TotalRows - 1 x = ds.Tables(Name).Rows(i).Item(0).ToString.ToLower.IndexOf(searchfor) 'See if Title column matches y = ds.Tables(0).Rows(i).Item(1).ToString.ToLower.IndexOf(searchfor) 'see about desc column too If x <> -1 Or y <> -1 Then 'Match lstResults.Items.Add(ds.Tables(0).Rows(i).Item(0)) 'Add title field to a listbox count += 1 End If Next i If count = 0 Then 'no matches found MsgBox("No match for " & searchfor & " was found...") Else lstResults.Visible = True End If BINARY

    Visual Basic help database regex

  • file searching problem
    B Binary0110

    I'm trying to search an input file for all occurences of a user specified string and return how many times the word was found and read that into an output file. For some reason the the value of the string changes to every word in the text file at runtime. What am I doing wrong? #include #include #include #include using namespace std; int main(void) { string filename; cout << "Please enter the name of the file: " ; cin >> filename; string search; cout << "Please enter the word to search for"; cin >> search; ifstream fin(filename.c_str()); while (fin.fail()) { cout << "invalid file name"<< endl; cout << endl << "Please enter the name of the file: "; cin >> filename; fin.clear(); fin.open( filename.c_str() ); } int count=0; while (fin >> (search)) { count++; } ofstream fout("output.txt"); fout << "The number of times "<< search <<" was found is "<< count << endl; system ("pause"); return 0; } BINARY

    C / C++ / MFC algorithms help question

  • the rookie needs help again
    B Binary0110

    no can't use anything other than what's there. find and rfind. BINARY

    C / C++ / MFC help

  • the rookie needs help again
    B Binary0110

    I'm trying to do this project that reads a four word sentence from one string and then extract each word in the string to four other strings using the spaces between the words as indexes.Then display them in reverse. I cant seem to get this to work and I can't use coditional operators. Any suggestions.Here what I have so far. #include #include using namespace std; int main(void) { string sentence; cout << "Enter a four word sentence:"; getline(cin,sentence); cout << "Original string:"<< sentence << endl; int blank=(" "); int firstindex = sentence.find(blank); string first = sentence.substr(0,firstindex); int secondindex = sentence.find(blank,firstindex + 1); string second = sentence.substr(blank + 1,secondindex); int forthindex = sentence.rfind(blank); string forth= sentence.substr(sentence.length,blank); int thirdindex= sentence.rfind(blank,forthindex - 1) string third= sentence.substr(thirdindex,sentence.length - 1); cout << "Reversed string:" << forth+" "+third+" "+second+" "+first<< endl; BINARY

    C / C++ / MFC help

  • Emergency
    B Binary0110

    Can someone tell me why I can't get my output lined up. #include #include #include using namespace std; int main(void) { double l; double arate; int n; cout << " Enter the loan amount: "; cin >> l; cout << " Enter annual interest rate: "; cin >> arate; cout << "Enter total number of payments:"; cin >> n; cout<< endl<< endl; // compute monthly interest rate double mrate = (arate /12 ) / 100 ; //compute amount paid back, monthly payment, and interest paid double numerator= pow(1 + mrate , n)* mrate; double denominator= pow(1 + mrate , n) - 1; double mpayment = (numerator / denominator) * l; double apb=mpayment * 36; double ip=apb-l; int mi= arate/12; //Display Results cout << setiosflags (ios_base::internal)<<"Loan amount:"<< setw(30)<< setprecision(2)<< fixed<< "$" << l << endl; cout << "Monthly interest rate:"<< setw(30)<< mi << "%" << endl; cout << "Number of payments:"<< setw(30)<< n << endl; cout << "Monthly payment:"<< setw(30)<< "$"<< mpayment << endl; cout << "Amount paid back:" << setw(30)<< "$"<< apb << endl; cout << "Interest paid:"<< setw(30)<<"$"<< ip << endl; //system "pause"; return 0; } BINARY

    C / C++ / MFC

  • Math function help
    B Binary0110

    Can someone help me turn this into c++ code. I thought I had it but I keep getting errors. What am I doing wrong? N is an exponent. Payment = Rate * (1 + Rate)N -------------------- * L ((1 + Rate)N – 1) Here is my code: double payment=(mrate*(1+mrate)* exp (n)/((1+mrate)* exp(n)-1))*l; BINARY -- modified at 3:22 Monday 31st October, 2005

    C / C++ / MFC c++ help question

  • rookie question
    B Binary0110

    Thank you so much you people are my heroes BINARY

    C / C++ / MFC question

  • rookie question
    B Binary0110

    little too advance for a student who just started learn C++ three weeks ago. Plus It has to advance the hour when the minutes go over 59. I am so stuck. I cant even use conditional operators Here's what I got: //Preprocessing directives #include #include using namespace std; // Main Program int main() { // variable declarations int hours, minutes ; // User input cout << "Input the time as hours and minutes (e.g. 5 23 means 5:23) " ; cin >> hours >> minutes ; // Program constants const int minutes_per_hour = 59; // Computations minutes = minutes + 1; /*hours = hours + (minutes_per_hour % minutes);*/ //Output cout << " The time is: " << hours<< " :"<< setfill('0')< BINARY -- modified at 2:22 Sunday 23rd October, 2005

    C / C++ / MFC question

  • rookie question
    B Binary0110

    I have this program I have to write for school that accepts two integers. hours and minutes. I then have to output the format in 6:00 format. I'm only allowed integer division and and modulus division. I've tried everything I can think of but my output still looks like this. 6:0 Any tips? BINARY

    C / C++ / MFC question

  • rookie question
    B Binary0110

    I have this program I have to write for school that accepts two integers. hours and minutes. I then have to output the format in 6:00 format. I'm only allowed integer division and and modulus division. I've tried everything I can think of but my output still looks like this. 6:0 Any tips? BINARY -- modified at 23:40 Saturday 22nd October, 2005

    Managed C++/CLI question

  • querying a Acces DataBase
    B Binary0110

    I posted this question before bit I think I may have asked it wrong. I want to set up a program to query 1 field in the DB by pressing a button and then displaying the results in a listbox. At which point I can click in the listbox and display the record in the textboxes. BINARY

    Database database question

  • Searching a database
    B Binary0110

    I want to be able to type a string into an input box or text box that would match itself with a field in the database then show me the results in a listbox. Then by clicking on the list box pull up the entire record. BINARY

    Database csharp database algorithms tutorial

  • Searching a database
    B Binary0110

    I have a Access database that I wrote a VB.net program for. I want to set it up so I can seach it using the indexof method. I gotten as far as the listbox,inputbox and the button, but I'm pretty much running around in circles with the code. Anyone know how to do this? BINARY

    Database csharp database algorithms tutorial

  • Using Check Boxes
    B Binary0110

    I got it figured out thanx BINARY

    Database question csharp database

  • Using Check Boxes
    B Binary0110

    How do I use a check box on an unbound database in vb.net? BINARY

    Database question csharp database

  • ip address
    B Binary0110

    Is there anyway to show network information such as Ip address in text boxes BINARY

    Visual Basic sysadmin

  • Create Splash Screen....
    B Binary0110

    set it up with the timer on the splash screen, then create a module with something like this Module Startup Public Sub Main() Dim frmSplash As New frmSplash Dim frmMain As New frmMain frmSplash.ShowDialog() frmMain.ShowDialog() End Sub End Module make sure that in the timers tick event you put me.close, oh and change the startup object to SubMain and everthing should be fine. BINARY

    Visual Basic csharp help tutorial

  • Deployment Question
    B Binary0110

    I've created a small app in vb.net and during the deployment the setup file doestn't have an Icon, does anyone know how to change this. BINARY

    Visual Basic csharp sysadmin tutorial question

  • Deployment
    B Binary0110

    thx that worked BINARY

    Visual Basic csharp dotnet sysadmin question workspace

  • Create Splash Screen....
    B Binary0110

    ok splash screens are easy on the form that serves as the splash screen, put a timer control, then turn enabled to true in the properties, and the interval to whatever you want. 1000=1sec.double click on the timer control and enter me.close Me tells the program that it is only dealing with that one form and close closes the form. If you use End it will close the whole program. BINARY

    Visual Basic csharp help tutorial
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups