query_id
string
corpus_id
string
query
string
code
string
label
int64
b23d2ccda25d2258c8ba3478cfcaf1af
79e29ca38e69ca7fe4ec8402ab7ddca0
When set to true adds toggle button to toggle search toolbar (default: false)
namespace Hexa.Core.Web.Mvc.Helpers public class Grid public Grid SetSearchToggleButton(bool searchToggleButton) { this.searchToggleButton = searchToggleButton; return this; }
1
2d8d2ec7aedc7684af305faf64aa16ab
b03e9ce8d823a4273424e9518fa73b48
Retrieves the value of the designated column in the current row of this ResultSet object as a double.
public abstract class DirectEpsgFactory extends DirectAuthorityFactory implements CRSAuthorityFactory, CSAuthorityFactory, DatumAuthorityFactory, CoordinateOperationAuthorityFactory private static double getDouble(final ResultSet result, final int columnIndex, final String code) ...
1
5d8afb87e67f496fb8b38dc9aefc3b00
b9b0fc892e42e65cfef27ca686ca57bd
Loop through each value in he score matrix and determine which direction a cell got its score
if (y == 60) return 4; int upValue = 0; if (y < 60) upValue = mazeSolution[x][y] - mazeSolution[x][y + 1]; int downValue = 0; if (y > 0) downValue = mazeSolution[x][y] - mazeSolution[x][y - 1]; int leftValue = 0; if (x > 0) leftValue = mazeSolution[x][y] - mazeSolution[x - 1][y]; int rightValue = 0; if...
1
8f564df5f0db12d3f437db12d676b214
cd3f4fe633d344b2ecdad0a86da431d7
Annotate the total count and amount for expenses and revenues for all credebtors in each chain.
const { state } = this; state.debtSnapshot = newDebt; state.interestSnapshot = state.manager.getCompoundedInterest(); }
0
3c7beaf581eb22f247e7602f0e793dd2
7e4617268e3efa61fb05b850bba63bcf
calculate a range of indices that are symmetric WRT the center of a grid
nx, ny, nz = shape dx, dy, dz = nx // 2, ny // 2, nz // 2 a, b, c = center y, x, z = np.ogrid[a - dx - 1:dx + a, b - dy - 1:dy + b, c - dz - 1:dz + c] return x, y, z
1
f033aabf0710472275fccc0b6d5c54d6
0c2aaf33597a1ecfe6218885cb3cbd62
Show an alert message if the email notification sent failed.
class ResetPasswordController extends Controller protected function sendResetFailedResponse(Request $request, $response) { $response = 'auth.notification.password.token'; alert()->error(__('sweetalert.title.error'), __($response))->showConfirmButton(); return redirect()->back() -...
1
e0d4b18f4c8256d4937ddc234fc617fd
e2ac0491ca8dcc290b09a6775f7ff3cd
取得剩余密码券数量
CK_SESSION_HANDLE hSession, CK_ULONG_PTR pulCount ){ CK_RV ret = CKR_SESSION_HANDLE_INVALID; sessionServer server; p11Table.GetSession(hSession,&server); if(server.des == "hd"){ ret = pHD->Adapter_C_Extend_Get_OTP_Remain_Count(server.handle,pulCount); }else if(server.des == "jw"){ ret = pJW->Adapter_C_Exte...
1
64f30363f8c2055421040458e9f34f2b
2c8ea9f7878867274b2b83945b4450f6
Sets the value(s) for <b>instant</b> (When the data values are reported) <p> <b>Definition:</b> The point in time that the values are reported </p>
public interface TableWriter : AutoCloseable public fun setInstant(name: String, value: Instant): Unit = setInstant(resolve(name), value)
1
6a1c62f94c8f5153b95547c362cfc85c
bd4f51b825b1a5671903ad9a53a970e0
Exclude vendor feedback from WP_Query and Recent Comments widget in the WordPress dashboard
global $wpdb; $where .= $wpdb->prepare( ' AND comment_type != %s', 'edd_vendor_feedback' ); return $where; }
1
84be8099dc679fdc696b34addf828d57
d06cdbb51fe2fe5d0a0219f79803db09
Create a new frame, whose parent frame is this one.
namespace AIMP.SDK.Interfaces IntPtr CreateFrame(IntPtr parentWindow);
1
2f9318a41c00b87f2c3b88780470d0fd
23bea765543c4594cd67bdf1950b686f
@brief Computes the SHA256 of a file's contents and returns the hex hash
func sha256sum(filePath string) (string, error) { file, err := os.Open(filePath) if err != nil { return "", err } defer file.Close() hash := sha256.New() _, err = io.Copy(hash, file) if err != nil { return "", err } return hex.EncodeToString(hash.Sum(nil)), nil }
1
a78dfc3f0381be6277a1ee47cc37df23
2009c139579b6191c70756479f7f6265
Расчет отклонений по статям затрат в руб
public decimal CalcArW(decimal Ac, decimal Wr) { return Ac * (100 - Wr) / 100; }
0
530bc57626b90021fe78be9c1199b01c
f727e4b66eb0887edbbf48c41b999392
Return the value for all buttons from the controller
class IGUIController(QtCore.QObject): def get_all_values(self): return self.params_table.get_all_values()
0
769f75dd296df08e0c0ca12a9bfdb9ed
425ed4d934569512931efb7ba7e712d6
Use Collab-web Following API to follow a given object for a user.
class NotesApi def add_follow(id, opts = {}) data, status_code, headers = add_follow_with_http_info(id, opts) return data end
1
8bbe618681895e077e315961775730ac
0d39687e86241d2eb539e38b4f44beea
Restore Socrates to full health
void RestoreHealthGoodie::updateSocrates() const { getWorld()->restoreSocratesHitPoints(); }
1
bd626e11353392191160b6392091bbc9
7f61448ad6da3ef0f9cb03f40c5be655
into the stack
cases like (1)
0
ffb06ca6aee3d835f9e42e580ae7c085
6af2f6cab1089e313e40e5b60d58c523
Função que executa a instrução INC
namespace Intel4004 public class MCS_4_4004_InstructionSet public void Execute_INC(MCS_4_4004_Instruction instruction) { BitArray array = registers.ReadIndexRegister(instruction.OPA); BitArray tempArray = new BitArray(5, false); tempArray.Set(0, array.Get(3)); ...
1
24d9245d03abf7e06bdab428d3582887
74fa5a7390f813e16ac34e4f29745310
Generate YAML dictionary via obtaining possible variables from Faucet CONF objects
func TFVars(sources TFVarsSources) ([]byte, error) { bootstrapIP, err := cidr.Host(sources.MachineCIDR, 10) if err != nil { return nil, errors.Errorf("failed to generate bootstrap IP: %v", err) } masterIPs, err := generateIPs("master", sources.MachineCIDR, sources.MasterCount, 11) if err != nil { return nil, e...
0
e53012c1719afa2db3ff2dcd636e4e9a
4af0ec2aa602702f6f4ae1607fdc8ea5
Returns the race distance
public class RaceInfo public int getDistance() { return myDistance; }
1
7b71c5e094e8d1f503db02d1f0c34c32
e0b8be7fe7e737364ae54be76941eb40
This function creates and returns an object that is passed through to the PayPal Node SDK to create a payment that a user must manually approve. See https://developer.paypal.com/docs/api/payments/#payment_create_request for a description of * the fields.
$redirectUrls = new RedirectUrls(); $redirectUrls->setReturnUrl($redirect_url); $redirectUrls->setCancelUrl($cancel_url); $payer = new Payer(); $payer->setPaymentMethod("paypal"); $amount = new Amount(); $amount->setCurrency($currency); $amount->setTotal($total); $items = new ItemList(); $items->set...
1
e8bd657888700851f9b1bc8192f9152d
5fb0fe1f824cfc2daa893a93ae3480f8
大臣列表展示
namespace Portal.Areas.SysManager.Controllers public class UserinfoController : BaseController public ActionResult AllocatedMinisterList(string userinfoCode) { List<CommonService.Model.SysManager.C_Userinfo> userinfos = _userinfoWCF.GetMinisterList(new Guid(userinfoCode)); return Vie...
1
908b361b54c9275b21a2e11c0aa7e6d9
24a5b1e7c764d8af1e7bf052db0463bb
半角を全角にする
namespace BIN.DataAccess.Define public class Public public static string Half2Full(string input) { char[] cc = input.ToCharArray(); for (int i = 0; i < cc.Length; i++) { if (cc[i] == 32) { cc[i] = (char)12288; ...
1
a395ba9af1ed8093012f61ba1e26475f
a0280be3d4dc5f0f0279a08376517d9a
Returns the number of attribute types at {@link DataDefinition} list.
class DataDefinition(object): def attributeCount(self) -> int: return len(self.__attributeTypes)
1
4b30c381ebcf4540e7eece409862c176
6855fd378132967afe6dbb0ddf78ba20
Same as str_end_with() except there is no distinction in case
size_t str_len = strlen(str); size_t end_len = strlen(end); if (str_len < end_len) return 0; return (strcmp(&(str[str_len-end_len]), end) == 0); }
0
9b4083554a985cacef6b4ce2e3333d8b
30841ce19b281b26f31fff8902543fbd
вывод пути в файл
{ int N=widget->numb(); int sum; ui->listWidget_4->addItem("Результат"); for(int j=0;j<N;j++) { QString list_mass; for(int i=0;i<N;i++) { if(widget->Array[j][i]==inf) { list_mass.push_back("x"); } else ...
0
e5d46e6bcc5b01ceb9ae45d073f5bd14
b0acc55e0e519c3e596f0adbad9c4b2b
runs through the player's turn until he stays or busts
def proceed_turn(): global game_set give_cards() game_set = False if mode == 'hard': if DEALER.balance < 15000: itr = (10 - int(DEALER.balance/1500)) * 2 while DEALER.sum_value() != 21 and itr > 0: give_cards() itr -= 1 if DEALER....
0
a89949f355175af9d2c3107710b3d158
ba1d0c228fb137491c1944f306d00bbf
Write file from bytes by channel.
fun writeFileFromBytesByStream(filePath: String, bytes: ByteArray): Boolean { return writeFileFromBytesByStream( getFileByPath( filePath ), bytes, false ) }
0
4f932f4a5793848bfb0424498fda0164
c3313f06f35256e8b376de588a322719
Create a new network error.
class NetworkError(RuntimeError): def __init__(self, e): super(NetworkError, self).__init__(e)
1
900bd5ba178f82012fcffd7a5cd3daff
2dfd624ad1a05421299a41803d075f2b
checking for a match - use the match condition chosen via user input
function matchWords() { if(wordInput.value === currentWord.innerHTML) { message.innerHTML = "Correct!!!" return true; } else { message.innerHTML = ''; return false; } }
0
eebb9e2a087d8b4eaa798359e84ab528
18ec29bafa9ba45ccdac2f399be245a1
Нормализация хранения почтовых адерсов
function normalizeAddress(email: string) { if (email.split('@')[1] === 'gmail.com') { return `${email.split('@')[0].replace(/\./g, '')}@gmail.com`; } return email; }
1
4ab61ae31b90a085184c9173b75d4667
6b59bb7296f40233f099006806d54bfd
Получает варианты фонового изображения для опросов.
{ $dir = dirname(__DIR__, 3). $this->defaultBackgroundPath; $backgrounds = $this->getDefaultImage($dir, $backgrounds); $src = $this->getRandImage($backgrounds); return new BackgroundVo($src); }
1
1f8e1df2bcddc1b3c7f43d138aad2854
03dd59b9cbeb6429072d6abb3242ff8e
查询所有的行车日志文本
public List<BusLog> fetchAllBusLog();
1
797840242f48885d01e07aa5d31e84f6
57e1d0abd5dc9b0b08b2ee8becd99fa6
test if the method returns an array of Transaction objects
class TestWallet(unittest.TestCase): def test_transaction_list_works(self): expected_transaction_list = [100,-200] self.test_account.make_payment(100,200) self.assertEqual(expected_transaction_list,self.test_account.transactions)
0
10daf76970811ece08cecd15dcf16c03
94d1db7215d8bed838133f425664aa13
@brief Tests the default event predictor generation
data::make(ZIGZAG_FMU_NAMES), name) { Base::ApplicationContext appContext; addModelBaseProperties(&appContext, name); const char * argv[] = {"testOneStepEventPredictor", "app.startTime=0.0", "app.lookAheadTime=1.0", "out.0.0=x", "out.0.0.type=0"}; appContext.addCommandlineProperties(sizeof(argv)/sizeof(argv[0...
1
8eb47fc7934347bf4434d78f06ff48b2
e7db303d0ce063441aa2ddcb3fbe3cd5
删除符合条件的记录, 成功返回影响的行数, 否则返回FALSE
{ $del = FakeQueries::where($this->data, $where); if (empty($del)) { return 0; } foreach ($del as $k => $v) { unset($this->data[$k]); } $this->data = array_values($this->data); $ar = count($del); $this->log('DELETE '.$ar); ...
0
8ef786a636bebdd8f503154223a573dd
58e65cd9539bf0c9dd00cfb24d9b7d32
重载小于号使其可以按照边权值从小到大排列
class Edge bool operator<(const Edge& e2) const { bool ret; if ( this->w < e2.w ) { ret = true; } else { ret = false; } return ret; }
1
f4287a4bfaa86be8578e814056a68a33
d7f21d8d159f4a20b76c2729f31a5c35
Apagar as coordenadas dos pontos de uma linha no plano representada por dois pontos
{ Point[,] bufArr = new Point[linesArr.GetLength(0) + 1, linesArr.GetLength(1)]; for (int i = 0; i < linesArr.GetLength(0); i++) { for(int j = 0; j < linesArr.GetLength(1); j++) { bufArr[i, j] = linesArr[i, j]; ...
0
6b0f154a893dcd6eb2ae378ea9b32152
b8843dbe6f561344beab2c6d9532d545
フィールドを確認し,置ける位置を[x][r]の配列で返す
def check(y, x, flg, p, grid_p1, grid_p2): if p == "A": base = "X" else: base = "Y" if x != 0 and field[y][x - 1] == ".": field[y][x - 1] = base flg = True if p == player[0]: grid_p1.append([y, x - 1]) else: grid_p2.append([y, x - 1]) ...
0
6da7d0bf523b71c08a046dfb7c879a31
8d7ff413706179c6eb73980ffbfe9ab8
向数据表tb_Task_Keyword更新一条记录。
{ $values = $this->dataConvertFormToTable($fieldset); $keyword = $this->getKeyword($values); $values['keyword'] = $keyword; $where = array( $this->colKey => $oldRecruitmentId, ); return $this->executeUpdate($values, $where); }
1
746415c4b6defa1a295c6bd0e5aa1959
2644ff29aa32c2c2ec79e924f2c9756a
returns the config slot for a key name
if (_prev_positions.size() > key_index && _prev_positions[key_index] && name == _prev_positions[key_index]->get_first()) { return _prev_positions[key_index]->get_second(); } else { auto* it = _slot_desc_index.find(name); if (it) { if (key_index < _prev_positions.size(...
1
cec5dcf7a709d0d91d6d2243526b3547
4a7492b922f5b6dad0d923e1344139e7
Converts `value` to an object if it's not one.
function ToObject(v) { if (v === null || v === undefined) throw TypeError(); return Object(v); }
1
06c738790902dad27c911d083adcdde8
1dc9696676ef20749ebb38e4ceb981e5
Retorna o nome do destinatário
class mail_send protected function get_name_to() { return $this->name_to; }
1
b9f17dadcadded6fd84a5131966d5fd6
545481695797e53c4762d302fbff4d7c
Return the path of the wrapper's velocity template.
class TemplateWrapper public static function getTemplatePath() { return static::$content_template; }
1
6dae12f96050570be089469688bd737b
e37c303d50f1f624c02debb9caf3e6fd
POST /clothes Test creating new clothes with manager JWT.
{ $response = $this->json('POST', '/users', [ 'token' => 'TEST_STORE_TOKEN', ]); $response->assertStatus(201); $json = $response->json(); $this->assertArrayHasKey('id', $json); $this->assertSame('(noname)', $json['name']); $this->assertSame(10000, ...
0
b418b5095e05931ec4a6f1892674608c
0f673e87ec1a7c8fe9b917d7abebb310
check the database representation of a char field
def test_char_field(): ob = FieldTest() assert ob.CharField == u'A' assert ob.CharField == 'A' ob.CharField = 'B' assert ob.CharField == u'B' assert ob.CharField == 'B' ob.CharField = u'C' assert ob.CharField == u'C' assert ob.CharField == 'C'
0
9af1b54dd77f4dc394630925b502d72c
806a3d45d6923cb09094580d5418c526
NewFlightsList creates FlightsList by data from AirFareSearchResponse
class QueryResponse: def __init__(self, query_response): self.query_response = query_response self.trips = self._create_trips()
0
b6060858c23148124730c507d6af98a6
c4e63750f2b964a82e092483d91af24d
设置选中日期为一周
var currentWeek = date.getDay(); if(currentWeek == 0){ currentWeek = 7; } startDate = new Date(date.getTime()-(currentWeek-1)*24*60*60*1000); var weekEndDate = new Date(date.getTime()+(7-currentWeek)*24*60*60*1000); setstorage("startDate",formatDate(startDate)); setstorage("endDate",formatDate(weekEndDate...
1
cf3306d760e72f8ebdb0949f71d330d7
93c05c1c8eeee12884175289c3aed166
The function here is the scene runner. Our first scene is specified here, then below we have the scene looping.
void main(void) { scene_set(INTRODUCTION); while (1) { unsigned char t = 0; if (scene_get() == INTRODUCTION) { SMS_loadBGPalette(credit_palette__bin); SMS_loadPSGaidencompressedTiles(credit_psgcompr, 0); SMS_loadTileMap(0, 0, (unsigned int *)credit_bin, credit_bin_size); SMS_waitForVBlank(); SMS...
1
45ef55938c2cdeabee25dbe63952864c
4c3f299aca7d54ce899eb3de3b9a5495
截取字符前n位
if (n <= 0) return ""; else if (n > String(str).length) return str; else { var iLen = String(str).length; return String(str).substring(iLen, iLen - n); } }
0
a5fbe25969252e55454e0ed47c85fd93
fbd35cc909958fe10319ffd49366b0c2
Converts milliseconds to h:m:s:ms format
public class Main public static String convertMilliseconds(long milliseconds) { Duration d = Duration.ofMillis(milliseconds); int min = d.toMinutesPart(); int sec = d.toSecondsPart(); int ms = d.toMillisPart(); return min + " min. " + sec + " sec. " + ms + " ms."; }
0
30d97960dd79fc9cc3a3a282b2869596
367fd389b13ed678a6d6f6766afb90b2
Cada que presiono el Mouse se ejecuta esta función.
void mouse(int x, int y){ GLdouble ox=0.0,oy=0.0,oz=0.0; GLint viewport[4]; GLdouble modelview[16],projection[16]; GLfloat wx=x,wy,wz; glGetIntegerv(GL_VIEWPORT,viewport); y=viewport[3]-y; wy=y; glGetDoublev(GL_MODELVIEW_MATRIX,modelview); glGetDoublev(GL_PROJECTION_MATRIX,projectio...
1
2e18cdb5516dc677119880f037145b1f
d822918eb90dd8aef3458ac036746673
查询房产交易结果
public TradeResult findTradeResult(String orderID) throws Exception;
0
0eb633baf6b9a8fcd0b1e7efc4fbcc50
ba0326969f7a7dcd9fbc6ab5f2e74113
判断首页是否关联,如果首页关联了商品,就不能在这里删除,要先把首页的配置信息删除
{ $roles = [ 'id' => ['required'] ]; $this->my_validate($request, $roles); if ($this->my_error) return response()->json(['Code' => '20000', 'Result' => $this->my_error]); $id = $request->input('id', 0); $mres = $this->moduleRes->readCount([], ['res_id' => ...
1
33781e805b522e510aa91157e97cd120
913ad6688f27c4ffe8c7bc9d16b35e9b
攻击
function BOARD:onAttack() end
1
7bd43f3c7bc2ec3e58cc33ccd019dd98
3d044d197b423fdd042e49e549104019
Cuts out a smaller portion of a Wma file.
def cut_wav(audio_path, output_path, start_second, length=30): origAudio = wave.open(audio_path, 'r') frameRate = origAudio.getframerate() nChannels = origAudio.getnchannels() sampWidth = origAudio.getsampwidth() start = start_second * frameRate length = int(length * frameRate) origAudio.set...
0
d9e1d67ae48b1bd60fe3ea8527b2f8c2
77aa1ed58d6e16683a05a7ff25e6a852
Get the reference to the array of EE error labels
CONST SOC_ERROR_DESC_ELEMENT* arad_pp_lag_get_errs_ptr(void) { return Arad_pp_error_desc_element_lag; }
1
b8d2d996127da2babecaec0122ed55ec
6676112eb0237ca96d1e8c68cad4ee3e
Get the number of remaining slots
public class ZCharEncoder private static int getNumRemainingSlots(final EncodingState state) { final int currentWord = state.getTargetOffset() / 2; return ((2 - currentWord) * 3) + (3 - state.wordPosition); }
1
4611fb8ec6256daba323d70812aa9811
019072306e9cc56cd0553bc5da670c87
Returns a text container.
public function addTextContainer($name, $content, $language);
0
e78fa960db08e8167fd91050934b8a4a
70c0758ff500ce651d12f4a201ef80b6
Return a buffer into the pool.
allocate_pool_buffer(struct buffer_pool *bp, int pool) { struct pool_buffer *b = &bp->buffers[pool]; if ((b->p = malloc(buffer_size)) == NULL) { DPRINTF(4, "Unable to allocate %d bytes for buffer %ld", buffer_size, b - bp->buffers); bp->max_buffers_allocated = MAX(bp->buffers_allocated - bp->buffers_freed, bp->ma...
0
b2856829bcb336e98a18957e897f2eb8
3cdfd79203e562cebd9a2089ad9123dc
テキストの配置時の gravity を返す <p>この関数は、 現在のところ詳細な情報はありません。引数のリストのみが 記述されています。</p><p>テキストによる注記を行う際に使用するテキスト配置の gravity を返します。</p>
class Imagick implements \Iterator, \Traversable public function getImageGravity() { }
1
d87a21eae4855c0f73aaa2a0bc7d9140
906d1b18d839588c319e02e51e4a6b32
Ignored because the MCP does not filter outgoing environments yet.
class NotificationOptOut(Component): def upgrade_environment(self, db): pass
0
4c611d38848d74048fb7969466973d27
0633f7eb65b346e12abefe32c35e046b
Write a formula to a cell, defined by its name.
bool Worksheet::writeFormula(int row, int column, const CellFormula &formula_, const Format &format, double result) { Q_D(Worksheet); if (d->checkDimensions(row, column)) return false; Format fmt = format.isValid() ? format : d->cellFormat(row, column); d->workbook->styles()->addXfFormat(fmt); CellFormula formul...
0
1b3e9a58712ee5dcdcb5b4638634a2f1
560d3e18aec73fe5055fcba8b892d1da
returns the number of job postings
namespace dc_p6_p2p_wpf static class JobDB public static int GetNumJobs() { return jobs.Count(); }
1
c65b611ec72d665c39e465eda76c6f0a
5af343b24eba9fc8a68296b01fd5811a
match ips to locations and count hits
def createClientHitDict(file_list): client_hits_dict = {} for log_file in file_list: fileDir = os.path.dirname(os.path.realpath('__file__')) file = os.path.join(fileDir, log_file) try: f = open(file) except IOError: print("%s not a valid file\n" % file) for line in f: ...
1
e18f91014a0eeae9d9bf3aa506d92625
9544e66ce6cda0868e819aa1dea86bee
数値が完全数かどうかを調べ、結果をbool値で返す
class PrimNumber: def primarity_check(self): add_number = 2 flg = True while add_number < self.int_count: if self.int_count % add_number == 0: flg = False break add_number += 1 return flg
0
84308645a7c2adc9294b47a4ffd9d9a6
110f67631120789e72d1e48b7ec57962
UpdateItemModifierLists Updates the [CatalogModifierList](#type-catalogmodifierlist) objects that apply to the targeted [CatalogItem](#type-catalogitem) without having to perform an upsert on the entire item.
class CatalogInfoResponseLimits(object): def update_item_modifier_lists_max_modifier_lists_to_enable(self): return self._update_item_modifier_lists_max_modifier_lists_to_enable
0
2826c9577f8a20789f96bc33dc34a35d
78e3aab87e4e0dd922535006beb64c5a
点击右侧的创建作业按钮,将界面变为创建作业时的界面:也就是将一些数据清空
class THomework(TeacherHome): # location # 题库选择题目按钮 - 输入作业名称按钮 def goto_tab_page(self): self.find_element(*self.work_button).click() self.find_element(*self.create_button).click()
1
f746d1ad97a6100e6d62d55018409beb
ad78747891466dfcf32945709391740d
Get a life matrix based on the named pattern.
class Grid: def addPattern(self,pattern,x=0,y=0,rule=None,eol='\n',resize=False): try: pattern_path = Patterns_dict[pattern] except KeyError as e: print("No keys found in Pattern") return pattern = None with open(pattern_path) as f: pattern...
1
6a5e04980d6b7f2a527fa3d4fa6c5e2b
51c26732dde719a9e21884c1daa8dcf4
根据文章名称查询文章ID
Integer queryIdByText(String text);
1
767ad68905e5f38756e666c35f58d2ae
822c6e8979026b8512f554f8ec8150af
# do a lattice plot to test many dims
latticeScree <- function(data, ...){ values <- psych::fa(data, fm = "ml")$values factors = seq_along(values) eigen.data <- data.frame(values, factors) xyplot(values ~ factors, panel = function(x, y, ...){ panel.xyplot(x,y, type = c("p", "l")) panel.abline(h = 0, lty = 2) ...
1
687f1e3482c6f610de0ff45f1a0e3488
ac334d606cfd17136f33d3f2fc03d70d
Returns whether or not the calendar event repeats itself indefinately
abstract class Application_Model_CalendarGroupAbstract implements Application_Model_CalendarGroupInterface protected function _setReoccurent($reoccurent = true) { $this->_reoccurent = $reoccurent; return $this; }
0
b25fc64ac6bd051c34a2a5b10a3dea4e
fd96e228ee72c795729a1f161b8d96cf
编辑midi
for k,note in pairs(notes) do reaper.MIDI_InsertNote(take, note.selected, note.muted, note.startPos, note.endPos,note.channel,note.pitch, note.vel, false) end end
1
246b55551da79e6f85e11382f81a6fe2
400dd683d6cb6b77030337310959792b
Returns the launch status of the bot
class roverLaunch(): def checkLaunch(self): pass
0
2289546fed3b097522254d2bc386dbfc
f9fadea8ef9906c3b0ca5ed4a74379b9
Returns a list of Calendar_SelectDateModel's if any are found
class CalendarSearchResults: def get_calendars(self): return
0
c97478ce9311a18457ffaa077128a1af
5c6172330d8d45a255f4191d79ac3512
Spinning the object randomly
public class Spin : MonoBehaviour void Update () { transform.Rotate (0,200*Time.deltaTime,0); }
0
61429f3f522d81cceb027a54dbd6b9ce
14038c8e0afaca48e5a3585c18ef6735
Returns a 2D ndarray where each row is newly selected model. Selects new models using the Gibbs Sampler method from the Voronoi cells of the best models found so far.
samples = np.empty(num_samples) mean = posterior_model['mean'] cov_evecs = posterior_model['cov_evecs'] cov_evals = posterior_model['cov_evals'] num_features = len(mean) R_models = [] for i in range(num_samples): X = np.random.normal(size = num_features) R = mean +...
0
96384745d32753a3d2f1623d98cb1b41
a334c59b15e26ee4f93874ed2bfadd1c
Renvoie le choix de B.
public double getB() { return b; }
1
6a841052cf5308eaddd0049062280454
9b34367080303848cde3864be7468c8c
Calculate the distance between two N-dimensional points
class LambdaMeans(Model): def calculate_distance(self, x1, x2): return np.linalg.norm(x1 - x2, axis=1)
1
aeaf458730b412fcd018b15e2252bbc8
656bd5512bba595b87865dd61ad58b52
Takes the request and renders Resume page
namespace WebUI.Controllers [Authorize] public class ResumeController : Controller public ActionResult Index() { return RedirectToAction("PersonalData"); }
0
c356b9ca352b696bd194da98b31b68cd
c720aba8bd4c2c91f26140844aa20c89
This command is used to set the resolution of the display. The screen is cleared and the cursor is positioned at the upper left position.
{ cursor_pos_x = 0; cursor_pos_y = 0; uint32_t var; uint32_t count; if(set_fb_x < 640) set_fb_x = 640; if(set_fb_y < 480) set_fb_y = 480; if(set_color_depth < 2 || set_color_depth > 4) color_mode = COLORMODE_16BIT; else color_mode = set_color_depth; volatile uint32_t mailbuffer[256] __...
1
da253e5e73678f8d70ffdb911a8467fc
26c042c96f5b3203f1b4d8caaf3b0522
concatenate one string to another (ANSI)
cat_str(char *s1, char *s2) { char *s, *s_save; s = malloc(len_str(s1) + len_str(s2) + 1); s_save = s; while ((*s++ = *s1++) != '\0'); s--; while ((*s++ = *s2++) != '\0'); return s_save; }
1
9e9b0445091d6130050a3b4c7b2e423d
dc8c81febfd14cf765a04307581a9b2d
Sorteia a carta para o jogador sem repeti-las.
def sort_card(jogador_id): card_id = [] while len(card_id) != 3: cartinha = random.randint(0, 11) if cartinha not in card_id: card_id.append(cartinha) jogadores[jogador_id]['cartas'] = card_id
1
690c776cf281f52c59a0ab2666d43735
40c31af4542c9d450420c834a851dff5
Set Brain Mask for datasourceAnat
grayscaleImage = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) medianFiltered = cv2.medianBlur(grayscaleImage, 3) image = cv2.cvtColor(medianFiltered, cv2.COLOR_GRAY2BGR) hsv = cv2.cvtColor(image, cv2.COLOR_BGR2HSV) hsv[:, :, 2] = hsv[:, :, 2] * 1.05 image = cv2.cvtColor(hsv, cv2.COLOR_HSV2BGR) ...
1
2ee4479b8c236ff346c402eb84d28fdf
742a60260a9daccaeea6f7379ce8b222
是否是台湾版本
public class DevUtils public static boolean isZTE() { return Build.MODEL.toLowerCase().contains("zte"); }
0
36983a3f185d0136e0d7d09dc36a06c7
82d11d3ca0e4b946f1ddbd5837b4c4d5
Get the value of this aggregator (do nothing).
public class SortedSetDocValuesAccumulator extends FacetsAccumulator @Override public FacetsAggregator getAggregator() @Override public void rollupValues(FacetRequest fr, int ordinal, int[] children, int[] siblings, FacetArrays facetArrays) { }
0
bf2b8a64c315ca0b38f26704ea7e8145
dff46e3c2328bd89977852399fb6a213
Returns an ordered range of all the creators where fullName = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. ...
public Creator[] findByFirstName_PrevAndNext( long creatorId, String firstName, com.liferay.portal.kernel.util.OrderByComparator<Creator> orderByComparator) throws NoSuchCreatorException;
0
fa2053985e1ee6c55aeef73e82151dba
59d97c834fc7069c8d647421515d2004
Test case where there are no suspects.
base_word = 'lead' word_list = ['home', 'loan', 'blue'] seen = {base_word: set()} end_word = 'gold' pathway = [base_word] exclusion1 = '' self.assertEqual(test_functions.find(base_word, word_list, seen, end_word, pathway, exclusion1), [])
1
0d3633588b56491442ec8cb7f8313e35
6ed8dd44530ebdf40c63ccdda43d7c8e
Displays to the user that a player has died
{ Text titleDead("YOU DIED HAHA", font, 75); titleDead.setPosition(138, 100); win.draw(titleDead); }
1
cd5ce12946cb50ae89ab224d660aaf5e
d7e894ec8a3b9e2dd6c1e45c26866162
May be called to ensure that _updateFromSet() is called immediately if a lazy update has been scheduled but not yet performed.
export class SohoDropDownComponent implements AfterViewInit, AfterViewChecked, OnDestroy markForRefresh() { this.runUpdatedOnCheck = true; this.ref.markForCheck(); }
1
860a12b2ad0305f127b5f59c22cd8e9f
95a557d70f4e366f932c8f7c14ce2f1b
Function: test_no_mongo_cfg Description: Test with no config for mongo passed.
fileupload = views.FileUploadView() fileupload.mongo_db = mongo_db data = {} project_id = 0 result = fileupload.save_on_mongo(data, project_id) assert result is False
1
85ecedc54439b059d7228726f9d2be05
bfdb2a8533915915cf34c8d9c7c88383
根据不同的状态去调用不同的行为函数和动机函数
if self.com == "侦察机": aa = 3 amax = self.va1[1] vmax = self.va1[0] VZmax = self.va1[2] for i in range(len(self.action)): if self.action[i] == "直线": t = random.random()*10+5 F = random.randint(-...
1
8c76d7ad58224e5e7d4121797346e81e
a828f1f2e73820dd1862369e55d6215f
Lists Clusters in the GKE On-Prem VMware API.
namespace Google.Cloud.Dataproc.V1 public abstract partial class ClusterControllerClient public virtual gax::PagedEnumerable<ListClustersResponse, Cluster> ListClusters(ListClustersRequest request, gaxgrpc::CallSettings callSettings = null) => throw new sys::NotImplementedException();
0
95ee0ebb6b8b1593bc9a7a0feba27265
e98b5c19207b5c5712d4e659a3d8d104
Returns the sign of x (-1 or 1), and 0 if x == 0.
def sign(x) -> int: return (x > 0) - (x < 0)
0
a51a1b90404e7f2b6495a82f4884407c
33aef2cceb778d49e179d7cf221b7876
给定已验证的数据,更新并返回现有的“User”实例。
class ViewerSerializer(serializers.ModelSerializer): def update(self, instance, validated_data): user = super().update(instance, validated_data) return user
1
2a4e05948e8d2c9dc4318cf0a7237ca9
12b400820496bf9d32c31cd6cb6ccba0
Set VA select code display.
static void setUserAmCodes( char *title ) { int key; UINT32 reg; VME_USER_AM amdata; int result; clearAllScreen( title ); if (devHandle == -1 ) { mvprintw(STATUS_LINE, 10, "%s", devNotOpen); clrtoeol(); getReturn( 10 ); } else { key = selectItem( &userAmData[0], 2, 2 ); if ( key != 'q' ) { amd...
0
c88cc146a93b21373caf078cf435e587
dd14f36c9d5eed687f8d9b5898baa719
吸血
if FightUtils.Random( 1, 100 ) <= effect.data.value[2] then target:BuffAdd( effect.data.value[1], effect.ai.unit ); end end
0
14b77ed34553ded413495ae0a0383dfa
b3a568e916f56e2bcde22a111c089a3f
add attributes per building
global buildingInfo buildingInfo[2*EncodeUnit('Terran Command Center') + 0] = 4 buildingInfo[2*EncodeUnit('Terran Command Center') + 1] = 3 buildingInfo[2*EncodeUnit('Terran Barracks') + 0] = 4 buildingInfo[2*EncodeUnit('Terran Barracks') + 1] = 3 buildingInfo[2*EncodeUnit('Terran Factory') + 0]...
1
3e9373b173f3b3b256d2ae5383963d43
4038f501e7b936a9ae6376eff739ff74
Set scope level delimiter.
class Version92 extends AbstractProvider protected function getScopeSeparator() { return ' '; }
1
e2fced47f4e78cc1324ac6b0722d4c50
981bcba0cf993e4494c546c16cbff8a4
显示商品列表数据
$('#banner').css('display','none'); $('#shopCar').css('display','block'); $.ajax({ url:'../lib/showlist.php', dataType:'json', success:function(res){ if(res.code==1){ $('.list-item').remove(); $.each(res....
1
175c89eccbd0c525e93d253bef3fc62d
dbcb93c064c64b7699a71b2021ead0b4
设置是否显示地图导航窗体
var tmplayer = map.getLayer(LayerID); var _isShow = isShow || ""; if (tmplayer) { var _flag = (isShow != "") ? ((isShow == 1) ? true : false) : (!tmplayer.visible); tmplayer.setVisibility(_flag); } map.infoWindow.hide(); }
0