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
var imgs = document.getElementsByTagName("img"); | |
var w = window.open(""); | |
var i; | |
for ( i=0; i<imgs.length; i++) { | |
var src = imgs[i].src; | |
if(src.indexOf("AAAAA")!=-1) { | |
var a = w.document.createElement("a"); |
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
#!/usr/bin/ruby | |
# -*- coding: utf-8 -*- | |
require 'net/imap' | |
require 'kconv' | |
Net::IMAP::debug = true | |
imap = Net::IMAP.new('imap.gmail.com', 993, true) | |
imap.login('hoge@gmail.com', 'pass') |
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
#!/usr/bin/env ruby | |
# -*- coding: utf-8 -*- | |
require 'nokogiri' | |
require 'net/http' | |
require 'net/https' | |
$router_user = "hoge" |
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
#!/bin/sh | |
platform="$(uname -s).$(uname -p)" | |
if [ -n "$1" ]; then | |
prog="$1" | |
shift | |
if [ -e "$prog.$platform" ]; then |
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'?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd" > | |
<!-- | |
Ref: https://trac.macports.org/attachment/ticket/27791/Portfile.diff | |
--> | |
<plist version='1.0'> | |
<dict> | |
<key>Label</key> | |
<string>org.macports.sane-backends</string> |
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
// #define __POPCNT__ | |
// #include <x86intrin.h> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <stdint.h> | |
#include <inttypes.h> | |
#include <vector> | |
#include <sys/time.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
CXXFLAGS += -O3 -funroll-loops -march=native | |
.PHONY: all | |
all: forward backward tunroll munroll normal | |
forward: main.cpp | |
$(CXX) -DFORWARD -DTREDUCTION $(CXXFLAGS) main.cpp -o forward | |
backward: main.cpp | |
$(CXX) -DTREDUCTION $(CXXFLAGS) main.cpp -o backward |
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 <thrust/device_vector.h> | |
#include <thrust/host_vector.h> | |
struct init_functor | |
{ | |
float* data_device; | |
init_functor(float* const data_device) | |
: data_device(data_device) |
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 <cstdio> | |
#include <cstdarg> | |
#include <string> | |
#include <exception> | |
// #include <cstdlib> | |
// #include <vector> | |
// #include <iostream> | |
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 <cstdio> | |
#include <cstdlib> | |
// int main() | |
// { | |
// const size_t size = sizeof(char)*8; | |
// for(size_t l=0; l<8; ++l) { | |
// const size_t i_begin = 1<<l; | |
// const size_t i_end = 1<<(l+1); | |
// for(size_t i=i_begin; i<i_end; ++i) { |
OlderNewer