query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
b6a829ff68f9f1ad18f0dba9e311461b | dd1f3e122035efd9b83ec3a049ef740d | Computes Fresnel reflectance for conducting materials | impl MaterialTrait for LambertianMaterial
fn eval(&self, input: &Vec, normal: &Vec, output: &Vec) -> Color {
&self.reflectance / K_PI
} | 0 |
22e8427bdd62c4819c5184328f192244 | b3ee0efb1efcade3f0fa014f4291a852 | Check forwarding of request to absent destination | {
$_SERVER["HTTPS"] = 'on';
$_SERVER["HTTP_HOST"] = 'example.com';
$_SERVER['REQUEST_URI'] = '/nobody.php';
ob_start();
FileRouter::notFoundPage404(false);
$out = ob_get_contents();
$this->assertTrue(false !== strpos($out, 'https://example.com/nobody.php'));
... | 1 |
481b4513764f5acd0116719c1e064489 | f62403534ada1edb3530c9591e3b043b | Is executed once all of the assets have loaded and the game is ready to be 'created'. | function onAssetLoadComplete(){
if(++currentAssetLoadCount >= assetfiles.length){
background = new Background(assets,canvasElement);
setInterval(animationLoop, 1000 / fps);
}
} | 1 |
6e5f108d98fe5ebf1a35616afb379b80 | 1ccf28705e6f1451131f5be490b95f1a | Get Count All Lead Calls by DidPhone[], StartDateTime, EndDateTime | "WHERE tc.type = ?1 AND " +
"tc.is_finished = 1 AND " +
"(tc.created_time BETWEEN ?2 AND ?3 OR ?2 IS NULL OR ?3 IS NULL)", nativeQuery = true)
Long countCall(int type, Date startTime, Date endTime); | 0 |
eb65f253320b35bd67a84039f6c462c2 | 74437ccce3c3c2658c98511ca35ef8f3 | GetProductAction constructor. | class ProductSaleViewAjax
public function __construct(
\Amasty\Shopby\Helper\Data $helper,
\Magento\Framework\Controller\Result\RawFactory $resultRawFactory
) {
$this->helper = $helper;
$this->resultRawFactory = $resultRawFactory;
} | 0 |
7c394f876a60db7bcc29ab47d565ed23 | eebb04aaa80ceb9e6f645b2ca02a935d | For testing: Performs operation on two randomly generated numbers of specified sizes | {
var a = createRandomMatrix(n1, m1);
var b = createRandomMatrix(n2, m2);
var c = (double[,])a.Clone();
var d = (double[,])b.Clone();
var t1 = new Thread(()=>{
var st = new Stopwatch();
st.Reset();
st.Sta... | 1 |
364574a0987b6dd18abab20c8eae9631 | 7d133934de14e46a8e423a0ecb77cfc7 | Synchronously creates a <see cref="ComplianceClient"/> using the default credentials, endpoint and settings.
To specify custom credentials or other settings, use <see cref="ComplianceClientBuilder"/>. | namespace Google.Cloud.AutoML.V1
public abstract partial class PredictionServiceClient
public static stt::Task<PredictionServiceClient> CreateAsync(st::CancellationToken cancellationToken = default) =>
new PredictionServiceClientBuilder().BuildAsync(cancellationToken); | 0 |
85fa81319c0477337a0dca9b43a73e7e | 78bec974476654effd2fe560fdb2c0f8 | 新建PGSQL命令; | {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.Append("create procedure ");
stringBuilder.Append(procName);
stringBuilder.Append(" (");
stringBuilder.AppendLine();
string str = "\n\t";
foreach (MySqlParameter... | 0 |
5fe733d0af961ceaaf5a3c2766f4c856 | 5ac1196fff8a3f12aecbf743b730155d | Obtain the percent energy data for a sessionId | public Measurement findAvailabilityMetric(int sessionId, AppdefEntityID id) throws SessionTimeoutException,
SessionNotFoundException; | 0 |
03b50e0616b0d5aa3310f41b35cd74d2 | 5c154fa7f3335d288b1d2464141d9b07 | 產生會計憑證 | class S00016Controller extends MailController
private function makeSeal($time_zone, string $save_path = null): void
{
$timestamp = time() + $time_zone * 3600;
$date = date('Y.m.d', (int)$timestamp);
$this->fillImage(
'/var/www/storage/biz/b00010/seal.png',
'/var/www/s... | 0 |
7e2554ef2b0570ddcad41fbd5f67747b | fa300ba5bf51463cc00764d04bbd5036 | Create a new Ethereum account (aka. wallet). | type: string;
name: string;
apiKey?: string;
secret?: string;
customerId?: string;
passphrase?: string;
howConnect?: 'mnemonic_phrase' | 'keystore';
keystore?: { [key: string]: any };
walletPassword?: string;
mnemonicPhrase?: string;
}): Promise<void> {
return await this.re... | 1 |
1b4f51a5a953b307c54327cb3c25301b | fc78373d82f205d5737fc8877bf81b09 | Add bone node to our bone nodes array | class MDL_NODE_SKELETON(MDL_NODE):
def register_bone_node(self, bone_node):
print("Registering bone node:", bone_node.bone_name)
self.bone_nodes.append(bone_node) | 1 |
4a829d4af07f33e0787e619bd9d58c57 | 53a4b453271fec83b2097a8d5871ec16 | Gets the position in the stream of the next character to be read. | {
if (_stream != null)
return _stream.getPosition();
else
return -1;
} | 1 |
2a23c2e214190d305b36b6049084726e | 6d90743fda17ace59872d7f6df2c7a11 | SQLの実行計画を記録する際の閾値を更新する | global $sql_execute_list;
if (self::$debug) {
$sql_execute_list[self::$sql] = $time;
}
} | 0 |
0d84179b169ec65db7c5d4c7b3d58f08 | 33f132fcb53581f7b59de98a344cca28 | Mock function gettimeofday | function gettimeofday($return_float = false)
{
return array();
} | 1 |
4dcfa6b245870d7a0f0da040d4c7ed59 | 56c78157a6c9832500c3c7f0905ec7b3 | It Verifies the following things a) name has to be specified in named
query array b) QueryString of named query can not be overriden by XML c)
ResultType of named query can not be overriden by XML d) EjbInterfaceType
of named query can not be overriden by XML | public class MetadataProject
public void processNamedQueries(MetadataValidator validator) {
for (MetadataNamedQuery query : m_namedQueries.values()) {
try {
HashMap<String, String> hints = processQueryHints(query.getHints(), query.getName());
m_session.addEjbqlPlaceHo... | 0 |
3941f72c52818b0ea1746a29e0e8e09b | d2745066609f012f99e75a5ddce81142 | Retorna a lista com todos os cursos livres cadastrados | class OfertaCursoRepository extends BaseRepository
public function findAllByCursoWithoutEad($cursoid)
{
return $this->model
->join('acd_modalidades', 'ofc_mdl_id', '=', 'mdl_id')
->where([
['ofc_crs_id', '=', $cursoid],
['ofc_mdl_id', '=', 1]
... | 0 |
61ef246a2f57779e3b3ce2eae409eed0 | 8e7bbe82cb4de043905e38506f1935ac | Renvoie un masque avec 1 disant que le point est dans la barre, 0 sinon
Entrées: - xx : meshgrid selon x
- yy : meshgrid selon y
Sortie : - masque : masque correspondant | z = np.zeros(x.shape, dtype='uint8')
z[(x > 0) & (y > 0) & (y < -x + 1)] = 1.
z[(x > 0) & (y < 0) & (y > x - 1)] = 1.
z[(x < 0) & (y < 0) & (y > -x - 1)] = 1.
z[(x < 0) & (y > 0) & (y < x + 1)] = 1.
if flip_horizontal:
z[x > 0] = 1 - z[x > 0]
if flip_vertical:
z[y > 0] = 1 - ... | 1 |
03281875082179bd24e0037347342fef | 05e9303479c5caf06db6ed0bf77d0287 | ==========删除所有已建渲染层=============================================== | if (this.engine.scene) {
let modelLayers = this.param.modelLayers;
if (modelLayers.length > 0) {
for (let i = 0; i < modelLayers.length; i++) {
this.engine.scene.modelLayerManager.remove(modelLayers[i]);
}
this.param.mod... | 1 |
76d8a2a0bddd7686e6a8a8139372cf87 | c0d31406a5dfc79bda6beb62fc59c348 | Extracts diagonal from matrix or transforms array to square matrix. | output("Extracting diagonals ...")
market_ids = self._select_market_ids()
matrices = self._coerce_matrices(matrices, market_ids)
return self._combine_arrays(ResultsMarket.safely_extract_diagonal, market_ids, market_args=[matrices]) | 1 |
dc8ff6684fac49d5e4873ccba7dc94bb | 4aeea64abc34843bb20b988fd33b0b0a | Returns a file-like object with a read() method,
from the given file path or string. | def read_text(path_or_paths, lines=True):
def _read(path):
with open(path) as fh:
if lines:
for line in fh:
yield line
else:
yield fh.read() | 0 |
cc12a73bc7815c0db8ef1c952fc7b956 | 0fc036f5a1b9ffec50cf5b2a3393e95b | Quicksort Randomizado | def quickSort(A, p, r):
if(p < r):
q = particao(A, p, r)
quickSort(A, p, q-1)
quickSort(A, q+1, r) | 0 |
029ced66f50796ce2d843a380c47ca66 | 7d0777734b12fcca5acf4d74a67bc1b4 | This appends a collection of ValidationResults to the Errors collection | Action<TException, ValidationResultCollection> appendAction = null) where TException : BingException, new()
{
switch (result)
{
case ValidationResultCollection fluentResult:
return ToException(fluentResult, appendAction);
case null:
thr... | 0 |
6cc1bc8182c515fd14fc34dced44b395 | 49fe70ef75a02fe22ad4aafd59022159 | Configuración PIC | void PICOCAP_Config_Set(void)
{
uint8_t i = 0;
Clear_RunBit();
SPI_Transmit(0xC0);
SPI_Transmit(0x00);
while(i<80)
{
SPI_Transmit(Config[i]);
i++;
}
Set_RunBit();
} | 1 |
d925535ec59e4a60b1e22c9c88824c95 | 7239d90ff572b1aa82e2148237741227 | Create a StoredSequence from its ID. | abstract class Connection
abstract public function createSequence($seqname, $startID = 0); | 0 |
a9718812197550627a728360b2797776 | 795efe47540793e0141dc924c0cf0366 | Lists all Correo entities. | class CorreosController
def index
@correos = Correo.all
end | 1 |
aa2fccd9a9440f6d3eb1366e37666053 | c0485d2abdd719b7fe4a42e1336b1cc1 | Show users cart with completely localized info about each item | class user_wtcart_powermailCart extends tslib_pibase
public function showCart($content = '', $conf = array()) {
global $TSFE;
$local_cObj = $TSFE->cObj;
$this->pi_loadLL();
$this->conf = $GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_wtcart_pi1.'];
$this->conf = array_merge((array) $this->conf, (array) $conf)... | 1 |
7fc8fb045eefb202814724fc84d08d72 | 12d7bc4605edf6846dea0482bfbd8353 | Shows a dialog about chatroom change. | public class SearchResultActivity extends PokeBookMenuActivity{ private class DialogManager{
private void openViewChangeDialog(){
Utility.log(TAG, "openViewChangeDialog");
view_change_dialog.show();
} | 0 |
98520bdaae9770299cbfd9ca8a1c355c | d14fca47167014ba1a3df985d8087ec1 | Metoda, dodaje podany model jachtu do bazy danych. | namespace de.rietrob.dogginator_product.DogginatorLibrary.DataAccess
DogModel AddDogToDatabase(DogModel dModel); | 0 |
84926f07b5400b138ec77ed41bb4124f | 121f41b69772aac3a465266e288aa30f | Utilizes the boto3 library to register a task definition
with AWS. | client = get_ecs_client(access_key, secret_key, region)
tasks_definitions = client.list_task_definitions(familyPrefix=task_definition)
for task_def in tasks_definitions['taskDefinitionArns']:
client.deregister_task_definition(taskDefinition=task_def) | 0 |
64184c6fc240e35dfbf713f58e1f1473 | 827864e72e8dd7a46c8029ea1135614b | Getting Module ID from configuration file | public class Module implements Serializable
public String getId() {
return this.config.getString(CONFIG_ID);
} | 1 |
1bc2aaa05d817b1d4d28a23a5a0ff3fe | a27bea1ce65db7c9a49a3993c900d8e1 | Symmetric difference of a series.
Forward and backward difference used for endpoints.
... notation makes it work with 1d time series, or a stack of time series. | def fn_diff(sr_input, n=1):
if n < 1:
return sr_input
sr_output = sr_input.copy()
for i in range(n):
sr_output += -sr_output.shift(1)
sr_output.name = '{name}_diff_{n}'.format(name=sr_input.name, n=n)
return sr_output.dropna() | 0 |
10c72c57232bbd21f3cd257547e008ca | e6770004f0b1d4c3ee63b9d9f9f33a3c | Negative log-liklihood average across predicted tokens. Lower values are better. | class LogisticRegression(object):
def negative_log_likelihood(self, y):
return -T.mean(
T.log(self.p_y_given_x)[T.arange(y.shape[0]), y]
) | 1 |
5e0078a95806238e6956032c74072179 | df73d6bbbe012d537ed6f991191cd731 | 查询所有有效商品列表 | @Api(tags = "商品")
@RestController
@RequestMapping("/goods")
public class GoodsController
@GetMapping("/list")
public ResultVO queryGoodsList(@RequestParam Map<String,Object> queryMap){
QueryWrapper<Goods> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("t.valid_flag",ConstantUtils.ACTIVE);
... | 1 |
aa61e238181bd55bedc976534a0aded1 | 018e45ebced07b30e26e3fb16f3fb632 | Calculates all Coordinates between two places on the board. Works for both diagonal and horizontal movements.
Includes endpoint. | old_position = self.get_coordinates()
current_row = int(old_position[1:])
color = self.get_color()
movement_list = []
column = self._letter_to_number_dict[old_position[0]]
piece_in_front = False
for x in range(column + 1, 9):
grid_piece = board[current... | 0 |
dcea5e0c83f6d25dd5de55727bcadbcd | 46f6bbd138f78849de3a24ccbaeffb1a | 클립 저장 테스트 | pid2 = create_project(name="test_project2")
rid2 = create_root_folder(path="/home/user/", name="test_folder2")
mock_create_hash_sum.return_value = '1234567'
create_clip(fid=rid2, clip_name="test_clip4", video_format="tvf", start_time=self.st,
end_time=self.et, latitud... | 1 |
1a00b54e3ef70fe6ca74380f7fe4284c | b940d03f4cfd7f92d6a287b7c57ba60e | Adds the proper classes for positioning the docs to the side or below | function phg_gold_body_classes( $classes ) {
if ( is_multi_author() ) {
$classes[] = 'group-blog';
}
if ( !is_home() && !is_front_page() ) {
$classes[] = 'subpage';
}
if ( get_theme_mod( 'phg_gold_sidebar_position' ) == "pull-right" ) {
$classes[] = 'has-sidebar-left';
} else if ( get_theme_mod( 'p... | 1 |
623f0444632c0f08deca22b56ee34b59 | 1a1664cb00f9df477bda05021045ad98 | Set the interaction mode like upgrade mode, special attack mode. | class Boss extends Character
setMode (mode) {
this.mode = mode
} | 1 |
e09e4c1e21459006f3fbb00e66789fe0 | 7cfa63428fdbaecedff2ce291ebba91b | Método que lista Computadores na rede que não possuem aplicação | $oSicasPessoaBD = new SicasPessoaBD ();
if ($oSicasPessoaBD->msg != '') {
$this->msg = $oSicasPessoaBD->msg;
return false;
}
return $oSicasPessoaBD->getAllNotServidor();
} | 0 |
fdf4a48d06663ba0583d551098d737aa | c42ca9100bf1f3eb308b5232038c5f4e | <summary>Destroys present value factors array.</summary> | void MaxSumController::clear()
{
factors_i.clear();
values_i.clear();
fac2varMsgs_i.clear();
var2facMsgs_i.clear();
} | 1 |
8fe39063ff777f1846776b0854bf5578 | 9de168d1ab7514a14f44d4cc85f2073f | Creates or updates an analytic export service using the supplied export definition. | ExportDataAsync(new ExportDataRequest
{
Name = gax::GaxPreconditions.CheckNotNullOrEmpty(name, nameof(name)),
ExportConfig = gax::GaxPreconditions.CheckNotNull(exportConfig, nameof(exportConfig)),
}, callSettings); | 0 |
2419f18b00e5fb089e44b11f8485255a | f4045a4004fb0909eb070d14ec824fbb | Gets rider 2 position 2 coefficient. | public class Event
public double getRider3Position1Coefficient() {
return rider3Position1Coefficient;
} | 0 |
95ef58a383282e13778d1b13f9a4c43c | 3545ed74ee10b764f87a5f516a29030c | Calculates the determinant of a mat2d
Returns determinant of a | namespace Obj_Optimizer_7x
public class Mat2d
public static float Determinant(float[] a)
{
return a[0] * a[3] - a[1] * a[2];
} | 1 |
c8e6187f90be3068bac84632c2ea408f | b6b9b2b0516abdc42d526202698c01e1 | This method Updates Knee Questionnaire information against the Contact Matter. | namespace ProductDefectsWCFClient
[System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IContactMatterService/UpdateContactMatterHospitals", ReplyAction = "http://tempuri.org/IContactMatterService/UpdateContactMatterHospitalsResponse")]
ProductDefectsDto.Messages.HospitalResponse UpdateCo... | 0 |
7937951b68491fe9803fcdee4d411b91 | 6d8544a5f079a0086176c5a7b70db454 | Elimina dall'SPGM per la singola commodity gli archi secondo
la Proposizione 6. | {
for (int i = 0; i < int(Vertices.size()) - 1; i++)
for (int j = i + 1; j < int(Vertices.size()); j++)
while (MSm[i][j] > 1)
for (int k = 0; k < int(Archs.size()); k++)
{
if (Archs[k].tree)
continue;
if (((Archs[k].StartVertex == i) && (Archs[k].EndVertex == ... | 1 |
8baac6371d51129465918ee7c96793c9 | 2997c5531dd1a458e5d675dc354c25aa | Cleanup inconsistent song lyrics file names. | unwantedstuff = [
'../../Music/iTunes/iTunes Media/Music/Unknown Artist/Conducting 5850 CD 1',
'../../Music/iTunes/iTunes Media/Music/Unknown Artist/DSO Audition Tape',
'../../Music/iTunes/iTunes Media/Music/Rise Up Singing',
'../../Music/iTunes/iTunes Media/Music/Zachary Kazarinoff'... | 0 |
6ee3f4da68cb7e9a5e4e61488a994e54 | ff1a7722fe67bef0194962daf23ed435 | 获取总成交量 | public int getTradeVolume(); | 1 |
9eac10d199fb8b85f5f2606d096675da | 36a061c3d62a0d8030ec7717eceed2d9 | Setting the parameters for the boosted estimator
Valid parameter keys can be listed with get_params(). | class ModifiedCatBoostClassifier(BaseEstimator, ClassifierMixin):
def set_params(self, **params: Any) -> "ModifiedCatBoostClassifier":
for key, value in params.items():
self._params[key] = value
self._model.set_params(**params)
return self | 1 |
08ec8c457d53d78e16c2b314cecfd8c9 | 332d77d98b9a2a55cef93c4d09491294 | Using bits to store the occurrence of a character | if(self.occurrence[ord(char)] == -1):
self.occurrence[ord(char)] = self.index
elif self.occurrence[ord(char)] == -2:
pass
else:
self.occurrence[ord(char)] = -2
self.index += 1 | 0 |
0c54b21f4eec9fb40ba4bc7e5a041d51 | 4b8dce5cb2e70ccd9d0a20306e21bc81 | 根据角色ID、菜单ID,获取 SYS_Role_Menu对象集合 | public List<SysRoleMenuEntity> selectSysRoleMenu(SysRoleMenuEntity sysRoleMenuEntity) throws Exception; | 1 |
a39601e9f441d6934189ef0b77677667 | 14e0838fe6e851297c7dc1de72d35467 | Select all GameObjects within the screen space rectangle. | public class Utils
public static List<GameObject> ScreenPointGameObjects(Vector2 pos)
{
List<GameObject> gameObjects = new List<GameObject>();
if (EventSystem.current != null)
{
PointerEventData eventData = new PointerEventData(EventSystem.current);
eventData.position... | 0 |
53588eccfbd511ac5b7e83c7cbb79c58 | ea88092b1da5f5cc13ec6b1327219e1d | Returns `true` if query has at least one result. | class ArrayQuery extends Component
public function exists(): bool
{
$data = $this->fetchData();
return !empty($data);
} | 1 |
688f0be9c6f6850df860cc4f957302a3 | f2002249acb04fb4d9d4f364a02bbc13 | Gets the value of the refs property. | class CheckerState():
def get_refs(self):
return self.block_state.refs | 1 |
b05718f94cd083015cf2d85b8de6b01e | fe75a78fa0ab4d76e46520a02da1f8f7 | 显示微信icon或新银联icon | function showWeChatOrNewUnionpayIcon()
if Common.getCurrentNameOfAppPackageIsTQ() then
ImageView_weixin:loadTexture(Common.getResourcePath("ui_recharge_guide_btn_weixinzhifu.png"));
else
ImageView_weixin:loadTexture(Common.getResourcePath("ui_recharge_guide_btn_yinlianzhifu.png"));
end
end | 1 |
ee9d2e73d2d096cf66dfd1bc23872c84 | acec5f289e0679342f5de1ec4c603e98 | Returns the absolute value of a <see cref="System.Int32"/>. | namespace RationalNumbers
public static class IntNumberExtensions
internal static int Abs(this int intNumber) => Math.Abs(intNumber); | 1 |
bacaa358edb00d51f1edb7640a5f14c5 | ad3599de1df3348cedde8a25dc53f2a4 | getArgs gets command-line arguments. | pub fn get_args() -> MyResult<Config> {
let matches = App::new("tailr")
.version("0.1.0")
.author("Ken Youens-Clark <kyclark@gmail.com>")
.about("Rust tail")
.arg(
Arg::with_name("files")
.value_name("FILE")
.help("Input file(s)")
... | 1 |
169e5628777e6a76855465623f925fa0 | ad2fc3b440389d1ffce65ede4dba82c5 | 获取量房的信息 | {
$sql = "SELECT
city. NAME cityName,
area. NAME areaName,
p. NAME xqName,
b. NAME dong,
r.unit,
r.room,
r.cstname,
r.telphone,
r.cstcode,
r.basenumber,
type. NAME typeName,
brand. NAME brandName,
... | 1 |
af29a6b403a4b99d28567dcc691573f4 | a7906a5ef3bb9897cc1c74de372d9daf | 按照本地时间设置年份值,并以毫秒为单位返回新时间。 Date | return new Date(
date.getFullYear() + years,
date.getMonth(),
date.getDate(),
date.getHours(),
date.getMinutes(),
date.getSeconds(),
date.getMilliseconds()
);
} | 1 |
81aaf1018e5c7f0726f6df7ea9e142e2 | 48b315eebc317ff3862e9e88466f3616 | Helper function for printing command line counter | int counter = 1;
for (int x = 0; x < size; x++) {
string display = to_string(counter) + ": " + cmd[x];
cout << display << endl;
counter++;
}
return;
} | 1 |
7ae38eeed88de67b9287aaa6c840833c | 30ddd445427207c2e4da2ab682f35a92 | u'''フロント用:ログイン顧客IDを取得 | class ManageHelper(Helper):
# def __init__(self):
# # 親のコンストラクタをコール
# Helper.__init__(self)
def getLoginOperatorID(self):
return UcfUtil.nvl(self.getSession(UcfConfig.SESSIONKEY_MANAGE_LOGIN_ID)) | 1 |
99fba56a07695f6ee010877bb066d16e | c03771b6132c818ebdfeb6c504dc9640 | a receive with a timer to wait looping through recv and buffering the received data | {
int32_t status;
int32_t socketFd = comm;
#ifdef SOC_RCV_TIMEOUT_OPT
SlNetSock_Timeval_t timeVal;
timeVal.tv_sec = waitSecs;
timeVal.tv_usec = 0;
status = SlNetSock_setOpt(socketFd, SLNETSOCK_LVL_SOCKET, SLNETSOCK_OPSOCK_RCV_TIMEO, &timeVal, sizeof(timeVal));
if (status == 0... | 0 |
736427910cb325f3c9230d45045c00fd | bfc31090481c7a56bd3d6be269c26153 | Список доноров. | class DonatorController extends Controller
public function index( Request $request )
{
try {
$statement = User::prepareSearch( $request->all() );
$response = UserResource::collection( $statement->where('status', 1 )->get()->all() );
}
catch ( SearchParamNotFoundExcept... | 1 |
c92edb66ba5d5e85a533f20a1c3e697a | 5d368bde1784dc332d8599c1e1a229aa | 将Excel转换为PDF | {
checkValidation();
String orgFile = student.getExcelFilePath();
String convertedFile = orgFile.substring(0, orgFile.lastIndexOf(".")).replace("upload", "upload/pdf") + "." + PDF;
Integer jobId = startJob(orgFile);
Integer fileId = checkCompleteJob(jobId);
convertedF... | 1 |
b010f605f49fb71e0ae564037639581f | 83fb4ebecf3d433f63e6b6dbdb9d67b5 | Creates a Dynamic Link from the parameters. | namespace MyShortcut
internal static class Shortcut
public static bool Create(
string pathToFile, string pathToLink,
string description, string iconFile, int iconIndex)
{
IShellLink shlLink = (IShellLink)(new ShellLink());
Marshal.ThrowExceptionForHR(shlLink.S... | 1 |
311d6e4741a6381ee134c99b98d02490 | 8abc77ae9beb0a62a26e4cceae41b37c | Insert the whole object in the Cassandra database
The object is serialized and inserted as a Byte array in the database | public void put(long guidObject, InputStream inputStream) throws IOException, RemoteException; | 0 |
347033ba75a833227ea9ee2ab05922e2 | dd26d735c3fad00fbb98895c28156da7 | https://stackoverflow.com/a/5865594/9295513 | function shuffle(iterable) {
const array = [...iterable]
for (let i = array.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1))
;[array[i], array[j]] = [array[j], array[i]]
}
return array
} | 1 |
ef246c792e2f2837a59a7c655924e793 | 4a4daf560aa512e0f78aab8972a87f56 | criando as imagens que compõe o email | img = Image.open(f'images/{person}.png')
draw = ImageDraw.Draw(img)
font = ImageFont.truetype(FONT_FILE, 20)
if text_color=='BRANCO':
color = (255,255,255)
elif text_color == 'PRETO':
color = (0,0,0)
elif text_color == 'VERMELHO':
color = (255,0,0)
elif text_color == ... | 1 |
8ee054a0c97bf243a2fdb64e88957db0 | 67bc2c476a469997e9c6ebc54585cde9 | Method to enter the details of the global parameters for the experiment | long numberOfLines = 0;
String lineParam ="";
try (Stream<String> s = Files.lines(Paths.get(SETUP_LOCATION),
Charset.defaultCharset())) {
numberOfLines = s.count();
} catch (IOException e) {
validationStatus = false;
JOptionPane.showMessageDialog(null, FILE_NOT_FOUN... | 1 |
63221deba6247c708382e3b95eb3d924 | 5f644a4b37cc53a18e282a11db642b2f | This function calculates the sha1 hexdigest for a given file | sha1Obj = sha1()
with open(filename, 'rb') as f:
sha1Obj.update(f.read())
return sha1Obj.hexdigest() | 1 |
c397dfcd68976a82539ec6fa9b5fc3f9 | 7370bd225432ce9fcf1b3e1b43ea3bd8 | MessageBox是与各按钮绑定的消息提示框函数,当Dialog中没有加载图片时,
会弹出提示框,否则会正确地开始图像处理 | {
WM_HWIN hWin = pMsg->hWin;
char temp[80];
char* Line1;
char* Line2;
switch (pMsg->MsgId)
{
case WM_PAINT:
GUI_Clear();
ShowInfoTitle((char*)MsgBoxData.Caption);
GUI_SetFont(&SMALL_FONT);
if(MsgBoxData.Help1[0] == 0)
{
... | 0 |
be36259613adbcd7383b437fe029eb13 | 010197b94c9bd38cd3253b342c48160d | Показать диалог выдачи прав на вложения. | namespace SpiderEye
DialogResult Show(); | 0 |
b864c9b270986f05bb3bf94766eccbb6 | 6a44ef7f749b54b7a08ebe969184dcc4 | creating customer accounts as a list to allow customers to have multiple accounts | class CustomersAll:
def __init__(self,customer_obj_list):
self.customers=customer_obj_list | 0 |
339b30cd3ede7383fdf4244e0dc306e4 | f10f41b592f6cb9702d871ad9380ccab | 获取渠道强更配置版本号,默认为0,当不改变服务器版本号和程序版本号时,通过这个值实现单独渠道强更 lihao_yd 2015-12-08 | public class BaseConfigPreferences
public void setPluginUpgradeConfigVersion(int version){
baseSP.edit().putInt(KEY_PLUGIN_UPGRADE_CONFIG_VERSION_2318, version).commit();
} | 0 |
51b0fdc15dae126b8eef6b43a5e646e8 | 20369a2587d9a0c063f069aef056ea00 | gets points for commando move
inputs -- NONE
outputs -- list containing lists of x,y values of open commando points
For each element in commandolist
index 0 : x
index 1 : y | class abstract:
def move_list(self):
move=[
[160,160],
[220,90],
[90,220],
[220,220],
[90,90]
]
return move | 1 |
0499509582d31d37f0cb3dc85fcbde56 | 5c2928d5c7893601621e423a3c99011a | 根据功能Id删除角色功能. | public void deleteRoleFunctionbyFunctionId(int functionId); | 1 |
30ee418dc9e82318c964feb2952b4f17 | d0a5c59bb80278699bbdd4a22aaecd17 | Draw our hello world | class Timeline:
def hello(self, widget):
print 'Hello World' | 0 |
fefc6b2154228a8c088039003ef381e2 | 7f4be04cef249a2c0497d4a2c00418d9 | Obtiene la informacion de los templates, asociados al rut. | def CallServiceGetRut(Tabla,rut):
query="SELECT * FROM "+str(Tabla)+" WHERE rut = "+str(rut)+""
data = run_query(query)
error=[]
if data==error:
return error
else:
return data | 1 |
89867858775f5962f0532c2d317f7417 | 7c16fcc97e602ae792e5ede66ee6e3e5 | 编辑收藏的网站 | httpManage.collectWebsite(new BaseObserver<WebsiteCollectBean>(WebActivity.this) {
@Override
protected void onHandleSuccess(WebsiteCollectBean websiteCollectBean) {
int collectId = websiteCollectBean.getId();
showSnackbar(collectId);
}
... | 0 |
39f1ba432843c04216da0618a74a8711 | 6ac6765239fd1cbf799752726403ed1b | 获取群列表B | class AndroidQQ:
def getGroupList(self):
req = Packet.Pack_FriendListService_GetTroopListReqV2(self)
self.FunSend(Coder.hexstr2str(req)) | 1 |
18b8193ee4c7a57c750976af7be98315 | 5c014443160f931008b33e36531c71ce | Function invoked for drawing using OpenGL | namespace AssimpSample
public partial class MainWindow : Window, INotifyPropertyChanged
private void openGLControl_OpenGLDraw(object sender, OpenGLEventArgs args)
{
m_world.Draw(args.OpenGL);
} | 1 |
17183295cc3892513ee6b46c073327f9 | 9ef0a955dd892cbcc4f93d995996d234 | Notify listeners that the screen has changed. | void ScreensModel::update()
Q_FOREACH (auto screen, newScreenList) {
Q_EMIT screenAdded(screen);
m_displayListener->add_display(qtmir::toMirRectangle(screen->geometry()));
} | 1 |
b170a6dfcfc92fdc496c9d1a7cf13361 | cbbbfb82c662da5951a8382d61c159ca | Returns possible RNA Sequence from Eulerian trail of edges | def perfect_coverage_recon(r):
g = ro.de_bruijn_graph(r)
s, node = '', g.nodes_iter().next()
for _ in xrange(g.number_of_nodes()):
s += node[0]
node = g.successors_iter(node).next()
return s | 1 |
f1e8a6b3dcd34cc1811b77ca61238961 | 59f6bda5a99127985b3a198133ba12e4 | Emits the active profile, as well as future active profile changes | @Keep
interface ProfileFacade : ProfileOperations
fun activeProfileFlowable(): Flowable<IProfile> | 1 |
cc738b3c837fe9718898ae7a81ac9235 | b80d11655f39d6467f82ff609424e95f | Search the tunnel by the tunnel ID that is assigned by the client | envelopeFindTunnelByPublicKey(NetInterface *ni,
CryptoKey publicKey[CryptoBoxPublicKeySize])
{
ASSERT(NULL != ni);
ASSERT(NULL != ni->tunnelPublicKeyHashTable);
ListHead *l = hashTableFind (ni->tunnelPublicKeyHashTable, publicKey);
return l ? list_entry (l, Tunnel, tunn... | 0 |
0f15bd4f3413766a741eebbd8d1afb4c | 3991fb4fa1ae2df2971c7ec3ddfb6f6c | input format is M/D/YYYY | def getMaturityDate(d):
try:
output=datetime.datetime.strptime(d,'%m/%d/%Y')
except:
output=datetime.datetime(2049,12,31)
return output | 1 |
72f11b417a7fdfdc5242041783625e58 | 5c84d1ed19e37b6e5fecf64aaed2fdbf | 线程查询收费信息 | {
if (GetFee())
{
;
}
else
{
qDebug("GetFee failed");
}
} | 0 |
2899e5f264b765c6e380d62091a72f2b | 97768b9242c4fc6a8735067f655fa62b | L�scht Datei und gibt bei Erfolg true zur�ck. | {
try
{
if(file.delete())
Logger.logIntern("\"" + file.getName() + "\" wurde gelöscht.");
}
catch(Exception ex)
{
Logger.logIntern("\"" + file.getName() + "\" konnte nicht gelöscht werden");
Logger.error(ex);
}
} | 0 |
3c581774d1c7fb9d6b53bb20d7207657 | 4f173f429eaef2c1a3c8048ddb5f8f10 | Получает массив байт из текстового паттерна | namespace WindowsFormsApp1
public partial class Lab3 : Form
private byte[] GetBytesArrayFromText(string text)
{
int blocksCount = 0;
double tmp;
System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
byte[] strBytes = enc.GetBytes(text);
t... | 1 |
ea80fc5dcb929cd23deb9d5c4d5cce00 | cb92ff01bb7e69adb1c00e480299dff9 | Is the status code a cancelled status code? | class Status extends Base
isCancel(): boolean {
return this.status === STATUS.CANCEL;
} | 1 |
cae6b5da05e050f61c977ee1bdd08171 | 7b0299d9efbf61b65db16036cf1b80c6 | 装入所有焊接项目到组合框 | {
CheckBox ckbWeldMethodAll = (CheckBox)(this.gvWeldMethod.HeaderRow.FindControl("ckbWeldMethodAll"));
int rowsCount = this.gvWeldMethod.Rows.Count;
for (int i = 0; i < rowsCount; i++)
{
((CheckBox)(this.gvWeldMethod.Rows[i].FindControl("ckbBS_Weld... | 0 |
16ed269d03f26619a8c2f75588a8743d | 071d4bddabb538a05a2b49888fd65b35 | Determines if any elements in a matrix are either <see cref="float.PositiveInfinity" /> or <see cref="float.NegativeInfinity" />. | [MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsAnyInfinity(Matrix4x4 value)
{
return VectorUtilities.IsAnyInfinity(value._x)
|| VectorUtilities.IsAnyInfinity(value._y)
|| VectorUtilities.IsAnyInfinity(value._z)
|| VectorUtilities.IsAnyInfinit... | 1 |
e3cc975f2556fd144641f984c3533eb1 | 3ca9ff1114822c5a6a0c04e5903674de | Assign port numbers | this.lowPort = lowest;
this.highPort = highest;
this.nextPort = lowPort;
} | 1 |
a7b2ce97ee523acddc80cbfe6b5110d6 | 61b506833f51e07181edec81c21b1e02 | 删除选秀主题 | if(IS_POST) {
$model = M('SecondTheme', '', 'DB_CONFIG2');
if (isset($_POST['theme_id']) && intval($_POST['theme_id'])) {
$where['id'] = intval($_POST['theme_id']);
}
if (isset($_POST['theme_ids']) && !empty($_POST['theme_ids'])) {
... | 1 |
860e0b724a3ad3a9abc75fe926418204 | 1907a50f8b7e67c54d961f72eb42ee0a | 更改上限 | class IntegralController extends BaseController
public function max(){
$arr = Request::input();
$res = DB::table('integral')->where("id","=",$arr['pid'])->update(['max'=>$arr['max']]);
return $res;
} | 1 |
5a87bf1d35792eb5db010218a6b82a4a | 96475408f8cd94ab66141560bef941a4 | Return True if we can visit the object. We could do
deeper (but not time consuming) checks here, for instance
if the health checker only deals with
JavaImageEvaluatorActivityHealthChecker where
a certain configuration option is enabled. | public boolean visit(APObj obj); | 1 |
f52c5b330a8ee71c96849d1dfd74dadd | 83c7120c1e970a82128f232ba76c5726 | 該当ユーザーにTwitterのDMを送信 | def begin_twitter_DM(message):
user_id = config.USER_ID
loginfo.send_directMessage(user_id, message) | 1 |
160d7ee7402e919280778e5c8bedea59 | dc580de964ab35d68176110ba99d3be9 | Get all Now Playing movies that needs admin's approval | namespace TheMovieDbNet.Services
Task<DatedPagedResult<MovieSearchItem>> GetNowPlayingAsync(int page = 0, string region = "", string language = ""); | 0 |
fb831d6eb137421203610d730a35d2f9 | ec3c69b714f81fd5c935f2ec61962289 | Copy the elements of this matrix to a rectangular array. | {
double[] ret = new double[R() * C()];
for (int r = 0; r < R(); r++) {
for (int c = 0; c < C(); c++) {
ret[c * R() + r] = this.get(r, c);
}
}
return new Matrixd(C(), R(), ret);
} | 1 |
919de08a6f557cbd7e187410356c24e0 | 09f10c1fe66a619a5abe4109aa1c46ac | Called when user stops interacting with song timeline.
Allows timeline to continue ticking forward with music and setting new song location. | {
bool invertedGoToLastPlaybackPositionBehavior = InputUtils.IsKeyboardControlPressed();
bool goToLastPlaybackPosition = (settings.SongEditorSettings.GoToLastPlaybackPosition &&
!invertedGoToLastPlaybackPositionBehavior)
... | 0 |
aeafe1d12811d3ce2ff6656e3ffab1d7 | 1e9e0402884c68144280a55e4b53addb | Test the get config parameters websocket command. | hass: HomeAssistant, hass_ws_client: WebSocketGenerator, mock_camera, mock_stream
) -> None:
await async_setup_component(hass, "camera", {})
client = await hass_ws_client(hass)
await client.send_json(
{"id": 6, "type": "camera/stream", "entity_id": "camera.demo_camera"}
)
msg = await cli... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.