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
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(newChallenge:) name:@"ZZChallengedReady" object:nil]; | |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(foundPartner:) name:@"NSActivityReady" object:nil]; |
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 nocompatible | |
set expandtab | |
set autoindent | |
set smartindent | |
set softtabstop=4 | |
set tabstop=4 | |
set shiftwidth=4 | |
set showmatch | |
set ruler | |
set nohls |
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 <sstream> | |
#include <string> | |
#include <iostream> | |
#include <fstream> | |
#include <vector> | |
using namespace std; | |
void printVector(vector<string> v) | |
{ |
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
for var i = 0, elements = 0; i < circles; i++ { | |
x = helixRadius * cos(t) | |
z = helixRadius * sin(t) | |
y = pitchInherent * pitchCurrent * t | |
t += yIncrement | |
helixAngle = atan2(x, z) | |
let circleCenter = Float3(x: x, y: y, z: z) | |
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
SELECT COUNT(DISTINCT isbn) | |
FROM stud.egzempliorius | |
WHERE EXTRACT(MONTH FROM grazinti)=10; |
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
CREATE TEMP TABLE EgzemplioriuSkaiciai(metai, isbn, paimta, pavadinimas) | |
AS ( | |
SELECT | |
knyga.metai AS metai, | |
knyga.isbn AS isbn, | |
COUNT(egzempliorius.paimta) AS paimta, | |
knyga.pavadinimas AS pavadinimas | |
FROM stud.knyga JOIN stud.egzempliorius ON knyga.isbn = egzempliorius.isbn | |
GROUP BY knyga.isbn); |
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 GintvileFile { | |
private String name; | |
private String contents; | |
public GintvileFile() { | |
this.contents = ""; | |
} | |
public String getContents() { | |
return contents; | |
} | |
} |
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 <stdlib.h> | |
#include "SocketAddress.h" | |
#include "Socket.h" | |
#include "Request.h" | |
#include "Response.h" | |
#include "Helpers.h" | |
int main(int argc, char **argv) | |
{ |
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
func getMinDistanceBetweenRectangles(a: CGRect, b: CGRect) -> CGFloat { | |
let deltaX = b.origin.x - a.origin.x | |
let deltaY = b.origin.y - a.origin.y | |
let delta = abs(deltaX) > abs(deltaY) ? deltaX : deltaY | |
var distance: CGFloat = 0 | |
switch (delta >= 0, delta == deltaX) { | |
case (true, true) : distance = b.origin.x - (a.origin.x + a.width) | |
case (true, false) : distance = b.origin.y - (a.origin.y + a.height) |
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
class Matrix(): | |
def __init__(self, width, height): | |
self.width = width | |
self.height = height | |
# Initialise the matrix grid | |
self.matrix = [] | |
for row in range(height): | |
self.matrix.append([]) | |
for column in range(width): |