示例1,跟随鼠标的键头:需要掌握一个重要的公式,这个方法返回从 x 轴到点 (x,y) 之间的角度Math.atan2(dy,dx);关键代码: 1 function Arrow() { 2 this.x = 0; 3 this.y = 0; 4 this.rotate = 0; 5 ...
分类:
其他好文 时间:
2016-01-09 23:04:47
阅读次数:
439
/*由数字字符串构造BigDecimal的方法 *设置BigDecimal的小数位数的方法 */ import java.math.BigDecimal; //数字字符串 String StrBd="1048576.1024"; //构造以字符串内容为值的BigDecimal类型的变量bd BigD...
分类:
其他好文 时间:
2016-01-09 18:27:59
阅读次数:
124
Js 常用数值函数(Math,parseInt)取整1.丢弃小数部分,保留整数部分parseInt(5/2)2.向上取整,有小数就整数部分加1Math.ceil(5/2)3,四舍五入.Math.round(5/2)4,向下取整Math.floor(5/2)Math 对象的方法FF: Firefox,...
分类:
Web程序 时间:
2016-01-07 11:36:22
阅读次数:
168
1 from math import log,sqrt,exp 2 from scipy import stats 3 4 def bsm_call_value(S0,K,T,r,sigma): 5 S0 = float(S0) 6 d1 = (log(S0 / K) + (r ...
分类:
编程语言 时间:
2016-01-05 22:42:11
阅读次数:
1645
Python pandas的效率比较: 1 from time import time 2 from math import exp,sqrt,log 3 from random import gauss,seed 4 seed(20000) 5 t0 = time() 6 7 S0 = 100 ....
分类:
编程语言 时间:
2016-01-05 22:38:36
阅读次数:
989
Math.Ceiling()向上取整,Math.Floor()向下取整 示例: d = 4.56789 Math.Ceiling(Convert.ToDecimal(d)).ToString();Math.Ceiling(Convert.ToDouble(d)).ToString();Math.Fl...
==================系统库函数================字符串函数举例数学函数import mathval=math.sin(3.14/6)val=math.sin(math.pi/6)>>> 3*3*3*381>>> math.pow(3,4) #3的4次方81.0举例操作系...
分类:
编程语言 时间:
2016-01-05 20:43:24
阅读次数:
253
创建p_w_picpath.js(function(){
varp_w_picpathUploadId="p_w_picpathUploadId_"+newDate().getTime()+parseInt(Math.random()*1000);//生成唯一编号
functioninit(editor){
return{
title:editor.lang.p_w_picpath["title"],
minWidth:420,
minHeight:360,
onShow:function..
分类:
其他好文 时间:
2016-01-05 15:45:43
阅读次数:
314
class student { //定义学生编号 private String stu; //学生姓名 private String name; //学生书信成绩 private float math; //学生语文成绩 private fl...
分类:
编程语言 时间:
2016-01-04 22:34:53
阅读次数:
196
import sys
import pygame
from pygame.locals import *
import time
import math
pygame.init()
screen=pygame.display.set_mode((500,550))
myfont=pygame.font.Font(None,30)
red=(255,0,0)
green=(0,255,0)
bl...
分类:
编程语言 时间:
2016-01-04 18:16:09
阅读次数:
216