7,373 Topics
![]() | |
Hello Guys , I want to create a script that convert a text file or Nfo file to an image(format is .PNG). What it does is simply load the txt and output it as an image Here is my code: <?php if(isset($_FILES['image'])){ $errors = array(); $allowed_ext = array('txt'); $file_name = … | |
Hi I have had a client asking me to look at the image upload section of the site i have built for them: Here is the upload form code: <form enctype="multipart/form-data" action="processupload.php" method="POST"> <input type="hidden" name="MAX_FILE_SIZE" value="100000000000" /> <center>Choose photo to upload: <input name="uploadedfile" type="file" /><br><br> <input type="submit" value="Go to … ![]() | |
Hi all, I've browsed the net trying to find a paradigm to describe what I'm looking for but haven't been successful. So I'll try to explain it as succinctly as I can. Right now, for my PhD research, I've set out a few applications that take input files that have … | |
Hi, I am using tcpdf library to create pdf files and they are password protected.Now I have a condition where I want to merge different pdf files and create a single pdf file and dipslay the multiple pdf files to the user in a single pdf file.I am having problem … ![]() | |
Hi Guys First of all i would like to state that i am new in php so my question might appear stupid for the geeks here. I want to create an image downloader in php , that is i need a textbox and a submit button. The user enter each … | |
Hi everyone, I have a problem which needs an urgent solution! I recently uploaded hundreds of images to the pictures section of my website with file names like this: rihanna-battleship-movie-premiere.jpg It was only after I uploaded hundreds of images adding the file extension ".jpg" that I realised that I should … | |
**Dudearoo** *Useing Code::Blocks* ok, ive got a somewhat simple error that i cant crack, First heres my code. #include <iostream> #include <cstdlib> #include <stdio.h> #include <time.h> #include <conio.h> #include <stdlib.h> #include <iomanip> #include <windows.h> // so to use strcmp #include <cstring> #include <fstream> using namespace std; int main() { ofstream … | |
So i have a working network file transfer program now (if you want to see some of the code look at my other '[article](http://www.daniweb.com/software-development/java/threads/426357/networking-in-java-not-doing-it-right)'). But now that im trying larger files, im running into a problem where i run out of memory (which is understandable when the array is 1 … | |
Hey, Im a little new to apache and have just installed it on my ubuntu remix netbook, ive got it working fine but for some reason its not doing anything in the .htaccess files, ive created some random directorys inside /var/www/... and put a .htaccess which only has "deny from … | |
I am having some trouble. I have a Telerik editor where I display I file that is housed in my application. I need to save the changes back to the file. But some things also get saved to back to the database. My save button currently does save back to … | |
I am working with CSVfile program. I have already calculate something from it. Name,Age,Sex,Pincode,Disease 1. aaa,4,M,35265,flu 2. bbb,4,M,35652,Gastric 3. eee,6,F,35265,Brain 4. sss,7,M,32564,flu I have made program for calculating no. of age,sex and pincode as attached in the code. In this i have calculated that age=4 comes how many times and … | |
Hello Daniweb, I need to write a program to change the extension of all the files in a folder from a certain extension to another. My code is shown below, however, I have one problem: i.e. Say we want to change all files with the extension "*.tx" to "*.txt" but … | |
Source code **NASM** on **Ubuntu 12.04** This demonstrates Input/Output algos using syscall and how they can be implemented in a fairly condensed loop. These routine do not conform to any specific call convention and without modification won't interface with higher level languages. My code is stand alone assembly and doesn't … | |
import java.awt.*; import java.awt.image.BufferedImage; import javax.imageio.ImageIO; import javax.swing.*; import java.io.*; public class one extends JFrame { public one() { JPanel p = new JPanel(); JLabel l = new JLabel(); setTitle("ScrollText"); setSize(600, 400); setLayout(new BorderLayout()); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setVisible(true); BufferedImage image; p.add(l); add(p); try { File file = new File("D://Photos//foto(222).jpg"); image = ImageIO.read(file); … | |
I am new at coding. I wanted to read from a file(text) and then write it to another file many times so that the file I write to becomes as large as 20MB..I read Harry Potter book for that....the code works just fine for 1000 lines etc..the file is read … | |
Hi all, Thank you for the wonderful job you are all doing. I have a small problem that I would like to get a solution for. We are creating a cloud for storage of files online for our social group where users will be able to upload files and access … | |
Hey, everyone. I am writing a batch script (.bat program) to automate some tasks. And when that certain task is complete, I would like it to send an email to the admin saying if the task was completed successfully or it failed. It will figure out if the task was … | |
**Dudearoo** *Useing Code::Blocks* Hey you guys! ive got a problem with a 'test' program i have made for saveing strings. heres the code: #include <iostream> #include <cstdlib> #include <stdio.h> #include <time.h> #include <conio.h> #include <stdlib.h> #include <iomanip> #include <windows.h> #include <fstream> using namespace std; int main() { ofstream myfile ("savefile.txt", … | |
EDIT: Im an idiot. The hand-shake like mechanic i put in where the server waits for the client to respond was the reason it was so slow, removed it and it worked. I misunderstood/forgot how streams work.. Ok. So i just started learning how to use the network utility there … | |
I have a project in which I desire to upload and download blob files in php. I have written the codes to upload the files into mysql however, when I try to download the files, be it pdf, .doc or jpeg, the error message I get is "The selected file … | |
This is the form where i can upload the image file: <?php require_once ('includes/config.inc.php'); session_start(); // If no first_name session variable exists, redirect the user: if (!isset($_SESSION['first_name'])) { $url = BASE_URL . 'index.php'; // Define the URL. ob_end_clean(); // Delete the buffer. header("Location: $url"); exit(); // Quit the script. } … | |
Hi, I need a program to search all lines of a file (a whole file) for a certain string. In my concrete case, I need it for login. Let me sum all of this up, so you get the whole overall point of what I have so far: - a … | |
Hi all, ok so i want to make a programme to speed up the internet, may be someting like [idm](http://www.internetdownloadmanager.com/). I googled but all i could find was download managers, nothing related to boost up the downloads or something.. I am looking for a c# solution. I am not expecting … | |
Hello all, I am using Windows server 2008 OS as domain controller. When user's request comes, his id & password are verified across Active directory. If his id & password are already present in active directory then java program returns as valid user or otherwise returns as invalid user. Now, … | |
hello, i am creating client server module.i want username and password from active directory for authentication. first time when i run program it it authenticate users but when i delete user & change password policy after that created new user and run the program then i got error authentication error. … | |
I'm getting an error that I don't understand. It's a Null Pointer Exception, but neither of my arguments in line 118 is null. According to the documentation, ImageIO.write will throw a IllegalArgumentException or an IOException, but it isn't throwing either. I'm not sure what could be null here. You can … | |
Hi, I have several classes for different types of shapes (line, rectangle..etc) which all implements interface IDraw. And then I have a List<IDraw> called shapes which I want to Serialize/Deserialize. I think I got the Serialization right: [CODE] private void saveToolStripMenuItem_Click(object sender, EventArgs e) { saveFileDialog1 = new SaveFileDialog(); saveFileDialog1.InitialDirectory … | |
hello again, i am having problems outputing the correct format of hex, the result i am aiming to achieve in my file should be : 78 00 07 D0 00 00 17 70 00 00 <-- aiming to achieve D8 00 6F D0 00 00 7F F0 00 <-- actual … | |
Hello Everybody, I am having a doubt regarding how to upload a file to multiple machines or servers. I tried using with FTP but getting ConnectException:connection Refused import sun.net.ftp.*; import java.io.*; public class SendFile { public static void main(String args[]) { String hostname = "172.14.3.23"; //Remote FTP server: Change this … | |
Hello all, I am trying to parse a text file that has the following format: 3 1:3,60,3 2:6,70,1 3:3,50,3 I am supposed to take the first line "3", and allocate memory for the 3 lines after it. Then I want to skip the first line, and start parsing and tokenizing … | |
Hi guys I've been trying to connect my c# file to my database file(in .mdf format created in SQL Server Management Studio 2008). So basically I used visual studio 2008 for my C# file and SQL Server Management Studio 2008 for my database file. Now I'm sure that the naming … | |
**Dudearoo** *Useing Code::Blocks* Heys you guys! ive got a question, i want to know if its possable to read a file name like for example dudearoo.dat and output the name ive got an idea for it, just i dont know how to read file name not coded into the program. … | |
Hey, Im stuck trying to figure out how to insert one byte between two other bytes that have already been created in an output stream: OutputStream out = new FileOutputStream("MyFile"); try { out.write((byte) 70); /*Byte should be inserted between these elements*/ out.write((byte) 40); /* but must be performed at end … | |
Hi guys I've been trying to connect my c# file to my database file(in .mdf format created in SQL Server Management Studio 2008). So basically I used visual studio 2008 for my C# file and SQL Server Management Studio 2008 for my database file. Now I'm sure that the naming … | |
I have a TreeeMap that i need to wite to file. I tried this: try { File file = new File("reboot_customer_details"); FileOutputStream f = new FileOutputStream(file); ObjectOutputStream s = new ObjectOutputStream(f); s.writeObject(customerDetails);//customerDetails is the map i need to save s.close(); } catch(Exception ex) { gui.results.setText("Error: " + ex); } When … | |
This is a school assignment. I have to write a function in my program that opens a file stream and returns a heaped value to the main function. I believe the file opening function works but after it passes the ifstream pointer to the main function, I'm having trouble dereferencing … | |
Hey, Iv been working a lot with binary files recently and i am currently stuck trying to save a string to a file. The problem is i do not want the literal string value of "010100000000000100010011000000000001000100110" to be saved to the file I want the above binary string to be … | |
Hello, I am trying to upload music files to a database for use on my website. However, the file doesn't seem to actually be going into the folder. I get the name of the file in phpmyadmin, but I don't see the file anywhere. Here's my script (I do have … | |
Hi, I have a file called reports.php which has several php and database functions. Upon viewing it in a browser it displays a nicely formatted report. Is there a way I can save the HTML(only) output from this reports.php into a **new file** (probably html) in a web server ? … | |
Hi, I have an application that converts the ascii characters within the excel file into hexa conversion ie. Ã to & #x00E0; but my application has one strict requirement and that is the excel file must be properly encoded in UTF-8. I have noticed that simply saving the excel file … | |
I'm using the Guichan lib and I was trying to run the "First application with Guichan, OpenGL and SDL" example, which is located here [Click Here](http://guichan.sourceforge.net/oldsite/getting-started.shtml) . Everything was fine exept when I exit the program and delete all the pointers which were allocated with the "new" and because of … | |
I have a text file named "multipoles.txt", i took a screen shot of it ( [url]http://img193.imageshack.us/i/textf.jpg/[/url]) so i can explain myself better. Ok so I basically want to go in the file and get the data from the third column below the text that says Electronic Charge Electrons. The numbers … | |
package furniture; import java.io.*; import java.util.*; public class Program3 { public static void main(String[] args) { //array of 10 Furniture object references String[] furniture = new String[10]; String filename = "furnitureData.txt"; Scanner input = null; try{ input = new Scanner(new File(filename)); }//end try catch(FileNotFoundException e){ System.err.println(e); System.exit(1); }//end catch }//end … | |
Situation: need to read a CSV (txt) file that has no header and has 4 fields (all numeric), the number of lines will vary. Sample data: 160827,00003,000000075,0000025 84144,00001,000000050,0000050 161060,00002,000000050,0000025 40015,00002,000000100,0000050 61955,00002,000000100,0000050 etc etc I want to read this file into a DataGridView for proofing and later insert all these lines … | |
Note: This is a server that is going to be used on a build farm, So 3rd party libraries are no use here. I've been working on writing a python script that can be used to POST files on to a tomcat server (java), I finished writing the servlet and … | |
So i've found this HTTP downloader in python, and I wanted to modify it. I've been trying to add a ttk progressbar, to no avail, but I have no idea why it isn't working! Here is my code: import urllib2 import Tkinter import ttk url = 'http://kharg.czystybeton.pl/pendulum%20-%20%5B2005%5D%20hold%20your%20colour/05.%20through%20the%20loop.mp3' file_name = url.split('/')[-1] … | |
I have some web forms that contain several normal fields, and at least one upload field each. Upon submission, the contents of the form are e-mailed to the recipient. When I fill out the form *without* including a file for upload, it works correctly. I get an e-mail that, when … | |
Hi guys this should be a simple one for you. My website, a dead simple htm page was Hijacked within Google. Each time I searched for the site in Google it would never show. If I typed the site address direct into the address bar it worked fine. When I … | |
What we have done was : Specifying valid FTP remote server name, a username and a password if password required in their relevant textboxes on the form then we click on connect, we notice that the TreeView control is filled with main directories while ListBox control is filled with main … | |
In XP, I was able to show the File Properties dialog from c# code. The essential bits are shown below; This no longer works in Windows 7 64 bit. Surely it must be implemented more simply now? I have searched the internet for a replacement method without success. I noticed … |
The End.