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
CREATE TRIGGER Trigger_name -> declraing a trigger with Trigger_name | |
(AFTER) -> when the trigger will be executed | |
[ INSERT | UPDATE | DELETE ] -> The operation that can be performed | |
ON [Table_Name] -> which table to do the operation on | |
AS | |
[ Trigger_body ] -> the queries to be executed by trigger | |
CREATE TRIGGER trigger_name ON ms_customers | |
AFTER INSERT,UPDATE,DELETE | |
AS BEGIN |
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
#include <stdlib.h> | |
// [0]------[3] | |
// | \ | |
// | [2] | |
// | / | |
// [1] | |
typedef struct node{ | |
int 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
/** | |
* Function to do inorder traversal on ReactNode | |
* | |
* Figma: https://www.figma.com/file/o8BlRzxU0XHllNYEcaJZSC/Learn?type=design&node-id=165%3A194&mode=design&t=K17WgqtrFBvJ28gQ-1 | |
* Gist: https://gist.github.com/alfonsusac/01a9562a3883e196af6c7c7addc06b54 | |
*/ | |
async function visitJSX2( | |
jsx: ReactNode, | |
cb: (p: { | |
primitive?: string | number | boolean, |
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
function Flow() { | |
const steps = ['new account', 'enter OTP', 'add pfp', 'add bio...' ] // The names doesn't matter, as long as its an array | |
const [step, setStep] = useState(0) | |
const handleNextStep = () => { | |
if(step < steps.length - 1) // limit max steps | |
setStep(prev => prev + 1) | |
} | |
const handlePrevStep = () => { |
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
// Usage | |
export function Model( | |
props: { | |
data: NodeData | |
onDragEnd: (newPos: Pos) => void | |
} | |
) { | |
const [position, setPosition] = useState(props.data.position) |