How to get the UNIX timestamp range of the current hour, i mean one of the first second and the other for the last second. so if it's 18:45 i would get the timestamp of 18:00 and 18:59.
Thanks
Hi,
I have a nested loop that I'm using foreach, DoSNOW, and a SNOW socket cluster to solve for. How should I go about profiling the code to make sure I'm not doing something grossly inefficient.
Also is there anyway to measure the data flows going between the master and nodes in a Snow cluster?
Thanks,
James
When I indent if-then-else construct in emacs lisp, the else block doesn't indent properly. What I get is:
(defun swank-clojure-decygwinify (path)
"Convert path from CYGWIN UNIX style to Windows style"
(if (swank-clojure-cygwin)
(replace-regexp-in-string "\n" "" (shell-command-to-string (concat "cygpath -w " path)))
(path)))
where else form is not indented at the same level as the then form. Is there an obvious way to fix this?
Hi, i've got a netgear DG834 router, and i want to have a go at hacking the firmware on it to try and add a Wake on Lan option. Netgear let you download the source and the tools to build an image, but i'm not sure where to start.
I've never programmed on a unix platform before, and never done any firmware hacking, just wondering if anyone knows any good resources i can look through
Ta
Hi all,
I am looking to send a large message 1 MB through the windows sockets send api . Is there a efficient way to do this , i do not want to loop and then send the data in chunks . I have read somewhere that you can increase the socket buffer size and that could help . Could anyone please elobrate on this . Any help is appreciated
I have PL/SQL function, which is programmed to sort a set of data. This function work fine without any error, when called directly as a PL/SQL Function.
However, when I call this Function Via a Unix Shell Script, even though the script returns a success code and throws an Out Process Memory Error and function is actually not executed.
I have verified the DB Index spaces and temp spaces, which are more than 50% free spaces
Hi,
I want to run the 'time' unix command from a Python script, to time the execution of a non Python app. I would use the os.system method.
Is there any way to save the output of this in Python? My goal is to run the app several times, save their execution times and then do some statistics on them.
Thank You
Hi,
In the postfix main.cf I have configured service to invoke external php script.
smtp inet n - - - - smtpd -o content_filter=myservice:www-data
myservice unix - n n - 1 pipe
flags=Rq user=me null_sender=
argv=/home/me/my_script.php
so far so good, my_script.php is executed. It creates the file my_file.txt in home dir. However I can only manage
-rw------- 1 me www-data 16 2009-10-11 19:35 my_file.txt
How do I add 'r' permissions for www-data group ?
Possible Duplicate:
Debugging techniques
How can I improve my debugging skills? I am thinking in the context of C++ under UNIX, C#, and in general.
Please suggest how I can improve in these areas in terms of:
Approaches to take, where to start, and how to proceed.
Tools to use, and how use them effectively.
Recommended material (books, articles) to read and lectures to watch.
I recently converted a CVS repository to Mercurial. From the looks of it, everything went perfect. Except that every end-of-line character is in Unix style and I want them in Windows style.
I know the hg convert command can be used to "convert" a Mercurial repository to a Mercurial repository. Can I use it to do nothing on the repos but fix the line endings?
Does anyone know of a open source 3d engine which can be operated via telnet?
What I'm looking for is scripting via a socket connection. To allow for world creation and/or camera movement.
Does anybody know of any that has this built in or very, very easy to add as a plugin or script?
The platform is not crucial.
I like to use the nifty perl feature where reading from the empty angle operator <> magically gives your program UNIX filter semantics, but I'd like to be able to access this feature through an actual filehandle (or IO::Handle object, or similar), so that I can do things like pass it into subroutines and such. Is there any way to do this?
This question is particularly hard to google, because searching for "angle operator" and "filehandle" just tells me how to read from filehandles using the angle operator.
I'm studying security, and I would like to know: in Windows or Unix based OS environment, is there a way for a malicious program to copy all the content of the computer's memory?
My worry is about a program that can get my decrypted data loaded in memory. And how to avoid it.
Hi,
I am doing a lot of image processing in C and I need a good, reasonably lightweight, and above all FAST matrix manipulation library. I am mostly focussing on affine transformations and matrix inversions, so i do not need anything too sophisticated or bloated.
Primarily I would like something that is very fast (using SSE perhaps?), with a clean API and (hopefully) prepackaged by many of the unix package management systems.
Note this is for C not for C++.
Thanks
:)
I have a bunch of files. Some are unix line endings, many are dos. I'd like to test each file to see if if is dos formatted, before I switch the line endings.
How would I do this? Is there a flag I can test for? Something similar?
I have (in the past) written cross-platform (Windows/Unix) applications which, when started from the command line, handled a user-typed Ctrl-C combination in the same way (i.e. to terminate the application cleanly).
Is it possible on Windows to send a Ctrl-C/SIGINT/equivalent to a process from another (unrelated) process to request that it terminate cleanly (giving it an opportunity to tidy up resources etc.)?
Hi,
This unix command I haven't got quite working on Mac yet - any ideas what needs adjusting:
find . | grep '.*\(css\|js\|rjs\|rhtml\|rb\)$' | sort | while read in; do printf "\n\n####\n# FILE: %s\n####\n\n" ${in} >> onebigfile; cat "${in}" >> onebigfile; done
thanks
Are there any protocols/standards that work over TCP that are optimized for high throughput and low latency?
The only one I can think of is FAST.
At the moment I have devised just a simple text-based protocol delimited by special characters. I'd like to adopt a protocol which is designed for fast transfer and supports perhaps compression and minification of the data that travels over the TCP socket.
Hi,
since in mysql datetime field is represented as string (i'm not sure how it works internally), wouldn't be from performance point of view faster to store date as unix timestamp? I don't need to use any mysql native date functions, i'm going for performance of sorting and selecting data.
if there was an index for that column, would be difference between int and datetime?
Thank you
How can I compile my python module into an executable, and distribute it in a way that doesn't require the user to download all the external Python packages that the module I wrote uses? Aside from that, is there a general guy on packaging and distributing python code? i.e. going from a script/module to someone that's user-friendly and can be run, ideally cross-platform (at least between unix and mac).
thanks.
I have 3 separate strings:
$d = 'Created on November 25, 2009';
$v = 'Viewed 17,603 times';
$h = '389 hits';
Which needs to be converted to:
$d1 = {unix timestamp of November 25, 2009};
$v1 = "17603"; (commas stripped if it exists)
$h1 = "389";
What is the most efficient way to do this (possibly with regex)? Any code snippet would be great.
Hi,
When a seam application on JBOSS using java 1,5 is deployed in Unix platform, I am getting this error.
errorjava.lang.NoClassDefFoundError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvi
ronment.java:62)
It runs fine on windows platform. On my local linux machine it runs fine. but on another linux machine it works some times and sometimes it throws up the above error
I have to code a server app where clients open a TCP/IP socket, send some data and close the connection.
The data packets are small < 100 bytes, however there is talk of having them batch their transactions and send multiple packets.
How can I best simulate a dial-up ut connection (using Delphy & Indy components, just FYI)?
Is it as simple as
open connection
wait a while (what is the definition of "a while"?)
close connection
Hi,
I have a few mp3 files which are not tagged. Winamp has a nice feature which I think is called "autotag" and which is very good at finding out artist and title for files. I'd like something like this for unix, so that I could possibly get artists and titles for my untagged files. Do you know some program which does this?
Thanks.