adm_print_award.php?act=list&gov_code=110302&sn=1 列印獎狀統計表時的錯誤
修改themes/print.css
加入min-height: 96%;
body, html {
margin: 0;
padding: 0;
font-size: 12pt;
min-height: 96%;
}
adm_print_award.php?act=list&gov_code=110302&sn=1 列印獎狀統計表時的錯誤
修改themes/print.css
加入min-height: 96%;
body, html {
margin: 0;
padding: 0;
font-size: 12pt;
min-height: 96%;
}
參考網址:
最近買了samsung tab s6 lite,想發揮它的功能,試著營造程式編輯的環境。
首先當然要有editor
在windows的環境中習慣使用sublime text
在andriod的平台上也是有sublime text 只是功能很陽春,還帶了一大堆的廣告。
vscode的線上版似乎馬言也可以考慮,但試用結果是畫面顯示太複雜,不容易操作。而且存檔時需要將檔案下載,不符合操作習慣。
後來找來quick edit 高級版,得付費。一般版也是一堆廣告。
雖然功能不是很強,但還是勘用,一些簡單的編輯還可以應付。
ssh的部分用termus
sftp的部分用andftp,雖然termus也提供sftp的功能,但操作界面比較不友善。也找不到預設目錄的選項。
samsung 提供dex模擬桌機環境,可以讓平板的操作界面比較像桌機。
參考網址:https://gemmy886.blogspot.com/2011/03/inkscapesvg.html
Ctrl+Shift+T可以叫出文字與字型對話框,比較好找字體,並可預覽。
Inkscape預設字型並不支援中文字,需使用其它中文字型!
Inkscape預設中文字型依外型可分為三類:細明體、圓體、正黑體,顯示名稱都是英文,
除標示"B5"字型外,其他很難分辨是否支援中文字
Microsoft JhengHei 微軟正黑體 (Default Windows 7 繁體字型)
MingLiU 細明體(等寬的英文字型)
PMingLiU 新細明體(不等寬的英文字型)
KaiTi 標楷體 (找不到)
DF開頭的字型是華康字型
參考網址:
apt install imagemagick apt list imagemagick -a 特定版本 apt install imagemagick:6.9.7.4 Installing Imagick PHP Extension apt install php-imagick systemctl restart apache2
<?php
// Load the SVG file
$svgFilePath = 'path/input.svg';
$svgContent = file_get_contents($svgFilePath);
// Create an Imagick object and set the SVG content
$imagick = new Imagick();
$imagick->readImageBlob($svgContent);
// Set the image format for the output (e.g., PNG, JPEG)
$outputFormat = 'png'; // You can change this to your desired image format
// Optionally, you can adjust the image properties as needed
$imagick->setImageFormat($outputFormat);
$imagick->setImageBackgroundColor(new ImagickPixel('white')); // Set background color if needed
$imagick->setResolution(300, 300); // Set resolution (dots per inch)
// Perform the conversion
$imagick->setImageAlphaChannel(Imagick::ALPHACHANNEL_REMOVE); // Remove alpha channel if present
$imagick->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN); // Flatten the image
// Save the converted image to a file
$outputFilePath = 'path/output.' . $outputFormat;
$imagick->writeImage($outputFilePath);
// Clean up resources
$imagick->clear();
$imagick->destroy();
echo "Conversion completed. The image has been saved to: $outputFilePath";
?>
參考網址:
如何將 Excel 中兩行或多行的表格資料快速轉換成一行?
Excel 連在一起的字串想分割欄位,可使用關鍵字加空格全部取代方式 用資料剖析
Excel-時間表示的數值和文字轉換(TEXT,TIME,MID) =TEXT(A2,"hh時mm分")
參考網址:https://www.geeksforgeeks.org/bootstrap-5-offcanvas-sass/
bootstrap Offcanvas 預設寬度是400px,要改變寬度,似乎得從SASS下手
.offcanvas {
position: fixed;
bottom: 0;
z-index: var(--bs-offcanvas-zindex);
display: flex;
flex-direction: column;
max-width: 100%;
color: var(--bs-offcanvas-color);
visibility: hidden;
background-color: var(--bs-offcanvas-bg);
background-clip: padding-box;
outline: 0;
transition: transform 2s ease-in-out;
}
.offcanvas, .offcanvas-xxl, .offcanvas-xl, .offcanvas-lg, .offcanvas-md, .offcanvas-sm {
--bs-offcanvas-zindex: 1045;
--bs-offcanvas-width: 400px;
--bs-offcanvas-height: 30vh;
--bs-offcanvas-padding-x: 1rem;
--bs-offcanvas-padding-y: 1rem;
--bs-offcanvas-color: white;
--bs-offcanvas-bg: green;
--bs-offcanvas-border-width: 1px;
--bs-offcanvas-border-color: var(--bs-border-color-translucent);
--bs-offcanvas-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}
.offcanvas-title {
margin-bottom: 0;
line-height: 4;
}
上方將要改變的參數加入var()
下方再改變值
例如:
上方 width: var(--bs-offcanvas-width);
下方--bs-offcanvas-width: 200px;
參考網址:https://bootstrap5.hexschool.com/docs/5.0/content/tables/
表格的一些屬性被bootstrap重置了,以致於以下作法無效。
html表格table显示的宽度超出界面的解决方法
https://blog.csdn.net/weixin_44518466/article/details/111921984
<div style="overflow: auto;"> <table></table> </div>
原因是bootstap針對單一檔案內 CSS 的特定元素重置樣式,重置以便 Bootstrap 準確且一致的建立樣式。
https://bootstrap5.hexschool.com/docs/5.0/content/reboot/
解決方法是直接套用bootstrap的表格設定
<div class="table-responsive"> <table class="table table-bordered border-primary table-hover"> </table> </div>
參考網址:sairwolf's實驗室
fusion 360 官網目前尚未提供繁體中文語系支援,網路上找到的繁體中文化文件因為歷時已久,與目前的版本不符,會造成fusion 360 無法開啟。
於是參考網路上的文件,搭配MadEdit軟體,自行進行繁體中文化。
目前2023/11/26 fusion 360的版本是2.0.17721 x86_64
fusion 360的版本訊息可以在畫面右上角 幫助>>關於中找到
語系檔在
C:\Users\USER\AppData\Local\Autodesk\webdeploy\production\12593c1ae56cc14e7d670f0d4833077eca3f3583\StringTable
將zh-CN目錄複製改為zh-TW
再用MadEdit-mod把簡體中文轉換成繁體中文
巨集2tw.mpy
####====Todo:Add some help string for this====
#Use ####! as the prefix of the hotkey, eg ####!Ctrl-Shift-1 Ctrl, Shift, Alt are keys
#Create MadEdit Object for active edit
me = MadEdit()
me.ConvertChineseA(MadConvertEncodingFlag.SC2TC) # Flag
me.ReplaceTextAll("麵", fmt="面", bRegex=False, bCaseSensitive=False, bWholeWord=False, bDotMatchNewline=False, bPanChinese=False, rangeFrom=-1, rangeTo=-1)
me.ReplaceTextAll("復製", fmt="複製", bRegex=False, bCaseSensitive=False, bWholeWord=False, bDotMatchNewline=False, bPanChinese=False, rangeFrom=-1, rangeTo=-1)
me.ReplaceTextAll("幹涉", fmt="干涉", bRegex=False, bCaseSensitive=False, bWholeWord=False, bDotMatchNewline=False, bPanChinese=False, rangeFrom=-1, rangeTo=-1)
me.ReplaceTextAll("美製", fmt="美制", bRegex=False, bCaseSensitive=False, bWholeWord=False, bDotMatchNewline=False, bPanChinese=False, rangeFrom=-1, rangeTo=-1)
me.ReplaceTextAll("英製", fmt="英制", bRegex=False, bCaseSensitive=False, bWholeWord=False, bDotMatchNewline=False, bPanChinese=False, rangeFrom=-1, rangeTo=-1)
me.ReplaceTextAll("份析", fmt="分析", bRegex=False, bCaseSensitive=False, bWholeWord=False, bDotMatchNewline=False, bPanChinese=False, rangeFrom=-1, rangeTo=-1)
me.ReplaceTextAll("网格", fmt="網格", bRegex=False, bCaseSensitive=False, bWholeWord=False, bDotMatchNewline=False, bPanChinese=False, rangeFrom=-1, rangeTo=-1)
me.ReplaceTextAll("合並", fmt="合併", bRegex=False, bCaseSensitive=False, bWholeWord=False, bDotMatchNewline=False, bPanChinese=False, rangeFrom=-1, rangeTo=-1)
zh-TW_20250622_v2602.1.25 適用20250622_v2602.1.25
madedit-mod命令列測試成功
用cmd執行以下指令
madedit -s -m 2tw.mpy -w zh-TW/*.xml
執行之前先下madedit 確定madedit沒有編輯任何檔案,再執行,才會成功。
* Silent mode which can be used in scripting, no GUI will be shown
[-h], help, Displays help on the command line parameters
[-s], silent, Disables the GUI
[-m], madpython, Specify MadPython file to be run on the file
[-w], wildcard, Enable wildcard support in file name(line number would be disabled
Eg: madedit -s -m madpytho.mpy ./1.txt /tmp/2.txt
20250624更新:2tw.mpy中的me.ReplaceTextAll似乎都沒作用
解決方法:用sublime text的find in file功能執行取代
這是另一個簡體轉繁體的程式-繁化姬
轉換速度慢了些,但應該比較完整,也提供GUI界面
https://docs.zhconvert.org/
https://github.com/Fanhuaji/Fanhuaji-GUI-by-James1201/releases/tag/1.6.0
這裡有更完整的繁體中文化檔案,且經常更新
https://www.facebook.com/groups/3217194241834450
參考網址:https://segmentfault.com/a/1190000038976961
arr=[
[
'age'=>50,
'name'=>'张三'
],
[
'age'=>18,
'name'=>'李四'
],
[
'age'=>27,
'name'=>'王五'
]
];
我们怎么按照age或name排序呢?我们可以使用array_multisort这个函数来进行按指定字段排序。
array_multisort(array_column($arr,'age'),SORT_ASC,$arr);
var_dump($arr);
還有一個問題,如何指定第二個鍵值呢?
在 https://www.php.net/manual/en/function.array-multisort.php 找到答案
Arbitrarily sort the two-dimensional array according to multiple keys:
array_multisort (
array_column($array, 'key1'), SORT_ASC,
array_column($array, 'key2'), SORT_DESC,
array_column($array, 'key3'), SORT_ASC,
array_column($array, 'key4'), SORT_DESC,
$array
);