132,726 Archived Topics
Remove Filter ![]() | |
the code is: [CODE] slen=strlen(str); for(count=0;count<=slen;count++) { flag=0; if((int)str[count]!=32) { for(count2=count+1;count2<=slen;count2++) { if(str[count]==str[count2]) { flag=1; break; } } if(flag==0) { ar[ar_count]=str[count]; ar_count++; } } }[/CODE] at line 5 the != operator working fine but when i put [ICODE]if(((int)str[count]>=65 && (int)str[count]<=90) || ((int)str[count]>=97 && (int)str[count]<=122))[/ICODE] it's not working.. if you've some … Software Development c | |
Hi all, I have a c# winform with a SQL Server 2005 backend. When I update my database from textboxes in the form, in one particular table all the nvarchar entries are padded with white space. This doesn't happen for other tables. All the fields that are being padded are … Software Development sql | |
I am new to this place and have a lot of questions to discuss with all here. Starting with a problem that i am currently stuck in..:) I have a small project for which i am using net beans and want to generate the graph as I am having values … Software Development java java-netbeans java-swing | |
i had stuck with this question cz i'm newbie for java programming. i hope ur helping... The Vote class has the data field count to count votes, and the methods [I]getCount(), setCount(), clear(), increment(), and decrement()[/I] for reading and handling the votes, as shown in class diagram below. The [I]increment … Software Development java | |
The methods is so complicated. I want to check the execution time of each statement so that I can modify that part in order to increase speed. Thanks in advance, Raymond Software Development python | |
Maybe you know the mmotps GunZ([URL="http://trinityent.org"]http://trinityent.org/home[/URL]). i have already written a few macros for it (so a program, which clicks and presses the keys for you ingame) with the program actool([URL="http://www.actool.net/"]http://www.actool.net/[/URL]). But i am tired of using this pascal-like programming language... [B]So is there a possibility to get a macro, … | |
''' Calculate the BMI of a person given their height and weight ''' def calcBMI( h, w ): BMI = w / h**2 return BMI def main(): height = float(raw_input("Enter height in metres: ")) weight = float(raw_input("Enter weight in kilos: ")) BMI = calcBMI(height, weight) print "BMI = %0.1f" % … Software Development python | |
Hi All I have created a dataset and from this I want to retrieve values of a column into a variable. How can I do this? This is the code: [size=2][/size][size=2][color=#0000ff]Dim[/color][/size][size=2] sQuery [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]String[/color][/size][size=2] = "Select PERMISSION_BUTTON_ID from ALC_SECURITY_PERMISSION where ROLE_ID = 1" Response.Write(sQuery) [/size][size=2][color=#0000ff]Dim[/color][/size][size=2] myAdapter [/size][size=2][color=#0000ff]As[/color][/size][size=2] OleDbDataAdapter = [/size][size=2][color=#0000ff]New[/color][/size][size=2] … | |
if we right like that: class myClass { int a; string b; char c; } what will be the size of this class? Software Development c++ | |
I have to work on a method called extract feature which has to check for the pattern i pass to the method in the matrix I pass This is an example pattern = {{0,100,0},{255,255,255},{0,100,0}}; Though I pass any different pattern it has to check for that pattern in the matrix … Software Development java | |
Hello, i'm new to java and i need to read a file of strings into an array and then sort them but i can't figure out how to do either. i can do it with ints and doubles but i can't with strings. if anyone could help me i'd be … Software Development java | |
i have to write a code that tells the user to enter the amount of minutes they were allowed to use, it has to be between 200 and 800 if it exceeds or goes below then it should print "please enter minutes between 200 and 800" the problem is: if … Software Development python | |
hi all im stuck to my assignment 1. i want to know how to use function search in order i can search each character in a string then count the number of it. for example: given : home alone the output will be : the string has 9 characters including … Software Development c | |
When I run it,it appear [COLOR="Red"]error 88:'')'' is expected[/COLOR] in A[L]:=sort;. I think it is no need to add '')''. What error 88 mean:?: [CODE]const max = 100; var A: array[1..max] of real; function Sort(L, R:integer):real; begin for L:= L to R-1 do begin if A[L]<A[L+1] then begin sort:=A[L+1]; A[L+1]:=A[L]; … Software Development pascal | |
Hi, I am working on structures. One of the structure member is char array i.e string. When I assign another string to this then it throws the incompatible error. The code is the follwing. The problem line is commented. Code: [CODE]#include <stdio.h> #include <stdlib.h> #include <string.h> struct file_data{ char src_ip[18]; … Software Development c data-structure | |
I'm trying to set up a couple classes, but I'm getting an error: Linker error - Undefined reference to 'Node::~Node()'. I think it might have something to do with how my headers are set up, but I'm unsure what I need to do to fix it. (FYI I added using … Software Development c++ | |
Hey Developers I have made an application that takes data from sql 2005 using a stored procedure and displays them on a datagridview. And then now i have written code to export the data to an excel file using Microsoft Interop and Excel Core Services. When i click on the … Software Development | |
[CODE]import java.io.*; import java.util.*; import java.io.FileWriter; import java.io.IOException; public class Dirtrav { public static void main(String args[]) { // String rootDir="C:\\Projects\\PerfBVT'\\W6_TopicVsQueue_8.2.0.0.74_040110\\"; File directory = new File("C:\\Projects\\PerfBVT'\\W6_TopicVsQueue_8.2.0.0.74_040110"); identifydir(directory); } //File directory = new File("C:\\Projects\\PerfBVT'\\W6_TopicVsQueue_8.2.0.0.74_040110\\"); public static void identifydir(File di) { File[] files = di.listFiles(); if (! di.exists()) { System.out.println("Invalid path"); return; … Software Development java | |
Using the following sub to download a file I receive an "Access to the path 'path' is denied" no matter where I try to download it to even if I run the program as an administrator. Why do I get an access denied error? [CODE=VBNet] Private Sub Button1_Click(ByVal sender As … Software Development vb.net | |
[CODE] while True: try: wd = int(input('How wide would you like your letter to be? (5 - 20)' + ': ')) break except ValueError: print ("Oops! That was no valid number. Try again...")[/CODE] If the user inserts a number that is not 5 - 20, I want the program to … Software Development python | |
Hello there! Recently, I tried deleting some symbolic links in VB, but it turns out their targets were wiped out as well. More specifically, I'm looking for a way to purge an entire directory from all the files/symlinks it contains, without doing anything to the targets. Any help is much … Software Development visual-basic | |
Ok so ive already looked up solutions to my problem and my teacher does not allow me to use a simple iterator for the delete instead this is a hard coded delete function. what this program does is ask the user for 10 numbers and creates a vector of size … Software Development c++ | |
Hello, I am trying to input an unknown amount of numbers (exam scores) and output whether they are passed, failed, or invalid scores. Passed is any score greater or equal to 70, and failed is 69 and below. Invalid scores are out of the range between 0-100. Sample Input: 77 … Software Development c++ | |
I'm working with 2d arrays (which I kinda understand) and a bubbleSort, which I sorta but don't really understand and perhaps those * and & which I'm totally lost on, especially the * which can mean what it means or the opposite of what it means? I don't get that. … Software Development c++ | |
Guyz, I want to know about the Form Disposed Event. I want that everytime I click the close button ("red X button located at the top right of the form") there will be a message box that asking if I want to exit, then if I click yes the programs … Software Development vb.net | |
[CODE]#include <iostream> #include <conio> using namespace std; int main() { int MyArray[ 3 ] = { 12, 23, 34 }; //Note 1 int* ptrMyArray = MyArray; //Note 2 int* ptrMyArray2 = &MyArray[ 0 ]; //Note 3 int* ptrMyArray3 = &MyArray[ 0 ]; //Note 4 for ( … Software Development c++ | |
I am new to programming with vb2008 and I am trying to fill out a form on line. The form looks for keystrokes and keeps track of the number of characters typed. There are two elements on the form that use this method. The first area will allow me to … | |
[CODE]class BTreeNode : public LinkedNode { public: BTreeNode (BTreeNode* child0, int key0, BTreeNode* child1); BTreeNode (const BTreeNode& sibling); bool isNotLeaf (void) const; BTreeNode* findChild (int newKey) const; BTreeNode* addKey (int newKey, BTreeNode* newChild = 0); BTreeNode* getChild (int i) const; void write (ostream& outfile) const; private: void setChild (int i, … Software Development c++ | |
Hi there, I'm trying to write code for an assignment that asks me to read a string and convert all uppercase letters in it to lowercase without using tolower(), since we haven't covered it yet. This is what I have so far: [code] #include <iostream> using namespace std; int main … Software Development c++ | |
I have to write a c++ coding for my assigment... the question is write a program to validate a time.. user neeed to enter hour, minute, and second and the time must be checked either valid or not.. if not valid, the program must show in the correct format.. example... … Software Development c++ | |
Hello everyone. This is my first post on here so please forgive if there are mistakes. I have been searching the forum and other sites to get some answer, but not luck yet. Below is a program that basically asks for names, ids, alias, etc of agents and then writes … Software Development algorithm c++ encryption | |
I got a textbox within the picturebox. I want to be able to rotate it. So all the writings inside it can be rotated as well. what is the best way to do it? thanks Software Development visual-basic | |
How would you define a recursive function that asks the user for a string and prints it from the outside in. For example, 123456 would print as 162534. Any help would be appreciated. Software Development python | |
Hi everyone, i'm new in VB.NET. I tried some sample program using Visual Studio .NET 2005. I just add new data source (which is MS Access file) to my VB Windows program. I used Data Source Windows to create database objects on the form. But after i debug, i can't … Software Development database-design vb.net visual-studio | |
please please please help me this is my last program i have to write and i am having difficulty, this could mean a pass or fail. Thank you for your patience and help. I need a very simple code that asks the user, #input the minutes that are allowed how … Software Development python | |
Hello, I could really use some help with a project I am working on. The project will basically need to track changes that occur within a string so they can be highlighted. Ideally the application would spot that change in the string and prehaps inside a new word at the … Software Development | |
i have an assignment and i do not no how i complete solve it the problem is "An airplane has 15 rows (numbered 1 through 15), with six seats (labeled A, B, C, D, E, and F) in each row. Write a program to display the seating chart in a … Software Development vb.net | |
How can i make the program to tell the user what letter of the alphabet it is: ex: " k is the 11th letter in the alphabet" here is the code that i got so far [CODE]import javax.swing.*; public class Ncom{ String Inputnum; char num; public static void main(String[] args){ … Software Development java java-swing | |
Hey all, I have an array in which the user inputs a series of numbers and when "-1" is entered the program is stopped and the average, max, and min of the numbers entered is displayed. I am able to get the average and max but for some reason the … Software Development c++ | |
Hi, I have 2 arrays and i have to compute the difference between arrays in perl. Here is the code. [code] @a=qw(20095053 19947571 19933274 19910458 19875498 19863670 19747485 19699809 19609242 19602509 19400988 19260844 19190289 19067769 19064710 19056771 19036087 18698092 18692784 18687424 18570886 18562159 18478156 18462614 18425777 18292846 18292840 18390561 18381856 … Software Development perl | |
Hi, Are 2D arrays positioned in memory the same way as normal arrays? ex.: char names[2][5] = {"Dean", "Viky"}; If 'names' is memory location 3000, are the letters necessarily stored like this? 3000 = 'D' 3001 = 'e' 3002 = 'a' 3003 = 'n' 3004 = '\0' 3005 = 'V' … Software Development c++ | |
Following me everywhere? why do I get those exceptions very much??? why are they raised?? My classes are always in the same package as the class they accesses them.. I know they are there. Why doesn't the compiler find them???? thanks for your help ppl...please help :@ Software Development java | |
Hi, I have different variables and I want to have a final variable that represents the concatenation of those variables by taking a specific number of bits from each variable. For example, if I have 3 variables var1, var2 and var3 and I want to take 3, 2 and 1 … Software Development c++ | |
Use the program, Passing-by-value, on the bottom of pp. 248–249 and the program, Passing-by-reference, on pp. 255–256 as a starting point for this assignment. Write a similar program, but change the code to pass two variables to the function call rather than one. that's my assignment and i have tried … Software Development c++ | |
First time using void functions. Apologies again for the noobish thread. I have a few questions on this problem. 1) Since the variables miles, gallons and milesPerGallon are used in both main and void, do I need to initialize them in each place? Or if they're initialized in main do … Software Development c++ | |
Hey all - I have to create a basic client browser that creates a socket with a webpage and then uses a command similar to : GET index.html\r\nHTTP/1.1\r\nHost: [url]www.mysite.com\r\n\r\n[/url] To get the source code for the website. I will store each line recieved from the server into an arrayList, which … Software Development client-server java xml | |
Hi, I'm having some problems with an infinite loop. For some reason, the process 112 is not being send anywhere. What i'm suppose to to do is to mimic a CPU. Each line represents a process which the first number is the machine time that it suppose to be send … | |
I'm working on a program in which I am using the BorderLayout Manager. However, I'm having a difficult time changing the size of the window. I want to make it longer and more narrow, with only one or two text fields per row and want to make the text field … Software Development java java-swing window-manager | |
Hello, I need to read in objects from a binary file and place those objects into an ArrayList. Not sure on how to go about adding the objects - this is what I have so far: [CODE]ArrayList<MailingLabel> arrayOfMailingLabels = new ArrayList<MailingLabel>(); try { ObjectInputStream in = new ObjectInputStream(new FileInputStream("labels.dat")); while … Software Development java |
The End.