现在位置: 首页 > Jvjpopuc发表的所有文章
  • 09月
  • 15日
综合 ⁄ 共 1829字 评论关闭
第一个EJB程序: 开发服务端程序: 1.新建一个EJB project:EJBTest_01 2.在src下建包:com.credream.ejb 3.写接口:FirstEjb.java   package com.credream.ejb; public interface FirstEjb {/***1. EJB中需要一个接口* @param name* @return*/ public String saySomething(String name); } 4.写接口的实现类:FirstEjbBean.java    package com.credream.ejb; import javax.ejb.Remote; import javax.ejb.Stateless; //3.添加配置 @Stateless @Remote //2.实现类 public class FirstEjbBean implements FirstEjb { /**  * 注意在EJB中,......
阅读全文
  • 04月
  • 11日
综合 ⁄ 共 3552字 评论关闭
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <malloc.h> ///数据层 typedef struct AC { char name[50]; ///存账户名 char password[10]; ///存密码 double money; ///存余额 struct AC *nxt; ///下一个账户 }Account,*AccountP; ///Account:结构体 AccountP:结构体指针 Account Head; ///定义链表头 int sz; ///链表大小 ///模块层 ///读取文件模块: void _read() { int i; AccountP u=NULL; FILE *f=NULL; if((f=fopen(......
阅读全文
  • 10月
  • 21日
综合 ⁄ 共 17741字 评论关闭
1.0 Introduction to Regression Procedures in SAS   Statistical Procedure Functions REG performs linear regression with many diagnostic capabilities, selects models using one of nine methods, produces scatter plots of raw data and statistics, highlights scatter plots to identify particular observations, and allows interactive changes in both the regression model and the data used to fit the model. CATMOD analyzes data that can be represented by a contingency table. ......
阅读全文
  • 09月
  • 28日
移动开发 ⁄ 共 135字 评论关闭
在进行Android开发时,可以选择MyEclipse,Eclipse,J2EE Eclipse是最好的选择,使用J2EE时在导入已经完成的Android项目包时容易出现各种问题,建议使用Eclipse3.5及以上版本,能够很容易兼容其他项目,基本上导入不会有任何的问题。
阅读全文
  • 06月
  • 10日
综合 ⁄ 共 5107字 评论关闭
作者:clean 更新时间: 2005-05-11         曾经听说过一个走迷宫的诀窍:顺着墙沿一侧走。(一直沿左侧或一直沿右侧)。本程序实现了这一思想,小人一直沿左侧走。    迷宫是随机生成的。    开始时,按数字 1 键进入人工控制模式;按w,s, a,d分别代表上,下,左,右方向。    开始时,按除数字 1 以外的任意键进入自动模式;小人由电脑控制。     按 Q键结束程序。 /*  Name:    maze.c  Author:      zhuqing  Description:     迷宫探险   Date: 28-08-03 10:15  Copyright: */#include <stdlib.h>#include......
阅读全文
  • 05月
  • 11日
综合 ⁄ 共 1602字 评论关闭
工作中碰到一个定位的应用场景:app需要在后台运行,实时上传用户地理位置。 苹果对iOS的规范性在提升了app的品质的同时也带来了对开发者的限制。翻阅了各种官方文档和资料,得出结论如下: 1、实现后台定位有2种方式: standard location service(调用CLLocationManager的startUpdatingLocation) significant-change location service(调用CLLocationManager 的startMonitoringSignificantLocationChanges) 2、两者区别: 前者(startUpdatingLocation)是标准定位,想要在后台使用必须在info.plist文件中增加Require......
阅读全文
  • 05月
  • 02日
综合 ⁄ 共 817字 评论关闭
最简单的就是利用搜索,把每一种情况都考虑。 //深度搜索。复杂度O(2^n) int dfs(int i,int j) { int res;//剩余的空间量。 if(i==n)res=0;//如果i==n则剩余空间量为0。 else if(j<w[i]) res=dfs(i+1,j);//如果物品太大,不装进去。 else res=max(dfs(i+1,j),dfs(i+1,j-w[i])+v[i]);//装和不装的情况都尝试下。 return res; } 因为在搜索算法中,重复计算的情况较多,我们可以利用数组,把计算结果记录下来,这样就避免了重复计算。 //记忆化搜索。复杂度O(nw). int dp[n+1][w+1]; memset(dp,-1,sizeof(dp)); i......
阅读全文
  • 04月
  • 20日
综合 ⁄ 共 253字 评论关闭
1.在谷歌发布 ADT之前,搭建安卓环境比较麻烦。 2搭建步骤:     2.1 下载ADT,解压缩之后如图:     注:sdk文件夹包含了2.2到4.x版本的sdk。 SDK Manger.exe是用来下载sdk的,这里已经全部弄好,不需要再处理。    2.2 下载 JDK(可以去官网下载),我下载的是1.7版本的64位的。你电脑是多少位操作系统就下载多少位的JDK,如图:       2.3 安装jdk,一直点击下一步,安装结束。    2.4 打开eclipse即可以使用。[不需要再配置什么环境变量,下载sdk什么的。]       
阅读全文
  • 03月
  • 29日
综合 ⁄ 共 2969字 评论关闭
以下demo转子官网: SimpleTitleWindowExample: <?xml version="1.0" encoding="utf-8"?> <!-- Simple custom MXML TitleWindow component.      The TitleWindowApp application displays this component.       You cannot run it independently. -->       <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"      title="Title Window" x="168" y="86">     <mx:Script>         <![CDATA[                    import mx.managers.PopUpManager;             import mx.controls.Text;......
阅读全文
  • 02月
  • 21日
综合 ⁄ 共 4509字 评论关闭
1002 Warm up 这题不难,关键是怎么去缩点和扩栈。 #include <cstdio> #include <cstring> #include <vector> #include<queue> #include<cmath> #include <algorithm> using namespace std; #define MAXN 200006 #define MAXM 2000006 #pragma comment(linker, "/STACK:1024000000,1024000000") struct node { int v, w, pre; } edge[MAXM]; int pos[MAXN], nEdge; //图的存储:链式前向星(池子法) struct Bridge { int u, v; } bridge[MAXM]; //用来记录桥 int tot; //桥的个......
阅读全文
  • 02月
  • 21日
综合 ⁄ 共 1457字 评论关闭
1.Linux链接概念 Linux链接分两种,一种被称为硬链接(Hard Link),另一种被称为符号链接(Symbolic Link)。默认情况下,ln命令产生硬链接。 【硬连接】硬连接指通过索引节点来进行连接。在Linux的文件系统中,保存在磁盘分区中的文件不管是什么类型都给它分配一个编号,称为索引节点号(Inode Index)。在Linux中,多个文件名指向同一索引节点是存在的。一般这种连接就是硬连接。硬连接的作用是允许一个文件拥有多个有效路径名,这样用户就可以建立硬连接到重要文件,以防止“误删”的功能。其原因如上所述,因为对应该目录的索引节......
阅读全文
  • 02月
  • 14日
综合 ⁄ 共 883字 评论关闭
' we can pass the excel file name and worksheet as the parameter and using Wscript.Arguments to use it in the script if(Wscript.Arguments.Count<3) then msgbox "The count of Arguments is "&Wscript.Arguments.Count 'Quit VBS script 'Wscript.Quit End if Set oExcel=CreateObject("excel.application") Set oWorkBook=oExcel.Workbooks.Open("C:\Users\lude\Downloads\Hypo Case\Basic Property.xls") 'use the worksheet "Prop_Methods" Set oSheet=oWorkBook.Sheets("Prop_Methods") 'Get the used......
阅读全文