query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
9547175eaaada4434a2b34cb3c4db822 | 6c4de09b3c8b0bc6d85b4529ed0d094f | Autorelease a return value. | {
"tachyon:inline";
"tachyon:ret ref";
return iir.icast(IRType.ref, boxVal & ~TAG_REF_MASK);
} | 0 |
20284f675aab51d10cef7b9f4bba65e9 | b78ea58e1a0ad90fd24ab6b2316fead0 | Gets the checkout page | class CheckoutController extends Controller
public function index()
{
return view('pages.checkout');
} | 1 |
b9785c5697ce5c2a65db7766de6ab22c | 2ef3fb2ce90434763d5beaaaa7f31824 | возвращает количество документов выбранного типа | class WebBackend
public function getEntityByTypeCount($data) {
$aEntityDAO = new EntityDAO();
$aResults = $aEntityDAO->getEntityByTypeCount($data);
if ($aResults['status']) {
return $aResults["itemsCount"];
}
return 0;
} | 1 |
d5a334c097bcb62bae64fbd7d12714e2 | 7fcf2ae86828293c915961428f1428ef | Test GraphQlParser.parse() on valid documents. | {
$query = '
query DroidFieldInFragment {
hero {
name
...DroidFields
}
}
fragment DroidFields on Droid {
primaryFunction
}';
$schema = StarWarsSchema::buildSchema();
$parser = new Parser();
$validat... | 1 |
7fe55559ff49b98f90b912890eb51dc4 | 9b9451249e43afd48430b9033dbb37f4 | If set to true the user can delete events from the view by clicking the "destroy" button. Deleting is enabled by default. | public abstract class RecordEditor<T extends RecordItem> extends Plugin
protected void setDeletable(boolean deletable) {
this.deletable.set(deletable);
} | 1 |
0c5d5f8651e0cb017df2a9ebeefd5ac0 | 1c00a548124442294258af65d2645158 | ステージ詳細ID、章IDに紐づく敵を生成する。
指定した区間の敵データを生成する | {
foreach (GameObject g in ee)
Destroy(g);
foreach (string[] data in Position)
{
if (int.Parse(data[0]) - 1 == StageSelect)
{
ee.Add(Instantiate(Enemys[int.Parse(data[3])], StringToVector3(data[1].ToString(), data[2].ToString()), Quaternion... | 1 |
8cff22121775ed2986d3611d30d530ee | 43ad10723bc39515f4a4118f75888a46 | Helper function that reduces a list of TransactionOutputs to a object of assetSymbol: amount.
This is useful during the calculations as we just need to know much of an asset we need. | namespace Block_Explorer_API.Models
public class Transactions
public List<TxOuts> GetTransactionOutputs(GetTransactionResponse transactionResponse)
{
List<TxOuts> allOutputs = new List<TxOuts>();
_receivedCoins = transactionResponse.ReceivedCoins;
foreach (var coin in _re... | 0 |
48362143708bc855ba94e65d3e90c27b | 19df6bf570ffed139f310ad451c7067b | Returns whether or not the current device configuration is showing multiple panels. | {
if (allDisplayDevice.Count == 1 && allDisplayDevice[0].m_Monitors.Count > 1)
return true;
return false;
} | 1 |
9257471787fe7c20f9021c91177e0287 | f969eab0c0352d93369af73c034ad054 | registra los centros de costos de la unidad para el costeo | public IHttpActionResult PostCENTRO_CUSTO(CENTRO_CUSTO cENTRO_CUSTO)
{
if (!ModelState.IsValid)
{
return BadRequest(ModelState);
}
int NextValue = db.Database.SqlQuery<int>("SELECT NEXT VALUE FOR dbo.SQ_ID_CENTRO_CUSTO;").First();
... | 1 |
43431cfa8392a226d4250d8fe5a3a691 | d55006683fc89132d98ec7fbe56e325c | Check for Transaction Error | class ACH extends ACH_core
function chkError($err){
$send=0;
if ($err){
$sub="ACH CLASS ERROR: ";
$send=1;
switch ($err){
case '1':
$msg.="\n\nCLASS ERROR: setFields()\n\n";
break;
case '2':
$msg.="\n\nCLASS ERROR: setMessage()\n\n";
break;
case '3':
$msg.="\n\nCLASS ER... | 1 |
278d7436a835b941cbc27ac85bcbd9bb | 99fe2d89ce033eb0a7c5d91e56dffe58 | Shuffles ArrayList of Card objects | Random random = new Random();
for (int i = 0; i < cardsArray.length; i++) {
int randomPosition = random.nextInt(cardsArray.length);
FlippableCard temp = cardsArray[i];
cardsArray[i] = cardsArray[randomPosition];
cardsArray[randomPosition] = temp;
}... | 1 |
ed0acee3c20e397b88308873b3d6dd66 | 4ca167f7e5f787f899973978925f86ad | Rounds a <see cref="decimal"/> value to the specified number of places. | namespace HatTrick.DbEx.MsSql.Builder
public partial class VersionBaseMsSqlFunctionExpressionBuilder
public virtual NullableDecimalRoundFunctionExpression Round(AnyElement<decimal?> expression, int length, NullableNumericElement function)
=> new(expression, new LiteralExpression<int>(length), function); | 1 |
b262b24c16932761ae24c469f5ed18b4 | 25f106ccd1c7343c370575e794afbd60 | Set the start date of the program by getting the data from the server | function setDate(){
date = document.getElementById("range").value;
showAndHideInformation();
loadContent(date);
} | 0 |
0d6bfdc95c366bfbc157a930b9357d50 | 7c6f9725af9dd83ecdd6a8372cf10d39 | 对外接口:gas转账(批量) | Result accountBalanceR = NulsSDKTool.getAccountBalance(fromAddress, SDKContext.main_chain_id, SDKContext.main_asset_id);
if (accountBalanceR.isFailed()) {
throw new RuntimeException(accountBalanceR.getErrorCode().getMsg());
}
Map balance = (Map) accountBalanceR.getData();
... | 0 |
b0a973d9f580ebaaa6764f69b86c126d | 97f35a2fa218eca26efa3683d03d66ed | !
Counts the number of factors a number has. | def num_factors( num ):
sum = 0
last_factor = None
while( last_factor != 1 ):
last_factor = largestFactor( num, last_factor )
sum += 1
return sum | 0 |
9c4e50c20095aef4711a1d88331160c1 | 02330dcc164a74d20f4a2d377479acb8 | 私有, 单例模型,禁止克隆 | class Capital_WhiteModel
private function __clone()
{
} | 1 |
1ba31596daa70826f4cd0d3f921b17ac | 9d4b0ccb4393bd13e328a6d6b0c33b28 | appends a single character at the end | void chr_append(char *s, char ch) {
int n=strlen(s);
*(s+n) = ch;
*(s+n+1) = '\0';
} | 1 |
ff4e526a655c210be288bb416afb4eb1 | bbda5a95e90e80dea485df9bf92ddaaf | Returns the number of characters in a given file | def get_file_len(fname):
p = subprocess.Popen(['wc', '-l', fname], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
result, err = p.communicate()
if p.returncode != 0:
raise IOError(err)
return int(result.strip().split()[0]) | 0 |
742ebed76e3b3d9fd29278eac7c7607b | 2ea4ed4aebf040b1823b362b602b8cdf | Verifica se a lista de vértices possui algum vértice que ainda não foi visitado | namespace Grafos
public class Djikstra
private bool VerificarExistemItensNaoVisitados()
{
return listaVertices.AsEnumerable().Where(item => !item.Visitado).Count() > 0;
} | 1 |
1d26db044d9d72642fa35e2c67641316 | 569aa93ec91c3e44c905eea810acdd74 | 高德逆地理位置编码 | class User extends CI_Controller
function geocoder($dimension, $longitude)
{
$url = $this->config->item('baidu_map_url').'?ak='.$this->config->item('baidu_key').'&callback=renderReverse&location='.$dimension.','.$longitude.'&output=json';
$result = file_get_contents($url);
$result = substr($result,29);
... | 0 |
b9647e50356e471657ce6f93ac16e0a2 | 4e28e20770ab1d022bfdc6364bb1fa8a | truncate is called when a new file is created (with a 0 size) or when an
existing file is made shorter. We're not handling deleting files or
truncating existing ones, so all we need to do here is to initialize
the appropriate directory entry. | {
struct ecryptfs_crypt_stat *crypt_stat;
u64 file_size;
crypt_stat = &ecryptfs_inode_to_private(inode)->crypt_stat;
file_size = get_unaligned_le64(page_virt + CSCRYPTFS_FLEN_OFFSET);
ecryptfs_printk(KERN_DEBUG, "file original length: %lld", file_size);
i_size_write(inode, (loff_t)file_size);
crypt_stat->flags |... | 0 |
c0b62a7feb337adfc560b52e058dad56 | ea7b7121c3cf6bf41ea88d51d2b6c3dc | Returns statistics describing the search. | class TwitterSearch(object):
def getStatistics(self):
return self.__statistics | 1 |
e671e3e3ee7325b551378896f94648b8 | 575dee519b0a873774380f91fe485258 | Test that debugserver doesn't disturb the suspend count of a thread
that has been suspended from within a program, when navigating breakpoints
on other threads, or calling functions both on the suspended thread and
on other threads. | void test_threads_suspend_resume_preemptible(void)
{
threads_suspend_resume(1);
} | 0 |
38e58d081143be18a6caa8277d483e31 | 56c5780dff8a0702cc5ce8e65d67cab7 | Returns a new instance of the providers CommandBuilder class. | namespace System.Data.SQLite
public sealed partial class SQLiteFactory : DbProviderFactory
public override DbCommandBuilder CreateCommandBuilder()
{
return new SQLiteCommandBuilder();
} | 1 |
5085044abf571b4c6c8914c22ba111e2 | c30a9d5970976589d1098ec507636e86 | 检查任务表是否存在,不存在就创建相应的表 | namespace WCF
class WDTask : WData
public static void CheckForm()
{
if (!CheckFormExists("WcfTask"))
{
Create("CREATE TABLE WcfTask(" +
"ID INTEGER PRIMARY KEY AUTOINCREMENT," +
"NumOrder DOUBLE NOT NULL," +
... | 1 |
85fd5e972785a825a4899b3650f6bc8c | 8e4b2008f3191d9cc69eb68131cf420b | Returns the list of configuration names that are currently
selected | class ConfigHandler(ConfigParser.SafeConfigParser):
def listconfigs(self):
return self.items(self.modes[self.mode]) | 0 |
48d44e5e8fe53a6e12ea80c51820785a | c3c4165069c3c962a65cd26e0ac27bc6 | Returns a list containing the blocked result files. | if self.type() in ['hotfix', 'update']:
return [f for f in self.tarfile.blocked_by_packages_on_cc
if get_type(f) != 'update']
return [] | 1 |
6e80d9b31798373c8cb58ad717540521 | 2f079ce26875a2faf5f6fe55052b3424 | belirtilen şehire plaka sırasına uygun olacak şekilde komşuluk ekler | for(let i = connections_list.length -1 ; i >= 0; i--){
if(link.innovation_number > connections_list[i].innovation_number){
connections_list.splice(i+1, 0, link);
link.to.connections.push(link);
break;
}
}
} | 0 |
d5f80708bb66689282e0676c7326dd01 | ccdbd1bc969b8a985e2a0fcaca288a95 | @brief Check CAD file | void OnCadDone( void ) {} | 0 |
d262acb9997e5856afaacd9060a62bb6 | b9cd1e9e07f46bf4da1d6670f0a10921 | Obtem o valor na linha e coluna | int recuperaElemento(Matriz* mat, int linha, int coluna) {
return mat->mat[linha][coluna];
} | 1 |
2ab1431d89d0a31720a9a2f3fea675d5 | d348aaf7f63512c1d10aa2bd4185030f | This is a method that will wait for the referee to indicate what the final scores of the game
are. Once this player receives this message, they will know where they placed in this game of
Fish.
{
"winners" : [Strings representing the winning player colors]
} | public int[] hasWon(); | 0 |
d63b73dbfa310ec4c95b48c1fc42d288 | dd0b3f658640c90b1f609b8c40cc96a6 | 释放所有剩余页面 | vector<int> pageIDList = nowProcess->getPages();
for(int i=0;i<pageIDList.size();i++) {
memRelease(pageIDList[i]);
}
} | 1 |
3bf9cdc40d43786ccc882b4fd34fda5f | 35cd4a4f8ba4761d91b4095de22a171a | Removes phantom paragraph tags on images | function remove_p_on_images($content){
return preg_replace('/<p>(\s*)(<img .* \/>)(\s*)<\/p>/iU', '\2', $content);
} | 1 |
29b608e6d3192c68ad55ef7ea16420de | f8e6f5d85ec46da168c23118e5ef0747 | There may be return address stack (RAS) updates from calls and returns
in the fetch queue that never made it to renaming, so they have no ROB
that the core can annul normally. Therefore, we must go backwards in
the fetch queue to annul these updates, in addition to checking the ROB. | static void
fix_rename_tables(OOCore *core, RenameTableEntry *rat, int num_regs)
{
int i;
for (i = 0; i < num_regs; ++i)
{
if (rat[i].read_from_rob)
{
assert(rat[i].rob_idx != -1);
if (rob_entry_committed_after_rollback(&core->rob, rat[i].rob_idx))
{
... | 0 |
7fc0ed9cefb01fb0c18f5e533725ec87 | 4d8c337d92542c8606dd570656d2fa0e | constructor, generates the configuration test | class TestGame extends PHPUnit_Framework_TestCase
public function __construct() {
$this->config=new Configuration();
} | 1 |
d809713eb4d0ec9d0b081d584475fd1d | 6c4ddb9f7ae117453fe9e6d0fd31de41 | 获取小程序业务域名 | class OpenFunc
public function getServiceDomain() {
$this->curl->setUrl('https://api.weixin.qq.com/wxa/modify_domain?access_token=' . $this->access_token);
$post = $this->curl->post(json_encode([
'action' => 'get'
]));
$result = json_decode($post, TRUE);
if ($result['... | 1 |
9b2c136fa481b2b8cf82c4c5bd5f5747 | 4a86f92666b46371b6baa9379ff543cb | Initialize cyclic scheduler for lr modification | def get_scheduler(optimizer, opt):
if opt.training_setting["lr_policy"] == "linear":
def lambda_rule(epoch):
lr_l = 1.0 - max(0, epoch + 1 - opt.training_setting["niter"]) / float(
opt.training_setting["niter_decay"] + 1
)
return lr_l
scheduler = l... | 0 |
effe6ae0d945bb9f0b554dbe0531b842 | eed0f62be67fafe7c07b891db959cc02 | Task: Group and aggregate the results by the ClassyFire class-level and determine the support for each class.
Then, remove all classes with too little support. Purpose is to get the "relevant" class and superclass
relationships to determine the colors and orders for the plotting. | class Serimi
def class_disambiguation(rdfdata,transitive)
puts "RDF to SVM WITH META PROPERTIES ..."
number_homonyms=[]
max=nil
min=nil
svmmodelbygroup=[]
ftotal = 0
max_featuresbygroup=[]
min_featuresbygroup=[]
global_maximum=0
puts "############# RESTRICTED INVERSE FUNCTIONAL P... | 0 |
e5132dce6d19bcd008d2cb421a4445de | 0179a5427dab708b0a74f322e5b16d43 | Find and display data for each Representative of this Society or group
(Life, Ex-officio or Additional members)
by scanning through all members in $members data array | global $totalContinuing, $totalOutgoing, $totalIncoming;
$html = '<dl>';
$countMembersThisSociety='0';
foreach($members as $member){
if ($member[2]==$societyAbbrev){
$html.= '<dt><a name="'.$member[2].'"></a>';
$html.= '<strong>'.$member[0].'</strong>';
if ($representative) {
if ($member["status"] ... | 1 |
2f7b21c93d2e3edd5e9e971b275e321f | eac48f639610daf7270648fc0a1db98b | 获取被邀请投票的用户 | class UserInvite extends Medium{
public function get_invited_user($invited_user_id){
return $this->m_invite_user->one(array('invited_user_id'=>$invited_user_id));
} | 1 |
c06fea715e4d86b71e8f48c9d0a387da | 6835166b26650496a68399b898be3b0c | set up the FP and SSE state, and then dump it. | {
if (I16 || I32)
CFA_state_current = CFA_state_init_32;
else if (I64)
CFA_state_current = CFA_state_init_64;
else
assert(0);
CFA_state_current.reg = dwarf_regno(SP);
assert(CFA_state_current.offset == OFFSET_FAC);
cfa_buf.reset();
} | 0 |
8d4fd9109d4ac0119d88b228498812df | 9b7c322621b82d2976af6fc18cb7c4f0 | Print table to file. | void UvjazkaResultsTable::Print(FILE *fp)
{
int row = 0;
while(row < Q_values_table.size()) {
for(int col = 0; col < (Q_values_table[row]).size(); col++) {
fprintf(fp, "%lf, ", Q_values_table[row].at(col));
}
for(int cnt = 0; cnt < ring_result_tables.size(); cnt++) {
... | 1 |
3ec7c97053b44f3aa8130d6eb53a3191 | 967292f31cc20f95eec9d58c09757f23 | Get base URL for HLS segments. | function HLSPlayURL($domain, $hub, $streamKey)
{
return sprintf("http://%s/%s/%s.m3u8", $domain, $hub, $streamKey);
} | 1 |
ec89cd99b3f1ec07f49db4d77fa66a8a | 490859081030face059b77ff14882cd8 | @brief Append another interface to the list. | spio_op_intf_hash_add (spio_op_intf_type *intf)
{
uint32_t index;
index = spio_op_intf_hash_index(intf->ifh);
intf->next = spio_op_intf_hash[index];
spio_op_intf_hash[index] = intf;
spio_op_intf_hash_count++;
} | 1 |
f9ba8b510d55a1fde4d95915c3841f56 | 36be60a1ea0fbb070aa4c0cbe97d7062 | 定义一个扩展方法ReverseDigits,允许int将自己的值倒置 | {
char[] charArray = new char[x.Length];
int len = x.Length - 1;
for (int i = 0; i <= len; i++)
charArray[i] = x[len - i];
return new string(charArray);
} | 0 |
0e1dbf7540bc2b3dae18dc20c29ad90e | 8e24eee0ab1ce9c7030fb01a1e9fa33e | Returns a range of all the form send record field signalements.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setti... | public List<?> loadRecords(int maxSentCount); | 0 |
f745b4f95b27fb8d42d2ad1bb660e5a5 | 33f3b33a6bf200e9218f2a5d0a00a859 | 测试库存解冻 | ActionForm form, HttpServletRequest request,
HttpServletResponse response) throws Exception {
ClientGoodsForm cgf = (ClientGoodsForm) form;
boolean ok = this.clientGoodsService.JieDongClientGoods(cgf);
if (ok) {
this.loginLogService.updateLogin(
request.getSession().getAttribute("loginlogId").toStri... | 1 |
250dc2aca739af542bf56cf8c4ccf48f | cec0f768afc60e8bf991621dd0c47fca | 接收数据时收到未设置测站信息,自动将测站信息入库并在列表中添加 | {
var lstStations = getObjP("lstStations");
if (lstStations == null)
{
lstStations = window.parent.parent.document.getElementById("lstStations");
}
var vObjectID = rowid;
var vObjectName = $('#jqGrid1').getRowData(rowid)['ObjectName'];
var vEOName = $('#jqGrid1').getRowData(rowid)['E... | 1 |
39b137e200926709d7aa262b06316dcc | ddd1baf3d78613b860ddae60b3328b97 | Gets the value of the idEnterprise property.
possible object is
{@link IdEnterprise } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ContactQuery", propOrder = {
"id",
"created",
"createdBy",
"updated",
"updatedBy",
"conflictId",
"modId",
"accountCurrencyCode",
"accountId",
"accountIntegrationId",
"accountModId",
"accountPriceListId",
"accountP... | 0 |
8885b0a4b537c7e8bd8844d4d5baa72a | 05f1b99f8e5a019ff3ef7ca67ac25977 | * desc 删除虚拟机物理文件
* input 虚拟机id
* output None | try:
virtCtrl = param[0]
vmInstanceId = param[1]
hostDevice = param[2]
virtCtrl.detachDisk(vmInstanceId, hostDevice)
except Exception, e:
HostAgentLogger.error("rollback failed: %s " % str(e) | 0 |
360bf176372bc391492a81802efaad3d | 2ea08f8173ebc38bc5bc83758c7ade19 | Click on Benefits Link. | public class MainPage extends Page
public MainPage clickItBenchmarkLink() {
clickElement(itBenchmark);
return this;
} | 0 |
db15d57ab82b7243c08087eb69f179d6 | 31cdf05b91ba5faf628edc9741083795 | Breaks the input list into chunks. Used to limit the number of identifiers
sent to Ensembl REST POST API calls (limit 1000). | def chunks(jobs,processing_limit):
for i in range(0, len(jobs), processing_limit):
yield jobs[i:i+processing_limit] | 1 |
51ee540e152af1c3b78012d27fca6379 | 04695c8ef6aa8df2d2afb0be68c68adf | Handles the requestFinishing event of the server instance. | namespace nJocLogic.network
public abstract class RequestHandler
public void Finish()
{
_socket.Close();
_socket = null;
_writer = null;
} | 0 |
531ca01212999c417e5f4ab291dfe2f9 | a059a1344c82d2c12a273474d3dc4ce8 | звільняє ресурси і розблоковує зображення | {
if(getBitmapOriginal() != null)
{
getBitmapOriginal().recycle();
}
if(getBitmapReady() != null)
{
getBitmapReady().recycle();
}
if(getBitmapSmall() != null)
{
getBitmapSmall().recycle();
}
getPicture().recycle();
getResizedPicture().recycle();
bitmap_original = null;
bitmap_ready =... | 1 |
f66ab2861a99d8173ecfa03188d537c2 | fc633f9dc5b92fd5177b78697b29f8e4 | Gets the order_hash of this MarketQuoteFill. # noqa: E501
Computed hash verifying the authenticity of the order # noqa: E501 | class Order(object):
def fill_price(self):
return self._fill_price | 0 |
a3e914771625f9ff7fe4e89d26a59ed2 | 1ad7d8438838bc5f957a5b56641fa5ca | Using our reference to the domElement, toggle a class to expand or hide the article. | function toggleElement(id) {
var el = document.getElementById(id);
if (el.getAttribute('class') == 'hide') {
el.setAttribute('class', 'show');
} else {
el.setAttribute('class', 'hide');
}
} | 1 |
4616999fab14aefa38227ff6110fe347 | ae75b4a71258b29fc95f83f8a21f1b31 | The name of the user who owns the data asset. | class GetTiTaxiiDataConnectorResult:
def user_name(self) -> Optional[str]:
return pulumi.get(self, "user_name") | 1 |
a9f12dee4154213754728daa6f677a07 | cf232866227e63686a3fd0a84e701c67 | Returns a dictionary for the partial decay widths of the pseudoscalar
mediator.
Returns | try:
f = pyslha.read('SPheno.spc')
except:
infinity = float("inf")
nan = float("nan")
return (nan, infinity, nan, infinity, nan, infinity)
chi1 = f.decays.get(1000024)
chi2 = f.decays.get(1000037)
neutralino = f.decays.get(1000022)
return (chi1.mass, chi1.totalwidth,
... | 0 |
dcd577fdc8f3c4439840b992cd5b121e | b7039f4a333d27746f70d7563ffb756d | Method responsible for decrypting an encrypted string that has been encrypted by XOR | public class EncryptSvc
private static String XORdecode(String SecretCode) {
int i;
char c;
StringBuffer PlainCode = new StringBuffer("");
for (i = 0; i <= SecretCode.length() - 1; i++) {
c = (char) (SecretCode.charAt(i) ^ SecuConst.XorFactor);
PlainCode.append(c);
}
... | 1 |
a9930f84636a266e4e39d338450378aa | 1783a302cb2257f3f638b16bdeb64fb8 | Setter for theme song | class Theme
public function setTheme($theme)
{
$this->theme = $theme;
return $this;
} | 0 |
edb9fea296f829f66817c36967e03ed3 | 2877df95d2b72cf80cfe440d32e3a75d | Sets min booking lead time seconds field. | class ilBookingSchedule
function setMinRental($a_min)
{
$this->rent_min = (int)$a_min;
} | 0 |
12f100ce2872cdb1ce19266c36329e01 | ef608e62d8b5c080ef73d07c0200da83 | ADD Vx and Vy with carry, stores result in Vx. | {
if(Vy > (0xFF - Vx))
VF = 1;
else
VF = 0;
Vx = Vx + Vy;
pc += 2;
} | 0 |
8a9137d2ab308314e6170d9c059736aa | b03971267a7f2940085d8c3214de8678 | isEmpty returns true if Fraction object is in a safe empty state | bool CNormalFraction::checkIsZero() const
{
return this->mpNumerator->checkIsZero();
} | 0 |
97c85441d214b3eb8d2c71d98454672e | c5dd199da545e325b0ebdc2786b47cf7 | Open article settings modal. | export class ArticleDataViewComponent implements OnInit
onOpenAdd() {
const modalRef = this.modalService.open(AddArticleComponent);
} | 0 |
ba2f55148d1e4c355d4806e456fc19bf | 4a3018f9e70778122d4c37c68dd3142e | pull from rnoc's detailed api to get a list of all access points and their number of clients | class Controller(object):
def get_aps(self):
params = {'_depth': 2, 'test': 0}
return self._api_read('stat/device', params) | 1 |
308db2b2c3fd2e109fe665547613c708 | a51a5823a849cf15cec92619ba9ffb39 | @brief Used to follow an angular position command. | {
ROS_INFO("Forward and turn r=%f m phi=%f Deg. v=%f m/s", radius, degree, velocity);
while (!_initPositionAvailable)
ros::spinOnce();
double radAngle = degree * PI / 180.0;
double lastAngle = _currentPosition.theta;
double movedAngle = 0.0;
geometry_msgs::Twist ... | 1 |
d35adb8e333ab65ae3238d701df4a25a | bdbf816fd7b9b827d297dc7f4e970e13 | \brief Clear PANCOORD in RXMCR: Receive MAC Control Register
\details Device is not set as PAN coordinator | { int Result;
unsigned int ReadVal;
Xil_AssertNonvoid(DpRxSsPtr != NULL);
ReadVal = XDpRxSs_MCDP6000_GetRegister(DpRxSsPtr, I2CSlaveAddress,
0x061c);
Result = XDpRxSs_MCDP6000_SetRegister(DpRxSsPtr, I2CSlaveAddress,
0x061c, (ReadVal & 0xFFFFFFFE));
return Result;
} | 1 |
0418b97e1d2cb147f730a90acd5a1b78 | 6fcf1fef4a4abca53340cba3b83978f0 | plot roc curve and save as png | y_final = self.results_convert(self.y)
if change_probs:
predicted_probs = np.transpose(np.array([predicted_probs[0][:,1], predicted_probs[1][:,1], predicted_probs[2][:,1]]))
plot_roc(y_final, predicted_probs, title=plot_name)
plt.savefig(file_name) | 1 |
161437a360b4167390357f8d6ccd78a4 | 07f810e64f99135a91f670c1e8465609 | The seconds to increase the delay in every wait cycle. | class Config
def sleep_between_cycles; 0.02 end | 0 |
a97943bc37bc9f3356280df810cce30a | 451fbcdc5808e0c29b140f312ae7372c | If n is 1 or 0, simply return n | if n > 2:
return (fibonacci(n-1) + fibonacci(n-2))
elif n == 0:
return 0
else:
return 1 | 0 |
e334d23e27fb6bb6ca3cee1d3391432c | 5d931df8f0cc47764d38bc649b5a0db9 | affichage voiture qui n'a pas été rendu | if(1){
var order = randString();
console.log(order);
var elem = document.getElementById('zoneSpeHome');
var html = '<div id="zoneFlex404">';
var i = 0;
for (i = 0; i < 10; i++) {
html += '<div class="carte"><a href="./ficheAuteurs.php"><img src="assets/images/promo404-'+ order[i] +'.pn... | 0 |
a44b2af17ad5df4956afefcc51c38af7 | 4710e911c29b3c5dce3e13c461006435 | Agregar un nuevo tipo de narracion | $registros = new Registros();
if( !$registros->NewTipoObservacion($nombre) ){
echo 'Error: ajaxObservaciones.php RegistrarTipoObservacion().<br/>';
}
} | 1 |
6b5893e85e56b356a666d0a248500bdf | 809386285566051c97e13e6a4b4fa939 | Calcula la raiz cuadrada de un numero usando math.sqrt
Retorna -1 si n es negativo (invalido) | class Problems
public static Double squareRoot(Double n) {
return -1.0;
} | 0 |
4a84dff095d0c98be146a50d1e1e5d90 | d79636fb47673fa4dfa2f39187b3f55c | Get the database column which stores the topic ID | class Topic extends CActiveRecord
public function primaryKey()
{
return '{{id}}';
} | 1 |
2449e7eef0bd833d83970766087d69c4 | 4b3450b75665f1a4780ea2c0b6f5e6af | Takes information and puts the information in unregister message format. | class Message:
def reg(self):
return {
"type":"register",
"payload":{'id':self.id,
"hostname":socket.gethostname(),
"ip":self.get_address()}
} | 0 |
c10c2776efae6e9eb3742615cad47c31 | bf59a0839dafa68675673c7a235c4cb0 | Updates a record in the Direccion table. | @Repository
public class DireccionesDAOImpl implements DireccionesDAO
@Transactional
public void saveOrUpdate(Direccion item) {
sessionFactory.getCurrentSession().saveOrUpdate(item);
} | 1 |
7926630c011c24698aa0267e4de387e4 | 9e7ceafeeed41d9fc7b0ddb2ce83bc0e | From inlineClassManglingRules.kt | println("package move.cr.p25674.to\n\nclass MovedClass {\n fun movedMember() {}\n}\n")
println("move.cr.p25674.to.MovedClass")
println("move.cr.p25674.to.MovedClass.movedMember")
} | 0 |
7a01ef32a96e037ee59bfd4f8d8750a5 | c2b9f76aecc2722870c54c17db8b7630 | Gets the path for an executable that has it's path in the env variables. | if envname not in self.config:
return -1
config = self._env_config(envname)
PATH = []
EXEC = ''
sep = self.unix and ':' or ';'
envpath = config.get('PATH', '') + sep + self.environ.get('PATH', '')
if os.path.exists(exename):
EXEC = exename
... | 1 |
111e5a2b6b0306593979a75e18b9c14a | e3a5c8dc0998c45972175d9b9f859e8b | # Output: leave-one-out CV score | loop.k <- function(mydata, mytargets, upper.bound)
{
errors <- matrix(nrow=upper.bound, ncol=2)
colnames(errors) <- c("k","LOOCV error")
for (i in 1:upper.bound)
{
myknn.cv <- knn.cv(mydata, mytargets, k = i)
errors[i, "k"] <- i
tab <- table(Truth=mytargets, Preds=myknn.cv)
errors[i, "LOOCV erro... | 1 |
662072db9b7a1d117286a04d766dfd56 | 5a35e35ebe6ceba7a4f6567310b69a7e | Test that checks if formulation of new user instances is correctly done | class TestUser(unittest.TestCase):
def test_init(self):
self.assertEqual(self.new_user.username,"salome")
self.assertEqual(self.new_user.password,"kagenikageni") | 1 |
f050eb7f262eb139bb5d92f285f26587 | a41e661fa256a1cca2865666329e314a | resolves the format of the xml document, returns true if it is a workable rss | if (strpos(strtolower($this->XMLData), '<?xml') === false) {
return false;
} else {
return true;
}
} | 0 |
7036309398c23fcdec68993eb96c3ed0 | 76e502cefbb9efe5d055363592c64049 | !
\brief Aloca memoria inicial das estruturas de chaves secundarias | {
categoria_header = NULL;
freq_categoria_h = NULL;
freq_tamanho_palavra_h = NULL;
} | 0 |
a49be3f999c584f7c1671a4e2a6c28d9 | 24582a96faf075f779d580960136c654 | Regresa el docente especificado | class TbDocentesController extends Controller
private function findTeacherByDocument($document, $id = 0)
{
$em = $this->getDoctrine()->getManager();
$dql = "SELECT d FROM sancamiloBundle:TbDocentes d
WHERE d.docenteDocumento =:document
AND d.id !=:id
... | 0 |
2b1bf818d381c39ce21f5304f8ea747a | 6972cda52d7b7fa0420c1673d56945c6 | Edge removal | {
rf_.remove(e);
if (e->hedge(0)->next() != NULL) {
Face *f = e->hedge(0)->face();
Vertex *v = e->hedge(0)->next()->dst();
if (!v->is_weld(f))
sf_.remove(v);
}
if (e->hedge(1)->next() != NULL) {
Face *f = e->hedge(1)->face();
Vertex *v = e->hedge(1)->next()->dst();
if (!v->is_weld... | 1 |
c99572ec711fe2768510f1138aa0ba81 | b412f9e195a16ff0a92f08a05035000f | 获取切面注解信息 | public class AnnotationUtil
public static Signature getSignature(ProceedingJoinPoint proceedingJoinPoint) {
return proceedingJoinPoint.getSignature();
} | 0 |
a9d92837f081393761581cc83f8406a4 | d5c33887df2f9c256bb483a1e946d325 | Initiates the asynchronous execution of the CreateSbomExport operation. | Task<SbomGenerationResult> GenerateSbomAsync(
string rootPath,
IEnumerable<SbomFile> files,
IEnumerable<SbomPackage> packages,
SBOMMetadata metadata,
IList<SbomSpecification> specifications = null,
RuntimeConfiguration runtimeConfiguration = null,
string manifestD... | 1 |
61e4803de5638ee49ae7df43fb9b6f9e | 6205ba9d68543f7405d5772f2ba31940 | Builds a title label. | public class JavaFxStyle
public Label constructTitle( String title ) {
Label titleLabel = createBoldLabel( title, TITLE_FONT_SIZE );
titleLabel.setAlignment( Pos.CENTER );
GridPane.setConstraints( titleLabel, 0, 0, 2, 1, HPos.CENTER, VPos.CENTER );
return titleLabel;
} | 1 |
a55427f55731ba45cf2a31203026f321 | 0a5908da41ac103439262edbff8fd047 | Filter the result of wp_lostpassword_url(). | $protocols = array('http', 'https', 'ftp', 'ftps', 'mailto', 'news', 'irc', 'gopher', 'nntp', 'feed', 'telnet', 'mms', 'rtsp', 'svn');
$original_url = $url;
if ( '' == $url ) {
return $url;
}
$url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $url);
$strip = array... | 0 |
25e8eb708d8c31b6ff68c14eada4c8f1 | 5bebd1a821f93ada3d82fea6b1a9ad02 | 点击预览图两边的小图,移动预览框 | function clickSlideImg() {
var $bigImg = $('#mediumImg')
var $ul = $('#icon_list')
var $lis = $('#icon_list>li')
var $forward = $('#preview>h1>a:last')
var $backward = $('#preview>h1>a:first')
var imgWidth = $lis.eq(1).width()
var showCount = 5
var moveCount = 0
if ($lis.length > showCount) {
$forw... | 1 |
16740d729f20147983b4b7986ffc7274 | 4734c01e89809c4aa670505cba278046 | Sometimes Magento will include quotes in their strings.
If this is the case, we need to remove them to prevent double quoting strings. | if (preg_match('/^(\'([^\']*)\'|"([^"]*)")$/', $quoted, $matches)) {
return isset($matches[3]) ? $matches[3] : $matches[2];
}
return $quoted;
} | 1 |
f095e4e6a957844ec7923554759a15f0 | 1cdf085a097b00aa1e3bd3b9ccb07c75 | Runs read throughput tests. | def radostest(fs, obj_size=16 * MILLION, nobj=2500,
clients=1, depth=1, copies=1, crtdlt=False):
if crtdlt:
tc = fs.create(depth=depth)
td = fs.delete(depth=depth)
print("\t\t create\t delete")
print("\t\t%6d IOPS\t %6d IOPS" % (iops(tc), iops(td)))
print... | 1 |
8deace831a195a8f35d112d228ad82e9 | 614db341e7c0309a0e1453e6d617cdb6 | Űrlap megjelenítése személy meglévő telefonos elérhetőségének törlésére. | if (Eszkozok.Count == 0) {
Console.WriteLine();
Console.WriteLine("Nincs egyetlen eszköz sem ;(");
}
else {
Console.WriteLine();
Console.WriteLine("Találati eredmények:");
var query = Eszkozok.FindAll(x =... | 0 |
9593a007ca18a19a184edf00d00904b4 | bb183b99fa15004e8c6afedcd9a9eb5a | represents an index into the constant pool array (actually just a uint16) | const auto &Ret = tryParseCPIndex(Lex);
if (!Ret)
throw ParserError("Expected constant pool index");
return *Ret;
} | 1 |
1e62ebac360b18ed8fc96984b6075ca1 | d5a4675a1bcb52bb0944d532f5e83175 | 根据用户id,生成其邀请码 | static $source_string = 'EWX8DG3HQ5FLYZCA4B1NJ2RSTUV6OPI7M9K';
$num = $user_id;
$code = '';
while ( $num > 0) {
$mod = $num % 35;
$num = ($num - $mod) / 35;
$code = $source_string[$mod].$code;
}
if(empty($code[3])) {
$code =... | 1 |
b5e5784f990c11131ab48dc52f9cb410 | 8419cb5ed2ce94e5b131c7c9acaa32c5 | Get file name without extension only | namespace HWAdmin.Common.Helpers
public class FileHelper
public static string GetFileNameNoExtension(string filePath)
{
FileInfo fi = new FileInfo(filePath);
return fi.Name.Split('.')[0];
} | 1 |
f26a417bc48eed9313ca4f9e1ddf03cc | f707e05c95c2462ff6c122d3e95d5106 | Gets the service_version of this ClusterInstanceInfo.
The version of the service that the instance is running (eg Elasticsearch or Kibana), if available | public String getServiceVersion(); | 1 |
8f3cc73561b46ab52f1929263d901d13 | 0c4d3bcbabb4741330608cf9bb6473dd | placement group dump of pools in json format | def instance_pools_group():
pass | 0 |
ae64c6ee4fb67cde86e516a336c8703e | 4929222deeae64ed9947744be9f6e28d | 跳转到企业介绍 | goAbout() {
wx.navigateTo({
url: '/subs/user/company/about/about'
})
} | 1 |
e316d4639e50ef92b07f23f56cd6a3fe | b29da0cb839e54bb88f4c112822c4d69 | Display a listing of the Rt. | class RtRwController extends Controller
public function index()
{
return view('pages.rtrw.index',['data'=>RtRw::all()]);
} | 1 |
28d5a432a52e7f3aa2566ebf59d01404 | d6069303fb769c1e16aead07783b04ea | 将自己发送的位置转发到滑动右边字母导航栏定位查找的手机联系人时点击取消转发 | class MsgMyPcTest(TestCase):
def test_msg_weifenglian_PC_0093(self):
PublicMyPC().enter_MyPc_chat()
PublicMyPC().make_sure_have_file_message()
PublicMyPC().long_press_forward_file()
PublicMyPC().select_contacts_type('选择手机联系人')
time.sleep(2)
PublicMyPC().public_find_elemen... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.