This file contains hidden or 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
| ############################################################# | |
| ################### OFFICIAL UBUNTU REPOS ################### | |
| ############################################################# | |
| ###### Ubuntu Main Repos | |
| deb http://in.archive.ubuntu.com/ubuntu/ saucy main restricted universe | |
| ###### Ubuntu Update Repos | |
| deb http://in.archive.ubuntu.com/ubuntu/ saucy-security main restricted universe | |
| deb http://in.archive.ubuntu.com/ubuntu/ saucy-updates main restricted universe |
This file contains hidden or 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<iostream> | |
| #include<vector> | |
| #include<cstdio> | |
| #include<set> | |
| #include<map> | |
| #include<algorithm> | |
| #include<string.h> | |
| #include<string> | |
| #include<cassert> | |
| #include<stack> |
This file contains hidden or 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
| N = int(raw_input()) | |
| pro = 1 | |
| num = [] | |
| for i in xrange(N): | |
| d = int(raw_input()) | |
| pro = pro * d | |
| num.append(d) | |
| for i in xrange(N): | |
| print "%d" % (pro / num[i]) |
This file contains hidden or 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
| import os, glob, time, operator | |
| def get_oldest_file(files, _invert=False): | |
| gt = operator.lt if _invert else operator.gt | |
| # Check for empty list. | |
| if not files: | |
| return None | |
| # Raw epoch distance. | |
| now = time.time() |
This file contains hidden or 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
| public List<Tweet> fetchOlderFeeds(Long user_id, Long tweet_id) { | |
| List<Tweet> tweetList = jdbcTemplate.query("select t.* from tweet t INNER JOIN following f ON (f.user_id2 = t.user_id) " + | |
| "WHERE t.tweet_id < ? AND f.user_id1 = ? " + | |
| "UNION ALL SELECT * FROM tweet t WHERE t.user_id=? AND t.tweet_id < ? " + | |
| "ORDER BY tweet_id desc limit 15", | |
| new Object[]{tweet_id, user_id, user_id, tweet_id}, new BeanPropertyRowMapper<>(Tweet.class)); | |
| return tweetList; |
This file contains hidden or 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
| explain Select * from tweet where tweet_id < 9999999999999 and (user_id in (select user_id2 from following where user_id1 = 1) or user_id = 1 ) order by tweet_id desc limit 15; |
This file contains hidden or 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
| public List<Tweet> fetchFeedsOfUser(Long user_id,int tweet_id) { | |
| return jdbcTemplate.query("Select * from tweet where tweet_id < ? and (user_id in (select user_id2 from following where user_id1 = ?) or user_id = ? ) order by timestamp desc limit 15", | |
| new Object[]{tweet_id,user_id,user_id}, new BeanPropertyRowMapper<>(Tweet.class)); | |
| } |
This file contains hidden or 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 <iostream> | |
| #include <vector> | |
| #include "viennacl/vector.hpp" | |
| #include "benchmark-utils.hpp" | |
| #define BENCHMARK_VECTOR_SIZE 1000 | |
| #define BENCHMARK_RUNS 10 | |
| int main() { |
This file contains hidden or 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
| <?php | |
| // h4x0r's ultimate encryption algorithm | |
| // I put the string to be encrypted here | |
| $str = 'aaaaaaaaaaaaaaaaaa'; | |
| // I convert the string to ASCII | |
| // I generate a random key in between 10 and the maximum value of the ASCII's | |
| // So the key is different everytime B) |
This file contains hidden or 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
| import re | |
| import socket,time,zlib,sys | |
| from struct import pack | |
| sk = socket.socket(socket.AF_INET,socket.SOCK_STREAM) | |
| sk.connect(("106.187.35.165",8080)) | |
| buff = sk.recv(1024) | |
| print 'Received', repr(buff) |