Recent Notes
Displaying keyword search results 1 - 12
Created by freyo on August 25, 2011 09:07:40
Last update: August 25, 2011 20:45:43
This is a list of built-in Android permission values: Permission Description Since API Level android.permission.ACCESS_CHECKIN_PROPERTIES Allows read/write access to the "properties" table in the checkin database, to change values that get uploaded. 1 android.permission.ACCESS_COARSE_LOCATION Allows an application to access coarse (e.g., Cell-ID, WiFi) location 1 android.permission.ACCESS_FINE_LOCATION Allows an application to access fine (e.g., GPS) location 1 android.permission.ACCESS_LOCATION_EXTRA_COMMANDS Allows an application to access extra location provider commands 1 android.permission.ACCESS_MOCK_LOCATION Allows an application to create mock location providers for testing 1 android.permission.ACCESS_NETWORK_STATE Allows applications to access information about networks 1 android.permission.ACCESS_SURFACE_FLINGER Allows an application to use SurfaceFlinger's low level features 1 android.permission.ACCESS_WIFI_STATE Allows applications to access information about Wi-Fi networks 1 android.permission.ACCOUNT_MANAGER Allows applications to call into AccountAuthenticators. Only the system can get this permission. 5 android.permission.AUTHENTICATE_ACCOUNTS...
Created by freyo on July 29, 2011 16:04:45
Last update: July 29, 2011 16:04:45
To start the Settings application:
# am start -n com.android.settings/.Settings
St...
To start the Browser :
# am start -n com.android.browser/.BrowserActivity...
To start the phone dialer:
# am start tel:210-385-0098
Starting: Intent { ...
Help for am command:
# am
usage: am [subcommand] [options]
...
Created by Dr. Xi on February 17, 2011 14:06:22
Last update: February 17, 2011 14:06:22
This is the crontab to run a cron job every 15 minutes:
*/15 * * * * /path/to/executable >/redirect/output...
or,
0,15,30,45 * * * * /path/to/executable >/redirect/...
In general, the format is:
minute hour day_of_month month day_of_week command
Valid values are:
Field Value
minute 0-59
hour 0-23
day of month 1-31
month 1-12
day of week 0-6 (Sunday = 0)
Reference: crontab(5) - Linux man page
Created by woolf on February 10, 2011 13:25:20
Last update: February 10, 2011 13:25:20
If Command Extensions are enabled (which is enabled by default), then there are several dynamic environment variables that can be expanded but which don't show up in the list of variables displayed by SET . These variable values are computed dynamically each time the value of the variable is expanded (but see example below). If the user explicitly defines a variable with one of these names, then that definition will override the dynamic one described below: %CD% - expands to the current directory string. %DATE% - expands to current date using same format as DATE command. %TIME% - expands to current time using same format as TIME command. %RANDOM% - expands to a random decimal number between 0 and 32767. %ERRORLEVEL% - expands to the...
Created by nogeek on September 01, 2010 19:25:09
Last update: December 31, 2010 11:54:45
Edit the file server\default\conf\jboss-log4j.xml and change the log level from INFO to DEBUG :
<!-- ============================== -->
<!-...
Presumably this should change the log level for the console appender (STDOUT) to DEBUG. However, this change alone does not work. It should be used in combination with the system property jboss.server.log.threshold .
Either add -Djboss.server.log.threshold=DEBUG to JAVA_OPTS in bin\run.conf.bat :
rem # JVM memory allocation pool parameters - modi...
or set it from the command line:
bin\run -Djboss.server.log.threshold=DEBUG
Created by Dr. Xi on December 04, 2009 04:33:05
Last update: December 04, 2009 04:33:05
Variable Meaning $_ The default or implicit variable. @_ Within a subroutine the array @_ contains the parameters passed to that subroutine. $a, $b Special package variables when using sort() $<digit> Contains the subpattern from the corresponding set of capturing parentheses from the last pattern match, not counting patterns matched in nested blocks that have been exited already. $. Current line number for the last filehandle accessed. $/ The input record separator, newline by default. $| If set to nonzero, forces a flush right away and after every write or print on the currently selected output channel. Default is 0 (regardless of whether the channel is really buffered by the system or not; $| tells you only whether you've asked Perl explicitly to flush after...
Created by Dr. Xi on September 29, 2008 23:03:40
Last update: September 29, 2008 23:04:08
Variables set automatically by shell: Variable Description $# Number of command-line arguments. $- Options currently in effect (arguments supplied to sh or to set). $? Exit value of last executed command. $$ Process number of current process. $! Process number of last background command. $0 First word; that is, command name. $n Individual arguments on command line (positional parameters). The Bourne shell allows only nine parameters to be referenced directly (n = 1-9); the Korn shell allows n to be greater than 9 if specified as ${n}. $* All arguments on command line ("$1 $2..."). $@ All arguments on command line, individually quoted ("$1" "$2" ...). Variables set automatically by Korn shell: Variable Description ERRNO Error number of last system call that failed. LINENO Current...
Created by Dr. Xi on September 26, 2008 21:49:35
Last update: September 26, 2008 21:51:53
The ulimit command (builtin for bash ) controls resource limits available to the shell and subprocesses. ulimit -a displays all current limits.
peaches@peachesv:~$ ulimit -a core file siz... ulimit accepts options -H and -S , which specifies hard or soft limit. The resource options are listed below: Option Description -a All current limits are reported -c The maximum size of core files created -d The maximum size of a process’s data segment -e The maximum scheduling priority ("nice") -f The maximum size of files written by the shell and its children -i The maximum number of pending signals -l The maximum size that may be locked into memory -m The maximum resident set size -n The maximum number of open file descriptors (most systems...
Created by Dr. Xi on September 15, 2008 19:50:39
Last update: September 15, 2008 20:01:50
Create a properties file to hold the properties for the MailLogger:
MailLogger.mailhost=smtp.example.com
MailLogger...
Invoke from command line:
ant -DMailLogger.properties.file=C:\Build\MailLogg...
Alternatively, invoke from another ant script:
<target name="build" depends="checkout">
<e...
However, the built-in MailLogger doesn't override buildStarted . Therefore, you can't send email to notify of build starting with MailLogger . To achieve that, you can either use the Mail task or override MailLogger with your own derivative.
Created by Dr. Xi on September 10, 2008 19:52:55
Last update: September 10, 2008 19:52:55
A substitution variable is preceded by one or two ampersands (&). When you run a SQL command with substitution variables, you'll be prompted for the value of each variable. The one ampersand version prompts for a value and use it for the current query. The two ampersands version uses the value for the current query and remembers it. Just like you did a DEFINE myvar 'The Value' , so you won't be prompted again for subsequent queries using the same variable. To enter a literal ampersand, you need to SET ESC on and use the escape character before the ampersand (&). You can also use substitution variables with a script, but you follow the ampersand by a number instead of a name. When you call...
Created by Dr. Xi on December 12, 2007 20:30:01
Last update: December 12, 2007 20:32:23
This is a script to tail a log file through the web browser. It uses AJAX, apache web server, mod_python, UNIX utilities tail (requires the --lines switch) and wc . The log file may reside on the web server or any other host accessible from the web server through SSH.
Although it's written in python, it should be easy to port to other languages such as Perl.
Apache httpd.conf :
LoadModule python_module modules/mod_python.so
...
Python script:
import time, os
from os.path import basename
...
Created by Dr. Xi on June 12, 2007 01:33:55
Last update: June 12, 2007 01:34:18
Use the umask command to print or set the file creation mask:
umask # print the current value of ...