5
голосов
3ответов
434 просмотров

Designing file processing that handles many file formats, parsing, validation, and persistence

If you had to design a file processing component/system, that could take in a wide variety of file formats (including proprietary formats such as Excel), parse/validate and store this information to a DB.. How would you do it? NOTE : 95% of the time 1 line of input data will equal one record in ...

0
голосов
2ответов
3413 просмотров

Cocoa/Objective-c 'system();' acting weird

I'm trying to run an applescript inside my Cocoa app using the system(); function - the string I'm passing to the function works in terminal and the applescript itself is fine, I think it has something to do with NSString - can anyone help? //add to login items NSLog(@"add to log...

1
голосов
1ответов
414 просмотров

Does stringWithContentsOfURL use the system proxy settings?

I am using the following code to fetch the contents of a web page but it needs to follow all the network rules etc as defined in the user's system prefs NSURL *url = [NSURL URLWithString:@"http://thetalkingcloud.com/static/ping_desktop_app.php?v=1.0"]; NSError *theNetworkError; NSStr...

0
голосов
5ответов
1303 просмотров

Sending the output of a command-line perl script to the browser via mod_perl

I have a plain perl script that can be run from the command-line via perl -w test.pl. I then have a mod_perl2 script that can be accessed from a web browser. I want to have the latter call the former and send the output to the browser, flushing as it goes. The mp2 script doesn't have a shebang l...

1
голосов
2ответов
764 просмотров

System C Command and Memory Limit?

Okay, so i am currently attempting to debug a problem on a win2003 server. Basically we have an ancient program that calls C's system() function. Now i basically tracked it down to the fact that when the system() runs the application. The application only has access to around ~500 or so megabytes...

0
голосов
1ответов
1173 просмотров

MS DOS function like ipconfig to get system performance specs?

I am aware of MSINFO32, but I'm wondering if there is a MS DOS command similar to ipconfig in order to get system specifications? I would like for the system specifications to be displayed in the MS DOS prompt. I would like to see at least: CPU RAM BUS speed Thanks for any insights. Edit: I ...

0
голосов
2ответов
2385 просмотров

UNIX System time and User time. C-Programming

Hi I'm trying to get the system time and the user time that are consumed by a program. I'm having some trouble though as my times are always zero in milliseconds. I think I'm doing something wrong. Can you guide me in the right direction ? Both of my methods return 0 typedef struct{ struct t...

24
голосов
5ответов
70645 просмотров

Calculating elapsed time in a C program in milliseconds

I want to calculate the time in milliseconds taken by the execution of some part of my program. I've been looking online, but there's not much info on this topic. Any of you know how to do this?

0
голосов
3ответов
1181 просмотров

Does Windows have its own 'call other .exe' function (C++)

I know in C++ there is a function system("example.exe"); that runs another program, put it requires the include stdlib.h. Because I am already including 'windows.h', is there an equivilant to the system() function in Windows?

2
голосов
3ответов
1069 просмотров

Who is responsible for cleanup?

I wish to know which one is responsible for cleanup of the stack Suppose you have a function fun lets say like this: var = fun(int x, int y, float z, char x); when fun will get called it will go into the stack along with the parameters then when the function returns who is responsible for cl...

1
голосов
2ответов
690 просмотров

Ruby open4r multiple systems calls with prompts

I'm trying to write a little lib which generates a keypair using open4, is this the best way of dealing with system calls with multiple prompts? require 'rubygems' require 'open4' Open4::popen4("sh") do |pid, stdin, stdout, stderr| stdin.puts "openssl genrsa -des3 -out tmp_priv.pem 2048" st...

0
голосов
3ответов
1105 просмотров

How do I scan a remote file system efficiently?

I do have a time limit and would like to know what is the efficient way to scan file system remotely (talking about 50 millions of files in the extreme case)? The command dir takes ages (approx time 20 hours!!!).

-1
голосов
1ответов
1073 просмотров

Writing to a file using echo

void EDataset::PrintErr(const NDataString& ErrMsg){ system("echo " + $ErrMsg + " >> err.txt"); .... code .... } It prints blank line as the value of ErrMsg. How come?

4
голосов
4ответов
5835 просмотров

How to solve a system of inequalities?

I've reduced my problem (table layout algorithm) to the following problem: Imagine I have N variables X1, X2, ..., XN. I also have some (undetermined) number of inequalities, like: X1>= 2 x2 + X3>= 13 etc. Each inequalities is a sum of one or more variables, and it is always compared to ...

8
голосов
4ответов
7337 просмотров

IPC vs domain sock vs named pipes

Whats the different between IPC and Unix domain sockets and named pipes? I got vague definitions from various books but couldn't get clarity on which one should be used where.

1
голосов
1ответов
407 просмотров

How to capture system stats on the iPhone?

I'm trying to write an iphone app that would mimic the top system utility available on *nix systems. It seems as if system() and/or popen() should enable me to capture output from system commands executed on the iphone. However, the following code gives no output for either popen or system. Is...

1
голосов
4ответов
8021 просмотров

system("c:\\sample\\startAll.bat") cannot run because of working directory?

I have an application and executables. I want my application to run my executables. The executable files are in a folder, lets say in "c:\sample". In this directory there is a batch file that calls my exe's. like: start a1.exe start a2.exe start a3.exe let's name it as startAll.bat and supp...

4
голосов
4ответов
1513 просмотров

Implementing the "system" command in Java

I have need for a "system" function call, the same as those in Python, Perl, PHP, Ruby, &c. It will be a component of a JavaScript standard library called Narwhal, when it's run on the Rhino JavaScript engine, which is in turn run on Java. The trouble is that Java's standard library appears...

2
голосов
3ответов
1121 просмотров

Using System Properties in Java

I have a question on using System Properties in Java. Some classes like Authenticator require that we set the system properties regarding Proxy settings and than verify whether the Proxy was valid or not. My question is should I remove the Set Properties after I am done using it ? There are oth...

1
голосов
3ответов
251 просмотров

How do I test an exception that is only thrown when the system path is wrong?

I have the following class in C# which creates an object from a propriatery .DLL that requires a license in a reachable directory at the initialization . public CplexServices{ private Cplex _cplex; public Cplex Cplex { get { return _cplex; } } public CplexServices() { try...

2
голосов
4ответов
1079 просмотров

Safe Concurrent Write to a File Shared Between a Perl and a PHP script

A Perl script (which I do not control) appends lines to the end of a text file periodically. I need my PHP script (which will run as a cron job) to read the lines from that file, process them, and then remove them from the file. But, it seems like the only way to remove a line from a file with P...

0
голосов
1ответов
963 просмотров

LsaEnumerateLogonSessions error

I have a Windows service which starts another application using CreateProcess. Thus, the application runs with SYSTEM privileges. This application calls LsaEnumerateLogonSessions, which returns the error code 8 (Not enough storage is available to process this command.). The service and the applic...

2
голосов
8ответов
301 просмотров

Best way to run external app only if it exists

I've got a Perl script that as one of its final steps creates a compressed version of a file it has created. Due to some unfortunate setups, we cannot guarantee that a given customer will have a specific compression function. I want to put something like this together: if ($has_jar) { syst...

6
голосов
3ответов
3586 просмотров

Is it a good way to use system() for database scripts from C?

I was searching for connecting to database from C program. But I thought the ODBC connections, logon and all need some libraries. Also I am having a minimal compiler like Tiny C Compiler which is very fast. I do not want to use any ODBC logic etc which is needed to connect and query the database....

42
голосов
6ответов
34780 просмотров

How to list out all Foreign Keys with "WITH NOCHECK" in SQL Server

Does anyone know a query for listing out all foreign keys in a database with WITH NOCHECK description applied to it? (removing them will boost performance and stability).

3
голосов
6ответов
2684 просмотров

how to get system unique id using vc++ code?

I'm new to vc++ language so I want to get system unique id using vc++ language. so please can anybody help me in coding how to get system unique id?

1
голосов
6ответов
2459 просмотров

How to create our own numeric system?

The question is for any modern unmanaged language.C-like languages,delphi,anything. I'd like to create my own cryptography algorithm that ,unlike others,decreases the length of the encrypted string. My first thought was to create my own numberic system similiar to hexadicimal,but with more char...

5
голосов
3ответов
1344 просмотров

Why do boot loaders relocate in memory?

I am writing a boot loader, and I've got most of the details down, but I am not sure why some boot loaders relocate themselves in memory before they begin the bulk of their execution. Can anyone explain this? An example of this behavior is the original v0.01 Linux kernel bootloader which has th...

2
голосов
3ответов
1494 просмотров

Navigation toolbar rightside two buttons

Does anyone know how to add two system buttons to the top right side of my navigation toolbar? I know that custom buttons can be added, and I really don't understand why the system buttons can't do this too. And I really need it. I need an add button and an edit button. Edit to reorder and del...

0
голосов
7ответов
1447 просмотров

Graduation Project

I require to do a project as a part of my final year of engineering graduation studies.Can you suggest some projects pertaining to distributed systems and artificial intelligence together and which require python,c or c++ for programming? Note:-Please suggest a project that is attainable for a gr...