git branch --set-upstream-to <remote-branch>
# example
git branch --set-upstream-to origin feature-branch
# show up which remote branch a local branch is tracking
git branch -vv
sets the default remote branch for the current local branch.
import { Injectable } from '@angular/core'; | |
import Dexie from 'dexie'; | |
import { Book } from '../books/books.component'; | |
import { OnlineOfflineService } from './online-offline.service'; | |
import { v1 as uuidv1 } from 'uuid'; // For generating time-based uuid | |
import { BackendService } from './backend.service'; | |
import { MatSnackBar } from '@angular/material/snack-bar'; | |
import { Subject } from 'rxjs'; | |
import { take } from 'rxjs/operators'; |
git branch --set-upstream-to <remote-branch>
# example
git branch --set-upstream-to origin feature-branch
# show up which remote branch a local branch is tracking
git branch -vv
sets the default remote branch for the current local branch.
{ | |
"Items": [ { | |
"TemplateId": "BADGE_BATTLE_ATTACK_WON", | |
"Badge": { | |
"BadgeType": "BADGE_BATTLE_ATTACK_WON", | |
"BadgeRanks": 4, | |
"Targets": "\\nd\\350\\007" | |
} | |
}, { | |
"TemplateId": "BADGE_BATTLE_TRAINING_WON", |
Result: 1 | |
Items { | |
TemplateId: "BADGE_BATTLE_ATTACK_WON" | |
Badge { | |
BadgeType: BADGE_BATTLE_ATTACK_WON | |
BadgeRanks: 4 | |
Targets: "\nd\350\007" | |
} | |
} | |
Items { |
Consider an Uber-City where the only passenger vehicles on the roads are self-driving Uber cars. Since all the cars are self-driving, you could synchronize the car speeds in such a way that traffic lights would be obsolete.
As a first step you need to implement an algorithm that would check whether removing traffic lights at a given intersection of two one-way roads will lead to a car crash.
For each road you know when a car will approach the crossroads. You also know how long it takes to cross the crossroads.
Example
import requests | |
def get_data_doc_number(user, password, tipo_doc, numero_doc, format='json'): | |
''' | |
# url = 'http://py-devs.com:8888/api' | |
url = 'http://py-devs.com/api' | |
tipo_doc = 'dni' o 'ruc' | |
''' | |
url = 'http://py-devs.com/api' | |
# url = 'http://localhost:8000/api' |
<?php | |
/** | |
* Converts the WooCommerce country codes to 3-letter ISO codes | |
* https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3 | |
* @param string WooCommerce's 2 letter country code | |
* @return string ISO 3-letter country code | |
*/ | |
function kia_convert_country_code( $country ) { | |
$countries = array( | |
'AF' => 'AFG', //Afghanistan |
This is an example of how the bitwise XOR can be used to make a simple encryption system.
Suppose Alice wants to send the message CAT
to Bob using the key 11000101
.
First: Convert the characters in the message to ASCII:
C = 01000011
A = 01000001
T = 01010100
APP_ENV=testing | |
APP_KEY=SomeRandomString | |
DB_CONNECTION=testing | |
DB_TEST_USERNAME=root | |
DB_TEST_PASSWORD= | |
CACHE_DRIVER=array | |
SESSION_DRIVER=array | |
QUEUE_DRIVER=sync |