43,549 Solved Topics
Remove Filter ![]() | |
Greets, A string array in C++ can be initialized, just like everything else. With that in mind, how do you count the number of items in the array? I mean, how many rows? Let me give you an example using Char arrays (having two dimensional since it's not like string) … Software Development c++ | |
Hey, I'm new to the language and was hoping someone could give me a bit of a hand. [language=code]def common_elements(list1, list2): """ Return a list containing the elements which are in both list1 and list2 >>> common_elements([1,2,3,4,5,6], [3,5,7,9]) [3, 5] >>> common_elements(['this','this','n','that'],['this','not','that','that']) ['this', 'that'] """ list3 = [] for item … Software Development python | |
![]() | I'm trying to append a string to an array value and it doesn't seem to be working. Can someone tell me what I'm doing wrong? The array values will be URLs with a trailing forward slash. [url]http://www.mywebsite.com/Details/product-type/New-York-293486/[/url] $values[10] .= '?cid=spontrue'; Software Development perl |
Hey, I have used the LWP:\:Simple module and saved the source of a website in a file. I am trying to extract all the data between the <head> tags and pass it to a variable to process. So far I can't seem to extract the data properly. Any suggestions? [code=Perl] … Software Development open-source perl | |
Here's my function that i call from main. However i'm getting an error "stackType undeclared" Does anyone know what i'm doing wrong ? [CODE="CPP"] template<class Type> void removeX(queueType<Type>& Q) { stackType<Type> stackQ; while (!Q.isEmptyQueue()) { stackQ.push(Q.front()); Q.deleteQueue(); } } [/CODE] | |
I am writing an app right now that needs winmm.lib. I tried typing winmm.lib in the project properties under the correct section, but kept saying that does not exist. So i did a little research and found that if i type -lwinmm it works. I am using dev-c++. Can anyone … Software Development c++ | |
Hi, I have created a windows service in Visual studio 2005 C++, which will encrypt a file and send it to a server using socket. For this I am using OpenSSL, I am running in to following issues 1) I could not find the library method of OpenSSL which can … Software Development c++ encryption visual-studio windows-server | |
Hello All. I created a login form, which has two fields named "USER ID " & "PASSWORD". Here, i took 8 character length for USER ID field. I would like to take "THE" as first three characters as constant in USER ID field. So, is it possible to do it? … Software Development python | |
![]() | Hi, I am trying to extract data from a text file into an array or even a vector. The example data in the file "data.txt" is in the following manner Home number = 123456 Mobile number = 789012 Office number = 567987 Balance = 46.56 ... ... ... I want … |
Hello, I am new both to here and to Python. This is my first attempt at writing an actual code in Python 3; I've run into a problem with my class declaration, however. It may be a glaringly obvious problem, but it's not to me, so hopefully someone might spot … | |
Hi guys, Is there any special method in c++ called get and which doesn't require instantiation? I'm investigating a c++ code and a found this method ((!h264Decoder.get() || !params.get() || !in.get() || !out.get() || !splitter.get() || (!color && !No_CC_Flag))) When i tried to find this method, I couldn't find it. … Software Development c++ | |
Well, once again, hello. I'm trying to figure out why when i use 2 cin.getlines after eachother it skips one of them and I cant use it. Take a look if you will: [CODE] void Join() { char* Username = new char[255]; char* Password = new char[255]; ofstream DataBase("DataBase.txt", ios::app); … | |
How would it be possible to disable the closebutton(X) in the upper right corner of the form. I dont want to use this property because it takes the minimize and maximize button away also. [code] ControlBox = false; [/code] The only thing I will need on the form is the … Software Development c++ | |
I am trying to read a line from the command prompt and output that line to a text box in my C# application. The only catch is i can't seem to get it to read a line at a time and display it in the text box as the command … | |
Hello, I am working on the problem. Here is the wording: 6) Specify, design and implement a class that can store an array of integer. The number of Maximum element can be 100. Write methods to : a. Add an integer at the beginning of the array b. Add an … Software Development java | |
I have just recently begun programming, and am learning Pascal as my first language. In my class, the teacher doesn't have huge amounts of time, so I thought I would research this online. Converting arabic (normal) numbers to roman numerals is a part of a project that we are working … Software Development pascal | |
Hey, Kinda new to this, and trying to assemble some simple code, but I'm having a couple of issues that I hoped someone would be able to help me out with. 1) I would like to be able to remove duplicates from a submitted sentence, leaving only the first occurance … | |
Hello, I was reading a book and it says that when we want to add new Node that is not in the Head we have make a selection i.e. selection.addNodAfter(element), before we initiate our method. The question is where do i have to do this "selection"? in my main or … Software Development java | |
Hi, I've wrote a small application which browse a folder and rename the files within that foldrer. However if the folder more then 500 files then the app tends to take a while to process. I somehow or the other needs to show some sort of text displaying "processing..." or … Software Development | |
//Write a function: int max(int list[], int n) that recursively finds the largest integer between list[0] and list[n]. Assume at least one element in the list. Test it with a main program that takes as input an integer count followed by that many values. Output the original values followed by … Software Development c++ | |
How do i sort a vector based on the frequency of its elements example my vector contains 10,11,12,10,11,13,11 i need to get the sorted out put as 11,11,11,10,10,12,13 the normal sort is sort(vec.begin(), vec.end()); how do i sort it in that way Software Development c++ | |
Hey, Im trying to get the user to type in a file name, and then the program will copy the file to some where else like C:\ or USB or something. So far this is what I've come up with: [CODE] #include <iostream> #include <windows.h> #include <stdlib.h> #include <conio.h> #include … Software Development c++ | |
First I created a Login to SQL Server using a T-SQL command from within C#. This is the query I used. [code] CREATE LOGIN NT AUTHORITY\NETWORK SERVICE FROM WINDOWS WITH DEFAULT_DATABASE="MyDB"; [/code] Here, NT AUTHORITY\NETWORK SERVICE is the name of the Login I created and MyDB is the DataBase I … Software Development c# sql visual-studio windows-server | |
Hi, i made a calendar program but now i need to import- export my events with iCal/vCal, any ideas on how to go about. I cant find any tutorial or documentation on it Software Development java | |
I have a backgroundworker that is running. The problems comes when you press the closebutton on the form in the upper right corner. This makes the form stuck completely. The problem is that the Worker doesn´t get a chance to finish and return the backgroundWorker1_RunWorkerCompleted event. How can I come … Software Development c++ | |
I am doing a game and I need to reset the graphics back to its original picture once a new game begins, however when I click the new game button, everything else resets but the graphics do not even though I called repaint. I have included the code for my … Software Development java | |
hey, we r asked to do a student data base using c++ and I'm having problem in appending in the file without redundancy in my code i'm dealing with strings is it possible to append on the string without creating a new one or i should chose another data type … Software Development c++ | |
hi! i have written a program that takes a random number from 0-999, 10000 times. I have the program calculating how many times each number comes up randomly, and finds the mode. But my program doesn't include how to find multiple largest numbers, ex. 2 and 4 each come up … Software Development java | |
I have been working on this lab for a couple of days. I need to write a program (using a 'for loop') that approximates pi using the following series: pi = sqrt(6* (1/(1)2 + 1/(2)2 + 1/(3)2+ 1/(4)2 + 1/(5)2 +...... + 1/(n)2)) where n is the number of terms. … Software Development c++ | |
I've been able to design a front-end for a C DLL, calling the DLL functions from the VB program but I'm having trouble calling the VB functions from the C DLL. Maybe I should have put this in the C forum, but I don't know. If I have this in … Software Development visual-basic | |
I had been creating 5 files and I kept hitting the wall. Hope that you will be able to help me pinpoint the problems. (I am not an programmer by the way.) I had been researching for more details on those problems, no luck. Enclosed are 5 files that I … Software Development java | |
In my client-server architecture, the cilent-side application would send specific messages to the server-side application. How should i handle those messages? Previously, in a small project, i had just passed the received message to a method where it would process the message through a switch case structure. However, this doesnt … Software Development client-server | |
I have a problem when it comes to cancel a backgroundworker from working. I start the backgroundworker successfully and the worker supports cancellation is set to true. What I do is to use a button that both can run the backgroundworker and next time you press the same button, it … Software Development c++ | |
hi.. ok here is my problem i want to make a fuction that ask from the user which series he/she wants to use and the precision (number of digits, up to 10). If after 10000 iterations the series doesn't find the value of p, it should display an error message. … Software Development c++ | |
i dont understand why this isnt working ill post the code thats relevent for some reason no matter what numbers i enter it will just print out that the complex number is 0.00000... idk how to fix it heres the main function [code=C] #include <stdio.h> #include "globals.h" #include "complex.h" int … Software Development c | |
Hi, Im new here, im sorry if i am posting in a wrong forum, i have a piece of code that update a binary field in sql server 2000, im keeping this code a simple as possible, so this is working but only save the first character in the string … Software Development sql visual-basic | |
I have been having a little trouble getting my program to output the results I am wanting. At first I was having trouble with a cast exception at this line: [code]out = (ParseResult[]) ipHostsFound.toArray();[/code] The cast exception was: [code][Ljava.lang.Object; cannot be cast to [Lfilelocation.struct.ParseResult;[/code] So I ended up changing it … Software Development java | |
I use this random generator for numbers but it seems that this generator isn´t really random because it seems to generate the same "Random" sequence chain every time I restart the application. Is there a better way to generate random numbers than this, that is more random ? [code] for( … Software Development c++ | |
Thanks in advance for your help. My code is doing some weird things and I can't figure out why. The purpose of my program is to have the user input any number and get the day of the week, month, day, and year and if that year is a leap … Software Development c++ | |
Hi, i am making an event calender but i'm stuck with making sure that a user choose a valid date (a user should'nt be able to choose a start date that is after the end date). Could anyone point me in the right direction please? My code is still a … Software Development java java-swing | |
Hey, i set up a circular queue to sort and pass ints easy, but having problems passing struct of information to the queue, wat declaration should i pass to insert function?? Here is my code so far, what would i change the int item to in insert function?? have just … | |
Hello, i have 3 listboxes on my screen.. A listbox with emails from datasource A, a listbox with emails from datasource B and an empty listbox i want in the empty listbox the emails that are in A but not in B i've got this but it doesn't put any … Software Development vb.net | |
I need to call d class library on the click event of button,its in the same project,I don't know hw to call this,please tell me the steps which i need to follow for this,plz give sm examples,i m new to this.... Software Development | |
i have a mydata.txt file with this in it: [ICODE]B.Friedel 38 LRC usa 20 1 1 1 21 410 300 300 300 18 0 1673 0 76 26 0 0 0 0 0 0 0 0 M.Fulop 26 LRC hun 17 1 1 1 26 308 300 300 300 1 … Software Development java | |
Hi all Im trying to insert an SQLDateTime into an SQL database column which takes DateTime here is an extract of my code [CODE]sTime = new SqlDateTime(DateTime.Now); command.CommandText = "INSERT INTO Sensors VALUES ('" + sensors[i].getName() + "','" + sensors[i].getType() + "'," + sensors[i].getVal() + ", " + sTime.Value + … Software Development | |
Hi, I am writing a shell script, and need help with a small piece of code. It is as below: [code] CUST_1=filename b=1 c=$CUST_$b echo $c [/code] I want the output from this as filename, whereas I get it as 1. Please guide as if where am I going wrong … Software Development shell-scripting | |
Hi everyone, I'm trying to figure out how to pipe a filepath to the open command in TC Shell. What I'm trying to do is, to pipe the outcome of "which" (to find the current location of another script) to the default text editor. I tried [icode]which testscript.pl | open … Software Development shell-scripting | |
I am writing a program to manipulate a stack containing integers using push, pop, print, etc. The only thing I have left is to write a function called copy. Here is what I've tried so far: [CODE] void Stack::Copy(Stack otherStack) { otherStack.top = top; for (int ii = top-1; ii … Software Development c++ | |
What's the main difference between while(){ } and do{ }while() loops? From looking at it, it looks like the former evaluates before it performs the iteration and the latter does the evaluation after each iteration... is that correct? Why would I pick one over the other? Is it mainly just … Software Development c |
The End.