What do you want to save?
Add Code snippet
New code examples
-
C 2022-03-27 18:00:02
C example of if else
if (<condition>) { <code> } else if (<condition>) { <code> } else { <code> } /* example */ int money = 50; if (money < 15) { go_home(); } else if (money >= 600) { buy_all(); } else { buy_tickets(money / 15); } /... Add solution -
TypeScript 2022-03-27 08:30:01
unit test naming convention
MethodName_StateUnderTest_ExpectedBehavior Example: add_twoPositiveIntegers_returnsTheirSum() Variant: Add_TwoPositiveIntegers_ReturnsTheirSum() Note: This is not camel case, so the question of whether to start each new chunk with a capital is up... Add solution -
Javascript 2022-03-27 07:05:02
queue data structure in javascript 2018
var Queue = (()=>{ const map = new WeakMap(); let _items = [] class Queue{ constructor(...items){ //initialize the items in queue map.set(this, []); _items = map.get(this); // enqueuing the items passed to the construc... Add solution -
Python 2022-03-25 00:20:01
python list as stack and queue
def isEmpty(stk): # checks whether the stack is empty or not if stk==[]: return True else: return False def Push(stk,item): # Allow additions to the stack stk.append(item) &... Add solution -
Javascript 2022-03-24 21:35:23
check web3 metamask disconnect
// The following code snippet is in React // but you can use the window.ethereum.on("accountsChanged") event // in regular JavaScript // Note: I believe window.ethereum is only available if using Metamask // as your web3 provider useEffect((... Add solution -
Other 2022-03-23 07:25:10
rest api meaning
An application program interface (API) is a set of routines, protocols, and tools for building software applications. Basically, an API specifies how software components should interact. Additionally, APIs are used when programming graphical user interfa... Add solution -
Other 2022-03-22 23:30:22
what is your expectations from the company
what do you expect from us? First of all thank you for asking my expectations. This question shows that you actually value for your employees and their expectations. So if I get hired my expectation would be for short term smooth transition to my new job ... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5