7,373 Topics

Member Avatar for
Member Avatar for noamwegner

Does anyone know if i can write a generic javascript function that check the file extension of the uploaded files and if the extension is incorrect erases the value because the user upload's more then one file i want to get the ID from the form something like: [CODE]fileselectedchange(obj) { …

Member Avatar for Luckychap
0
4K
Member Avatar for debasishgang7

Hi,i want to access the filename of a any file using python.Ex. Suppose a folder contain some files Picture1.jpg,picture2.jpg,mypic.jpg..etx i want to make a program which will print all the file name Picture1.jpg picture2.jpg mypic.jpg of the certain folder.And the folder can have random file name but with .JPG extension. …

Member Avatar for TrustyTony
0
109
Member Avatar for iainiow

Hi, I have written a polling service that checks a directory for new files & then distributes them to new locations. The service is so quick, that no soon as the file has arrived in the watched folder, it is moved in to its new location. One concern that I …

Member Avatar for iainiow
0
79
Member Avatar for chaliworm

please help need a code tht calculates number of hits and misses in the cache from a adddress file with addresses stored as hexadecimals stored on th hard drive.these hexadecimals should first be changed into binary.. ive read some psuedo codes buh i seriosly dont know were to begin the …

Member Avatar for Ezzaral
0
257
Member Avatar for gcclinux

Hello everyone, I am trying to write to a file what I am currently displaying on the console. I have a bit of code that works fine by creating a list of files based on it's file extention and it then displays it using println: What I want it to …

Member Avatar for gcclinux
0
199
Member Avatar for perlnoob

I just want to ask what this code practically means? [CODE]<xsl:variable name="gSetValues" select="toolPackage:setValues($obDateFormat,$gDocID)"/> <xsl:variable name="gSmi" select="normalize-space(toolPackage:PubMetaDataReader.getEntry($gKey, 'smi'))"/> <xsl:variable name="obDateFormat" select="toolPackage:LNDateFormat.new('<input format date>', '<output format date>', 'ENGLISH', 'German', '19000101', '365', '19000101')"/> <xsl:variable name="vFormattedLoadDate" select="toolPackage:reformat($obLoadDateFormat,$gLoadDate,$gDocID)"/>[/CODE] I don't understand the 'totalPackage' followed by setValues,LNDateFormat,PubMetaDataReader.getEntry,reformat ? How can I connect each different 3 XML …

Member Avatar for xml_looser
0
297
Member Avatar for Jennifer84

Hello I read in alot of text into a Memorystream. Now I have to find a way to write this stream a chunk at a time to the text file. I have outlined the code that will not work in this case. As seen I do read in chunks of …

0
79
Member Avatar for Christoph928

I'm relatively new to this and need help counting the number of times a user provided word appears in a user provided file this is what I got:[CODE]#include <iostream> #include <fstream> #include <string> using namespace std; int main() { ifstream infile; string str, filename; int count, num; count = 0; …

Member Avatar for bharathmakawana
0
176
Member Avatar for t_man700

Hi guys, I've got a question that hopefully someone can answer. I have a file that contains the following structure: g hub f 100 200 300 12 f 356 403 345 484 f 333 212 1203 393 g door glass f 323 9292 383 f 32 3838 3939 f 1231 …

Member Avatar for WaltP
0
396
Member Avatar for Clinton Portis

Trying to make a quick little tool in response to the [URL="http://www.msnbc.msn.com/id/42348642/ns/technology_and_science-security/"]FBI's request for assistance[/URL] on cracking a code.. getting an error that takes me outside the scope of my program.. not sure what is causing the problemo. Maybe another set of eyes can help: [CODE] #include <iostream> #include <fstream> …

Member Avatar for Clinton Portis
0
245
Member Avatar for disposable_zero

OK I'm pretty green at this so do bear with me. What I want to do is have an area where people can upload files to me. I found a script that I'm trying to make work and I've almost got it there but I'm having an issue. Everything actually …

Member Avatar for disposable_zero
0
112
Member Avatar for BLUEC0RE

My original plan was to pipe "ls -l", get the permission string that represented the file in question. Translate the string of 'r's 'w's 'x's '-'s into 0s and 1s then convert it from binary to octal. This seems really cumbersome and annoying and I gotta figure there is some …

Member Avatar for BLUEC0RE
0
174
Member Avatar for jalpesh_007

I have made floyd warshall algorithm. I need some help for finding shortest path from source to destination. We have to give source and destination. Eg. Program gives us output like source=A and destination=D then shortest path is A-B-D with distance 10. I also give the code for that in …

Member Avatar for rubberman
0
371
Member Avatar for Bladtman242

[B]TL;DR:[/B] I am asking for help considering the structure on the following code, and advice on code structure in general. The problem in this case is the try blocks, which are messing up the scopes and complicating error handling. I will elaborate a little for the more patient readers below …

Member Avatar for Bladtman242
0
228
Member Avatar for rssk

Hi all... I am trying to upload 4 files on a local disk, onto a remote ftp server. All of them are in the same folder(in local machine). I am using the storbinary function of ftplib. Following are the file sizes: 1-- 70 KB 2-- 60 KB 3-- 73 KB …

Member Avatar for rssk
0
887
Member Avatar for Labdabeta

I am having a lot of trouble getting the following to work and I think it is because of file issues: [CODE]int GetMinutes() { fstream file(FNAME); char num[101]; if (!file.is_open()) Error("FILE NOT OPEN!"); file.getline(num,100); file.close(); return atoi(num); } int main(int argc, char *argv[]) { LARGE_INTEGER timestart, timestop, tickspersecond; QueryPerformanceFrequency(&tickspersecond); QueryPerformanceCounter(&timestart); …

Member Avatar for WaltP
0
135
Member Avatar for littleleaf

This is a program for displaying image files. I downloaded this program template from Microsoft. I executed the program and open an image file to display, and everything seems to be working fine. However, when I continue to open another image file - which is different from the first one …

0
71
Member Avatar for danholding

[CODE=php]<?php if (isset($_FILES["file"]["name"])) { if ($_FILES["file"]["type"] == "application/x-download" || ($_FILES["file"]["type"] == "application/octet-stream" && strrchr($_FILES['file']['name'],'.')==".odt") || $_FILES["file"]["type"] == "text/plain") { if ($_FILES["file"]["error"] > 0) { echo "Return Code: " . $_FILES["file"]["error"] . "<br />"; } else { echo "Upload: " . $_FILES["file"]["name"] . "<br />"; echo "Type: " . $_FILES["file"]["type"] . …

Member Avatar for danholding
-4
554
Member Avatar for plang007

[B]****Output[/B] There were 305 birds in this list. Species: Snow_Goose Number: 305 There were 567 birds in this list. Species: Canada_Goose Number: 567 There were 4 birds in this list. Species: Tundra_Swan Number: 4 There were 31 birds in this list. Species: Wood_Duck Number: 31 There were 60 birds in …

Member Avatar for plang007
0
247
Member Avatar for harish.tiruvile

I dont know shell scripting, It will be great help if someone help me in writing the script for below requirnment Requirnment: I have a file in which sql quires are written.I have to replace content of that file. sql file looks some what like below [CODE] #partial content of …

Member Avatar for thekashyap
0
108
Member Avatar for sureronald

Hi everyone. I have an application where users submit text files and then based on some rules, the application gives instant responses of whether the submitted text file is right or wrong. What actually happens behind the scenes is that I have the correct text file on the server and …

Member Avatar for sureronald
0
181
Member Avatar for blueangel

How to upload file with oracle database 10gR2?? i can't find how to upload.. i've tried to create a procedure in oracle and execute in netbeans but the file save in directory and then from directory save to database. it means the file save in 2 location, in directory and …

0
86
Member Avatar for aposse

Hello everyone I'm using dreamweaver CS5. I have widgets like slideshow filmstrip; youtube; and twitter im trying to upload unto my server go daddy, but it doent reconize my spry can anyone help. Aposse

0
63
Member Avatar for llocar

Hi. I'm wanting to append some information to a file, which is found in a different file. I have simplified the problem using animals. Here is the basic code to add the line to the file: [CODE]grep "some important info about rabbits" rabbits.data >> rabbits.txt[/CODE] Very simple, but this must …

Member Avatar for llocar
0
125
Member Avatar for ashvamedh

hey friends... i am using fedora 13... when i am trying to access a database i am getting this error-- mysql> use bgm_scr; ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'bgm_scr' --------------------------------------- i also tried accessing by switching to superuser.. but i get this error -- [CODE][user@localhost …

Member Avatar for davidchilders
0
209
Member Avatar for xxreenaxx1

I can read from files that are uploaded but now I would like to INSERT the data entered on the file to be inserted to mysql database. But not sure how this work. Tried to search few term and I have tested few methods. Nothing works. [CODE]<?php if ($_FILES["file"]["error"] > …

0
65
Member Avatar for Wheaties

Hello. I've got a homework assignment involving reading an unspecified number of numbers from a data file, storing it into a dynamically allocated array and doing various sorts and such(the output is basically a list of grades on some test that I do stuff like sort, average, give an accurate …

Member Avatar for jonsca
0
173
Member Avatar for divyakrishnan

Hi... I have a problem to load a PDF file which is stored on another machine.I had loaded the PDF on the same machine using following PHP script.Here I had used a hyper link to load PDF. [CODE] <?php $file="first"; $pdfFile=$file.".pdf#page=1"; ?> <a href="<?php echo $pdfFile; ?>" target="_blank" > Click …

Member Avatar for divyakrishnan
0
772
Member Avatar for TheDocterd

Hi There I just wanna find out how I can save some data to a text file or access database (doesn't matter - the one that's the quickest). What my form does is it has a list box with ID's in it. I can select them. Then I have a …

Member Avatar for AndreRet
0
192
Member Avatar for masterjiraya

this is the code for selecting the file to be deleted by the user [CODE=HTML] <title>File Delete</title><form enctype="multipart/form-data" action="delete.php" method="POST"> <input type="hidden" name="hidden1" value="file to be uploaded in AldrichSample folder" /> Please choose a file: <input name="deleted" type="file" /><br /> <input type="submit" value="DELETE" /><br /> <input type="reset" value="cancel" /><br /> …

0
59
Member Avatar for shyla

the letter e is the most frequently used letter in the english language, and the letter z is the lease used. a friend of yours doing a blah blah believes that this may not be necessarily be true of writings of first year college students. to test his theory, he …

Member Avatar for shyla
0
1K
Member Avatar for fidolas7

1.<?php 2.$con = mysql_connect("localhost","root","")or die (mysql_error()); 3.mysql_select_db("registration", $con); 4.function protect($value){ 5.$value=mysql_real_escape_string($value); 6.$value=stripslashes($value); 7.$value=strip_tags($value); 8.} 9.if(isset($_POST['upload']) && $_FILES['file']['size'] >0) 10.{ 11.$fileName = $_FILES['file']['name']; 12.$tmpName = $_FILES['file']['tmp_name']; 13.$fileSize = $_FILES['file']['size']; 14.$fileType = $_FILES['file']['type']; 15.$fp = fopen($tmpName, 'r'); 16.$content = fread($fp, filesize($tmpName)); 17.$content = addslashes($content); 18.fclose($fp); 19.if(!get_magic_quotes_gpc()) 20.{ 21. $fileName = addslashes($fileName); 22.} …

Member Avatar for dornaled
0
90
Member Avatar for Dean_Grobler

Hi there guys, I recently swtiched to Ubuntu Lucid, and just want to know if there is something like an "App store" for Ubuntu apps? Since my Ubuntu machine is not connected to the net, i can't use the software centre. So I have to download the packages and install …

Member Avatar for Dean_Grobler
0
248
Member Avatar for mariko

First of all, I would like to apologize if I have posted this in the wrong forum. If I have made this mistake, please tell me where this should be placed and I will quickly fix that. Okay, now to the problem. I downloaded a zip file and extracted it …

Member Avatar for mariko
0
484
Member Avatar for Unseen Machine

Hi folks, I have googled around, read a lot and still can't figure it out. I know a bit of C++, but am far from literate in all commands. I am much happier with QBasic (old i know, but it works). I have made qb code and need to convert …

Member Avatar for mike_2000_17
0
344
Member Avatar for Ssnowlin

I have a reg text box and just want to add the save command, I managed to figure out how to do open but save is giving me problems. I am fairly new at VB.net been coding less then a week so I need all the help you can give …

Member Avatar for Ssnowlin
0
114
Member Avatar for shack99

Hey everyone, I've got a problem. Say I've got two xml files, a student file and a class file. The class file displays all the students in a class; eg- [CODE] <Class> <Student> a </Student> <Student> b </Student> <Student> c </Student> </Class> [/CODE] And the student file stores the details …

Member Avatar for ddanbe
0
113
Member Avatar for khaos64

I had recently made a .bat file that read a couple lines from file.txt and assigned them as variables then went through the execution of the bat which ended up deleting the original file.txt and writing the new values to a new file.txt. Now I want to convert this to …

0
121
Member Avatar for banannamoofin

I am currently having problems displaying a file correctly once i have written a dictionary to the file. For this program the input file needs to have the format: ID: Date: Dayskept: ProductName e.g. 1:12/12/2011:12:A This is fine the first time I read the example file into a dictionary, but …

Member Avatar for TrustyTony
0
213
Member Avatar for nayefc

Hello Everyone, I am trying to emulate a T9 (cellphone) keyboard in C. So lets say a user types in the numbers "23", a possible word combination would be "be". In my question here, I will only write down a part of what I have assuming it only works for …

Member Avatar for L7Sqr
0
209
Member Avatar for fidolas7

<?php $con = mysql_connect("localhost","root","")or die (mysql_error()); mysql_select_db("registration", $con); function protect($value){ $value=mysql_real_escape_string($value); $value=stripslashes($value); $value=strip_tags($value); } if(isset($_POST['upload']) && $_FILES['file']['size'] >0) { $fileName = $_FILES['file']['name']; $tmpName = $_FILES['file']['tmp_name']; $fileSize = $_FILES['file']['size']; $fileType = $_FILES['file']['type']; $fp = fopen($tmpName, 'r'); $content = fread($fp, filesize($tmpName)); $content = addslashes($content); fclose($fp); $sql = "INSERT INTO signup_image (name, size, …

Member Avatar for tomato.pgn
0
108
Member Avatar for asif49

I've been making a program which reads several strings from a Notepad file which's location is set through user input. Then they enter a string which is in the file, a positive message is shown if it's not then a negative one is shown. However I can only scan the …

Member Avatar for javaAddict
0
88
Member Avatar for Prateek Salian
Member Avatar for linezero

I have tried many ways to download the files in a listbox. non-seems to work. the listbox has url eg: [ICODE] [url]http://www.hahaww.com/2.pdf[/url] [url]http://www.hahaww.com/f1.pdf[/url] [url]http://www.hahaww.com/24.pdf[/url] [/ICODE] I want to download the files until ListBox.Items.Count = 0 which each file with number ording... for eg: 2.pdf will be 1.pdf f1.pdf will be …

Member Avatar for codeorder
0
738
Member Avatar for Arjun_Sarankulu

[CODE]File.Delete(saveFileDialog1.FileName);[/CODE] Giving error in the above code giving exception as not a legal action form Can any one help Actually From main Function m calling a function(which writes and creates the file asking from savedialog1) and after retruning from function it browse for another file to read if user is …

Member Avatar for Knvn
0
92
Member Avatar for paresh_thummar

I use [CODE] FileUpload.Filename = lbl1.text.ToString(); FileUpload.SaveAs(Server.MapPath("~/Photo/AllPhotoes/" + FileUpload.FileName)); [/CODE] and i got Error: Property or indexer 'System.Web.UI.WebControls.FileUpload.FileName' cannot be assigned. it is read only. I want to save image with label name which is hidden. and it get new value each time. how can i change image name with …

Member Avatar for kesaven
0
174
Member Avatar for neoic91

Write a program to allow a user to do conversions between two different units of measurement. So the user might type in an amount, and the names of two units of measurement, for example: 5, ounce, gram In this case the program should then print out the number of grams …

Member Avatar for neoic91
0
90
Member Avatar for McCurry0x77

If I have an application written in Java, how can I make it available for purchase/download on my website? Namely, how do I obscure the source code so it can't be viewed, yet enable it to be executed by any machine (including ones that don't have the JVM installed)?

Member Avatar for sirlink99
0
195
Member Avatar for salty11

In this program i am trying to find numbers that are multiples of 7,11, or 13, also if the total of the numbers is even or odd also the square root value of each number also if there are any prime numbers in the list [CODE]#include<iostream> #include<iomanip> #include<fstream> #include<cmath> #include<conio.h> …

Member Avatar for frogboy77
0
314
Member Avatar for slygoth

I have this code but the floats wont print to the file. Everything else prints and works well but the floats i see 0.000. Can someone tell me where im going wrong. I already declare them in the struct as float apaid; float tpaid; [CODE] customer customerinfo(customer info) { FILE …

Member Avatar for gerard4143
0
290

The End.