现在位置: 首页 > faille发表的所有文章
  • 03月
  • 09日
移动开发 ⁄ 共 3268字 评论关闭
待解决和待学习的Android技术问题: 横竖屏切换生命周期的执行; startActivityForResult的使用; 地图上标记路线、搜索内容; Properties的使用。 View有两对width,height一对可以用getMeasureWidth(),getMeasureHeight()获取,另一对可以用getWidth(),getHeight()获取。 Android命令行打包http://www.cnblogs.com/jk1001/archive/2010/08/05/1793216.html   Android 代码混淆: 参考1:http://blog.csdn.net/zengyangtech/article/details/6127600 百科 参考2:http://blog.csdn.net/laoyao_moyan/article/details/7353768 错误......
阅读全文
  • 02月
  • 25日
综合 ⁄ 共 2023字 评论关闭
题目链接~~> 做题感悟:在比赛遇到这题本来是应该高兴的,但是做这题时剩下半个小时左右,时间是很充足(当时想到用多重背包解决),当时就不淡定了调试了好久也没调出来(写给不淡定的自己)。 解题思路:1)多重背包  这题一看就知道必须从后往前找(后面的不会对前面的造成影响),so 想到处理成多重背包,切记体积为重量。                   2 ) 贪心  ( 很经典)  把每一点的单位重量从当前点到终点的总价值算出来(即:当前点的单位重量价值),那么只要排一下序单位价值从小到达依次贪心就可以。 代码(多重背包): #inc......
阅读全文
  • 02月
  • 13日
综合 ⁄ 共 1002字 评论关闭
走格子和算面积合二为一了,不过没有POJ上另外一道走格子的题恶心,名字叫宇航员,至今没ac,wa的代码还躺在我桌面上= =。 自认为这篇代码写得比较工整,突然想搞计算几何了~ AC代码: #include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> #include <string> #define MAXN 1000000 using namespace std; //8北, 2南, 6东, 4西, 9东北, 7西北, 3东南, 1西南 const int dir[10][2] = {{0, 0}, {-1, -1}, {0, -1}, {1, -1}, {-1, 0}, {0, 0}, {1, 0}, {-1, 1}, {0, 1}, ......
阅读全文
  • 11月
  • 04日
操作系统 ⁄ 共 4204字 评论关闭
一、变量分类 Linux 的变量可分为两类:环境变量和本地变量 环境变量,或者称为全局变量,存在与所有的shell 中,在你登陆系统的时候就已经有了相应的系统定义的环境变量了。Linux 的环境变量具有继承性,即子shell 会继承父shell 的环境变量。 1) 定义环境变量 格式: export variable-name=value (与本地变量的定义相比,多了一个export关键字) 例子:[root@chinaitlab /root]# export DOMAIN="chinaitlab.com" [root@ chinaitlab shell]# vi testenv.sh #!/bin/bash echo $DOMAIN [root@chinaitlab shell]# chmod +x te......
阅读全文
  • 10月
  • 05日
综合 ⁄ 共 1048字 评论关闭
创建共享内存: #include <iostream> #include <string> using namespace std; #include <boost/interprocess/managed_shared_memory.hpp> #include <boost/interprocess/mapped_region.hpp> using namespace boost::interprocess; int main(int argc, char*argv[]) { //create shared memory object shared_memory_object share_obj(create_only, "named_obj", read_write); //set the size of the shared memory share_obj.truncate(1024); //map the shared memory to current process ma......
阅读全文
  • 08月
  • 21日
综合 ⁄ 共 6456字 评论关闭
http://stackoverflow.com/questions/6993325/uidevice-uniqueidentifier-deprecated-what-to-do-now;;;; On March 21st Apple notified developers that as of May 1st, apps that accessed UDIDs would no longer be approved and that developers should switch over to using “Vendor or Advertising identifiers introduced in iOS 6″. We had been warned that uniqueIdentifier was going away, and now Apple is giving us not just one but two alternatives to use. But which one should you use and when is it ......
阅读全文
  • 06月
  • 07日
综合 ⁄ 共 2545字 评论关闭
http://www.cnblogs.com/marky/archive/2012/05/13/2498263.html 在桌面窗体应用程序 ,服务调用成功 ,上传文件成功了,本以为WM中也是一样啊 依葫芦画瓢,靠,没想到啊。。。。。。。。。。。。 项目->属性->常规->公共语言库支持,靠 没有这一选项。。。难道不能调用服务了在MFC native c++ 中?怎么办 怎么办 怎么 办  ?慌了 网上看了 用gsoap  gsoap?什么东西啊 ,没见过,又折腾了好久 1 Gsoap 使用   下载gsoap (gsoap-2.8)(版本 for CE DVICE改进版)址(:http://sourceforge.net/projects/gsoap2/) 解压(E......
阅读全文
  • 05月
  • 11日
综合 ⁄ 共 3990字 评论关闭
(转载) 前面几篇写了如何安装jdk 和 tomcat,搞web开发还差个数据库吧,好了现在就介绍一下mysq的安装吧, 一、前期准备:     1.由于redhat Enterprise 5 中自带一个mysql的版本,如果在安装linux前未选择mysql的安装此步就可跳过,因为我当时安装了现在将其卸载 ,步骤如下:        a. 查找已安装的myslq 版本:         #rpm  -qa | grep  mysql (注意大小写,如果mysql 不行就换MySQL)         在屏幕上将显示已安装的mysql包名如:mysql-5.0.22-2.1.0.1 ;        b. 将搜索出的包名卸载:         #rpm -e  --nodeps mysql......
阅读全文
  • 05月
  • 09日
综合 ⁄ 共 141字 评论关闭
在装ucenter的时候出现这个问题,搞了好长时间也没弄好,网上有很多方法都不管用,后来终于找到了解决方法: 打开httpd.conf (这个是Apache的配置文件), 加入: LoadFile "你的PHP目录/libmysql.dll" 然后重启http服务. 安上面的做了以后就一切正常了
阅读全文
  • 04月
  • 30日
综合 ⁄ 共 27456字 评论关闭
转自:http://www.360doc.com/content/07/0904/21/24120_719291.shtml   Apache的mod_rewrite是提供了强大URL操作的杀手级的 模块,可以实现几乎所有你 梦想的URL操作类型,其代价是你必须接受其复杂性,因为mod_rewrite的主要障碍就是初学者不容易理解和运用,即使是Apache专家有时也会 发掘出mod_rewrite的新用途。 换句话说:对mod_rewrite,或者是打退堂鼓永不再用,或者是喜 欢它并一生受用。 ReWrite可以应用在以下方面或者解决以下问题: URL的 规划 规范的URL 说明: 在有些网站服务器上,一个资源会......
阅读全文
  • 04月
  • 09日
综合 ⁄ 共 14753字 评论关闭
Introduction This article is based upon code from the MSDN Cold Rooster Consulting case study. Included in part of the CRC Rich Client is support for file icons, something I wanted to do myself. This article and classes are the result of my attempts to use the MSDN code in my own application. The MSDN article explains how functions from Shell32 and User32 were wrapped in detail, but here's a short clip from the article: "Interoperability with interfaces exposed by COM objects and the .N......
阅读全文
Problem Description The WHU ACM Team has a big cup, with which every member drinks water. Now, we know the volume of the water in the cup, can you tell us it height? The radius of the cup's top and bottom circle is known, the cup's height is also known. Input The input consists of several test cases. The first line of input contains an integer T, indicating the num of test cases. Each test case is on a single line, and it consists of four floating point numbers: r, R, H, V, representing......
阅读全文