Create a table to represent tree nodes.
CREATE TABLE `tree_node` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`data_body` text,
node_deleted
datetime DEFAULT NULL,
#include "helpers.h" | |
#include <math.h> | |
// Convert image to grayscale | |
void grayscale(int height, int width, RGBTRIPLE image[height][width]) | |
{ | |
float rgbGray; | |
for (int i = 0; i < height; i++) | |
{ | |
for (int j = 0; j < width; j++) { |
import nodemailer from 'nodemailer' | |
import ViewService from './view' // https://gist.github.com/ndiecodes/6e964e716a2b5b2aa22438912da2b3f3 | |
import Mailgun from 'mailgun.js' | |
import FormData from 'form-data' | |
import { MailgunMessageData } from 'mailgun.js/interfaces/Messages' | |
interface LooseObject { | |
[key: string]: any | |
} |
from csv import reader, DictReader | |
from sys import argv, exit | |
sequences = {} | |
#validate input | |
if len(argv) < 3: | |
print("Usage:", "python dna.py data.csv sequence.txt") | |
exit(1); |
#include "helpers.h" | |
#include <math.h> | |
// Convert image to grayscale | |
void grayscale(int height, int width, RGBTRIPLE image[height][width]) | |
{ | |
float rgbGray; | |
for (int i = 0; i < height; i++) | |
{ | |
for (int j = 0; j < width; j++) { |
import { Edge } from 'edge.js' | |
import path from 'path' | |
import { LooseObject } from '../types' | |
export default class ViewService { | |
public constructor( | |
public view: string, | |
private data: LooseObject | null = null | |
) {} | |
public get path(): string { |
// Implements a dictionary's functionality | |
#include <stdbool.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <strings.h> | |
#include <stdint.h> | |
#include <ctype.h> | |
#include "dictionary.h" |
#include <cs50.h> | |
#include <stdio.h> | |
#include <string.h> | |
// Max number of candidates | |
#define MAX 9 | |
// preferences[i][j] is number of voters who prefer i over j | |
int preferences[MAX][MAX]; |
version: 0.2 | |
phases: | |
install: | |
runtime-versions: | |
nodejs: 14.x | |
commands: | |
- npm install -g typescript | |
- npm install | |
pre_build: | |
commands: |
import { Knex } from 'knex' | |
export async function up(knex: Knex): Promise<any> { | |
await knex.schema.createTable('test_setup', (table: Knex.TableBuilder) => { | |
table.integer('foobar'); | |
}); | |
} | |
export async function down(knex: Knex): Promise<any> { | |
await knex.schema.dropTable('test_setup'); |