type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
TypeAliasDeclaration |
type VideoPropertiesProps = {
isSubmitting?: boolean
} | Etherna/etherna-dapp | src/components/media/VideoEditor/VideoProperties/VideoProperties.tsx | TypeScript |
MethodDeclaration |
updateTitle(e | Etherna/etherna-dapp | src/components/media/VideoEditor/VideoProperties/VideoProperties.tsx | TypeScript |
MethodDeclaration |
updateDescription(value) | Etherna/etherna-dapp | src/components/media/VideoEditor/VideoProperties/VideoProperties.tsx | TypeScript |
FunctionDeclaration |
export function Load() {
const theme = useTheme();
return (
<ActivityIndicator
color={theme.colors.main}
size="large"
style={{ flex: 1 }} | AndreBento/ignite-mobile-rentx | src/components/Load/index.tsx | TypeScript |
FunctionDeclaration |
export default function TransferList(props: {
left: string[];
setLeft: (data: string[]) => void;
right: string[];
setRight: (data: string[]) => void;
itemComp?: React.ComponentType<{ value: string }>;
}) {
const [checked, setChecked] = React.useState<string[]>([]);
const { left, setLeft, ri... | Cricfies/Cromwell | system/admin-panel/src/components/transferList/TransferList.tsx | TypeScript |
ArrowFunction |
() => {
setRight(right.concat(leftChecked));
setLeft(not(left, leftChecked));
setChecked(not(checked, leftChecked));
} | Cricfies/Cromwell | system/admin-panel/src/components/transferList/TransferList.tsx | TypeScript |
ArrowFunction |
() => {
setLeft(left.concat(rightChecked));
setRight(not(right, rightChecked));
setChecked(not(checked, rightChecked));
} | Cricfies/Cromwell | system/admin-panel/src/components/transferList/TransferList.tsx | TypeScript |
ClassDeclaration |
export default class NpcSay extends GameClientPacket {
// @Override
readImpl(): boolean {
const _id = this.readC();
const _charObjId = this.readD();
const _textType = this.readD();
const _npcId = this.readD() - 1000000;
const _npcString = this.readD();
const _messages = [];
while (this... | SpellsingerX/l2js-client | src/network/incoming/game/NpcSay.ts | TypeScript |
MethodDeclaration | // @Override
readImpl(): boolean {
const _id = this.readC();
const _charObjId = this.readD();
const _textType = this.readD();
const _npcId = this.readD() - 1000000;
const _npcString = this.readD();
const _messages = [];
while (this._offset + 1 < this._buffer.byteLength) {
_messages.pu... | SpellsingerX/l2js-client | src/network/incoming/game/NpcSay.ts | TypeScript |
ArrowFunction |
async () => {
const configProvider = await ConfigProvider.create();
// Initialize UI
const initialConfig = configProvider.getConfig();
gitpodUrlInput.value = initialConfig.gitpodURL;
gitpodPopupInput.checked = initialConfig.openAsPopup;
let timeout: number | undefined = undefined;
// Sav... | drud/ddev-browser-extension | src/options/options.ts | TypeScript |
ArrowFunction |
() => {
// Update config (propagated internally)
configProvider.setConfig({
gitpodURL: gitpodUrlInput.value || undefined,
openAsPopup: gitpodPopupInput.checked
});
if (timeout) {
window.clearTimeout(timeout);
timeout = undefined;
}... | drud/ddev-browser-extension | src/options/options.ts | TypeScript |
ArrowFunction |
() => { messageElement.innerText = ""; timeout = undefined } | drud/ddev-browser-extension | src/options/options.ts | TypeScript |
ArrowFunction |
(event: KeyboardEvent) => {
if (event.isComposing || event.keyCode === 229) {
return;
}
save()
} | drud/ddev-browser-extension | src/options/options.ts | TypeScript |
ArrowFunction |
err => console.error(err) | drud/ddev-browser-extension | src/options/options.ts | TypeScript |
FunctionDeclaration |
function Pagination({
totalElements,
size,
page,
setPage,
}: PaginationProps): ReactElement {
return (
<PaginationWrapper>
<PaginationComponent
activePage={page} // 현재 페이지
itemsCountPerPage={size} // 한 페이지당 보여줄 리스트 아이템의 개수
totalItemsCount={totalElements} // 총 북마크의 개수
... | YAPP-19th/Web-Team-2-Frontend | web/src/components/bookmark/Pagination.tsx | TypeScript |
ArrowFunction |
(props) => props.theme.color.gray | YAPP-19th/Web-Team-2-Frontend | web/src/components/bookmark/Pagination.tsx | TypeScript |
ArrowFunction |
(props) => props.theme.color.black | YAPP-19th/Web-Team-2-Frontend | web/src/components/bookmark/Pagination.tsx | TypeScript |
InterfaceDeclaration |
interface PaginationProps {
totalElements: number;
size: number;
page: number;
setPage: (page: number) => void;
} | YAPP-19th/Web-Team-2-Frontend | web/src/components/bookmark/Pagination.tsx | TypeScript |
FunctionDeclaration |
export function configure<T extends Test>(test: T, options?: SetupOptions & ResetOptions): T {
test.before(() => {
setup(options)
})
test.before.each(() => reset(options))
test.after(destroy)
return test
} | RaphaelGimenez/twind | src/__fixtures__/dom-env.ts | TypeScript |
FunctionDeclaration |
export function setup({
html = '<!DOCTYPE html>',
url = 'http://localhost',
console = global.console,
}: SetupOptions = {}): JSDOM {
const dom = new JSDOM(html, {
pretendToBeVisual: true,
runScripts: 'dangerously',
url,
virtualConsole: new VirtualConsole().sendTo(console),
})
const { defau... | RaphaelGimenez/twind | src/__fixtures__/dom-env.ts | TypeScript |
FunctionDeclaration |
export function reset({ title = '', head = '', body = '' }: ResetOptions = {}): void {
document.title = title
document.head.innerHTML = head
document.body.innerHTML = body
} | RaphaelGimenez/twind | src/__fixtures__/dom-env.ts | TypeScript |
FunctionDeclaration |
export function destroy(): void {
GLOBAL_PROPERTIES.forEach((property) => Reflect.deleteProperty(global, property))
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const defaultView = (global as any)[kDefaultView] as WindowProxy & typeof globalThis
if (defaultView) {
// Dispose "document" ... | RaphaelGimenez/twind | src/__fixtures__/dom-env.ts | TypeScript |
ArrowFunction |
() => {
setup(options)
} | RaphaelGimenez/twind | src/__fixtures__/dom-env.ts | TypeScript |
ArrowFunction |
() => reset(options) | RaphaelGimenez/twind | src/__fixtures__/dom-env.ts | TypeScript |
ArrowFunction |
() => defaultView | RaphaelGimenez/twind | src/__fixtures__/dom-env.ts | TypeScript |
ArrowFunction |
(event) => {
process.emit('uncaughtException', event.error)
} | RaphaelGimenez/twind | src/__fixtures__/dom-env.ts | TypeScript |
ArrowFunction |
(property) =>
Object.defineProperty(global, property, {
enumerable: true,
configurable: true,
get: () => defaultView[property],
}) | RaphaelGimenez/twind | src/__fixtures__/dom-env.ts | TypeScript |
ArrowFunction |
() => defaultView[property] | RaphaelGimenez/twind | src/__fixtures__/dom-env.ts | TypeScript |
ArrowFunction |
(property) => Reflect.deleteProperty(global, property) | RaphaelGimenez/twind | src/__fixtures__/dom-env.ts | TypeScript |
InterfaceDeclaration |
export interface SetupOptions {
html?: string
url?: string
console?: Console
} | RaphaelGimenez/twind | src/__fixtures__/dom-env.ts | TypeScript |
InterfaceDeclaration |
export interface ResetOptions {
title?: string
head?: string
body?: string
} | RaphaelGimenez/twind | src/__fixtures__/dom-env.ts | TypeScript |
FunctionDeclaration |
export function newGUITransform(name: string, object: Transform, parent = gui) {
const c = parent.addFolder(name)
const pos = c.addFolder('position')
pos.add(object.position, 'x').step(0.1)
pos.add(object.position, 'y').step(0.1)
pos.add(object.position, 'z').step(0.1)
const rot = c.addFolder('rotation')
... | bastienrobert/coup-doeil | src/Experience/gui.ts | TypeScript |
FunctionDeclaration |
export function newGUIScreenTransform(
name: string,
object: Transform,
camera: Camera,
resolution: Vec2,
parent = gui,
) {
const c = parent.addFolder(name)
const size = new Vec3()
getWorldMatrix(object, size)
getScaleFromCameraDistance(camera, size, size)
const tmp: any = {
reset: () => {
... | bastienrobert/coup-doeil | src/Experience/gui.ts | TypeScript |
ArrowFunction |
() => {
tmp.position.right = 0
tmp.position.bottom = 0
onChange()
} | bastienrobert/coup-doeil | src/Experience/gui.ts | TypeScript |
ArrowFunction |
() => {
if (tmp.position.bottom) tmp.position.top = null
if (tmp.position.right) tmp.position.left = null
getWorldPositionFromViewportRectPerc(
camera,
tmp.position,
resolution,
tmp_vec_3,
)
tmp_vec_3.z = object.position.z
object.position.copy(tmp_vec_3)
object.upda... | bastienrobert/coup-doeil | src/Experience/gui.ts | TypeScript |
ArrowFunction |
props => {
const { size, withHoverEffect, color, margin, ...restProps } = props;
return (
<SvgIcon {...{ size, withHoverEffect, color, margin, ...restProps }}>
<CutIconSvg {...restProps} width="1em" height="1em" />
</SvgIcon> | IshanKute/medly-components | packages/icons/src/icons/Content/CutIcon.tsx | TypeScript |
ArrowFunction |
(): JSX.Element => {
return <div className="grid place-content-center h-screen text-2xl">Página no encontrada</div>
} | andresguanov/curso-react-practico | src/pages/NotFound.tsx | TypeScript |
ClassDeclaration |
@NgModule({
declarations: [
AppComponent,
RootsearchComponent,
ConjugationGroupComponent,
TrilateralConjugationPanelComponent,
QuadilateralConjugationPanelComponent,
StartComponent,
NotFoundComponent,
InitialSarfComponent,
ActiveVerbsComponent,
SarfVerbPronounsComponent,
P... | alsaydi/sarf | sarf-ui/src/app/app.module.ts | TypeScript |
FunctionDeclaration | /**
* Returns `account` asset holding of `assetID`. Returns undefined if the account is not
* opt-in to the given asset id.
* @param deployer algob deployer
* @param accountAddress account to return assetholding info
* @param assetID asset index
*/
export async function balanceOf (
deployer: Deployer,
account... | endlessor/algo-builder | packages/algob/src/lib/status.ts | TypeScript |
FunctionDeclaration | /**
* fetches and returns the global state of application.
* @param deployer Deployer
* @param creator Account from which call needs to be made
* @param appId ID of the application being configured or empty if creating
*/
export async function readGlobalStateSSC (
deployer: Deployer,
creator: AccountAddress,
... | endlessor/algo-builder | packages/algob/src/lib/status.ts | TypeScript |
FunctionDeclaration | /**
* Read and return the local state of application from an account.
* @param deployer Deployer
* @param account account from the which the local state has to be read
* @param appId ID of the application being configured or empty if creating
*/
export async function readLocalStateSSC (
deployer: Deployer,
acc... | endlessor/algo-builder | packages/algob/src/lib/status.ts | TypeScript |
FunctionDeclaration | /**
* Prints account asset holdings and ALGO balance (in microalgos)
* @param deployer algob deployer object
* @param account account whose asset holding to print
*/
export async function printAssets (deployer: Deployer, account: string): Promise<void> {
const accountInfo = await deployer.algodClient.accountInfor... | endlessor/algo-builder | packages/algob/src/lib/status.ts | TypeScript |
FunctionDeclaration | /**
* print account's local state of a stateful smart contract
* @param deployer algob deployer
* @param accountAddr account address to print local state
* @param appId application index of smart contract
*/
export async function printLocalStateSSC (
deployer: Deployer,
accountAddr: AccountAddress,
appId: nu... | endlessor/algo-builder | packages/algob/src/lib/status.ts | TypeScript |
FunctionDeclaration | /**
* print global state of a stateful smart contract
* @param deployer algob deployer
* @param creatorAddr creator address of stateful smart contract
* @param appId application index of smart contract
*/
export async function printGlobalStateSSC (
deployer: Deployer,
creatorAddr: AccountAddress,
appId: numb... | endlessor/algo-builder | packages/algob/src/lib/status.ts | TypeScript |
ArrowFunction |
(v: number): string => this.convertWithUnit(v) | donghun-cho/pinpoint | web/src/main/angular/src/app/core/components/inspector-chart/application-total-thread-count-chart-container.ts | TypeScript |
ArrowFunction |
() => {
const maxTickValue = getMaxTickValue(data, 1);
return maxTickValue === 0 ? this.defaultYMax : maxTickValue;
} | donghun-cho/pinpoint | web/src/main/angular/src/app/core/components/inspector-chart/application-total-thread-count-chart-container.ts | TypeScript |
ClassDeclaration |
export class ApplicationTotalThreadCountChartContainer implements IInspectorChartContainer {
private apiUrl = 'getApplicationStat/totalThreadCount/chart.pinpoint';
private minAgentIdList: string[];
private maxAgentIdList: string[];
defaultYMax = 100;
title = 'Total Thread';
constructor(
... | donghun-cho/pinpoint | web/src/main/angular/src/app/core/components/inspector-chart/application-total-thread-count-chart-container.ts | TypeScript |
MethodDeclaration |
getData(range: number[]): Observable<IInspectorChartData> {
return this.inspectorChartDataService.getData(this.apiUrl, range);
} | donghun-cho/pinpoint | web/src/main/angular/src/app/core/components/inspector-chart/application-total-thread-count-chart-container.ts | TypeScript |
MethodDeclaration |
makeChartData({charts}: IInspectorChartData): PrimitiveArray[] {
this.minAgentIdList = makeYData(charts.y['TOTAL_THREAD_COUNT'], 1) as string[];
this.maxAgentIdList = makeYData(charts.y['TOTAL_THREAD_COUNT'], 3) as string[];
return [
['x', ...makeXData(charts.x)],
['max... | donghun-cho/pinpoint | web/src/main/angular/src/app/core/components/inspector-chart/application-total-thread-count-chart-container.ts | TypeScript |
MethodDeclaration |
makeDataOption(): Data {
return {
type: spline(),
names: {
min: 'Min',
avg: 'Avg',
max: 'Max',
},
colors: {
...this.inspectorChartThemeService.getMinAvgMaxColors()
}
};
} | donghun-cho/pinpoint | web/src/main/angular/src/app/core/components/inspector-chart/application-total-thread-count-chart-container.ts | TypeScript |
MethodDeclaration |
makeElseOption(): {[key: string]: any} {
return {
line: {
classes: ['min', 'avg', 'max']
}
};
} | donghun-cho/pinpoint | web/src/main/angular/src/app/core/components/inspector-chart/application-total-thread-count-chart-container.ts | TypeScript |
MethodDeclaration |
makeYAxisOptions(data: PrimitiveArray[]): {[key: string]: any} {
return {
y: {
label: {
text: 'Total Thread (count)',
position: 'outer-middle'
},
tick: {
count: 5,
format:... | donghun-cho/pinpoint | web/src/main/angular/src/app/core/components/inspector-chart/application-total-thread-count-chart-container.ts | TypeScript |
MethodDeclaration |
makeTooltipOptions(): {[key: string]: any} {
return {};
} | donghun-cho/pinpoint | web/src/main/angular/src/app/core/components/inspector-chart/application-total-thread-count-chart-container.ts | TypeScript |
MethodDeclaration |
convertWithUnit(value: number): string {
return value.toString();
} | donghun-cho/pinpoint | web/src/main/angular/src/app/core/components/inspector-chart/application-total-thread-count-chart-container.ts | TypeScript |
MethodDeclaration |
getTooltipFormat(v: number, columnId: string, i: number): string {
return `${this.convertWithUnit(v)} ${getAgentId(columnId, i, this.minAgentIdList, this.maxAgentIdList)}`;
} | donghun-cho/pinpoint | web/src/main/angular/src/app/core/components/inspector-chart/application-total-thread-count-chart-container.ts | TypeScript |
ArrowFunction |
() => {
it('should create an instance', () => {
expect(new Forecast()).toBeTruthy();
});
} | iamalperen/weather-app | src/app/models/forecast/forecast.model.spec.ts | TypeScript |
ArrowFunction |
() => {
expect(new Forecast()).toBeTruthy();
} | iamalperen/weather-app | src/app/models/forecast/forecast.model.spec.ts | TypeScript |
ArrowFunction |
props => {
const { contest, onSwitchContest } = props;
const [contestPickerVisible, setContestPickerVisible] = useState(false);
const ContestPickerButton = () => (
<HeaderButton
title={contest.name}
onPress={() | richeterre/jumu-app | src/navigation/ContestNavigator.tsx | TypeScript |
ArrowFunction |
() => (
<HeaderButton
title={contest.name} | richeterre/jumu-app | src/navigation/ContestNavigator.tsx | TypeScript |
ArrowFunction |
() => (
<TimetableStack.Navigator screenOptions={defaultStackScreenOptions}>
<TimetableStack.Screen
component | richeterre/jumu-app | src/navigation/ContestNavigator.tsx | TypeScript |
ArrowFunction |
() => (
<ResultsStack.Navigator screenOptions={defaultStackScreenOptions}>
<ResultsStack.Screen
component | richeterre/jumu-app | src/navigation/ContestNavigator.tsx | TypeScript |
ArrowFunction |
({ focused, color }) => (
<Image
source={focused ? timetableFilledIcon : timetableIcon} | richeterre/jumu-app | src/navigation/ContestNavigator.tsx | TypeScript |
ArrowFunction |
({ focused, color }) => (
<Image
source={focused ? scrollFilledIcon : scrollIcon} | richeterre/jumu-app | src/navigation/ContestNavigator.tsx | TypeScript |
InterfaceDeclaration |
interface Props {
contest: Contest;
onSwitchContest: (contest?: Contest) => void;
} | richeterre/jumu-app | src/navigation/ContestNavigator.tsx | TypeScript |
TypeAliasDeclaration |
export type TimetableStackParamList = {
PerformanceList: { contest: Contest };
Performance: { id: string; stage: Stage };
}; | richeterre/jumu-app | src/navigation/ContestNavigator.tsx | TypeScript |
TypeAliasDeclaration |
export type ResultsStackParamList = {
ResultGroupList: { contest: Contest };
ResultList: { contestId: string; contestCategoryId: string };
}; | richeterre/jumu-app | src/navigation/ContestNavigator.tsx | TypeScript |
TypeAliasDeclaration |
type BottomTabParamList = {
Timetable: undefined;
Results: undefined;
}; | richeterre/jumu-app | src/navigation/ContestNavigator.tsx | TypeScript |
FunctionDeclaration |
function calcSkipValue(input: number): number {
let blit = 0;
// 1. Run sieve first;
blit =
((0x88888888 & input) >>> 3) |
((0x44444444 & input) >>> 2) |
((0x22222222 & input) >>> 1) |
(0x11111111 & input);
// 2. Shift them to the value
blit =
((blit & 0x10000000) >>> 21) |
((blit & 0... | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
FunctionDeclaration |
function blit(input: number, offset: number, value: number): number {
return (input & ~(0xFF << offset)) | (value << offset);
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
_getPage(pageId: number): Int32Array {
let page = this.pages[pageId];
if (page == null) {
page = new Int32Array(256);
this.pages[pageId] = page;
}
return page;
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
_getPageIfExists(pageId: number): Int32Array | null {
const page = this.pages[pageId];
return page;
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
_getSkipPage(pageId: number): Int32Array {
let page = this.skipPages[pageId];
if (page == null) {
page = new Int32Array(84);
this.skipPages[pageId] = page;
}
return page;
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
_generateSkipPageWord(pageId: number, wordPos: number, value: number): void {
// Regenerate skip page for the given word.
// Each 4 bits are compacted to 1 bit - therefore 32 bits are combined to
// 8 bits. This sets 1 byte of layer 1.
// We repeat this for 3 times to generate each layer.
const ski... | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
_generateSkipPage(pageId: number): void {
// If we're regenerating entire page, we can just calculate each skip page.
const page = this._getPage(pageId);
const skipPage = this._getSkipPage(pageId);
// Mux 4 integers into one...
for (let i = 0; i < page.length; i += 4) {
let out = 0;
for... | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
clear(): void {
this.pages = [];
this.skipPages = [];
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
set(key: number, value: boolean): this {
const pageId = key >> 13;
const pageWord = (key >> 5) & 0xFF;
const page = this._getPage(pageId);
let wordValue = page[pageWord];
if (value) wordValue |= 1 << (key & 31);
else wordValue &= ~(1 << (key & 31));
page[pageWord] = wordValue;
this._gen... | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
setWord(wordPos: number, value: number): void {
const pageId = wordPos / 256 | 0;
const page = this._getPage(pageId);
const pos = wordPos % 256;
page[pos] = value;
this._generateSkipPageWord(pageId, pos, value);
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
add(value: number): this {
return this.set(value, true);
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
delete(value: number): boolean {
this.set(value, false);
// TODO Check if bit was true
return true;
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
has(key: number): boolean {
return this.get(key);
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
get(key: number): boolean {
const pageId = key >> 13;
const pageByte = key >> 5;
const pageOffset = pageByte & 255;
const page = this._getPageIfExists(pageId);
if (page == null) return false;
return (page[pageOffset] & (1 << (key & 31))) !== 0;
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
getWord(wordPos: number): number {
const pageId = wordPos / 256 | 0;
const page = this._getPageIfExists(pageId);
if (page == null) return 0;
return page[wordPos % 256];
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
[Symbol.iterator](): IterableIterator<number> {
return this.values();
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
forEach(
callbackfn: (value: number, value2: number, set: Set<number>) => void,
thisArg?: any,
): void {
for (const value of this.values()) {
callbackfn.call(thisArg, value, value, this);
}
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
* entries(): IterableIterator<[number, number]> {
for (const value of this.values()) {
yield [value, value];
}
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
keys(): IterableIterator<number> {
return this.values();
} | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
* values(): IterableIterator<number> {
for (let i = 0; i < this.pages.length; i += 1) {
const page = this.pages[i];
if (page == null) continue;
const skipPage = this.skipPages[i];
let skipPage1Val = 0;
let skipPage2Val = 0;
let skipPage3Val = 0;
// skip page 1: 0.125 bytes... | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
and(set: BitSet): BitSet {
const output = new BitSet();
const minPages = Math.min(set.pages.length, this.pages.length);
for (let i = 0; i < minPages; i += 1) {
const aPage = this.pages[i];
const bPage = set.pages[i];
if (aPage == null || bPage == null) {
continue;
}
co... | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration | // this AND ~set
andNot(set: BitSet): BitSet {
const output = new BitSet();
for (let i = 0; i < this.pages.length; i += 1) {
const aPage = this.pages[i];
const bPage = set.pages[i];
if (aPage == null) continue;
if (bPage == null) {
output.pages[i] = aPage;
continue;
... | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
or(set: BitSet): BitSet {
const output = new BitSet();
const maxPages = Math.max(set.pages.length, this.pages.length);
for (let i = 0; i < maxPages; i += 1) {
const aPage = this.pages[i];
const bPage = set.pages[i];
if (aPage == null) {
output.pages[i] = bPage;
continue;
... | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
MethodDeclaration |
xor(set: BitSet): BitSet {
const output = new BitSet();
const maxPages = Math.max(set.pages.length, this.pages.length);
for (let i = 0; i < maxPages; i += 1) {
const aPage = this.pages[i];
const bPage = set.pages[i];
if (aPage == null) {
output.pages[i] = bPage;
continue;
... | yoo2001818/fast-ecs | src/bitSet.ts | TypeScript |
FunctionDeclaration |
function toggleStackedLabels() {
const { yAxis } = this;
// CL-10676 - Return if yAxis is undefined
if (!yAxis || yAxis.length === 0) {
return;
}
const { stackTotalGroup, stacks }: any = yAxis[0] || {};
if (stacks && stackTotalGroup) {
// We need to use Lodash map, because we ... | imnutz/gooddata-react-components | src/components/visualizations/chart/highcharts/plugins/autohideLabels/autohideColumnLabels.ts | TypeScript |
ArrowFunction |
(
visiblePoints: any,
minAxisValue: number,
shouldCheckShapeIntersection: boolean = false) => {
const foundIntersection = toNeighbors(
// some data labels may not be rendered (too many points)
visiblePoints.filter(hasDataLabel)
).some((pointPair) => {
const [firstPoint, next... | imnutz/gooddata-react-components | src/components/visualizations/chart/highcharts/plugins/autohideLabels/autohideColumnLabels.ts | TypeScript |
ArrowFunction |
(pointPair) => {
const [firstPoint, nextPoint]: any[] = pointPair || [];
const firstDataLabelAttr = getDataLabelAttributes(firstPoint);
const nextDataLabelAttr = getDataLabelAttributes(nextPoint);
if (shouldCheckShapeIntersection) {
const firstShapeAttr = getShapeAttributes... | imnutz/gooddata-react-components | src/components/visualizations/chart/highcharts/plugins/autohideLabels/autohideColumnLabels.ts | TypeScript |
ArrowFunction |
(point: any) => showDataLabelInAxisRange(point, minAxisValue) | imnutz/gooddata-react-components | src/components/visualizations/chart/highcharts/plugins/autohideLabels/autohideColumnLabels.ts | TypeScript |
ArrowFunction |
(visiblePoints: any, minAxisValue: number) => {
const toggleLabel = (point: any) => {
const { dataLabel, shapeArgs } = point;
if (dataLabel && shapeArgs) {
const labelHeight = dataLabel.height + (2 * dataLabel.padding || 0);
const isOverlappingHeight = labelHeight > shapeArg... | imnutz/gooddata-react-components | src/components/visualizations/chart/highcharts/plugins/autohideLabels/autohideColumnLabels.ts | TypeScript |
ArrowFunction |
(point: any) => {
const { dataLabel, shapeArgs } = point;
if (dataLabel && shapeArgs) {
const labelHeight = dataLabel.height + (2 * dataLabel.padding || 0);
const isOverlappingHeight = labelHeight > shapeArgs.height;
return isOverlappingHeight ? hideDataLabel(point) ... | imnutz/gooddata-react-components | src/components/visualizations/chart/highcharts/plugins/autohideLabels/autohideColumnLabels.ts | TypeScript |
ArrowFunction |
(point: any) => {
const { dataLabel } = point;
if (dataLabel) {
const labelWidth = dataLabel.width + (2 * dataLabel.padding);
return labelWidth > point.shapeArgs.width;
}
return false;
} | imnutz/gooddata-react-components | src/components/visualizations/chart/highcharts/plugins/autohideLabels/autohideColumnLabels.ts | TypeScript |
ArrowFunction |
(point: any) => point.label | imnutz/gooddata-react-components | src/components/visualizations/chart/highcharts/plugins/autohideLabels/autohideColumnLabels.ts | TypeScript |
ArrowFunction |
(labelsPair) => {
const [firstLabel, nextLabel]: any[] = labelsPair || [];
if (firstLabel && nextLabel) {
if (firstLabel.alignAttr && nextLabel.alignAttr) {
// We need to calculate this from getBBox, because FireFox does not
// provide cl... | imnutz/gooddata-react-components | src/components/visualizations/chart/highcharts/plugins/autohideLabels/autohideColumnLabels.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.