This file contains 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
private fun startDropMarkerAnimation(marker: Marker) { | |
val target = marker.position | |
val handler = Handler() | |
val start = SystemClock.uptimeMillis() | |
val proj = mMap!!.projection | |
val targetPoint = proj.toScreenLocation(target) | |
val duration = (200 + targetPoint.y * 0.6) as Double | |
val startPoint = proj.toScreenLocation(marker.position) | |
startPoint.y = 0 | |
val startLatLng = proj.fromScreenLocation(startPoint) |
This file contains 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
function get_post_by_slug($post_name) { | |
global $wpdb; | |
$post = $wpdb->get_var($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_name = %s", $post_name)); | |
return $post ? get_post($post) : NULL; | |
} |
This file contains 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
export const BIRTH_SUCCESS = 'BIRTH_SUCCESS'; | |
export const birthSuccess = (births) => ({ | |
type: BIRTH_SUCCESS, | |
payload: { births }, | |
}); | |
export const loadBirths = (page) => async (dispatch) => { | |
const response = await request('/certificates/birth/page/', dispatch, page); | |
if (response) { |
This file contains 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
<?php | |
class BaseModel extends Eloquent { | |
public function columns(){ | |
$table = $this->getTable(); | |
return DB::select(" SHOW COLUMNS FROM ".$table); | |
} |
This file contains 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
// responses | |
export const SuccessResponse = function(res,data) { | |
if(data){ | |
res.json(data) | |
}else{ | |
ErrorResponse(res,{message:'Data is null',code:422}) | |
} | |
} | |
This file contains 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
'use strict'; | |
angular.module('users').factory('PasswordGenerator', function () { | |
return { | |
generate: function (length, useUpper, useNumbers, userSymbols) { | |
var passwordLength = length || 12; | |
var addUpper = useUpper || true; | |
var addNumbers = useNumbers || true; | |
var addSymbols = userSymbols || true; |
This file contains 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
//routes | |
app.route('/api/teams/logo').all() | |
.post(teams.upload).all(teamsPolicy.isAllowed) | |
//server.controller | |
//sharp = require('sharp') :: http://sharp.dimens.io/ | |
exports.upload = function (req, res) { | |
var upload = multer(uploadConfig).single('photo'); | |
upload(req, res, function (uploadError) { | |
if (uploadError) { |
This file contains 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
// | |
// RestClient.swift | |
// USJ-R Mobile | |
// | |
// Created by keithics on 10/7/15. | |
// Copyright © 2015 Web Ninja Technologies. All rights reserved. | |
// | |
import Foundation | |
import Alamofire |
This file contains 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.webninja.usjr.rest; | |
import com.squareup.okhttp.OkHttpClient; | |
import com.webninja.usjr.libs.AppConstants; | |
import retrofit.RequestInterceptor; | |
import retrofit.RestAdapter; | |
import retrofit.client.OkClient; |
This file contains 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
'use strict'; | |
/** | |
* Module dependencies. | |
*/ | |
var mongoose = require('mongoose'), | |
AWS = require('aws-sdk'), | |
exec = require('child_process').exec, | |
fs = require('fs'), | |
name = new Date().toISOString(); |
NewerOlder