type stringclasses 7
values | content stringlengths 4 9.55k | repo stringlengths 7 96 | path stringlengths 4 178 | language stringclasses 1
value |
|---|---|---|---|---|
MethodDeclaration |
public onOverlayRemoved(e: any): void {
// todo: change hardcoded "Draw Bar" to variable
if (e.group.name === "Draw Bar") {
// parent element of all drawing section has the class of "leaflet-draw-toolbar-top"
const drawSectionParent = <HTMLElement>document.getElementById("draw-shapes-section");
i... | iofirag/stenciljs-gis-example | .history/src/components/gis-viewer/classes/features/DrawBarComp/DrawBarComp_20171229100019.ts | TypeScript |
MethodDeclaration |
public onOverlayAdded(e: any): void {
// todo: change hardcoded "Draw Bar" to variable
if (e.group.name === "Draw Bar") {
// parent element of all drawing section has the class of "leaflet-draw-toolbar-top"
const drawSectionParent = <HTMLElement>document.getElementById("draw-sha... | iofirag/stenciljs-gis-example | .history/src/components/gis-viewer/classes/features/DrawBarComp/DrawBarComp_20171229100019.ts | TypeScript |
MethodDeclaration |
public import(wktShapesArr: Array<WktShape>) {
// Iterate all imported WktShapes
wktShapesArr.forEach((item: WktShape) => {
const shapeDef: ShapeDefinition = {
shapeWkt: item.wkt,
data: {
name: 'Editable layer', // TBD get isSelected from extended data
isSelected: false // TBD get isSelected ... | iofirag/stenciljs-gis-example | .history/src/components/gis-viewer/classes/features/DrawBarComp/DrawBarComp_20171229100019.ts | TypeScript |
MethodDeclaration | // Draw listener
private drawEventHandler(drawEvent: any) {
const manager: ShapeManagerInterface = ShapeManagerRepository.getManagerByShapeDefLayer(drawEvent.layer);
let layerEnumType: ShapeType = ShapeManagerRepository.getTypeNumberByDrawableTypeName(drawEvent.layerType);
if (layerEnumType === ShapeType.MARKER)... | iofirag/stenciljs-gis-example | .history/src/components/gis-viewer/classes/features/DrawBarComp/DrawBarComp_20171229100019.ts | TypeScript |
MethodDeclaration |
private createElement(options?: DrawBarOptions): void {
// Create edit layer
if (!this.drawableLayer) {
this.drawableLayer = new L.FeatureGroup([]);
}
const optionsDev: DrawBarOptions_Dev = <DrawBarOptions_Dev>options;
const isCircle: boolean = _.get(optionsDev, 'draw.circle');
// Component initializa... | iofirag/stenciljs-gis-example | .history/src/components/gis-viewer/classes/features/DrawBarComp/DrawBarComp_20171229100019.ts | TypeScript |
MethodDeclaration |
private createShapeDefFromDrawLayer(layer: L.Layer, shapeType: ShapeType): ShapeDefinition {
const manager: ShapeManagerInterface = ShapeManagerRepository.getManagerByType(shapeType);
if (!manager) { return null; }
// Calculate area size
const shapeObject: ShapeObject = manager.getShapeObjectFromDrawingLayer(... | iofirag/stenciljs-gis-example | .history/src/components/gis-viewer/classes/features/DrawBarComp/DrawBarComp_20171229100019.ts | TypeScript |
MethodDeclaration |
private getWktShapeFromWkt(drawShapeLayer: any): WktShape {
const manager: ShapeManagerInterface = ShapeManagerRepository.getManagerByShapeDefLayer(drawShapeLayer);
if (manager) {
// Create WktShape from wkt, id, area size
const { shapeWkt, shapeObject } = drawShapeLayer.shapeDef;
const id: number = L.Ut... | iofirag/stenciljs-gis-example | .history/src/components/gis-viewer/classes/features/DrawBarComp/DrawBarComp_20171229100019.ts | TypeScript |
MethodDeclaration |
private onDrawCreated(e: any): void {
const layerEnumType: ShapeType = ShapeManagerRepository.getTypeNumberByDrawableTypeName(e.layerType);
const shapeDef: ShapeDefinition = this.createShapeDefFromDrawLayer(e.layer, layerEnumType);
// Add shapeDef to layer
e.layer = this.addShapeDefToLayer(e.layer, shapeDef) ... | iofirag/stenciljs-gis-example | .history/src/components/gis-viewer/classes/features/DrawBarComp/DrawBarComp_20171229100019.ts | TypeScript |
MethodDeclaration |
private onDrawEdited(e: any): void {
// Save output
const wktList: WktShape[] = [];
e.layers.eachLayer((layer: L.Layer) => {
// Create shapeDef object for this layer
const { shapeObject, shapeWkt } = this.createShapeDefFromDrawLayer(layer, layer.shapeDef.shapeObject.type);
// Update just shapeObject, a... | iofirag/stenciljs-gis-example | .history/src/components/gis-viewer/classes/features/DrawBarComp/DrawBarComp_20171229100019.ts | TypeScript |
MethodDeclaration |
private onDrawDeleted(e: any): void {
const wktList: WktShape[] = this.getWktShapeListFromEvent(e);
// Use callback of onDrawDeleted
const gisViewerEl: HTMLGisViewerElement = document.querySelector('gis-viewer');
gisViewerEl.emitDrawDeleted(wktList);
} | iofirag/stenciljs-gis-example | .history/src/components/gis-viewer/classes/features/DrawBarComp/DrawBarComp_20171229100019.ts | TypeScript |
MethodDeclaration |
private getWktShapeListFromEvent(e: any) {
const wktList: WktShape[] = [];
e.layers.eachLayer((layer: L.Layer) => {
const wkt: WktShape = this.createWktFromEditableLayer(layer);
if (wkt) {
wktList.push(wkt);
}
});
return wktList;
} | iofirag/stenciljs-gis-example | .history/src/components/gis-viewer/classes/features/DrawBarComp/DrawBarComp_20171229100019.ts | TypeScript |
MethodDeclaration |
private calculateAreaSizeFromShapeObj(manager: ShapeManagerInterface, shapeObj: ShapeObject): number {
const areaSize = manager.getAreaSize(shapeObj);
return areaSize || 0;
} | iofirag/stenciljs-gis-example | .history/src/components/gis-viewer/classes/features/DrawBarComp/DrawBarComp_20171229100019.ts | TypeScript |
MethodDeclaration |
private createWktFromEditableLayer(drawShapeLayer: L.Layer): WktShape {
const manager: ShapeManagerInterface = ShapeManagerRepository.getManagerByShapeDefLayer(drawShapeLayer);
if (manager) {
// Calculate area size
const shapeObj: ShapeObject = manager.getShapeObjectFromDrawingLayer(drawShapeLayer);
// ... | iofirag/stenciljs-gis-example | .history/src/components/gis-viewer/classes/features/DrawBarComp/DrawBarComp_20171229100019.ts | TypeScript |
MethodDeclaration |
private addShapeDefToLayer(layer: L.FeatureGroup, shapeDef: ShapeDefinition): L.FeatureGroup {
_.merge(layer, { shapeDef, layerName: LayerNames.DRAWABLE_LAYER });
return layer;
} | iofirag/stenciljs-gis-example | .history/src/components/gis-viewer/classes/features/DrawBarComp/DrawBarComp_20171229100019.ts | TypeScript |
ClassDeclaration |
export class NullFullScreenAd extends NullAd implements IFullScreenAd {
public async show(): Promise<AdResult> {
return AdResult.Failed;
}
} | enrevol/ee-x | src/ts/src/ads/NullFullScreenAd.ts | TypeScript |
MethodDeclaration |
public async show(): Promise<AdResult> {
return AdResult.Failed;
} | enrevol/ee-x | src/ts/src/ads/NullFullScreenAd.ts | TypeScript |
ArrowFunction |
(node,quantity) => {
// 処理分岐
if(node.調達方法 === "作成") return buildCreateNode(node,quantity);
if(node.調達方法 === "共通素材") return buildCommonNode(node,quantity);
if(node.調達方法 === "NPC") return buildNpcNode(node,quantity);
if(node.調達方法 === "自力調達") return buildUserNode(node,quantity);
ret... | Helestia/moecost | src/scripts/buildTrees/200_setQuantityToTrees/buildNode.ts | TypeScript |
TypeAliasDeclaration |
type tBuildNode = (node:Readonly<tTreeNodeD>, quantity:number) => tTreeNode | Helestia/moecost | src/scripts/buildTrees/200_setQuantityToTrees/buildNode.ts | TypeScript |
ClassDeclaration |
@NgModule({
imports: [
CommonModule,
SharedModule,
IonicModule,
PageInfoTitleModule
],
declarations: [AccountVerificationComponent],
exports: [AccountVerificationComponent],
entryComponents: [AccountVerificationComponent]
})
export class AccountVerificationModule { } | RollingArray/C2 | src/app/component/account-verification/account-verification.module.ts | TypeScript |
FunctionDeclaration |
export function insert(data: unknown): SqlFragment {
if (typeof data !== 'object' || data === null) {
throw new Error('Data must be an object');
}
if (Array.isArray(data)) {
throw new Error('Array is not supported');
}
const keys = Object.keys(data);
const length = keys.length;
const sqlFragmen... | langpavel/sql-fragment | src/transform/insert.ts | TypeScript |
ClassDeclaration |
export class CS310View extends StudentView {
private teams: TeamTransport[];
constructor(remoteUrl: string) {
super();
Log.info("CS310View::<init>");
this.remote = remoteUrl;
}
public renderPage(opts: {}) {
Log.info('CS310View::renderPage() - start; options: ' + opts)... | aahung/classy | packages/portal/frontend/src/app/views/cs310/CS310View.ts | TypeScript |
MethodDeclaration |
public renderPage(opts: {}) {
Log.info('CS310View::renderPage() - start; options: ' + opts);
const that = this;
const start = Date.now();
UI.showModal("Fetching data.");
super.render().then(function() {
// super render complete; do custom work
return tha... | aahung/classy | packages/portal/frontend/src/app/views/cs310/CS310View.ts | TypeScript |
MethodDeclaration |
private async renderStudentPage(): Promise<void> {
UI.showModal('Fetching Data');
try {
// grades done in StudentView
// repos done in StudentView
// teams
const teams = await this.fetchTeamData();
this.teams = teams;
await this.r... | aahung/classy | packages/portal/frontend/src/app/views/cs310/CS310View.ts | TypeScript |
MethodDeclaration | // private async fetchData(endpoint: string): Promise<any> {
// const url = this.remote + endpoint;
// const response = await fetch(url, super.getOptions());
// if (response.status === 200) {
// Log.trace('CS310View::fetchData( ' + endpoint + ' ) - 200 received');
// const json = await respo... | aahung/classy | packages/portal/frontend/src/app/views/cs310/CS310View.ts | TypeScript |
MethodDeclaration |
private async renderTeams(teams: TeamTransport[]): Promise<void> {
Log.trace('CS310View::renderTeams(..) - start');
const that = this;
// make sure these are hidden
UI.hideSection('studentSelectPartnerDiv');
UI.hideSection('studentPartnerDiv');
// skip this all for now... | aahung/classy | packages/portal/frontend/src/app/views/cs310/CS310View.ts | TypeScript |
MethodDeclaration |
private async formTeam(): Promise<TeamTransport> {
Log.info("CS310View::formTeam() - start");
const otherId = UI.getTextFieldValue('studentSelectPartnerText');
const myGithubId = this.getStudent().githubId;
const payload: TeamFormationTransport = {
delivId: 'project', // o... | aahung/classy | packages/portal/frontend/src/app/views/cs310/CS310View.ts | TypeScript |
FunctionDeclaration |
export function Celsius(config: CelsiusConfigurationInstance): Promise<CelsiusInstance>; | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
ClassDeclaration | /**
* Class which encapsulates errors raised within Celsius SDK.
*
* If the error has occurred internally within the Celsius SDK, status and slug properties will be null.
*/
export class CelsiusSDKError extends Error {
/** Number representing HTTP status code returned by the Wallet API. Will... | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
ClassDeclaration | /**
* Class which encapsulates validation errors before the request gets processed further.
*/
export class ValidationError {
/** Number representing HTTP status code returned by the Wallet API. **/
status: number
/** Array of ClassValidatorError objects. See https://www.npmjs.com/pack... | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CelsiusConfigurations {
staging: Partial<CelsiusConfigurationInstance>;
production: Partial<CelsiusConfigurationInstance>;
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CelsiusConfigurationInstance {
/** Base URL of the Celsius API */
baseUrl?: string;
/** Public key required for preventing man-in-the-middle attacks */
publicKey?: string;
/** The partner's API token */
partnerKey: string;
/** the selected auth method *... | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CelsiusBalanceSummaryResponse {
/** Contains user's balance per coin. **/
balance: {
[key: string]: number
}
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CelsiusInterestSummaryResponse {
/** Contains user's interest per coin. **/
interest: {
[key: string]: number
}
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CelsiusStatisticsTotalUSDAmount {
/** Contains total amount owned in usd. **/
total_amount_usd: string,
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CelsiusAmountPerCoin {
/** Contains, for each coin, amount of that coin and amount in usd. **/
[key: string]: {
amount: string,
amount_usd: number
}
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CelsiusStatisticsResponse {
deposit_count: number | string,
deposit_amount: CelsiusStatisticsTotalUSDAmount & CelsiusAmountPerCoin,
withdrawal_count: number | string,
withdrawal_amount: CelsiusStatisticsTotalUSDAmount & CelsiusAmountPerCoin,
interest_count: number | s... | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CelsiusPaginationOptions {
/** Page to retrieve. If left empty, defaults to first page.**/
page?: number;
/** How many records are shown per page. If left empty, defaults to 20 records.**/
per_page?: number;
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CelsiusPagination {
/** Total number of records */
total?: number;
/** Total number of pages */
pages?: number;
/** Current page */
current?: number;
/** How many records are shown per page */
per_page?: number;
/** A string representing... | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CelsiusCoinBalanceResponse {
/** The amount in the current token */
amount: string;
/** The amount in US dollars of your token's balance */
amount_in_usd: string;
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface SupportedCountriesResponse {
alpha2: string;
alpha3: string;
countryCallingCodes: string[];
currencies: string[];
emoji: string;
ioc: string;
languages: string[];
name: string;
status: string;
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface KYCStatusResponse {
status: string,
reasons: object
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration | /**
* Celsius Withdraw Options
*/
interface CelsiusWithdrawOptions {
/** This is the withdrawal amount you want */
amount: number;
/** This is destination address that you want the tokens to be deposited */
address: string;
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration | /** Celsius Withdrawal Transaction, received in the response of the withdraw method */
interface CelsiusWithdrawalTransaction {
/** Celsius Transaction ID received in the withdraw */
tx_id: string|null;
/** The state of the withdraw request */
state: string;
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration | /**
* Celsius Withdrawal Addresses
*/
interface CelsiusWithdrawalAddresses {
addresses: {
/** Each key,value pair represents a coin and the withdrawal address for that coin **/
[key: string]: string
};
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CelsiusTransactionRecord extends CelsiusCoinBalanceResponse {
/** The amount in this coin rounded down to coin's decimals */
amount: string;
/** The amount in US dollars for this coin */
amount_usd: string,
/** The amount in this coin without any rounding applied **/
... | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration | /** Celsius transaction summary */
interface CelsiusTransactionSummary {
/** Informations about the pagination */
pagination: CelsiusPagination;
/** Records of the transactions */
record: CelsiusTransactionRecord[];
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface KycStatus {
status: 'PENDING' | 'COMPLETED' | 'PASSED' | 'REJECTED';
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CelsiusSupportedCurrencies {
/** Short names of currencies **/
currencies: string[]
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CelsiusKycFiles {
/** Path to the file. **/
document_front_image: string;
/** Path to the file. **/
document_back_image: string;
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface User {
id: string;
auth0_user_id: string;
email: string;
pin: string;
first_name: string;
last_name: string;
company_name: string;
country: string;
twitter_id: string;
facebook_id: string;
google_id: string;
refer... | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CreateUser {
first_name: string,
last_name: string,
middle_name?: string,
email?: string,
title?: string,
date_of_birth: Date,
citizenship: string,
country: string,
state?: string,
city: string,
zip: string,
stree... | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface UpdateUser {
first_name: string,
last_name: string,
middle_name?: string,
email?: string,
title?: string,
date_of_birth: Date,
citizenship: string,
country: string,
state?: string,
city: string,
zip: string,
stree... | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface UpdateEmail{
email: string
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CreateUserResponse {
userId: string,
userToken: string
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface CelsiusInstance {
currencies: string[];
getKycStatus(userSecret: string): Promise<KycStatus>;
verifyKyc(userData: CelsiusKycUserData, documents: CelsiusKycFiles, userSecret: string): Promise<any>;
getSupportedCurrencies(): Promise<CelsiusSupportedCurrencies>;
getBalanc... | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface InterestRates {
interestRates: {
coin: string;
rate: string;
currency: Currency;
}
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface Currency {
id: number;
name: string;
short: string;
image_url: string;
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
InterfaceDeclaration |
interface ClassValidatorError {
target: Object; // Object that was validated.
property: string; // Object's property that haven't pass validation.
value: any; // Value that haven't pass a validation.
constraints?: { // Constraints that failed validation with error messages.
... | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
EnumDeclaration |
export enum AUTH_METHODS {
API_KEY = 'api-key',
USER_TOKEN = 'user-token',
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
EnumDeclaration |
export enum ENVIRONMENT {
STAGING = 'staging',
PRODUCTION = 'production'
} | CelsiusNetwork/celsius-node-sdk | index.d.ts | TypeScript |
ArrowFunction |
params => {
this._getReportCases();
this._getColumns();
} | USGS-WiM/CBRADMS | src/reports/report-days-to-resolution.component.ts | TypeScript |
ArrowFunction |
(reportcases: any) => {
if (Number(reportcases.count) > 0) {
APP_UTILITIES.showToast('Info', reportcases.count + ' case(s) found.');
const max_records = Math.ceil(Number(reportcases.count) / 100) * 100;
this.page_size < 100 ? t... | USGS-WiM/CBRADMS | src/reports/report-days-to-resolution.component.ts | TypeScript |
ArrowFunction |
error => this._errorMessage = <any>error | USGS-WiM/CBRADMS | src/reports/report-days-to-resolution.component.ts | TypeScript |
ClassDeclaration |
@Component({
templateUrl: 'report-detail.component.html'
})
export class ReportDaysToResolutionComponent implements OnInit {
paginated = true;
allow_filter = false;
private _params: any;
page_size = 100;
private _prevPage: string;
private _nextPage: string;
reportcases: ReportCase[];
... | USGS-WiM/CBRADMS | src/reports/report-days-to-resolution.component.ts | TypeScript |
MethodDeclaration |
ngOnInit() {
this._params = this._route.queryParams
.subscribe(params => {
this._getReportCases();
this._getColumns();
});
} | USGS-WiM/CBRADMS | src/reports/report-days-to-resolution.component.ts | TypeScript |
MethodDeclaration |
prevPage() {
if (this._prevPage == null) {
APP_UTILITIES.showToast('Info', 'This is the first page.');
} else {
this.notready = true;
let prevPageNum;
let ndxStart = this._prevPage.indexOf('page=');
if (ndxStart === -1) {
const... | USGS-WiM/CBRADMS | src/reports/report-days-to-resolution.component.ts | TypeScript |
MethodDeclaration |
nextPage() {
if (this._nextPage == null) {
APP_UTILITIES.showToast('Info', 'This is the last page.');
} else {
this.notready = true;
let nextPageNum;
const ndxStart = this._nextPage.indexOf('page=') + 5;
const ndxEnd = this._nextPage.indexOf('... | USGS-WiM/CBRADMS | src/reports/report-days-to-resolution.component.ts | TypeScript |
MethodDeclaration |
exportToCSV(unit?: number) {
this.notready = true;
const urlSearchParams = 'report=daystoresolution&format=csv&page_size=' + this.page_size;
this._getReportCasesCSV(urlSearchParams);
} | USGS-WiM/CBRADMS | src/reports/report-days-to-resolution.component.ts | TypeScript |
MethodDeclaration |
private _getReportCasesCSV(urlSearchParams?) {
const self = this;
this._reportCaseService.getReportCasesCSV(urlSearchParams)
.then(function(data) {
const blob = new Blob([data[0]], { type: 'text/csv' });
FileSaver.saveAs(blob, data[1]);
self.n... | USGS-WiM/CBRADMS | src/reports/report-days-to-resolution.component.ts | TypeScript |
MethodDeclaration |
private _getReportCases(newUrlSearchParams?) {
const urlSearchParams = newUrlSearchParams ? newUrlSearchParams : {report: 'daystoresolution'};
this._reportCaseService.getReportCases(urlSearchParams)
.subscribe(
(reportcases: any) => {
if (Number(reportcas... | USGS-WiM/CBRADMS | src/reports/report-days-to-resolution.component.ts | TypeScript |
MethodDeclaration |
private _getColumns() {
this.columns = [
new Column('id', 'Case ID'),
new Column('case_reference', 'Case Reference'),
new Column('request_date', 'Request Date'),
new Column('close_date', 'Close Date'),
new Column('close_days', 'Days to Close'),
... | USGS-WiM/CBRADMS | src/reports/report-days-to-resolution.component.ts | TypeScript |
MethodDeclaration |
private _sortAndShow() {
this.reportcases.sort(APP_UTILITIES.dynamicSort('-close_days'));
this.notready = false;
} | USGS-WiM/CBRADMS | src/reports/report-days-to-resolution.component.ts | TypeScript |
MethodDeclaration |
printCases() {
window.print();
} | USGS-WiM/CBRADMS | src/reports/report-days-to-resolution.component.ts | TypeScript |
ArrowFunction |
res =>
{
this.modalities = res.json()
.map(modality => {
return modality.name;
});
this.selectedModality = this.modalities[0];
} | jodogne/orthanc-explorer-2 | src/frontend/explorer2/src/app/components/query-retrieve/query.component.ts | TypeScript |
ArrowFunction |
modality => {
return modality.name;
} | jodogne/orthanc-explorer-2 | src/frontend/explorer2/src/app/components/query-retrieve/query.component.ts | TypeScript |
ArrowFunction |
res =>
{
this.queryID = res.json().ID;
this.app.toastJobResult(true, 'query', '/retrieve', this.queryID);
this.router.navigate(['/retrieve', {id: this.queryID}]);
} | jodogne/orthanc-explorer-2 | src/frontend/explorer2/src/app/components/query-retrieve/query.component.ts | TypeScript |
ArrowFunction |
()=> this.app.toastJobResult(false, 'query') | jodogne/orthanc-explorer-2 | src/frontend/explorer2/src/app/components/query-retrieve/query.component.ts | TypeScript |
ClassDeclaration |
@Component
({
selector: 'query-page',
templateUrl: 'query.component.html',
providers: [RESTService]
})
export class QueryComponent implements OnInit
{
studyModalities = ['CR', 'CT', 'MR', 'NM', 'PT', 'US', 'XA'];
nbCheckedModalities = 0;
checkedModalities = [false, false, false, false, false, false, fals... | jodogne/orthanc-explorer-2 | src/frontend/explorer2/src/app/components/query-retrieve/query.component.ts | TypeScript |
MethodDeclaration |
ngOnInit(): void
{
this.service.getModalities().then(res =>
{
this.modalities = res.json()
.map(modality => {
return modality.name;
});
this.selectedModality = this.modalities[0];
});
} | jodogne/orthanc-explorer-2 | src/frontend/explorer2/src/app/components/query-retrieve/query.component.ts | TypeScript |
MethodDeclaration | /*
* Check the checkbox of the study modality
*/
checkModality(index: number): void
{
if(this.checkedModalities[index] == true)
this.nbCheckedModalities--;
else
this.nbCheckedModalities++;
this.checkedModalities[index] = !this.checkedModalities[index];
} | jodogne/orthanc-explorer-2 | src/frontend/explorer2/src/app/components/query-retrieve/query.component.ts | TypeScript |
MethodDeclaration | /*
* Select the remote modality where to query from
*/
selectModality(modality: string): void
{
this.selectedModality = modality;
} | jodogne/orthanc-explorer-2 | src/frontend/explorer2/src/app/components/query-retrieve/query.component.ts | TypeScript |
MethodDeclaration | /*
* Validate the fields of the search and proceed to the query
*/
ok(): void {
if (this.accessionNumber == '')
this.accessionNumber = '*';
else
this.accessionNumber = '*' + this.accessionNumber + '*';
if (this.patientName == '')
this.patientName = '*';
else
this.patientNa... | jodogne/orthanc-explorer-2 | src/frontend/explorer2/src/app/components/query-retrieve/query.component.ts | TypeScript |
MethodDeclaration | /*
Reset the fields of the research panel.
*/
resetFields()
{
this.accessionNumber = '';
this.patientName = '';
this.patientBirthDate = '';
this.patientID = '';
this.patientSex = '';
this.studyDate = '';
this.studyDescription = '';
this.modalitiesInStudy = ['*'];
this.nbChec... | jodogne/orthanc-explorer-2 | src/frontend/explorer2/src/app/components/query-retrieve/query.component.ts | TypeScript |
FunctionDeclaration |
function withSplitLinesCollection(text: string, callback: (model: TextModel, linesCollection: ViewModelLinesFromProjectedModel) => void): void {
const config = new TestConfiguration({});
const wrappingInfo = config.options.get(EditorOption.wrappingInfo);
const fontInfo = config.options.get(EditorOption.fontInfo)... | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
FunctionDeclaration |
function assertViewLineTokens(_actual: IViewLineTokens, expected: ITestViewLineToken[]): void {
let actual: ITestViewLineToken[] = [];
for (let i = 0, len = _actual.getCount(); i < len; i++) {
actual[i] = {
endIndex: _actual.getEndOffset(i),
value: _actual.getForeground(i)
};
}
assert.deepStrictE... | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
FunctionDeclaration |
function assertMinimapLineRenderingData(actual: ViewLineData, expected: ITestMinimapLineRenderingData | null): void {
if (actual === null && expected === null) {
assert.ok(true);
return;
}
if (expected === null) {
assert.ok(false);
}
assert.strictEqual(actual.content, expected.content);
assert.str... | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
FunctionDeclaration |
function assertMinimapLinesRenderingData(actual: ViewLineData[], expected: Array<ITestMinimapLineRenderingData | null>): void {
assert.strictEqual(actual.length, expected.length);
for (let i = 0; i < expected.length; i++) {
assertMinimapLineRenderingData(actual[i], expected[i]);
}
} | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
FunctionDeclaration |
function assertAllMinimapLinesRenderingData(splitLinesCollection: ViewModelLinesFromProjectedModel, all: ITestMinimapLineRenderingData[]): void {
let lineCount = all.length;
for (let line = 1; line <= lineCount; line++) {
assert.strictEqual(splitLinesCollection.getViewLineData(line).content, splitLinesCollectio... | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
FunctionDeclaration |
function withSplitLinesCollection(model: TextModel, wordWrap: 'on' | 'off' | 'wordWrapColumn' | 'bounded', wordWrapColumn: number, callback: (splitLinesCollection: ViewModelLinesFromProjectedModel) => void): void {
const configuration = new TestConfiguration({
wordWrap: wordWrap,
wordWrapColumn: wordWrapColumn... | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
FunctionDeclaration |
function pos(lineNumber: number, column: number): Position {
return new Position(lineNumber, column);
} | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
FunctionDeclaration |
function createSplitLine(splitLengths: number[], breakingOffsetsVisibleColumn: number[], wrappedTextIndentWidth: number, isVisible: boolean = true): IModelLineProjection {
return createModelLineProjection(createLineBreakData(splitLengths, breakingOffsetsVisibleColumn, wrappedTextIndentWidth), isVisible);
} | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
FunctionDeclaration |
function createLineBreakData(breakingLengths: number[], breakingOffsetsVisibleColumn: number[], wrappedTextIndentWidth: number): ModelLineProjectionData {
let sums: number[] = [];
for (let i = 0; i < breakingLengths.length; i++) {
sums[i] = (i > 0 ? sums[i - 1] : 0) + breakingLengths[i];
}
return new ModelLinePr... | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
FunctionDeclaration |
function createModel(text: string): ISimpleModel {
return {
tokenization: {
getLineTokens: (lineNumber: number) => {
return null!;
},
},
getLineContent: (lineNumber: number) => {
return text;
},
getLineLength: (lineNumber: number) => {
return text.length;
},
getLineMinColumn: (lineNumber... | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
ArrowFunction |
() => {
let model1 = createModel('My First LineMy Second LineAnd another one');
let line1 = createSplitLine([13, 14, 15], [13, 13 + 14, 13 + 14 + 15], 0);
assert.strictEqual(line1.getViewLineCount(), 3);
assert.strictEqual(line1.getViewLineContent(model1, 1, 0), 'My First Line');
assert.strictEqual(line1.ge... | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
ArrowFunction |
() => {
const text = [
'int main() {',
'\tprintf("Hello world!");',
'}',
'int main() {',
'\tprintf("Hello world!");',
'}',
].join('\n');
withSplitLinesCollection(text, (model, linesCollection) => {
assert.strictEqual(linesCollection.getViewLineCount(), 6);
// getOutputIndentGuide
as... | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
ArrowFunction |
(model, linesCollection) => {
assert.strictEqual(linesCollection.getViewLineCount(), 6);
// getOutputIndentGuide
assert.deepStrictEqual(linesCollection.getViewLinesIndentGuides(-1, -1), [0]);
assert.deepStrictEqual(linesCollection.getViewLinesIndentGuides(0, 0), [0]);
assert.deepStrictEqual(linesCollec... | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
ArrowFunction |
() => {
const text = [
'int main() {',
'\tprintf("Hello world!");',
'}',
'int main() {',
'\tprintf("Hello world!");',
'}',
].join('\n');
withSplitLinesCollection(text, (model, linesCollection) => {
linesCollection.setHiddenAreas([
new Range(1, 1, 3, 1),
new Range(5, 1, 6, 1)
]);... | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
ArrowFunction |
(model, linesCollection) => {
linesCollection.setHiddenAreas([
new Range(1, 1, 3, 1),
new Range(5, 1, 6, 1)
]);
let viewLineCount = linesCollection.getViewLineCount();
assert.strictEqual(viewLineCount, 1, 'getOutputLineCount()');
let modelLineCount = model.getLineCount();
for (let lineNumbe... | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
ArrowFunction |
() => {
let _lineIndex = 0;
const tokenizationSupport: languages.ITokenizationSupport = {
getInitialState: () => NullState,
tokenize: undefined!,
tokenizeEncoded: (line: string, hasEOL: boolean, state: languages.IState): languages.EncodedTokenizationResult => {
let tokens = _tokens[_lineIndex++];
... | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
ArrowFunction |
() => NullState | Fevre81/vscode | src/vs/editor/test/browser/viewModel/modelLineProjection.test.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.