Skip to content

Instantly share code, notes, and snippets.

View seabornlee's full-sized avatar
🎯
Enjoy Coding

Water Lee seabornlee

🎯
Enjoy Coding
View GitHub Profile
@seabornlee
seabornlee / gist:799f5c329f3929303e0d
Last active February 19, 2016 03:18
Rails missing template error exception information
```
An ActionView::MissingTemplate occurred in pages#home:
Missing template pages/home, application/home with {:locale=>[:zh], :formats=>["*/*;"], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :arb, :haml, :jbuilder]}. Searched in:
* "/home/railsu/shenzhenware/releases/1280/app/views"
* "/home/railsu/shenzhenware/shared/bundle/ruby/2.2.0/gems/mailboxer-0.12.5/app/views"
* "/home/railsu/shenzhenware/shared/bundle/ruby/2.2.0/gems/china_city-0.0.4/app/views"
* "/home/railsu/shenzhenware/shared/bundle/ruby/2.2.0/bundler/gems/activeadmin-7aef260921d4/app/views"
* "/home/railsu/shenzhenware/shared/bundle/ruby/2.2.0/gems/kaminari-0.16.1/app/views"
* "/home/railsu/shenzhenware/shared/bundle/ruby/2.2.0/gems/devise_invitable-1.3.6/app/views"
@Override
protected void onResume() {
super.onResume();
WallpaperInfo wallpaperInfo = WallpaperManager.getInstance(MainActivity.this).getWallpaperInfo();
if (wallpaperInfo.getServiceName().equals(SnowflakesWallpaperService.class.getName())) {
Toast.makeText(this, "Successful!", Toast.LENGTH_LONG).show();
}
}
<script charset="Shift_JIS" src="http://chabudai.sakura.ne.jp/blogparts/honehoneclock/honehone_clock_tr.js"></script><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="160" height="70" id="honehoneclock" align="middle"><param name="allowScriptAccess" value="always"><param name="movie" value="http://chabudai.sakura.ne.jp/blogparts/honehoneclock/honehone_clock_tr.swf"><param name="quality" value="high"><param name="bgcolor" value="#ffffff"><param name="wmode" value="transparent"><embed wmode="transparent" src="http://chabudai.sakura.ne.jp/blogparts/honehoneclock/honehone_clock_tr.swf" quality="high" bgcolor="#ffffff" width="160" height="70" name="honehoneclock" align="middle" allowscriptaccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></object>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
android:text="Button1"
android:id="@+id/ButtonOne"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"/>
@seabornlee
seabornlee / gist:11518467
Created May 4, 2014 15:28
start system apps on android
private void startWWWIntent() {
Intent nextIntent = new Intent(Intent.ACTION_VIEW);
nextIntent .setClassName("com.android.browser", "com.android.browser.BrowserActivity");
startActivity(nextIntent);
}
private void startSmsIntent() {
Intent nextIntent = new Intent(Intent.ACTION_VIEW);
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
</jsp-config>
@seabornlee
seabornlee / gist:11516619
Created May 4, 2014 13:27
match ip or domain name
^((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]\d)|\d)(\.((25[0-5])|(2[0-4]\d)|(1\d\d)|([1-9]\d)|\d)){3}$|^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,6}$
@seabornlee
seabornlee / gist:11516545
Created May 4, 2014 13:24
select columns with jquery selector
tr td:nth-child(1)