query_id
string
corpus_id
string
query
string
code
string
label
int64
501a8e7e88f72a2ba39ae832761d15e6
c90c4e2133f9317d8e7699631df4f7b8
https://stackoverflow.com/a/47471486/9632963
function stringToColor(str: string) { let hash = 0; for (let i = 0; i < str.length; i++) { hash = str.charCodeAt(i) + ((hash << 5) - hash); } let color = '#'; for (let i = 0; i < 3; i++) { const value = (hash >> (i * 8)) & 0xFF; color += ('00' + value.toString(16)).substr(-2); } return color; ...
1
ed100d73338366fe7e47804785d9b46c
81e09d37099f98b49dccb84875316728
Check whether or not to log request summaries based on log level.
public class LoggingInterceptor implements IClientInterceptor public void setLogRequestSummary(boolean theValue) { myLogRequestSummary = theValue; }
0
0e5afb51909ddc90ab0c1419bc126b38
40a3134cfd9f7fe378c275e30ae43d76
Get ldapconnection using GICAR bind settings
{ if (!$this->connection && $this->Host) { $options = array( 'host' => $this->Host, 'username' => $this->BindUser, 'password' => $this->BindPass, 'bindRequiresDn' => true, 'baseDn' => $this->BaseDN, ); $this->connection = new Zend_Ldap($option...
1
21625b168d01a0d552fb871b5aec77a8
8d27bac0a7f8f0bca38f067da5bb78d8
辅助函数 转换下注ID
if("F47103".equals(str)) str="3D"; if("F47104".equals(str)) str="双色球"; if("F47102".equals(str)) str="七乐彩"; if("F47101".equals(str)) str="时时彩"; if("F02903".equals(str)) str="3D"; if("F02904".equals(str)) str="双色球"; if("F02902".equals(str)) str="七乐彩"; return str; }
1
16dfe654191d55d6a1d6020baec2e2da
87539f95452963f1b262559d6c805b04
Initialize MME
static void mgs_service_init(void) { uint32_t err_code; ble_mgs_init_t mgs_init; memset(&mgs_init, 0, sizeof(mgs_init)); mgs_init.evt_handler = NULL; mgs_init.support_notification = true; mgs_init.p_report_ref = NULL; mgs_init.bl_rd_sec = SEC_OPEN; mgs_init.bl_cccd_...
0
98b6ed35536aad9548e0b5b7a4c9cd3c
cf8038ad5bd32fc49cc163629489ed37
根据学期号获取该学生的课程成绩信息
public class StuGradeDao implements TableDao{ public ArrayList<StuGrade> findByYearTerm(String year,String couTerm,String stuNum) throws Exception{ String sql="select cou_num,cou_name,cou_type,grade,grade_credit from courseinfo,student_grade,termplaninfo where tp_coursenum=grade_cou_num and grade_cou_num = cou_num an...
1
1147872001280976c269edd8885a1a80
1e1bb7fff9ad90674e047fe990d22b3f
Introspects sql result set mappings.
if hasattr(query, 'attr'): return [query.attr.target_mapper] else: return [ d['expr'].class_ for d in query.column_descriptions if isinstance(d['expr'], Mapper) ]
1
3eb6f2cb6fa6956bddc3f360e8d26f56
57568fb4f785a396f694096d00c63888
Open base URL and verify title text
class ItalkiTest(unittest.TestCase): def test_homepage_title_verification(self): self.driver.get("https://www.italki.com") self.assertEqual("italki: Learn a language online", self.driver.title, "Titles don't match")
1
bb5cdd105ee564f958c17ba35cf55230
c0cfd34e15b8d62d759eb9e04f17a487
요일에 대한 값을 인자로 받아 해당 요일에 수업이 있는 강좌들을 조회
@Query("SELECT length, courseName, classroom, type, lecturer FROM course WHERE week = :week ORDER BY num") List<CourseLNRTL> getCourseByWeek(int week);
0
0018bd30cdd34ae3cf8aa3039054a683
ad750fdb2fda88992e42750a414995fc
Get the size of the output file in bytes
class DREAMOutput: def getFileSize(self): return self.filesize
1
ea3e9b938c25b66c111b69db653d8ffc
88e2bcf97c23d7afc46b2bba341b0b7a
method that calculates perimeter by adding all 3 sides of triangle
class Triangle: def per(self): global perimeter perimeter = self.first + self.second + self.third
1
bfeecebb688289f8221f71b29c5a7318
81579fcfc18cf2f2d121a76362ff06aa
Match C++ destructors
PRIVATE void call_cxx_destruct(id obj) { static SEL cxx_destruct; if (NULL == cxx_destruct) { cxx_destruct = sel_registerName(".cxx_destruct"); } Class cls = classForObject(obj); while (cls) { Class currentClass = cls; cls = cls->super_class; if (currentClass->cxx_destruct) { currentClass->cxx_destr...
1
99529d82ad2f25e8cb1b47f9a465a044
e7018e28bae1415ddf95ab2c0bc169bf
功能:根据会员卡更新订单的折扣和总价
class MemberCardNo extends Dao public function updatedCardNo($orderSn) { if (empty($orderSn)) { return false; } $orderId = M('Orders')->where(array('order_sn' => $orderSn))->getField('id'); if (empty($orderId)) { return false; } $orderGoodsList...
0
9bc0465ac11fbe002a8ebacf20428dba
6de15084ed5c7d056393a72039889b58
A calculator that will recursively parse a string and evaluate as float. Acceptable operators are +,-,*,/,^.
{ ParseRec recs[MAX_OP + 1]; int recLen = 0; while (char c = *input++) { if ('0' <= c && c <= '9') { recs[recLen++] = { string(input - 1, input), c }; } else { auto right = recs[--recLen]; auto left = recs[--recLen]; ...
0
864eced4235e8103a17b4feccb6f94f6
b4cecd0c834c9657939b3b0236a015dd
根据用户ID删除权限规则
public int delUserPrivRtByUserIds(String userIds);
1
7bd3d4e927784696a1e18e9ed2c053f6
20f79a0b566339c992500dd7884dcbe4
Sleep (stop program execution) until there's a time to wake up.
void waitUntil( double _until ) { struct timespec until; until.tv_sec = (time_t)( _until ); until.tv_nsec = (long)( ( _until - (time_t)( _until ) ) * 1000000.0 ); clock_nanosleep( CLOCK_REALTIME, TIMER_ABSTIME, &until, NULL ); }
1
b200f69db6d76bdbd247d8ae79ce0633
c112d06a3d9228c4dfe1fb89fd975cfc
Read count of blocked users in an app
{ if (parent::Connect()) { $count = parent::_select('blocked_accounts', 'COUNT(*) AS `count`', "`company_id` = '".$this->company_id."' AND `save_date` = '".$this->FormatDateToISO($this->save_date)."'"); parent::Close(); if ($count && $row = $count->fetch_assoc()) { return $row['count']; } ...
1
2b2e985c735d508983a1b753f6f97c6e
3e06e97b1248273252f78334d65b30cb
Gets the delete option.
if(getConfirmDeleteButton() !== null) { return "modal"; } if (getDeleteButton() !== null) { return "options"; } if (getOptionsButton() !== null) { return "initial"; } return "done"; }
0
c3159b16b2f8c8a44d7c69a4a7d24b99
4d0adfe4366c2c8d5f43369dfca44dc6
From: http://stackoverflow.com/a/3431835
from itertools import izip_longest args = [iter(iterable)] * n return izip_longest(*args, fillvalue=fillvalue)
1
1b4eaac57ed7a96d9f7a94d044cf6fc0
24ba5eee0e0c998b43a7a3eaba641f32
Computes a Ideal high pass mask takes as input: shape: the shape of the mask to be generated cutoff: the cutoff frequency of the ideal filter returns a ideal high pass mask
freqs = self._apply_fftfreq(shape[0], shape[1]) spectrum = self._get_spectrum(freqs, decay, ch, shape[0], shape[1]) spectrum = tf.complex(spectrum[:, 0], spectrum[:, 1]) mask = tf.math.real(tf.signal.irfft2d(spectrum, shape)) mask = mask[:1, : shape[0], : shape[1]] mask =...
0
db29ff67510e4750a84a353812360589
8c5b2c4f7e6d62080dcad99821472933
Gibt das Alter des Spielers dieser Zeile zurueck
public class Player extends Zeichenobjekt implements Observer private int getyCoord() { return (getyPos() / spielfeld.fieldSize); }
0
145b51b667d1067030b8c5e72f1be97a
df20730b80cb5bb5a4a48b26e09c79bc
The owner of the certificate.
class TrustedCertificate(Entity): def owner_id(self): return self._owner_id.value
1
1bcc3ee803b69489ccc38ef89f5355a9
177daa029557898585f6c3589d65abad
Test creation of 5E850I sensors.
device = device_factory( "refrigerator", [Capability.power_consumption_report], { Attribute.power_consumption: { "energy": 1412002, "deltaEnergy": 25, "power": 109, "powerEnergy": 24.304498331745464, ...
0
2f63317a81c48a3c991b45dd658d4496
667ca420c91ab3aaa77f901911a37dfa
cuando se ha cargado el nivel, restauramos la localización de Simon
public class GameClasseScript public void LevelSolved() { this.EndLevelTime = this.GameTime; Physics.gravity = this.OriginalGravity; Application.LoadLevel(UtilsScript.SceneLevelPlayerName); }
0
9fe97741d2ca12a52a1d6e89a5692e0d
44654ce7dc8f54220c974d3978fc6e3e
一个描述符类
function JType(desc) { if (!desc.length) { console.log("INTERNAL ERROR: cannot create JType with empty desc, using void"); desc = 'V'; } this.dimensions = 0; var idx = 0; while (desc[idx] == '[') { this.dimensions++; idx++; } this.desc = (' ' + desc).slice(1); this.descriptor = desc.substring(idx); t...
1
f92c1c6d9554081eb06c165dcca24134
acdebbbec0bd2d83f7985c378ec2a23d
Returns <code>true</code> if this ext user is agreed to terms of use.
public final class CookieLoginInfo public boolean isAgreeAgreement() { return MemberDO.AGREE_AGREEMENT_YES.equals(agreeAgreement); }
1
dc2caf2082fc8c91f7666ecde09aca7e
5bc8ef7cee979b4fa8c174893a0d7ce1
Set the relaxtion value on this joint. This value determines how loose the joint will be
void setQuickStepW(double over_relaxation);
1
99ea71e68265900c1322c89f435bf4cb
2dee2974c27b2ea4b1a8b817aa9622f2
This method serializes the first string and asserts that it equals the second string.
namespace EDC.Test.Collections.Generic [TestFixture] public class PairTests [Test] public void Constructor_ValidStringPair_VerifyFirstIsCorrect( ) { var pair = new Pair<string, string>( "string1", "string2" ); Assert.AreEqual( pair.First, "string1" ); }
0
4da9d508e883e372d12c4e6acdf5bd02
b7ef05d6f9e8cf066ad46501863790be
Get all perspectives in array
class Goal extends AbstractKPIService public function getGoalsAndKpiInArrayByPerspective($perspectiveId) { $qb = $this->getEntityManager()->createQueryBuilder(); $qb->select('c') ->from('KPI\Entity\Goal', 'c') ->where("c.perspective = {$perspectiveId}"); $q = $qb->get...
0
a629a275e436ab8ce88aae4eba6dc2b1
b5cdba8da8ef8357da80b96a7819d761
Convert to a sympy expression. Returns: A Sympy expression
class SymPyExecutor(BaseQuantumExecutor): def execute(self, circuit, **options): return sympy_qapply(circuit, **options)
1
1f422b3d53a8e66c3167775ad66cb2cc
6d9881091031c29da5f248c8b719d4aa
创建用户支行
@RestController public class BranchController @RequestMapping(value = "/branchMgr/insertBranch",method = RequestMethod.POST) public @ResponseBody BranchEntity insertBranch(@RequestBody BranchEntity branch){ return branchService.insertBranch(branch); }
1
a5987a39dd05b457f5cbf2b8fda3e6ff
384ba81c79070cc7b32105eee8faa006
@brief Set the application state of a window.
static boolean AppMgr_SetState(AppMgr * pme, int nState) { AppMgrState * ps; if(nState == PREV_ENTRY){ nState = (int)pme->m_states[pme->m_wState].nBack; if(nState == LAST_STATE) pme->m_wState = pme->m_wLastState; else pme->m_wState = (int16)nState; if(pme->m_wState == NO...
1
c0df196a7faf95bf5cec3c65dc08d038
336afee0351e97799b6f0f0fbc9cd45d
Test the the adapter responds to a GET request correctly by returning a 400 code and appropriate message. This is due to the base adapter not implementing the methods.
class TestAsyncApiAdapter(): async def test_async_adapter_get(self, test_async_api_adapter): response = await test_async_api_adapter.adapter.get( test_async_api_adapter.path, test_async_api_adapter.request) assert response.data == 'GET method not implemented by AsyncApiAdapter' asser...
1
0279ff9ef6f1fc936269a712edb4266f
9f019d74832a7678c906585d2a6fad4b
This test case checks the functioning of the PublishMessage callback function of the MQTT
class Module06Test(unittest.TestCase): def testPublishMessage(self): y = self.mqttClientConnector.publishMeassage(self.sensorData) assert(y)
1
38585b0c9384dbfb66436751be6d3249
a653670f382b36d123dd3bd1c4b4eacc
Запрос используется для получения списка транзакций по магазину за определенный период времени.
{ $filter = [ [ 'range' => [ 'averageTransactionAmount' => [ 'gte' => floatval($from), 'lte' => floatval($to), ], ], ], ]; if ($onlyActive) { ...
0
3cb0a6eb38fd03003f7031861d0ea285
2761ab7ec5ad6c98b201f340c5a3067f
Set closed callback.
public class ResourceExplorer extends Widget public void setOnResourceClosed(final EventHandler<ResourceEvent> handler) { resources.onResourceClosed.set(handler); }
1
0d55aff692d07f8e0a70ae5f56858899
a6e38871dc354bbb57e2b8d0ce9852c1
批量创建库存
return request(url + '/create/batch', { method: 'POST', data: params }) }
1
a0aca97789f67a8442ac294795095922
8c8f2d5dc2d39807ffdce7bc153b43f8
@brief Function to update new SEL Entry to DB.
SSMR3PutSel(PSSMHANDLE pSSM, RTSEL Sel) { SSM_ASSERT_WRITEABLE_RET(pSSM); SSM_CHECK_CANCELLED_RET(pSSM); return ssmR3DataWrite(pSSM, &Sel, sizeof(Sel)); }
1
0a29e0042c8fbbb69384f9f64d15f9eb
171832defaacc887d020d316aeba31f4
Test CSRF token validation by POST param.
class SimpleCSRFTestHandler(SimplePublicHandler): def test_get(self): get_csrf_token(self.request, self.response)
0
d016aec2b488ad7c444596ba68773004
01f06b82c8cb7f1b374d49c73ae95ebf
用于向诊所人员发送短信 通知有新的申请
{ $api = A('Message/MessageSend'); $config = $api->getConfig("phone"); $app_id = $config["app_id"]; $app_secret = $config["app_secret"]; vendor('SMS.SendSMS'); $sms = new \SendSMS($app_id, $app_secret,$tel); $sms->template_id = '91550115'; $param = arr...
1
c513d75b030b045a025158c5e9c1f2ee
3c7df5282cd2a0fe46a411bea6c60bc0
查询该课题可接收的最大人数
@Entity @Table(name = "TRAINING_PROJECT") public class TrainingProjectEntity implements java.io.Serializable public Integer getPeopleMax() { return this.peopleMax; }
1
2ff74eafa9918769ebb780859d44a40f
c21bf772a24dbba4ea009fe25cd476cb
Given a list of MX hosts, attempts to connect to at least one on port 25. Returns the mail exchanger it was able to connect to or None.
if not self.check_smtp: return [] self._check_valid_mx_records() errors = [] for mx_rec in self.mx_records: mx_record = mx_rec[1] try: smtp = smtplib.SMTP(timeout=self.smtp_timeout) smtp.connect(mx_record...
0
8444df6ebeed2e6d251579bfbaddb419
227c3280a3e96c402ffc1151eee6b1a8
暂存无形资产
@Controller @RequestMapping(value = "/exportAssets") public class ExportAssetsController extends BaseController{ @RequestMapping(value = "/storageIntangible") public String storageIntangible(Integer id, ModelMap model) throws Exception { Storage storage=storageMng.findById(Integer.valueOf(id)); Lookups fGainingMet...
1
8c85cc055b4076bf54d9d953161b26f9
408707e39383c247f0e529ca502233f4
从文件获取合约信息(address, abi)
def getContract(address): return w3.eth.contract(address=checksumAddress(address), abi=get_abi())
0
516f44c564b3b27d8b6a939c869e1c10
5c15568d969cff00f01684f46652cd45
Returns the resolution value from the player prefs
{ if (_resolutionInitialized) { return _resolution; } #if UNITY_STANDALONE_WIN || UNITY_STANDALONE_OSX || UNITY_EDITOR #elif UNITY_ANDROID using (AndroidJavaClass unityClass = new AndroidJavaClass(CLASS_UNITYPLAYER_ACTIVITY)) { ...
0
7eef2b4a7b462b1a6da9795a689cf744
d309d8299db14f8d26dadeedce150016
Generates a random role from the provided dictionary of available roles.
def random_choice(chances_dict): chances = chances_dict.values() strings = chances_dict.keys() return strings[random_choice_index(chances)]
1
51db87773cbb9450466b10a966fe6aeb
a40593fd4ec1947211ed86f59ca57c84
Disables any redrawing of the Gauge control. To maintain performance while items are added one at a time to the control, call the BeginUpdate method. The BeginUpdate method prevents the control from painting until the <see cref="EndUpdate">EndUpdate</see> method is called.
namespace Microsoft.Windows.Forms void BeginUpdate();
1
1b8e7213f468e6df4cfb50f1a36c97ff
bf783984b1493645589b332d865127e1
Block adds a one to the input (used a lot for mux)
class SMTLIBSolver(Solver): def _push(self): self._smtlib.send("(push 1)")
0
b3a427f5dd42486341cc5908cd63147c
5a1918cda06cfebb80088d4e5ba8b63b
helper for use in radec2altaz and altaz2radec inputs (either ra/dec or alt/az) must be ndarrays of equal size or both floats
import numpy as np alatdim = alat.shape[0] alondim = alon.shape[0] adimmean = (alatdim + alondim)/2.0 blatdim = blat.shape[0] blondim = blon.shape[0] bdimmean = (blatdim + blondim)/2.0 if adimmean < bdimmean: if len(b.shape) > 2: btime = b.shape[0] newb = np.zeros([btime, alatdim, alondim]) for i in ...
0
632da6412746322efcc57cc2b3311dce
80c2342fd5745695cd02ace279f98d70
função principal, chamada automaticamente
def main(): ajeitador()
1
5f62d6a9370975b1d170fe437528de65
b7f71b448a8dcb6418c5a6d7d2422764
攻击生命值最高的单位
attack_obj = obj num = randint(0,len(attack_obj)-1) if attack_obj[num].alive: return attack_obj[num] else: del attack_obj[num] if len(attack_obj)>0: return attack_who(attack_obj) else: return None
0
d90612aaf5c43a2611452a9ec58259c2
bd09c5224dc103260a9e2984a288ef32
Get number of notifications not Read of the given user
namespace WVUPSM.DAL.Repos.Interfaces int GetUnReadNotificationCount(string userId);
1
34cb1728caa571b8307582bf3e241015
1e5ddd6533470fc87eb4975b9ba23935
删除数据库连接字符串
namespace OpenNETCF.ORM public partial class MSSqlDataStore : SQLStoreBase<SqlEntityInfo> public override void DeleteStore() { File.Delete(ConnectionStringBase); }
1
eaa65ee38262d8911871c3263ca20206
6f816eb57545891469ca7f3eddd4be57
测试Column类型与值类型不一致的情况,期望抛出ClientError。某些SDK无法进行这样的赋值,则认为该CASE自动PASS。
{ $this->freeValidate(); $this->validate->addColumn('bar')->lessThanWithColumn('foo', 'bar不能大于foo'); $validateResult = $this->validate->validate(['bar' => 10, 'foo' => 9]); $this->assertFalse($validateResult); $this->assertEquals("bar不能大于foo", $this->validate->getError()->__t...
0
76cc62e9f788d28d1212ba5c0b6aec5e
339e46c5dcc0bf3082557c735797508c
アンケート最大IDの取得
{ $gid = (int) $gid; $s_lang = Survey::model()->findByPk($surveyid)->language; $max_sql = "SELECT max( question_order ) AS max FROM {{questions}} WHERE gid='{$gid}' AND language='{$s_lang}'"; $max_result = Yii::app()->db->createCommand($max_sql)->query(); $maxrow = $max_result->read(); $current...
0
35ce321159d15dce278ff931f0a6cd38
93b97ea70af47c0130edb66e770a0ce3
Creates a boolean conjunction value.
def and_bool(attr_a, attr_b=False): return _create_operation_node('and_bool', attr_a, attr_b)
1
50aca1857d17a751909c44e81e573397
6fba9f57070a26511db68c9aeb73b30b
Removes the Texture that has been applied to the Sprite
namespace YNA.Graphics2D public class Sprite public virtual void UnloadContent () { if (texture != null) texture.Dispose (); spriteCount--; }
1
e31d3fcc6c71960e0a9320c47e003d59
295d0a030d8612a5d9cb84cf1da82dad
Build the new state the game must be set into from its tree.
class Experience(ser.Serializable): def new_state(self) -> GameState: if isinstance(self._new_state, GameState): return self._new_state self._new_state = GameState.from_prims(self._new_state) return self._new_state
1
18e79b27cb633ffbc3fa754dfe80de49
ca026ed6ac9bb0d48d531961ff5b57c3
Setter method for typeobjnri
public class OrdOfferObjInstRelDO extends BaseDO{ public void setObjType(java.lang.String objType) { this.objType = objType; }
0
3100eb95a2aca88edea95bd36f6742d6
8d39a547b519a8e5490b43c68d447131
helper function to delete a key given its value
child *parent = root; if(root == NULL) return; if(root->left == NULL && root->right == NULL){ free(root);return; }else{ while(root != NULL){ if(key == *((int *)(root->value))){ if(root->right == NULL){ parent->left = root->left; }else if(root->left == NULL){ parent->right = root->right; ...
1
9bb98d272808f0bcae29eb44bb44b97f
0ff4d0c7d3b35050edf893531b1041d6
Obtiene los dias especiales por delegacion
{ $delegacion = $request->get('delegacion'); $elemento = elemento_policial::join("persona_fisica","elemento_policial.id_persona_fisica","=","persona_fisica.id") ->join("dato_personal","elemento_policial.id","=","dato_personal.id") ->join("sucursal_historico","persona_fisica.id_dato_personal","=","su...
0
d8f35eec101e90a7b4d182c50a5086a3
97236554d918d80e58dee3ea47316c69
save season name to database
class JoomleagueModelSeason extends JoomleagueModelItem function addSeason($newseason) { $query="SELECT * FROM #__joomleague_season WHERE name='$newseason'"; $this->_db->setQuery($query); if ($seasonObject=$this->_db->loadObject()) { return $seasonObject->id; } $p_season =& $this->getTable(); $p_seaso...
1
389dfa0f9e909bf7f49aecd9f67ebd3c
a1a617680b5ba6b38167dd8fe835b1f9
|-------------------------------------------------------------------------- | Display a listing of the resource. | 卖场信息删除POST。 |--------------------------------------------------------------------------
class SellController extends Controller public function index() { return view('admin.sell.index', [ 'sells' =>sell::orderBy('updated_at', 'desc')->paginate() ]); }
0
d8881e1e7e875f22ad1a0a110bf65f1d
55d84a4c3074a40c801ef2bf4ea43eb9
初始化,把数据划分到初始的簇中
class kmedoids(object): def __init__(self, data): self.belongto = [] self.dataSet = data self.centList=None self.clusMap=None self.iter=0
0
589157853450ad181bd1b97dd8d43fe7
cc84106cc80d948cfbc77b46dda278fb
创建一个道具在地图上的包装对象
{ map_item[pos_x, pos_z].obj = Map_item; map_item[pos_x, pos_z].obj.transform.parent = Map.transform; map_item[pos_x, pos_z].minimap_item = Instantiate(MiniMapItem, new Vector3(pos_x + map_creat.minimapdistance, 1, pos_z + map_creat.minimapdistance), Quaternion.identity); map_item[po...
1
7deeb71bcd35199fc82ffa8e8e7a61f9
14bf63e3c68f3ac0609693af0a7189c1
完善师傅信息接口
function MasterServlet:apprenticeInformation(event) local params = event:getParams() local pbc_string, dbid = params[1], params[2] self:pushApprenticeInformation(dbid) end
0
cd45c0ce798d278f273f0788055a00f4
c067b67617b3c230eff686448e61dc64
Default values for the Open Graph data. This is used as fallback for populating the og: and twitter: tags in every page.
{ site: site_title, reverse: true, og: { url: request.url, title: :title, site_name: site_title, description: :description, locale: 'ja_JP' } } end
1
fa1cdbea849e720c9298b988799c6b2a
67f61002c47842a6c8d78fcaa849e20a
Method called by GameSurfaceView which redraws any tags that have recently changed state.
namespace Microsoft.CodeAnalysis.Editor.Shared.Tagging internal abstract partial class TagSource<TTag> where TTag : ITag protected abstract void RecomputeTagsForeground();
0
ab7d7fb145bed6cfc4dc9e4199b554ad
ac0d7779a6496d282b42113f7e7a8aed
Translate player IDs to names
{ id = playerNum; switch (id) { case 1: horizontal_axis = "Horizontal_P1"; vertical_axis = "Vertical_P1"; cam_horizontal = "Cam_Horizontal_P1"; cam_vertical = "Cam_Vertical_P1"; r3 = "R3_P1"; ...
0
477fe273834c647ab6dda45c2a9071d3
1a27fd8dd6481e87252f91fc65b295aa
下载最新的开奖日资料.
public OldGoldDTO downloadOldGoldData(String docNum) throws POSException;
0
a2ee4b8c11a6366e721ceba5f7d67534
a46289470ac837a942bf7eb6f20be312
Draws {@link Marker}s to the render buffer.
function drawMarks(scale: number): void { ctx.lineWidth = 3 / scale; for (const mark of debugMarks) { switch (mark.kind) { case 'circle': { const { pos, radius, color } = mark; ctx.beginPath(); ctx.strokeStyle = debugColors[color]; ctx.arc(pos.x, pos.y, radi...
1
14a2c1a11e39ad2d1e626d0588f314bd
03805a32110b6080643203332edca2a8
Check whether or not the log will show if we call the log function
{ return (lo.level <= LOG_LEVEL_TRACE) ? 0 : 1; }
1
58d254386f5b73ad292fa28b6c3841f5
042697a5e1ed7463f0c550624f1b9859
Functie care ruleaza teste de domeniu.
public class ErrorHandler public static boolean domainHandler(String url) throws Exception { return(DomainTest.domainHandler(url)); }
1
ecd01d0f342564af4c07889a9fee0742
efa8b07785e3ca5b0f7905b74e8e293e
Load all entries for the selected month.
for ($Indx=$this->StartMonth; $Indx<=$this->EndMonth; $Indx++) { $this->AddEntry( $this->MonthValues[ $Indx ], $Indx); } ListBox::DrawInit(); }
0
4a72a7dc10a550534c17aea93d09d85a
d0af94034847362f683bfd983c147dc2
permet de payer une contravention
public class Game_controler public void surrend() { if (should_pay) { send_bankruptcy(owner_debt, sum_debt, network.get_pseudo_client()); } else { send_bankruptcy("BANK", 0, network.get_pseudo_client()); } }
0
8a6a959facc98083e00ccd2655ec65da
f7c8e27ca5daa8c79932674bb177857f
Utilise un cookie pour m�moriser la locale
function setLocale(locale) { document.cookie = 'locale=' + locale; }
1
b74c0e54e882d0964710afb59e2286ef
f50e27985cb882ffdfc5ff19b5bc1620
bilstm + mlp
class BIMPM(nn.Module): def __init__(self, config, word_mat, char_mat): super(BIMPM, self).__init__() self.vocab_size = config.vocab_size self.vocab_char_size = config.vocab_char_size self.word_dims = config.word_dims self.char_dims = config.char_dims self.h...
1
e7f4487812c85b873b27c6829856b7a9
0b0858a809a83f308e6b5354bb8b5a94
Sends the transform tile item.
{ RoomItemEventArguments EventArguments = (RoomItemEventArguments)Args; MoveFurniResponsePacket MoveFurniClientPacket = new MoveFurniResponsePacket(); MoveFurniClientPacket.I = EventArguments.Item.ItemData.Id; MoveFurniClientPacket.S = EventArguments.Item.ItemData...
1
c5312565564b0dde2e703c5c094efd0a
4bf734ae477e3d9cbeff8d938f622c6d
Get variable initialization value from a Python file.
def variables_from_file(filename: str, variables: _PyTree): if not _path.isfile(filename): if filename[-6:] != ".mpack": filename = filename + ".mpack" with open(filename, "rb") as f: return _serialization.from_bytes(variables, f.read())
0
cc5fc3a69427ccc61d93c6a9f1f10d70
4600b12bbcb474f2df62e495ecb4465f
根据空间名获取路径
public class SpaceAccessor extends ServiceAccessor{ public static JavaSpace05 getSpace(String spaceName) { return getSpace(spaceName, SorcerEnv.getSpaceGroup()); }
0
db5f5d2b418505655f0a8c7345f9ad1d
1d77b1a228a93a5117535b606d90616f
Returns an array of entries (current page retrieved)
class Melis_Model public function fetchEntries(){ return $this->getTable()->fetchAll('1')->toArray(); }
0
939dd41683f82fccfc35395bae52dc50
fd8d64e0e1369831a348aaf36b7d226d
given an email source, returns the list of the recipients
namespace Siemplify.Integrations.IronPort public class IronPortController : IDisposable public List<string> GetAllRecipientsBySender(string senderMail) { EnsureConnection(); return _queryResolver.GetAllRecipientsBySender(senderMail); }
1
2dd45845a78427001532044985ba048e
c538506a41e95b7606e747049b058e71
Allow time for other systems to submit increase requests before updating to current
func synchronizeQueryExecution() { time.Sleep(time.Millisecond * 200) }
1
87a3e6f72c8566a6c5106157866353eb
a7e158f9129d5778ee81d614ae83a53e
helper function that identifies if a string is a pure integer like 56 or 22
class Hangman def is_integer?(entry) entry.to_i.to_s == entry end
1
eb989d78b1c6fb971bcff04a8df8a5c1
431b2b2b3a7977b7e89dd2650d7b7079
Отображение расширенной информации о заказе
{ $aData['id'] = $nOrderID; $aData['img'] = $this->orderImages($nOrderID); $aData['attach'] = $this->orderAttachments($nOrderID); $aData['aSvc'] = Svc::model()->svcListing(Svc::TYPE_SERVICE, $this->module_name); if( ! empty($aData['type'])) { if ( ! empty($aData[...
1
a0a1e3380861af078bd981913f675598
509b1151604dc44504d5b97dcfec7c9c
Tests adding a highscore to the list.
public class BoulderdashStudentsTestExt1 @Test public void addMultipleHighscoresToLvlTest(){ int lvl = 1; int[] highscores = {500,1000,501,20000}; adapter.initHighscoreList(); for (int score : highscores){ adapter.addHighscore(score, lvl); } assertTrue("Keine 4 Eintraege fuer Level 1", adapter.getNumOfH...
1
0e1fcb3d7cf3a4c1485f11d3a889ab5e
b40e7bc87000a7765f65409e36e94c8e
Настройки источника данных, которые можно изменить в окне редактирования отчёта
{ return conf.DetailView(x => x .Title(conf.Config.Title) .Editors(editors => editors .Add(ed => ed.ImportDateTime, ac=>ac.Title("Дата/Время").IsReadOnly(true).Order(1)) .Add(ed => ed.Mnemonic, ac => ac.Title("Тип ...
0
6a497ce77d46a43db2d39143416a1c3c
026ee4cd46ce030270a27baa08f8a4da
A generator that yields information necessary for each frame. It serves as the argument for FuncAnimation's frames parameter. Note that the number of times this iterator is called depends on the value of FuncAnimation's save_count.
class ScopeAnimation(Animation): def new_saved_frame_seq(self): return []
0
166180aa37f81bcccd4887d387e2cba1
94c2981b58ece62068d71453e22790b4
매개변수로 전달된 plusNum만큼 각 요소를 증가시킴
for(int i=0; i<arr2.length; i++) { for(int j=0; j<arr2[i].length ; j++) { arr2[i][j] += plusNum; } } }
1
655fcad8af5ded41c305f6107c4eaa44
f066c24dca0a854a424ed9e521752069
Check if parameter type derive from Component
function isComponent(component) { if (!component || !vQ.isFunction(component.constructor) || component.constructor == Function) { return false; } if (component.constructor == Component) { return true; } return isComponent(component.constructor); }
1
fd67f9206bf0e6e1b2ed075c2d80c760
e9c1c9fb5a0baadf0305102798660fb2
See {@link Logger#writeToStream(OutputStream)}.
throws IOException { for (String message : messages) { writeMessage2Stream(message, writer); } }
0
cc74e53d5a06c6ae79c2a28ae3750dbf
d4cc536a18b5c8c56b67750dbdb44fde
implements the Linear feedback shift register which computes A = Ax mod f see BHW lecture 5, slide 20
void lfsr_calculate(uint16_t *reg) { unsigned int shift_bit = (((get_bit(*reg, 0) ^ get_bit(*reg, 2)) ^ get_bit(*reg, 3)) ^ get_bit(*reg, 5)); *reg = (*reg >> 1) | (shift_bit << 15); }
1
0d22bb23a4de19c611663c5330019fe2
b22128203907e299442ab5b665e11b83
Solo se aceptan caracteres y numeros el . y @
function validarSoloNumerosLetrasYGuionBajoYPunto(evento) { tecla = (document.all) ? evento.keyCode : evento.which; if (tecla == 8 || tecla == 0 || tecla == 46) return true; if (tecla == 32) return false; patron = /^[A-Za-z0-9_\s\u00f1\u00d1\u00e1\u00c1\u00e9\u00c9\u00ed\u00cd\u00f3\u00d...
0
91638d385a042cade53158c8fad478ec
624de7c8c78af7396aa6b7f5131c4328
【函数功能】在confrmbtn被按下之后,检验该用户名是否被注册过。若被注册过,清空用户名 的输入并提示用户重新输入;若没有被注册过,打开新页面registerConfirm并且将用户信息存入数据库 【参数】无 【返回值】 无 【开发者及日期】李佳芸 2019.7.12 【更改记录】
function provingName() { var name=document.getElementById("name").value; if(name==""||name==" ") { document.getElementById('prompt_1').style.display="none"; document.getElementById('getcode').style.marginTop="40px"; } else { var xmlHttp = null; try{ xmlHttp = new XMLHttpReques...
0
bea575206f5fe952bc5b9eccbb0337d2
b243a91e96654dc9cce18e1cf1cafc59
@brief Like std::to_string, but output in scientific notation
double dv = tod(value), iv; const char *fmt = modf(dv, &iv) == 0.0 ? "%.17g" : "%g"; return snprintf(buf, len, fmt, dv); }
0
e16cf82b55430eecbfdc5e4d4d750869
d6d94df72438238be481e8db6fc83b16
get all chap of an manga (with known ID)
public class ParserApiUtil public Request searchChapter(int mangaId) { HttpUrl.Builder builder=HttpUrl.parse(baseUrl).newBuilder(); builder.addQueryParameter("mangaId",mangaId+""); builder.addPathSegments("v1/manga/getDetail"); return getUrl(builder.build()); }
0
98aa5aadefce07dfd4e36bd016f8b399
5789862bc01adb95f1a7a0c4925cd48d
如果注册定时器时没有提供标识,则自动生成标识
public class DelayTaskRegister public String register(DelayTaskData data) { List<String> idlist = this.register(Arrays.asList(data)); return idlist.get(0); }
0
2d9c455149f769f40c694949e3e2622a
21a9de8f4655746d27f5790c44165ec4
Parse OptionalElsePart
{ if (!_parsed) { throw new NotParsedException(); } bool value = false; if (_isDirective) { value = (_directive.DirectiveType == DirectiveType.Else); } return value; }
0
7658ccc28380cb79949c586aed2bb1a7
be7654982daeaae9e5c9dda9d4bd33a4
添加一个Span
{ int index = mUserSpans.indexOf(oldSpan); if (index >= 0) { mUserSpans.set(index, newSpan); return true; } return false; }
0
e71c4061aafa98fa8bb2363ba2a1435e
343ff1c9e3706b6b0551e0d2076eb649
设置群创建时间
public class GoodsGroup public void setGroupCreateTime(Date groupCreateTime) { if (groupCreateTime != null) { Date tEmp = (Date) groupCreateTime.clone(); if (tEmp != null) { this.groupCreateTime = tEmp; } } }
1