An introduction to curl using GitHub's API
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
#import "UIColor+MyApp.h" | |
@implementation UIColor(MyApp) | |
+(UIColor *)RGB:(long)hex A:(float)a { | |
return [UIColor colorWithRed:((float)((hex & 0xFF0000) >> 16)) / 255.0 green:((float)((hex & 0xFF00) >> 8))/255.0 blue:((float)(hex & 0xFF))/255.0 alpha:a]; | |
} | |
+(UIColor *)MABlue { | |
return [self RGB:(0x12AFE8) A:1.0]; |
/* | |
The series, 1^1 + 2^2 + 3^3 + ... + 10^10 = 10405071317. | |
Find the last ten digits of the series, 1^1 + 2^2 + 3^3 + ... + 1000^1000. | |
*/ | |
#include <iostream> | |
#include <cmath> | |
using namespace std; | |
unsigned long power(int n) | |
{ |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<title>Simple markers</title> | |
<style> | |
html, body, #map-canvas | |
{ | |
height: 100%; |
import random | |
#ALL IMPORT STATEMENTS HERE | |
def calculate_bid_player1(player,pos,first_moves,second_moves): | |
#PLAYER 1 BOT HERE | |
def calculate_bid_player2(player,pos,first_moves,second_moves): | |
#PLAYER 2 BOT HERE | |
#THE SIMULATOR CODE |
/* This is the K-Mean Clustering Algorim's Implementation. | |
This code will work for 40 objects that can successfully be clusterd in 40 iteations. | |
Iterations and number of objects allowed can be increased by increasing the array size.*/ | |
#include<iostream> | |
#include<math.h> | |
#include<conio.h> | |
using namespace std; | |
int main() |