Skip to content

Instantly share code, notes, and snippets.

View yolio2003's full-sized avatar
🎯
Focusing

monkeytao yolio2003

🎯
Focusing
View GitHub Profile
@yolio2003
yolio2003 / natto-eval.js
Created December 17, 2022 00:09 — forked from paulshen/natto-eval.js
natto.dev eval pseudocode
const f = useMemo(() => {
try {
return new Function('inputs', `return ${expression}`);
} catch (e) {
return [e];
}
}, [expresssion]);
// input atoms

mathclub是最近做的一个个人项目,帮助考SAT的同学通过在线做题、回顾、问答提高成绩。用户功能有:计次/计时做题、成绩单、错题分布、错题回顾、提问、汇总以及注册登录。管理后台主要是题库管理、学员管理、成绩单管理、问题回复。怎么看都像学校里的课设,的确项目本身并不出奇,开发上选用的一些方案或许更有意思。

整个项目一个人从产品需求、原型设计、前后端开发到部署历时2周左右。可以从截图上感受一下:

image

技术选型上服务端是Node.js,应用框架选了老牌的Express(4.x变化挺大不少中间件都废了),数据服务用的是MongoLab(MongoDB的云服务平台),图片上传用的是又拍云,程序部署在Nodejitsu上。模板引擎没选主流的Jade或ejs,而是用Express React Views它实现了在服务端渲染React组件。前端框架是用React,这次有意想追求前后端全部组件化的组织。之前是用Webpack实现CommonJS模块打包,这次用Browserify配置更简单,它有丰富的transform很赞,其中的reactify转换React的JSX很完美。CSS用Sass+autoprefixer让人省心。将这一切串起来的自动构建工具是Gulp。我其实崇尚用最精简的工具组合开发,上述组合在我看来比较精简了。(帖纸留念)

![image](http://satexam.b0.upaiyu

<?php
class dict {
private $_dict;
function __construct() {
/** 设置字典库 */
$this->_dict = array(
'A' => array(59371,41648,50400,33157,41392,18661,47599),
'Ai' => array(19697,32178,35504,36856,20712,25068,28663,26608,29399,19381,17099,47497,30339,43240,54250,56459,45201,25005,57749,17131,36057,28596,49375,29162,55685,31713,27114,64665,19190,56536,37508,22145,59104,42373,18930,17311,30185,29599,54922,60552,35971,19670,27069,47505,56476,52365,63875,43184,17031,45460,45466,43440,32176,44464,57310,36230,41904,42672,42928,42416,42160,18330,22758,52719,58012,27797,45716,44208,44720,23788,45302,25559,49645,30387,51430,56208,24969,51680,44976,16588,46209,43696,43952,18334,57994,29916,51424,34439),
'An' => array(63223,39405,58764,17125,31621,34691,56712,18059,46512,33240,42376,22239,20462,39914,36586,64753,21940,18566,20963,29912,29649,37368,23685,26617,22193,47024,25589,19441,40169,36845,45488,29099,29640,37881,24205,61928,55010,17352,50928,36553,22468,30127,3
@yolio2003
yolio2003 / Readme.md
Created December 25, 2013 06:24 — forked from maxpert/Readme.md

Javascript #router. Features:

  • Just 70 lines of code.
  • Router scope can be bound to any object (default window); just change first parameter
  • Triggers custom DOM (Level 2) events on window.document.
  • IE 9+, FF, and Webkit based browsers [Tested only in Chrome and FF].