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
@extends('layouts.app-nonav') | |
@section('styles') | |
<style> | |
div.container{ | |
height: calc(100vh - 16px); | |
} | |
div.login { | |
width: 100%; |
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
// TensorPlayground.com | |
// https://images.unsplash.com/photo-1506108928571-9f4b11ba3f10?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80 | |
// INPUT TENSOR SHAPE: [901,1350,3] | |
(tf, aTensor) => { | |
const height = aTensor.shape[0] | |
const width = aTensor.shape[1] | |
const halfHeight = (height - 1) / 2 | |
console.log(halfHeight) | |
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 Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace ConsoleNancySelfHostedNetTest | |
{ | |
[TestClass] | |
public class TestIbsQueryBuilder | |
{ | |
public class MyModel : IbsQueryBuilder | |
{ |
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 System; | |
using System.Text.RegularExpressions; | |
namespace ConsoleNancySelfHostedNetTest | |
{ | |
public abstract class IbsQueryBuilder | |
{ | |
private string _queryCriteria = ""; | |
public virtual IbsQueryBuilder Where(string col, string arg1, string arg2 = null) |
Workbox runtime caching recipes
Your Service Worker script will need to import in Workbox and initialize it before calling any of the routes documented in this write-up, similar to the below:
importScripts('workbox-sw.prod.v1.3.0.js');
const workbox = new WorkboxSW();
// Placeholder array populated automatically by workboxBuild.injectManifest()
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
OK that makes sense. I'm not 100% familiar with PHPUnit & didn't notice the @Depends comments etc. I'm fine with that. | |
There will always be exceptions to the rule, but in general we don't want to be testing private variables IMO. In my mind, the normal progression of TDD I'd generally start from the "outside of the black box", and work my way in only if I really have to. E.g. calling methods from the interface first - e.g something like this (TEST=update test, CODE=update code base): | |
TEST: Instantiate Flow\Schema\Register\Blueprint | |
CODE: Create empty version of that class with a constructor | |
TEST: $definition = $blueprint->definitions(); | |
CODE: create definitions method doing nothing | |
TEST: assert $definition is a collection | |
CODE: instantiate $this->definitions = collection, and update definitions method to return it |
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
version: '3' | |
services: | |
redis-server: | |
image: 'redis' | |
node-app: | |
build: . | |
ports: | |
- '4001:8081' |
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
// running and creating a container | |
docker run <image> | |
docker run -d <image> # background | |
// running and creating a container | |
docker create <image> | |
docker start -a <container_id> | |
// list the containers | |
docker ps —all |
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 | |
// references | |
// https://stackoverflow.com/questions/13274691/coverting-hex-to-image-in-php | |
// https://stackoverflow.com/questions/45711484/how-to-convert-image-stored-in-db-as-hex-into-visible-image | |
$hexString = '0xffd8ffe000104a46494600010100000100010000ffe103224578696600004d4d002a00000008000c010e0002000000200000009e010f000200000012000000be011000020000000b000000d0011200030000000100010000011a000500000001000000dc011b000500000001000000e40128000300000001000200000131000200000020000000ec01320002000000140000010c013b00020000000c00000120829800020000000c0000012c87690004000000010000013800000000557273696e69612063616c656e64756c69666f6c6961203230303730313939004e494b4f4e20434f52504f524154494f4e004e494b4f4e20443730300000002dc6c000002710002dc6c00000271041646f62652050686f746f73686f702043533620284d6163696e746f73682900323031373a31303a30392031373a32353a313500486f77617264205269636500486f776172642052696365000020829a000500000001000002be829d000500000001000002c6882200030000000100030000882700030000000100c800009000000700000004 |