FAQ Database Discussion Community


Previously perfect C program doesn't run after compiling on Ubuntu [closed]

c,ubuntu,compilation,execution
I have a strange problem. I wrote a C program for point in polygon (pip) problem, and when I wrote it, I use Elementary OS. The program ran very well. Then I had to switch to Ubuntu 14.04 LTS, because I couldn't install netCdf on Elementary OS Luna. I copied...

Hadoop Hive unable to move source to destination

java,hadoop,hive,execution
I am trying to use Hive 1.2.0 over Hadoop 2.6.0. I have created an employee table. However, when I run the following query: hive> load data local inpath '/home/abc/employeedetails' into table employee; I get the following error: Failed with exception Unable to move source file:/home/abc/employeedetails to destination hdfs://localhost:9000/user/hive/warehouse/employee/employeedetails_copy_1 FAILED: Execution...

Taking long time executing complex mySql query

php,mysql,while-loop,execution
My query looks like this: $result_portlist=mysql_query(" SELECT portfolio AS the_port, SUM(balance * course) AS the_balance, SUM(insurance * course) AS the_insurance FROM banks_all WHERE CONCAT(balance, insurance)!='0' GROUP BY portfolio ",$db); $myrow_portlist=mysql_fetch_array($result_portlist); if(mysql_num_rows($result_portlist)>0) { do { echo '<span> value1, vaule2, value3...</span>'; $result_portlist1=mysql_query(" SELECT department AS the_department, SUM(balance * course) AS the_balance, SUM(insurance...

Implementing execution timeout with C/C++

c++,c,linux,timeout,execution
I've been thinking about implementing an execution timeout mechanism in my code. I browsed looking for advice but all I saw is implementing execution timeouts for other programs being called, which wasn't exactly my idea. I'm working with C/C++ on Linux. What's the best way to accomplish this without using...

xargs - does the program run in loop or get re-executed

linux,command-line,command-line-arguments,execution,xargs
I have a C++ program that is outputting text strings which are read as command line inputs to my Java program. My question is does the Java program continuously run with new inputs given or does the program terminate and then get executed again when new command line arguments are...

Job not executing at fixed rate

spring-mvc,jobs,execution
I have the following spring mvc configuration: <task:scheduled-tasks scheduler="defaultScheduler"> <task:scheduled ref="myTaskWorker" method="someMethod" fixed-rate="500" /> </task:scheduled-tasks> When I execute the above it is not executed in every 500ms but only executed after the finishing of the previous one. How can i resolve this?...

strace 'open' calls in a library of an executable

linux,unix,execution,tracing,strace
I have a program with no source code. When I run it, I have a "Can't open file..." error in the logs. I called strace to trace the open calls on the kernel, in that way: strace -e trace=open,close,read,write,connect,accept your-command-here However, it seems there is none of the open calls...

Alfresco moving document

listener,alfresco,execution
I have an execution listener script, that moves a file during the workflow to another folder, from In folder to Execut. When I'm starting workflow from User files it works good, but from document library in site it doesn't work, showing error org.alfresco.scripts.ScriptException: 05190025 Failed to execute supplied script: Destination...

Streaming commands output progress

go,execution
I'm writing a service that has to stream output of a executed command both to parent and to log. When there is a long process, the problem is that cmd.StdoutPipe gives me a final (string) result. Is it possible to give partial output of what is going on, like in...

“A Java Exception has occured” what might be the cause?

java,exception,jar,runtime-error,execution
When my jar is run on another computer there occurs a java exception but on my setup it runs ok. They are using Java 1.8? atleast one of them is. and my JDK is also 1.8. Could the cause of this be in META-INF? I also tried sending .class files...

Where does C function execution stop

python,c,shared-libraries,execution
In the project folder I have: libtest.so test.h I have imported ctypes in my python code (not sure if it was necessary) and I loaded .so file like following: lib = cdll.LoadLibrary('./libtest.so') In "test.h" C header file I have: long TEST_API test( ___OUT_ char text[41], ___OUT_ char* pcReceiptSignature, ); I...

Run an executable with a parameter using Invoke-Command

powershell,execution,invoke-command
I am trying to run an executable with a config file as a parameter using invoke-command through a PowerShell script. Here is what I have so far in my PowerShell script: $config = 'D:\EmailLoader\App.config' invoke-command -ComputerName SERVER-NAME -ScriptBlock {param($config) & 'D:\EmailLoader\GetMailAndAttachment.exe' $config} -ArgumentList $config I then Execute the PowerShell script...

Execution time of a short function c++

c++,time,execution
I want to calculate the execution time of a pretty small function to compare the execution time of a recursive function vs iterative. Surely, clock() simply cannot do that with not enough resolution. Could you show me how can I use another time sources like GetThreadTimes(). I saw a description...

Selenium Java Code need to start from begin when changes made to the code

selenium,execution,changes
I am Using Eclipse, Selenium Web Driver and Java to automate our Web Application. As part of execution in debug mode, i have made a change in the code and saved. But the code changes are not reflecting in the current execution, need to restart the execution from the begin....

Executing functions stored in a string

string,function,delphi,execution
Lets say that there is a function in my Delphi app: MsgBox and there is a string which has MsgBox in it. I know what most of you are going to say is that its possible, but I think it is possible because I opened the compiled exe(compiled using delphi...

Base condition in recursive query using CTE?

sql,recursion,execution
WITH CTE AS( SELECT ID,Name,ManagerID, 1 RecursiveCallNumber FROM Employee WHERE ID=2 UNION ALL SELECT E.ID,E.Name,E.ManagerID,RecursiveCallNumber+1 RecursiveCallNumber FROM Employee E INNER JOIN CTE ON E.ManagerID=CTE.ID ) SELECT * FROM CTE How does the above code work logically? Here is my explanation: Execute the the first select statement. [Now the temporary table...

Why the execution time is different for following SQL Server code?

sql,sql-server-2008,function,time,execution
Note: Neglect the logic inside GO...........GO, focus on only Line 1 and Line N SELECT DATENAME(NANOSECOND, GETDATE()) --Line 1 GO BEGIN DECLARE @t1 NVARCHAR(100) DECLARE @datetime1 DATETIME = '12-23-35'; DECLARE @time1 TIME(4) = '11:10:05.1234'; DECLARE @time2 TIME(5) = '11:10:05.12345'; DECLARE @datetime2 DATETIME; SET @datetime2 = @datetime1 SET @datetime2 = @time1...

How do I properly use conditonal execution to draw a circle based on input?

javascript,html,colors,conditional,execution
Basically my end goal is to make a function where in the end you have to finds and one button and when you press the button it adds the 2 numbers together and if that number is less than 5 it draws a red circle and if it is bigger...