This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
curl http://pkgsrc.smartos.org/packages/Darwin/2012Q2/bootstrap.tar.gz \ | |
| (cd /; sudo gnutar -zxpf -) | |
PATH=/usr/pkg/sbin:/usr/pkg/bin:$PATH | |
sudo pkgin -y update | |
sudo pkgin install mtr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
count = 1 | |
multiplier = 2 | |
while count: | |
if count <= 20: | |
print "Powers of 2^%s = %s" % (count, multiplier**count) | |
count = count + 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class week02_ex3 { | |
public static void main(String[] args) { | |
int count = 1; | |
int multiplier = 2; | |
while (count <= 20) { | |
System.out.println("Powers of 2^"+ count +"=" + java.lang.Math.pow(multiplier,count)); | |
count++; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-bash-3.2$ psql | |
Password: | |
[user@server ~]$ psql -U pltcltest | |
Password for user pltcltest: | |
Welcome to psql 8.3.11, the PostgreSQL interactive terminal. | |
Type: \copyright for distribution terms | |
\h for help with SQL commands | |
\? for help with psql commands | |
\g or terminate with semicolon to execute query |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
postgres=# select * from pg_pltemplate; | |
tmplname | tmpltrusted | tmpldbacreate | tmplhandler | tmplvalidator | tmpllibrary | tmplacl | |
-----------+-------------+---------------+-----------------------+-------------------+------------------+--------- | |
plpgsql | t | t | plpgsql_call_handler | plpgsql_validator | $libdir/plpgsql | | |
pltcl | t | t | pltcl_call_handler | | $libdir/pltcl | | |
pltclu | f | f | pltclu_call_handler | | $libdir/pltcl | | |
plperl | t | t | plperl_call_handler | plperl_validator | $libdir/plperl | | |
plperlu | f | f | plperl_call_handler | plperl_validator | $libdir/plperl | | |
plpythonu | f | f | plpython_call_handler | | $libdir/plpython | | |
(6 rows) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-bash-3.2$ psql | |
Password: | |
Welcome to psql 8.3.11, the PostgreSQL interactive terminal. | |
Type: \copyright for distribution terms | |
\h for help with SQL commands | |
\? for help with psql commands | |
\g or terminate with semicolon to execute query | |
\q to quit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pltest=> create language plperl; | |
server closed the connection unexpectedly | |
This probably means the server terminated abnormally | |
before or while processing the request. | |
The connection to the server was lost. Attempting reset: Failed. | |
!> | |
!> | |
!> | |
!> \q | |
[user@server~]$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Do problem 3.29 from the book, but call your program Square.java. The text | |
* for this question is: | |
* Write an application that prompts the user to enter the size of the side of | |
* a square, then displays a hollow square of that size made of asterisks. Your | |
* program should work for squares of all side lengths between 1 and 20. | |
* | |
* A Note From Dr. B. | |
* There are 3 parts to this problem. The first is the top row of stars. After | |
* you have code that prints the top row of stars correctly, focus on printing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
/usr/sbin/locale-gen en_US.UTF-8 | |
/usr/sbin/update-locale LANG=en_US.UTF-8 | |
add-apt-repository ppa:cherokee-webserver | |
aptitude update | |
aptitude -y install build-essential python-dev python-psycopg2 python-software-properties rrdtool libxml2-dev libxslt-dev git-core cherokee libcherokee-mod-rrd postgresql |