Skip to content

Instantly share code, notes, and snippets.

View anirudhjain75's full-sized avatar
🏠
Working from home

Anirudh Jain anirudhjain75

🏠
Working from home
  • New Delhi
View GitHub Profile
package main
import "fmt"
func twoSum(intArr []int, sum int) (int, int) {
m := make(map[int]int)
for _, v := range intArr {
m[v] = v
}
a, b := 0, 0
cpanm (App::cpanminus) 1.9018 on perl 5.018004 built for darwin-thread-multi-2level
Work directory is /Users/cyna/.cpanm/work/1568615762.85095
You have make /usr/bin/make
You have LWP: 6.05
You have LWP::Protocol::https: 6.04
You have /usr/bin/tar: bsdtar 2.8.3 - libarchive 2.8.3
You have /usr/bin/unzip
--> Working on .
Entering /Users/cyna/Projects/musicbrainz-server
Configuring /Users/cyna/Projects/musicbrainz-server
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ root/entity/alias/EditForm.js:403:34
Cannot create EditAlias element because:
• property close_time is missing in object literal [1] but exists in Props [2] in property edit.
• property conditions is missing in object literal [1] but exists in Props [2] in property edit.
• property created_time is missing in object literal [1] but exists in Props [2] in property edit.
• property data is missing in object literal [1] but exists in Props [2] in property edit.
• property edit_type is missing in object literal [1] but exists in Props [2] in property edit.
• property editor_id is missing in object literal [1] but exists in Props [2] in property edit.
• property expires_time is missing in object literal [1] but exists in Props [2] in property edit.
Cannot create AddRemoveAlias element because:
• number [1] is incompatible with string [2] in property
edit.display_data.locale.
• inexact null [3] is incompatible with exact OptionTreeT [4] in property
edit.display_data.type.
• property child_order is missing in object literal [5] but exists in
OptionTreeT [4] in property edit.display_data.type.
• property description is missing in object literal [5] but exists in
OptionTreeT [4] in property edit.display_data.type.
• property entityType is missing in object literal [5] but exists in
Error: No translation key found.
at Jed.dcnpgettext (/musicbrainz/node_modules/jed/jed.js:169:13)
at Jed.dpgettext (/musicbrainz/node_modules/jed/jed.js:110:17)
at eval (webpack:///./root/static/scripts/common/i18n/wrapGettext.js?:74:20)
at AddRemoveAlias (webpack:///./root/edit/details/AddRemoveAlias.js?:50:1756)
at processChild (/musicbrainz/node_modules/react-dom/cjs/react-dom-server.node.development.js:2871:14)
at resolve (/musicbrainz/node_modules/react-dom/cjs/react-dom-server.node.development.js:2795:5)
at ReactDOMServerRenderer.render (/musicbrainz/node_modules/react-dom/cjs/react-dom-server.node.development.js:3175:22)
at ReactDOMServerRenderer.read (/musicbrainz/node_modules/react-dom/cjs/react-dom-server.node.development.js:3134:29)
at Object.renderToString (/musicbrainz/node_modules/react-dom/cjs/react-dom-server.node.development.js:3619:27)
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ root/entity/alias/EditForm.js:154:28
Cannot create EnterEdit element because inexact AliasFormT [1] is incompatible with exact FormT [2] in property form.
root/entity/alias/EditForm.js
[1] 23│ form: AliasFormT,
:
151│ type="alias"
152│ />
153│ <EnterEditNote field={form.field.edit_note} hideHelp />
@anirudhjain75
anirudhjain75 / temp 1
Created June 17, 2019 09:02
Flow errors
Anirudhs-MacBook-Pro:alias cynide$ yarn run flow .
yarn run v1.15.2
$ /Users/cynide/Documents/Projects/musicbrainz-server/node_modules/.bin/flow .
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ root/static/scripts/common/utility/displayLinkAttribute.js:31:16
Cannot call l with object literal bound to the second parameter because string [1] is incompatible with T [2] in
property value.
root/static/scripts/common/utility/displayLinkAttribute.js
26│ if (type.free_text) {
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ root/entity/alias/EditForm.js:93:33
Cannot call setState with object literal bound to the first parameter because:
• read-only array type [1] is incompatible with array type [2] in property errors.
• number [3] is incompatible with string [4] in property value.
• string [5] is incompatible with number [6] in property value.
root/entity/alias/EditForm.js
90│ entityType={entityType}
91│ field={state.aliasName}
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ root/entity/alias/EditForm.js:190:23
Cannot call setState with object literal bound to the first parameter because:
• read-only array type [1] is incompatible with array type [2] in property
errors.
• string [3] is incompatible with number [4] in property value.
root/entity/alias/EditForm.js
185│ field={state.type}
186│ label={l('Type:')}
/*
* @flow
* eslint-disable flowtype/no-mutable-array
* Copyright (C) 2019 Anirudh Jain
* Copyright (C) 2019 MetaBrainz Foundation
*
* This file is part of MusicBrainz, the open internet music database,
* and is licensed under the GPL version 2, or (at your option) any
* later version: http://www.gnu.org/licenses/gpl-2.0.txt
*/