Skip to content

Instantly share code, notes, and snippets.

@flying19880517
flying19880517 / plot.js
Last active September 19, 2016 10:25
来源: http://yujianrong.bitbucket.org/JsTool/Plot/plot.html 说明:虽然使用了动态细分的办法,但效果还是不够理想,不知道应该用什么办法才能做得比较好。 尝试第一个的话要写成 sin(pow(E,x+y)) = pow(E,sin(x)+cos(y)) 可以用以下Javascript数学库的函数/常数: E LN2 LN10 LOG2E LOG10E PI SQRT1_2 SQRT2 abs acos asin atan atan2 ceil cos exp floor log max min pow round sin sqrt tan 注意 a^b 要写成 pow(a,b) 这种形式,要不然会被当作异或操作
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">
var Config={
Width :400,
Height:400,
Range:{X:{Min:-10, Max:10}, Y:{Min:-10, Max:10}},
MaxSplit:10
};
@flying19880517
flying19880517 / fiddlerReplaceResponseBody.js
Last active June 26, 2024 15:09
Fiddler Script替换ResponseBody
//关闭Stream选项
//以下内容添加到FiddlerScript的OnBeforeResponse中
if(oSession.host.EndsWith("example.com")){
//使用正则表达式
oSession.utilReplaceRegexInResponse("Example","Hahaha");
//自己处理
var body = oSession.GetResponseBodyAsString();
body = body+"asdfadsfadfs";
oSession.utilSetResponseBody(body);
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset=utf-8>
<title>Liquid Particles 3D | spielzeugz.de/lab </title>
<meta name="description" content="HTML5 Demo, particles trapped in a sphere." />
<meta name="keywords" content="html5,canvas,javascript,particles,interactive,velocity,programming,flash" />
<style>
*{
@flying19880517
flying19880517 / Crypter.java
Created March 18, 2014 01:27
QQ的TEA加密
package mobi.bbase.ahome.utils;
import java.io.ByteArrayOutputStream;
import java.util.Random;
/**
* 加密解密QQ消息的工具类. QQ消息的加密算法是一个16次的迭代过程,并且是反馈的,每一个加密单元是8字节,输出也是8字节,密钥是16字节
* 我们以prePlain表示前一个明文块,plain表示当前明文块,crypt表示当前明文块加密得到的密文块,preCrypt表示前一个密文块
* f表示加密算法,d表示解密算法 那么从plain得到crypt的过程是: crypt = f(plain &circ; preCrypt) &circ;
@flying19880517
flying19880517 / Simplified Chinese.xml
Created March 14, 2014 02:55
Simplified Chinese.xml for AntiDupl.NET-2.3.1
<?xml version="1.0" encoding="utf-8"?>
<Strings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Name>Simplified Chinese</Name>
<OriginalLanguageName>简体中文</OriginalLanguageName>
<OkButton_Text>确定</OkButton_Text>
<CancelButton_Text>取消</CancelButton_Text>
<StopButton_Text>停止</StopButton_Text>
<SetDefaultButton_Text>还原为默认值</SetDefaultButton_Text>
<ErrorMessage_FileAlreadyExists>无法重命名文件,因为与此名称的文件已经存在!</ErrorMessage_FileAlreadyExists>
<WarningMessage_ChangeFileExtension>你真的想改变文件扩展名?</WarningMessage_ChangeFileExtension>
@flying19880517
flying19880517 / debug-strict.css
Created February 27, 2013 15:30
严格调试样式 1px红色点线:行内样式 3px红色点线:空属性 5px红色点线:没有高和宽的图片 没有alt的图片 没有title的图片 没有title的链接 黄色背景:空元素 1px红框:过时属性 10px红框:过时元素
/**
* Debug CSS by iifksp
* Author: iifksp@swordair.com
* Author URI: http://www.swordair.com/blog
* Version: 1.1
* License: MIT
*/
/* inline style */
*[style]{outline:1px dotted #f00 !important;}
@flying19880517
flying19880517 / initTextEvent.htm
Created July 26, 2012 05:42
initTextEvent Example
<html>
<head>
<!--
//http://help.dottoro.com/ljuecqgv.php
-->
<script type="text/javascript">
function Init () {
var textarea = document.getElementById ("textarea");
if (textarea.addEventListener) {
// Google Chrome and Safari
@flying19880517
flying19880517 / isUtf8File.cpp
Created July 7, 2012 16:27
检查文件编码是否是utf-8
bool MainWindow::isUtf8File(QIODevice *file)
{
const int testSize = 1024;
char str[testSize];///
int size = file->peek(str, testSize);
// char buf[3];
// if (f->peek(buf, sizeof(buf)) == sizeof(buf))
@flying19880517
flying19880517 / debug.css
Last active October 4, 2015 07:47
调试样式 1px红色点线:行内样式 3px红色点线:空属性 5px蓝色点线:没有高和宽的图片 5px红色点线:没有alt的图片 黄色背景:空元素 绿色实线:过时属性 10px红框:过时元素 http://www.swordair.com/blog/2012/04/889/
/**
* Debug CSS by iifksp
* Author: iifksp@swordair.com
* Author URI: http://www.swordair.com/blog
* Version: 1.1
* License: MIT
*/
/* inline style */
*[style]{outline:1px dotted #f00 !important;}
@flying19880517
flying19880517 / tunneler.html
Created March 14, 2012 15:58
2D图形绘制测试
<!--
http://www.ghost-hack.com/post/jsexperiments/tunneler/tunneler.html
-->
<html>
<head>
<style type="text/css">
body
{
font-family: Monospace;
background-color: #222222;