query_id
string
corpus_id
string
query
string
code
string
label
int64
12cd2c744ebcb0082a6ec08d9f79c555
4b69e71d977faeb081a2ca79bccff7cf
Funkce, ktera prevede typ tokenu na index do precedencni tabulky.
{ switch (type) { case ElementType.INT: return 0; case ElementType.NAME: return 0; case ElementType.MULT: return 2; case ElementType.DIVISION: return 2; case ElementType.PLUS: return 3; case E...
1
b09f76d92dc58600efb2b5be4fb3d671
ee7dcda0842aa7059909182011afd244
Function to get next cbline number id
cur.execute("SELECT lineNo FROM serviceinvoices WHERE InvoiceId = %s ORDER BY lineNo DESC LIMIT 1" % (invId)) lineNum = cur.fetchone() if lineNum is None: return 1 else: lineNum = lineNum[0] + 1 return lineNum
1
64ac6aed3ebdf1faf8ca1d16e7ee016d
f9aec8612fa9a45f61444f58adde5c85
display current tip total
function tipAmount() { document.getElementById("tip-amount").classList.add("active"); document.getElementById("tip-percentage").classList.remove("active"); document.querySelector('#tip-percentage input[type = "text"]').value = ""; }
0
2b8edd4cb90b3c3b944b09a93f3acc75
f9bc888c9ae119da9d3692d5c5c4cb11
Устанавливает максимальную ширину колонки.
public function setMaxWidth($width) { if (is_numeric($width)) { $width .= 'px'; } $this->maxWidth = $width; return $this; }
1
3d69567e922be78bd6fa965e7918ceff
5946d587cf71350d4b13d43b53383d4e
funcion que valida que sea un numero la entrada
function NumDoc(n){ key = n.keyCode || n.which; tecla = String.fromCharCode(key).toLowerCase(); numeros = ""; especiales = [11,32,35,42,45,46,47,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83, 84,85,86,87,88,89,90,97,98,99,100,101...
1
e0b5140d1fb3c7d28914706f87fa5871
c3849f4c4b1c858ae4c95ad85a2efa62
Create all FOHM upload files, upload to GISAID, sync SFTP and mail reports for all provided cases
def main(): all_objects = [] for metric_choice in metric_names: dfs, hpo_names, percent_bool = \ startup(file_names=report_names, metric_choice=metric_choice) file_names, datetimes = convert_file_names_to_datetimes( file_names=report_names) dqm...
0
03dfc0382bec421f1fd289d846df82c1
b8eeb545b33deb331b558c961d82e4d7
设置报名人数,true为++,false为--
void setAmountPlayers (bool up) { if (up) BasicFunctions.amountPlayers += 1; else BasicFunctions.amountPlayers -= 1; }
1
61e071a3f03d07d0896a774c5b8d56d1
cdfcfe42914007c0ab4c9cad47b44074
Возвращает строки (со связанными объектами) и их количество.
{ if ($usedOnly) { $sqlQuery = ' SELECT COUNT(%1$s.%2$s) as mm_count, %1$s.* FROM %1$s LEFT JOIN tl_metamodel_tag_relation ON ( (tl_metamodel_tag_relation.att_id=?) AND (tl_metamodel_tag_r...
1
fff8e7e0e6fcdd2ed84336ae1a767861
51237b45307ee3a1b31302644a87ab5b
POST: api/commands
namespace MyApp.Controllers [Route("api/commands")] [ApiController] public class CommandsController : ControllerBase [HttpGet] public ActionResult<IEnumerable<CommandRest>> GetCommands() => Ok(_repository.GetCommands());
0
5f1429333d380849c00e20bd965e8443
d21c68f7ef3293c87ab599ad4dcef8e6
Fix for Master/Slave Campaign
namespace SueMoreSpouses.Behavior class SpouseClanLeaderFixBehavior : CampaignBehaviorBase public void DailyTickFixClanLeader() { if (Clan.PlayerClan.Leader != Hero.MainHero) { Clan.PlayerClan.SetLeader(Hero.MainHero); InformationManager.DisplayMessage...
0
f8ee4f4fcdf08eab2facd1588c50f569
3f40cef21d431b8092eca6056b6dc259
入荷作業集約作業No.を取得します。入荷作業集約作業No.は8桁の文字列で表されます。(例:00243070)
public class AfT251TohyoYoshiMaisuKanriEntity extends DbTableEntityBase<AfT251TohyoYoshiMaisuKanriEntity> implements IDbAccessable public ShohonNo getShohonNo() { return shohonNo; }
0
40978883e0166a8077026d87465ab646
17bf5f804b2d8a76f5eed17fa20f3ed4
Creates a new path with sub dir node.
namespace Simulated._Fs public class FsDirectory : IEquatable<FsDirectory> [NotNull] public FsDirectory Dir([NotNull] string subdirName) { return new FsDirectory(_allFiles, _path/subdirName, _underlyingStorage); }
1
9a6bd05dc35cad26e08b972a9c08160d
555efe921249956d1a7485d8b4063af8
Returns number of open slots for cards
int PlayCards::m_number_of_open_stacks() { int num = 0; for(int i = 0; i < MAX_COL; i++) { if (m_play_cards[i].isEmpty()) num++; } return num; }
1
6c8cb454d20fdb39454a396da445abe6
9cdb8ae664b537e5e93bb9e7451f46f8
Add a flag marker on mouse right click
ImageButton mark; boolean showDone = FlagSelectWindow.showDone.isChecked(); boolean showPriority = FlagSelectWindow.showPriority.isChecked(); boolean hideDone = FlagSelectWindow.hideDone.isChecked(); if (report.get("completed").equals("true")) { if (hideDone || showPriority) return; mark = new Image...
0
d4fff45270628880f991bd719a858e14
dd08cc665f23642065be3c3e8b48a613
通过UserId查询此技术员应有的记录
@Service @Slf4j public class AdminUserTechAuthServiceImpl extends UserTechAuthServiceImpl implements AdminUserTechAuthService public List<UserTechAuthVO> findUserTechAuthList(Integer userId){ List<UserTechAuthVO> resultList = new ArrayList<>(); UserTechAuthVO param = new UserTechAuthVO(); param....
1
bb620f70f4f9574460ce3fa5025addf1
0375338f651aea005a1bc40da04410e6
Returns serialized json string version of a {@link Customer} object.
public class CustomerSupplierModel @Override public String toString() { return JsonSerializer.SerializeObject(this); }
0
b97ba319444d9e8391428b1846a243c2
1018bf0e02e409d502f5b0f4d59d47dc
会话ID已更改.
void sessionIdChange(SessionData sessionData);
1
640cb0a5da66f087732e2f3346c5ef70
835778bea075d8f0cd6f16ea2f4b64d5
No one should be allowed to call this method.
void ZoneAdminRpcMethod::registerSelf(SipxRpc & sipxRpcImpl) { assert(false); }
1
ebf49efc1f7e3c5c411bb6517da70d93
065c75c39f2544516267bb425b26a684
Applies a well known set of security requirements to a default set of security settings.
const SecurityProtocolType NET_4_5_DEFAULT_SETTING = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls; if( ServicePointManager.SecurityProtocol == NET_4_5_DEFAULT_SETTING ) { ServicePointManager.SecurityProtocol |= SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; } }
1
1d72bd5832887e560eae0dad8cfbfdaf
4e2e6447ea1e6e77e5098a5aa08c0c68
使用回调来使用池子中的资源,无需手动释放 回调有 1 个参数:$instance(操作实例对象) 本方法返回值为回调的返回值
{ $this->beginTransaction(); try { $result = $callback($this); $this->commit(); }catch (Exception $e) { $this->rollBack(); throw $e; } catch (Throwable $e) { $this->rollBack(); throw $e; } return ...
1
238de08977dacafaf47870ab3d3b9955
8a62e1281769d806d2fd7eeeaeaa9a16
Gets the generic properties for DAO Connection Factory.
Map<String, Object> getConnectionProperties();
1
b1ebeaf650354a60e2148b98e004cca2
294fb74033ee5adce4fc3ff3719f33cd
判断是第一次进入,默认是 如果第一次进入则把本地联系人插入到数据库UserVO
{ SharedPreferences pref=PreferenceManager.getDefaultSharedPreferences(context); boolean isfirstOpen=pref.getBoolean("isfirst", true); if(isfirstOpen) { MyDatabaseHelper.helper=new MyDatabaseHelper(context, "LoveStockSaying", null, 1); SQLiteDatabase database=MyDatabaseHelper.helper.getWritableDatabase()...
1
80f13c1ec76dcd9be540d570396a0d1d
6b3f894fa008ef2d0107567e78230f2b
Из набора текстовых файлов, содержащих задачи создается один xml-файл, с набором тегов:
List<Author> author = new ArrayList<>(); String lastName2 = null; String firstName2=null; String title2=null; final String lastName = "lastName"; final String firstName = "firstName"; final String title = "title"; try { ...
0
e5a679eb082ddfef5a675dc9d991f272
80aaa5f1e288e1b75d92bed650e9f92d
微信奖品中弹窗里的配置页
@RequestMapping("mbay/gift/wechatConfig") public Object mbayGiftWechatConfig(@RequestParam("cnumber") String cnumber, @RequestParam("serialNumber") String serialNumber, HttpServletRequest request) { Result cres = (Result) getCampaignInfo(cnumber, false, false, true, true); if (!cres.getStatus()) { re...
1
cfaa7dfc8bb0f2fdeafa4917aedda45e
163264ff6eeb8602a045543183e0185e
新添加模块生成相应模块编码接口
@Controller @RequestMapping("/code") public class CodeController extends BaseController @ApiOperation("生成代码") @RequestMapping(value = "/generate", method = RequestMethod.POST) @ResponseBody @Permission(Const.ADMIN_NAME) public Object add(@ApiParam(value = "模块名称", required = true) @RequestParam String mo...
1
67a67ae4f5963517643ee0efb2033f0d
87cb1765dc716f5796deb728d1f79399
Sortiert das übergebene Array vom Index start zum Index end mittels MergeSort.
if (start < end) { int i = (start + end) / 2; MergeSort(array, start, i); MergeSort(array, i + 1, end); Merge(array, start, i, end); } }
1
9430bf5512eb2ecb9d9a544882c6f19a
8533b96bbd5c829d1ce79214831042c9
Limpiamos los datos del genero
document.getElementById("titulo").value = ""; document.getElementById("genero").value = ""; document.getElementById("id").value = ""; }
1
08024f9112b3f1accdac98eb42764b55
b0d8094e61fbc2a0602be4f86454b1ac
replaces short output names from date() with long Danish names
const abbreviations = ["eg", "ie", "am", "pm"]; for (let i = 0; i < abbreviations.length; i++) { const pattern = "{{typopo__" + abbreviations[i] + "}}"; const re = new RegExp(pattern, "g"); const replacement = abbreviations[i][0] + "." + abbreviations[i][1] + "."; string = string.replace...
0
0246c2f4922feadc8a32f9feb466c9a9
1db41a64d407df47ccda2d9ae4d6a1f2
Display matches, upon selection: pellet (correct) or timeout (incorrect).
interaction.disabled = true; if ( this.activePhrase.checkLetter( interaction.textContent ) ) { interaction.classList.add( "chosen" ); this.activePhrase.showMatchedLetter( interaction.textContent ); if ( this.checkForWin() ) { this.gameOver(); } } else { interaction.clas...
1
aa715137f027647f048d2d8add32ea77
95455ad2daa5873e68bfe8711e378cdd
Printing the list of games
class GamesController extends Controller public function index() { $games = DB::select('SELECT * FROM games'); $games = json_encode($games, JSON_PRETTY_PRINT); return view('pages/list')->with('games', $games); }
1
d4c73e61617b59a44c86c950b5360491
8577d47f480ebc14bdf2b09cf73ef860
通过汉字男或女得到性别枚举值
for(SexEnum us: SexEnum.values()) { if(desc.equals(us.getDesc())) { return us.value; } } return -1; }
1
112be988bee273f80c96238e9ded0e85
bf32e6cf29725012ee33f2ccc0821ec4
获取注册验证码缓存
public class CheckCodeCacheUtil public String getRegisterCode(String key) { return checkCodeCacheManager.getCode(1, key); }
1
79653cde50de3148067219e86f018de1
1b715e65c53dca8ea23de4cb10f78b8c
Set maximum scale hint
class Map(JVMBase): def set_max_scale(self, scale): self._jobject.setMaxScale(float(scale)) return self
1
349dc43fea7b6d366981e96e06f1bc5b
1581811cd6577e56ca6a529fa4649218
<Snippet20> Duplicate a directory
namespace SIL.IO public static class DirectoryUtilities public static bool CopyDirectory(string srcDirectory, string dstDirectoryParent) { string dstDirectory; return CopyDirectory(srcDirectory, dstDirectoryParent, out dstDirectory); }
1
b7ff78eed42ed985576ceb8037ef5e65
c73a350ed9b90acc34d3792e279f2e24
Clear the screen and redraw the background. The car is not redrawn.
function render() { drawingSurface.clearRect(0, 0, canvas.width, canvas.height); if (car_sprites.length !== 0) { for (var index = 0; index < car_sprites.length; index++) { var car_sprite = car_sprites[index]; drawingSurface.drawImage ( ...
0
eb09aed02d49cdd4307ddc370cf4f6dc
1ab97e8311db1d7fb993042260a4a7b8
Расчет суммы итоговой оплаты накладной реализации, с учетом возвратов товаров
namespace ERP.Wholesale.Domain.AbstractServices decimal CalculatePaymentSum(ExpenditureWaybill waybill);
1
df153b87a83137d09963e32bec58846e
4aac0ee2f51d985cd87f7e37030f65f1
Set vApp Network Config
{ $this->curl_method = 'PUT'; return $this->fetch_results_boolean('/api/s/' . $this->site . '/rest/networkconf/' . trim($network_id), $payload); }
1
9f9fbd504102e9504915397454bdfa1d
c386ed43ae4da88f3a55547e4148e096
更新被打赏人金额
class LotteryZxsService extends BaseService{ private function updateRewardPool($amount){ $where['activity_name'] = self::ACTIVITY_NAME; $where['date'] = date('Ymd'); return M('hd1_award_pool')->where($where)->setDec('money', $amount); }
0
f064a8ed5847a405af57314cf8020189
5059ed32f388b3f046bec75a80351684
从存储器中获取短信验证码
class Sms public function getCode($to) { $cache = cache()->get($this->getKey($to)); return $cache['code'] ?? null; }
1
388e1b90600cb8d0a283e2fdaf1951d0
dc98dabacc5baa76a7332de58f503909
全角文字を2, 半角文字を1 とした場合の文字列の長さを返す
function cc_str_length($str){ $ccLen = (strlen($str) + mb_strlen($str,'UTF8'))/2; return $ccLen; }
1
2f5b86506d0e5e1d50cc7f4f83709411
1b414c09c658ad9de1b27cdd26b1f8a9
根据含路径和文件名的字符串获取文件名部分
public class FileUtils public static String getNamePart(String fileName) { int point = getPathLastIndex(fileName); int length = fileName.length(); if (point == -1) { return fileName; } else if (point == length - 1) { int secondPoint = getPathLastIndex(fileName, point - 1); if (secondPoint == -1) { ...
1
af6d7948b600dc34890af26e84c2fd37
e8bd20d32f6a7e852bd84533c6ff9845
判断能否领取低保
{ if ($accumulation = self::findLatestOne([ 'user_id' => $loanPerson->id, 'status' => self::STATUS_SUCCESS, ])) { if ($accumulation->pay_months >= 9 && $accumulation->average_amt >= 5000) { $data = \json_decode($accumulation->data, true); ...
0
7b46a22a612fc7599577c9d8744865f5
66232e452a9f48135d591132b82c4eb9
Same functionality as the plotCircle function, but for "clearing" the whole (and not hollow) circle that the plotCircle function creates, in order to make it look hollow and wave-like.
void Unfilled_Circle (int xC, int yC, int radius, uint8_t _colour) { int err = 2-2*radius; int max = -radius; int min = 0; while (max < 0) { int temp1; int temp2; radius = err; Set_Pixel (xC+min, yC+max,_colour); Set_Pixel (xC-max, yC+min,_colour); Set_Pixel (xC-min, yC-max,_colour); Set_Pixe...
0
c50737fe1595eaa75110acb0055a0fdf
054b1c3539c5ae215f47b44c4e9859aa
function that when interacted with, get player program and equal their health to their max health
public class HealthManager : MonoBehaviour public void FullHealth(){ playerHealth = maxPlayerHealth; }
1
3fa3eefc4ae0f2f7ffc8c506ecd369f7
96aee15b585867f3c8ede67e0403fb92
Compute re-weighting 2D pdfs.
hist, self.xedges, self.yedges = numpy.histogram2d( other.xdata, other.ydata, bins=(nbins_x, nbins_y), range=clipping, normed=True) x_bin_sizes = (self.xedges[1:] - self.xedges[:-1]).reshape((1, nbins_x)) y_bin_sizes = (self.yedges[1:] -...
1
5c30809830d62665194e52fcaf2ddddb
df5a224b253be06c636cc3cc660bae45
Download the target build from server base on the build url.
class GitlabFilestore(filestore.BaseFilestore): def download_build(self, name, dst_directory): src_dir_cache = os.path.join(self.config.project_src_path, self.cache_dir, self.BUILD_PREFIX + name) return self._copy_from_cache(src_dir_cache, dst_directory)
0
8b63a67c70da505617bc647154dc59d5
22373cb445948c2459d09a12fefa20c3
将InputStream 转换为JsonNode对象
try { return objectMapper.readTree(json); } catch (IOException e) { log.error("String to JsonNode failed.", e); throw e; } }
0
3abee2d37a70e1d62eeab0384dbb737c
73801396013c506944c21b7844e01b85
获取特定前缀主题的所有priviews
class customize extends top function preview(){ if($this->spArgs('skinid') == 'default'){ $this->__customizeConfig('default'); }else{ $theme = spClass('db_skins')->find(array('id'=>$this->spArgs('skinid'))); if($theme['exclusive'] == $this->uid){ $this->__customizeConfig($theme['skindir']); }else{ ...
0
b0261d6bdf9268c18fcfb8dfd7db30e4
1cae580af89724b7375d18515e7dded1
根据开发人员邮箱检查数据是否存在,若存在则返回id
public Integer findIdByEmail(String email);
1
458afc5865f1354c406db000189c6555
5669185cae30a8b2d75e1bc72cd435e3
Converts from version 9 to 10. Version 10 contains hints and solution in each interaction.
hh = g.naked().hhints for n in range(0, len(hh)): del hh[0] g.update()
0
a2cada042c7472b124c55b08a8f68a85
32ac5075843ec63039a4481311f766dc
这个跟 LocalDateTime .now(ZoneOffset.UTC) .toInstant(ZoneOffset.UTC) .toEpochMilli() 是一个效果
public void test4() { long timestamp =System.currentTimeMillis(); LocalDateTime localDateTime = Instant.ofEpochMilli(timestamp).atZone(ZoneOffset.systemDefault()).toLocalDateTime(); System.out.println("localDateTime = " + localDateTime); }
0
377c5e132f9fc7b424f392b2bf32b87c
f6e5e78caca44496a34d4730bb63b810
Generates the contents of the GKE Connect agent install manifest.
client = core_apis.GetClientInstance(API_NAME, self.api_version) messages = core_apis.GetMessagesModule(API_NAME, self.api_version) encoding.AddCustomJsonFieldMapping( messages .GkehubProjectsLocationsMembershipsGenerateConnectManifestRequest, 'connectAgent_namespace', 'connectAgent....
1
6e2166b68be7bfffa27e0233266eb8a9
b3dfacac12c3a1266a42d05a289f38f7
字符串根据关键字截取返还list
function cutString(data, keyWords) { if(keyWords.length == 0) { return data; } var cutData = JSON.parse(JSON.stringify(data)); var pattern = []; var contentTemp = ''; for(var i=0; i<keyWords.length; i++) { pattern[i] = new RegExp('('+keyWords[i]+')(?!>)', "gi"); } ...
1
f0e2eea6ea4f87cd1898ff1070f1b94b
d8c474554aea82c5e5b82e317f619659
This method is used to get back to the comments listpage.
class CommentsController extends Controller public function index() { return redirect('/home'); }
0
b6769b486f895b02b9933578d5b0139f
0f10e6229e547a616742b7bc2508970c
Changes the `type` attribute on the `input` tag.
class Peak_View_Helper_form_input extends Peak_View_Helper_tagattrs public function setType($type) { $this->_attrs['type'] = $type; return $this; }
1
39c5476e6c3815653688e857d7fa4100
b2781217a62cb3d7240f89409e03e470
Comoving Distance Measure
def comoving_distance(z): c = 299792.458; H0 = 67.7; OM = 0.3; OL = 0.7; E = lambda z: (OM*(1+z)**3 + OL)**(-0.5) integral = lambda z : (c/H0)*integrate.quad(E,0,z)[0] D = np.array(list(map(integral,z))) return D
1
9246136cb24d4e847b0b47a797c4d194
55e60e0c0c3d7922097ad2424b68c5ce
Describes a runtime map. Issues a v4.0.0 request
namespace Ton.Sdk.Tvm public class Tvm : TonClientModule public async Task<ResultOfRunGet> RunGet(ParamsOfRunGet paramsOfRunGet) { return await this.Request<ResultOfRunGet>("tvm.run_get", paramsOfRunGet); }
0
2982f820c5021cfac392f2a3473aa710
9a574033ac34f7f2761074ab1cdf1e2d
Mass removal of html attributes to a model.
{ foreach($attrs as $attr) { if (strpos($attr->name, static::SPECIAL_ATTRIBUTE_PREFIX) !== 0) continue; $name = substr($attr->name, strlen(static::SPECIAL_ATTRIBUTE_PREFIX)); $method = 'parseAttribute' . ucfirst($name); if (! method_exists($this, $method)) { ...
1
6697de1bc35f780c0dee1b8feafab309
3b7566a9119ef566c4c2ed84b8942274
determined by both being JSON array types, and having the same size and same contained elements in the same order.
bool compare_json_arrays(const vector<object>& exp, const value& actual) { auto comp = [] (const object& a, const object& b) -> bool { return a.at("Partition").as_string() < b.at("Partition").as_string() || (a.at("Partition").as_string() == b.at("Partition").as_string() && a.at...
0
aae801ba421136deb716187a42198f51
f03a0147b0697ef5d1e2535bd489fb4a
Copy the shares to this list
class Client def list_shares uri = { endpoint: "#{Constants::ENDPOINT_SHARES}" } request({ method: 'GET', uri: uri, header: Constants::HEADER_CONTENT_TYPE_APP_URLENCODED.dup }) end
0
6f50f1e8a2d49918ac59fdeec273f77f
ccc32c466eb734515772f030769a2948
Корутина для движения объекта
{ moving = true; Vector3 vd = vectorDirection[i]; DelTrail(); yield return null; AddTrail(); while (true) { transform.position = Vector3.MoveTowards(transform.position, temp + vd, speedС[ballNumber] * speedSlider.value * Mathf.Pow((Time.deltaTime),...
1
0701d1597774ca94644a7b9d2c095c97
3a13fdf64b262e4dac865792b50f3392
手机找回页面
$phone = Retrieve::where('mobile', Request()->input('phone'))->first(); if(!$phone){ $msg=[ 'status' => 'error', 'msg' => '手机号码未注册!' ]; return back()->withErrors($msg); } Session::put('phone',$phone->mobile); return view('retrieve.second'); }
1
fc6dfd04ce1901e2351b05ddf6b75d29
ba79c12eb732302ce0c22757bf076446
Gets the view with the specified key.
{ var e = new WantDynamicViewEventArgs { ViewKey = viewKey }; this.onWantDynamicView(e); return e.View; }
1
2e6ab71fa81bbb028f90e5dad141780a
1e31ad2c3b1945c480b2aeb3e516235e
make uncertainty band for ratio plot
bound_lower = np.mean (data) - np.std (data, ddof=1) * 2.0211 / np.sqrt (len (data)) bound_upper = np.mean (data) + np.std (data, ddof=1) * 2.0211 / np.sqrt (len (data)) l1 = mlines.Line2D([x,x], [bound_lower,bound_upper], color='b', zorder=0, marker='_', markersize=20) ax.add_line(l1)
1
c3f0d3aba7328daa9340c36102d17359
885e884bec7deb68dfe3b7620e604379
The function creates empty automaton declaration table and node representing automaton declaration and used for searching automaton declaration with given name. The function must be called only once before any work with the automaton declaration table.
void decl_init() { return; }
0
9d2fe6da514c829d6cbb15823e2879b1
e722f50a06ca72fe964b1678f164f0d5
Assert that a request to an URL returns 404.
class PresenceAnalyzerViewsTestCase(PresenceAnalyzerTestCase): def endpoint_should_return_404(self, url): resp = self.client.get(url) self.assertEqual(resp.status_code, 404)
1
d16a1ccabe36a0f85efafb04a1cfd2f2
83ee1684ba3f01bc381b3897f46feb4a
Set text of output to the string that is given by @string@.
function setOutput(outputString) { $scope.output = outputString; $scope.newNumber = true; }
1
2bbddbc6aaaf096039bf9067899a5e13
7f1a120a948d24e72073000f32988caf
获取网校学生回答问题人数明细
class AskquestionModel extends CModel public function getTeacherAnsweredList($param){ $sql = 'select tid,count(tid) asknum,sum(answered) answernum,sum(hasbest) bestnum from ebh_askquestions '; $wherearr[]= 'crid='.$param['crid']; $wherearr[]= 'tid in ('.$param['tids'].')'; if(!empty($param['startdate'])) $wh...
0
52d7dd7c4dc47de9b0d490342fe9a6b7
09afc530fe9c9a8f433a3dfddaf9cfbf
Get the length of the hash output, in bytes.
@NativeType("struct XXH3_state_t") public class XXH3State extends Struct<XXH3State> implements NativeResource @NativeType("XXH64_hash_t") public long totalLen() { return ntotalLen(address()); }
0
10d69a7cc4668838b8ae13e0debbd91e
a2a87e8c97ad1240b02ed46458c27f21
Test that studies are set as deleted when removed from dataservice
class SourceStudyVersionGetNewSourceDatasetsTest(TestCase): def test_no_previous_study_version(self): self.study_version_1.delete() self.study_version_2.delete() result = self.study_version_3.get_new_sourcedatasets() self.assertEqual(result.count(), 0)
0
910c947a09e35decd2e7549f4e5ff37a
f734e07fba4cff224c71538238bfb3c1
Evento para escuchar los clicks al clickear en un cliente.
namespace SmartMotionApp [Activity(ConfigurationChanges = ConfigChanges.Orientation, NoHistory = true, ScreenOrientation = ScreenOrientation.Portrait)] public class actItinerario : Activity void OnListItemClick(object sender, AdapterView.ItemClickEventArgs e) { var listView = sender as ListV...
1
79bc9708b63b55aeec98ce46b2acb2ec
ee5148e79a8d6c9aee0ab8ee78816490
Outputs the reply natural time (e.g., 1 month ago, 5 minutes ago, etc.)
function mb_get_topic_natural_time( $topic_id = 0 ) { $topic_id = mb_get_topic_id( $topic_id ); $topic_time = $topic_id ? mb_natural_time( get_post_time( 'U', false, $topic_id, true ) ) : ''; return apply_filters( 'mb_get_topic_natural_time', $topic_time, $topic_id ); }
1
cb1c33161eee5eadb3cca1d6f8fdf691
ffc46a68ffc98e4e0e2628697c909155
학생들 사이의 친구관계가 myInput으로 주어질 때, 정원이가 퍼트린 소문을 듣게되는 학생의 수를 반환합니다.
{ String personName = in.next(); Person person = Person.getPerson(personName); System.out.println(person.numberOfFriendOfFriends()); }
0
91a6db11bb76f907c645c3cd951fe69e
bf7ea5bd335e1eeb7a37f090b235e65c
genera un JSON contenente tutti i servizi di una macchina
class hass(object): def service(self): url = 'http://hassio.local' port = '8123' passwd = 'y20050801' service = '/api/services' headers = {'x-ha-access': passwd, 'content-type': 'application/json'} r = requests.get(url + ':' + port + service, headers=headers) json = r.json() domains...
1
ed2a0e54d442d126c0199fb252b808fa
cd0375d12cd773cd42448d5d6a3cda83
product表和categorysecond表关联查询,根据categorysecond表cid字段查询
@Service public class ProductService public List<Product> findProductByCategoryScond(int csid, int page1, int page2) { return productMapper.findProductByCategorySecond(csid, page1, page2); }
1
dadf1e9eca08d58d7fdbe0f9b555063d
bedd1d8fda154eeade9e9d5ee905b0e0
token列表中的元素是否在str中
int i; for (i = 0; list[i] != TK_NONE; i++) { if (tk_Token == list[i]) { return true; } } return false; }
0
9d9bb81741e5cd3f0900207927591001
2e5d870f26f20ee5391b5f01ce47ac77
Unequip oItem from whatever slot it is currently in.
local slot = item:getSlot(); itemSlots[slot] = nil; item:setEquipped( false ); end
1
0e27b5056dbfabd3fac687e2d996edf8
4c924163963e3712a4c1420ddc932e10
Returns a new object of class '<em>Live Pan Set</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
LivingColorsLearnLampsCmd createLivingColorsLearnLampsCmd();
0
a692ecff74d5343d21aefab7b02ce7ec
027ff5d6be3936064c396d1bc957ab30
Calls any listeners to tell them about a piece up event.
{ sender.CannotBeNull(); e.CannotBeNull(); if (PieceRequested != null) { PieceRequested(sender, e); } }
1
fe3548c4015326136c9a7f41714054e0
209bcc47a3d1711a29f2627d3276d47e
Create a product that can only be associated with an existing event based on the eventSource and eventSourceCode properties. In other words, the generated product doesn't have a lat, lon, or event time.
public final class LROSADsInner public ServiceResponseWithHeaders<Void, LROSADsPost202NoLocationHeadersInner> post202NoLocation(ProductInner product) throws CloudException, IOException, InterruptedException { return post202NoLocationAsync(product).toBlocking().last(); }
0
18fbe9c87e70bd001f57234460b78521
70133d772537d31c0ce7d399b146bfa2
Cancels the copy operation.
public class RevitOperationService public void StopCopyingOperation() { _stopCopyingOperation = true; }
1
f2b2da94d0ea414c04788a6bf470a3b3
23689757775b02ea2e8efaf617eaf9ad
Set the PSW Parity Flag
namespace target namespace flash namespace reg class PECR __attribute__((always_inline)) unsigned long setEOPIE(unsigned long value) volatile { raw = (raw & ~(0x1 << 16)) | ((value << 16) & (0x1 << 16)); }
0
079606aa65eaeab19c3db3975ddde1f6
7ca4f82a9ac85eb73995df2d7ed78baa
Gets the total heat quantity used for heating for the property
class Model_Property extends ORM public function usage_warm_water_total($hi) { $ret = 0.00; foreach($this->houses->find_all() as $h): $ret += $h->usage_warm_water_total($hi); endforeach; return $ret; }
0
daab6fb9fdf9f704ec4a2f520c46e63f
5dcd12197649909e13907b73e33b82ee
faz uma pausa de 2 segundos e inicia o movimento da bola
{ yield return new WaitForSeconds(2); while(!CheckAllBallsStopped()) yield return null; yield return new WaitForSeconds(0.5f); NextTurn(); }
0
41e922cfc5f8ce5039dd695e6753726a
6eb4ce3adf1f61e32617e700596e225a
Get the shared var library instance.
function genlib() { return GenLib::instance(); }
1
cf20f6b1858a1fb47c55d94adde0c8a9
25e5160ee4319d9f767d5a97caff03ac
Returns the pointer to PCI device configration space
UINT64 SpiGetPciCfgAddress ( VOID ) { return PCI_SEGMENT_LIB_ADDRESS ( DEFAULT_PCI_SEGMENT_NUMBER_PCH, DEFAULT_PCI_BUS_NUMBER_PCH, PCI_DEVICE_NUMBER_PCH_SPI, PCI_FUNCTION_NUMBER_PCH_SPI, 0 ); }
1
840b685cd7b6ca51f24f3fafe5cc08f0
bf2bc674a4bc02c5c61036db47aab3c1
Get the amount still owed for the transaction
public class TransactionBuilder public float getAmountDue() { return amountDue; }
1
e0c59a2699842886074d617948fb3d64
de2ee9b688cdd3ee4c19f1f44cddc02f
Register quicklink filters
add_filter( 'wp_kses_allowed_html', array( $this, 'wp_kses_allowed_html' ), 2, 99 ); add_filter( 'wp_list_categories', array( $this, 'move_post_count_inside_link_category' ) ); add_filter( 'get_archives_link', array( $this, 'move_post_count_inside_link_archive' ) ); add_filter( 'comment_form_fields', array(...
0
9b1db245441198bb00ec95eb8dffea42
658abb2fb432d72cdeb65e018737d6c5
Based on https://gist.github.com/steen919/8a079f4dadf88d4197bb/d732449eb74321207b4b189a3bcbf47a83c5db65
function colorTemperatureToRGB(kelvin) { let temp = kelvin / 100 let red, green, blue if (temp <= 66) { red = 255 green = temp green = 99.4708025861 * Math.log(green) - 161.1195681661 if (temp <= 19) { blue = 0 } else { blue = temp-10 blue = 138.5177312231 * Math.log(blue) - ...
1
69be7fd0ca1d79eee093d03f9375a787
92d6c379b466496cdcf5c228e6fa6377
根据渠道channelid获取所有到签约历史记录
@Service @Import({ UserDataSourceConfig.class }) public class UserTestBase extends AutoTestBase{ public List<UserBankCardHisDO> findUserBankCardHisByChannelId(String channelId) { UserBankCardHisDOExample exam = new UserBankCardHisDOExample(); exam.createCriteria().andChannelIdEqualTo(channelId); return us...
1
8dec252554ce5fb55e23ba1818003d47
67ebe87cd4941f0166b95c33a750a69a
Make the current class a {Socialization::confirmable}
return nil unless another_user.instance_of?(User) && @user.has_associated_swimmer? && another_user.has_associated_swimmer? result = UserSwimmerConfirmation.unconfirm_for(another_user, another_user.swimmer, @user) if result NewsFeed.create_social_feed( another_user.id, @user.id, ...
0
fc3a4693f3a54cdbe17884d48cd638ef
e4033a6f3028d50e288dcd77c6631b8d
Asserts the first argument is greater than the second argument. <para> If the assertion fails, the method adds the values and comparison to the error message so the user does not have to supply this information in the <paramref name="message"/> argument. </para>
{ if (expected.CompareTo(actual) > 0) { Helpers.HandleFail("Assert.IsGreater", message, parameters); } }
1
6334caeb3c1db8eca05d4f91aaf27141
2f5343c93aa1cab3bd39fd2cacb5bc65
Metodo che ritorna true se i dati inseriti dall'utente sono validi, altrimenti ritorna false
public abstract class ListingViewController extends AbstractController protected boolean validateData(String[] formData) { if (!InputChecker.anyInput(formData[0])) { return false; } if (!InputChecker.anyInput(formData[1])) { return false; } if (!InputChec...
1
69d70debcce2c63f242b41a79fa5369f
be86b07417cdf197a469f8475fdac5bc
Runs the rule set against the current cell and its neighbour count. Returns the final cell state.
protected CellState nextCellState(Cell current, Set<Cell> neighborsStates) { BinaryState currentState = (BinaryState) current.state; int index=2*currentState.ordinal(); for(Cell c: neighborsStates){ index+=getAddFromCell(current,c); } return BinaryState.values()[r...
1
9b08381ea32aebda3068b5056a577ab8
1d31e48adb6192b1ce022bf0ef617cbb
No popup menu
public class VersioningOperator extends TopComponentOperator public void performPopupNoBlock(String filename, String popupPath) { performPopupNoBlock(tabFiles().findCellRow(filename), popupPath); }
0
2dd89336509d1276c5c5caf6c394ce0e
90454cda39f39f3af770d93b97e157cf
Returns the meta object for class '{@link it.univaq.coevolution.emftext.emig.language.emig.MParameter <em>MParameter</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getParameter();
1
06f6a5414cf110a6a0424d966920a670
e4faaa1aee0180b0b209c33ef3ee8d59
Counts leading zeros. Used in Merkle tree hash validation .
public class BlockChain int getZeros(String hash) { char[] work = hash.toCharArray(); int count = 0; int i = 0; while (work[i] == '0') { count += 1; i += 1; } return count; }
1
9c9cee8800642039c82246be1310fa6d
2f41649901320fc7c724f6b83b8639e1
Returns the HTML code to includes all css assets
def resources_include_css(name): code = """<link rel="stylesheet" type="text/css" href="%s">""" % name return jinja2.Markup(code)
0
e1bd16b84f6f2fdf48fe6be2d1c0f962
cfb1469c626c113c1f1edf69a62dede0
Executes selling of a product with the given id. Decrease number of related articles. Method should ensure data consistency using appropriate locking on articles.
Price sellPrice, int sellVolume) throws UserNotConnectedException, InvalidConnectionIdException, InvalidVolumeException, TradeableException, InvalidMarketStateException, NoSuchProductException, DataValidationException, InvalidMessageException, ProductBookSideE...
0
017941e45fe3a08af2de73092b896a33
dbe8168e333b4e7803e1efa6072aa0c8
查询一句话中出现的词
path ='D:/PycharmProjects/untitled/Week one/Walden.txt' with open(path,'r') as text: words= text.read().split() for word in words: print('{}-{}times'.format(word,words.count(word)))
0