杂项
dotphoenix
Life,Tennis, Software Architecture
展开
-
VMWare workstation/player 无法使用bridge模式联网问题的解决方案
VMWare workstation/player 无法使用bridge模式联网问题的解决方案原创 2022-12-19 21:43:54 · 3418 阅读 · 1 评论 -
cmder中文乱码问题
在 Windows 中安装的 cmder1.3.2,默认的客户端编码为中文简体(gbk)。如果某些命令输出的字符编码是 utf-8,就会出现中文字符乱码的问题。此时,我们可将 cmder 的字符编码改为 utf-8,来解决中文乱码的问题。有以下两种方法。临时修改 cmder 的字符编码打开cmder,运行下面的命令即可:chcpchcp 65001说明:chcp 查看当前...原创 2020-01-15 22:39:05 · 2464 阅读 · 0 评论 -
Java远程访问Oracle教程
Search... Connect to Oracle database via JDBC Print EmailLast Updated on 26 September 2013Java SE 8 for the Really Impatient Mastering Lambdas: Java Progr转载 2014-05-10 11:39:32 · 6140 阅读 · 0 评论 -
MAC OSX打开和关闭MySQL的方法
1. ADD below to .bash_profile:export MYSQL_HOME=/usr/local/mysqlalias start_mysql='sudo $MYSQL_HOME/bin/mysqld_safe &'alias stop_mysql='sudo $MYSQL_HOME/bin/mysqladmin shutdown'2. BEST M转载 2015-04-09 11:59:50 · 5367 阅读 · 0 评论 -
Gaming Mouse术语解析
1. DPI(dot per inch): DPI是鼠标移动每英寸时汇报给系统的点数。2. CPI: CPI是鼠标移动1英寸时向系统发出的移动信号的数量。3. MouseSpeed, MouseThreshold1 和 MouseThreshold2:MouseSpeed决定当鼠标移动时,光标应该以多快的速度(pixel的数量)移动以与之对应。这三个参数共同决定原创 2015-08-12 12:00:43 · 9636 阅读 · 1 评论 -
netbeans c/c++ (or gcc) & nasm co-work
1. assemble asm to obj run: nasm -felf64 maxofthree.asm will generate maxofthree.o2. run: ar -r libmyasm.a maxofthree.o generate libmyasm.a (if use gcc, not Netbeans, this step is not needed.)3. Netbeans: right-click project->properties->Build->Lin原创 2016-01-08 12:52:15 · 5533 阅读 · 0 评论 -
centos x64系统下的boost编译和使用
1. download boost sourcecode 1.54.0 (wget https://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.gz/download)2.install bzip2-devel (ubuntu可以略去此步骤) 2.1 sudo yum whatprovides */bz...原创 2013-06-24 11:20:36 · 7680 阅读 · 0 评论 -
ortp中的queue_t,msgb(mblk_t)和datab(也适用于solaris驱动所使用的数据结构)
在ortp中实现了一个通用的队列,每一个队列包括三个实体,分别是队列、消息块和数据块,这三个实体分别对应queue_t、msgb和datab结构体。queue_t的定义如下所示:typedef struct _queue {mblk_t _q_stopper; /* 消息队列头 */int q_mcount; /*number of packe转载 2016-05-09 10:59:36 · 6234 阅读 · 0 评论 -
同一个进程使用pipe(管道)的例子
使用C语言在UNIX中使用pipe(2)系统调用时,这个函数会让系统构建一个匿名管道,这样在进程中就打开了两个新的,打开的文件描述符:一个只读端和一个只写端。管道的两端是两个普通的,匿名的文件描述符,这就让其他进程无法连接该管道。原创 2012-02-20 22:39:26 · 5425 阅读 · 1 评论 -
CentOS下的MySQL基本操作
1. 启动和停止:/etc/init.d/mysqld start /etc/init.d/mysqld stop 2. 修改默认的enginesudo vi /etc/my.cnf add default-storage-engine=INNODB to the last of [mysqld] , looks like:[mysqld]datadi原创 2015-04-13 17:08:54 · 4313 阅读 · 0 评论 -
使用MySQL API时出现如下问题的解决方法:Access denied for user 'root'@'localhost' (using password: YES)
方法一: # /etc/init.d/mysqld stop # mysqld_safe --user=mysql --skip-grant-tables --skip-networking & # mysql -u root mysql mysql> UPDATE user SET Password=PASSWORD(’newpassword’) where US转载 2015-04-05 21:51:59 · 4618 阅读 · 0 评论 -
MFC的datetimepicker同时显示时间和日期的方法
CString szFormat; szFormat = "MM/dd/yyyy hh:mm:00 tt"; GetDlgItem(IDC_DATETIMEPICKER_START)->SendMessage( (UINT) DTM_SETFORMAT, (WPARAM)0, (LPARAM) (LPCTSTR) szFormat );原创 2015-03-29 16:43:49 · 8777 阅读 · 2 评论 -
5.3版本mongoose的多线程实例源代码
5.3版本mongoose的多线程实例源代码原创 2014-05-26 09:35:42 · 7590 阅读 · 1 评论 -
JDBC访问Oracle数据库例子源代码,包括创建table,删除table,插入记录,删除记录,查询记录等
JDBC访问Oracle数据库例子源代码,包括创建table,删除table,插入记录,删除记录,查询记录等原创 2014-05-28 16:07:11 · 5443 阅读 · 0 评论 -
Ubuntu + MinGW编译ffmpeg
1. sudo apt-get install pax cvs flex bison texinfo2. wget http://zeranoe.com/scripts/mingw_w64_build/mingw-w64-build-3.6.03. ./mingw-w64-build-3.6.04. generate set_compiler.sh, conte原创 2014-07-23 14:47:29 · 7195 阅读 · 0 评论 -
libusb的使用教程和例子
转自:http://www.cnblogs.com/Daniel-G/archive/2013/04/22/3036730.htmllibusb的使用教程和例子驱动开发向来是内核开发中工作量最多的一块,随着USB设备的普及,大量的USB设备的驱动开发也成为驱动开发者手头上做的最多的事情。本文主要介绍 Linux平台下基于libusb的驱动开发,希望能够给从事Linux驱转载 2014-09-09 17:04:08 · 22675 阅读 · 5 评论 -
十六进制和二进制的转换
#include #include #include char* strrev(char* s)void binary_hex(int n, char hex[]);int hex_binary(char hex[]);char* strrev(char* s){ /* h指向s的头部 */ char* h =转载 2014-09-01 15:58:39 · 4767 阅读 · 0 评论 -
移植boost_1_55_0至arm的方法小结
移植boost_1_55_0至arm的方法小结安装包:下载路径:http://sourceforge.net/projects/boost/files/boost/1.55.0/下载 boost_1_55_0.zip1.首先运行boost解压目录下的unzip boost_1_55_0.zip2.运行安装包自带的脚本:./bootstrap.sh转载 2014-11-14 10:26:11 · 7482 阅读 · 0 评论 -
SMTP Commands Reference
SMTP Commands ReferenceA client computer communicates with an SMTP server (e-mail server) by using SMTP commands. There is a core list of SMTP commands that all SMTP servers supports and these a转载 2015-02-26 09:54:27 · 5000 阅读 · 0 评论 -
如何给Visual Studio的Win32 工程添加Version信息(how to add version information of win32 project)
Right click Project Name in Resolution View, then select Add --> Resource原创 2015-03-03 11:35:51 · 4830 阅读 · 0 评论 -
设备树(Device Tree)(完整设备路径名(Full Device Pathnames))
设备树(Device Tree)(完整设备路径名(Full Device Pathnames))OpenBoot deals directly with the hardware devices in the system. Each device has a unique name that represents both the type of翻译 2016-07-04 12:38:43 · 12271 阅读 · 0 评论 -
tar打包split分割拆分大文件
本文介绍下,使用tar命令在打包文件时,与split结合分割拆分大文件的方法,有需要的朋友参考下。有时远程下载tar包,由于包太大,失去连接时,需要重新下载非常郁闷。可以使用split分割分解拆分大包文件,然后,单个下载下文件就可以了。在Linux下使用 tar 命令来将文件打包并压缩是很通常的用法了。可是Linux的文件系统对文件大小有限制,也就是说一个文件最大不转载 2016-07-21 15:58:47 · 12118 阅读 · 0 评论 -
Error opening terminal: xterm 解决办法
1. For error message "Error opening terminal: linux"mkdir -p /usr/share/terminfo/lcd /usr/share/terminfo/lln -s /lib/terminfo/l/linux linux2. For error message "Error opening termi转载 2016-12-17 21:49:03 · 12494 阅读 · 0 评论 -
Java synchronized详解
第一篇:使用synchronized在编写一个类时,如果该类中的代码可能运行于多线程环境下,那么就要考虑同步的问题。在Java中内置了语言级的同步原语--synchronized,这也大大简化了Java中多线程同步的使用。我们首先编写一个非常简单的多线程的程序,是模拟银行中的多个线程同时对同一个储蓄账户进行存款、取款操作的。在程序中我们使用了一个简化版本的Account类,代表转载 2017-08-09 08:59:58 · 6201 阅读 · 0 评论 -
给Wireshark增加decode as为SMGP和SGIP的步骤
1. 在wireshark安装目录下找到init.lua文件,MAC下位于:/Applications/Wireshark.app/Contents/Resources/share/wireshark2. 在init.lua同目录下创建sgip.lua和smgp.lua,其内容参考本文结尾3. 打开init.lua并在结尾增加下面两行:dofile(DATA_DIR.."sgip.lu转载 2017-12-28 12:10:45 · 8804 阅读 · 1 评论 -
/usr/bin/env: bash: No such file or directory 解决办法
The problem's cause was that Git on Windows converted the line endings of gradlew from Unix style (LF) to Windows style (CRLF).You can turn off that automatic conversion using git config core.autocr转载 2018-02-06 15:07:18 · 24040 阅读 · 0 评论 -
秒嘀(miaodi)短信群发平台demo(python版)
#!/usr/bin/python#-*-coding:utf-8-*-#秒嘀短信API实现# Refer to: http://www.miaodiyun.com/doc/guide.htmlimport httplib,urllib,hashlib,datetime,time,json,ssl; #加载模块#发送行业短信def sendIndustrySms(tos, s...原创 2018-02-08 14:31:11 · 6534 阅读 · 0 评论 -
使用ffmpeg修改视频文件的分辨率
In this article we show how to resize any video file.This method is one of the bests ways to resize a video file in Linux systems (almost any distribution), and an excellent alternative to Windows and...转载 2018-05-23 23:39:18 · 28039 阅读 · 4 评论 -
XCode使用googletest(包括googlemock)
1. 下载最新的googletest源代码,也可以从此处下载:https://pan.baidu.com/s/1qRn5BCpUIBz_PY0m6-7pgg2. 解压后进入googletest/make,执行make,copy libgtest.a到/usr/local/lib,并copy include/gtest目录到/usr/local/include;然后进入googlemock/...原创 2018-07-23 10:27:30 · 3351 阅读 · 0 评论 -
Windows 环境下 MySQL 5.7 安装配置指南
安装环境Windows 版本:Windows 10 专业版 64bit MySQL 版本:MySQL 5.7.16Tip在安装 MySQL 前请务必确认自己电脑的 net 指令是正常工作的。有些 Windows 系统会丢失 net 指令(环境变量缺失),解决方法请自行搜索一下。配置过程下载 MySQL Community Server 下载链接 选择合适自己操作系统的...转载 2018-08-07 16:13:18 · 814 阅读 · 0 评论 -
Thanos.sh灭霸脚本,轻松随机删除系统一半的文件
#!/bin/shlet "i=`find . -type f | wc -l`/2";if [[ uname=="Darwin" ]]; then find /-not -name "Thanos.sh" -type f -print0 | gshuf -z -n $i | xargs -0 -- ls -al;else find /-not -name "Thanos...转载 2019-07-05 09:21:42 · 4937 阅读 · 0 评论 -
增量dump mysql的shell脚本
#! /bin/sh# sh dump.sh &DBSERVER=192.168.1.239USER=xxxxPASS=xxxxMYSQLDUMPBIN_PATH='/software/mysql-5.6/bin/mysqldump'#DBSERVER=xxxxxx#USER=xxxx#PASS=xxxx#MYSQLDUMPBIN_PATH='/usr/bin/mysqld原创 2017-07-19 15:11:13 · 7302 阅读 · 0 评论 -
每天一次dump数据库并压缩的shell脚本
#! /bin/shDBSERVER=192.168.1.236USER=xxxPASS=xxxOUTPUT_DIR=dataOLD_DIR=old_dataLOG_FILE=log_dump.txt#默认的数据库default_all_dbs=('open_account' 'xx' 'xxxx' 'xxxxx' 'xxxxxx' 'xxxxx原创 2017-07-03 15:21:50 · 8271 阅读 · 0 评论 -
How to restart USB device(如何重启USB设备)
使用devcon.exe (源代码及可执行程序请从:http://download.csdn.net/detail/dotphoenix/9617582 下载)DevCon (Devcon.exe), the Device Console, is a command-line tool that displays detailed information about devices o转载 2016-08-31 16:49:09 · 13513 阅读 · 1 评论 -
Software Architecture Patterns
Software ArchitecturePatternsUnderstanding Common Architecture Patterns and When to Use ThemFull version is at: http://download.csdn.net/detail/dotphoenix/9624944It’s all too common for deve转载 2016-09-08 16:34:10 · 7119 阅读 · 0 评论 -
SMPP网关模拟器系统发布(下载地址http://download.csdn.net/detail/dotphoenix/9408255)
SMPP Gateway System(Contact [email protected] to get more information)1 Including a standard SMPP Server(SMPP Simulator),a SMPP Client and SDK2 Implement SMPP V3.4,Support PDUs including:3 bind modes,unbind,submit_sm,delivery_sm,enquire_link,generic_ack原创 2016-01-13 23:07:09 · 9394 阅读 · 0 评论 -
redhat enterprise linux : how to use yum
由于 redhat的yum在线更新是收费的,如果没有注册的话不能使用,如果要使用,需将redhat的yum卸载后,重启安装,再配置其他源.本文包括配置本地源及第三方源。第三方源包括:网易,epel,repoforge ,rpmfusion以下为详细过程: 1.删除redhat原有的yum rpm -aq|grep yum|xargs rpm -e --nodeps转载 2016-11-16 17:15:17 · 593 阅读 · 0 评论 -
How to use gnu readline to implement "reset password".
How to use gnu readline to implement "Reset password"Using gnu readline to implement a shell style program is simple, but implementing"Reset password" is a little hard, here is a very complete exa原创 2017-01-10 15:28:56 · 4142 阅读 · 0 评论 -
OSX mysql 操作
sudo /Library/StartupItems/MySQLCOM/MySQLCOM stopsudo mysqld_safe --skip-grant-tables &# mysqlmysql> use mysql;mysql> UPDATE user SET password=password("test123") WHERE user='root'转载 2017-03-15 18:36:59 · 2777 阅读 · 0 评论 -
【译】Executor, ExecutorService 和 Executors 间的不同
Executor, ExecutorService 和 Executors 间的不同java.util.concurrent.Executor, java.util.concurrent.ExecutorService, java.util.concurrent. Executors 这三者均是 Java Executor 框架的一部分,用来提供线程池的功能。因为创建和管理线程非常心累转载 2017-06-22 16:26:25 · 6387 阅读 · 0 评论