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
package hu.javaportal.test | |
import org.junit.runner.RunWith | |
import org.scalatest.junit.JUnitRunner | |
import org.scalatest.{BeforeAndAfter, FunSuite} | |
import org.scalatest.mock.MockitoSugar | |
import com.orientechnologies.orient.`object`.db.{OObjectDatabasePool, OObjectDatabaseTx} | |
import com.orientechnologies.orient.core.tx.OTransaction.TXTYPE | |
import javax.persistence.{Version, Id} | |
import com.orientechnologies.orient.core.sql.query.OSQLSynchQuery |
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 time | |
import Image | |
import ImageGrab | |
while True: | |
time.sleep(0.5) | |
t = str(time.time()).replace('.','-') | |
tt = time.time() | |
img=ImageGrab.grab() | |
img = img.resize((800,600)) |
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
from sqlalchemy import (create_engine, event, | |
Column, Integer, | |
ForeignKey) | |
from sqlalchemy import event | |
from sqlalchemy.orm import sessionmaker, scoped_session | |
from sqlalchemy.orm import relationship | |
from sqlalchemy.ext.declarative import declarative_base, declared_attr | |
from sqlalchemy.exc import DBAPIError | |
import sqlite3 |
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
#include <X11/Xlib.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int main() | |
{ | |
Display *display; | |
Window window; | |
XEvent event; | |
int 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
source.sh | |
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 android.app.Activity; | |
import android.app.Service; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.content.IntentFilter; | |
import android.os.Bundle; | |
import android.os.IBinder; | |
import android.support.v4.content.LocalBroadcastManager; |
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
{-# LANGUAGE OverloadedStrings #-} | |
import Network.HTTP.Conduit | |
import Network.HTTP.Types.Status | |
import Network | |
import Data.Time.Clock | |
import Data.Time.Calendar | |
import qualified Control.Exception as E | |
import qualified Data.ByteString.Lazy as L | |
past :: UTCTime | |
past = UTCTime (ModifiedJulianDay 56200) (secondsToDiffTime 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
git clean -xfd | |
git submodule foreach --recursive git clean -xfd | |
git reset --hard | |
git submodule foreach --recursive git reset --hard | |
git submodule update --init --recursive |
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
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
import Network.Connection (TLSSettings (..)) | |
import Network.HTTP.Conduit | |
import Network.HTTP.Types.Status | |
import qualified Data.ByteString.Char8 as B | |
import qualified Data.Text as T | |
import Data.Time.Clock | |
import Data.Time.Calendar |
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
from sqlalchemy import create_engine, event, orm | |
from sqlalchemy.orm import sessionmaker | |
from sqlalchemy.orm.session import Session as SessionBase, object_session | |
from sqlalchemy.event.api import listen | |
# The following adds delete, insert, and update events after successful commits. | |
# SQLAlchemy provides only events after flushes, but not after commits. | |
# The classes are adapted from Flask-SQLAlchemy. | |
# see also https://stackoverflow.com/a/12026787/60982 |