The Road To Artificial General Intelligence (AGI)

This article will be focused on the next twenty years as we move from phase one Artificial Narrow Intelligence (ANI) toward phase two Artificial General Intelligence (AGI). AGI isn’t a technology as much as it is a point in time. It is the moment whe...

Flash Cards for Sam's Teach Your Self Java in 24 Hours

A while back I was refreshing my self on my Java skills for a new job and I decided to make this flash card deck for studying Sam's Teach Yourself Java in 24 Hours 6th Edition. I used an awesome free application called Anki Droid and Anki to make the f...

The most common shortcuts for code editing | OSX

Most Common Text Editor Hot Keys For Programmers Here are a list of hot keys that work the most universally as possible for text editing. There are so many hot keys and yet so little time. Which hot keys should you learn? If you work in the command ...

How to open multiple Iterm windows on startup

Find your self having to run a server or turn on some sort of process every time you open up your development environment? The script bellow will help you set up your own custom default tabs in iterm running what ever scripts you want when the window i...

How to properly remove Skeuomorphism from design

Skeuomorphism is the design concept of making items represented to resemble their real-world counterparts. As our devices increasingly make use of reprogrammable displays, references to the old physical interfaces becomes increasingly less applicable. ...

Running different ANT tasks depending on the operating system

How to run a different series of tasks inside of a single target tag based on the operating system so that your build script will work on all operating systems. There are three ways to do it: 1.) The first way is to have a different task for each o...

Installing xdebug in XAMPP 5.5.19 on Mac OSX

This was tested on OSX Lion. Please let me know if it works on Mountain Lion or later. Here is what we will be doing in a nut shell. You will need to download the correct source code for your version of xdebug and then you will need to use the correct...

Replace a token with a variable using ANT

You may be looking for the following: How do you replace a string in a file using a property in ANT? How do you replace a string using a variable in ANT? There are a few ways to do this. First question is what do you mean by a variable? Do you mean ...

Will a true artificial intelligence have a soul?

Since the movie "Transcendence" came out in 2014 there has been a lot of talk about the implication of loading consciousness on computers. As the movie illustrates, this can be a pretty controversial subject. When it comes to talking about the soul,...

Don't insert when maximum is reached

How to control if a record is inserted based on a condition? Don't insert a record if certain conditions are not met. There is a way of using pure MySQL to stop inserting records when a certain number of them has been reached. Let us say that you have...

MySQL CONCAT limitation

So you're trying to concat two large strings and it keeps resulting in a truncated or empty string? The problem may be that CONCAT can only result in a string of length 1024 bytes long. Worse is there is no setting in MySQL that allows you to increat...

Installing xdebug in XAMPP 1.8.3 on Linux

If you have installed XAMPP 1.8.3-0 for Linux and you want to install x-debug here is how to do it using PECL. 1.) Check to make sure /bin is in your path echo $PATH; if :/bin: is in the path then bin is in your path. This makes sure that when you c...

Don't overwrite permissions with tar file

When you use tar to back-up a directory and then you want to restore that directory you may want to keep existing permissions intact. If you made changes to the permissions since the archive was created and you want to restore the original files while ...

GB vs. GIB | 1024 vs. 1000

Looking for answers to these questions? Why are there two types of GB? Why is a KB 1024 and not 1000 bytes? Did you know there are two types of Gigabytes (GB)? What if I told you that they are not the same amount of bytes? That manufacturers list th...

Get size of database in bytes and rows

How to get the size of the database in MySQL? Replace database_name with the database name from which you want the size in bytes and rows: SELECT t.table_schema,SUM(t.table_rows) AS row_count,SUM(t.data_length) AS data_volume FROM information_schema.t...

Compare the contents of a remote directory with a local directory

Here is a little PHP script I wrote, that you can run from the command line. I wrote it to allow you to see what files are in a remote folder that are not in a local folder. user@localhost the_directory> php compare.php the_host_address.com:/the/remot...

MySQL Generate a list of numbers

This will generate a column named SeqValue that will range from 0-255 so a total of 256 values. SELECT (TWO_1.SeqValue + TWO_2.SeqValue + TWO_4.SeqValue + TWO_8.SeqValue + TWO_16.SeqValue + TWO_32.SeqValue + TWO_64.SeqValue + TWO_128.SeqValue) SeqV...

Ipoint interface | ActionScript 3.0 AS3

It amazes me that ActionScript (AS3) does not have interfaces listed for all its classes. Often you want to create a class that inherits from something like MovieClip and MovieClip inherits all the way down a long list of classes. So you are left with ...

Comment guerrilla activism

Published originally on flash-actionscript-guru.com in 2008. This article is quite dated and is now standard practice for what is today called "activist trolling." Internet Guerrilla Activism: Using Internet Reviews and Comments to Hit Them Where It...

Jump to end of file with vi or vim | Jump to last line

Insert Mode is when you have a block cursor and can edit the text Command Mode is when you have a : at the bottom where you can enter commands. If you are in insert mode or command mode hit: escape key then shift+g keys If you are not in insert mode...

Add an existing user to an existing group in Linux

If you want to a add a user to an existing group this is how you do it. [local_username@localhost /]$ useradd -a -G somegroup usernameThen log out and log back in for the new group settings to take effect.Managing permissions for a group is an importan...

Using Table Names With Spaces in PHP and mySQL

The key to writing SQL queries using table names that contain spaces is to make sure you use the correct quotes.This is wrong:SELECT * FROM tablename ORDER BY ''field name'' ASCThis is correct:SELECT * FROM tablename ORDER BY `field name` ASCThese (`) ...

Unix style options and flags with command line PHP

Looking for a more intelligent way to parse in options from the command line into your PHP script other than $argv? For example, you may want to be able to place options in any order like the following: php somescript.php -pv -o value or php somescr...

Is technology destroying high art?

Is your vision of the future one in which we are all mindless drones who don't know how to make anything?I'd like to try and ease your mind. "The world of A.D. 2014 will have few routine jobs that cannot be done better by some machine than by any human...

Parse a date by a specific date format in PHP

In the name of code readability and functionality, if you want to parse a date of a certain format you should do it in a way so that other programmers that look at your code can tell what you were doing. Here is a way as of PHP >= 5.3.0 to parse a st...

Exclude images from a Linux find

If you want to find all files in a sub directory and you don't want images to show up in the list here is a way to do it: [local_username@localhost /]$ find /some/dir/ -type f \( -name '*.png' -o -name '*.jpg' -o -name '*.jpeg' -o -name '*.gif' \) -pr...

Installing SSH and SCP in ANT 1.8.2 OSX

Download jsch-0.1.50.jar at http://sourceforge.net/projects/jsch/files/jsch/0.1.50/jsch-0.1.50.zip/download Download ant-jsch-1.8.2.jar at http://mvnrepository.com/artifact/org.apache.ant/ant-jsch/1.8.2 jsch-0.1.50.jar - contains the supporting clas...

List all users on a server

User information is stored in the /etc/passwd file [username@localhost /]$ awk -F":" '{ print $1 }' /etc/passwd If you want to print out the user name and UID: [username@localhost /]$ awk -F":" '{ print $1 "\t\t"$3 }' /etc/passwd | column -t Here is ...

Design your code to be grep'ed or searched

Seriously. So that future developers who work with your code can reverse engineer your code. 1.) Store code in flat text files When you are looking for a variable you want to refactor you should not have to find it in some code stored in a database...

Copy MySQL schema from remote host to local host

The secret is to use a program called mysqldump which comes with your installation of mysqld. user@localhost the_directory>mysqldump --no-data -u root remote_db_name -h address_of_remote_machine.com > temp-db-schema.mysql user@localhost the_directory...

Copy all files a user owns off of remote server

This is for copying files from a Linux machine to a local Linux machine. user@localhost the_directory> ssh user_name@remote_domain.com 'cd /dir/you/want/to/copy/; find `pwd` -user user_name' | xargs -I{} scp user_name@remote_domain.com:{} `pwd` This...

Change ownership of files owned by only one user

To find all the files owned by a specific user and then change their group and user ownership to something else use the example in green and follow the directions on what to replace in the green example: Replace enter_user_name_here with the specific...

Sort ls -l output

To sort the command "ls -l" output by each column in Linux use the following commands: user@server the_directory> ls -l | sort -k3 Let's break this down: ls - lists the files in the current directory -l - tells the "ls" command to list all the info...

Increment date by one day | < PHP 5.2

If you want to increment a date by one day you need to do it using the PHP DateTime function so that you can account for leap years. date_default_timezone_set('UTC'); $time_stamp = strtotime('0000-00-00 00:00:00'); $date = new DateTime(); $date->setTi...

Generate a list of dates between two dates in PHP

If you want to create a list of dates between two different Unix time stamps, here is how to do it: //2001-09-09T01:46:4 $starting_unix_timestamp = 1000000000; //now $ending_unix_timestamp = time(); date_default_timezone_set('America/Denver'); $st...

Install PHP CLI with MySqli extension/module on Linux

So you want to use PHP from the command line or you have PHP from the command line but you don't have mysqli installed. run the following shell script: #!/bin/bash echo "Are you logged in as root?"; select yn in "Yes" "No"; do case $yn in ...

Installing PECL command on a Linux box

PECL is a command that comes with PEAR. PECL allows you to load PHP extensions which are programmed in C. to install it use the package manager that comes with your brand of Linux: apt-get install php5-pear or yum install php-pear or... rpm php-pear ...

Set up Squirrel to connect to a MySQL database.

We are assuming you have already installed Squirrel In order to set up Squirrel Database Client to connect to a MySQL database you must: 1.) go to http://dev.mysql.com/downloads/connector/j/#downloads 2.) select your platform, if you are running it on...

Convert string to list of ASCII codes in bash

If you want to take a string and get the ascii code for each character in the string using a bash script then use the following function: function string2ascii_codes { str=$1; list=($(echo $str|sed 's/\(.\)/\1 /g')); ascii_result=''; ...

Interpret PHP as you type | PHP prompt

How to Code PHP from the prompt. How to run PHP in interactive mode. Open a command line prompt and type the following: C:\> php -a Interactive shell php > echo 5+8; 13 ctrl-D to exit If it can't find PHP, you need to check and see if it is inst...

Things to see between Boulder, CO and Longmont, CO.

If you find yourself driving between Boulder and Longmont, Colorado, whether it be your daily commute, because you are on a business trip or you are just plain board, you should browse this article to get a better sense of what is available in this see...

Contracting

Need someone competent to build an app? Please contact me :) nick@sketchnpass.com See my resume and my demo reel at www.designcortex.com

Boulder apps - tech blog

Hello, My name is Nicholas Dunbar. I am a web app designer and developer who lives in Boulder, Colorado. This is where I collect my thoughts on programming, design and entrepreneurship. My code and solutions are copied and pasted into hundreds of ap...

Reset Drupal MySQL password | Drupal 6 | SQL

If you have access to mysql through the root user and want to just change the drupal database user this will work for you. Otherwise check out [http://www.thegeekstuff.com/2009/07/how-to-reset-forgot-mysql-root-password-on-unix-linux-windows/](ht...

Hide a block on all admin pages | Drupal 6

There are two main ways to do disable a certain block on all admin pages. The first way involves using the administrative tools provided in the backend. The second uses custom script. -----------------------------------option 1 ---------------------...

Merge documentation | Mailchimp | Drupal

If anyone has more complete information on this subject please comment below. If you installed the drupal MailChimp Module you might want to know how to "Merge Variables" If you were like me you created a list on mailchimp Added the Drupal M...

Multiple row ul | Multi-line list | CSS | HTML

I wanted to have a list where each element wrapped according to its containers dimensions. Lets start first with the problem I had, then move on to the solution. So if you want the list to conform to the box and put as many list elements (LI) on eac...

Bare bones Drupal theme | Custom Drupal theme

If you have ever tried to develop a Drupal theme from scratch or used the Garland theme or any other standard theme that comes with Drupal to build a custom theme, then we share the same pain. The first site I developed I customized a template but th...

Detecting an iframe with JavaScript

How do you tell if your content has loaded into an IFRAME container? I use a very simple JavaScript to detect an IFRAME. This can be used to determine if some one is loading your content into their external page without cross domain permisio...

How to recursively traverse an XML object in AS3

I found lots of examples on how to recusively parse through an XML object using E4X in ActionScript 3 (AS3). None of these examples were very simple or to the point. Most relied on the specifics of the XML instead of making general code that could ac...

Only list files | don't list directories | "find" command in Linux

How to: Find all files under a directory Find only files from the command line in Linux Don't search for directories [user@machinename ~]$ find /some/directory -type f -name filename Replace "/some/directory" with your directory "-type f" means on...

XOR two tables in MySQL

SELECT ot.id FROM old_table ot LEFT JOIN new_table nt ON ot.id=nt.id WHERE nt.id IS NULLOnly return that which they don't have in common.Another way of saying it is only return where they do not intersect. There are many Boolean operations that can b...

Why is PHP so ugly?

In short... PHP is old and has gone through many versions. In long... PHP's syntax is influenced by Unix bash shell style scripting, C langauge, object oriented programming and dynamic language constructs (similar to what you would find in a languag...

Improving reader retention | UX

When designing content platforms you may need to have a feature that breaks up articles into multiple pages. You want them to read the next page right? This may require a next button. Often this is not well emphasized on sites and is a common mistake i...

MySQL splitting a comma delimited string into a column of rows

If you want to split a field of your database by commas or some delimiter into a column of rows or a list using pure MySQL here is how you can do it. I pulled this from the MySQL cookbook and then modified it to not rely on the pivot table t10. Origi...

Check if a database exists in MySQL from the command line

To check if a database exists from the command line in MySQL echo the following query and pipe (|) it to the MySQL command line utility:echo SELECT COUNT(*) as num FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMATA.SCHEMA_NAME="some_database_name"; | mys...

Naming code | SEO for technical documentation

In the age of Google, the success of a technical product relies on more than just the search-ability of your documentation. If you are successful a community of users will spring up. They will post on forums looking for solutions and others will answer...

Generate a MySQL query string using MySQL

Sometimes you may want to use MySQL to generate a series of SQL statements. In this example we want to create a series of colon (;) delimited MySQL commands that the contents of a series of tables that exists in many different databases. The secret t...