题目:已知三个整型数8,12,6,按公式s=a+b*c计算,并显示结果思路:定义三个整型变量a,b,c
定义一个变量s用来保存运算结果 输出程序: 1 #include 2 3 void main() 4 { 5 int a = 8; 6 int b = 12;
7 ...
分类:
编程语言 时间:
2014-05-01 09:26:46
阅读次数:
347
1 /// 2 /// 冒泡排序法-for循环 3 /// 4 /// 5 private
static void BubbleSort(int[] array) 6 { 7 ...
分类:
其他好文 时间:
2014-05-01 09:19:38
阅读次数:
279
本次内容:java常用类1、包装类 1 package array; 2 3 public class
wrapperclass { 4 public static void main(String[] args) 5 { 6 Integer i=new
Inte...
分类:
编程语言 时间:
2014-05-01 09:16:28
阅读次数:
384
注意变换思维,然后就是水题。(如果卡时还可以进一步二分优化。)#include long
existed[10000][32];int main(void){ int N;// freopen("poj2443.txt", "r", stdin);
scanf("%d", &N);...
分类:
其他好文 时间:
2014-05-01 09:15:47
阅读次数:
373
package algorithm.sort;public class QuickSort {
public static void main(String[] args) { int[] a = new int[] {5, 3, 7, 2, 1, 4,
9, 8, 6, 1}; sort(a); ...
分类:
其他好文 时间:
2014-05-01 03:33:20
阅读次数:
330
package algorithm.sort;public class CountingSort {
public static void main(String[] args) { int[] a = new int[] {5, 3, 7, 2, 1, 4,
9, 8, 6, 1}; int[] ...
分类:
其他好文 时间:
2014-05-01 03:25:05
阅读次数:
252
package algorithm.sort;public class HeapSort {
public static void main(String[] args) { int[] a = new int[] {5, 3, 7, 2, 1, 4,
9, 8, 6, 1}; sort(a); p...
分类:
其他好文 时间:
2014-05-01 03:24:04
阅读次数:
332
在应用程序中用到MPMoviePlayerViewController时,有时需要保持应用程序为竖屏状态,而视频播放器显示为横屏,如何做呢?如果采用强制横屏的方法,应用审核的时候是不会通过的,因为该方法已经被苹果禁止了。主要代码如下:
- (void)addVideoViewController
{
MPMoviePlayerViewController *moviePlayerView...
分类:
移动开发 时间:
2014-04-29 13:42:22
阅读次数:
313
//自定义布局
public class MyLayout extends RelativeLayout{
private Context mContext;
private ICallBack mCallBack;
public void setCallBack(ICallBack cb){
mCallBack = cb;
}...
分类:
其他好文 时间:
2014-04-29 13:18:21
阅读次数:
324
需求:后台(指管理员后台)上传一个html模板到文件服务器上,前台(商家操作的平台)读取到模板,并填充数据,生成新的vm页面到webapp/WEB-INF/view目录下,用于预览、保存、打印。
最开始的代码:
@Test
public void test() throws Exception{
String templateUrl = baseServic...
分类:
Web程序 时间:
2014-04-29 13:11:21
阅读次数:
465