query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
6cf4383e932d046e883fdb6bc35aa15b | 4ad12fb2406b23668c35204900bb4337 | Sets the learning rate to the initial LR decayed by 10 every 8 epochs | lr = cfg.lr * (0.8 ** (epoch // 3))
for param_group in optimizer.param_groups:
param_group['lr'] = lr | 0 |
1423bbd2124176863fedd47b5a78d863 | 96dbf23366a5c371ef3516678db30c81 | 跳转至i页;小于1则跳转到第一页,没有页数上限(可日后完善)。 | function jumpTo(newPage) {
if((newPage <= page.total) && (newPage >= 1)) {
page.pageIndex = newPage;
$(".page_index").removeClass("page_curr");
$(".page_index:eq(" + (newPage - 1) + ")").addClass("page_curr");
goPage(newPage);
} else {
window.alert("请输入介于1~"+ page.total + "的页码"... | 0 |
031b0d9b161616e67ad9d06770309afb | 4772a08823e0c887c7bcf334c0e23dbd | 付箋編集用ボタン作成 | if (mwCustomEditButtons){
for(var i=0; a = document.getElementsByTagName("span")[i]; i++) {
if(a.className == "nikud") {
a.onclick=function(){insertTags('', this.title, '');return false;};
}
}
}
} | 0 |
929032f0c2fdd4dc473409f1b67e8318 | 1626add0dbf03cf5ada451380d8fe420 | Set the last known transition of the geofence.
{@link GeofenceHardware#GEOFENCE_ENTERED}, {@link GeofenceHardware#GEOFENCE_EXITED},
{@link GeofenceHardware#GEOFENCE_UNCERTAIN}. | public class TargetGeoFence
public int getTransitionType() {
return mTransitionType;
} | 0 |
e24544d218155e2a394ef2062d082986 | e177c971aa2ff5c4a8ed9b858568e1ff | Subtract calculated background from data.
Must run bkg_calc first! | class VariableBackgroundCorrector(corr.GeneralCorrector):
def correct(self, stack):
return self.subtract_background(stack, self.time_step) | 1 |
d09d354192b6f2d9296b53429eb1abd1 | 6463d839460ea1535ccad7ee27f1f215 | Realiza la carga de los productos y los convierte al modelo | listaP = list()
for i,row in enumerate(data):
listaP.append(Producto(row[0],row[1],row[
2],row[3],row[4],row[5],row[6],row[7]))
return listaP | 1 |
49f83533cf48c3361c236e75bf1cae56 | 1d184c676b3c1c81f7d2b7420a412d15 | 前回のボリューム値を呼び出してセットする | public class SoundControl : MonoBehaviour
private void Load()
{
volumeSlider.value = PlayerPrefs.GetFloat("musicVolume");
} | 1 |
271ab32ad73ec0150ea91658b8861e38 | 270fce04ccc2262df16de1319f28f4b1 | 仕入伝票と明細行のDTOの内容から、入出庫伝票と明細行のDTOを更新します。<br>
(DBは更新しません.) | ReceiptDetail insertOrUpdateByOrderInvoiceDTO(OrderInvoiceDTO invoice); | 0 |
91a0ea219c4836c4f85aa7ab88aefa21 | 982afbb3a6f3be1b2a7387955500566d | pongo todo el puerto D como salida | void pin_setup()
{
DDRD=255;
PORTD=0;
} | 1 |
dbac243db78ab55d4022a62cf8cb7451 | e4743d803222ad07e9ed4edf9ec9b01d | compute RPN loss, include classification loss(foreground and background), bbox regression loss | label_weights, bbox_targets, bbox_weights, dir_targets,
dir_weights, num_total_samples):
if num_total_samples is None:
num_total_samples = int(cls_score.shape[0])
labels = torch.cat(labels)
label_weights = torch.cat(label_weights)
label... | 1 |
76e09d0aefa40bf91219e08c321fc416 | dfbefdccb5679bd71305f200332b6351 | # Get a mapping from Ensembl id to entrez id | translate.entrez.to.ensg <- function(ids) {
ensembl = useMart("ensembl",dataset="hsapiens_gene_ensembl")
bm <- getBM(attributes=c('ensembl_gene_id', 'entrezgene'),
filters = 'entrezgene',
values = ids,
mart = ensembl)
names(bm) <- c("ID", "TRANSLATION")
bm <- bm[!(bm... | 0 |
eadde3688ae69388414e0518ee2e2147 | 905ed7608bc230db505acfac387865f0 | Wait indefinitely for the ReverbService to stop. | int numAttempts = 0;
while (parentWatcher.isRunning() && numAttempts < 30_000) {
Thread.sleep(1);
++numAttempts;
}
} | 0 |
199145f006675a5d47d266a9defbd8fa | 81d1d4ad4b7bf3d55dccf08a13206faf | 根据unitid数组获取教职工信息 | public List<Rlgl020607Bean> getPersonInfoForCheckByUnitList(Rlgl020607Bean rlgl020607Bean) throws Exception ; | 1 |
b98c83efb2f7f8226bc4041b24b348a2 | 7e46782ee3cad25b8293031611d5f4aa | 分库保存投保确认书 | function xiGouCheLiangTouBao(){
var baoXianDanHaoOne = "暂无";
var baoXianDanHaoTwo = "暂无";
if(doValidate('xinGouCheLiangTouBao')){
if(!Ext.isEmpty($("input[name=baoXianDanHaoOne]").val())){
baoXianDanHaoOne = $("input[name=baoXianDanHaoOne]").val()
}
if(!Ext.isEmpty($("input[name=baoXianDanHaoTwo]").val())){... | 0 |
ac520aae289b7d8360498f28bfa6cfc2 | e4f7e22fe7aea6dd8e9cdbf07e586830 | 递归求阶乘 | public class RecursiveUse
public int fac(int n){
if(n==1){
return 1;
}else{
return n*fac(n-1);
}
} | 1 |
f70deb5533fc20691c79c6e0a9479e70 | 579cf3c291c9693c50dfc197728abf71 | Sets the contact state/province. | class TransactionListItem
setAddressStateProvince(value) {
loSet(this.raw, ['profile', 'address', 'stateProvince'], value);
return this;
} | 1 |
811c5b0de709e690ef271c4a0a813105 | 79c91887986cbdaf5017bdf9d8785897 | 设置接收队列基址寄存器 | void EthConfigRxStAddress(void* address)
{
ETHRXST=(unsigned int)address;
} | 1 |
e84c457ae5beb82ac339396547c30776 | b2f394bcef8b23bad32b8f42b79d0b79 | Lists origins of origin group. | origins = set()
for term in self.xapiandb.allterms("XOO"):
if term.term[3:]:
origins.add(term.term[3:])
return list(origins) | 1 |
bdbdaaca7f3cba6b9003f5edeecfae26 | 3571fd405579c95faa467d5d5099fac9 | Get breadcrumbs for a forum. | abstract class Forum_Server
function addForumBreadcrumb(array $forum_index, $forum_id = 0) {
$locale = fusion_get_locale('', FORUM_LOCALE);
if (empty($forum_id)) {
$forum_id = get('forum_id', FILTER_VALIDATE_INT) ?: 0;
}
$crumb = $this->getForumBreadcrumbs($forum_index, $foru... | 1 |
3497e6610b39bbf2c45c869d2f4af206 | bee1e6405f13eb107cd6568a1cabea65 | Imprime qué nodos están enlazados, no la matriz en sí | Tnodo ptr;
Tarista ar;
ptr=puntero;
cout<<"Nodo:Arista"<<endl;
while (ptr!=NULL){
cout<<" "<<ptr->numero<<"|";
if(ptr->ady!=NULL){
ar=ptr->ady;
while(ar!=NULL){
cout<<" "<<ar->destino->numero;
ar=ar->sgte;
}
}
ptr=ptr->sgte;
cout<<endl;
}
} | 1 |
bbf126714dc74e4a3b5b20ebba01c0e3 | 9adea6da331bb50f8c0d919975c80b3e | computes the resulting force vector by combination of the attractive and repulsive forces | void calcResForce() {
resForce[0] = attForce[0] + repForce[0];
resForce[1] = attForce[1] + repForce[1];
} | 1 |
d0a38e0e78ae37fb1234b928bce60320 | 0dee22fbf1057ba9e3146c7a5a97644e | Gets or Peeks at the next token ignore comments. | {
if (buffer.Count != 0)
return buffer.Dequeue();
return NextTokenFromSource();
} | 0 |
b8669e00785e0d41fbf72f84b6776ddd | 5d62ea23154bec525c1f60958969de6f | Mark the LayoutGroup as dirty. | public final class RowLayout implements LayoutManager2, Serializable
public final void invalidateLayout(Container parent)
{
_valid = false;
} | 1 |
2145cd79d3dcad778f0837dc5797c5f3 | 2563117b92af39351c23235dab7962af | implode array - tanpa menggunakan implode() | var dataKota = ['Jakarta','Depok','Bogor','Bekasi'];
dataKota.forEach(function (item,index,array) {
console.log(item);
console.log(index);
console.log(array);
});
} | 0 |
8fca262509ad969fb92774a5a041f9d6 | 3cce0376a50d7008f6dd362f3065e25b | Método que cargar una grilla con los funcionarios asignados al usuario logueado. | {
$usuario = Auth::user();
$nombre = $usuario->estudiante->nombres;
$funcionarios = \App\Funcionario::paginate(5);
return view("funcionarios.index", compact('funcionarios'))->with('nombre',$nombre);
} | 0 |
6eb64373ce97d12b076bc8a1f1f9e4db | 1f9c6080fd4acdfd16708c152c7a0b7a | Mostrar los productos de un cliente | {
$pyme = User::findOrFail($id);
$productos = Producto::Where('id_usuario',$id,)->get();
$imagenesProducto = ProductoImagen::all();
foreach($productos as $producto){
$imagen = ProductoImagen::Where('id_producto',$producto->id)->get();
if(isset($imagen[0])){
... | 1 |
09c5464441fe694f07bff8a2f6f56134 | 3475c261c0deb47df201c4b4686f0781 | Test case for getAssessmentResults
View Results for an Assessment. | fail ArgumentError, '@client.subscription_id is nil' if @client.subscription_id.nil?
fail ArgumentError, 'resource_group_name is nil' if resource_group_name.nil?
fail ArgumentError, 'project_name is nil' if project_name.nil?
@client.api_version = '2018-02-02'
request_headers = {}
req... | 1 |
06ddada3617331833031144f808d1aa8 | 915b11d34f04d6fb577de34269312076 | サイトからニュースを取得してリストで返す。 | function goo_api_get_news($user_id, $req, &$res) {
assert(isset($user_id));
assert(is_a($req,'SCM_InputStream'));
assert(is_a($res,'SCM_OutputStream'));
$host = "news.goo.ne.jp";
SCM_Log::trace("host:".$host);
$port = 80;
$timeout = 5;
$fp = @fopen("http://news.goo.ne.jp/private/news/MOB... | 1 |
b2c213aa24db2821930275142f06d4ae | ee2004855e3cf57676032ad6f24b55d4 | Uses the dataset type to set the appropriate sqlite3 table name | String databaseName = null;
switch (itemType) {
case CULTUREBOXES:
case GENOMICS:
case PROCESSING:
case REFERENCE_MATERIALS:
databaseName = "leaftech";
break;
case SEEDS:
case SHRUBS:
case... | 0 |
0b89c4ddb043ba6e35516f0f4dd5603e | 9d8272965c07f61bb6276e5e3458da60 | 计算EMV指标 | dm = ((data['High'] + data['Low'])/2) - ((data['High'].shift(1) + data['Low'].shift(1))/2)
br = (data['Volume'] / 100000000) / ((data['High'] - data['Low']))
EVM = dm / br
EVM_MA = pd.Series(pd.rolling_mean(EVM, ndays), name = 'EVM')
data = data.join(EVM_MA)
return data | 1 |
99f55636d45c540df5332b1efce445ee | 2b0f591150ba34e3222e6329ca2e829d | Used for CUT. Adds the first point, which is the last point outside of the mesh before cut start. Doesn't get drawn. | void Stroke::prepend_first_point() {
Eigen::Vector3d first_point = pos_before_cut + (stroke3DPoints.row(0).transpose() - pos_before_cut).dot(dir_before_cut.normalized()) * dir_before_cut.normalized();
Eigen::Matrix4f modelview = viewer.oculusVR.get_start_action_view() * viewer.core.get_model();
Eigen::Vector3f firs... | 1 |
c06847930e12f5a6a2b7dcfdc343de56 | a131f4176f3626bc912da60de2aad454 | 删除用空格分词后的句子的停用词,返回unicode字符串 | def remove_stopwords(s):
s = utils.to_unicode(s)
return " ".join(w for w in s.split() if w not in STOPWORDS) | 1 |
b761ed97da81cfbe22541dbe90f82e11 | bb6b5b4c49b0d2a3286845542f165031 | 筛选评论 | if(isset($_GET['sech'])){
$where = array('content'=>array('like','%'.I('get.sech').'%'));
$comment = D('CommentView')->where($where)->order('time desc')->select();
$this->comment = $comment ? $comment : false;
}
$this->display();
} | 1 |
a1105554c1595eed08b21288e64dd3d4 | 1bb53079bc8c7673ad2fb7da684a9376 | Add a prerequisite to one problem | class artefact(object):
def add_prerequisite(self, p):
if self.progress >= progress.BOUND:
raise dependency_error(f'can not add {p.frontend}: '
f'{self.frontend.boundname} already bound')
self.prerequisites.add(p)
if cyclic(self):
raise ... | 1 |
dfacb236001ce14cc009bd129980f74a | 4ad27df1b05f6f9fcf0e167bddbe0f59 | Returns the tracked object, required by objects that are able to be thrown | public class EditOverlayMouseTrackListener implements MouseTrackListener
public AbstractModelObject getHandledObject() {
return handledObject;
} | 1 |
21dfb9b662f5da8fb4737346c46e2d93 | 2c6d1cad557dc48dc13133c4a14c7ca6 | ######################## PROCESSA O FORM CONTA A PAGAR ###########################
A conta a pagar será salva na tabela contapagar, mas ainda não será registrada | try {
$this->db->insert('pagamento', $data);
return true;
} catch (Exception $e) {
log_message('error', $e->getMessage());
return;
}
} | 0 |
8473a71ea07913944a661a1dd5bc129e | 0d2a37c40871286e5089b42abf6a27bb | Sends a packet to all clients updating their event. | {
if (ClientType == ClientType.Host || ClientType == ClientType.Server)
{
SendToConnectingClients(packet);
SendToConnectedClients(packet);
}
} | 1 |
db407ccd38096f461f61aac46c1d171e | c97fa3919b4a0ccfdf13566892b27929 | Plays hit particles | {
foreach (var item in m_ColliderParticle)
{
item.Play();
}
} | 1 |
c0d547c8404d95a8efdf32dcbc4ce7a5 | 966e3fa8b20fec6b54fdaf3d83af011d | 根据ID停止协程 | namespace LarkFramework.GameFlow
public class GameModeBase<T> :ActorBase
where T : GameInstanceBase<T>
public void StopCoroutineTask(IEnumerator routine)
{
this.gameInstance.StopCoroutine(routine);
} | 0 |
50f751a6d5eb9d105ac61c1a8f695249 | b06cf1dae1dc653160ec450d523134f6 | Collects Windows application identifiers (AppID). | return Identifier("Win32_BaseBoard", "Model") + Identifier("Win32_BaseBoard", "Manufacturer") +
Identifier("Win32_BaseBoard", "Name") + Identifier("Win32_BaseBoard", "SerialNumber");
} | 0 |
c4851b750ecab88f17ea9da28a9ef10b | f72ad967d164607780b00b162f63be36 | Returns positions in this format:
[ [x1, y1], [x2, y2], ..., [xn, yn] ] | abstract class Geometry implements JsonSerializable
abstract public function getPositions(): array; | 1 |
557bba0496ce3ec2d7bc5d6081176585 | e8bf360324d6f797d9cd9a5fede9a1ae | Updates the repo select with the provided array of names | function setArray(repos) {
repos.forEach(repo => set(repo))
} | 0 |
e5f3dce934130192fb2ae4e98b84d199 | a866056ce2c4452f873ad1bbd6427dad | Gets a list of currently connected client IDs. | class SessionManager
public static function GetClientIDs(){
$clients = self::GetClients();
return !is_null($clients) ? array_keys($clients) : null;
} | 1 |
e36eaa34d73c86cdb98e416ffd2cf733 | 026a1fe5ffa465e70da644cb29ac9273 | Return the cospin polynomial associated to ``part``, ``weight``, and
``length``. | S = self.tensor_square()
return S.prod(S.sum_of_terms([( (Partition([r]), Partition([n-r]) ), self._q**(-r*(n-r)) )
for r in range(n+1)], distinct=True) for n in a) | 0 |
4b57b0d03b6e7bb493d6857baa65d844 | 7189fb2bcac913616abe1000f48f9116 | グローバルゲージを更新します。 | {
if ( uiGage == null )
return;
float percent = current / max;
if ( percent < 0.0f )
percent = 0.0f;
uiGage.fillAmount = percent;
if ( current <= 0 )
{
if (!Util.IsPVPModePlay())
{
bActive = false;
GetComponent<TweenHelper>().R... | 1 |
89f218997134648544ceb47ff49e5f00 | 53e26f512bed177b4de92fc73e0b2f56 | @brief 添加一个终结符到子集 | void setsubset(char *subname, char *supname )
{
struct setinfo *new,*last;
new = (struct setinfo *) xmalloc( sizeof(struct setinfo) );
new->name = strdup(subname);
new->subsetof = strdup(supname);
new->next = 0;
if( subsets==0 )
{
subsets = new;
return;
}
for( last=s... | 0 |
df07d2159fc9ee5850fb3b1982b732e9 | e669e12d8778acd20366d682f65a190e | Composes the file name for TD signals | name = name.replace(" ", "")
fname = str(name) + '_' + str(date_obs) + '_' + str(tel) + '_' + str(ins)\
+ '_' + str(spec_start) + '_' + str(spec_end) + ext
return fname | 1 |
15b013c46f8e3b09035e2f4d22bbd9bb | e9af1c5fed4985ba278ab465a935cd7f | Set checklist element to done status | {
$request = \Config\Services::request();
$params = array(
$request->getPost('text_designacao'),
$id_item
);
$this->query(
"UPDATE check_list
SET check_list = ?
WHERE id_checklist = ? ",
$params
);
} | 0 |
9ac07f0abe36e2ce8c1b3754cdbca5bb | 80070656c577163073061a4e374ab5e4 | Migrates agents between the two environments. Runs every 50k
time-steps when migration is turned on. | class World:
def move_agent(self):
self.travelers = []
for env in self.get_environments():
outflow_agents = [
data["agent"]
for _, data in env.graph.nodes(data=True)
if data["agent"].is_stay_in(env.name)
and data["agent"].is_liv... | 1 |
3f901dfb4f777b031b8075668d6c61a4 | ca138bbd9da2ff3ff564806f1a6397b1 | Stops Nexus (if running) after each test.
<p/>
{@inheritDoc} | public abstract class GridCacheContinuousQueryAbstractSelfTest extends GridCommonAbstractTest
@Override protected void afterTestsStopped() throws Exception {
stopAllGrids();
} | 0 |
73c34a8bad82b17c71e1039c10de129b | d3b0fbb24b7db03524956b7f256b0719 | 处理输入的IP地址 | F_input = False
for i in range(0, len(self.ipList)):
if ID == self.ipList[i][0]:
del self.ipList[i]
self.ipList.append((ID, addr))
F_input = True
break
if not F_input:
self.ipList.append((ID, addr))
r... | 1 |
01307190dae78c98b1ae3d79fa66170b | 89ffb81998548e1c45286f508ca3d08c | Returns the current IPolicy held by this HouseHold | class HumanResources(Department):
def get_policy(self):
return self.policies | 0 |
a9183ff0646738a6f2f01dd6dfe72302 | 12851374074d615dcec024eef5b7d989 | Generates a random number or array based on a uniform distribution. | class Random(object):
def rand(self, distribution):
da_key = self.context._generate_key()
ddpr = distribution.get_dim_data_per_rank()
ddpr_name = self.context._key_and_push(ddpr)[0]
comm_name = self.context.comm
self.context._execute(
'{da_key} = distarray.local.rando... | 1 |
f8a3b50c1b437840986c9966c7bab791 | 7cb382f9bcb47d45a5b0b35556b9264e | Computes how wide a health bar should be. | healthBarWidth = Screen.width * healthBarSizePercent / 100.0f;
healthBarHeight = healthBarWidth;
if (healthBarLocation == healthBarLocationValues.topLeft)
{
healthBarCenter = new Vector2(healthBarWidth / 2, healthBarHeight / 2);
}
else if (healthBarLocation ==... | 1 |
fa0ef7826de6b9b187faabdd3b3dc80e | 1208ee2c2bbfdb6917cad53706641750 | 打印标签并保存 | {
if (string.IsNullOrEmpty(text))
return;
if (!File.Exists(this.fileName))
return;
string tmp = this.savePath + DateTime.Now.Ticks.ToString() + "." + FileExt;
using (Image loadPic = Image.FromFile(this.fileName))
{
... | 1 |
e9dc4b2dcbbbf55dad92bac1b31f88a1 | bb38bbe2f8a9fd609473c22c62aa6469 | Returns the point where the PC will look at when interacts with the object | public class CutsceneCamera extends GameCamera
public Point3d getLookAt() {
return this.lookAt;
} | 1 |
913cc9f240ae17809288043b600f5e54 | 13e2a47d0ccfc78c22415ccbce72b0da | Меняем текст кнопки отправки формы | class ImageUploader extends BaseControl{
function setButtonSendText($value) {
$this->_buttonSendText = $value;
} | 1 |
0ff4b8644858aae9a9ecb9355efe564c | 562d9e479bb109f1216f12d0194607b6 | Groups, sorts and builds list components for work packages | function initTasks(pageForm) {
if (!_.isUndefined(app.storage.custom) && app.storage.custom.get('DEBUG_ENABLED')) {
app.custom.utils.log('wiTaskMain:initTasks', {
pageForm: pageForm,
});
}
var closedStatusIds = _.chain(app.constants.workItemStatuses)
.pluck('Closed')
.compact... | 1 |
0364ea460b51e3267761d239450b759b | 351e9bca14d58bfa7c2c9cc4ae081fa5 | Builds a single continuation frame out of the binary header block. | {
*pData = hdr->fc.type;
*pData |= hdr->fc.manuSpecific << 2;
*pData |= hdr->fc.direction << 3;
*pData |= hdr->fc.disableDefaultRsp << 4;
pData++;
if ( hdr->fc.manuSpecific )
{
*pData++ = LO_UINT16( hdr->manuCode );
*pData++ = HI_UINT16( hdr->manuCode );
}
*pData++ = hdr->transSeqNum;
*pDa... | 1 |
5f7580d722b49868db9d3f3b94cf2462 | 3659de3998dcbcfe1e14fb2b9310ed30 | Extract error data from context | class AnsibleExecutor(ExecutorPrototype):
def extract_return_error(self, return_context):
if 'msg' in return_context:
return return_context['msg']
return "" | 1 |
0346a80329d022ebac6d31e6f5626309 | 13cc2adceaaa8e40314340dcb7dd7339 | 按月拆分时间 | class AbstractSecurityTimeSeries(AbstractTimeSeries):
def split_month(self) -> list:
pass | 1 |
94aa911178ecf08ee078d412d17a463d | 533b054885c6c97e4f1dd56b08ac2adb | 为更新资源权限提供UI界面 | @Controller
@RequestMapping(value="/resources")
public class ResourceController extends ActionSupport{
@RequestMapping(value="/updateResource.html")
public void updateResource(Resource resource,Long []resourceRoles,ServletResponse response){
SecurityContext sc = SecurityContextHolder.getContext();
UserDetails us... | 0 |
491b46cf816ca096f89f78c91b712041 | 1f10223ba969be3106d7db08108c25e4 | Gets inventory_number | public class ItemstockVo
public BigDecimal getInventoryid() {
return inventoryid;
} | 0 |
0f2d99048474327119879d39612ff042 | 27edd12dae30fb7d20f1e81ba9803092 | {NETWORK_SOCKET}.is_valid_peer_address | {
struct sockaddr_in *a1 = (struct sockaddr_in *)addr1->data;
struct sockaddr_in *a2 = (struct sockaddr_in *)addr2->data;
return (a1->sin_port == a2->sin_port) && PPB_NetAddress_Private_1_1_instance.AreHostsEqual(addr1, addr2);
} | 0 |
8b60604f5bd7d6e6b4e2125a496d25e6 | ab26bac721c21a8111458471515a7af4 | ユーザーのデータをFormへ変換する | class UserProfileService
public function getProfileInfo(UserDomainEntity $user): self
{
$user = $this->userRepository->getById($user->getId(), [
UserProperty::UserProfile,
UserProperty::Prefecture
]);
$formData = [];
$optionTypes = [
RegistrationOp... | 1 |
2fdb343fd09df501751f08afcd283725 | 0154277b55c9fad6da21f2688de56249 | From https://stackoverflow.com/a/3431838: | def zip(*iterables):
sentinel = object()
iterators = [iter(it) for it in iterables]
while iterators:
result = []
for it in iterators:
elem = next(it, sentinel)
if elem is sentinel:
return
result.append(elem)
yield tuple(result) | 1 |
b037a6b2d640eeca6dd29d3b47d4d3c0 | 8a8e66fcfeb4dcff2c82fcbbda4ed98f | 打印DataGridView数据 | namespace BLL
public class PrintDataGridView
public static void Print(DataGridView dataGridView, string title,Icon icon)
{
if (dataGridView == null)
{
return;
}
titleName = title;
dgv = dataGridView;
PrintPreviewDialog p... | 1 |
e7e65aeccd99017825638e67dce2443e | b40bf280de22e9b75312f3a0ad9fc7b0 | Checks if the partition uses MATCH patterns (see {@link #vertexMatchPatternLabels()}). | public default boolean isByPartition()
{
return (characteristics() & BY_PARTITION) != 0;
} | 0 |
c35ad7e6cf5dfe7d5c595c8f82ccdd2d | c30288a493f975b3a42cf8f2ee525810 | 請求書に設定する消費税を計算して返します.<br>
区分コード毎に計算方法が異なります. | {
DataTable dtSetCd;
int Hasukeisankubun = 0;
OpenSQL opensql = new OpenSQL();
try
{
string strSQLInput = " SELECT 消費税端数計算区分 FROM 取引先 WHERE 取引先コード= '" + txtCD + "'";
DBConnective dbconnective = new DBConnective();
... | 1 |
d6c00b1f7bbd6ee710f3d437f191da22 | a84914009fa85aeca1a7ec487b88839e | Speed of gap fill print moves in mm/s (default: 20) | export class MaterialCircuit extends MaterialMulti
get boardSpeed(): number { return this.materials[ PassType.Texture ]._uniforms[ 'boardSpeed' ].value; } | 0 |
1dd1d2b4d71a033ed7c05be17c120400 | 31f6cbcd5ad355826593a7c37f1622c8 | 添加用户时查询在线身份卡,输入不存在的卡号 | self.log.info('测试用例:%s' % sys._getframe(0).f_code.co_name)
usergrouplist2 = []
UserGroup.AddCardToUserGroup(usergrouplist2, cardId=user.cardId4)
res = nfc.CardDetails()
self.assertNotIn('userGroupId',res.json()['result'][0]) | 0 |
aaa03991db40b7070e1681232284636b | 847b06787ef65eb097f1c0737e2aa397 | dodavanje nove linije u tekst pitanja | bool AddOdgovor(const char* tekstOdgovora, bool daLiJeTacanTajOdgovor) {
for (int i = 0; i < 10; i++) {
if (_odgovori[i] != nullptr) {
if (strcmp(_odgovori[i], tekstOdgovora) == 0)
return false;
}
else {
_odgovori[i] = new char[strlen(tekstOdgovora) + 1];
strcpy_s(_odgovori[i], strlen(tekstO... | 0 |
ac0709878dfcbb59e147be1f6cedcb0c | fdbec442859d0aee944fc6e178a4f368 | Adds support for Image as an Out param. | namespace Aviary.Macaw.GH.Construct
public class CompositeImages : GH_Component
protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager)
{
pManager.AddGenericParameter("Image", "I", "The resultant image", GH_ParamAccess.item);
} | 1 |
564e9fb94a63f6a217798d024dacf595 | 5632753e646b4d516deca6c226cf4a6d | Recieves and handles a group leave message. | def group_exit(ctx: EventMsg) -> Optional[GroupExit]:
try:
assert ctx.EventName == EventNames.ON_EVENT_GROUP_EXIT
return GroupExit(**ctx.EventData)
except Exception:
return None | 1 |
998c8aba334f032e07ec67025f987e95 | b38921b265c1aee83ffe2fa6f5eaa51b | System.Single UnityEngine.Touch::get_maximumPossiblePressure() | InternalUnsafeMethods.GetMaxDamage__Args _args = new InternalUnsafeMethods.GetMaxDamage__Args() {
};
float _engineResult = InternalUnsafeMethods.GetMaxDamage()(ObjectPtr, _args);
return _engineResult;
} | 0 |
839b5b1a05d160be84a16aea881b1ec8 | 927e55517b178b8ea89342b989d6ef35 | Make an object property, or return instance if already in ontology | class Loader():
def __handleObjectProperty(self, object_property: str, i_type: str,
i_id: str, candidate_obj: object) -> Union[list, ThingClass]:
isList: bool = type(candidate_obj) is list
if not isList: candidate_obj = [candidate_obj]
ret_obj = []
for obj in candidate_obj:
... | 1 |
963881ddb1eb87219e9062af792bb9d0 | 48733a6e3d9dac01c91a99987c1be7b8 | Get additional query parameters. | class CloseIoRequest
public function getQueryParams(): array
{
return $this->queryParams;
} | 1 |
b9e8ca7874138ccfbe7535a1045da763 | aa1e80fe8f560d50c330443cc947fad8 | Request user to complete the Nokia Health OAuth2 flow. | public class EvernoteSession
public void authenticate(Context ctx) {
Intent intent = new Intent(ctx, EvernoteOAuthActivity.class);
intent.putExtra(EvernoteOAuthActivity.EXTRA_EVERNOTE_HOST, mConsumerHost);
intent.putExtra(EvernoteOAuthActivity.EXTRA_CONSUMER_KEY, mConsumerKey);
intent.putExtra(EvernoteO... | 0 |
db69f2a461a526dbba289f0c27e09ec9 | 254aa6568f0d6e442a3c38c007167c90 | DELETE /rm-pages/:id : delete the "id" rMPage. | class RmController extends Controller
public function destroy($id)
{
} | 1 |
56f9b07349300abf25ea33c8038222cc | 9869e23f15153b6a7dafb23889e8d110 | Use this method to register own templates for form builder.
Make sure, that you have `tmpl-` in template name in `<script id="tmpl-*">`. | def register_template_filters(app):
pass | 0 |
f7b46ffc7d135b98dc0add15056bc343 | 1ca72a0f325b56c957849bc0905329e1 | Gets a formated language code. | {
if (String.IsNullOrEmpty(languageName))
return String.Empty;
var match = _regexExtractCode.Match(languageName);
return (match.Success && match.Groups.Count == 2)
? match.Groups[1].Value
: languageName;
} | 1 |
98aeb6a896b9b66d9f0b3fce11635259 | 279f8dde8940f2b97983945e65d8622b | Returns the meta object for the containment reference '{@link mdsd.mathCompiler.Plus#getLeft <em>Left</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getBSPlusMinusOrStringConcatExpression_Left(); | 0 |
1763193e325bc65a000c8018efaec960 | 303f45207c3f57881ef9c2a0f1abe654 | Adds an {@link AllGather} operator | inp: Tensor, group: Optional[Group] = WORLD, device: Optional[str] = ""
) -> Tensor:
mode = CollectiveComm.Mode.SCATTER
return collective_comm(inp, mode, group, device) | 0 |
7e38814c2f506d1eb801c04c08e88f6e | bc8dd21eb6741743623ee83776c7a75a | 生成设置灯杆倾斜角度的报文(°) | String ADD = "200F";
String DR = "06";
String LENGTH = "";
String INFO = "FF" + HexUtil.intToHexStringOne(tiltAngle);
return MessageOperationUtil.generateMessage(ADR, DR, ADD, LENGTH, INFO);
} | 1 |
93c168082e0aeb4a39a850b056a3d918 | 825a05669c03bfd9e6c11f01157194f5 | Get the number of symbols in the clauses knowledge base list | public int nbeCles(); | 0 |
8629407567ac316f9b480c31b26f6f0b | 9001320569d32d9a187e8dade2bfdde3 | Getter for <code>bitnami_edx.instructor_task_instructortask.task_type</code>. | public class VerifyTargetMessage extends Message implements Serializable
public String getTargetTaskType() {
return targetTaskType;
} | 0 |
4e07f1896269318a6edb088555277aa0 | 49a2e042c3455967aba9ec6942802b83 | 書籍Beanを設定します。 | item.setItemID(book.getBookId());
item.setName(book.getBookName());
item.setPicturePath(book.getPicture());
float marketPrice = book.getMarketPrice();
float discount = book.getDiscount();
item.setPrice(String.format("%.2f",
(MathUtilty.roundWithdigits(marketPrice * discount))));
} | 1 |
b8cc36539e3213a659851b33101c8ce7 | bd745c871770ab48303a8d007e605a21 | Delete current association for provided post. | class PostController extends Controller
public function destroy(Post $post) {
$post->categories()->detach();
$post->delete();
return redirect()->back();
} | 1 |
28bf2c35245dced5036d0930175a8e77 | 37f45f7400aa9e8f643b4f59e3a938e1 | Returns a list of files that export a certain resource (declaration). | public class Client extends BaseClient
public ExportFiles getExportFiles(String exportDate) {
final String url = "/export_dates/{export_date}/export_files";
final HashMap<String, String> urlParams = new HashMap<String, String>();
urlParams.put("export_date", exportDate);
final String path = this.interpo... | 1 |
a05f5bc014b6e8a9f4ee651b88a9d903 | 6ec515b122c47c76f147e315e13a1972 | 过滤没有匹配的商品公共函数 | filter_sure () {
let tag_str = ''
this.filter_list.map(n=>{
n.list.map(m=>{
if(m.correct) {
if(tag_str === ''){
tag_str = '?tag_id='+m.id
}else{
tag_str += '&tag_id='+m.id
}
}
})
})
if(tag_str===''){... | 0 |
ada54e88a18e62e55fd84a4bff2a91ab | 367a42aea9110516cfca5328e94c0e41 | @brief Function for creating integral types. | int ir_dentry_create_int(unsigned width, int64_t value, ir_dentry_t **rdentry)
{
ir_dentry_t *dentry;
dentry = calloc(1, sizeof(ir_dentry_t));
if (dentry == NULL)
return ENOMEM;
dentry->dtype = ird_int;
dentry->width = width;
dentry->value = value;
*rdentry = dentry;
return EOK;
} | 1 |
d8372dfce36ecee39bd70b8b3f3a24fe | ff315a08fd91501dcd97a4471078b6a4 | Set group label, for designer. | namespace Counsel_System.DAO
public class QuestionGroupConfig
public void SetQuestionGroupLabel(string label)
{
_QGroup.SetAttributeValue("label", label);
} | 1 |
4502b4f06a84fc5547bfb70064fbaeae | 7381af4e4da3650f484dc4507b9cfced | @brief Append an entry to the ordering. | CmtGetLock(b->lock);
*(b->nextToWrite) = entry;
b->nextToWrite++;
if ( b->nextToWrite == b->bufferEnd ){
b->nextToWrite = b->bufferStart;
b->wrap++;
}
CmtReleaseLock(b->lock);
} | 1 |
68170a7fb1ec9434a68d5e1ef9f66128 | 179da59ac7e6a2534711290fc8b82ce1 | lettura della control word del plc, controlla se la macchina è abilitata e in start e setta i pulsanti di conseguenza | public void load()
{
if(controlRd.get(1))
readS();
if(controlRd.get(0))
readU();
busAddrMPC.set(word);
} | 0 |
38af2beb7ead27ad5b2196f28f159319 | c0bfbc6ab3c8c951422f77b16be2f8ee | Returns a service-specific object used to query a service about storage classes. | namespace AzureDeploymentCmdlets.WAPPSCmdlet
[OperationContract(AsyncPattern = true)]
[WebGet(UriTemplate = @"{subscriptionId}/services/storageservices/{serviceName}")]
IAsyncResult BeginGetStorageService(string subscriptionId, string serviceName, AsyncCallback callback, object state); | 0 |
2b62dacf4da9c4d25706ecf20bca7c09 | 4780feecd211fcbd77b214af0c306b45 | Default constructor assigns actions and filters as necessary. Also registers activation
and deactivation hooks. | class Ava_Smart_Filters
public function __construct() {
$this->plugin_name = plugin_basename( __FILE__ );
add_action( 'after_setup_theme', array( $this, 'framework_loader' ), -20 );
add_action( 'init', array( $this, 'lang' ), -999 );
add_action( 'init', array( $this, 'init' ), -999 );
} | 0 |
8f8413543ffd1983832364fcb4e7fe1b | dd63c0b1230a641e88e2fcc19ead3520 | 将列表li分割成大小为n的块 | class Client:
def _partition_URI_list(self, l, n):
for i in range(0, len(l), n):
yield l[i:i+n] | 1 |
353e3d6aa1e42d71812bdb581e6dead1 | 3c70731d9f14b43e041f3f1bf36824c6 | Make a backup estudiantes directory and log file into backup directory | def make_backup():
if not shutil.copy2(HOSTFILE, BACKUPFILE):
return False
return True | 0 |
d82471c6c46a0777ad9824acea31f2b6 | 78a0764d2fc075d9ede2467a9c838cad | Try to download the peer certificates with support for SMTP STARTTLS support. | control_node_proxy, ssl_dir, retries=0, wait_time=0
):
logger.info('fetching certificates')
attempts = 0
zip_path = None
while attempts <= retries:
logger.debug('attempt: %s of %s' % (attempts + 1, retries + 1))
try:
zip_path = control_node_proxy.get_certificates()
... | 0 |
72ef3515ec5694d39c316eb9aa553bce | 9c6025f1ead0d64afaae7e0bde8859e0 | 把输入A的数字四舍五入为B输入的小数位数 | BigDecimal b = new BigDecimal(in);
in = b.setScale(n, BigDecimal.ROUND_HALF_UP).floatValue();
return in;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.