This file contains hidden or 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
| package com.rain.example.data.provider; | |
| import com.rain.example.data.database.RainEmployeeDatabase; | |
| import com.rain.example.data.database.table.*; | |
| import android.provider.BaseColumns; | |
| import android.text.TextUtils; | |
| import android.content.ContentUris; | |
| import android.database.sqlite.SQLiteQueryBuilder; |
This file contains hidden or 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
| // GET /chapters/revision | |
| needs update? | |
| { version : 1 } | |
| // GET /chapter | |
| { | |
| "version": 1, |
This file contains hidden or 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
| apply plugin: 'android' | |
| import com.rain.utils.cpgen.generator.*; | |
| android { | |
| compileSdkVersion 19 | |
| buildToolsVersion "19.0.1" | |
| defaultConfig { | |
| minSdkVersion 14 | |
| targetSdkVersion 19 |
This file contains hidden or 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
| angular.module('bs.common.models').factory('AuthInterceptor', function ($rootScope, $q, $window) { | |
| return { | |
| request: function (config) { | |
| config.headers = config.headers || {}; | |
| var token = $window.localStorage.getItem('user-token'); | |
| if (token) { | |
| config.headers.Authorization = 'Bearer ' + token; | |
| } | |
| return config; | |
| }, |
This file contains hidden or 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
| package io.starterkit.droid.data.provider; | |
| import io.starterkit.droid.data.database.StarterDatabase; | |
| import io.starterkit.droid.data.database.table.*; | |
| import android.provider.BaseColumns; | |
| import android.text.TextUtils; | |
| import android.content.ContentUris; | |
| import android.database.sqlite.SQLiteQueryBuilder; |
This file contains hidden or 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
| { | |
| "packageName": "io.starterkit.droid.data", | |
| "providerName": "starter", | |
| "databaseVersion": 1, | |
| "tables": [ | |
| { "name": "friend", | |
| "members": [ | |
| { "type": "string", "name": "full_name" }, | |
| { "type": "string", "name": "username" }, | |
| { "type": "string", "name": "avatar_url" }, |
This file contains hidden or 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
| package io.starterkit.droid.activities; | |
| import android.app.Activity; | |
| import android.app.LoaderManager; | |
| import android.content.CursorLoader; | |
| import android.content.Loader; | |
| import android.database.Cursor; | |
| import android.os.Bundle; | |
| import android.widget.CursorAdapter; | |
| import android.widget.ListView; |
This file contains hidden or 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
| from django.contrib.auth.models import User | |
| from api.models import Lock, Profile | |
| from rest_framework import serializers | |
| class UserSerializer(serializers.HyperlinkedModelSerializer): | |
| class Meta: | |
| model = User | |
| fields = ('url', 'username', 'email', 'groups') |
This file contains hidden or 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
| class Team(models.Model): | |
| """ | |
| This model should be thought of as an Access Window, because | |
| it is easier to understand what is actually going on. | |
| """ | |
| # Fields | |
| name = models.CharField(_('Name'), max_length=100, blank=False) | |
| address_1 = models.CharField(_('Address 1'), max_length=100, blank=False) | |
| address_2 = models.CharField(_('Address 2'), max_length=100, blank=True) |
This file contains hidden or 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
| state('root.auth.home.locks', { | |
| abstract: true, | |
| url: 'locks', | |
| templateUrl: FILE_ROOT + 'components/home/Locks/LocksCtrl.html', | |
| controller: 'LocksCtrl' | |
| }). | |
| state('root.auth.home.locks.edit', { | |
| url: 'locks/edit', | |
| templateUrl: FILE_ROOT + 'components/home/Locks/LockEdit.html', | |
| controller: 'LocksCtrl' |