Smallest multiple
Problem 5
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is evenly di...
分类:
编程语言 时间:
2015-01-26 22:49:54
阅读次数:
289
/*
选择排序:就是选一个最小(或最大)排在左边或者右边
*/
//头文件 sort.h
#include
void Print(int* arr,int len)
{
int i;
for(i=0;i<len;i++)
{
printf("%d ",arr[i]);
}
printf("\n");
}
void Swap(int* a,int* b)
{
*a=...
分类:
编程语言 时间:
2015-01-26 22:46:46
阅读次数:
150
//
// main.m
// OC04-task-07
//
// Created by Xin the Great on 15-1-24.
// Copyright (c) 2015年 Xin the Great. All rights reserved.
//
#import
#import "NSArray+Log.h"
#import "Person.h"
int main...
分类:
编程语言 时间:
2015-01-26 22:48:04
阅读次数:
131
//
// main.m
// OC04-task-08
//
// Created by Xin the Great on 15-1-24.
// Copyright (c) 2015年 Xin the Great. All rights reserved.
//
#import
#import "Person.h"
int main(int argc, const char * ...
分类:
编程语言 时间:
2015-01-26 22:46:04
阅读次数:
197
10001st prime
Problem 7
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
What is the 10 001st prime number?
python code :
import ma...
分类:
编程语言 时间:
2015-01-26 22:47:11
阅读次数:
208
Largest product in a series
Problem 8
The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832.
73167176531330624919225119674426574742355349...
分类:
编程语言 时间:
2015-01-26 22:46:14
阅读次数:
357
Unity 编辑器允许添加自定义菜单的外观和行为类似内置菜单。这可以用于添加经常常用的功能,可直接从编辑器UI操作。在这篇文章中,我将展示如何利用新的菜单menu items,Unity 编辑器中创建并尝试提供真实世界的例子用法,对于每个描述的topic。添加菜单项为了向top-level工具栏中添加一个新的菜单,您应该创建一个编辑器脚本(放在项目中一个名为Editor文件夹下任意位置的脚本文件)...
分类:
编程语言 时间:
2015-01-26 22:44:25
阅读次数:
400
转载请注明出处:http://blog.csdn.net/u010019717更全的内容请看我的游戏蛮牛地址:http://www.unitymanual.com/space-uid-18602.html 这是在“Unity Editor Extension”系列的第 2 次帖子。post描述了为创建自定义inspectors面板在 Unity 编辑器的基本步骤。在该系列的下一个posts,...
分类:
编程语言 时间:
2015-01-26 22:46:32
阅读次数:
311
Java中要用到缓存的地方很多,首当其冲的就是持久层缓存,针对持久层谈一下:要实现java缓存有很多种方式,最简单的无非就是static HashMap,这个显然是基于内存缓存,一个map就可以搞定引用对象的缓存,最简单也最不实用,首要的问题就是保存对象的有效性以及周期无法控制,这样很容易就导致内存...
分类:
编程语言 时间:
2015-01-26 22:41:52
阅读次数:
253
结构体类型的定义:1 struct student2 {3 int id; 4 char name[10];5 6 };注:student是自定义的数据类型,并不是变量像int,char 是基本数据类型,结构体变量的定义和引用:1 struct student 2 {3 int ...
分类:
编程语言 时间:
2015-01-26 22:41:49
阅读次数:
159
const int MONTH = 12 与 int const MONTH = 12 const在类型前或者类型后无区别(不可修改)1):指针常量 与 常量指针一) 常量指针。指针指向的对象是常量,那么这个对象不能被更改。1)const int *p;2)int const *p;int a = ...
分类:
编程语言 时间:
2015-01-26 22:40:45
阅读次数:
249
1.二目运算符从右往左优先级运算符名称或含义使用形式结合方向说明1[]数组下标数组名[常量表达式]左到右()圆括号(表达式)/函数名(形参表).成员选择(对象)对象.成员名->成员选择(指针)对象指针->成员名2-负号运算符-表达式右到左单目运算符(类型)强制类型转换(数据类型)表达式++自增运算符...
分类:
编程语言 时间:
2015-01-26 22:39:24
阅读次数:
159
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open ...
分类:
编程语言 时间:
2015-01-26 22:37:52
阅读次数:
252
GUI简单控件
分类:
编程语言 时间:
2015-01-26 22:40:06
阅读次数:
172
新C++标准库的名字都放在std名字空间里边。int carrots(声明语句)(此时声明就是定义)(声明可以申明使用其他位置定义的变量) --使用足够的空间来存储一个整数; --以后程序中用名字carrots 来标识存储在该内存单元的一个值C++不允许将函数定义在函数里。wchar_t...
分类:
编程语言 时间:
2015-01-26 22:36:27
阅读次数:
189
1、什么是编程?编程就是让计算机为解决某个问题而使用某种程序设计语言编写程序代码,并最终得到结果的过程。为了使计算机能够理解人的意图,人类就必须将需解决的问题的思路、方法、和手段通过计算机能够理解的形式告诉计算机,使得计算机能够根据人的指令一步一步地区工作,完成某种特定的任务。这种人和计算机之间交流...
分类:
编程语言 时间:
2015-01-26 22:36:26
阅读次数:
295
//事件委托//事件委托 function f2(d) { document.onclick = function(e) { var e = e || window.event; var target =...
分类:
编程语言 时间:
2015-01-26 22:36:02
阅读次数:
228