query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
4ed71b17eb0268d422f2bbdd20edf53b | 70173ba5c83c2927c1a27eb8c67aa5d5 | Method called to request an input action; returns whether or not the player input action is in sync with a beat as well as the beat synchronization type. | public class MovementControllerIsometricNew : MonoBehaviour
public bool getMovement() {
if (InBounceInputStun ()) {
return false;
}
return horizontalMoveInput != 0 || verticalMoveInput != 0 || dashInput;
} | 0 |
0e1854062d1dca4bcf8993f76de55e25 | 00973ccfb5a759873fac3c9639c329d2 | Set the MPL3115A2 sensor to Barometer mode | {
altitude_writeData( _ALTITUDE_CTRL_REG1, _ALTITUDE_CTRL_REG1_BAR | _ALTITUDE_CTRL_REG1_OS128 | _ALTITUDE_CTRL_REG1_CLR );
altitude_writeData( _ALTITUDE_CTRL_REG1, _ALTITUDE_CTRL_REG1_BAR | _ALTITUDE_CTRL_REG1_OS128 | _ALTITUDE_CTRL_REG1_SBYB );
} | 1 |
040bcdc2cc0d4424d7a74f13a7337df4 | 78bd9c157ac55d1b4be415b8f42086a7 | 对扫描对象设置列簇 | public class hbase_oprator
public ResultScanner setfilter(Filter filter) throws IOException {
Scan scan = hbase_oprator.scan.setFilter(filter);
return table.getScanner(scan);
} | 0 |
b129f92f2f2d87e0f264efd7ae989a3b | 8ef1edfe48078e727ff6e03f1358f331 | ゴールしている数を調べる | global board, direction_xy, can_put, put_line
flag = 0
isloop = True
if you == 1:
enemy = 2
else:
enemy = 1
can_put = []
put_line = []
for i in range(1,7):
for j in range(1,7):
if board[i][j] != 0:
continue
for ... | 0 |
0596b9ff0d47cbc5860e6eb8630f0548 | e69e893ba8345487b748735e0f71d691 | Returns the last ID of a player connected to the board. | {
string file;
int code;
file = "/players/" + lower_case(({string})who->query_name()) + "/.edrc";
if (file_size(file) <= 0)
return 0;
sscanf(read_file(file), "%d", code);
return code;
} | 0 |
8154d9d93e5e6f0bd69e0e8117c265ff | 7f2e4ea5b35951aac8b4c1637120d9e1 | 联系人性别编码组ID的取得 | public class BCfgdefChnltrd extends Entity{
public String getChnlcod() {
return this.chnlcod;
} | 0 |
d05cf78f7641b41220dde63171b7482f | e309ce043332963fe8a8854d148909ea | 顶级角色不能分配权限 | class PrivilegeController extends Controller
public function index(Request $request)
{
if(\App\Permission::SubMenu('271',Auth::user()->role_id) == 0){
return redirect()->back();
}
Role::bootIndexPage($request->get('keyword'), ['title'],['title'=>'asc']);
return view('dashb... | 0 |
16c7773fd80572c4b521391c81ea813a | a652561dfbf6acc0740f3fa698480cc7 | 定时触发 | {
long currentTick = DateTime.UtcNow.AddMinutes(1).Ticks;
try
{
string connStr = AppConfigHelper.GetQuartzConnString();
using (SqlConnection con = new SqlConnection(connStr))
{
string sql = "select SCHED_NAME... | 1 |
312b0d372667b479933196a947516881 | 21ee1b2783c8dcd785a254fb48af51de | 设置玩家投票状态UI | public class SetCharacerUI : MonoBehaviour
public void PlayerStatusUISet()
{
TurnTextBackUI.enabled = true;
TurnCountText.enabled = true;
for (int i = 0; i < PlayerStatusUI.Length; i++)
{
PlayerStatusUI[i].enabled = true;
PlayerNametxt[i].text = "プレイヤー" + (i +... | 0 |
565b6445ea409e0e4204c7f2e471e956 | d229f072797845ce9471712b91f22a3c | Vapor pressure over water. Heymsfield formula | double t,b0,b1,c0,c1,e;
t = T-273.15;
p *= 100.0;
b0=5.707e-6; b1=-2.051e-8;
c0=1.9898e-4; c1=-2.376e-6;
e=-0.765e-8;
return (p*pow(0.27315e3+t,-2.0) * (2*e*p*x - (0.27315e3+t)*(b0+b1*t + 2.0*(c0 + c1*t)*x)));
} | 1 |
9321b3d96d90b99a8dc3efd35a9eab57 | 31674952d915608e2c0aec95cfca5b70 | get a parabola that goes from source to destination in specified time | t = 0;
start = transform.position;
timeToReachTarget = time;
this.destination = destination;
} | 0 |
5d6442cd3aca6e16c499f51fde670f8a | 89bd2b901808c03a692ea0152e9619de | Set the Cart Web URL | class PaypalWPS extends PaymentProcessorModule
function setCartURL( $cartURL ) { $this->cartURL = $cartURL; } | 1 |
78273a59b86324e5a73760d1a78ef830 | b6f8c40b5f86aafb7d4631733e92b460 | Deserialize an envelope from a string. | func NewEnvelopeFromJSON(s string) (*Envelope, error) {
var e Envelope
if err := json.Unmarshal([]byte(s), &e); err != nil {
log.Errorf("[%s][%s][%s][NewEnvelopeFromJSON]",uuidgen(), CHANNEL_ENV, EDSA)
return nil, err
}
return &e, nil
} | 1 |
17b79aa9a8023fc549f9f24cec549bf3 | 75af54a98c3d40249726e84cd0412bac | Dado un árbol binario, imprime sus nodos en En Orden | public class Arbol_RN extends Arbol_binario implements Constantes{
private void printIOD(NodoLUrl tmp){
if(tmp==null)
return;
printIOD(tmp.getHizq());
System.out.println(tmp.getDato());
printIOD(tmp.getHder());
} | 1 |
cdaa669f47bbf91dba620a1a4366e5d4 | 4d655d196637fdcdf88d055b6f041736 | Скомпилировать бинарную логическую операция (&& и ||) | {
parseLogicalTerm(comp, type, constant);
while (comp->lex.tok.kind == TOK_OROR)
{
TokenKind op = comp->lex.tok.kind;
lexNext(&comp->lex);
if (constant)
{
if (!constant->intVal)
{
Const rightConstantBuf, *rightConstant = &rightConstantB... | 1 |
378a21a8ef132b6352b79785123e9fb0 | 50c9a69401408156c8b59a291b801b4c | 获得最近十个登陆的用户 | class user
async userLoginCount(ctx){
let res;
const now=new Date().getTime();
const fifteenDayAgo=now-(15*24*60*60*1000);
const userData=await mysqlJs.queryFromMysql(`SELECT register_time FROM users WHERE register_time > ${fifteenDayAgo} AND register_time < ${now} ORDER BY register_time... | 0 |
ba7be1b30526285bf42519b2da6a1fde | b5538130d1eacb69f0729523437e8bde | Get audio
Downloads and gets audio for all videos in a playlist and stores
the files in the specified folder.
For more information about the format and quality, check out:
https://github.com/rg3/youtube-dl#post-processing-options. | class VideoCommandLineRouteHandler(CommandLineRouteHandler):
def youtube_download(self, context, itag, output_path, filename):
path = context.streams.get_by_itag(itag) \
.download(output_path=output_path, filename=filename)
return path | 0 |
f928422866dc028956311f1c0bbeab39 | ba1dcb2b7720cc185340b5150f7198c3 | Returns the meta object for the containment reference '{@link PaymentsApp.Formula#getFormulaReturn <em>Formula Return</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getConstraint_Formula(); | 0 |
b55868c3da618d6c9ae141396325d99c | a5ba037196c75f71415acf3b5ca4eaae | Initiate the parameters either from existing checkpoint or from
scratch. | self.hyper_params = self.readConfigFile(config_file)
print("Using checkpoint {0}".format(self.hyper_params["checkpoint_dir"]))
print("Using hyper params: {0}".format(self.hyper_params))
if not os.path.exists(self.hyper_params["checkpoint_dir"]):
os.makedirs(self.hyper_params[... | 1 |
01573fd3093b20fb41963274d5e8dda7 | f718aed6f2eae51620535c98554dea79 | This closes the document window without saving it whether it has been modified or not. | public class ExcelClass : IDisposable
public void CloseDocumentSave()
{
CloseDocument(true);
} | 0 |
c9d42c77de5e9987092ccb3fb6d6c25e | 743f21df12d3289cf840aa3f2a3478dc | Returns the state of lax parsing. | public abstract class SAXParserFactory
public boolean isValidating()
{
return validating;
} | 0 |
35c3829345a9359177fd80318e0d6140 | 3f3b67311f4cd0b010f073684945971a | Vracia nazov ikony, pre dany modul | class WebModule extends CModule
public static function getIcon()
{
return 'cog';
} | 1 |
c704a26418c3f863f7256b0b514c4587 | b34496d77315cf488d292af8f12a5043 | Normalizes to 2 digits after the point. | class CheckoutState
def priceify_number(number)
format('%.2f', number)
end | 1 |
c0643b7edaa0d8190c25b98f0054aef3 | 6966f789de6cd096164b5ef4f9fcdfd6 | Gets the workflow record object by a given workflow track ID
The workflow track ID
<pre>
ApplicationException with the following message codes will be thrown
ErrorConstant.DB_RECORD_NOT_FOUND_ERROR - No matching record found
ErrorConstant.ErrorConstant.DB_GENERAL_ERROR - General caught SQLException
ErrorConstant.DB_SEL... | public WorkflowStatus getWorkflowStatusForTrackingRecord(
TrackingRecord trackingRecord) throws Exception; | 0 |
4967e44deaf87263bd37d97946a7d7de | 7cb43f653efa7f1a67323c6bf77fa9ae | Find all leaderless transcripts after reads were mapped to a gene identifier.
Only choose gene identifiers where the number of mapped reads is below threshold. | public class CountReadsFromPairToBed
public void count() throws IOException{
TextFile tf = new TextFile("/Users/dashazhernakova/Documents/UMCG/hapmapData/tophat/1382_1_1/6.pairToBed_out.bed", false);
tf.open();
String[] fields;
Map<String,ArrayList<String>> read_map = new HashMap<String,... | 0 |
9e3f0251c2f5f3c67c430b28402a0cbc | 869095757f226d5521795be05d47b1ee | Sets the postcode of this CommonSimpleAddress.
Mandatory for Australian addresses # noqa: E501 | public void setPostcode( String value ); | 1 |
ffad555d54dca194053901e7abee0b7d | 72d6c0ee5432e8cdde0422aff30f824c | Find nearest pickup places by zipcode. | $this->log(__CLASS__ . '\\' . __FUNCTION__);
$ret = false;
if ($city_id > 0){
$select = $this->select()
->from(self::TABLE_LOCATION_ZIP)
->where(array('city_id' => $city_id))
->order('name ASC')
->group('name');
... | 0 |
04bc8a714695d7c447f10e3184f72d19 | 5fcdc8135fdbbbcb98365a66d7133798 | Number of LSN TCP Received packets. | class lsngroup_stats(base_resource) :
def lsngrptottcpdrppkts(self) :
try :
return self._lsngrptottcpdrppkts
except Exception as e:
raise e | 0 |
e187536666914614199095902b543b95 | 0d307cddb3f6c343ccaaa0294b27c6d8 | 使用文件名筛选出来的错误街景点 | def filter(text):
word_list=["天空","阳光","云","海","草","花","山","楼","车","路"]
result=[1 if i in text else 0 for i in word_list]
keyWords = result
book = xlrd.open_workbook("./static/image/test.xlsx")
sheet1 = book.sheet_by_index(0)
scores = {}
lists = []
for i in range(sheet1.nrows):
... | 0 |
6a27454d63ff58552f4d4137dafea2f4 | c34893151c249b2bb0bfc22a903dc147 | [getContinueSignDay 获取连续签到天数] | {
$day = strtotime(date('Y/m/d'));
$appId = null === $app ? 0 : my::dataCache('system')->get('apps.'. $app, 0);
$times = intval($times);
$conditions[] = 'lastSignDate = '. $day;
$appId > 0 ? $conditions[] = 'appId = '. $appId : '';
$conditions[] = 'continuousTimes >= '. $times;
return my::model('common_s... | 0 |
9ee5cb9c818c72e3af11b55713052a4b | 39858b8db735cb7201d3f95d342a6bd4 | change parallax images on scroll | var s1 = document.getElementsByClassName("project__image-inner")[0];
var yPos1 = 0 - window.pageYOffset/100;
var s2 = document.getElementsByClassName("bg-container")[0];
var yPos2 = 0 - window.pageYOffset/200;
if(s1 && s2) {
s1.style.transform = "translateY(" + yPos1 + "%)";
s2.style.transform = "translateX(-50%) tra... | 1 |
67135dceb3618b6486708cc50418ade2 | ea9439d91b586f2f408df13f6027848a | Builds the five hours led row. | {
InsightText billableLabel = new InsightText(TimeSummaryBillableNonBillableInsightResource.BillableText);
billableLabel.Tooltip = model.HasTaskfireTime ?
TooltipBuilder.NewTooltip(model.BillableWorkedTime.TotalHours, TimeSummaryBillableNonBillableInsightResource.BillableServiceProviderHoursToolTipFormat) :... | 0 |
c0a6c17ec9023bfa7f1203b53fec0472 | a74f288797548979c72ee861d9f6f94c | Create a list of chunks.
Each chunk is a list itself, with size `chunksize`. | aChunks = []
iBeginChunk = 0
iLenList = len(aList)
while iBeginChunk < iLenList:
iEndChunk = iBeginChunk + min(iChunkSize, iLenList)
aChunks.append(aList[iBeginChunk:iEndChunk])
iBeginChunk = iEndChunk
return aChunks | 1 |
7b608ce365705944e1d17d56900bfedd | ad5869e8154f338f09ea69e03c57be25 | Configure the toolbar.
each window, sort of like you need to do after a resize. This is because
the height of the toolbar may change, so the positions of the other widgets
may change.
Returns ElvTrue if the screens all need to be reconfigured, ElvFalse otherwise. | void wgui_toolbar_resize(S32 max_width, S32 max_height)
{
gui_toolbar_resize(&g_wgui_toolbar, max_width, max_height);
} | 0 |
c344f1eafdd90f25642b8c285e060c8c | 4b67598801af9ef46d450b2fd2fd395d | Этот метод отрабатывает при нажатии кнопки "поиск" на софт клавиатуре | public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
if (actionId == EditorInfo.IME_ACTION_SEARCH) {
runOnThread();
return true;
}
return false;
} | 1 |
c922590a3aac01ac692766522826b91c | 4e1ba72dec918e9d76c9cef8f6f06d0b | Translate RNA into protein using six possible reading frames.
The six possible reading frames are:
* 1 (forward)
* 2 (forward)
* 3 (forward)
* -1 (reverse)
* -2 (reverse)
* -3 (reverse)
Translated sequences are yielded in this order. | class Translator(MultiprocessingBase):
def translate_six_frames_single(self, rec, table='Standard'):
recs = self._get_six_frames(rec)
return [self._translate_sixframe_seq(i, recs, table) for i in self._frames] | 1 |
31d32a4445f5b16c1e62fbb072c24fd8 | 84a60042c6c6cd2fcd66d5fe457cae4c | Configuration block for encrypt at rest options. Only available for [certain instance types](http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/aes-supported-instance-types.html). Detailed below. | class Instance(pulumi.CustomResource):
def encryption_type(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "encryption_type") | 0 |
0b5bd687c4880d99f44435c0d690abd3 | f8fed13e33d6a64246c7690087018984 | 通过打印ID获取套打模板 | namespace SUP.Common.Rule
public class PrintRule
public DataTable GetModuleByID(string PubConnectString, string printId, string tmpDir)
{
DataTable dTb = new PrintDac(PubConnectString).GetTemplateById(printId);
if (dTb.Rows.Count > 0)
{
byte[] bTemp = (byt... | 1 |
976a9b1a98ea9aac94e2473aabc2dc0b | 0aad6a2bb2f4e4ae0b81b797a34ff677 | Создает голову нового потока в стриме с указанным смещением. Задаются также длина begin-блока и координата первого блока. | SequenceBlock block = new SequenceBlock(last + 1, last + blockSize);
last += blockSize;
return block;
} | 0 |
21f094f6162d975e40b3fa4755547c0a | de124bdeba1497f81ef8f766bac491b5 | Create an empty `name' xml element within the specific namespace | TransformXMLStreamWriter writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException; | 1 |
40b14fbe3d4662bd4d55e21af4f35642 | 374d6d2da6f46bcce60b1bf7ddf6412a | Fill the screen with dots as a way of making PR_* displays show up
without forcing them to draw anything themselves by some more complex
mechanism. | {
uint16_t r;
uint8_t row, col;
static uint8_t resetcount = 0;
uint16_t seed = PEEK(RSEED1) + PEEK(RSEED2) * 256;
++resetcount;
srand(resetcount + seed);
lo_clear(gr_page[0], COLOR_BLACK);
while (count--) {
r = rand();
row = r & ROWRANDMASK;
col = (r & COLRANDMAS... | 1 |
73df40994d840fd6fc78f7bf2d132227 | 8e5c4439759a5aa6d4c1397a4b5c8678 | 按首页推荐标志查询新楼盘(用在主页显示) | public Map<String, Object> indexNew(String area_code, Integer pageIndex) {
area_code = area_code!=null?area_code:"010";
Map<String, Object> map =null;
pageIndex = pageIndex<1?1:pageIndex;
if (pageIndex>3){
return null;
}
String index = RedisCache.get(HwPrefix.APPIndexPrefix+area_code+"_"+pageIndex,2);
... | 1 |
4f7e52dd0737c10a7e71003760907427 | 1156a7d8e7e6a31fc0082edebc44dcfb | Extract data from storage indexed by Item id | function getItem( context : WeakStorage, key : string ) : mixed {
let storageDataMap : StorageDataMapType = getStore( context );
if ( storageDataMap.hasOwnProperty( key ) === true ) {
return storageDataMap[ key ];
}
return null;
} | 1 |
42da801e3d7f6cd230f9833e451c38b6 | 6795ecc270966a4d83f6bd373201cbe1 | Method for validation request type value | class Service
protected function validate_request()
{
$request_type = isset($_REQUEST["request_type"]) ? $_REQUEST["request_type"] : null;
if (!is_null($request_type))
{
$func = strtolower(trim(str_replace("/","",$request_type)));
if ((int)method_exists($this,$func) ... | 1 |
27158c53c4574ee934032166f5ad21b5 | bc432ebc6a73e3219bc94dcfff8e3b0f | 读取合约佣金列表以JSON方式 | @RestController
@RequestMapping(value = "/finance")
public class FinanceController
@RequestMapping(value = "CommissionList.do", produces = "application/json;charset=UTF-8")
public
String CommissionDetails(@RequestBody String param) throws IOException {
return AdvCommission.advCommissionList(param);
... | 1 |
85933159279e0e855f03754c69d12705 | 10d395db3f8e461c1c4f78af87e309ff | Sets the operational mode to decimal instead of binary | void SED(byte opcode, byte args[2]) {
if(opcode != 0xf8) {
displ_print_opcode("Unrecognized opcode for SED %02x\n", opcode);
return;
}
set_status_flag(DECIMAL_MODE, 1);
} | 1 |
59e868797a127e738ef586f0780a6859 | b83c051ec0b0c258bb2b44abbc5afb25 | 移動ルート上の障害物(Obstacle)の有無を確認 | for x, y in zip(path.x_, path.y_):
for obstacle in obstacles:
distance = np.sqrt((x - obstacle[0]) ** 2 + (y - obstacle[1]) ** 2)
if distance <= ROBOT_SIZE:
return True
return False | 1 |
1590496bece5db0dfc9fa8487b58e0fc | e7aeacdbe20e87bd52a5f63a40b7b4de | Swap two of the children, if possible. | const index1 = this.getChildIndex(child1);
const index2 = this.getChildIndex(child2);
this.swapChildrenAt(index1, index2);
this._onChildrenChanged_();
this.postChange('swapChildren');
return this;
} | 1 |
c1c1f2cf3141aa78547d99d2e7feaa9f | 4d64dfde6835544cfe21a9286072f88c | Call all tasks that registered on the initialize request | {
if (_initializeTask.Status == TaskStatus.Created)
{
lock (_syncObject)
{
if (_initializeTask.Status == TaskStatus.Created)
{
_initializeTask.Start();
}
}
... | 0 |
f338867f6c595888cf5ba89f3c77cf41 | bfd1b57989e5c6b85f9a4c78c3bbebe9 | 获得当前光标所在的region的名称 | class UserInfoWindow(base_frame_view.BaseFrameView):
def region_text(self):
name_ = 'UIAStaticText'
return static_text.UIAStaticTextList(self.region_bar, name=name_).text_view_list[1].text | 0 |
84feaab6222ae640bb7953255cf39812 | 807d4bc89e9115b7c06c8e42f37f3e8f | Form page with subdivisions according to the number of items per page and page number | if(isset($_GET["it_per_pg"])) $this->session->set("it_per_pg", $_GET["it_per_pg"]);
$ormcopy=clone $this->orm;
if($this->tree_mode){$this->count_records=$ormcopy->where("parent_id","=",0)->count_all("DISTINCT ".$ormcopy->table_name().".id");}else{$this->count_records=$ormcopy->count_all("DISTINC... | 1 |
0f81fa699d20fa3f7e97d36d5acc0b53 | 40c3549234ac1b059683ba5a0d2d0720 | @brief Pull out a row of a matrix. | int offset_column, int offset_row, int num_rows) {
int32* ptr_a = _arow;
int32* ptr_matrix = matrix + offset_row * matrix_width + offset_column;
int half_num_rows = num_rows / 2;
int two_line_width = matrix_width * 2;
int32* a_tmp = ptr_a;
int32* matrix_tmp = ptr_matrix;
for (int j = 0; j < half_num_r... | 0 |
82e8eb93f7576ab8d5db5660dfd4a7d1 | 1bb3e47f7f1ca0944aaebc8578f871b5 | 判断是否是客户端发送来的心跳包,此判断影响 KeepAliveRequestTimeoutHandler实现类 | if(Arrays.equals(message, (RechargeCons.prefix + RechargeCons.HEARTBEAT_REQ + RechargeCons.Suffix).getBytes())){
return true;
}
else{
return false;
}
} | 1 |
c659db28d27afcca10f914a9d41a0645 | 6482e3d7aefea10c4f1d852c7c9dc8bd | Initialize OpenTelemetry Tracing | ctx := context.Background()
driver := otlpgrpc.NewDriver(
otlpgrpc.WithInsecure(),
otlpgrpc.WithEndpoint("tempo:55680"),
otlpgrpc.WithDialOption(grpc.WithBlock()),
)
exp, err := otlp.NewExporter(ctx, driver)
handleErr(err, "failed to create exporter")
res, err := resource.New(ctx,
resource.WithAttributes... | 1 |
9a853434a6d126276f4c2bcfa1168300 | 4bea27d9383720ee04759742c6bf12c5 | Given a relative path, locates a file in the parent heirarchy by matching parts of the path | int locateFileInFS(char * filename,DirEntry * de){
if( strcmp(filename,"/") == 0){
setDirClusHiLo(de, rootDir_clusterNum);
de->DIR_Attr = ATTR_DIR;
return 1;
}
int success = 0,i=0;
ULONG addr;
char buf[MAXBUF];
char * saveptr,*token,*input=buf;
strncpy(buf,filename,MAXBUF);
DirEntry * parent = (DirEntry*)... | 1 |
27916c356a00eb4daf27d178c229c354 | a47cff5b7ef624c0895ce43753c1d86c | fjern det givne antal af den givne vare fra lageret. | public class Inventory
public void removeOne( String code ) {
if(map.containsKey(code)){
map.get(code).decreaseQuantity();;
}
} | 0 |
5641d276606e1ac66687addcdafda808 | 7be267729aec19ded9bbfa67997d008a | POST: PostTagController/Create | {
if (ModelState.IsValid)
{
try
{
core.TagRepository.Create(item.Name);
core.Submit();
var created_tag = core.TagRepository.Find(item.Name);
item.ID = created_tag.ID;
... | 1 |
37e8614110385b1c979136864ee93fc4 | cafa43cb3985aba6de90d1f9e2f5f8ae | 選択アイテムの付箋データにアクセスして代入 | function onSelectItem(type, args) {
if (args && args[2][1])
document.getElementById("items").value = args[2][1];
} | 1 |
d103a7bf4a8a181fe53c5d0ba8b7a7da | cf5d1eaa1564ad9bac904bb36334c7d9 | We are static linking, so just store the function addresses | void ULinker::StaticConstructor()
{
UClass* TheClass = GetClass();
TheClass->EmitObjectReference( STRUCT_OFFSET( ULinker, LinkerRoot ) );
const DWORD SkipIndexIndex = TheClass->EmitStructArrayBegin( STRUCT_OFFSET( ULinker, ImportMap ), sizeof(FObjectImport) );
TheClass->EmitObjectReference( STRUCT_OFFSET( FObjectIm... | 0 |
ffba0a82ff9ae8cc8083a6670382639f | 35dfbab333bddbe72c013ea382f35485 | Check the string representation for a feature | class TestFermiWord:
def test_str(self, fw, str_rep):
assert str(fw) == str_rep
assert repr(fw) == str_rep | 1 |
ee68f69d136aa3d3cbf99c55d8cb91d9 | a222ec4d60c1be06e4f7c6b9750293e9 | 履歴をグラフとして表示し、保存する | print(model_history.history.keys())
loss = model_history.history['loss']
val_loss = model_history.history['val_loss']
epochs = range(1, len(loss) + 1)
plt.plot(epochs, loss, 'g', label='train')
plt.plot(epochs, val_loss, 'b', label='val')
plt.title('model loss')
plt.xlabel('epoch')
p... | 1 |
c93066032e609e16b530d6311f7d4c84 | 5cea04ece6dc9e8bbbd99187f13a4543 | Enter OpenGL Resize operation. Execute any logic required during an OpenGL resize operation but before processing additional nodes. | class GLNodeAdapter(object):
def resize_enter(self, width, height):
pass | 1 |
b8f08b22e6667595135e493003c098b7 | ae0fc899749f9814a639566cf4848691 | 用手机号注册用户
如果手机号已存在,那么只需要更新手机状态和密码 | @Api(value = "用户信息交互接口", tags = "用户信息交互接口")
@RestController("authController")
@RequestMapping("/auth/api")
public class AuthController extends BaseController
@PostMapping(value = "/registerbyphone")
public ResponseDto<Object> registryByCellphone(@RequestBody UserVO userVO) throws Exception{
if (RegValidationUtil.val... | 0 |
6b2f700e421c02d2a6b9984e4b89e72a | a9637904469823322a62b8d64bf9c5d4 | 是否需要更新本地的版本 | {
#if UNITY_EDITOR
return false;
#else
int remote_version = int.Parse(RemoteVersionInfo.bundle_version.Replace(".", ""));
int local_version = int.Parse(LocalBundleVersion.Replace(".", ""));
if (remote_version > local_version)
{
return true;
}
ret... | 1 |
25b58b731630f3a82b5d7f5faf024116 | bec95f50f1a709fff50cabe0da1d071a | FetchHeaders extracts specified headers from request | data := string(raw)
lines := strings.Split(data, "\r\n")
header := make(map[string]string)
for _, line := range lines {
words := strings.Split(line, ":")
if len(words) == 2 {
header[strings.Trim(words[0], " ")] = strings.Trim(words[1], " ")
}
}
return header
} | 0 |
2fabdce7abf6c6cd6df698a5aa9991bc | a1e6b5968860b94170bc3fb665a21cfd | 更新当前菜单待办事项数目 | function updateCount() {
if (storage().get("user_info")) {
$.post(CountURL, getParameter(), function (json) {
if (json.status) {
if (json.data.count > 0) {
chrome.browserAction.setBadgeText({
text: String(json.data.count)
... | 1 |
09d84fb73d96db47adb2c09ff136c334 | 40d52f353c03a155ad8a1ee7bea83f2f | Prediction of sequence of tags using Variable Elimiation algorithm. | def viterbi(word_list):
word_list = ['*', '*'] + word_list
pi_dict = {(1, '*', '*'): 1}
bp_dict = {}
for k in range(2, len(word_list)):
u_set = tag_set
v_set = tag_set
w_set = tag_set
if k == 2:
u_set = ('*', )
w_set = ('*', )
elif k == 3:
w_set = ('*', )
for u, v in itertools.product(u_set, v_... | 0 |
da9d15b3eb8f2e4e7c5bd69561b07602 | 77ac2d32777fe95d66c31fc486ece2af | Checks whether the <code>is-duplicate</code> property is set.
<code>false</code>. | boolean isIsDestroyDuplicates(); | 0 |
19502fc14654d868abcd71be060e0f5b | 5951a9761fe18a9b08f7c9f072785b7d | Return the VirtualBox object associated with this VirtualMachine. | public class EditVm extends javax.swing.JDialog
public VirtualMachineRegistry getVmr() {
return this.vmr;
} | 0 |
a40496199236f2571a61fbbc0e17ea70 | ddf28e08582d175cae15f164ce9bf278 | * lncli: `listchannels`
ListChannels returns a description of all the open channels that this node
is a participant in. | class LightningRPC(BaseClient):
# LIGHTNINGRPC
def list_channels(self, **kwargs):
response = self._ln_stub.ListChannels(ln.ListChannelsRequest(**kwargs))
return response | 1 |
a378b54d30139c4721dc97411846647c | cccc8ae77e6aba34a6bc8d1f23b00469 | Returns the MongoClient object (the database connection itself). It will create one
based in the given connection string if it doesn't exists. | from pymongo import MongoClient
if self._connection is None:
self._connection = MongoClient(host=self.url, max_pool_size=10)
return self._connection | 1 |
56cbdf6ddee3e813c0e0c71184bea839 | 62e1dac06831ccbc944625cc834da563 | 通知上报失连告警 | void reportExceptionPortAlarm(JSONObject msgObj); | 1 |
c4714bc8d589db1b9b137f4a096ccf3c | 78804225ad54c170ae5ecd58728a824f | Handler for incoming MIDI AFTERTOUCH event | [ExecuteInEditMode]
public class PureData : MonoBehaviour
public static bool SendAftertouch(int channel, int value) {
return instance.communicator.SendAftertouch(channel, value);
} | 0 |
8db2894754b17e557715d34c11a30bdf | a670c8b13bd4bcdfd21f9a7f89802fd4 | Gets the visible state of component (wtAttachNewDocumentLink2) | namespace ssCaseConferencing.Flows.FlowLearner_ProgressReport public abstract class WBlkProgressReport: OSUserControl, IWebScreen, INegotiateTabIndexes, IAjaxNotifyEvent
public bool cnt_Container27_isVisible() {
int oldCurrentESpaceId = heContext.CurrentESpaceId;
try {
heContext.CurrentESpaceId = ssCaseConfe... | 0 |
caa4012be1e3d5ee141ff84236b6758f | e56a33ab69a6eedf41b9be01c830a3b8 | Select the action with the highest score. | public class Grading
public int[] maxScore(ArrayList<int[]> allActions) {
ArrayList<StepAndScore> steps=new ArrayList<StepAndScore>();
for(int[] action:allActions){
steps.add(new StepAndScore(action,getScore(action)));
this.battleaxAi=cloneBattleaxAi(battleaxAi_backup);
this.battleaxAi.setB... | 1 |
4baa8c34b21646f63ecaa91e9a154dd4 | 297c9599ea719581355b02e99ed4f892 | Creates all HTML for countdown timer | function updateDOM() {
coutdownActive = setInterval(() => {
const now = new Date().getTime();
const distance = countdownValue -now;
const days = Math.floor(distance / day);
const hours = Math.floor((distance % day) / hour);
const minutes = Math.floor((distance % hour) / minut... | 0 |
a0948c9c60153f732a0879409374f00f | 45c2c19af97b08c02808026a880c927c | Rebuilds index from scratch using specified data files. | namespace ShapesLibrary
void LoadFiles(bool forceToRebuildIndex); | 1 |
188993d6f0431cffbbcaa41d1cfa7be7 | 401c39f2163bed76df4ff4766dec1924 | this function is called when we want the sweeper to sweep | public class sweeper : MonoBehaviour
void Start () {
} | 0 |
0aad31463a869cef714bb0636609cd44 | 27211df31377ca1be11ad4e605df243b | 移除'出发时间'控件的'readonly'属性 | class PayReportPage(BasePage):
def set_startTime(self,time):
js = "document.getElementById('startTime').removeAttribute('readonly')"
startTime = 'id=>startTime'
self.type(startTime,time) | 1 |
e4b5d09a45f56ca5b072bff833f5cb04 | c328239d03d877a4e24276ad4fa01611 | Show the settings page if settings button is pressed | def settings_page():
screen_refresh() | 0 |
88a560b65afdc7895caf2f46ab284652 | 9cc12930f3777fb484d1187a6445c166 | Check whether the provided upload edge pixel's RGB components match the initialisation colour. | if (img.channels() == 1) {
uchar curr = img.at<uchar>(point.col, point.row);
if (color.val[0] == curr)
return true;
}
else if (img.channels() == 3) {
Vec3b currPix = img.at<Vec3b>(point.col, point.row);
Scalar currVal = Scalar(currPix.val[0], currPix.val[1], currPix.val[2]);
if (Preprocessing::sEquals(c... | 1 |
e19d3f947505e65ca79080ff974e06f0 | c2c5a33623ac3f897e6e6a0947bffd84 | # Transforma os dados em um grid para cada classe | converte = function(dados) {
c<-NULL
for (i in 1:ncol(dados))
c<-cbind(c,as.numeric(dados[,i]))
return (c)
} | 0 |
20f76297f0052371d3be8f4564e2a26c | a5b5795712ed03848fc1d36dfacbf657 | Activate a standard set of debugging hooks. | @SuppressWarnings("deprecation")
@ExtendWith(MockitoExtension.class)
@DisplayName("SqlInjectionTutorial unit test")
class SqlInjectionTutorialTest
@BeforeAll
private static void reactorVerbose() {
Hooks.onOperatorDebug();
} | 1 |
9f86acafb3d9996b58c21c8be6f53e5c | fcb72f8d70cd9cd9bda5bf29931829f8 | Returns true if the first value is greater than the second. | TEmitter Cgt() => Emit(OpCodes.Cgt); | 0 |
9a8c43e9b283b6e5690e6d11471e6433 | d2fea14022ae57ad939bc1b4cd94f37d | Compares two enumerables item by item | {
IEnumerator<T> enumLeft = left.GetEnumerator();
IEnumerator<T> enumRight = right.GetEnumerator();
while (true)
{
bool hasNextX = enumLeft.MoveNext();
bool hasNextY = enumRight.MoveNext();
if (!hasNextX || !hasNextY)
return (hasNextX == hasNextY);
if (!EqualityUtils.Equals(enumLeft.C... | 1 |
cc4833eda69941f33b1e93aedbbdba65 | c0423822b4ad21fdb14966df5aa1d14a | 以前有过选择属性的,返回以前选择的属性,否则返回1 | for ( BaseJCInfo_BJDC item : getData () ) {
if (item.isSelectedBF ()) return 2;
}
for ( BaseJCInfo_BJDC item : getData () ) {
if (item.isSelectedSXDS () || item.isSelectedBQC () || item.isSelectedZJQ ()) return 5;
}
return 14;
} | 0 |
b1ec88130ff0aa2a2f9d76a4546d17d9 | ec263eb3e605a2ca42f0f1fb2f789b6f | Gets the number of voters. | @Repository
public class PollDao
public int getCountUsers(Poll poll) {
return jdbcTemplate.queryForObject(queryCountVotesPool, Integer.class, poll.getId());
} | 1 |
87df902b9b4a997b01695a14d05e6c3e | 36e648b3e69f04df70181868f2a91997 | @brief funcion para leer puerto serial celda de carga | {
char conf;
int socketfd;
socketfd=conectar(ip,port);
if(!socketfd)
return 0;
read(socketfd,&conf,1);
cerrar(socketfd);
return 1;
} | 0 |
802ae887fe6ef4c14da9c253a02f55f6 | 3d5785e560dac78900065415ca3bb439 | 商品残数0の場合必ず落選 (リトライ) | function sold_out_check($value) {
if ($value['stock'] === '0') {
print '<span class="red">売り切れ</span>';
} else {
print '<input name="go_cart" class="cart-btn" type="submit" value="カートに入れる">';
}
} | 0 |
88e42903856a1c475386059758df6638 | 6fb8263645cd12f721f30cc32d8dd293 | La función nos devuelve el identificador a partir del identificador de un usuario y la fecha de insercion de la partida | {
$id = '';
foreach ($datas as $row)
{
$array = explode('-', $row);
if($array[1] == $roleId && $array[2] == $gameId)
{
$id = $array[0];
}
}
return $id;
} | 0 |
01f63cb12bc766443082be90499162f6 | 4651517d5294f5823a5c42d2a9d689d4 | Returns new [NodeBase] representing filter:
value of `this` vector property is not empty
### Sample
```
XdUser.query(XdUser::details.isNotEmpty())
``` | namespace QuoteFlow.Core.Jql.Builder
IValueBuilder Is(); | 0 |
470cabccabd0c8a20cf327578f2c366f | caf49ed0934375b1f630e1f02beae133 | Gets the list of measurements for this interface | List<String> getMeasures(); | 1 |
a98de919b00dc0d685c0a652fd5de2da | 305309a013065f453b3cd3f4445d1be3 | Filtra por entidades visibles y que esten dentro del area de vision del render: | void SMEntity::VRender(SDL_Surface * pDisplaySurface)
{
cVector2 Pos = m_LevelPosition - SMGame::GetCameraPosition();
if (Pos.x < -200 || Pos.x > SMGame::GetScreenSize().x
|| Pos.y < -200 || Pos.y > SMGame::GetScreenSize().y)
{
return;
}
SMSurface::OnDraw(pDisplaySurface, m_pSurface, static_cast<int>(m_LevelP... | 1 |
713ca77f47550dd2bbefc3288dc45d9b | 992b7b398603653681467b22be77f1fc | 设置角色到指定位置 | namespace GamePlay
public class Player
public void SetPos(byte index)
{
pos.Value = index;
RoomManager.Instance.rData.SetPos(id.Value, index, 1);
} | 1 |
b8822b2add94940f7ab190b0f6837c99 | eb124bbc41b1950dc205fb842b024686 | 保存并复制按钮 | public partial class ITM_ITM022 : WUI.BaseSecurePage
protected void btnCopySave_Click(object sender, EventArgs e)
{
CopyAdd();
} | 1 |
170a0448c8efa3bb6ecc48e3bd22bc67 | 9fc9b5d27bb282e59abaec6280730aee | dpcm编码 | void encode_dpcm(HeaderType header, WaveData data, WaveData *enc_data) {
int i, n;
enc_data->Sample = (short int *) malloc((int) n);
if (header.BitsPerSample == 16)
n = header.Subchunk2Size / 2;
else
n = header.Subchunk2Size;
enc_data->Sample[0] = data.Sample[0];
for (i = 1;i < n;i++)
enc_data->Sample[i] =... | 1 |
bed03bab5886165e0648c4bf47eece33 | 5e589c8f8cd4d92091c5d6fa048996f1 | Returns the default textFont for all widgets. | class Params:
def get_default_font(self):
return self.params['default_font'] | 1 |
6f4aafb53b2ae03ddbb7cb466c3f2db3 | 87a11606fa82bf3142bc5f7da548a796 | Returns a new mutable string containing a substring of the current one. | DSString& DSString::substring(int startIndex) {
return substring(startIndex, strlen(data_));
} | 1 |
dc06a3b4a2e0fea78ac774893434a217 | 1dc4acd3709b516c4a2ef32fe0297e75 | Remember the originals of the methods we are going to mock | self.original_role_name_exists = validator.role_name_exists
validator.role_name_exists = role_name_exists_mock
self.original_resource_name_exists = validator.resource_name_exists
validator.resource_name_exists = resource_name_exists_mock
self.original_check_email_exist = validato... | 1 |
2f6e20f3875e2256c35760e9a07b61fb | ff0fb7eb162f1a53160318ca5b1e7db5 | อัพเดทหัวเอกสาร | class UploadFile_Controller extends Controller
public function update_document_personal(Request $request, $id){
$this->validate($request, [
'txt_tieude'=>'required|max:255',
'txt_noidungtt'=>'required|max:255',
'txt_loai'=>'required',
'txt_tacgia'=>'required',
... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.