how do i convert ctrl+z to a string?
i am sending this as an AT COMMAND to an attached device to this computer
basically i just to put some chars in a string and ctrl+z in that string as well
Hi,
I have a c program which I can launch at command prompt.
Is it possible for me the lunch this application in my another c program?
If yes, how? All the google result shows me how to do that using pthread? Will that work?
I suspect that I need a new process for my c program.
Thank you.
Following command converts date formated as MM/DD/YYYY to seconds.
date -d "01/21/2014" +%s
How can I convert DD/MM/YYYY formated date to seconds?
Thanks
I'd like to automate a 'screenshot' of arbitary URL's using a Linux build that doesn't have X installed. There appears to be some (costly) web services to do this, but I specifically want something I can do locally. Tried imagemagick without much success, though Mozilla used to have a command line option to do it?
I've just discovered fugitive.vim, which is pretty cool. However, I've run into a problem (this is using windows xp, msys git 1.7, fugitive.vim 1.1, and gvim 7.2). Adding files to the index and checking the status works just fine, but when I do a :GCommit, a command prompt flashes for a second and nothing happens. No way to type a commit message and nothing is committed. Is this a bug? Am I doing something wrong?
I just upgraded my slime using elpa in Emacs. But I wonder if things are like they should be now, because when I removed the old version using elpa, it complained it could not remove a certain folder. So, when I start up Emacs (I know, I shouldn't have closed it), how I can see which slime version actually gets used? Is there a command like M-x slime-version ?
hi, sorry for maybe this is stupid question, I just want download source code form the link as follows: http://argouml.tigris.org/source/browse/argouml/trunk/src/
I try to use the command :
svn checkout http://argouml.tigris.org/source/browse/argouml/trunk/
but it throw error :
svn: OPTIONS of 'http://argouml.tigris.org/source/browse/argouml/trunk': 200 OK (http://argouml.tigris.org)
I am strange that , how to checkout the source code from the url ?
many thanks for your help !
Regards
Is there a command in mercurial that will list all files currently under source control?
I can do a dir /s to list all files in my folder and subfolders, but I have no idea which have been added to my repository. I have a variety of excluded file types and folders and I want verify that none of them were added before I set them up in my .hgignore file.
I am using Maven 2.0.9 to build a multi module project. I have defined the assembly plugin in my parent pom. I can get my assemblies built using
mvn install assembly:assembly
This command runs the tests twice, once during install phase and another during assembly. I tried assembly:single but it throws an error. Any help to get my assemblies built without running the tests twice is much appreciated.
I'm using launching firefox from the command line in a script to get snapshots of pages. These pages have basic http authentication. When using:
firefox http://user:[email protected]
Either a dialog appears, or authentication doesn't work at all.
Is there any option to make firefox open the page without showing the dialog?
Using a TSQL update command against a SQLServer database, how can I update a column of type FLOAT with the smallest possible double value?
The smallest possible double value in hex notation being 3ff0 0000 0000 0001
(http://en.wikipedia.org/wiki/Double%5Fprecision)
I've got some code that looks like the following. First, there's a simple Parser class for parsing command-line arguments with options.
class Parser
def initialize(&b); ...; end # Create new parser.
def parse(args = ARGV); ...; end # Consume command-line args.
def opt(...); ...; end # Declare supported option.
def die(...); ...; end # Validation handler.
end
Then I have my own Parsers module which holds some metadata about parsers that I want to track.
module Parsers
ParserMap = {}
def self.make_parser(kind, desc, &b)
b ||= lambda {}
module_eval {
ParserMap[kind] = {:desc => "", :validation => lambda {} }
ParserMap[kind][:desc] = desc
# Create new parser identified by `<Kind>Parser`. Making a Parser is very
# expensive, so we defer its creation until it's actually needed later
# by wrapping it in a lambda and calling it when we actually need it.
const_set(name_for_parser(kind), lambda { Parser.new(&b) })
}
end
# ...
end
Now when you want to add a new parser, you can call make_parser like so:
make_parser :db, "login to database" do
# Options that this parser knows how to parse.
opt :verbose, "be verbose with output messages"
opt :uid, "user id"
opt :pwd, "password"
end
Cool. But there's a problem. We want to optionally associate validation with each parser, so that we can write something like:
validation = lambda { |parser, opts|
parser.die unless opts[:uid] && opts[:pwd] # Must provide login.
}
The interface contract with Parser says that we can't do any validation until after Parser#parse has been called. So, we want to do the following:
Associate an optional block with every Parser we make with make_parser.
We also want to be able to run this block, ideally as a new method called Parser#validate. But any on-demand method is equally suitable.
How do we do that?
I have an app on heroku which is being used by few users. However, I notice there are some data issues which i'd like to fix and stop the app in the mean time so users don't enter anything new.
Is there a way to stop the app on heroku rather than destroying it? I see that restart server command is there ...though I don't see anything like 'stop'
Given a PDF, how can one get the layout mode of a PDF (or relative width/height) using a PHP lib or linux command line tool?
Using http://www.tecnick.com/public/code/cp%5Fdpage.php?aiocp%5Fdp=tcpdf which can set this variable on new PDFs, but for existing pdfs from adobe.
Thought of converting pdfs to ps, or using gs in some other way - like converting it to an image first, and getting the width and height of that. Is this the best way?
I'd like a good method that matches the interface of subprocess.check_call -- ie, it throws CalledProcessError when it fails, is synchronous, &c -- but instead of returning the return code of the command (if it even does that) returns the program's output, either only stdout, or a tuple of (stdout, stderr).
Does somebody have a method that does this?
I am trying to set up automated .htaccess updating. This clearly needs to be as secure as possible, however right now the best I can do file permission-wise is 666.
What can I do to setup either my server or php code so that my script's fwrite() command will work with 644 or better? For instance is there a way to set my script(s) to run as owner?
Hi. how can I clear the .viminfo file.
I want to clear the Command Line History,File marks, Jumplist etc.,
other then Search String History
Is there any way to do this.
Is it possible to do something like this:
INSERT INTO table(col1, col2) VALUES(something_from_another_table, value);
With something_from_another_table being a SQL command? Like, is there something I can do that's equivelant to:
INSERT INTO table(col1, col2) VALUES((SELECT value FROM table2 WHERE id = 3), value);
How do you even look at the web.config file? I don't know where to go to turn custom errors off...help!
I tried command prompt and java script....can any one help me?
I'm new to gcc, and trying to compile a c++ program which includes mysql.h using the command:
g++ -o test test.cpp -L/usr/include/mysql -lmysqlclient -I/usr/include/mysql
It works without issue, but I was wondering if someone could explain the arguments to me. I don't like using commands I don't understand.
Thanks
I want to streamline my library on FreeBsd using PUID from MusicBrainz. I need a command line utility for this, but I have not been able to find. It would be nice to give input mp3-file and receive PUID as result.
Hi,
Looking at the msdn, there was an example on "GO" command. Why there is:
USE somedb
GO
...
...
It it neccesary to select db in different batch? Thanks for explanation!
In the days of parallel printers one used to be able to send a command on LPT1 and receive back standard info such as life count etc.
Now, with USB devices, have we lost that capability? Or is there still a way to read the info?
When running a groovy script from Eclipse, the following line:
def rootLoader = this.class.getClassLoader().getRootLoader()
is null. When I run the script directly from command line, this is not null. How can I find out why this happens?