ThinkingBoard
All css/js are self-written; no external dependencies.
Java - Spring Boot
Ham teacher is love, ham teacher is life
On clone use:
Rename application.properties_editOnUse
to application.properties
Change datasource
password
Notes to self
How to pass model attributes between Spring MVC controllers
Promise
chain:
How to
Promise
chain:new Promise((resolve, reject) => {
// Do something <...>
let result = 'result'; // any result
resolve(result);
}).then(result => {
// Do something with the `result` <...>
let pass = `wooked on ${result}`;
return pass;
}).finally(() => {
// Do something finally <...>
// executes on either `resolve` or `reject` <doesn't matter>
return 'sth this ended';
});
end
transition
style:
How to
transition
style:* { transition: 400ms; }
button { font-size: 2em; margin-bottom: 1em; padding: .5em;}
#sth {
background-color: lightpink;
padding: 1em;
height: 0;
}
#sth.active {
/* stuff to transit */
height: 40em;
background-color: lavender;
}
<button onclick="sth.doTransition()">do transition</button>
<div id="sth"></div>
let sth = {};
sth.tdur = getComputedStyle(document.body).transitionDuration;
sth.tdur = Number(sth.tdur.replace('s', '')) * 1000; // 400
sth.doTransition = function () {
document.getElementById('sth').classList.toggle('active');
setTimeout(() => console.log('transition has wooked | resolve(value)'), this.tdur);
}
end
position
center
:
How to
position
center
:<div>
[something text]
<p>[something item]</p>
<pre>[something pre]</pre>
</div>
div {
align-items: center; /* vertical */
justify-content: center; /* horizontal */
position: fixed;
top: 0; left: 0;
width: 100%; height: 100%;
display: flex;
}
end
MySQL
search
case sensitivity
How to
MySQL
search
case sensitivity
(but not really)
ALTER TABLE `dimigo`.`boardpost`
MODIFY COLUMN title VARCHAR(200) CHARACTER SET euckr, COLLATE = euckr_korean_ci,
MODIFY COLUMN content VARCHAR(1000) CHARACTER SET euckr, COLLATE = euckr_korean_ci;
-- cs = case sensitive, ci = case insentive
-- ( >> theoretically << )
-- going back to euckr_bin doesn't really work in workbench
-- ^^^^^^^
ALTER TABLE `dimigo`.`boardpost`
MODIFY COLUMN content VARCHAR(1000) CHARACTER SET euckr, COLLATE = euckr_bin;
-- or something
ALTER TABLE `dimigo`.`boardpost`
MODIFY COLUMN content VARCHAR(1000) CHARACTER SET euckr, COLLATE = utf8mb4_0900_as_cs;
end