This sheet goes along with this SSH YouTube tutorial
$ ssh brad@192.168.1.29
$ mkdir test
$ cd test
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
import { Application } from './declarations'; | |
import AdminBro from 'admin-bro'; | |
import AdminBroExpress from '@admin-bro/express'; | |
import AdminBroSequelize from '@admin-bro/sequelize'; | |
import logger from './logger'; | |
AdminBro.registerAdapter(AdminBroSequelize); | |
/** | |
* Usage: | |
* |
import dynamic from "next/dynamic"; | |
import React from "react"; | |
const ReactAdmin = dynamic(() => import("../admin/ReactAdmin"), { | |
ssr: false, | |
}); | |
export default function admin() { | |
return <ReactAdmin />; | |
} |
import { | |
CreateParams, | |
CreateResult, | |
DataProvider, | |
DeleteManyParams, | |
DeleteManyResult, | |
DeleteParams, | |
DeleteResult, | |
GetListParams, | |
GetListResult, |
from django.shortcuts import render | |
from operator import attrgetter | |
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator | |
from blog.views import get_blog_queryset | |
from blog.models import BlogPost | |
BLOG_POSTS_PER_PAGE = 10 | |
$ ssh brad@192.168.1.29
$ mkdir test
$ cd test
The most common messages received from users on Appked are re ports that the “app” is damaged and can’t be opened. You should move it to the Trash! Like this:
It a simple fix and here is how we fix it:
Open the Terminal app from the /Applications/Utilities/ folder and then enter the following command syntax:
class Solution { | |
public TreeNode buildTree(int[] inorder, int[] postorder) { | |
return buildTree(inorder, inorder.length-1, 0, postorder, postorder.length-1); | |
} | |
private TreeNode buildTree(int[] inorder, int inStart, int inEnd, int[] postorder, | |
int postStart) { | |
// inStart to inEnd index backward | |
if (postStart < 0 || inStart < inEnd) |
public class WeightedQuickUnionUF { | |
private int[] id; // parent link (site indexed) | |
private int[] sz; // size of component for roots (site indexed) | |
private int count; // number of components | |
public WeightedQuickUnionUF(int N) { | |
count = N; | |
id = new int[N]; | |
for(int i = 0; i < N; i++) id[i] = i; |
new Vue({ | |
render: h => h(App) | |
}).$mount('#app'); | |
/* equal to */ | |
new Vue({ | |
render: h => h(App), | |
el: '#app' | |
}); |