- 博客(15)
- 资源 (4)
- 问答 (1)
- 收藏
- 关注
原创 python调用dll 出现[Error 193]
装了好几个版本的python,搞乱了,卸载后重装了,但跑之前的代码时出了WindowsError: [Error 193] %1 不是有效的 Win32。这其实因为python位数和dll位数不一样导致的,dll是32位的,而python是64位的,所以不行。解决办法之一是将dll编译成64位的,另一办法是装个32位的python。
2015-05-27 11:50:45 9015
原创 浅谈 sqlserver 和 mysql存储过程、函数的区别
公司之前用的是windows服务器,数据库也是sqlserver,现在说微软东西太贵了,要转向linux + mysql,但这之前先要测试一下性能,看怎么样的服务器才能满级要求,首先是数据库服务器。我之前对数据库也就只会select、insert,趁此机会学习给了一些sqlserver的测试表,CREATE TABLE [dbo].[mytest]( [id] [bigint] ID
2015-05-26 14:56:39 2597
原创 用SQLyog和NativeSQL将数据从sqlserver导入到mysql
公司的数据库要从sqlserver换到mysql,首先要选一台合适的服务器,给了一份用现在sqlserver中导出的全部数据,让我们用这些数据去测试。刚开始我以为可以将sqlserver导出的.bak直接导入mysql,试了多次之后不行,参考了别的方法:.bk导入sqlserver,sqlserver导入mysql。第一步,将.bak导入到sqlserver:
2015-05-21 18:04:27 1843
原创 CentOS安装mysql并授权远程登录
1,安装mysql rpm -ivh mysql-community-release-el7-5.noarch.rpm
2015-05-20 16:34:26 522
原创 install google-chrome on CentOS 7
vim /etc/yum.repos.d/CentOS-Base.repo 根据你的系统增加一个节点 32-bit [google] name=Google - i386 baseurl=http://dl.google.com/linux/rpm/stable/i386 enabled=1 gpgcheck=1 gpgkey=https://dl-ssl.goog
2015-05-15 22:57:03 722
原创 Python:Tkinter之Radiobutton
最近才刚开始学pythonGUI,虽然用Python做GUI肯定不是明智之举,但为了学习,还是了解了解,今天先来看看 Radiobutton,没什么可说的,直接贴代码。from Tkinter import * def sel(): selection = "You selected the option " + str(var.get()) label.c
2015-05-15 18:38:27 9234
原创 CentOS设置打开终端快捷键
今天把电脑换成CentOS了,用的时候有个很不方便的地方,就是每次打开终端都要回到桌面,不像WIN一样,直接win + R,搜索之后,原来需要自己设定。
2015-05-12 16:28:49 1305
原创 CentOS删除多余的启动项
更新内核后,旧的内核还在,而且启动项上也有,看起来不好看,所以想办法去掉多余的启动项,这儿介绍两种方法,一种方法是直接删除内核,另一种是修改启动项,只是让它不显示。 第一种:删除旧内核: 首先要知道自己当前的内核版本,执行 uname -a 我的显示是:
2015-05-12 15:59:40 1421
原创 CentOS 7 安装VirtualBox
昨天给centos6.5装VirtualBox,装了一天也没,今天闲着没事,试试centos7,结果成功了 PS 小弟也是初学linux,许多地方只是找到了解决方法,但不知道为什么,莫见怪O(∩_∩)O哈!1、安装centos7,这个就不说了,centos7的安装比旧版本简单的多。2、连网设置,刚装完centos后用ifconfig查看发现没有ip地址,解决办法: cd /e
2015-05-11 17:44:33 3650 1
原创 刚装完CentOS后连不上网
1、刚安装好centos后连不上网:解决办法:切换到root目录:cd /etc/sysconfig/network-scripts/vi ifcfg-eth0 DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes NM_CONTROLLED=yes保存退出。3.重启网络/etc/init.d/network r
2015-05-11 13:40:59 569
原创 Python线程间的同步与互斥
最简单来说,假如有3个线程同时访问一个全局变量,那么很可能会操作互斥错误的情况,代码如下:#!/usr/bin/python#encoding=utf-8import timeimport threadingindex = 0def printIndex(): global index global lock while index < 100:
2015-05-05 15:42:55 595
原创 Python调用DLL
C语言中的函数默认是__cdecl调用,C++中可用__stdcall来显示声明调用,但也可以用extern “C”用python调用dll时需要根据不同的调用约定而使用不同的函数。但是不管什么调用,最后都必须用extern “C”来防止名字粉碎。dll源文件:#include extern "C" _declspec(dllexport) int __stdcall stdAd
2015-05-04 22:27:21 858
原创 ConsoleFW
C语言中的函数默认是__cdecl调用,C++中可用__stdcall来显示声明调用,但也可以用extern “C”用python调用dll时需要根据不同的调用约定而使用不同的函数。但是不管什么调用,最后都必须用extern “C”来防止名字粉碎。dll源文件:#include extern "C" _declspec(dllexport) int __stdcall stdAdd(i
2015-05-04 22:13:25 400
原创 [LeetCode] Find Minimum in Rotated Sorted Array
Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element.You may assume no duplicate exists in the ar
2015-05-04 12:21:29 419
原创 [LeetCode] Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, whe
2015-05-04 10:09:38 368
用winpcap发送syn数据包后收不到ack回复
2015-04-19
TA创建的收藏夹 TA关注的收藏夹
TA关注的人