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
| b tab | | |
tab := RTTabTable new input: (ZnEasy get: 'http://earthquake.usgs.gov/earthquakes/feed/v0.1/summary/2.5_month.csv') entity string usingDelimiter: $,. | |
tab removeFirstRow. | |
tab replaceEmptyValuesWith: '0' inColumns: #(2 3 4 5). | |
tab convertColumnsAsFloat: #(2 3 4 5). | |
b := RTMapLocationBuilder new. | |
b shape circle | |
size: [ :v| (2 raisedTo: v) / 2 ]; | |
color: (Color red alpha: 0.3). | |
tab values do: [ :row | b addPoint: row second @ row third value: row fifth ]. |
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
(ZnEasy getJpeg: 'http://www.gravatar.com/avatar/', | |
(ZnDigestAuthenticator md5Hash: 'serge.stinckwich@gmail.com'),'?s=70' | |
) asMorph openInWorld |
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
| sharedPackageCacheDirectory | | |
"Never apply to PharoLauncher itself" | |
(SmalltalkImage current imageName includesSubstring: 'Launcher') ifTrue: [ ^self ]. | |
"ask if script should be applied" | |
(UIManager default confirm: 'Apply init script from ', StartupPreferencesLoader preferencesGeneralFolder fullName,' to image') ifFalse: [^self ]. | |
"Use a shared package cache to store Monticello MCS files for all images" | |
sharedPackageCacheDirectory := (StartupPreferencesLoader preferencesGeneralFolder fullName, 'commonpackage-cache') asFileReference | |
ensureCreateDirectory; |
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
|diag| | |
diag := ESDiagramRenderer new. | |
(diag scatterplot) | |
models: ((0 to: 5e4) select:#isPrime); | |
y: [ :p |(p* (p cos))]; | |
x: [ :p |(p* (p sin))]; | |
preferredAxisMinX:(-50000); | |
preferredAxisMinY:(-50000); | |
smallObjects. | |
diag open. |
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
#Install npm | |
sudo apt-get install npm | |
#Ensure the lastest version of npm is installed | |
sudo npm install -g npm | |
#Install docpad 6.30 | |
npm install -g docpad@6.30 |
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
# Download Pharo 2.0 + VM | |
```bash | |
wget -O - get.pharo.org/20+vm | bash | |
``` | |
# Download Pharo 3.0 + VM | |
```bash | |
wget -O - get.pharo.org/30+vm | bash |
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
import java.lang.reflect.*; | |
import java.beans.*; | |
public class FluentInterface<T> implements InvocationHandler { | |
Object obj; | |
public FluentInterface(Object obj) { | |
this.obj = obj; | |
} |
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
class Exo3 { | |
public static boolean isAnAnagram(String c1, String c2){ | |
int [] counts = new int[26]; | |
int l1 = c1.length(); | |
int l2 = c2.length(); | |
if (c1.equals(c2)) return true; | |
if (l1 != l2) return false; | |
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 | |
if [ -z "$1" ]; then | |
echo "usage: $0 <file>" | |
exit 1 | |
fi | |
name=test$RANDOM@test$RANDOM.fr | |
pass=$RANDOM | |
file="$1" | |
out=$(mktemp) |
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
############################################################## | |
japanino.name=Gakken Japanino(学研 大人の科学 ジャパニーノ) | |
japanino.upload.protocol=stk500 | |
japanino.upload.maximum_size=14336 | |
japanino.upload.speed=19200 | |
japanino.bootloader.low_fuses=0xe2 | |
japanino.bootloader.high_fuses=0xdd |