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>OpenLayers Test</title> | |
<style type="text/css"> | |
html, body, #basicMap { | |
width: 100%; | |
height: 100%; | |
margin: 0; | |
} |
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
Firefly | |
"Dead or Alive" | |
Episode # : 1AGE06 | |
Story # : | |
Written by : Cheryl Cain | |
Directed by : Marita Grabiak |
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
// ./jobs//jobs/TweetsCrawl.js | |
var CronJob = require('cron').CronJob; | |
module.exports = function(client, T, io){ | |
var personalSpace = {}; | |
personalSpace.tweetCount = null; | |
personalSpace.twitterStream = null; |
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
val headers_13 = Map( | |
"Accept" -> """*/*""", | |
"Origin" -> """http://site.com""", | |
"token" -> """token""" | |
) | |
val scn = scenario("Scenario Name") | |
.exec(http("request_1") | |
.post("http://site.com/login") | |
.headers(headers_1) |
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
Salut Mathieu. j'ai trouvé ton code dans dans les exemples pour un find by username. | |
Si je veux l'adapter pour créer une méthode de login, est-ce que quelque chose de genre marcherait ? | |
Je suis pas sûr de bien comprendre la l.9 | |
def login(name: String, password: String): Future[Option[People]] = { | |
val query = new Query().setIncludeDocs(true).setLimit(1) | |
.setRangeStart(ComplexKey.of(name), ComplexKey.of(password)) | |
.setRangeEnd(ComplexKey.of(s"$name\uefff"), ComplexKey.of(s"password\uefff")) | |
bucket.find[People]("people", "by_name", "by_password")(query).map(_.headOption) | |
} |
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
#!/usr/bin/env ruby | |
#coding: utf-8 | |
require 'pp' | |
word = {} | |
tweets = [] | |
final = {} | |
File.open("mapreduce.csv", "r:windows-1251:utf-8").each_line do |line| | |
line = line.split(",") | |
word[line[0]] = line[2] |
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
module SimpleHashtag | |
class Hashtag < ActiveRecord::Base | |
acts_as_tenant :tenant | |
def self.find_by_name(name, tenant) | |
Hashtag.where("lower(name) =? AND tenant_id=?", name.downcase, tenant.id).first | |
end | |
def self.find_or_create_by_name(name, tenant, &block) | |
find_by_name(name, tenant) || create(name: name, &block) |
OlderNewer