Search Results

Search found 25401 results on 1017 pages for 'adobe partner program'.

Page 98/1017 | < Previous Page | 94 95 96 97 98 99 100 101 102 103 104 105  | Next Page >

  • Write to pipe deadlocking program

    - by avs3323
    Hi, I am having a problem in my program that uses pipes. What I am doing is using pipes along with fork/exec to send data to another process What I have is something like this: //pipes are created up here if(fork() == 0) //child process { ... execlp(...); } else { ... fprintf(stderr, "Writing to pipe now\n"); write(pipe, buffer, BUFFER_SIZE); fprintf(stderr, "Wrote to pipe!"); ... } This works fine for most messages, but when the message is very large, the write into the pipe deadlocks. I think the pipe might be full, but I do not know how to clear it. I tried using fsync but that didn't work. Can anyone help me?

    Read the article

  • help regarding PERL program

    - by riya
    Could someone write simple PERL programs for the following scenarios: 1) convert a list from {1,2,3,4,5,7,9,10,11,12,34} to {1-5,7,9-12,34} 2) to sort a list of negative numbers 3) to insert values to hash array 4) there is a file with content: C1 c2 c3 c4 r1 r2 r3 r4 put it into an hash array where keys = {c1,c2,c3,c4} and values = {r1,r2,r3,r4} 5) There are testcases running each testcase runs as a process and has a process ID. The logs are logged in a logfile process ID appended to each line. Prog to find out if the test case has passed or failed. The program shoud be running till the processes are running and display output.

    Read the article

  • improve my python program to fetch the desire rows by using if condition

    - by user2560507
    unique.txt file contains: 2 columns with columns separated by tab. total.txt file contains: 3 columns each column separated by tab. I take each row from unique.txt file and find that in total.txt file. If present then extract entire row from total.txt and save it in new output file. ###Total.txt column a column b column c interaction1 mitochondria_205000_225000 mitochondria_195000_215000 interaction2 mitochondria_345000_365000 mitochondria_335000_355000 interaction3 mitochondria_345000_365000 mitochondria_5000_25000 interaction4 chloroplast_115000_128207 chloroplast_35000_55000 interaction5 chloroplast_115000_128207 chloroplast_15000_35000 interaction15 2_10515000_10535000 2_10505000_10525000 ###Unique.txt column a column b mitochondria_205000_225000 mitochondria_195000_215000 mitochondria_345000_365000 mitochondria_335000_355000 mitochondria_345000_365000 mitochondria_5000_25000 chloroplast_115000_128207 chloroplast_35000_55000 chloroplast_115000_128207 chloroplast_15000_35000 mitochondria_185000_205000 mitochondria_25000_45000 2_16595000_16615000 2_16585000_16605000 4_2785000_2805000 4_2775000_2795000 4_11395000_11415000 4_11385000_11405000 4_2875000_2895000 4_2865000_2885000 4_13745000_13765000 4_13735000_13755000 My program: file=open('total.txt') file2 = open('unique.txt') all_content=file.readlines() all_content2=file2.readlines() store_id_lines = [] ff = open('match.dat', 'w') for i in range(len(all_content)): line=all_content[i].split('\t') seq=line[1]+'\t'+line[2] for j in range(len(all_content2)): if all_content2[j]==seq: ff.write(seq) break Problem: but istide of giving desire output (values of those 1st column that fulfile the if condition). i nead somthing like if jth of unique.txt == ith of total.txt then write ith row of total.txt into new file.

    Read the article

  • Buffering db inserts in multithreaded program

    - by Winter
    I have a system which breaks a large taks into small tasks using about 30 threads as a time. As each individual thread finishes it persists its calculated results to the database. What I want to achieve is to have each thread pass its results to a new persisance class that will perform a type of double buffering and data persistance while running in its own thread. For example, after 100 threads have moved their data to the buffer the persistance class then the persistance class swaps the buffers and persists all 100 entries to the database. This would allow utilization of prepared statements and thus cut way down on the I/O between the program and the database. Is there a pattern or good example of this type of multithreading double buffering?

    Read the article

  • C# program for finding how many numbers are devidable by 5 in give range

    - by user1639735
    My task is: Write a program that reads two positive integer numbers and prints how many numbers p exist between them such that the reminder of the division by 5 is 0 (inclusive). Example: p(17,25) = 2. Console.Write("Enter min: "); int min = int.Parse(Console.ReadLine()); Console.Write("Enter max: "); int max = int.Parse(Console.ReadLine()); Console.WriteLine("The numbers devidable by 5 without remainder from {0} to {1} are: ",min,max); for (int i = min; i <= max; i++) { if (i % 5 == 0) { Console.WriteLine(i); } } This prints out the numbers that are devidable by 5 in the range...How do I count how many are there and print the count in the console? Thanks.

    Read the article

  • Simple Question:Output of below Java program

    - by Abhishek Jain
    public class abc1 { private String s; public abc1(String s){this.s=s;} public static void main(String args[]) { HashSet<Object> hs=new HashSet<Object>(); abc1 a1= new abc1("abc"); abc1 a2= new abc1("abc"); String s1= new String("abc"); String s2= new String("abc"); hs.add(a1); hs.add(a2); hs.add(s1); hs.add(s2); System.out.println(hs.size()); } } Why above program output is 3?

    Read the article

  • How to handle inputs in a C shell program during exec

    - by hits_lucky
    I am currently writing my own shell program. This simple shell can just execute commands. When executing commands like vi or calc which require input from the terminal , the command is getting executed and is waiting for the input from the user. But I am unable to give any input on the screen. How should the input be handled during the fork and exec. Here is the piece of code which is executing commands: if((pid = fork()) < 0) { perror("Fork failed"); exit(errno); } if(pid == 0) { // Child process if(execvp(arguments[0], arguments) == -1) { child_status = errno; switch(child_status) { case ENOENT: printf(" command not found \n"); break; } exit(errno); } } else { // parent process int wait_stat; if(waitpid(pid , &wait_stat, WNOHANG) == -1) { printf(" waitpid failed \n"); return; } } } ~ Thanks,

    Read the article

  • Problem with basic program using Boost Threads in c++

    - by Eternal Learner
    I have a simple program which creates and executes as thread using boost threads in c++. #include<boost/thread/thread.hpp> #include<iostream> void hello() { std::cout<<"Hello, i am a thread"<<std::endl; } int main() { boost::thread th1(&hello); th1.join(); } The compiler throws an error against the th1.join() line. It says " Multiple markers at this line - undefined reference to `boost::thread::join()' - undefined reference to `boost::thread::~thread()' "

    Read the article

  • How to make a C program that can run x86 hex codes

    - by Iowa15
    I have an array of hex codes that translate into assembly instructions and I want to create program in C that can execute these. unsigned char rawData[5356] = { 0x4C, 0x01, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x0C, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x2E, 0x74, 0x65, 0x78, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB4, 0x05, 0x00, 0x00, 0xA4, 0x01, 0x00, 0x00, 0x68, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x00, 0x00, 0x00, 0x20, 0x00, 0x30, 0x60, 0x2E, 0x64, 0x61, 0x74, 0x61, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x30, 0xC0, 0x2E, 0x62, 0x73, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x30, 0xC0, 0x2F, 0x34, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x58, 0x07, 0x00, 0x00, 0x32, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x20, 0x10, 0x30, 0x60, 0x2F, 0x33, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x6C, 0x07, 0x00, 0x00,...and so on

    Read the article

  • stack of a c program

    - by ckarthickit
    how the stack would look like for the following program if I give input as 5. #include <stdio.h> int fibonacci(int number) { int retval; if (0 == number){ return 0; } if (1 == number){ return 1; } return(fibonacci(number-1) + fibonacci(number-2)); } int main() { int number = 0; int fibvalue = 1; while (1){ printf("please enter the number\n"); scanf("%d", &number); fibvalue = fibonacci(number); printf("computed fibonacci value %d\n", fibvalue); } return 1; } also give me links where i can learn about it

    Read the article

  • Automatically taking screenshots of program window

    - by Sergey Kornilov
    I'm looking for a software that combines macro recording with screenshot taking capabilities. We have a software manual with a number of screenshots. When new version of software is released we need to update most of screenshots and we have to do it manually. Now we started translating manual to several languages and number of screenshots to take have increased ten fold. We'd like to automate this process. There will be a recorded macro or something that clicks button within our software and takes screenshots of the program window. Better yet, we can specify the name of each screenshot individually though it's less important. Does such a thing exist?

    Read the article

  • Why this C program outputs a negative number?

    - by JMSA
    I have assigned the complement value in an unsigned variable. Then why this C program outputs a negative number? #include<stdio.h> #include<conio.h> int main() { unsigned int Value = 4; /* 4 = 0000 0000 0000 0100 */ unsigned int result = 0; result = ~ Value; /* -5 = 1111 1111 1111 1011 */ printf("result = %d", result); /* -5 */ getch(); return 0; }

    Read the article

  • strtok program crashing.

    - by baskin
    Hi, the program for strtok given on http://www.opengroup.org/onlinepubs/000095399/functions/strtok.html crashes everytime.. #include <string.h> ... char *token; char *line = "LINE TO BE SEPARATED"; char *search = " "; /* Token will point to "LINE". */ token = strtok(line, search); /* Token will point to "TO". */ token = strtok(NULL, search); If I use a char array for variable 'line', it works. i.e. char line[] = "LINE TO BE SEPARATED" works. Kindly explain.

    Read the article

  • Windows Mobile 6.5 Running Program List Icon

    - by CNutt
    I've got an windows mobile 6.5 application I'm developing and am having trouble with one icon. At the top right hand of the screen there is an icon that, when clicked, will display a list of programs running the background with the option to close them. When my program is in this list, it's icon does not show up as the others do. I'm my exe I've got an .ico for 16x16, 22x22, 32x32, 36x36, 44x44, 45x45, 60x60, and 64x64, with the optional 90x90 png and registry setting in my cab. What am I missing?

    Read the article

  • Maintain a variable value between program runs

    - by Akshay J
    I have a simple c# console application that is scheduled after every 5 mins. Every invocation of the program requires the output of the last run. What I am doing right now is using a text file and store the result in it. next time when it runs it opens the text file and know the output of the previous run. Is there any other way to do it that wont require any such text file ? Like maintaining a session variable etc ?

    Read the article

  • Network Communication program in python

    - by lamnep
    Hi all, Basically what I'm trying to achieve is a program which allow users to connect to a each other over a network in, essentially, a chat room. What I'm currently struggling with is writing the code so that the users can connect to each other without knowing the IP-address of the computer that the other users are using or knowing the IP-address of a server. Does anyone know of a way in which I could simply have all of the users scan the IP range of my network in order to find any active 'room' and then give the user a chance to connect to it? Also, the hope is that there will be no need for a central server to run this from, rather every user will simply be connected to all other user, essentially being the server and client at the same time.

    Read the article

  • iOS enterprise program - In-house Distribution

    - by fr33d0m
    I'm development a app for iPad that will be used within the company only. As the devices that will use the app will be more than 100, the company need to join iOS enterprise program. How works the distribution for In-house distribution? I need to register all the devices to generate one Certificate for the app? Or I can generate one Certificate and the app will work on every devices? Apple need to approve the application for In-house distribution? The company's objective for distribution will be deploy the application on their website so the employees can access the web site, login, and download the app for theirs devices. There is any roles from apple that does not approve this method? What is the best method for distribution In-house app?

    Read the article

  • Automatic program update and Windows 7

    - by Mmarquee
    Hi We have a suite of programs that check for new versions at startup, and then download new versions to run if required. This is obviously a problem in Windows 7, when it is locked down as a 'standard user', as they can't write to the c:\program files directory and below. Anyone seen a example of an application that gets around with issue ? Our applications are written in Delphi, but an example in any language would be useful. Thanks in advance Update: We already have a system for determing whether a new version exists, the only problem is the download and install (if required), as this requires elevation. I can't think of a way that doesn't require an elevation prompt, or our users to reduce their security settings. Update 2 : I've asked a subsequent question, rather than adding a new one here

    Read the article

  • Python recursive program

    - by mathboy
    I'm relatively newcomer on programming as I'm educated a mathematician and have no experience on Python. I would like to know how to solve this problem in Python which appeared as I was studying one maths problem on my own: Program asks a positive integer m. If m is of the form 2^n-1 it returns T(m)=n*2^{n-1}. Otherwise it writes m to the form 2^n+x, where -1 < x < 2^n, and returns T(m)=T(2^n-1)+x+1+T(x). Finally it outputs the answer.

    Read the article

  • Automatically registering "commands" for a command line program in python

    - by seandavi
    I would like to develop a command-line program that can process and give "help" for subcommands. To be concrete, say I have a single script called "cgent" and I would like to have subcommands "abc", "def", and "xyz" execute and accept the rest of the sys.args for processing by optparse. cgent abc [options] cgent help abc .... All of this is straightforward if I hard-code the subcommand names. However, I would like to be able to continue to add subcommands by adding a class or module (?). This is similar to the idea that is used by web frameworks for adding controllers, for example. I have tried digging through pylons to see if I can recreate what is done there, but I have not unravelled the logic. Any suggestions on how to do this? Thanks, Sean

    Read the article

  • Why does this program segfault

    - by Leda
    Upon compiling and running this small program to reverse a string, I get a Segmentation Fault before any output occurs. Forgive me if this is an obvious question, I'm still very new to C. #include <stdio.h> int reverse(char string[], int length); int main() { char string[] = "reversed"; printf("String at start of main = %s", string); reverse(string, sizeof(string)); printf("%s\n", string); return 0; } // Reverse string int reverse(char string[], int length) { int i; char reversed[] = {}; int temp; for(i = 0; i < length; ++i) { temp = string[i]; reversed[length - i] = temp; } return 0; }

    Read the article

  • C# Launcher program(ConsoleApp) that launches other executables

    - by Agile Noob
    I've written a launcher program that fires off a given number of executables, with the following code: Process.Start(strPath2EXE); The problem I'm running into is it seems I'm being limited to launching only about four copies of the executable. Is there a different way I can launch the executables without this limit? I'm hoping to run 10+ concurrently. Here is the error from the event log: EventType clr20r3, P1 launcher.exe, P2 1.0.0.0, P3 4bec3901, P4 system, P5 2.0.0.0, P6 4889de7a, P7 39f5, P8 288, P9 system.componentmodel.win32, P10 NIL.

    Read the article

  • program to determine number of duplicates in a sentence

    - by bhavna raghuvanshi
    public class duplicate { public static void main(String[] args)throws IOException { System.out.println("Enter words separated by spaces ('.' to quit):"); Set<String> s = new HashSet<String>(); Scanner input = new Scanner(System.in); while (true) { String token = input.next(); if (".".equals(token)) break; if (!s.add(token)) System.out.println("Duplicate detected: " + token); } System.out.println(s.size() + " distinct words:\n" + s); } } my program detects and prints duplicate words but i need to print the number of duplicate words also. pls help me do it.

    Read the article

  • Common files in output directories in a C# program

    - by Net Citizen
    My VS2008 solution has the following setup. Program1 Program2 Common.dll (used and referenced by both Program1 and Program2) In debug mode I like to set my output directory to Program Files\Productname, because some code will get the exe path for various reasons. My problem is that Program1 when compiled, will give an error that it could not copy Common.dll if Program2 is started. And vise versa. The annoyance here is that I don't even make changes to Common.dll that often, but 100% of the time it will try to copy it, not only when there are changes. I end up having to close all programs, and then build and then start them. So my question is, how can I only have VS2008 copy the Common.dll if there are changes inside the Common.dll project?

    Read the article

  • Program quits if pipe is closed

    - by givemelight
    I am trying to write to a pipe using C++. The following code gets called in an extra thread: void writeToPipe() { int outfifo; char buf[100]; char outfile[] = "out"; mknod(outfile, S_IFIFO | 0666, 0); if ((outfifo = open(outfile, O_WRONLY)) < 0) { perror("Opening output fifo failed"); return false; } int currentTimestamp = (int)time(0); int bufLen = sprintf(bug, "Time is %d.", currentTimestamp); write(outfifo, buf, bufLen); } The thread is called in main using: thread writeThread(writeToPipe); writeThread.detach(); If the pipe is not opened by another process, the C++ program just quits without an error. I don't know how to check if the pipe is opened.

    Read the article

< Previous Page | 94 95 96 97 98 99 100 101 102 103 104 105  | Next Page >