43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Thropian

I'm looking for a way to get the first letter of of a string. I already know about the .startswith() but that is for "if" statements I want something like [CODE]print text.startswith() # to give me the left most symbol[/CODE]

Software Development python
Member Avatar for Thropian
0
282
Member Avatar for vedro-compota

Hello) Explain to me please - that's what does this error mean - [CODE] static void SearchPathBetweenCities(out string ReturnValue, CITY StartPoint, int n2 ) { // ReturnValue += "\n"; n2 += 2; // if (StartPoint.roadmass!=null) {} }[/CODE] error - [QUOTE]Error 2 The out parameter 'ReturnValue' must be assigned to before …

Software Development
Member Avatar for saravind84
0
199
Member Avatar for MasterGberry

I know that arrays have to be given a size when using them, so I tried to, but this piece of code doesn't seem to want to be accepted by the compiler. data is a std::vector<char> so i tried using the .size() function to use the size of the vector …

Software Development c++
Member Avatar for MasterGberry
0
127
Member Avatar for PhysicsExpert

[CODE]Table table; table.UpdateSeats(false, false, false, false, false, false); std::list<bool>::iterator Test = table.GetSeats(); std::cout << "The current status of seats: "; for (int i = 0; i < 6; ++i) { std::cout << " " << *Test; ++Test; std::cout << std::endl; }[/CODE] No compiler errors or warnings, just a Debug Assertion …

Software Development c++
Member Avatar for PhysicsExpert
0
814
Member Avatar for dotancohen

Hi all, first post. I am a C# novice, but I have some experience in other C-derived languages. I am trying to close a Windows Form and open another. This is the code that I am trying to use: [code=c#] FormChat fm = new FormChat(client, username); fm.Show(); fm.Activate(); this.Close(); [/code] …

Software Development microsoft
Member Avatar for dotancohen
0
189
Member Avatar for plasticfood

[CODE] vowels = wordcount.vowelNum(); //counts the vowels consonants = wordcount.consNum(); //counts the consonants, this is not working properly. [/CODE] the consNum() method: [CODE] int length = word.length(); for(int i = 0; i < length; i++){ if(word.charAt(i) == 'a' || word.charAt(i) == 'u'|| word.charAt(i) == 'i'|| word.charAt(i) == 'e'|| word.charAt(i) == …

Software Development java
Member Avatar for plasticfood
0
102
Member Avatar for Mr_PoP

TIMERS.h: [CODE]#include "includes.h" class servtime { public: int sec() { int sec; time_t rawtime; tm * timeinfo; time(&rawtime); timeinfo=localtime(&rawtime); sec=timeinfo->tm_sec; return sec; } int mint() { int min; time_t rawtime; tm * timeinfo; time(&rawtime); timeinfo=localtime(&rawtime); min=timeinfo->tm_min; return min; } int hour() { int hour; time_t rawtime; tm * timeinfo; time(&rawtime); …

Software Development c++
Member Avatar for Mr_PoP
0
355
Member Avatar for The 7331 Geek

Hello everyone. I am working on a simple program called "Who's Connected?" where it runs a command (netstat -aon) and then displays the results in a multi-lined textbox. However, when I press the button that will run the command, it tells me that it can't convert the string to an …

Software Development display vb.net
Member Avatar for The 7331 Geek
0
3K
Member Avatar for alexchen

I need to calculate the area of a triangle using this formula. What is wrong with my code? error C2063: 'p' : not a function [CODE]#include <stdio.h> void Area(int a, int b, int c) { int p = a * b * c; int area = (p(p - a)(p - …

Software Development c
Member Avatar for alexchen
0
115
Member Avatar for SpecialForce

Hello, I am trying to upload a file via ftp using the library curl. Of course I looked [URL="http://curl.haxx.se/libcurl/c/example.html"]here[/URL] but the exemples don't say how to do this using usarname and password. Aslo the code is in C and if I compile it in C++ I am getting: [CODE]error C2664: …

Software Development c++
Member Avatar for SpecialForce
0
2K
Member Avatar for scottdurica

Hi all, Im trying to create and write to a file to create a "list" type document that I can convert to .pdf and print out later on. Below is an example of what I'm doing. [I]out[/I] is my file and list in a string array that holds the answers …

Software Development file-system java pdf
Member Avatar for scottdurica
0
207
Member Avatar for p0l4rb34r

I have posted in some other forums and im sorry for people who have already seen something like this from me, but i was hoping if i could get some different views and opinions. I have probably very bsic computer knowledge and no programming knowledge, however, i have recently took …

Software Development c
Member Avatar for asterix15
0
175
Member Avatar for PM312

i am using font style [B]Bookman Old Style [/B]and size 12 for my Project but the default font type is Ms Sans Serif and size is 8. Can default size be set to Bookman Old Style and font size 12. Thanks

Software Development visual-basic
Member Avatar for PM312
0
134
Member Avatar for martin11ph

Hi, I have a WebBrowser control that accesses an IP cam on the same network on form load. The camera has a login interface that I don't want to be seen. Is it possible to autocomplete the form once it pops up? Attached is a screen shot.

Software Development visual-basic
Member Avatar for martin11ph
0
131
Member Avatar for WDrago

Hi All, I'm doing some serial I/O in VB.NET for a project at work. I'm new to VB.NET so I'm not sure if I'm doing this correctly. I need to determine what ports are free and which ones are in use. Presently, I try to open the port and if …

Software Development vb.net
Member Avatar for WDrago
0
2K
Member Avatar for ashwin149

thanks a lot I need another code where once I enter a text into a text box i need the data to be transferred to MS access without erasing any data(a new record is to be created)

Software Development visual-basic
Member Avatar for AndreRet
1
136
Member Avatar for abelingaw

Is it possible to print a report in VB using only Data Environment. I mean setting the textboxes only to datasource and datafields in the record I really dont want to use codes (RS, things like that) cause you see, I'm kind of a rushing so i don't have much …

Software Development listview visual-basic
Member Avatar for AndreRet
0
357
Member Avatar for Peter_morley

When I initialize my grid array I have no problem initializing it changing my row values like so grid[0][0] = 0; grid[1][0] = 0; grid[2][0] = 0; grid[3][0] = 0; ...but when I do this "grid[0][1] = 0;" or "grid[0][2] = 0;" and all the way up to 8 the …

Software Development c++
Member Avatar for Peter_morley
0
221
Member Avatar for newbie14

Dear All, I have a java application which link to db on another computer on the local lan. The problem I have install jdk_1.6_21 without any problem. Then I have paste mysql-connector-java-5.1.14-bin.jar in /usr/java/jdk1.6.0_21/jre/lib/ext. When I compile my program has no problem when I try to run I get this …

Software Development java sql
Member Avatar for newbie14
0
254
Member Avatar for Mr_PoP

[CODE] int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst;[/CODE] but how can i call it , i mean like if i wanna cout << tm_sec ; how can i do that!! :confused:

Software Development c++
Member Avatar for Mr_PoP
0
93
Member Avatar for alexchen

I am trying to print a rectangle using this symbol *. When I print it, it draws an L. What is wrong with my code? [CODE]#include <stdio.h> void rect(int base, int height) { int x = 0,y = 0; while(x < height) { x++; if(x == 1 || x == …

Software Development c
Member Avatar for alexchen
0
173
Member Avatar for Mr_PoP

[CODE] #include <iostream> #include <fstream> using namespace std; void LOGMSG(string test) { ofstream log; log.open("text.txt"); log << test.c_str(); } int main() { LOGMSG("this is a test"); LOGMSG("this is a test2"); LOGMSG("this is a test3"); } [/CODE] but it's only writes the last line i mean the last time i called …

Software Development c++
Member Avatar for MasterGberry
0
497
Member Avatar for MasterGberry

I am getting 2 different compiler errors of the following: AoE2Wide.cpp(1089): error C2679: binary '=' : no operator found which takes a right-hand operand of type 'AoE2Wide::DrsItem' (or there is no acceptable conversion) 1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\vector(599): could be 'std::vector<_Ty> &std::vector<_Ty>::operator =(std::vector<_Ty> &&)' 1> with 1> [ …

Software Development c++ microsoft-access visual-studio
Member Avatar for MasterGberry
0
198
Member Avatar for nomadewolf

Hi, I have this struct: [CODE]typedef struct empresa { char nome_empresa [20]; MORADA morada_empresa; int nif; int telefone; int anocriacao; char cae [20]; ESTAGIARIO estagiarios [MAX_EST]; int num_est; } EMPRESA;[/CODE] And an array of this struct: [CODE]EMPRESA empresas [MAX_EMP];[/CODE] My problem is that when i try to, manually assign values …

Software Development c++
Member Avatar for osirisgothra
0
149
Member Avatar for alonewolf23

Is it possible to print the .00 in the Part_Price[] so it would say 11.00 instead of 11. [CODE]#include <cstdio> #include <cstdlib> #include <iostream> using namespace std; double Part_Code[10]={1,2,3,4,5,6,7,8,9,10}; double Part_Number[10]={101,202,303,404,505,606,707,808,909,1010}; double Part_Price[10]={5.00,4.00,6.00,8.00,10.00,11.00,15.00,20.00,3.50,12.50,}; double Number_OnHand[10]={20,15,10,50,13,5,9,7,15,6}; int main(int nNumberofArgs, char* pszArgs[]) { int Pnumb,i; cout << "Enter Part Code '1' thru …

Software Development c++
Member Avatar for mrnutty
0
135
Member Avatar for Dorson8009

I've searched all over for an answer to this, including this forum, so sorry if I missed something, anyway, I'd like to get a numerical code from extended characters like ß or ü and so on. I don't use them very much myself, as I'm a native English language user! …

Software Development c++
Member Avatar for Dorson8009
0
169
Member Avatar for crazy8

So i am sort of stuck with this one, due to the error when compiling, noted in the title. (for uni by the way) But basically the idea is that if your aged between 5 and 18 you get the discount. If your over 18 and below 60 and you …

Software Development java
Member Avatar for JamesCherrill
0
106
Member Avatar for yeticannotski

Dear All, I am a total newbie to Python and programming in general. I know I'd find more materials for Python2, but Python3 was a reflected choice. That said, I have gone trough: [URL="http://www.daniweb.com/forums/thread173960-2.html"]http://www.daniweb.com/forums/thread173960-2.html[/URL] and tried to assemble my spell checker, and ended up with the following code: [CODE]#!/usr/bin/python3 # …

Software Development python
Member Avatar for yeticannotski
0
292
Member Avatar for Singlem

Hey I have a application with two forms: Form1 and Form2 now Form1 displays Form2, but how can I go back to Form1, I know it will not help if I create another instance of Form1. What I have Form1 [CODE] private void button1_Click(object sender, EventArgs e) { Form2 FormMain …

Software Development
Member Avatar for Mitja Bonca
0
171
Member Avatar for Statoeo

Hello, I have a program that was executed appropriately via windows command line, however when i separated the classes into different packages and tried to compile i got some errors. (No problems executing it via Eclipse. Compilation via command line is the problem) MyFrame.java:19: package Control does not exist import …

Software Development gui java
Member Avatar for Statoeo
0
119
Member Avatar for Vv IVIatthew vV

Hello all, header files seemed pretty simple when i first learned about them. until i actually tried to use my own. The program that i am attempting to create should simply add 1 to 24, but it is using a function found in a header file as a test. The …

Software Development c++
Member Avatar for Vv IVIatthew vV
0
195
Member Avatar for levanlong

Hi all, I'm not sure this thread is in a right category. I have a problem relating to software design. I'm developing a software to manage member ranking of a chess club in C#. The requirement is: "Each member has a title in club. The title of a member is …

Software Development web-design
Member Avatar for levanlong
0
197
Member Avatar for n00b3

Hello, I am writing a c++ program for windows using the API. My program needs to be able to get some text from the clipboard, import it to the program's scope as a string, and do work on the string. [what I have tried] [code] cout << GetClipboardData(CF_TEXT) << endl; …

Software Development api c++ windows-api
Member Avatar for Panda_007
0
5K
Member Avatar for htowa

Hello I have problem with adding two numbers that are less than 10 and their result is more than 10. [CODE]#include <iostream> #include <sstream> #include <string> using namespace std; typedef class node * node_pointer; class node { public: int num; node *nxt; }; string reverse (string str) { int len …

Software Development c++ mathematics
Member Avatar for htowa
0
182
Member Avatar for dejanc

Hello VbForum, I`m migrating access database to vb.net. I have employee database with a few DateTimePickers, textboxes, and comboboxes In access I have formulas in textbox's control source like this, and it works: [code] txtDayCalculation =DateDiff("d",txtDateofHire, txtManualDate) txtYear =Int(txtDayCalculation/365) txtMonth =Int((txtDayCalculation-(txtYear*365))/30) txtDay =((txtDayCalculation-txtYear*365))-(txtMonth*30). [/code] So, I have trying to do …

Software Development vb.net
Member Avatar for dejanc
0
510
Member Avatar for murtazamzk

[CODE]#include<stdio.h> #include<conio.h> #include<dos.h> #include<stdlib.h> void main() { clrscr(); while(!kbhit()) { struct time t; gettime(&t); textcolor(random(15)) ; gotoxy(23,3); printf("%d:%d:%0d",t.ti_hour,t.ti_min,t.ti_sec); sleep(1); clrscr(); } getch(); }[/CODE]

Software Development c
Member Avatar for death_oclock
-2
113
Member Avatar for woofers

I have written a client server program in which the server sends a program to the client, and the client executes the received program. In this case it is a line drawing program in OpenGL. The problem is that on running the server and client the whole program i.e. sending …

Software Development client-server opengl python
Member Avatar for woofers
0
147
Member Avatar for triumphost

The code below is what I'm having problems with... The combobox part is getting me angry and i've searched everywhere, code guru, msdn, stackoverflow, daniweb... And I cant figure it out. Its for a game my friend plays. I play and quit on and off.. I decided to do a …

Software Development api c c# c++ daniweb-bug
Member Avatar for jonsca
0
362
Member Avatar for Neversleepin

Hi, i'm trying to understand how actionPerformed is working. I'd like to know how to add more than one action in actionPerformed method. Here is an example of my code. I have two button b and c and the button b must open the gmail.com page. // this first action …

Software Development gui java open-source
Member Avatar for Neversleepin
0
230
Member Avatar for MasterGberry

So I have a few pieces of code that I want to implement into C++, and I think I understand what they are, but I want to check. I have been using an array of char[] to mimic the byte[] idea. So keep that in mind when helping with these …

Software Development c++
Member Avatar for MasterGberry
0
161
Member Avatar for hauda67

I am creating a desktop application that will also include a calculator, similar in function to the calculator of the Microsoft Windows OS. I require some assistance in implementing the memory capability such that the user can store a number, recall the number to be used in a calculation or …

Member Avatar for Ezzaral
0
215
Member Avatar for Evicake

Hello, I recently started writing a small program for reading multiple xls files from one directory. While reading one file like this,works perfectly: [CODE]wb = xlrd.open_workbook("C:\\path\\FileName.xls") sh = wb.sheet_by_index(0)[/CODE] this one doesn't: [CODE]os.chdir("C:\\path") for fileName in os.listdir("."): wb = xlrd.open_workbook(fileName) sh = wb.sheet_by_index(0)[/CODE] I keep getting the same error: [COLOR="Red"]XLRDError: …

Software Development python
Member Avatar for Evicake
0
378
Member Avatar for get connected

Hi all. I am having issues with people not closing an important file in excel. I have a new vb.net based application that i want to close the excel file when i prompt it to. The application checks for specific named files in a hidden folder on a timer event, …

Software Development file-system vb.net
Member Avatar for Fungus1487
0
5K
Member Avatar for Statoeo

Hello, I have a program that displays a frame that uses a canvas to display few rectangles and some images. While executing the program with Eclipse IDE everything seems to work appropriately, when I compile and execute the program using windows command line the images are not displayed. With eclipse, …

Software Development html-css image java
Member Avatar for Statoeo
0
279
Member Avatar for iarkey

Well I'm learning the irc protocol by coding a Console client. The client appears to connect to server, set name and nick, But won't join the channel it just says "451 you have not registered". Here's the code Sorry for any lame formatting ect. I'm kinda new to cpp: [CODE] …

Software Development c++ client-server
Member Avatar for JZandi
0
164
Member Avatar for zachattack05

I am working on a project that stores it's data in serialized files on the hard drive in a custom file format. The server end of the application accepts TCP connections from clients and returns data to the clients based on the query, it's kinda like a light weight, custom …

Member Avatar for mcriscolo
1
251
Member Avatar for vedro-compota

Hello dear programmers! My question isn't unique and i have read many articles about datagridview , but i've understood nothing (( Please - tell me - how to load an array in datagridview ? All i've understood is that for this I should use datasourse property - [CODE]dataGridView1.DataSource = myMap.MapCityMass.ArrayOfCities;[/CODE] …

Software Development
Member Avatar for vedro-compota
0
200
Member Avatar for almefab

Hi guys, I am fairly new to JAVA and currently I am trying to do a couple of pre-set graphs. My first task is to create a graph of y=x^2. The code below is what i have come up till now. I am sure that i need help in the …

Software Development java java-swing
Member Avatar for almefab
0
165
Member Avatar for tendaimare

what's up when i call the function below i get an error that says that oledb is not regstered on this machine i am calling the function like this [CODE] ListBox1.Items.Add(getAllTableNames) [/CODE] [CODE] Public Shared Function getAllTableNames() As String() Dim con As OleDb.OleDbConnection Dim com As New OleDbCommand Dim i …

Software Development vb.net
Member Avatar for kvprajapati
0
166
Member Avatar for Rajeev R Nair

Hi friends, after a long time. i am developing a small tool by using VB.Net. I want to display data in comboboxes from a table which is in an access database. I using SQL query. Its a simple problem , I think the problem is in my COMMAND. I want …

Member Avatar for kvprajapati
0
817

The End.