query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
918955bb6e071232e31cdfe9aefbe938 | 0d9b95e90a9ec022535ec5cd546575b4 | Test, whether the next invocation of this base query, in the same
direction, will yield any results. | public abstract class UpdateQueryBase implements UpdateQuery
@Override
public boolean hasNextQuery() {
return !quads.isEmpty();
} | 1 |
7e28521fa8fbc417e0dcabdc5b7bf38f | aa27a1f206b15e9d2e881a90d3377657 | GET: ChiTietPhieuNhap | {
string sql = "sp_GetBangThongTinChiTietCacPhieuNhap";
string[] ParameterColection = new string[2];
Object[] valueofParameter = new Object[2];
ParameterColection[0] = "@TuNgay";
valueofParameter[0] = TuNgay;
ParameterColection[1] = "@DenNg... | 1 |
ac96677491f8733aed910e0ddcfa7790 | bad38bd5cc83d53762ac828917bac78f | 完成下载营业部操作历史数据 | {
bool blnResult = false;
try
{
bool blnToHistory = true;
if (!isTest)
{
blnToHistory = CurrDataToHistory();
}
if (blnToHistory)
{
string st... | 0 |
962b2f8bbcc5275d6d1c433924986cd7 | b196f8d79e77872b43dbb7fbee4cb23d | Return true if the given text has been tweeted in the last 7 days. | if "postedTime" in tweet:
tweettime=tweet['postedTime']
tweettime=dateparser(tweettime)
td=timedelta(hours=-5)
tweettime+=td
if time1.date() <= tweettime.date() and tweettime.date() <= time2.date():
return True
return False | 0 |
a10406c7fbb5dc1faf0cfd8301835633 | c58257ebffef3550c744bf3f0850dea7 | Leave a Channel
If you're no longer interested in being a member of an existing channel, you can leave the channel at any time. Use this API to leave a specific channel. After leaving the channel, you can no longer access information from that channel. <p style=\"background-color:#e1f5fe; color:#01579b; padding:8px\">... | def channel_leave_v1(token, channel_id):
return {
} | 1 |
0cef6a8fd79b60532184330263f4b297 | 810c550cb4313303d12142ab88c59811 | 执行月分红发放操作 | $umpIds = $_POST['ump_id'];
$umpIds[] = $umpId;
$mdlUmp = $this->app->model('usermonthprofit');
$mdlUser = $this->app->model('users');
$umps = $mdlUmp->getList('ump_id, state, u_id, money_sum', array('ump_id' => $umpIds));
$this->begin();
$gUmps = array();
... | 1 |
dd248e8a8a5f5c4acee4994cad1cd30a | da54382a806c2fb760e615fb0549ef92 | Gets the page area from the given area. | {
area = this.rectangleArea.IntersectWith(area);
if (area.IsValid())
{
var result = new Bounds { Min = this.GetRegionAt(area.Min).Coordinate, Max = this.GetRegionAt(area.Max).Coordinate + this.tileSize, };
return result;
}
return area;
} | 1 |
a0b3a817a3376d20082051ffee7fb348 | 5688feac31462bb04e6001384678db19 | 根据options的设置,再次初始化日志系统。 | {
m_log_options = logoption;
if (CheckBit(m_log_options, LogOptions_File))
InitLogFile();
else
{
if (flog.is_open())
flog.close();
}
} | 1 |
24a288203005acc065f55c7ac5a88af7 | 5b68ee132cac24400e881225732c7dfa | Leitura do cabeçalho de um arquivo binário | void readHeaderBin(HeaderVeiculo* h, FILE* binario) {
fread(&(h->status), sizeof(char), 1, binario);
fread(&(h->byteProxReg), sizeof(long int), 1, binario);
fread(&(h->nroRegistros), sizeof(int), 1, binario);
fread(&(h->nroRegistrosRemovidos), sizeof(int), 1, binario);
fread(h->descrevePrefixo, size... | 1 |
b8ab822773c5d0288d026f3ebaeba5b9 | 07834e2e82be88be37aa14d2b4f72aaf | 返回当前锁定模式 | if (this._lockLevel > 1) {
return LockLevel.LOCK_ALL
} else if (this._lockLevel > 0) {
return LockLevel.LOCK_MEM
} else {
return LockLevel.LOCK_NONE
}
} | 1 |
42008314424b5360b00f4d944075bb57 | 219866c52a5fe141e09808bdb1a4fbb0 | переход с экрана меню на игровой экран | {
ui->stackedWidget->setCurrentIndex(0);
ui->menuGame->setEnabled(false);
resize(622, 694);
move((QApplication::desktop()->width() - width()) / 2, (QApplication::desktop()->height() - height()) / 2);
} | 0 |
e99d81d41eb88ff7ece224d02aab3d5f | 910dbcb1a4d7f0485be416e7cb4fb1d2 | Writes two bytes to the internal stream. | {
m_Buffer[0] = (byte)(value >> 8);
m_Buffer[1] = (byte)value;
m_Stream.Write(m_Buffer, 0, 2);
} | 1 |
31be2b829c23b0a3cceab458865f7430 | 6e8809ef5c96891cfe0d561f67bb8986 | ## from DoE.base | gp <- split(1:ncol(d), group)[as.character(unique(group))];
ns <- sapply(gp, length);
if (max(ns) == 1) {
m <- rowMeans(d, na.rm=TRUE);
r <- apply(d, 1, function(d) range(d, na.rm=TRUE));
v <- apply(d, 1, function(d) sd(d, na.rm=TRUE));
s <- cbind(Mean=m, Min=r[1, ], Max=r[2, ], SD=v);
o <-... | 1 |
5053f7ad079c84e30abdb6e55a412c4b | be120cf48b32f9e12f145cdff7ae836b | datagridのセルをクリックしたかどうかを取得する | function isCell(event) {
return event.target.dataset.type === 'cell'
} | 1 |
3d74aacf335a9d50cf0af828d64f2287 | b25e0f306b57c0881327d295dfaf4d55 | Из черновика в опубликовано. | namespace Sbor.Document
// ReSharper restore CheckNamespace
public partial class ActivityOfSBP : ISubDocSGE, IColumnFactoryForDenormalizedTablepart, IClarificationDoc, IDocStatusTerminate, IAddNeed, IPpoVerDoc
public void BackToDraft(DataContext context)
{
UndoProcess(context);
} | 0 |
700955672a59d5cd6b9bc00b040608a7 | b2bbd79ee7ad498be17a42875076a2bc | 加载病虫害预警数据 | function load_JYZTFX_Data(year)
{
var chartID="QYXY_JYZTFX";
$.get(getChartJsonUrl(chartID,year)).done(function (data) {
var DataSet=new Array();
for (var i=0;i<data.rows.length;i++){
var objstr="({name:'"+data.rows[i]['LABEL']+"',value:"+data.rows[i]['VALUE1']+"})";
var obj=eval(objstr);... | 0 |
32da119b8f4d7916fbb9d66d8206b183 | 9e485f983347069d7c6e383dd38e9192 | Sends launch report to server | void launch_resend(time_t t_launch, time_t t_exit, char *msg_id, uint8_t sd,
uint8_t br, uint8_t lr, uint8_t er) {
s_t_launch = t_launch;
s_t_exit = t_exit;
s_msg_id = msg_id;
s_score_diff = sd;
s_br = br;
s_lr = lr;
s_er = er;
comm_send_data(prv_launch_exit_data_write, comm_sent_hand... | 1 |
37f47f3a5eb8b175345eaf819a0fab9d | 729fdbc1ffa68fc23e0b8626e2c0943c | Construct an RF2 Filter context | class RFAnalyser(object):
def __init__(self):
pass | 0 |
544c69c9351686b184c2a85ab147ac87 | 9df591f48a0b40ebb6ef106e6e94a216 | 导出Excel-EPPLUS | $fileName = $expTitle.date('_YmdHis');
$cellNum = count($expCellName);
$dataNum = count($expTableData);
vendor("PHPExcel");
$objPHPExcel = new \PHPExcel();
$cellName = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y... | 0 |
1363c5648ff4be1d60f087a155b60406 | 66f1f162c75e066ce88ad60d76767b3a | 通过address地址判断资源是否已经下载 | public boolean checkDownloadState(T info); | 0 |
2d88cfb3be0732829e5c708c5315f900 | 8c33c5a61045979b3b7f4352e0c36959 | ?? Util.PrintTable(o: table)
* Return a formatted string of the table | function Util:table_print (tt, indent, done)
done = done or {}
indent = indent or 0
if type(tt) == "table" then
local sb = {}
for key, value in pairs (tt) do
table.insert(sb, string.rep (" ", indent))
if type (value) == "table" and not done [value] then
table.insert(sb, key .. " : ")
done [value] ... | 1 |
7a4cbad4320a059602894701ab21b503 | bb242d6e663e80cb6154b39ad95232ee | method to create session according to user defined Nepali Date | public class sessionManager
public void createLoginSession(String name, String email, String password, String phonenumber){
editor.putString("constants.KEY_EMAIL",email);
editor.putString("constants.KEY_PASSWORD",password);
editor.putString("constants.KEY_FIRST",name);
editor.putString("constants.KEY... | 0 |
c184639b45054d0f8fd6a8ffd3dc2ea8 | a6e808d9a89d7cb5ee569b216eafc470 | <p>
Get all promotions in system.
</p> | List<Promotion> getAllPromotions(); | 1 |
a3316d9b3ae0cee109703d9ba228ac5a | e6d1a8401222b367f5e7e027a79ef8fa | Removes all existing cached files from the server | export class FileDownloader
removeCache() {
this.cache.removeCache();
} | 0 |
1c8c1c12aed1207f7361023d488f0c78 | baddb04e0ecf67ceac75c9993073eebc | Tests that a DAG with multiple nodes can run correctly. | class TestEdgeModifierBuilding:
def test_multiple_task_groups_dag(
self, test_multiple_taskgroups_dag, multiple_taskgroups_dag_expected_edges
):
(
dag,
group1,
group2,
group3,
(
group1_emp1,
group1_emp2,
... | 1 |
72231cd67abd5fcb5cbed112393178f2 | 82dd59cf2f5a8a59455fa13ffc01fb00 | Authorization Resource Options The OPTIONS request allows you to check for the set of available operations that the currently authenticated user can perform on the `/authorization` resource. Whether the user can perform an operation or not may depend on various factors, including the users authorizations to i... | namespace DOL.WHD.Section14c.Api.Controllers
[AuthorizeHttps]
[RoutePrefix("api/application")]
public class ApplicationController : ApiController
[AllowAnonymous]
public HttpResponseMessage Options()
{
return new HttpResponseMessage { StatusCode = HttpStatusCode.OK };
} | 0 |
6e9a37ff66ea12866e52dbf461f44446 | e7a118a3886aa4e1419e462f6a93ef04 | Specifies how the width and height of an
element should be calculated.
See <a href="../../Documentation/HTML/Styling/Attributes/Display/box_sizing.html">Documentation</a> | class Layout
public function boxSizing($content_border_box)
{
$this->box_sizing = $content_border_box;
return $this;
} | 1 |
febb263c94086d456a7e8a00f06dd20c | 09ac06a97e41d81bdb6477872f805584 | Вернуть объект окружения
данного токенизера | class TwigTemplater implements TwigTemplaterInterface
public function getEnvironment(): Environment
{
return $this->environment;
} | 1 |
cc203c62e317c111424c31170fe31831 | 64b917acebacb4d0859f3368e9ca01c7 | Dado una ciudad y un rango de años obtiene la cantidad total de personas que van a apartamentos turisticos de esa ciudad
Dado una ciudad y un rango de años obtiene la cantidad total de personas que van a apartamentos turisticos de esa ciudad | def obtener_cantidad_turistas_en_pais_en_rango_anios(PaisDestino, AnioInicio, AnioFin):
conversor = Conversor()
repository = DBRepository()
cursor, labels = repository.ObtenerNumeroTuristasAmadeusAnualmenteDadoPaisDestinoAnioMinMax(PaisDestino, AnioInicio, AnioFin)
arrayTuplas = conversor.ConvertirCur... | 0 |
c91961f2f01601be4379667c0666e960 | 88b3bb5808082a8fa4f66a08b3c2c11e | 激活出牌界面 | {
bool isActive = false;
if (result == -1)
{
promptMsg.Change("管不上", Color.red);
isActive = true;
}
else if (result == 0)
promptMsg.Change("出牌成功...", Color.red);
Dispatch(AreaCode.UI, UIEvent.SHOW_DEA_BUTTON, isActive);
Disp... | 1 |
dbe0c4b8b67d7767fdfbda354fb385fa | 9b3f532bbc0a8fcdf9fdc4159fba5a85 | 得到游戏需要的随机版块,返回的类型为Box组成的列表 | class TestMagicBox(unittest.TestCase):
def test_get_game_list(self):
rp = HttpRequests.do_post(self.url + '/api/get/game-list', self.base_parms, gameType='boxGame',orderType='hottest' )
if rp[0] is True:
result = rp[1].json()
print(result)
self.assertEqual(result['rc'... | 0 |
3ff6c16965a410ef613878ca9835ddf4 | 3f9d196f31768e92e1fdd8fb98f69f6c | Size relative move. | reply = self.send("move rel {0:d}".format(distance))
if blocking:
self.poll_until_idle()
return reply | 1 |
d6bfc672e43281cf37df1ccebd3a1aa7 | 901ae44abaddf2b15d33db5b5e4d0579 | 获取所有在线好友 | class WebQQ
protected function getOnlineBuddies(){
$this->api(__METHOD__,function($result){
},[
'clientid'=>53999199,
'psessionid'=>$this->psessionid,
'vfwebqq'=>$this->vfwebqq,
't'=>time().rand(100,999)
]);
} | 1 |
1329aa9b12e1b0c22553c3544713a0a8 | 122ab9bf52b3e969811d036c6df00c7a | Find the most expensive policy (as a total cost) | def strategy_expensive(cookies, cps, history, time_left, build_info):
info = build_info.clone()
avail_cookies = cookies + cps * time_left
linfo = list(zip(info.build_items(),
map(info.get_cost, info.build_items())))
linfo.sort(key=lambda x: x[1], reverse=True)
for item, cost in ... | 0 |
69bb9e17e014fdb6b5871c4566f4b601 | b4e121590e0c59b07e6e416e359560a7 | Retrieves the amount of used memory in bytes. | {
return GetCounterValue(MemoryCounter, "Memory", "% Committed Bytes In Use", null);
} | 0 |
0ea89289440f4374b5bf3e8c2ca56fe7 | 26fd3a09d2acb76e6ca4e6a6b9e8cde6 | Returns the maximal value of the chosen numerical attribute | class Attribute(MetadataQuery):
def max(self):
return self._aggregate('max') | 1 |
1947b1bf28ba59c6b611c093bb2f5a17 | 3e32e070c651f79d85750140451bce5f | 生成测试的时候,xgboost所需的数据 | def XGB_test(train_data, train_label, test_data, label_list):
clf = xgb.XGBClassifier(n_estimators=224, max_depth=8, min_child_weight=6,
gamma=1,
objective="multi:softprob",
subsample=0.8, colsample_bytree=0.8)
clf.fit(train_dat... | 1 |
2d4f2cf4f0a4783d1ce4b5a83fbd392b | 803af0459c7a1f023dbd2f92dae7e19d | Get Currency Pairs | namespace SwitcheoApi.NetCore.Data
public class SwitcheoRepository : ISwitcheoRepository
public async Task<string[]> GetPairs(string[] bases = null)
{
var endpoint = "/v2/exchange/pairs";
var querystring = string.Empty;
if (bases != null)
{
for... | 1 |
e0db19cfba299d524781666ec9bf7a0b | 050f652184da7ec33f015686f377459b | Output each column value as a line in its own file. | outfile1 = open('col1.txt', 'w')
outfile2 = open('col2.txt', 'w')
with outfile1, outfile2:
for line in sys.stdin:
col = line.split()
outfile1.write(col[0] + '\n')
outfile2.write(col[1] + '\n') | 1 |
2b9d0ab5173f2336e0d3d6ee45f88fc6 | 7cf2db2bd193f5175da1de2359f15130 | <summary>
This defines the properties representing the imageable area on paper targeted
by a print operation.
</summary>
<ExternalAPI/> | @VTID(12)
void paperSize(com.goldensoftware.surfer.wksPaper pVal); | 1 |
86ea2e3a92c370d20d081127ba76a807 | 8f05e197440c1182b04bd973dcd406ed | 定义一个方法来计算圆的面积 | def S_yuan(r):
PI = 3.141592
return PI*r**2 | 1 |
dcc26154af3477afb5cea967dfb9370a | d0bceb652c369a4e844310c1c7a50b70 | Save a Version | $version = $this->select($this->_versionTable)
->attr("uid", $this->_uid)
->result($type)
->find();
if (!$version) {
import("@.RObject");
$version = new RObject(array(
"uid" => $this->_uid,
$type => 1
));
$version->setCollection($this->collect($this->_versionTable));
}
else {
$ve... | 1 |
0e4498a2e840c6e361b65ea15d25d73c | bfbb2b3536d5fa554da673fdea0f2436 | Find a new incremental experiment ID | class experimentSite(object):
def generateJID(self):
self.jid += 1
return self.jid | 1 |
67bb00f40357826d383ab89280b219c6 | a3ac6885a5fece6cd4c2be854df367e6 | perform some post-checking on an option. this disambiguates values
that are candidates for positional arguments, and warns about invalid
values. | if existing in _LIBRARY_ONLY_OPTIONS:
existing_val = getattr(self.input_options, existing, None)
else:
existing_val = getattr(self.output_options, existing, None)
if existing == "pythonpath":
is_set = existing_val not in (None, "", [], [""])
else:
is_set = bool(existing_val)
... | 1 |
9ac02e8ad1312caef7547c93c0f28d48 | e8aec5b1148f4a0dd2755890b84b6eb1 | Accepts the questionnaire's constituent sectional value types and calculates total scores. | self.upper_section_total = self.calculateUpperSectionTotal()
if self.upper_section_total >= 63:
self.bonus_points = 35
total = 0
for key in self.category_scores:
total += self.category_scores[key]
total += self.bonus_points
total += 100 * self.yahz... | 1 |
c01900e11c2b346ae44abca75e81e2f6 | b6f03b6eb5d46b42dc3a33f02e4700f4 | Uses Symfony MimeTypeGuesser to guess the mime type of a file. | public function guessByFileName($filename); | 0 |
6e51f6ef96e5ad22ee22d6209b6a7f43 | 4f4d4d17008e2ef741994fe20857055a | 새 props로부터 state를 동기화시켜줘야할 때 사용한다.
예를들어 props로 넘겨받은 값을 state에다 저장해야할 때. | updateState(state, data) {
return {
...state,
...data
};
} | 1 |
e8f41ff33dccaaf642624ce0d34ec1fc | 19fd46cae0b83b176e8d8908ab6c5491 | requests Prolog server a PC Easy play | try {
PCBuild pcBuild = new PCBuild(dbConnection, serverConnection.getCurrentUserNameFromSession(), params);
pcBuild.runTask();
reply = pcBuild.getTaskReply();
dbConnection.commit();
}
catch (SQLException e) {
reply = new Reply(Reply.SYSTEM_ERROR, e.getMessage(), e);
Logg... | 0 |
3b16948b0dbe7ced29d3bd587f330438 | b8417b3a6610f3051bf61e86e70d4569 | Permet d'rattacher un objet détaché pour synchorniser son état avec la base
de données
l'objet détaché contenant éventuellement des modifications
effectuées en dehors d'une session | namespace PAI.FRATIS.SFL.Services.Core
void Attach(TEntity entity, bool markDirty = false); | 1 |
4e7409e500dc33a1c986c6125e62a6dc | b94723105bbaad7412bc2689f2518949 | Cuando el tablero mueve una ficha, llama a esta función para notificarle
que la ha movido. | public void notify(BoardState counterMove); | 1 |
51f1c013a48205ebdfb14046906eebaa | 469f7a04ca173c116b2a14fca0cebc56 | Add new tags for a parcelInvoiceLine. Adds a tag to an existing parcelInvoiceLine. | namespace Infoplus.Api
public class ParcelAccountApi : IParcelAccountApi
public async System.Threading.Tasks.Task AddParcelAccountTagAsync (int? parcelAccountId, string parcelAccountTag)
{
await AddParcelAccountTagAsyncWithHttpInfo(parcelAccountId, parcelAccountTag);
} | 0 |
ab327d27ff8d3913d6f93608dc5eb72e | 8d3ea4911e70814509b3397b55d59cc9 | 当前所选时间是否需要担保
只需要比较当前时间跟限制时间 | {
if (!GetButtonState())
{
return false;
}
return SelectedLeaseGuarantee != null && SelectedLeaseGuarantee.Status < (int) GuaranteeStatus.已审核
&& SelectedLeaseGuarantee.Status > (int) GuaranteeStatus.草稿;
} | 0 |
dda1efb194982d911ea9465b8fbacf77 | bcb7b871b0f2af99f7bb2717993d32df | Verify that the return val of the adapter is passed to the encoder's
encode method. | data = pd.Series([1, 2, 4, 5], dtype="Int64")
nea = NumpyEncoderAdaptor()
tr = nea.transform(data)
assert isinstance(tr, np.ndarray)
assert np.issubdtype(tr.dtype, np.object) | 0 |
6f022e3391c7bd8070d778c9915d4f5d | 8dc18f1285f0f53c028d98da36658750 | *左スティック横軸入力を返す | @Suppress("unused", "PrivatePropertyName")
class Controller
fun leftX(): Double
{
_receivingInput = _receivingInput ||
Math.abs(_gamePad?.left_stick_x!!.toDouble()) >= _INPUT_BUFFER
return _gamePad?.left_stick_x!!.toDouble()
} | 1 |
3e1324a53ff277c8d9ace0e9b5502c8a | 0472c55c43b3f79ab345a255b5d47949 | Returns a <i>bool</i> indicating whether the specified recipient caused a bounce during the last sending
of the specified mailing.
mailing, <i>false</i> otherwise. | namespace mailslurp.Api
public partial class BounceControllerApi : IBounceControllerApi
public BouncedRecipientDto GetBouncedRecipient(Guid id, int operationIndex = 0)
{
mailslurp.Client.ApiResponse<BouncedRecipientDto> localVarResponse = GetBouncedRecipientWithHttpInfo(id);
return l... | 0 |
4383ed808ae676ef427a7e084dcf6982 | 7c9a6f0fa51a56ea7db2bd9b5fd6b1ab | Shows the grid containing the processed bankitems | public void displayGrid(); | 1 |
7c2ccff823ef83ef023c0d9284c515df | 81abe38e87be3910b2b94bd647979af2 | Stores the values into the translation yaml files. | function translateStorageSvc($translateStorage, $translateCache, $translateEvents)
function storageSetTranslations(lang, values) {
$translateStorage.setValues(lang, values);
} | 0 |
0ba17a945bc96eb698da9aee81c6edf0 | 1a749430c1efa4333f7033248cb278fa | Find the fixed point of a DataFrame function. | namespace Naiad.Frameworks.DifferentialDataflow
Collection<R, T> FixedPoint(
Func<Naiad.Dataflow.Iteration.LoopContext<T>,
Collection<R, IterationIn<T>>, Collection<R, IterationIn<T>>> f); | 1 |
e83584e235c6ee53cdd2c7fee20a3b93 | bf52b41256b1e7085b138bace9ddf4a7 | Fetch all messages from the POP3 server | if (err) throw err;
messagesCount = box.messages.total;
var f = imap.seq.fetch('1:' + messagesCount, {
bodies: ['TEXT','HEADER.FIELDS (FROM TO SUBJECT DATE)'],
struct: true
});
f.on('message', function(msg, seqno) {
var index = seqno - 1;
... | 0 |
8b4b0304fbcf8acb8ba1a619f6392f4d | 55bbd78e8dd9711b28fffb32382924d8 | Private method to directly retrieve all tasks from the collection | namespace Taskman
public class TaskCollection : IEnumerable<IIdentificable>
public IEnumerable<Task> EnumerateTasks ()
{
return _collection.OfType<Task> ();
} | 0 |
a6697ef1139ee144aeb8d77a847ff20f | 231f9d5133ded59faf899829e6699077 | 電線色番号マスター削除 | public String clear(@RequestParam("led_code") String led_code) {
Clear clear = new Clear();
clear.clea(led_code);
return "redirect:list/1";
} | 0 |
b6c1558bc861979ec76f8c02a0e151ab | 5b59b9882f8c6f512ffd772a6150ce27 | show removed employees | try {
removeEmployeeComboBox.getItems().clear();
removeEmployeeComboBox.getItems().setAll(removeEmployeeCompanyComboBox.getValue().ShowEmployees());
}
catch (Exception e){
System.out.print("");
}
} | 0 |
b8cf185f9514f6a8a2c307aeb4fab653 | ecedfb347b53ade8165913cb6fe98fbe | x以下の素数を列挙(第3版) | _ptable = [True] * max_number
for i in range(3, int(max_number ** .5) + 1, 2):
if _ptable[i]:
_ptable[i*i::2*i] = [False] * ((max_number - i*i - 1) // (2*i) + 1)
return [2] + [p for p in range(3, max_number , 2) if _ptable[p]] | 1 |
fd4cc995fed34d81f68cfd542e5caf67 | 4c99121169f77deeb393d7fed267f045 | Работа метода заключается в обновление нашего текстового поля и проверки не была ли досигнута сумма очков для победы. | {
if (engine.Check(answer))
{
ScoreInterface.Instance.ScoreEngine.ChangePoints((numberOfRows - mainDisp.CurrentRow) * 5);
}
} | 0 |
8c80cb8ae4c2f969c378cc04d35a4b07 | ff1596e3e872fc255aedaf20064360e3 | 判断当前浏览器是否与该库兼容 | var browser = get_browser_agents();
if (browser.Chrome || browser.Firefox) {
return true;
}
if (browser.MSIE || browser.QQBrowser) {
return false;
}
return false;
} | 1 |
b48a20c19ce47935cb62bb1988fc83fa | f1cef0d2ecb0083d0424181cfef85037 | in case when switched off while playing, won't wait and buzz | void Chime::playWait() {
tone(_intPin, 200);
delay(50);
tone(_intPin, 250);
delay(100);
noTone(_intPin);
} | 0 |
146c80d972d8c3199a68695242b091ed | 6495d08f8ca762735302a13b7b07adf3 | @brief the login successfully indication callback.
The callback will be notified if server login successfully
If @ref MtcCliDb::Mtc_CliDbGetUserReg is ZFALSE, this callback will not be called.
The callback is one of @ref MtcCli::Mtc_CliLogin results | void notifyLoginResult(boolean bSucceedToLogin); | 1 |
3ea18f96bb86d266768137af449671af | ee2efe017598d34fa04c8481cd04c2d4 | Get the residue between the true latitude and longitude and the predictive values | beta = self.theta
X = self.model.design
return self.Y - self.predicted | 0 |
2ce4dec9d7bea25db7c1ac3ab37d1e36 | 64010a3ca4e60f189efb1798a84c5b18 | Converts time in current timezone to time in wanted timezone | function converttimezone($c_date,$timeto='GMT',$timefrom='GMT'){
$dayLightFlag = false;
$dayLgtSecCurrent = $dayLgtSecReq = 0;
$local_timezone = $timefrom;
date_default_timezone_set($local_timezone);
$local = date("Y-m-d H:i:s");
date_default_timezone_set("GMT");
$gmt = dat... | 1 |
22cf8107b6930497cba78e8fbbbf3d22 | 285ef0ad94fe47daf61a28fee1ec3e23 | Devuelve el �ltimo evento que caus� que el popup men� se mostrara.
Util para saber la acci�n del mouse que lo caus�. | public class PopupListener extends MouseAdapter
public MouseEvent getLastEvent() {
return evt;
} | 1 |
e3be9ee2c51418dfa07bd8473086a8c6 | 9d5731e38134fba77fdb989fe2b92fda | bytearrayのデータを見やすい16進数表現の文字列に変換する | {
if (data == null)
data = new byte[0];
StringBuilder sb = new StringBuilder(data.Length * 3);
foreach (byte b in data)
sb.Append(Convert.ToString(b, 16).PadLeft(2, '0').PadRight(3, ' '));
return sb.ToString().ToUpper().Trim();
... | 1 |
8600d4e1b10cc363bd14c22ae4be335b | e669b5f87a2456dc544424a5d57dc71e | 创建一个零时文件夹,并且返回这个文件夹的路径 | class Crontab
private function createFistDir($item = array(), $delimiter = '/')
{
$time = (empty($item)) ? NOW_TIME : ($item['putTime']/10000000);
$data = ['name' => $delimiter, 'pid' => 0, 'last_time' => $time, 'create_time' => NOW_TIME, 'update_time' => NOW_TIME];
$dirId = Db::table('tp_di... | 0 |
d42c01400bb4baa4dfad83efcd996fa0 | eaef6e11caa012c32e7983a0a5efcc20 | 등록된 회의실관리의 상세정보를 조회한다. | public SchdulManageVO selectSchdulManageDetail(SchdulManageVO schdulManageVO); | 1 |
a631b2b66151067ee76980c00eff7f08 | 95fd476eb7b145690de8e7338dd8ec7b | Pull a number of chunks around a specified skeleton vertex | void FMeshUtilities::BuildSkeletalModelFromChunks(FStaticLODModel& LODModel, const FReferenceSkeleton& RefSkeleton, TArray<FSkinnedMeshChunk*>& Chunks, const TArray<int32>& PointToOriginalMap)
{
#if WITH_EDITORONLY_DATA
LODModel.Sections.Empty();
LODModel.Chunks.Empty();
LODModel.NumVertices = 0;
if (LODModel.Multi... | 0 |
704eaf15cf0f6e621e39fcc4dbb33078 | 7dc8cf066259b8094240ec3dddbfb856 | Get the authenticated user's Pinterest account info | public async Task<ActionResult> Pinterest()
{
var credentials = await GetOAuth2Credentials<Pinterest>()
.ConfigureAwait(false);
return RedirectToAction("Index", "Home",
new { accessToken = credentials.AccessToken, refreshToken = credentials.Refresh... | 0 |
1954dcfd143d9ea15cdb771d84940df1 | a0fde3aa3d883f217a02bf72a9b344b2 | Принимает целое предложение и возвращает отсортированные слова | {
$words = array(
"и","в","не","на","с","что","а","по","к","но","как","из","у","за","от","о","для","же","только","или","бы",
"до","если","когда","вот","при","чтобы","во","то","да","да","чем","об","нет","это","из-за","ко","всего",
"то","еще","же","о","себе","было","тем","а","а-а","да-да","как","нет-нет","то-... | 0 |
a28ad93a801473a9956889d145eaa7ff | 46433d1d86df45c07e8e83a8d9614794 | Run a command line, and check that it prints the right help.
Only the last function call in the mock is checked, which should be the
help message that we want to see. | m1, r1 = self.mock_command_line(args1)
m2, r2 = self.mock_command_line(args2)
self.assertEqual(r1, r2)
self.assert_same_method_calls(m1, m2) | 0 |
8b9a6baae950e86fae6d6593cf00f6fb | c08e5aec36991ec80107de3b58897f8c | 设置:小数位 | class MoneyInputFilter(private var maxValue: Float = 9999999.99f, private var decimalLength: Int = 2) : InputFilter
fun setDecimalLength(length: Int) {
mPattern = Pattern.compile(String.format(FORMAT, length))
} | 1 |
05f07822bb71a3a2836b63aef1220890 | 3612aa854883cdbacf567d87b184ef92 | create a divider for the top of the table of n length | line_val = ''
line_val += '+-'
for i in range(0, n):
line_val += '--'
line_val += '+\n'
return line_val | 1 |
6eb578374ff5a571e61774116a8a2bc5 | b289bd3ddd17c7992c8608369639bfdd | The on data event name in our socket to listen for. | class ShowerStateEvent extends Event implements ShouldBroadcast
public function broadcastOn()
{
return ['shower-channel'];
} | 0 |
2ca2af535b14b010ed34777e2c4f4f35 | b45cd4d1f75b59abed8d5c2e1da051da | Show splash screen in fixed time. | namespace W2W_SDK{ public partial class Splash : Form{
private void Splash_Shown(object sender, EventArgs e){
System.Threading.Thread.Sleep(5000);
this.Close();
} | 1 |
ba96338b18786f45481058123e7d8583 | cc58495b67095b31b750722c89a4866e | Remove and return an item from the queue.
Return an item if one is immediately available otherwise raise Empty.
Equivalent to ``self.get(wait=False)``. | if self.__locked_down:
return None
self.posted_event.wait()
self.fresh_lock.acquire()
if self.__locked_down:
self.fresh_lock.release()
return None
item = self.fresh_queue.pop(0)
if not self.fresh_queu... | 0 |
57a9bed1f067e66f7478e53f2bb28cf6 | c455412b86042f7df0d811549fcbfc03 | 再生ボタンが"タップ"された場合の処理(イベントハンドラ) | if (collision.gameObject.tag == "Ball") {
this.root.buttonReplay.SetActive(true);
this.root.canPlay = false;
}
} | 0 |
4b8da67c425a56303b457a415f98e2c9 | 79c0d53d5ea7cf2c68ef5dabcf9b394d | Allow user to narrow down list of reviews with some keywords | class ReviewsController extends Controller
public function index()
{
$search = \Request::get('search');
$reviews = DB::table('reviews')->where('title','like','%'.$search.'%')->orWhere('content','like','%'.$search.'%')->orderBy('id')->get();
$reviews = json_decode($reviews,true);
retu... | 1 |
8a36f7d457f3b54d50301fdcc400d1f1 | 80d03d71b2fa54337bf717cbc8e1a89e | Collects information about continuous noun sequences like "Garry Bloom", "Tim Buk Tu" | def get_nouns(seq):
nouns = []
tmp = []
for (word,tag) in seq:
if tag[0] == 'N':
tmp.append(word)
else:
if len(tmp) > 0:
nouns.append(' '.join(tmp))
tmp = []
if len(tmp) > 0:
nouns.append(' '.join(tmp))
return nouns | 1 |
ccbee12ebfe445099339c753074f0c5c | 042b2ce245db0110d9b7e8cc33a273bc | Adds the feature of forcing the items to be sorted by the first
column | class Mehr_List_Table extends WP_List_Table
function get_sortable_columns() {
$sortable_columns = array(
'title' => array('title',false),
);
return $sortable_columns;
} | 0 |
0ef613fdcf97a394d5a8da0898c3d7da | 9ff34872999607d600a48c2a8cef4e8d | dis <addr> [<count>]
Disassemble one or <count> instructions starting at <addr> | help = """ """
global GlobalListOutput
GlobalListOutput = []
target = get_target()
cmd = command.split()
if len(cmd) == 0 or len(cmd) > 2:
disassemble(get_current_pc(), CONFIG_DISASSEMBLY_LINE_COUNT)
elif len(cmd) == 1:
address = evaluate(cmd[0])
if address is None:
... | 1 |
37965902d14eb6e924a4a2ad9e0ef6e9 | 7072beb576151bdecdcfc95a0097eb70 | 修改裸金属服务器名称
修改裸金属服务器名称
Please refer to HUAWEI cloud API Explorer for details. | public class BmsAsyncClient
public CompletableFuture<ChangeBaremetalServerOsResponse> changeBaremetalServerOsAsync(
ChangeBaremetalServerOsRequest request) {
return hcClient.asyncInvokeHttp(request, BmsMeta.changeBaremetalServerOs);
} | 0 |
61548ad43ba651e1c9e19dc349608bae | a57b179926be540fab221e62bf160222 | 该接口用于删除轮播播单。 | form = IdForm().validate_for_api()
animation = Animation.query.get_or_404(form.id.data, "找不到该轮播图")
with db.auto_commit():
db.session.delete(animation)
write_oplog()
return ReturnObj.get_response(ReturnEnum.SUCCESS.value, "success") | 1 |
902b53f46073c485b12003883e8aa7b3 | 810bd79b3619b9a2e773029b37fd851f | Returns the total amount of sleep in minutes | class Guard
int getTotalSleep() {
return IntStream.of(sleepPerMinute).sum();
} | 1 |
dedde4f767357fcd5bed17ae756ded8d | 34873c43013ee3586d64f21b467a63df | function used calculate the distance between two vessels
outputs a value in statute miles | deltalat = (np.float(lat2)-np.float(lat1))*110.9463
deltalong = (np.float(lon2) -np.float(lon1))*90.4219
dist1 = np.sqrt(np.power(lon2-lon1,2)+np.power(lat2-lat1,2))
dist2 = np.float(np.linalg.norm([deltalat,deltalong]))
return np.float(dist2*1000) | 0 |
b0ad684d32b81cb36fdf2634e51d2176 | 2ece2fc6a6dcaf25984e3d7b483bde4d | fonction qui lit le fichier binaire pour afficher les métadonnées modifier | void lire_fichier(char *buffer, FILE *fichier)
{
long taille = taille_fichier(fichier);
if(fichier != NULL)
{
if(buffer != NULL)
{
fseek(fichier, 0, SEEK_SET);
if(fread(buffer,sizeof(char),taille,fichier) != taille)printf("(fichiers.c) Erreur : Lecture BDD.csv\r\n");
}
... | 0 |
b83a2b162b5c380d7abf16073f93e83d | 0721c0ccf3c0b29d7416fd6719b32ae0 | Returns internal debug counters calculated based on the current state of the cache. | with UWSGILock(self._uwsgi, self._COUNTERS_LOCK_KEY):
counters_raw = self._uwsgi.cache_get(
self._COUNTERS_KEY, _SPLITIO_METRICS_CACHE_NAMESPACE)
self._uwsgi.cache_del(self._COUNTERS_KEY, _SPLITIO_METRICS_CACHE_NAMESPACE)
return json.loads(counters_raw) if cou... | 1 |
ce01eec3cee7d8c86a5b271b69e7c7e9 | 440b5bf560248756d4e5ec9b14b441c2 | Tarefas Não-inicializadas - gráfico de colunas indicando número por semanas | class HomeController extends Controller
public function index()
{
$listagem = Task::groupBy('solicitacao')
->orderBy('solicitacao','desc')
->select('solicitacao',DB::raw('COUNT(*) as total'), DB::raw("date_format(solicitacao,'%d/%m/%Y') as data_solicitacao"))
->limit(10)
... | 0 |
a242e15ed8d7702b124af10910183471 | cd0288efe89fb7433aabe02d11fd0903 | 功能描述:一对一,一篇文章对应一个作者
嵌套结果,不存在N+1问题 | class Author extends Model
public function articleAuthor()
{
return $this->hasMany('App\Models\Article\Article', 'author_id');
} | 0 |
ba6058e9df3cbe9576651adc6528e68a | cee496286e3cd5ebb1dd9a15a08c7ed8 | @brief Funkce vytiskne slovo a jeho počet výskytů. | void print_info_about_word (htab_pair_t *data) {
printf("%s\t%u\n", data->key, data->value);
} | 1 |
55dce9f4e5d5a56ea9f1284ce0191302 | 5576239b54fb0cd9974ff70f5e3f9e97 | Determine basis expansion coefficients by direct overlap integral
computation. | kwargs = {}
shells = uni.basis_set.functions_by_shell()
shlcnt = shells.index.get_level_values(0)
shells = shells.groupby(shlcnt).apply(lambda x: x.sum())
nshell = uni.atom['set'].map(shells).sum()
kwargs['nshell'] = nshell
bases = uni.basis_set[np.abs(uni.basis_set['d']) > 0].groupby('set')... | 0 |
36a55c10b5dc6c4b7c31d438e704e559 | 5fdeed602cbe921fd891fad64bbf2889 | 获取支付网关编号 每个渠道的网关必须唯一 | public class PayChannelAttrDO extends BaseDO{
public java.lang.Integer getPayChannelId() {
return this.payChannelId;
} | 1 |
a310cfc25ad6b47164dfc4d861a91dc1 | b06e5cc718dfe240677a7055fbc5df19 | Display the raftless dialog. | def show_dialog(app_instance):
app_instance.engine.show_dialog("Publish to Clarisse", app_instance, AppDialog) | 0 |
dc4baa80d452cccaed474df4a1aa877a | 99ea0504764dfadfed0dc01df190d0bb | Gets a webhook avatar. | {
$size = max(min($size, 4096), 16);
$baseImageUrl = Bot::BaseImageUrl;
$hash = $this->getAvatarHash();
if ($hash) {
if (!in_array($format, ['png', 'jpg', 'jpeg', 'webp', 'gif'])) {
return null;
}
if ($format === 'gif' && substr($ha... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.