This file contains hidden or 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 React, { ReactChild } from 'react'; | |
import { Database } from '@nozbe/watermelondb'; | |
import { getWatermelon } from 'app/utils/DBWatermelonOld/DBWatermelonOld'; | |
import DatabaseProvider from '@nozbe/watermelondb/DatabaseProvider'; | |
const WatermelonProvider = (props) => { | |
const watermelonRef = React.useRef(); | |
const [database, setDatabase] = React.useState(); | |
if (!watermelonRef.current) { |
This file contains hidden or 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 | |
/** | |
* Implements hook_form_alter(). | |
*/ | |
function MYMODULE_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) { | |
$view_names = array('my_view_name'); | |
$view = $form_state->getStorage('view'); | |
if ($form_id == 'views_exposed_form' && in_array($view['view']->id(), $view_names)) { | |
// Do some shilzzle. |
This file contains hidden or 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> | |
<html> | |
<head> | |
<title>Search Youtube Video via Js API</title> | |
</head> | |
<body> | |
<div id="buttons"> | |
<label> <input id="query" value='cats' type="text"/><button id="search-button" onclick="keyWordsearch()">Search</button></label> | |
<div id="container"> | |
<h1>Search Results</h1> |
This file contains hidden or 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> | |
<html> | |
<head> | |
<style id="jsbin-css"> | |
body { | |
margin: 0px; | |
padding: 0px; | |
} |
This file contains hidden or 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 | |
$dc = "173.194.44.35"; | |
$tld = "com"; | |
$ch = curl_init("http://" . $dc); | |
curl_setopt($ch, CURLOPT_HEADER, "Host: www.google." . $tld); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); |
This file contains hidden or 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
# define the function to split the file into smaller chunks | |
def splitFile(inputFile,chunkSize): | |
#read the contents of the file | |
f = open(inputFile, 'rb') | |
data = f.read() | |
f.close() | |
# get the length of data, ie size of the input file in bytes | |
bytes = len(data) |
This file contains hidden or 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
# Node-WebKit CheatSheet | |
# Download: https://github.com/rogerwang/node-webkit#downloads | |
# Old Versions: https://github.com/rogerwang/node-webkit/wiki/Downloads-of-old-versions | |
# Wiki: https://github.com/rogerwang/node-webkit/wiki | |
# How: https://github.com/rogerwang/node-webkit/wiki/How-node.js-is-integrated-with-chromium | |
# 1. Run your application. | |
# https://github.com/rogerwang/node-webkit/wiki/How-to-run-apps |