This is the reference point. All the other options are based off this.
|-- app
| |-- controllers
| | |-- admin
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
<?php | |
namespace Guest; | |
use Zend\EventManager\StaticEventManager; | |
class Module | |
{ | |
public function init() | |
{ | |
$events = StaticEventManager::getInstance(); |
const FIRST_YEAR = 325; | |
const LAST_YEAR = 3000; | |
const WIDTH = 960; | |
const HEIGHT = 500; | |
const INSETS = {'left': 40, | |
'right': 10, | |
'top': 10, | |
'bottom': 60}; |
#ifndef __OPTIMIZE__ | |
# define NSLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__) | |
#else | |
# define NSLog(...) {} | |
#endif |
// Debugビルド時のみNSLogを出力する | |
#ifdef DEBUG | |
#define DebugNSLog(...); NSLog(__VA_ARGS__); | |
#else | |
#define DebugNSLog(...); // NSLog(__VA_ARGS__); | |
#endif |
# | |
# Copyright (C) 2013-2020 Vinay Sajip. New BSD License. | |
# | |
import os | |
import os.path | |
from subprocess import Popen, PIPE | |
import sys | |
from threading import Thread | |
from urllib.parse import urlparse | |
from urllib.request import urlretrieve |
from itertools import combinations | |
from nltk.tokenize import sent_tokenize, RegexpTokenizer | |
from nltk.stem.snowball import RussianStemmer | |
import networkx as nx | |
def similarity(s1, s2): | |
if not len(s1) or not len(s2): | |
return 0.0 | |
return len(s1.intersection(s2))/(1.0 * (len(s1) + len(s2))) |
#!/bin/sh | |
# | |
# Example script to start up tunnel with autossh. | |
# | |
# This script will tunnel 12345 from the remote host | |
# to 12345 on the local host. | |
# | |
ID=login_here | |
HOST=destination.host.com | |
if [ "X$SSH_AUTH_SOCK" = "X" ]; then |
#ifdef NS_BLOCK_ASSERTIONS | |
#ifndef NSLog | |
// NSLogを無効にする | |
#define NSLog( m, args... ) | |
#endif | |
#else | |
#ifndef NSLog |