query_id
string
corpus_id
string
query
string
code
string
label
int64
6028c8851091b95298ab29965dcfbb14
cd12c2b3354bcf642789ec4892081b4e
Enable/disable JavaDoc parsing
$this->options['generateDocblock'] = $generate; if (!$generate) { $this->options['generateEmptyDocblock'] = $generate; } return $this; }
0
ec2450b7b964cbe636c7f3354cd62c4e
6382501f021d26ecf9489ef0bf8e4abe
we use only 2pts with normals
if(!gouraud){ displayFaceNormal(); } else{ for (int i = 0; i < size-1; i++){ for (int j = 0; j < size-1; j++){ glBegin(GL_LINES); glColor3f(0,1,0); glVertex3f(i,heightMap[i][j],j); glVertex3f(i+normal[i][j][0],heightMap[i][j]+normal[i][j][1],j+normal[i][j][2]); glEnd(); } } } }
1
2ba9f6be9c3948809d8421fb35648f25
76bb444105d972d8fcaa076988b88603
Permet de switch vers la vue relation, utilisé dans la barre de menu supérieure
Relisting relisting = new Relisting(this, resultat, jPanel1, this); relisting.setVisible(true); }
0
382dcb9fefcad7f230e61f7a483922f6
81be54964be5914903202a08f4d0e20c
DefaultCriParameters
{ $this->requestHandle = Criteria::newSwitchWithOptions(Criteria::SW_OPT_BRANCH_PARAMS_DATA_VALUES); $this->requestHandle->default(function ($value, $key) { $this->curl->{'set'.ucfirst($key)}($value); }); $this->requestHandle->bind('body', function ($value, $key, SwContro...
0
ee3514db6e413cf49a50e9cfa5136159
780c0f3d5871da16d9d93da2e0616fc9
Obtiene la cantidad de Venta del stock
global $db; $results = array(); $sql = "SELECT COUNT(*) AS Venta FROM events WHERE MONTH(end) = MONTH (NOW()) AND YEAR(end) = YEAR(NOW()) and STATUS='1'"; $result = find_by_sql($sql); return $result; }
0
cb58169e6eee24c84ccfca2cc37320c5
47e67aa0ee1c1029f467ed5fea40b6e8
计算总共物料可供给天数均值
{ DataTable serviceSupportTable = supplierPerformanceIDAL.queryServiceSupport(materialID, supplierID, startTime, endTime); double rst = 0.0; if (serviceSupportTable.Rows.Count == 0) { return 101; } else { ...
0
fd2e6127633895314aae3e6490b74281
1e0fb7e875a3510843aef79f352df2fc
Applique des paramètres de tri sur la liste de <see cref="PlayerAtpRanking"/> fournie, et leur assigne un rang suite à ce tri.
{ $this->sortByRank(); $i = 0; $length = count($this->items) - 1; $last = null; foreach ($this->items as $item) { if ($item->id != $idResults[$i]) { $result = $this->find($idResults[$i]); if ($i === 0) { $result->rankBefore($item); } else { $result->rankBetween($item, $last); } ...
1
b8264e5e241d4618ee785d48c73996be
c44956980f7818b89d57d6bb25798964
return an hash with files that need to be transferred {<local file name>: <remote file path>}
class ServerThread extends Thread private HashMap<String, FileData> getLocalFiles() throws IOException, NoSuchAlgorithmException { return ChangeTracking.getLocalFiles(directory); }
0
be12a03688dc4c739f3c4e0f014decd5
f8202e8c064906d1ed46f159a4005f5e
Test NotFittedError is raised when calling get_feature_importances() and forecaster is not fitted.
def test_output_and_UserWarning_get_feature_importances_when_regressor_no_attributes(): series_2 = pd.DataFrame({'1': pd.Series(np.arange(5)), '2': pd.Series(np.arange(5))}) forecaster = ForecasterAutoregMultiSeriesCustom( regressor = MLPRegressor(solver ...
0
78fe2ee28e5df5026632691bd1e7dd7f
d529814f5ac2fa5c60c06b05572e2c15
メッセージ送信時のコールバックメソッド
if (mMessageSendCallback == null) { mMessageSendCallback = new Callback() { @Override public void onSuccess() { ((Activity) mContext).runOnUiThread(new Runnable() { @Override public void run() { ...
1
f475a44e6ab3bd983e3890d26c4717d4
796717aa6a78da2ef6c304cdba1d8e44
Writes participants and events to file
public class BracketParticipantsRegistry implements ParticipantsRegistry private void dump() throws JsonIOException, IOException { BracketOrganizer.getInstance().getDataManager().save(this.participants, this.dataStore); }
1
4e610526a0d502e1d8c1fd0d27bee077
f2cba4c022ae274b48d10ff2271c3c3f
Returns the array of long name of month.
function months() { return [ '01' => 'January', '02' => 'February', '03' => 'March', '04' => 'April', '05' => 'May', '06' => 'June', '07' => 'July', '08' => 'August', '09' => 'September', ...
1
8304a6eea13d2745cbc88ee56f0848e8
0258f173ed3aaaf8cf144b9524e5cc42
Include Tag Color Support
$colors=array('F99','C9C','F96','6CC','6C9','37A7FF','A1D666','E6CC6E'); $posttags = get_the_tags(); if ($posttags) { $tagoutput = ""; foreach($posttags as $tag) { $tag_link = get_tag_link($tag->term_id); $color=$colors[dechex(rand(0,7))]; $tagoutput .= '<a class="colortags" style="background-color:#'...
1
b43a58ab5e49f28fc8e76f745d68b714
bbb55b42297ccc4bb6147ed77f0c1737
Customer collection API.
class CustomerController extends Controller public function index(): AnonymousResourceCollection { $customers = Customer::paginate(); return CustomerResource::collection($customers); }
1
5dd67d343ee0e99576411ecbae688269
a186aec1014f469dcee21c2f7f31b8ed
作者:肖书成 描述:软件详情页右边(相关版本下载、标签、相似软件)
def kb_isoft(request, key): book_type = 4 if key == 'index.html' or key == '': key = '1.0.html' tg_key = key[0:-5] try: info = Arts.objects.get(url=tg_key, book_type = book_type) manu = Arts.objects.get(url='book_list', book_type = book_type) except Arts.DoesNotExist: raise Http404 preP = '' aftP = '' ...
0
bf9d4b63990b03f14029930400c6b45d
1e182353e8b3990b237c0bcc7ca64da6
Return true if the given port is open and listening for connections
def isOpen(ip, port, timeout): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(timeout) print("trying port "+str(port)+" on server "+str(ip)) try: s.connect((ip, int(port))) s.shutdown(socket.SHUT_RDWR) return True except: return False finally: ...
1
8c9c69ac134035746aec9663700eb1ef
971d1dfb92bc4ad1cbbbbd9e8ef57083
GET: api/SANBAY
namespace WebApplicationTT.Controllers public class SauHaiController : ApiController public IEnumerable<dynamic> Get() { IList<Object> listSP = new List<Object>(); var query = (from prods in db.SAUHAIs select prods).ToList(); foreach (var item in query) { ...
0
6b9fcbafeb8866ee9de784b4b98c79bd
6d0c3fef8d10929fee0e8972eb371579
根据产品分类id获取产品id
{ $dao = dao_factory_base::getItemCategoryMapDao(); $dao->setField( 'item_id' ); $where = "item_cat_id={$cat_id} AND is_delete=0"; $dao->setWhere( $where ); $res = $dao->getListByWhere(); $result_array = array(); if ( $res ) { foreach ( $res as $va...
1
c0fab8a5e7021f721089e5fc176b2d29
545b9d69b27df7d7d7948e2005c6d6b2
:obj:`CameraIntrinsics` : The camera intrinsics for the Ensenso IR camera.
class ArgoverseDatasetLoader(LoaderBase): def get_camera_intrinsics(self, index: int) -> Optional[Cal3Bundler]: return Cal3Bundler( fx=self._K[0, 0], k1=0, k2=0, u0=self._K[0, 2], v0=self._K[1, 2], )
0
9bbc8b5637c46a0218c729067dbd6e28
55368789ed7dd0b37c224521a0dd7410
write Fibonacci up to n
function fibonacciGenerator (n) { var output = []; if (n===1) { output.push(0); } if (n===2) { output.push(0, 1); } if (n>=3) { output.push(0, 1); while (output.length <= (n-1)) { ...
1
c1c34bed22cf614a9b80f661c96e64e9
6095d2a50989bd9b5c97d864223605db
#Important keep track of the localPlayer instance to prevent instantiation when levels are synchronized
public class PlayerManagerVR : MonoBehaviourPunCallbacks, IPunObservable public void Awake() { if (instanceMine()) { LocalPlayerInstance = gameObject; } }
1
c572bf1c5be6c725d772cc16099728ce
5c76ed8536c56e9ee9f88224f25829a6
模糊查询Code
function searchCodeByMulCondition(){ var dataGrid = nui.get("codeResult"); var dictForm = new nui.Form("#queryForm"); if (dictForm.isValid()==false){ nui.alert($.i18n.prop("alert_code_req")); return; } dataGrid.setUrl(contextPath+"/webapp/dict/queryTsCodeByMulCondition"); dataGrid.load({"dictCode":dictForm.g...
0
f2b1d6a4d26c22e7d757b18c8fac7ee5
d316b1945ecd134a1f565b02f963550e
When property gets changed in the Model, raise the PropertyChanged event of the ViewModel copy of the property
{ try { this.Dispatcher.Invoke(() => { this.ViewModel.ObjectCopyProperty(_viewModel); }); } catch { } }
0
dc3ebe2d063ad5f1991b87d88abc9d9f
b218dbae6930c8f03ee56bfd79591ae8
Get the Socialite direct instance that will redirect the user to the right provider OAuth page.
class SocialiteMock public function __invoke($email, $token = 'random-token', $id = 'random-id') { return $this->create($email, $token, $id); }
0
d5d442e8cfce8a22b916fac703d649ed
64317dd9bee3e11d322689ff0ce77d80
Get a map of underlying output stream and response closer.
public MessageMapList getOutputMap();
0
59898f7545e5c96bc06f5ca42290b265
7a9ca6099ae4777f5b2f01660718a07f
Проверка возможности удаления уникального ключа
{ UniqueKeyControl uniqueKeyControl = (UniqueKeyControl)this.Parent; return uniqueKeyControl.IsEditable() && ( ((SmoUniqueKeyDesign)uniqueKeyControl.ControlObject).Fields.Count > 1 ); }
0
d8a741ff83bfe19210ef8acd71552edc
1be628a7bd322d9322eb6678bc7cf3ac
use the item category information to generate positive/negative samples
class BehaviorDatasetManager: def sample_negative_behavior_based_on_positive_behavior(self, pos_behavior_item_indices, mode): sampled_neg_behavior_item_indices = [] sampled_neg_behavior_item_type_indices = [] pos_behavior_item_num = len(pos_behavior_item_indices) if mode == '1': ...
1
329d9eaf12ab8786741acf8c34558950
0c5a4757424833b01528157f8359ae80
Tab key inserts four spaces rather than a tab character.
class SimpleMikiEdit(QtWidgets.QTextEdit): def keyPressEvent(self, event): moddies = QtWidgets.QApplication.keyboardModifiers() expandTab = Mikibook.settings.value( 'tabInsertsSpaces', type=bool, defaultValue=True ) if event.key() == Qt.Key_Tab and exp...
1
2c86e827b5f0352424b30ae08d6eb195
49107971a5b5bd5f372bb9fb50390c02
计算样本期权和持仓期权的开仓保证金,每个交易日开盘前计算一次
self.dailyClose['openPosition'] = 0 self.dailyClose['closePosition'] = 0 self.dailyClose['positionChange'] = 0 self.dailyClose['pnlChange'] = 0 self.dailyClose['pnlPosition'] = 0 self.dailyClose['totalPnl'] = 0 self.dailyClose['commission'] = 0 self.dailyC...
0
fb8b36f12bbae0d350e5197e3baea15b
49c44736e29988f8f1a089014f8402c9
付款人银行名称を取得する
abstract class PaymentSlipData public function getBankName() { if (!$this->getWithBank()) { throw new DisabledDataException('bank name'); } return $this->bankName; }
1
883da67f4ea24557d338a512c9d8923e
e9693e75d92ed3994b79cba4b2240b33
设置字段17
class netxAsset extends netxBean public function setAttribute17($attribute17) { $this->attribute17 = $attribute17; }
1
fb0e50244d74320c611467a85db46743
db4ae2da8e00b146367769e75d5951e9
彻底删除一次活动
MActivity activity = MActivity.dao.findById(getPara("id")); MActivityStore existActivityStore = MActivityStore.dao .findFirst("select * from m_activity_store where activity_id=?", activity.getInt("id")); if (existActivityStore != null) { existActivityStore.delete(); } activity.delete(); redirect("/ac...
1
23f480543e4b270cf86e372f5dc8416f
9a590d351a770cc25f765f6b50f58aea
돈이 없는 소비자가 자판기에 충전하려고 한 경우
class NoMoneyState implements State public void pushButton(int price) { System.out.println("동전을 넣어주세요."); }
1
d24786e86a821436d802cfe1a5a46f5a
e648f51b17eed72a14a474ef28bc1ea5
Render a form to update an existing seo.
class Admin_SeoController extends Pif_Controller_Admin public function editAction() { if(!$id = $this->getParam('id')) { $this->_redirectSeo(); } if (!$item = $this->getSeoModel()->get($id)) { $this->_redirectSeo(); } if ($post = $this->_request->getPost()) { $post['uri'] = '/' . trim($post['uri'], '...
1
291d0d71593deb9b979385efc6487261
21ec8ebec6f91d28406b67f155db1bea
Fit a plane through the input points using Principal Component Analysis.
class Measure: def calc_plane(self, points): A = np.ndarray((len(points), 3)) for i in range(len(points)): P = self.get_3d_coords(points[i]) A[i, :] = P A = np.append(A, np.ones((len(points), 1)), axis=1) w, v = np.linalg.eig(np.dot(A.T, A)) return v[:, np...
1
99338fe02847cfb3ea71e22061c54ee2
208e67cb7b5c8c8ad022b30f78ddabc3
metoda care sterge un produs si merge recursiv si sterge mai apoi toate produsele ce il contin
async function stergeProdus(){ var url = location.search.substring(4); var confirmationOutput = document.getElementById('confirmareStergere'); var produsDeSters = JSON.parse(await ajax("GET", `https://mymag-31b68.firebaseio.com/produse/${url}.json`)); var produsDeStersNume = produsDeSter...
0
b0119129b23cc662e14d1acd3ced82f4
1528bc0a70e754049f298f58506aaaa0
Запись массива чисел с плавающей запятой в новую строку таблицы
namespace HC.Core.Helpers public class PrintToScreen public static void println(double[] aa) { for (var i = 0; i < aa.GetLength(0); i++) { WriteLine(aa[i] + " "); } }
0
02fe4904a05622b3899a5f52a048ac90
26dbfc5b7ff4e213708ac45a5564af75
创建服务器套接字并监听在11231端口,等待客户端发起连接
tcp_server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) tcp_server_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, True) tcp_server_socket.bind(('', 9000)) tcp_server_socket.listen(128) self.tcp_server_socket = tcp_server_socket
0
30c3fd64e9b9db5b7b394918aaff25c3
64c70c879c59365ef39004b8eb2bb268
construire payload pentru un cont nou
public final class SimpleClient private JSONObject getPayload(String username, String password) { JSONObject back = new JSONObject(); JSONObject client = new JSONObject(); client.put("name", "Minecraft"); client.put("version", 1); back.put("agent", client); back.put("user...
1
cba3698cae6331c138d3bf655772bcad
ce981b11454198f3ad5a6dcb82c0efef
Update default channel invitation preference ​@description Updates the default channel invitation preference of an application.
export class ApplicationService extends SendBirdHelper async viewDefaultChannelInvitationPreference() { const url = `applications/default_channel_invitation_preference`; return this.wrapper(this.http.get<I.DefaultChannelInvitationPreference>(url)); }
0
a78650aef6bb118552d96a090954f1ca
7f40b7307044e7efc0a867e31c78514c
Coroutine to spawn customers with specified time intervals
public class CustomerManager : MonoBehaviour private static IEnumerator spawnCustomerWave() { int count = DifficultyManager.getNextSpawnWaveSize(); for (int i = 0; i < count; i++) { spawnCustomer(); yield return new WaitForSeconds((float)rnd.Next(SPAWN_WAVE_MIN_OFFSET...
1
e8a3a3c5c5508c24666bf53283923403
e3a99a6f6d0fff77059b45f810c3c44e
更新所有问题回答
{ CheckData(entity); int iRtn=0; bool isExistTrans = db.IsInTransaction(); if(!isExistTrans) { db.BeginTrans(); } try { foreach(DataRow row in entity.Tables["TW_QUESTION"].Rows) { int j = db.exeSql(new SS_TW_QUESTION_UpdateTW_QUESTION(), row); iRtn = iRtn+j;...
1
aeb59850562f0360e5b34b06d46dc5f9
a66dee9dd5db9fd7e24ae84d199d35b2
최빈수 구하기
int freq = 0, result; bool second = false; for(auto iter = m.begin(); iter != m.end(); iter++) { if(iter->second > freq) { freq = iter->second; result = iter->first; second = false; } else if(iter->second == freq && !second) { result ...
1
15842caaf858d766e882b283086ea8ec
5b82aea92a25f8341fe39c75fe603f72
helper function to swap UP/DOWN, LEFT/RIGHT (and F1/F3 for Recorder)
if ((c1 == 2 && c2 == 3) || (c1 == 3 && c2 == 2) || (c1 == 5 && c2 == 6) || (c1 == 6 && c2 == 5)) { return; } int temp_value; int temp_column[10]; for (int i = 0; i < 9; ++i) { temp_value = sudo->field[i][c2]; sudo->field[i][c2] = sudo->field[i][c1]; sudo->field[i][c1] = temp_value; } for (int n = 1...
0
3ff5d9666b38d03cedb7a00f763e1d6a
32c210fe4be7cdc37e64b38ea6ff7715
display the values of the 4 switch on the page (screen 2)
function displayPageData() { displayStation2NotEntry(); displayStation2Entried(); }
0
51bf32a57b7e8a4761e7c65e8272185b
c5353f948bbd587361291f166639f435
Check to see if the user can cancel the checkout on the given working copy
namespace LogicLayer [Serializable] public abstract partial class OStoreCheckOut : LogicLayerPersistentObject, IAutoGenerateRunningNumber, IWorkflowEnabled public bool ValidateCancellable() { foreach (OStoreCheckOutItem item in StoreCheckOutItems) { List<OStoreIte...
1
fa95ad9e0c9200857cbd2b77e6359bb3
37b00d13864b5ac9ee5242ae970b9830
Confirm that when the key service returns a NOT_FOUND response code that this is flagged as being ok to the callback of the fetch method of ```AsyncCredsRetriever```.
credentials = await provider.async_get_or_create_credentials({}) assert credentials.data["username"] is legacy_api_password.LEGACY_USER assert credentials.is_new is True
0
2913652c2ea5c40c320790a688103dc8
b71d0bb85de451ddc73bab276d53453f
GetSpotifyUrlType returns the type of the given url in integer.
Integer getUrlType(String url);
1
f0a51bd33bd8b27f2ff3fb3dd92cea13
da5e0f7aad7a00b299b61434e83716a2
Set the number of dice
class DiceRoller public function setDiceCount($lintDiceCount) { $this->mintDiceCount = $lintDiceCount; }
1
1e94a47374e65db4bde5eae3aa1223f3
803243d7b84cefa23409382aa0da0601
Getting the current selection by making the request, and then blocking (processing events) while waiting for a reply. On failure (timeout or bad format) returns NULL, otherwise returns the contents of the selection.
class HtmlClipboard(object): def get_selection(self, refresh=False): if not self.selection or refresh: self.get_from_clipboard() return self.selection
0
852902d24c5a84f0389148b8350978f6
2bdd8b3a3e1e4b8239aca8a791c7ebc6
通过栏目自动生成级联菜单
class ColumnController extends Controller public function create() { $info=DB::table("diy_column")->select(DB::raw('*,concat(path,",",id) as paths'))->orderBy('paths')->get(); foreach($info as $key=>$value){ $arr=explode(",",$value->path); $len=count($arr)-1; $inf...
1
fa674de5edb88e0d366d752177be77db
b716eb4c5a6cc2c4024e2310a4e9030d
中序遍历的递归算法实现
public class PreInPosTraversal public static void inOrderRecur(Node node){ if(node==null){ return; } inOrderRecur(node.left); System.out.print(node.value+" "); inOrderRecur(node.right); }
1
dfee91d6908860ceba34ebb8fd1f5e43
0b3e5f573bde1301e226971d9a25d46a
出勤・退勤時間がどちらも存在する時、出勤時間より早い退勤時間を無効にする
class Attendance def attendance_comparison unless next_day_flag if finished_at.present? && started_at > finished_at errors.add(:finished_at, "退勤時刻は出勤時刻より早い時間は設定できません。") end end end
1
649183256d789200843e9efa5c305840
eb82a364e281191cc96fd11f63046c4d
Regenerate the AST and highlight the code.
if (window.hljs) { let codeElement = this.refs.code.getDOMNode(); window.hljs.highlightBlock(codeElement); } }
0
ea2462a62b733fea607e79918f43bdef
e2e10e0760eda3abf4d60ba41bb2fd81
check to see of the protester can move straight to the frackman without any dirt or boulder blocking
bool Protester::canDig() const{ return false; }
0
5301c8125822c8b2600e84068a623697
c9c7af0a80b2e3961fd0daaecaece944
新增或删除考试机构
function delOrAbleOrgan(id, type, newOrganId) { $.ajax({ type: "post", url: "/organ/delOrAbleOrgan", data: {organId: id, type: type, newOrganId: newOrganId}, dataType: "json", success: function (ar) { if (ar.success) { layer.alert("操作成功"); ...
1
56b854cc58a93411050494a1aeb4cef1
044dbabc1dfd1934fcb11266b2e5ba27
Function to get the pointer by giving the number of the section
Section* Barrier::section(int i) { return _section[i]; }
1
44580f470ae651dd4322e66c7fcd8bc1
445a774454b694daf099a5b237fc63fc
Find the target at the end of the jump chain, return None if there is a loop
if self.chain[0] is None or inside(key, self.key, self.chain[0][0]): return None for i in range(CHORDS - 1): if self.chords[i] is None: continue if inside(key, self.chords[i][0], self.chords[i+1][0]): return self.chords[i] if ...
1
bae582d9adeadf799807372cd3d370bd
2113f67deb8e182229fb8ad43c0694cd
Add a pointlight to the scene
{ LightObj *ml = new LightObj(name); ml->light = mSceneMgr->createLight(); ml->light->setType(Ogre::Light::LT_POINT); ml->light->setSpecularColour(Ogre::ColourValue::White); ml->mNode->mNode = mSceneMgr->getRootSceneNode()->createChildSceneNode(); ml->mNode->mNode->setPosition(Ogre::Vector3(0,0,0)); ml->mNode->m...
1
d08b731f31f5edba43a6d3dc22432e19
425d0125656cf24e6ce3d444b2eabb70
领取按钮的回调
function PveBarrierPanel:getRewardCallback(msg) if msg.code == 0 then rewardPanel[self.rewerdTag].button.haveGotten(); rewardCount = rewardCount - 1 if rewardCount > 0 then circleTip.Visibility = Visibility.Visible else circleTip.Visibility = Visibility.Hidden end rewardList[self.curPageId][self.re...
1
611c45113307fc99478a16291a51d585
d09e0385d64f26bf99bd2ed482f63871
Copy a part of a list into an array.
const a: number[] = []; for (var i = from, j = 0; i < to; i++, j++) { a[j] = b[i]; } return a; }
1
83c0bcf312808cd06c37e01f7a093369
637132a65b68be8a285dcbc24f3d876e
Select icon name on click
function iconCallBack(className){ $(this).val(className); $(this).closest("div.input-group").find("#icon").attr("class","").addClass(className); $(this).closest("div.input-group").find("#iconName").html(className); $(this).click(); }
1
2304027f365422f57afab2533559a13c
9aeb44f34df9695257d665e1a534cf90
@brief Informs the script level that this object has completed is fade cycle. @tsexample GuiFadeInBitmapCtrl::onDone(%this) { // Code to run when the fade cycle completes } @endtsexample @see GuiCore)
void AnimatedListDayItemL__Done( AnimatedListDayItemL _this ) { _this->_VMT = EW_CLASS( AnimatedListDayItemL ); ViewsText__Done( &_this->Text ); EwReleaseString( &_this->Caption ); CoreGroup__Done( &_this->_Super ); }
0
666e46f6029d8017e8f824c90d92e922
aa7a34ef2c831d75887f103c9985ec91
Logs the authenticate user.
success(user, source) { log.event('auth:login', { status : 'success', user : user.id, message : `Successfully authenticated ${ user.name() } <${ user.email }>.`, data : { source : source } }); }
1
89eada47043fbfed9206ca84f8f231f5
8492fc66f4a1108eb87d6ef496aac5f7
Convenience method to log the provided CQL statement, substituting the provided parameters for any "?" in the statement
Map<String, Object> bindValues) throws InterruptedException, ExceedMaxAsyncJobsException { executeAsync(callback, permitTimeoutMs, prepareStatement(cql), null, bindValues); }
0
ce85cad6d14522ca902b7240ee5fc67b
8938acf60ff8225b9297f73e84d25494
点击选择gif
class ChatGIFPage(BasePage): def send_gif(self, n=0): els = self.get_elements(self.__class__.__locators["所有gif"]) if els and n < len(els): els[n].click() time.sleep(3) else: raise AssertionError("There is no %s gif." % n)
1
2eeb69bac0bfd3d53f89e19eeac8cff2
a9a60c0573cdb46d902e09132c05f576
对一个字符串的数值进行从小到大排序
public class StringSortUtil public String sortString(String s) { String[] c = s.split(","); int[] arr = new int[c.length]; for (int i = 0; i < c.length; i++) { arr[i] = Integer.parseInt(c[i]); } sortIntArray(arr); intArrayToString(arr); return data; ...
1
eca41dbcd11a0b23ffe1ef9550721908
a7884c16276aed0d104c9e1880ad8eb9
Returns the meta object for class '{@link de.kickitsolutions.beobachter.model.interfaces.GameState <em>Game State</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getGame();
0
b539b5c6dd5efdfbfb96835043addb07
652c2e6f6f5e21a7b4a7afef080c847d
NewConfig creates a new MysqldConfig struct with default values
func NewDatabaseConfig() *DatabaseConfig { return &DatabaseConfig{} }
0
766e27963830095e6be723cd474cbfb2
4afac2fcb1685b27a01061e3cae8d1eb
考试做题页面的退出,清空成绩明细和操作数据
app.pageStorageClear('assessment/assessJDDetail', [ 'rank/rankAssessDetail', ]); var rankAssessDetailCB = app.myApp.onPageBack('rank/rankAssessDetail', function(backPage) { if($$(backPage.container).find('.rankSumbit').html() == '已保存') { var reportTitle = $$(backPage.container).find('#assessTitle').val(...
1
d6beb3a015c6a07a8a44836bcd2f23aa
a36ad160441b8a19dbe462bc16a50d20
Obtiene los items del breadcrumb previos al item especificado. El item especificado debe haberse obtenido del breadcrumb.
public function getPrevious($field);
1
f7968a3f06cfb1fa81be880fb896c28f
336ed4bbf73d13444b9565e89251223e
Returns matrix representing our level with integer values. 0 - empty field 1 - destructible block 2 - indestructible block Every other value represents a bonus 3 - stronger bombs 4 - faster character 5 - more bombs ( 3 instead of 1 )
public class LevelState public int[][] getBoardVals() { return boardVals; }
1
a572f9e8bacb1ea33c7f40f4c49dbdd1
f5245909171e90c38aa30b521cecee55
Verifies a user's existance - used before asking the memory module for a folder
cJSON * users = NULL; cJSON * juser = NULL; cJSON * pass = NULL; cJSON * folder = NULL; unsigned success = OK; if (!(users = get_json(USERS_URL))) success = ERROR; else if (!(juser = cJSON_GetObjectItemCaseSensitive(users, user->user_name))) { cJSON_Delete(users); success = ERROR; } else { pass ...
1
8342fc2b2d8d95dc4c85729e569f7768
206e80e69274ba30c33981900244a4b4
Daten der Listitem-Objekte aus einer bestimmten Shoppinglist werden ausgegeben
const request = new ListItemsRequest(); request.setShoppingListId(shoppingList.getId()); request.setFilter(filter); return client.listItems(request, {}); }
1
c53e8e52b1d7fbae8d10704a39048324
e61dc0d87328f6b8ebdc24f54c5d8a95
## 'directory' is a character vector of length 1 indicating ## the location of the CSV files. ## ## 'threshold' is a numeric vector of length 1 indicating the ## number of completely observed observations (on all ## variables) required to compute a correlation between ## nitrate and sulfate; the default is 0. ## ## R...
complete <- function(directory, id = 1:332) { if (!dir.exists(directory)) { cat("Error: Specified directory", directory, "does not exist !!!\n") return(NA) } df <- data.frame(id = numeric(), nobs = numeric()) for (i in id) { csv_file <- sprintf("%s/%03d.csv", directory, i) ...
0
f17765c58007e3b7ec75180715ca981d
bb96b0e82b8e20317aab9176fb05e42f
Returns the full name ([salution] [first] [middle] [last]).
class Message def full_name [forename, surname].join(' ') end
0
72429095707133393c2efbe3d9dc22cb
bb6a995fc360a2a302969959e1b62142
Deletes a GalleryItem entity.
class GalleryItemController extends BaseController public function destroy($id) { $this->item->delete($id); return static::response(true); }
1
6c64f4560fe2ccfa93c803093993b12d
b8f1507a4793ed6742ceef39740d0b87
将redis中的点赞数量存入MySQL
void transLikedCountFromRedis2DB();
1
6eeff5a51f7d157b02287ee2209ade67
9b669a3b89b22fcf4734eba9004f1d8e
マイナーバージョンを取得します。
public class BuildInfo public synchronized static int getMinorVersion(){ String mver = properties().getProperty("version.minor", "-1"); return Integer.parseInt(mver); }
1
7203d93185b7bf55f29f2574b25be7bd
5da2574ec73061ffadf9a5ddf2383663
设置鼠标进入和出去效果不同
function eyou_mouseenter(that) { var e_type = $(that).attr('e-type'); $(that).addClass('uiset'); $('body').find('b.ui_icon').remove(); if (-1 < $.inArray(e_type, ['map','upload'])) { $('body').find('div.ui_zhezhaoceng').remove(); $(that).prepend('<b class="ui_...
0
63aa372809af6624556c7c588809735d
92f3b3b70765b7643996e6f3411771c2
Sets the value of the multilateralAgreementForDealers property. allowed object is {@link String }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "PolicyProduct_Type", propOrder = { "policyProductKey", "policyProductSysKey", "carrierCode", "carrierName", "planName", "productCode", "productVersionCode", "versionDate", "shortName", "marketingName", "description", ...
0
649d5912adf78e7fab5daa401ab4437b
0c4a48d1f890cc1c48695c200ffe0e0f
LoadPlan列表排序
if (pivos.size() > 1) { Collections.sort(pivos, new Comparator<PlanItemDetailVo>() { @Override public int compare(PlanItemDetailVo o1, PlanItemDetailVo o2) { if (StringUtils.isNotEmpty(o1.getStockno()) && StringUtils.isNotEmpty(o2.getStockno())) { if (Integer.valueOf(o1.getStockno()) == Integer....
1
01dda33319bc148a2fff56c4da123887
3143705a1b7e7e2ff77d6a72fe8366b4
Добавляет билет в запрос к сервису авторизации доступа.
{ $accessTokenId = $this->accessTokenIdGenerator->create( $authorization->getUserAccount()->getPublicId(), $authorization->getClient()->getPublicId(), DataBag::create($authorization->getTokenType()->getAdditionalInformation()), DataBag::create(['redirect_uri' ...
0
33dd686d4d50e8304e1b3fb7ebb51e73
f3908bb8b3833908b1069ebc8fa435a7
Returns: True if in the rules button, False otherwise
def inside_solve_button(pos): return 135 < pos[0] < 135 + 140 and 550 < pos[1] < 550 + 40
0
9b69440beb89b61933fc705e283dab8d
bfbf8fc413e5384bc7209fbadb37ede9
Get the first IPv6 address if present.
if self.version == 1: return self._details['IPAddress'] else: return next(address for address in self._details['host']['addresses'] if address['version'] == 4)['addr']
0
af0b3f2f20d5316fbc5569b47ab09503
189603eef43380c3f42d8f4ffd9376ff
営業とチェッカーの2つの並行処理が終わるのをmain関数で待ち受けるためのもの
def main(): openAndclose= multiprocessing.Process(target=openAndclose_holters_and_Abp) openAndclose.start() time.sleep(2) cpuAndmen=multiprocessing.Process(target=cpu_men_main) cpuAndmen.start()
0
51ab4333bda74a205acee0ed9758d7d9
cbf523ee0695f27c049b794c58cc5097
Visualize the partition result of a layer.
def visualize_PartB(p,clf,param,x,y,index): clf_trained=clf.fit(x,y) ModVar.SVCTrainedModelsDict_Gamma[p]=clf_trained r,c=np.divmod(index,3) ax=axes[r,c] print("index,r,c",index,r,c) zMesh=clf.decision_function(np.c_[xMesh.ravel(),yMesh.ravel()]) zMesh=zMesh.reshape(xMesh.shape) ax.conto...
0
6651b058a0817bd52be6d331b12a1192
d57f2cab837801803058a7595548c879
Is the YUV queue full? Side effect:
namespace android bool ControlThread::compressedFrameQueueFull() { return mCallbacksThread->getQueuedBuffersNum() > MAX_JPEG_BUFFERS; }
0
a5bfebf2026a314cfd7586f10c0f01f4
e4fecf18e34c28892fe782c50d542702
比较时间是否一致,如果一致返回0,left大,返回整数,right大返回负数
if time1>time2: return 1 if time1<time2: return -1 if time1==time2: return 0
1
f21fb07ea03eca33c59adb2b101735cf
e12335b7cc1cfdb86ad890c4a00c84ab
Genera un ID aleatorio válido para un tramite.
@Service public class TransactionService private String generateTransactionId() { final StringBuilder stb = new StringBuilder(); stb.append(RandomStringUtils.randomAlphanumeric(8).toLowerCase()).append("-"); stb.append(RandomStringUtils.randomAlphanumeric(4).toLowerCase()).append("-"); stb.append(RandomStringUt...
1
18120c2d0f0f7739b6f1b32353b9a9fa
0c8ce5a536b322a3bed0d79923b4bfdc
We could be using either next-available-slot field. If either is set, it counts.
int find_available_slots(unsigned used_mask, unsigned needed_count) { unsigned needed_mask = (1 << needed_count) - 1; const int max_bit_to_test = (8 * sizeof(used_mask)) - needed_count; if ((needed_count == 0) || (max_bit_to_test < 0) || (max_bit_to_test > 32)) return -1; for (int i = 0; i <= max_bit_...
0
9bf540e038ad98c3e62e5ada3ae7a13c
68cc2719d78d1fe8498aec7793bd1e7b
Naive approach to codegen, creates output files for every message/service in every linked file, not just the parts depended on by the "to generate" files
files = self.__directory_xml_files("unnamed") for f in files: self.__generate_code(f, False, "/root") self.__generate_code(f, True, "/root") return
1
c5be7f761c83b28cae61ad0e10debf7b
f6525b8835b2856706384e271b65174a
Creates a new data source with additional audit rules.
namespace UL.Aria.Service.Manager.DataRule IDataRuleContext<TParent, T> Create<TParent, T>(TParent parent, List<T> userAlteredEntities, bool isDeleteMode = false) where TParent: ITrackedDomainEntity where T: ITrackedDomainEntity;
0
0b35ce175d30b05da1093e325605665d
2ac1a191c4ddbd66bb36f8bcf4540dd2
查询固定资产卡片列表信息,按照固定资产卡片创建时间降序排列<br> 默认为第一页,每页大小默认为10<br>
@RequestMapping("ordflow/assetEntityQry") @ResponseBody public Page<CardEntityVo> assetEntityQry(String webIdcode,PageRequest pageRequest){ int start = 0; int limit = 10; if(pageRequest.getPageSize()!=0 && pageRequest.getPageNo()!=0){ start = (pageRequest.getPageNo()-1)*p...
1
3f49b6363178866ccea2cf13a23f40c2
468d3059371448f9888fa19049d7385b
Initializes a city map matrix (shape RxC)
def init_dist_map(m, n): return [[0 for _ in range(n)] for _ in range(m)]
1
6da37c2d9ffaa27f16e7bbbc3c5a3bc1
acb8c10b5074ad3d85a031e94286be7e
打印凑够n分钱的最小硬币组合
if (N <= 0 || N > 1024){return 0;} int money = 1024 - N; int num = 0; int mod = 0; int sum = 0; int[] moneys = {1, 4, 16, 64}; for (int i = moneys.length - 1; i >= 0; i--) { sum += money/ moneys[i]; num = money/ moneys[i]; mod =...
0
9589c0c00c0a8f23c18b63e7fd4cc5ae
921b0696c886e6641a852a8a485f99ad
Use the min max algorithm to get best possible action given utility function.
for i in range(len(util)): mover = i + np.argmin(util[i:]) (util[i], util[mover]) = (util[mover], util[i]) return util
0
16d0f03f96316d25b83d52773c7a66d7
43e51e2be18123bd916e48a09b8d6a39
Invokes the sent data event.
namespace InputEvents public class LeftBasic : SubscriptionData public override void Send(InputEventInfo _inputEventInfo) { subscriptions.Invoke(_inputEventInfo); }
1
f8c51e617253faa5b2184a0e8e473f30
f317c803b9f218cddfb1da7bcd9ee64d
将null值转换为空字符串
if (arg == null || "null".equals(arg)) { return ""; } else { return arg; } }
1
f1210d992827c0b6f9d13866efa2b607
778bf60fa3c3848d41a2c32cc5fc94b5
fonction pour mettre à jour le mode de paiement
{ Database connexion; QSqlQueryModel * modalModePaiement = new QSqlQueryModel(); QSqlQuery* queryModePaiement = new QSqlQuery(connexion.maBaseDeDonnee); queryModePaiement->prepare("SELECT TypeModePaiement FROM ModePaiement "); queryModePaiement->exec(); modalModePaiement->setQuery(*queryMod...
0