Tools and Tutorials

 

 

Title One: Sublime

content:

1.Sublime tutorial address

2. Sublime compiles java code to deal with utf-8, gbk character encoding problems

 


sublime3 tutorial

http://www.cnsecer.com/720.html

Implement sublime Text 3 to compile and execute java

Reference URL: http://tieba.baidu.com/p/2609515186

1.1 Find the *\Packages\Java.sublime-package file directly in the installation path, open it with the decompression software, find the JavaC.sublime-build file, change the javac in shell_cmd to javaRun, save the files in the original compressed file Replace, if your sublime text 3 is already open, it will report an error, close it and overwrite it again. code show as below:

 

[plain] view plain copy View code snippets on CODE Derive to my code slice
  1. {  
  2.     "shell_cmd": "javaRun \"$file\"",  
  3.     "file_regex": "^(...*?):([0-9]*):?([0-9]*)",  
  4.     "selector": "source.java",  
  5.     "encoding":"cp936"  
  6. }  

1.2 Then create a new batch file javaRun.bat in the bin directory under the jdk installation path, the content is as follows:

 

[plain] view plain copy View code snippets on CODE Derive to my code slice
  1. @ECHO OFF  
  2. cd% ~ dp1  
  3. ECHO Compiling %~nx1.......  
  4. IF EXIST %~n1.class (  
  5. DEL %~n1.class  
  6. )  
  7. javac  %~nx1  
  8. IF EXIST %~n1.class (  
  9. ECHO -----------OUTPUT-----------  
  10. java %~n1  
  11. )  

 

After 1.3, you can use ctrl+B

2. If the compilation display is displayed [Decode error - output not utf-8]

SublimeText3\Packages\Java.sublime-package\JavaC.sublime-build\


3. Compile and display: Unmappable characters encoding GBK

[Decode error - output not cp936]

Adopted: http://jingyan.baidu.com/article/ca2d939dc76c89eb6c31ce96.html

Open it with Notepad and save it as ANSI encoding, but it still feels uncomfortable, so there are the following methods:

Modify the above javaRun.bat to:

 

[plain] view plain copy
  1. @ECHO OFF  
  2. cd% ~ dp1  
  3. ECHO Compiling %~nx1.......  
  4. IF EXIST %~n1.class (  
  5. DEL %~n1.class  
  6. )  
  7. javac -encoding UTF-8 %~nx1  
  8. IF EXIST %~n1.class (  
  9. ECHO -----------OUTPUT-----------  
  10. java %~n1  
  11. )  
[plain] view plain copy
  1.   

  

Sublime compiles java win, and linux configuration

 

http://www.oschina.net/translate/compile-and-run-java-programs-in-sublime-text-2?cmp

 

pgmagick documentation

http://pythonhosted.org/pgmagick/cookbook.html

font used

http://sourceforge.net/projects/gs-fonts/files/gs-fonts/8.11%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-8.11.tar.gz/download

python的包

https://www.python.org/

在win8系统中可以使用的字体:用几张图来说明一下

 

 

用法:

from pgmagick import gminfo,Image,FilterTypes

print(gminfo.library)
print(gminfo.version)
print(gminfo)

######################scale###################################
img = Image('h:/images/IMG_20150121_144738_592517.jpg')
img.quality(80)
img.scale('20%')
img.write('h:/images/output.jpg')
###########################create#############################
from pgmagick.api import Image
import sys

img = Image((300,200),'red')
img.write('h:/images/bg_red.jpg')

img = Image((300, 200), 'transparent')
img.write('h:/images/transparent.png')


img = Image((300, 200), 'gradient:#ffffff-#000000')
img.write('h:/images/gradient.png')

img = Image((300, 200),'white')
#img.font("C:/Python34/fonts/n019003l.pfb")
img.font("C:/Windows/Fonts/meiryo.ttc")
img.annotate('Hello World')
img.write('h:/images/helloworld.png')


img = Image((300, 200))
img.font("C:/Python34/fonts/a010013l.pfb")
img.annotate('Hello World', angle=45)
img.write('h:/images/helloworld45.png')

img = Image((300, 200))
#img.font("c:/Python34/fonts/a010015l.pfb")
img.font("C:/Windows/Fonts/meiryo.ttc")
#img.annotate('Hello World')
img.annotate('ようこそpgmagickへ!!')
img.write('h:/images/japanese-text.png')

img = Image((300, 200))
#img.font("c:/Python34/fonts/a010015l.pfb")
img.font("C:/Windows/Fonts/ygyxsziti2.0.ttf")
#img.annotate('Hello World')
img.annotate('我爱中国!')
img.write('h:/images/china-text.png')

 

命令行文档

http://itindex.net/detail/49701-imagemagick-graphicsmagick-%E5%91%BD%E4%BB%A4%E8%A1%8C

 pip文档

https://pip.pypa.io/en/stable/reference/pip_wheel.html#usage

pgmagick-api 文档

http://pythonhosted.org/pgmagick/api.html

 

思维导图xmind免费破解版

http://bbs.feng.com/read-htm-tid-8843919.html

 

android的开发工具

http://tools.android-studio.org/index.php

这个最全

http://www.androiddevtools.cn/

 

win8.1安装msi ,node 错误2053,2052错误解决

http://www.xitonghe.com/jiaocheng/windows8-1312.html

 

 

关于npm安装包失败的解决办法。

发表于1年前(2014-04-06 23:46)   阅读( 166) | 评论( 1 2人收藏此文章, 我要收藏
0
摘要 npm国内镜像介绍

镜像使用方法(三种办法任意一种都能解决问题,建议使用第三种,将配置写死,下次用的时候配置还在):

1.通过config命令

 
1
2
npm config set registry http: //registry.cnpmjs.org
npm info underscore (如果上面配置正确这个命令会有字符串response)

2.命令行指定

1
npm --registry http: //registry.cnpmjs.org info underscore

3.编辑 ~/.npmrc 加入下面内容

 
1
registry = http: //registry.cnpmjs.org

搜索镜像:http://cnpmjs.org/

标题一: sublime

目录:

1.sublime教程地址

2.sublime编译java代码,处理utf-8,gbk字符编码的问题

 


sublime3 教程

http://www.cnsecer.com/720.html

实现sublime Text 3对java编译执行

参考网址:http://tieba.baidu.com/p/2609515186

1.1 直接在安装路径下找到*\Packages\Java.sublime-package文件,用解压缩软件打开,找到JavaC.sublime- build文件,将shell_cmd中的javac改成javaRun,保存后将原压缩文件中的文件替换,如果你的sublime text 3已经打开,会报错,关闭后再次覆盖。代码如下:

 

[plain] view plain copy View code snippets on CODE Derive to my code slice
  1. {  
  2.     "shell_cmd": "javaRun \"$file\"",  
  3.     "file_regex": "^(...*?):([0-9]*):?([0-9]*)",  
  4.     "selector": "source.java",  
  5.     "encoding":"cp936"  
  6. }  

1.2然后在jdk安装路径下的bin目录中新建一个javaRun.bat批处理文件,内容如下:

 

[plain] view plain copy View code snippets on CODE Derive to my code slice
  1. @ECHO OFF  
  2. cd %~dp1  
  3. ECHO Compiling %~nx1.......  
  4. IF EXIST %~n1.class (  
  5. DEL %~n1.class  
  6. )  
  7. javac  %~nx1  
  8. IF EXIST %~n1.class (  
  9. ECHO -----------OUTPUT-----------  
  10. java %~n1  
  11. )  

 

1.3之后就可以使用 ctrl+B

2、若显示编译显示[Decode error - output not utf-8]

SublimeText3\Packages\Java.sublime-package\JavaC.sublime-build\


3、编译显示: 编码GBK的不可映射字符

[Decode error - output not cp936]

有采用 :http://jingyan.baidu.com/article/ca2d939dc76c89eb6c31ce96.html

用记事本打开,另存为ANSI编码,但依旧感觉不好受,所以是有如下方法:

将上述javaRun.bat修改为:

 

[plain] view plain copy
  1. @ECHO OFF  
  2. cd %~dp1  
  3. ECHO Compiling %~nx1.......  
  4. IF EXIST %~n1.class (  
  5. DEL %~n1.class  
  6. )  
  7. javac -encoding UTF-8 %~nx1  
  8. IF EXIST %~n1.class (  
  9. ECHO -----------OUTPUT-----------  
  10. java %~n1  
  11. )  
[plain] view plain copy
  1.   

  

sublime编译java的win,和linux 的配置

 

http://www.oschina.net/translate/compile-and-run-java-programs-in-sublime-text-2?cmp

 

pgmagick 使用文档

http://pythonhosted.org/pgmagick/cookbook.html

用到的字体

http://sourceforge.net/projects/gs-fonts/files/gs-fonts/8.11%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-8.11.tar.gz/download

python的包

https://www.python.org/

在win8系统中可以使用的字体:用几张图来说明一下

 

 

用法:

from pgmagick import gminfo,Image,FilterTypes

print(gminfo.library)
print(gminfo.version)
print(gminfo)

######################scale###################################
img = Image('h:/images/IMG_20150121_144738_592517.jpg')
img.quality(80)
img.scale('20%')
img.write('h:/images/output.jpg')
###########################create#############################
from pgmagick.api import Image
import sys

img = Image((300,200),'red')
img.write('h:/images/bg_red.jpg')

img = Image((300, 200), 'transparent')
img.write('h:/images/transparent.png')


img = Image((300, 200), 'gradient:#ffffff-#000000')
img.write('h:/images/gradient.png')

img = Image((300, 200),'white')
#img.font("C:/Python34/fonts/n019003l.pfb")
img.font("C:/Windows/Fonts/meiryo.ttc")
img.annotate('Hello World')
img.write('h:/images/helloworld.png')


img = Image((300, 200))
img.font("C:/Python34/fonts/a010013l.pfb")
img.annotate('Hello World', angle=45)
img.write('h:/images/helloworld45.png')

img = Image((300, 200))
#img.font("c:/Python34/fonts/a010015l.pfb")
img.font("C:/Windows/Fonts/meiryo.ttc")
#img.annotate('Hello World')
img.annotate('ようこそpgmagickへ!!')
img.write('h:/images/japanese-text.png')

img = Image((300, 200))
#img.font("c:/Python34/fonts/a010015l.pfb")
img.font("C:/Windows/Fonts/ygyxsziti2.0.ttf")
#img.annotate('Hello World')
img.annotate('我爱中国!')
img.write('h:/images/china-text.png')

 

命令行文档

http://itindex.net/detail/49701-imagemagick-graphicsmagick-%E5%91%BD%E4%BB%A4%E8%A1%8C

 pip文档

https://pip.pypa.io/en/stable/reference/pip_wheel.html#usage

pgmagick-api 文档

http://pythonhosted.org/pgmagick/api.html

 

思维导图xmind免费破解版

http://bbs.feng.com/read-htm-tid-8843919.html

 

android的开发工具

http://tools.android-studio.org/index.php

这个最全

http://www.androiddevtools.cn/

 

win8.1安装msi ,node 错误2053,2052错误解决

http://www.xitonghe.com/jiaocheng/windows8-1312.html

 

 

关于npm安装包失败的解决办法。

发表于1年前(2014-04-06 23:46)   阅读( 166) | 评论( 1 2人收藏此文章, 我要收藏
0
Summary of npm domestic mirror introduction

How to use the mirror (any of the three methods can solve the problem, it is recommended to use the third one, write the configuration to death, and the configuration will still be used next time):

1. Through the config command

 
1
2
npm config set registry http: //registry.cnpmjs.org
npm info underscore (如果上面配置正确这个命令会有字符串response)

2. Command line specification

1
npm --registry http: //registry.cnpmjs.org info underscore

3. Edit and ~/.npmrcadd the following

 
1
registry = http: //registry.cnpmjs.org

Search mirror: http://cnpmjs.org/

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327033162&siteId=291194637