现在位置: 首页 > newmarket发表的所有文章
  • 04月
  • 25日
移动开发 ⁄ 共 19367字 评论关闭
android安全与权限,属性介绍:Android是一个权限分离的操作系统,每个应用以唯一的身份标识(Linux用户ID和组ID)运行。系统的不同部分也分成不同的身份。因而Linux把应用之间以及应用与系统之间相互隔离起来。附加细粒度的安全功能是通过一个“许可”的机制,限定特定的进程能够执行指定的操作以及给予对每一个资源点对点的访问的URI许可。安全体系结构Android安全体系结构设计中心是没有任何一个应用程序在默认情况下可以执行对其他应用程序、操作系统或者用户有害的操作。其中包括读写用户的私有数据(例如联系人或者电子邮件),......
阅读全文
  • 12月
  • 24日
综合 ⁄ 共 693字 评论关闭
点击打开链接 题意:给定牛的关系图,求其中一头牛与其他牛关系路程之和sum最小,然后输出 sum*100/(n-1) floyd求任意两点间的最短路程 注意: inf不能太大,因为 f[i][k] + f[k][j]  做加法时可能会溢出! #include <cstdio> #include <cstring> const int maxn = 300 + 5; const int inf = 1<<29; int n, m; int f[maxn][maxn]; int a[maxn]; void floyd() { int i, j, k; for(k=1; k<=n; ++k) for(i=1; i<=n; ++i) for(j=1; j<=n; ++j) { if(f[i][j......
阅读全文
  • 10月
  • 18日
综合 ⁄ 共 1422字 评论关闭
Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same repeated number may be chosen from C unlimited number of times. Note: All numbers (including target) will be positive integers. Elements in a combination (a1, a2, … , ak) must be in non-descending order. (ie, a1 ≤ a2 ≤ … ≤ ak). The solution set must not contain duplicate combinations. For example, given candidate set 2,3,6,7 and target 7......
阅读全文
  • 05月
  • 15日
综合 ⁄ 共 878字 评论关闭
您只需单击“开始 运行”,并在输入框中键入“control userpasswords2”,这样就可以在“用户账户”管理窗口中清除“要使用本机,用户必须输入密码”复选项的选中状态,然后按下键盘的“Ctrl+Shift+A”,将会得到一个“自动登录”的设置对话框,您可以按自己的需要设置系统在电脑启动时自动登录使用的用户账户和密码 第二种方法复杂点     首先单击“开始 运行”,在输入框中键入“regedit”打开注册表编辑器,然后在注册表编辑器左方控制台中依次单击展开“HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows NT/Current Version/Winlogon”,再选择“......
阅读全文
  • 05月
  • 02日
综合 ⁄ 共 5175字 评论关闭
方法一:树状数组维护前缀和,运用乘法逆元求除以B的n次方mod P的值 方法二:线段树,保存了[l,r]之间的hash值 UVALive 5798 J - Jupiter Atacks! Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %llu Description Jupiter is invading! Major cities have been destroyed by Jovian spacecrafts and humanity is fighting back. Nlogonia is spearheading the counter-offensive, by hacking into the spacecrafts' control system. Unlike Earthling computers, in which usually a by......
阅读全文
  • 04月
  • 26日
综合 ⁄ 共 2114字 评论关闭
项链 时间限制:1000 ms  |  内存限制:65535 KB 难度:3 描述 在Mars星球上,每个Mars人都随身佩带着一串能量项链。在项链上有N颗能量珠。能量珠是一颗有头标记与尾标记的珠子,这些标记对应着某个正整数。并且,对于相邻的两颗珠子,前一颗珠子的尾标记一定等于后一颗珠子的头标记。因为只有这样,通过吸盘(吸盘是Mars人吸收能量的一种器官)的作用,这两颗珠子才能聚合成一颗珠子,同时释放出可以被吸盘吸收的能量。如果前一颗能量珠的头标记为m,尾标记为r,后一颗能量珠的头标记为r,尾标记为n,则聚合后释放的能量为(......
阅读全文
     用stl中的优先队列,一开始实在想不到用什么方法来写。百度后有看到用优先队列写的。有一种恍然大悟的感觉。想到定义结构体,在结构体中又定义了结构体的大小比较函数。一开始函数写出来没有对。从编译的提示中知道了要如何对函数定义。   #include <iostream> #include <string> #include <queue> using namespace std; #define MAX 10001 struct str{ //定义结构体 string name; int count; bool operator <(const struct str &a)const //结构体的大小比较函数 { if (coun......
阅读全文
  • 03月
  • 18日
综合 ⁄ 共 2011字 评论关闭
程序msg1.c用于接收消息 <span style="font-size:12px;">#include <stdio.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <stdlib.h> #include <sys/msg.h> struct my_msg_st { long int my_msg_type; char some_text[BUFSIZ]; }; int main() { int running = 1; int msgid; struct my_msg_st some_data; long int msg_to_receive = 0; //建立消息队列 msgid = msgget( (key_t)1234, 0666 | IPC_CREAT ); if( -1 ......
阅读全文
  • 02月
  • 02日
综合 ⁄ 共 1927字 评论关闭
//返回每个组件上的行数 -(NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component { if(component==0) { return 2; } else if(component==1) { if(com1==0) { return 4; } else if(com1==1) { return 3; } } else if(component==2) { if(com1==0) { switch (com2) { case 0: return 3; ......
阅读全文
  • 02月
  • 02日
综合 ⁄ 共 8380字 评论关闭
PB数据窗口导出到EXCEL函数 function f_oletoexcel(adw datawindow,title string,as_file string) Oleobject ole_objectString    s_english="ABCDEFGHIJKLMNOPQRSTUVWXYZ"String    ls_obj,ls_objs[],ls_objtag[],ls_width[],ls_value,column_name,ls_coltype,ls_rangeInteger   li_ret,i,li_grouprow,li_newgrouprow,j,row,groupflag,detailflag,sumflagLong      ll_row,ll_num,ll_column,ll_groupnum,ll_sumrowInt li_rtn=-9dec       ld_widthPointer   oldpointergroupflag=0detailflag=1sumflag=1/*-------打开EXCELL文档--......
阅读全文
  • 02月
  • 01日
综合 ⁄ 共 947字 评论关闭
Spring配置中的<context:annotation-config/> http://www.cnblogs.com/-bumblebee-/archive/2012/03/23/2413366.html   今天在配置applicationContext.xml时看到个东西: <context:annotation-config/> 他的作用是隐式地向 Spring 容器注册 AutowiredAnnotationBeanPostProcessor、 CommonAnnotationBeanPostProcessor、 PersistenceAnnotationBeanPostProcessor、 RequiredAnnotationBeanPostProcessor  这 4 个BeanPostProcessor。 例如: 如果想使用@ Resource 、@ PostConstruct、@ PreDestroy等注解就必须声明Co......
阅读全文
  • 11月
  • 20日
综合 ⁄ 共 1745字 评论关闭
Ext.encode( Mixed o ) : String: json对象转换json字符串 Ext.decode( String json ) : Object: json字符串转换json对象   实例   Html代码   <body>       <form id="form1" runat="server">       <div>       <script type="text/javascript">       function ready()       {           //再用一个示例说明下如何使用decode和encode,现在我们已经知道什么是json数据格式了,也知道它的作用和语法了           //现在我们就开始演练吧           //先使用decode方法,......
阅读全文