广告

本站里的文章大部分经过自行整理与测试

2015年9月10日星期四

SQL Developer - msvcr100.dll 问题

sqldeveloper64W.exe - System Error
The program can't start because MSVCR100.dll is missing from your computer.
Try reinstalling the program to fix this problem.

出现以上错误的话, 
只需要到以下复制档案


C:\Program Files\Java\jdk1.8.0_60\bin\msvcr100.dll

到以下位置

C:\sqldeveloper\sqldeveloper\bin\msvcr100.dll

Oracle database 12c - 加 SCOTT 户口

sqlplus / as sysdba

SQL> select * from ALL_USERS where USERNAME = 'C##SCOTT';
no rows selected

SQL> @C:\scott.sql;

SQL> conn c##scott/tiger

SQL> select table_name from user_tables;
SQL> select * from SALGRADE;

scott.sql (C:\app\orcl\product\12.1.0\dbhome_1\RDBMS\ADMIN\utlsampl.sql)
SET TERMOUT OFF
SET ECHO OFF
DROP USER C##SCOTT CASCADE;

CREATE USER C##SCOTT IDENTIFIED BY tiger;

GRANT CONNECT,RESOURCE,UNLIMITED TABLESPACE TO C##SCOTT container=all;

ALTER USER C##SCOTT default TABLESPACE USERS;
ALTER USER C##SCOTT temporary TABLESPACE TEMP;

CONNECT C##SCOTT/tiger

CREATE TABLE DEPT
       (DEPTNO NUMBER(2) CONSTRAINT PK_DEPT PRIMARY KEY,
DNAME VARCHAR2(14) ,
LOC VARCHAR2(13) ) ;
CREATE TABLE EMP
       (EMPNO NUMBER(4) CONSTRAINT PK_EMP PRIMARY KEY,
ENAME VARCHAR2(10),
JOB VARCHAR2(9),
MGR NUMBER(4),
HIREDATE DATE,
SAL NUMBER(7,2),
COMM NUMBER(7,2),
DEPTNO NUMBER(2) CONSTRAINT FK_DEPTNO REFERENCES DEPT);

INSERT INTO DEPT VALUES
(10,'ACCOUNTING','NEW YORK');
INSERT INTO DEPT VALUES (20,'RESEARCH','DALLAS');
INSERT INTO DEPT VALUES
(30,'SALES','CHICAGO');
INSERT INTO DEPT VALUES
(40,'OPERATIONS','BOSTON');
INSERT INTO EMP VALUES
(7369,'SMITH','CLERK',7902,to_date('17-12-1980','dd-mm-yyyy'),800,NULL,20);
INSERT INTO EMP VALUES
(7499,'ALLEN','SALESMAN',7698,to_date('20-2-1981','dd-mm-yyyy'),1600,300,30);
INSERT INTO EMP VALUES
(7521,'WARD','SALESMAN',7698,to_date('22-2-1981','dd-mm-yyyy'),1250,500,30);
INSERT INTO EMP VALUES
(7566,'JONES','MANAGER',7839,to_date('2-4-1981','dd-mm-yyyy'),2975,NULL,20);
INSERT INTO EMP VALUES
(7654,'MARTIN','SALESMAN',7698,to_date('28-9-1981','dd-mm-yyyy'),1250,1400,30);
INSERT INTO EMP VALUES
(7698,'BLAKE','MANAGER',7839,to_date('1-5-1981','dd-mm-yyyy'),2850,NULL,30);
INSERT INTO EMP VALUES
(7782,'CLARK','MANAGER',7839,to_date('9-6-1981','dd-mm-yyyy'),2450,NULL,10);
INSERT INTO EMP VALUES
(7788,'SCOTT','ANALYST',7566,to_date('13-JUL-87','dd-mm-rr')-85,3,NULL,20);
INSERT INTO EMP VALUES
(7839,'KING','PRESIDENT',NULL,to_date('17-11-1981','dd-mm-yyyy'),5,NULL,10);
INSERT INTO EMP VALUES
(7844,'TURNER','SALESMAN',7698,to_date('8-9-1981','dd-mm-yyyy'),1500,0,30);
INSERT INTO EMP VALUES
(7876,'ADAMS','CLERK',7788,to_date('13-JUL-87', 'dd-mm-rr')-51,1100,NULL,20);
INSERT INTO EMP VALUES
(7900,'JAMES','CLERK',7698,to_date('3-12-1981','dd-mm-yyyy'),950,NULL,30);
INSERT INTO EMP VALUES
(7902,'FORD','ANALYST',7566,to_date('3-12-1981','dd-mm-yyyy'),3,NULL,20);
INSERT INTO EMP VALUES
(7934,'MILLER','CLERK',7782,to_date('23-1-1982','dd-mm-yyyy'),1300,NULL,10);

CREATE TABLE BONUS
(
ENAME VARCHAR2(10) ,
JOB VARCHAR2(9)  ,
SAL NUMBER,
COMM NUMBER
) ;

CREATE TABLE SALGRADE
      ( GRADE NUMBER,
LOSAL NUMBER,
HISAL NUMBER );

INSERT INTO SALGRADE VALUES (1,700,1200);
INSERT INTO SALGRADE VALUES (2,1201,1400);
INSERT INTO SALGRADE VALUES (3,1401,2);
INSERT INTO SALGRADE VALUES (4,2001,3);
INSERT INTO SALGRADE VALUES (5,3001,9);

COMMIT;

EXIT

2015年9月9日星期三

Vmware - usb 开机

1. 下载 plpbt-5.0.15.zip (Plop Boot Manager 5.0)

http://www.plop.at/en/bootmanager/download.html

将档案里面的 plpbt.iso 解压到 C:\..

2. 在 Virtual Machine Settings -> CD/DVD -> Use ISO image file: C:\plpbt.iso

3. 到 Virtual Machine - BIOS 改开机次序

Power On -> Power On to Firmware -> Boot 
-> 
1. CD-ROM Drive
2. Removable Devices
3. Hard Drive
4. Network boot from Intel E1000e

Save & Exit..

4. 插入 USB Drive, 选 USB 开机

2015年9月4日星期五

KMSpico 激活工具

KMSpico 可激活的产品:
  • Office 2010/2013/2016
  • Windows 10 所有版本
  • Windows 8, Windows 8.1 所有版
  • Windows Server 2016 (Theorically)
  • Windows 7 Professional/N/Enterprise/N 专业版, 企业版
  • Windows Vista Business/N/Enterprise/N 商业版, 企业版
  • Windows Server Technical Preview Build 9841/9860/9926 所有版本
  • Windows Server 2008/2008R2 Standard/Datacenter/Enterprise 标准版/数据中心版/企业版
  • Windows Server 2012/2012R2 Standard/Datacenter/Enterprise 标准版/数据中心版/企业版
使用方法:
Win7 需装 .NET 4.0
  1. 首次管理员身份运行 "卸载服务.bat" 清除服务
  2. 然后管理员身份执行 KMSpico_setup.exe 安装
  3. 耐心等待(安装完即可全自动激活!)

KMSpico v10.1.6

Win10 英文专业版




可以下载到 Win 10 英文专业版 32 / 64 bit

如果要 activate product key, 可用以下工具

KMSpico v10.1.6
访问 nmj1

2015年9月3日星期四

Vmware Workstation unrecoverable error: (vcpu-0)


VMware Workstation unrecoverable error: (vcpu-0)

vcpu-0:VERIFY vmcore/vmm/main/physMem_monitor.c:1123

A log file is available in "..\Virtual Machines\OS X 10.10\vmware.log".  

You can request support.  

To collect data to submit to VMware support, choose "Collect Support Data" from the Help menu.

You can also run the "vm-support" script in the Workstation folder directly.

We will respond on the basis of your support entitlement.

解决方法

去 .. \ Virtual Machines \ OS X 10.10 \ OS X 10.10.vmx

用 Notepad++ 打开档案, 然后确保有以下2项设置,
没有就加, 但不能重复

smc.present = "TRUE"
smc.version = 0

即可

2015年8月12日星期三

Ubuntu - Eclipse / Netbeans 安装

要记得先安装 Oracle Java.
http://jasonmun.blogspot.com/2015/08/ubuntu.html

下载 Eclipse / NetBeans 时也要注意下载的版本
必须跟你的 OS 版本 Type 一样, 
即 32 bits 对 32 bits, 64 bits 对 64 bits

Eclipse

https://www.eclipse.org/downloads/

eclipse-jee-neon-1a-linux-gtk-x86_64.tar.gz 下载到 ~/Downloads

$ cd ~/Downloads

安装

$ tar zxvf eclipse-*.tar.gz

$ sudo mv eclipse /opt

$ sudo gedit ~/.local/share/applications/opt_eclipse.desktop

将以下写入 opt_eclipse.desktop 中,
那 Unity 就可以 search 到这个软件了

[Desktop Entry]
Type=Application
Name=Eclipse Neon
Comment=Eclipse Integrated Development Environment
Icon=/opt/eclipse/icon.xpm
Exec=/opt/eclipse/eclipse
Terminal=false
Categories=Development;IDE;Java;
StartupWMClass=Eclipse

卸载的话, 只需要将 eclipse 这文件夹撤除即可.

$ sudo rm -rf /opt/eclipse

NetBeans

https://netbeans.org/downloads/

将 netbeans-8.2-linux.sh 下载到 ~/Downloads

$ cd ~/Downloads

安装

$ chmod u+x netbeans-8.2-linux.sh

$ ./netbeans-8.2-linux.sh

卸载的话, 只需要到 netbeans-8.2 装目录中运行

$ cd netbeans-8.2

$ ./uninstall.sh

2015年8月11日星期二

ubuntu - Adobe Reader - Home 出现 C:\nppdf32Log\debuglog.txt

安装 Adobe Reader 后,
Home 会出现奇怪的档案名叫 C\:\\nppdf32Log\\debuglog.txt

解决方法:

1. 将以下存成 ~/fix_nppdf.py

$ cd ~
$ gedit fix_nppdf.py


---------------------------------------------------------------
#! /usr/bin/python3
# Save and Run as:
# "sudo ./fix_nppdf.py /opt/Adobe/Reader9/Browser/intellinux/nppdf.so"
#

import mmap, sys

target = br'C:\nppdf32Log\debuglog.txt'
replacement = br'/dev/null'
replacement += b'\0' * (len(target) - len(replacement))

with open(sys.argv[1], 'r+') as f:
  m = mmap.mmap(f.fileno(), 0)
  offset = m.find(target)
  assert offset != -1
  m[offset:offset+len(target)] = replacement
---------------------------------------------------------------

2. 再将这文档赋予执行权限

$ chmod +x fix_nppdf.py

3. 运行..

sudo ./fix_nppdf.py /opt/Adobe/Reader9/Browser/intellinux/nppdf.so

2015年8月10日星期一

ubuntu - 一些软件安装

Ubuntu 指示器
http://jasonmun.blogspot.my/2017/03/ubuntu-indicator.html

日历

1. 日历
$ sudo add-apt-repository ppa:atareao/atareao
$ sudo apt-get update
$ sudo apt-get install calendar-indicator

2. 华人农历
$ sudo apt-get install chinese-calendar

压缩

7Zip
$ sudo apt-get install p7zip p7zip-full p7zip-rar rar

媒体播放 / 编辑

是 Multimedia Codec, 同时也包含了 Adobe Flash
$ sudo apt-get install ubuntu-restricted-extras

1. 网易云音乐
http://jasonmun.blogspot.my/2017/03/ubuntu-netease.html

2. MiniTube
http://flavio.tordini.org/minitube
$ wget http://flavio.tordini.org/files/minitube/minitube.deb
$ wget http://flavio.tordini.org/files/minitube/minitube64.deb

3. OpenShot
$ sudo apt-get install openshot

Media Coverter
http://jasonmun.blogspot.my/2017/06/linux-media-converter.html

Screen Recorder
http://jasonmun.blogspot.my/2017/06/linux-screen-recorder.html

输入法

Fcitx + 搜狗拼音
http://jasonmun.blogspot.my/2016/04/ubuntu-sogoupinyin.html
http://jasonmun.blogspot.com/2015/08/ubuntu-fcitx.html

虚拟机

1. Vmware
http://jasonmun.blogspot.com/2013/06/ubuntu-vmware.html

2. VirtualBox
https://www.virtualbox.org/wiki/Downloads

3. CrossOver - 可以在 Linux 运行 Windows 软件
http://jasonmun.blogspot.my/2017/02/crossover.html

字典

1. Youdao Dict

http://jasonmun.blogspot.my/2016/04/ubuntu-youdao.html 

2. Golden Dict
http://jasonmun.blogspot.com/2013/05/goldendict.html

3. StarDict
http://jasonmun.blogspot.com/2013/05/ubuntu-stardict.html
http://jasonmun.blogspot.com/2013/05/ubuntu-stardict_23.html

系统有关

1. Gufw 防火壁
$ sudo apt install gufw

2. Unity Tweak
sudo apt-get install unity-webapps-common unity-webapps-service
$ sudo apt-get install unity-tweak-tool

3. Ubuntu Tweak
$ wget http://archive.getdeb.net/ubuntu/pool/apps/u/ubuntu-tweak/ubuntu-tweak_0.8.7-1~getdeb2~xenial_all.deb
$ sudo apt-get install gdebi
$ cd ~/Downloads
$ sudo gdebi ubuntu-tweak_0.8.7-1~getdeb2~xenial_all.deb

4. menuLibre
http://jasonmun.blogspot.my/2017/03/ubuntu-menulibre.html

5. Grub Customizer
http://jasonmun.blogspot.my/2017/03/linux-grub-customizer-grub.html

6. Boot Repair
http://jasonmun.blogspot.my/2017/03/linux-boot-repair.html

7. BleachBit
http://jasonmun.blogspot.my/2013/05/bleachbit.html

8. Conky
http://jasonmun.blogspot.my/2017/03/linux-conky.html

9. Tor
http://jasonmun.blogspot.my/2017/02/linux-deep-web-tor-apache2.html

10. Prey
http://jasonmun.blogspot.my/2016/05/ubuntu-prey.html

浏览器

1. Google Chrome
http://jasonmun.blogspot.my/2016/05/linux-chrome.html

2. Google Chrome + ARChon 运行库 - 可以直接运行 Android Apps
http://jasonmun.blogspot.my/2017/03/linux-chrome-archon-android-app.html

云存储

1. Dropbox
$ sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E
$ sudo add-apt-repository "deb http://linux.dropbox.com/ubuntu $(lsb_release -sc) main"
$ sudo apt-get update
$ sudo apt-get install dropbox

2. Google Drive
http://jasonmun.blogspot.my/2017/05/ubuntu-google-drive.html

即时聊天

1. Pidgin
$ sudo add-apt-repository -y ppa:pidgin-developers/ppa
$ sudo apt-get update
$ sudo apt-get install pidgin

2. QQ
http://jasonmun.blogspot.my/2017/03/ubuntu-wine-qq.html
http://jasonmun.blogspot.my/2017/02/crossover-qq.html

3. Skype
http://jasonmun.blogspot.my/2017/03/linux-skype-64-bit.html

TEAMVIEWER

http://jasonmun.blogspot.my/2016/12/linux-teamviewer.html

JAVA 6 / 7 / 8 / 9


http://jasonmun.blogspot.my/2016/04/ubuntu-java-6-7-8-9.html

编辑

Eclipse / Netbeans
http://jasonmun.blogspot.my/2015/08/ubuntu-eclipse-netbeans.html

FILEZILLA

$ sudo add-apt-repository ppa:adabbas/1stppa
$ sudo apt-get update
$ sudo apt-get install filezilla

FOXIT READER

https://www.foxitsoftware.com/downloads/

ADOBE READER

$ sudo add-apt-repository "deb http://archive.canonical.com/ precise partner"
$ sudo apt-get update
$ sudo apt-get install acroread

如果以上不行, 
先清除干净
$ dpkg -l | grep -i adobe
$ sudo apt-get remove acroread-bin
$ sudo apt-get remove acroread
$ sudo apt-get autoremove
$ dpkg -l | grep -i adobe # 再查看

再从 FTP 下载 AdbeRdr9.5.5-1_i386linux_enu.deb, 然后跟着下面安装

ftp://ftp.adobe.com/pub/adobe/reader/unix/

$ sudo apt-get install libgtk2.0-0:i386
$ sudo apt-get install -y libxml2:i386
$ sudo apt-get install libgtk2.0-0:i386 libnss3-1d:i386 libnspr4-0d:i386 lib32nss-mdns libxml2:i386 libxslt1.1:i386 libstdc++6:i386
$ sudo apt-get install gdebi

$ sudo gdebi AdbeRdr9.5.5-1_i386linux_enu.deb

$ cd /opt/Adobe/Reader9/Reader/intellinux/bin
$ acroread

http://jasonmun.blogspot.com/2015/08/ubuntu-adobe-reader-home.html

PIPELIGHT (Microsoft Silverlight 用)
$ sudo apt-add-repository ppa:pipelight/stable
$ sudo apt-get update
$ sudo apt-get install pipelight-multi

$ sudo pipelight-plugin --enable silverlight

$ sudo pipelight-plugin --enable widevine

MEDIA
$ sudo apt-get install compizconfig-settings-manager

$ sudo apt-get install flashplugin-installer

$ sudo apt-get install libavcodec-extra

$ sudo apt-get install libdvdread4

$ sudo add-apt-repository ppa:mc3man/trusty-media
$ sudo apt-get update
$ sudo apt-get install gstreamer0.10-ffmpeg

其它

$ sudo apt-get install libreoffice-style-sifr

$ wget http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb
$ sudo dpkg -i ttf-mscorefonts-installer_3.6_all.deb


爱壁纸
http://jasonmun.blogspot.my/2017/03/linux-love-wallpaper.html

ubuntu - SSH / SCP

安装 SSH 服务
---------------------
$ sudo apt-get install ssh

产生公钥与私钥 (可以选择 rsa / dsa / ecdsa / ed25519 算法来加密) 
-------------------------------------------------------------------
# 预设会在~/.ssh 中产生私 id_rsa 和公钥 id_rsa.pub
$ ssh-keygen -t rsa -b 4096 -C "bat@yahoo.com" -P "密码"

让别人可以用 SSH 进入, 不需要户口密码
--------------------------------------------------------
将公钥加入档案 authorized_keys 中
$ cd ~
$ cat .ssh/id_rsa.pub >> .ssh/authorized_keys



$ eval "$(ssh-agent -s)"   (确保 sshd 在运行)
$ ssh-add ~/.ssh/id_rsa

以后别人用
$ ssh userId@localhost

进入 localhost 不需要密码

如果 localhost_2 将 localhost 的公钥,
加入自己的 .ssh/authorized_keys 档案中,
那表示说 localhost 可以不需要密码进入 localhost_2 某个户口了
(当然, localhost_2 也要安装 SSH 服务)

SCP 文件传输
---------------------
# 从 localhost_2 的户口 userId00 复制文件到 localhost 里的户口 userId01
$ scp /home/userId00/z.txt userId01@localhost:/home/userId01

ubuntu fcitx 中文输入器

目前 ibus 用 GooglePinyin 会有明显的 bugs
但可用 fcitx 加装搜狗拼音输入法, UI 界面与功能会大大提升

不需撤 ibus, fcitx 可以跟 ibus 共存

$ sudo add-apt-repository ppa:fcitx-team/nightly
$ sudo apt-get update

$ sudo apt-get install fcitx fcitx-config-gtk
$ sudo apt-get install fcitx-pinyin

$ sudo apt-get install fcitx-googlepinyin # Google 拼音输入法
$ sudo apt-get install fcitx-sunpinyin # 太阳拼音输入法
$ sudo apt-get install fcitx-module-cloudpinyin # 云拼音输入法

安装 fcitx 完后, 根据自己的OS版本,
下载搜狗拼音输入法, deb 档案在 ubuntu 按一按就可以安装了

搜狗拼音输入法 32 / 64 bits
---------------------------------------
http://pinyin.sogou.com/linux/?r=pinyin
http://pinyin.sogou.com/linux/download.php?f=linux&bit=32
http://pinyin.sogou.com/linux/download.php?f=linux&bit=64

ibus / fcitx 输入工具的转换
---------------------------------------
System Settings -> Language Support -> Language -> Keyboard input method system: fcitx

* 如果在 ubuntu 14.04 撤了 ibus, System Settings 会很多东西连同一起扯掉,
恢复的方法如下:

$ sudo apt-get remove unity-control-center
$ sudo apt-get install unity-control-center

$ sudo apt-get install ubuntu-desktop

2015年8月6日星期四

Vmware Ubuntu - power-on script did not run successfully..


如果你遇上以上问题,
可以用以下指令来解决问题

# 预设
$ cd /usr/bin

# 卸载 VMware Tools
$ sudo vmware-uninstall-tools.pl

# 卸载 ..
$ sudo apt-get purge open-vm-tools*

# 安装
$ sudo apt-get install open-vm-tools-lts-trusty

重新安装 VMware Tools
(按 VMware -> VM > Reinstall VMware Tools)
等待 VMware 将 VMware Tools 挂起..
[C:\Program Files (x86)\VMware\VMware Workstation\linux.iso]

# 复制到 home
$ sudo cp "/media/VMware Tools/VMwareTools-9.9.3-2759765.tar.gz" ~

# 解压
$ cd ~
$ tar zxvf VMwareTools-9.9.3-2759765.tar.gz

$ cd vmware-tools-distrib

# 给 root 户口设定密码
$ sudo passwd root

# 用 root 户口来安装
$ su root

$ ./vmware-install.pl