query_id
string
corpus_id
string
query
string
code
string
label
int64
133b1a30022c7bd5453a284ea28ea364
40604f27ec91a327b58f4e4da778ed6c
为 Flyweight 添加子 Flyweight对象
{ string key = this->getKey(sharedState); if (this->m_flyweights.find(key) == this->m_flyweights.end()) { cout << "FlyweightFactory: Can't find a flyweight, creating a new one.\n"; this->m_flyweights.insert(std::make_pair(key, Flyweight(&sharedState))); } ...
0
594fe6b80b1a8de26c1906d7e1fba8e7
a9676d7ce6c9eaecec3fa81533db6d3c
This funciton draws the key given a list of strings
for (int i = 0; i < MAX_CHARS; i++) { hazardBuf[i] = '\0'; } currIdx = 0; for (int row = 0; row < 3; row++) { keys_t curr_row = keys[row]; uint8_t firstSpace = 1; for (int key = 0; curr_row.keyText[key] != '\0'; key++) { int x1 = x + KEY_SPACING + (key * KEY_X_SIZE); int y1 = y + cur...
1
bbaf47ba10fcf16dc7416a18d5ace58f
c06936122b586d263b4cfdd064e474eb
Checks whether it is unit range, which has unit length.
public class Vector3d implements Serializable public boolean isUnit(double e) { return Math.abs(lengthSquared() - 1.0) < e; }
1
288b7054624ee7f2c518e582f1e230c7
1d540647046537a779b311b1e7083034
Restore this node to being treated as active. Note
{ VDASSERT_FN("markNodeAsActive"); IGRstat retFlag = 0; TVDct1JD childJD; IGRint i; IGRchar buf[80]; VDASSERTW(nodeJD && nodeJD->id.objid != NULL_OBJID); *buf = 0; VDjt1GetAttr(nodeJD,VDCT1_ATTR_FROZEN,buf); if (*buf != 0) { if (!strcmp(buf,VDCT1_DEFAULT_FROZEN_D) ) { VDjt1...
1
c00ae01837e36cf3ce6a49ff32e8365e
38485eca14a23881b7fda4e9e5b45c8b
创建plan前的回调函数
let plan = { avatar:'https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1494417824&di=0805791979b1905635cb1291fcb5e97b&src=http://img02.tooopen.com/images/20150605/tooopen_sy_128670487587.jpg', name:'孟倩', ...list }; commit(types.ADD_P...
0
6efaf4481d107b5fc9f936812ae5d40d
97f3a8292c6a786198e53234f488c022
이벤트 글 등록 처리
@Service("AdminService") public class AdminServiceImpl extends EgovAbstractServiceImpl implements AdminService public void insertEventInfo(EventVO vo) throws Exception { adminDAO.insertEventInfo(vo); }
1
72fceab2dec48f1d556f54bc76770d29
67d86a6160a82c2aa9277dec9dd4d82d
Apply custom feedback messages on page load.
class BlueSpiceProjectFeedbackHelper extends BsExtensionMW public function onBeforePageDisplay( &$oOutputPage, &$oSkin ) { $oOutputPage->addModules( 'ext.bluespice.blueSpiceprojectfeedbackhelper' ); return true; }
0
4666d3fe932edf986cc67e8e16265a89
7f61448ad6da3ef0f9cb03f40c5be655
********** Begin Edit *************
cases like (1)
0
6d0a5eb0b4130e7f87945993ec0bec0b
fd73cf0bbabf299b03e74e834ead4967
Displays the edit browse filters dialog.
{ $fullIndex = ForoLynx_Link::buildPublicLink('full:index'); $fullThreadLink = ForoLynx_Link::buildPublicLink('full:threads', array('thread_id' => 1, 'title' => 'example')); $routeValue = str_replace(array($fullIndex, '?'), '', $fullThreadLink); $viewParams = array( 'routeFilter' => $routeFilter, 'fullTh...
1
2bac23b59ce06a6cce2b236d6c09c206
1c68fbca13723877d6052929f26d0783
test delete empty lines, with break blocks the empty lines should not be deleted on header blocks the empty lines should be deleted on closing header blocks
{ $input = 'line 1 {<br />line 2 {<br />line 3}<br />}'; $output = $this->subject->transform_rte($input); $this->assertEquals($input, $output); }
0
f9429bdfc94974a60de2462479362611
6a44552b58588d547680cc7d8fe3fd0a
Sort features into categorical and continuous groups
def feature_type(df): data = reduce_mem_usage(df) numerical_fea = list(data.select_dtypes(exclude=['category']).columns) category_fea = list(filter(lambda x:x not in numerical_fea,list(data.columns))) numerical_serial_fea = [col for col in numerical_fea if data[col].nunique()>10] numerical_noserial_...
1
457973b2a08db63edc3518aa866be03a
5929974a71a921aff8fb134dc7c71710
将Wkt转换为Arcgis的Geometry对象
drawWkt(wkt, layer, style, attributes){ console.error("zxl") var points = read(wkt); if (!style) { style = { color: [41, 0, 255, 0.8], outline: { color: [255, 255, 255], width: 1 ...
0
5f9f317feb073ffdd4c7791cd20d7075
6fc324e866b3da52f4997e4f5d9d20d2
Set the rubrique bilan1.
public class CompteRendu implements Comparable<CompteRendu>{ public void setsBilanCR(String sBilanCR) { this.sBilanCR = sBilanCR; }
0
f3d00a01e8d6df643acf1e78980e908d
c3f41281964c909991bfb02e26162593
Mother Tongue List for Dropdown Box
{ $lang_code_arr = array( 'aa_DJ' => 'Afar - Djibouti', 'aa_ER' => 'Afar - Eritrea', 'aa_ET' => 'Afar - Ethiopia', 'af_ZA' => 'Afrikaans - South Africa', 'ak_GH' => 'Akan', ...
1
324d18df9a5649298063fe9c3356fd47
5d72efd7b3e971804ef75f1ae07da509
check if movies are not equal
bool operator !=(Movie& mov1, Movie& mov2){ return !(mov1 == mov2); }
1
17521e1243fcc184cf01252ee0a21b7c
3ea11c118ee1b6d48f411f30945777f2
获取CardView背景色
public class ViewAttributeUtil public static int getCardViewBackAttribute(AttributeSet attr){ return getAttributeValue(attr , android.support.v7.cardview.R.attr.cardBackgroundColor); }
1
357319ee3683c2ed22a00b086be165bb
10fd46e8dc7a11633c40af4dd13b8686
Get filtered frequency domain after applying filters on original frequency domain. 2D array of complex
def apply_filter(bbi,projector,nchunk=None,normalize=True): ffti = FFTIterator(bbi,use_window=False) if nchunk is None: nchunk = len(bbi) nbeam = bbi.nbeam() nfft = bbi.buff.shape[1] nchan = nfft//2+1 if (projector.shape[0] != nchan): raise ValueError cmatrix0 = np.zeros((nb...
1
d684dbc3891b629d9855bcf7a733cb19
a60932a37adc6f8e6797f246cca38099
Enable or disable Java net debugging. Debug property value. Valid values are: <ul> <li><code>null</code></li> <li>all</li> <li>ssl</li> <li>ssl:xxx (see Java docs what xxx can be)</li> </ul>
public final class XNet private static native void _disableDebug();
0
d0a1fd1368fbe03ec803e609899d96b5
ec07c2a9935a456ee7f301a4587a89fc
@brief --> 统一翻转所有氖泡
void CEmulation::doVisualBell() { for( int flash=0; flash<2; flash++ ) { for( int y=0; y < screen()->rows(); y++ ) { for (int x=0; x < screen()->cols();x++ ) { CCell& c = screen()->cell(x,y); c.setReverse( !c.reverse() ); } } screen()->repaint(); } }
1
d571b5459b817316af71f60471d9017f
484b12775df0b4bb32358b7183db8028
Called when Q system starts a ban
static class BanSystem public static void OnQBanStarted(string mask) { lock (State.GlobalSync) { if (state != BanSystemState.Synchronized) throw new Exception("Bad state"); if (Irc.IsBanEnforced(mask)) { next_q_ban = mas...
1
d349d233949da7c38bde699981b6965f
dba0feb558efd06f28a084e6f1aa3a73
可编辑datagrid类
var datatable = null; var opt = { "autoWidth": false, "rowId": "ID", "stateSave": false, "sPaginationType": "full_numbers", "oLanguage": { "sProcessing": "正在获取数据,请稍后...", "sLengthMenu": "每页显示 _MENU_ 条", ...
1
a5b494ad1c07861b19c8b1c6ea5acafe
4450926dd5857eb36de5c8f062097398
Drop all elements from ds which do not satisfy all filter conditions given in config.
dsData = copy.deepcopy(AllDS) dataset_list = listDatasets(dsData)[0] loc = [False if simple_string(ele) in simple_string(selSet) else True for ele in dataset_list] rmIdx = np.where(loc)[0] for i in rmIdx: loc = dsData['dataset'] == dataset_list[i] dsData = copy.deepcopy(rm...
0
4a1a1ca7ea1efc47e6ad8d9e8690a893
a140f5f71e6f0d562b272f096a4ae525
작업물의 웹페이지 주소를 할당.
public abstract class PageInfo implements Serializable{ public void setUrl(String url) { this.url = url; }
1
2796f2dd7fbf1e7fb1ad248868324121
7ea601168fad1c861c391fa5af4456c8
Best fit with the Gaussian function. Uses scipy.optimize.curve_fit.
input_params = [5000.0, 0.0, 30.0] fit_params, success = optimize.leastsq(gaussian_residuals, input_params, args=(y, x), maxfev=10000) return fit_params
0
3055245597278d580ad6acc83c8f51c5
039ef9cb088dddd21fbd2ed5ab7e105c
删除某部门所有负责人
$id = $_GET["id"]; $res = M("p_members")->where("pid=".$_GET["id"])->count(); if($res){ $this->error("该部门有下级部门请删除下级部门后删除"); } $res = M("p_personnel")->where("id=".$id)->delete(); if($res!==false){ $this->success("操作成功"); }else{ $this->error("操作失败"); } }
0
7f59801ab460b9902715ed5865e675c2
ec27710d193517123eb9a4a18e118fb1
Function for getting source file name from route path
$preifx = ""; if(!empty(request()->route()->getAction())){ $preifxArray = request()->route()->getAction(); $preifx = preg_replace('/(.*)\.([^\/]*)/i', '$1', $preifxArray['as']); } return $preifx; }
0
52f81720804927ee93ebdec896ede229
394a9e610bb50d763fc51c095e3410c4
Проверяет по хешу, не присутствует ли контакт в "Помойке". Возвращает результат проверки.
{ for (var i = 0; i < Contacts.Count; i++) if (Contacts[i].name == name) return true; return false; }
0
5e87da87f4ef34762c6115b534c6457b
084ee374b70dadf384531b881eecf895
三个下拉选择框数据获取函数
public class SelectionAct extends BaseActivity private void getData() { Map<String, Object> params = new HashMap<>(); if (!MApplication.labelParentLocation.equals("")) { params.put("parentLocation", MApplication.labelParentLocation); } HttpClient.post(HttpClient.JUNIOR_CULLIN...
1
bc063be2e39dd11d035564198193c475
025dad7b55e868d771973546f1f2ba85
Converts an ARGB value to greyscale
{ int r = R; int g = G; int b = B; r = r * 0b11111 / 256; g = g * 0b11111 / 256; b = b * 0b11111 / 256; return ( ushort ) ( r << 10 | g << 5 | b ); }
0
581ab1b9f4897c2ed67ffab05524972e
3ba3a37c6b6fe70262a45210113c5b7c
指定されたコードポイントが通用日本文字集合か判定します。
return codePoint == 0x05BE || codePoint == 0x05C0 || codePoint == 0x05C3 || (codePoint >= 0x05D0 && codePoint <= 0x05EA) || (codePoint >= 0x05F0 && codePoint <= 0x05F4) || codePoint == 0x061B || codePoint == 0x061F || (codePoint >= 0x0621 && codePoint <= 0x063...
1
25e08abe00e5c7c7740877771696f2db
3d533319c353072b51f3a7a74f9f6f35
Calls the post invoke logic after calling the next handler in the pipeline.
namespace Amazon.CognitoSync.Internal public class AmazonCognitoSyncPostMarshallHandler : PipelineHandler public override IAsyncResult InvokeAsync(IAsyncExecutionContext executionContext) { PreInvoke(ExecutionContext.CreateFromAsyncContext(executionContext)); return base.InvokeAsync(...
0
0880a166552ba51fcdd5f50cc9a42617
4feec88f7de7283cbf1a490da4f61eed
Initialize the node. Links are unknown so set to None
class Node: # Represents a state in the Markov chain def __init__(self, data, links=None): self.node_links = links or [] self.node_data = data
1
a291189208765b4682a0fde1f7270316
c95a6f1124252b0446790884b488cefb
获取标签共享设置列表信息
public object GetLableList([FromBody] JObject json) { try { string res = json.Value<string>("json"); dynamic dy = JsonConvert.DeserializeObject<ExpandoObject>(res); string LableTypeId = dy.data.LableTypeId; string Bi...
1
e81e2b977b8ff1c98fdecaba24b37f26
2678af889216939c00c7b11490400494
初始化各类型协议显示用数组
export class JuBaoMediator extends game.modules.UiMediator public initialize():void{ this.reasonArr = new Array<any>(); this.reasonArr = [models.FriendModel.chineseStr.nicheng_buya,models.FriendModel.chineseStr.yanxing_buya,models.FriendModel.chineseStr.waigua_jubao,models.FriendModel.chineseStr...
1
8cc97bf47717768f056c4fcc7be4a93e
58c2de094349f0acfbab72e38cca0c1a
@brief This function tries to count the number of UTF-8 encoded characters.
namespace irbis std::size_t countUtf (const wchar_t *src, std::size_t length) noexcept { std::size_t result = 0; while (length > 0) { const unsigned int c = *src++; if (c < (1u << 7u)) { result++; } else if (c < (1u ...
0
bfcb78414040ce0631d74c4c118e846b
4c06d7e4d0e473c8b4d698fc5eca451a
Executes the specified row deletion on just one node and verifies the tested query, to ensure that the tested query propagates the row deletion.
@RunWith(Parameterized.class) public abstract class ReadRepairQueryTester extends TestBaseImpl protected static class Tester extends ReadRepairTester<Tester> Tester deleteRows(String rowDeletion, long repairedRows, Object[][] node1Rows, Object[][] node2Rows) { mutate(1, rowDeletion); ...
1
f1bcd1f152252ee8b999a805b5f7e5d7
e5eecd1d92f3bb5154e38c6fcfd79738
Unassociates all NomenclaturasAsId
class FolioGen extends QBaseClass public function CountNomenclaturasAsId() { if ((is_null($this->intId))) return 0; return Nomenclatura::CountByIdFolio($this->intId); }
0
7f938d6d22525f6182c87b57359054a3
497e6c28b76b87883b72d96c3ce65226
初始化场景要素下拉框
$("#elementnamedatagrid") .datagrid( { title : '场景要素显示区', url : '../interactiveScene.action', width : 1000, height : 395, toolbar : "#elementnamedatagrid_tb", pagination : true, rownumbers : true, queryParams : { type : 'selectelementname', name : r...
0
591d33f37b7107e68e282cb4ae155c53
f0ecdc44895663575b9ce98e3d323200
判断json对象中,是否包含某些字段,必须要含有所有字段条件才会成立
class WoniuBossTest: def checkjson(cls,*args): if args[0] in args[1]: print(f"测试成功,'{args[0]}'字段,在响应正文中") restr = "测试成功" return restr else: print(f"测试失败,'{args[0]}'字段,不在响应正文中") restr = "测试失败" return restr
0
c58d67970427440a6e9ac53e293238d3
3ffe4eaedc822d06d884199ab5dba8aa
消费者,用于从url队列中取出url进行爬取
try: while True: url, data = queue.get(timeout=5) print(os.getpid(), '开始解析', (url, data)) time.sleep(0.4) except: print(os.getpid(), '任务完成')
1
8d89303de3b19ea255cac8b2fec835b9
1387bb08a33aa3d3e9c9ac8ae752bc0d
On completion of puttingDown state, take the river, turn off PuttingDown value in senders player class
public class RaftInteractable : InteractableObject public void BoardRaft() { Game.Instance.PlayerInstance.Controller.BoardRaft(raftMovement); raftMovement.PlayerAnimator = Game.Instance.PlayerInstance.Controller.PlayerAnimator; raftBoarded = true; Game.Instance.EventManager.RaftBoarded(); ...
0
43678a432c68dc2f5a751b42b16fbbd3
41859b9ae8cd989554259f1c298b0683
Recursively traverses the directory, updating the dictionary of mtimes and the list of files changed since the last check.
class FileSystem: def _update_sizes(self, path, size): path_list = path_parse(path) self._recurse_sizes(path_list, self._root, size)
0
e6628ce599808189d54769d0cccca0ec
a4a0dba8b05feadb682468b8eeecf9a8
Compare two definitions removing the unique Ids from the entities
const objA = createVaultFacade(this._vaultA); const objB = createVaultFacade(this._vaultB); delete objA.id; delete objB.id; delete objA._tag; delete objB._tag; return different(objA, objB); }
1
56426f5c05c819263a72f07721d675f4
36bf72ab2e59324683c7b9f602a13a7b
根据wffile的id输出文件内容
class template function print_file($file_id) { print $this->files[$file_id]; }
1
c556aba128178054bb774b8792edeac6
8d82dd7814137db3ca81a5bf33447a5e
Fetch data for Rejection Memo for Invoice and display it in grid
namespace Iata.IS.Business.Pax IList<RejectionMemo> GetRejectionMemoList(string invoiceId);
1
cd0050793ffb4c2962f0abf416da1941
a4fcce4f9250911bfa01e671c251a157
建立PORT模式下的数据连接
int Net_Connect_Port2( char *HostAddr , int PortNo ) { int trg; if ( EASY_CLUSTER_GET_HOST_SERVER_CONTROL_MODE() == 2 ) { trg = MAX_MULTI_NET_SERVER_COUNT; } else { trg = 1; } if ( !Net_Init_Memory2( trg ) ) return FALSE; if ( !_Net_Sock_Start2( HostAddr , PortNo , EASY_CLUSTER_GET_HOST_SERVER_CONTROL_MODE()...
1
61955a0bf970891dea340346f306b84e
79d67cd412fc34b3680e6aa63ecc0173
Tests if there is an element before the iterator position
public class IteratorClass public boolean hasPrev() { return (currentIndex > 0); }
1
bdc3bce45513ce75fbe2a77d344f7a4a
4e07522ffed80e6870f714d8f72e4429
Extracts the corresponding medical terms from the TextFile using the spans of PipedFile.
BufferedReader inFile = new BufferedReader(new FileReader(inputFileName)); String inputText = ""; String sLine = ""; while((sLine = inFile.readLine()) != null) { if(sLine.trim().equals("") || sLine.trim().equals("\n")) ; else inputText += sLine + "\n"; } int i = 0; boolean textSpanMode = fal...
0
6179b225253993f1769841122b5abd87
479c6807f0b8b505c5362e29621808d6
Returns shipment type. Used to identify object.
class RateServiceOptions extends AbstractStructBase public function getShipmentType() { return isset($this->shipmentType) ? $this->shipmentType : null; }
1
a35e1987153bd0b824ded06340767084
c5f10ed564c2e07cdaac8c80f2fe57d6
Finds export path and populates QLineEdit
class ExporterUI(QtWidgets.QDialog): def set_output_path(self): self.output_path.setText(QtWidgets.QFileDialog.getExistingDirectory())
1
4bda8bb19dd9d8555238ef1496a05234
c2f27dfe70cd73d2b7c7264bcf4710d2
#返回车次
{ $trains = getCourseTrainId($courseid,$chapter,$lesson); try { $result =array(); foreach ($trains as $key => $train) { $sql = "SELECT TRAIN_NAME as trainname,TRAIN_TYPE as traintype,TRAIN_DESC as description FROM t_train_info WHERE TRAIN_ID = '$train' Limit 1"; $sqlresult = mysql...
0
bc0b6136a20c80b9dde9c9ea1beeb39c
f6feff13a7d625a6ee9f0f9690415043
get users with job title Operation & reservation Management
if ((libSuper.isSupervisorFeatureEnabled(context)) && (libMobile.isOperationStatusChangeable(context))) { return libSuper.isUserSupervisor(context).then(isSupervisor => { if (isSupervisor) { return libSuper.supervisorSectionTitleforNoOperations(context); } return ''; }); ...
0
4e40ee6a6b1ff215467d64eece0d958f
8dbe7d552e510f75e1244b260fc42478
Check option arguments are letters only
with pytest.raises(SystemExit) as exinfo: main(['-t', ' ', '{a..c}']) capture = capsys.readouterr() assert capture.out == "a b c " assert capture.err == "" assert exinfo.value.code == 0
0
731f14ad2f72f35d02a9308eb0841c02
14bba14f726a66489f573300ff52a15e
Returns the bk_jaw_hakiki of this staff_active.
@AutoEscape public String getBk_jaw_hakiki();
1
be4587a36095fb45f4f03bafad9d2256
507bc0c66bc615bcc6c855d451d5a182
캐릭터가 지면에 붙어 있는지 검사
[RequireComponent (typeof (Rigidbody2D))] [RequireComponent (typeof (Collider2D))] [ExecuteInEditMode()] public abstract class DynamicCharacter2D : Character2D protected bool isOnGround(){ Collider2D[] hits = Physics2D.OverlapCircleAll (transform.position, _width * 0.3f, _groundLayer); foreach(Collider2D ground in ...
1
fe666679cb83bc22364094cb70cb55a8
501f1ae64e476aa576bd523c7322c675
returns a pointer to a newly created stack
{ stack_t* s = (stack_t*) malloc(sizeof(stack_t)); s->top = NULL; return s; }
1
804cc11c871f685141ac4d186284ee91
58867a2167ee8c23e1373a9c44b2180b
Получение нормальной формы слова
def get_normal(word): morph = pymorphy2.MorphAnalyzer() forms = morph.parse(word) normal = [] p_speech = [] for item in forms: p = item.normal_form if p not in normal: normal.append(p) p_speech.append(item.tag.POS) return zip(normal,p_speech)
1
d83cd84f2320dde076dea90a540234be
aefb399dfeb26a76733cd82513d14d61
Setter for <code>friend.nickname</code>.
public class MyFriendsVO public void setFriendNickname(String friendNickname) { this.friendNickname = friendNickname; }
1
9a78783e75b8ec9cc903c056dcce8d05
b2f38dada614b6d91e12b94b5fb246af
UIn päivitys metodi, päivittää juoksevan kalorilaskurin näyttämään uutta kaloriarvoa
if (bmi_ == 0.0) { return; } if (sukupuoli_) { if (bmi_ <= 19.1) { ui->arvo_tulkinta->setText("alipainoa"); } else if (bmi_ > 19.1 and bmi_ <= 25.8) { ui->arvo_tulkinta->setText("normaali"); } else if (bmi_ > 25.8 and bmi_ <= 27.3) { ...
0
7103ed7613b604b2e5de4b4f16c18f54
9e8f390307347f6b154e67cc8a23ac5f
向顺丰下订单
Class ShopController extends ActionController{ public function fahuo(){ $data['order_sn'] = $_POST['order_sn']; $kd_number = $_POST['kd_number']; if($kd_number == -1){ $kd_number = $_POST['sdwuliu']; if($kd_number){ $data['kd_number'] = $kd_number; } }el...
0
e3d6795b7306d5e227035b8ede4729c4
b7dfda47f5a6d1d35a55d7db0724935e
Eliminazione della lista dei desideri
void destroy(Elenco& e) { Node* n; while (e!=NULL){ n=e; e=e->next; delete n; } }
1
95bbafc6b5c12c5b37f6734fa94bc9c0
ab855c1bf11641de0e3be2ae63ae7196
Показать скрытые блоки
function showAllHidedElements(elements) { elements.forEach((element) => showElement(element)); }
1
23d1202e4c33c907bf837de91b175c12
6ee46868e4d5af65be46bfa7428dce28
输入误分率,计算在这一轮迭代中的alpha值,即当前习得的分类器的权重值
def classifier_weight(dblError): dblAlpha = math.log((float(1) - float(dblError))/float(dblError))*0.5 return dblAlpha
1
4e1990ac7a0d2792981fbffe8e1598fb
61266f7406bedf2d00be8567db73f2a4
First picks a random type of question to serve. Then, depending on the type of question chosen, load the data source that is needed to generate that question.
public class QuestionFragment extends Fragment implements View.OnClickListener @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View mView = null; questionType = questionType.toLowerCase(); switch (questionType) { case "multi": ...
0
083c5e15b956c233218cf5be208e7fc4
3190f6a5583867d5751cb1837726d950
finds closest frame that occurs before given index
public class AnimationHierarchyEditor : EditorWindow int findPrimaryKeyFrame(int from, int to) { int recentKey = from; int updater = 1; if(from > to) { updater = -1; } for (int i = from; i != to && (i >= 0 && i < animData.totalFrameDuration); i += updater) ...
0
4102a6a5f490d1d3a22d38c9dddd537d
d302eb0bbef1fe9c47dac06e4e3764c9
get tag name of panel (default: fieldset, div ...)
class Column extends Grid public function getTag() { if ($this->isSidebar()) { return $this->config()->tag_sidebar; } return parent::getTag(); }
1
da78348fa74bba2b783beb2be0d62402
262360ab4d9f5a78cad384eb32c83fe5
parse artist & song & lyrics from html tree
def parse_html(html): pattern = re.compile(r'<td class="song_name"><a href="(?P<song_url>(.*?))" ' 'title="(?P<title>(.*?))">.*?</a>.*?</td>.*?' '<td class="song_hot">(?P<hot>(.*?))</td>', re.S) contents = pattern.finditer(html) return contents
0
dac56cd5bd2e5436615219ada409107d
8845b74f1466310ad4fbf1bfca53f995
Calculate chi-squared p-value between two categorical variables
def chi2(X,y): X=np.asarray(X) if len(X.shape)==1: X=X.reshape((len(X),1)) X=pd.DataFrame(X) chi2_value=[] chi2_pvalue=[] for c in X.columns: fo=pd.crosstab(X[c],y) s=stats.chi2_contingency(fo) chi2_value.append(s[0]) chi2_pvalue.append(s[1]) return (n...
1
ff3d91f646c6d6bfb053a090e55e2a86
fd6ca633f0f44030482bb711b566d226
根据collection name 获取客户端连接
func GetConn(cname string) *Clients { p.RLock() defer p.RUnlock() cons := p.conns c := cons[cname] return c }
1
8371c6828a5aff1cc3cc42d4232ba90c
745bf6a3de164c385462d68a6d6cc6e9
Returns all blank cells from the given set of cells.
def get_blanks(nrows, ncols, plot_set): assert type(plot_set) == set nplots = nrows * ncols plot_numbers = list(range(1, nplots + 1)) return list(set(plot_numbers) - plot_set)
1
9d498cdeb027af5e8d67a226efa6697b
f45d3d35e20ae097265ec3f40a683063
Set the enemy to the running animation.
void PlayerSprite::setPlayerStateRun() { mState = StateRun; }
0
b90228803802eb11ecefa1c82380d62d
f8a468c2ad885d49f91cbc1b2f7acfb8
Сигнал расчета и сохранения калорийности блюда. Срабатывает при изменении отношений моделей блюд и ингредиентов. Вызывает сохранение модели блюда и модели заведения, в котором есть это блюдо.
def ingredient_changed(sender, **kwargs): ingredient = kwargs.pop('instance', None) for i, item in enumerate(ingredient.items.all()): recalculated_ingredient_score_of_skin_type(item)
0
e964944230bd3bebb987623e5ffebc45
a4ba20bbe79c1a0fdc74aac9ac708785
获取天地图服务源的图层对象
var layer = new GeoVis.TileLayer( "http://geovisweb.oss-cn-shanghai.aliyuncs.com/tiles/googleimg/{z}/{x}/{y}", { projection: "EPSG:900913" } ).addTo(earth.layers); return layer; }
0
556d54c8d54135f0cd7fd48ab1e99c8d
3f6e21d5653fc7b4d5c3c3b4e495e21b
邀请好友关注圈子
class Controller_Mobile_Circle extends Mobile public function action_subscribe() { $this->_needLogin(); $circleId = (int) $this->request->param('id'); if ($circleId <= 0) { $this->err(null, 'invalid id'); } $modelLogicCircle = new Model_Logic_Circle(); try { $modelLogicC...
0
a499a92a63b6c8af4bcb2b52598045df
9a28e67b5702cc4c454960813d9a031a
JobTriggerInspectJobInspectConfigCustomInfoTypesDictionaryWordListToProto converts a JobTriggerInspectJobInspectConfigCustomInfoTypesDictionaryWordList object to its proto representation.
func DlpAlphaJobTriggerInspectJobStorageConfigDatastoreOptionsToProto(o *alpha.JobTriggerInspectJobStorageConfigDatastoreOptions) *alphapb.DlpAlphaJobTriggerInspectJobStorageConfigDatastoreOptions { if o == nil { return nil } p := &alphapb.DlpAlphaJobTriggerInspectJobStorageConfigDatastoreOptions{} p.SetPartition...
0
cb7a884cf7247c715d5e820df5b5f1a0
6013043860509f39b09f6adfaee61cb6
@brief Set AES initial vectors
void AES_SetInitVect(CRPT_T *crpt, uint32_t u32Channel, uint32_t au32IV[]) { uint32_t u32Idx, u32KeyRegAddr; u32KeyRegAddr = (uint32_t)&crpt->AES_IV[0] + (u32Channel * 0x3CUL); for (u32Idx = 0U; u32Idx < 4U; u32Idx++) { outpw(u32KeyRegAddr, au32IV[u32Idx]); u32KeyRegAddr += 4UL; } }
1
5fce9fadbe75ee4bf4389798e507ee3f
793dd16f2c43fcf40b77bfe6e336b162
Affiche le nombre de propositions trouvées au total lors de la recherche d'un terme
class Fenetre(QWidget): def show_nb_found(self, text): n = self.codes[self.get_idx()].toPlainText().count(text) self.info_message(str(n) + " occurrence%s %s '%s'" % ("s" * (n != 1), get_text("infobar_de"), text))
1
3da4fa217b2afad496318ac391b23f9d
39952292003d8ec50238fae981e3b29a
Kicks the ball with a certain power in a certain direction
[RequireComponent(typeof(Rigidbody2D))] public class BallController : MonoBehaviour public void Push() { m_rb2d.AddForce(m_powerDirection.normalized * m_powerScale, ForceMode2D.Impulse); }
1
3cf272ed9073067de8c6f044a72576af
5d631d12d180bf030f2eab03afad717f
Launches the parse header task, corresponding to the type of the input file.
{ switch (InterfaceBetweenGaussianAndChemGo.task) { case Task.mecp: ObtainMecpLabel(); break; default: throw new ReadInputFileException("Can't find legitimate \"task\""); } }
0
54b7d78e003a519a479c1a74766a29ea
71ebe69aa9ce6571fb9a683d734d1264
Question is added to the front of the linked list
{ FoodNode* temp = new FoodNode; temp->food = f; if (head) { head->previous = temp; } temp->next = head; head = temp; head->previous = NULL; }
1
8efacb7df9099c0c14059f861d24ff79
810c006d7c3d2951721e40cf4cb53002
Inits the component's own model, i.e. data which does not depend on a Task Creation Wizard state.
public class CalendarFeedsComponent extends MVCComponent implements Runnable protected void initModel() { }
1
60cb944633c4a28007bd529cdccee82e
6818030d17afb55f643ec351dbd7f78a
TextViewにEditTextに入力された値を設定する
public class MyEditText extends LinearLayout public void setEditText(String editId) { edit_input.setText(editId); }
0
3e263138ec10f8c3894b6f37ee1b0b8e
d303a75ed24bb0bb808c4fc9571422a5
Проверяет, можно ли покидать представление в данный момент
{ switch (kind) { case CourseView.CourseViewKind.AllControls: return true; case CourseView.CourseViewKind.Normal: case CourseView.CourseViewKind.AllVariations: if (control.kind == ControlPointKind.CrossingPoint &...
1
95a883234b2b47b347ebcb34ef84e1bd
e2e8aa5a7847c0661ee931c7a1c509e4
Remove duplicate union types from component_info_modules to avoid generating multiple container generation.
class IdeaGen(IdeGen): def _get_components_to_merge(self, mergable_components, path): generated_component_names = set( [name for (name, _) in self._parse_xml_component_elements(path)]) return [x[1] for x in mergable_components if x[0] not in generated_component_names]
0
4bba8ecd7476921564310eb3b573c36e
228657faecede9e2112cb6086f315718
Data provider for testing different types of displays. Array of display names to test.
return array( 'name' => 'Basic display test', 'description' => 'Default display for views pdf.', 'group' => 'Views', ); }
0
a5e17b0229eacdcb06965744f0b775d4
01c27ee6c99f71efc94fadd6dde1e563
Returns the has image of this vcms category.
{ using (var _result = await operations.GetCategoryImageWithHttpMessagesAsync(id, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } }
1
c9a89dc4424ecb5d9854a5cf22a9ca04
a972bfa04d02f598d7d0d1b7ed756f9c
When the open gif button is pressed it gets each frame of the gif and saves them Into all lists and images and added the images to the flow panel
try { if(flame * 100 + index < image_file) { String str = "Resorce\\Opening\\Opening_00" + Integer.toString(flame * 100 + index) + ".jpg"; images[index] = ImageIO.read(new File(str)); System.out.println(str); } } catch(Exception e) { System.out.println(e); } if(index < 99) index...
0
63beee29a97697e900ba18413988741f
c92020c014f67b355eb3f14f0e905315
Displays the calculation in both the whiteboard and the calculator
var fo = getWhiteboardObject(); if(fo.disableCalculator) { fo.disableCalculator(); } else { alert('could not find disableCalculator()'); } }
0
e0ba5a99906db7679b99fa37bf47bc6b
6311b6f4f83450b9e49b704cdeca6e29
Get email identity for sender
{ $result = []; if (!is_array($sender)) { $result['name'] = $this->_scopeConfig->getValue( 'trans_email/ident_' . $sender . '/name', \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $scopeId ); $result['email'] = $t...
1
a309bad2fece79b2ff8363afe3361e99
1f3e1df9bd25f5606801dffa10d04977
构造http get请求request
public class HttpClientUtil public static HttpGet buildHttpGet(String url, Map<String, String> params) throws URISyntaxException { HttpGet get = new HttpGet(buildGetUrl(url, params)); return get; }
1
b9a8d587ce1f3f00e6094a67c982e615
7245c942d95dc5c229187ed07fb17810
根据流水号查询订单编号,
public List<String> findworkordernosBySysserialnos(Map<String, String> map);
1
b7816ff3f50abd33c31e99a58fc24556
d735a151bc3b625feeec334bc14dd978
! @brief Compare a received TIMAC Get Request Status message for a match.
static bool matchSetReq(ICall_ServiceEnum src, ICall_EntityID dest, const void *msg) { macSetParam_t *pMsg = (macSetParam_t *)msg; return ((pMsg->hdr.event == MAC_SET_REQ) ? true : false); }
0
34bb93149d24a6a66ef188e82417b4f2
e19e35f2e2425ca512fb5f477c93e68b
根据用户id查询会员天数
int selectAllDays(Integer userId);
1
3c6210867cb87ce89ca62de39fc83702
ec547e922216c2c225a7d3a0fc7735ec
This method returns the image of the game object applicable to it's current movement.
class GameAnimation extends GameImage getCurrentImage() {}
1
6e146bcb01c34906ffdce2befc049b6d
c32dd115fe26dddb3d6951faa1890483
小数转字节数组
long l = Double.doubleToLongBits(d); byte[] bytes = longToByteArray(l); return bytes; }
1
a763360980397ea73b2febd7bf508d13
ae253271e1e1cf47676a8de7c8cd5632
trxファイルをCSVファイルに変換します。
public function loadEx2($files,$option=array()){ $rets['res']=true; $rets['err_msg']=null; $rets['data']=array(); $err_msg=$this->validation_before($files); if(!empty($err_msg)){ $rets['res']=false; $rets['err_msg']=$err_msg; return $rets; } $csvFn=$files["tmp_name"]; try { $csvFn=mb_convert...
0
e2704ea91d520f3e9574a5999d2bc502
d4b437833edf1a4568c1766d74bc2b7e
<p>合作伙伴(代理公司)数据下载</p>
public void downloadFinaceDetailExcelExcel(Model model, HttpServletRequest request, HttpServletResponse response) throws PlatformException{ CustomerContextHolder.setContextType(CustomerContextHolder.SESSION_FACTORY_BUSINESS); Map<String, Object> paraMap = new HashMap<String, Object>(); if (Strin...
1
cd300d3372728f4bad2d2835709616cb
d4399813f836a2d54c2dcff652aa450e
Gets the "ErrorList" element
{ synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.XmlDouble target = null; target = (org.apache.xmlbeans.XmlDouble)get_store().find_element_user(ERROR$0, 0); return target; } }
0
f6c8451e0de078c80789a9577cec3d66
8d2011c51499f1d68555a406818b137d
查询周边单个 社交用户信息接口
@GetMapping("/social/info/{inStr}") WebResponse<UserInfo> social(@PathVariable("inStr") String inStr , @RequestHeader(SecurityConstants.FROM) String from);
1
61fa5f9a8362d609190f2f41a1fea43b
031af9c0826446d0e53ce5775b8b2f88
Hook called after the service is registered.
abstract class Service abstract public function register();
0