Hi.
I want to run some commands every time a user of an ubuntu 9.10 machine logs out or shuts down. What is the best way to do this? Every user uses gnome if that helps.
Hi everyone,
I've playing around with linux and noticed that for some mysterious reason commands like '/bin/sh ' just will not work. Each time I'm trying to start a process it yields 'cannot execute binary file' error message.
m@sanctuary:~$ sh sed
/bin/sed: /bin/sed: cannot execute binary file
When I first launch sh and try to execute sed, it succeeds.
I'm starting to loose my wits. It would be just great, if somebody could help me.
Thank you.
I'm using python to develop an app and want to view running processes.The code
txt = commands.getoutput("top -d 1")
print txt
gives an error "TERM Environment Variable not set"
Can someone tell me what this means and how to solve this
I am a SQL Server (2005 & 2008) data warehouse developer (SSIS, SSAS, SSRS, SQL) and I am wondering if it would be worth the effort and time to learn Powershell scripting. Are there applicable uses from a development perspective? I understand that from a DBA view there is considerable power in Powershell for administration - does any of this translate to useful commands for a developer?
Thanks!
Trying to write a deployment script, working on a repo in a different path. The "git-dir" flag seems to work fine for most commands, but not for submodule work. Am I missing a path directive?
Works:
git --git-dir=/tmp/repo_path/.git log
Doesn't work:
git --git-dir=/tmp/repo_path/.git submodule init
Error:
No submodule mapping found in .gitmodules for path 'path_to/submodule'
Much thanks for any help.
Can anyone please tell me how to delete a recurly account. As, I have tried with the following commands,
r = Recurly::Account.find(account_code)
r.delete
And also, I have tried with "r.destroy".
But, it only changing the state of recurly account from "active" to "closed" and not deleting the account completely.
I am using rails 2.3.11 for this application.
Thanks in advance.
K. Subrahmanyam.
I want to add a few drawing functions to an iPhone project for drawing things. Something like drawTile(x,y,len,wid); which would call openGL to draw a box somewhere. I should just be able to write a procedural C file to do this but the openGL libraries are objective C and I'm getting weird errors. Do I have to make a class for all of my drawing commands and call class methods?
I need a language and web framework that is really easy to use, that only has 12 or so commands, that is in one language all the way through (front/middle/back) and takes 15 minutes to master. Something like this:
10 CreateWEBFormAndCreateRequiredDBTablesAndSaveToDatabase("First Name", "Last Name")
20 CreateWEBPageThankingUser()
30 MakeAllWEBPagesPrettyByExaminingWebSitesOnTheInterWebAndMakingADecision()
40 GOTO 10
Oh, and it has to be written in C#
I have some security related service running on my machine (start type = automatic)
In the service control manager, the stop/restart commands are grayed out.
I was wondering how can I develop such service for which the stop operation is disallowed.
Note that I am logged in as an administrator
I tried using the following commands to create a database file at prompt, but none of them would work.
$ sqlite3 test.db
sqlite3 test.db
test.db
does it require a semi-colon at the end or is it that hard to create a database file using sqlite3 prompt?
I often do this to prepare for some django debugging:
Open up a terminal window in os x (10.6)
start the python interpreter
run these commands in python:
from django.core.management import setup_environ
import settings
setup_environ(settings)
Is it possible to automate these actions and make a shortcut that I can doubleclick to invoke?
I use subversion keywords like Date, Author, Revision number etc in my LaTeX projects to include the revision details in the typeset document. I tried searching for an equivalent to svn propset command in mercurial, but couldn't find it. A sample command in subversion would be:
svn propset svn:keywords "Date Author Rev" sample.tex
Are there any equivalent commands in mercurial I could use to replace keywords inside a text file under revision control with corresponding details?
In my MSTest UnitTest project, before running any tests, I need to execute some commands. Is there a feature, kind of like Global.asax is for web based projects, that will let me kick off something before any tests run?
How do I kill a process which is running in bash - for example, suppose I open a file:
$ gedit file.txt
is there any way within the command prompt to close it? This example is fairly trivial, since I could just close the window, but it seems to come up a bit, particularly when I mistype commands.
Also is there any way to escape an executable which is running? This probably has the same solution, but I thought I'd ask anyway.
Thanks
Hi SO.
I have an applet that connects to a server, it receives some commands and based on that it haves to draw (or move) different things.
Which patterns should I use? I assume that the network connection and applet should run in two different threads?
Thanks,
Kristoffer
I'm trying
svn add *.py --force
As the documentation suggests, but I know for a fact it's missing files nested in deeper folders. Why?
Is there a standard way to do this with other unix commands too? */*.py will nab a few more files, but it's kind of a pain in the butt to do this for every possible depth.
date_default_timezone_set('America/Guayaquil');
$cnn->execute('SET NAMES utf8');
$cnn->execute('SET GLOBAL time_zone = "-5:00"');
Hi, the code above is run everytime someone enters the website im developing. Does someone know what the impact (in performance) of those commands is?
You usually invoke the following commands to build a ./configured product:
make
make install
Okay, the product is in the system now. Then you change some source code files and invoke only make install. The question is, does the conventional implementation of install target requires the executables to be recompiled, or just the old ones should be copied to the appropriate system path?
1 - Curious as to how to make a popup asking to confirm if I want to load the program before it loads. Example:
^g::Run C:\GW2\gw2.exe
2 - How to set a title(instead of the script name), align text within msgbox and control the perimeters of msgbox with this format:
F1::msgbox,
(LTrim
Insert Text Here
)
3 - How to either temporarily pause and unpause a specific AHK script only allowing that hotkey to work within the script OR to disable scripted hotkeys while in a full screen application or game OR a "on/off pause/resume" command to disable multiple other commands such as ^g, ^h and the like.
can I do something like that? to pass arguments to my function? I already studied add_action doc but did not figure out how to do it. What the exact syntax to pass two arguments would look like.
function recent_post_by_author($author,$number_of_posts) {
some commands;
}
add_action('thesis_hook_before_post','recent_post_by_author',10,'author,2')
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 dont think this is possible, but I have been using:
Process p = Runtime.getRuntime().exec(command);
to run commands on the command line, but now I have come accross a situation where the command I am running part way through will ask for some user input, for example a username.
This can not be resolved by a argument to the command that is being exec, is there any way I can pass the username to the same command line instance and continue?
Thanks in advance.
I have some doubt as follows
We are UPDATING a field in SQL and ALTER the row also.After giving the COMMIT command the system is crashed.Wat will happen to the commands given,whether it will UPDATE and ALTER the table r not?