What do you want to save?
Add Code snippet
New code examples
-
Other 2021-09-13 12:42:03
mirror a binary tree
//mirror a binary tree void mirror(Node root){ Queue<Node> q=new LinkedList<>(); q.add(root); while(!q.isEmpty()){ Node currnode=q.poll(); Node temp=currnode.left; currnode.left=currnode.right; currnode.right=temp; if(currnode.left!=null){ q... Add solution -
Javascript 2021-09-13 01:43:03
npm concurrently
// The tool is written in Node.js, but you can use it to run any commands. npm install -g concurrently // or if you are using it from npm scripts: npm install concurrently --save // Remember to surround separate commands with quotes: concurrently "... Add solution -
Javascript 2021-09-12 06:52:01
how to use node.js in html file
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <title>The Page Returned by Making Http Call to Node.js<... Add solution -
Javascript 2021-09-11 06:19:02
JavaScript after
//insert new Element after some reference Element function insertAfter(newElement, referenceElement) { referenceElement.parentNode.insertBefore(newElement, referenceElement.nextSibling); } //example usage var newElement = document.createElement("... Add solution -
Other 2021-09-10 19:49:04
gatsby markdown blog
Copygatsby-node.js: copy code to clipboardexports.createPages = async ({ actions, graphql, reporter }) => { const { createPage } = actions const blogPostTemplate = require.resolve(`./src/templates/blogTemplate.js`) const result = await graphql(` ... Add solution -
Java 2021-09-10 19:44:01
java serializer
public class someClass { //your lcode and logic... ObjectMapper mapper = new ObjectMapper(); SimpleModule module = new SimpleModule(); module.addSerializer(MyAwesomeClass.class, new MyAwesomeSerializer()); mapper.registerModule(module); jsonNode = mapper... Add solution