ubuntu-10.04

Monodevelop on Ubuntu Console.ReadLine doesn't work

こ雲淡風輕ζ 提交于 2019-12-01 18:55:09
I'm trying to develop on Mono platform on Ubuntu. But I got trouble on my first application :) Here is the code: using System; using System.Threading; namespace threadings { class MainClass { public static void Main (string[] args) { Console.WriteLine ("The start"); string x=Console.ReadLine(); Console.WriteLine(x); Console.WriteLine ("the end"); } } } And here is the result: The start the end And no any string between them, and no reading from console happens, and I can't input anything. What is the problem? Maybe I do something wrong? My environment: Ubuntu: Linux nozim-desktop 2.6.32-32

Make gdb quit automatically on successful termination?

ε祈祈猫儿з 提交于 2019-12-01 15:28:46
I use a debugging script that runs several related processes in succession with the debugger. I'm currently using -x to execute several commands automatically (such as run ). How can I make gdb quit automatically when the debugged process successfully terminates? Adding a quit command to the command file will cause that command to be handled not just on successful termination, but when errors occur also (when I'd rather take over at that point). Here's an extract of what's going on: + gdb -return-child-result -x gdbbatch --args ./mkfs.cpfs /dev/loop0 GNU gdb (GDB) 7.1-ubuntu Reading symbols

How to compile the multithread code with gcc

99封情书 提交于 2019-12-01 12:57:24
I have seen the given two makefiles as follows: all: thread1 thread2 thread3 CFLAGS=-I/usr/include/nptl -D_REENTRANT LDFLAGS=-L/usr/lib/nptl -lpthread clean: rm -f thread1 thread2 thread3 ###################### all: thread1 thread2 thread3 CFLAGS=-D_REENTRANT LDFLAGS=-lpthread clean: rm -f thread1 thread2 thread3 Without using makefile, what is the correct command line to compile the thread1.c with gcc? gcc -o thread1 CFLAGS=-I/usr/include/nptl -D_REENTRANT LDFLAGS=-L/usr/lib/nptl -lpthread thread1.c karlphillip If your code don't have external dependencies beyond pthread: gcc thread1.c -o

Set environment variable in shell script/access in Java program

眉间皱痕 提交于 2019-12-01 11:41:36
I want to set environment using shell scrip in Ubuntu 10.04 and want to access in java program. I have wrote shell script like this: #! /bin/sh export JAVA=/home/ubuntu echo "Variable $JAVA" and my java program is : import java.util.Map; public class SystemEnv { public static void main(String[] args) { Map<String, String> variables = System.getenv(); for (Map.Entry<String, String> entry : variables.entrySet()) { String name = entry.getKey(); String value = entry.getValue(); System.out.println(name + "=" + value); } System.out.println(System.getenv(("JAVA"))); } } When I execute this command

Set environment variable in shell script/access in Java program

做~自己de王妃 提交于 2019-12-01 11:30:45
问题 I want to set environment using shell scrip in Ubuntu 10.04 and want to access in java program. I have wrote shell script like this: #! /bin/sh export JAVA=/home/ubuntu echo "Variable $JAVA" and my java program is : import java.util.Map; public class SystemEnv { public static void main(String[] args) { Map<String, String> variables = System.getenv(); for (Map.Entry<String, String> entry : variables.entrySet()) { String name = entry.getKey(); String value = entry.getValue(); System.out.println

How does parent process get the termination status through wait from a child process which calls _exit

醉酒当歌 提交于 2019-12-01 10:30:17
I have read the following statement. The status argument given to _exit() defines the termination status of the process, which is available to the parent of this process when it calls wait(). A process is always successfully terminated by _exit() (i.e., _exit() never returns ). Question If _ exit doesn't return, how does the parent process can get the termination status from the child process through the wait ? Whenever a process exits (whether or not by calling _exit(int Exit_Status) ) the kernel sends SIGCHLD function to its parent. the parent may either 1. Ignore the incoming signal 2.

Cannot run rake db:migrate, relation does not exist

a 夏天 提交于 2019-12-01 08:20:11
I am trying to get a working app to work on linux 10.04 running on vagrant I installed all relevant gems, installed postgresql 9.1.9 and when I am trying to run rake db:migrate I am getting rake aborted! PG::Error: ERROR: relation "messages" does not exist LINE 5: WHERE a.attrelid = '"messages"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid = d.adrelid AND a.attnum = d.adnum WHERE a.attrelid = '"messages"'::regclass AND a.attnum > 0 AND NOT a

Cannot run rake db:migrate, relation does not exist

試著忘記壹切 提交于 2019-12-01 06:44:39
问题 I am trying to get a working app to work on linux 10.04 running on vagrant I installed all relevant gems, installed postgresql 9.1.9 and when I am trying to run rake db:migrate I am getting rake aborted! PG::Error: ERROR: relation "messages" does not exist LINE 5: WHERE a.attrelid = '"messages"'::regclass ^ : SELECT a.attname, format_type(a.atttypid, a.atttypmod), pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod FROM pg_attribute a LEFT JOIN pg_attrdef d ON a.attrelid =

linux/module.h No such file or Directory

风格不统一 提交于 2019-12-01 04:16:36
问题 For my thesis I am creating a Manet using the protocol ARAN. To install the protocol I'm using this manual, but the first step, the creation of trace_route, I received errors such as: -linux/module.h: No such file or directory -linux/procs_Fs: No such file or directory -linux/skbuff: No such file or directory I searched the web and found out that the problem is in the headers, but I do not find the solution ... P.S. I am using Ubuntu 10.04 LTS Kernel 2.6.33 recompiled 回答1: You're missing the

cURL/PHP Request Executes 50% of the Time

落花浮王杯 提交于 2019-11-30 20:22:52
After searching all over, I can't understand why cURL requests issued to a remote SSL-enabled host are successful only 50% or so of the time in my case. Here's the situation: I have a sequence of cURL requests, all of them issued to a HTTPS remote host, within a single PHP script that I run using the PHP CLI. Occasionally when I run the script the requests execute successfully, but for some reason most of the times I run it I get the following error from cURL: * About to connect() to www.virginia.edu port 443 (#0) * Trying 128.143.22.36... * connected * Connected to www.virginia.edu (128.143