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 class MultipleSum { | |
| public int [] multiples; | |
| public int upper_limit; | |
| public MultipleSum(int[] multiples, int upper_limit) { | |
| this.multiples = multiples; | |
| this.upper_limit = upper_limit; | |
| } |
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
| def insertion_sort(unsorted_list): | |
| """ | |
| >>> unsorted_list = [5, 9, 2, 99, 3, 128, 3] | |
| >>> insertion_sort(unsorted_list) | |
| >>> unsorted_list | |
| [2, 3, 3, 5, 9, 99, 128] | |
| """ |
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
| def selection_sort(unsorted_list): | |
| """ | |
| >>> unsorted_list = [2, 1, 9, 8, 89] | |
| >>> selection_sort(unsorted_list) | |
| >>> unsorted_list | |
| [1, 2, 8, 9, 89] | |
| """ |
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
| def bubble_sort(unsorted_list): | |
| """ | |
| bonus: http://www.youtube.com/watch?v=u_tKnsG0rVs | |
| >>> unsorted_list = [2, 1, 9, 8, 89] | |
| >>> bubble_sort(unsorted_list) | |
| >>> unsorted_list | |
| [1, 2, 8, 9, 89] |
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
| # -*- coding: utf8 -*- | |
| def binary_search(l, value): | |
| """ (list, object) -> int | |
| >>> binary_search([1, 2, 3, 4, 5], 3) | |
| 2 | |
| >>> binary_search([1, 2, 3, 4, 5], 5) | |
| 4 |
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
| {"css":"<style> body {background-color:black !important;}","javascript":"alert(1);","html":"<font size=45>FOO<\/font>"} |
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
| {"response_html": "<script>alert(1);</script>", "status": "success"} |
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
| [{ | |
| 'picture': 'https://fbexternal-a.akamaihd.net/safe_image.php?d=AQBf467S3bXPAZHB&w=154&h=154&url=http%3A%2F%2Fmedia.chip.com.tr%2Fimages%2Fthumb%2F128%2F2013062918005785172.jpg', | |
| 'from': { | |
| 'category': 'Computers/internet website', | |
| 'name': 'CHIP Online', | |
| 'id': '330449759204' | |
| }, | |
| 'name': u 'Firefox logosu de\u011fi\u015fti!', | |
| 'privacy': { | |
| 'value': u '' |
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
| from lurker.connection import Connection | |
| connection = Connection().quick_connect("friendly", "friendly", "friendly", "localhost") | |
| tables = connection.get_results("SHOW TABLES") | |
| for table in tables: | |
| print table.get("Tables_in_mondotv") | |
| connection.execute("ALTER TABLE {0} ENGINE=INNODB;".format(table.get("Tables_in_mondotv"))) |
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
| set -g prefix C-a | |
| unbind C-b | |
| # C-a a should send ctrl-a to the underlying shell (move to start of line) | |
| bind-key a send-prefix | |
| # C-a C-a | |
| bind-key C-a last-window | |
| # config reload |