6,015 Topics

Member Avatar for
Member Avatar for Mapper99

Hi there, I have some code which quite nicely uploads PDF files to the server: [CODE] if((!empty($_FILES["uploaded_file"])) && ($_FILES['uploaded_file']['error'] == 0)) { //Check if the file is JPEG image and it's size is less than 350Kb $filename = basename($_FILES['uploaded_file']['name']); $ext = substr($filename, strrpos($filename, '.') + 1); if (($ext == "pdf") …

Member Avatar for wandi90
-1
288
Member Avatar for jeremygb

Hello fellow programmers. I'm in a need of community assistance :) I have a php form with three dropdowns that has jquery function that loads .txt files and builds two dynamic dropdowns realted to first choice. First user choses option (hardcoded in script) - normal dropdown. Then the script takes …

Member Avatar for paulkd
0
1K
Member Avatar for websponge

Hi, I have been able to write to a text file, then another page can read from that file, all good.. Problem is I'm using multiple txt files just to set various variables. There is a reason I'm not using a database. Can I somehow, write to a file after …

Member Avatar for minitauros
0
202
Member Avatar for KellzDD

I am trying to create Line objects and add them to an array list. The problem I am having is excluding any lines that are similar to each other. I have already created an equals method that compares two lines to determine if they are equal. I am having trouble …

Member Avatar for stultuske
0
606
Member Avatar for saadi06

HI, I am trying to convert an audio file that is in wav format to mp3 format. I have installed apache and I am using windows 8. I downloaded the files for ffmpeg and tried to run the php script and convert the file but no success. What I am …

Member Avatar for veedeoo
0
3K
Member Avatar for TechSupportGeek

This is a really simple way to maintain an options file for your application in case you don't wanna mess with registry entries, along with added support for comments inside the file. The file will be created at the same location with the executable. In addition, if an error is …

Member Avatar for TechSupportGeek
0
143
Member Avatar for Bandarigoda123

> Below is the code of Server using System; using System.Collections.Generic; using System.IO; using System.Text; using System.Net.Sockets; using System.Threading; using timerss = System.Timers.Timer; namespace Magic_Client { class Program { static TcpListener server = new TcpListener(4296); static TcpClient client = new TcpClient(); private static Thread thread; private static timerss timersss; private …

Member Avatar for Ketsuekiame
0
555
Member Avatar for calebcook

I am using the [jQuery File Upload plugin by Blueimp](http://blueimp.github.io/jQuery-File-Upload/) to upload images to a server. The problem is, the sending server is `admin.example.com`, and the receiving server where the images are stored is on `www.example.com`. Same domain, different subdomain. I followed the [instructions here on setting up cross-domain uploads](https://github.com/blueimp/jQuery-File-Upload/wiki/Cross-domain-uploads#cross-site-xmlhttprequest-file-uploads), …

Member Avatar for calebcook
0
2K
Member Avatar for adams2887

hi i am trying to upload an image but it doesn't work I have been trying for ages but without any luck. I was wondering if anyone would be kindly enough to take a look at it. Basicly i'm getting my echo error message "problem uploading image" displayed constantly, even …

Member Avatar for Raju_3
0
736
Member Avatar for calebcook

I'm using a plugin called [jQuery file upload](http://blueimp.github.io/jQuery-File-Upload/) to upload images to a page. Currently it uploads with the original image name as the file name (IMG_1234). I need a specific format for the image name on the server (eg 1.123456.jpg) I found this PHP code that works for changing …

Member Avatar for LastMitch
0
430
Member Avatar for hemanshurpatel

Hi, I need to fetch mail body from the local stored mailbox file. I'm using fetchmail and procmail to download emails from IMAP server and filterout unwanted one. From the list of emails, I want to process one by one and get their body and store it. the format of …

Member Avatar for hemanshurpatel
0
678
Member Avatar for diya45

hey all i complete with task upload file that is user upload their files and download it now here i want to ask when user upload file then this file forward to manager for approval .. then when manger login and view the uploaded file, and click an "approve or …

Member Avatar for JorgeM
0
263
Member Avatar for Hamza_4

I have a directory with hundreds of CSV files in it. Many of the files have synonyms for words that I no longer want. I want to replace all of the synonyms with approved words. For example some CSVs have synonyms like `vial` `jug` `canteen` `urn` etc and I want …

Member Avatar for vegaseat
0
248
Member Avatar for pawan768

Hi, I tried to generate a script which can download youtube video on server end, I only need to provide the video url ... I serached alots but <?php // Check download token if (empty($_GET['mime']) OR empty($_GET['token'])) { exit('Invalid download token 8{'); } // Set operation params $mime = filter_var($_GET['mime']); …

Member Avatar for Rahul47
0
362
Member Avatar for dospy

the basic idea is that i have a config file where i need to take entries in different formats(the key is always a string and the value could be any type: int, float, string etc) from and the file has the following style: firstentry 1.5 secondentry 35 thirdentry somestring and …

Member Avatar for sepp2k
0
393
Member Avatar for kamilacbe

I have migrated my website from shared hosting to VPS server and have rehosted the site , now the problem is i cannot access the video files which is present in my server for eg : http://mydomain.com/httpdocs/test.mp4 my previous or old location was like http://mydomain.com/test.mp4 So please advice as where …

Member Avatar for JorgeM
0
111
Member Avatar for Ahmed.C

Hi. I was just wondering if there is a simple way to get the file size of a selected program. The thing is that if i select a word document or etc the file size should be 2.34MB not like 2355.2 in KB or B. If the file size is …

Member Avatar for Ahmed.C
0
183
Member Avatar for kanoy83

Hi guys, I have a simple php script to upload file. I'm having some problem in creating confirmation before overwriting the file from new file upload. Situation: 1. confirm() works if using file_exists BUT not overwrite the file or process the move_uploaded_file assuming some tags are correct uploadfile.php <form enctype="multipart/form-data" …

Member Avatar for kanoy83
0
1K
Member Avatar for gaurav23

#include<fstream.h> #include<conio.h> #include<string.h> #include<stdio.h> void main() { clrscr(); ofstream fout("a"); fout<<5<<"\n"<<3<<"\n"<<2<<"\n"<<4<<"\n"<<1; fout.close(); ifstream fin("a"); int i,j,k,l=0,m,n,o; while(fin) { fin>>i; l++; } l--; fin.close(); fstream fin1("a",ios::ate,ios::in); fin1.seekg(0); for(i=0;i<l-1;i++) { for(j=0;j<l-i-1;j++) { o=fin.tellg(); fin1>>m; fin1>>n; if(m>n) { fin1.seekg(o); fin1<<n; fin1<<m; fin1.seekg(o+1); } } } } //file sorting is not working if anyone …

Member Avatar for gaurav23
0
225
Member Avatar for Podouskislender

Hello guys, I need to make a C program that reads a text file for example the following sentence: 5 + 7, 10-15 ... (etc.), and show the result. I managed to make it solve part of the problem. The program is making the sum of the first line. But …

Member Avatar for Podouskislender
0
206
Member Avatar for devourer17

fstream f; char ch; int i=0; string word,word2[200]; f.open("op3_sort.txt",ios::in|ios::out); if(!f) cout<<"\nUnable To Open File!\n"; else { cout<<"\nLet's View D Content!\n"; while(!f.eof()) { getline(f,word,'\t'); word2[i]=word; i++; cout<<word2[i]; } } cout<<"\nShowing Data Now\n"; for(int a=0; a<i; a++) { cout<<endl; cout<<word2[a]; }

Member Avatar for devourer17
-1
151
Member Avatar for erinkay528

Here is my assignment. I would like someone to walk thru some of this with me if you have time today. This is my last assignment and I just dont understand parallel arrays and how to recall information. If someone could help me get started that would be a big …

Member Avatar for Ketsuekiame
0
520
Member Avatar for devourer17

I've a text file : Random.txt which comprises of Jade 12MS234 Male 18 Rocky 12MS324 Male 18 Marx 12MS632 Male 18 Now in my program i've a class class stud ( char name[10] char reg[10] char gender[10] int age ) Now I've to write a code in c++, where i've …

Member Avatar for Moschops
0
463
Member Avatar for Raju_3

Hello sir iam trying to upload the image in database..this is my code <html> <head> <body> <form action="" method="POST" enctype="multipart/form-data"> <input type="file" name="image" accept="image/jpeg"> <input type="Submit" name="submit"/> </form> <?php if(isset($_POST['submit'])) //connecting to database $db = mysql_connect("localhost:3306","root","") or die(mysql_error()); //selecting our database $db_select = mysql_select_db("tutorial",$db) or die(mysql_error()); $imageName = mysql_real_escape_string($_FILES["image"]["name"]); $imageData …

Member Avatar for Raju_3
0
1K
Member Avatar for Akhilesh_2

#include<stdio.h> #include<stdlib.h> #include<string.h> static int compare(const void *x,const void *y){ return strcmp(*(const char**)x, *(const char**)y); } int main(){ FILE *p = fopen("file.txt","w"); char ch = '\0',**c = (char**)calloc(6,sizeof(char*)); int n[6]={0},i=0,j=0; fprintf(p,"jack\nakki\njohn\nrachael\nrobin\ntom"); fclose(p); p = fopen("file.txt","r"); while(1){ while((ch=getc(p))!= '\n'){ if(ch == EOF) break; putchar(ch); n[i]++; } printf(" %d\n",n[i]); if(ch == EOF) …

Member Avatar for Akhilesh_2
0
119
Member Avatar for asaidi

Hi i m trying to save a file pdf to a location : xampp\htdocs\cake\app\webroot\files or any where in my pc i have this code... public function upolad() { $filename = ''; if ($this->request->is('post')) { // checks for the post values $uploadData = $this->data['Pod']['pod']; if ( $uploadData['size'] == 0 || $uploadData['error'] …

Member Avatar for cereal
0
223
Member Avatar for Fangling

Dim connect As String connect = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & Application.StartupPath & "\segdata.accdb" Dim conn As New OleDbConnection(connect) Dim sr As System.IO.StreamReader Dim entirefile As String sr = File.OpenText(Application.StartupPath & "\SEG1.txt") entirefile = sr.ReadToEnd() ' Read the whole file Dim OriginalValue As String OriginalValue = vbTab Dim ReplaceValue As String …

Member Avatar for Oxiegen
0
284
Member Avatar for OsaMasw

Hello there am working now on download script for some projects I have many option to do from limiting the speed or make the download resumable. everything works fine except for the resume download, I've tried many script and codes, none of them works :( here is my last code …

Member Avatar for OsaMasw
0
2K
Member Avatar for ibpet11

Hello guys, I did appreciate this quick assistance, I have a .csv file and I want the lines in the file to be sorted using value in the first column and the write out the sorted file to another file Take an instance we have: ================================= 36,Line1 APPLE FRUIT 11,Line1 …

Member Avatar for ibpet11
0
2K
Member Avatar for tanatos.daniel

I have this function that should open two files and write their content in a third file, separated by "\n". I don't get why it works for code in comments and not for the one below it, although both provide valid text file names. void concatenate() { /*char *file=new char[strlen(" …

Member Avatar for tanatos.daniel
0
368
Member Avatar for tanatos.daniel

I have the following code: #include <iostream> #include <conio.h> using namespace std; long filesize(FILE *stream); int main(void) { FILE *stream; char c; int i=0,n; long lSize; stream = fopen("tanc.TXT", "r"); fseek (stream , 0 , SEEK_END); lSize = ftell (stream); rewind (stream); cout<<"Dati numarul de caractere:"; cin>>n; while(!feof(stream) && i<lSize) …

Member Avatar for Sokurenko
0
298
Member Avatar for sujan.dasmahapa

I am trying to read a PDF file using pypdf and write onto a text file. But its not working. content value in the below code is just "u/n/n/n/n/n'...PDF file has 5 pages so 5 times new line character and in the begining 'u'..whats going wrong please help. why the …

0
76
Member Avatar for ceeandcee

I have tried a number of things and all of them have crashed. My code is below. I am writing code for a form to upload three photos and this code works fine to upload three photos. What I am stuck with is: 1) I would like the form to …

Member Avatar for ceeandcee
0
186
Member Avatar for oldezwe

Hey guys, I wasn't really certain which category this question fell under, so I chose CS with it being the broadest. I was recently given a text file and told that it could be converted into an image. The text file looks like this... 0000000 d8ff e0ff 1000 464a 4649 …

Member Avatar for rubberman
0
350
Member Avatar for gabriel.miyamoto

Hi I don't really have much experience in programming, but I am trying to make a tool that would kill a repetitive task. I'm creating a small tool box that when I click it in a certain button, it will open AD, CMD with a different privileged account. it would …

0
140
Member Avatar for ssg friend

Should we enter the same title, keyword and description for a site in all the directory submission.

Member Avatar for arunmarvel5
0
181
Member Avatar for sidim

Hi, I can't seem to find the answer I'm looking for online (maybe keywords are too common?). Is my code only verifying whether my directory is created? Or is it actually validating? I need it to validate, but I'm unsure whether or not it's doing that. $dirPath = $_POST['company']; $result …

Member Avatar for sidim
0
328
Member Avatar for SnehalBPatil

Hello I am working on project In django(Python web framework) where I want to call matlab file(.m ) file from the server. I tried subprocess module from the python [CODE]>>> p = Popen("/Applications/MATLAB_R2009a.app/bin/matlab.exe -nojvm -nosplash -nodisplay -r /home/spatil/LineShapeKin_Simulation_4/LineShapeKin_Simulation_4.1/Matlab_code/Simulate.m",stdout=PIPE)[/CODE] But its giving me following error [CODE]Traceback (most recent call last): File …

Member Avatar for Gribouillis
0
2K
Member Avatar for Mr.M

Hi DW I've created a project on NaviCoder for java and when I tryied to export the project I had a problem then I redo my project using the Netbeans and that where I was then able to export or should I say build the jar file which is an …

Member Avatar for JamesCherrill
0
255
Member Avatar for robgeek

Hey everyone, I was attempting to get the lastmodified file from a folder, and to do so I used File.listFiles() method which is returning a null pointer exception even though the folder is not empty. I had this piece of code working about two days ago and I am not …

Member Avatar for sirlink99
0
8K
Member Avatar for ogsirus

Hi guys, I have 2 forms which do practical the same thing. They are supposed to show a preview of a file which has been selected from a treeview. However the first form works fine and the second one doesn't. When I look into it the second form produces a …

0
224
Member Avatar for Carpetfizz

I'm trying to get [grunt-jsdoc-plugin](https://npmjs.org/package/grunt-jsdoc) to work, and I'm having a small problem. In my console, I keep getting: Running "jsdoc:dist" (jsdoc) task Warning: Cannot read property 'src' of undefined Use --force to continue. Aborted due to warnings. In the grunt-jsdoc-plugin documentation, it says: src : an array of pattern …

Member Avatar for LastMitch
0
173
Member Avatar for murali2489

Hi All, I have written an application for traffic Study which takes traffic load for seven days, inputting traffic load during morning,lunch,evening and night for each day. The output im getting is this Morning Lunch Evening Night Average Day 0 : 5 5 5 5 5 Day 1 : 5 …

Member Avatar for JamesCherrill
0
260
Member Avatar for ManishGaikwad

Hi All, Can anybody help me in finding this out? I want to delete csv file using C#.Net? I am using:- File.Delete("E:\TestFolder\filename.csv"); OR if (System.IO.File.Exists("E:\TestFolder\filename.csv")) { System.IO.File.Delete("E:\TestFolder\filename.csv"); } But both above are giving exception as:- Cannot access the file "E:\TestFolder\filename.csv" because it is being used by another process. Test Folder …

Member Avatar for deceptikon
0
502
Member Avatar for arunkishorres

i want to read text between two indices in the file usinf file i/o operations in c++. HOw ca i do it? for example, here is the text file: 1: .. .. 2: .. .. 3: .. .. 4: in this text file i need to print only the lines …

Member Avatar for deceptikon
0
240
Member Avatar for faysal515

I am working on a dynamic project for my own but struggling to create an article. The idea is that one registered user can publish an article with an image . <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %> <!DOCTYPE html PUBLIC …

Member Avatar for Deepak_11
0
1K
Member Avatar for mrosario

hi guys, i'm really having a trouble with my conversion code... it says the NumberFormatException with this "Student[] studs = new Student[Integer.parseInt(fr.nextLine())];" but i have no idea why. can someone help me? import java.util.Scanner; import java.io.*; public class SampleFileProcessing implements Serializable{ private static Scanner fr; public static void main(String[] args) …

Member Avatar for mrosario
0
2K
Member Avatar for suno15

I created a banner to my website with 3 images moving dynamically. I want to update the images from an admin pannel. Please help me. Thank You.

Member Avatar for diafol
0
118
Member Avatar for jaimin4829

I have created an application which compress & convert a file in .rar or .zip format.But it can't be open and give error that the file is damaged!!! string filetocompress = txtSourceFilePath.Text.Substring(txtSourceFilePath.Text.LastIndexOf("\\")+1); MessageBox.Show(filetocompress); FileStream sourcefile = File.Create(txtSourceFilePath.Text); FileStream destination = File.Create(txtTargetFilePath.Text + filetocompress + ".gz"); byte[] buffer = new byte[sourcefile.Length]; …

Member Avatar for shadyreal
0
2K
Member Avatar for waqas.zafar.125

Hi there! I have a question related to filing in c++. I have to read data from a text file and load it into 2-d dynamic array. Here is the problem statement: 5 3 3 8 1 4 2 5 7 2 4 6 8 0 9 3 1 2 …

Member Avatar for Kanoisa
0
165

The End.