http://guides.rubyonrails.org/association_basics.html
- belongs_to : TABLE_NAME
- has_one : TABLE_NAME [:through => :TABLE_NAME]
- has_many : TABLE_NAME [:through => :TABLE_NAME]
- has_and_belongs_to_many : TABLE_NAME [:join_table => :TABLE_NAME]
| /* The API controller | |
| Exports 3 methods: | |
| * post - Creates a new thread | |
| * list - Returns a list of threads | |
| * show - Displays a thread and its posts | |
| */ | |
| var Thread = require('../models/thread.js'); | |
| var Post = require('../models/post.js'); |
http://guides.rubyonrails.org/association_basics.html
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="daichan4649.lockoverlay" | |
| android:versionCode="1" | |
| android:versionName="1.0" > | |
| <uses-sdk | |
| android:minSdkVersion="15" | |
| android:targetSdkVersion="17" /> |
| import com.google.inject.Singleton; | |
| import java.util.regex.Matcher; | |
| import java.util.regex.Pattern; | |
| @Singleton | |
| public class YouTubeHelper { | |
| final String youTubeUrlRegEx = "^(https?)?(://)?(www.)?(m.)?((youtube.com)|(youtu.be))/"; | |
| final String[] videoIdRegex = { "\\?vi?=([^&]*)","watch\\?.*v=([^&]*)", "(?:embed|vi?)/([^/?]*)", "^([A-Za-z0-9\\_-]*)"}; |