现在位置: 首页 > manganese发表的所有文章
  • 09月
  • 09日
综合 ⁄ 共 1082字 评论关闭
查看nginx当前版本 通过nginx -V 命令就可以查看当前的版本,已经当前版本安装时候的一些nginx命令 [root@localhost sbin]# ./nginx -V nginx version: nginx/1.2.9 built by gcc 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) configure arguments: --prefix=/nginx_instal       1.下载新版本的nginx 1.44,解压后,进入该目录 使用上文同样的configure进行配置 #./configure --prefix=/nginx_instal #make   2.备份之前旧的nginx文件,这里只需要备份nginx 这个文件即可 [root@localhost sbin]# mv ./nginx ./nginx.old   3.复制新的ng......
阅读全文
  • 08月
  • 19日
综合 ⁄ 共 703字 评论关闭
题目链接:hdu 3172 Virtual Friends 题目大意:给定一个社交网络的关系,确定朋友的朋友是朋友,每次给定两个人是朋友,要相应输出该社交圈有多少人。 解题思路:并查集水题。 #include <cstdio> #include <cstring> #include <string> #include <map> #include <iostream> #include <algorithm> using namespace std; const int maxn = 100005; int N, M, far[maxn], cnt[maxn]; map<string, int> G; inline void check(string s) { if (G.count(s)) return; ......
阅读全文
  • 10月
  • 18日
综合 ⁄ 共 1133字 评论关闭
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be used once in the combination. 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 10,1,2,7,6,1,5 and target 8......
阅读全文
  • 05月
  • 12日
综合 ⁄ 共 2035字 评论关闭
  1.输入网址[url]https://developer.apple.com/[/url]或者直接输入https://daw.apple.com/cgi-bin/WebObjects/DSAuthWeb.woa/wa/login?appIdKey=cdd9076ec329293eceabffdaf0aa8bb31fac601da0e97f2f78bc379783c46096&path=%2F%2Fmembercenter%2Findex.action 进入 2.iOS Provisioning Portal Provision & test your apps on your iPhone, iPad & iPod touch. 选择上面的是证书之类的 iTunes Connect Submit and manage your apps on the App Store. 这是发布应用管理应用的选择项 3.首先要创建应用的Provis......
阅读全文
  • 05月
  • 12日
综合 ⁄ 共 5573字 评论关闭
typedef enum {     requestUseGet       = 0,     requestUsePost,     requestUsePut,     requestUseDelete,     requestUseHead,     requestUseTrace,     requestUseConnect,     requestUseOptions }RequestMethod; An HTTP request is a class consisting of HTTP style requests, request lines, request methods, request URL, header fields, and body content. The most common methods that are used by a client in an HTTP request are as follows:-1) GET:- Used when the client is requesting a resource o......
阅读全文
  • 04月
  • 24日
综合 ⁄ 共 767字 评论关闭
#include <iostream> #include <cstdio> #include <cstring> using namespace std; #define INF 0x3f3f3f3f typedef long long LL; const int maxn = 110; int g[maxn][maxn]; LL path[maxn][maxn]; int n, m; int main() { memset(g, 0x3f, sizeof(g)); scanf("%d%d", &n, &m); int u, v, w; for(int i = 1; i <= m; i ++) { scanf("%d%d%d", &u, &v, &w); g[u][v] = w; g[v][u] = w; path[u][v] = path[v][u] = 1; } for(int......
阅读全文
  • 04月
  • 23日
综合 ⁄ 共 1328字 评论关闭
一、嵌入式操作系统列表 Windows CE VxWorks 公司采用Moto的芯片 pSOS QNX Palm OS OS-9 LynxOS   二、VxWorks和Linux的一些区别      vxworks  linux   内核结构    微内核,内核只提供了基本的服务,如:任务管理,内存管理,中断处理等  宏内核,除了基本的服务,内核还包括文件系统,网络协议等 运行模式  应用程序运行在“实模式”下,无用户模式和内核模式之分  采用“保护模式”,用户进程、线程运行在用户模式下,内核线程运行于内核模式 内存访问和内存保护  内核采用实存储管理方式,所有任务运行于同......
阅读全文
  • 04月
  • 09日
综合 ⁄ 共 4045字 评论关闭
IUSR_计算机名和IWAM_计算机名帐户的用户名和密码 IUSR_ 计算机名 和 IWAM_ 计算机名 帐户的用户名和密码存储于以下三个位置:*Internet Information Server (IIS) 配置数据库 *域用户管理器 (Windows NT) 或本地用户和组 (Windows 2000) *Microsoft Transaction Server (Windows NT) 或组件服务 (Windows 2000) 如果这三个位置的用户名和/密码不同步,将出现下述问题:当您浏览现有的 Active Server Pages (ASP) 页时,浏览器可能返回"HTTP 500 - Internal server error"或"Server Application Error"的错误信息。若要解决此问......
阅读全文
  • 03月
  • 21日
综合 ⁄ 共 4831字 评论关闭
有时候难免需要直接调用Shell命令来完成一些比较简单的操作,比如mount一个文件系统之类的。那么我们使用Python如何调用Linux的Shell命令?下面来介绍几种常用的方法: 1. os 模块 1.1. os模块的exec方法族 Python的exec系统方法同Unix的exec系统调用是一致的。这些方法适用于在子进程中调用外部程序的情况,因为外部程序会替换当前进程的代码,不会返回。( 这个看了点 help(os)  --> search "exec" 的相关介绍,但是没太搞明白咋使用) 1.2. os模块的system方法 system方法会创建子进程运行外部程序,方法只返回外部程序......
阅读全文
  • 01月
  • 29日
综合 ⁄ 共 657字 评论关闭
以下代码是虚拟机源码上摘录下来希望对正在学ARM指令的朋友有帮助,接下来会把ARM的指令都用C语言整理下上传。 void i_mov() {  uint32_t icode = ICODE;  uint32_t S;  uint32_t cpsr;  uint32_t Rd;  int rd;    if(!check_condition(icode)) {   return;  }    rd = (icode >> 12)&0xf;  cpsr=REG_CPSR;  cpsr&= ~(FLAG_N | FLAG_Z | FLAG_C);  cpsr |= get_data_processing_operand(icode);   Rd = AM_SCRATCH1;  dbgprintf("MOV value %08x to reg %d \n",Rd,rd);  ARM9_WriteReg(Rd,rd);  S=testbit(20,icode......
阅读全文
  • 01月
  • 14日
综合 ⁄ 共 2751字 评论关闭
Warm up 2 Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Problem Description   Some 1×2 dominoes are placed on a plane. Each dominoe is placed either horizontally or vertically. It's guaranteed the dominoes in the same direction are not overlapped, but horizontal and vertical dominoes may overlap with each other. You task is to remove some dominoes, so that the remaining dominoes do not overlap with each other. Now, tell me the maximum number of dom......
阅读全文
  • 12月
  • 25日
综合 ⁄ 共 12719字 评论关闭
共享内存(上) 共享内存可以说是最有用的进程间通信方式,也是最快的IPC形式。两个不同进程A、B共享内存的意思是,同一块物理内存被映射到进程A、B各自的进程地址空间。进程A可以即时看到进程B对共享内存中数据的更新,反之亦然。由于多个进程共享同一块内存区域,必然需要某种同步机制,互斥锁和信号量都可以。 采用共享内存通信的一个显而易见的好处是效率高,因为进程可以直接读写内存,而不需要任何数据的拷贝。对于像管道和消息队列等通信方式,则需要在内核和用户空间进行四次的数据拷贝,而共享内存则只拷贝两次数据[1]:......
阅读全文