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
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> | |
<script src="socket.io.js"></script> | |
<script type="text/javascript"> | |
$(function(){ |
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 SocCon(SocketConnection): | |
pool = redis.ConnectionPool(host='ip for redis server', port=6379, db=0) | |
redis = redis.Redis(connection_pool=pool) | |
unique_cls = 0 | |
user = {} | |
val = 0 | |
@classmethod | |
def get_user(cls): | |
cls.unique_cls += 1 | |
user = "User%s" % cls.unique_cls |
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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js"></script> | |
<script type="text/javascript" src="js/noty/packaged/jquery.noty.packaged.min.js"></script> | |
<script src="socket.io.js"></script> | |
<script type="text/javascript"> |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from tornado import web, escape | |
from tornadio2 import SocketConnection, TornadioRouter, SocketServer, event | |
import brukva | |
import redis | |
from os import path as op | |
ROOT = op.normpath(op.dirname(__file__)) | |
################ user authentication check########################## |
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
from tornado import web, escape | |
from tornadio2 import SocketConnection, TornadioRouter, SocketServer, event | |
import brukva | |
import redis | |
from os import path as op | |
import json | |
ROOT = op.normpath(op.dirname(__file__)) | |
class MainHandler(web.RequestHandler): |
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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
<script src="socket.io.js"></script> | |
<script type="text/javascript"> | |
$(function(){ |
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
from tornado import web | |
from tornadio2 import SocketConnection, TornadioRouter, SocketServer, event | |
from os import path as op | |
ROOT = op.normpath(op.dirname(__file__)) | |
class MainHandler(web.RequestHandler): | |
def get(self): | |
self.render("index.html") |
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 include("setup.php");?> | |
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Untitled Document</title> | |
<style type="text/css"> | |
body{ | |
font-family: Tahoma, Geneva, sans-serif; | |
font-size:12px; |
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
package com.servlets; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import javax.servlet.ServletException; | |
import javax.servlet.annotation.WebServlet; | |
import javax.servlet.http.HttpServlet; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
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
dosyadan okduğumuz her kelimen için istenen şekilde bir key oluşturdum. | |
Daha sonra division metodunu kullanarak kelimeyi hash tablomuza yerleştirmeye çalıştım. | |
Kelimeyi arama kısmında, kullanıcıdan arayacağı kelimeyi istedim ve kelimeyi aldıktan sonra onun için de bir key oluşturdum. | |
Division metoduyla hash tablosunda olabileceği yere baktık orda yoksa rehas fonksuyonu yardımıyla olabileceğe adreslere baktım. | |
Eğer tabloda bulamadıysak kelimenin her seferde sadece bir tane harfi değişsecek şekilde harf değiştirme uyguladım ve kişinin aradığı değil ancak aradığı kelimeden sadece bir harfi farklı olup tabloda olan kelimeri bunu mu demek istediniz şeklinde ekrana yazdırdım. | |
Uygulama | |
FACE = 3 göz | |
FACT = 12 göz |
NewerOlder