64,152 Solved Topics
Remove Filter ![]() | |
I want to check for duplicates when inserting a new contact in my database, then showing a msg that the contact is already in the db. this is what i've done: function isDuplicate(names,phone,email,adresa){ var isduplicate=false; for(var i=0;i<addresslist.length; i++){ if(addresslist[i].names.toLowerCase()==names.toLowerCase() && addresslist[i].phone.toLowerCase()==phone.toLowerCase()&& addresslist[i].email.toLowerCase()==email.toLowerCase()&& addresslist[i].adresa.toLowerCase()==adresa.toLowerCase() ){ isduplicate=true; } } return isduplicate; } … ![]() | |
Hello, I want to test random generator with one program. But I don't undertsand what my input file should look like. > You must first create the ascii file. To do that, generate your 32-bit integers and write them to a file, in hex format, 80 characters (ten 32-bit integers) … | |
Hi again guys... I have a little but of an issue with a select statement I cannot seem to fathem out. Below is the code: else if (radioButton3.Checked == true) ; { //Looks at the row Selected in the GridView and then takes the Account Number and Stores in a … | |
Hey everyone, Got this little snippet here: <?php // did files get sent if(isset($_FILES) && (bool) $_FILES) { // define allowed extensions $allowedExtensions = array("pdf","doc","docx"); $files = array(); // loop through all the files foreach($_FILES as $name=>$file) { // define some variables $file_name = $file['name']; $temp_name = $file['tmp_name']; // check … | |
Hi Guys, Have a random problem as to why my headers are not being shown properly in the form? Possibly a simple anwser but can't see the wood for the tree's at the moment and another pair of eyes is always great. Code below: private void radioButton1_Click(object sender, EventArgs e) … | |
I successfully created a C++ window but got an error message when I tried to add menus. I will surely appreciate any help to fix the issue. As follows is the code: #include <windows.h> /* Declare Windows procedure */ LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); /* Make the class … | |
Hello I am trying to send mail to customer with the details of product they brought but the code which I have written not showing the value of variable **total_list** Actually I need to send email regarding the product details purchased by user if they purchased more than 1 product … | |
Hi there, I m using jquery ajax function to get the data from server and i m getting the data in associative array on success, but now i want to convert that associative array in javascript, how i can convert PHP associative array in javascript array. Waiting for your quick … | |
Wow... I am baffled. I have a shopping cart script that works perfectly until I add in the following 3 lines of calculations What happens when that is added is that it stops the processing at that point altogether, and doesn't display the balance of the page, and yet when … | |
Good day, I have a module that upload a record using excel file, and that excel file will be save into the table.. actually i already created that but one ofmy requirement is to clear first the record in excel before it will be uploaded.. how could i clear the … | |
Hello, i'm kinda starting to feel out of my mind now. I am creating a simple web game. I am now in the process of putting some php codes here in game to have scores.My problem is that, My game's top score is the person who played the game very … | |
Hello I am having problems completing thi code in C# can someone please tell what I am doing wrong.I ge Error Error 1 Program 'C:\Users\stacey ann loretta\documents\visual studio 2010\Projects\EmployeeEceptionDemo\EmployeeEceptionDemo\obj\x86\Release\EmployeeEceptionDemo.exe' does not contain a static 'Main' method suitable for an entry point EmployeeEceptionDemo using System; using System.Collections.Generic; using System.Linq; using System.Text; … | |
I have a strange problem, I have written a for loop to check a list of words for a match and it is not checking all of the words: I am using two files to check for matched words (Enwords.txt - a list of English words and Encontract.txt - a … | |
Hello Every one i'm a newbie in vb.net and i am facing a little problem i hope that someone can help me. i made a little programme that i need at work witch have 15 textbox and in each textbox we will enter a data that will be saved in … | |
I have been told that in C++ the concept of a string does not exist. A string is just an array of type char. So in the following code, is message an array because it doesn't really look like one? char *message = "I am having trouble understanding pointers"; std::cout … | |
I'm having problem with passing argument to the linked list. I wait for user input then I parse this user input and put parsed tokens into dynamic array (char **c) After that I need to write ceratin user input into linked list (for example I need to pass c[1] to … | |
I have been playing around a bit and I want to know if you can update a global varaible... rowA = [] def printSeat(): global rowA print "A", rowA = ['*', '*', '*', '*', '*', '*', '*', '*'] print rowA print "B", rowB = ['*', '*', '*', '*', '*', '*', … | |
Hello, My script uses the user 'www-data' (my webserver) when connecting to the MySQL Database, while I tell it not to. <?php include ('config.inc.php'); $connection = mysql_connect($host, $user, $password); mysql_select_db($database, $connection); $shorturls = mysql_query('SELECT shorturl FROM `' . $prefix . 'urls`'); $shorturl = rand(100000, 999999); foreach(mysql_fetch_array($shorturls) as $row) { if($row['shorturl']==$shorturl) … | |
![]() | Hi I have problem getting XML file with curl. I get empty XML and error: Warning: simplexml_load_file() [function.simplexml-load-file]: I/O warning : failed to load external entity "1" in /home2/public_html/xmlupdate.php on line 62 xml 1 not loaded. the code for curl: $ch =curl_init(); curl_setopt($ch, CURLOPT_URL,$xml_url_1); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); … ![]() |
Hi guys, I m making an small aplication for buses but i got stuck with the string array conversion to a timespan array, i have to convert it i order to compare times later on but i don t know how... Here is the code string line; TimeSpan [] array; … | |
hello expertes i have 2 tables , both having same table structure (i.e. same fields ) but having different Records. First Table for Male Candidate and another for Female Candidate. both tables have 2 fields namely :- name and marks. Now i wanna write sql statement using adodb to perform … | |
Hi guys i was trying to integrate a very basic Client/Server chat software with Caesar Cipher. i just wanted to encrypt the communication using Caesar cipher. the Client/server chat software is using TCP sockets.i tried and integrated the cipher on client side but it encrypted all texts and its not … | |
Hi So I have a div with 6 links(categories of products), the beside this I have another div which I want to fill with the products for a chosen category when a link is clicked. I have a mysql table containing all the products with each category having a unique … | |
Hello, I have been fiddling around with this and no luck so far. So I am hoping someone can help me. I am making a time clock application. When you add an employee it creates a new directory using their name along with a .txt file used to store their … | |
As for my assignment I had to write a program to swap 2 digit number Example:- If user input 12 the swaped number Would be 21. Along with ALgorithm, and a short description on this program(As how will you solve this program or what measure you'll take to get desired … | |
I am trying to use such a hexadecimal floating constant "0x0.DAB789B" in java but it gives me java.lang.NumberFormatException. How can I convert hexadecimal float constant to decimal? I know how to convert hexadecimal **int** constant but that does not work for float constant. | |
Hi, I'm new to Python and am having trouble with this. Here's my code: import urllib, urllib2, re import xml.etree.ElementTree as ET from bs4 import BeautifulSoup # The get_zipcode(address) function will be called with an address string with # no zip code, such as 'Lowell Observatory, Flagstaff, AZ', and it … | |
Hi, I use this script to extract and insert the desired variables to mysql.It does the job. $xml = new SimpleXMLElement('file.xml'); foreach($xml->loanaccount as $mess){ $account_number= mysql_real_escape_string($mess->account_number); $main= mysql_real_escape_string($mess->main); $type= mysql_real_escape_string($mess->{'application-array'}->{'application-type'}), $date= mysql_real_escape_string($mess->{'application-array'}->{'application-date'}), //insert into databse mysql_query("INSERT INTO account (account_number, main) VALUES ('$account_number', '$main')") or die(mysql_error()); echo "inserted into mysql<br /><br … | |
i want to loop through each avaiable color in Color struct. Is that possible? | |
HI , I basically have made something that I require work in html but now trying to convert to get the results from data base but get this error and cant work out how to change it, if someone could help unexpected T_STRING, expecting ',' or ';' on line 69 … | |
Hi Hope someone can help with this. I have javascript set up how i want it in a normal html page but now need to ensure i can call a result using php with it. My code throws out an error The code states Parse error: syntax error, unexpected T_STRING, … | |
Hi i am working with an web application. in my webapp on the browser i am intiating an ajax call to update part of the page. I get the response as html from the server and i will insert the complete response into the div which displays it. I got … | |
I'm writing a VB.NET software application in which I want to plot some placemarks on a google map which is in a webbrowser control in the application. weburl = applicationpath & "/googlemaps.html" WebBrowser1.Navigate(weburl) To accomplish this I call a javascript function from VB.net in this button event: Private Sub Button1_Click_1(ByVal … | |
public class ClickListener implements ActionListener { public void actionPerformed(ActionEvent e) { System.out.println(e.getSource().setText("Changed")); } } Eclipse tells me that `setText()` is undefined for type Object. This tells me that `getSource()` doesn't actually return the JButton object. How do should I do this then? How I change the text of the clicked … | |
Hi :) I don' know how to hide some div with special class. This is my html code: <div id="subMain"> <div id="archivesResult_Content"> <div id="box"> <div id="categorie" cat="2"> ... </div> </div> <div id="box"> <div id="categorie" cat="14"> ... </div> <div id="categorie" cat="5"> ... </div> <div id="categorie" cat="14"> ... </div> </div> <div id="box"> … | |
Hey there. I'm having a bit on an issue with adding new data to an SQL table on my webserver. I'm trying to update data in the table through php, but for an unknown reason the script returns no errors but refuses to update the SQL table with the content … | |
Hi i have a checkbox in my script <input type="checkbox" name ="pulse[]" value="1" checked>1<br> <input type="checkbox" name ="pulse[]" value="2" checked>2<br> <input type="checkbox" name ="pulse[]" value="3" checked>3<br> <input type="checkbox" name ="pulse[]" value="4" checked>4 and in my program i read the value and i test if the choice was 1 send it … | |
Hi, Can anybody help me out to solve string handling without using predefined spilt function , here come the questions for eg i have a input string as "hai welcome to the sample " so i should display as follows hai welcome to the sample pls advice, thanks for your … | |
Hello, we are saving in the database time as our local time which is UTC+2 How to convert to other times? I found in that this should work: select sell_date, sell_date at time zone 'UTC+2' as UTC2 FROM cards order by id desc limit 1 This sql should return same … | |
Hi guys, I have this code - I am trying to find if a number is present in a given array using recursion. The thing is, I get the error "not all code paths return a value". I don't know how to fix this. Please advise. using System; namespace checkArrayForValue … | |
(Just to preface this, I am a Python noob, so parts may be stupid/less obvious to me) I am trying to compile a Python script to exe, with the following setup.py file: from cx_Freeze import setup, Executable includes = ["re", "PyVMF"] setup( name="Wall Tile Randomizer", version="1.2", description="Wall Tile Randomizer", executables=[Executable("WallRandomizer.py")], … | |
I have doubt that what we are using in java as String, is it class or datatype? String str = "hello" String s1 = new String("Hi") What is the difference in above two statements? Which is object of String class and which is varialble of datatype String? Because as i … | |
hey, just looking for a bit of advice on code readability, i've figured out a new and i hope better way to handle collisions but the when reviewing the code it all just blurrs together for me so is there some format teckneuqies i can use so its easier for … | |
My code is rather basic so excuse my lack of shell scripting experience. I keep getting errors for line 3. I have tried changing "$1" to `echo $1` `cat $1` and even turning the whole line into a variable which i read in another forum and then calling that variable … | |
Hello I have made a simple program, but I have a problem with my IF...ELSE statement. Il explain under the code. Main Class: public class Learnt { //Main void in Learnt class public static void main(String args[]){ //Ask's user for name then prints it String AskForUsersName = "What is your … | |
Hey guys ineed help on how to install or which is first to install using VS 2008 and MS SQL server & and IDE server management tool for MSSQL 2005 | |
I have this part of code, ajax will call a function saveContact with parameters name, phone, email, address, is this code ok? $.ajax({ url: 'addressbook.php', data: 'action=saveContact()','&name='+name+'&phone='+phone+'&email='+email+'&adresa='+adresa; dataType: 'json', type: 'post' | |
i have to display a combo box with some dynamic values that comes from the database when user checked a checkbox on the currently being viewed html page. I am getting dynamic values from the webserver as json or xml. Now i have take the values from the json or … | |
Hello, I would like to build my application which is interacting with my localhost database. In netbeans before I run the program I need to turn on Wamp and "Start all services" in order for the program to run properly. My question is, when the jar file is made, will … | |
Hello,,, Im trying open flash file on button click event, but its didn't open, when i write Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click AxShockwaveFlash1.Movie = "D:\My Project\Practice Projects\SWF-File_As_SplashScreen\SWF-File_As_SplashScreen\Resources\back_blue.swf" AxShockwaveFlash1.Play() End Sub then its properly work and play,, but i build this app and published … |
The End.