199,113 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for PinoyDev

Good day! I knew this is easy to all of you guys. But I need the most precise way to parse this string "**45:50"** and store the result in **two dimensional array with int as datatype**. The delimeter is "**:**". Thank you!

Member Avatar for WaltP
0
322
Member Avatar for romanromeo89

I'm trying to write a simple sqlite query in c++ using visual studio 2010. My problem is that i can't use a c++ variable inside that query. I was not able to find the right syntax. `sqlite3_prepare_v2(handler, "SELECT * FROM grammateas WHERE username==X;", -1, &statement, 0);` where X i would …

Member Avatar for romanromeo89
0
759
Member Avatar for Vish0203

What would be the error code for this?? Am I using perror() at right place?? The output shows "No error" #include <stdio.h> #include <conio.h> #define MAX_VAL 32000 int main() { start: int x; printf("Enter a value for x= "); scanf("%d", &x); if (x > MAX_VAL) { perror(""); getch(); system("cls"); goto …

Member Avatar for Vish0203
0
155
Member Avatar for Jacklittle01

can someone correct this code for me? also, how do you make cmd open the .py file than execute that .py? def addition() print "This part of the test cover addition" p1 = raw_input "What is 9+9" if p1 = "18" set c()= c+1 c= 0 print "correct" else: print …

Member Avatar for Jacklittle01
0
137
Member Avatar for np complete

This is a simple password implementation. void getPassword() { int i = 0, flag = 0 ; char c ; char password[100] ; cout<<"\n Enter Password : " ; while(1) { c = getch() ; if(c! = 13 && c! = 8) { cout<<"*" ; Password[i] = c ; i++ …

Member Avatar for iamthwee
0
420
Member Avatar for Jsplinter

I wrote the following code to test which is faster: performing a multiplication and division many times, or accessing the results in a vector via iterators(perform the calculations ahead of time), or hard coding the results of those calculations into the program. I actually expected storing the results in the …

Member Avatar for Jsplinter
0
269
Member Avatar for Despairy

I was thinking about somehow using a static member that all the matrix cells will be defined by their value + the static value. but than i thought how can i do it? what is the easiest way of doing so without the need to run over the 10^6 cells? …

Member Avatar for Despairy
0
299
Member Avatar for houssam11350

I am using the (EditingControlShowing) event to Enable AutoComplete in DataGridViewComboBox Column. private void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e) { if (e.Control is DataGridViewComboBoxEditingControl) { ComboBox combo = (ComboBox)e.Control; ((ComboBox)e.Control).DropDownStyle = ComboBoxStyle.DropDown; ((ComboBox)e.Control).AutoCompleteSource = AutoCompleteSource.ListItems; ((ComboBox)e.Control).AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; } } But it has a strange behavior, when I type some characters …

Member Avatar for houssam11350
0
321
Member Avatar for subratabanerjee

I'm trying to do a php-mysql project that can make phone calls from the computer. The concept is - My call list is stored in a mysql database and when a tele-caller login in to their account. The call list is displayed and a call button is placed beside every …

Member Avatar for DarkMonarch
0
153
Member Avatar for brian71289

Hi Everybody, I'm sorry if the asnwer is already posted somewhere, I was not able to find it. When I build my solution, I get the following error: 'UserManager.AuthenticateUser(string, string)': not all code paths return a value. Dont know the reason why is this happening. But I have included my …

Member Avatar for gusano79
0
258
Member Avatar for raistie_1

Hi all, I am currently trying to generate a number from a specified range using a function int number_range(int from, int to) { return (from + rand() % (to-from+1)); } but negative numbers cause the program to crash. How can i go about doing this so it can take numbers …

Member Avatar for RainbowMatrix
0
264
Member Avatar for sampsont

I like to have the name of the current method for logging purposes. For example: string Commands::test(StringTokenizer& tokens) { static string src("Commands::test"); ... _log.debug("message", src); } I'm worried that creating 'src' might cause a performance hit. I made the string static thinking it would only be constructed once, the first …

Member Avatar for sampsont
0
142
Member Avatar for coolikedat99

I am trying to make a program that generates a random number and asks the user to input the random number generated by the computer. Anyone know how to do this? This is my program: #include <iostream> #include <cstdlib> #include <ctime> using namespace std; int main() { int one; time_t …

Member Avatar for RainbowMatrix
0
295
Member Avatar for I_m_rude

http://www.spoj.pl/problems/BISHOPS/ hey, Can any one please see this problem and tell me how to deal with number like 10^100 ? Please help me out as it is used in many many problems. thanks in advance to everyone.

Member Avatar for delta_frost
0
118
Member Avatar for streetalex310
Member Avatar for Lucaci Andrew

Ok, so, this code snippet is a reply to this thread: http://www.daniweb.com/software-development/cpp/threads/425821/prime-number-c From what I understood form the OPs request, is that, he wanted an algorihm which would check for prime numbers in a given range, applying these conditions: a number is to be considered valid if: a. the number …

Member Avatar for RainbowMatrix
0
602
Member Avatar for dyingatmidnight

Hi there, I'm currently rewriting my dynamic urls using mod_rewrite which is working fine. I'm just wondering how best to handle pages that don't exist. Right now it works by getting the page id and displaying the content, if the pageid doesn't exist it displays a custom 404 message. What …

Member Avatar for dyingatmidnight
0
180
Member Avatar for DelphiGuy

Basically I'm running into issue, I have a Global Keyboard hook in a DLL, whenever it captures a key it uses WMCopyData to send the keycode over to the MAIN application. The problem is when the main application gets the key code it seems to be corrupt/changes in value. Here …

Member Avatar for DelphiGuy
0
262
Member Avatar for trashed

Hi all. I have a radio group with a bunch of possible selections. User has to select one of the options in order to go on. Is there any faster way than a for loop iterating through the single buttons to verify one has been checked? Thanks

Member Avatar for DelphiGuy
0
125
Member Avatar for androidz

HI i have this error null reference i don't know why Imports System.Data.SqlClient Imports System.Configuration Imports System.Configuration.ConfigurationSettings Public Class Form1 Private ConName As New DataAccess Private Sub cmdconnect_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdconnect.Click Dim conn As String Dim m_server As String Dim m_db As String m_server …

Member Avatar for androidz
0
288
Member Avatar for edwarddaniel.baldeviano

Hi, everyone! This is my first post ever here in Daniweb. I experienced a problem in printing the sorted array of 5 numbers, as the following code only prints the first iteration of the loop, and it does not print the array input. Here's the code: section .data i db …

0
614
Member Avatar for hszforu

I am not able to figure out what's wrong with the following code: Is it a rule to create objects in class that contains main method and then use this object to access the methods? I did exactly reverse in the following code and i am not able to compile …

Member Avatar for hszforu
0
238
Member Avatar for C#Jaap

I am working on an application that keeps track and uses files stored on the file system. Users are allowed to open, create, delete and move files in the file system. Meanwhile my application is not constantly running so I can't keep track of all changes real-time. Afterwards my application …

0
151
Member Avatar for stengeljjj

Using cout to produce output - double space = 4.0 - 1.9999999; cout << space << endl; result: 2 Why am I not getting 2.0000001 instead? What should the type be or the numbers to make this 2.0000001? Thanks

Member Avatar for JasonHippy
0
107
Member Avatar for Stuugie

Hi all, I have a form that is supposed to query a website. I have the following code that first looks at and uses data from an SQL Server db connection: ConnString = "Data Source=SQL2008T1;Initial Catalog=EconAnalysis;Integrated Security=True" SCqryStr = "" SQLConn.ConnectionString = ConnString SQLConn.Open() SQLStr = "SELECT vSeries_Number FROM tblVSeriesList" …

Member Avatar for Reverend Jim
0
295
Member Avatar for Deepika Deepi

hi all, This is my first post in this site. I have a sentence like this String input = "India/world is my Country and it is in Asia/in world"; I want to remove the word followed by the / and get the result of otheres. Output **India is my Country …

Member Avatar for JamesCherrill
0
217
Member Avatar for daino

Would anyone know of a reporting toolkit library for C++ which can be compiled as part of a project. It will need to be ablue to display tables, display charts and be printable through a printer. Preferabely free though I haven't been able to find any at all. The closest …

Member Avatar for daino
0
522
Member Avatar for daniel36

I have written a mysql query- SELECT questions.id,questions.date,questions.title,users.user_name,subjects.subject FROM questions INNER JOIN topics ON questions.topic_id=topics.id INNER JOIN subjects topics.subject_id=subjects.id INNER JOIN users ON subjects.id=users.sub1 OR subjects.id=users.sub2 WHERE users.id=8; which is giving error- #1066 - Not unique table/alias: 'topics' .i am unable to understand the problem.

Member Avatar for yamahaszr660
0
165
Member Avatar for LoyalOne2

Hi I have a program that I am to write that is suppose to read from a text file. I am suppose to assume no more than 100 item and terminate after by -1. have to read and store the data. I have to write a method to print the …

Member Avatar for Starstreak
0
152
Member Avatar for ak47carbon

when i send email from php mial funtion it working best in yahoo and gmail acounts but images and background images is not showing in outlook 2007,tell me what is solution and better way to show image in oulook <?php // multiple recipients (note the commas) $to = "zohaib@sikone.com, "; …

Member Avatar for Citytech.tester
0
2K
Member Avatar for I_m_rude

int main() { extern int i; i=20; printf("%d\n",i); } hi.. actually this is asked to me today. In this no i is defined anywhere. only declaration is given in main(). then i was asked when the error will come ? like is it segmentation fault, linking error, complilation error or …

Member Avatar for deceptikon
0
131
Member Avatar for I_m_rude

t=input() while t>0: t=t-1 m,n=input().split(" ") m=int(m) n=int(n) m=m%10 n=n%4 if n==1: print (m) elif n==2: print (m*m)%10 elif n==3: print (m*m*m)%10 else: print (m*m*m*m)%10 why this code is giving me NZEC error ? it is irritating me now. thanks

Member Avatar for I_m_rude
0
94
Member Avatar for Awah Mohamed

hi guys, i am making a new app in cakephp (and i am new to the framework.. learned how to use it last night).. and i am supposed to make a signup system and login system but i am stuck in the signup. i Worte the models and controllers and …

Member Avatar for Citytech.tester
0
153
Member Avatar for johndohmen1963

i have the folowing code <?php $datumeind = date("Y-m-d");// current date $datumverleden = strtotime(date("Y-m-d", strtotime($datumeind)) . " -99 year");//current date -99 years $datumbegin = date('Y-m-d', $datumverleden); if(isset($_POST['zenden'])) { if($geboorte_datum <= $datumbegin && $inleven_dood == 'In leven' ){ ?> <script type="text/javascript"> <!-- var r=confirm("Klik ok als In Leven."); if (r==true) ("<?php …

Member Avatar for Citytech.tester
0
206
Member Avatar for daniel36

mysql Inner join problem I have written a mysql query- SELECT questions.id,questions.date,questions.title,users.user_name,subjects.subject FROM questions INNER JOIN topics ON questions.topic_id=topics.id INNER JOIN subjects topics.subject_id=subjects.id INNER JOIN users ON subjects.id=users.sub1 OR subjects.id=users.sub2 WHERE users.id=8; which is giving error- 1066 - Not unique table/alias: 'topics' .i am unable to understand the problem.

Member Avatar for urtrivedi
0
222
Member Avatar for dourvas

hallo there i read an excel file using excel_reader library. The excel file contains greek characters. i get the data and store it into arrays (it is a common xls file that contains names, lastnames and fathersnames) using characters set utf-8. the code works fine //i uploaded the xls file …

Member Avatar for blocblue
0
130
Member Avatar for kris222

A means AMA but i cant figure out whats wrong cuz its gotta accept both capital and small letters help please #include<iostream.h> void main() { char x[2]; cout<<"What does the letter A mean in ACLC?"; cout<<endl<<"S:"; cin.getline(x,2); { if(x[0]=='A'||x[0]=='a') x[0]='y'; else x[0]='n'; { } if(x[1]=='M'||x[1]=='m') x[1]='y'; else x[1]='n'; } { …

Member Avatar for zeroliken
0
87
Member Avatar for bo0ga

What is meant by it being a "framework"? I'm reading and trying to learn ASP.NET and basically what I'm seeing is that you either use C# or VB.NET as the programming language for web development. But where is the ASP.NET aspect coming in? Is it just the name of the …

Member Avatar for urtrivedi
0
240
Member Avatar for venkyb47

Hi I am unable to retrieve values from json object.The json data as coming like this when observe from firebug : [{"PROJECT_ID":"CASEENO"},{"PROJECT_ID":"DARKROOM-2"}] This is my ajax code: $.ajax({ type: "POST", url: "getdata.php", dataType: "json", data: { 'dataString': projectid }, cache:false, success: function(data){ alert(data); for (var i = 0; i < …

Member Avatar for venkyb47
0
248
Member Avatar for nikita.chandra

Hi! Anyone can please tell me the best online tutorial of Ajax for Java Programmers. Thanks

Member Avatar for sayyapillai
0
82
Member Avatar for BradenMurphy

I got this info off a website. tells u how to make a clock in C++... can anyone tell me how to make it so the PC doesn't use 100% cpu? if u look in task manager ull see <ProjectName> is using 100% cpu [code=c] // crt_clock.c // This example …

Member Avatar for Ancient Dragon
0
205
Member Avatar for bLuEmEzzy

I have a rootnode and its value is (1) then it's childnode is (2,3) I add childnodes to (2) but on (3) I do not know. how can I add childnodes to 3?

Member Avatar for bLuEmEzzy
0
111
Member Avatar for Hyperion101

Hey guys! Need some help with homework again, I have absolutely no idea what this means, could someone explain it to me with some example code? *For the quadratic equation problem, complete the 4th phase: Write the C program according to the algorithm specified in the lesson. File name should …

Member Avatar for Hyperion101
0
140
Member Avatar for borchu

Hello everyone, I progress step by step my problem, one step is passed -now I can send string datas -text messages- here another step is I want to record some audio sounds by using microphone in first android emulator assume phone1 and send to second android emulator-phone2-. I found whole …

Member Avatar for borchu
0
9K
Member Avatar for lokesh.r.kandula

Hi Buddy, I have a requirement which is explained as below: 1. My input xml file is as shown: <input> <historicalObservation> <observationDate>20110111</observationDate> <observedRate>14.74</observedRate> <observationWeight>1</observationWeight> <observationType>fixing</observationType> </historicalObservation> <historicalObservation> <observationDate>20110111</observationDate> <observedRate>10.28</observedRate> <observationWeight>2</observationWeight> <observationType>fixing</observationType> </historicalObservation> <historicalObservation> <observationDate>20110111</observationDate> <observedRate>27.96</observedRate> <observationWeight>3</observationWeight> <observationType>fixing</observationType> </historicalObservation> <historicalObservation> <observationDate>20110111</observationDate> <observedRate>4.94</observedRate> <observationWeight>4</observationWeight> <observationType>fixing</observationType> </historicalObservation> <historicalObservation> <observationDate>20110225</observationDate> <observedRate>14.18</observedRate> <observationWeight>1</observationWeight> <observationType>fixing</observationType> </historicalObservation> …

Member Avatar for lokesh.r.kandula
0
370
Member Avatar for samohtvii

Hi all, I am trying to write a CWEB c++ program that just keepsgoing until the user types 'no'. Anyway i get some errors that I can't fix. Here is the .w file (x's are comment blocks to save congestion) @* Program Skeleton @ x @c using namespace std;@; @<Header …

Member Avatar for samohtvii
0
166
Member Avatar for joshl_1995

Hello Community, I was wondering if its possible to make an editor like [Notepad++](http://notepad-plus-plus.org) (I'm talking about the text area). So it will change the colour of the words (funtions and commands) also with the margin with the numbers and the code folding. Please help with what you can even …

Member Avatar for joshl_1995
0
543
Member Avatar for streetalex310

4B 50 7B F1 F4 F5 5E 50 7B F1 F4 F5 5E 4B 4B 4B 4B 50 7B F1 F4 F5 5E 4B 50 7B F1 F4 F5 5E 50 7B F1 F4 F5 5E 4B 4B 50 7B F1 F4 F5 5E 4B 50 7B F1 F4 F5 …

Member Avatar for ravenous
0
145
Member Avatar for Farhad.idrees

Hi....I want to add plus one in Id...the problem is i have to show after getting id from database...code is mycommand = new SqlCommand(query_Id, myconnection); reader = mycommand.ExecuteReader(); reader.Read(); txtID.Text = reader[0].ToString(); reader.Close(); for example in this case i m getting ID 3 in my text box but i want …

Member Avatar for Momerath
0
107
Member Avatar for aplh_ucsc

this is my code:: <!--school.xml--> <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="school.xsl"?> <UCSC> <student> <name>Isuru ilangakoon</name> <age>21</age> <contct_no>0714234672</contct_no> <degree>computer science</degree> <school>DVharmapala college</school> </student> <student> <name>randika malinga</name> <age>22</age> <contact_no>0713567134</contact_no> <degree>computer science</degree> <school>Nalanda college</school> </student> <student> <name>vinod kawinda</name> <age>22</age> <contct_no>0783451024</contct_no> <degree>computer science</degree> <school>maliyadewa college</school> </student> <student> <name>Inshaf mahatt</name> <age>21</age> <contct_no>0777234151</contct_no> <degree>ICT</degree> <school>D.S.Senanayaka college</school> …

Member Avatar for f-aplh
0
150

The End.