7,373 Topics
![]() | |
Hi, I am using php and html and i am trying to make two buttons: - Print button: that print a specific picture (not the whole page) - Download button: which will display the save as window to save a picture. Do you know if this is possible and how, … | |
I have an application that I wrote that allows users to upload files (pictures or PDFs). I am using IIS 6 and php 5.4. The problem I am having is that it seems like file uploads are getting cached somehow. For example, if I upload the same file over and … | |
hello i want to download file in asp.net using c#? i upload a file with filename+ path+guid.. i want to download this file on page ..user can see download file link and download the file how its possible in asp.net Using c#...? kindly tellme as soon as possible thanks in … | |
This code snippet allows you to list the files in a folder sorted by "last modified date". The tuple returned by the os.stat() function contains amongst other things the last modified date, which is then converted by the time.localtime() function to a tuple that is ideal for sorting. You can … | |
Cannot delete rename move copy cut file there are no optinos to do it.. like a normal file u right click and u get a pop up with move copy rename delete etc...Its a movie file mpeg and when i right click... it just says: play . que-it-up . add … | |
how to compare string in file e.g i have file with name data.txt with file like this 123456 abcdef 456897 asdffg 789654 gfdsah the question how to compare that file and i now that string with content alphabet or number and i want make make new file data2.txt from data.txt … | |
Assume that the following data is stored in file “data.txt”: 2 5 7 1 12 -999 1 4 11 55 66 3 43 23 -999 9 87 56 34 22 12 21 -999 8 7 5 4 6 111 -999 The number -999 at the end of each line acts … | |
Since I keep seeing people asking how to read the Integers from a File, I figured this simple snippet might be useful. What it does is it creates a new Scanner Object based on the File Object "test.txt" then it reads all of the Integers from that file, skipping over … | |
Hi! In my program I have to calculate the Adler32 checksum of a file, but I've a problem in using this algorithm. The function prototype is: unsigned long adler32(unsigned long adler, const char *buf, unsigned int len); I know how to calculate the Adler32 checksum of a string, but in … | |
I'm not really sure how to word it, if it is possible, but part of my program reads from a text file. It then pulls out the necessary information needed from that file by finding key identifiers. Right now the code is written to find the first key identifier and … | |
I am accessing images from another website. I am getting "failed to open stream: HTTP request failed! HTTP/1.1 400 Bad Request " error when copying 'some(not all)' images. here is my code.[CODE]$img=$_GET['img']; //another website url $file=$img; function getFileextension($file) { return end(explode(".", $file)); } $fileext=getFileextension($file); if($fileext=='jpg' || $fileext=='gif' || $fileext=='jpeg' || … | |
Hi :). I use this code to create a file: #include <cstdlib> #include <fstream> using namespace std; int main () { ofstream file("main/articles/giraffe/article.txt", ios::out); file.close (); return 0; } How can I simplify **create path of folders** (on **unix system**) "main/articles/giraffe/" - if folder "main" doesn't exist? With using standard … | |
How can i upload an image in my php comment box here it is: <?php $act = $_POST['act']; if($act == "post") { $name = $_POST ['name']; $area = $_POST ['area']; @$fp = fopen("comments.php", 'a'); if (!$fp) { //The file could not be opened echo "There was an error! Please try … ![]() | |
Dear all, I am trying to read a list of string from text file and put it into an array. Could anyone tell me, how to split that string to array. Here's my text file.... [I]text.txt[/I] a b 1 2 4 2 3 1 *3 1 3 *4 4 4 … | |
Hi, I would like to the code below to search the contents of file1 in file2 and then output results arranged according to file1 contents. At the moment the code outputs are according to the order of elemnts in file2. I need some help to get this code working as … | |
hi, i have this problem about reading the file's content from the back Write a program that asks the user for the name of a file. The program should display the last 10 lines of the file on the screen (the tail of the file). If the file has fewer … | |
package program.p02; import java.io.*; import java.util.*; import java.lang.*; public class Dictionary { private String[] dictionary; private static final int NUMBER_OF_WORDS = 81452; private static String FILE_NAME = "dictionarycleaned.txt"; //no arg constructor??? public Dictionary() { Scanner fin = null; //open and test the stream try { fin = new Scanner(new File(FILE_NAME)); … | |
I have two files: File1: M1U152S44906X14127_xu M1U7S112336U117688_xu File2 (tab delimited): T1X19S17508N179711_xu AAU_779 M1U152S44906X14127_xu xcup M1U7S112336U117688_xu mmna I want to search the content of File 2 using the content of File 1 and then display the output as follows: Date of search: The following matches were found in File 1: T1X19S17508N179711_xu … | |
I want to create a php file that reads HTML file that is uplaoded daily to a folder on my web server, when ever I open the page it needs to read the HTML file and post only data i want to use, i have created some reader but it … | |
hi, eventually this program should be able to automatically upload an image to a youtube page. (origionally the idea was to add a gamertag alongside the channel name so people could see current gamerscore etc...) I have coded a lot of it and one part which i thought to be … | |
hey guy, i need some help in reading a file across my network... this is what i did... $myFile = fopen("\\10.102.216.129\backup\Gatepass\Gate_Pass.csv",'r') or die("cannot connect"); $rows = file("$myFile")or die("cannot connect"); but each time i'm getting an error : failed to open stream: No such file or directory can someone help me | |
i know how to read a file into array, however i want to perform some search operations which is difficult to do on array. if someway i am able to read a file to string then it becomes easier. i have 2 methods of reading a file into wstring but … | |
I havent done java in a while and not sure what to do with the void methods please can someone help me out thanks whole thing is in a zip file as well done in bluej as there is a long list of code here. /** * class Player * … | |
Hi, I have one perl script for comparing two text file entries. But its not working according to my expectation. Its comparing line by line, not like comparing one entry to the complete file. I like the script to be compare all the entries irrespective of line by line comparison. … | |
I was trying to use java's native Properties class to edit my ".properties" file and save them, but then I was put off by the fact that in order to do that I had to "store" the properties file by re-writing it back to disk, which simply erased all other … | |
Hi Friends, I want to develop a website like file manager. Where user register and will get fix disk space lets say 20MB. Now user can upload their pdf, doc, txt, jpeg etc files upto their disk limit. I can develop upto this using PHP. Now my issue is if … | |
I have an apache server running on Ubuntu server and I've plugged all my external hard disks to it and mounted them so I can access my files using apache file and folder listing. It's good enough for browsing through files and folders, but it's not efficient because I can't … | |
hello i want to file attach only specific format and restrict size on file and also remove file option. how its possible.? i used uploadfile control of asp.net but remove file option and size of file not there.. kindly tell me how can do this. advance thanks... | |
OK, let me preface this by stating that this is for an internal application only, so security is not a major concern and we can/do have a fair amount of control over the users browser, operating environment and configuration. I am currently generating some hyperlinks, like this: <a title="L7489" id="MainContent_GridView1_lnkFolderR_1" … | |
hey, i'm looking for a simple script that will display 3 images in the same page as the upload button is present in. would be great if you help me with this. thanks a ton! | |
Hi, I am trying to write a Bash Script to sort some images but I am new to Bash and not having any luck. I have a folder of images. Example: P100.jpg P172.jpg P342.jpg P400.png I need to change these filenames to <filename>_DEFAULT<extension>. ie. P100_DEFAULT.jpg and then move the file … | |
I want to know how to create our own file, such as: (.Docx). If we opened the file in notepad the characters contained in the that's file could not understand, so i would like to know by what method of making the it's file? Is the file created and use … | |
I have the simplest code possible to upload a file using php and it only doesnt work using mozilla firefox. The server responds: 'Bad Request Your browser sent a request that this server could not understand.' This is the code(2 files): upload_file0.php <html> <body> <form action="upload_file.php" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> … | |
Hello Guys, I was performing text file reading and writting operations and the job looked very simple as usual, yet it has not been solved successfully. We have got a simple text file **final.txt** which contains data like this:- **05/18/2012 02:12:66 8HRY hjhruehr737243 YES NO u34gewryge 698** i.e each value … | |
When i compile my code with visual studio 2010 express i get the following errors: 'Client.exe': Unloaded 'C:\Windows\SysWOW64\WSHTCPIP.DLL' And with the other program i get these: 'Server.exe': Loaded 'C:\Users\User\Desktop\Server\Debug\Server.exe', Symbols loaded. 'Server.exe': Loaded 'C:\Windows\SysWOW64\ntdll.dll', Cannot find or open the PDB file 'Server.exe': Loaded 'C:\Windows\SysWOW64\kernel32.dll', Cannot find or open the PDB … | |
Hi, I created a log file **log_php.txt** *to store some things that happens in my PHP code used by Apache.* .I use it like this $strmsg = "An error appeared here."; $file = "c:\logs_php.txt"; error_log($strmsg, 3, $file); and sometimes but not always this error appears. You may noticed that i … | |
I got this jar creator java code in the internet. It creates a nice jar file out from your java codes but there is a a problem. If you you run the jar file, it creates an error because the manifest is empty. I think there is a missing line … | |
here code for make new file .. how i can make it to insert data to file and open it /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package files; import java.io.*; import java.util.Scanner; public class Files{ public static … | |
I have read a file with around 120k words so i try to do it fast. have seen the: int x = setvbuf(fp, (char *)NULL, _IOFBF, BSZ); assert( x == 0 && fp != NULL ); option but it takes more than a second ( 1 mb file) so now … | |
Hi everyone, i'm trying to execute a .bat file through a c# console application using code from here: [http://stackoverflow.com/questions/361097/c-sharp-service-cannot-execute-batch-file](stack overflow) Kevin's solution kinda works, but some commands in my .bat file get ignored for some reason, but when i manually execute the .bat file all commands work just fine. e.g. … | |
hi i just finished an application it works good when i debug but i tried to publish it and the publishing fails with errors that some files are double but i don't get what the problem is the error details are as follows PLATFORM VERSION INFO Windows : 6.1.7600.0 (Win32NT) … | |
I have an ADSL Internet connection. the modem is connected to a Wireless Router which is connected to the Ethernet Port. btw. the routing function is done by the ADSL modem and not the wireless router. now, my laptop is connected to the wireless network created by the wifi router. … | |
I have noticed the foolowing details regarding fstream. the following combination of openstate flags do not truncate the files. ios_base::out | ios_base::in | <any flag other than ios_base::trunc> ios_base::out | ios_base::app | <any flag other than ios_base::trunc> the following combinations are resulting in a failbit ios_base::app ios_base::ate ios_base::app | aos_base::ate … | |
Hi there! I have been searching on the forum and google, but I can't find a clear answer to my problem. What I can find is how to read data from a file, but not from specific cells in Excel. A small example of the [B]input[/B] Excel file: [CODE] An/gene … | |
Hello all, I have tab delim file as follows #file1 #version1.1 #columns with the information as follows state1 class1 report_version_1.1 9428 4567 . . call=1;times=5;toss=head->tail;sno=A1B1;effect=positive state1 class1 report_version_1.1 3862 4877 . . call=1;times=5;toss=head->tail;sno=A1B2;effect=negative state1 class1 report_version_1.1 2376 4567 . . call=1;times=5;toss=head->tail;sno=;effect=positive state2 class1 report_version_1.1 4378 2345 . . call=1;times=5;toss=tail->tail;sno=A1B3;effect=positive,negative, both … | |
Hi, my project works with emulating the file system. I can invent my own as well. I'm developing a unix like shell which will provide all the file handling commands similar to unix. Basically I want to allocate a large file on the actual file system, and treat it as … | |
Hello people. I am a security analyst from a computer security solution company. I am handling a project where an entreprise of 50 to 100 employee which requires an Active Directory to maintain their staff in the LAN network. So my team and I have deplyoed an active directory for … | |
The doubt which i currently have is regarding the functioning of defragmenting software. i.e. when you defragment a disk. does a defragmenter defragment only files or also folders. e.g. lets say i have a directory "folder\" in it are some 200 files. if i run the defragmenter then each of … | |
i have a problem, could anyone help me? basically my code is this: if (move_uploaded_file($_FILES['file']['tmp_name'], 'users/' .$_SESSION['ID']. '/' .$res['id'].'.'.$type)){ ?> <h align="center">Upload Successful</h> <?php } but when i use it in the web i get the following error: Warning: move_uploaded_file(users/8/3/) [<a href='function.move-uploaded-file'>function.move-uploaded-file</a>]: failed to open stream: No such file or … | |
Hey guys, i'm Working On A Project That Gets All Employees And Their Data From the User Then Saves Them in A Txt File ( Fstream ) Anyway, i figured out how to Do That But What im at stuck at now is how to search through the txt file … |
The End.