query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
ed190a49c588a9ff8f4be5a209007b71 | ce441451058bb21491b11339163b6f1f | Represent a Mail-Exchange-Record (MX) which was resolved for a domain. | {
ThrowIfObjectDisposed();
if (string.IsNullOrWhiteSpace(domain))
{ throw new ArgumentException($"Argument '{nameof(domain)}' value must be specified."); }
if (domain.IndexOf("@") > -1)
{
domain = domain.Split(new char[] { '@' }, 2)[1];... | 1 |
301a94c8fdf29ab69d2655b47dd3a7dd | 37928d62974130a13f1b249c2bbc5a55 | Validates test cases after they are parsed | def validate_test_case(test_case):
m = TEST_CASE_PATTERN.match(test_case)
if m:
test_case_name = m.group(1)
if test_case_name not in TEST_CASE_TYPES:
raise argparse.ArgumentTypeError('Invalid test case name: %s.' % test_case_name)
test_case_args = m.group(2)
n = TEST_... | 1 |
91b690b19ba345070084584185e00ba9 | cda42e7db431791ca82024c49a74cd98 | Used to update the file name. | public class FileBuffer
public void setName(String in)
{
this.fileName = in;
} | 1 |
a9f20a20f06fb62709fd390102d53113 | ab0d184890bd34b87c6256eac5565346 | 检测销组广告在Draft,pending to approve,pending for upload状态下是否有广告 | StringBuilder sql = new StringBuilder();
sql.append(" select count(*) from sp_campaign sc where (1=1)");
if (advertiserId != null && advertiserId != 0) {
sql.append(" and sc.advertiser_id = ").append(advertiserId);
}
sql.append(" LIMIT 1");
Query query =this.getSession().createSQLQuery(sql.toString());
... | 0 |
e5e26584718e8daa6c7fbb4322b357b0 | ce9430da42ddaa4486cdc6f8147e9a50 | Returns link to the next page where bio of celeb is placed | class WayBackScraper(RedditScraper):
def getNextPage(self, soup):
nexta = soup.select('a[alt="Next capture"]')
nextPage = nexta.get('href')
print "nextPage is ", nextPage
return nextPage | 0 |
0212baba3c39e5297ab63d1a7ca57cc7 | 395f24ecdcd62c245fa59465662d66c7 | Обновление информации о барбере по его ID | namespace BarCrawler.DataAccessLogic.Repositories.Interface
BarModel GetEditInfo(int? id); | 0 |
501d7d795c5f5f8e9d7088d1e2bcbfd6 | 486488896ded8acf110935d6c0e47f43 | Проверка отсутствия книг в корзине | link = "http://selenium1py.pythonanywhere.com/catalogue/coders-at-work_207/"
page = ProductPage(browser, link)
page.open()
page.go_to_basket()
basket_page = BasketPage(browser, browser.current_url)
basket_page.check_basket_is_empty() | 1 |
119198de88181f3b2fa27a2ca77f9451 | ab798848f83152a4ed6d4e07290bfae2 | Returns the meta object for class '{@link FederationOffice.networkelements.Device <em>Device</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getSubnet_Networkdevice(); | 0 |
caf1083f9553349e087e3fc45a61f88c | eb05385e751ee08cc7de226e5ad7a523 | GET: DetailCommande | {
return base.Get<BonCommandeDetails>($"app/crosscanal/commandes/{ base.ConvertDataToUrlFragment(siteId, siteId.GetType()) }/{ base.ConvertDataToUrlFragment(orderGuid, orderGuid.GetType()) }");
} | 1 |
2b741c3e62bbd9aa5383e59f41190ae7 | cd8a25908e6ccf2882af6c5075d2c5c9 | Metodo que verifica si esta activado la Conexion Externa al Sistema Comercial mediante la
Parametrizacion en la tabla respectiva | {
Boolean retorno = false;
if (row[10] != DBNull.Value)
retorno = Convert.ToBoolean(row[10]);
return retorno;
} | 1 |
dac95cd2810c57a1fe8fb53c75224a54 | 022e85b47b2a1d514e51f0f1766278d8 | 通过系统api getExternalCacheDir()获取存储卡路径,有可能返回失败
这个做为第一个获取路径的方法
https://my.oschina.net/liucundong/blog/288183 | public class SystemUtils
public static String getExternalCachePath(Context context) {
String path = Environment.getExternalStorageDirectory().getPath()
+ "/Android/data/" + context.getPackageName() + "/cache";
File directory = new File(path);
if (!directory.exists()) {
... | 0 |
0f6c6aa5d2bfceb09d91d8cf4e8c3b05 | fb20690a5ddbef827a4d2b51b8002196 | Function to create each quadrant of the Index matrix | long i;
for(i=0; i<n; i++) {
matrix[index][i] = 0;
}
matrix[index][index] = 1;
} | 0 |
41d8a94b5600045fe500878cd9826023 | 5973bf5c8dbf737fdf636fd2d94a267c | Возвращает город по данным соц сети. | class Dadata extends AbstractService
public function getCityByIp($ip)
{
if (($xml = $this->requestXml($ip)) && isset($xml->location->data->city)) {
return (string)$xml->location->data->city;
}
return false;
} | 0 |
b15a9ad03b0a0ebbe7797cd6d9385287 | 4557d816ed44de9b3bb5080ba3240f86 | Binary to Bytes | def toBytes(bitArray):
data = bitArray
allBytes = bytearray(b'')
while data:
dataSlice = BitArray()
if len(data)>7:
dataSlice = data[:8]
del data[:8]
else:
dataSlice = data
binaryString = "0b"
for i in range(8-len(data)):
... | 1 |
9891d650f6a3ccaf829440b1adc533f3 | 74fe213d9f3578955ffd23932aed31f2 | Print the FPU status word. | uint64_t nzcv_flags;
asm volatile ("mrs %0, NZCV" : "=r" (nzcv_flags));
uart_puts("processor_print: NZCV: ");
uart_hex_uint64(nzcv_flags);
uart_puts("\n");
} | 0 |
652fb2d1ec91779fa3f45ade17fc8743 | ef94c295d24d8338671863ff69612016 | Return an array with the total losses in KWh and in US$ in that order | def SubstationLosses():
return get_float64_array(lib.Circuit_Get_SubstationLosses) | 0 |
588f39e281627dd12a4223ee2cbb8fd5 | 51ed5cca09abe5adb04295421f25e6d4 | 当一个新技能拖动到技能快捷面板的时候,先检测该面板里是否已经有了这个技能,有的话就把它删掉(替换) | {
if (oldIitemSkill == null)
return;
if (this.iitemSkill != null)
if (this.iitemSkill.Contains(oldIitemSkill))
this.iitemSkill.Remove(oldIitemSkill);
} | 1 |
3efad239e1f26cca44e3b9cf585248ae | 8d29e04c42140a84da9fa67904a8d4dd | Returns the definition of a specific DataBrew job. | @ServiceMethod(returns = ReturnType.SINGLE)
Response<JobDefinitionInner> getWithResponse(
String resourceGroupName,
String storageMoverName,
String projectName,
String jobDefinitionName,
Context context); | 1 |
e47362e6f4a1bffe9de975f06c732b52 | 1d1d3a1c276fd1c434ef1f5052c6fe80 | Get a room's floorID | function getRoomId($roomCode) {
return sqlToArray ('rooms','id','WHERE `code` = "' . $roomCode . '"')[0]['id'];
} | 0 |
d0d8f03fd25dece89e01c6666f5fbd5c | b2dbea926c33667a0f887eb7430aa900 | Default rails path configuration | @paths = {:spec => 'rb', :features => 'feature' }
@files = {}
end | 0 |
02da25402fb35dcafd49fa4a1c0c47d5 | b223598c0d3feef08bd59f47b767ca06 | Finds the average of the last number from two lists | namespace SEIDR
public static class NumExtensions
public static long Average(this long a, long b) => a.Average(1, b, 1); | 0 |
2027c4dca0a102449b3d78ccf066d805 | fbf0e142fe1ae13349c3d19ac6ec2bcd | Is CSS Transforms allowed | function isSuppertTransform(){
var node = document.createElement("div")
var vendors = ['t', 'webkitT', 'MozT', 'msT', 'OT']
var transform;
for(var i = 0; i < vendors.length; i++){
transform = vendors[i] + 'ransform';
if(node.style[transform] !== undefined){
return true
}
}
return false
} | 1 |
158d99ab2a7d2d0e3ec15e50972b4f31 | 5cfcf27e93763a8629a0f32cecb4be34 | Calcula el límite de paginas a mostrar. | export class AuditComponent implements OnInit
numPage(from, to, total){
if(total > to ){
this.numFilas = to;
}else{
this.numFilas = total;
}
if ( from === 1) {
this.dt.first = 0;
this.pg.first = 0;
}
} | 0 |
8296509bd2abf1794b8577f2daf217fa | 3997bdb8887745b3908debedf06049d8 | 死亡可否逃跑 | {
if(m_parent.RoleModel.m_undead)return false;
if (DebugUI.instance.unDead) return false;
int hp = m_parent.GetInt(enProp.hp);
if (hp > 0)
return false;
return true;
} | 1 |
b8d2d61428d1ef0f9dc018fdd24c93f4 | 969314ccc93736110c1418967e9e362d | Recursively adds this joinable and all its dependencies to the specified set, that are not yet completed. | namespace AdventOfCode2017.Days class Day12 : IDay
private void AddConnected(int id, HashSet<int> hashSet, Dictionary<int, HashSet<int>> dictionary) {
if (!hashSet.Contains(id)) {
hashSet.Add(id);
foreach (int conId in dictionary[id]) {
AddConnected(co... | 1 |
dd14425d80268282d9770a99b1c32695 | 33be1409b242beaeab56564c923db5f0 | Function Description:
人机界面处理
None
Return
None | int main_interface(int i)
{
char num;
while (1)
{
printf("======================================================\n");
printf("\t\t1.computing_time\n");
printf("\t\t2.show\n");
printf("\t\t3.change information\n");
printf("\t\t4.return\n");
printf("\t\t5.switch_user\n");
printf("\t\t6.exit user\n");
p... | 1 |
763e62f5c42a3d2b7b2e4fe900c83e3b | c9d2b9510af7399fab3aa81a94a5c7ce | URLを短縮URLにする | {
$httpQuery = $this->buildHttpQuery([
'source' => $this->appKey,
'url_long' => $urlLong
]);
$response = $this->getClient()
->get($this->apiShorten . '.' . $this->format .'?' . $httpQuery)
->send()
->getData();
return $respo... | 1 |
4b5108b9bcb07a4e2cb7820bf015572a | ffc6bb691b3d1473f2692a68bba29a8f | Set the formula used to to determine the plural case. | public class VariablePluralityEvent extends GwtEvent<VariablePluralityEvent.Handler>
public void setPlural(boolean plural) {
this.plural = plural;
} | 0 |
e88fc6f22d995fbbaed6267fba7ba128 | 6409a66d69960fdbc57f8bd58667fc44 | argument generator for handling variable declaration messages | static int argumentCounter = 0;
if (argumentNumber == GEN_COUNTER_RESET) {
argumentCounter = 0;
return;
}
else if (argumentNumber == GEN_COUNTER_ADD)
argumentCounter++;
else
argumentCounter = argumentNumber;
printf("DEFVAR TF@%%%d\nMOVE TF@%%%d ", argumentCounter,... | 1 |
89c8276abe3f72cb4c363a4b1021a3d7 | 2dc56d878c19b701e5caa7a147a71fcd | 編輯口罩名稱 | {
$this->isPut();
$user_item = getUser();
parse_str(file_get_contents('php://input'), $_PUT);
$name = $_PUT['name'];
$check_tool = new CheckTool;
$is_right = $check_tool->checkName($name);
if ($is_right) {
$user ... | 0 |
ad2d155a067008cbe7e1919b55c78fd2 | 0375d352f1d17d945cc67f66c7d75f3b | Lists all Reserva entities. | class ReservaController extends Controller
public function index(Reserva $reserva)
{
} | 0 |
3aff21722f37151edf0392c445dd1294 | 19803b33c44a97c3159c69fb6bb6becf | 获取所有的制度 | class Constitution
public static function getAll()
{
$stmt = MyPDO::getInstance()->prepare(<<<SQL
select *
from constitution
SQL
);
$stmt->execute();
$stmt->setFetchMode(PDO::FETCH_CLASS,Constitution::class);
return $stmt->fetchAll();
} | 1 |
705e81500e4a1e5f592a891b78736a5f | 069c6f70e73f65ae95bbda177f10d7e6 | Gets the amount of tiles vertically | public final class TileGrid
public int getHeight() {
return tiles.length;
} | 1 |
88589f9a37f174801bbe65e238ce1b6f | 24272a6e743560e322cee0f90b747661 | 出荷数量_セット数をレコードに格納します。 | public class ShipResultAlterKey
extends DefaultSQLAlterKey
public void setEnteringQty(int[] values, boolean and_or_toNext)
{
setKey(ShipResult.ENTERING_QTY, ArrayUtil.toObjectArray(values), and_or_toNext) ;
} | 1 |
e473d2cb90f25cffd20d4743988bc3ec | bcab0404e87bd542e58e4fae972e06be | This function finds the index of refraction for that wavelength.
*** Took the equation from IAU convention for wavelength conversion described in
Morton (1991, ApJS, 77, 119) | wl = array([wl])
wlm, wln = wl[wl >= 2000], wl[wl < 2000]
sigma2 = (1.E4/wlm)**2
fact = 1. + 5.792105E-2/(238.0185-sigma2) + 1.67917E-3/(57.362-sigma2)
wlv = wlm / fact
return np.append(wln, wlv) | 1 |
7b887e5ae28ea3b1114cf778a6bdbe30 | 63ad91194f659c7a673d7060327611c0 | Perform last checks and the actual state transition. | {
if (!array_key_exists($this->fromState->getStateIdentifier(), $this->stateTransitions)) {
return false;
}
$allowedStates = $this->stateTransitions[$this->fromState->getStateIdentifier()];
if (!in_array($this->toState->getStateIdentifier(), $allowedStates)) {
... | 1 |
354ec8837bb1ff3cc4ef7b4ed5a51fcf | b4146f06cc69d5f65210fd49d2fe67fa | Runs through all the links in current profile and extracts their domain name,
then assigns this name to each links member data DomainName | {
foreach (var url in spider.PageLinks)
{
if (!SiteLinks.ContainsKey(url))
{
if (new Uri(url).Host == RootUri.Host)
{
SiteLinks.Add(url, false);
}
else
{
SiteLinks.Add(url, true);
}
}
}
... | 0 |
f07a67bc71d097466121eb482580b7f9 | c14f59e02eb40d7a7d78206ac19184ad | Returns the value associated with the passed key. Returns {@code null} if the key does not appear in the table | int hash = hash(key);
int index = indexFor(hash);
V value = null;
Node<K, V> node = table[index];
if (node != null) {
if ((node.key == null && key == null) || (node.key != null && node.key.equals(key))) {
value = node.value;
}
}
... | 1 |
97949cbf182247608463e56b78962685 | dbb36a58c519f4779fc3ec81eed02e77 | get_objectメソッドを所有する | public class ObjectManager : MonoBehaviour
static public Object[] GetAllObject()
{
return allObject;
} | 0 |
44849ccf4a1a85920500af64f0658230 | d785ff421e4c1348ee310c0247958246 | 侧边栏菜单监听 | public void initListener() {
mNavigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
@Override
public boolean onNavigationItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case R.id... | 1 |
e0eb8468fd87e84792253f240fa6606c | 4dd6d8dd3ab59bb41e0b423729273897 | Saves current state of the board in an object and returns that object. | let boardObject = {};
boardObject["board"] = this.gameBoard;
boardObject["redTurn"] = this.isRedTurn();
boardObject["redPoints"] = this.getRedPoints();
boardObject["bluePoints"] = this.getBluePoints();
boardObject["numberRows"] = this.getNumRows();
boardObject["nu... | 1 |
51fcdc9db8eca4c8adadc4587deda806 | 8767a793d28e39ca5e3cc8addc572e04 | Hamcrest matcher that matches a lifecycle event with the given callback name from any fragment | List<Pair<String, ActivityCallback>> expectedTransitions,
LifecycleLog lifecycleLog, String message) {
final List<Pair<String, ActivityCallback>> observedTransitions = lifecycleLog.getLog();
assertEquals(message, expectedTransitions, observedTransitions);
} | 0 |
ea7abc95679d5038a7743849f93383e4 | e95bb2008a840eed2f16991ba5d2e101 | Set focus position, in a circular manner. | {
#ifdef CA378_AOIS
ui->horizontalSlider_Focus->setValue(arg1);
param.focus_position = arg1;
if (initialized)
{
if (param.enable_auto_focus == 0)
{
DemoControl(¶m, CMD_MANUAL_FOCUS);
}
}
#endif
} | 0 |
3c84e844ce0718a922ca3e1cd581bcce | b356a9ce97765da8890a989868128097 | 统计index字符串中s字符串出现的个数 | public class StringUtil
public static int getNumFromString(String s1, String s2) {
int cnt = 0;
int offset = 0;
while ((offset = s1.indexOf(s2, offset)) != -1) {
offset = offset + s2.length();
cnt++;
}
return cnt;
} | 1 |
a5760716675f2c25094e01034ff45741 | 7cb8d58fb691e04d3a69d7affa3a2a9a | Gets a group item tags feed. | {
$item = $this->fetchGroup($auth);
$resource = new Item(
$item,
new ViewKeyTransformer(
$this->getSparseFields($request, ViewKeyTransformer::JSON_OBJ_TYPE)
),
ViewKeyTransformer::JSON_OBJ_TYPE
);
return $this->respondWi... | 0 |
2e9aec0373f4174f4bbf18e7d280092b | 5f16374aea0fb3b32ce220adf8ab8365 | Send values to all necessary queues | LinkedList<Bid> bidQueue = getBidQueue();
LinkedList<SeismicRequest> seismicQueue = getSeismicQueue();
LinkedList<Drill> drillQueue = getDrillQueue();
if (!bidQueue.isEmpty()) {
for (Bid bid : bidQueue) {
((ServerMessages) socket).sendBidQueue(bid.toSocket());
}
}
if (!seismicQueue.isEmpty()) {
... | 0 |
c5d2d2ccb7b9022196c7b32aa37d2abf | a413899742fba2aa7d331ec88b6f5089 | 加载上下两篇按钮 | function addSwitchBtn(ele) {
var str = '<b class="prev_btn"></b><b class="next_btn"></b>';
$(ele).append(str);
$('.prev_btn').unbind('click');
$('.prev_btn').bind('click', function() {
prev();
});
$('.next_btn').unbind('click');
$('.next_btn').bind('c... | 1 |
4bd3c4ca59b31b27fb6de9bcda376b15 | ad7c9db2d39beea0f2c861c0fc59f62a | Compares this object with the specified object for order. Uses the standard lexicographic ordering for
the points in the LineSegment. | namespace Teletype
public int CompareTo(Point other)
{
return Compare(Row, Column, other.Row, other.Column);
} | 1 |
f57554c98e52f4759e4adf8863a0dfc1 | a51c0a36da6e445013b71d3ab129fefd | 判断在前台还是后台 | ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
List<ActivityManager.RunningAppProcessInfo> appProcesses = activityManager.getRunningAppProcesses();
boolean ret = false;
try {
if (appProcesses != null) {
... | 1 |
de7bbbafb4bfed058f8c6692cd867415 | 8c8cd505669f3ea6b173774a2d7bad5e | Transforms residues and poles from discrete time to continuous | {
PetscInt k,j,nmat=pep->nmat,d=nmat-1;
PetscReal *ca=pep->pbc,*cb=pep->pbc+nmat,*cg=pep->pbc+2*nmat;
PetscScalar t=1.0,tp=0.0,tt;
PetscFunctionBegin;
if (sinvert) {
for (k=1;k<d;k++) {
tt = t;
t = ((sigma-cb[k-1])*t-cg[k-1]*tp)/ca[k-1];
tp = tt;
for (j=0;j<=nv;j++) r[k*lr+j]... | 0 |
1ff373e45a454579530df3dbcc0cdd8d | 9eb026b77518c9b467ee09f90d55be7c | Updates the approval status of order to rejected or to be delivered | int updateByStatus(@Param("deliveryorderId") String deliveryorderId, @Param("approvalStatus") int approvalStatus); | 1 |
b3475a06a2898093e3253b1ac6ae7bb1 | 1de34739d45981f05dfeadbf153e1510 | Testing SELECTing all fields. | query_string = 'SELECT * FROM table;'
expected = []
mock_connect = mocker.patch('psycopg2.connect')
mock_connect().__enter__().cursor().__enter__().fetchall.return_value = expected
assert self.database.select(query_string) == expected
mock_connect().__enter__().cursor()._... | 1 |
03c0570ab81c9c806570e25886e5737d | bb7caf29d680dec1d531b6a941c225c9 | 获取表空间数量 | class spaceClass extends mysqlClass
function getAllSpaceNum()
{
$sql = "select id from " . $this->dbtable;
$result = parent::query($sql);
return parent::num_rows($result);
} | 1 |
2b4f7823a0ee18b295e273fb26180f1f | 5f69946934cd6449b06307451631d66f | 判断当前GuideSeesion是否合法。 | {
if (dict.Values.Count <= 0)
return false;
using(var enumerator = dict.GetEnumerator())
{
while(enumerator.MoveNext())
{
var cur = enumerator.Current;
var guide_step = cur.Value;
... | 0 |
474fa276075ba9ba48e6ac2bd1a28528 | 23d0f6e1a5acb0f871867cf4367458a2 | Returns <code>true</code> if this project has changes that need to
be saved in the project file, else <code>false</code>. | boolean hasChanges(); | 1 |
811a770d81259c18795bbb3f7c08c776 | d6a3d5bc078d82914c8bf2b9d9b1e1f6 | 给邮件加上跟踪标记 | class WebMail_Model_Mail
function setFeedback($mail){
require_once(APP_PATH."/models/mail/MailEncode.php");
$mail->to = $this->mailbase->getAddress(base64_encode($mail->to),"ADDRESS");
$mail->from = $this->mailbase->getAddress(base64_encode($mail->from),"ARRAY");
$mail->from[0]['mail'] = $mail->from[0]['address... | 0 |
6963f201d9c54e433b2d5bf6c945e669 | 08acd2408ae7b577e04cd6883e3f8e9a | function to generate view for bottom nav bar icon with badge | return <BaseIoniconsBt
btStyle={{
width: 28,
height: 28, marginRight: 10,
borderRadius: 28, marginLeft: 10,
backgroundColor: Colors.white
}}
iconStyle={{name:
'ios-more',
iconSize:... | 0 |
d4af2576c2529fe2852fe3738441f612 | b26d6aead95fedb6622298d1906f1646 | object accessor for the {@code CategoryCode}
<p>The {@code CategoryCode} field is a direct mapping of the {@code category_code} field in {@code diff}.</p> | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ItemEffBase", propOrder = {
"contextCode",
"createdBy",
"creationDate",
"effLineId",
"inventoryItemId",
"lastUpdateDate",
"lastUpdateLogin",
"lastUpdatedBy",
"objectVersionNumber",
"organizationId",
"categoryCode"
})
@Xml... | 1 |
8c2043a0251790035bb624d91b5a277d | d3702f0cc79edb5e87b3601ad0d0be74 | @brief 计算位数为digits_number的范围的起始数字,例如,3位数的起始数字是100 | if (digits == 1) {
return 0;
}
return (int) Math.pow(10, digits - 1);
} | 1 |
76e068dc394f4dd7ced86420ddb34793 | dba9f7b213616041ff4177d4721e33ae | Sets the value of tarefa_codTarefa. | class Model_Turma extends Model_Util
public function setCodtur($codtur)
{
$this->_codtur = $codtur;
} | 0 |
1e3766259041d46cd8a46f5055c1ccaa | fdca77ca64787fef8682c01616f5666b | 物品売上区分リスト取得 (API0003) | namespace Gs2.Gs2Showcase
public class Gs2ShowcaseRestClient : AbstractGs2Client
public IEnumerator GetSalesItemGroupMaster(
Request.GetSalesItemGroupMasterRequest request,
UnityAction<AsyncResult<Result.GetSalesItemGroupMasterResult>> callback
)
{
var task = new GetSalesIt... | 1 |
bb4ea6b83700d78a424b70a310011c9b | 4a745dc0423c04e397f279ce03b9ff32 | Removes all of the selected rows in the table | var rows = grid.getSelecteds();
if (rows.length > 0) {
grid.removeRows(rows, true);
}
} | 1 |
53b69b145df3f1a271162af6e5d43d19 | fa7956a63f2fca1ee420b076ffece0b0 | creates magnitudes and phase spectra from an audio wav file | signal, sr = librosa.load(song, sr=None)
signals = splitsongs(signal)
specs = to_melspectrogram(signals)
return specs | 0 |
bac7b059caf87d8606604dddcc428a82 | 64e3044bb118800502370d7e090b514e | sent log items into archive (let's set archive flag to True) | public void writeItems(List<Object> items) throws Exception {
long t0 = System.currentTimeMillis();
MessageTag tag = getMessageTag();
for (Object i : items) {
ExtractedArchiveMessage extractedMsg = (ExtractedArchiveMessage)i;
Message message = extractedMsg.getMessage(... | 0 |
31c950a4d29922e913b382ab6fba60b8 | 287f6c01f02ea41958fab92bd0db52be | Index all vocabularies. All existing documents in the index
are removed first. | public void indexDocuments( ) throws IOException, InterruptedException, SiteMessageException
{
for ( Topic topic : TopicHome.getTopicsList( ) )
{
for ( String strLanguage : WikiLocaleService.getLanguages( ) )
{
indexTopic( topic, strLanguage );
... | 0 |
6cf2b32730c5a0f6552ef82a33355661 | 4cd6768da5b83024d83839eb53ddbb29 | Division for the blending function (coxDeBoor). Needed because it is possible to choose the elements of
the knot vector so that some denominators in the Cox-deBoor calculations evaluate to 0. These terms are
by definition evaluated to 0.
the dividend
the divisor | public class ConfidenceFinder
private static double divideWithTwoDenominators(double numerator, double denominatorOne, double denominatorTwo) {
if ((denominatorOne + denominatorTwo) > 0.0) {
return numerator / (denominatorOne + denominatorTwo);
} else {
return 0.0;
}
... | 1 |
bbade6b4172b6e9e9b4e28ebb2769e1f | 41662ccd6565265018dc725f5e19710d | Displays the interface where the customer can enter the license information | {
$products = Product::all();
return view('licensees.create', array('products' => $products));
} | 1 |
61fd403342ed9ea87dba1c9b903bccbe | 67e2ec1e334a538e9ec77a0510b5aaa1 | don't insert CR | void tputc(int dev, char c)
{
if (c == '\n')
tputc(dev, '\r');
write(dev, &c,1);
} | 0 |
4d80ef611293976e080ef7c8afd18561 | 4f3ee05e55e3b46b6ea2755a27bc38ac | Returns the list of paid orders for the given query data. | namespace Telecom.BusinessObjects.IServices
IQueryable<ShopOrder> GetShopOrderProcessedPaymentList(int? resellerId = null, DateTime? from = null,
DateTime? to = null, CreditCardType? cardType = null, string billingId = null, string username = null, PaymentProviderType? paymentType = null); | 1 |
e688c97cc407b1ac91c4e93627ead5b6 | 139b9ed4e4463cb5ccec9dfd0d32343c | SQLAlchemy checks which keywords AsyncioEngine expects, so check that
echo, logging_name, and execution_options are accepted and then passed on
by AsyncioEngine. | async def test_data_async() -> None:
websocket = Websocket(TEST_API_KEY, TEST_APP_KEY)
websocket._sio.connect = AsyncMock()
websocket._sio.disconnect = AsyncMock()
websocket._sio.eio._trigger_event = AsyncMock()
websocket._sio.namespaces = {"/": 1}
async_on_connect = AsyncMock()
async_on_dat... | 0 |
96cc168d27550bffacae4bf1e71319b1 | ffd3395688b523ff9f1b4acb04cf891c | discards the player's hand | void Player::clearHand() {
hand.clear();
isStaying = 0;
turnOver = 0;
} | 1 |
40243403076cebca2e0ef9318eb556f6 | 6bd895e1f4da1074d4e0d184f6b3674a | Get a lock for the index file. | class SitemapController extends \xii\console\Controller
protected function getLock($idx)
{
return "sitemap/ping/{$idx}";
} | 1 |
c6f4b0ebde4851659129487fc584c829 | b2a721d6198414163d9ba2480196eadd | This must return the log messages in order.
The simple formatting of the messages is: "<LOG LEVEL> <MESSAGE>".
Example ->error('Foo') would yield "error Foo". | public function getLogs(): string; | 0 |
14fb7e33c0eb600de68d03681937e540 | f91809f490d06bba7247bbc526e327f4 | Notifies that the right controller has started being tracked. | {
this.onRightTrigger(this.rightController ?.motionController ?.getComponent("xr-standard-trigger"));
this.onLeftTrigger(this.leftController ?.motionController ?.getComponent("xr-standard-trigger"));
this.onRightThumbstick(this.rightController?.motionController?.getComponent("xr-standard-thu... | 0 |
7328e2a05623b25a40959aa662300f9a | b9cb870d8b885c2980ee8c6d6f80dfbd | Adds a new entry or updates an existing one in the dict. | {
dictEntry *entry, *existing, auxentry;
entry = dictAddRaw(d, key, &existing);
if (entry)
{
dictSetVal(d, entry, val);
return 1;
}
auxentry = *existing;
dictSetVal(d, existing, val);
dictFreeVal(d, &auxentry);
return 0;
} | 1 |
c8953bc798d94eda6b164f84db5c5c08 | 8b8ea6f75ea5e57c1fbf7541cea276af | filter the subway entrances based on the map's current search filter | export default class MapContainer extends Component
render() {
const filteredLocations = this.props.eventLocations.filter(
eventLocation =>
eventLocation.displayName.indexOf(this.props.filterLocationsInput) !==
-1
);
return (
<div>
<MapWrapper
className="with-Go... | 1 |
1e11a8a978341fc8fd15cb5e0c60e66f | 4e619a19bf98b85649f719ce00fbc446 | 找回密码邮箱链接点击回调方法 | function _onReLink(eleStr){
var btn = $(eleStr);
_updateDisabled(btn)
LK.common.request({
url: LK.config.APIS['USER_FORGOT_PASSWORD'],
method: 'GET',
params: {
code: verify
},
success: function (result) {
... | 1 |
d73ee2af4aab4501f863c7bb04540868 | 4f768a3e8d60583ae2b12a3e94a50a58 | Операция субъекта, которая доступна клиенту через прокси | public class ProxyObject extends AbstractObject
@Override
public void operation() {
System.out.println("Before Do Something");
realObject.operation();
System.out.println("After Do Something");
} | 1 |
2aeb42748a7fe0290c4c1fa75dad8b86 | 010831af12d1fe13bbd36b0f2749e09e | The remote changed field does not exist in the remote entity. | {
$changedData = [
'type' => [
'typeId' => 'type',
'key' => 'FOOBAR',
],
'fields' => [
'fieldname' => new DateTimeDecorator(new DateTime()),
],
];
$this->runAction($changedData);
} | 0 |
c516e70118bdfed39f09cb36558074e6 | 4a431058f619f5b2afb1009538287f17 | 保存task的text | {
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load("Text.xml");
XmlElement xe = xmlDoc.DocumentElement;
List<Text> textList = new List<Text>();
for (int i = 1; i < 4; i++)
{
Text txt = new Text();
if (i =... | 1 |
95ae45ba987c88cf060e845c0f458943 | 7d2e7587a3040031f533121472bb6e01 | updates (or inserts where not exists) the person's GXRDIRD record | {
Long previous=getDeCujus();
if (!DataObject.keysAreEqual(previous,key))
{
String dbName=getDbName();
Person p=GeneaDataSource.getInstance(dbName).load(Person.class,key);
if (p!=null)
{
putLongParameter(DE_CUJUS,key.longValue());
}
}
} | 0 |
0f3a9e7c3add695e11c9ce339c516cae | ccf5461bfaf1af79fffeebe2a5c8780f | Stop playing sound with given id | namespace ace
public class Sound
public void Stop(int id)
{
SwigObject.Stop(id);
} | 1 |
056134e51269745a31c5f8d4335aef42 | 48755f8f4ac9bc3b044e2701dacb9bcb | Returns a list of the IDs of deleted issues. | def get_deleted_ids(ids1, ids2):
return list(set(ids1) - set(ids2)) | 1 |
64c09487c132a8b36ddc161daac1c0f0 | ccc31e628d7b2bac35c98ecd1c2587e5 | Get the asynchronous job configuration. | getJobConfig(name: string, options?: any): AxiosPromise<string> {
return localVarFp.getJobConfig(name, options).then((request) => request(axios, basePath));
} | 1 |
eede1b1d390d3c8370eeaba9a7d01a4f | 31f9897fe42453b3a071ae65be71962e | 加速移动 | {
ActionInterval* pMoveUp = EaseInOut::create(MoveBy::create(period, Point(0.0f, amplitude)), 2.0f);
ActionInterval* pMoveDown = EaseInOut::create(MoveBy::create(period, Point(0.0f, -amplitude)), 2.0f);
ActionInterval* pMoveVartical = nullptr;
if (startPrace == START_UP)
{
node->setPositionY(node->getPositionY()... | 0 |
7a93e77f381f03957c00ad7ca13bfb38 | e3871ead7f5ae45fda5e4a67e3f003f5 | Funcion para eliminar logicamente a un usuario | class UserController extends Controller
public function destroy($id)
{
$data = User::findOrFail($id);
$data->eliminado = true;
$data->save();
} | 1 |
2b940179dd3a0aa9c8b2f5eb686224ba | 68a3780ce3cb14f25f7da5a7b2160d37 | decode gps/qzss navigation data subframe 3 ----------------------------------------------------- | {
eph_t eph_gal={0};
double tow[4],toc,tt,sqrtA;
int i,week[3],svid,e5a_hs,e5a_dvs,type[4],iod_nav[4];
trace(4,"decode_gal_fnav_eph:\n");
i=0;
type[0] =getbitu(buff,i, 6); i+= 6;
svid =getbitu(buff,i, 6); i+= 6;
iod_nav[0] =getbitu(buff,i,10); ... | 0 |
552babd44379000464accc8006bf0cc5 | 6403a1622a243d787d0ed2d594935ba3 | Returns the popcount or cardinality of the union of the two sets. Neither set is modified. | {
long tot = BitUtil.pop_union(a.bits, b.bits, 0, Math.Min(a.numWords, b.numWords));
if (a.numWords < b.numWords)
{
tot += BitUtil.pop_array(b.bits, a.numWords, b.numWords - a.numWords);
}
else if (a.numWords > b.numWords)
{
tot += BitUtil.pop_array(a.bits, b.numWords, a.numWords - b.numWords);
... | 1 |
c56dca5f7bc154b215b0e5cafa2f0ee8 | c4ab5603b3173b7ff2260d51b8c24aac | Creates a <form> element. | class Html
static public function beginForm($action = '', $method = 'post', $htmlOptions = [])
{
$htmlOptions['action'] = $url = self::normalizeUrl($action);
$htmlOptions['method'] = $method;
$form = self::tag('form', $htmlOptions, false, false);
$hiddens = [];
if (!strcasecm... | 1 |
8078754b78c3c73b66bfee74022cff26 | b20479d65626d3d8c32cc29a14aa5bb0 | Test to verify that the database can load, update, and save existing users
The test is performed by loading a user object, updating the information, and verfying it
Once the test is complete no errors will appear and the information is updated | public void testUpdateUser() throws Exception {
UserDBO dbuh = new UserDBO();
dbuh.insertUser("testing_database_user", "password", "9/1/2018", "12/18/2018", "black");
dbuh.updateUser("testing_database_user", "password", "9/1/2018", "12/12/2018", "green");
Document insertedUser = dbuh.getUserByUsername("testing... | 1 |
8884077845522e5097b4650052612475 | 8f1b4860458026f1ee0587c9e26402d1 | ====================== MAIN =============================================== | def main(args):
save_paths, image_caption_data, network_paths = setup(args)
print_green(f'[Info] Saving Logs in dir: {LOG_DIR}')
max_train = None if args.training_size == 0 else args.training_size
max_train_str = '' if max_train == None else str(max_train)
print_green(f'[Info] Loading COCO dataset... | 1 |
a06e1d23e5ca5384cef11e4cea6feef6 | dbd82b61f377a272c33aab13d9c8ab96 | __PUBLISH_EXTRACT_START__ EventHandler.createListener.callback.example-code | public void callback() {
Identity id = communicator.stringToIdentity("DataListener");
Ice.ObjectAdapter adapter = communicator.createObjectAdapterWithEndpoints("DataListenerAdapter", "default -p 10001");
adapter.add(new DataListenerImpl(), id);
adapter.activate();
DataListene... | 1 |
63aae197c9467f77e5342cf47e9dd967 | c7487fd73129c3ff8d00aca153572e63 | #######################################################################
Add edge to 1-skeleton
####################################################################### | inline void EulerOperation::AddEdgeIntoSolid(Edge *e, Solid *s)
{
Edge *e_t = s->edges;
if (e_t == NULL) s->edges = e;
else {
while (e_t->next != NULL) e_t = e_t->next;
e_t->next = e;
e->prev = e_t;
}
} | 1 |
8fc548e32dc07a92e939c7a9a5823c83 | ee1c7ad1ab1bcca85b030a602dca97d5 | 1.获取保存的SIM卡,有的话显示加锁的图标,没有的话显示解锁的图片 | switch (result.getSIMState()) {
case GetSimStatusBean.CONS_SIM_CARD_READY:
simReady(isMWDev);
break;
case GetSimStatusBean.CONS_PIN_REQUIRED:
toFrag(getClass(), PinInitFrag.class, null, true);
break;
case GetSimS... | 0 |
a96ddc36972c73b2a318cb8f99af7f7d | 06d992335a216f911111d2e88f8e2b73 | Returns the names of the active subdetectors
used in the simulation. | def _getDetectorsInReadout(partid):
dets = []
for name,id in _detectors.items():
if ( (partid&id)!=0 ):
dets.append((name,id,))
return dets | 1 |
fba9ed1fd7068bc4c4aa8db37908a486 | 12f2490c570c6b18339f6bb15f79cdde | NewSlackInterface connects to slack and sets up an interface. | return &Client{
rtm: slack.New(token).NewRTM(),
connected: make(chan bool, 1),
shutdown: make(chan bool, 1),
}
} | 1 |
289f38ebd83ae77d0f5260199e85f5a9 | 60d199d45f53133d2981512cc9bd7b41 | 显示所有会员促销策略 | class PromoStrategyService extends BaseService
public function getPormoStrategyList()
{
$strategy_info = DB::table('promo_strategy')->paginate(AjaxPageEnum::PROMO_STRATEGY_PAGE_NUM);
$strategy_info->{AjaxPageEnum::AJAX_PAGE_FUNC} = 'admin_promo.strategy_list_page';
foreach ($strategy_info as... | 1 |
59dbcfe24f887a93cdd080ef940d3710 | feba3563d3591973b3a4c8945c887574 | <<<<<<< HEAD
会员端-进馆记录 (根据会员卡) | @RequestWrapper(localName = "qryMemberCardOrders", targetNamespace = "http://interface.ykse.com/phone/", className = "com.winchannel.crm.spe.huayi.ws.phoenix.phone.QryMemberCardOrders")
@WebMethod(action = "http://interface.ykse.com/phone/qryMemberCardOrders")
@ResponseWrapper(localName = "qryMemberCardOrde... | 1 |
7545f56bfe150748a01424c751e3c940 | d975b6b51590dad8a6c5303756ad20f6 | Get AddressTypeL. | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AddressABIEType", propOrder = {
"addressID",
"addressType",
"attentionOf",
"careOf",
"lineOne",
"lineTwo",
"lineThree",
"lineFour",
"lineFive",
"buildingNumber",
"buildingName",
"streetName",
"floorIdentification"... | 0 |
e6a1d5a329fd75c6dce3e661b7b0f186 | 6fceccd8bbedb6f0a071410fb1233581 | Returns full path to applications directory. | def get_apps_dir() -> str:
return join(config_dir, 'apps') | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.