Skip to content

Instantly share code, notes, and snippets.

@zbjxb
zbjxb / getLiveComment.py
Created December 14, 2021 07:14 — forked from Youngyi/getLiveComment.py
简单的Bilibili直播弹幕抓取实现
#!/usr/bin/env python
import socket
import binascii
import threading
import time
import json
reconnect_flag = 0
@zbjxb
zbjxb / ezTD_mobuSetup.py
Created August 20, 2019 16:27 — forked from OmniZ3D/ezTD_mobuSetup.py
Easily setup & maintain a standardized pipeline for Animators in MotionBuilder Also helpful when/if a MotionBuilder bug resets the config files. Making a copy of your "..\Documents\MB\[version]\config" directory is recommended to back up your personal preferences.
########################################################################################
## ezTD_mobuSetup.py
## version: 2.0
## Author: Jason Barnidge
## jbarnidge [at] OmniZed.com
## www.OmniZed.com
## Description:
## Easily setup & maintain a standardized pipeline for Animators in MotionBuilder
## Also helpful when/if a MotionBuilder bug resets the config files
########################################################################################
@zbjxb
zbjxb / simple_snake_game.cpp
Created December 16, 2015 07:04
控制台版贪吃蛇
#include <iostream>
#include <stdlib.h>
#include <conio.h>
using namespace std;
enum eDirection { STOP, UP, LEFT, RIGHT, DOWN };
eDirection dir;
bool gameOver;
const int width = 20;
const int height = 20;
int x, y, fruitX, fruitY, score;
#include <iostream>
#include <string>
using namespace std;
/* *
* <program> ::= <program-header> <block> '.'
* <program-header> ::= PROGRAM <ident>
* <block> ::= <declarations> <statements>
* */
#include <string>
#include <vector>
#include <iostream>
using namespace std;
char Look;
typedef string Symbol;
typedef vector<Symbol> SymTab;
typedef SymTab* TabPtr;
@zbjxb
zbjxb / access_private_data.cpp
Last active January 2, 2016 08:59
给胖子演示一下c++类成员函数中能访问同类对象的私有数据成员。
#include <iostream>
using namespace std;
class Car {
public:
Car(int num, const string& engineer) : m_nWheel(num), m_strEngineer(engineer) {}
void display(Car& car);
private:
void joke(){}
@zbjxb
zbjxb / 计算器四则
Last active January 2, 2016 02:09
给胖子的最简单的计算器四则运算
#include <iostream>
// 从左到右计算简单四则表达式,除数为0的话返回false
bool calc_exp(const char* exp, float& result);
int main() {
float result;
char exp[]="4-3+2*5+7/3";
std::cout << "表达式: " << exp << std::endl;