This file contains 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
SELECT COUNT( DISTINCT t.id ) AS num_results | |
FROM tickets t | |
LEFT JOIN companies c ON t.company_id = c.id | |
WHERE t.parent_id =0 | |
AND t.company_id =6 | |
AND ( | |
t.ticket_status NOT | |
IN ( 3, 4, 7 ) | |
) | |
GROUP BY t.id |
This file contains 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 | |
/** | |
* Hobo | |
* | |
* LICENSE | |
* | |
* Copyright (c) 2008 David Abdemoulaie | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal |
This file contains 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
class CreateUsers < ActiveRecord::Migration | |
def self.up | |
create_table :users do |t| | |
t.string :login, :password, :email, :null => false | |
t.timestamps | |
end | |
end | |
This file contains 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 | |
/** | |
* SpellCheck | |
* | |
* LICENSE | |
* | |
* This source file is subject to the new BSD license that is bundled | |
* with this package in the file LICENSE.txt. | |
* It is also available through the world-wide-web at this URL: | |
* http://hobodave.com/license.txt |
This file contains 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 | |
set_include_path('./lib:.'); | |
include 'lib/Zend/Loader.php'; | |
Zend_Loader::registerAutoload(); | |
$server = new Zend_Json_Server(); | |
$server->setClass('SpellCheck'); | |
if ('GET' == $_SERVER['REQUEST_METHOD']) { | |
$server->setTarget('/spell/json-rpc.php') |
This file contains 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 SpellChecker = Class.create({ | |
initialize: function(url, callback, options) { | |
this.url = url; | |
this.callback = callback; | |
this.options = { | |
rpcRequest: { | |
jsonrpc:"2.0", | |
method:"", | |
params: [], | |
id: Math.floor(Math.random() * 100) |
This file contains 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 fb = function(transport) { | |
console.log(transport.responseJSON); | |
} | |
var sc = new SpellChecker('/spell/json-rpc.php', fb); | |
sc.check('sevne'); |
This file contains 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
{ | |
"result":false, | |
"id":"48", | |
"jsonrpc":"2.0" | |
} |
This file contains 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
{ | |
"result": ["seven","Sven","Severn","Seine","seine","Steven","scene","seen","Even","even","serve","serving" | |
,"sever","sieve","sieving","sevens","Sen","Sivan","Svend","sen","Keven","semen","seiner","Levine","Selene" | |
,"Seline","Serene","Sterne","serene","severe","Savina","Sean","Sena","sane","save","saving","sewn","sine" | |
,"Ferne","Seana","senna","Sven's","seven's"], | |
"id":"48", | |
"jsonrpc":"2.0" | |
} |
This file contains 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
sc.checkText('Four score and sevne years ago our fathres brought forth on this continnent a new nation.'); |