Filter
Exclude
Time range
-
Near
Replying to @meijer_s
Today actually. foo: while(childNode) { while(siblingNode) { if (siblingNode.nodeType === 4) break foo; } }
1
2
114
Most Common DOM methods⬇️🔥 ✅querySelector & querySelectorAll ✅InnerHTML, innerText & textContent ✅getAttribute() & setAttribute() ✅appendChild() & removeChild() ✅createElement() ✅parentNode, childNode ✅classList.add ✅addEventListener() ✅Window.onload() #developers #Code
6
136
#Taproot #BTC #Atomicals 现在可以写长文了,这里重写一下这篇文章的实现 bitcoin core 创建的taproot地址无法导出私钥的解决办法: 1、先用bitcoin core钱包导出主私钥xprv bitcoin core 钱包是基于一个主私钥然后加上HD_path 路径生成的无数个私钥,那么如何导出主私钥 打开控制台,输入 :listdescriptors true ,主私钥就是我下面截图红框中的内容,这个就是主私钥 2、xprv 提取出单独某个地址的私钥 原理: xprv HD_path 如何生成 taproot 地址的,是由HD_path 指定 BIP44、BIP84 和 BIP86 等提案定义了如何从一个主密钥派生出各种类型的地址。 BIP44 路径 (m/44'/0'/0'/0/0) 通常用于生成传统的 P2PKH 地址,即以"1"开头的地址。 BIP49 路径 (m/49'/0'/0'/0/0) 用于生成 P2SH-P2WPKH 地址,这是一种结合了 P2SH 和 SegWit 特性的地址,也可能以"3"开头。 BIP84 路径 (m/84'/0'/0'/0/0) 用于生成 P2WPKH 地址,这是一种纯 SegWit 地址,它们通常以"bc1"开头,不同于以"1"或"3"开头的地址。 BIP86 路径 (m/86'/0'/0'/0/0): 86' 代表 BIP86 标准。 0' 第一次出现表示比特币。 第二个 0' 表示第一个账户。 第一个 0 表示外部链(用于接收资金的地址)。 第二个 0 表示特定地址的索引。 Taproot 是比特币的一个重大升级,它增强了隐私性、扩展性和安全性。与传统的 P2PKH (1 开头) 和 P2SH (3 开头) 地址不同,Taproot 地址通常以 bc1p 开头。这些地址使用了 Schnorr 签名和 MAST(Merkelized Abstract Syntax Trees),使得复杂的智能合约在区块链上的表现更加高效和隐私。 BIP86 的引入主要是为了充分利用 Taproot 的这些优势,提供一种简洁的方式来生成和管理这类地址。通过这种路径,用户可以从同一个种子生成一系列的 Taproot 地址,同时保持良好的组织和安全性。 我们这里要用的就是BIP86 下面上主要代码,通过不同的path 来打印对应的私钥和地址,找到自己对应的地址的私钥就能完成了。 借助以下node.js 代码实现: import { LocalWallet, NetworkType, toPsbtNetwork, } from "@unisat/ord-utils/lib/LocalWallet.js"; import { BIP32Factory } from "bip32"; import * as ecc from "tiny-secp256k1"; import * as bitcoin from "bitcoinjs-lib"; const bip32 = BIP32Factory(ecc); const AddressType = { P2PKH: 0, P2WPKH: 1, P2TR: 2, P2SH_P2WPKH: 3, M44_P2WPKH: 4, M44_P2TR: 5, }; function importWalletWithXprv(xprv,path ) { const root = bip32.fromBase58(xprv); const childNode = root.derivePath(path); const privateKey = childNode.toWIF(); console.log(privateKey); const addressType = AddressType.P2TR; const networkType = NetworkType.MAINNET; const wallet = new LocalWallet(privateKey, networkType, addressType); console.log(wallet.address); return [privateKey ,wallet.address] } // Example usage: const path = `m/86'/0'/0'/0/0`; // The derivation path might change according to your xprv and what you want to derive const xprv = ""; importWalletWithXprv(xprv,path ); // Replace 'your-xprv-here' with your actual xprv 这里的0可以自己用代码替换,然后无限生成地址 3、然后私钥导入atom wallet 4、发现bitcion core 创建的地址 和atom wallet钱包显示的一摸一样
12
25
51
16,653
the ability to preload resources syntax for accessing the scene tree - $ChildNode instead of GetNode("Child") @onready to fetch values when a node enters the scene tree can use Autoloads without needing to GetNode them other engine things with C# equivs are a bit more convenient
1
2
71
Day 2 of #100DaysOfCode 1. DSA- Solved CodeChef practice que, Linked list Theory .✅ 2. ChildNode, Parent, Siblings, Element only Navigation, Table navigation in Javascript.✅ 3. Started working on my Personal Portfolio.✅
5
76
Append Elements 🏵️ parentNode.appendChild(childNode) appends childNode as the last child of parentNode 🏵️ parentNode.insertBefore(newNode, referenceNode) inserts newNode into parentNode before referenceNode
1
5
556
技術的メモ5。contentEditable="plaintext-only"にinnerTextで文字列を代入すると、改行ごとにchildNodeが作られる。この場合、本文はTextノード、改行はBR要素になる。しかし領域内で文字入力をした場合は、改行が改行文字のTextノードになり混在する。
1
2
196
技術的メモ4。contentEditable="plaintext-only"にして、textContentで文字列を代入すると、巨大なchildNodeが1つだけ作られるので操作しやすい。しかし、改行位置で分断された段落間を矢印キーで移動できなくなる問題が発生する。また、改行2つ以上の場所にキャレットを移動できなくなる。
1
2
204
el.childNodes.forEach内でchildNodeを移動したり削除したりするとループが期待しない挙動になるからArray.from(el.childNodes).forEachとして配列に弱参照してあげる必要があるの知見だ。
1
1
5
1,115
#100daysofcode #javascript Day-24 ->Learnt about traversing Dom tree in JS: parentNode, childNode and EventListeners. ->Fixed the mobile design of guess my number game. ->Made mini project of modal window.
1
5
I also felt there weren’t many beginner friendly tutorials on this, may be just my experience but I had to do a-lot of trial/error to get this working. There has to be a better way of selecting text inside list items than parentNode/childNode…
1
2
Day 8 #100daysofcode Still on DOM manipulation. Learnt the difference between HTML collection list and a NodeList. Also I learnt childNode, children and parentNode PS. I type in camel casing now😂
1
6
23
Js:DOM-> Always use reverse for loop for elements returned by a method "getElementByTagName" As its a live childNode and itz updated as document changes.#javascript
2
Day 48 Done - #100DaysOfCode Traversing the DOM in #javascript Day(19) Traverse means moving up and down. ChildNode (node list) Children (html collections) • fristChild • lastChild Parent node Siblings • Next sibling • Prev sibling 👇NodeTypes in Child Node
1
6
4
Replying to @mpyw
店員さん「メニューはこちらです♪」 developer.mozilla.org/ja/doc… 私「うーん、今日はこのChildNodeセットを注文しようかな」

1
3
6
✅ Day 30: - DOM Properties - children - firstChild - firstElementChild - ChildNode - Ways of Selecting Elements - getElementById - querySelector - querySelectorAll - Exercise - Adding an Element through JavaScript @academind_real #100DaysOfCode
2
4
9 Dec 2020
#100DaysOfCode Day 25 Learnt about the DOM node relationship and how to navigate through them using the parentNode,ChildNode, siblings and the other relatives..lol Also learnt how to create new element, use the appendChild element and also remove an existing html element
1
1
4
Replying to @Omo_Afeja
Imagine childNode being the childNodes of your said parent. If you want to swap two childNodes then, you would do something like the following: childNode[0].parentNode.insertBefore(childNode[0], childNode[1]);
1
#今日の積み上げ ✅DOM編半分 ▫️DOM、Node ▫️.querySelector ▫️.textContent ▫️.getElementById ▫️.childNode ▫️.addEventListener ▫️.style ▫️.className ▫️.classList ▫️ data- ▫️.dataset ▫️.createElement ▫️.appendChild ▫️.cloneNode ▫️.insertBefore #プログラミング初心者
9
23 Jan 2020
XPATHの絶対パスと相対パスの使い方間違ってた。SingleNodeでChildNodeを選択してても、そのSingleNodeを参照するときに絶対パス使うとルートノードからの検索になるんだな。
3