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
| var lineReader = require('readline').createInterface({ | |
| input: require('fs').createReadStream('sample.txt') | |
| }); | |
| var values = {} | |
| var i = 0 | |
| var s = 1 | |
| lineReader.on('line', function (line) { | |
| i++; |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Threading.Tasks; | |
| using Microsoft.AspNetCore.Hosting; | |
| using Microsoft.Extensions.Configuration; | |
| using Microsoft.Extensions.Hosting; | |
| using Microsoft.Extensions.Logging; | |
| namespace WebApplication |
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
| const express = require('express') | |
| const app = express() | |
| const port = 3000 | |
| app.get('/', (req, res) => { | |
| res.send('Hello World!') | |
| }) | |
| app.get('/api', (req, res) => { |
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 Cocoa | |
| import EventKit | |
| var meetings = [String: String]() | |
| let eventStore = EKEventStore() | |
| switch EKEventStore.authorizationStatus(for: EKEntityType.event) { | |
| case .authorized: break |
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
| const natural = require('natural'); | |
| const extract = require('article-parser').extract; | |
| const run = (c, url) => { | |
| natural.BayesClassifier.load('classifier.json', null, async(err, classifier) => { | |
| if (err) { | |
| console.log(err); | |
| classifier = new natural.BayesClassifier(); |
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 logging | |
| import cv2 | |
| import numpy | |
| import glob, os | |
| faceClassifier = cv2.CascadeClassifier() | |
| faceClassifier.load('haarcascade_frontalface_default.xml') | |
| imageProbes = [] | |
| typeProbes = [] |
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
| // | |
| // ZeroInboxToolbar.m | |
| // GMailinator | |
| // | |
| // Created by Vitaly Baum on 1/5/17. | |
| // Copyright © 2017 nompute. All rights reserved. | |
| // | |
| #import "ZeroInboxToolbar.h" | |
| #import "ZeroInboxMessageViewer.h" |
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
| rm -Rf /Applications/Android\ Studio.app | |
| rm -Rf ~/Library/Preferences/AndroidStudio* | |
| rm ~/Library/Preferences/com.google.android.studio.plist | |
| rm -Rf ~/Library/Application\ Support/AndroidStudio* | |
| rm -Rf ~/Library/Logs/AndroidStudio* | |
| rm -Rf ~/Library/Caches/AndroidStudio* | |
| rm -Rf ~/AndroidStudioProjects | |
| rm -Rf ~/.gradle | |
| rm -Rf ~/.android | |
| rm -Rf ~/Library/Android* |
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
| const express = require('express'); | |
| const bodyParser = require('body-parser'); | |
| const app = express(); | |
| app.use(bodyParser.json()); | |
| app.post('/setup', (req, res) => { | |
| const body = req.body; |
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
| const getUserId = () => Math.floor((Math.random() * 1000000) + 1); //yeah, it should be real user id | |
| const myLogger = (req, res, next) => { | |
| const token = req.method + "_" + req.path + "_" + getUserId() + "_" + new Date().getTime(); | |
| console.log(token); | |
| req["app_token"] = token; | |
| next(); | |
| }; | |
| app.get('/products', (req, res) => { |
NewerOlder