Hi,
I need to compare two files and redirect the different lines to third file. I know using diff command i can get the difference . But, is there any way of doing it in python ?
Is there a way to configure hg com so that in the commit message file that pops up in the external editor, instead of just showing which files were changed (in the HG: lines) it actually shows the full diff? I'd rather view the output and compose my commit message simultaneously from the comfort of my text editor as opposed to doing hg diff on the command line separately beforehand.
So I have a PHPUnit test, and found this code within a function.
global $argv, $argc;
echo $argc;
print_r($argv);
I understand what these variables represent (arguments passed from the command line), but I've never seen this syntax before:global $argv, $argc;
What specifically is going on here?
I've a file that was exported from Word and it replaced all quotes with strange unicode characters which aren't correctly displayed in vim.
So now I want those characters to be replaced with quotes, but I don't know how to enter this character in
:%s/???/'/g
The characters look like this: ~U ~R. But of course I can't just mark them with mouse and paste in the command.
Db connectivity is handled by an include.
I want to run this command:
mysql_close($con);
Only if we currently have a connection. Something like isset()?
Thanks Hamad
It should be a tool to enable versioning of a database schema and efficiently updating databases with older versions of the schema:
robustness, does it handle all edge cases
support for data migration
command line execution
flexibility, can some data be compared as well
In the answers a breakdown on support for these points (and anything I may have missed) would be appreciated.
I have a local repository cloned from a bare remote repository. The following command lists al the remote repository's branches.
$ git ls-remote
74bd3eb190edb39db04f6c0c4dbbb9e1e96bc6db refs/remotes/test
85de54d6ae813c624b9623983e6b0a4948dae0fe refs/remotes/trunk
I want to checkout and track that remote's remote branch trunk. How do I do that?
Say I have an environment variable myvar
myvar=\tapple\n
when the following command will print out this variable
perl -e 'print "$ENV{myvar}"'
I will literally have \tapple\n, however, I want those control chars to be evaluated and not escaped. How would I achieve it?
In the real world $ENV residing in substitution, but I hope the answer will cover that.
Is it possible to use ffmpeg create a video from a set of sequences, where the number does not start from zero?
For example, I have some images [test_100.jpg, test_101.jpg, test_102.jpg, ..., test_200.jpg], and I want to convert them to a video. I tried the following command, but it didn't work (it seems the number should start from zero):
ffmpeg -i test_%d.jpg -vcodec mpeg4 test.avi
Any advise?
I'm using grep to generate a list of files I need to move:
grep -L -r 'Subject: \[SPAM\]' .
How can I pass this list to the mv command and move the files somewhere else?
I want to write a command line script using Python to access a user's Facebook Notes.
PyFacebook wrapper library doesn't have support for Facebook notes.
Is there any other way I can do this in python? I don't want to learn PHP.
My config file is really just a big python dict, but I have many config files to run different experiments and I want to 'import' a different one based on a command line option. Instinctively I want to do import ConfigFileName where ConfigFileName is a string with the config file's python package name in it... but that doesn't work.
Any ideas?
Hello,
I have this command openssl genrsa -des3 -out host.key 1024
it asks me for a password, I want to automate it!
how I can make it read the password from a text file (host.pass) so it will not ask me
or have it ignore the password (which one is better?)
Thanks
I want to move all the files to a new dir. From the command line I can do "mv . newdir" but if I try with this script:
#!/bin/bash -f
#
mkdir newdir
mv *.* newdir
I get the following message: "mv: rename . to newdir/.: No such file or directory"
Follow up to this question
This (similar version from old link) works in SQL Server 2008, however, Oracle is giving me trouble:
MERGE INTO wdm_test
USING ( select '10000000000000000000000000000000' Guid from DUAL ) val
ON ( wdm_test.Guid = val.Guid )
WHEN MATCHED THEN UPDATE SET test_column = null
WHEN NOT MATCHED THEN
INSERT (Guid, test_column)
VALUES ('10000000000000000000000000000000', null)
OUTPUT $action;
SQL Error: ORA-00933: SQL command not properly ended
Does Oracle not support OUTPUT $action;? If not, is there an alternative?
I'm loading a rather large swf as style with the following command:
StyleManager.loadStyleDeclarations("assets/modules/"style.swf",true,false,ApplicationDomain.currentDomain);
The style is loaded fine but now I would like to add a progress bar to it, but I do not know how to do so. I am rather new to Flex and found only examples referring to HTML service calls.
Thank You for Your Help. It would be great to receive a small code example.
Just wondering if its possible to set a default tablespace in postgres to keep indexes. Would like the databases to live on the default tablespace for postgres, however, would like to get the indexes on a different set of disks just to keep the i/o traffic separated.
It does not appear to me that it can be done without going in and doing an ALTER index TABLESPACE command, and then the index is moved and will stay there, but the databases and indexes are part of a django app, so non-django intervention can cause some problems.
I am using Solaris. I have to log into sql plus and run some queries, which give a huge result set.
I want to copy all that into a file. Is there any command for it in unix or sqlplus ?
I have this code
$("body").on({
click: function(event){
event.preventDefault();
var aLink = $(this).attr("href");
$("#content").load(aLink+" #loader", function(){
//Callback here
});
$("#crumbbar").load(aLink+' .breadcrumbs', function(){
//Callback here
});
}
}, "a");
Can this be optimized in such a way that I only have 1 load command?
I wonder how to list content of tar file only down to some level?
I understand "tar tvf mytar.tar" will list all files, but sometimes I wish I can just see directories down to some level.
Similarly for command "ls" how to control the level of subdirectories that will be displayed? By default, it will only show the direct subdirectories, but not further.
Thanks and regards
A little help from you all...
I was trying to convert a simple java program into jar but nothing seems to have happened.
I have 2 files: Tester.java , Tester.Class.
Then I used this command line:
jar -cvf Tester.jar Tester.class
The .jar file was created but nothing seems to work.
What did I miss?
I am using OleDB for executing my queries in C#,
Is there any way I can execute multiple queries in one command statement?
I tried to separate them with semi-colon (;) but it gives error "Characters found at the end"
I have to execute a few hundreds of queries at once.
A show create table command shows the following:
'columnA' varchar(6) NOT NULL DEFAULT '';
How do I modify that column so that the not null is removed?
I need it to be:
'columnA' varchar(6) DEFAULT NULL;
I thought the following would work, but it has no effect:
ALTER TABLE tbl_name MODIFY columnA varchar(6) DEFAULT NULL;
Hey guys I need to send the content of an NSMutableArray through email. I have a mailing function but I'm not sure on how to place the content of the array into a NSString to be displayed on the email under each other. Is there a way to place all the content of the array into the string with maybe HTML nextline command between each array element?
NSString *emailBody = @"Need to put the body here";
Thanks