Skip to content

Instantly share code, notes, and snippets.

buildscript {
repositories {
mavenCentral()
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.android.tools.build:gradle:0.6.+'
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
classpath 'com.github.chrisbanes.actionbarpulltorefresh:library:+'
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion '19.0.0'
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionCode 1
package com.test.app;
import android.app.ActionBar;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentStatePagerAdapter;
//failed
$scope.newUser = function ()
{
var user = $scope.newUserObj;
User.register(user).then(function(returnData)
{
console.log(returnData);
}, function(reason) {
alert('Failed: ' + reason);
}, function(update) {
app.run(function($http) {
$http.defaults.headers.common['Accept'] = 'application/json, text/javascript';
});
register: function(req, res){
var params = req.params.all();
User.create(params, function(err, user){
register: function(req, res){
var params = req.params.all();
User.create(params, function(err, user){
if (err){
res.send(500, err);
}
else
{
if(sails.config.user.requireUserActivation){
[tableView beginUpdates];
NSDictionary *theme = [self.allThemes objectAtIndex:indexPath.row];
[self.allThemes removeObject:theme];
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
[tableView endUpdates];
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid update: invalid number of rows in section 0. The number of rows contained in an existing section after the update (1) must be equal to the number of rows contained in that section before the update (11), plus or minus the number of rows inserted or deleted from that section (0 inserted, 1 deleted) and plus or minus the number of rows moved into or out of that section (0 moved in, 0 moved out).'
@implementation ThemeTableViewController
- (id)initWithStyle:(UITableViewStyle)style
{
self = [super initWithStyle:style];
if (self) {
// Custom initialization
}
return self;
}
/**
* ExcelControllerController.js
*
* @description ::
* @docs :: http://sailsjs.org/#!documentation/controllers
*/
var csv = require('json-csv')
var fs = require('fs');
var http = require('http');