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
package main | |
import ( | |
"crypto/aes" | |
"crypto/cipher" | |
"crypto/rand" | |
"encoding/base64" | |
"fmt" | |
"io" | |
) |
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
package main | |
import ( | |
"io" | |
"net/http" | |
"os/exec" | |
) | |
var ( | |
BUF_LEN = 1024 |
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
<link rel="import" href="../chart-js/chart-js.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<link rel="import" href="../speech-mic/speech-mic.html"> | |
<link rel="import" href="../topeka-elements/category-icons.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Reflection; | |
using System.Text.RegularExpressions; | |
namespace checkhub.libhub | |
{ | |
public delegate bool processResult(object result); | |
public static class hub |
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
/* | |
* mat.h | |
* allocate multiple dimensional array into 1D | |
* using generic function macro | |
* with new/free/get functions | |
* created by Jingtao Liu | |
* 01/22/2013 | |
*/ | |
#ifndef _MATRIX_H | |
#define _MATRIX_H |
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
//http://dev-faqs.blogspot.com/2010/05/knuth-morris-pratt-algorithm.html | |
#include "PatternMatcher.h" | |
vector<int> PatternMatcher::computeKmpPrefix(const std::string &pattern){ | |
int patternSize = pattern.size(); | |
vector<int> kmpPrefix(patternSize); | |
size_t prefixPos = 0; | |
size_t suffixPos = 1; | |
while(suffixPos < patternSize){ |
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
#include <stdlib.h> | |
#include <stdio.h> | |
int *lots; //parking lots | |
#define LOTSMAX 16 //lots size | |
void Heapify (int i, int mx); | |
void car_enter (); | |
void car_leave (int i); | |
void print_lots (); |
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
#include <algorithm> | |
#include <vector> | |
using namespace std ; | |
int int_cmp(int i, int j){ return (i<j) ;} | |
class Solution { | |
public: | |
vector<vector<int> > permuteUnique(vector<int> &num) { | |
sort(num.begin(), num.end(), int_cmp ) ; | |
vector<vector<int> > ret; |
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
#include <stdio.h> | |
int main(int argc,char** argv) | |
{ | |
int N=0; | |
int T=0; | |
for(;;) | |
{ | |
int c=fgetc(stdin); | |
switch(c) | |
{ |
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
#include <algorithm> | |
class Solution { | |
public: | |
void nextPermutation(vector<int> &num) { | |
// Start typing your C/C++ solution below | |
// DO NOT write int main() function | |
vector<int>::iterator first, last,i , j , k; | |
(); (); | |
if(first==last) return; | |
; i++; |