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
{ | |
"Sku": 5980, | |
"Name": "bel normande sparkling grape juice white", | |
"Breadcrumb": { | |
"Department": { | |
"Key": "Department", | |
"Value": 8, | |
"IsBooleanValue": false, | |
"Name": "Drinks", | |
"ProductCount": 0, |
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
@using CastCompare.Data | |
@using CastCompare.Pages | |
@inject ITvDbService TvDbService | |
<div class="row"> | |
<div class="col-md-2"> | |
<BlazoredTypeahead SearchMethod="@SearchShows" | |
@bind-Values="@SelectedTvShows" | |
Placeholder="Search for a TV show" | |
MinimumLength="3" |
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
import requests | |
def handle_colo(colo): | |
print("do something with colo " + colo) | |
response = requests.get("http://archipro.co.nz/cdn-cgi/trace") | |
key_values = response.text.split('\n') | |
[handle_colo(x.split('=')[1]) for x in key_values if x.startswith('colo')] |
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
First.LogService.Logger = new First.Logging.ElmahLogger(); // default elmah logger | |
First.LogService.Logger = new First.Logging.ExceptionalLogger(); // new logger | |
//update references to ErrorLog.GetDefault(null) -> First.Services.LogService.WriteLog() | |
// old | |
ErrorLog.GetDefault(null).Log(new Error(new Exception("message")); | |
// new | |
LogService.WriteLog("message") |
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
test |
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
<!DOCTYPE> | |
<html> | |
<body> | |
<div id="app"> | |
<form> | |
<div> | |
<label>Username</label> | |
<input type="username" v-model="formData.username" /> | |
<tooltip :show="tooltips.username.vis" :message="tooltips.username.message" @tooltip:hide="tooltips.username.vis = false" |
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
declare module '@fortawesome/fontawesome-free-brands' { | |
import { Icon } from '@fortawesome/fontawesome'; | |
export var prefix: Icon; | |
export var fa500px: Icon; | |
export var faAccessibleIcon: Icon; | |
export var faAccusoft: Icon; | |
export var faAdn: Icon; | |
export var faAdversal: Icon; | |
export var faAffiliatetheme: Icon; |
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
def main(): | |
list1 = [3, 2, 1] | |
tuple1 = (6, 4, 5) | |
print("BEFORE:", list1, tuple1) | |
fiddle2(list1, tuple1) | |
print(" AFTER:", list1, tuple1) | |
def fiddle2(some_list, a_tuple): | |
# Create a new list from the contents of the Tuple | |
# assignments to this variable are not reflected in the Tuple from main() |
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 | |
$array = [ | |
'name' => 'Scott' | |
]; | |
extract($array); | |
dd($name); |
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
// Fetch the name of the first pet from each owner | |
var ownerArr = [{ | |
"owner": "Colin", | |
"pets": [{"name":"dog1"}, {"name": "dog2"}] | |
}, { | |
"owner": "John", | |
"pets": [{"name":"dog3"}, {"name": "dog4"}] | |
}]; | |
// Array's map method. |
NewerOlder