file-processing

Interactive file processing in using PHP, jQuery and Ajax

試著忘記壹切 提交于 2019-12-25 12:48:37
问题 I'm migrating an old MS-DOS Foxpro program to cakePHP, but in some part of the application process the user will have the possibility to load a text file and process it according to some business logic. I worked the algorithm, and it's working fine, I programmed it in plain PHP. But in some parts of the process the user must interact performing some tasks, in plain PHP it's possible to do it. My question is: How can I have an interactive file process on a MVC framework, since the controller

how to set path for specific file in php

放肆的年华 提交于 2019-12-25 12:38:12
问题 i have done each and every thing but i cant get into the folder. my file path: C:\xampp\htdocs\Project\p\new project\admin\index.html but failed. i have place the condition in if portion so that if condtion is true, then should open up a file fron that path. i dont know why m getting failed. here is my code: <html> <body> <?php session_start(); if($_SESSION['SHALA']!=1) { echo" Authentication unsuccessful"; } else if($_SESSION['SHALA']==1) { $_SESSION['SHALA']=1; $con=mysql_connect("localhost

how to set path for specific file in php

橙三吉。 提交于 2019-12-25 12:38:04
问题 i have done each and every thing but i cant get into the folder. my file path: C:\xampp\htdocs\Project\p\new project\admin\index.html but failed. i have place the condition in if portion so that if condtion is true, then should open up a file fron that path. i dont know why m getting failed. here is my code: <html> <body> <?php session_start(); if($_SESSION['SHALA']!=1) { echo" Authentication unsuccessful"; } else if($_SESSION['SHALA']==1) { $_SESSION['SHALA']=1; $con=mysql_connect("localhost

File processing using try-catch C++

僤鯓⒐⒋嵵緔 提交于 2019-12-25 03:43:21
问题 I'm working on a project about file processing. The users input ID, hours, and payrate. The output will be ID, hours, payrate and grosspay. I got those parts done. I really need help on try and catch, where users input a non-numeric, the project rejects and ask users to input again. Here what I got so far: #include <iostream> #include <fstream> #include <string> #include <cstdlib> #include <iomanip> #include "File.h" #include <exception> using namespace std; void File::Create() { ofstream

Run - Time Check Failure #2 in C File processing

与世无争的帅哥 提交于 2019-12-25 02:58:31
问题 Run-Time Check Failure #2 - Stack around the variable 'filename' was corrupted. My code works whenever I try to process the first memory location. I can process the .txt file correctly, and I can print it. Nevertheless, when I ask for a second memory location, the program crashes. I tried to increase the size of filename, and I am also closing the first file, so I am clueless. Any help is acceptable! Thank you!! This is a photo of the output This is my code: #include <stdio.h> #define SIZE

file processing (for file with more than one fields) and problems associated with it

淺唱寂寞╮ 提交于 2019-12-24 22:43:03
问题 here is a code i wrote to create the symtab of a sic/xe .asm file.... #include<iostream> #include<fstream> #include<iomanip> #include"aviasm.h" using namespace std; void aviasm::crsymtab() { ofstream outs("symtab.txt",ios::out);//creating the symtab ofstream outi("intermfile.txt",ios::out);//creating the intermediate file ifstream in("asmfile.txt",ios::in);//opening the asmfile which i have already written in.seekg(0,ios::beg); char c; string str[3]; string subset; long locctr=0; int i=0;

How to merge continuous lines of a csv file

北战南征 提交于 2019-12-23 04:19:13
问题 I have a csv file that carries outputs of some processes over video frames. In the file, each line is either fire or none . Each line has startTime and endTime . Now I need to cluster and print only one instance out of continuous fires with their start and end time. The point is that a few none in the middle can also be tolerated if their time is within 1 second. So to be clear, the whole point is to cluster detections of closer frames together...somehow smooth out the results. Instead of

Splitting command line args with GNU parallel

こ雲淡風輕ζ 提交于 2019-12-20 10:18:14
问题 Using GNU parallel : http://www.gnu.org/software/parallel/ I have a program that takes two arguments, e.g. $ ./prog file1 file2 $ ./prog file2 file3 ... $ ./prog file23456 file23457 I'm using a script that generates the file name pairs, however this poses a problem because the result of the script is a single string - not a pair. like: $ ./prog "file1 file2" GNU parallel seems to have a slew of tricks up its sleeves, I wonder if there's one for splitting text around separators: $ generate

pattern match processing of multiple .frm files

三世轮回 提交于 2019-12-20 07:49:13
问题 I have multiple VB6 .frm files. See example below. I want to strip away the functions and subs from the code and leave only the form design. What I need to do is find the last line starting with "Attribute" because after this line everything further should be deleted. Using pattern matching or something similar, how can I process the .frm files so that everything after the last Attribute line is deleted? If I am traversing through a file, how can I tell where the last Attribute line is?

Reading and writting a large file using Java NIO

元气小坏坏 提交于 2019-12-20 07:17:51
问题 How can I effectively read from a large file and write bulk data into a file using the Java NIO framework. I'm working with ByteBuffer and FileChannel and had tried something like below: public static void main(String[] args) { String inFileStr = "screen.png"; String outFileStr = "screen-out.png"; long startTime, elapsedTime; int bufferSizeKB = 4; int bufferSize = bufferSizeKB * 1024; // Check file length File fileIn = new File(inFileStr); System.out.println("File size is " + fileIn.length()