query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
55613da9e10f61dff163d14cedf5ed3e | 97723a501d85f04b7a19a17469d1fd59 | <pre>
Only perform the composition if the generation of the source object
that would be used matches this value. If this value and a generation
are both specified, they must be the same value or the call will fail.
</pre>
<code>optional int64 if_generation_match = 1;</code> | public final class ComposeObjectRequest extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.storage.v2.ComposeObjectRequest)
ComposeObjectRequestOrBuilder
@java.lang.Override
public long getIfMetagenerationMatch() {
return ifMetagenerationMat... | 0 |
1bbd39c71c4e7c621403b406311229e5 | c8f7b7feee32dfec6e7d8f0660c60bc1 | 认证中心获取组织机构树
当配置参数为1时,能看到所有组织机构树(根节点为4A组织机构默认根节点);
当配置参数为2时,能看到当前主帐号所属组织机构以及下级所有组织机构(根节点为当前主帐号所属组织机构);
当配置参数为3时,能看到所有管理平台配置的可管理组织机构树(根节点为4A组织机构默认根节点,但是选择节点时候判断是否有权限); | public Result<String> getOrgTree(Integer clientFlag, Long userId); | 1 |
7e18ad90313fc3dc3144201d40e46a79 | 1a28f6e73dd0b96f0c04e58a15e1e99f | encode HL7 table 0002, marital status | $fd = $msh->field_delimiter;
$cd = $msh->component_delimiter;
$q = $fd . $cd . $msh->repeat_delimiter . $msh->subcomponent_delimiter;
$s = self::SEGMENT_TYPE;
$s .= $fd . '1';
$s .= $fd . $pid2;
$s .= $fd;
$s .= $fd . $pid4; ... | 1 |
702fd6bac8576a1f346cb356f08f8d4a | 56010a43d7399465b58fe1cf83db2eca | Empty test database to be used in all tests. | def test_db():
_db = SqliteDatabase(":memory:")
with test_database(_db, (Organisation, User, UserOrg,)) as _test_db:
yield _test_db
return | 1 |
73b66b1b270fc273267b1384a499599f | 68efe9d8f3ce2b8dd6fa7f4a48c9b418 | \brief A slow way to compute the number of paths in a diagram.
Running time is linear in the number of path, exponential in the size
of the diagram.
\sa Cudd_CountPath(), Cudd_CountPathToNonZero() | static void
ddOccurCount (LddManager *ldd, LddNode *N, int *occurrences)
{
LddNode *E;
if (Cudd_IsComplement (N->next)) return;
N->next = Cudd_Not (N->next);
if (cuddIsConstant (N)) return;
ddOccurCount (ldd, cuddT(N), occurrences);
E = Cudd_Regular (cuddE (N));
ddOccurCount (ldd, E, occurrences);
if (... | 0 |
6498cd45b56553990fe8db8fa4defaba | 426f3d7fc216a32fb9c498a4b249e8b0 | Creates a new company property. | export class AssetManagementService
createAssetProperty(assetId: string, name: string, valueType: string) {
return this.httpClient.post(`${this.url}/assetManagement/assets/properties`, { assetId, name, valueType });
} | 0 |
7c1dc4c070d2bf6bb0e83348bcce35c8 | 72fe09a57517b0de3014ed486328ba28 | 修改系统默认图形 | {
var request = new GetSystemtDefaultGraphicsRequest() { Type = type };
var response = graphicsbaseinfService.GetSystemtDefaultGraphics(request);
return response.Data;
} | 0 |
3e4d8ccad037697eecc991e98b9ff3d0 | 44ccde9e3b471014c206ce631b166804 | Atualiza o status do pedido como cancelado quando o cliente clica em cancelar. | if(buscar(numeroPedido)==-1) {
return false;
}
int mesa = pedidos.get(buscar(numeroPedido)).getMesa();
GerenciaMesa.getComanda(mesa).getPedido(numeroPedido).mudarStatus();
return pedidos.remove(pedidos.get(buscar(numeroPedido)));
} | 1 |
49d626468e86692582141eee1b861cb1 | c1a2b3f32631a4c5627d7cfdd4c29ffc | 价格日历价格显示 | var dayList = new Array();
var prices = new Array();
var nStep = 0;
var nScrollStep = 9;
var nScrollDayNum = 368;
var nScrollDefIndex = 0;
var nScrollFix = 0;
var idate = qryDate.getFullYear() + "-" + laGlobalLocalService.PadString((qryDate.getMonth() + 1... | 1 |
8b7dc058489e036e82ff3a29cc8d8ed7 | 7f61448ad6da3ef0f9cb03f40c5be655 | Pas très "canonique" (voir doc Python), mais utile | cases like (1) | 0 |
9ffb602d7286e61550f255ab7f040bf5 | 18f313a53aa9fb2c615f388494c2604f | Moves a value from the return stack to the data stack. | void RET(uint16_t opcode, Chip8 * cpu_reg) {
cpu_reg->pc = stack[--cpu_reg->sp];
cpu_reg->pc += 2;
} | 0 |
f43686db6679c92805e56bc9fe98dc6e | 00fc187b73133ccaa6347ebafa92baac | 线棒材申请拆分数据插入(质证书和拆分单位一致) | public CrmMillSheetSplitApplyVO splitInsertNeed1(List<CrmMillSheetSplitInfo> crmMillSheetSplitInfoList,String ip) {
String acctName = crmMillSheetSplitInfoList.get(0).getAcctName();
MillSheetHosts millSheetHosts = new MillSheetHosts();
millSheetHosts.setMillSheetNo(crmMillSheetSplitInfoList.... | 1 |
4a893f6a9ff16a2ec6f0cd2e3b324b96 | 2818ae6f609aecc2e2925b7102ab654f | atualiza o estado dos motores na tela do master | telemetry.addData("motorFL", motorFL.getPower());
telemetry.addData("motorFR", motorFR.getPower());
telemetry.addData("motorBL", motorBL.getPower());
telemetry.addData("motorBR", motorBR.getPower());
telemetry.update();
} | 1 |
f5b8e6ad1981880eccce6ec2ca93456b | 4a6ebe690148b4f83993b6a848d4df9e | Update the kernel times. | class WindowClass(wx.Frame):
def updatekernel(self, e):
self.kernelsize = int(self.kernelsizeinput.GetValue()) | 0 |
5715e9020389bfa9db9b6ab96dc261b0 | 0b54b657765ce10f0335693716db57fa | Removes any wrapping <see cref="AnnotationExpression"/>s, <see cref="ExtraPropertiesExpression"/>s,
and <see cref="UnaryExpression"/>s with type <see cref="ExpressionType.Convert"/> or
<see cref="ExpressionType.ConvertChecked"/> and returns the inner expression. | namespace NMF.Expressions
INotifyExpression<T> Reduce(); | 1 |
e6d9b2f2e4b5af636eca7e4dafc2190a | db22e9d59e301da5134d755e40933321 | GET /sub_tasks
GET /sub_tasks.json | class SubtaskController extends Controller
public function index()
{
$subtasks = Subtask::all();
return response()->json($subtasks)->setStatusCode(200, 'Successful task output');
} | 1 |
7258193d119ce684b0f5a3366ecc66e9 | 3b70b7db6fddd706d87a54263b2f3ee9 | Pull the Sentiment annotation for this sentence. | class SentenceSentimentStub(object):
def __init__(self, channel):
self.Analyze = channel.unary_unary(
'/sentence_sentiment.SentenceSentiment/Analyze',
request_serializer=sentence__sentiment_dot_sentence__sentiment__pb2.Request.SerializeToString,
response_deserializer=sentence__sentiment_dot_... | 1 |
13119ec609e6f5bf89d459451421cea7 | 71f080699b4c4fa2d100f5aa04f1b97a | Tests the calculation of the distance between two lists of orientations (vectorized). | List<String> ok1 = new ArrayList<String>(Arrays.asList("1", "3"));
List<String> ok2 = new ArrayList<String>(Arrays.asList("1", "7"));
List<String> ok3 = new ArrayList<String>(Arrays.asList("3", "7"));
DistanceVectorPair dvp1 = DistanceVectorPair.makePair(ok1, ok2);
DistanceVectorPair dvp2 = DistanceVectorPair... | 1 |
82fa5a7f3040f9d735a6918941597133 | 1edf67d3f934aceefbbd49520fc7aa1c | Helper function to analyze a Rabi amplitude scan. | data = np.loadtxt(fname)
def I_nu_from_T_b(T_b):
c_light = c.c.cgs.value
nu_obs = c_light / lam_obs
return 2 * nu_obs**2 * c.k_B.cgs.value * T_b / c_light**2
r_as = data[:, 1]
T_b = data[:, 4]
dT_b = data[:, 5]
I_rms = I_nu_from_T_b(T_rms)
I_nu = I_nu_from_... | 0 |
7fbcc0e7984904e0cefcb8b11b6cb9a2 | 577724ea98902ee3aaafe955325aa273 | @brief Manejador de la señal SIGTERM. | if (lista_hijos->hijo == 0){
}
else{
struct lista* p;
p = lista_hijos;
kill(lista_hijos->hijo, SIGABRT);
while (p->sig!= NULL){
p = p->sig;
kill(p->hijo, SIGABRT);
};
esperar_hijos_manager();
char type = 'R';
guardar_arc... | 0 |
cbc63b94b25b4578d3ef9f2fccd1072c | 70c1c93875c33000116aa4cb55b47486 | like puts except without the newline | void puts(char *string){
while(*string) {
write(stdout, string, 1);
string++;
}
newline();
} | 0 |
5d41a64cfa3db674cb680f28b4b489bc | ddd288b674571f06958a35a69d4d3c36 | 获取自提赠品、快递赠品数量 | class UserAction extends userbaseAction
public function getnum(){
$uid = $this->visitor->info['uid'];
if($uid != 3){
echo 0;exit;
}
$id = $this->visitor->info['id'];
$num=array();
$num[0] = M('item_order')->where(array('uid'=>$id,'status'=>2))->count();
... | 0 |
7ffc5bf836ffb3e3507626a115d50fae | 4298577043478d996c088d146e0992b6 | 删除新闻区域关联 | {
if (Schema::hasTable('news')) Schema::table('news', function(Blueprint $table) {
$table->dropForeign('news_region_id_foreign');
});
if (Schema::hasTable('news')) Schema::drop('region_id');
} | 1 |
f8eb628e6073824a750b075072cb7228 | e6da2615a660ba3967a6da81326af89c | 「今日行く」「明日行く」「今週行く」の情報を取得する | fun getRouteInfo(
@Query("ServiceKey", encoded = true) userKey: String,
@Query("cityCode", encoded = true) cityCode: Int,
@Query("routeId", encoded = true) routeId: String
): Single<ResponseBody> | 0 |
47b5731daeca71079b648ced0147b16f | c3da3e86e4361fc0aa84de6b1dd9401b | #Assign labels based on minimum euclidean disatance | {
cluster.labels <- list()
for (i in 1:k)
{
cluster.labels <- rbind(cluster.labels, row.names(cm)[match(max(cm[,i]), cm[,i])])
}
for (l in rownames(cm))
{
if (!(l %in% cluster.labels))
{
cluster.number <- match(max(cm[l,]), cm[l,])
cluster.labels[[cluster.number]] <- c(cluster.la... | 0 |
323a6a654d0c6e41809dd345e803386b | 95d0d51d58e832cfe4e58a45e59bb785 | Sets the review complete date. | public class DocumentListItem
public void setCompletedDate(String strCompletedDate)
{
m_strCompletedDate = strCompletedDate;
} | 1 |
309431039ba7187b6e2251012dce621f | 788f94362c89ce68e20c6d5f2d447a6e | How many times HTTP connection should be retried until giving up. | default FacebookEndpointConsumerBuilder httpRetryCount(
String httpRetryCount) {
doSetProperty("httpRetryCount", httpRetryCount);
return this;
} | 1 |
fb719c3a748c60deedeb5bd445c51497 | 721d1cb0837cb0525f466c4ea12e1d7d | Detach the right child node. | class TreeNode(object):
def detach(self):
if self.up:
self.up.children.remove(self)
self.up = None
return self | 0 |
fdb533edfc9bd22c030306771b8c0cc0 | 0bf0e7f0d6cc9909074737d0dbb575e3 | 点击筛选按钮 | slideFilterClick() {
wx.hideTabBar()
this.setData({
'filterData.filterShow': true
})
} | 1 |
5628a182768a698455dce36a1657c4d2 | 915f8bf5bf3b3f1c7368a7be2120b5b2 | Should be called when the explainer is done explaining all the samples | void foundAllExplanations(); | 1 |
a535e44c4579a06eb9a49395db197d0a | 58a5913179b288cc0d6b96d91af8458b | recebe um caracter e devolve 1 caso ele seja branco e 0 caso contrario | int valid_character(char letra){
if(letra == 'x' || letra == '0'){
return 1;
}else{
return 0;
}
} | 0 |
ef5a6e9520327df9b1fffaed0ce6bc48 | 9ac925c30373b1c77f9f50a543bd2a9f | 根据一组查询条件查询业务实体列表,同时返回总记录数 | public List<?> query(String HQL, List<ICondition> conditions, int maxrows)
throws ServiceException; | 0 |
4a71ca26e24dde1c212564059fc2be6b | 00f92aeb6f572b8c352e3de78495876d | Scrolls to the end for this console edit. | namespace GTATool public partial class MainWindow : Form
private void richTextBox_TextChanged(object sender, EventArgs e)
{
rText_console.SelectionStart = rText_console.Text.Length;
rText_console.ScrollToCaret();
} | 1 |
c9c5227b18ef98d8f1278876497303ed | 4d2d07cc069fe9af80f15f9892b82329 | Function to extract subject IDs | if subj.isdigit() == True:
return subj
if subj.isalpha() == True:
ld = pd.read_csv(op.join(pathBase, 'MEG', 'meta', 'listdata.csv'), sep = '\t', dtype = str, header = 1)
ld = ld[ld.name == subj]
subj_id = ld['id'].iloc[0]
return subj_id | 1 |
279455d93e2a7d1896db92b4c74cc630 | 8322e596d06c9495b1585a427939e753 | Put pseudorandom junk in all of mode-specific VRAM.
So, everything except windowing, mode, and flags. | {
int i;
if (generic_vh_start() != 0)
return 1;
if ((dirtybuffer2 = malloc(starforc_bgvideoram_size)) == 0)
{
generic_vh_stop();
return 1;
}
memset(dirtybuffer2,1,starforc_bgvideoram_size);
if ((dirtybuffer3 = malloc(starforc_bgvideoram_size)) == 0)
{
free(dirtybuffer2);
generic_vh_stop();
return 1;... | 0 |
42b90efea6563a27503abaf9d4c1cda4 | fbf67c8f2ce95aa913d9d2a2490ce594 | Validates address by requesting payone | class Client
function validateaddress($address)
{
return $this->jsonrpc->validateaddress($address);
} | 0 |
788cdb8877cb77042dac4d3a74d9a152 | 24936a5d2d8a7cffcfaa1164a362d1ca | inicializa a priority queue | class PriorityQueue():#es una cola que posee prioridades (sus elementos se ordenan por un parametro "cost", el cual es tomado en cuenta a la hora de agregar o sacar elementos de la cola)
def __init__(self):
self.nodes = [] | 1 |
a367d2635dadc4c698cc6b4a7820c293 | e6893b77d868b45023a06f69f1ef35a2 | Go to the next frame. Signaled by the right arrow key. | class TerminalCommandManager(CommandManager):
def do_next(self, arg, tracer):
self._redraw = True
tracer.set_next(tracer.curframe) | 1 |
60fb5f78f7f0d35315e0ec846c78f0bd | 7d7a12e60e1fc94c0eff5a422444284b | Displays the Guidance Browser tool window. | class MainApp(fdfGui.Ui_MainWindow, QtGui.QMainWindow):
def showHelp(self):
self.helpBrowser.show() | 1 |
509db12f774a887759e522d25211ffc9 | 95c5e476147ba2a256e476152f71d40e | 获取IMyAidlInterface对象 将服务端的Binder对象转换为客户端所需要的接口对象 | class AIDLActivity : AppCompatActivity() internal inner class ConnectCallBack : ServiceConnection
override fun onServiceConnected(componentName: ComponentName, iBinder: IBinder) {
mIMyAidlInterface = IMyAidlInterface.Stub.asInterface(iBinder)
login()
} | 1 |
4fd564bfb556874191d9f35f04be914e | a711fd7b68e9f9fffadc94279cf58260 | Returns phrases that are receiving an uncharacteristically
high volume of click traffic, and the individual links (hashes)
driving traffic to pages containing these phrases. | class Bitly4laravel extends API implements BitlyInterface
public function realtimeHotPhrases()
{
return $this->make('realtime/hot_phrases');
} | 1 |
ffacf0ceeb11fd2380657a70e8f92761 | 7ea139ce079cab3059591cff614bc982 | Adapted from https://github.com/PyCQA/pycodestyle/blob/d219c684f117be77927d33146e76a5364161e518/pycodestyle.py#L1560 | _ = gettext_lang.lang
msg = exc.args[0]
if "unexpected indent" in msg:
this_case = _(
" In this case, the line indicated by an arrow\n"
" is more indented than expected and does not match\n"
" the indentation of the previous line.\n"
)
elif "e... | 1 |
d611a52cec67bc19ef4534f388dda694 | 8be695485257c5518d27259341ca260c | Returns the maximum allowed capacity of this buffer. | public class NmeaStream implements INmeaStream
@Override
public int get_capacity() {
return _buffer.length;
} | 1 |
bea7bf2497579c3e1b44273912614829 | d7ba879ea62c47d3c7bc8d031c1f5a57 | Returns a CompletableFuture that retrieves the availability of an item from the Inventory service. | public Optional<InventoryRecord> getInventoryRecord(Integer productId) {
try {
return Optional.of(restTemplate.getForObject(baseUrl + "/" + productId, InventoryRecord.class));
} catch (HttpClientErrorException e) {
return Optional.empty();
}
} | 0 |
31208453dff3477990624325cceb134c | 7ec41e451757006f33b813f05e9faa0a | 每隔n个时间单位生成m个顾客 | void customer(const std::string& name) {
int item;
while (true)
{
std::this_thread::sleep_for(std::chrono::milliseconds(1));
std::unique_lock<std::mutex> locker(mx2);
if (get_total == total_num) break;
item = getItem(name);
++get_total;
locker.unlock();
srand((int)time(0));
int randnum = rand() % 2;
... | 0 |
f3b4ab096918e76bdf8cbf6c05f5cb82 | fea5824699bd31a66a373f02feef8fd5 | the edge is v -> w | class DirectedEdge(private val v: Int, private val w: Int, val weight: Double) : Comparable<DirectedEdge>
fun to() = w | 1 |
2aff904df03e9f061b70c92d8a335e7c | 9040e41878891391d2ae35b14e79ac11 | Returns a float2 with independent and identically distributed values according to a normal/Gaussian distribution with specified mean and variance. | BGFLOAT MTRand::randNorm(BGFLOAT mean, BGFLOAT variance)
{
double r = sqrt(-2.0 * log(1.0 - randDblExc())) * variance;
double phi = 2.0 * 3.14159265358979323846264338328 * randExc();
return static_cast<BGFLOAT>(mean + r * cos(phi));
} | 0 |
caa97170c4d661e29fac70dee7326785 | cf5bb2ab0e837bae342e636f4b93c3f0 | Retrieve a specific timesheet by using a unique timesheet ID | @Transactional(readOnly = true)
public Optional<TimesheetEntryDTO> findOne(Long id) {
log.debug("Request to get TimesheetEntry : {}", id);
return timesheetEntryRepository.findById(id)
.map(timesheetEntryMapper::toDto);
} | 1 |
5ae95ccc88ebf9970419f79f98ce653d | 172d29febed7a01f975044d574802014 | ==== USER ==== # | def take_user_input(prompt="Choose one", input_type=str, possible_inputs=[], input_description=None):
if input_description and not len(input_description) == len(possible_inputs):
print("Debug: possible_inputs and input_description lengths are different.")
print_possiblities = True
while True:
... | 0 |
e42ab3132a0ca606abac45063afd12a9 | ef3f90fd0f9ae17bdec6862290ef55d3 | 为用户绑定标签 | $id=$_GET["id"];
$result=M('users_bq')->where("uid=$id")->select();
$strid="";
foreach($result as $k1 => $v1){
if($strid==""){
$strid.=$v1['bid'];
}else{
$strid.=",".$v1['bid'];
}
}
if($strid==""){
$this->error('该标签尚未有用户绑定!');
}else{
$this->redirect(... | 0 |
ac7aeb5f8516cec0f49873d1194ae040 | 2de05989a618fa5afb7a64b68474ee4f | Find data using zone_maps and return first match | let currentData = []
for (let i = 0; i < data.length; i++) {
if (zone == data[i].Zone) {
currentData.push(data[i]);
}
}
return currentData;
} | 0 |
40c9b6a3f514039efcffee31150cdb5d | a759051d3e6dbf019e73c21d0aa208bc | Prints all keys in all dicts, indenting to indicate inner dicts | for key, value in dictionary.items():
if isinstance(value, dict):
print('%s%s%s%s' %(ident,braces*'[',key,braces*']'))
print_dict(value, ident+' ', braces+1)
else:
print(ident+'%s = %s' %(key, value)) | 1 |
c041b8bf5c7eb2655b40c7132d356b3d | ba12afd0e8ed02e0c4266c3321d0bb9a | Returns whether native bridge supports scope sync. | @ReactModule(name = NativeNetworkingAndroidSpec.NAME)
public final class NetworkingModule extends NativeNetworkingAndroidSpec
boolean supports(ReadableMap map); | 0 |
50300bd324a47ddfc103b8a21c5643f1 | 55397852d10261a8783471dc06301f03 | Updates the GUI. Changes which button is selected and sets the text on the top of the screen. | public abstract class NetcubeMode extends JFrame implements ActionListener, KeyListener, Runnable, OptionsBox.OptionsListener, Constants{
private void updateGUI(){
scrambleText.setBackground(optionsBox.textBackgrColorX);
scramblePanel.setCubeColors(optionsBox.cubeColorsX);
scramblePanel.setPyram... | 0 |
72ef60d6ca12d72916c895c428382f4a | e4528dc1d410b1f2ea65e768965f05c3 | 默认的方法,显示导航列表 | class NavController extends Controller
public function navList(){
$list = M('Nav')->select();
$this->assign('list' , $list);
$this->display();
} | 1 |
0715570524a358b1a225efeb8ad19ac3 | a3923d8ac263d7ff8a67775bbe5d4475 | 医生列表加载更多 | getDoctorList() {
let that = this;
let params = {
key: 'xiaoyouyishengDoctor',
limit: '20',
skip: this.data.skipValue,
staffName: this.data.inputName,
expertCategory: this.data.expertCategoryValue,
deptsName: this.data.deptsNameValue,
}
request.httpFind('/api/server_g... | 1 |
c06459848983e045a0df410cb3c1fb19 | 76b61961bab099fa5e844871187cc426 | Called when the current playing track has finished playing
(the decoder has reached the last frame). | static void track_ended(void) {
int tracks = 0;
if (g_currenttrack) {
g_currenttrack = NULL;
sp_session_player_unload(g_sess);
if (g_remove_tracks) {
sp_playlist_remove_tracks(g_jukeboxlist, &tracks, 1);
} else {
... | 1 |
23cd43e870dc2d66e96cc8b8d60404de | df6e7e491ca1cb872afbd3163530a6aa | Returns even numbers from a list of numbers | evens = []
for item in number_list:
if item % 2 == 0:
evens = evens + [item]
return evens | 1 |
c254138f2ba54e27d4a47627cbadd4dd | 7cd750b54fcd0dcb6e894f0677f27c58 | 是否完善门店信息 | if (StringUtils.isBlank(mOpenStore1Activity.mEtCompanyName.getText())) {
return true;
} else if (StringUtils.isBlank(mOpenStore1Activity.mEtAddress.getText())) {
return true;
} else if (StringUtils.isBlank(mOpenStore1Activity.mTvArea.getText())) {
return true;... | 1 |
8338958502f1ba070c860cb7fc3af0da | 15780f9bf01d9f9e5a59a6bb22a1bdd2 | Called when a friend goes offline | namespace GGTalk
public partial class ChatForm : BaseForm, IManagedForm<string>, IChatForm
private void FriendOffline()
{
this.OnFriendInfoChanged(this.currentFriend);
this.OnOffline(false);
} | 1 |
90742746937f0cad5506e6a2bb3433df | 4a0e5d4d43fc3a1c4749fde1f2e592c0 | Initilize the current state of APF. Setup the callbacks and monitors necessary for automated telescope operation. | self.test = test
self.task = task
self.cloudObsNum = 1
self.rising = self.sunRising()
self.wx.monitor()
self.wx.callback(windmon)
self.altwx.monitor()
self.altwx.callback(altwindmon)
self.ok2open.monitor()
self.ok2open.callback(okmon)
... | 1 |
aeb5ed97626b6534dff4242f90d4e924 | 152e2e4c6e22aecd9e6d59dbad759381 | 查询获奖用户 | public List<KactivityUser> selectWinner(); | 1 |
c58a4cc42930f975ff9cc580466959d6 | 1046437498a57d22d7f0203bcabf9162 | First, write a function to remove the annoying borders around matplotlib plots | def setup_graph_plot(**kwargs):
fig, ax = plt.subplots(1,1, **kwargs)
ax.tick_params(left=False, bottom=False, labelleft=False, labelbottom=False)
ax.set_aspect(1)
ax.set_frame_on(False)
return fig, ax | 1 |
60deb98aa6f01b0720ce088540f1bf41 | 6f243653366e7325db5740641bed2c53 | Create producer methods for each ClaimValue injection site | MembersInjectionBinding binding,
ImmutableMap<BindingKey, FieldSpec> dependencyFields,
InjectionSite injectionSite) {
return CodeBlock.of(
injectionSite.element().getKind().isField() ? "$L.$L = $L;" : "$L.$L($L);",
getInstanceCodeBlockWithPotentialCast(
injectionSite.el... | 0 |
ea1b68cc878597541aa9286300d3d274 | 5f6fba4ce65fd26caa839572327b8d4d | Assign industry groupings based on NAICS codes | naics_col_mask = [re.match(r'(NAICS)', x) for x in census_data.columns]
naics_col_mask = [1 if x is None else 0 for x in naics_col_mask]
naics_col = np.ma.array(census_data.columns, mask=naics_col_mask)
naics_col = naics_col.compressed()[0]
return naics_col | 0 |
ec4e12bda84cdc04ef13cec4079b5eea | be2e5e190698ad90587f861e39c87a83 | @brief Subtracts numbers contained with an array of strings | {
foreach ($arr_second as $key => $value)
{
foreach ($value as $k => $v)
{
$arr_first[$key][$k] = (isset($arr_first[$key][$k]) ? $arr_first[$key][$k] : 0) - $v;
}
}
return $arr_first;
} | 0 |
d86613c36e3745afe092e0da41d27819 | a340dc69ed8dec3979520e859dae3d72 | IMEのプロパティやUIサーバーのウィンドウクラス名を格納する。 | {
CVariant cvValue;
cvValue.Set ( DMIEVENT_CLASS );
Class.Create( m_pWbem, cvValue , pICtx );
Class.AddProperty( COMPONENT_ID, VT_I4, READ_ONLY);
Class.AddProperty( EVENT_TIME, VT_BSTR, READ_ONLY);
cvValue.Set(VARIANT_TRUE);
Class.AddPropertyQualifier( EVENT_TIME, KEY_QUALIFIER_STR, cvValue);
Class.AddProperty... | 0 |
be94300fba06dbc5eb1218cf23a94c5d | 3a4b7aadc7f2a1f1c2ec55303d94682c | Convert A sorted linkedlist into binary tree | def flatten(node, nodes):
if node == None:
return
flatten(node.left, nodes)
nodes.append(node)
flatten(node.right, nodes)
def buildTreeFromSortedList(nodes, start, end):
if start > end:
return None
mi... | 0 |
d69e8082e94adaf295bd1529b70691da | a21b0d70d4164c19bfb0d4cd10e33eee | getOidCidade()
Retorna OID da Cidade | class Cliente extends \yii\db\ActiveRecord
public function getIdCidade0()
{
return $this->hasOne(Cidade::className(), ['id' => 'idCidade']);
} | 0 |
3e2d637f76951d2c4f5fc534e7296e4e | f5c462b8b0c6ea9f7a00b9d2ec1281b2 | Sets the total issued units. | public class MarketIfTouchedOrder implements Order
public MarketIfTouchedOrder setUnits(BigDecimal units) {
this.units = new DecimalNumber(units);
return this;
} | 1 |
3eaa310cbc2183a81f3db2b4c3963182 | fa32a534cf5c65af15d438d5c9f4a2dc | 基底クラスで定義されているものと同名のメソッドを派生クラスで定義することを
「メソッドをオーバーライド(上書き)する」という | public class AccessMethod03 extends AccessMethod01
public void callOverrideMethod()
{
super.fly();
} | 0 |
3ed79ed1fba3dc3e41e1c2fb6e9f97d3 | cbd7396b9597c9b12174987a3f5512d8 | 把指定文件从assets文件夹下文件拷贝到sd卡的指定目录下(私有目录的docuemnt下)
<p>
若目标目录不存在,则新建 | public class MainActivity extends Activity implements View.OnClickListener, SpeechSynthesizerListener
private void copyFromAssetsToSdcard(boolean isCover, String source, String dest) {
File file = new File(dest);
if (isCover || (!isCover && !file.exists())) {
InputStream is = null;
... | 0 |
b38531c8f19f3fa39bcbdabd34a3aabe | f62b8c116b748be5de3e1459780e64e1 | 測試回傳黑名單操作紀錄 | class TestAdd(unittest.TestCase):
def test_history(self):
self.cl.save_history(self.cl.filter_blacklist(self.posts))
with open(self.cl.history_filename) as f:
content = []
for line in f.readlines():
content.append(line.strip())
self.assertEqual(content, ['... | 1 |
76cfe9e214df2133e29ee70d3d1069d8 | 5084cbb41cf7fe33af96179d26e0f40f | Extra parameters for VLD instantiation | class yc_vnf_nst__nst_netslice_subnet_instantiation_parameters_vnf(PybindBase):
def _get_internal_vld(self):
return self.__internal_vld | 0 |
f5c462cf26795f354933c271ee44efee | daf3e28bdd36e6335c7c1ae35dc4d225 | @brief handler of Gui_Demo | MainWindow::~MainWindow()
{
DemoExit(¶m);
delete ui;
} | 0 |
07ea747101e0db0d30ceacf43b3f36eb | 82fc7c8e3e5f1778fd090640a2b4f115 | Return true if the target volume is backed by RAM. | int fs_memorybacked(const struct statfs *sfs){
#ifdef LIB_COMPAT_FREEBSD
const char *types[] = { BASIC_TMPFS, "mfs", 0 },*t;
for(t = *types ; *t ; ++t){
if(strcmp(sfs->f_fstypename,*types) == 0){
return 1;
}
}
nag("Filesystem type %s is not memory-backed\n",sfs->f_fstypename);
#else
#ifdef LIB_COMPAT_LINUX
... | 1 |
e9d7ace564500f5b9a8db2963edfa65c | f0f4e09f159e1be2ce600410fbd9c9a3 | 关闭对应的job | public JobDetailFactoryBean closeConnectJobBean() {
JobDetailFactoryBean jobDetailFactoryBean = new JobDetailFactoryBean();
jobDetailFactoryBean.setApplicationContextJobDataKey("context");
jobDetailFactoryBean.setJobClass(CloseConnectJob.class);
jobDetailFactoryBean.setDurability(tru... | 0 |
e81fd76174c3100e5db0ec82210310f7 | 3e99eee2cb8c226df5e52a9fec1989ec | Gets the respiratory rate value. | public class Patient implements Comparable<Patient>
public int getRR()
{
return RR;
} | 1 |
86415ea9e4dfa5f066357dd25aea207e | 4a45a5cc03a09be5eeaa82e996b3d24c | 以指定精度,对指定双精度浮点型数值转换为百分号形式 | public class NumUtil
public static String doubleToPercent(Double dou, int num) {
NumberFormat nf = NumberFormat.getPercentInstance();
nf.setMaximumFractionDigits(num);
return nf.format(dou);
} | 1 |
4e8fcda78344efa0e8853002d0eaf9f6 | 84e2df2a224127c3ee8d4daf77780efa | Interaction layer task for Tx by CAN 1 | void CAN2_TX1_IRQHandler(void)
{
} | 0 |
89257190b62d433d735728d74bb4cb08 | 55e4d333eb0017eab647df90964fe96f | store a bundle of parameters into a iovec, which is going to be passed
into dbtree operations as a compound value (data buffer address, or ZC
buffer mmid, checksum etc). | sendFrame_t* const send_frame)
{
fh_init(&send_frame->fh);
pdh_init(&send_frame->pdh);
psh_init(&send_frame->psh);
struct iovec* iovec = send_frame->iovec;
iovec[IOVEC_FH].iov_base = fh_get_buf(&send_frame->fh);
iovec[IOVEC_FH].iov_len = fh_get_length();
iovec[IOVEC_PDH].iov_base = p... | 1 |
f4a8cf5f540a96e99efae72b487883a4 | 95d7513c994b95b51709f55fc934655f | 获取“文档评论列表每页展示条数” | class GpPost extends Model
public function getPageSize()
{
return $this->getConfigs('pagesize');
} | 1 |
2ea4eb4c47d8e9bb8e506539d4f23263 | 7a479f617d8271b889089158a140170a | ● 重新读取参数 | {
int32 lTemp;
STMFLASH_Read(ADDR_FLASH_SECTOR_6,(Uint32*)&stParaList.lBuffer[0],(SETPARA_NUM + 1));
CRC->CR |= 0x1;
lTemp = CRC_CalcBlockCRC((Uint32*)&stParaList.lBuffer[0], SETPARA_NUM);
if(lTemp != stParaList.lBuffer[SETPARA_NUM])
{
if (stParaList.lBuffer[SETPARA_NUM] != 0xFFFFFFFF)
{
}
ParaReadDef... | 1 |
0568fe7f9e08ea128095d4e545a21cc8 | 38292b6ce2345bda8cbf9e7277270085 | Testa a listagem vazia de backups. | public void testRestoreObjectsEmptyList()
{
S3FileTransferRequestParamsDto s3FileTransferRequestParamsDto = s3DaoTestHelper.getTestS3FileTransferRequestParamsDto();
s3FileTransferRequestParamsDto.setFiles(new ArrayList<>());
s3Dao.restoreObjects(s3FileTransferRequestParamsDto, 0, ARCHIVE... | 1 |
2f6c378b52e581c45e9d3cef2a701cdf | c01dd10e7bd14ca0f2b984baa0f8d820 | 获取有线的IP地址 | def getip():
ip='''/sbin/ifconfig | awk '/inet addr:/{print substr($2,6)}' | grep -E "''' + share.regex_str.regex_IntranetIP + '''" '''
ret,reterr = get_output(ip)
return ret[:-1] | 1 |
7914db8d61780aa4c943727074a2406e | a17833166178e633c7cd6ea4c63d2141 | Adds new IHAVE messages to pending gossip | public class TracksClient
public void sendIHaves() throws IOException {
IHave ihave = new IHave(store.getHash());
for (int remotePort : remotePorts) {
if (remotePort != port) {
sendMessage(ihave, remotePort);
}
}
} | 0 |
d395529fe52002f641677b5b89c6f12a | fa845c5de9f7f72c07c8dd7910ea9ef5 | Get the view state value from the given XML response. | if (state.equalsIgnoreCase(Constants.STATE_VALID)) {
return true;
} else if(state.equalsIgnoreCase(Constants.STATE_INVALID)) {
return false;
}
return null;
} | 0 |
a0c743e4a2e260b762e273d7e11510e2 | 76a169f51312c43133cbc21533fb470f | 소셜 공유를 위한 메타 태그 값 | var twDescription = "";
var fbDescription = "";
var ogURL = "";
var device = "PC";
if (os == "ios" || os == "android") device = "SP";
$("head meta").each(function() {
var _this = $(this);
if (_this.attr("name") == "twitter:description") {
twDescription =... | 1 |
67e1ae3c70b40042566d6450516c890d | 39a9cd02e8cefe2b4fd1ec4629ed619c | Show / hide add new question form | export class QuestionComponent implements OnInit
toggleHidden() {
this.hidden = !this.hidden;
} | 1 |
db4c7bc5ece68d7a02965a0b4f29ca44 | 58192ad1166e4affeed65b5cbdc7e0d5 | Builds the panel which contains the OK and cancel buttons | class prefs_dialog (Toplevel):
def build_okcancel (self):
self.okcancel_box = Frame (self)
self.ok_button = Button (self.okcancel_box, text = "OK", command = self.ok, default = ACTIVE)
self.ok_button.pack (side = LEFT)
self.cancel_button = Button (self.okcancel_box, text = "Cancel", command = self.cancel)
sel... | 1 |
a98bad1ad7a83b7888465ae629c8ef9b | c62acfed5573d53b06c12a7b28316755 | 计算该DNA串中逆序数之和 | def calculat_inverse(arr):
inverse_sum = 0
n = len(arr)
m = n ** 2 - 1
for i in range(n ** 2):
temp = [k + 1 for k in range(i, m - 1)]
for j in temp:
if arr[int(j / n), j % n] == 0:
continue
elif arr[int(i / n), i % n] > arr[int(j / n), j % n]:
... | 0 |
5c6338b7eb41561a39d629189eebc715 | cfa4d7726954d48ed7ebae5429b2d4fb | 通过UserID更新银行信息 | namespace BLL.other.Company
public class SetParametersBLL
public static int UpdMemberBankByID(MemberBankModel memberBank)
{
return MemberBankDAL.UpdMemberBankByID(memberBank);
} | 0 |
eaedc387fadd3bb30f800bca3a70a590 | 69da729a8afe56684eecf3c7aa79ebe5 | Add the database information provided to their respective caches. | if (m_connectionsCache.find(database) != m_connectionsCache.end()) {
syslog(LOG_INFO, "%s already in cache", database.c_str());
return true;
}
if (m_databasePlugins.find(database) == m_databasePlugins.end()) {
syslog(LOG_ERR, "%s has no plugin loaded", database.c_str());
retu... | 1 |
0e62aa72265d521cb5c7c6620510f52c | 551e5fe98bf9949e74287272f86081f7 | adds a word at the beginning of the list | void linkedList::addNodeAtBeginning(string s){
ListNode *newNode = new ListNode;
newNode->data = s;
newNode->next = head;
head = newNode;
} | 1 |
dabf02923bb7983ef5eef83c72f8aa46 | ea13af52773c9dbe5383a5b34f945661 | RetryBuild retries the build with the given ID and returns the new build. | class ApifyClient:
def build(self, build_id: str) -> BuildClient:
return BuildClient(resource_id=build_id, **self._options()) | 0 |
10512492b1d64f0053f6c45e06b62c7d | 34e19caf1cb3964831d66202751e8c62 | Step 2 (Welcome page) form submit handler responsible for creation of warehouse | function addWarehouse() {
if (!_warehouseForm.valid()) {
return;
}
_warehouseForm.submit();
} | 1 |
f93b8e202553fe75f1fad5d518c98639 | 97eda2f3f27c64063a4cb1f1c01f2816 | test edit fails w/ non existent actor_id | id = 10
res = self.client().patch('/actors/'+str(id), json={"name": "Omar"}, headers={'Authorization': 'Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InVRMHVTRG1qekpXWGgxWVNDalZEbiJ9.eyJpc3MiOiJodHRwczovL2ZzbmRvbWFyLnVzLmF1dGgwLmNvbS8iLCJzdWIiOiJhdXRoMHw2MDA4OTJjZWZmY2JlMjAwNmE4ODFhOWMiLCJhdWQiOi... | 0 |
6549c110b9c1afa4e7e3ebeb36eb77aa | 1783ea4f715e71e82801af0e5ce5bee6 | Constructor method for GetEffectiveRights | class MtcPermissions extends Generic
public function __construct()
{
parent::__construct('BaseMtc_permissions');
} | 0 |
7b61569710683be51f90a3c87679d0b3 | ba86a136678085b1eccbf5f0bc2c1d80 | 容器滚动到底部 | function ScrollToBottom(container: HTMLElement, duration: number) {
const top = container.scrollHeight;
return ScrollYTo(container, top, duration);
} | 1 |
61afee753159c0dd13a5b37799277ae3 | 12610eab8580fa27498d4bc460b0ee8a | リクエストパラメータに主キーが含まれる場合はエラーにする | {
switch (true) {
case (!isset($this->param["id"])):
$this->back(1002);
return false;
}
return true;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.