This file contains hidden or 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
| <! DOCTYPE HTML > | |
| <html> | |
| <head> | |
| <meta charset='utf-8'/> | |
| <style type="text/css"> | |
| #playground { border: 1px solid #333333; background-color: #EBEBEB; } | |
| </style> | |
This file contains hidden or 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
| var Character = function() { | |
| this.char_name = 'Alex'; | |
| this.char_level = 1; | |
| this.char_race = 'Human'; | |
| this.features = { | |
| 'field of study' : 'Computer Science', | |
| 'awesome' : true; | |
| }; | |
| this.health = new HpSpace(); |
This file contains hidden or 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
| <?php | |
| require_once('db_connect.php'); | |
| if ($con) { | |
| $select = $_POST['select']; | |
| $from = $_POST['from']; | |
| $where = $_POST['where']; | |
| $where_param = $_POST['where_param']; |
This file contains hidden or 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
| //int numItems ==> int to hold the number of Items in each underlying array | |
| //E[] items ==> the data structure used in the BruteArray ADT | |
| public void add(E item) { | |
| //if the array needs to be expanded | |
| if (numItems >= items.length) { | |
| //create a new array that is twice as long | |
| E[] brute = (E[])(new Object[items.length * 2]); | |
This file contains hidden or 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 BruteArray<E> implements BruteArrayInterface<E>{ | |
| private E[] items; | |
| private int numItems; | |
| private static final int INIT_SIZE = 5; | |
| @SuppressWarnings("unchecked") | |
| public BruteArray() { |
This file contains hidden or 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 ShadowArray<E> implements ShadowArrayInterface<E>{ | |
| private E[] k; | |
| private E[] s; | |
| private int numItems; | |
| private int carryIndex; | |
| static final int INIT_SIZE = 5; | |
| @SuppressWarnings("unchecked") |
This file contains hidden or 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
| i=0; FILES=$(ls -tr ./); for FILE in $FILES; do i=$(($i + 1)); if [$(($i % 2)) = 0]; then echo"$i$FILE"; fi; done; | |
| outputs: | |
| ==> | |
| -bash: [0: command not found | |
| -bash: [1: command not found | |
| -bash: [0: command not found | |
| ... | |
| ... | |
| ... |
This file contains hidden or 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
| Gargantua-1:~ alex$ brew doctor | |
| Warning: Experimental support for using Xcode without the "Command Line Tools". | |
| You have only installed Xcode. If stuff is not building, try installing the | |
| "Command Line Tools for Xcode" package provided by Apple. | |
| Warning: gettext files detected at a system prefix | |
| These files can cause compilation and link failures, especially if they | |
| are compiled with improper architectures. Consider removing these files: | |
| /usr/local/lib/libintl.dylib | |
| Warning: You have leftover files from an older version of Xcode. | |
| You should delete them using: |
NewerOlder