query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
e75c432e5c93c3cbd239225dc4f15d0c | 8aabbf8779e9fd4a88274679b1e1225c | https://leetcode.com/problems/intersection-of-three-sorted-arrays/ | ans = list()
i,j,k=0,0,0
while i < n1 and j < n2 and k < n3:
if l1[i] == l2[j] and l2[j] == l3[k]:
ans.append(l1[i])
tmp = l1[i]
while i < n1 and tmp == l1[i]:
i+=1
while j < n2 and tmp == l2[j]:
... | 1 |
c1c28c18f7a6d3e0f3a3e2d304187f85 | 8e05579a8952f8ac237d3447464d1743 | Init map of tokens to their callbacks | init_tokens()
{
symbols.put_symbol(lparen_tok, "(");
symbols.put_symbol(rparen_tok, ")");
symbols.put_symbol(plus_tok, "+");
symbols.put_symbol(minus_tok, "-");
symbols.put_symbol(star_tok, "*");
symbols.put_symbol(slash_tok, "/");
} | 0 |
02d2a36f52afacc8d1b355c81e3b9e12 | bcd1f97e6071d8eeecb1ba4999ca45e2 | GetClient returns a usable Github API client | client, _ := ctx.Value(minimalClientKey).(*minimalClient)
if client == nil {
panic("no GitHub API client set in context")
}
return client
} | 1 |
2ae918d536fe730dc149277a2c06562a | 9ad12bba2f9649784731f8d591289850 | evaluate state dynamics with guilleman model | def GH(sys, Adj, T, nsteps=300, r1=1e-3, r2=0.2, time_save = False):
N = len(sys)
evol = np.array([0, 0, 0])
if time_save: log = sys.reshape(N, 1)
for step in tqdm(range(nsteps)):
R = np.where( sys == -1 )[0]
nR = R.size
if nR > 0:
RtoI = ( np.random.uniform(0, 1, nR)... | 1 |
bb68222f6666c40464c2ba422e244a03 | dcc3b70f882ff63b6f3e9464a76fec16 | 等额本金计算获取还款方式为等额本金的每期偿还本金
公式:每期应还本金=贷款本金÷还款期数 | String str=null;
double monthRate = rate/12;
double monthCapital = Math.floor(money/months);
double trueMonthCapital = 0d;
int om = (int) (money%months);
double residualMoney = money;
double monthInterest = 0d;
double totalMoney = 0d;
System.out.println((str="等额本金还款"));
StringBuffer sb... | 1 |
137d6bab7e20be40923d3bd88d837ebc | ae35e4388e6f98edd1b1670a3282ccbf | Event handler for the help request. Launches browser to obtain help. | try {
mainView.setWaitCursor();
Desktop.getDesktop().browse(new URI(getGuiText("HelpUrl")));
} catch (Exception e) {
handleException(e);
} finally {
mainView.setDefaultCursor();
}
} | 1 |
c15fbd1f190478e0397f61e77cd2fa1d | 136a184674bb170c2b585ea8413f31cf | Ställer in alla register för att agera som slave. | void init_slave(bsc_xfer_t &xfer, int addr) {
gpioSetMode(18, PI_ALT3);
gpioSetMode(19, PI_ALT3);
xfer.control = (addr<<16) |
(0x00<<13) |
(0x00<<12) |
(0x00<<11) |
(0x00<<10) |
(0x01<<9) |
(0x01<<8) |
(0x00<<7) |
(0x00<<6) |
(0x00<<5) |
(0x00<<4) |
(0x00<<3) |
(0x01<<2) |
(0x00<<1) |
0x0... | 1 |
c9938a82c95f3b63ff5fb8d77937453c | 878a5bb52f1c8dad2b7084c34fa7110c | Assign Logistic Regression weights and combine items in others.
Assign Logistic Regression weights and merge items in resultSets in
others into self in a single method. | self.transformer_ = _common_get_transform(self.transformer, False)
self.transformer_.fit(X, y, sample_weight=sample_weight)
X_trans, y_trans = self.transformer_.transform(X, y)
if self.classifier is None:
self.classifier_ = LogisticRegression()
else:
self.... | 0 |
1d06cd8dfb56025fbff2f145d440bd5d | e2e19441c141a171e0bfe3d29a5adb11 | gibt die Summe der Sollbetraege zurueck | {
float betrag = 0.0;
MapSplitt::iterator it;
for(it = Splittdaten.begin(); it != Splittdaten.end(); it++){
betrag += it.value().getBetrag();
}
return betrag;
} | 1 |
dd9d8aa43cdf0234c791a6ab1467cb45 | 8acf9733344ab8d19a83c3995553f78a | @brief get the value of Kd | float PID::getkD() { return kD;} | 1 |
0a244b2f519e944f4129c5616b9aa7c7 | a679077615d7a28604248980ab807ce3 | type D6 message processing, mainly receiving bootloader message and
replying to MCU | static int D6_message_process(unsigned char* recv_buf, int recv_buf_len,\
unsigned char* send_buf, int* send_buf_len)
{
int ret = -1;
unsigned short send_mesg_len = 0, check_sum = 0;
if((D6_MESSAGE != *(recv_buf + MESSAGE_TYPE_ID) ) || \
( (recv_buf_len-2) != MAKE_WORD(*(recv_buf+MESSAGE_LEN_INDEX), *(recv_buf+... | 1 |
51fd17e75b6d38b15619aa11370a8618 | e52339b48f8035f0344e2888a2c6cbf6 | 通过标准公式求标准偏差的函数 | def getStanDev(avg, alist):
difference = []
deviation = 0
devi=0
for i in alist:
difference.append(i-avg)
for i in difference:
devi += i**2
deviation = sqrt(devi)/(len(alist)-1)
return deviation | 1 |
1d5d275b3644dad2d5add606ba026dbc | e500b04b3f1faf1779240705e7b2a8e8 | Gets the "root" ontology that is loaded into this reasoner. The reasoner
takes into account the axioms in this ontology and its imports closure,
plus the axioms returned by {@link #getPendingAxiomRemovals()}, minus the
axioms returned by {@link #getPendingAxiomAdditions()} when reasoning. <br>
Note that the root ontolo... | Set<OWLOntology> getOntologies(); | 0 |
9f325b65a6348f0b4c8bba271f12ef9b | c5fe9f06affedd49f99796cb3843e5b5 | Gets the client names of the fields that can be expanded. This list will contains
the name in dotted notation of the expandable fields of fields that are expanded. | String[] re = new String[2];
re[0] = hostField.getName();
re[1] = linkedField.getName();
return re;
} | 0 |
9a96ab2ebe5cc8095b185fc71a4d1635 | c88db656ea83ea9a30defddd54f93826 | Clear two factor auth data. | class Authenticator
static clearAuthData(){
localStorage.removeItem('user');
sessionStorage.removeItem('user');
} | 0 |
3a84aacf65a28aaa6d0a7c56cc1b11a5 | d768296eef67311b520b3664420d6b58 | #3. Function to find all observated back_off bigrams
# Input: -bigram: this is the bigram-prefix ("sell_the")
# -unseen_trigram_tails: all tails of the unseen trigrams
# -bigrams: a dataframe with 2 columns: token (bigrams) and their count
# Output: a dataframe with 2 columns: ... | getObsBoNgram2 <- function(ngram2Prefix_, unobservedNGram3TailWords_, ngram2FreqDf_) {
boNgram2 <- getBoNgram2(ngram2Prefix_, unobservedNGram3TailWords_)
observedBoNgram2 <- ngram2FreqDf_[ngram2FreqDf_$featNames %in% boNgram2, ]
return(observedBoNgram2)
} | 1 |
3c80e1e6b6183245d74fac0395191e81 | 790e0ad8bcd3b3cb4caac37f309be1c7 | Returns the USAddrDoctorTypeExplanationCode for the given string value. | for (FssErrorCodeEnum e : FssErrorCodeEnum.values()) {
if (e.getExplanation().equals(explanation)) {
return e.code;
}
}
return 0;
} | 0 |
13a0ce4ae73872bcd7a700bdbb728ef3 | 523a404bf6d27392b8afe5cc2d65a89d | Method that request to the communication cloud server the list of component registered that match
whit the discovery query params, this method is asynchronous | DiscoveryResult runDiscovery(DiscoveryParams discoveryParams); | 0 |
e7bb93cc2faf538e1d5270a656fc5579 | 2baa69503902c1b656b7960888ccddb8 | Returns True if the direction is set to after. | {
GTCX
char *l_feature_name = "after";
RTEX;
EIF_INTEGER_32 ti4_1;
EIF_INTEGER_32 ti4_2;
EIF_BOOLEAN Result = ((EIF_BOOLEAN) 0);
RTCDT;
RTSN;
RTDA;
RTLD;
RTLI(1);
RTLR(0,Current);
RTLIU(1);
RTLU (SK_BOOL, &Result);
RTLU (SK_REF, &Current);
RTEAA(l_feature_name, 549, Current, 0, 0, 4769);
RTSA(dtype);
... | 1 |
f2773798a9e900cc4fc9868cbf1d2a7f | 2820b1189915c0acbe50b22176c93f24 | 通过先序遍历方式遍历所有节点 | class BST
public preOrder(): void {
this.preOrderWithNode(this.root)
} | 1 |
d6439be76a275e85da0ba1b625f1b160 | 3c22beed8d2bde748152d7b1cae458c3 | 初期状態では記事が登録されていないことを確認 | create_article(False, "Good")
response = self.client.get(reverse('blog:index'))
self.assertContains(response, "No articles are available.")
self.assertQuerysetEqual(response.context['last_articles'], []) | 1 |
a6f9f8cd9582c6448444d447e8daadea | 9213416c1f7f25fc3ab45e2151d66430 | Handles the Click event of the picLogo control. | {
Bitmap bitmap = Properties.Resources.logo;
pbLogo.BackColor = Color.Transparent;
pbLogo.Image = bitmap;
} | 0 |
a887ae212c5e862ad51062d47fc9d6d1 | bca797008d6e0b11bfe9164be1bd5d05 | Calculates the rotation needed to bring two axes coincident | public class StickerSeriesView extends ImageView
private float rotation(float x1, float y1, float x2, float y2) {
double delta_x = x1 - x2;
double delta_y = y1 - y2;
double radians = Math.atan2(delta_y, delta_x);
return (float) Math.toDegrees(radians);
} | 1 |
5ff4dd8672598a1ccedeb4625c845fca | 936674406497701dc393e4a4e9c80e8a | Represents a collection of workshop files | class PartCollection(Collection):
def __init__(self):
super(PartCollection, self).__init__() | 0 |
e4d311c13f93bab93f2f5254c912496a | ca7b5cfb3cfdd062889a6a101a26d61c | @brief - Free a mutex using atomic commands. | {
OSLAYER_ASSERT(pMutex != NULL);
if (!(checkMutexIdUsed(pMutex->mutex) && (OS_MUTEX_INITIALIZED == pMutex->initialized)))
{
pMutex->mutex = getNextMutexId ();
}
pMutex->initialized = OS_MUTEX_INITIALIZED;
mutexRelease(pMutex->mutex);
g_oslayer_last_result = OSLAYER_OK;
return(C... | 0 |
e7320ba56edfe59c5672f64b4e0346e2 | 72f284a0dedd93186286badcb549e0af | 封装一个发送广播的方法, 当模式周边设备失败, 传入一个错误码即可. 内部会把错误码作为intent的外部传递数据供广播接收者接收处理 | public abstract class BaseActivity extends FragmentActivity implements BGASwipeBackHelper.Delegate{
protected void sendBroadcast(String action){
Intent intent = new Intent();
intent.setAction(action);
sendBroadcast(intent);
} | 0 |
ae52342b967c0c72bc3dc70a4740ad92 | 18fcd7f110dc71cf6ba8f1e9088e8381 | get status of a GW agent | url = "{0}/api/c/compapi/v2/gse/get_agent_status/".format(BK_URL)
kwargs = {
"bk_app_code": APP_CODE,
"bk_app_secret": SECRET_KEY,
"bk_username": "admin",
"bk_supplier_id": 0,
"hosts": [
{
"ip": "19.17.89.6",
"bk_cloud_id": 0
... | 1 |
2e0698820965fefe367455d30d78b403 | eb8e6d5d88ca12ee9aaf129db0f43414 | Analyze code and commits and recommend what version it should be published as. | start_time = time.time()
logging.debug('Begin analyzing %s', git_dir)
all_tags = self.query_tag_commits(
git_dir, r'^version-[0-9]+\.[0-9]+\.[0-9]+$')
current_id = self.query_local_repository_commit_id(git_dir)
tag, msgs = self.query_local_repository_commits_to_existing_tag_from_id(
... | 1 |
7b422992f8ecd6ec6743e5dae84a8c12 | 0d80e65361a0ee89270ae0905e7b503b | Set Magic Conference Call parameters to NVRAM | {
char *cmds;
cmds =
"PRESET DIG;"
"MFORMAT DINT;"
"OFORMAT ASCII;"
"APER 6E-6;"
"MEM FIFO;"
"TRIG AUTO;"
"NRDGS 10,AUTO;"
"END ON;"
"TARM HOLD";
return send_msg(cmds);
} | 0 |
c65cef1f5f09a867332a4ed690831cc8 | 12c1b0d32f7efc9038e0df45640da6ec | List页面分页-带跳转 | public class ZcurdController extends BaseController
public void listPage() {
int headId = getHeadId();
ZcurdService zcurdService = Duang.duang(ZcurdService.class);
ZcurdMeta metaData = zcurdService.getMetaData(headId);
flushDictData(metaData);
System.out.println("headId "+headId);
System.out.println("metaD... | 0 |
a15ae5a3f583858148b295fd9ae71f2c | 60ea398806db78f5f6420a217cd94296 | 计算sigmoid的输出 | public class Feed_Forword
private double sigmoid(double x){
return 1.0/(1.0 + Math.exp(-x));
} | 1 |
b20c864813d8a14ce7eac5f6a1e13ee5 | 0b05b80340b87bf64dc4a2b4c85e6503 | Sets the goal for collecting treasure | namespace PAT.Lib
public class ManagerA : ExpressionValue
private void setGoal()
{
this.goalCoordinate = new int[] {9, 3};
} | 1 |
732c63bd207c7b2774f0583999618194 | 916028f3e83210b4c3d2ab507f793720 | Sends the get signed tx command and waits for a response.
Note: This command must be preceded by send_sign_tx() and then by one or more
send_prev_tx() calls to support the key nums used to fund the payment.
Returns a complete signed tx. | def get_signed_transaction(from_addr, from_private_key, to_addr, transaction_hash, output_index, satoshis):
raw = get_raw_transaction(from_addr, to_addr, transaction_hash, output_index, satoshis)
signature = get_transaction_signature(raw, from_private_key)
raw["sig_script_length"] = len(signature)
raw["... | 0 |
f0d4419acb38fa9bf0845cdceae65b3a | d1f5c4c4223d0fa3eacee65b860afb68 | 获取PCF的当前状态 | class LightManager(DebugObject):
def getPCFSampleState(self):
return self.pcfSampleState | 1 |
64fa52e43ccdda58efae8c7e7add32e1 | c9ce65277e55f7bada20a3cc2ab8f497 | Make an iterator that returns element over and over again. Runs [count] times. | for (var i = 0; i < count; i++) {
yield return factory(i);
}
} | 0 |
0c526cabf857abcb7f595954804857f8 | e426368373871aa84f2c309bfcbfa7a1 | Creates sequential ids for the orders | def call
return @order_id.increment if @order_id
@order_id = Concurrent::AtomicFixnum.new((Time.now.to_f * 10_000).to_i % 2**30)
@order_id.increment
end | 1 |
e0c8b40016b4d169a22f8ce5cd27afda | 0b2ae8ac82357955ef5e6087943995ff | 对弹幕与屏幕的上下左右碰撞进行检测以及相应事件 | let p = paddle, b = ball
if (p.collide(b)) {
if (Math.abs(b.y + b.h / 2 - p.y + p.h / 2) > Math.abs(b.y + b.h / 2 + b.speedY - p.y + p.h / 2)) {
b.speedY *= -1
} else {
b.speedY *= 1
}
b.speedX = p.collideRange(b)
}
... | 0 |
b4a289391218a1ef6a7e11426aadde05 | 0c6557469e5ba3b9e63d64a0fba6a9c8 | <p>
根据公司和员工获取对应主岗信息()
<p/> | EmployeePos getMgrEmployeePos(String deptCode, String a_deptCode, String comCode, String employeeid,
GroupType groupType); | 1 |
f7c33b7677edb2acb5fd5429cac8ab9b | 9eac07187cf6a2b8a8bbc6b32a4f4506 | Returns the inertia tensor about the component's centroid. | SpatialInertiaReadOnly getInertia(); | 1 |
82375893810c966a663dfb7e923ee567 | f87653b2f4eddf10c040ae6480ec0d73 | 清除选择仓库数据 | this.data.forEach(item => item['checked'] = false);
this.selectedItems = [];
this.delIds = this.choseList;
} | 1 |
2332769b419f4198aac5d79e88bc1b0b | 39d4bb84d8b1f643613e0fc7f08e582f | Gelen karakterin rakam olup, olmadığını kontrol ediyor | {
if ( Character.getType(c) == Character.LETTER_NUMBER )
return true;
return false;
} | 0 |
2f94ac71d0c56e20964050fc13e18f18 | 217f55bf9c233d65350f6ba0ed9bf4c2 | Checks the game status and start game. Gamestatus is handled by the GameManager.
if the player dies, then the camera stops moving. | public class GameController : MonoBehaviour
private void Update()
{
EndGame ();
} | 0 |
33c219a2d0bb8fa9b9ee39f112cf21d5 | fdaa22c34841786de6aa72b0d3deace1 | Write method for Temporal_CapabilitiesType complex type | EAttribute getTEL_Capabilities(); | 0 |
20648c0998fc41bcb3f42f8aa237e09a | bfdd4186f81d1aef05b9db970e64edc7 | 从bson.M中获取objectId类型的值 | func GetObjectId(m bson.M, key string) (*bson.ObjectId, bool) {
if res, ok := m[key]; ok {
if TypeObjectId.of(res) {
id := res.(bson.ObjectId)
return &id, true
}
return nil, false
}
return nil, false
} | 1 |
b7b236041f049b60d19c3783cb0ed72a | 528ac04b8989932867f4268c3128fe7b | GetZeroValue gets zero value for given column type. | if v == 0 {
return nil
}
return &v
} | 0 |
71676a160773eb13e5759e865836b589 | 74564490db3736c29feea156df0d237e | Validate and decode a heap block header. | {
block_head_st *block_head = NULL;
CHECK_RC_ASSERT((buf == NULL), 0);
return ((block_head_st *)buf);
} | 0 |
15a21b07557f6abc13f9aa2fef6335e2 | ab7033822068db7c78185238cbbe7b3b | Submits a new sub category. | [ValidateAntiForgeryToken]
public async Task<IActionResult> CreateSubCategory(CategoryViewModel model, int category)
{
if (ModelState.IsValid)
{
SubCategory newSubCategory = new SubCategory
{
Name = model.SubCategoryName... | 1 |
cdfb7a14ed9454883ed905ff50983656 | 40d253d9e71c5069cad1563ebdaa97f8 | shopify商品更新回调处理 | class ItemController extends Controller
public function update(Request $request, $id)
{
$data = $request->all();
$wechat = Account::account()->wechat;
if ($data['purchase_type'] == 1 && $data['type'] == 1) {
$data['limit_num'] = 0;
}
if ($data['activity_type'] == ... | 0 |
f7c84eaae2ab169d54ab5b9d8fb8d64b | 4725d3f5381c268863f67814b2b07994 | Convert YAML maps to JSON maps | func yaml2GoJson(yamlData interface{}) interface{} {
switch yamlData.(type) {
case map[interface{}]interface{}:
data := yamlData.(map[interface{}]interface{})
return yamlMap2GoJson(data)
case []interface{}:
data := yamlData.([]interface{})
return yamlArray2GoJson(data)
default:
return yamlData
}
return ... | 1 |
664e3e1b94df386382cb4db1a7806a83 | 3b2966ea2d8ba14c308e7d351c807cef | resourceIssueCreate creates a new jira issue using the jira api | url = "{}/rest/api/2/issue/".format(server_base_url)
responses.add(responses.POST, url,
json={"id": "39001", "key": "TEST-102", "self": "http://localhost:8080/rest/api/2/issue/39001"},
status=201)
jira_issue = JiraIssue(fields=Fields(project=Project(key=project_key), summ... | 1 |
025634f6abd28992ad3e249144cb81be | ec428353c85ca36fc5b8154f6a06424f | 获取用于展示图标的探测器表 | class DetectorShow(APIView):
def get(self, request, format=None):
return show_all_detectors(request) | 1 |
c318a0579c4ab11b500b6437ca7ab0c9 | a547c1a7a342a644775ac46023ba7bb3 | 根据cid返回相应的教室具体信息 | public String getClassroom()
{
forward = FORWARD_SUCCESS;
try
{
ClassroomEntity classroomEntity = cdao.getById(this.id);
this.classroomBean = new ClassroomBean();
this.classroomBean.setId(classroomEntity.getId());
this.classroomBean.setName(classroomEntity.getName());
session.put(OLD_VALUE, class... | 1 |
03661b4f636af251808d6384c1afb3a4 | 47561833f3c789ac5ce910e2b7e338c6 | 查找要删除的目标节点信息 | public NodeBo getDeleteNode(Long id); | 1 |
e8f2ba8a0753c36e4ee247a71a4562a1 | 828421374120539d5f3123853c566254 | Set the residential delivery indicator. | void setSelfBillingIndicator(int selfBillingIndicator); | 0 |
8d660d94fd56254aa7610bed673a079e | 7270565f01311e8bf4ce0c592c5dec16 | Rejects an invite sent to user to the room | return this.msg({to: this.jidFromRoomNick()})
.c('x', {xmlns: Strophe.NS.MUC + '#user'})
.c('invite', {to: jid})
.c('reason', text)
.send();
} | 0 |
3da9c79e1569ea1afbcde3a3d2e2ba2c | 1d122ab8c7a2e247db2a20c37954769f | Initialize configuration with backend specific parameters. | class GlacierBackend:
def __init__(self, conf):
if conf is None:
try:
access_key = config.get("aws", "access_key")
secret_key = config.get("aws", "secret_key")
vault_name = config.get("aws", "glacier_vault")
try:
reg... | 1 |
74e183c9d0f554bb59f89cfecfee91cb | e543fde8c8418621e0641755221bb1e3 | 设置新浪微博ID | void Weibo::setUid(QString _uid){
this->uid=_uid;
} | 1 |
0ac015e51c1be344c0af1badd27d3e69 | 22f157273357c2a3556b79b3b1ff0bdf | 发布所有视图 | void showAllViews(); | 0 |
0d6c5ee30b0067231a70d47405fa7eec | 865d30c89c858e50a985967e9526d59b | 절교메세지를 받은 사람이 메세지를 확인 하면 update해주는 컨트롤러 | {
if (currDControl.id == msg.id) return;
if (msg.message == "play")
{
Video_Pause_ByMessage();
}
else if (msg.message == "pause")
{
}
else if (msg.message == "fullScreenEnter")
{
... | 0 |
61393e7244bd519dfeabc09ee74b59e9 | 9dcdfa1caae30a4e473a7bfb95c3c1d6 | 查找可新建采购合同的商品列表 | {
$model=FrmPurchaseContract::model()->with(array('baseform'));
$criteria=New CDbCriteria();
$criteria->together=true;
if($timeL!='')
{
$criteria->addCondition('baseform.created_at >='.strtotime($timeL));
}
if($timeH!='')
{
$criteria->addCondition('baseform.created_at <='.(strtotime($timeH)+86400... | 1 |
2699b1e7b1722fc64b6682e6bcdc7284 | d19f3522f3aac369585de3620fc166d9 | Concatenates a Matrix with the current Matrix, combining the geometric effects of the two. | {
GeoMatrix ret;
ret.M11 = left.M11 + right.M11;
ret.M12 = left.M12 + right.M12;
ret.M13 = left.M13 + right.M13;
ret.M14 = left.M14 + right.M14;
ret.M21 = left.M21 + right.M21;
ret.M22 = left.M22 + right.M22;
ret.M23... | 0 |
922d01f3c9357672d8c6192a083c14f1 | a4f0b43b31abae8d9632b0fca3355860 | Gets the value of the group property.
<p>
This accessor method returns a reference to the live list,
not a snapshot. Therefore any modification you make to the
returned list will be present inside the JAXB object.
This is why there is not a <CODE>set</CODE> method for the group property.
<p>
For example, to add a new i... | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"column",
"connection",
"connections",
"credentials",
"dataAlert",
"dataQualityWarning",
"dataRole",
"database",
"datasource",
"distinctValues",
"favorite",
"field",
"fieldConcept",
"flow",
... | 1 |
2d2f934027521ab3b60a85f0b7e09c54 | 3061c4725388a5b443d0cb4459b1710e | Create and return tween which animate text component's text (symbols) value. | function animateText() {
} | 0 |
a183c043e1fa1b9737cc2756cf1b87e8 | af618af91d694df179b6fefc9e61cf58 | This test creates a Trivia and attempts to add it to the Trivia service
without logging in. The test checks to make sure that the request is
denied and the client redirected to the login page. | class ServicesTest extends TestCase
public function test_a_guest_may_not_create_service()
{
$this->post('/services')->assertRedirect('/login');
} | 1 |
2a41cf5b2c291bcdd1856ef2853e6796 | 4df73aa8ce7973d4e4c68b002ffdfb0a | Обновление горизонтальной шкалы графиков | namespace Instech.Framework
public class DebugTrack : MonoSingleton<DebugTrack>
private void RefreshGraphRange()
{
if (_allGraphs.Count <= 0)
{
return;
}
var h = (Range.height - (_allGraphs.Count - 1) * GraphMarginY) / _allGraphs.Count;
... | 0 |
1d500deeb60f1aef4d7499752bffc9a8 | c8e0d78706fd9b83c94f150011c3a1de | endecryptString method
Checks whether the encryption and decryption of a string work | public class AESToolsTest
@Test
public void testRandomness() throws InvalidKeyLengthException, StrongEncryptionNotAvailableException, IOException,
InvalidPasswordException, InvalidAESStreamException {
char[] password = "testRandomness_password".toCharArray();
final String original = "testRandomness";
System.o... | 1 |
9825ff934d81b99217cc2c16c495f0a4 | 20ea81bbd7e87452bc6be52764a7dfe8 | Compute strike-slip component of slip rate. | class ACLiftSurf(ACComponent, ACAVLWing):
def Cl(self, alpha2d, y, Re):
if self.dirty: self.Refresh()
return self.af.Cl(alpha2d, Re) | 0 |
56082437d0df081da9bc1d01080439ba | 99ebd30c79483621773a329115d9dbde | 根据指定的字符串切分原始的字符串,并获取指定位置的值 | if (value == null || split == null || index < 0) {
return null;
}
value = value.trim();
if (value.length() == 0) {
return null;
}
int counter = 0;
int slen = split.length();
int beginIndex = 0;
int endIndex = 0;
whil... | 1 |
a4e0ca85c1b9837da27c8b7c71c962f1 | ecb7b920b039dcc7f4feb2656e9f7919 | Sets whether the form submit is programmatic. | class FormState
public function setIsProgrammatic($isProgrammatic)
{
$this->isProgrammatic = (bool)$isProgrammatic;
} | 1 |
edeec30ea22cc90cddf3727799529e05 | 42c1c632b63afc225499d3b34a8b7df6 | Update scroll bars to reflect mouse dragging. | namespace Microsoft.Samples.TabletPC.InkZoom
public class InkZoom : System.Windows.Forms.Form
private void InkZoom_Resize(object sender, System.EventArgs e)
{
if (myInkCollector!=null)
{
UpdateScrollBars();
}
} | 0 |
e74831d5e48a2fb6fabcc37b92d7a220 | c0d4c5b14063d37c8298f7c5cb972b8c | Load paper details for the paper given by detail page URL
or numeric ID | var paperID = getUrlParam("paperID");
$.ajax({
type: "POST",
url: "get_paper_info_by_id",
dataType: "JSON",
data: "paperID=" + paperID,
success:function(data){
paperInfo = data;
$('#course').val(data['course']);
$('#papernumber').val(d... | 1 |
f2323e0d98e15aa4b4c5eb50a79ef8b7 | 502fbfc9449f2fe4776ea980e610b64d | prevents redraw when user selects a point on graph | public class MetricsChartPanel extends ChartPanel
public void mousePressed(MouseEvent e) {
suspendUpdate();
super.mousePressed(e);
} | 1 |
417f09dc0a8b9015c2269a8ddc35cd24 | afdece98a4d3e4348f6cb18d1754f75e | Continues the download of a file from the FTP server to a local file. | namespace libchamomile.Net public static class FTP
public static bool Download(string sourceFilename, string localFilename, bool PermitOverwrite) {
FileInfo fi = new FileInfo(localFilename);
return Download(sourceFilename, fi, PermitOverwrite);
} | 0 |
5e5a3b57404ae1f42e86a8a7d2a351ff | bc4b536591c8640bf40c14bce29d407d | Get the programmes for the department. | class Acad_Model_Department
public function getProgram ()
{
return $this->_programs;
} | 1 |
de2f176a44f8a3f51b097862f5ab2058 | b0ac7479b9ff7fcd3b37c400ad00219e | The faces need to know what faces are adjacent to them when rotating about faces. | def get_face_rel():
return {
'F': {'L': 'L', 'R': 'R', 'U': 'U', 'D': 'D'},
'L': {'L': 'B', 'R': 'F', 'U': 'U', 'D': 'D'},
'R': {'L': 'F', 'R': 'B', 'U': 'U', 'D': 'D'},
'U': {'L': 'L', 'R': 'R', 'U': 'B', 'D': 'F'},
'D': {'L': 'L', 'R': 'R', 'U': 'F', 'D': 'B'},
'B':... | 1 |
c7d69927429a4089f52440ee0d4041bc | 3c44cb9aebd933bf477095c9f25d2239 | Mark the given message IDs as unread by removing the SEEN flag. | class Automail:
def archive(self, msg_ids, with_expunge=False):
self.imap_server.select('INBOX')
self.imap_server.store(msg_ids, '+FLAGS', r'(\Seen)')
self.imap_server.store(msg_ids, '+FLAGS', r'(\Deleted)')
if with_expunge:
self.imap_server.expunge() | 0 |
eb8f6e3d7371025c3646e4f81e298876 | 4b4f2c79348637a068bf197c9ae57a2d | Overrideable no-op. | public class MockLdapClient extends LdapClient
@Override
public void use() {
} | 1 |
b1714fc22241af9f34fda3d72d3141a8 | a07f22126dd2428962124c826d74d9e6 | Show all entries tagged with X. | public class Application extends Controller
public static void listTagged(String tag){
List<Post> posts = Post.findTaggedWith(tag);
render(tag,posts);
} | 1 |
4ea2d2ac23748498565acc76ccb8caca | b9b599a3964cf00ee2359eb26aee3a2a | Get test paper registry. | @Controller
@RequestMapping("/")
public class ExamController
@RequestMapping("/papers")
@ResponseBody
public JSONArray papers() {
return (JSONArray) JSONArray.toJSON(paperService.getAllPapers());
} | 1 |
ab14a088f7ed18526f722f62cefda854 | 2cd4ce9e70045991fdfddab372e8f1e6 | transforma una expresion de ordenamiento masso en sql | if ( empty($order) || !is_string($order) ) return '';
$order = explode(',',$order);
$array = [];
foreach ( $order as $value ) {
$value = explode(' ',$value);
$array[] = $this->parseKey(array_shift($value)) . ' ' . strtoupper(array_shift($value));
}
... | 1 |
417fe75fb7c62b5e6954b1a46677760d | b71bca0278f653484bf8888790a43de1 | This function picks a time that is nearest to the actual apopase time from apoapse data.
input:
orbit_number: an orbit number: integer
keyword:
epoch: returns et (epoch time) if True instead of datetime: boolen, defaults to False
returns:
a time (datetime or et) nearest to the actual apoapse time | def get_nearest_time_apo(orbit_number, epoch=False):
apoinfo = get_apoapseinfo(orbit_number)
t_apo = get_apoapse_time(orbit_number, epoch)
t_iuv = np.array([])
for ith_file, iswath_number in enumerate(apoinfo.swath_number):
hdul = apoinfo.get_hdul(ith_file)
if epoch:
t_iuv = ... | 1 |
97a7abad854d9fb25d744c83db48a870 | 66b984a2060b3d3f3fac85125667a17c | 字典通过指针改变其值 | var dict1 map[string]string = map[string]string{"name": "lnj", "age": "18"}
fmt.Println(dict1)
change(dict1)
fmt.Println(dict1)
} | 0 |
e0184b8b11c6db3a4b482525f1ed6c21 | 69bee06ce92c016db6be450b60faad94 | !
@brief Get PDI interface timing register.
Obtain current PDI interface timing value. | int DE_IO_GetMviTimingInfo(unsigned long arg)
{
int ret;
LX_DE_MVI_TIMING_INFO_T *pstParams = (LX_DE_MVI_TIMING_INFO_T*)arg;
DE_IPC_CMD_T ipcCmd = DE_IPC_GET_MVI_TIMING_INFO;
do {
ret = DE_IPC_SetData(ipcCmd, pstParams, sizeof(LX_DE_MVI_TIMING_INFO_T));
ret = DE_IPC_GetData(pstParams, si... | 0 |
644d18e8e3efff0cf3a890715befaf0e | 1b9445c087382eff33687ff48f302782 | Gets the controller invert value from the save file. | {
TrackedObject trackedObject = GetTrackedObject(controller);
if (trackedObject == null)
{
return uint.MaxValue;
}
else
{
switch (trackedObject.source)
{
case ControllerTyp... | 0 |
8e7e28823a5359ae1c123a68756f02cf | 3d39b76510db89dc86c38d0fc60de937 | Sine activation with scaling. | class SinClassifier:
def __call__(self, x):
return sin(self._frequency * 2 ** (-x)) | 1 |
717fd48040e22b166496b2548ed092a6 | 9e5315219eeae9f62631a34b0f0df796 | Reset device to default status (HV Off, V=0.0, A=0.0) | self._voltage = 10.0
self._current = 10.0
self._setpoint_voltage = 10.0
self._setpoint_current = 10.0
self._output_mode = 0
self._output_status = 0
self._idn = "000000000000000000000000000000000000000"
self.connected = True
self.remote_comms_enable... | 0 |
116490e79144a895e7b0b616e2d0478d | 73952197d4aa541f86e8a56e918ff839 | Route Testing for Sign Up Page | class HikeTestsDatabase(unittest.TestCase):
def test_signup(self):
result = self.client.post("/SignUp",
data={"name": "unittest",
"email": "unittest@hb.com",
"zip": "11111",
... | 1 |
31dd63debc4e39ebc4d4d048d5ab3ff5 | 6e0027b6ff108650fd538ab9bad7fd5b | 当您作为被邀请方收到 {@link NERTCCallingDelegate#onInvited } 的回调时,可以调用该函数拒绝来电 | export default class RTMClient
refuseCall() {
this._remoteInvitation && this._remoteInvitation.refuse()
this.status = 'onLine'
} | 1 |
412a536b93bb89d91c654cad69cfe3d3 | dfbbaa73dfd9f261c8dfdeff05bc2c4d | 切换市价委托/限价委托 | price_type = 'limit'
if limit_price == 0:
price_type = 'any'
order = Order()
order.symbol = instrument_id
order.direction = direction
order.offset = offset
order.vol = vol
order.limit_price = limit_price
order.stop_price = stop_price
... | 1 |
eec6445ad242b1094c8d5c628981a30a | 30079acefe76f69be05b843bd4ec1d4a | Recursively fills a tree view control with the contents of an ICI object. | static void
add_item(HWND hDlg, HTREEITEM parent, ici_obj_t *o, int expand)
{
char value[256];
TV_INSERTSTRUCT insert;
ici_obj_t *object_to_expand;
HTREEITEM new_item;
BOOL has_children;
if (isptr(o))
{
ici_ptr_t *p = ptrof(o);
safe_strncpy(value, get_simple_value(p->p_key), ... | 1 |
0d4fce72019e53995202813820d203d6 | 04aaebc48fc32a4f6fcd637e78125a14 | Empirical cumulative distribution function (returns a callable). | def empirical_cdf(xs):
xs = np.sort(xs)
return lambda x: np.searchsorted(xs,x,side='right')/len(xs) | 1 |
7616d090588376c91bceec224a8b73e4 | cd2e6e69cee68ecbcd1cdb78801c6b2c | Returns the servlet's name from the web.xml configuration file. | public class ServletMetaData
public String getName() {
return getType().getSimpleName();
} | 0 |
c786dbd12723b2f0c68d32737c3006cc | 1cf5e311273abff169c25ebf6a9078fc | The enforcement of a deletion policy returns the chosen victims
that will be deleted. | class UsernameChangeAuditModel(base_models.BaseModel):
def get_deletion_policy() -> base_models.DELETION_POLICY:
return base_models.DELETION_POLICY.KEEP | 0 |
42e8e89a62a090678365675e2a872deb | 61455429751156094bd2e3067ee221ae | 请求js资源,合并输出 | if (!empty($arr)) {
$code = '';
$resource_map = $arr['async'];
$loadModJs = (FISResource::getFramework() && ($arr['js'] || $resource_map));
if ($loadModJs) {
foreach ($arr['js'] as $js) {
$code .= '<script type="text/javascript"... | 1 |
f66b088caec95c8b75294a44b3ed80c9 | c52cbacc8398d69fc298966089ab3711 | Set the value related to the column: OPR_PWD | @ASourceMachine
public class FLoggerPersonUserAccessUnit
extends FLogicUnit
public void setPassword(String value){
_password = value;
} | 1 |
9ddccec39a1b6f71cc16218b3aca07b0 | ef6dca4c96b81e062a4ea4ca23943c8c | Multiplies two polynomials via the FFT. | def multiply(p1, p2, w):
n, logn = get_pow_two(len(p1) + len(p2) - 2)
y1 = FFT(p1, w, n, logn, 1)
y2 = FFT(p2, w, n, logn, 1)
y_prod = [y1[i] * y2[i] for i in range(n)]
return FFT(y_prod, w, n, logn, -1) | 1 |
f167cfa70578ca2e9d1cff0ea78bc1fc | 3edec6c9332ef3cfdede2ebdaa1ad2a0 | Returns the LHS nodes that are not mapped to the RHS. | const vector<SparqlFilter>& origFilters,
const vector<size_t>& nodes) const {
vector<SparqlFilter> ret;
ad_utility::HashSet<string> coveredVariables;
for (auto n : nodes) {
auto& node = *_nodeMap.find(n)->second;
coveredVariables.insert(node._variables.begin(), node._variables.end());
}
for (a... | 0 |
bec2f3a6e2e1909daa1e9cfa1e9fffba | 1bfeccebb100e0eefe09ebe691afd686 | 中心文字绘制 | public class MainActivity extends AppCompatActivity
private void drawCenter(){
paint5.setColor(Color.WHITE);
paint5.setStyle(Paint.Style.FILL);
paint5.setTextSize(100);
paint5.setTextAlign(Paint.Align.CENTER);
canvas.drawText("2274",0,0 - (paint5.ascent() + paint5.descent()) / 2,... | 1 |
cea4f878fb99bb4624c29bce6b204321 | a1425e379b43de78ef31c93be7278765 | 通过加载后台返回的note对象,刷新当前分析流对象。实例化调用。 | {
if (noteWrapper == null)
throw new NullReferenceException("note is null");
subjectLine = noteWrapper.subject;
timeStampLine = noteWrapper.subLine;
detailLine = noteWrapper.detail;
} | 0 |
9cbbb81a9274f4f54d5e0fdc703add67 | c7cce7918c792004d84a951469e1affd | 生成表格23 | $.get('ENIQManage/Query2G', "", function(data){
var fieldArr=[];
var text=(JSON.parse(data).text).split(',');
for(var i in JSON.parse(data).rows[0]){
if(fieldArr.length === '0'){
fieldArr[fieldArr.length]={field:i,title:text[fieldArr.length],hidden : true};
}else{
fieldArr[fieldArr.length]={field:i,t... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.