0

I understand that string buffer can append data and write it in a text file. But my question is, how big or the size stringbuffer can store data? can it store more than 10000+ data? what about the performance of the system? Or should i create a if-else statement to check the amount of data that i have been append to the stringbuffer before i write it in the text file and clear the stringbuffer before continue to the next record? will this method be a best idea?Does anyone has a GREAT suggestion ?

0

[QUOTE=masijade;620675]Show your code (and use code tags). Also, is it a Date, DateTime, or TimeStamp field in the Database.

Be aware though, that if your calling getDate on the field, that it will return only a Date, the time will be 00:00:00.[/QUOTE]

if i do it this way
String time = x.getTime(1).toString();

will it 24 hour minutes and second in the format 001236 ?

0

i have basic java programming language but i am a bit confuse about java and j2EE and i hope i can find an answer here. My questions are as below:

           (1) [COLOR="Red"]What the different between java and J2EE?? [/COLOR]
           (2) [COLOR="Red"]Can i consider myself knowing J2EE because i know basic java programming  
                language?? [/COLOR]
           (3) [COLOR="Red"]What is EJB?(i know is Enterprise JavaBean) When do i use it?[/COLOR]
0

dim num, GOPercent

num = Request.Cookies("Result")

GOPercent = num/25 [COLOR="Red"]Type mismatch: '[string: ""]'[/COLOR]

Error Type mismatch. But the value i put in Response.cookies("Result") is a CInt(value)

how to solve this ?????

0

i know session variables store on the server side and cookies store on client side.

Question: If i save the total answer for a summation as a session variables, and multiple online user are using the same system for calculation, does that means that session variable will be over write by other value where other user have different summation answer?

0

i can't see where is the Invalid character with the SQL statement below. i can't see where i miss any character or i added extra characters.

mySQL = "UPDATE table SET col1 = '"_& rA & "', col2 = " & rB & ", col3 = " & rC & ", col4 = " & rD & ", col5 = " & rE ", col6 = " & rF & " WHERE primaryKey = '" & primary "'"

0

I have a problem creating a ODBC connection. I am using MS SQL server 2000. Local access. I create it in System DSN.

  1. I select the "With SQL Server authentication using a login ID and password entered by the user rather than Windows NT. But the error message occur "Connection Failed: SQLState:'28000' SQL Server Error: 18452[micorsoft][ODBC SQL Server Driver][SQL Server] Login failed for user 'user1'. Reason: Not assosiated with a trusted SQL Server connection." after i click the OK button.

  2. I have change the SQL server properties (configure) in the SECURITY tab under authentication from Windows only to SQL Server and Windows.

  3. I'm using IIS version 5.1

Anyone has any idea on solving this problem.

0

[CODE]#include<iostream>

using namespace std;

const int element = 10;

class solution {

public:
    solution();
    void store (int, int);
    void print(int &, int );
    void sortReverse();

private:
    int num[element];

};

solution::solution(){

for (int i=0; i<element; i++){
    num[i] = 0;

}

}

void solution::store(int a, int j){

num[j] = a;

}

void solution::sortReverse(){

int temp = 0;

for(int i=0; i<element; i++){
    for(int j=0; j<element-1; j++)
        if(num[j]<num[j+1]){
            temp = num[j];
            num[j] = num[j+1];
            num[j+1] = temp;

        }

}

}

void solution::print(int &a, int index){

a = num[index];

}

void main(){

int count = 0, num3 = 0, a;
solution A;

do{
    cout<<"Please enter an integer: ";
    cin>>num3;
    cout<<endl;

    //storing the array using parameter
    A.store(num3,count);

    count ++;

}while(count<10);

// Reversing elements of an array

A.sortReverse();

//Printing the array using parameter

cout<<"Printing the reverse array."<<endl;

for(int i=0; i<10; i++){

    A.print(a, i);

    cout<<a<<" ";

}

cout<<endl;

}
[/CODE]

0

i have created a textbox, and if the user have enter an invalid value, the textbox must be able to check whether the value enter by the user is a string or an integer. I have set the CausesValidation to true. If i tried to enter a character, and the msgbox should appear "Is not an integer" but instead i got an error message that says "compile error : Method or data member not found " . I doesn't understand why does this error message keep pop out. Please explain where it went wrong.

[CODE][COLOR="Yellow"]Private Sub Text2_Validate(Index As Integer, Cancel As Boolean)[/COLOR]

If IsNumeric(Text2.Text) = False Then
    MsgBox "Is not an integer"
    Cancel = True

End If

End Sub[/CODE]

0

I am quite confuse between Visual Basic 6 & VB.net. Can someone please explain what is the different between these 2? I have some comment from my friend saying it is better to learn VB.net than VB since i am a beginner. Is the VB refer to visual basic 6 ? i am confuse.

0

I can do a control loop like this in C++

[CODE]int case =0;
while( case<0 && case>20){}[/CODE]

How am i suppose to implement this in Python? I didn't get any errors if i wrote this, the problem is it doesn't enter the while loop when case<0 and case>5
[CODE]
while case<0 & case>5:[/CODE]

0

Do anyone know why i got this error ? Do i have to import anything in order to use string.lower() & string.upper() ?

[CODE][color=RED]sentence = "how are you"
newS = string.lower(sentence)
NameError: name 'string' is not defined[/CODE][/color]

1

if u are using [COLOR=Blue]getch()[/COLOR], it not [COLOR=Blue]#include <io.h>[/COLOR]. Is [COLOR=Blue]#include<conio.h>[/COLOR]. You forgot to define 1 of your function [COLOR=Blue]int find_free(struct CdRecords cdDB[]);[/COLOR].And i think your main problem with your program is struct [COLOR=Blue]cdRecords[/COLOR].
You define your struct as [COLOR=Blue]struct CdRecords [/COLOR] but you wrote [COLOR=Blue] struct cdRecords[/COLOR] as an arguement/parameter in your function call. This is the reason why [COLOR=Blue] "size of cdRecords is not known"[/COLOR]. I have change those errors and it can run. Try out and see whether it solve your problem.

[CODE]//(Database Management System(DBMS), user interface and report generator for results.
//Also a diagnostic tool that allows access to the database metrics.
//This is to show the efficiency of the sort algorithms used.

include <stdio.h>

include <stdlib.h>

include <string.h>

include <conio.h>

define MAX 10

//**//

//Structure

struct CdRecords
{
char Artist[20];
char Album[20];
char Year[8];
char Label[20];
char Genre[20];
};

//**//
// FUNCTIONS
void addRecord(struct CdRecords cdDB[]);
void listRecords(struct CdRecords cdDB[]);
void delRecord(struct CdRecords cdDB[]);
void init_list(struct CdRecords cdDB[]);
int menu_select(void);
void loadFile (struct CdRecords cdDB[]);
void saveFile(struct CdRecords cdDB[]);
void SearchTitle(struct CdRecords cdDB[]);
void findRecord(struct CdRecords cdDB[]);

void sortRecords(struct CdRecords cdDB[]);
void naive_sort (struct CdRecords cdDB[], int arraySize, int count);
void swap (struct CdRecords
v1, struct CdRecords * v2);
int find_free(struct CdRecords cdDB[]);

const int datasize = 20;

//**//

//MAIN FUNCTION

void main(void)
{
struct CdRecords cdDB[MAX];

    char choice;    //TO CAPTURE THE MENU SELECTION

    init_list(cdDB);    //CLEAR THE STRUCTURE

for (;;) {      //LOOP AROUND MENU SELECTION UNTIL USER EXITS

    choice =menu_select(); // CALL MENU_SELECT ...
0

This is an example i did for your question. It's a simple source code, hope you can understand. As for print a boarding pass, run the program and see whether it is this way. If isn't, please let me know the answer.

[CODE]#include <iostream>

include <cstdlib>

using namespace std;

// THIS FUNCTION is CALLED when FIRST CLASS is FULL
void econ(int tempSeat[]){

for(int j=5; j<10; j++){
    if(tempSeat[j]==0){
        tempSeat[j] = 1;

        cout<<"\n**********Boarding Pass **********"<<endl;
        cout<<"Your Seat Number is "<<j+1<<endl;
        cout<<"Economy Class Airline Ticket."<<endl;
        break;

    }

}

}

// THIS FUNCTION is CALLED when EConomy CLASS is FULL
void first(int tempSeat[]){

    for(int j=0; j<5; j++){
    if(tempSeat[j]==0){
        tempSeat[j] = 1;

        cout<<"\n**********Boarding Pass **********"<<endl;
        cout<<"Your Seat Number is "<<j+1<<endl;
        cout<<"Economy Class Airline Ticket."<<endl;
        break;

    }

}

}

void main(){

char answer = 'Y';
int seatNo[10] = {0};  // initailize the seat to 0;
int num = 0;   // the loop will exit if num = 3
int choice =0; // choose whether fist class or economy
bool full = true;  // boolean function to check whether economy && First Class seat is empty
bool EconEmpty = false; // check whether the economy is empty 
bool FirstCEmpty = false; // check whether the first class is empty

cout<<"Welcome to MyAirline Automated reservations system"<<endl;
cout<<"=================================================="<<endl;

while(num != 3){

    cout<<"\nPlease type 1 for \"First Class\"" << endl;
    cout << "Please type 2 for \"Economy\"" << endl;
    cin>>choice;

    if (choice == 1){

        bool empty = false;
        for(int j=0; j<5; j++){
            if(seatNo[j] == 0)
                empty = true;
        }

        if(empty){ ...