紀錄一下自己在用 tinygo 建立 wasm 時遇到的問題
2022-10-26
2022-10-18
2022-10-17
Less import 外部樣式
這是我在使用 Less 時遇到的問題
當我要引用外部的樣式,例如 google font:
@import url('https://fonts.googleapis.com/css2?family=Fredericka+the+Great');
@default-color: #333;
body{
color: @default-color;
font-family: 'Fredericka the Great', cursive;
}
會被編譯成如下的 css:
@font-face {
font-family: 'Fredericka the Great';
font-style: normal;
font-weight: 400;
src: url(https://fonts.gstatic.com/s/frederickathegreat/v15/9Bt33CxNwt7aOctW2xjbCstzwVKsIBVV-9Sk.ttf) format('truetype');
}
body {
color: #333;
font-family: 'Fredericka the Great', cursive;
}
可是,外部的 CSS 我並不想要直接將之轉換,我想要匯出的 CSS 依舊使用 @import
2022-10-06
FullCalendar Library 自定不同 views 的 tab 名
使用版本為 FullCalendar v5.11.2
FullCalendar 本身支援多種 view,例如 Month view、DayGrid View、Timeline……等等
但 tab 的名稱只會顯示 month、list……之類的
2022-10-05
Java 用 Stream 將 List<obj> 變成 Map<key, List<obj>>
例如我手邊有 class Student
class Student{
private int studentID, teacherID;
private String studentName;
public Student (int studentID, int teacherID, String studentName){
this.studentID = studentID;
this.teacherID = teacherID;
this.studentName = studentName;
}
public int getStudentID(){return studentID;}
public int getTeacherID(){return teacherID;}
public String getStudentName(){return studentName;}
public String toString(){
return String.format("[Student %02d: %s]", studentID, studentName);
}
}
假設我手邊有學生清單( List<Student>)
但我想看每個老師底下有哪些學生,換言之,想將之轉為 Map< int (teacherID), List<Student>>
2022-09-26
筆記:javascript 中 fetch 與 ajax 的差異
引自以下 twitter
`fetch()` will be the same as XHR at the network level, but for things like decoding JSON, it can do that work off-thread because the API contract is promise-based up-front.
— Alex Russell (@slightlylate) October 18, 2019
這位 Alex Russell 曾是 Google Chrome 框架的工程師
2022-09-21
2022-08-01
2022-07-21
2022-07-19
使用 jQuery Datatables plugin 時,出現 Bean 錯誤
這是最近在處理 spring MVC 專案時遇到的問題。
這個專案前端使用了 jQuery + Datatable plugin;
而在後端,則是這樣寫(FooBarSearch 是一個 Bean)
@RequestMapping(value="/search")
public @ResponseBody ForBarResultBean search(FooBarSearch search)
2022-06-30
2022-06-16
2022-06-15
如何讓 tomcat 執行 php
因為某些緣故,需要有個 wordpress 環境,為了方便,所以想說本來電腦就有 tomcat 就看看能不能用 tomcat 直接執行 php。
結果上網查了查,還真的有辦法,在此紀錄一下:
訂閱:
文章 (Atom)