GithubHelp home page GithubHelp logo

mcori / dictionary Goto Github PK

View Code? Open in Web Editor NEW

This project forked from shenfeng/dictionary

0.0 1.0 0.0 16.36 MB

Pure c with epoll: A English-English dictionary to assist reading

Home Page: http://dict.shenfeng.me

Ruby 0.93% JavaScript 54.23% HTML 0.90% CSS 1.54% Java 25.43% Groff 0.22% Clojure 1.63% Python 0.29% Shell 1.58% Makefile 0.34% C 12.24% Smarty 0.66%

dictionary's Introduction

A simple online english dictionary

A simple and ease to use English dictionary written in C using epoll in server side and javascript in client side. Data is extracted from LDOCE

Directory structure:

  1. /server Server side code, in C.
  2. /client Javascript/HTML/CSS
  3. /test/java Util test and performance test code
  4. /src Clojure and java code to generate the dbdata file

dbdata file format

  • first 2 byte: how many words in this file. big-endian
  • the rest are word items, one by one
  • word items are sorted asc
  • word item format, five parts, in order
    1. word
    2. \0
    3. 1 bit: 0 is gzipped data, 1 is unzipped
    4. 15 bit: how many bytes of data of this word
    5. data of this word

Linux epoll's performance is amazing

while 800k idle connection is kept, still 53.4k req/s. more info

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.