query_id
string
corpus_id
string
query
string
code
string
label
int64
dc315ae656a354846edb8f429bb5b38a
d15b872261898b6170147bf0157e0460
Permet la gestion des sites web préférés de chaque utilisateur
{ $user = Auth::user() ; $site = Site::with('categorie')->with('serveur')->where( 'user_id' , $user->id )->get() ; return $this->successJson( $site ); }
1
efa6cff539d9bbd796f70870ac51b997
d1754508ecc253ed9b39ba432ddbe477
Gets 商城id
@EditMode(editor = FieldEditor.Number, required = true) public Long getMarketId() { return marketId; }
1
fa3d58adfee0539695a4975ca6be2894
0158d4d30a993629d08b1a779f569242
Sets break on exception handling.
public class Main implements ContextListener public void setBreakOnExceptions(boolean value) { dim.setBreakOnExceptions(value); debugGui.getMenubar().getBreakOnExceptions().setSelected(value); }
1
4ca6ac964dfc02d760b0c586add01471
f7fbd0918b3422df4aca7237066299c0
Remove callback for engine's Update tick.
export default class Dadget extends ServiceEngine removeUpdateListener(id: string) { delete this.updateListeners[id]; if (Object.keys(this.updateListeners).length === 0) { if (this.updateListenerKey) { this.node.unsubscribe(this.updateListenerKey).catch(e => console.warn(e)); this.updateLi...
1
21b56dee205a0c8f7e87aba1999fd01e
ed78e33bd0252410588c009edcb13c05
ajaxのポーリングで呼び出す。非同期で取得した市場売立データを取り出し加工して出力する関数。
data = pd.read_excel('filename.xlsx', index_col='anounce-date') data.index = pd.to_datetime(data.index) data = data.sort_index() po_meigara = pd.read_csv('{}.csv'.format(po_m), index_col='日付', encoding='ANSI', thousands=',') po_meigara.index = pd.to_datetime(po_meigara.index) po_meigara = po_mei...
0
3ddb8944f2a12711d1407ca01af41760
425a0349bd01c1ba4fce0a090891a701
Convert a dot product value to degrees
{ return rad * 360 / (2 * Math.PI); }
0
ebfd8763e7fde4f3203f185455e753b3
5a599712997756006732eca0ebd48221
Returns a dictionary of inheritance information.
all_inheritance = set([ Inheritance.reference, Inheritance.mendelian, Inheritance.denovo, Inheritance.omission, Inheritance.possible_denovo, Inheritance.possible_omission, Inheritance.other, Inheritance.missing, Inheritance.unknown, ]) ...
0
e023500461ba96bb4c7367c2b2853285
6db72ee14e2686c5e20147f829d81b48
监听软键盘是否弹出的方法 并在这个方法中设置 底部 那一条的显示或隐藏
if (isShow) { llBottom.setVisibility(View.VISIBLE); } else { llBottom.setVisibility(View.GONE); } }
0
f857a0f1c39d8d2686bef99fdb3e6b4f
4c53bad13228b607e9ce8d13c5c86992
Funcion que contiene el primer nivel
public class MenuNiveles : MonoBehaviour public void nivelUno() { SceneManager.LoadScene("Nivel1"); }
1
3b48973eee77ed5ffad96156f64a6e1d
7357acb0f39cc736596300f3121daf7b
When requirements satisfied, cursor reverts to default arrow.
if (!down) return true; cursorPos.X = 0; if (!Input.InputHandler.IsShiftDown) { cursorEnd = cursorPos; } Invalidate(); refreshCursorBounds(); return true; }
0
00c671f188dda40c72a103388d1d80bb
41c3d71932332d68e5236e6e4f44f1bc
1D int ndarray of code for each row, for use as row headings.
public class ExpressionData public String[] getRowHeaders() { return rowHeaders; }
0
3fffc69d8488b83160f4f2d996240bb4
c2a9eadceec8998427373a34e0e89859
Controls shooting two bullets
class Tank_Shooter def shoot_1 if Time.now - @last_shoot_1 > 0.5 @window.e_bullets << Ennemy_Bullet.new(@window, @player, @x, @y, -2, 4) @window.e_bullets << Ennemy_Bullet.new(@window, @player, @x, @y, 0, 4) @window.e_bullets << Ennemy_Bullet.new(@window, @player, @x, @y, 2, 4) @last_shoo...
0
90785a431d6add1dcd14d2fcb9f55f7a
dbac1e93a783e1122275b508520134eb
@brief Prints a binary representation of a unsigned 32 bit integer
int i; int temp = n; for (i = 0; i < 32; i++) { printf("%u", (temp >> (31 - i)) & 1); if (i == 0 || i == 8) { printf(" "); } } printf("\n"); }
1
206f4e7c34a18086227ca46decbfdc37
3f460d7569269f3f543da80c0f18ca0a
响应方法具体实现
response(res, options, type) { options = options || {}; switch (type) { case 'qita': break; default: res.status(200).json(this.transformResponse(options.data, options.code, options.errorMsg)); } }
1
3c1b1987d1c8b8ccf9f783423d672f47
d43fec0634cf5ac6cd85c241f7d8b310
Filter the query on the online_status column Accepts an associative array('min' => $minValue, 'max' => $maxValue)
{ if ($value != '' && $value != null) { $query->where('status', $value); } }
0
76ecd34ea6564fbeb9aadc91879916f2
48a970d59d701277f394d146a0328d5c
This method converts the JSONString representation of the current Form Definition object.
public abstract class FormRenderingFragment extends Fragment public abstract String getJsonForm();
0
a99a27b8d041dae3c3800d76386ef996
27eeca28a33e699fb4d7781fcdcd3e8f
从一个数组中找出另一个数组的位置
def cross(line1,line2) for i in 0..line1.length-1 if j = line2.index(line1[i]) return [i,j] end end end
1
b2e53f3ad183241dafa78e5f71043dd6
f08e57ad04b3e00f891d8378397968e0
携帯端末のタッチパネルで矢印キーでメインカメラを動かす
{ if (Input.mousePosition.x < 50 || Input.GetKey(KeyCode.A)) { int upgrade = GameObject.Find("GameManager").GetComponent<FieldConstructor>().Floor[GameObject.Find("GameManager").GetComponent<FieldConstructor>().curActivateFloorIdx].GetComponent<FieldManager>().getFieldUpgrade(); ...
0
5ccb2e632e62893f446b2b72e24caec4
dbef73db1e9f39eb24a17f523488d121
Determines the power users based on number of posts.
{ return $users = Post::select(DB::raw('count(*) as contributions ,' . Constants::TBL_USERS . '.' . Constants::FLD_USERS_USERNAME)) ->join(Constants::TBL_USERS, Constants::TBL_USERS . '.' . Constants::FLD_USERS_ID, '=', Constants::TBL_POSTS . '.' . Constants::FLD_POSTS_OWNER_ID) ->gr...
1
0c59fcf0c751202310f2895d32b628b3
862c077403f471ce3256414c944e8928
Stub author: Daniel Purpose: Handles clicks to the turnover button.
public class MainActivity extends AppCompatActivity public void turn_action_deal (@SuppressWarnings ("UnusedParameters") View view) { if (mGameOver) { showSB_AlreadyGameOver (); } else { try { mCurrentGame.clickDeal (); } catch ...
1
148237f1e5fc0176be4ee327dde46acf
02017e7bd4584ac12b8a524ba171343f
国土数値情報の鉄道データの駅を描画します。
{ var font = new Font("MS UI Gothic", 16, FontStyle.Bold | FontStyle.Italic); var format = new StringFormat { Alignment = StringAlignment.Center }; using (var back = new Pen(TEXT_BACK, 2)) using (var fore = new SolidBrush(TEXT_FORE)) { foreach (var area in _reignMap.Areas) { using (var pat...
0
cfd87edfdebe27fee9ba81ff539b7049
6248bd7c2129e9852a8635f94fc5c0b1
Download the The CIFAR-10 data-set
dest_directory = self.data_dir file_name = self.DATA_URL.split('/')[-1] file_path = os.path.join(dest_directory, file_name) if not os.path.exists(dest_directory): os.makedirs(dest_directory) if not os.path.exists(file_path): file_path = self._download_cifa...
1
0e32ee373c7d7bef8aa92158a4d20f7d
e5484bf3ca59055783efe6c18645fd28
Allow the renewal flag of a commission to be filtered.
void CPrescriptionQueueDlg::SelChangedFilterRenewalResponse(LPDISPATCH lpOldSel, LPDISPATCH lpNewSel) { try { NXDATALIST2Lib::IRowSettingsPtr pOld(lpOldSel), pNew(lpNewSel); if (pOld != pNew && pNew) { RequeryRenewalRequests(); } else if (!pNew) { m_pRenewalFilterResponseList->PutCurSel(pOld); } }...
1
4746eb3b2483722c0b811b37064c1a92
e5bcd21d6ad5e6dbe2b1d5db5ae7ba91
generate bow representation for sequences
def bow_encoding(s): BoW_WN = CountVectorizer(analyzer=text_process, tokenizer=wn_tokenizer, min_df=4) BoW_WN_matrix = BoW_WN.fit_transform(s) with open('CountVectorizer.pk', 'wb') as fin: pickle.dump(BoW_WN, fin) return BoW_WN_matrix
1
1de9941437bfe983ad8bf0c3d72e0421
bc9510d6a8d44924ed3e1251f17e7022
tra ve vi tri co gia tri lon nhat trong mang
function timViTriLonNhat(arr){ var temp = arr[0]; var index = 0; for(var i = 1; i < arr.length; i++){ if(arr[i] > temp){ temp = arr[i]; index = i; } } return index; }
1
a57b567d82316c17c4fd154b80948ea1
dfea38cf562819a0de59310c8a3fad4d
Создать сырную пиццу.
namespace Factory_Method_Example class FactoryMethodExample static void Main(string[] args) { IPizza cheesePizza = PizzaFactory.MakePizza("cheese"); cheesePizza.Ingridients(); cheesePizza.Bake(); }
1
b8899ac37d78e254282d142d6bf612da
3c377fdd7d7f5f187372cb7db076a1a9
! \brief Standard printf for specified USART. This function has a variable list and uses the variable list feature of C (see documentation on stdarg). The function uses vsnprintf function for formating the string to output in the workBuffer before transmission. This function calls usart_print to send the contents of th...
int print (char * str, ...) { va_list vl; int i = 0, j=0; char buff[100]={0}, tmp[20]; char * str_arg; va_start( vl, str ); while (str && str[i]) { if(str[i] == '%') { i++; switch (str[i]) { case 'c': { buff[j] = (char)va_arg( v...
0
21068ad92ff425b820e7f8452258b899
19ff09097acb3963d0794b6a8100fc9e
Parse MPEG-4 audio configuration for ALS object type.
namespace nmos audio_L_parameters make_audio_L_parameters(const web::json::value& node, const web::json::value& source, const web::json::value& flow, const web::json::value& sender, bst::optional<double> packet_time) { audio_L_parameters params; params.channel_count = (uint32_t)nmos::fields::channel...
0
e6a4e583ca116dd539fe19b65118ca9d
021a579b2dc9e6ce47d5318dc32dfa2a
the next index for the ID of the area border
{ switch (currentDirectionID) { case 1: return 5; break; case 2: return 4; break; case 3: return 7; break; case 4: return 2; break; case 5: return 1; break; case 6: return 8; break; case 7: return 3; break; case 8: return 6; break; default: return 0; break; } }
1
2a1c76190e22734ff00629d538402c24
582fa28fc66658fef457231d3553d29e
Is this link connected to a previous one?
@AvailableSince(KorneaToolkit.VERSION_2_1_0_ALPHA) public open class DoubleChainIterator<C: DoubleChainLink<C>>(startingLink: C, underlyingCollection: List<C>?) : ListIterator<C> override fun hasPrevious(): Boolean = link?.previous != null
1
8cc43ee1988cf9ab40d4494382085649
bcc6709e3ce972c74aa8db10ca8cb52a
Handles listing all available runfolders
{ $folder = $this->input->getString('folder', ''); $processfolder = $this->input->getInt('processfolder', 0); $model = $this->getModel(); $model->setState('folder', $folder); $model->setState('processfolder', $processfolder); $model->makeListing(); parent::display(); }
0
5676f026e61cff8c99fdc40b27607732
18ac9842eb1675b5fd8144d0015e7b82
Initialises the interrupt GPIO on the MSP430 boards
SysCtlPeripheralEnable (SYSCTL_PERIPH_GPIOF); GPIOPadConfigSet (GPIO_PORTF_BASE, GPIO_PIN_5, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU); GPIOIntTypeSet (GPIO_PORTF_BASE, GPIO_PIN_5, GPIO_BOTH_EDGES); GPIOPinIntEnable (GPIO_PORTF_BASE, GPIO_PIN_5); GPIOPadConfigSet (GPIO_PORTF_BASE, GPIO_PIN_7,...
1
69693aa6b947f17823539d846f83d96a
6e45c9f9774d1ada03655e9107f6f6cd
Fetch a list of new ratings.
class Common(PlexObject): def items(self): return self._server.fetchItems(self.ratingKeys)
0
f72fba3cf186ea6e2c60b7e4e7e5cf94
655f54f09e4b0ca45610de31438ded3a
防抖——触发高频事件后 n 秒后函数只会执行一次,如果 n 秒内高频事件再 次被触发,则重新计算时间;
function debounce(fn, delay) { let timer = null; return function (...rest) { timer && clearTimeout(timer); timer = setTimeout(function () { fn.apply(this, rest); }, delay); }; }
1
f0e054984934b1f99aaa840f57da4e58
f34560951effd1290f0a9da89aa40980
Enables measuring of temperature.
class Arm(ReachyPart): def enable_temperature_monitoring(self): if not self._monitor_temp.is_set(): self._monitor_temp.set() self._monitor_temp_loop = Thread(target=self._temperature_monitoring) self._monitor_temp_loop.daemon = True self._monitor_temp_loop.start()
1
9ea0d8b13589c3914a88182971473daa
2bef5db841d398fc17247be24bf286cb
Allows all inheriting items to return its name.
class AbstractItemStorage(object): def __str__(self): return super(AbstractItemStorage, self).__str__()
0
a74a7e24592272b2414a0e1be0a0686d
c4608d05d7def59416180e784dc42f6b
Load the first page of the rulebook on the GUI.
public class BoardController public void openRule() { leftVBox.setDisable(true); boardGrid.setDisable(true); rulePane.setDisable(false); rulePane.setVisible(true); loadFirstPage(); }
1
3a69f5f07320ce12a0aeb9074caf0afe
f28fcc5f7eb0eff3c276b5622d31879a
返回一个大小为size的Vertex数组
Integer[] arr = new Integer[size]; for (int i = 0; i < size; i++) { arr[i] = i; } Random random = new Random(); for (int i = 0; i < swapTimes; i++) { int posx = random.nextInt(size); int posy = random.nextInt(size); swap(arr, posx, ...
0
411e39855248cdaf7ab079396014808c
b1350999d49df04dd4ee7d57d2238ed0
Get Pre-Calculate Formulas
$product['calc_price'] = SimpleCartFunctions::Price($product); $product['calc_off_price'] = SimpleCartFunctions::OffPrice($product); $product['calc_download_price'] = SimpleCartFunctions::DownloadPrice($product); $product['calc_download_off_price'] = SimpleCartFunctions::DownloadOffPrice...
1
b5e17cf055916cbec52f2223a4cec34b
761e6be99daae8fca573bf37d2bff882
验证码-返回验证码的base64地址
class Login extends Component getCodeNum(){ axios({ method:"get", url:"vericode" }).then((response)=>{ if(response.status != 200) return; this.setState({vericode:`data:image/jpeg;base64,${response.data}`,key:response.headers.key}) }) }
1
fa51f97ba6a20c0fab4da8eeadc6a585
cf290d03cdcbedd81d94b0c99be0ec12
create file with last page downladed to resume if needed
localStorage.setItem(filePath, JSON.stringify(conf)); index = 0; window.requestFileSystem(window.TEMPORARY, TEMP_SPACE, function(fs) { fs.root.getFile(downFileName, {create: false}, function(fileEntry) { file...
0
8383518184d9f7de14e0c79f7109b97f
8559073efc70c1fac4f74d447bbaad54
Tests converting a file that does not exist.
def test_no_file(sftp, capsys): assert get.get(sftp, "totes.not.fake.no.really") is False assert get.FILE_NOT_FOUND_ERROR_MESSAGE in capsys.readouterr().out
1
765cde5151a21f403ec963e6be9c5fb1
cea9a8d8391d3cd4025271fabe061ca9
Sets the publisher of this SystemInsightsPrograms.
void setProgramId(ProgramRunId programRunId);
0
b116e241e82b6f1ebcf01b6f6c529dcf
85798dc22515a316186e68e2a10a753f
将联系方式转成图片 :联系方式类型,null或空不获取信息 Key
namespace Web.ResourceManage.AjaxRequest public partial class AjaxSupplierRequest : BackPage protected string GetContactInfo(object linkManlist, string type, string sid, string sName) { IList<EyouSoft.Model.CompanyStructure.SupplierContact> list = (IList<EyouSoft.Model.CompanyStructure.SupplierC...
0
933f8824d346152337fa8b31328d90f3
0433bea0353f6df979d6cbf7b23a009c
Registrar Ingreso
const url = `${this.MED_URL}/ingresar`; const headers = this.establecerHeaders(); return this.http.post(url, medico, {headers}) .pipe(map((response: any) => { const mensaje = `Correo: ${response.data.correo}, la contraseña por defecto es la cédula`; ...
1
02f33e771e85f60fe31bf5fc3ee2a235
228eb2b63ccd2b9bdf6eda150c54af3b
Получить число ответов на определённое сообщение.
public function getAnswerCount();
1
1dedb83709c537c019973189cb5f946e
74ac1093fb1cb8b7ec03089b670a440f
判断订单是否开启
class OpenShopController extends CommonController public function is_open(){ $this->need_param=array('openid','sign'); $this->_need_param(); $this->_check_sign(); if($this->user['shop_type']==0) $this->apiReturn(652); $this->apiReturn(1); }
0
cd19ba1475cff2e2a7dde8058f7b439b
9ef66d1fcec1bd668b83df723a9d2353
Xử lý đăng ký, khi nhấn nút đăng ký
if (isset($_POST['submit'])) { $username = $_POST['username']; $password = $_POST['password']; $confirm_password = $_POST['confirm_password']; if (empty($username) || empty($password)) { $this->error = 'Username hoặc password ko đc để trống'; ...
1
60863e52cb8af7cfb5e6ce7599b2836f
50b72c09a3ee5dfce3a519b445fde526
Modifies replication schedule for a vm
{ using (var _result = await operations.UpdateWithHttpMessagesAsync(labName, virtualMachineName, name, schedule, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } }
1
6524c0cc113381367eb5e984ae08b1ce
774674a49cc70d223d0eb388988ee7db
找出简历中“|”字符的所有位置
{ int i = 0; while(argv[i] != NULL) { if(strcmp(argv[i], "|") == 0) { return i+1; } ++i; } return 0; }
0
31e202c3dbaf722de6d512220d285443
106e1dfcacb935c026055e59bd6b0fe2
Monthly interest rate can not be negative.
class TestAccount(unittest.TestCase): def test_invalid_interest_rate(self): with self.assertRaises(ValueError): Account.set_interest_rate(-50) Account.set_interest_rate(1+2j) Account.set_interest_rate("123") self.assertEqual(Account.get_interest_rate(), 0.05)
1
89846c6d1be79b042cbe1e2ecc9b6061
c7a6513671f2d4e78d275534c1695944
Pone un valor para la columna, que se debe corresponder con el tipo declarado para la misma, que luego será usado para ingresar filas de datos a la tabla correspondiente.
public Class<?> getColumnClass(int columnIndex) { if (columnIndex == INDEX_HORARIO) { return String.class; } else if (columnIndex == INDEX_FECHA) { return String.class; } else if (columnIndex == INDEX_INGRESO) { return Integer.class; } else if (col...
0
d4a4c044d9ffc349de6e8a5b2763678d
ecffcce2a46baed02abd3103095226e8
批量删除摄像头
{ try { string isGZBJ = new ERCHTMS.Busines.SystemManage.DataItemDetailBLL().GetItemValue("贵州毕节版本"); if (string.IsNullOrWhiteSpace(isGZBJ)) { return; } DataItemDetailBLL itemBll = new Data...
0
eaa8de9c47ae39e20b5eb361b9874e15
8f8f650b11550d229a4f65faef61b1ad
Обработчик входа в угоняемую машину
function ulx.enter( calling_ply, target_ply ) if not IsValid(target_ply) then return end local train = calling_ply:GetEyeTrace().Entity if not IsValid(train) then ULib.tsayError( calling_ply, lang("WagonIncorrect") ) return end if not train.DriverSeat then ULib.tsayError( calling_ply, lang("WagonIncorrect") ) retur...
1
f3ea5b7a2903fa2467b5b3325d023caf
288b7ccc30a188fd7845e619f729f787
Randomly generate params for a single car.
max_new: int = random.randint(0, 30) obs: List[ObstacleParams] = [ _generate_obstacle_params() for _ in range(max_new)] return { 'max_new': max_new, 'obstacles': obs}
0
b85a9f4f04987f881985c2a020698a3b
4bf5df871d8d58b018859756d89f365a
将菜单格式数据,生成HTML中展示的菜单数据
class MenuModel extends ActiveRecord public function formatMenu($menuData){ $rs = array(); foreach($menuData as $v){ $rs[$v['id']] = $v['name']; } return $rs; }
0
489767fbd0616925a4dac044beab12df
ea2583294f2c75e4a7bba76efd42fe6c
发送出牌消息给服务器
{ msgOutCard msgOC; InitMsg(msgOC); msgOC.nCount= ConvertDataVector(m_dvOutCards,msgOC.cards,m_dvOutCards.size()); msgOC.nType = nType; msgOC.nSeat = GetMySeatNo(); SendGamePacket(msgOC); }
1
8a65d9ecdc864f1da511946d42c8f488
c903e780134e5f0053e48f2874c504a3
checks whether str is a reserved word in Java
string keywords[]={"asm","else","new","this","auto","enum","operator","throw","bool","explicit","private","true", "break","export","protected","try","case","extern","public","typedef","catch","false","register","typeid", "char","float","reinterpret_cast","typename","class","for","return","union","const","friend","sh...
0
d529c2f0c6e268fc096e4a9007dd5fca
7ab339fce94c5779edc2988ec706ff1b
JIS => wchar
VOID SjToJ (LPSTR lpSjis, LPSTR lpJis) { BYTE bh, bl; bh = lpSjis[0]; bl = lpSjis[1]; bh -= (BYTE)(bh >= (BYTE)0xa0 ? 0xb0 : 0x70); if (bl >= 0x80) bl--; bh <<= 1; if (bl < 0x9e) bh--; else bl -= 0x5e; bl -= 0x1f; lpJis[0] = bh; lpJis[1] = bl; }
0
59432e4fe814797df72ecac7d44da441
376d612700f5918e951e8940a48fc69e
Método que devuelve el vertice2 de la elipse
public class Entrada{ public CirculoEntrada getEndE(){ return endE; }
0
b617c57011db2d48c20f9cfdc1993c66
ae6e9c937f16127c1d98047572ba08c3
当第一次用户可见时的回调
public abstract class BaseFragment extends Fragment{ protected abstract void onFirstUserVisible();
1
175831f3dc7a3abd2b884c1afece1a33
80b90c73ae0a55086fa09d38c1d29f34
Implementing compare failed status red button jobs count after upload functionality
$tasks = $job->tasks; if (count($tasks) == count($tasks->where('taskStatus_id',2))) { $job->jobStatus_id = 3; } elseif (count($tasks) == count($tasks->where('taskStatus_id',3))) { $job->jobStatus_id = 4; } elseif (count($tasks) == count($tasks->where('taskSta...
0
0d5ff7bbe28f54e20abae1001158b77f
77443b323c54b7fa631002eae697b1b6
Define the root route. This is where Slack's Events API sends all of the events that dungeonbot is subscribed to as POST requests. Additionally, when accessed by a GET request, this route simply redirects to the readme file in master branch of the repository.
async def root(): return {"message": "Hello JulioPDX"}
0
38c3e6351520e853a6c4e96a6e0925c2
4e8216c1b9e4f5dd8965276831b64021
Количество ходов пешки
class State: def h(self): attacks = 0 for i in range(8): for j in range(i+1, 8): if self.board[i] == self.board[j]: attacks += 1 for i in range(8): acc = 0 for j in range(i+1, 8): acc += 1 sup...
0
1c29a54f8bd92585b78af3c99ae5a121
ff50a8789999ad0bbc78ed36f1495e78
fetch keywords from local files
with codecs.open(self.fpath, 'r', encoding='utf-8') as f: self.keywords = list(set(key.strip() for key in f.readlines())) if self.key_num != -1: self.keywords = self.keywords[:self.key_num]
1
e2c50ef1f95b18ee6a86ef0d11d7b62a
5d31981e2d055b8ac7d24248c67376ca
得到历史联系人数量.
public int numContacts();
1
23f07c2a12542296ad8c78c1cc600191
09f54812289bda4bb564cbfa9d65e2d3
Reverse relative to absolute path converter - unimplemented.
namespace Kola.Converters class ZoomRelativeToAbsoluteConverter : IMultiValueConverter public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) { throw new NotImplementedException(); }
1
e9faad6d97999d935907feffbe6ca4d9
e3d14037d3184a4ddfff51b79fa8c218
Retrieve the base table list
public function getBaseTable();
0
a1fa451ca514b64f3508012d917d8f37
5641c1eb0d0d6e8c24a3d5d76aebdce8
Define headers that needs to be included from the current request.
interface IParamsBuilder<in Param : IRequestParams> fun getHeaders(): MutableMap<String, String>
1
70645b052189408ab020f83005ba8ade
722873d7c8b3f93d179043f6056156da
Apply committed entries to the client "state machine"
class ReplicationStreamCbk implements SubscriptionCallback @Override public void processCommit(VLSN vlsn, long txnId) { processEntry(new DataEntry(DataEntry.Type.TXN_COMMIT, vlsn, txnId, null, ...
0
d8e0b056d3b406e21bc2f0da39820b9b
ba31b841282701ca7964edfb12281446
Descripción: Brinda al jugador la posibilidad de seleccionar la letra que desea usar. Retorna: 1 - Una lista que contiene dos elementos. El primero la letra del jugador y el segundo la letra de la computadora.
def inputPlayerLetter(): letter = '' while letter != "X" and letter != "O": print("Do you want to be X or O?") letter = input().upper() if letter == "X": print("Player 1 has selected X!") return ["X", "O"] elif letter == "O": print("Player 1 h...
1
efbcf7ba41722546df36a70aed580ee4
9ca8cf2a295a359b825bb9acaa6feb06
分别提取两张图片的sift特征点和描述子
pic_a = cv2.cvtColor(pic_a, cv2.COLOR_BGR2GRAY) pic_b = cv2.cvtColor(pic_b, cv2.COLOR_BGR2GRAY) sift = cv2.xfeatures2d.SIFT_create() print(pic_a) kp_a, desc_a = sift.detectAndCompute(pic_a, None) kp_b, desc_b = sift.detectAndCompute(pic_b, None) dm = cv2.BFMatcher(cv2.NORM_L2) matches = ...
1
972e6be0fa4d3d7a5427321680ad1109
8a0e7ddad584b00ef0344e1376a701c7
Run clang-format on the provided file.
func Fmt(ctx context.Context) error { fmt.Println("running go fmt…") return gofmt("./...") }
0
bb13a70a83fa74f318c5862d045458cf
870d370888c2b1dc282a53175472d312
本周第一天开始时间
Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.DAY_OF_WEEK, 1); calendar.set(Calendar.HOUR_OF_DAY, 0); calendar.set(Calendar.MINUTE, 0); calendar.set(Calendar.SECOND,0); calendar.set(Calendar.MILLISECOND, 0); Date sdate = calendar.getTime(); ...
1
68237ce61187c6f23c2cf200f3f207f1
f39162df6cac7977c909233c1ca0ccde
A method for indexing and extracting an item from either a list for sequences or dictonary for contig/gene name
def extract_item(key, index, func=None): return lambda f: (func(f[key][0][index]) if func else f[key][0][index]) if key in f else None
1
d2aae7e5cb8ceab4b6e8f0305608b708
30fce72febc7b8e93ecd0a9d34c34cb3
冰冻对方精灵
if (this.checkOverlap(nowmonster.children[0], this.person.children[0]) && !this.lockmove) { this.game.playSoundPromise(staticJson.dead.sound); this.lockmove = true; let deadSil = new SilPlayer(this.game, this.person.deadSil, { x: this.person.x - 80, y: this.person.y - 80, i...
0
77c846a177fc7ab9dea5a35ac14d6ed0
0e20b7b43a1dfff002dc3ee78e147c08
This method is used to create the innitial hidden states for the encoder
class Encoder(tf.keras.Model): def initialize_hidden_state(self): return tf.zeros((self.batch_size, self.enc_units))
1
065060a3372f9322c121d3b559887081
54961d0fb71330fb138be930a057f530
创建财富树
class WapController extends IController public function getTree($pid='0',$uid=0,$ceng=0) { $t=Member::find(); $wherea['last_member']=$pid; $list=$t->where($wherea)->orderBy('id asc')->asArray()->all(); if(is_array($list)){ $all_rujin_count = 0; foreach($list ...
1
0152fd4e22d51642407ffc252a784ca1
150d4ba366d2929f9804bbe7af1a604c
Test that accessing a longer path works.
def test_paths(): client1 = ROOT_CLIENT.change_path('foo') assert client1.url == ROOT_CLIENT.url + 'foo/' client2 = client1.change_path('bar') assert client2.url == ROOT_CLIENT.url + 'foo/bar/' client3 = client2.change_path('/baz') assert client3.url == ROOT_CLIENT.url + 'baz/'
1
24a750f5ec82d9d48848ff433201fcdb
1a84579643ac05c844db7250da6f9558
Given selected phone number relation value, find its position in the values list.
public class ListField<T> extends Select<T> implements SpellCheck public int getIndex(T value) { for(int i = 0; i < view.getItemCount(); i++) { if(view.getItem(i).equals(value)) { return i; } } return view.getItemCount() != 0 && isRequired() ? 0 : -1; ...
1
cc669ff678348c5e81140278591f085a
07b2c580b1e03eab2669663aa825e208
判断是否隐藏客服按钮
boolean need = true; if (currReceiverData != null) { need = currReceiverData.needHideShop(); } AppDebug.v(TAG, TAG + ".needHideShop need = " + need); return need; }
0
c1d8a0dfd0991ef17d186ab3a449a98d
36f94eab50dddbcf3789145b87e1703e
Metoda sprawdza, czy trzeba utworzyć obiekt klasy Displayable (body) np. gdy chcemy dodać obrazek, animację, etc...
{ if (sprites.Count > 0 || animations.Count > 0) return true; return false; }
1
c606298cde6153aaa4edd2d27e6f191a
cd757d363111078659c5f9f77b6b6a4b
修改地址信息成功
class AddressController extends EqualController public function reSuccess(){ $add = D("address"); $map['id'] = I("id"); $data['name'] = I('name'); $data['tel'] = I('tel'); $data['province'] = I('province'); $data['city'] = I('city'); $data['street'] = I('street'); $data['detailed'] = I('detailed'); $r...
1
2fd0c18c28b8e05d9b0bd23676b1f038
79d714a5b1a77da4bca3e8d921c00bcb
获取公共用户组的列表
def get_public(): public_user = UserDao().select_list_by_username('public').first() public_group = GroupDao().select_list_by_owner(public_user).first() return (public_user, public_group)
0
c57758f06e06febe85252714cc3a0faa
6b8fe26ac00f80449b7108ca786d3cfe
Valida que una nota no exceda el maximo
public void modeIsOnlyValue() throws StudentException { final int MARK = 5; student.addNota(MARK); float mean = student.notaFrecventaMaxima(); assertEquals((float)MARK, mean, 0); }
0
7d3c6a020aae6fc7fc0f1f0069b015d0
ecc270f19b8f4f65d0b7823f0ab56ab8
Get the connection pool's encoder
class cases_ICNForwarder(object): def get_encoder(self):
0
248d0153573943a5f9a245ee3e4e1065
e9a8f2b2c22fe00c6c663e16d098c5ee
Devolve a candidatura a demonstração
class education_edstat_kcpe_examination_candidature extends Controller public function show($candidature_id) { $candidature = education_edstat_kcpe_examination_candidature_Model::findOrfail($candidature_id); echo json_encode($candidature); }
1
68d1adaa766f1ed6a5a72f7fafd12f02
dfc26551b7bccd514d972d6f6bcc33d1
从文件加载数据池信息
{ Console.WriteLine ("****** Reading database from list of files"); StreamReader r = new StreamReader (filename); while (!r.EndOfStream) { string s = r.ReadLine ().Trim (); if (s.Length == 0) { continue; } this.pool.Add ((byte[])this.Parse (s)); } Console.WriteLine ("done reading")...
1
33ff22ea8c9b3bd333e7924d8834984d
b4f252d5b61ad0a3ed54b19043735923
funcion para leer archivo shapefile
def read_shp(path): return nx.read_shp(path)
1
b5c00229bef682a5d1c71f94f15387af
97b54465b735492033a403da2dac6129
# Сортированная частотная таблица с процентами -------------------------
tbl1 <- function(x){ t1 <- table(x) t1p <- round(prop.table(t1)*100, 2) t1c <- data.frame(cbind(t1, t1p)) return(t1c[ order(-t1),]) }
1
adcccbc29cbff0001e2f0958e2f8de1d
81439e414027229185d871901ef8ff1c
普通管理员登录方法,查询Limit=1才能登录
class IosApiAction extends IosApiBaseAction public function getLimit($username,$password,$type){ if($type) $gid =3; else $gid = 2; $data['loginname'] = $username; $data['password'] = md5($password); $data['createtime'] = get_current_datetime(); $Data = M('Admi...
0
6a7e36fece9020c6f7a29df566a92248
f2a844248cec3b8ffa9d746f33248ad2
Removes all notification from the queue. <remarks>Currently not used.</remarks>
namespace Deezer.WindowsPhone.UI public class ToastNotificationManager public void Clear() { throw new NotImplementedException(); }
1
74926d06e37735baf816fb44da7f3b24
984d1b0b2759399658bb330718d031fc
compute the output signal of the binary sigmoid function with input x
def sig(x): return (1 / (1+ np.exp(-x)))
1
3480e7bf2ceeee3540b2ae12aa2f4a5c
e3c212e9e6d0cb5f4341a666c648ff7b
Parses a comparison expression. <pre> cmp-expr ::= add-expr '=' add-expr is-term? ::= add-expr 'NOT'? 'BETWEEN' add-expr 'AND' add-expr is-term? ::= add-expr 'NOT'? 'LIKE' string ('ESCAPE' string)? is-term? ::= add-expr 'NOT'? 'IN' ('lit-1', ..., 'lit-n') ::= add-expr </pre>
public class QueryParser private AmberExpr parseCmpExpr() throws QueryParseException { AmberExpr expr = parseConcatExpr(); int token = peekToken(); boolean isNot = false; if (token == NOT) { scanToken(); isNot = true; token = peekToken(); if (token != BETWEEN && ...
1
14f5bc16083673bdbaa95b8e3d45b62e
c2bb6ad3081cb7aba8aa3f786de89289
Criar uma pendência impeditiva caso o motivo do credenciamento possua natureza impeditiva
{ $model_category = ECash::getFactory()->getReferenceModel('DoNotLoanFlagCategory'); $model_category->loadByKey($model->category_id); $this->getAppClient()->insertDoNotLoanFlag( $model->company_id, $model->ssn, $model_category->name, $model->other_reason, $model->explanation ); }
0
33c850dedd4d5e504626451304659329
e786becaa6cec827ff1e6c3159567ef5
Get all elements of <stack_frames>
def get_frames return $marathon.getFrames() end
0
bb0743d784a09687c59afcb91407ffc6
25c38fe8205a46dd658b0d0639ec921d
calculate basis swap spread for 6M vs 3M basis swap
class HPCreditDefaultSwap(CreditDefaultSwap): def ParSpread(self, gamma): par_spread = (1 - self.R) * gamma return par_spread * 10000
0
93c6882350164b6150583b4734c7b31c
86c37146419f51f51331ed60dc5cce2b
Calculate step function activation (only used to check basic functionality)
def step_func(x): if x>=0: return 1 return -1
1
8953d7acfbe2d0912da5a3cead7f29ee
7074a4d223eacef8931efe1459d124d9
显示和保存128寄存器设置值
void Set_Entire_Display_12832(unsigned char d) { oled_command(0xA4|d); }
0
e306a9451b5fbd868a5472c73ec9d114
e9f266eb5ff2bb870a26eb68069dd56b
we organize the == constraints after then <= ones so we have to offset by the number of <= constraints
namespace channel void CurveBuilder::set_up_lp_constraints( glp_prob* lp ) const { for ( size_t j = 0 ; j < _bounds.size() ; j++ ) { #ifdef DEBUGMODE assert( j == _bounds[ j ].get_row() ) ; #endif int i = int( _bounds[ j ].get_row() + 1 ) ; std::stringstream ss ( std::stringstream::in | std::s...
0