query_id
string
corpus_id
string
query
string
code
string
label
int64
c7cae6687a827d3a07cfd2c7d8f156a7
b9ef25b88a5f03af7f4d4bd7ba6a21d9
Return a copy of ourself.
public class Person Person returnItself() { return this; }
0
7d3284f2401c4836769e31f72fbbc580
4b7dc297d56e1d54268801397868ad8a
Push Device 목록을 조회한다.
@Service("EgovPushDeviceAPIService") public class EgovPushDeviceAPIServiceImpl extends EgovAbstractServiceImpl implements EgovPushDeviceAPIService public List<?> selectPushDeviceList(PushDeviceAPIDefaultVO searchVO) throws Exception { return pushDeviceAPIDAO.selectPushDeviceList(searchVO); }
1
eaf3b48d86607f10c8f8d7313d0392fb
9b42360cddcaedfe384c984e8e065423
同步请求获取数据
public class OkHttpActivity extends BaseActivity implements OnClickListener private void initSyncData() { new Thread(new Runnable() { @Override public void run() { try { request = new Request.Builder().url(URL.BOOKURL).build(); Response response = client.newCall(request).execute(); result = r...
1
6774d2235f515830923b8c607e14e510
8825a7afe328d1964f8c2a73cf40c035
会员金币兑换记录
class IntegralController extends InitController{ public function exchangeList(){ $user_id = $this->user_id; $page = I('request.page',1,'intval'); $pageSize = I('request.pageSize',8,'intval'); $site_id = C('SITE_ID'); $where = array(); $where[] = "user_id = '$user_id'"; $where[] = "site_id = '$site_i...
1
be05e15c74e08a733d8fc19a09dac918
0cbb4f70834b27be62917fabc2d41aed
This method handles all the errors numpy has with type-changing. While testing, the types of the matrices and arrays would change from epoch-to-epoch and were uncontrollable. This method attempts to fix this issue by deleting the variables and then re-initializing them. Also used by the inputOutput method.
global u, v, w, ux, uy, uz, vx, vy, vz, wx, wy, wz,\ omegax, omegay, omegaz,\ uhat, vhat, what, phat, nonlinuhat, nonlinvhat, nonlinwhat,\ xx, yy, zz, kxm, kym, kzm, kkm, \ temp, temphat, utemp, vtemp, wtemp, uhattemp, vhattemp, whattemp,\ intFact, dealias, for...
0
ee858323075cc787eb1acb3d9d2480fa
b2e5dfce39953558fae2923314d8539a
Allow network access within a test context
@SuppressForbidden(reason = "use http server") public class Ec2NetworkTests extends AbstractEc2DiscoveryTestCase @Before public void setup() { AccessController.doPrivileged( (PrivilegedAction<String>) () -> System.setProperty( "aws.ec2MetadataServiceEndpoint", "ht...
1
d0a06fdcc89ede9fac842b8d9ca16b99
fa56e432ea29f1c44b942e6baf086647
把前一天买的票合并到可卖列表中
for movie1 in mao_tickets: tickets.append(movie1) for movie2 in shi_tickets: if movie2['city'] == movie1['city']: if movie2['cinema_name'] == movie1['cinema_name']: if movie2['name'] == movie1['name']: for day1 in movi...
0
a27402c9d571b163cdf6af50e7d51d7d
c33d2dd70fc67235c487bfcb25ec6d61
Restores the environment from a soft delete asynchronously.
namespace Core.Arango.Modules Task RestoreAsync(string id, CancellationToken cancellationToken = default);
1
ef67140c6c6de047f212b57582ac7904
7cef938650eba780e8837e6018551df4
Called when the user clicks the unlock button
namespace OpenDental public partial class FormPayPlanDynamic : FormODBase private void ButUnlock_Click(object sender,EventArgs e) { UnlockTerms(); }
1
1d37ec5084097cfbaba90af3e386af53
80cacda24e14a740998cf75047f2bdb9
请求查看其他公会
function GuildManager:request11103(_name,_notice) if name=="" then NoticeManager.Instance:FloatTipsByString(TI18N("请输入公会名称!")) return end Connection.Instance:send(11103, {name=_name,notice=_notice}) end
0
fb868e9ab7cfcf5b9b7eef115c4c0e7b
5357f29f8afb55394dc7d85eb41692d3
Parse the given fieldset and append any related resource keys.
{ $keys = $metadata->getPublicKeys(); foreach ($keys as $key) { if ($key['type'] !== 'X509Certificate') { continue; } if (!isset($key['signing']) || $key['signing'] === true) { $this->addX509KeyDescriptor($rd, 'signing', $key['X509C...
1
da70f9e197733143889e07e9c45bad91
e01c4e5f4dfe75e509c9ac2ff21579e3
Show how the references to the business object are affected when it is wrapped into a bindable and also how the references to the bindable work. As you may see the business object is not updated but the bindable object that wraps it.
public class Sample implements EntryPoint public void onModuleLoad() { TextBox textBox = new TextBox(); TextBox l = new TextBox(); final Person p = new Person(); final Contact c = new Contact(); p.setContact(c); c.setEmail("jrydberg@jrydberg.org"); p.setName("jrydberg"); p.setAge(30); ...
1
d3edbce281097cffb605f09cf9e8b9e2
c8da0e88fbc20099a89af92cd8d5328c
Returns the google maps api key set through the plugin options.
{ $settings = SiteManagement::getMetaValue('settings'); if (!empty($settings[0]['gmap_api_key'])) { return $settings[0]['gmap_api_key']; } else { return ''; } }
1
7e08a99c1f316d197bc04beafae6eae9
62cf9e79d0673df145db2c4fcf8a1eff
获得985大学列表
url = 'https://in985.com/api/v1/history/college?OrderIds=&ProvinceIds=&Keyword=&PageIndex=1&PerPageSize=3000&subject=0' headers = { 'Cookie':'Hm_lvt_7f9735c173e6f4dfe9097fa62a339f96=1592140773,1592191119,1592273437,1592354849; xueyiyunOAuth=eyJBbGciOiJSUzI1NiIsIlR5cCI6IkpXVCJ9.eyJJc3MiOm51bGwsIlN1YiI6Ij...
1
0d55720414561cffc5a80ca1be04c60d
37bfc287458fed6bdd227b67bc084293
判断用户是否有权限发布成绩信息
public String changeScore (){ User host=(User) session.get("nuser"); if(host.getUserpower()!=1){ return "ok"; } Systemscore syso = bizService.getSysScoreBiz().findAll().get(0); session.put("syso",syso); path="modify/modify.jsp"; return "ok"; }
1
de659c297ce9e319007f8929b8c68dab
4e18ae172df5fc6655c916c1a80dd192
Make an activity feed for a portal.
import operator ctype = get_object_or_404(ContentType, pk=content_type_id) actor = get_object_or_404(ctype.model_class(), pk=object_id) activity = cache.get(actor.username+"perso") if activity is None: activity = models.actor_stream(actor).order_by('-timestamp') cache.set(actor.usern...
1
c50d74aa311979d74708eb5f77d3db30
42b1a5ec69c2b4446a92a41bcd4fe8e6
Configures the HCI transport to operate with a host. The transport will execute specified callbacks upon receiving HCI packets from the controller. event. callback. data. callback.
static A_STATUS bt_setup_hci(AR6K_HCI_BRIDGE_INFO *pHcidevInfo) { return A_OK; }
0
af8df9c26e5ea5315cec1d4c8303bc4d
cb47f8fec87c95b874e1ba8581efff39
最大公約数を得る関数(ユークリッドの互除法)
int gcd(int a, int b){ int tmp, n; tmp = max(a,b); b = min(a,b); a = tmp; while(b!=0){ n = a%b; a = b; b = n; } return a; }
1
bbf4f79fc3c652ee6c4b64ad983f9863
14d3f18859bf4b22671f8b04c9cb2fbe
Data provider for property subscriptionStatus
class ShopHelperTest extends CakeTestCase public function adminStatusDataProvider() { return array( 'all-inactive' => array( array( 'ShopProduct' => array( 'active' => false, 'available' => '2050-01-01 00:00:00', 'category_active' => false ), 'ShopBrand' => array( 'active...
0
79719c6d3f0750b0a35b2f30b2d5c7ef
18dcc0128c656cd9fdfcf43c56203a37
미션 진행사항 저장
{ if (GameStatus.gameStatus.status == GameStatus.Status.onSaving) { PlayerPrefs.SetInt("conquest" + "questlistcount", questlisting.Count); for (int i = 0; i < questlisting.Count; i++) { PlayerPrefs.SetString("conquest" + "questname" + i, questlisti...
1
ac16d346e57147d11a9a500bfed5b943
f1f872b8d1a890fe9f009257b093687c
比对会议时间更新会议状态
class MeetingMain public static function meetingVerifyChange($data) { $changeMeeting = ""; foreach($data as $key => $row) { $changeMeeting .= "{$row['meeting']},"; } $changeMeeting = rtrim($changeMeeting,','); $startUpdate = array( 'where' => array( ...
1
b1e4850a1dfb6a2b87183295008a50b2
a5fbda910f4fbcf6216f84ba35c2164b
Returns the symmetrical difference between two collections
c_1 = set(set_1) c_2 = set(set_2) return (c_1 ^ c_2)
1
4f72ee16c6812c5aecd084920bb40c6e
8c97f05b21787503b04d64746912bb08
日结按钮按下
var retFlag = false; var curDate = new Date(); var data = { storeID: userLoginInfo.StoreID, cashboxID: userLoginInfo.CashboxID }; ajax("/Login/IsDailyDebit", data, { async: false, callback: function (res) { if (res.IsPass) { var ret = eval('(' + res.Obj + ')'); ...
1
60ea0e55f3a9f5d226d2205c808a464e
7cfb32e617fe27ab8382fa360b2fc2a6
Validates the format of user input
function validateInput() { var inputValue = input.value; const checkDate1 = /[A-Za-z]{3,9}?\s?[0-9]{1,2}\s[0-9]{2,6}/; const checkDate2 = /^[0-9]{1,4}[\s?\-?\/?][0-9]{1,2}[\s?\-?\/?][0-9]{2,4}$/; const checkTimestamp = /^\d{1,20}$/; if (inputValue != "") { if (!isNaN(inputValue) && inputV...
1
5625fee3bae307b8577ab3c811a38188
6a5014d3d8b14fb6423862e35d921803
Tab index of the quantitative tab
namespace OpenCOR namespace Core int CentralWidget::modeTabIndex(const GuiViewSettings::Mode &pMode) const { switch (pMode) { case GuiViewSettings::Simulation: return mModes.value(pMode)->isEnabled()? mModes.value(GuiViewSettings::Editing)->isEnabled()?1:0 :-1; ...
0
23fb62db1dd8d429744e4dbd1eefeadd
3e649f9239c8fffa3e761b4acdbad496
This method returns a void pointer to the data in the node that the iterator is currently pointing to
std::pair<unsigned long, int> object_iterator::operator * (void) { return *current_; }
0
5024cc8cdeaca0de994bdebab685ddb5
44a0980e5f196542732fb2832a48a2de
Adds all content from another dictionary.
{ if (that is null) { throw new System.ArgumentNullException(nameof(that)); } if (dictionary is null) { throw new System.ArgumentNullException(nameof(dictionary)); } dictionary.Keys.ForEach( ...
1
5a674c7d8c6d3ad0dbed0e286caf9533
dfc454a4e20c3c5540d6be10737c1813
Unsets the Cell width associated with the given screen size
class Size extends QueryEmitter public function unsetWidth(): void { unset($this->params[self::PARAM_WIDTH]); }
1
5c7d8eaa8524a72b516796a03ee70e9a
2e54ec34ffc38984b6cf62d17e8ee15f
Access is controlled by the Parent
function SIMPLOO.FUNCTIONS:____do_check_parent_access(_child) local level = {} level[_public_] = 1 level[_private_] = 2 level[_protected_] = 3 if not self.___instance then for parentName, parentObject in pairs(self.___parents) do SIMPLOO.FUNCTIONS.____do_check_parent_access(parentObject) en...
1
a825cf78eb1a3c074071704648833f16
aea5099f1a41f5d95e995a58068e1f9a
Формирует мапу, где ключ - поле с id, значение - лист значений всех колонок.
abstract class DataManager extends Entity\DataManager final public static function getMap() { IncludeModuleLangFile(self::getFilePath()); $instance = static::getInstance(); $fieldsMap = $instance->_fieldsMap; $connection = Main\Application::getConnection(); $className = get_c...
0
54e4ea34daf1b45da2ce22fda13b535a
722270b23e1db6fc19335aa31774e398
Создает таблицу для кэша, если она отсуствует
{ $fields = $this->sqlite->query("PRAGMA table_info('zcache')")->fetchAll(SQLITE_ASSOC); if (empty($fields)) { $this->sqlite->queryExec("PRAGMA encoding = 'UTF-8'"); $this->sqlite->queryExec("CREATE TABLE zcache (key text(32) not null primary key, value text not null)"); ...
1
3782e33625127eaf376f82db83b45742
45c475037c3c73d7465445deccd3ea6a
Finds the length of the prefix added to the plaintext before encrypting.
char buffer[256]; memset(buffer, 'A', 256); char * base; int len = oracle.encryptECBprefixed(buffer, 256, &base); char * change; buffer[0]='B'; oracle.encryptECBprefixed(buffer, 256, &change); int pBytes = 0; for (int i = 0; i < len; i++ ){ if ( base[i] == change[i] ) { pBytes ...
1
593d0a957abf90bcf0c21f4f3042b5d8
5cfa68fcf48097be1c47eea633c86c03
自定义rbac权限控制器,还可以自定义SecurityMetadataSource实现RBAC 其他一些实现:WebExpressionVoter、AuthenticatedVoter
@Configuration public class SecurityConfig extends WebSecurityConfigurerAdapter @Bean public AccessDecisionManager accessDecisionManager() { List<AccessDecisionVoter<? extends Object>> decisionVoters = Arrays.asList( new WebExpressionVoter(), roleBasedVoter(),...
1
dedd959e7a28dfc3fb821b684ac3b9e7
7067b0e3212a33098d07746079be76c7
Compares entries on their map identifiers
public class MultiExtractor extends AbstractCompositeExtractor public int compareEntries(QueryMap.Entry entry1, QueryMap.Entry entry2) { ValueExtractor[] aExtractor = getExtractors(); for (int i = 0, c = aExtractor.length; i < c; i++) { ValueExtractor extractor = ...
0
885f78e3637ae9ca240412cf75f34be1
3b1999aa35d4624985ca8874e7478c7e
Copies a file object into the hooks file system.
import os reload(os) if not dst_ip: dst_ip = self._dst_ip source = self._wrap(os.path.abspath(source)) dst = self._wrap(self._double_the_slash(dst)) return self._submit_request('FS', 'COPY FILE %s TOFILE %s TOMACHINE %s' % (source, dst, self...
1
95e19e24c63ccfbb507558ac991824f9
6af95aaebb93c647c58ae2c674b46a64
@brief implements the reserve SEL command
output = "Test step: \n1. Reserve SEL: " sleep(1) ret = util.exec_ipmi_rawcmd(case.sysConf, case.interface, "{0} {1}".format(self.netfn, self.reserveSelCmd)) if ret[2] !=0: output = output + "Fail({0})\n".format(ret[0].decode("utf-8").strip()) return output, ret[1...
1
d987358cc85ee323434731351646cbb2
9a63ba32a2aa687a39c0875d897cd29b
flippa le y dei punti del contorno
public class FigureModel extends Observable private void invertPoints() { for (Point pt : points) { pt.setY(pt.getY() * -1); } }
1
06f32195c8ee439be29ad7c34f2666ff
1f53439ca47a18e527e3f017b46e78f0
Возвращает сумму двух многоразрядных чисел:
if len(b) < len(a): a, b = b, a c = '' summation = 0 for i in range(1, len(a) + 1): summation += int(a[-i]) + int(b[-i]) c = f'{summation % 10}{c}' summation //= 10 for i in range(len(a) + 1, len(b)+1): summation += int(b[-i]) c = f'{summation % 10}{c}...
1
73dd716a8807ee4065d402565d789944
24d8eb3f1846885168bab8c359e17354
Creates a NuGet.config file with the default settings at the given full filepath.
namespace Bloom.Data.Interfaces void Create(string filePath);
0
0d209c45b9209a87b82457b767daf1f3
442bc14e8510fc3a37b17bba38d0d10f
Sets the value of the processing property.
@SuppressWarnings("serial") public class MSS_MessageSignature implements java.io.Serializable public void setProcessed( final boolean processed) { this._processed = processed; this._has_processed = true; }
1
13e50aa650c8ec4d887047dae4f99647
8bd6a1dd3e10e5e8a7cc2fd176f6badf
Translates the mesh along the Oy axis.
namespace asgn5v1 class NetTransformationBuilder public void MirrorOnZ() { multiply(new double[4, 4] { { 1, 0, 0, 0 }, { 0, 1, 0, 0 }, { 0, 0, -1, 0 }, { 0, 0, 0, 1 } }); ...
0
480b70c55f79eb4084eddf8622e3df5d
df934526bcd22ade2271cf8489d4aa8c
Sets up the highlighting mechanic.
self.highlightFrame:Show() if button == "LeftButton" then self.highlightFrame:SetBackdropBorderColor(unpack(RGGM_CONSTANTS.HIGHLIGHT.highlight)) elseif button == "RightButton" then self.highlightFrame:SetBackdropBorderColor(unpack(RGGM_CONSTANTS.HIGHLIGHT.remove)) end C_Timer.After(.5, function() ...
1
4cc5fa4aa250919bc9ae1bde302bb8c8
de5bd2fb69eae8556dcade757c83dcd7
Returns a string in the format 'xx.xxxx,yy.yyyy'
namespace DFT public class GpsMetadata public string ToLatitudeLongitudeDecimalString() { return string.Concat(_latitude.ToDoubleString(), " ", _longitude.ToDoubleString()); }
0
145ea579ae8c9b7b705ff369dbd0b7fe
a5793bdb5b66109f88ca05e38368b406
Flush all TTY queues
int DCALL DeeFileBuffer_SyncTTYs(DeeFileBufferObject *or_unlock_me) { int result = 0; for (;;) { DREF Buffer *buffer; buffer_ttys_lock_acquire(); buffer = buffer_ttys; while (buffer && !Dee_IncrefIfNotZero(buffer)) buffer = buffer->fb_ttych.fbl_next; buffer_ttys_lock_release(); if (!buffer) break; ...
1
184a53d8952237e7e0e3602ae42d4a38
e03cc7047e1ea7e8831a45c3ec30130b
Elimina un domicilio con la información enviada como parámetro.
class AddressController extends Controller public function destroy($id) { request()->merge(['id' => $id]); $deleted = $this->funDelete(request())->original['code']; if ($deleted == 200) { return back()->with('success', 'Dirección eliminada correctamente'); } else { ...
1
ff537aa6e339cbc175392b9cdbbf4a63
fe255f35c547792540bbe10dae45e2ef
Devuelve un listado de los {@link Credencial} que se encuentran en persistencia.
List<Credential> findAll();
1
4da0f77cb03a21057b39265ea6e2403f
5c2bc68dca489fa1789f846beb4a057f
Server-defined value for pagination. Pass this to the next call to resume getting results where this call left off. Omitted when there are no additional pages after this one.
public class FileList extends GAPIResult public native final String nextPageToken() ;
1
298b785026b6aacf381f73dff27482b4
0be7b80ec66db00c0540bbbc50ebe1e0
this method returns a regex that represents the "or" operation on the given keywords. (without grouping them) them)
def generate_regex(search_terms): result = r"".join([r"\b"+term+"|" for term in search_terms]) return result[:-1]
1
227a67165d865b2891fbe6214fcc38f4
d7df5effa7d8515475b4c55d852449bc
更新为租客确认已经收到押金退款
PtProductOrder ptProductOrder = ptProductOrderManager.find(id); ptProductOrder.setRemark(remark); ptProductOrder.setGroundPersonId(personId); ptProductOrder.setState("2"); ptProductOrder.setPaidanPersonId(userKit.getCurrentUserId()); PtChange ptChange = new PtChange(); ...
0
3a30500d00bea4e43803c3396116a975
db9807935c86a916ba42c8426839d4f2
spread的ButtonClicked事件,用于第一列checkbox的点击。
{ if (_htSelIdxs.Count == _iRowCount) { for (var i = 0; i < _iRowCount; i++) { fpGasConcentrationProbeDataInfo.Sheets[0].Cells[_iRowDetailStartIndex + i, 0].Value = ((CheckBox) sender).Checked; ...
1
fbcbf687a3dad3a01e635fcd29ac7153
bfc0360261dbdad8f6f9a4d87613b9e1
Função que retorna os produtos permitidos por usuário.
class ProdutosController def produto_params params.require(:produto).permit(:nome, :qtd_estoque, :preco) end
0
08d3c13dc2672e62ad90b3c66e2ed452
3e6f7d81403c049c511ff290da4399ab
Dashboard layout component containing user account information.
@Controller @RequestMapping(value="/accounts") public class AccountsController @RequestMapping(value="/dashboard", method=RequestMethod.GET) public ModelAndView dashboardView( HttpServletRequest request, HttpServletResponse response) { HttpSession session = request.getSession(); ModelAndView view = null; if (...
1
ef375fd22399e622996c4fc1178ef7ed
988e7b71859fa1400c3aa41abec356cd
使用BeautifulSoup获取电影详情信息
soup = BeautifulSoup(html) movie_list = soup.find_all('div', class_='bd doulist-subject') return movie_list
1
1f5de28be53b40d08b33c8fc26e2fbe7
fb0fcb87dee3e33310ca210cb5ad56e4
正在取得3进制状态的某一位
class Bitwise public static function getStatus($status, $position) { $t = $status & 1 << ($position -1) ? 1 : 0; return $t; }
0
7be8b0bed76825170799d276aff806bb
a3669c0629e21fc0ecf4d629bac13534
<p>messageList を取得します。
public class LoadMessage public List<Message> getMessageList() { return messageList; }
1
093aaec3b3a2ba6be35fe7c8fc6bb23f
b75a928acef9792501f0e7bb453a02f6
Get country of proxy IP address
{ $geoIP = $this->getGeoIP($ip_address); if (!empty($geoIP['country_name'])) { return $geoIP['country_name']; } return ''; }
1
0db7a76b6705b8af604bae6220d36dee
0ad39a024b2e2ab375ff7b0e6625d55e
电子病历首页
@Controller @RequestMapping("/" + Constants.APP_PATH + "/ToolBoxController") public class ToolBoxController @RequestMapping(value = "/excindex", method = RequestMethod.GET) public String excindex() throws JEDAException { return viewPrefix+ "excindex"; }
0
f7b8d6a394ffc079c7d01ba369a98dcc
586f7e3c3ffb972c39a0122c36c17665
validate error for too many one-line method args
if docstringContext is None: return lines = docstringContext.source() if len(lines) > 1: nonEmptyLines = [l for l in lines if l.strip().strip('\'"')] if len(nonEmptyLines) == 1: modLen = len(context.indent() + '"""' + ...
0
505d4c530ab517943bff55e090e7848e
f834f22afc75c57711c8a183c5db08d7
ubuntu下判断是否插入了U盘
def detect_u(): for item in disk_partitions(): print(disk_partitions()) if 'removable' in item.opts: driver, opts = item.device, item.opts print('发现usb驱动:', driver) return driver, opts else: continue return 0
1
35bf2b9d0f719b74bfa92a3d422c4c89
775710df395c677f8a4aa782726f1cbe
Tests that the statistics endpoint retunr a JSON-like object.
class ServerN26Tests @Test fun statistics_endpoint_returns_json_like_object(){ val httpHelper = HttpRequestHelper() val response = JSONObject(httpHelper.sendGet(statistics_endpoint)) Assert.assertEquals(response.javaClass, JSONObject().javaClass) }
1
5ea62b02131d34a39815a0a57ffb5f9f
6c5402cb7e2064f31f2db33c43eb174e
端口读入一个字
int llread(int fdPort, unsigned char* buffer) { return read(fdPort, buffer, 1); }
1
8a72bcdaee4a5704e35c91d8458ef5fb
ccff779af119c1f3b7696cfa6c87722d
字符串转hex
class UDSAuth function string2hex($str) { $ret=""; for($i=0;$i<strlen($str);$i+=2) { $h=chr(hexdec(substr($str,$i,2))); $ret.=$h; } return $ret; }
0
fc477cfb4b4b0720874829862b2d7e67
5b44ce81b001cf61b93a03d4e5420550
Places the move and flips all necessary positions in all possible directions.
if (direction == Direction.DOWN) { rotateNTimes(3); } if (direction == Direction.UP) { rotateNTimes(1); } if (direction == Direction.LEFT) { rotateNTimes(2); } initializeMergeable(); boolean changesHappened = moveTilesLe...
1
3cdca2d098a9a064f0c1d3af7970584b
02a97448a64899ec626b0ce078c42bd8
============================================================================= Implementation of thread-safe circular queue for local use =============================================================================
class CleverBlockQueue(BlockQueue): def __init__(self, *args): list.__init__(self, *args) self.theta_last = None self.memo = None
0
6ff0ade9f379357b91836dbb21318e84
6b791732d1a0379871af8872ab959c61
Regression test for https://github.com/Textualize/textual/issues/3053.
source_markdown = """![foo](</my url> (title & treaty))""" expected_tokens = [ "[para(1,1):]", "[image(1,1):inline:/my%20url:title &amp; treaty:foo:/my url:title & treaty::foo:True:(:: :]", "[end-para:::True]", ] expected_gfm = ( """<p><img src="/my%20url" alt="foo" title...
1
1e510b353845005ea46ea6f63ed2536e
3e68a10b14f1c6f707b312a8665b3cb8
异步获取栏目信息
async getCategorylist(ctx) { console.log('getColumnlist') console.log(ctx.request) let parentCategory = ctx.request.body.parentCategory const Category = mongoose.model('category') if(parentCategory != null && parentCategory !=undefined){ console.log('获取所有上级栏目为:'+paren...
1
8350d544532d7ac11297a9f1e14b8662
dc46ad431e15aaf1cf3473fa1e145e44
Calculate "Acc" of sentiment classification task of VLSP 2018.
def Get_Acc(split, path, num): accs = np.zeros((num, 1), np.double) p = np.zeros((num, 11, 2), np.int64) l = np.zeros((num, 11, 2), np.int64) filename = glob.glob(path + '/' + split + '2/pred/*.txt') for ind, file in enumerate(filename): dd = filename[ind].split('\\') count = 0 ...
0
d883ae3097e41aff2b131ab393b7a506
d7fb58fac2eab5fc4e787d41ed36f9d8
Set alignment of a database handle.
ret_ad, args = jitter.func_args_stdcall(["hDatabase", "hDatabaseReference", "szTransformFile", "iReserved1", "iReserved2"]) raise RuntimeError('API not implemented') jitter.func_ret_stdcall(ret_ad, ret_value)
0
d93a54f0d30dc579c7a4a5b0d9f8519a
2dfef2cc1872b68acc26f842cd83cae4
Swaps the toggle state. Used when editing Name and Version, will show input boxes.
namespace Merlin.MUI void ToggleState();
1
d47c86f9611a7f79d2ab98a32bbb306c
6b894b697b3f88175504228035ca8e71
Gets the number of rows in this <code>Column</code>. Same as <code> getCapacity()</code>.
ColumnTableModel model = (ColumnTableModel) _array.getModel(); ColumnData data = model.getColumn(0); return data.getRowCount(); }
1
38163e6223b268a20c2cdabf43f6d846
d1944aa9de87c4bc1435cf197db2a31a
Delete all information about user nodes. This is useful if the same node is used for the syntactic and semantic stages, and it should only have 1 user.
class Basic: def clear_user_nodes(self): self._user_nodes = []
1
12f12c9ad5221da8a66f4eb5d9f0db75
0a2c4de2f54fcfd0d17fdd08a0d1b0c2
从Excel文件中提取水源井表数据前导入数据库(支持多文件)
{ var dbTableList = ExcelBLL.GetTableNameList(); IgnoreSheetsBLL.Reset(); foreach (var fileName in fileArray) { ImportExcel(fileName, dbTableList); } }
1
1020721848875c92f0051ba8254f6029
283c26c8a48b6fec70effd282875ca63
get backprojection on/off
void gxback ( void (*fproj) (gadouble s, gadouble t, gadouble *x, gadouble *y)){ bconv=fproj; }
0
0b34dfec40515a5c58854c5be6893748
d72e7009c2cfc3af52a0f82041d891dc
Cosmological luminosity distance function
def lum_dist(dr,z): return dr * (1 + z)
1
e2f9b2fe5eda13e8656ad9015d5ca6e1
8ebac75e5377b3e6065d8295b48a9bac
Delete a single scheduled broadcast or a recurring scheduled broadcast for a channel’s stream schedule. <para>Provided broadcasterId must match the user_id in the user OAuth token.</para> <para>Required scope: channel:manage:schedule</para>
namespace Amazon.MediaLive Task<DeleteScheduleResponse> DeleteScheduleAsync(DeleteScheduleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken));
1
a54854696133ba731ecf3c39aabc5e6b
afe57e3178e49e593974ce289320d60f
Lists available configuration file choices.
class Camera: def list_configs(self) -> Iterable[str]: raise NotImplementedError()
1
226ee7f5836923f7e879e8b0dcda3334
6ef1c0fa196ecb14a6033b619d63e92e
remove debugger internals from Traceback
def patch(): types.CodeType.co_consts = [] def runcode(self, code): try: exec code in self.globals, self.locals except (Exception, JException): self.showtraceback() debug.console._InteractiveConsole.runcode = runcode def debug_application(self, environ, start_resp...
0
c18132dde1f5c11f7dd446094a25c7e1
f96a1c7144716786969e1926a12bfa9e
Process all selected posts.
abstract class PUM_Abstract_Upgrade_Themes extends PUM_Abstract_Upgrade_Posts implements PUM_Interface_Upgrade_Posts public function process_post( $post_id = 0 ) { $this->process_theme( $post_id ); }
0
be8c5da3ed7143aa3a93f0b722a43981
84821a0160660cc344ee929898f7b54d
Questa funzione esegue di seguito i test, restituendo i valori in dizionario.
def run_test(world, solver, interpretator): time1 = time.time() commands = solver.solve(world['source'], world['name']) time_taken = time.time() - time1 try: score = interpretator(world['source'], commands) except: print 'Commands: ', commands print 'Map: ' pr...
1
38d7522cf175e259d497b2887d422d49
7915a621bd71378425b26eb2f882f41d
Löscht selektierten Favorit
if (value) { document.getElementById("deleteFav").style.background = "#E1677D"; document.getElementById("deleteFav").disabled = false; if (!selected.includes(product)) { selected.push(product); } if (selected.length === favorites.length) { document.getElementsByClassName("deleteAllSel"...
0
bec1685e377881a34a2dffd80222249d
2bc8214711e58c7d16bd15e0ef3d1190
Code to Execute before Hibernate Starts Up to do alter tables, rename tables, drop tables, create tables
SessionImplementor session = (SessionImplementor) entityManager.getDelegate(); Connection connection = session.connection(); String schema = (String)properties.get("hibernate.default_schema"); if (!hasTables(connection, schema)) { String dialect = (String)properties.get("hib...
1
890ea72d4fc78ce8baa2f42d66c3716b
c0bb9b81ac6fd5cefae14a933395be18
Categories data for render as select options
categoryPanelCheckBoxData(state: State) { return state.categoryList.map((category: Category) => { const { id, label, isActive: checked } = category; return { id, label, checked, }; }); }
0
b4a90bac96c3a27b88ca12884f565bce
5089f53eb9eb844fe1b049d74bcea6df
显示气球信息
public class TutorScreen : MonoBehaviour public void ShowBalloon(string menssage) { talk(); BallonText.text = menssage; }
1
876373024026f33dc5d3d1b7c08b8f08
55f7fa3f6287783f8881cac347310be7
新增调拨单
class Allot extends Backendbase public function allot_add(){ $res = input('post.'); $in_shop_id = $res['in_shop_id']; $out_shop_id = $res['out_shop_id']; if($in_shop_id =='' || $out_shop_id ==''){ return json(["code" => -1, "msg" => '参数错误', "data" => '']); } ...
1
9af4f339de2e2e53dc1164e91198833d
88fe7ca33d8f39b34b74f5eb860fd213
Gets the CloudTable by name.
{ var storageAccount = CloudStorageAccount.Parse( CloudConfigurationManager.GetSetting("StorageConnectionString")); CloudTableClient tableClient = storageAccount.CreateCloudTableClient(); return tableClient; }
0
3092b49596c8e63b5e5d67c3d218919c
b8bbbc2ef30d30b16a509630a62e30be
将2转换成2进制,向左移动3位
public class NQueensAllAnses public static String toFullBinaryString2(int num){ StringBuilder sb =new StringBuilder(); sb.append(buffer).append(Integer.toBinaryString(num)); return sb.substring(sb.length()-31); }
0
d3430c629f7d80f3ba29053e98b01364
942f69884be527bc5abe5d06255ac124
return a Table from a given Table that satisfies predicate p
if (listCopy == null) { return result; } else if (consp(first(listCopy))) { result = someAux((Cons) first(listCopy), result, p); } else { if (p.pred(first(listCopy))) { return first(listCopy); } } return someAux(rest(listCopy), result, p); }
0
aca24bb60dc88fdad78be33ed0613713
86b4806473ed91c644bc5e75971b45ac
set the array of distance values from all MGRAs to the final destination MGRA of the stop.
public class StopLocationDMU implements Serializable, VariableTable public void setDistancesFromOrigMgra(double[] distances) { distancesFromOrigMgra = distances; }
1
e3c95037bcd32cf4ad51de3261ecec47
91a71f854370d8b0057595a721a9a028
Setter for the trajectory color
public class UIManager : MonoBehaviour public void TrailColChanged(Color col) { desiredTrailColor = col; }
1
a7e13d1d032fef8f0aa1508ba6f02381
ece720085832c73ef7ed55a48d415102
odnalezienie ucznia o podanym numerze księgi w bazie danych
{ using (var db = new SchoolContext()) { var stdGuid = GetInscriptionByGuid(inscriptionGuid)?.StudentGuid; return db.Students.Find(stdGuid); } }
0
1295d09f9f94aa48ceaac78b27956bcd
3c427d9e26d2798ebab4ae9608edd4e2
! Executes the scheduled layouts without waiting for the event processing to begin. \sa scheduleDelayedItemsLayout()
void QAbstractItemViewPrivate::_q_layoutChanged() { doDelayedItemsLayout(); #ifndef QT_NO_ACCESSIBILITY #ifdef Q_WS_X11 Q_Q(QAbstractItemView); if (QAccessible::isActive()) { QAccessible::queryAccessibleInterface(q)->table2Interface()->modelReset(); QAccessible::updateAccessibility(q, 0, QAccessibl...
1
cad26f26132e231bd2fe9b826f6c3e2a
007ae12d619bf6e873a98deb9f830410
Disable sql_mode validation because it's unsupported
class MySqlConnector protected function setModes(\PDO $connection) { $version = $connection->getAttribute(\PDO::ATTR_SERVER_VERSION); if (version_compare($version, '5.7') >= 0) { $mode ="SET SESSION `sql_mode` = ''"; } elseif (version_compare($version, '5.6') >= 0) { ...
1
b678e23bf73462059de7472dd0faa8a1
c8aeea0fd19736789cee42142ee9c076
Sets order reference details such as the order total and a description for the order.
public class PayboxUrlItem public void setOrderReference( final String orderReference ) { this._orderReference = orderReference; }
0
2f363efe2d57617dc0e288ed8c96162b
cd3948957fa6cfea9fb38b20df287454
获取action对应view的物理文件地址
{ $pathViews = $this->getPathViews(); return $pathViews . '/' . $viewName . '.phtml'; }
1
503f90ff108f49c6022be59d56596b15
5105a8927d7dae87a1dd60a535aed53d
FindArgumentOfType walks over the given argument list, looks for an argument with the given type, and returns the argument if it is found.
resources: IResourceInfo[], pc: TemplatePositionContext, funcCall: TLE.FunctionCallValue, parentStringToken: Json.Token, maxIndex: number ): { argIndex: number; typeExpression: string } | undefined { for (let argIndex = 0; argIndex <= maxIndex; ++argIndex) { let argText: string | undefin...
1
87c502fe7af095b9265896528d23f083
fb7b63fd5e5e2fb91e516a089d114f22
Completes a task and prints a completion message
class GearmanTest extends \PHPUnit_Framework_TestCase public static function gearman_task_complete($task) { call_user_func(self::$taskCallbacks[$task->unique()], $task->data()); echo "\nCOMPLETE: " . $task->unique() . " = " . $task->data(); }
1
1fea354b255711570641c6e1c9898ce3
dce141ab19e21482b1cf8b625a441353
TestLineNineAlphaNumeric validates ServiceMessage LineNine is alphanumeric
ben := mockBeneficiary() ben.Personal.Address.AddressLineThree = "®" err := ben.Validate() require.EqualError(t, err, fieldError("AddressLineThree", ErrNonAlphanumeric, ben.Personal.Address.AddressLineThree).Error()) }
0
55b0dcf09bef5ca60db9aac177c1b55a
a70e0d3f6012b096d1708471c16f7097
垫资户本金收益列表 页面跳转
public String redeemedMargin(Long id, HttpServletRequest request, HttpServletResponse response, ModelMap model) { model.put("currentDay", new Date()); return "/newt0/loaningQuotaApply/index1"; }
0
729a1dd9d7dd8a307e246a72e18bc3f5
5814844b200f2ab18d2f9d39a2ae09a0
show the IP list of this judge
function renderIps() { $.post('/vm/ips/', 'item=ips', __renderIps); function __renderIps(receive) { ipSelector.empty(); ipSelector.append(receive); } }
1
573292e0b292d020d728b011c9438db1
589dfdf61a9e873d121bf238675dd8de
check if the basis factorization has been updated
SEXP out = R_NilValue; int bup = 0; checkProb(lp); bup = glp_bf_updated(R_ExternalPtrAddr(lp)); out = Rf_ScalarInteger(bup); return out; }
1