199,113 Archived Topics
Remove Filter ![]() | |
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! | |
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 … | |
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 … | |
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 … | |
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++ … ![]() | |
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 … | |
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? … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
![]() | 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. |
4B 50 7B F1 F4 F5 5E 50 7B F1 F4 F5 5E 4B 4B 4B | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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" … | |
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 … | |
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 … | |
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. | |
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 … | |
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, "; … | |
![]() | 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 … |
![]() | 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 ![]() |
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 … | |
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 … | |
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. | |
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 … | |
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'; } { … | |
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 … | |
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 < … | |
Hi! Anyone can please tell me the best online tutorial of Ajax for Java Programmers. Thanks | |
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 … | |
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? | |
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 … | |
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 … | |
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> … | |
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 … | |
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 … | |
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 … | |
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 … | |
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> … |
The End.