12
27
2011
0

密码

最近密码泄露的问题暂时还止不住啊

然后也出现了好多讨论密码的文章

多数是在假设所有运营商都是好人的前提下(他们加密,加盐,算法不可逆,各种防范措施周全),如何设置个好密码。

比如,设置多少长度,使用各种奇怪的字符等

我想,其实,如果密码可以输入中文的话,问题就解决了……

哪怕是4字密码,常用字3000的情况下,只要不是常用的词组,那就够破解者抓狂了

而且,中文输入法重码+现在的输入法都有自动排序常用字的情况,即使有键盘记录软件记录下击键全程,但因为没有个性化的码表,也无法获得真正输入的密码,至少没那么直接。

不过到时候怎么输入又是个问题了,呵呵。索性直接汉语拼音输入,长度估计也足够了。

Category: SVN怎么用? | Tags:
6
23
2011
0

从MySql 数据库迁移到MS Sql Server

 

有很多种方法
仅供参考
首先介绍最麻烦的方法

最麻烦的方法,也是最通用的方法

通用到可以从MySql迁移到任意数据库,麻烦到每一步都得亲历亲为
mysql命令行工具里有个mysqldump.exe,应该就在mysql安装目录下的bin目录下
用它可以将任意数据库dump出来
dump出来的是文本文件(但由于大小,可能你的文本编辑器永远也打不开它)
其中包含了完整的,使用ddl描述的数据库信息,以及使用sql insert语句描述的所有数据
所以,我们可以用dump文件中的信息,手工的在任意数据库中建立起tables,然后用insert语句(当然的需要适当的修改语法,有时候仅需正则表达式替换)将所有数据恢复出来
完成

简单的方法,微软的方法

微软自2010年12月起提供了mysql到sqlserver的工具
去搜索SSMA for MySQL或者Microsoft SQL Server Migration Assistant for MySQL
写此文时,版本是5.0,2011年4月推出的
支持从4.1起到6.0的mysql,同时支持2005和2008系列sqlserver
下载下安装包(.zip文件)后,会有两个文件,其中那个Extension Pack不知道是干啥的...
反正我们用SSMA for MySql 5.0.exe就是了.安装它
然后仅凭直觉使用它

我是说,在开始菜单里找到并启动Microsoft SQL Server Migration Assistant for MySQL
第一次启动会要求你给它一个license,点击弹出框的那个链接,然后用你msn的帐号去微软官方网站申请一个就是了,不要钱,然后放到指定目录下,点击reflash license按钮,它就会乖乖的工作了.
然后在File菜单里新建一个工程/项目
然后分别点击工具栏上的Connect to MySql和Connect to SQL Server按钮,其中会想你询问两个数据库的位置,密码等
成功连接后,选择MySql中希望迁移到SQL Server的数据库,右键,Migrate Data
登登~完成了
事后会出一份report,告诉你数据库下各个表的迁移情况

Category: SVN怎么用? | Tags:
4
26
2011
1

版权是怎么回事?

 

我现在完全想不明白版权这件事.
比如,借阅,分享纸质书是因为没有发生复制和或再分发,所以不侵权.
这里,分享了,但没有复制.是允许的.
所以认为版权侵权在复制时发生?
 
那么,我将我购买回来的书籍(数字信息)备份(不止一份,并备份在任意多个地点),但不分发,是否算复制,是否侵权?
如果不算侵权,那么侵权就在于是否将这些复制再分发?
 
还是说未经允许的复制和或分发都是侵权?哪怕只是备份?
 
一系列自问后,我觉得我有点想明白了
 
比如,我认为未经允许的复制和或分享就是侵权.
 
然后注意到自己在提问时使用了分享和分发
所以要明确分享和分发到概念
分享是无复制发生的
分发是由复制发生的
所以网络上的共享就是复制分发,就有可能是侵权
 
但是显然,分享由于无复制发送,其分享范围有限,最终不会使发行商受到大的影响,所以被放过
分发则可能造成,实际上,也主要打击那些造成了大规模分享,并且因此损害到发行商的实际利益时
 
但是还是有些问题没想明白
比如,在商场播放音乐为何会发生版权问题?
商场买的都是盗版音乐?
是看/听的人,实现了脑内复制,还是分发给了多个耳朵?
 
一样的KTV为何会被收版权使用费?他们购买的时候没有付这个费?
还是,版权里不包括使用权?那么买回来的书要怎么看?
 
最后,数字时代的分享总是意味着复制,那为何数字媒体仍然要使用纸媒的版权概念?
 
Category: 无聊 | Tags:
3
13
2011
0

.net 操作excel对象并保持,需要做的设置

1. Login to the server as a administrator.
2. Go to "Start" -> "Run" and enter "taskmgr"
3. Go to the process tab in task manager and check "Show Processes from all
users"
4. If there are any "Excel.exe" entries on the list, right click on the
entry and select "End Process"
5. Close task manager.
6. Go to "Start" -> "Run" and enter "services.msc"
7. Stop the service automating Excel if it is running.
8. Go to "Start" -> "Run" and enter "dcomcnfg"
9. This will bring up the component services window, expand out "Console
Root" -> "Computers" -> "DCOM Config"
10. Find "Microsoft Excel Application" in the list of components.
11. Right click on the entry and select "Properties"
12. Go to the "Identity" tab on the properties dialog.
13. Select "The interactive user."
14. Click the "OK" button.
15. Switch to the services console
16. Start the service automating Excel
17. Test you application again.

Category: SVN怎么用? | Tags:
3
7
2011
1

换arch玩玩吧

又一次的把ubuntu给玩坏了,而且又一次不知道怎么修复……

在这11.04还没多久就要出来的时间点上,真尴尬……

算了,换arch 玩玩吧,说不定会终于有些长进……

而且,我想要gnome-shell,我觉得比那ubuntu的新界面舒服的多

Category: SVN怎么用? | Tags:
3
2
2011
0

Hosting Git Repository in Windows

Hosting Git Repository in Windows

 

打开cygwin的shell

在/usr/bin目录下新建gitd

其中内容为

 

#!/bin/bash

git daemon --reuseaddr --base-path=/git --export-all --verbose --enable=receive-pack

在shell中运行命令

 

cygrunsrv   --install gitd                          \
            --path /bin/bash.exe           \
            --args /usr/bin/gitd           \
            --desc "Git Daemon"                     \
            --neverexits                            \
            --shutdown

再运行

cygrunsrv --start gitd

启动服务

如此以上,完成

Category: SVN怎么用? | Tags:
2
9
2011
2

安装rabbitMQ为windows services时的问题

在成功安装为services后,start也成功,但是rabbitmqctl.bat status却提示

Error: unable to connect to node 'rabbit@DOYLE-DING': nodedown

参考http://www.rabbitmq.com/install.html#running-windows-service中 Troubleshooting 一节中提到


This example indicates that no broker is running:

  Status of node 'rabbit@xxx' ...
  Error: unable to connect to node 'rabbit@xxx': nodedown
  diagnostics:
  - nodes and their ports on xxx: [{rabbitmqctl,...}]
  - current node: 'rabbitmqctlxxx@xxx'
  - current node home dir: [...]
  - current node cookie hash: [...]If the diagnostic line looks like this:
  - nodes and their ports on xxx: [{rabbit,...},{rabbitmqctl,...}]

and the broker logfile contains entries similar to

  Connection attempt from disallowed node...

then you should make sure the erlang cookies are the same.

所以删了%APPDATA%下的"RabbitMQ"目录

和%USERPROFILE%下的".erlang.cookie"文件,再试,还是失败

然后看到 http://www.rabbitmq.com/man/rabbitmq-service.man.html

其中有一句

(typically C:\WINDOWS\.erlang.cookie and the account that will be used to run rabbitmqctl.

去把C:\WINDOWS\.erlang.cookie复制出来,覆盖掉%USERPROFILE%下的".erlang.cookie"文件,再试,成功

Category: RabbitMQ | Tags:
1
24
2011
0

Crystal Report 内存泄漏

公司历史遗留项目,遇到内存泄漏

使用.net memory profile检查,它说是ReportDocument类中有EventHandler没有释放导致内存泄漏

用Reflector看ReportDocument里,自己写的事件只有个init啥啥啥的,也没有找到注册其他事件的地方

只知道责任在crystal report.....

 

然后网上不断翻找,不断修正关键字(得知有许多人和我有一样的烦恼),找到如下文章

(针对2003)

http://www.arquitecturadesoftware.org/blogs/hugobatista/archive/2006/02/22/236.aspx

(针对2005)

http://www.arquitecturadesoftware.org/blogs/hugobatista/archive/2006/05/23/328.aspx

应该是有用的

但是,新的问题是,使用OpenSubreport打开的子报表要怎么办...

 

update:

貌似subreport打开的对象不用去担心...

运行后,内存泄漏显然依然存在

使用.net memory profile检查,它说是CrystalDecisions.CrystalReports.Engine.FormatEngine类中有PrintPageEventHandler没有释放...

寻找是注册在哪里的...

 

update 2:

继续跑了18个小时了,内存下来了,稳定在90MB以内,看来是成功了

Category: SVN怎么用? | Tags:
1
7
2011
0

安装git-flow

为什么要安装git-flow? 参考这里

安装过程参考这里的Installing git-flow 一节

我是在windows上安装cygwin来使用git的,所以也是在此平台上安装git-flow

 

wget -q -O - https://github.com/nvie/gitflow/raw/develop/contrib/gitflow-installer.sh | sh

在cygwin中使用上述命令即可自动完成安装

一般来说是的

我遇到的问题是在安装过程中出现

Cloning into shFlags...
github.com[0: 207.97.227.239]: errno=Connection refused
fatal: unable to connect a socket (Connection refused)
Clone of 'git://github.com/nvie/shFlags.git' into submodule path 'shFlags' failed

解决办法是修改 gitflow/.git/config 文件中的地址,把git改成http即可(因为公司防火墙问题,只能用http)

这样git-flow就装好了

 

第一次运行,又出现提示

 

/usr/local/bin/git-flow: line 39: $'\r': command not found
/usr/local/bin/git-flow: line 47: syntax error near unexpected token `$'{\r''
'usr/local/bin/git-flow: line 47: `usage() {
 
这里是换行符的问题,使用工具将换行符替换成linux样式后就正常了
Category: SVN怎么用? | Tags: cygwin Git git-flow
5
12
2010
0

写MSMQ应用

决定MSMQ的版本(实际上,由windows版本决定)

决定是否要用事务队列,实际上MSMQ4.0以前版本用事务队列的同时又要部署到多机会有问题

所以要先参考这个

 http://blogs.msdn.com/johnbreakwell/archive/2007/12/11/how-do-i-get-transactional-remote-receives.aspx

然后,虽然基本结构已经搭完了,还是决定再看一下spring.net

可以支持MSMQ,并且拉高了抽象.所以决定用spring.net再搭一次结构...虽然以前都是用castle而不用spring.net的

Category: SVN怎么用? | Tags:

Host by is-Programmer.com | Power by Chito 1.2.6 beta | Theme: Aeros 2.0 by TheBuckmaker.com