现在位置: 首页 > Thatadofody发表的所有文章
  • 09月
  • 04日
综合 ⁄ 共 1432字 评论关闭
Series 1 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 0    Accepted Submission(s): 0 Problem Description Let A be an integral series {A1, A2, . . . , An}. The zero-order series of A is A itself. The first-order series of A is {B1, B2, . . . , Bn-1},where Bi = Ai+1 - Ai. The ith-order series of A is the first-order series of its (i - 1)th-order series (2<=i<=n - 1). Obviously, the (n - 1)th-order ......
阅读全文
  • 02月
  • 15日
综合 ⁄ 共 2418字 评论关闭
B. Painting Pebbles time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output There are n piles of pebbles on the table, the i-th pile contains ai pebbles. Your task is to paint each pebble using one of the k given colors so that for each color c and any two piles i and j the difference between the number of pebbles of color c in pile i and number of pebbles of color c in pile j is at most one. In other words, let's say that......
阅读全文
《深度搜索C++对象模型》的一些学习纪要: 原文链接:ordeder   http://blog.csdn.net/ordeder/article/details/26396989 一成员变量篇 0. 类的编译中,先编译成员变量和成员函数的额声明,成员函数的定义在类声明结束后再处理; 1. 类中,多个代码区块public或者private最终会被按区块统一,然后编译过程中,后定义的成员变量地址高于定义的成员变量; 2. 静态变量在程序启动时初始化,存储的位置在于程序的全局数据段中; 3. 继承中,基类保持者自己在内存对象的格局,对象格局的填充位不被派生类的成员所格局占用(防止不必......
阅读全文
  • 05月
  • 02日
综合 ⁄ 共 1779字 评论关闭
下载地址: http://code.google.com/p/protobuf/downloads/list 安装命令 tar -xzf protobuf-2.5.0.tar.gz  cd protobuf-2.5.0  ./configure --prefix=$INSTALL_DIR  make   make check  make install 然后进入python目录, python setup.py install --prefix=$INSTALL_DIR 写proto文件 package lm; message Person {         required int32  id = 1;         required string str = 2;         optional int32  opt = 3; } 保存为 testp.testpb.proto 编译指令 protoc -I=/home/workspace/testprob --python_out=/home/wo......
阅读全文
  • 05月
  • 01日
综合 ⁄ 共 349字 评论关闭
有的android应用程序只是在后台运行,同时不允许用户删除该应用程序,自然就不能出现在应用管理里面,方法如下: 在AndroidManifest.xml文件中把main Activity例如: <activity android:name="com.himedia.playrecordapp.MainActivity" android:launchMode="singleTask" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />//注释掉,就可以了 ......
阅读全文
  • 04月
  • 11日
综合 ⁄ 共 1027字 评论关闭
基于TI公司的DM642 DSP的H.264编解码算法例程 http://www.tichinese.com/Soft/C6000/Code/200909/1069.html T264是中国的视频编码自由组织合力开发的264编解码程序 http://www.tichinese.com/Soft/Video/H26X/200909/1070.html 最新视频压缩算法--H.264算法(可直接移植到达芬奇DM6446平台) http://www.tichinese.com/Soft/DaVinci/Code/200909/1066.html H.264资料集合 http://www.tichinese.com/Soft/Video/H26X/200909/1068.html DM642的MPEG4编码 http://www.tichinese.com/Soft/C6000/Code/200909/1067.html DM642上的H.264源......
阅读全文
  • 04月
  • 07日
综合 ⁄ 共 2462字 评论关闭
  procedure GetBaseClassInfo(AClass: TObject; AStrings: TStrings);{ This method obtains some basic RTTI data from the given object and adds that  information to the AStrings parameter. }var  ClassTypeInfo: PTypeInfo;  ClassTypeData: PTypeData;  EnumName: String;begin  ClassTypeInfo := AClass.ClassInfo;  ClassTypeData := GetTypeData(ClassTypeInfo);  with AStrings do  begin    Add(Format('Class Name:     %s', [ClassTypeInfo.Name]));    EnumName := GetEnumName(TypeInfo(TTypeKind), Integer(C......
阅读全文
  • 04月
  • 04日
综合 ⁄ 共 2824字 评论关闭
package cn.com.sxp; import android.app.Activity; import android.os.Bundle; import android.util.Log; public class OnrestoreActivity extends Activity { private static final String TAG = OnrestoreActivity.class.getSimpleName(); private int count = 0; private boolean thread; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (null != savedInstanceState) { int preSavedInt = saved......
阅读全文
  • 04月
  • 03日
综合 ⁄ 共 1027字 评论关闭
找规律,模拟,计算压缩; 最大公因数,最小公倍数 #include <iostream> #include <cstdio> #include <cmath> #include <cstring> #include <algorithm> using namespace std; typedef long long ll; /** ∑abs(i%A - i%B) 0<=i<N */ ll getGCD ( ll a, ll b ) { for ( int t; b; ) { t = a % b; a = b; b = t; } return a; } ll getLCM ( ll a, ll b ) { return a * b / getGCD ( a, b ); } ll mabs ( ll a ) { return a > 0 ? a : ......
阅读全文
  • 02月
  • 14日
综合 ⁄ 共 50字 评论关闭
http://blog.csdn.net/xunyn/article/details/8302787
阅读全文
  • 02月
  • 02日
综合 ⁄ 共 497字 评论关闭
UISearchBar是个很不错的东东,集成了搜索输入框和搜索按钮,使用起来也灰常方便。 / *搜索按钮* / - (无效)searchBarCancelButtonClicked的:(UISearchBar *)搜索栏 自doSearch:搜索栏]; } / *键盘搜索按钮* / - (无效)searchBarSearchButtonClicked的:(UISearchBar *)搜索栏 [搜索栏resignFirstResponder]; 自doSearch:搜索栏]; } / *搜索* / - (空)doSearch:(UISearchBar *)搜索栏{ 的NSString *电子邮件searchBar.text; ... } UISearchBar上按钮的默认文字为取消“,如果想改为其他文字请调用一下代码......
阅读全文
  • 12月
  • 26日
综合 ⁄ 共 281字 评论关闭
<html> <head> <script type="text/javascript" src="/jquery/jquery.js"></script> <script type="text/javascript"> var $file; $(document).ready(function(){ $(":file").live("change",function(){ this.outerHTML += ''; this.value =""; }); }); </script> </head> <body> <input type="file" id="file"/> </body> </html>
阅读全文