jQuery 顶部导航跟随滚动,固定浮动在顶部演示 XML/HTML Codesection> article class="left"> p> p> ul> li>a href="http://freejs.net/article_jquerywenzi_149.html" title="Ajax 动态加载内容">Ajax 动态加载内容a>li> li>a href="htt...
分类:
Web程序 时间:
2014-06-08 18:15:37
阅读次数:
215
描述:
用户点击左边div中的商品,对应商品会自动添加到右面的div中,类似电子商城中的添加到购物车功能。
主要用到了jquery中的复制节点功能,基本原理是首先获取点击的元素,然后将相应信息进行克隆,然后添加到右面的div中。
show you code:
jquery test
.left
{
float: left;
width: 500px;
heigh...
分类:
Web程序 时间:
2014-06-08 18:01:23
阅读次数:
253
题目
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).
For example:
G...
分类:
其他好文 时间:
2014-06-08 17:29:07
阅读次数:
315
1. 递归解法
/**
* Definition for binary tree
* struct TreeNode {
* int val;
* TreeNode *left;
* TreeNode *right;
* TreeNode(int x) : val(x), left(NULL), right(NULL) {}
* };
*/
cl...
分类:
其他好文 时间:
2014-06-08 16:51:59
阅读次数:
199
题目
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ \...
分类:
其他好文 时间:
2014-06-08 16:38:02
阅读次数:
194
Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified.
You should pack your words in a greedy approach; that i...
分类:
编程语言 时间:
2014-06-08 15:25:00
阅读次数:
282
题意:贪吃蛇的题目
思路:BFS+状态的记录,坑了无数发,#include
#include
#include
using namespace std;
const int MAXN = 500000;
bool flag[8],vis[25][25],mp[21][21][16384];
int n,m,l;
int xx[4]={-1,0,1,0}; // up,right,dow,left...
分类:
其他好文 时间:
2014-06-08 10:13:19
阅读次数:
204
题目
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
For example:
Given binary tree {3,9,20...
分类:
其他好文 时间:
2014-06-08 09:23:34
阅读次数:
230
android 中使用Canvas的drawText绘制文本的位置,是基于基线的。如下图:
其中字母Q的小尾巴在横线下面了。
怎么样找准字母的中心位置呢?
先看下面的例子:(右边的数字,表示字体的 left, top, right, bottom)
这里面的关键是Paint.getTextBound。 getTextBound会填充一个Rect,这个Rect表示...
分类:
移动开发 时间:
2014-06-08 09:08:44
阅读次数:
279
Rotating Sentences
In ``Rotating Sentences,'' you are asked to rotate a series of input sentences 90 degrees clockwise. So instead of displaying the input sentences from left to right and top to b...
分类:
其他好文 时间:
2014-06-08 04:51:34
阅读次数:
236