Skip to content

Instantly share code, notes, and snippets.

@robocide
robocide / knows.py
Created November 17, 2018 22:02
Knows problem naive approach and stack approach.
from random import randint
def helloworld():
matrix = []
init_data(matrix)
print_data(matrix)
#celebrity_index = find_celebrity_naive(matrix)
celebrity_index = find_celebrity_stack(matrix)
window.i18n = window.i18n || {};
i18n._langCache = {}
i18n._availableLangs = [
'en',
'zh-TW',
'ja'
]
@robocide
robocide / GeoLocation.cs
Last active August 29, 2015 14:06
C# Geolocation - GoogleMaps API
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Net;
using System.Xml.Linq;
using System.Xml.Serialization;
namespace ConsoleApplication2
@robocide
robocide / weather.java
Last active August 29, 2015 14:06 — forked from KamilLelonek/weather.java
Android: Consuming Web service
HttpUrlconnection connection = null;
BufferedReader reader = null;
String forecastJsonStr = null;
try {
URL url = new URL("http://api.openweathermap.org/data/2.5/forecast/daily?q=94043&mode=json&units=metric&cnt=7");
connection = (HttpUrlconnection) url.openConnection();
connection.setRequestMethod("GET");
connection.connect();