谈谈我接触过的几个前端框架。

1、justified gallery框架:

jQuery-justified gallery插件允许你在一个合理的空间内创建响应式、无限滚动、高品质的画廊,并填充满所有的空间。

插件主要特性
    无需在意像素:使用一种先进的算法无需剪裁图像进行自动调整;
    无限滚动:已经为图片无限加载做好准备,只需添加图片并告诉Justified Gallery;
    高质量:支持任何设备和屏幕尺寸;
    动态画廊:过滤、排序、随机、添加、删除图像,你可以对画廊进行任何操作;
    灯箱效果一体化:你可以使用现有的灯箱效果,如Colorbox 或 Swipebox;
    高度可定制化:提供很多选择供你打造你想要的画廊效果;
    Captions:可以给你的图片添加说明文字;
    响应式:可根据屏幕尺寸自动调整大小;
    快速设计:带有智能的缩略图加载,生而很快;
    错误处理:管理服务器的错误,自动跳过不可用图像,并在控制台给出提示。

demo如下:

<div id="mygallery" >
    <a href="path/to/myimage1_original.jpg">
        <img alt="Title 1" src="path/to/myimage1_thumbnail.jpg"/>
    </a>
    <a href="path/to/myimage2_original.jpg">
        <img alt="Title 2" src="path/to/myimage2_thumbnail.jpg"/>
    </a>
    <!-- other images... -->
</div>

插件需要jQuery支持,之后还需引入插件的文件、分别是justifiedGallery.css、jquery和jquery.justifiedGallery.js:
<link rel="stylesheet" href="css/justifiedGallery.css" />
<script src="js/jquery.js"></script>
<script src="js/jquery.justifiedGallery.js"></script>

而后,就可以直接调用,justifiedGallery会使用默认的参数来调整图片的大小:

$("#mygallery").justifiedGallery();


2、tinymce

tinymce是一个轻量级的基于浏览器的所见即所得编辑器,由JavaScript写成。其功能配置灵活简单(两行代码就可以将编辑器嵌入网页中),支持AJAX。另一特点是加载速度非常快,如果你的服务器采用的脚本语言是 PHP,那还可以进一步优化。最重要的是,TinyMCE是一个根据LGPL license发布的自由软件。

DEMO:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TinyMce jquery 版本使用</title>

<!-- 引入jQuery -->
<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<!-- 引入TinyMCE -->
<script type="text/javascript" src="tiny_mce/jquery.tinymce.js"></script>
<script type="text/javascript">
	$().ready(function() {
		// 使用jquery方式初始化控件,这里用 #id 形式定位到textarea元素
		$('#elm1').tinymce({
			// 加载TinyMec所需的js文件
			script_url : 'tiny_mce/tiny_mce.js',

			// 使用主题
			theme : "advanced",
			
			// 使用的插件,有很多插件和工具栏按钮重复,可以去掉
			// 这里加载所有插件
			plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,advlist",

			// 工具栏,可以分成几行来显示,因为所有按钮加起来非常多
			theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
			theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
			theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
			theme_advanced_buttons4 : "insertlayer,moveforward,movebackward,absolute,|,styleprops,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,pagebreak",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : true,
		});
	});
</script>
<!-- /TinyMCE -->

</head>
<body>

	<div>
		<textarea id="elm1" rows="15" cols="80" style="width: 60%">初始化内容:可有可无</textarea>
	</div>
	
</body>
</html>

页面加载效果如下:

3、devoops

DevOOPS是Bootstrap中的一个自适应免费管理仪表板主题。

4、Bootstrap

Bootstrap是快速开发Web应用程序的前端工具包。它是一个CSS,HTML和JS的集合,它使用了最新的浏览器技术,给你的Web开发提供了时尚的版式,表单,buttons,表格,网格系统等等。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
高维积分数值方法是处理高维度函数的一种方法。通常,计算高维积分的解析解是非常困难的,因此我们需要使用数值方法来求解。以下是一些在Python中实现高维积分数值方法的例子。 1. 蒙特卡罗方法 蒙特卡罗方法是一种基于随机采样的数值方法。对于一个函数 f(x1, x2, ..., xn) 在超立方体 [a1, b1] x [a2, b2] x ... x [an, bn] 上的 n 维积分可以通过采样 N 个点的方法计算。其中每个采样点 (x1i, x2i, ..., xni) 都是独立且均匀分布在超立方体上,然后使用如下公式求积分值 I: I = V * (1/N) * sum( f(xi1, xi2, ..., xin) ) 这里,V 是超立方体的体积。 以下是 Python 代码实现: import numpy as np def monte_carlo_integration(f, limits, N): V = np.prod([b-a for a, b in limits]) # 计算超立方体的体积 I = 0 for _ in range(N): x = [np.random.uniform(a, b) for a, b in limits] I += f(*x) I *= V / N return I 示例: # 计算高维正态分布的积分 from scipy.stats import multivariate_normal p = multivariate_normal(mean=[0,0,0], cov=np.identity(3)) # 三维正态分布 I = monte_carlo_integration(p.pdf, [(-1, 1), (-1, 1), (-1, 1)], int(1e6)) print(I) 2. 复合梯形法 复合梯形法是一种基于插值的数值方法。它将积分区间分为若干个子区间,并且在每个子区间上使用梯形公式计算积分。然后将这些积分值相加,得到最终的积分值。 以下是 Python 代码实现: def composite_trapezoidal_rule(f, limits, N): a, b = limits h = (b-a) / N x = np.linspace(a, b, N+1) y = f(x) I = h * (y[0] + y[-1] + 2 * np.sum(y[1:-1])) return I 示例: # 计算二维函数的积分 def f(x, y): return np.sin(x) * np.cos(y) I = composite_trapezoidal_rule(lambda x: composite_trapezoidal_rule(lambda y: f(x, y), [0, 1], 100), [0, 1], 100) print(I) 3. 复合 Simpson 法 复合 Simpson 法是一种基于插值的数值方法。它将积分区间分为若干个子区间,并且在每个子区间上使用 Simpson 公式计算积分。然后将这些积分值相加,得到最终的积分值。 以下是 Python 代码实现: def composite_simpsons_rule(f, limits, N): a, b = limits h = (b-a) / N x = np.linspace(a, b, N+1) y = f(x) I = h/3 * (y[0] + y[-1] + 4 * np.sum(y[1:-1:2]) + 2 * np.sum(y[2:-1:2])) return I 示例: # 计算三维函数的积分 def f(x, y, z): return x**2 * y**3 * z**4 I = composite_simpsons_rule(lambda x: composite_simpsons_rule(lambda y: composite_simpsons_rule(lambda z: f(x, y, z), [0, 1], 10), [0, 1], 10), [0, 1], 10) print(I)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值