Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
public class MainActivity extends FragmentActivity implements LoaderManager.LoaderCallbacks<String> { | |
public boolean onCreateLoaderExecuted; | |
public boolean onLoadFinishedExecuted; | |
public boolean loadInBackgroundExecuted; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { |
package com.example.HelloAndroid; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import com.example.HelloAndroid.widget.MyTextView; | |
public class MyActivity extends Activity { | |
/** | |
* Called when the activity is first created. |
<manifest ...> | |
... | |
<!-- Make sure your app (or individual activity) uses the | |
theme with the custom attribute defined. --> | |
<application android:theme="@style/AppTheme" ...> | |
... | |
</application> | |
</manifest> |
http://www.ibm.com/developerworks/opensource/library/os-pythonpackaging/ |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
Ctrl+C | copy current line (if no selection) |
Ctrl+X | cut current line (if no selection) |
Ctrl+⇧+K | delete line |
Ctrl+↩ | insert line after |
package com.meituan.android.widget; | |
import android.content.Context; | |
import android.content.res.Resources; | |
import android.content.res.TypedArray; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.util.AttributeSet; | |
import android.view.View; |
<?xml version="1.0" encoding="UTF-8"?> | |
<project | |
xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<name>PhoneToComputer</name> | |
<groupId>com.dingzhihu.android</groupId> | |
<artifactId>phonetocomputer</artifactId> | |
<version>1.0-SNAPSHOT</version> |
.idea | |
*.iml | |
gen/ | |
local.properties | |
build.xml | |
bin | |
out |
############################################## | |
# Different ways to define singleton methods # | |
############################################## | |
def test_singleton_method | |
animal = 'dog' | |
yield animal | |
puts animal.speak |
#!/usr/bin/env ruby -w | |
#Usage: ./gem-create.rb your_gem_name | |
def dump(file_name, content, executable = false) | |
content ||= '' | |
lines = content.split('\n') | |
File.open(file_name, 'w') do |f| | |
lines.each do |line| | |
f.puts line |