问题综述:

从本学期开始,北邮人论坛采用了教育网(211.68.71.66)/网通(123.127.134.62)双线路,宏福校区一直使用教育网/电信双线路。此前在宏福校区访问论坛显示的IP均为教育网IP,此后均显示电信IP。这给某些同学某些操作带来了不便(比如我们的jinkeng同学),当然还有更实际的麻烦,比如走了电信路线后,访问速度缓慢。

问题分析:

cat结果发现,宏福校区的DNS有两个,教育网(59.64.164.22)的和电信(202.106.196.115)的

caspar@caspar-ubuntu:~$ cat /etc/resolv.conf
### BEGIN INFO
#
# Modified_by: NetworkManager
# Process: /usr/bin/NetworkManager
# Process_id: 5064
#
### END INFO

nameserver 59.64.164.22
nameserver 202.106.196.115

Read the rest of this entry »

如果您第一次光临本站,欢迎订阅我的RSS feed以方便阅读。欢迎给我留言,您的留言是对本站最好的支持!
If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

6月 29th, 2008 | 36 views0x5f3759df

Quake III的代码里面找出来的一段飞速计算平方根的倒数的代码。算法是牛顿迭代法的无限逼近,亮点在标题的这个0x5f3759df,被称为“Magic Number”,这个东东让计算平方根比一般的牛顿逼近快了4倍。又据说,0x5f375a86这个数比0x5f3759df效率更高。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
float Q_rsqrt( float number )
{
  long i;
  float x2, y;
  const float threehalfs = 1.5F;
 
  x2 = number * 0.5F;
  y  = number;
  i  = * ( long * ) &y;  // evil floating point bit level hacking
  i  = 0x5f3759df - ( i >> 1 ); // what the fuck?
  y  = * ( float * ) &i;
  y  = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration
  // y  = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed
 
  #ifndef Q3_VM
  #ifdef __linux__
    assert( !isnan(y) ); // bk010122 - FPE?
  #endif
  #endif
  return y;
}

Read the rest of this entry »

6月 29th, 2008 | 23 views诡异的收费政策

我艹!

农业银行的金穗通宝卡异地刷卡消费不收手续费
1.年费 帐户内扣10元每年
2.挂失手续费收现金 10元
3.ATM本行异地取现 帐户内扣 收取交易金额的1%最低1元
4.ATM同城跨行取现 帐户内扣 2元每笔
5.ATM异地跨行取现 帐户内扣 交易金额的1%+2元每笔
6.省内异地柜台取现 收取交易金额的1%,最低1元,最高50元
7.省内异地柜台存现 收取交易金额的千分之五,最低1元,最高50元
8.省内异地柜台转帐支出 收取交易金额的千分之五,最低10元,最高50元
9.省内异地柜台转帐存入 收取交易金额的千分之五,最低1元,最高40元
10.跨省异地柜台取现 收取交易金额的1%,最低1元,最高100元
11.跨省异地柜台存现 收取交易金额的千分之五,最低1元,最高100元
12.跨省异地柜台转帐支出 收取交易金额的千分之五,最低10元,最高60元
13.跨省异地柜台转帐存入 收取交易金额的千分之五,最低1元,最高50元

Read the rest of this entry »

话说高二的时候有次吃过饭在刷碗,同学说:“听说大菠萝III要出来了诶~”于是翘首期盼。这一转眼大二都结束了……前几天流言放出,说大菠萝三真的要出了。那几天正在重温II,也没怎么在意。没想到就在没在意的时候,暴雪说话了。

转载自:http://news.softpedia.com/news/Diablo-3-Officially-Announced-Trailers-and-Screnshots-Available-88819.shtml

———————————— 分割线 ————————————

All the conspiracy theories can be put aside now because it’s here: Diablo III has been officially announced. The splash screen from Blizzard’s site has made everyone go berserk and until today everything seemed possible, even a merger between the Diablo and the Warcraft universes.

The Blizzard Invitational was to be the perfect opportunity for a Diablo III announcement as it fitted right in the timeframe, with Diablo 2 launched on June 29, 2000 and the Lord of Destruction Expansion on June 29, 2001. True, it’s a day early, but nevertheless we will be seeing Diablo III. The game looks quite good although it wasn’t as mind-blowing as I would have expected. It seems to run on the same engine as Starcraft II (especially in terms of fire effects and splash damage) and the interface remains largely the same with mana and health spheres and the same kind of gameplay we were used to. One addition I find more than interesting consists of the red orbs some enemies will leave behind; these will restore your health without you having to resort to potions.

Read the rest of this entry »

6月 28th, 2008 | 31 viewsWine M$ Office 2003 成功

都有人把M$ Office 2007给成功了,我这篇文章看起来异常火星。

当初我不 Office的原因很简单,字体。我当时不知道M$ Office自己带有一个很庞大的字体包,我怕装好后出现中文不能显示等问题,干脆就没来装了。结果装好了之后,发现效果非常好。

下面简单说一下How To,其实网上很多教程,WineHQ 官方WIKI上就有。

1. 将richedit20.dll和richedit32.dll还有msxml3.dll三个文件在winecfg里面设为native(windows).

2.上网下载以上三个文件的安装包:

http://media.codeweavers.com/pub/crossover/office/support/richedit30.exe

http://www.microsoft.com/downloads/details.aspx?displaylang=zh-cn&FamilyID=28494391-052b-42ff-9674-f752bdca9582

3.执行安装
Read the rest of this entry »

6月 25th, 2008 | 51 views好玩的Real Desktop

很早以前看到有人在触摸屏电脑上演示像在真正的桌子上拿东西一样拖拽桌面图标,可以把图标扔来扔去玩。当时配上了触摸屏的效果,显得特别炫。今天看到云鹏他们在show,也拷来看了一下。

此软件仅在Windows下运行……下载地址么,我就不给了,大家上网搜"Real Desktop"就可以了。

不知道Linux上有没有对应的软件^.^

上个图吧~

6月 18th, 2008 | 47 viewsWine 1.0 Released

最近忙着考试复习,第三次错过了第一时间发布(至少是同步发布)消息的时机,sigh~

The team is proud to announce that 1.0 is now available. This is the first stable release of after 15 years of development and beta testing. Many thanks to everybody who helped us along that long road!

While compatibility is not perfect yet, thousands of applications have been reported to work very well. Check http://appdb.winehq.org to see the details for your favorite applications.

The source is available now. Binary packages are in the process of being built, and will appear soon at their respective download locations.

15年,赞毅力,别的不说了,嗯。

6月 10th, 2008 | 100 views纯发泄,Java考点

自动调用toString方法——

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//A.java
public class A extends B
{
	public String toString()
	{
		return "A";
	}
}
 
//B.java
public class B
{
	public String toString()
	{
		return "B";
	}
}
 
//C.java
public class C
{
	public static void main(String[] args)
	{
		Object o[] = {new A(), new B()};
 
		System.out.print(o[0]);
		System.out.print(o[1]);
	}
}

Read the rest of this entry »

6月 9th, 2008 | 85 views俺也汇编一下:EMU8086

对不住各位看官了……这个EMU8086模拟器是Windows下的,还是破解的……我只是为了完成计组老师的作业而已。只是有道题比较有意思,我深深地想了好久,发现一些问题,估计老师不会认真改我的作业,我把它发上来发泄发泄,嗯。

话说EMU8086预先弄了几个PORT,其中PORT9就是实现了一个机器人的东东。具体描述如下:在一个9X6的地图内,有墙、灯、机器人三种东西。机器人碰到墙和灯都过不去,但是碰到灯的时候会自动改变灯的状态,也就是关灯或者开灯。
现在在地图上画一个地图,机器人使用给定的算法会产生死角,问怎么样消除死角。

话说原来给定的代码太弱了,一眼看出破绽:机器人碰墙只能单纯地朝一个方向转,那么碰到开了一口的闭合空间时,一旦进去就出不来了(如图),必然得改进。改进的方法有两个,一个是把行走改成随机方向,那么机器人再怎么囧最后也能走出去,可是老师不提倡随机,那么只好接着改了。

Read the rest of this entry »

6月 8th, 2008 | 103 views终于被百度收录了

今天发现侧边栏上有人在百度直接通过关键字"Ant"访问到了我的网站,顿时一惊。自己搜了一下,果然如此,而且还在第一页。这种词汇都能在百度显示我的网站,服了……再搜Caspar,第一个就是我的网站,哈。不知道百度的关键字排名是怎么弄的……

不过搜"GMAIL LAB",中文Google第一页第二条就是我的网站,百度上就出现不了。看来我的网站在Google上的人品还是比较好的……


Powered by Wordpress © 2008 - Caspar Ant | iKon Theme by TextNData | Admin | | 本站正在备案中