最近在用 Zebra GT800 印標籤(透過 web browser)
全英文標籤沒什麼問題
但中文部分都吐亂碼或問號
看了 GT800 裡面有特別內建 CHT.FNT, SIMSUN.FNT
起初我一直以為 CHT.FNT 是印繁體中文的字體
SIMSUN.FNT 則是印簡體中文的字體
BUT.....
CHT.FNT 都吐問號 , SIMSUN.FNT 內竟然也有繁體中文.... (/‵Д′)/~ ╧╧
所以用 SIMSUN.FNT 就通吃中文惹....
然後字的部分要轉成 HEX String 然後搭配 ^FH 一起使用
假設要印 “繁體中文讚讚讚!”
首先將 繁體中文讚讚讚! 貼到 https://openopen114.github.io/TextToHexString [Github]
點 Gen 後選擇 Hex String For ZPL 可得到 _E7_B9_81_E9_AB_94_E4_B8_AD_E6_96_87_E8_AE_9A_E8_AE_9A_E8_AE_9A_21
然後 ZPL CODE 如下
^XA
^CI28
^A@R,50,50,E:SIMSUN.FNT
^FO50,50^FH^FD _E7_B9_81_E9_AB_94_E4_B8_AD_E6_96_87_E8_AE_9A_E8_AE_9A_E8_AE_9A_21 ^FS
^XZ
[Angular] ngFor filter
張貼者:
openopen
on 2018年6月17日 星期日
/
Comments: (0)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//HTML | |
<input type="text" [(ngModel)]="_num"/> | |
<ul> | |
<li *ngFor="let item of numList | numFilter:_num"> | |
{{item.po}} | |
</li> | |
</ul> | |
<p>_num:{{_num}}</p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//TS | |
import { Component, OnInit } from '@angular/core'; | |
import { FormsModule } from '@angular/forms'; | |
import { FormBuilder, FormGroup, FormControl, Validators } from '@angular/forms'; | |
import { NumFilterPipe } from '../num-filter.pipe'; | |
@Component({ | |
selector: 'app-num', | |
templateUrl: './num.component.html', | |
styleUrls: ['./num.component.css'] | |
}) | |
export class NumComponent implements OnInit { | |
_num; | |
numList = [ | |
{po:'500123'}, | |
{po:'94938'}, | |
{po:'7857'} | |
]; | |
constructor() { } | |
ngOnInit() { | |
} | |
} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ng g pipe numFilter | |
//num-filter.pipe.ts | |
import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'numFilter' | |
}) | |
export class NumFilterPipe implements PipeTransform { | |
transform(numList: any, _num: any): any { | |
if(_num === undefined) return numList; | |
return numList.filter(item => { | |
console.log(item.po.includes(_num)); | |
return item.po.includes(_num); | |
}) | |
} | |
} |
解決 electron 安裝失敗問題(Mac)
張貼者:
openopen
on 2018年6月2日 星期六
/
Comments: (0)
npm install -g electron 出現Error
permission denied, mkdir '/usr/local/lib/node_modules/electron/dist'
使用下列安裝就順利裝上去惹@@
sudo npm install -g electron --unsafe-perm=true --allow-root
[JavaFx] *Fix Failed to start sceneBuild via Intellij Idea for Mac
1. download SceneBuild
link:http://www.oracle.com/technetwork/java/javase/downloads/javafxscenebuilder-1x-archive-2199384.html#javafx-scenebuilder-2.0-oth-JPR
Intellij Idea -> Preferences
search "JavaFX"
then setting the path of sceneBuild App
Done!
link:http://www.oracle.com/technetwork/java/javase/downloads/javafxscenebuilder-1x-archive-2199384.html#javafx-scenebuilder-2.0-oth-JPR
Intellij Idea -> Preferences
search "JavaFX"
then setting the path of sceneBuild App
Done!
[解決] -bash: dotnet: command not found for Mac
裝完官網的 dotnet 要用就出現
就可以惹@@
-bash: dotnet: command not found
先用 /usr/local/share/dotnet/dotnet --info
看有沒有執行,有的話只是連結問題
改用 ln -s /usr/local/share/dotnet/dotnet /usr/local/bin/