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
package test.util.x; | |
import java.util.HashMap; | |
import java.util.Map; | |
import test.AProduct; | |
import test.BProduct; | |
import test.util.Factory; | |
import test.x.XAProductImp; | |
import test.x.XBProductImp; |
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
function getFrac(n) { | |
if (!(n instanceof Number)) { | |
n *= 1; | |
} | |
if (n === 0) { | |
return [0, n]; | |
} | |
var i = 1; | |
var flag = 1; |
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
/* | |
isNumeric - return 1/true if passed in string is numeric, false otherwise | |
Usage example: select isNumeric('2012-02-16'); => 0 | |
*/ | |
DROP FUNCTION IF EXISTS ajgl.isNumeric; | |
CREATE DEFINER =`root`@`%` FUNCTION `isNumeric`(s VARCHAR(255)) | |
RETURNS TINYINT(4) | |
DETERMINISTIC | |
BEGIN | |
SET @match = '^(([0-9+-.$]{1})|([+-]?[$]?[0-9]*(([.]{1}[0-9]*)|([.]?[0-9]+))))$'; |
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
function colorAdjustProcess(data, i) { | |
let R0 = 145, G0 = 170, B0 = 190; //基准色 | |
let R = R0 / (R0 + G0 + B0), G = G0 / (R0 + G0 + B0), B = B0 / (R0 + G0 + B0); //分配比例 | |
let L = 3; // 亮度增益倍率 | |
// | |
let r = data[i] * 0.3086; | |
let g = data[i + 1] * 0.6094; | |
let b = data[i + 2] * 0.0820; |
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 { Repository } from 'typeorm'; | |
import { BaseRepository, initializeTransactionalContext } from 'typeorm-transactional-cls-hooked'; | |
initializeTransactionalContext(); | |
for (const p of Object.getOwnPropertyNames(BaseRepository.prototype)) { | |
Object.defineProperty(Repository.prototype, p, Object.getOwnPropertyDescriptor(BaseRepository.prototype, p)); | |
} |
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 { Controller, INestApplication, Injectable } from '@nestjs/common'; | |
import { RepositoryService } from '../../src/typeorm'; | |
import { Company, ormConfig, User, UserProfile } from '../../integration/typeorm/e2e'; | |
import { Crud, Override, ParsedBody, ParsedParams } from '../../src/decorators'; | |
import { InjectRepository, TypeOrmModule } from '@nestjs/typeorm'; | |
import { CrudController, FilterParamParsed } from '../../src/interfaces'; | |
import { Test } from '@nestjs/testing'; | |
import * as supertest from 'supertest'; | |
import { CrudModule } from '../../src/module'; | |
import { CrudConfigService } from '../../src/module/crud-config.service'; |
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
/* | |
* Copyright under the Parsec Tech Co., Ltd. Version 1.0; | |
* you may not use this file except in compliance with the permit. | |
* Copyright (c) 2019 ChongQing Parsec Technology Corporation. All Rights Reserved. | |
* Version 1.0 | |
*/ | |
/* | |
* Created by Diluka on 2019-04-22. | |
* |
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 { | |
Authorized, | |
BadRequestError, | |
BodyParam, | |
ForbiddenError, | |
JsonController, | |
NotFoundError, | |
Put, | |
QueryParam | |
} from "routing-controllers"; |
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
sudo rm -rf $(xcode-select -print-path) | |
xcode-select --install |
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
/* | |
* Created by Diluka on 2020-06-29. | |
* | |
* | |
* ----------- 神 兽 佑 我 ----------- | |
* ┏┓ ┏┓+ + | |
* ┏┛┻━━━━━━┛┻┓ + + | |
* ┃ ┃ | |
* ┣ ━ ┃ ++ + + + | |
* ████━████ ┃+ |
OlderNewer