前几天写的那个拖拽,自己留下的疑问。。。这次在热心博友的提示下又修正了一些小小的bug,也加了拖拽的边缘检测部分。。。就再聊聊拖拽吧 一、不要直接操作dom元素 react中使用了虚拟dom的概念,目地就是要尽量避免直接操作dom元素,所以我们在对dom元素进行操作的时候需要注意,我之前为了获取fo ...
分类:
Web程序 时间:
2016-04-02 16:03:00
阅读次数:
156
判断一个数是否是质数 对这个数从1到这个数挨着取余 如果取余等于零则计数+1,所以当计数=2是 那么说明这个数只能被一和它本身整除 所以它是质数 打印菱形 每一行首先打印空格 然后打印符号 先打印上半部分 然后下半部分 这时候中间两行出现重复 那么需要去掉一行 数组 冒泡排序 首先定义数组 利用fo ...
分类:
编程语言 时间:
2016-04-01 09:10:43
阅读次数:
176
chapter 3 进程管理 3.1 进程 进程就是处于执行期的程序。 进程就是正在执行的程序代码的实时结果。 内核调度的对象是线程而并非进程。 在现代操作系统中,进程提供两种虚拟机制: 虚拟处理器 虚拟内存 进程是处于执行期的程序以及相关的资源的总称。 进程包括代码段和其他资源。 几个函数: fo ...
分类:
系统相关 时间:
2016-03-31 10:51:53
阅读次数:
225
work目录下有用户目录若干user1,user2.。。用户名需要自己获取所有目录权限为700,用户名为目录名,用户密码为passwd1和passwd2两种(两者其一)完成如下操作,在每一个用户家目录下创建一个以他们用户名命名的空文件,并写入例如“hellouser1”。#!/bin/bashd=`/root/work`fo..
分类:
系统相关 时间:
2016-03-30 07:08:14
阅读次数:
206
题目源程序 1 public static void printPrimes (int n) 2 { 3 int curPrime; // Value currently considered for primeness 4 int numPrimes; // Number of primes fo ...
分类:
其他好文 时间:
2016-03-30 06:52:14
阅读次数:
202
Problem Description The inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i < j and ai > aj. Fo ...
分类:
其他好文 时间:
2016-03-29 23:58:46
阅读次数:
365
//第一题:输出一个整数的每一位。
#include<stdio.h>
intmain()
{
intnum;
scanf("%d",&num);
while(num)
{
printf("%d",num%10);
num=num/10;
}
return0;
}
//第三题:1到100中一共有多少个数字9。
#include<stdio.h>
intmain()
{
inti=0;
intcount=0;
fo..
分类:
编程语言 时间:
2016-03-29 22:29:49
阅读次数:
236
当没有focus在listbox时,selectedItem的background为灰色,只有鼠标点击之后才会变成蓝色。希望即使鼠标没有点击的时候也是蓝色。 解决方法: 在xaml中添加: 或在app.xaml中添加: 参考: https://social.msdn.microsoft.com/Fo ...
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo ...
分类:
其他好文 时间:
2016-03-28 10:32:52
阅读次数:
119
Configuring VM Acceleration on Linux Linux-based systems support virtual machine acceleration through the KVM software package. Follow instructions fo ...
分类:
系统相关 时间:
2016-03-26 23:30:14
阅读次数:
296