现在位置: 首页 > gauss发表的所有文章
  • 08月
  • 13日
综合 ⁄ 共 4473字 评论关闭
读者可以根据自己的需要进行加壳或改写,本文权当抛砖引玉。 笔者加的壳在: http://download.csdn.net/source/1143450   VSM模型介绍: http://blog.csdn.net/Felomeng/archive/2009/03/25/4024078.aspx   using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions;   namespace Felomeng.VSMSimilarity {     class SVMModle     {         /// <summary>         /// 降维词表         /// </summary>         private List<string> re......
阅读全文
  • 08月
  • 11日
综合 ⁄ 共 2100字 评论关闭
先看代码(a.c): #include <stdio.h> int main(int argc, char* argv[]) { int a[4]={1,2,3,4}; int *ptr1=(int*)(&a+1); int *ptr2=(int*)((int)a+1); int *ptr3=(int*)(a+1); printf("a = %x, &a = %x, &a+1 = %x, (int)a+1 = %x\n", a, &a, &a+1, (int)a+1); printf("ptr1 = %x, ptr2 = %x, ptr3 = %x, &ptr1[-1] = %x\n", ptr1, ptr2, ptr3, &ptr1[-1]); printf("ptr1[-1] = %x, *ptr2 = %x, *ptr3 = %x\n",ptr1[-1],*ptr2, *ptr3); return 0; } 再看调试情况: [z......
阅读全文
  • 02月
  • 27日
综合 ⁄ 共 938字 评论关闭
传送门 题意:一棵树,问不能再一条线上的三个点有多少种。 思路:先求出能在一条线上的三个点的种类数,然后拿C(n,3)减掉就是答案。求前面的值可以枚举中点,在此之前先dfs一边,算出所有节点的子节点个数。 吐槽:多校就这么结束了。。。。 #pragma comment(linker, "/STACK:16777216") #include<iostream> #include<cstdio> #include<cstring> using namespace std; int n; int fst[100005],next[200005],node[200005],en,c[100005],pre[100005]; long long int ans,cnt,s; int dfs(int u,int p) { c......
阅读全文
  • 12月
  • 24日
算法 ⁄ 共 1203字 评论关闭
次小生成树 求最小生成树时,用数组Max[i][j]来表示MST中i到j的最大边权。 求完后,直接枚举所有不在MST中的边,替换掉最大边权的边,更新答案。 #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int maxn = 110; const int INF = 1e9; bool vis[maxn]; int d[maxn]; int pre[maxn]; int Max[maxn][maxn]; bool used[maxn][maxn]; int g[maxn][maxn]; int n, m; int Prim() { int ans = 0; memset(vis, false, sizeof vis ); memset(Max, 0, sizeof Max......
阅读全文
  • 07月
  • 26日
综合 ⁄ 共 38382字 评论关闭
/* * Copyright (c) 1999-2007 Apple Inc. All rights reserved. * * @APPLE_LICENSE_HEADER_START@ * * This file contains Original Code and/or Modifications of Original Code * as defined in and that are subject to the Apple Public Source License * Version 2.0 (the 'License'). You may not use this file except in * compliance with the License. Please obtain a copy of the License at * http://www.opensource.apple.com/apsl/ and read it before using this * file. * * The Original Code a......
阅读全文
  • 05月
  • 07日
综合 ⁄ 共 1418字 评论关闭
1、List<?>        List<?> 这样去定义的话和List<Object>是一个意思,这样就可以避免到时候从list中取值使用的时候出现运行时异常,加上泛型定义之后,在往list中添加元素的时候就必须是定义的元素,否则编译会报错,例如定义List<String>a=new ArrayList<String>();这样的话,a中就只能添加字符串,其它类型添加不了,特别作用就是避免运行时异常。 ?是泛型的通配符,代表不确定,表示没有或只有一个. 2、泛型类: public class Gen<T> {    private T t;      public Gen(T t) {      ......
阅读全文
  • 05月
  • 01日
综合 ⁄ 共 885字 评论关闭
错误编码:ORA-01033: ORACLE initialization or shutdown in progress 故障描述:因为移动了数据库文件([NAME].DMP)/日志文件等文件,导致数据库连接出现ORA-01033错误。 故障分析:网上有一种常见的说法是该类故障通常是由于移动文件而影响了数据库日志文件出现损坏而导致的无法正常进行IO操作而引起的错误。ORACLE将识别为数据库未装载完成而导致出现如上错误。 故障特征:使用命令行sqlplus或PL/SQL Developer均无法打开数据库。但是可以使用sys用户以sysdba的身份登录系统 处理步骤: 1. 在 ‘开始’-->‘运行’执行cmd 2. ......
阅读全文
  • 04月
  • 30日
综合 ⁄ 共 203字 评论关闭
  很多时候你会发现,当输入命令以后出现的时候乱码,如何解决呢?  因为linux支持多国语系,若有可能,屏幕会以该支持语系输出,但是终端接口(terminal)在默认情况下,无法以中文编码输出,这个时侯,需要将支持语系改为英文,才能显示。    输入:LANG=en         LANGUAGE=en         LC_All=en         LC_CTYPE=en         LC_TIME=en
阅读全文
  • 04月
  • 17日
综合 ⁄ 共 2119字 评论关闭
WHAT IS EABI?     GNU EABI is a new application binary interface (ABI) for Linux. It is part of a new family of ABIs from ARM® Ltd. known in the ARM-Linux community as EABI (or sometimes Embedded ABI). Eurotech was the first to make available a port of Debian using this new ABI for ARM systems.   WHY SWITCH TO EABI?     The new EABI:      Allows use of optimized hardfloat functions with the system's softfloat librariesUses a more efficient syscall convention Will be more compatible with f......
阅读全文
  • 04月
  • 16日
综合 ⁄ 共 245字 评论关闭
1.缩腹走路法:   首先要学习“腹式呼吸法”:吸气时,肚皮涨起;呼气时,肚皮缩紧。对于练瑜伽或练发声的人而言,这是一种必要的训练。它有助于刺激肠胃蠕动,促进体内废物的排出,顺畅气流,增加肺活量。   方法:平常走路和站立时,要用力缩小腹,配合腹式呼吸,让小腹肌肉变得紧实。刚开始的一两天会不习惯,但只要随时提醒自己“缩腹才能减肥”,几个星期下来,不但小腹趋于平坦,走路的姿势也会更迷人。 2.慢跑法:每天慢跑30分钟左右 3.饮食方面: 早餐时吃燕麦片,午餐正常吃,晚饭少吃点,或者吃点水果或者黄瓜
阅读全文
  • 03月
  • 19日
综合 ⁄ 共 10913字 评论关闭
相关资源 (转自: http://yuanzhifei89.iteye.com/blog/1166835)2D中如何判断一点在另一个点的那个方位: http://blog.csdn.net/rabbit729/article/details/4424929 游戏开发书籍推荐: http://rightmost.blog.163.com/blog/static/18058539920112223202311/ http://blog.csdn.net/hsz8250/article/details/639771 地图绘制算法: http://bbs.chinaunix.net/viewthread.php?tid=1669931 如何成为android游戏程序员: http://www.microdu.com/thread-3235-1-1.html silverlight c#游戏开发相关文章: http://www.silverlightchina.......
阅读全文
  • 02月
  • 05日
综合 ⁄ 共 682字 评论关闭
不多说,上代码 package com.lyj; import java.util.HashMap; import java.util.Map; import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; public class CacheSystemDemo { private static Map<String, Object> map = new HashMap<String, Object>(); private static ReadWriteLock rwl = new ReentrantReadWriteLock(); public static void main(String[] args) { getData("h"); } public static Object getData(String......
阅读全文