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
//--------------------------------------------------------------------------- | |
// | |
// 3 Band EQ :) | |
// | |
// EQ.H - Header file for 3 band EQ | |
// | |
// (c) Neil C / Etanza Systems / 2K6 | |
// | |
// Shouts / Loves / Moans = etanza at lycos dot co dot uk | |
// |
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 android.content.Context; | |
import android.widget.Toast; | |
/** | |
* Helper class to make Toasts with. | |
*/ | |
public class Skal { | |
/** | |
* Creates a Toast. |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.rburgosnavas.droidfs" > | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS"/> | |
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS"/> | |
<uses-permission android:name="android.permission.READ_SYNC_STATS"/> | |
<uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/> |
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
/** | |
* Testing Jackson with Groovy | |
**/ | |
import org.codehaus.jackson.map.* | |
// sample JSON | |
json = """{ | |
"name": { | |
"first": "Morgoth", | |
"last": "Melkor" |
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
-- this | |
foldr (\x xs -> (x * 10):xs) [] $ foldr (\x xs -> if x `mod` 2 == 0 then x:xs else xs) [] $ foldr (\x xs -> if x > 3 then x:xs else xs) [] [5,9,8,3,6,7,1,5,2] | |
-- that | |
[x * 10 | x <- [5,9,8,3,6,7,1,5,2], x > 3, x `mod` 2 == 0] | |
-- or | |
foldr (\x xs -> (x * 10):xs) [] $ filter (\x -> x `mod` 2 == 0) $ filter (> 3) [5,9,8,3,6,7,1,5,2] |
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
/** | |
* Recursive split text to lines of 80 characters | |
*/ | |
def split80(text: String): String = { | |
if (text.length <= 80) { | |
text | |
} else { | |
text.substring(0, 80) + "\n" + split80(text.substring(80)) | |
} | |
} |