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 void menu(View v) { | |
LayoutInflater inflater = this.getLayoutInflater(); | |
View view = inflater.inflate(R.layout.menu, null); | |
Dialog mDialog = new Dialog(this, | |
android.R.style.Theme_Translucent_NoTitleBar_Fullscreen); | |
mDialog.setContentView(view); | |
mDialog.getWindow().setLayout(500, 600); | |
mDialog.show(); |
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
//The shader that renders the Bitmap | |
BitmapShader fillBMPshader; | |
//Initialize the BitmapShader with the Bitmap object and set the texture tile mode | |
fillBMPshader = new BitmapShader(color, Shader.TileMode.REPEAT, Shader.TileMode.REPEAT); | |
//Initialize the fillPaint object | |
pCell = new Paint(); | |
pCell.setStyle(Paint.Style.FILL); | |
//Assign the 'fillBMPshader' to this paint | |
pCell.setShader(fillBMPshader); |
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
adb shell /system/bin/screencap -p /sdcard/screenshot.png | |
adb pull /sdcard/screenshot.png screenshot.png |
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 Dog { | |
public static void main(String[] args) { | |
Dog aDog = new Dog("Max"); | |
foo(aDog); | |
aDog.name.equals("Max"); // true | |
} | |
public static void foo(Dog d) { | |
d.name.equals("Max"); // true | |
d = new Dog("Fifi"); | |
d.name.equals("Fifi"); // 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
<?xml version="1.0" encoding="UTF-8"?> | |
<mule xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:facebook="http://www.mulesoft.org/schema/mule/facebook" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd | |
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd | |
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd | |
http://www.mulesoft.org/schema/mule/facebook http://www.mulesoft.org/schema/mule/facebook/current/mule-faceboo |
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
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
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
mod = Sketchup.active_model | |
ent = mod.active_entities | |
sel = mod.selection | |
SKETCHUP_CONSOLE.clear | |
org = Geom::Point3d.new(); spc = 10.cm | |
cdn = ent.grep(Sketchup::ComponentInstance).map{|ci|ci.definition.name}.uniq.sort | |
cdn.each{|n| | |
cis = ent.grep(Sketchup::ComponentInstance).each{|ci| | |
next unless ci.definition.name==n | |
ci.transform! ci.transformation.inverse |