现在位置: 首页 > JosieGeorge发表的所有文章
  • 11月
  • 11日
综合 ⁄ 共 249字 评论关闭
水题 #include <iostream> using namespace std; int main(int argc, char const *argv[]) { int t; cin >> t; while(t--) { string n, m; cin >> n >> m; int temp = 0; for(int i = 0; i < m.size(); i++) { temp = m[i] - 48 + temp*10; temp %= 11; } if(n==m&&temp==0) cout << "YES" << endl; else cout << "NO" << endl; } return 0; }
阅读全文
  • 03月
  • 19日
综合 ⁄ 共 4447字 评论关闭
PS:内容翻译自Quora 我试着在这里说些想法。矩阵分解技术和模型组合方法可能是与Netflix Prize有关最多被讨论的算法,但我们也使用了很多其他的洞见。 Normalization of Global Effects 全局效应的正常化 假设Alice给《盗梦空间》打4分。我们可认为这个评分由以下几部分组成: 基准分(比如所有用户给电影打的分的均值是3.1分)  Alice的专门效应(比如爱丽丝倾向于打出比平均值低的分,因此她的打分比我们正常所期望的要低0.5分)  盗梦空间的专门效应(比如盗梦空间是很棒的电影,因此它的分值比我们所希望的要高0.7分) Alic......
阅读全文
  • 03月
  • 17日
综合 ⁄ 共 1376字 评论关闭
Go to Tools>External Tools and choose Add then give it a good title "NVidia perfHUD". In the Command box, point it to the NVidia perfHUD exe (not your exe). You will want to pass your exe as an argument, so in the Arguments box enter $(TargetPath) (no quotes). You will also probably need to set the Initial Directory to $(TargetDir) or $(ProjectDir). Then, use the "Move Up" button to move the new tool to the top of the list. Click Ok. Now, add it to the Debug toolbar (where it logicall......
阅读全文
  • 02月
  • 22日
综合 ⁄ 共 1041字 评论关闭
题目链接~~> 做题感悟:比赛时做完第三题就关门了,回去想了一下也没想到好的方法,感觉弱爆了。 解题思路:                 官方题解: 代码: #include<iostream> #include<sstream> #include<map> #include<cmath> #include<fstream> #include<queue> #include<vector> #include<sstream> #include<cstring> #include<cstdio> #include<stack> #include<bitset> #include<ctime> #include<string> #include<iomanip> #include......
阅读全文
  • 06月
  • 29日
综合 ⁄ 共 708字 评论关闭
1.1.1 安装Oracle数据库服务端 按照安装向导,正确安装Oracle 9i。 按照默认选项,点击下一步,即可。   图 2 2 Oracle 安装向导 - 欢迎使用 图 2 3 Oracle 安装向导 - 文件定位 这里,需注意Oracle的安装文件路径不能包含空格和中文名。默认安装路径是D:/oracle/ora92,这里建议使用这个安装路径。(安装) 图 2 4 Oracle 安装向导 - 可用产品    可用产品中,如果安装服务器选择第一项“Oracle9i Database 9.2”。 如果仅安装客户端,那么选择第三项“Oracle9i Client 9.2”。 图 2 5 Oracle 安装向导 - 安装类型    如......
阅读全文
  • 06月
  • 09日
综合 ⁄ 共 597字 评论关闭
RE管理器播放音乐也是采用的这种方式 代码如下: Intent intent = new Intent(); intent.setAction(android.content.Intent.ACTION_VIEW); File newFile = new File(path); Uri uri = Uri.fromFile(newFile); intent.setDataAndType(uri, "audio/*"); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP); startActivity(intent); path参数为绝对路径。 可以通过系统media 数据库 获取 到。 mCR = mContext.getContentResolver(); String[] ......
阅读全文
  • 04月
  • 16日
综合 ⁄ 共 1164字 评论关闭
Linux和UNIX都拥有一个非常实用的工具--UNIX套接字,或称为本地套接字,它可以被用在进程间通讯(IPC)当中。UNIX套接字的运转机制和Internet套接字类似,主要的区别UNIX套接字只能用在一台计算机中,而Internet套接字则可以在不同的计算机之间使用。UNIX套接字定址的方式是作为本地文件系统里的一个文件。 你可能会奇怪为什么要使用UNIX套接字而不使用常规的Internet套接字呢?或许最大的原因就是安全和速度了。无论何时,当你打开任何Internet套接字的时候,你可能就帮远程的黑客打开了入侵之门。 打开UNIX套接字和打开......
阅读全文
  • 02月
  • 21日
综合 ⁄ 共 986字 评论关闭
题目大意:在二维坐标系上y=k是分界线,y>k的部分是n个敌人,y<k的部分要安置T个狙击手。每个狙击手的射程是D。问安置好这些狙击手之后,在能将所有的敌人都打掉的情况下最大化狙击手到y=k的距离。 思路:二分答案。然后确定每个敌人可被攻击到的x的区间范围,然后对这些区间做区间覆盖统计需要安狙击手的个数。 struct pp{ ll x,y; }pnt[maxn]; struct ppt{ ll st,ed; }axis[maxm]; bool cmp(ppt a,ppt b){ return a.ed<b.ed; } ll k,n,s,d; bool calc(ll mid){ memset(axis,0,sizeof(axis)); ......
阅读全文
  • 02月
  • 07日
综合 ⁄ 共 3944字 评论关闭
  141. 如何快速编译所有视图? SQL >SPOOL VIEW1.SQL SQL >SELECT ‘ALTER VIEW ‘||TNAME||’ COMPILE;’ FROM TAB; SQL >SPOOL OFF 然后执行VIEW1.SQL即可。 SQL >@VIEW1.SQL;   142. ORA-01555 SNAPSHOT TOO OLD的解决办法 增加MINEXTENTS的值,增加区的大小,设置一个高的OPTIMAL值。   143. 事务要求的回滚段空间不够,表现为表空间用满(ORA-01560错误),回滚段扩展到达参数 MAXEXTENTS的值(ORA-01628)的解决办法. 向回滚段表空间添加文件或使已有的文件变大;增加MAXEXTENTS的值。   144. 如何加......
阅读全文
  • 02月
  • 06日
综合 ⁄ 共 2880字 评论关闭
Performance Hints How to store different attributes of a vertex We described the two most common ways of storing vertex attributes— array of structures and structure of arrays. The question to ask is which allocation method would be the most efficient for OpenGL ES 2.0 hardware implementations. The answer is array of structures. The reason is that the attribute data for each vertex can be read in sequential fashion and so will most likely result in an efficient memory access pattern. A d......
阅读全文
2014/4/18: [Poj3264][Bzoj1699]Balanced Lineup(RMQ) 2014/4/19 [Bzoj1012][JSOI2008]最大数maxnumber [NOI2004]郁闷的出纳员 [Bzoj3224]Tyvj 1728 普通平衡树 2014/4/20 [Bzoj1862/1056]GameZ游戏排名系统 [Bzoj1588][HNOI2002]营业额统计 2014/4/21 [Bzoj1602][Usaco2008 Oct]牧场行走 2014/4/22 [Bzoj1041][HAOI2008]圆上的整点 [Bzoj1660][Poj3250][Usaco2006 Nov]Bad Hair Day [Bzoj1657][Usaco2006 Mar]Mooo 奶牛的歌声 2014/4/27 [Bzoj1192][HNOI2006]鬼谷子的钱袋 [Poj2398]Toy Storage [Poj2318]TOYS 2014/4/29 [Bzoj103......
阅读全文
  • 10月
  • 31日
综合 ⁄ 共 2503字 评论关闭
一 C++程序内存分配 1) 在栈上创建。在执行函数时,函数内局部变量的存储单元都在栈上创建,函数执行结束时这些存储单元自动被释放。栈内存分配运算内置于处理器的指令集中,一般使用寄存器来存取,效率很高,但是分配的内存容量有限。 2) 从堆上分配,亦称动态内存分配。程序在运行的时候用malloc或new申请任意多少的内存,程序员自己负责在何时用free或delete来释放内存。动态内存的生存期由程序员自己决定,使用非常灵活。 3) 从静态存储区域分配。内存在程序编译的时候就已经分配好,这块内存在程序的整个运行期间都存......
阅读全文