Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

graph = TinkerGraph.open()
graph.createIndex("name", Vertex.class)
g = graph.traversal()
// Query 1
person1 = graph.addVertex(label, 'person', 'name', 'Michael Sherman')
person2 = graph.addVertex(label, 'person', 'name', 'Zoltan Varju')
person3 = graph.addVertex(label, 'person', 'name', 'Peter Neubauer')
person4 = graph.addVertex(label, 'person', 'name', 'Grace Andrews')
person5 = graph.addVertex(label, 'person', 'name', 'Michael Hunger')
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@shallowlong
shallowlong / [Android] Enable DEBUG mode in HUAWEI phone
Created January 13, 2014 16:42
How to enable the "DEBUG" level log in a HUAWEI android phone (not checking the different kinds of HUAWEI phones, but should be okay to use). The problem here is that in the LogCat, the debug level logs cannot be viewed when using a HUAWEI android phone. There are several steps to activate the DEBUG level log inside a HUAWEI phone. This knowledg…
dial *#*#2846579#*#*
select 'ProjectMenu'
select 'Background Setting'
select 'Log Setting'
select 'Log Switch'
enable 'LOG on'
Select 'Log level setting'
enable 'DEBUG'
Press the 'Back' key
select 'Dump and Log'
@andreynovikov
andreynovikov / OnItemSelectedListener.java
Last active June 14, 2020 17:43
Complete working solution for Android action bar tabs with fragments having separate back stack for each tab.
// Custom interface that enables communication between Fragment and its Activity
public interface OnItemSelectedListener
{
public void onItemSelected(String item);
}
@JakeWharton
JakeWharton / AspectRatioImageView.java
Created June 2, 2012 02:14
ImageView that respects an aspect ratio applied to a specific measurement.
// Copyright 2012 Square, Inc.
package com.squareup.widgets;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.widget.ImageView;
/** Maintains an aspect ratio based on either width or height. Disabled by default. */
public class AspectRatioImageView extends ImageView {