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
int | |
binary_search_first_position(int *A, int n, int target) { | |
int end[2] = { -1, n }; | |
while (end[0] + 1 < end[1]) { | |
int mid = (end[0] + end[1]) / 2; | |
int sign = (unsigned)(A[mid] - target) >> 31; | |
end[1-sign] = mid; | |
} | |
int high = end[1]; | |
if (high >= n || A[high] != target) |
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
# EDIT: 2013/10/20 | |
# google has updated its kwt UI, this script doesn't work any more! | |
# may be I will update this script when I have time to investigate their new Interface. | |
from selenium import webdriver | |
from selenium.common.exceptions import TimeoutException | |
import selenium.webdriver.support.wait | |
selenium.webdriver.support.wait.POLL_FREQUENCY = 0.05 | |
import re |
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
// EDIT: 2013/10/20 | |
// google has updated its kwt UI, this script doesn't work any more! | |
// may be I will update this script when I have time to investigate their new Interface. | |
// requires | |
var utils = require('utils'); | |
var casper = require('casper').create() | |
var casper = require('casper').create({ | |
verbose: true, |
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 python2 | |
""" | |
Author: takeshix <takeshix@adversec.com> | |
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org). | |
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP. | |
""" | |
import sys,struct,socket | |
from argparse import ArgumentParser |
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
'use strict'; | |
/** | |
* dependencies | |
*/ | |
var amqp = require('amqplib'), | |
when = require('when'); | |
/** |
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
'use strict'; | |
/** | |
* dependencies | |
*/ | |
var amqp = require('amqplib'), | |
when = require('when'); | |
/** |
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
'use strict'; | |
/** | |
* dependencies | |
*/ | |
var amqp = require('amqplib'), | |
when = require('when'); | |
/** |
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
'use strict'; | |
/** | |
* dependencies | |
*/ | |
var amqp = require('amqplib'), | |
when = require('when'); | |
/** |
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
'use strict'; | |
/** | |
* dependencies | |
*/ | |
var amqp = require('amqplib'), | |
when = require('when'); | |
/** | |
* Receiver Class, initialized with amqp address |
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
void ConsumerThread::Run() | |
{ | |
enum | |
{ | |
Term_Evt = 0, | |
MQTimer_Evt, | |
RpTimer_Evt, | |
Queue_Evt, | |
Evt_cnt, |
OlderNewer