query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
179930eeb4c6963b396a79ff025a694a | e70803194403ebbde0a8a262d0e1d326 | 查询用户某个账期内结算账单, 默认返回所有
https://help.aliyun.com/document_detail/100392.html?spm=a2c4g.11186623.6.591.24bd256406Dfsh | public class BillingClient extends JdcloudClient
public QueryConsumeRecordsResponse queryConsumeRecords(QueryConsumeRecordsRequest request) throws JdcloudSdkException {
return new QueryConsumeRecordsExecutor().client(this).execute(request);
} | 0 |
90e66ca5cc723f96056e2958d99d5676 | 1739d1f378cdcd500b51520031e23133 | mark a particular parameter as being explorable only for a subset
of the possible values of another.
For example given parameter 'appendage type' which might have
value 'foot' or 'flipper', a dependent parameter might be 'shoe type'
which only makes sense for 'feet'. More to the point we use this
for 'layers' and 'fiel... | class BudgetForm(forms.ModelForm):
def dependent(self, field1, field2, value=None):
cd = self.cleaned_data
if cd.get(field1) == value and not cd.get(field2):
self.add_error(field2, "Required field")
elif cd.get(field1) != value:
cd[field2] = None | 1 |
c66fe9aba92dea9a43dd4ca03b8bbf1f | 1329eb4d2820a3c96eb61f8edce506ca | This function returns the names of regex groups as a list with the outward name first
and the inward name second.
Need to retrieve names from individual compiled regexes and add names to list one at a
time. If retrieve group names from complete regex in one go then the resulting
dictionary will contain names in unpredi... | def phjGetPostcodeRegexGroupNamesList(phjPrintResults = False):
postcodeOutwardRegex, postcodeInwardRegex = phjUKPostcodeRegexDefinition(phjPrintResults = False)
postcodeOutwardRegex = re.compile(postcodeOutwardRegex,flags = re.I|re.X)
postcodeOutwardRegexList = [k for k in postcodeOutwardRegex.groupindex.k... | 1 |
7cefd10131db06db34acfcd944386a6b | 48bd49cac62158cb6870e5f84bf4e8da | 绘制直线,使用默认的颜色、线宽和线段端点样式 | {
DoubleCollection dCollection = new DoubleCollection();
dCollection.Add(2);
dCollection.Add(3);
LineGeometry myLineGeometry = new LineGeometry();
myLineGeometry.StartPoint = startPt;
myLineGeometry.EndPoint = endPt;
Path myPath... | 0 |
b447075460c341f53fcb374695a7071a | 6dd4755c3175f97fc682732a7392e562 | ロングエントリー関数 | def short_entry(flag):
if flag["sell_signal"] == 0 and check_gc():
flag["sell_signal"] = 1
log = "ゴールデンクロス確認\n"
flag["records"]["log"].append(log)
elif flag["sell_signal"] == 1 and check_gc() and check_candle("sell"):
flag["sell_signal"] = 2
log = "ゴールデンクロス時、陰線確認\n"
... | 0 |
a857fd9c1eba45f81c68c8b6c3a8cccb | c9ce9005eef7ffc4ec2cc28f214aeadc | 实现基类的CreateLog方法 | namespace MCS.Library.SOA.DataObjects.Security.SyncLibrary
[Serializable]
[ORTableMapping("SC.IncomeSynchronizeLog")]
public class SqlIncomeSyncLog
public static SqlIncomeSyncLog CreateLogFromEnvironment()
{
SqlIncomeSyncLog log = new SqlIncomeSyncLog();
log.CreateTime = SCAc... | 0 |
43d52fa430f7cf2d88cb1b07c765f184 | 8f55d768dd3dcef2e0e7fa41634b828d | 所有链接的跳转,重定向全部由原生接管 | function native_jump(page, url) {
return native_listen('to_jump', {
page: page,
url: url
});
} | 1 |
5dbd918ec1f80287f8f7c536e0911909 | 35f55a067177dad4702af32d9642e292 | 单元格扩展。 | var self = this;
gridOpts.toolbarEx = [{
eName:"linkbutton",plain:true,
text:"新增",iconCls:"icon-add",
onClick:function(){
var row = {unitId:unitId};
gridEdit.call(self,"新增",row);
}
}];
} | 0 |
9fbaa49611e456cc91db9391ee587e1e | 5c9caaf9fda35cebb2e4969ec4e3de54 | Увеличивает зарплату сотрудника на заданное значение | class Employee:
def raise_salary(self, byPercent:float)->None:
self.__salary = self.__salary + self.__salary * byPercent / 100 | 1 |
e0270a554e8c59ba70c14c0b8ae82dbf | 0146858a0c20cb628c31e31db6689dd1 | 線分の白の割合を調べる | class FeatureLeftLinerity implements FeatureEvaluater
public float evaluate( BufferedImage image )
{
int height = image.getHeight();
int width = image.getWidth();
left_x = new int[ height ];
for ( int y=0; y<height; y++ )
{
left_x[ y ] = -1;
for ( int x=0; x<width; x++ )
{
int color = image... | 0 |
74d08fd413b324a44e885e36d23c6a7e | 36687863192acdf8362db6365fe20a9b | Gets page number of word. Returns String. | def getPageNum(page):
pattern = re.compile(
r"table width=\"100%\" .*?onfocus=\"this.value='';\" onblur=\"this.value='1/(\d+)'\" onkeydown=\"javascript",
re.S)
pageNum = re.findall(pattern, page)[0]
return int(pageNum) | 0 |
c85e4664b8f36f37d87a5f21699aa64c | 6866c1dbcd506625d0b45cf386aef485 | 获取回流数
通过短链转换服务转换分享内容中的链接后,每一次点击这条短链,就算是一次回流。 | @Table(name = "net_index_repeat_arrow")
public class NetIndexRepeatArrow
public Integer getScCount() {
return scCount;
} | 0 |
a52201ecbfb89e036b85f1311d7f6e8a | c629e924ac2fd607aff273f6d6e7539a | 剔除次新股 | def filter_st_stock(stock_list):
return [stock for stock in stock_list
if not is_st_stock(stock)
and 'ST' not in instruments(stock).special_type
and '*' not in instruments(stock).special_type
and '退' not in instruments(stock).symbol] | 0 |
ed66ed1dc5a8460a17e17a3cabf40d80 | 24eddfb8bc33444a4075dff55bce4be8 | Here we want to find the merkle tree hash of all the file hashes passed to this function. Note we are going to use recursion to solve this problem. | {
var hashedTransactions = transactions.Select(t => GetHash(GetHash($"{t.FromAgent}{t.ToAgent}{t.Amount}")));
return GetHashByMerkleTree(hashedTransactions.ToArray());
} | 0 |
801297febbc6608cf5128e28e9e1d735 | dee28ef73ed6cc0c853afdb7ddf2df18 | 清空爬取日志 | namespace Jurassic.So.SpiderTool.Controllers
public class TaskLogController : BaseController
public ActionResult Clear()
{
taskLogInfoService.ClearTaskLog();
return Json(new { success = true }, JsonRequestBehavior.AllowGet);
} | 1 |
bc2845de229cf69c313633040647794c | 2e37e0a0ddcef360e95ca8a5d5f20a04 | @brief USART 2 TX vector
This function handles the transmit complete interrupt | {
if(UART_MODX_2_initVar != 0u)
{
UART_MODX_2_PutChar(txDataByte);
UART_MODX_2_PutChar(0x0Du);
UART_MODX_2_PutChar(0x0Au);
}
} | 0 |
419313784ddb37b1ef0de507c98b1a3e | 47737da493dee16d8a72e64cd519edcb | |-------------------------------------------------------------------------------
| Get Projects By Team Id
|-------------------------------------------------------------------------------
| Description: Get Projects By Team Id | export class ProjectListComponent implements OnInit, OnChanges
x_getProjects(team_id) {
this._projectsService.x_getProjects(team_id)
.subscribe(res => {
this.projects = [];
if (res.success) {
this.projects = res.data;
}
});
} | 1 |
eb000735a11cc18573721c00578c89ed | 9907157870c0a967561801422da44b27 | signal ReadWait,在写线程发现之前队列为空,会尝试唤醒等待的读线程.(只有写线程会调用) | pthread_mutex_lock(&mutex);
r_wait_count++;
while(r_count == -1 || msg_avail == 0) {
pthread_cond_wait(&read_phase, &mutex);
}
r_wait_count--;
r_count++;
pthread_mutex_unlock(&mutex);
} | 0 |
3dac2c6e07b44b3cac422e3b6053c7f8 | 0923dd890f2e4fae050623b4197a8fd1 | Returns the HTTP client in use for interacting with the Travis API. | public function getHttpClient(): HttpClient; | 1 |
4f3adc0ed61e26dc5fdf87d3ce668b02 | 15c629e8454511af81d6045e26b5c015 | 备份DNA链 | def consensus():
synchronous()
longest_chain = chain.copy()
othernodeschains = find_new_chains()
for i in range(len(longest_chain)):
chainss = {
'index': str(longest_chain[i].index),
'timestamp': str(longest_chain[i].timestamp),
'data': str(longest_chain[i].da... | 0 |
f77b9749ab849962f6a8f6083a5969fa | efd224259d74b73d31a8ef90a829386a | 値を変更ボタンクリックイベント | public class ButtonEdit extends ModelButton{
@Override
synchronized public void buttonEvent(){
if(this.mainFrame.getFrameState()==MainFrame.STATE_EDIT_VALUE){
ControlStore.getInstance().getExecutor().executeCommand(IDCommand.EDIT_AEC);
}
} | 1 |
2a6acd4b0a9e8fc3ef7bff1bcf9195a6 | c6dd534fb5359a1b9dcfd085642fba27 | Test nested template specialization plus operator. | template = (
assign('mytag', Tag('mytag')),
mytag(feature='foo')[
'hello, from mytag',
Tag('explicit')(feature='bar')[
'hello from explicit tag'
]
]
)
actual = flatten(template)
self.a... | 1 |
4f376ca6e8ec1bba714ead5ec66c6552 | 4fad9c2bab3068887b77e75baa2e89fd | 下载导入学生管理数据模板 | @RequestMapping(value = "import/template")
public String importFileTemplate(HttpServletResponse response, RedirectAttributes redirectAttributes) {
try {
String fileName = "学生信息数据导入模板.xlsx";
List<Student> list = Lists.newArrayList();
new ExportExcel("学生信息数据", Student.class, 2).setDataList(list).write(... | 1 |
9e73eb8e2acefacdc58c25fbf2885881 | 3693ea8d9c41453e0e1461a1e91ed160 | Cuando el usuario hace click en aceptar expulsamos la boleta. | {
int estadoActual = Convert.ToInt32(datosDeAsignacionDeBecario[0][3]);
int nuevoEstado;
if (estadoActual == 2)
{
nuevoEstado = 4;
}
else
{
nuevoEstado = 1;
}
string mensajeResultado = controladoraAsignaciones.actualizarEst... | 0 |
ad3532a9b2d1f079dcf253b8b11ef36b | 45c4bb6370bfc135f100720bc3f34ff3 | Test when we observe a bad temperature token. | config_entry = await _setup_climate_test(hass)
state = await _patch_spa_settemp(hass, config_entry, 0, 100.0)
assert state.attributes.get(ATTR_TEMPERATURE) == 38.0 | 0 |
b8d0735c1314a1f4daa66c8858a88611 | 51f799024de3cbb6e2f74c62167d011d | Replenishes the hand of the current player. | {
var freeSlotIndex = player.Hand.GetFirstFreeSlotIndex();
while (freeSlotIndex >= 0 && Deck.HasPieces())
{
char? newPiece = DeckController.DrawPiece();
player.Hand.Pieces[freeSlotIndex] = newPiece;
freeSlotIndex = player.Hand.G... | 1 |
e698023f6f871ce970034aafd1defd65 | c1be833760db1da382ed94cf81b2ab9b | 穴にキャラクターをアタッチする. | {
this.shoji_object = shoji;
if(this.shoji_object != null) {
this.shoji_object.transform.parent = this.gameObject.transform;
this.shoji_object.transform.localPosition = new Vector3( SHUTTER_POSITION_OPEN_X, 0.0f, SHUTTER_POSITION_Z);
}
} | 0 |
2414da3fbb83a2e18c3b095fc7bc69fc | 982ae3ce9a714bd653b8b8596f10aed4 | Return a unique integer identifier for this toolbar type. | class ExoToolbarItem extends ConfigEntityBase implements ExoToolbarItemInterface, EntityWithPluginCollectionInterface, ExoVisibilityEntityInterface
public function getToolbarId() {
return $this->toolbar;
} | 0 |
319fbb7686a777e63337045d6b8f1156 | 2b0aad02f53240777007317a5b85fa3a | 以新对象的形式,返回一个输入对象的解码版本(RAW编码)
如果对象已经是RAW编码,那么对输入对象的引用记数增1
然后返回输入对象 | ByteBuffer buffer = ByteBuffer.allocate(_defaultByteSize);
ByteBufferOutputStream outStream = new ByteBufferOutputStream(buffer);
Output out = new Output(outStream);
_kryoMap.get().register(c);
_kryoMap.get().writeObject(out, targetObj);
LoggerUtils.logger.finest("outStream position:" + out.position());
... | 0 |
6a23c874e0e73fb3f68fc7a2cc039ae1 | 43145463e65139c53db358ade5bd0326 | 使用token值的方式进行登录 | async function loginByToken(
token: string,
os = '',
browser = '',
environment = '',
) {
const [err, user] = await fetch(
'loginByToken',
{
token,
os,
browser,
environment,
},
{ toast: false },
);
if (err) {
... | 1 |
5b5e78551a75746a81d0acabd97a92be | fc9a015f4ce9b75a1e459f504548b904 | 根据歌曲名称模糊查询 | public Object singerOfName(HttpServletRequest request){
String name = request.getParameter("name").trim();
return singerService.singerOfName("%"+name+"%");
} | 0 |
d434c7322b3bd6578e7590229729a79a | f919b957968f051481e48ec297a2519d | Returns the meta object for class '{@link org.xtext.example.pascal.Factor <em>Factor</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getFactor_FactorType(); | 0 |
6d7d45ab5561c83fc590ab4024a3939b | fd09f51f4f2545c9aee9dc82ddf9352d | 指定页面区域内容导入Word | {
string des = "";
_Application appWord = new Microsoft.Office.Interop.Word.Application();
object template = Missing.Value;
object newTemplate = Missing.Value;
object docType = Missing.Value;
object visible = true;
Document doc ... | 0 |
b6f923195d71752bb4395eff863bfcf2 | 625fdb48261efcc0a9c4d3866499c985 | Scroll the terminal X lines. | PHP_FUNCTION(ncurses_scrl)
{
zend_long intarg;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &intarg) == FAILURE) {
return;
}
IS_NCURSES_INITIALIZED();
RETURN_LONG(scrl(intarg));
} | 1 |
af34a913aed14d9d1c72299ac56b83cf | 78092c60142011f812226ecbe8812477 | Funcion que carga los controles iniciales en el grid con todos los colores que tengamos disponibles | for (int i = 0; i < agregar.getTxt().length; i++) {
agregar.getTxt()[i].setText(agregar.getFields()[i]);
agregar.getTxt()[i].setForeground(Color.gray);
}
for (int i = 0; i < agregar.getCmb().length; i++) {
agregar.getCmb()[i].setSelectedIndex(0);
}
} | 0 |
b249d8e2d1fd9f38c0ce41386c83f7d1 | d37d0927b58cff2a02fe20037c76cd42 | 请求航班列表数据 | class Table extends React.Component{
refreshAirportsList( res ){
if( $(".dialog-container").length <= 0 ){
const { updateTableDatas, updateGenerateInfo, updateGenerateTime, orderBy, updateTableConditionScrollId, autoScroll, updateTableConditionRange, updateTableConditionScroll, dataRange } = this.pr... | 1 |
24fab10f42e5e5d4cd536cad27668465 | 8f3548d80d6bcbf03bbbd76a0667c975 | 转换为CategoryDO | CmsCategoryDto categoryDto=new CmsCategoryDto();
categoryDto.setId(category.getId());
categoryDto.setCoverimg(category.getCoverimg());
categoryDto.setCreatetime(DateUtil.date2Str(category.getCreatetime(), "yyyy-MM-dd HH:mm:ss"));
categoryDto.setIntro(category.getIntro());
categoryDto.setName(category.getNam... | 0 |
057bb0fd1a8c2bfd7f45ad5d13fb2220 | 28e74c8cac943edb30eab7cdad0f7d0a | Returns whether the blockade is still active | bool IsBlocked(); | 1 |
38e14a8628ce651308eb38a769f3290e | 93ec314e7f82a879e4e98c3f40ca43a8 | Getter for the "SessionWSMethodTotalRequests" variable. | public Long getSessionWSMethodTotalRequests() throws SnmpStatusException; | 1 |
4ba02d88bf40d562625fef0bebabf3d1 | 25d8296687e4c279f9ef934e0666f6f6 | Callback function for LE scan results | {
ret_code_t err_code;
switch(p_scan_evt->scan_evt_id)
{
case NRF_BLE_SCAN_EVT_CONNECTING_ERROR:
{
err_code = p_scan_evt->params.connecting_err.err_code;
APP_ERROR_CHECK(err_code);
} break;
case NRF_BLE_SCAN_EVT_CONNECTED:
{
... | 1 |
9561c62e9b89d78439340d7f9dcdaadb | 194e0c638b017d8f934bb8493d1b8ab9 | Renders matplotlib"s figure to tensor. | fig.canvas.draw()
buf = fig.canvas.tostring_rgb()
ncols, nrows = fig.canvas.get_width_height()
return np.fromstring(buf, dtype=np.uint8).reshape(nrows, ncols, 3) | 1 |
cb69d6b488d490d384e033f76f4c45cc | 939d5f727a69404579a1c8f756853a8a | Writes a used block entry to an index file | {
DEBUG("Free block of index %u in SB at $%.8x\n", index, (uint32_t)self);
uint32_t i = index >> 5, j = 31 - (index & 0x1F), lastblk = sb_get_blocks(self);
I(index < lastblk);
I((self->bitmap[i] & (1 << j)) == 0);
self->fblkcnt++;
self->bitmap[i] |= (1 << j);
} | 0 |
62dd8f638818468f48e90dad4ab8247f | 4da6856162b97dd3706e12e49f8a3dc7 | 发送数据到共享内存 | static int data_to_server(share_use *share_stuff)
{
int count = 0;
int i = 0;
int mode[Share_Buff_Max] = {0};
for( ; i<Share_Buff_Max ; i++){
mode[i] = share_stuff->codebuf[i];
}
struct json_object *send = send_data_json_packup(mode,share_stuff);
char *json1 = json_object_to_json_string(send);
count = send_da... | 0 |
7e3712366682f8ab2e7dd24469ff7303 | 8cc1ca216bc8962c6ddb8a4b944082c4 | Changes the scan mode to the input paramter | export class ScanAutoConfigComponent
public setScanMode(type: number): void {
this.scanMode = type;
} | 1 |
82d04ac3f536feab963c80932e1216e2 | babfc3c37e761aa65d7a5676a3763996 | Stop media discovery.<br>
\see libvlc_media_discoverer_start<br>
\version LibVLC 3.0.0 or later<br>
<i>native declaration : line 4053</i> | public class BluetoothManager
public native boolean stopDiscovery(); | 0 |
eb4e12d2f43a2e386a258272720e6d8d | b76368309d1b9dfaeaa023dbc4cfdf05 | BORRANDO COMENTARIO | string pre_processamento::Remover_Comentarios(string frase)
{
size_t achou = frase.find_first_of(";");
if (achou != string::npos)
{
frase = frase.substr(0, achou);
return(frase);
}
else
return(frase);
} | 1 |
db4bb4e2195a6039edf4cf34b8bfe4c5 | 66b60aae4a0d8e818a49d6744fb90996 | @brief Operator subtracting a long number from the current number. | {
swrd_t dif;
udig_t u;
udig_t ba;
size_t i;
int ret = VLONG_SUCCESS;
if (b == 0) return ret;
if (a.nu == 0) return SetValue(-b);
if ((a.s == MP_NEG && b>0) || (a.s == MP_ZPOS && b<0)) return Add(a, -b);
if (b > 0)
ba = (udig_t) b;
else
ba = (udig_t) -b;
if (n... | 1 |
b4bf8e57fe504b9391511413be504bfc | c7cce77124bde6e585e5cc1cf5b26bd8 | Assert that 2 filenames are the same using cross platform paths. | def assert_files_equal(a, b):
assert os.path.exists(b)
with open(a, encoding="utf-8") as f:
a_txt = f.read()
with open(b, encoding="utf-8") as f:
b_txt = f.read()
assert a_txt == b_txt | 0 |
6d8d84e9013b651c3224ef832ce81981 | 21c6d9687b92a59bbd7e481431e921f4 | Get custom field option
Returns a custom field option. For example, an option in a select list. Note that this operation **only works for issue field select list options created in Jira or using operations from the [Issue custom field options](#api-group-Issue-custom-field-options) resource**, it cannot be used with i... | public class IssueCustomFieldOptionsAppsApi
public Completable replaceIssueFieldOption(
String fieldKey, Long optionId, Optional<Long> replaceWith, Optional<String> jql, Optional<RestRequestEnhancer> restRequestEnhancer) {
RestRequest.Builder requestBuilder = RestRequest.builder()
.method(HttpMethod.DEL... | 0 |
ceec5c21488c2294a56a2fd8004262ed | 460bf6533efa91618e74fd8521421f45 | Reindex the atom numbers of the segment. Indexing starts from
the optional `start` value, which defaults to 1. | public function sliceNameAtoms($index, $length = null); | 0 |
0cf2611450abb3fdce9b4a9b8ef5c6c1 | 7cdbb6ee526e48b2b14b0800f432325f | Sets the values to something that contains the bounds passed in, but
which uses numbers rounded for better display. It returns a recommended
step to use between intervals. | class TimeLocator(Locator):
def tick_values(self, vmin, vmax):
vmin, vmax = sorted((vmin, vmax))
d = vmax - vmin
scale = time2human(d, dec_lim = 0.1 * self._n)
v, unit = th.split_unit(scale, num_val = True)
u = th.unit2scale(unit)
f = 1
while round(v) != v or v < ... | 1 |
46e1b4c54f602ec7d895eb97f998415b | 49d75cd6e70792d9234806dd5735435e | Creates a random file name and checks it doesn’t exists. | def try_open_file(target_dir, basename=None):
flags = os.O_CREAT | os.O_EXCL | os.O_WRONLY
if not basename:
basename = ''
basename = scramble_name(str(random.randint(0, sys.maxsize)) + basename)
dest = os.path.join(target_dir, basename)
try:
fh = os.open(dest, flags)
except OSErr... | 1 |
3ad0d03db524ba0d02533d4ba168a8eb | aabe4299d7c63dcb16ae6e384740254f | jobをクローン | class Job(MPRelaxSet):
def copy(self):
return(Job(self.structure.copy(), self.entry_id,
user_param=dict(self.user_param),
user_incar=dict(self.user_incar),
job_folder=self.job_folder)) | 1 |
07080afb8c63db917f7d0d81223b0377 | 4f2c8cb30500edd325e25d5e7bbd3a87 | 웹 페이지 기반으로 위치 재조정 | namespace DiversityPhone.View
public partial class ViewMap : PhoneApplicationPage
private void ApplyPosition()
{
((CompositeTransform)ImgZoom.RenderTransform).TranslateX = ImagePosition.X;
((CompositeTransform)ImgZoom.RenderTransform).TranslateY = ImagePosition.Y;
transfo... | 0 |
48ea13f5f520a435bbbf977b0c4993a0 | 6f67fdc4471591244eba195f639af4b5 | Move **index** number of rows up or down the active table. Moves to the first selectable cell once a row is found. | if dbg or self.dbgMove: self.printLineInfo('movePageUp({}, {})'.format(self.row, self.col))
line = self.row2Line(self.row)
if self.row == self.bgnRow(line):
if line == 0: self.moveTo(row=self.endRow(self.numLines - 1), hi=1)
else: self.moveTo(row=self.endRow(line ... | 0 |
d973138bc1bd2fde598c025a5f89065e | b9880861d05950ae33d463e9fc58f923 | Gets the errorDeviceCount
The number of devices in an error state. Optional. Read-only. | class SettingStateDeviceSummary
def error_device_count
return @error_device_count
end | 1 |
64dbd752651aef44fd5cb51135338894 | 2a99566bbf4b08fa604725c2a2eaefef | 写日志,最新的内容写在最前面 | class Logger(object):
def write(self,content):
time_str = datetime.datetime.strftime(datetime.datetime.now(),'%Y-%m-%d %H:%M:%S')
content = '[' + time_str + '] -> ' + content + '\n'
print(content)
with open(self.log_path,'a+',encoding='utf-8') as f:
f.write(content) | 0 |
149e8bb6a5e936f31d0e867b8a74f060 | bb6fa111e25dcfd75fde19432f87eba2 | 函数功能:将多个csv文件合并成一个csv文件 | def data_merge():
dfs = []
df1 = pd.read_csv("C:\\Users\\Administrator\\Desktop\\pmdata\\2016.csv")
dfs.append(df1)
df2 = pd.read_csv("C:\\Users\\Administrator\\Desktop\\pmdata\\2017.csv")
dfs.append(df2)
df3 = pd.read_csv("C:\\Users\\Administrator\\Desktop\\pmdata\\2018.csv")
dfs.append(d... | 1 |
1aa3cb200cae5414e9f2a0878a515f10 | 5108b0203cda2509ef949fb39b065a6d | Returns the studio user’s userId if they’re logged in,
otherwise returns 0. | {
if ($this->isLoggedIn()) {
return $this->_userid;
} else {
return 0;
}
} | 1 |
d787b69fa5aad988cd3c8ee01b23fc5c | 502e9509cda4592de3462983c9e5e185 | 分页查询冻结订单 | {
$where = array();
$memberid = I("get.uid");
if ($memberid) {
$where['user_id'] = array('eq', $memberid);
} else {
return;
}
$createtime = urldecode(I("request.createtime"));
if ($createtime) {
list($cstime, $cetime) = e... | 1 |
52e18dbbfb85ab87a7db6983456ed8a4 | 6000fa4f6d4cfc770ff2892ff4d68457 | Namn-arrayen med spelarnas namn returneras. | public class ServerController implements Runnable{
private String[] getPlayerNames()
{
String[] names = new String[players.size()];
for(int i=0;i<players.size();i++) names[i]=new String(players.get(i).getName());
return names;
} | 1 |
e3d50f6259b5ebc90d26de009945543e | 9a96bd80bff55d9fbd655a75ff925da0 | parse_csv: Parses the feature and label values into a format TensorFlow can use. Each line/row in the file will be
passed to this method which grabs the first four feature fields and combines them into a single Tensor. The last
feild is parsed as a label tensor. | features = tf.parse_single_example(
serialized_example,
features={
"scan": tf.FixedLenFeature(shape, tf.float32),
"behavioral": tf.FixedLenFeature([len(FEATURES)], tf.float32),
"label": tf.FixedLenFeature([], tf.float32)
}
)
return (features["scan"... | 0 |
44aebb5f92feb09668f0168dd39356a4 | ace7891d314644278c59a1ddf37d781f | FToK converts Ferenheit to Kelvin | {
int k = c + 273.15;
if(c >= -273.15)
{
return k;
}
else
{
std::cout<<"ERROR YOU SUCK"<<'\n';
}
} | 0 |
0f5364ddc459110ca2434d60215c889c | a977fa4d6dec4e6418fb19b392838a23 | 【可选】
获取 边框颜色
<p>
有关边框颜色描述见 8.3.2 基本颜色
<p>
默认为黑色 | public class FlatColoredTheme extends Theme public static class FlatColoredThemeSettings
public Vector4f borderColor() {
return borderColor == null ? null : new Vector4f(borderColor);
} | 1 |
d552b311f991f2d13a9ca2013c291a8e | 937c0df1d24252ac31f68c7d360df3ba | Hàm lọc quận huyện | const city = this.form.get('city');
this.city = this.listCity.find(item => item.AmphurId === city.value);
if (this.city) this.getDistrict(city.value);
else {
this.city = null;
this.form.get('city').setValue('');
}
} | 1 |
e215c7652c11eadbbf15ac8d6266e627 | ff43bdf283262b9560c263076b891c2a | Check event of Registration Type radio buttons on form. | boolean checked = ((RadioButton) view).isChecked();
switch(view.getId()) {
case R.id.login_register_instructor:
if (checked)
type = 1;
break;
case R.id.login_register_student:
if (checked)
... | 1 |
21fcf59eb3c3af8d66960056e0048a13 | 024a7463b7bd71efd73efe45850c9141 | Normalize symbol names | const char *arch__normalize_symbol_name(const char *name)
{
if (name && *name == '.')
name++;
return name;
} | 1 |
302b9729f2122b93b65511c138c565fb | 1030ae484a8dd7c4cb895b6191e6fbe5 | Instantiate an InvalidConfigurationKey exception for an invalid transformer configuration key. | class ReservedKeywordConflictForMetaConfigError(TransformError):
def __init__(self, key_name_in_conflict, function_kwarg):
self.key_name_in_conflict = key_name_in_conflict
self.function_kwarg = function_kwarg | 0 |
8226ceef7cc3738a5170eabd7bd19404 | a361a7d788d34440d998898f75e1ee8a | This destructor deletes all lists in this object. If the list is still used
outside of this object, this can be a problem. Please ensure, you don't use
these series outside of the object. | namespace omni
namespace plot
Plotter::~Plotter()
{
{
LayerList::iterator i = m_layers.begin();
LayerList::iterator ie = m_layers.end();
for (; i != ie; ++i)
{
Layer &layer = *i;
while (!layer.empty())
detach(*layer.back());
}
}
} | 1 |
6b7267d1f42d102110230b5ca7837d62 | c8fdde4ddcb02ce37e1a1d42d32aaf6f | A simple gas price strategy deriving it's value from the eth_gasPrice JSON-RPC call. | ethQuery: any,
): Promise<EthGasPriceEstimate> {
const gasPrice = await query(ethQuery, 'gasPrice');
return {
gasPrice: weiHexToGweiDec(gasPrice).toString(),
};
} | 1 |
65384c631cc75dcbf9ee2e8685a88aaf | 8f0347de59dae10201dc4b1f67322380 | 选择幅度加还是指定加方式随机 幅度加70% 指定加30% | class RandomScale2(object):
# #固定住高度,以0.8-1.2伸缩宽度,做图像形变
def __init__(self, p = 0.5,scale=[0.8,1.2]):
self.scale = random.uniform(*scale)
self.p = p | 0 |
f42ca4074a187342722639be5ac8f090 | 2d0b8f544e6bf4ff43719e0c8700d8eb | 获取指定学院的专业数量(report_parameter表中的数据)
2014.08.18 | public Integer getZjkAcademicianBaseCount()throws Exception; | 0 |
4596d9872534129295dff0a4c533bcc5 | 224b606c8727410f5308349ee33b89a8 | Returns the meta object for the reference '{@link org.abchip.mimo.biz.model.shipment.picklist.PicklistRole#getPicklist <em>Picklist</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "WS_WMS_Demand", propOrder = {
"listNo",
"itemNo",
"partLabelID",
"pickListNo",
"demandNo",
"demandType",
"areaCode",
"partSAP",
"partName",
"partCode",
"supplierNo",
"supplierName",
"batch",
"packNo",
"pac... | 0 |
65302e2e5153d67e5827e706dc37ebf2 | d696fcb4fd605e986edd26979e378679 | Get the target module initialization state for the target Set Token. | export default class SetTokenAPI
public async isModulePendingAsync(
setAddress: Address,
moduleAddress: Address,
callerAddress: Address = undefined
): Promise<boolean> {
this.assert.schema.isValidAddress('setAddress', setAddress);
this.assert.schema.isValidAddress('moduleAddress', moduleAddress);
... | 1 |
cadb9ba067482eef146741d3bfdac33d | bfda4ea4b8cc62bce1355ef317ce77f8 | Turns the left face of my_cube counterclockwise | std::array<std::array<char,9>,6> temp;
temp = cube;
cube[0][0] = temp[1][0];
cube[0][3] = temp[1][3];
cube[0][6] = temp[1][6];
cube[1][0] = temp[5][0];
cube[1][3] = temp[5][3];
cube[1][6] = temp[5][6];
cube[3][0] = temp[0][0];
cube[3][3] = temp[0][3];
cube[3][6] = temp[0][6];... | 0 |
dd63ab630cdd5ac46198cb377a1b41b5 | feb09f8a6aa2e7f1c540c3d7a4535c6c | Metoda służy do wyswietlania stanowisk w zależności od wybranego dziąłu | namespace Muzej
public partial class UmetnicForm : Form
private void comboBoxSM_SelectedIndexChanged(object sender, EventArgs e)
{
comboBoxSD.Items.Clear();
if (comboBoxSM.SelectedIndex == 0 ||
comboBoxSM.SelectedIndex == 2 ||
comboBoxSM.SelectedIndex ... | 0 |
e6a58f20c767c9358ab9bcb83d42398e | f078d1bbd9896d6646e2f8c5f016b47d | \brief
This function reads the TSF timer | {
data.offset = TIMER_REG;
ioctl(fd, TIMER_READ_REG, &data);
return data.data;
} | 1 |
6cdd0961415067f7c44274bf487a318f | 0276704c670caa85d039c3abb9ab9764 | Obtains the identifier of the created folder. | $obj = new static();
$result = parent::_send($params,null,'createdirectory');
return $result->outputData->{$obj->Model}->EntryId;
} | 1 |
4402027132b75a97b36cd4f5683d659e | 5ffca917f03270fb86839fb70200286f | Converts these packed integers to floats. | namespace Microsoft.ML.StaticPipe
public static partial class ConvertStaticExtensions
public static Vector<float> ToFloat(this Vector<sbyte> input) => new ImplVector<sbyte>(Contracts.CheckRef(input, nameof(input)), InternalDataKind.R4); | 1 |
4bc0de29996fe5c5a419d352edf1f530 | 649039118c8df2215b730f58cd07829e | Multi-accounts checks. | return unless user
link = user.service
if (link == 'Both' && !user.sel_detail && !current_page?('/both_details/new') &&
!current_page?("/users/edit.#{user.id}")) ||
(link == 'customer' && !user.cus_detail && !current_page?('/cus_details/new') &&
!current_page?("/users/edit.#{user.id}"))
... | 1 |
691c1ec1ef5ee070dbb56fb3b4ef3e26 | d92b38e8cf3dff170b679b1a737a4b8a | Shrink a cross to a single point | UU_REAL tol;
UU_LIST *cvpoint,*cvtang;
UU_LOGICAL lexten;
int *n1;
{
int i,npts;
UM_coord *pp,pext;
UM_vector *vv,vvi,vext;
UU_LIST lspt,lsvc;
npts = *n1;
pp = (UM_coord *) UU_LIST_ARRAY(cvpoint);
vv = (UM_vector *) UU_LIST_ARRAY(cvtang);
if (lexten)
{
um_vctovc (pp[npts-1],pext);
um_vctovc (vv[npts-1],vex... | 0 |
9381e6a2f99a322765d656d630352007 | 04a01a9853739885c8d9dc6d7d05bbe2 | 通知を送るレースがないか確認(reflesh()から呼び出し) | try:
score = self.obj_interface.getScore()
not_my_city = wgsdata.updateNotMyCityList(self.dic_metadata['l_cities'],self.flag_color)
if self.flag_color == 0:
if score["RedObjScore"][0] == 0:
return True
elif len(not_my_city) ... | 0 |
cdc7615f0898019fce07e7a68652d954 | 6e5d6fa51828d416a9666a9d4ffdc9aa | Exit a parse tree produced by {@link ExpressParser#escapeStmt}. | void exitStmt(Python3Parser.StmtContext ctx); | 0 |
c3826bd3ee0925014c833499bcd24ab9 | 4def550b0d136554f8b49298a856b030 | Stop all Futures from this instance to stop executing. | if ( getData().getExecutorTrans() != null ) {
getData().getExecutorTrans().stopAll();
}
super.stopAll();
} | 1 |
1b910154c475c37297922f4f8d34d836 | 790659bd7a9396dbe9c26bedc9498ba2 | Lines 25-38 | if selection_index and selection_index ~= self._equipped_selection and self._available_selections[selection_index] then
if self._equipped_selection then
self:unequip_selection(nil, instant)
end
self._equipped_selection = selection_index
self:_place_selection(selection_index, true)
self._selected_primary =... | 1 |
6d88d7bceab046b64ed22dea9cca84ae | 19635142b256e070219a8acd636c495c | Sets device types Definitions | deviceType = deviceType.get({plain: true});
deviceType.modes = {};
_.each(deviceType.availableModes, function(mode){
deviceType.modes[mode.id] = {
id: mode.id,
title: mode.title
};
});
deviceType.device_incoming_modes = {};
_.each(deviceType.AvailableIncomingModes, function(incomingMode){
deviceType.d... | 1 |
20e7fa21c2918db7aa2dd44ec6a24c92 | c01ba95dc03681f30ffa881a6ce2df1e | 測試核准商家但商家不存在 | {
$this->setExpectedException(
'InvalidArgumentException',
'Invalid shopUrl',
150500040
);
$merchant = $this->getMockBuilder('BB\DurianBundle\Entity\Merchant')
->disableOriginalConstructor()
->getMock();
$merchant->expects($... | 0 |
1b60c4fcf3875016271d08584bd3e2e5 | c441067b1336d472a3c4544ad03eb10a | Map 2D array to 9x9 board as shown by GnuGo 3.8 | {
assert(image != NULL);
int curr_val;
int total_pix = 0;
A board = UArray2_new(9,9,sizeof(curr_val));
Pnmrdr_mapdata map = Pnmrdr_data(image);
for(unsigned j = 0; (j < map.height && total_pix < 82); j++) {
for(unsigned i = 0; (i < map.width && total_pix < 82); i++) {
curr_va... | 1 |
0fc893c8bba8d8cbdcdc5e765bc6f2d9 | 66520dad4a091c588db28ef24f3b1f1a | Returns True if payment method is Online Banking. | namespace OpenDental{ public partial class FormDepositEdit:FormODBase
private bool IsQuickBooksOnline() {
return _accountingSoftware==AccountingSoftware.QuickBooksOnline;
} | 0 |
75f65212ed93180eebbda76ba52bcad4 | 2bdc1628c94c8348de05ce58fca1ac81 | Gets information associated with a ProductSet.
Possible errors:
* Returns NOT_FOUND if the ProductSet does not exist. | namespace Google.Cloud.Vision.V1
public abstract partial class ProductSearchClient
public virtual gax::PagedEnumerable<ListProductsInProductSetResponse, Product> ListProductsInProductSet(ProductSetName name, string pageToken = null, int? pageSize = null, gaxgrpc::CallSettings callSettings = null) =>
Lis... | 0 |
96a391c80cfaa80f7f55e40afa204846 | 415574a9d606f6644c0040d4e2375cb2 | The TargetCoordinatePainter constructor | class FillCoordinates extends Command
public function __construct()
{
parent::__construct();
} | 0 |
bdb47b91c8b268d8ab831b1c6c8e92b3 | 5724e7ecd3d2521b9e725c5dd3d1b25d | 隐藏好友的家园 | public class PlayerConfig
public void delHome(String home) {
playerConfig.set("Homes." + home, null);
savePlayerConfig();
} | 0 |
afdbe7f0528b1681eba39e8d46db3839 | 80d0e0eacedd0ab0592d79b47f8ccd01 | Gets bounding box of geo coordinates with $radius
Input format for geo coordinates $geo: ['lat' => 54.000, 'lng' => 10.000]
$radius for bounding box in given $unit.
$unit for radius -- kilometers (KM) by default, but can be changed to
meters (M), miles (MI), feet (F) or nautic miles (NMI)
like ['lat' => 54.000, 'lng' =... | class GeoDataMath
public static function rectAround( $lat, $lon, $radius ) {
if ( !$radius ) {
return array(
'minLat' => $lat, 'maxLat' => $lat,
'minLon' => $lon, 'maxLon' => $lon
);
}
$r2lat = rad2deg( $radius / self::EARTH_RADIUS );
if ( abs( $lat ) < 89.9 ) {
$r2lon = rad2deg( $radius / cos(... | 1 |
55b6953ed3ef0b8f76a4d7f299daa60d | 7f61448ad6da3ef0f9cb03f40c5be655 | 第二种改法: | cases like (1) | 0 |
5aeb8f1f61818311648de88ab962062f | 1bdf37ad62205d1f0510fd7b89f889c8 | Hides the current list and shows a loading progress bar | class AlbumsListFragment : Fragment()
private fun showProgressBar() {
if (activity != null) {
mProgressBar.visibility = View.VISIBLE
mRecyclerView.setVisibility(View.GONE)
mLayoutErrorContainer.visibility = View.GONE
}
} | 1 |
ef73ee761ee5d956df48ed98d021f2fe | ae5d7493df79ebe56ecc43730e41aa3b | Register to receive #PAIRING_ACTIVITY messages. | public class WiFiP2pHelper
public synchronized void register() {
if (DEBUG) Log.v(TAG, "register:");
final Context context = mWeakContext.get();
if ((context != null) & (mReceiver == null)) {
mChannel = mWifiP2pManager.initialize(context,
context.getMainLooper(), mChannelListener);
mReceiver = new WiFiD... | 0 |
c9a2362fec68c51b3256521222292504 | fc33338ed9909ca44e187af2377ca77f | Initialize the data structure such that
all elements have themselves as parents | this.count = elements.length;
this.parent = {};
elements.forEach(e => (this.parent[e] = e));
} | 1 |
6070c18c82a1d4a861714bc293bcb06b | 51264cb3e5bc89feffeb0b4701aef1f2 | Tests the delete archetype event method.
Ensures that a warning is shown.
Ensures that no archetype are deleted. | $entity = $this->createMock(EntityInterface::class);
core_event_dispatcher_entity_delete($entity);
$event = $this->manager->getRegisteredEvent(HookEventDispatcherInterface::ENTITY_DELETE);
self::assertSame($entity, $event->getEntity());
} | 0 |
57893d5f5a42543f5c4efcbe240878d5 | 310e9bf89ab6c57b79e8bcf69a54e0fa | Converts JSON Theme Slots it CSS variables | function mapPipelineToTheme(pipelineOutput: any): AliasColorTokens {
return {
neutralForeground1: pipelineOutput.neutralForeground1.fillColorRest,
neutralForeground1Hover: pipelineOutput.neutralForeground1.fillColorHover,
neutralForeground1Pressed: pipelineOutput.neutralForeground1.fillColorPressed,
n... | 0 |
22778e5ac192ba5626148140ce024045 | f5721bfb445f760207551d65e3507659 | Returns the meta object for the attribute '{@link it.itc.sra.taom4e.model.core.gencore.TroposModelElementMarkup#getMarkup <em>Markup</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getPlace_Marking(); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.