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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"path/filepath" | |
"strings" |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func main() { | |
fmt.Println("Welcome to Sieve of Eratosthenes prime number calcualtor") | |
fmt.Println("How many prime numbers do you want?") |
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
const token = ""; // groupme api token | |
const axios = require('axios'); | |
const group_id = ""; // groupid | |
async function get_messages(){ | |
const message_url = `https://api.groupme.com/v3/groups/${group_id}/messages?token=${token}&limit=100`; | |
const m = await axios.get(message_url); | |
const messages = m.data.response.messages; | |
for(let i = 0; i < messages.length; i++){ |
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
import java.util.Random; | |
public class RandomWalk { | |
public double walk(int n ){ | |
int x = 0; | |
int y = 0; | |
while(n > 0){ | |
// generate random num from 0..3 | |
int direction = new Random().nextInt(4); |
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
inner class map_animate(val marker: Marker?, val oldpos : LatLng?, val newpos: LatLng, val handler: Handler) : Runnable { | |
val start : Long = SystemClock.uptimeMillis() | |
val interpolator = AccelerateDecelerateInterpolator() | |
val duration : Float = 3000f | |
var elapsed: Long = 0 | |
var t : Float = 0f | |
var v : Float = 0f | |
var hidemarker : Boolean = false |