Search Results

Search found 2007 results on 81 pages for 'pid'.

Page 55/81 | < Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >

  • logrotate compress files after the postrotate script

    - by Thomas
    I have an application generating a really heavy big log file every days (~800MB a day), thus I need to compress them but since the compression takes time, I want that logrotate compress the file after reloading/sending HUP signal to the application. /var/log/myapp.log { rotate 7 size 500M compress weekly postrotate /bin/kill -HUP `cat /var/run/myapp.pid 2>/dev/null` 2>/dev/null || true endscript } Is it already the case that the compression takes place after the postrotate (which would be counter-intuitive)? If not Can anyone tell me if it's possible to do that without an extra command script (an option or some trick)? Thanks Thomas

    Read the article

  • How do I find the largest factor of an integer in mysql

    - by Bill H
    I am trying to write a select query that will dynamically determine the minimum number of items that can be packaged together. I am having trouble with one part of the query. ... CASE WHEN (pid.product_id) THEN 1 WHEN ((p.case_pack = p.inner_pack) AND (p.inner_pack % 11 = 0)) THEN CEILING(p.inner_pack / 11) WHEN ((p.case_pack = p.inner_pack) AND (p.inner_pack % 7 = 0)) THEN CEILING(p.inner_pack / 7) WHEN ((p.case_pack = p.inner_pack) AND (p.inner_pack % 6 = 0)) THEN CEILING(p.inner_pack / 6) WHEN ((p.case_pack = p.inner_pack) AND (p.inner_pack % 5 = 0)) THEN CEILING(p.inner_pack / 5) WHEN ((p.case_pack = p.inner_pack) AND (p.inner_pack % 4 = 0)) THEN CEILING(p.inner_pack / 4) WHEN ((p.case_pack = p.inner_pack) AND (p.inner_pack % 3 = 0)) THEN CEILING(p.inner_pack / 3) WHEN ((p.case_pack = p.inner_pack) AND (p.inner_pack % 2 = 0)) THEN CEILING(p.inner_pack / 2) ELSE p.inner_pack END AS min_pack ... What I want to do is find the largest factorial of an integer (p.inner_pack) that is under 12. Is there a better way to do this in mysql?

    Read the article

  • CoreDumpDirectory isn't working on ubuntu; getting segmentation fault with php

    - by siran
    I'm trying to solve a segmentation fault. This message appears in my apache-error.log: [notice] child pid 3979 exit signal Segmentation fault (11) I've tried disabling some apache and php modules but I'm still getting the same error. I've also tried putting this in apache2.conf: CoreDumpDirectory /tmp/apache2-gdb-dump and then chmod 777, chown www-data... so that the server can write. I can see no core-dump files to give me a hint on the error. Does anybody have an idea why CoreDumpDirectory isn't working on Ubuntu?

    Read the article

  • How to debug an App on Android with GDBSERVER?

    - by cjserio
    I'm trying to debug a native shared library that my App uses through JNI. I can attach to a running app just fine with "gdbserver --attach pid" but i need to actually launch my app when i launch the gdbserver command. There's a million blog hits on this topic but none of them seem to be clear as to how you launch your app. They all say to just type "gdbserver 10.0.2.2:1234 ./MyProgram" but what exactly is "MyProgram". Is that MyProgram.apk? Is it MyProgram.so? Is it some other file that gets created when the app is installed? If so, what's its path?

    Read the article

  • MySQL PHP incompatibility.

    - by Evernoob
    Ok maybe I've overlooked something really simple here, but I can't seem to figure this out. I'm running WAMP locally, but connecting to a remote MySQL database. The local version of PHP is the latest 5.3.0. One of the remote databases, being version 5.0.45 works fine. However, the other remote database I'm trying to connect to, which is version 5.0.22 throws the following error before dying: Warning: mysql_connect() [function.mysql-connect]: OK packet 6 bytes shorter than expected. PID=5880 in ... Warning: mysql_connect() [function.mysql-connect]: mysqlnd cannot connect to MySQL 4.1+ using old authentication in ... WTF? UPDATE: Reverting to PHP 5.2.* i.e. anything lower than 5.3.0 resolves the problem completely. As long as I am not running 5.3.0 I can connect to both databases. I'm not sure what the explanation is for this weirdness.

    Read the article

  • What's the best way to run a process remotely with capturing the output ?

    - by Homam
    Hi all, I have a windows service responsible for running processes on a remote machine with capturing the output, I googled for that and read a lot of articles and threads, I found two ways: 1) using WMI for call the remote process like this example: http://www.codeproject.com/KB/cs/EverythingInWmi02.aspx 2) using the PsExec tool by System.Diagnostic.Process class ever way of these has many problems, the WMI doesn't support returning the output and doesn't support "WaitingToExit" It just call the process and return the PId, and the PsExec couldn't capture the output programmatically by System.Diagnostic.Process in a clear way, I found only workarounds like redirect the output to a file then read the redirected file..etc, I need a real solution please

    Read the article

  • Mysql query - problem with order by

    - by Sergio
    I'm using two tables for selecting messages between users. Table "messages" for recording the messages and table "members" for checking users data (are they activ or deleted). This query working fine. What I need to do is list the received messsages order by last received. I tried to do with "ORDER BY messages.id DESC" at the end of this query but it didn't work. All messages are listed from first received. This is the mysql join table query that I'm using: sql = "select distinct messages.fromid, messages.readed, messages.fromid, messages.toid, members.id as pid From messages Inner Join members on members.id = messages.fromid Where messages.toid = ".$mid." AND members.status = 7 AND messages.kreaded !='1' AND messages.subject != 'readed' GROUP BY fromid" Is there any way to do this?

    Read the article

  • What are some good ways to do intermachine locking?

    - by mike
    Our server cluster consists of 20 machines, each with 10 pids of 5 threads. We'd like some way to prevent any two threads, in any pid, on any machine, from modifying the same object at the same time. Our code's written in Python and runs on Linux, if that helps narrow things down. Also, it's a pretty rare case that two such threads want to do this, so we'd prefer something that optimizes the "only one thread needs this object" case to be really fast, even if it means that the "one thread has locked this object and another one needs it" case isn't great. What are some of the best practices?

    Read the article

  • two where conditions in a mysql query

    - by Kaartz
    I have a table like below |date|dom|guid|pid|errors|QA|comm| |2010-03-22|xxxx.com|jsd3j234j|ab|Yes|xxxxxx|bad| |2010-03-22|xxxx.com|jsd3j234j|ab|No|xxxxxx|| |2010-03-22|xxxx.com|jsd3j234j|if|Yes|xxxxxx|bad| |2010-03-22|xxxx.com|jsd3j234j|if|No|xxxxxx|| |2010-03-22|xxxx.com|jsd3j234j|he|Yes|xxxxxx|bad| |2010-03-22|xxxx.com|jsd3j234j|he|No|xxxxxx|| I want to retrieve the total count of "dom" referred to each "QA" and also I need the count of "errors" detected by the "QA" SELECT date, count(dom), QA FROM reports WHERE date="2010-03-22" GROUP BY QA |2010-03-22|2|ab| |2010-03-22|2|if| |2010-03-22|2|he| SELECT date, count(dom), count(errors), QA FROM reports WHERE errors="Yes" GROUP BY QA |2010-03-22|1|ab| |2010-03-22|1|if| |2010-03-22|1|he| I want to combine the above two queries, is it possible. If I use the below query, I am not getting the desired result. SELECT date, count(dom), QA, count(errors) FROM reports WHERE date="2010-03-22" AND errors="Yes" GROUP BY QA I want the below output |2010-03-22|2|ab|1| |2010-03-22|2|if|1| |2010-03-22|2|he|1| Please help me.

    Read the article

  • .NET 4.0 Debugging Behavior

    - by Jason
    We recently migrated to VS 2010. We installed .NET 4.0 on our test machine. When we execute a console application that throws an exception, we no longer see the exception message and stack trace printed to the console but instead see the message An unhandled win32 exception occurred in something.exe [PID]. Just-In-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. In Visual Studio, Just-In-Time debugging can be enabled from Tools/Options/Debugging/Just-In-Time. We do have the above setting enabled. What do we need to do to return to the behavior we had previously?

    Read the article

  • Android strace in Real device

    - by Martin Solac
    I have the following situation, I want to monitor the system calls on Android phones so I made an script to do that. With Android Emulator works perfectly (writes the traces of the application in a specific file on my Ubuntu). The problem is when I attach a real phone to analyze it, it says the following in the result file: ptrace attach failed: Operation not permitted I'm using this code to get it, but I don't understand why it works on the emulator and not in the rooted real device. This is the comand I use in perl: system("$dirTools/adb -s $Device shell strace -p $PID[1]>$dirRecordDataSet/$Date/$appName &"); Any suggestion? Thanks in advance

    Read the article

  • PHP Possible Memory Leak

    - by dropson
    I have a script that loops through a database for images to convert with gd & imagick. I unset or replace all variables and objects in between each loop. For each loop, get_memory_usage(1) reveals a concurrent amount of memory used by that script. Which is expected. But, when I run "top", the %MEM column reports that this script, (same PID), increments with several percentages for each loop. I destroy all images when I'm done with them, and when I run get_defined_vars(); only the standard globals and a few variables I have is set. Why is "top" % Memory Usage different than what PHP reports? After 10 loops, PHP has taken 20% percetage of the system memory. I run php 5.2.6 on Debian 5

    Read the article

  • PHP getting blank pages after submit a form + signal Segmentation fault (11)

    - by Ole Media
    I few days ago I update my macbook pro to snow leopard, and since then some php files are not showing. This is what happens: I created a php form, when going to 'http://localhost/webform.php' I can see the form just fine. Then, once I submit the form, I just get a blank page. I enable error and warnings reporting under php.ini to make sure I'm not missing something, but still I'm not getting anything, just the blank page. Then I checked under apache log files, and what I notice is that every time I submit the form I see the following line coming up under the apache logs: [Wed Apr 07 21:40:28 2010] [notice] child pid 70223 exit signal Segmentation fault (11) I'm clueless on this one. Any ideas on how to fix it?

    Read the article

  • Adjusting for compass wrap around in a navigation application

    - by chris12892
    I have a application where I am guiding a vehicle on compass headings and I am having an issue when the vehicle is crossing from 360 degrees to 0 degrees. In this case, there are no smarts in the control loop to compute that the nearest way to turn to follow a heading. For example, if the vehicle is instructed to follow a heading of 360 degrees, it will inevitably drifts a few degrees to ether side. If it drifts over to 0+ degrees, the control loop will go nuts and try to steer the vehicle all the way around to get it to 360 degrees again. Is there a graceful way to deal with this? The way the navigate function is written, I use an external PID controller class and I calculate the heading like this: lock (steering) { if (!Engaged) { return; } double mv = 90 + Trim + pidController.CalculateCorrection(flyHeading, currentHeading); steering.Degree = mv; } Thanks!

    Read the article

  • WAMP server suddenly stopped running scripts

    - by user2358008
    I have been working on a website for some months now. Every day, I open up the PHP scripts in the same manner, and every day they work just fine. Today, I go to open one up the same as I always do, except the page just comes up as the text file. All pages are the same, I have not changed most of them for many weeks now. WAMP is giving me no errors. I just installed the latest version, and it still won't work. There is no problem with file extensions, The only problem I can find is in the Apache Error Log: [Fri Oct 25 10:42:40.029691 2013] [mime:warn] [pid 4860:tid 1508] AH01599: Cannot get media type from 'x-httpd-php53' What does this mean?

    Read the article

  • overview/history of resident memory usage

    - by kapet
    I have a fairly complicated program (Python with SWIG'ed C++ code, long running server) that shows a constantly growing resident memory usage. I've been digging with the usual tools for the leak (valgrind, Pythons gc module, etc.) but to no avail so far. I'm a bit afraid that the actual problem is memory fragmentation within Python and/or libc managed memory. Anyway, my question is more specific right now: Is there a tool to visualize resident memory usage and ideally show how it develops over time? I think the raw data is in /proc/$PID/smaps but I was hoping there's some tool that shows me a nice graph of the amounts used by mmap'ed files vs. anonymous mmap'ed memory vs. heap over time so that it's easier to see (literally) what's changing. I couldn't find anything though. Does anybody know of a ready to use tool that graphs memory usage over space and time in an intuitive way?

    Read the article

  • e-commerce product data/metadata schemas

    - by Shreko
    Trying to figure out how is product data/metadata schema designed. For example, how does an e-commerce site enter a product spec. Does it copy and paste from mfg spec sheet, enters it in their own fields or something else? Here is an example, looking at the D3000 Nikon DSLR Manufacturer: http://nikon.ca/en/Product.aspx?m=17300&disp=Specs futureshop.ca: www.futureshop.ca/en-CA/product/nikon-nikon-d3000-10-2mp-dslr-camera-with-18-55mm-lens-kit-d3000/10128435.aspx?path=865c2348a1542e848982c9dbd9253483en02 memoryexpress.com: www.memoryexpress.com/Products/PID-MX25539%28ME%29.aspx They are all slightly different in order or in parent/child field? What's storage is used for this type of info rdbms or xml?

    Read the article

  • Why doesn't my Perl script start under FastCGI?

    - by Sam
    I am getting this error in error_log one of my Perl CGI application. I am pretty sure I haven't changed my script at all and all of a sudden i have started getting this error. This is what I see in error_log: [Wed Jul 8 15:18:20 2009] [warn] FastCGI: server "/local/web/test/cgi-bin/test.pl" (pid 17033) terminated by calling exit with status '255' [Wed Jul 8 15:18:20 2009] [warn] FastCGI: server "/local/web/test/cgi-bin/test.pl" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds (The snippet was edited for clarity) Also, the AddHandler line for FastCGI exists in the config file. Can any tell me the possible reasons for this error? There is nothing recorded in Apache logs.

    Read the article

  • In a Linux user space process what is the address of the vsyscall page?

    - by TomMD
    I would like to acquire the address of the vsyscall page for my own uses. I only have two ideas here: alter the compiler to store this information in some known location after it is given to __start, or read /proc/[pid]/maps. I really don't want to read /proc/ as that is slow and shouldn't be necessary. I also don't want to make compiler modifications. Does anyone have an alternative? Is there a symbol I should know about? Its at the point I'm tempted to stuff this functionality into an ioctl call in a module I've developed as part of this work!

    Read the article

  • Animate 3D model programmatically-where to start?

    - by amile
    I am having a task to create a 3D model face that can talk like humans.without having any knowledge about 3D modeling. I have no clue where to start.I have searched a lot and find some of these things.OpenGL,WebGL,XNA and other similar tool can be helpful. please guide me where to start a step by step approach and which platform is better as i have programming background in JAVA. here is an idea what I need to do https://docs.google.com/viewer?a=v&pid=gmail&attid=0.2&thid=13f65486a46a1f67&mt=application/pdf&url=https://mail.google.com/mail/?ui%3D2%26ik%3D49f1f393c6%26view%3Datt%26th%3D13f65486a46a1f67%26attid%3D0.2%26disp%3Dsafe%26realattid%3Df_hi6ylzbv2%26zw&sig=AHIEtbQc8KQNHdprmEnL4UXyD3ox8vlKKQ

    Read the article

  • Linux server is only using 60% of memory, then swapping

    - by Kamil Kisiel
    I've got a Linux server that's running our bacula backup system. The machine is grinding like mad because it's going heavy in to swap. The problem is, it's only using 60% of its physical memory! Here's the output from free -m: free -m total used free shared buffers cached Mem: 3949 2356 1593 0 0 1 -/+ buffers/cache: 2354 1595 Swap: 7629 1804 5824 and some sample output from vmstat 1: procs -----------memory---------- ---swap-- -----io---- -system-- -----cpu------ r b swpd free buff cache si so bi bo in cs us sy id wa st 0 2 1843536 1634512 0 4188 54 13 2524 666 2 1 1 1 89 9 0 1 11 1845916 1640724 0 388 2700 4816 221880 4879 14409 170721 4 3 63 30 0 0 9 1846096 1643952 0 0 4956 756 174832 804 12357 159306 3 4 63 30 0 0 11 1846104 1643532 0 0 4916 540 174320 580 10609 139960 3 4 64 29 0 0 4 1846084 1640272 0 2336 4080 524 140408 548 9331 118287 3 4 63 30 0 0 8 1846104 1642096 0 1488 2940 432 102516 457 7023 82230 2 4 65 29 0 0 5 1846104 1642268 0 1276 3704 452 126520 452 9494 119612 3 5 65 27 0 3 12 1846104 1641528 0 328 6092 608 187776 636 8269 113059 4 3 64 29 0 2 2 1846084 1640960 0 724 5948 0 111480 0 7751 116370 4 4 63 29 0 0 4 1846100 1641484 0 404 4144 1476 125760 1500 10668 105358 2 3 71 25 0 0 13 1846104 1641932 0 0 5872 828 153808 840 10518 128447 3 4 70 22 0 0 8 1846096 1639172 0 3164 3556 556 74884 580 5082 65362 2 2 73 23 0 1 4 1846080 1638676 0 396 4512 28 50928 44 2672 38277 2 2 80 16 0 0 3 1846080 1628808 0 7132 2636 0 28004 8 1358 14090 0 1 78 20 0 0 2 1844728 1618552 0 11140 7680 0 12740 8 763 2245 0 0 82 18 0 0 2 1837764 1532056 0 101504 2952 0 95644 24 802 3817 0 1 87 12 0 0 11 1842092 1633324 0 4416 1748 10900 143144 11024 6279 134442 3 3 70 24 0 2 6 1846104 1642756 0 0 4768 468 78752 468 4672 60141 2 2 76 20 0 1 12 1846104 1640792 0 236 4752 440 140712 464 7614 99593 3 5 58 34 0 0 3 1846084 1630368 0 6316 5104 0 20336 0 1703 22424 1 1 72 26 0 2 17 1846104 1638332 0 3168 4080 1720 211960 1744 11977 155886 3 4 65 28 0 1 10 1846104 1640800 0 132 4488 556 126016 584 8016 106368 3 4 63 29 0 0 14 1846104 1639740 0 2248 3436 428 114188 452 7030 92418 3 3 59 35 0 1 6 1846096 1639504 0 1932 5500 436 141412 460 8261 112210 4 4 63 29 0 0 10 1846104 1640164 0 3052 4028 448 147684 472 7366 109554 4 4 61 30 0 0 10 1846100 1641040 0 2332 4952 632 147452 664 8767 118384 3 4 63 30 0 4 8 1846084 1641092 0 664 4948 276 152264 292 6448 98813 5 5 62 28 0 Furthermore, the output of top sorted by CPU time seems to support the theory that swap is what's bogging down the system: top - 09:05:32 up 37 days, 23:24, 1 user, load average: 9.75, 8.24, 7.12 Tasks: 173 total, 1 running, 172 sleeping, 0 stopped, 0 zombie Cpu(s): 1.6%us, 1.4%sy, 0.0%ni, 76.1%id, 20.6%wa, 0.1%hi, 0.2%si, 0.0%st Mem: 4044632k total, 2405628k used, 1639004k free, 0k buffers Swap: 7812492k total, 1851852k used, 5960640k free, 436k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ TIME COMMAND 4174 root 17 0 63156 176 56 S 8 0.0 2138:52 35,38 bacula-fd 4185 root 17 0 63352 284 104 S 6 0.0 1709:25 28,29 bacula-sd 240 root 15 0 0 0 0 D 3 0.0 831:55.19 831:55 kswapd0 2852 root 10 -5 0 0 0 S 1 0.0 126:35.59 126:35 xfsbufd 2849 root 10 -5 0 0 0 S 0 0.0 119:50.94 119:50 xfsbufd 1364 root 10 -5 0 0 0 S 0 0.0 117:05.39 117:05 xfsbufd 21 root 10 -5 0 0 0 S 1 0.0 48:03.44 48:03 events/3 6940 postgres 16 0 43596 8 8 S 0 0.0 46:50.35 46:50 postmaster 1342 root 10 -5 0 0 0 S 0 0.0 23:14.34 23:14 xfsdatad/4 5415 root 17 0 1770m 108 48 S 0 0.0 15:03.74 15:03 bacula-dir 23 root 10 -5 0 0 0 S 0 0.0 13:09.71 13:09 events/5 5604 root 17 0 1216m 500 200 S 0 0.0 12:38.20 12:38 java 5552 root 16 0 1194m 580 248 S 0 0.0 11:58.00 11:58 java Here's the same sorted by virtual memory image size: top - 09:08:32 up 37 days, 23:27, 1 user, load average: 8.43, 8.26, 7.32 Tasks: 173 total, 1 running, 172 sleeping, 0 stopped, 0 zombie Cpu(s): 3.6%us, 3.4%sy, 0.0%ni, 62.2%id, 30.2%wa, 0.2%hi, 0.3%si, 0.0%st Mem: 4044632k total, 2404212k used, 1640420k free, 0k buffers Swap: 7812492k total, 1852548k used, 5959944k free, 100k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ TIME COMMAND 5415 root 17 0 1770m 56 44 S 0 0.0 15:03.78 15:03 bacula-dir 5604 root 17 0 1216m 492 200 S 0 0.0 12:38.30 12:38 java 5552 root 16 0 1194m 476 200 S 0 0.0 11:58.20 11:58 java 4598 root 16 0 117m 44 44 S 0 0.0 0:13.37 0:13 eventmond 9614 gdm 16 0 93188 0 0 S 0 0.0 0:00.30 0:00 gdmgreeter 5527 root 17 0 78716 0 0 S 0 0.0 0:00.30 0:00 gdm 4185 root 17 0 63352 284 104 S 20 0.0 1709:52 28,29 bacula-sd 4174 root 17 0 63156 208 88 S 24 0.0 2139:25 35,39 bacula-fd 10849 postgres 18 0 54740 216 108 D 0 0.0 0:31.40 0:31 postmaster 6661 postgres 17 0 49432 0 0 S 0 0.0 0:03.50 0:03 postmaster 5507 root 15 0 47980 0 0 S 0 0.0 0:00.00 0:00 gdm 6940 postgres 16 0 43596 16 16 S 0 0.0 46:51.39 46:51 postmaster 5304 postgres 16 0 40580 132 88 S 0 0.0 6:21.79 6:21 postmaster 5301 postgres 17 0 40448 24 24 S 0 0.0 0:32.17 0:32 postmaster 11280 root 16 0 40288 28 28 S 0 0.0 0:00.11 0:00 sshd 5534 root 17 0 37580 0 0 S 0 0.0 0:56.18 0:56 X 30870 root 30 15 31668 28 28 S 0 0.0 1:13.38 1:13 snmpd 5305 postgres 17 0 30628 16 16 S 0 0.0 0:11.60 0:11 postmaster 27403 postfix 17 0 30248 0 0 S 0 0.0 0:02.76 0:02 qmgr 10815 postfix 15 0 30208 16 16 S 0 0.0 0:00.02 0:00 pickup 5306 postgres 16 0 29760 20 20 S 0 0.0 0:52.89 0:52 postmaster 5302 postgres 17 0 29628 64 32 S 0 0.0 1:00.64 1:00 postmaster I've tried tuning the swappiness kernel parameter to both high and low values, but nothing appears to change the behavior here. I'm at a loss to figure out what's going on. How can I find out what's causing this? Update: The system is a fully 64-bit system, so there should be no question of memory limitations due to 32-bit issues. Update2: As I mentioned in the original question, I've already tried tuning swappiness to all sorts of values, including 0. The result is always the same, with approximately 1.6 GB of memory remaining unused. Update3: Added top output to the above info.

    Read the article

  • Security Exception while implementing global search for Messaging

    - by Sunil
    I am trying to enable global search for messaging application (i.e., messages can be searched from home screen search box). I have followed all the steps given in http://developer.android.com/reference/android/app/SearchManager.html I am getting the following exception 04-16 12:49:26.917: ERROR/DatabaseUtils(102): java.lang.SecurityException: Permission Denial: reading com.android.providers.telephony.MmsSmsProvider uri content://mms-sms/search_suggest_query/m?limit=58 from pid=106, uid=10000 requires android.permission.READ_SMS I have set permission in MmsSmsProvider.java file for read, write sms and global search, but still I get this error. Can anyone help. Regards, Sunil.

    Read the article

  • How to run Rails 3 application on localhost/<my_port> ?

    - by Misha Moroshko
    To run Rails application on Windows I do: cd < app_dir rails server I see the following: => Booting WEBrick => Rails 3.0.1 application starting in development on http://0.0.0.0:3000 => Call with -d to detach => Ctrl-C to shutdown server [2011-01-12 20:32:07] INFO WEBrick 1.3.1 [2011-01-12 20:32:07] INFO ruby 1.9.2 (2010-08-18) [i386-mingw32] [2011-01-12 20:32:07] INFO WEBrick::HTTPServer#start: pid=5812 port=3000 Question 1 Why port 3000 is selected ? Where is it configured ? Question 2 How could I run 2 applications in parallel ? I guess I need to configure one of them to be on other port (like 3001). How should I do this ?

    Read the article

  • Copying a IO stream results in corruption.

    - by StackedCrooked
    I have a small Mongrel webserver that sends the stdout of a process to a http response: response.start(200) do |head,out| head["Content-Type"] = "text/html" status = POpen4::popen4(command) do |stdout, stderr, stdin, pid| stdin.close() FileUtils.copy_stream(stdout, out) FileUtils.copy_stream(stderr, out) puts "Sent response." end end This works well most of the time, but sometimes characters get duplicated. For example this is what I get from the "man ls" command: LS(1) User Commands LS(1) NNAAMMEE ls - list directory contents SSYYNNOOPPSSIISS llss [_O_P_T_I_O_N]... [_F_I_L_E]... DDEESSCCRRIIPPTTIIOONN List information about the FILEs (the current directory by default). Sort entries alphabetically if none of --ccffttuuvvSSUUXX nor ----ssoorrtt. Mandatory arguments to long options are mandatory for short options For some mysterious reason capital letters get duplicated. Can anyone explain what's going on?

    Read the article

  • SQL Selecting from one table OR another then joining the two

    - by Cyprus106
    So this is interesting, and apparently beyond my SQL skillset. I need to select a particular record where an ID="0003" (or whatever) from either table1 or table2 if table1 doesn't have that record. Then I need to join table1 and table2 on a mutual field they both have (field name is Product_ID) I was playing with all sorts of variations of the following, (no, it doesn't work) but after 2 days of groping through the internet and a big SQL book I still can't figure anything out. SELECT ProductStock.Product_ID AS PSID, Products.ID AS PID, ProductStock.*, Products.* FROM ProductStock, Products LEFT JOIN (Products AS Pr) ON Pr.ID=ProductStock.Product_ID WHERE (ProductStock.ID="6003" OR Products.ID="6003")

    Read the article

< Previous Page | 51 52 53 54 55 56 57 58 59 60 61 62  | Next Page >