Skip to content

Instantly share code, notes, and snippets.

View mym0404's full-sized avatar
๐Ÿ”Š
Loud your code

MJ Studio mym0404

๐Ÿ”Š
Loud your code
View GitHub Profile
{"version":1,"resource":"file:///Users/user1/Desktop/ho/happymeal/src/app/%28public%29/%28tabs%29/explore.tsx","entries":[{"id":"yLjF.tsx","timestamp":1741588339252},{"id":"ZEEZ.tsx","timestamp":1741588644563},{"id":"OBAD.tsx","source":"undoRedo.source","timestamp":1741588647400},{"id":"H8He.tsx","timestamp":1741588760227}]}
ZX Utility...
const projectRoot = cwd();
export let VERSION_NAME = '';
export let VERSION_CODE = '';
async function init() {
const content = read(resolve(projectRoot, 'app.config.ts'));
VERSION_NAME = /const VERSION_NAME = '(.*?)';/.exec(content)[1];
class **$NAME$**Adapter : RecyclerView.Adapter<**$NAME$**Adapter.Holder>() {
private var items: List<**$DATA$**> = listOf()
fun submitList(items: List<**$DATA$**>) {
this.items = items
notifyDataSetChanged()
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): Holder {
val inflater = LayoutInflater.from(parent.context)
val binding = Item**$NAME$**Binding.inflate(inflater, parent, false)
return Holder(binding)
data class MyData(val id: Int)
class MyAdapter : RecyclerView.Adapter<MyAdapter.Holder>() {
private var items: List<MyData> = listOf()
fun submitList(items: List<MyData>) {
this.items = items
notifyDataSetChanged()
}
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): Holder {
val inflater = LayoutInflater.from(parent.context)
import 'dart:async';
main() {
print('main #1 of 2');
scheduleMicrotask(() => print('microtask #1 of 3'));
new Future.delayed(
new Duration(seconds: 1), () => print('future #1 (delayed)'));
new Future(() => print('future #2 of 4'))
import 'dart:async';
main() {
print(1);
futureNoDelay(2).then(print);
future(3).then(print);
futureSync(4).then(print);
futureSyncReturnFuture(5).then(print);
futureSyncReturnFutureValue(6).then(print);
futureValue(7).then(print);
void main() async {
runZonedGuarded(() {
print('Hi I am in a new zone');
throw 1;
}, (e, s) {
print(e);
});
import 'dart:isolate';
printIsolateName() {
print(Isolate.current.debugName);
}
void main() async {
printIsolateName(); // main
Future.delayed(Duration(seconds: 0)).then((_) {
printIsolateName(); // main
n, m = map(int, input().split())
a = list(map(int, input().split()))
psum = [0] * (n + 1)
for i in range(n):
psum[i + 1] = (psum[i] + a[i]) % m
answer = 0
remainder_cnt = [0] * m
n, k, b = map(int, input().split())
active = [1 for _ in range(n + 1)]
for i in range(b):
broken = int(input())
active[broken] = 0
active[0] = 0
answer = 10 ** 9