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
type PromiseObject<T> = { | |
promise: Promise<T>; | |
required: boolean; | |
}; | |
type PromiseResult<T> = T extends Promise<infer U> ? U : never; | |
type PromiseResults<T extends readonly PromiseObject<unknown>[]> = { | |
[K in keyof T]: T[K]['required'] extends true | |
? PromiseResult<T[K]['promise']> |
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
/* | |
* Finds and prints all usage of t() | |
* Use to extract translations | |
* Save as file and run: | |
* ts-node extract-translations.ts | |
* | |
* Change ROOT_PATH in this file if needed. | |
*/ | |
import { readFileSync, readdirSync, statSync } from 'fs'; |
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
{"lastUpload":"2020-09-03T15:47:18.938Z","extensionVersion":"v3.4.3"} |
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
import React from 'react'; | |
import { Sector, Cell, PieChart, Pie } from 'recharts'; | |
const GaugeChart = () => { | |
const width = 500; | |
const chartValue = 180; | |
const colorData = [{ | |
value: 40, // Meaning span is 0 to 40 | |
color: '#663399' | |
}, { |
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
java.lang.RuntimeException: Unable to start activity ComponentInfo{se.vgregion.rekapp/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: | |
Calling js method onCreate failed | |
Error: android.app.Fragment$InstantiationException: Unable to instantiate fragment com.tns.gen.android.app.Fragment_frnal_prepareExtend_l60_c37__PageFragmentBody: make sure class name exists, is public, and has an empty constructor that is public | |
android.app.Fragment.instantiate(Fragment.java:597) | |
android.app.FragmentState.instantiate(Fragment.java:98) | |
android.app.FragmentManagerImpl.restoreAllState(FragmentManager.java:1762) | |
android.app.Activity.onCreate(Activity.java:904) | |
com.tns.Platform.callJSMethodNative(Native Method) | |
com.tns.Platform.dispatchCallJSMethodNative(Platform.java:821) | |
com.tns.Platform.callJSMethod(Platform.java:708) |
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
Process: MailCompositionService [20544] | |
Path: /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.1.simruntime/Contents/Resources/RuntimeRoot/Applications/MailCompositionService.app/MailCompositionService | |
Identifier: MailCompositionService | |
Version: 1.0 (1.0) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd_sim [20491] | |
Responsible: launchd_sim [20491] | |
User ID: 501 | |
Date/Time: 2015-10-23 16:01:13.073 +0200 |
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
{ | |
"articleId": "1715401", | |
"classNameId": 0, | |
"classPK": 0, | |
"companyId": 1712101, | |
"content": "<?xml version=\"1.0\"?>\n\n<root available-locales=\"en_US,sv_SE\" default-locale=\"sv_SE\">\n\t<dynamic-element name=\"heading\" index=\"0\" type=\"text\" index-type=\"keyword\">\n\t\t<dynamic-element name=\"body\" index=\"0\" type=\"text_area\" index-type=\"keyword\">\n\t\t\t<dynamic-element name=\"type\" index=\"0\" type=\"list\" index-type=\"keyword\">\n\t\t\t\t<dynamic-content language-id=\"en_US\"><![CDATA[normal]]></dynamic-content>\n\t\t\t\t<dynamic-content language-id=\"sv_SE\"><![CDATA[normal]]></dynamic-content>\n\t\t\t</dynamic-element>\n\t\t\t<dynamic-element name=\"subheading\" index=\"0\" type=\"text\" index-type=\"keyword\">\n\t\t\t\t<dynamic-content language-id=\"en_US\"><![CDATA[]]></dynamic-content>\n\t\t\t\t<dynamic-content language-id=\"sv_SE\"><![CDATA[]]></dynamic-content>\n\t\t\t</dynamic-element>\n\t\t\t<dynamic-element name=\"image\" index=\"0\" type=\"document_library\" in |
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
DEMO 1 | |
<StackLayout orientation="vertical"> | |
<Button text="one"/> | |
<Button text="two"/> | |
<Button text="three"/> | |
<Button text="four"/> | |
<Button text="five"/> | |
</StackLayout> |
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
/** | |
* This Gulpfile will monitor files and restart node.js | |
* and reload the Chrome browser tab(s) when files changes. | |
* | |
* Dependencies: | |
* gulp npm install -g gulp (obviously as this is a gulp script) | |
* gulp-nodemon npm install gulp-nodemon | |
* chrome-cli brew install chrome-cli (https://github.com/prasmussen/chrome-cli) | |
* | |
* Installation |
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
<#-- ----------------------------------------------------------------- -> | |
- | |
- GETTING REAL TIME/DATE-STAMP | |
- | |
- When we ask Liferay for the create date of an article (or really we | |
- ask Liferay for the 'display-date' which is settable by the user) we get | |
- a string looking like this: 'Thu, 08 May 2014 11:48:00 +0000'. This | |
- string will always be in english and when we want to create a datetime | |
- object from it, we need to parse it with english locale. | |
- |