This file contains hidden or 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
| import numpy as np | |
| np.set_printoptions(precision=3, suppress=True) | |
| def eliminate_state(P, k): | |
| m = len(P) | |
| P_kk = P[k, k] | |
| info = { |
This file contains hidden or 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
| // frontend typeform-react | |
| import { PopupButton } from '@typeform/embed-react' | |
| export const MyComponent = () => { | |
| return ( | |
| <PopupButton | |
| id="eqn2wy8H" | |
| hidden={{ | |
| uid: `eyJhbGciOiJSUzI1NiIsImtpZCI6IjFhYWMyNzEwOTkwNDljMGRmYzA1OGUwNjEyZjA4ZDA2YzMwYTA0MTUiLCJ0` | |
| }} |
This file contains hidden or 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
| app.post('/webhook/typeform', async (request, response) => { | |
| console.log('Received webhook request'); | |
| const signature = request.headers['typeform-signature']; | |
| if (!signature) { | |
| console.error('No Typeform signature found in headers'); | |
| return response.status(400).send('No signature provided'); | |
| } | |
| const payload = request.body.toString(); |
This file contains hidden or 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
| const fs = require('fs'); | |
| // Reading a file | |
| fs.readFile('file.txt', 'utf8', (err, data) => { | |
| if (err) { | |
| console.error('Error reading file:', err); | |
| } else { | |
| console.log('File content:', data); | |
| } | |
| }); |
This file contains hidden or 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
| /* | |
| Valid Parentheses | |
| s = "({})" | |
| o/p: true | |
| s = "(){}[]" | |
| o/p: true |
This file contains hidden or 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
| class ListNode { | |
| constructor(val) { | |
| this.val = val; | |
| this.next = null; | |
| } | |
| } | |
| let getSum = head => { | |
| let ans = 0; | |
| while(head) { |
This file contains hidden or 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
| /** | |
| * Return true if palindrom | |
| * place i = 0; j = arr1.length - 1 | |
| * while i < j end of loop return TRUE | |
| * if (arr1[i] != arr1[j]) { | |
| * return false | |
| *} | |
| * i++; | |
| * j--; | |
| * Time Complexity: O(N) |
NewerOlder