query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
9d07959dd4eb21bbaab537125f3498dd | bc783064b6e311d148e6ce553f587591 | Get Subject Face IDs Enrolled
viewSubject returns():
- list with all Face IDs enrolled if successful
- None if not Successful | namespace Atlas.WCF.FPServer.WCF.Implementation
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Multiple)]
public class FPComms : IFPComms
public int GetPersonEnrolledFingers(SourceRequest sourceRequest, Int64 personId,
out List<int> enrolledFingers, out s... | 0 |
e7f63ee8b838a1f4babaca8a3e6240be | 53de203e98020299b7ef03ca0aa96882 | Test that pre-order of an empty tree is empty. | class BST_Test(unittest.TestCase):
def test_add_empty_pre_order(self):
self._bst.insert_element(12)
self.assertEqual('[ 12 ]', str(self._bst.pre_order())) | 0 |
533b88561a67b353fe526b4b024cf8ce | ff5e02e0b43620e6a1207de54980384d | Compute excess capacity for every course | excess = 0
for sran in self.inventory:
excess += max(self.invpos(sran) - self.inventory[sran][0], 0)
return excess | 0 |
2915cfda0625ba00b4b087f7a83a9251 | da43c6c447427961f02f62f59f8c189e | 使用List实现栈的基本功能 | class MyStack:
# 列表可以很好的完成栈的功能
def __init__(self):
self.mystack = [] | 1 |
9dbff78500f2162d9b20f60db8eaf985 | ce10d731bafc24c6a0596706e51c4ecf | Set if the holder name is required and should be shown as an input field. | public final class CardComponent extends BasePaymentComponent<CardConfiguration, CardInputData, CardOutputData>
public boolean isHolderNameRequire() {
if (isStoredPaymentMethod()) {
return false;
}
return getConfiguration().isHolderNameRequire();
} | 0 |
6ec310d82dbc386f7a4ef32fb885776a | afee5586612a834dca3f5aa80e1a615d | método usado para contar los caracteres | int tamano(char s[])
{
int cont=0;
for(int i=0;s[i]!='\0';i++){
cont++;
}
return cont;
} | 1 |
d56e4c8cbb6445888091030bbc3eaf1e | 420b6f48d971b05fa5f99d2aca4554a6 | Sets a flag to indicate that thumbnails should be downloaded via a queue.
The queue downloads flag. | public LoadOptions setThumbnailMode(boolean thumbnailMode) {
this.thumbnailMode = thumbnailMode;
return this;
} | 0 |
6f2efd5f80ec95652ae997742f9e72e0 | 6de621edf39965a9f2cb153a671f3649 | Adds a confirmation for a Safe transaction. | public String saveConfirm(@RequestBody Confirm c){
Transaction t = createTransaction();
t.setPayload(CommonUtil.createPayload("saveConfirm", RLPCodec.encode(c)));
sign(t);
return httpUtil.sendTransaction(t);
} | 1 |
f1e1aea9d8c55c888374b0696052e7a7 | a20ec317af45adffcbe2102950e0cd23 | Function to calculate flange factors.
ASME VIII - Fig. 2-7.1, Table 2-7.1 | def calc_f_factor_g_str(self,v_s_g):
if self.calc_Re_gas_Str(v_s_g)<2000:
return 64*self.calc_Re_gas_Str(v_s_g)**(-1)
else:
return 0.184*self.calc_Re_gas_Str(v_s_g)**(-0.2) | 0 |
441d63d3a180d9b5f3439491a51ace1e | c1f5fb0642bf46a4ea19e91efccc16df | Authentication for Developer access by key | class Google_Client
public function setDeveloperKey($developerKey) {
self::$auth->setDeveloperKey($developerKey);
} | 1 |
496bb3e07932f72e843f656340db2286 | aec8ff0e1a87038d01208a20d54be4aa | checks if the dir for the mail adress exists | if os.path.isdir("maildir"):
return True
else:
logger.error("Unable to find maildir")
return False | 1 |
c6df05d32be4c8694b2c5eecf8094ff0 | db1ba7cd0b53949396f29fce8615be8a | function gets string and returns the string that found in the quates. | first_dq = s.index('{')
post_fdq = s[first_dq+1:]
second_dq = post_fdq.index('}')
str_dq = post_fdq[:second_dq]
return str_dq | 1 |
c474fa9bf5b8322bb5970885425f596d | af043503ba1e37e6099395142956494c | 显示已删除企业列表 | public String list(HttpServletRequest request) {
DataTransferObject<List<UserEntity>> userDto = userService.getUserByType(2);
List<UserEntity> users = userDto.getData();
request.setAttribute("users", users);
return "enterprise/enterpriseList";
} | 0 |
db497d29a385378ee10898948a28e156 | 61d453897b0e91706de8dd98ffd04e11 | Pinging the redis server to see if it is alive. | func ping(conn redis.Conn, t time.Time) error {
_, err := conn.Do("ping")
return err
} | 1 |
d27d8357b8abbc31cc075ece828db0c2 | d7dcaa03d622d35031c3f3b7de054cac | calculates the total tiles that would be flipped
by a legal move | int sum = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
if (tiles[i][j] != goalForTile(i, j) && tiles[i][j] != 0) {
sum++;
}
}
}
return sum;
} | 0 |
432b25e8534dc81366ba5f14d63a9db2 | 3d28e270657ee86407db6dfd3f15b7f2 | 用户登录 ,并讲用户的信息放入token | User login(User user, String code, TokenInfo tokenInfo); | 1 |
72f5403d33dc3911dea605d10a00809f | 89c068084ab8adc68c08b09e0c405733 | Returns the path to the external constraint solver executable used
by the current solver object. | class InversionDriver(object):
def getSolver(self):
return self.__solver | 0 |
67887cd69082e8c941a1a7043a427031 | bc9519d89d79977dcef373dbd64bafc5 | 5. Order HTML elements by text content | var list, i, switching, shouldSwitch;
list = document.getElementsByClassName("picture");
switching = true;
while (switching) {
switching = false;
for (i = 0; i < (list.length - 1); i++) {
shouldSwitch = false;
if (list[i].getElementsByTagName("h2")[0].innerHTML.toLowerCase() > list[i + 1].... | 1 |
58ec16d4ba2f356438b121d7ca56757c | 1c2bdc7a0dfa7ea73116a96f22d64fa1 | redraws the board when the canvas is resized | class OthelloApplication:
def _on_canvas_resized(self, event: tk.Event):
self._redraw_board() | 1 |
9d97cb2b062869ef6ea1095a62ec1fda | 2026e3a8061602754761be70779fa61c | 사용자가 올바른 입력을 줄 때까지 | {
while (!(inputException.UserAddressExcepiton(inputUserAddress)))
{
inputUserAddress = Console.ReadLine();
if (!(inputException.UserAddressExcepiton(inputUserAddress)))
{
Console.WriteLine("\n\t사용할 수 없는 주소 입니다 ( [시,도], ... | 1 |
4df86c656f1d811eaeba18720c97814a | 416367396c623a545b1f118836372e10 | Set the proposed owner for the CIS proposal. | void setOwner(String owner); | 1 |
fd60f0fe54e01c8715aa08f91438a421 | b6deed80a976e37ddc1d5aaf677e6ac0 | 获取表中所有字段的描述 | {
$result = ORM::for_table($table)->raw_query("desc $table")->find_array();
return array_fill_keys(array_column($result, 'Field'), null);
} | 0 |
d1fa76f14d3312c875dec1cf039c7a10 | 38a46d29cf7145250a652cec014272a0 | Returns the number of blocks to use for each screen dimension. | public class TetrisBoardGUIView extends JComponent
private int computeBlockSize()
{
int maxWidth = getWidth() / board.getNumCols();
int maxHeight = getHeight() / board.getNumRows();
return Math.min( maxWidth, maxHeight );
} | 1 |
a4ab5635b8e778bf6764af7e83210b70 | afee8576ddb4b998f59b84baef5452e6 | 断言 地址是否删除干净 | class TestAddress:
def test03_delete_address(self):
self.address.page_delete_address()
assert self.address.page_address_is_exists()
self.address.base_get_img() | 0 |
8b085c067482265ff80bff2410012639 | 0b0dd2337bf1ffc227d6fb150b507418 | Defines associations between entities for database context. | namespace CommandAPI.Data
public class CommandContext : IdentityDbContext<ApplicationUser> //DbContext
protected override void OnModelCreating(ModelBuilder builder)
{
builder.Entity<ApplicationUser>(b =>
{
b.HasMany(x => x.UserRoles)
.WithOne()
... | 1 |
db24a33c6b405277182d7a29416e78ae | 8c76d6666005aa548d6b390a163abd82 | Handles the Click event of the Import control. | {
CTmaxItem tmaxTarget = null;
CTmaxParameters tmaxParameters = null;
try
{
tmaxTarget = new CTmaxItem(m_dxScript);
tmaxParameters = new CTmaxParameters();
tmaxParameters.Add(new CTmaxParameter(TmaxCommandParameters.ImportFormat, (int)TmaxImportFormats.AsciiMedia));
tmaxParameters.Add(new... | 1 |
aaadca2643745dcf99fa6db4dbaf9d78 | 506272c8fdc2c608c6d02107c1c877a5 | 获取活动下的所有优惠券ids | class ActivityLogic
public static function getActivityGoodsIdList($id)
{
$list = D('activity_goods')->where(array('activity_id'=>$id))->field('goods_id')->select();
return array_column($list,'goods_id');
} | 0 |
5d0833da91b3542f0c12a2dbcb25fe50 | 97aa656ce83edad929835ab82efe58d1 | The Virtual Hub where Network Virtual Appliance is being deployed. | class RoutingIntentArgs:
def virtual_hub_name(self) -> pulumi.Input[str]:
return pulumi.get(self, "virtual_hub_name") | 1 |
ee9b35767cc25d56700dc22b5772bf21 | 9602d9ace1516c033313752089aab11a | Funcion que regresa el valor de la dimension 2 dado el nombre de la funcion y el nombre de la variable de la matriz | {
switch (v)
{
case "x": return 4.0;
case "y": return 6.0;
case "z": return 8.0;
default: throw new UndefinedVariableException(v);
}
} | 0 |
685d03a29b9788163e9533638c10d24a | 38036e3182531c2e075882b490277689 | .find_similar_words | try:
word_list = self._sg_model.wv.most_similar(positive=[word])
return word_list
except Exception as error:
self._logger.error(error)
return [] | 1 |
9e911dfb38c6a5ad7dd13ef434c0ff8e | d9193f9f9413e2dfe2f15edaa477e325 | Verifies if a list of keyword values is displayed in collection page. | List<String> listItems = new ArrayList<String>(Arrays.asList(actItems));
for(String eachItem:expItems)
{
Assert.assertTrue(listItems.contains(eachItem),"Expected item '"+eachItem+"' Actual item '"+actItems+"' are not present");
}
logger.info("Verified the presence of all listItems");
} | 1 |
7e02a940ed673157df8c5e5f707ee947 | 21c6816699ac774262ad9a1869f21f47 | Returns the value belonging to the key, or the provided
default value if key not found | if (($pair = $this->lookupKey($key))) {
return $pair->value;
}
if (func_num_args() === 1) {
throw new OutOfBoundsException();
}
return $default;
} | 1 |
6ce4cb61304d5d4e7fef1ab7d4923a3b | 8d3d82c3fbe8a78b948763e8c014019c | Set the waypoints with the provided positions | public class EnemyBot : MonoBehaviour
public void SetPath(GameObject[] waypoints)
{
_waypoints = waypoints;
transform.position = new Vector3(_waypoints[0].transform.position.x, _waypoints[0].transform.position.y, 0);
} | 1 |
65fff97e6e02a420462f34183cdfa12e | aa01ccdd42190cb9b69ae3511c260807 | Gets the form factory. | public function getFormFactory(): FormFactoryInterface; | 1 |
f4999db70c97ff6171228a162ccb9ed5 | b53beca4b1f9ad39b1a34b5961aa93ef | open navigation view when icon was clicked | Log.d(tag, "[onNavigationItemSelected] Clicked")
when (item.itemId) {
R.id.account_nav -> startFragment(accountFragment)
R.id.messaging_nav -> startFragment(inboxFragment)
else -> {
checkLocationPermission()
}
}
return true
... | 0 |
2ed41dc2b2c2c46654ff5726e23e32ea | b2587b54638368649f687cbb4fc9c2b3 | This function sets new notes on localStorage, and also fetches old notes from it. | Storage.prototype.getObj = function(key) {
return JSON.parse(this.getItem(key));
}
Storage.prototype.setObj = function(key, obj) {
return this.setItem(key,(obj));
}
for (let n of notes) {
localStorage.setObj(n.time, JSON.stringify({
time: n.time,
lastEdited: n.lastEdited,
o... | 1 |
ff198bfce4872911aff44f280ae1b2c9 | b020f64951112e6b7c8b09c7c111c0b2 | checks for <= 0 like operation | def lessThanOrEqualToZero(num):
if num<=0:
return True
else:
return False | 1 |
e4c5f50de0b66425dc3943efc029f5c1 | a1bbd4e47a02ca99b0bff72a218cbbd0 | When a collision event happens, call the correct collision function using information from collision event. | int Squill::eventHandler(const df::Event *p_e) {
if (p_e->getType() == df::COLLISION_EVENT) {
const df::EventCollision *p_collision_event = static_cast <const df::EventCollision *> (p_e);
if (p_collision_event->getObject1()->getType() == "Projectile") {
p_sound = df::ResourceManager::getInstance().getSound("hit... | 1 |
daa17107bbe7e2f75596b47e0f868f45 | 381805bbb3a3ea96402747f9742f5947 | Recursively find all links in the the pages found in urls. Returns a list of urls. | def getAllLinks(page):
urls = []
while True:
url, end_quote = getNextLink(page)
if url:
urls.append(url)
page = page[end_quote:]
else:
break
return urls | 0 |
b993896e517547e0c8334c24fd5de57e | 7ca9a33808a0412c9f4f0a4ada86a21e | 获取推送设备码 | function getPushId() {
if (window.plus) {
return plus.push.getClientInfo().clientid;
}
return '';
} | 1 |
e837e086b48d3d8051c17c6d7c8432f9 | a23e982162593c0242d18d2efbcb7442 | función que convierte texto utf-8 a entero ASCII | class App_Util_Text
public function toAsciiText($utf8Str) {
$datos = array();
$search = "";
$replace = "";
$newString = str_replace($search, $replace, $utf8Str);
return $newString;
} | 0 |
9855d8e543c34b62e8c9dd2b08a964e7 | 284e5061c39ca12b3ff1e86447dc6150 | Extracts and unstaggers the specified variable | class Data:
def dropVar(var):
oindex = _get_var_index_all(var)
oindex.reverse()
for o in oindex:
_stp._st_dropvar(o) | 0 |
7c15049e1df57c886c78dfc0eadc3d39 | 776be317ca0d0b3756d72c9345be7de4 | Проверяем, сколько будет групп размещения при случайном расположении мест.
Самый простой вариант - запросы по двое. | class TestSimple(TestCase):
def test_n_groups(self):
result = randomization.simple(100, 2)
self.assertEqual(len(set(result)), 2) | 1 |
dc6c418659855c794883382cb95f96e4 | 32b75cf26507fe39ee4e10894e5e08c8 | r"""The timeout value in seconds for idle mptcp subflows. If this timeout is not set, idle subflows are cleared after cltTimeout of vserver.<br/>Default value: 0<br/>Maximum length = 31536000. | try :
self._maxtimewaitconn = maxtimewaitconn
except Exception as e:
raise e | 0 |
c7e60dd0921bc87dcaad9ca0bca57f7a | a21c6e20ec0f67bb1abe4d07e9d636e6 | 文本id,用此id去语言包取对应的值 | function UIUtils.GetText(id)
local cfg = ConfigMgr:Instance():GetItem("Language",id)
if cfg then
return cfg.text or ""
end
return ""
end | 1 |
7d7046a5e175dadf4ab9261614532efc | 7280c01fabb878ba68cfb0cf20f18c5e | Plots multiple ellipses over an image | diameters = 2 * radii
offsets = np.hstack((centers.real[:, np.newaxis], centers.imag[:, np.newaxis]))
angles = np.zeros(len(centers))
params = {"offsets":offsets, "units":"xy", "transOffset":plt.gca().transData}
params.update(kwargs)
ellipseCollection = collections.EllipseCollection(diameters, d... | 1 |
b5339a90d91e278557ab605642c785f3 | 3c0673fe2740928d7e6fc6bc29e515a7 | Generates a view model for a Match | {
if (id == null)
{
return NotFound();
}
NewMatch newmatch = await db.NewMatches
.SingleOrDefaultAsync(m => m.newMatchId == id);
if (newmatch == null)
{
return NotFound();
}
... | 1 |
09e9c45427a8fb1433109a74cb7dc69c | 60d446cd3c7e985a0c5fe91ef72d614d | 根据窗口的句柄,和进程的内存地址,读出地址的值 | if ReadProcessMemory(handle, address, buffer, 1, byref(bytesRead)):
memmove(byref(val), buffer, sizeof(val))
return val.value
else:
return 0 | 1 |
ed216f98f85a6fff0c0c4f9dffa3abf1 | e3d5ceff56bdf822fba335a64f9ca046 | 단원 내용 불러오기 | Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
MSC_Bean msc = new MSC_Bean();
try {
StringBuffer query = new StringBuffer();
query.append(
"select member.팀, member.이름, member.level, manager_schedule.* " + "from manager_schedule, member "
+ "where manager_schedu... | 1 |
a8cece885bac7e99917292fb10024717 | 2ef9d1aeeca785026bd76131dcc54e6d | Update committed index. | partitionIndicesToCommit.forEach(idx -> partitionMetadataList.get(idx).setCommitted());
while (publishedPartitionCursor < partitionMetadataList.size()
&& partitionMetadataList.get(publishedPartitionCursor).isCommitted()) {
publishedPartitionCursor++;
}
} | 1 |
1024216baf16a0ff4f731994058985b0 | 85eff716484dfcea0486dcc03a835d4b | 释放许可证,将其返回到信号灯。 | class Semaphore():
def release(self):
__rtos_do(RTOS__SEM_SIGNAL,self.lck) | 1 |
2948b158050d4b27f58aa13061126aa7 | c68faa09bc17a06c1b0bd353edcefe02 | Actualiza los registros del fomulario | function actualizarRegistro(idRegistroActivo){
var btnGuardar = document.getElementById(idRegistroActivo).getElementsByClassName('guardarBtn');
btnGuardar[0].addEventListener('click', function(event){
event.preventDefault();
var inputNuevoNombre = document.getElementById(idRegistroActivo).getElementsByC... | 1 |
01b429b23edddfc631b87732169d6065 | 45c785ec7a223bf187636c1ee2963f1a | Calculate critical tension for nth mode using full quadratic form. | CT = GJ + EIw*n**2/R**2
mu = CT/EI
A = 1 + mu*n**2 + k_bb*R**2/EI
B = n**4 + mu*n**2
C = 2*n**2*(1 + mu) - k_ub*R**3/EI
D = mu*n**2*(n**2 - 1)**2
f_T = n**2 / (n**2 - R/ls)
T_c = 2*pi*EI/(ns*R**2*n**2*A) * f_T *\
(A*k_uu*R**4/EI + B*k_bb*R**2/E... | 1 |
5cbf84775c412f23cf2fbe4064c6c9ec | 238780855c319e5c83828fa4d1faa210 | função que identifica sobreposição de elementos | if (dom1===undefined||dom2===undefined) return;
let crash =
dom1.offsetTop + dom1.clientHeight < dom2.offsetTop ||
dom1.offsetTop > dom2.clientHeight + dom2.offsetTop ||
dom1.offsetLeft + dom1.clientWidth < dom2.offsetLeft ||
dom1.offsetLeft > dom2.clientWidth + dom2.offse... | 1 |
4df8cf61ed63625c9cd0dbf6ccfd5cd3 | 96105f0477757f1c11aa303deeab95d6 | Deeplabv3 using Mobilenetv2 as base net. | backbone = resnetd50b(pretrained=pretrained_backbone, ordinary_init=False, bends=(3,)).features
del backbone.final_pool
return get_deeplabv3(backbone=backbone, classes=classes, aux=aux, model_name="deeplabv3_resnetd50b_voc",
**kwargs) | 0 |
add966fb86661d16f088fa1500e97e95 | 7a1eea4542af633c4d6fb33617e2bdf9 | 根据活动轮次ID获取活动商品竞拍情况 | public String getGoodsListJsonActivityId(long activityId); | 1 |
a95047f8bed31cb31f7546fdac802fbb | 2f7269a139f335fc95a0d279b541b6b2 | function for performing data pre processing on tic toc data set | def data_preprocess():
file= 'Autism-Child-Data.txt'
data= pd.read_table(file,sep=',',index_col=None)
print (data.shape)
print(data.iloc[0])
data.loc[:10]
data.describe()
data.dtypes
data= data.drop(['result','age_desc'], axis=1)
data.loc[:10]
x= data.drop(['Class/ASD'],1)
y=... | 0 |
9c5266fa75aea9a392697a63c9c6d026 | 7cbed49b7014b7e91e47d7a06fba2def | Transform a list of points from global X, Y to car frame | class TiltTracker(acquisition.Acquisition):
def transformPoints(self, matrix, points):
newpoints = []
for point in points:
v = numpy.array((point[0],point[1],1))
new0,new1,one = numpy.dot(v, matrix)
newpoints.append((new0,new1))
return newpoints | 1 |
60c10f2055bc27ba63a959ddbd93db9f | 701571c2b0b26d371884b5195e634ebc | \brief Creates a dummy rate_filter file, for testing rate filtering by_both source and destination
\retval fd Pointer to file descriptor. | (
struct nfct_filter *filter
)
{
struct nfct_filter_ipv4 filter_ipv4;
filter_ipv4.addr = 0xffffffff;
filter_ipv4.mask = 0xffffffff;
nfct_filter_set_logic(filter,
NFCT_FILTER_DST_IPV4,
NFCT_FILTER_LOGIC_NEGATIVE);
nfct_filter_add_attr(filter, NFCT_FILTER_DST_IPV4, &filter_ipv4);
nfct_filt... | 0 |
83d347a72aff4821cfcbf1431b2d064a | cf78812e6d940939f9e7953297606874 | mysql explain格式化 | {
$keywords1 = 'SELECT|(?:ON\s+DUPLICATE\s+KEY)?UPDATE|INSERT(?:\s+INTO)?|REPLACE(?:\s+INTO)?|DELETE|CALL|UNION|FROM|WHERE|HAVING|GROUP\s+BY|ORDER\s+BY|LIMIT|OFFSET|SET|VALUES|LEFT\s+JOIN|INNER\s+JOIN|TRUNCATE';
$keywords2 = 'ALL|DISTINCT|DISTINCTROW|IGNORE|AS|USING|ON|AND|OR|IN|IS|NOT|NULL|[RI]?LIKE|REGEXP|TRUE|F... | 0 |
7e4333e44bca24efef335032fc3a9644 | 379eaaa6f92e7b58b7274e7b15100b38 | 从数组中获取需要的key和对应的value | let obj = {}
array.forEach((item) => {
obj[item[value]] = item[key]
})
return obj
} | 1 |
11db49f8cab8d0f0b02061e3846b5317 | 1cd199f423c3e633bde5b5380f0f8bfc | フラグが立ったら敵を生成する | public class comEnemy : MonoBehaviour
void OnTriggerEnter2D(Collider2D collision){
if (collision.gameObject.tag == "PB"){
instanceex = (GameObject)Instantiate(exobj, Eposition, Quaternion.identity);
int tmp = Random.Range(0, enirand);
if (tmp == 0)
{
... | 0 |
9a5b6cb9bd5e1e50a1672e32906b5133 | 0f10933c41df13cbb88af8c9545a8fd5 | gets the saved stepdata from database | @ManagedBean
@ViewScoped
public class SavedTaskDetailBean implements Serializable
public List<StepConfData> getStepConfData() {
return stepConfData;
} | 0 |
ecd2d0cc18a9db3596086d31dfa6e010 | 9b2e0e7ab7b43dd73cbb3790b419fe2f | 设置合成相关参数 | mTts.setParameter(SpeechConstant.PARAMS, null);
/**
* TODO 本地合成不设置语速、音调、音量,默认使用语记设置
* 开发者如需自定义参数,请参考在线合成参数设置
*/
mTts.setParameter(SpeechConstant.ENGINE_TYPE, SpeechConstant.TYPE_CLOUD);
mTts.setParameter(SpeechConstant.VOICE_NAME, voicer);
mTts.setParameter(Spe... | 1 |
23db40a4c7c9f03de8d560f888a05f32 | f87f70930110e0861cd1364b67892ae9 | 把一个图片链接转换成base64字符串 | public class DealHuanxinPicUtils
public static String GetImageStr(String url) throws Exception{
InputStream in = null;
byte[] data = null;
try{
in = getInputStream(url);
data = readInputStream(in);
in.close();
}
catch (IOException e){... | 1 |
0e5082b785db8c0fe915e5bb9c269194 | 8d6cc0ff41dc29b8553847fcf46a945e | Links as last child of parent | {
$meta = $dm->getClassMetadata(get_class($node));
$config = $this->listener->getConfiguration($dm, $meta->name);
$wrapped = AbstractWrapper::wrap($node, $dm);
$parent = $wrapped->getPropertyValue($config['parent']);
$this->updateNode($dm, $node, $parent, self::LAST_CHILD);
... | 1 |
005c45628b6cd4e880f7e54b4f40aa1b | 8faca29c75b7813f716e8c809219dc03 | Check that the list that is returned does not include numbers
that are not prime numbers | def delete_prime(lst):
new_lst = []
for x in lst:
if not(is_prime(x)):
new_lst.append(x)
lst = copy.deepcopy(new_lst)
return lst | 0 |
91fad68204a3f7662c2dc5560ef1a241 | 1398122f04256ecb379a2052a9686e41 | check if upgrades are unlocked | function unlockAndLockUpgrades() {
$(".generator .upgrade button").each(function() {
let genId = $($(this).parents(".generator").get(0)).data('id');
let gen = user_data.gen.find(elem => elem.genId === genId)
if(gen) {
let upg = gen.upgrade.find(up => up.id === $(this).data('id'))... | 1 |
b26362ba90ce19afaae5ef36882d1cc9 | 573188d8ac02071314316a9e06dcfac0 | Returns a Translated name for selected Thumbnail Mod | global $post;
$sf_thumbnail_id = get_post_thumbnail_id( $post->ID );
$sf_thumbnail_image = get_posts( array( 'p' => $sf_thumbnail_id,
'post_type' => 'attachment',
'post_status' => 'any'... | 0 |
07ded30e4eb9e94b91b6713812266e7f | cad4a1a4e3f58ef689e1f54657d6f537 | 將庫存扣除購物選項的購物數量 | class Order
protected function minusStock()
{
foreach ($this->oProducts as $v) {
$product_id = $v['product_id'];
$count = $v['count'];
$Product = Product::find($product_id);
$Product->stock = ($Product->stock) - $count;
$Product->save();
}
... | 1 |
cc9f2b1e060d752342fcbdc809800ce3 | 9b630332621503d8d4596427d58a4b13 | Loads an HTM located in the default CB path. | namespace HtmlAgilityPack
public class MixedCodeDocument
public void Load(string path)
{
Load(new StreamReader(path));
} | 0 |
a657a628a3c8ff648ed46e0f026492a3 | 48ca5b6e7624ecf2380ca31166e389a8 | 选择认证方式 | public class SelectSecurityView extends FrameLayout implements View.OnClickListener,SecurityVerity.VerifyCodeResultListener{
private void selectSecurityType(){
SecurityVerity.getInstance(mActivity).selectSecurityType();
} | 1 |
fde57fca74d40907e3225a054d008bc9 | 582d5dd142838d1b094cc9a11800364a | Write the calculateInterest member function to return the
interest based on the current balance and interest rate | {
double interest = (balance * rate);
balance += interest;
return interest;
} | 1 |
f7c7fd2eba8db080b44177dfe9cdb947 | ff91608790a4a7735b3685b187efd872 | If _division is positive it represents Ticks per quarter note. By default the tempo is 120BPM, or 120 quarter notes per minute, 1 quarter note in 0.5 seconds
This would mean a tick (a clock tick) would be 0.5/_division. e.g. with a _division of 256, each tick would be 0.001953125 seconds long.
With this, an 8th note wo... | protected _ticksToUnits(ticks: Ticks): Type {
return (ticks * (this._beatsToUnits(1)) / this._getPPQ()) as Type;
} | 0 |
76ee7ef340eed6c9eabd2b13ccef7761 | 1ba8eb6fcab38432495f1839238ac00f | Get all client groups. | def list_all_cli(api_client):
content = GroupsApi(api_client).list_all()
click.echo(pretty_format(content)) | 1 |
e53d26d6849d3147a8abb615c047893e | b74f6a3a5216b41efd9dadbf80511565 | 设置下拉框允许编辑,以备后面设置自动补全功能 | class EditableCategoryName
setAutoSelect(autoSelect) {
this.autoSelect = !!autoSelect;
} | 0 |
cd0c45fa0d280799ca5ab07480de9f85 | c6ec95e44e92fcf072ca20c04dcff907 | If the playlist changes, update the frame title and icon | class RSSimpleAppDelegate(NSObject):
def refreshThis(self):
if player_controls.is_playing():
self.play_button.setImage_(self.pause_img)
else:
self.play_button.setImage_(self.play_img)
self.progress_bar.setIntValue_(player_controls.get_player_position())
curr_track... | 0 |
e08e1608a841b1a64580c60fca29f886 | 57112bc118d59a704d2d461284312af8 | Decrement the number of Workloads in the Suite. | {
List<ParameterDB> parameters = new List<ParameterDB>();
try
{
parameters.Add(new ParameterDB(TimesheetResources.id, SqlDbType.Int, workloadToDelete.id.ToString(), false));
ExecuteStoredProcedure(TimesheetResources.DeleteWorkloadStoredProcedur... | 0 |
54fd04a89f7002f52f7831acda3d4308 | bdb094e237f73c627f668cf274c6334b | Handles a change to the undo manager for a given dependency object. | namespace Netron.Diagramming.Win
public class DiagramMainToolStrip : DiagramBaseToolStrip
protected virtual void HandleDiagramControlOnHistoryChange(
object sender,
HistoryChangeEventArgs e)
{
UpdateUndoRedoButtons();
} | 1 |
f87d8c4eb14573064348f66648d1950f | 301da57be59301af0413feedde3c4bee | Get derivatives (internal array) | class QOWeight extends AbstractNamedSet
public double[][] getDerivs() {
return derivs;
} | 1 |
149b05ac631173cb4b16609a7356e13a | da710da9e88e6afbf373fe55eb745ea0 | Fonction qui permet de recuperer l'historique des fichiers charges | def read_history(mydir_path):
base_file_hitories = {"vmd": [], "org_pmx": [], "rep_pmx": [], "camera_vmd": [], "camera_pmx": [], "smooth_vmd": [], "smooth_pmx": [], "bulk_csv": [], "max": 50}
file_hitories = cPickle.loads(cPickle.dumps(base_file_hitories, -1))
try:
with open(os.path.join(mydir_path,... | 1 |
c0476965c0a7cc7e31ebd03b09565c47 | 0d47e80c66501e3e53e9999de7455ee3 | Sets the user name to display for anonymous users. | @InterfaceAudience.Private
public class UserArgs
public void setUserName(String userName) {
this.userName = userName;
} | 0 |
8f6f39adea118ee4dcf8a8381ccf0e3f | 8769231a4657b078d26066dfe03eb540 | Stocks on my portfolio.
MyPosition is on portfilio if:
1. its open date is less than on_date;
2. its close date is either missing (still opened) or later than on_date | class BitfinexGateay(VtGateway):
def qryPosition(self):
self.api.onPosition() | 0 |
a0578d820bc29bff78bfcf9dfaf9d652 | 4b529b1f9de9e48cce78b643c478e8b0 | Starts deploying agent(s) to remote machines. | Optional<AgentID> startRemoteAgent(String hostname); | 1 |
1a20630564caea3d886e8d8c92588559 | 226a2b7a8cefa25b93de46a9ea5197c8 | Tries to create default shares for the local system. Typically, this are the shares for the system's
MyMusic, MyVideos and MyPictures directories. | namespace MediaPortal.Common.SystemCommunication
void SetupDefaultServerShares(); | 1 |
c07f5460fc06e67725256c6401c7e04a | aa3a44a3e4a25f1725b7ed6700b09502 | Set the name of the measure file. | class gsiCovarianceFile:
def setName(self, filename):
self.fname = filename | 1 |
e84c6ba7e1c64a39d334935b0216e832 | a9182f528119527c8330c576045d7f2a | função para comparar e ordenar os números de forma crescente | {
int aux;
for (int i = 0; i < TAM; i++)
{
for (int j = 0; j < TAM - 1; j++)
{
numComparacoes++;
if (vet[j] > vet[j + 1])
{
swap(vet[j], vet[j + 1]);
numCopias+=3;
}
}
}
} | 1 |
c90600a7999551e780634b887505527d | b7365161ac05d8fd73f0e8022b917b92 | turn both leds off | void turnOffLEDs (void) {
PORTC = 0;
PORTA = 0;
} | 1 |
0ec6ba712737cd9184c8acebdfc576b2 | d76a11ddd49aa22964914e9f321d5199 | 小程序对应的点赞 | @RestController
public class DynamicController
@RequestMapping("/token/plfb")
public void plfb(@RequestBody Map<String,String> map,@RequestHeader Map<String, String> headers){
String token = headers.get("token");
User user = (User)redisUtil.get(token);
User newUser = userMapper.getUserById(u... | 0 |
5d9c56b572f2f036cd2b42874d908304 | 4be74b8474fb13378c537330fcab11a1 | Normalizes a language-dialect string in to a standard form we can deal with.
Converts any dash to underline, and makes sure that language is lowercase and dialect is upercase. | public String getFormatedLanguageNoDialectCode() {
final String name = this.name();
final String[] nameArray = name.split("_");
return nameArray[0].toLowerCase();
} | 0 |
73ff05c62d26e5a86fc64ebf2351bcc0 | ed1d73df432b61f1385017e91547bea9 | 每轮循环同步多少个 | class SyncJob extends Job
public function attempts()
{
return 1;
} | 0 |
c364ad2756b4c5b5f35868cb36b407e1 | 727ca7a28fd43d6b681dc882749788a1 | Sets the status message subtype. | public function setSubType($value){
return $this->setParameter('sub_type', $value);
} | 1 |
3416ecefe6c466233e2cc0dcecfe6dbf | e1466ed628115fb0cf683d699b0d816a | 展示我的桌面页面 | class DesktopController extends Controller
public function index()
{
return view('desktop.desktop_1');
} | 1 |
81e7fa06120e4d15918cbeb50361329e | b2ba403aedc0bb4096f829afaa2dbdc7 | The callback sent to Wordpress' 'wp' action. It understands the current
url context and calls the current controller's method, if applicable. | class QD_Controller extends CI_Controller
public function _callback($event, $params = array())
{
} | 0 |
a5678557a3c6a8ae8c797982b1ad414b | d11cf7ad9b681f712bc213003776adad | Test to hangup during ongoing call | cpg = CallPage()
time.sleep(3)
cpg.create_call_entry("13800138001")
cpg.click_call_time()
time.sleep(2)
for i in range(5):
CallContactDetailPage().click_normal_call()
time.sleep(2)
flag = cpg.is_phone_in_calling_state()
self... | 1 |
bd77f6cbc594989b614723b23d2a476d | ace6e14974ebb0c6c66745b276bdbd70 | Method to get the total build count of PROD with in day limit | @RestController
@RequestMapping("/jenkinsJob")
public class JenkinsJobController
@GetMapping(value= {"/totalBuildCountPROD"})
public JenkinsCountDetail getTotalBuildCountPROD() {
return manageJenkinsService.getTotalBuildCountPROD(null);
} | 0 |
f91d57ab1a8a48fcea16774c01197432 | d800f3e642630c1e6a9d9ae894df465f | 处理菜单折叠点击事件 | export class SubjectComponent implements OnInit, OnDestroy
changeIsFolded(event) {
event.stopPropagation();
this.isFolded = !this.isFolded;
} | 1 |
b5aa257e562f0c3746ddd52d96dbdc5a | 8d4646fbc5df8f0b52cff13a7696d997 | Set the associated pose group for this pose. | class Pose(PoseDraft):
def group(self, group):
from fetchcore.resources.maps import PoseGroup
if isinstance(group, PoseGroup):
if not group.is_set("id"):
raise ValidationError('Pose group must already have an ID.')
self.group_id = group.id
elif group is No... | 1 |
bda98be55bf22f596391e44d9fd8970f | b4535f1a420ee8f0ebe12001f444db2a | Get icDay180Supply | public class AlgodClient extends Client
public GetSupply GetSupply() {
return new GetSupply((Client) this);
} | 0 |
11bf67b5ddc987461c77cc7a38b0fc4d | 2aaf991c52e6ddf430295f6f9d4b8cc1 | String joins input with indices in s. | def sjoiner(inbox, s=None, join=""):
return join.join([input_ for i, input_ in enumerate(inbox) if i in s]) | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.