Connecting:
psql -U postgresor
psql user_name(postgres) -h 127.0.0.1 -d db_name| const convertToSigned = num => num << 24 >> 24 |
| const toBinStr = num => (num >>> 0).toString(2).padStart(32,'0').match(/.{1,8}/g).join(' ') |
| function createPromiseChain(arrayForAsyncTasks) { | |
| let promiseChain = Promise.resolve(); | |
| for (let i = 0; i < arrayForAsyncTasks.length; i++) { | |
| const dataForAsyncTask = arrayForAsyncTasks[i]; | |
| promiseChain = promiseChain.then(() => { | |
| return doAsyncTask(dataForAsyncTask); | |
| }); | |
| } |
| 2021-06-23 10:24:58,455 [ 1660] ERROR - llij.ide.plugins.PluginManager - null | |
| java.lang.ExceptionInInitializerError | |
| at com.intellij.ide.IdeEventQueue.<clinit>(IdeEventQueue.java:80) | |
| at com.intellij.idea.StartupUtil.replaceSystemEventQueue(StartupUtil.java:788) | |
| at com.intellij.idea.StartupUtil.patchSystem(StartupUtil.java:772) | |
| at com.intellij.idea.ApplicationLoader.executeInitAppInEdt(ApplicationLoader.kt:58) | |
| at com.intellij.idea.ApplicationLoader.access$executeInitAppInEdt(ApplicationLoader.kt:1) | |
| at com.intellij.idea.ApplicationLoader$initApplication$1$1.run(ApplicationLoader.kt:363) | |
| at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316) | |
| at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770) |
| import * as React from "react"; | |
| import {DefaultNode} from "react-dag"; | |
| import { css, StyleAttribute } from "glamor"; | |
| import { getSettings } from "../../settings/dag-settings"; | |
| import { theme } from "../../styles"; | |
| export const endPointStyles = css({ | |
| "&.right": { | |
| left: "190px", |
| //instead of storing the File in the store I create an URL for the file and store that in the store | |
| onDrop = (filesAccepted) => { | |
| const file = filesAccepted[0]; | |
| const url = URL.createObjectURL(file); | |
| this.props.fileSelected({name: file.name, url: url}); /* this dispatches an action */ | |
| }; | |
| //then when I need the actual content I simply retrieve it like this: | |
| const blob = await fetch(file.url).then(r => r.blob()); |
| func checkErr(err error) { | |
| if err != nil { | |
| panic(err) | |
| } | |
| } |
| true && expression always evaluates to expression, and false && expression always evaluates to false. | |
| (Therefore, if the condition is true, the element right after && will appear in the output. If it is false, React will ignore and skip it) | |
| JSX example: | |
| <div> | |
| <h1>Hello!</h1> | |
| {unreadMessages.length > 0 && | |
| <h2> | |
| You have {unreadMessages.length} unread messages. | |
| </h2> | |
| } |