Natural spawning in Bedrock Edition shares only a few similarities to natural spawning in Java Edition. In Bedrock Edition, there are two main types of natural spawns: pack spawns and structure mob spawns. Structure mob spawns are mobs spawned as part of a structure, such as nether fortresses, witch huts, etc. Pack spawns account for all other types of natural spawns, including mobs that spawn individually (i.e. not in a pack of 2 or more). Both types of natural spawns follow the same rules for spawn conditions and the mob cap.
This file contains 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
(* | |
* A original problem is here. | |
* https://twitter.com/kokuyouwind/status/1141602930019061760 | |
*) | |
fun fizzBuzz n = | |
let | |
val div3 = n mod 3 = 0 | |
val div5 = n mod 5 = 0 | |
in |
This file contains 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
(let ((a (list 2 1))) | |
(sort a #'<) | |
a) | |
;; => (2) | |
(let ((a (list 1 2))) | |
(sort a #'<) | |
a) | |
;; => (1 2) |
This file contains 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
(let* ((a (...)) | |
(a (if cond a (f a))) | |
(a (...))) | |
g a) |
This file contains 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
(defvar test-var 1) | |
(symbol-value 'test-var) | |
;; => 1 | |
(defun f () test-var) | |
(symbol-function 'f) | |
;; => (lambda nil test-var) | |
(f) |
This file contains 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
;; ivy-richが提供する変数、一部省略 | |
;; この先頭に(#'counsel-switch-buffer A)を足したい | |
(defcustom ivy-rich-display-transformers-list | |
'(ivy-switch-buffer | |
(...) ; A | |
counsel-M-x | |
(...) | |
counsel-describe-function | |
(...) | |
counsel-describe-variable |
This file contains 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
local | |
fun cleanHeadNone nil = nil | |
| cleanHeadNone (NONE :: t) = cleanHeadNone t | |
| cleanHeadNone (l as SOME _ :: _) = l | |
fun cleanEndNone l = (rev o cleanHeadNone o rev) l | |
fun simpleMin nil = raise Fail "Empty" | |
| simpleMin [NONE] = raise Fail "End with NONE" | |
| simpleMin [SOME x] = (x, nil) | |
| simpleMin (NONE :: t) = min t | |
| simpleMin (SOME x :: t) = |
This file contains 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
#!/bin/bash -eu | |
# https://qiita.com/youcune/items/fcfb4ad3d7c1edf9dc96 | |
# -euでエラーか未定義変数でストップする | |
script_dir="$(cd $(dirname $0); pwd -P)" | |
# Color message | |
NORMAL=$(tput sgr0) |
This file contains 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
/* | |
1. クラス内で配列データを持ちたい | |
2. 配列は定数長 | |
3. 定数長値をメソッドで使いたい | |
4. .hは定義、.cppは本体に分けたい | |
*/ | |
// .h | |
#define N 4 // 最終手段感 | |
class Example1 { |
This file contains 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
// 実際はQtのライブラリであるQTimer | |
// https://github.com/radekp/qt/blob/master/src/corelib/kernel/qtimer.h#L98 | |
class DisableCopy { | |
public: | |
explicit DisableCopy(Object *parent) { // 引数ありコンストラクタ | |
// ... | |
} | |
private: | |
DISABLE_COPY(DisableCopy) // マクロでコピーが禁止されている | |
}; |