199,114 Archived Topics
Remove Filter ![]() | |
Hi there, I would like to know what the differences between primitive string type and object string type are because I declared both of them and had a look the functions that I can invoke on them. They are the same functions. Can anyone explain the differences/similarities please? | |
This is the famous counterfeit coin game in C++. # include <iostream> # include <cstring> # include <ctime> # include <cstdlib> # define coinVal 2; using namespace std; void gameInfo(); void generateGame(); void playGame(); int coins, counterfeitCoin; char typeOfCounterfeit; int main() { gameInfo(); generateGame(); } void gameInfo() { cout<<" Enter … | |
In my hw problem there is this code #include <iostream> using namespace std; int fun(int x) { if (x <= 0) return 0; if (x >= 9 && x % 2 == 1) return x - 1; if (x >= 9 || x % 3 == 0) return x - … | |
<?php include('./config.php'); //protect SQL injection $username = $_POST['username']; $password = $_POST['password']; $username = stripslashes($username); $username = mysql_real_escape_string($username); $password = mysql_real_escape_string($password); $password=hash('sha256',$password); //SQL query that sent login info to database $result = mysql_query ("SELECT * FROM admin WHERE Login ='$username' AND Password ='$password'",$con); $check = mysql_num_rows ($result); @session_start(); if ($check == … | |
What are some safe sized datatypes? Inother words, stuff like size_t, uint32_t. They don't seem to change no matter what machine I use. I'm asking because the confusion comes in here: I'm not sure when to use long vs int. I did a sizeof(int) and sizeof(long) and they are both … | |
Hey there guys. I'm gettign what should be a trivial php error but I cannot for the life of me find it! Parse error: syntax error, unexpected '{' in /home/sites/blah.co.uk/public_html/paypal_ipn_test/ipn.php on line 14 My code of ipn.php is: <?php // tell PHP to log errors to ipn_errors.log in this directory … | |
Hi im having a nerve wrecking problem with my script, i'm trying to make a form validation that when a field is empty it will prompt a message that needs fo fill up the missing fields..and i made it already the problem is when i put a separate script for … | |
Hi, i m trying to ssh to a server and run a exe on that using a script file - runremote.sh All the prints generated by the exe on remote are being displayed on server 1 from where i have executed the script . But after sometime, the execution stops … | |
Hi, Im developing a game. When the human gets his turn i want to display a JFrame with some buttons. So the game must wait until the user clicks on a button. Also i want to identify which button is clicked. I read that JOptionPna gets any component as a … | |
I tried to insert data using the following code, but I really I don't know how can I get result and what is the problem in my code, I tried to build firstly my form then I write the insert query and send it to a new form , any … | |
Hello i can not figure out how to take images from my database to jQuery gallery. User uploaded images in the data base. Images are sorted by date. And how I can do, what all imges goe's in the jQuery gallery, besause now i can get all imges in one … | |
Hello all! I have used this forum many times in the past to solve a variety of programming related problems, but am truly stumped on a segfault within a binary search tree. I have isolated the segfault to a fscanf statement that look legitamate to me. The following code blocks … | |
Say I have the below example, the syntax is based off constuctor chaining for clarity (and my cluelessness). public static void Feed() : this("Unknown"){} public static void Feed(string FoodType) { if (Food != "Unknown") Console.WriteLine("{0} eats some {1}.", Name, Food); } How would I actually implement this for methods? It … | |
I need some help on how can i put some Event handler on my Button mybtn using code. private void button1_Click(object sender, EventArgs e) { Button mybtn = new Button(); mybtn.Text = "First"; FlowLayoutPanel flowlayoutpl = new FlowLayoutPanel(); flp.Controls.Add(mybtn); panel.Controls.Add(flowlayoutpl); } | |
I made a simple program - conservative sequence integers with a sum, for example input: 15, the output should be 1, 2, 3, 4, 5 I made this program in c++ and it worked successfully, see below: #include <iostream> #include <string> using namespace std; int main() { int num, i, … | |
Hello everyone, What a programmer can do to help a researcher in his or her research? Any contribution? In other words, if you were a programmer and conducting a research where the reserach has nothing to do with programming, what would you be able to get advantage and contribute to … | |
Please help me. I want to connect to mysql using the connection string from connectionstrings.com. It gives me error that: format θƒ the initialzation string does not conform to specification starting at index 13. Please help me.... •̸ŤђαϞĸs ĩ̷̊ñ advance | |
can you help me with my code, kindly give me or take a look at my codes in embedding a captcha pls...thanks...asap! <?php $submit = $_POST['register']; //form data $first = strip_tags($_POST['first']); $middle = strip_tags($_POST['middle']); $last = strip_tags($_POST['last']); $username = strip_tags($_POST['username']); $password = strip_tags($_POST['password']); $repeatpassword = strip_tags($_POST['repeatpassword']); $email = strip_tags($_POST['email']); $street … | |
Hi ; i have 2 javascript , but they dont work on same page , how can i do it ? This is the first one : <script type="text/javascript"> function configureDropDownLists(XLEW_3_5_3,XLEW_3_6_3) { var K31_213mm = new Array('90', '106'); var K32_245mm = new Array('90', '106'); var K33_338mm = new Array('90', '106'); … | |
Hello, I need some help with these simple questions. I am a first year IT college student and I do not know how to apply math.pow to these statements. Given the following expressions, re-write them as Java expressions using some parentheses to indicate a sequence of operator evaluation. 1. v … | |
hi. so i need help in understanding this program. its a hindu arabic - roman numeral converter. i got it from some site. i cant seem to understand how the whole process goes. Const sMatrix As String = "I~V~X~L~C~D~M" Private Function toroman(ByVal sDecNum As String) As String Text1.Text = sDecNum … | |
llo all,* im trying to build a simple software to modify words. from undesirable content from the internet for example : f*cking into sexual intercourse or something like that im very new into programming so any ideas would help me a lot. thanks | |
**Bold Text Here**please send a c++ program to implement stack push and pop operations using random number generatos | |
this is my code for the login form using ms access would someone please help me? Everytime I run the program, it usually says connection cannot be used. If I would debug the program it will highlight "rspassword.Open "Select * from table1" I also used a module here Public rs … | |
I am trying to get a query to run to update the status of the system whenever the radio button is selected without having to use submit buttons, but for some reason I cannot get it to work right, here is what I have so far but it isn't working, … | |
Hey guys. I want to create an application for my PC in JAVA which can communicate with my CELL phone via Bluetooth. I just want it to receive text chats send by cell over bluetooth connection and be able to display them in appropriate format. I have good knowledge of … | |
Hey there, Why does the function compact not work for me? it is a function according to the javascript documentation. The problem is, however; if I add the brackets after it, the browser complains for some reason and it says compact is NOT a function. Also, with the function parseInt, … | |
Hi There; I have a ASPX file and a code-behind cs file. I try to connect to a postgresql, perfom some database issue, and disconnect from it finally. To name a few, I print all records of database to the html file, add some new records. All these operations are … | |
This is our longquiz from this morning. don't worry.. I am not cheating off a quiz.. it's already 22:00 o'clock where I am. this quiz was on 8am. I am studying for our final exam tomorrow. we weren't told the right answers.. and I don't have a book right now … | |
Hi, i'm working on a grid, where the data can be saved, modified and deleted from the grid and effects in the database. I have a problem,i.e after I enter data in one row and goto the next row, the next row automatically gets filled by the same data as … | |
Hi, I want to do program that reads different news sites and lists headlines. How this should be done? How to read the data from the web sites? | |
Hi I am going to new page from current page on click of a button using function : function gotonextpage() { window.location.href = "newurl"; } I also want to call another function on load of new page to set its paragraphs. I am hiding or showing paragraphs based on a … | |
How do I make it so the folder isn't viewable to the outside world. I created a login page which is login.php but when you type in examplesite.com/admin it shows everything inside the folder.. How would I hide all that? - Is that a .htaccess thing? | |
Hi There, I'm busy developing a PHP / MySQL billing system for our company but can't seem to get the following working for me. I need to have 1 page that will display the extensions billing period / month for local, national and international calls and it needs to be … | |
hello ! i am working on a telerik reports , i worked on them in asp.net and we can just pass parameters to the report by by just doing this Response.Redirect("rptReportViewerTelerik.aspx?report=rptInvestmentAnalysis&fromDate=" + txtFDate.Text + "&toDate=" + txtTDate.Text + "&doctorTypeID=" + txtDType.Text + "&investmentTypeID=" + txtSegType.Text + "&locationID=" + txtLocation.Text); but … | |
now im doing project in asp.net by using visual studio 2008. im having some doubt in connectivity by usiny sql.So can anyone suggest some links to help me | |
[code] class A { public: A() { cout<<"ctor A\n"; } virtual void func(int x) { cout<<"\nsj\n"; } }; int _tmain(int argc, _TCHAR* argv[]) { A objA; int *vptr = (int *)*((int *)&objA);// address of the virtual table typedef void (*fnptr)(int); fnptr f; f = (fnptr)*((int *)vptr+0);// address of func() within … | |
Hello Friends, As we know, when we have virtual function in our class, compiler smartly puts vptr(virtual table pointer) in our class to access correct function at run time. Can i access this vptr in my program, to use/manipulate this directly? Regards, Vivek | |
Hi, I am accessing a stored procedure through the Entity Framework. I have generated the access code, as well as the view. The problem is that the procedure returns an ObjectResult(Of T), and the view is expeting IEnumerable. I have tried various ways of casting the ObjectResult, but I am … | |
Hi there, Can anyone help? Why is the following code displaying "P1P2P3..." etc, instead of "P1 , P2, P3 ,.." etc. ? Thanks Paul <!--Conect to database--> <?php include "connects/patientconn.php"; ?> <?php $query = "SELECT `Patient I.D.` FROM `patient`"; $result = mysql_query($query); while($patient = mysql_fetch_assoc($result)) { $pt = implode(" , … | |
Hi. I am new in coding and sufferin from some basic issues. I've been trying to write and searching codes for writting into xls file for 3 days but could not find a suitable one. The problem is:  I created a page with textareas and submit/reset button like … | |
Can someone pls help me ? I have an ASP.NET page with Gridview(with EDIT and Delete functionlity) and dropdownlist inside it, the Dropdownlist is well populated with the correct values but whenever I click EDIT button in the gridview the selected value in DropDownlist is set to the wrong value(to … | |
I have a dataset (GrindItems) with 4 datatables successfully populated from dbf files. If I understand the concept of a dataset, I no longer need an open connection to the source db and I should be able to query my dataset. My first question is whether I need a Connection … | |
How to Bookmark website without informing user(visitor) of website? And How to set as browsers homepage without informing user? | |
Hello, wondering if someone can help me. I'm working with a .wav file, and, I need to collect the header information. The header contains (roughly, 20 bits/bytes) before the actual data. And, each of this data is contained at different locations in the file. I need to read a particular … | |
![]() | I request every body on DAniweb.com that please , if any body knows about segment tree, then please either explain me it's update, making otherwise give me solid links so that i can learn from there. IT'S REALLY PATHETIC SITUATION AS I AM NOT GETTING THIS FROM WEEKS. PLEASE IT'S … ![]() |
Here is the problem:-[Click Here](https://docs.google.com/document/d/1m-Jh1lFGf46NtrVJDYbETGVY_uGgxsKivYPMaBqI26k/edit). .I have been trying it for more time but not getting how to solve the polynomial equation after converting from base 'b' to decimal i.e. my algorithm is:- size of array = max(A.size(),B.size(),Z.size()); store A in array as int; add B as int element by … | |
hi guys i got some problem with this code error said that exact fetch row return more than expected rows CREATE OR REPLACE PROCEDURE "MAINTAIN_REQUESTSTATUS1" (emplevel IN NUMBER,eid IN NUMBER,depid IN NUMBER,teamid IN NUMBER) is lastreq number; seq number; stat NUMBER; tok varchar2(60); appr number; CURSOR c1 IS select empid … | |
First off this is a homework question, please don't do my homework for me as nice as that would be... I have to make a program that can search a library for an author or title from a file and output all the matching lines. I am very close but … |
The End.