<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
// Create a new interface | |
public interface UIUpdatable { | |
public void updateUI(String message); | |
} | |
// Implement the new interface on the activity | |
public class QuestionNew extends AppCompatActivity implements UIUpdatable { | |
public TextView txtView; |
export const smoothScroll = { | |
timer: null, | |
stop: function () { | |
clearTimeout(this.timer); | |
}, | |
scrollTo: function (id, callback) { | |
let settings = { | |
duration: 1000, |
export default function createActionTypes(entityName) { | |
const ENTITY = entityName.toUpperCase(); | |
return { | |
LOAD_START: `LOAD_${ENTITY}S_START`, | |
LOAD_SUCCESS: `LOAD_${ENTITY}S_SUCCESS`, | |
LOAD_NO_CONNECTION: `LOAD_${ENTITY}S_NO_CONNECTION`, | |
LOAD_ERROR: `LOAD_${ENTITY}S_ERROR`, |
//throw this in your helper.php | |
function set_active($path, $active = 'active') { | |
return call_user_func_array('Request::is', (array)$path) ? $active : ''; | |
} | |
// use it like so | |
<a class="{{ set_active(['admin/institutes*','admin/courses*']) }}">Learning</a> |
// Hacking javascript to get the week number of a selected date | |
Date.prototype.getWeek = function() { | |
var date = new Date(this.getTime()); | |
date.setHours(0, 0, 0, 0); | |
// Thursday in current week decides the year. | |
date.setDate(date.getDate() + 3 - (date.getDay() + 7) % 7); | |
// January 4 is always in week 1. | |
var week1 = new Date(date.getFullYear(), 0, 4); | |
// Adjust to Thursday in week 1 and count number of weeks from date to week1. | |
return 1 + Math.round(((date.getTime() - week1.getTime()) / 86400000 |
#!/usr/bin/env bash | |
if [ -z $1 ] | |
then | |
echo "serve www.domain.com /path" | |
exit 1 | |
fi | |
if [ -z $2 ] | |
then |
cv2.line(Image, (x, y), (x + (w/5) ,y), WHITE, 2) | |
cv2.line(Image, (x+((w/5)*4), y), (x+w, y), WHITE, 2) | |
cv2.line(Image, (x, y), (x, y+(h/5)), WHITE, 2) | |
cv2.line(Image, (x+w, y), (x+w, y+(h/5)), WHITE, 2) | |
cv2.line(Image, (x, (y+(h/5*4))), (x, y+h), WHITE, 2) | |
cv2.line(Image, (x, (y+h)), (x + (w/5) ,y+h), WHITE, 2) | |
cv2.line(Image, (x+((w/5)*4), y+h), (x + w, y + h), WHITE, 2) | |
cv2.line(Image, (x+w, (y+(h/5*4))), (x+w, y+h), WHITE, 2) |
@media print { | |
.break {page-break-after: always;} | |
} |
let gpsPath = [] | |
let step = 0 | |
let stepIncrement = 1 | |
let numSteps = locations.length - 1 | |
let timePerStep = 300 | |
let interval = setInterval(() => { | |
step += stepIncrement | |
if (step >= numSteps) { |