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
db = connect("localhost:27017/thesis"); | |
deviceIds = db.gestures.distinct("deviceId"); | |
// new Date(ISODate().getTime() - 1000 * 60 * 18) - 18 minutes ago | |
one_finger_touches = db.gestures.aggregate( | |
[ | |
{"$match": { | |
"deviceId": deviceIds[0], | |
"timestamp": {"$gte": new ISODate("2016-01-10T00:00:00Z")} |
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 java.util.Random; | |
public class HelloWorld{ | |
public static String randomString(int i) | |
{ | |
Random ran = new Random(i); | |
StringBuilder sb = new StringBuilder(); | |
while (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/python3 | |
import sys | |
def update_crc(data, crc): | |
temp = data | |
for i in range(0, 12): | |
crc = crc << 1 | |
if temp & 0x800 != 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
private boolean okToShow(ActivityRecord r) { | |
return r.userId == mCurrentUser | |
|| (r.info.flags & ActivityInfo.FLAG_SHOW_ON_LOCK_SCREEN) != 0; | |
} | |
.... | |
mService.mWindowManager.addAppToken(addPos, r.userId, r.appToken, | |
r.task.taskId, r.info.screenOrientation, r.fullscreen, | |
(r.info.flags & ActivityInfo.FLAG_SHOW_ON_LOCK_SCREEN) != 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
class X: | |
@staticmethod | |
@classmethod | |
__init__ | |
@property | |
methods | |
subclassed methods | |
__magic_methods__ |
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 | |
from PyQt5.QtCore import Qt, QEvent | |
from PyQt5.QtWidgets import QWidget, QApplication | |
class TransparentWidget(QWidget): | |
def __init__(self): | |
super(TransparentWidget, self).__init__() | |
def changeEvent(self, e): |
NewerOlder