199,114 Archived Topics
Remove Filter ![]() | |
The following program compiles successfully but doesn't give the output: Write a program that reads data about **n** number of **books**. Sort data about books lexicographically by **title** (if the title is the same, sort by **publish year**), and then for every book sort data about **authors**. Then, read **name** … | |
I need help with the following program: Create a structure **STRING** which represents a string ( as singly linked list). Check if the string is a palindrome using stack and function which prototype is **int palindrome(STRING *str);** Code: #include <stdio.h> #include <stdlib.h> typedef struct { char *info; }STRING; typedef struct … Programming c linked-list | |
Hello, I wonder how it would be possible to get text from a datagridview in another form application? The datagridview has 5 rows and 5 columns with text in each cell. I know that this could be achieved with windows API but googling around I have not understand how to … | |
I've asked the same Question here http://stackoverflow.com/questions/34422852/debug-assertion-failed-binary-search-tree > IM IN DESPERATE NEED OF HELP. Im working on a project, What I want is to get data from a database (MySql) and store it in a Tree. And be able to do insertion, deletion or updates on the nodes, if any … | |
<?php if (isset ($_POST['submit'])) { try { $picture = "../images/default-picsss.png"; $sql = " INSERT INTO user (username, password, fullname, address, mobile, email, picture) VALUES (:username, :password, :fullname, :address, :mobile, :email, :picture ); INSERT INTO user_balance (username) VALUE (:username); "; $stmt = $PDO->prepare($sql); $stmt->bindParam(':username', $_POST['username'], PDO::PARAM_STR); $stmt->bindParam(':password', $_POST['password'], PDO::PARAM_STR); $stmt->bindParam(':fullname', $_POST['fullname'], … ![]() | |
I am trying to return a pointer from a function and use the return in a different function . But I am getting memory leak. Please help. The test code which I wrote and detected with memory leak by CPPCheck. ######################################################################## # include < stdio.h > # include < malloc.h … | |
In order to find the most occurent element I am using: int find( int* arr, int size ) { int count = 0, MostOc; for ( int i = 0; i < size; i++ ) { if ( count == 0 ) { MostOc = arr[i]; } if ( arr[i] … Programming c | |
Hi guys, Today I had a look at files and therefore I’d like to create a GUI application that allows me to type a sentence or a word and store it to a text file. The reason for this is that, when I come across an interesting word or sentence … | |
#include<stdio.h> #include<math.h> int factorial( int ); int main() int n; double x,i; double value, sinx; value = sinx = 0.0; printf("Enter the value for x and i"); scanf("%lf %d", &x, &n); for( i=1; i<=n; i=i+2) { value = pow(x,i); sinx += (x - value / factorial(i)); } printf("Result - %f", … | |
hi have been doing a bit more of the tutorial and im trying to show errors if someone doesnt fill in information but the required notice isnt showing all im getting is is required. is required. is required. is required. when it should show the following: username is required etc … | |
#include<stdio.h> #include<math.h> int factorial( int ); int main() int n; double x,i; double value, sinx; value = sinx = 0.0; printf("Enter the value for x and i"); scanf("%lf %d", &x, &n); for( i=1; i<=n; i=i+2) { value = pow(x,i); sinx += (x - value / factorial(i)); } printf("Result - %f", … Programming c | |
I have a windows form application, which uses some user settings (Settings.settings) One of those settings if of type bool and set to default of False. In my form_load event I check that value, if it is true then a new form is started where user enters a password, and … | |
Hi, I need your help for forgot password decryption. When a user registers , his password will be encrypted using md5(); and When he sign in, I will encrypt his password using MD5() and I will compare it with value already stored in to table, My problem is, If he … ![]() | |
Hi i really want to set the window position of my console applicaton I've managed to find Console:: SetWindowPosition bu using google but cant find how to use it... [URL]http://msdn2.microsoft.com/en-us/library/system.console.setwindowposition.aspx[/URL] This link shows an example. But it wont compile I'm guessing its missing header files, what are they? I dont … | |
Can anyone give a clear,short and simple explanation about database indexes? | |
my insert statement seems to be ignoring my unique index and adding duplicates what'd i mess up? thanks in advance Table CREATE TABLE `address` ( `address_id` int(11) NOT NULL AUTO_INCREMENT, `address_street1` varchar(100) NOT NULL, `address_street2` varchar(100) DEFAULT NULL, `address_street3` varchar(100) DEFAULT NULL, `address_city` varchar(45) NOT NULL, `address_state` char(2) DEFAULT NULL, … | |
Write a function for swapping players in a team. New player (which is read) enters team and replacing the player which is also read. Prototype of function is void swap(TEAM *, PLAYER, int); First argument of a function is the pointer to team, second argument is the player that enters … | |
Write a program that reads data from binary file **EMPLOYEE.DAT** (employees are proffesors and teaching assistants, assume that the file exists). Split data about proffesors and teaching assistants in two separate text files and sort data by **ID** using insertion sort algorithm. Search and print data about employee which **ID** … | |
I have a main application (web application) that consumes various other project (directly and chain). One of the projects happens to be Project named Parser. Parser project contains a dll, which is not refered as it is native dll. Properties of the dll file says Build Action: Content and Copy … | |
How can i change the colors of the panels with css every panel to have different color on hover, i have this code: <div class="container"> <div class="row"> <div class="col-sm-4"> <a href="#"> <div class="panel panel-default trending"> <div class="panel-body"> <center> <img src="images/trending.png" alt="Trending"> <h2>Trending</h2> </center> </div> </div> </a> </div> <div class="col-sm-4"> <div … | |
I have a standard java web application package under public_html. My java source code is under WEB-INF/classes/. My jsp files are under public_html and public_html/version/v1. Now all of my jsp file under public_html is running fine, however, the jsp files under public_html/version/v1 do not work with following error: *HTTP Status … | |
Hello. I have created a filter result using php but it is not properly working for me when i filter result it is not showing me up with any products <form method="POST" action="product.php?cat=<?php echo $cat; ?>"> <div class="price-box"> <h5>Price</h5> <input type="hidden" name='price_range' class="range-slider" min="0" max="600" value="23" /> </div> <div id="filters"> … ![]() | |
Hi, How we can know , a user requested for forgot password? ![]() | |
Write an iterative function **char* conversion(unsigned int num, int base)**, that converts an integer **num** into any **base** **(base <=10)**. How to transform the following recursive function conversion() into iterative: #include <stdio.h> void conversion(unsigned num, unsigned base) { if (num / base) conversion(num / base, base); printf("%u", num % base); … Programming c | |
* <?php mysql_connect("localhost","root","") or die ("could not connect"); mysql_select_db("search_test") or die ("could not find db!"); //collect if(isset($_POST['search'])){ $searchq = $_POST['search']; $searchq = preg_replace("#[^0-9a-z]#i","",$searchq); $query = mysql_query("SELECT * FROM members WHERE firstname LIKE '%$searchq%' OR lastname LIKE '%$searchq%'") or die ("could not search!"); $count = mysql_num_rows($query); if ($count == 0 ) … | |
Hello guys. I have a school assignment and Im having a trouble doing it. I will ask for help. I have a class Product and I need to make 2 subclasses Chocolate and Whine. Each product has a name, barcode, price and tax. Each product has a method for calculating … | |
Just begin to study the C++ class. I do not know how to solve the question, Looking for someone to help me. 1. Create a class definition for an object called Account. Add a constructor and destructor to it. 2. Create a class CheckingAccount and make it a child class … Programming c++ | |
I have a program that will connect to mysql server , now how to do for this work? What settings should I do on a mysql server? | |
here is my sample code: addqtr.php <?php $quarter=$_POST['quarter']; $sql="Select * from $quarter where id=?"; $res=$db->prepare($sql); $res->execute(array($pqid)); while($rowadd = $res->fetch(PDO::FETCH_ASSOC)){ $num=$rowadd['id']; $pushup=$rowadd['pushup']; $situp=$rowadd['situp']; } ?> <form method="post" name="frmQuarter" action="saveqtr.php"> <input type="hidden" name="qid" value="<?php echo $pqid; ?>"/> <table> <tr> <td>Select Quarter</td><td>:</td> <td> <select id="quarter" name="quarter"> <option selected></option> <option value="1qtr">1st</option> <option value="2qtr">2nd</option> <option … | |
ID Arrival Departure ArrivalDate DepatureDate 1001 New York Holland 2009-09-23 2012-07-23 1301 Florida Germany 2010-10-23 2012-10-11 1401 New York Holland 2009-09-23 2009-09-25 1301 New York Beijing 2009-09-23 2010-09-21 1201 New York Holland 2008-01-01 2009-09-23 1001 Virginia New York 2008-01-01 2009-09-22 1021 New York Holland 2009-09-23 2009-09-25 1001 New York Holland … | |
hi im following a tutorial for a system running on PDO and i have encountered a error can anyone check this out Fatal error: Call to a member function count() on a non-object in /home/matureco/public_html/classes/User.php on line 21 user.php public function find($user = null) { if($user) { $field = (is_numeric($user)) … | |
I basically am working on a final project for JAVA and I cant figure out how to move the strings into the paint class. Here are my 2 codes. import java.util.Scanner; public class FinalProjectQuestions { public static void main(String []args) { Scanner in = new Scanner(System.in); System.out.println("We will design the … | |
Write a program that reads strings(words) from a text file and copy the inverted words to another file (use the command line arguments). Form a new array of words b from original array a using the function ***void formNewArray(char **a, char **b, int n, char* (*t)(char *));*** where ***n*** is … | |
I need to make a class that records some information for a book. I need to make 2 constractors, the 1st one receives 6 "elements" and 2nd one only the first 5, as you can see in the code below. I also need to make a simple main program to … | |
I'm experiencing an issue deleting data via PHP/MySQL query. The following is the error message: Delete product category failed. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3 This is … | |
I want to add data entered from Java GUI into mysql database and inside actionlestener I am using the following code: String s1; JTextField enterdata = new JTextField(10); s1=enterdata.getText(); PreparedStatement ps = con.prepareStatement("INSERT INTO d (name) VALUES (?)"); ps.setString(1, s1); ps.executeUpdate(); 'name' is the column in database; i am having … | |
If I wrote a program which would `Console.WriteLine()` a base64 code, like an easter egg ("a hidden secret" in gaming jargon) or something, for example string EasterEgg = "dGhlYmlnc2VjcmV0"; Console.WriteLine(b64d(EasterEgg)); And I would let a good obfuscator run through it. Now I know that crackers with enough time and knowledge … | |
hello i have an online gallery i used blueimp plugin to get the good features in it like lightbox and touch support ... you can look on it here : [www.aburaga.com](http://aburaga.com/en/gallery) as you see its a big cakes gallery with many categories and pagination ( i built it with codeigniter/php … | |
LightGallery is counting wrong number of images.. here is [jsfiddle code..](http://jsfiddle.net/jetnku0x/3/). In this jsfiddle i am append dynamical element with a div that is in html file.. Please check manually ... Why lightgallery is count wrong images ? | |
Hi everyone i have this code setTimeout(function() { var hiddenimages = [],albumcover; albumcover = uploadSuccess.udest + imagesarray[0]; // for (var i = 0; i < imagesarray.length; i++) { imagepath = uploadSuccess.udest + imagesarray[i];// user image location.. //if(i != 0) hiddenimages += "<a class='dfed _p040red uid glryview501 _p44oid' href=" + imagepath … | |
Hello all, My chess piece images are being cropped from the bottom. There is a sense of a squeeze which seems to make the bottom parts of my images disappear. Can anyone tell me why this is happening? Thank you in advance... [Click Here](https://www.facebook.com/photo.php?fbid=10153417612584037&set=gm.937346006302419&type=3&theater) <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" … | |
hello, this is the part of the code I'm having a problem with if(a1==r1a || a2==r1b) {//REPLACING for(p=0;p<8;p++) { for(r=0;r<8;r++) { if( i[p][r]==1) { i[p][r]=0; } if(p==a1 && r==a2) { i[p][r]=1; r1a=p; r1b=r; } } } } I have only 2 units in the board of my chess game, intiger … | |
Hi I have a method that accepts a List<String> param as a parameter. I'm writing a JUnit test which needs to be able to accept the parameters as a String and then it needs converted to a List<String> The JUnit code is: public void testMethodName(String params, String expectedResult){ final String … | |
Hello DaniWeb Community, I have a question about changing the symbol of my tracker. I am using google.maps.SymbolPath.CIRCLE Can I change this to a image of mine? jpeg / png file If yes, How I can do it? Thank you and God Bless -Tap | |
Hello guys i want to ask how can i update my website, i want to make website for random posts updates but im confuzed in creating it. My question is how can i add new posts, do i need to create html files everytime i write new post and update … ![]() | |
i need help in adding a new record to the database using adodc in vb6.. i've a command button named add in my form... | |
How do they work? Does -'0' always convert to int from char? Can it convert from anything? And same question about +'0', does it convert only from char to int, or from anything? Thanks in advance :) | |
Hello, There is a post request coming to my portal and I am fetching IP address from the post request on my portal landing page(INDEX view in MVC) and saving in DB table. below is the code to fetch IP address. string Device_IP = ""; if (!string.IsNullOrEmpty(Request.ServerVariables["HTTP_VIA"])) { // ' … | |
Hello, I'm new to C language, and I'm using Visual C as my compiler.. Here's my code: #include <stdio.h>#include <stdlib.h> #include <Windows.h> int i[8][8]; void main(){ int row; int col; for(row=0;row<=7;row++) { for(col=0;col<=7;col++) { i[row][col]=0; } } printi(); getchar();getchar(); } int printi() { char s[500]; int row; int col; int … Programming c | |
How how do you change a value inside a variable, i'm having trouble executing this but can't find any examples for dummies. |
The End.