64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for bolfescu

<?PHP include('config.php'); function cleanData(&$str) { $str = preg_replace("/\t/", "\\t", $str); $str = preg_replace("/\r?\n/", "\\n", $str); if(strstr($str, '"')) $str = '"' . str_replace('"', '""', $str) . '"'; } // filename for download $filename = "Piante_" . date('Ymd') . ".xls"; header("Content-Disposition: attachment; filename=\"$filename\""); header("Content-Type: application/vnd.ms-excel"); $flag = false; $result = mysql_query("SELECT * …

Member Avatar for bolfescu
0
703
Member Avatar for mattyd

Hello. I have one field on my submission form which is for the User's zip code. Originally I had it set to int(5), but when I submit my form with a five digit zip code it only stores 4 of the characters, omitting the first digit. Example: On the form …

Member Avatar for mattyd
0
222
Member Avatar for coder91
Member Avatar for coder91
0
100
Member Avatar for dendenny01

I am trying to execute the query on server side and send the result to the client but at the time of returning the value to the client the error occurs Am trying to achieve this using RPC Protocol but i could not find out how to send back the …

Member Avatar for dendenny01
0
422
Member Avatar for karmstrong

I am attempting to convert a C application to python. I am having difficultiy on this particular for loop. Any ideas how I might proceede? bool Enigma2C::encrypt(char *inString, char *outString) { int16 csum = 1, checksum = 0; int16 tmpSum = 0; int16 i = 0; strcpy(m_keyCode, inString); // Calculate …

Member Avatar for Leslie_1
0
632
Member Avatar for Hani1991

Hello everybody. You might see that many websites such as Facebook recognize your device even after you clear the cookies of your browser, RIGHT? Try to you log in Facebook, then log out and clear the cookies, then re-open the homepage of Facebook. You'll see that the username you used …

Member Avatar for arjani10
0
219
Member Avatar for mattyd

Hello, I have just attempted to update my database login page to MySQLi and also use prepared statements but upon submitting a form I receive the error "Access denied for user 'admin'@'localhost' (using password: NO)". I have been researching this before posting this here but have only come across sites …

Member Avatar for diafol
0
850
Member Avatar for ramsiva

Hi I am facing problem for getting difference between hours and miuntes I have two variables $one=9:30 am; $two=6:30 pm; How to get difference in Hours and minutes

Member Avatar for ramsiva
0
265
Member Avatar for berserk

I am in need of help on this one :( i cannot seem to figure out what i have done wrong, i set up my code just like in teh examples i read and i dont really see anything wrong with the logic (as far as i can tell) but …

Member Avatar for berserk
0
326
Member Avatar for Ian_7

Hello All, I am trying to implement a program that takes a prefix expression/string and converts it into a postfix string. I looked up the general algorithim for this converson and tried to implement it myself into this program. The following code is taken from my main java file. My …

Member Avatar for Ian_7
0
1K
Member Avatar for baudday

Hey everyone! I'm brand new to Android and have been working on a very basic app that just takes a picture with an image overlay and saves it. So far I have figured out how to get the camera preview, take a picture, and do an image overlay on the …

Member Avatar for Schol-R-LEA
0
2K
Member Avatar for ramsiva

I am facing to dispaly multiple values in another text box this is my code $("#firsttearesult").val(diffHour,diffMins); Any body help me to display both

Member Avatar for DaveAmour
0
138
Member Avatar for AntonyRayan

Hi , I have no idea for this, I am displaying images from db dynamically, by clicking gallery link I dislay all the images, but I want to display by folder type for a set of images. Can anyone help for me?

Member Avatar for DaveAmour
0
162
Member Avatar for entropicII

I have recently been writing some code that asks the user questions about german. br = new BufferedReader(new FileReader("C:\\Users\\Patrick\\Desktop\\Java Workspace\\germanTool\\src\\germanTool\\lesson1.txt")); String[] engList = null; String[] deuList = null; int i = 0; while (br.readLine() != null){ lineCount++; line = br.readLine(); engList[i] = line.split("\t")[0]; deuList[i] = line.split("\t")[1]; } Using this code …

Member Avatar for entropicII
0
222
Member Avatar for brandon66

Im trying to implement queue with a linked list i think i have the enqueue function correct but im having problems with the dequeue. I can get it to delete the first number but then the rest of the list is empty can someone point me in the right direction? …

Member Avatar for brandon66
0
247
Member Avatar for Saeed_3

consider a vector R whose coordinates xyz are given by R1,R2 AND R3.the length of the vector R is calculated as R len=squareroot of R1Squared+R2squared+R3squared.write a c++ program to prompt the user for the vector coordinates values and calculate and display the vector R length.please help me with the code …

Member Avatar for Schol-R-LEA
0
380
Member Avatar for learningjav

Create a class to represent a Book. A Book should have a title, author, edition, and number of pages. Choose the most appropriate types for each of these and make them private. Provide set and get methods for each of the instance variables. Also, create a toString() method that returns …

Member Avatar for learningjav
0
86
Member Avatar for jj.dcruz

I'm using pure php for the moment and I'm having a problem on what to do next using the command `DESCRIBE` calls all the header of my database but I cannot call those datas under the headers I have to manually put it. What I want to know is: * …

Member Avatar for jj.dcruz
0
313
Member Avatar for showman13

Good Morning all, Hopefully someone can head me in the right direction. I know nothing about perl or cgi but have a script that I purchased and had modified by a programmer half way around the world. He uploaded it to my development domain and the script works just fine... …

Member Avatar for 2teez
0
335
Member Avatar for showman13

Good Morning All, I've worn myself out looking for the solution to integrating MailChimp APIs into my PHP scripts. Is there anyone in here that is familiar with doing that? I have the simple part done, where people can subscribe to a Newsletter to get more info, in which case …

Member Avatar for showman13
0
711
Member Avatar for furalise

Hi again everybody. I know there are some references to this kind of thing around the web but none of them are simple enough for me to understand. In my code below, I am trying to initialize a function pointer with a class member function but I'm not sure I …

Member Avatar for furalise
0
504
Member Avatar for AJN25

Hi guys I am creating a basic application and have set up a database in which i can pull data but im struggling to figure out how to split a listbox into 2 columns, any ideas would be much appreciated Thanks in advance Andy

Member Avatar for AJN25
0
367
Member Avatar for Papa_Don

Hi Group, I attempting to save a file to a specific folder that is begins with the hotels property number. Currently I've manually listed the properties complete folder name in a text file. This is proving to be a management problem that needs to be fixed. The code I'm using …

Member Avatar for Papa_Don
0
288
Member Avatar for Aaron_JY

I know it's something I'm doing wrong, but I can't seem to figure out what it is. The console reads the text you input and replies to what you have sent with a message set specifically for your input message. When I input "hello", it replied with "Hello! How are …

Member Avatar for muhammads744
0
743
Member Avatar for Madhu_5

Plz tell step step procedure to play music in my Microsoft visual studio 2005 for my opengl projects

Member Avatar for djjeavons
0
220
Member Avatar for Gurjit_1

I know many if us are laughing seeing this question , but if i have taken some floating point value and I want if the result is integer it should have some decimal point answer eg - 1 can be integer number I want 1.0 to appear in my result. …

Member Avatar for DavidB
0
393
Member Avatar for Darth Vader

Hello, I am trying to restrict to maximum type 60 words in a textbox. I have tried to put a code that check if we have more than 60 words. The code restricts to 60 words but when I loop the textboxes words and put back the string (up to …

Member Avatar for DaveAmour
0
245
Member Avatar for vizz

With following code I tried to upload image and video file at the same time but, image file is uploading & video file is not uploading <form class="pure-form pure-form-aligned" action="Processor.php" method="post" enctype="multipart/form-data" > <fieldset> <div class="pure-control-group"> <label for="image">Upload image</label> <input type="file" name="image" class="pure-input-1-4" /> </div> <div class="pure-control-group"> <label for="video">Upload video</label> …

Member Avatar for jj.dcruz
0
1K
Member Avatar for Mayukh_1

**Okay this is my first post and I am quite excited that how it will be recieved by the community. I have a long experience in C++ programming but never been a part of any community hence I believe that as a tyro, my mistakes will be ignored.** This post …

Member Avatar for NathanOliver
0
309
Member Avatar for Suzie999

I'm printing some strings to the output console to visualise an array, so I'm looping though a string array and using `Debug.Write(array[x,y] + "\t")` etc... All was fine before I went to bed, and the output was fine, like this. "type-b flat three core 29/03/2015 23:34 6 £13.65 wire grade" …

Member Avatar for Suzie999
0
115
Member Avatar for iPoor

I have a file download code in vb .net but when i try to download any file (.rar in this case) everything downloads properly but when i open the .rar file WinRAR shows "The archive is damaged!" but when i download the same file from IDM its perfect and no …

Member Avatar for iPoor
0
4K
Member Avatar for bLuEmEzzy

Guys what is wrong with my code? Why it gives me an output "hi"! Can you explain it to me. Please. Thank You! <?php $a = "Unemployed"; if ($a == "Employed, Locally" or "Employed, Abroad"){ echo "hi"; } elseif ($a == "Unemployed"){ echo "hello"; } ?>

Member Avatar for bLuEmEzzy
0
120
Member Avatar for VengefulToast

Hello, I am wondering how I would access an element on a List? Is it something to do with the iterator? list<Element*> _children; _children.push_back(child); _children.push_back(child); For example, how would I access the "children" of this list? Thank you.

Member Avatar for VengefulToast
0
127
Member Avatar for karmstrong

I have a list in python that I am printing to the screen. The current format is Option Key: [0, 3, 6, 8, 8, 5, 2, 0, 7, 1, 9, 5, 0, 7, 7, 4, 2] I would like it to be Option Key: 0 3688 5207 1950 7742 I …

Member Avatar for vegaseat
0
482
Member Avatar for James_43

Hi everyone, I am still quite new to HTML and PHP. I have a form in HTML pointing to a PHP script that sends an email. But it doesn't work - please tell me where I am going wrong! The HTML is: <div class="main-content three-fourths"> <h1>Get in touch</h1> <p class="lead">We'd …

Member Avatar for Kyle Wiering
0
479
Member Avatar for New Jack

My project is seperated into two files(a head file and a implementation file). But when i run the codes it comes the errors as follows: // my codes are as follows: //first file (first_homework.cpp) // //second file(first_homgwork.h.cpp) ![second_file.png](/attachments/small/4/6ca3bf23448c644fcb97b2f9d86316eb.png "align-left") I will appreciate it if anyone can be capable to give …

Member Avatar for New Jack
0
261
Member Avatar for Emma Etigu

hi guys I need assistance with SQL insert statement to an access database. I want to insert values to a particular table if the text box value is less than 0. below is the sample code. dim value4 as integer if integer.try parse(textbox4.text) then if value4 <=0 then dim cmd …

Member Avatar for DaveAmour
0
294
Member Avatar for XxAaronxX

Hey Guys, Ive been having a bit of trouble with a program which rolls dice for the game risk. Ive been able to implement number of dice choice selection for both attacker and defender, and to get them to roll the results. The part I am trying to implement now …

Member Avatar for XxAaronxX
0
472
Member Avatar for HuePig

Hi, I have an `unsigned char c[16]` and I need to read 2 char at a time and put those in an index. Heres what I have so far. std::istream& function(std::istream& aIStream){ for (int i = 0; i < fSize; i++) { //this is not working.. // I tried static_cast<char*> …

Member Avatar for マーズ maazu
0
249
Member Avatar for Tycellent

Hey everyone, I'm trying to convert some values to ASCII characters. I understand that this is possible through means of something like this: std::cout << (char)0x31 << std::endl; // prints 1 std::cout << (char)0x4C << std::endl; // prints L However, my problem is that i have char array that contains …

Member Avatar for マーズ maazu
0
299
Member Avatar for overwraith

So the other day I was just experamenting with some code, just for fun, and I ran into some difficulties. So I suppose my question is why the following code does not write to the original bigints array. I am sure I am doing something dumb, but please bear with …

Member Avatar for overwraith
0
312
Member Avatar for AQ

Hey guys i need some help.. Here is my code given below + the question statement.. The problem is simple i just wanted to ask what and how i can use variable to calculate average in array questions.. Problem Statement: "Write a program that declares an array of 25 integers …

Member Avatar for AQ
0
235
Member Avatar for shahera.arafat

hi ^_^ I want to write a code to set an (error) text in the Jtextfiled if the number contains more than 1 dot (eventHandling)! but my code actually didn't concatinate with the next digits I've enterded ,for example:(2. ) and stop ! so what is the right solution ?!! …

Member Avatar for shahera.arafat
0
254
Member Avatar for kayleigh0411

I am creating a doubly linked list and printing a backwards function. Everything is working great in my code, but when the function is printed in reverse, I need it to say NULL at the end, as it does going forward. When I put puts("NULL") (line 193) it splits up …

Member Avatar for kayleigh0411
0
281
Member Avatar for Emma Etigu

hi people how do I select a specific row in a data grid view to be updated. the row contains item number, item name and price. thanks

Member Avatar for Emma Etigu
0
335
Member Avatar for Tcll

As the title implies, what I want to do is create main.py and have it open a window. after the window is open, I want to edit main.py, and when finished editing, hit File -> Reload in the window's menu bar. what's expected is for the window to update with …

Member Avatar for Tcll
0
12K
Member Avatar for shahera.arafat

hi everyone :) I have a problem here >>which I can't add 2 numbers >> and I don't know what is the solution for that !!>>it always gives me an empty result !and that is because (num2) always parse a (null) value ! so how can I edit the value …

Member Avatar for shahera.arafat
0
301
Member Avatar for CodeWarrior14

I'm writing a program tha calculates linear regression, one of the values that are generated is the r (linear correlation coefficient) value. However, my algorithm doesnt work. I implemented the r value from the formula located at [Click Here](http://mathbits.com/MathBits/TISection/Statistics2/correlation.htm) Here is my code: long double LinearRegression::calculate_r() { long double r; …

Member Avatar for CodeWarrior14
0
441
Member Avatar for ramsiva

my index page <script type="text/javascript"> $(document).ready(function(){ $("#first_name").blur(function() { var first_name = $('#first_name').val(); var fathermobile = $('#fathermobile').val(); if(first_name=="") { $("#disp").html(""); } else { $.ajax({ type: "POST", url: "detail.php", data: 'first_name='+ first_name +'fathermobile='+fathermobile, success: function(html){ $("#disp").html(html); } }); return false; } }); }); and my detail.php <?php include("include/connect.php"); if(isset($_POST['first_name']) && isset($_POST['fathermobile']) ) …

Member Avatar for ramsiva
0
248
Member Avatar for newcoder310

I have a `jsp` page where I enter a username and click on a submit button. On clicking this button, I post the username along with a hidden target page value to the other application. The other application does its processing and issues some cookies and redirects to the target …

Member Avatar for DaveAmour
0
169

The End.