64,152 Solved Topics
Remove Filter ![]() | |
hello guys i am trying to do something wierd in my query here is my query SELECT * FROM products INNER JOIN smartdevices ON products.id = smartdevices.productId WHERE products.clearName LIKE :keyword1 OR products.clearName LIKE :keyword2 OR products.clearName LIKE :keyword3 when the user enter the search phrase my php code will … | |
Hi, I've developed a php web-app recently in english language. Now, I want to add support to other languages. I've googled & found some results like using `gettext()`,storing in `.ini` files etc. This is good for static websites. But, the thing here is I want to display some data from … ![]() | |
move_uploaded_file not working. althought the query works fine. newbie to php & daniweb :) . if($page=="Image") { $uploads_dir = '/gallery'; $tmp_name = $_FILES["t1"]["name"]; $name = $_FILES["t1"]["name"]; move_uploaded_file($tmp_name, "$uploads_dir/$name"); $insert="insert into gallery values('','$tmp_name')"; $query=mysql_query($insert); if($query) { header("Location:gallery.php"); } else { mysql_error(); } } | |
I have created a chat program that is working fine on localhost but in the live server its not working fine, its sent response or text very late, So I don't know what code should I post here to get know whats the problem or how it will be solved. … ![]() | |
Hi guys I have this problem where a certain cell will select a value from a table based on another cell (like an id or something). First I select some values to be put in Datagrid (a typical OleDBCommand) then add some more columns using Datagridview.Columns.Add. Here's the scenario I … | |
Having two Problems shown below: 1. **Want to send post form data to other domain area and receive response from that domain page**. (Ajax not working for other domain) 2. Show ads div between worpress post area through plugin. how can i make this plugin.? ![]() | |
The containers SET/VECTOR/LIST/MAP are very similar in use,so how to choose which one to use? Is where any special cases? Thanks | |
I am using PrintWriter to write the input from the standard input to a file, here I am trying to create an ascii table in the text file, but there is no proper alignment of the table in the text file. Here is my code guys. package code.practise.MyIdeas; import java.io.FileNotFoundException; … | |
Hi guys, I have 3 classes : 1.Product(Super Class) 2.SmartDevice(Sub Class) 3.Accessories(Sub Class) so I made 3 tables in database and made productId as a foreign key for smartDevice table and accessories table so I've had a trouble thinking about what the code of CRUD will be if I used … | |
//Hi,can someone explain what is the difference of declaring the main in C++/C++11 //What is most common may to use or it's metter of personal choice? int main() { return 0; } /////////////////// int _tmain(int argc, _TCHAR* argv[]) { return 0; } /////////////////// int main( int argc, char ** argv … | |
So I've built a Queue data sructure(all the needed methods) and I just wanted to know how can I use my Queue objects in different project ? | |
i want to display 3 data per row and n number of rows. someone help me to do this. <div class="top-box"> <?php include("config.php"); $sub2_category_id = $_GET['sub2product_id']; $sub2_category_name = $_GET['sub2product_name']; echo '<h2 class="head">'.$sub2_category_name.'</h2>'; $sql = mysql_query("SELECT p.`product_id`, p.`brand_name`, p.`brand_path`, p.`sub2_category_id`, p.`sub_category_id`, p.`main_category_id`, p.`date`,ba.`brand_amount_id`, ba.`available_pack`, ba.`mrp_amount`, ba.`our_price`, ba.`product_id` FROM `product` p JOIN … | |
**note:** This was also posted to the [comp.lang.scheme](https://groups.google.com/forum/#!forum/comp.lang.scheme) earlier today. I normally wouldn't cross-post, but after I noticed the extremely low traffic on the newsgroup, I decided to try a more active, if less specialized, forum. As part of a larger project, I am writing a macro that defines a … | |
<?php //start php tag //include connect.php page for database connection Include('dbConnection.php'); //if submit is not blanked i.e. it is clicked. // var_dump($_REQUEST); session_start(); $errCount = 0; $user = $_POST['usernameTbx']; $pass = $_POST['passwordTbx']; if(isset($_REQUEST['submit'])!='') { //VALIDATE USERNAME TEXTBOX if($_REQUEST['usernameTbx']=='') { $errCount += 1; $_SESSION['error'] += array('usernameTbx' => "Username cannot be empty"); … | |
#include<utility> #include<tuple> #include "stdafx.h" #include<string> using namespace std; int _tmain(int argc, _TCHAR* argv[]) { pair<int, string>p(42, "forty-two"); cout << p.first << " " << p.second << endl; p = make_pair<int,string>(112,"one-one-two") ; cout << p.first << " " << p.second << endl; return 0; } // Can some one help to … | |
Could some 1 please tell how to do timestamps that not rely on users computer? time(); and UNIX_TIMESTAMP() seems to rely on users pc Thanks ![]() | |
Hello programmers! I am working on a program that checks if a user's input is a palindrome (in this case, the input is a string). I am using a custom class template "stack", that is a constrained version of my custom class "List", which is a linked list class template. … | |
![]() | Can string be compared with == operator? I know that they can be compared using strcmp() function. But this snippet confused me a lot #include <stdio.h> #include <stdlib.h> int main() { char str1[]="Good Morning"; char str2[]="Good Morning"; if(str1 == str2) printf("Equal"); else printf("Not Equal"); return 0; } The output of … ![]() |
i'm creating the form class. the form us showed and the window procedure works. the problem is that some messages(like WM_CREATE) aren't working. so how can i connect, correctly the form to window procedure? | |
i'm build a function for do the combination of keys(like the kombat games: we do some combination keys for do an actions): bool CombineKeys(std::vector<int> const keys) { static bool PreviousKeyPressed; static DWORD StartTimer = GetTickCount(); static int i=0; if((GetAsyncKeyState(keys[0]) & 0x8000) and PreviousKeyPressed==false) { i=0; SetWindowText(a,"hello"); PreviousKeyPressed=true; i++; } else … | |
Hi all Here is my snippet for(int i = 1;;i++){ System.out.println("Please enter the name:"); name = input.nextLine(); System.out.println("Please enter the email:"); email = input.nextLine(); if(!email.matches(EMAIL_PATTERN)){ System.out.println("Please enter a valid email.\nThe details are not saved please start from the beginning."); i--; // break; continue; } else { printwriter.println("|"+i+")\t|"+name+"\t|"+email+"\t|"); printwriter.println("+-----\t+-----\t+-----\t+"); } if(i>=1){ … | |
Hi all, I have a large txt file (3 Million lines). Like to use python , to parse the file , so it can be managed by excel. I am very new with Programming and python, like to learn it. Thanks for your support... input file format: .. ... ... … | |
I have a python code that reads a specific folder for specific files. Once it finds a file that matches the re.split peramiters that it is given it then writes the data to a csv file. The issue is that for every file that it loops through and writes it … | |
Hi there, I am having problem with deallocating string two-dimensional dynamic array. My program works fine but for some conditions such as when row size is greator than column size in 2d dynamic array, the program crashes when it goes into destructor. My program is as follows : #include <iostream> … | |
I am following [this](http://code.makery.ch/java/javafx-2-tutorial-part1/) tutorial to get into JavaFX using scene builder and so far I really like it as the person who made it explains things in deep detail. I finished the first part and tried executing the code so far, but it returns multiple errors. Here is more … | |
SYSTEM: Windows 8.1 Tablet, VS 2012 OLD SYSTEM: Windows 7, VS 2013 Enterprise (thanks to my employer) Something is wrong. I never had any errors on my old system. On my new system, I'm getting the following: An unhandled exception of type 'System.Exception' occurred in Microsoft.VisualBasic.dll Additional information: Cannot create … | |
I have managed to put together a [responsive menu](http://jsfiddle.net/c2webdev/Pb8Ts/1/) with the help from the internet. I've need it to sit in the footer as well, but to be controlled sepratley, I have copied it and placed it in the footer but I can't seem to get it right. Can you … | |
Hello DaniWeb. I want to generate dynamic table for my cources table. I have tried this code but the header(semester) seems not to be working. <section class="entry-content"> <?php $counter=1; $slect="Select * from mcs"; $qry= mysql_query($slect); while($row=mysql_fetch_row($qry)) { if($counter==$row[1]) { print "<div class='heading vcMsg'> <h3>SEMESTER $row[1] </h3> </div> <div class='column message-column'> … | |
Hi Team, I am beginner in Java. I am trying to prepare report using Java,the code will generate a Microsoft Word Document and add some text and images in it. I am using Apache POI for this.I am able to create and add text in the doc file and the … | |
Hi Friends, Working with communication between a child javascript window and parent jsp function, I am trying to access a function defined in the parent jsp from its child window which is a separate js file. This logic works fine in IE, but breaks in Chrome. * Parent function: multiCreateCallback() … | |
![]() | Hi, this program of mine can plot timestamp & irradiance but how can i plot another line of data for temperature? This is my txt data: TimeStamp,Irradiance,Temperature 21/7/2014 0:00,0.66,26.2 21/7/2014 0:00,0.71,23.4 21/7/2014 0:00,0.65,25.4 21/7/2014 0:00,0.67,25.3 21/7/2014 0:01,0.58,30.5 21/7/2014 0:01,0.54,26.7 21/7/2014 0:01,0.63,25.5 21/7/2014 0:01,0.65,26.9 21/7/2014 0:02,0.64,22.2 and this is a snippet … |
Hellp programmers! I am working on a program that uses two objects of a custom class template List [which is a linked list, with each item pointing to the next] and concatenates them. Initially, I need to input numbers into my main function, so I have two sets of while … | |
Hi all. I'm writing my first javascript game. It's a role playing game where the user fights an Ogre, and not elaborate at all. I'd like the game to end when the Ogre's life is at zero OR the users life is at zero. I can't figure out how to … | |
![]() | In my python class, we are using python 3.4.1 And we are typing in the programs from the book. Well, I've typed it in correctly and the output still doesn't align the decimal points. Can anyone help? It would be greatly appreciated. Here's the program code: # This program displays … |
I'm new in java, so I'm not very good at it yet and my teacher has stumped me. We are supposed to make a bot for a game called snacktime, which is usually user controlled. # About Snacktime: # * There are a maximum of 16 snacks layed out randomly … | |
Hello, PHP gives me wrong calculation results. !? Example, PHP says that: (47,60*554,82)/100 = 263,7 The right result is: 264 My code: function kurs_usd($value) { // in use (usd to dkk) $kurs = mysql_fetch_array(mysql_query("SELECT kurs, time FROM pvs.kurs WHERE id = 'usd'")); if(time() >= $kurs['time']) { $data = explode("\n", file_get_contents("http://www.nationalbanken.dk/_vti_bin/DN/DataService.svc/CurrencyRatesXML?lang=da")); … | |
import java.util.*; import java.io.*; public class stundentGrade { public static void main(String args [])throws IOException{ BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in)); int a=0, b=0,c=0,d=0,f=0, totalNumber=0; //declaration of initialization stars(); //method to call and print stars System.out.println("Enter a list of Exam scores from 0-100" ); System.out.println("use a negative number if you'r … | |
to create unique reference i had below code in **vb6** Dim UNKREFBATCH As String UNKREFBATCH = "B" & Format(Date, "MMDD") & Format(Time, "HHMMSS") but the same is not giving correct result in **vb.net** Dim UNKREFBATCH As String UNKREFBATCH = "B" & Format(Date.Now, "MMDD") & Format(DateTime.Now, "HHMMSS") MsgBox(UNKREFBATCH) instead of minutes … | |
How would I go about appending a character to the end of every line except for the last line? The script won't know the length of the variable, as the last ten lines are loaded via tail. Thanks! | |
Hi there, I'm in the process of creating a utility program that builds a table in a database and inserts the initial data. I'm getting an error stating: java.sql.SQLException: No suitable Driver found for jdbc.odbc.ContactKeeperDB My Code: [CODE] import java.sql.*; import java.io.*; public class MakeDB { public static void main(String … | |
Consider the following code: #include<stdio.h> #define msizeof(type) ((char*)(&type) - (char*)(&type - 1)) int main() { int x; printf("%u %u\n", msizeof(x), sizeof(x)); return 0; } The Above code when compiled with g++ compiles just fine and works well without any wanrings, while in gcc it gives the following warning: `integer overflow … | |
This script of mine is storing a blank file with no .html or .py extension on my FTP server, I think it has to do with the fact that I have the file already opened in the later code, any help? Essentially this script is going to let me edit … | |
#include "stdafx.h" #include<vector> #include<iostream> using namespace std; int main( int argc, char ** argv ) { // from initializer list (C++11) cout << "vector from initializer list (C++11): " << endl; vector<int> vi1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; cout << "size: " … | |
Hey folks, I've found 4 ways to call static methods and I'm confued about them. The ways are: **1- className::function() 2- $this->function() 3- self::function() 4- static::function()** so: *1-What are the differences between all of them? 2-What's the main reason for using static methods against non-static methods?* | |
I'm trying to push items into an array. Each time a user clicks a book link, the id of the book is supposed to be added to an array.(The name and id of the book are pulled from the database.) But when i push a new book id, the existing … | |
I asked that in another thread, but it got lost: [QUOTE]When do you use root.quit() and when do you use root.destroy() to exit a Tkinter program?[/QUOTE] Also, can you intercept an exit when you use the little x in the title bar, just to affirm that you really want to … | |
Hello, I have installed glassfish server with netbeans. I have created a new JDBC Connection Pool and when I ping it I get error message "Ping Connection Pool failed for MyDatabae. Class name is wrong or classpath is not set for : com.mysql.jdbc.Driver Please check the server.log for more details." … | |
Hi, I am trying to get ahead of my course work for next term and teaching myself c#. I am trying to write a pig latin translator as an exercise from the book I am using but it has no answers. I believe I need to use the split and … | |
how can we use write and read functions in files and why we use these function because i have already get put or cin cout available. | |
Hi Everyone, Thanks for viewing this thread. How do I do the code similar in Java? The syntax for the code below is C#. public class Child : Parent { public Child(String a, String b) : base(c) { } } I would like to seek for your help on Java. … |
The End.