query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
719cfbbe62c6d95bd2f0ce4cf25f39c5 | ada8b4b60e82d28510d298eec7a4eb36 | Ejemplo de caso de Dcheck, con llamadas a las rutinas de aserción
definidas en mini_TEST.h | {
int calificacion;
calificacion=95;
printf("Calificacion\n");
(calificacion>=MIN_EXCELENCIA)?printf("aprobatoria excelente"):
(calificacion>=MIN_CALIFICACION)?printf("aprobatoria"):
printf("no aprobatoria");
printf("\n");
return 0;
} | 0 |
2f9972713baa81afc77dcba2423f2d03 | fed353b0e163a36eef9d220f5cb6a427 | @brief Initiates the transmitting of UART data | void startUartTx()
{
txCount = *uartTxLen -1;
uartTxCurrent = uartTxBuf+1;
uartTxReady = 0;
SBUF0 = *uartTxBuf;
} | 1 |
ffeebc28d4f92c339299f8e860ab8a08 | 9abb328d2a98cb0ad9d3b56a33b84651 | u"""
互联网数据有新的国家,则插入国家表 | for d in data:
cursor.execute(
'insert into mc(city,name) VALUES("%s","%s")' % (
d[0],d[1]))
cursor.fetchall()
conn.commit() | 0 |
e26b72b3abac80f971d93d7451cf43ae | a1780a58bd9e3d10e976a93aeb5885db | Runs test for get section with incorrect section type throws exception. | class DataApiTest extends \PHPUnit_Framework_TestCase
public function testGetSection()
{
} | 0 |
5d806bdab30add371d5148742c0eb215 | ca11792c1146a484ae37b35040717ca1 | Computes the absolute value of a given 64-bit float. | [MethodImpl(METHOD_OPTIONS)]
public static float Abs(float x) => MathF.Abs(x); | 0 |
29b6139342bf5f920529233ec9d0a28b | 6aae53b0bdaaa29fe93dc06f09486ad1 | 根据工序-工作单元表id,批量删除工序-工作单元表数据 | public int deleteUnitProcessingByIds(String ids); | 1 |
79bc452c542edad3b2a4f494deea3bc7 | 02d4666ea179c0b6840573d415bbf11b | Setup key-value service. | {
if (services == null) throw new ArgumentNullException(nameof(services));
if (factory == null) throw new ArgumentNullException(nameof(factory));
if (!services.Any(s => s.ServiceType == typeof(KeyedServiceHolder<TService>)))
{
services.AddSingleton... | 1 |
8186e182d06076237b66f4c823dab220 | 08e4819d7e5ab15fd8321ebcd1be6d26 | finder konsekvensen af et vilkårligt felt | namespace VATGlasses.SectorFileParser
class Controller
public static List<Controller> Find(string _ident)
{
Controller ControllerCurrent = null;
List<Controller> listResults;
int intCurrent;
int intMidpoint;
int intMin = 0;
int intMax =... | 0 |
bf9de981d7725abc3d2f027eff8be475 | d0f40919b9fab80b0437b872ddd9d2f8 | responsible for getting wallpaper's absolute path. | File file = HDApplication.getContext().getCacheDir();
File cacheDir = new File(file.getPath() + File.separator + DESKTOP_WALLPAPER_FILE_NAME);
if (!cacheDir.exists()) {
cacheDir.mkdirs();
}
return cacheDir.getAbsolutePath() + DESKTOP_WALLPAPER_FILE_NAME;
} | 1 |
de74c4f6319b2ec0810152266597f0a6 | e07ec87703e79600a8ed5ff948d03fff | Method that paint client data for header | {
paint_Background_Grid(g);
paint_Header(g);
paint_Data(g);
IsFinalItem = (m_IndexInData == m_DataList.Count - 1);
IsFirsItem = (m_IndexInData == 0);
} | 0 |
9752c1d2bad35697b2a45acc15899302 | ca7426c209b8869c5c43a84b5f6cda6a | 保存个人停开餐设置 | class PlanService extends BaseService
public function saveSetPlan()
{
$data = Yii::$app->request->post();
if (empty($data)) {
return CtHelper::response(false, '参数错误');
}
$data = $this->filterCreatePlanFields($data);
$setPlan = Yii::$app->session->get('setPlan');
... | 1 |
2a893d27e6d440892ae2f46d7913c0c0 | e5b4bf0ed98a6b2d1a496420b5135964 | Log transform all observations. | df = observed_over_expected(df)
with np.errstate(divide="ignore"):
df = np.log(df)
df[np.isinf(df)] = 0.0
if positive:
df[df < 0] = 0.0
return df | 1 |
5e030d7bd649d7b79a3507aafca50d4e | ac6dad985a5768dd484969ac4051d013 | Tests file structure and input formats for file parameters | file_types = get_input_file_types()
assert "tsv" in file_types
assert "nt" in file_types
assert "json" in file_types
assert "obojson" in file_types | 1 |
78250902e827c011680ddf79bef63dc9 | c2ea2cc1b1b66cb3e6da55b304f1fa56 | Obtém as transações referentes a uma instalação específica. | class TransactionRepoImpl(private val transactionDao: TransactionDao, private val operationDao: OperationDao): TransactionRepo,
KoinComponent
override suspend fun getByOperation(id: Long): List<Transaction>? {
return transactionDao.getAllForOperation(id)
} | 0 |
6c87225f183df0fd7bbaca280c638920 | 5f0c9ebf2562f1424a41cb61f3c2ef47 | Log events to Kafka | class KafkaLoggingHandler(logging.Handler):
def emit(self, record):
if 'kafka' in record.name:
return
try:
msg = self.format(record)
self.producer.produce('test', str(msg),callback=self.delivery_report)
self.log_count += 1
if self.log_count >= ... | 1 |
66d2973701e623b99d808c223b2b6f21 | f6d3899ab34531746de6b6561bec879a | 初始化表情列表staticFacesList,从asset中读取表情 | mStaticFacesList = new ArrayList<>();
try {
String[] mFaces = getAssets().list("face/png");
for (int i = 0; i < mFaces.length; i++) {
mStaticFacesList.add(mFaces[i]);
}
mStaticFacesList.remove("emotion_del_normal.png");
} catch (IOE... | 1 |
c452b7a8dcb76ce024c2f79a54dca1da | 53c17494fc487ef4c9a236d941436b01 | 個々の雑貨屋情報を表示 | {
$shop = Shop::findOrFail($id);
$honnbus = Honnbu::where('delete_flg', '!=', 1)->get();
return view('shops.show', compact('shop', 'honnbus'));
} | 1 |
51575cd815f4f6415fccef7ed75780f5 | da945be3d47b72d408a2c88f00f64a42 | 获取office_goods_type列表 | public List<OfficeGoodsType> getOfficeGoodsTypeList(); | 1 |
acd0a12e0a7a1760b6d9a5a6666eab23 | 381737e19e4d4b8ecfd69a1702b7e85f | Just get a point in the range. | class TestRangeValidator(TestCase):
def test_middle_of_range(self):
validator = RangeValidator(10, 20)
self.assertIsNone(validator(15), msg='Should succeed silently') | 1 |
3f3d0e719beb2c4be51d44818389d695 | a2c098bf847a48f25f9f4d66b839ae86 | 用填充字符串拼多次, 组成新的字符串, 最后一个间隔符将被去掉.
如SQL语句中添加“?,”,添加多个后,最后一个“,”去掉。 | public class StringCache
public StringCache appendStrsByComma(String str, int num)
{
if (num == 0)
{
return this;
}
for (int i = 0; i < num; i++)
{
append(str).appendComma();
}
deleteLast();
return this;
} | 1 |
e0483f7427f9d687ddfbfe5441e90830 | 492fd8c64f08f8bf2c886bff58b04721 | Return the number of completed workflow executions. | $metadata = [], $options = []) {
return $this->_simpleRequest('/temporal.api.workflowservice.v1.WorkflowService/CountWorkflowExecutions',
$argument,
['\Temporal\Api\Workflowservice\V1\CountWorkflowExecutionsResponse', 'decode'],
$metadata, $options);
} | 1 |
60dc931288f30427c4699da5615b04f7 | 283862a455cde2af70cfb5b362b2d0ea | Get Adyen Error type | class Response
public function getErrorType()
{
return $this->payload->getParam(self::PARAM_ERROR_TYPE);
} | 1 |
d15f843c34910204a5a8dcf7afb861f2 | 3a68e70cafe8f3c687d0544589c3d5b8 | Disable clipping of children so non-selected pages are visible | [ExecuteInEditMode]
[RequireComponent(typeof(CanvasGroup))]
[RequireComponent(typeof(GraphicRaycaster))]
public class UIPage : MonoBehaviour
public void ShowWithoutAnimation() {
SetActiveAllChild(true);
SetActiveInteractable(true);
} | 0 |
35b0a9a9909e2f5c354ac43216314bab | 28a08397f618281cad7dcd330a2e6494 | Establishes a connection to a database in memory. | def engine():
return create_engine('sqlite:///:memory:') | 1 |
89077da63435cbfa9d5ceb7de7789053 | 0960dea7f216f2ee523767b97d5edeab | Look for the set of external packages this project depends on | let externalReferences = [];
if (pkg.homepage) {
externalReferences.push({'reference': {'@type': 'website', url: pkg.homepage}});
}
if (pkg.bugs && pkg.bugs.url) {
externalReferences.push({'reference': {'@type': 'issue-tracker', url: pkg.bugs.url}});
}
if (pkg.repository && pkg.r... | 0 |
36e58c1aa0fe001db3d93682ff061c34 | e7a6d8db8c6ebe8df03db1d3afc3a9ec | Write the start of a table row | public class Xhtml5BaseSink extends AbstractXmlSink implements HtmlMarkup
@Override
public void tableRow_() {
writeEndTag(HtmlMarkup.TR);
} | 0 |
1c97b940f6ccd45f321d4d8cc32e45cc | b2f78518740c4bbaa8d93f5c81475bac | Gets the experience in months min. | public BigDecimal getMonthsMin(String queryId) {
Aggregation aggregation = newAggregation(
match(Criteria.where("_id").is(queryId))
,project("monthsStats").andExclude("_id")
,unwind("monthsStats")
,sort(Sort.Direction.DESC, "monthsStats.aggId")... | 1 |
abe9a9e473b69e71dcd85ef720042357 | 557893d704e53db4b5ea244b3befd299 | reverses black and white in a given rectangle | int stripHeight = frame->height/strips;
for(int k = 1; k < strips; k += 2) {
for(int i = k*stripHeight; i < (k+1)*stripHeight; i++) {
for(int j = 0; j < frame->width/2; j++) {
bgrNonPerm[0] = cvGet2D(frame,i,j);
bgrNonPerm[1] = cvGet2D(frame,i,frame->width-1-j);
cvSet2D(frame,i,j,bgrNonPerm[1]... | 0 |
a71dfa5d4eae3c2e290b756123e7daa3 | 8a051ed605e28903ba06826dfdb59b97 | 查询门店日访问量统计 | namespace Himall.IServices
IEnumerable<ShopVistiInfo> GetShopVisits(DateTime startDt, DateTime endDt, long shopId = 0); | 1 |
40fedbceb02a8181fbac8ad3ecb73258 | 0a578ffa2939b535b3bf459a113ed075 | Get maximum length of port value.
maximum number of characters for a string | if not ports:
self.maxportwidth = len('65535/tcp')
else:
self.maxportwidth = len('%d/tcp' % max(ports)) | 1 |
d0ffc9eb89d986ffe8474ca7cf2cdb06 | 4047c1293ed172ae7847cc3f8f97d7a1 | Modifier un bateau a moteur | void PersonnageBN::ajouterBateau(const int taille){
bateaux.push_back(new Bateau(taille));
} | 0 |
ffc0bb0f2436dc3ac42f901ae75d10f8 | bd666882fd2e6aa964d86eb73e5a480a | Handles the click on an object node from the tree view. | namespace DemoGame.Editor
public partial class NPCChatEditorForm : DockContent
void npcChatDialogView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
SetEditingObject(e.Node.Tag);
} | 1 |
e94e7c571bdebddf4b889ab0106f5821 | 42efb33a08641718e8df80d5ed95e484 | Conversion methods for marshalling of: UnityEngine.CullingGroup | {
marshaled.___source_0 = il2cpp_codegen_marshal_bstring(unmarshaled.get_source_0());
marshaled.___meshPath_1 = il2cpp_codegen_marshal_bstring(unmarshaled.get_meshPath_1());
marshaled.___meshReady_2 = static_cast<int32_t>(unmarshaled.get_meshReady_2());
marshaled.___videoPath_3 = il2cpp_codegen_marshal_bstring(unma... | 0 |
ae965317c8bd6e8fb5b2e521f663d896 | aa373c1a38469494a11bfe1fb69232d3 | Returns -1 if function name isn't found | int lookup(char cmd[]) {
for (unsigned int i = 0; i < sizeof(cmd_table) / sizeof(fun_desc_t); i++)
if (cmd && (strcmp(cmd_table[i].cmd, cmd) == 0))
return i;
return -1;
} | 1 |
bb17d0a6143495ab17e43e45d75a4d6b | 958a26d913b8db63ba9093482f6f9dc7 | 计算两个点之间的直线距离 | function getDistance(point1: Laya.Point, point2: Laya.Point): number {
return Math.sqrt((point1.x - point2.x) * (point1.x - point2.x) + (point1.y - point2.y) * (point1.y - point2.y));
} | 1 |
ec06f26b1fd9761085631e3c5655d3c0 | 57a20a2b745d9f6904fb1987901b027d | Can detect failure when executing invalid Python. | class CheckTests(TestCase):
def test_multilineSyntaxError(self):
def evaluate(source):
exec(source) | 1 |
f510cf1e55841c809d1e7043803529e1 | ed76d4877972e68b4fb2c9f7ddcb7bcf | поиск слова в инфо | {
for (int i=0;i< MyLib.Count;i++)
{
if (Edit1.Text != null)
{
string compa2 = Edit1.Text.ToLower();
string compa1 = MyLib[i].wordLanguage1.ToLower();
if(compa1.StartsWith(co... | 1 |
008dc271ef776cd37d09cd71d03883fe | cf7ee29b76d410062fad13beda814d06 | Start iterator function for iteration of ondemand operations for summary
requests.
This implements sla_edm_iterator_start_fn_type. | static cerrno
sla_lib_edm_od_sum_iter_start (void *ctx,
const bgen_args_td *args,
bool filtered,
bool *exact_match,
sla_edm_iter_h_type *iterator)
{
... | 1 |
88d0c3b378c37768d17b2355752d0092 | 9059c7fdad7337533247954d80823395 | 爬取IXIC(纳斯达克)公司名和公司简称,并存来components数据库中 | for company in company_list:
html = read_html(self.ROOT_PATH + os.altsep + str(company) + os.altsep + self.COMPANY_INFO_DETAIL)
struct = etree.HTML(html)
company_name = struct.xpath('//*[@id="issuer_full_title"]/text()')
self.basic_info_analysis(html, company_name... | 0 |
03398e7b2105bdc19406e1f05b7ba9ae | ba12f84281b6345ac30ceefcac718ab7 | Determines whether the application is running in offline mode. In this mode,
the website uses locally fetched JS libraries and uses a sqlite local
database. | {
ApplicationDataContainer settings = ApplicationData.Current.LocalSettings;
return settings.Values["offline"] != null && (int)settings.Values["offline"] > 0;
} | 1 |
7464b61943062df237b87c8af0d39f82 | db96a6676a3e39632f0150053001e03d | Returns True if the only common factor is 1, else False | def coprime(num1, num2):
return gcd(num1, num2) == 1 | 1 |
bf2770588539e7de638e39f5271d3ea5 | 62086cdbfc5fa405d9e11667c793451d | Launches the default webbrowser for the PIX/PDQ Pre-Connectathon test tool | def open_browser():
webbrowser.open_new('http://127.0.0.1:8050/') | 1 |
ebdf6b0ba406d835277499e6d2050b69 | a9cad3f33fe0dc04e2d11001189cc98d | Inserts a comma into a word array. | function M.insert_trailing_comma()
vim.cmd [[silent! keeppatterns substitute/\(.*[^{[][^,{[]\)$/\1,/g]]
vim.fn.feedkeys(termcode('A<cr>'))
end | 0 |
c8d52318133f440181b9939b86653299 | c82676d55ecea56559f729ecf3638e07 | inserts a node to the end of the doubly linked list. | void insertAtTail(char* studantID, char* name, char* sex, char* contact, char* address) {
doublyLinkedNode* temp = head;
doublyLinkedNode* newNode = getNewNode(studantID, name, sex, contact, address);
if (head == NULL) {
head = newNode;
return;
}
while (temp->next != NULL) temp = temp->next;
temp->next = new... | 1 |
851e4c384d75f6ca6d7dd7cf5c7cf2cd | fa9f5f7b5f44022712a24549518c67dd | Calculates histogram backprojection. | namespace RecognitionSys.ToolKits
public class HistogramOperation
public static Image<Gray, Byte> HSVBackProject(DenseHistogram template, Image<Bgr, Byte> observedSrcImg, bool isNormalized = true, double factor = 1200000d)
{
try
{
DenseHistogram templateHist = new Den... | 1 |
c5ece07d83a0dc4483b77cf31f118180 | ed732e595f0638e028e909527e33e156 | Checks if the given user id was already messaged | return db()->count(
self::MESSAGES_TABLE,
"WHERE id = ? AND user_id = ?",
array($messageID, $userID)
) > 0;
} | 1 |
f320f2d0127cfd4a2d215dc65bd29d25 | c15ee41ecffca740a46eaa4bb4d6f27b | Возвращает модели всех товаров | String sql = "SELECT * FROM product_model";
return jdbc.query(sql, new ProductModelMapper());
} | 1 |
c2e09c6505a9295c18d30ce5998dd53f | c153deedb513c9d295803593c1cd26b4 | 禁用代理账号 | class Agent extends BasicAdmin
public function agent_forbid() {
if (DataService::update($this->agent_table)) {
$this->success("禁用成功!", '');
}
$this->error("禁用失败,请稍候再试!");
} | 1 |
e89f588ceacfa811d1f3c693f417e6fb | 780f726385b9c0f4d148e2fe8ff3c2a4 | to determine cell alignment from model | public class Convert extends WriterPdf{
private int convertAlignment(Alignment align, CellType cellType) {
if (align == null)
return Element.ALIGN_UNDEFINED;
if (Alignment.CENTRE.getValue() == align.getValue())
return Element.ALIGN_CENTER;
if (Alignment.LEFT.getValue() == align.getValue())
return Elemen... | 1 |
ab3d0d2216fad9d17015266740251c62 | fe72916f9bb47fd73de6cb9ec7797e8b | Sets the destination folder for the program files.
The destination folder does not need to exist.
Warning: Any files with the same name as ones that are generated will be overwritten.
filePath (str) - The pathway for the destination folder | if isinstance(files, list):
G.theFilePaths = files
else:
try:
raise DazError("File paths must be a list of strings")
except:
pass | 0 |
f5990bdec64b0e84e9304f5d5e0007d6 | 7b8d21c187c04dcb8dee9b2d99ffb6a3 | *offset* can be used to offset each station.
if `offset` is None then there is no effect and a fresh dict
is returned with unmodified data.
Otherwise, each station in `stations` has its data biased by adding
*offset*.
The visual effect is to displace stations upward (if the offset
is positive). | result = dict(datadict)
if not offset:
return result
for station,off in zip(stations, offset):
data = datadict[station][0]
data = apply_data_offset(data, off)
result[station] = (data,) + datadict[station][1:]
return result | 1 |
4abcc72779ac229ca928b49434190998 | ac68f83eddbf9f0f307b89fa62df3bde | Load db file, throw if fails
- Set up connector and cursor
- Check db version, if too old, rebuild
Pre: settings object is ready
Post: DB is ready to use | if not pathexists(self._path):
self._setError(_('File does not exists.'))
return False
if self._db:
self._db.close()
self._db = peewee.SqliteDatabase(self._path)
try:
self._db.connect()
except peewee.DatabaseError:
self.... | 0 |
f66d041c9079b315c14bbb6274623de0 | 343c8d3b1789aef8f979cda1fb66e588 | 2为支票, 如果选择的不为支票则清空支票信息div | function invoiceDivYes() {
document.getElementById("invoiceInfoSelect").style.display = "none";
document.getElementById("invoiceInfoDiv").style.display = "block";
} | 0 |
0ddf23a1726b9477018fe26c4f6d65b8 | 059e8ba4097ffd227b7af41b9998f376 | Creates a new decimal which is a sum of $a and $b | public class Decimal implements Comparable<Decimal>, Serializable
public Decimal plus(final Decimal augend) {
return operations.addition.eval(this, augend);
} | 1 |
79e489c5d49f394020313a3d138f2857 | d092f9d2863bf33a6feaf25be288c2e2 | Test the cache module using a filter and basic load | class cache_test(object):
def go(self):
for cs in self.cachesources():
logger.info(
"Found config cacheablesource entry with id: %s and filter: %s"
% (cs.attrib['id'],
cs.attrib['filter']))
... | 1 |
0650524baf335be5a725c9ed9da5148c | d617cf2680f5ae8e9ca1c785bde82455 | Positions the window behind all other non-topmost windows. | def raiseAboveAll(window):
window.attributes('-topmost', 1)
window.attributes('-topmost', 0) | 0 |
e3642092c036f897be27a29610501010 | eff5b97309d7fa545fcc096e89d65132 | Formats a remote exception to limit the Python code that was not "users" code. | class LogglyJSONFormatter(logging.Formatter):
def formatException(self, exc_info):
result = super(LogglyJSONFormatter, self).formatException(exc_info)
return repr(result) | 0 |
bf3bcf21cb4c8e99ec4ed67f1de119ac | 03ebc02cc9cfea1067186427ef78e4e3 | Controls if isTriggered returns false when alarm is off | class ControllerTests(unittest.TestCase):
def test_tick_false(self):
sensor = Sensor('127.0.0.1', 8000)
pump = Pump('127.0.0.1', 8000)
decider = Decider(10, .1)
controller = Controller(sensor, pump, decider)
sensor.measure = MagicMock(return_value=10)
pump.get_state = Mag... | 0 |
5faa811067b38f67f26b471b147e424c | 09f6183382c22bc3233512d7e41fa891 | Business partner type. Note that this affects validation requirements. = [ CUSTOMER, SUPPLIER, PERSON ], | export class Receipt extends ibas.BODocument<Receipt> implements IReceipt
get businessPartnerType(): businesspartner.bo.emBusinessPartnerType {
return this.getProperty<businesspartner.bo.emBusinessPartnerType>(Receipt.PROPERTY_BUSINESSPARTNERTYPE_NAME);
} | 1 |
d1c8a8aa496d31867dbb7956a1db3df9 | 8c9fbe8af325ecf928e9029792727bdd | NewStringSlice creates a StringSlice from a copy of the input slice | sh := (*reflect.StringHeader)(unsafe.Pointer(&s))
bh := reflect.SliceHeader{
Data: sh.Data,
Len: sh.Len,
Cap: sh.Len,
}
return *(*[]byte)(unsafe.Pointer(&bh))
} | 0 |
d7365bf2e89430713b90d3270eb218fc | ecae00981ec359f9a2d96df5d02c1b90 | <para>
This function stops you from controlling the camera. If you have a camera
control function, it will not be called with an inIsLosingControl flag.
X-Plane will control the camera on the next cycle.
</para>
<para>
For maximum compatibility you should not use this routine unless you are in
posession of the camera.
... | public abstract class AIState : MonoBehaviour
protected abstract void LoseControl(); | 1 |
f0e57ca456cef8f2cd21ee57e5a61790 | 6a06602d9a8173ab2f833c707bf7c695 | Get <sequencing_center> value | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"arrangementID",
"sequence",
"description",
"arrivalDate",
"duration",
"allotment"
})
@XmlRootElement(name = "Arrangement")
public class Arrangement
public Sequence getSequence() {
return sequence;
} | 0 |
0ea50af0fd5be8b5c820571ce49cd707 | 1b042d405a5e8812f3ece0cff8847bd6 | Subtract a quaternion from this one. | namespace Fusion.GIS.GlobeMath
public static DQuaternion Subtract(DQuaternion left, DQuaternion right)
{
DQuaternion result;
Subtract(ref left, ref right, out result);
return result;
} | 1 |
b9b350927d44ab6c5f19de5f2c992ce2 | ba230c182f03ceaa46f11ebfb24c78be | Extension method to wait for a user text respond in private chat! | {
JObject Params = new JObject
{
{ "user_id", UserID },
{ "message", Message },
{ "auto_escape", AutoEscape }
};
return await SendCallMessageID(new BaseAPI("send_private_msg", Params, "SendPrivateMessage:" + Utils.No... | 0 |
ebbc7c32f48819c51b6b80fcce1d7621 | 88f35ffca4aa91e7ec805f71d15cf6bd | Stops the bonfire's steady burn audio. | class Roadflare : ItemBase
override void OnWorkStop()
{
m_BurningState = RoadflareBurningState.SMOKE_ONLY;
UpdateActiveParticles();
m_FinalSmokeTimer.Run(60, this, "StopSmoking", NULL, false);
if ( m_LoopSoundEntity != NULL && GetGame() != NULL )
{
GetGame().ObjectDelete( m_LoopSoundEntity );
}
if ( G... | 1 |
0b1d47daa2f47e755e2e9315962a5f42 | 068c5da2ab88c458a22304c8b2e3d721 | 显示未使用的png文件 | LinkedList<File> files = MockConfig.getFiles();
if (CollectionUtils.isEmpty(files)) {
log.info("测试数据全部使用");
return;
}
for (File file : files) {
log.info(file.getName() + " 未被使用");
}
} | 0 |
29a5b381b4a7e3752fe2f86ed6547274 | 110f15fc5da8dbb1a678ae74ccd0efda | 現在パース中のユニットを返す. | Unit getNextunit(); | 0 |
98f6164f09cab48a35339a03a05b25cf | a8c97c01a44ba59e5320dfbe716c3838 | Turns an account entity into list of sanitised JSON blobs | return {
"account": encode_public_key(entity.account_public_key),
"body_hash": entity.body_hash.hex(),
"chain_name": entity.chain_name,
"dependencies": entity.dependencies,
"gas_price": entity.gas_price,
"timestamp": encode_timestamp(entity.timestamp),
"ttl": ... | 1 |
6711b48ed486059221db72b36630c7ce | a03c21a099539eb4375ac3f65fa8875b | Traverse the list of types of the given scope and verify a translation unit
correspondence pointer for each of them. | class ASTConsumerPreScan : public ASTConsumer
virtual void HandleTranslationUnit(ASTContext &Context) {
visitor->TraverseDecl(Context.getTranslationUnitDecl());
} | 0 |
b54daff702b42a16e0a958b417b48b16 | af4a2b8c6f6d3969c008ade054ae9914 | Method to generate a collection of ncbi ids for the taxon which are to be used. | result = []
while taxID != 1:
questionToNodes = ('SELECT rank, parent_taxID from nodes '
'where taxID = %s' % taxID)
cursor.execute(questionToNodes)
rank, parentTaxID = cursor.fetchone()[0:2]
questionToNames = 'SELECT name from names where taxId = %s' %... | 0 |
c5a1337b287f83528f58c989d84f2a01 | 24649770eaeefce4b4bedd33961a8e89 | Set the rich edit control text foreground and background colors and the
control background color. This is needed only when the colors change
(not like other controls). | {
RichTextBox.BackColor = backColor;
FastColoredTextBox.BackColor = backColor;
RichTextBox.ForeColor = foreColor;
FastColoredTextBox.ForeColor = foreColor;
} | 1 |
f9a514268884f21ba01ac5e71e7e46e3 | 4d8097391cc9723cd97d509785a47140 | 初始化Service的数据,使用接口回调 | traceListener = new OnTraceListener() {
@Override
public void onBindServiceCallback(int errorNo, String message) {
}
@Override
public void onStartTraceCallback(int errorNo, String message) {
if (StatusCodes.SUCCESS == errorNo || StatusC... | 1 |
d767bbc3c9a91741b58f0e21c3fd5dcc | e7b869534bdc6f0260d7382c5bf0422c | accepts a description and renders a modal with it. | class Description extends Component
render() {
const placeholderText = 'Steps to reproduce, what you expected to see, and what you saw it instead.';
return (
<div className="col-md-9">
<div className="form-group">
<label>Description</label>
... | 0 |
a53014988f5f3c5d8c3e2f56d97828f4 | 79f72bf18ca7919cc2f08f2fe7bfd667 | Initialize the root attribute. | self._attributes = {}
self.name = name
self._path = None
self._visible = visible
self._allow_children = allow_children
self._observable = observable
if self._observable:
self._attributes["obs"] = ""
self._observe_count = 2
self._payload... | 1 |
737720172fc7991280b9673f25a7884e | 552dd04ed64b74c2960a45b6a59aba53 | read catalog file sequentially, note which table is in which page | BOOL __stdcall scsiReadTOC(int adapter_id, int target_id, char *pbBuf, int cb)
{
VOLATILE SRB_ExecSCSICmd ExecSRB;
memset(&ExecSRB, 0, sizeof(ExecSRB));
memset(pbBuf, 0, cb);
ExecSRB.SRB_Cmd = SC_EXEC_SCSI_CMD;
ExecSRB.SRB_HaId = adapter_id;
ExecSRB.SRB_Flags = SRB_DIR_IN;
ExecSRB.SRB... | 0 |
ab6f38eb4dc32a96dc23ee489dbb2b38 | 27f62e315b0ed51de668226d1a8b1e3d | @brief Gets the SMI info for the mini-application usage. | UpdateSmmInfo (
OUT LDR_SMM_INFO *LdrSmmInfo
)
{
if (LdrSmmInfo == NULL) {
return;
}
LdrSmmInfo->SmmBase = MmioRead32 (TO_MM_PCI_ADDRESS (0x00000000) + TSEG) & ~0xF;
LdrSmmInfo->SmmSize = MmioRead32 (TO_MM_PCI_ADDRESS (0x00000000) + BGSM) & ~0xF;
LdrSmmInfo->SmmSize -= LdrSmmInfo->SmmBase;
... | 1 |
8208ef15fa00d9d68647804a64363c2c | 5eb17f8763b51b567ceaaa5e5a76311d | Returns a string of the values in the list | class ModelList implements Iterator
public function __toString() {
return implode(',', array_keys($this->data));
} | 0 |
d4c7d52fd0275e06ebe48ed614dca6ed | abccdb6a094fb9720229c4c85a49eb1c | Filter the query on the reachgoals column
Example usage:
<code>
$query->filterByReachgoals('fooValue'); // WHERE reachgoals = 'fooValue'
$query->filterByReachgoals('%fooValue%'); // WHERE reachgoals LIKE '%fooValue%'
</code>
Accepts wildcards (* and % trigger a LIKE) | {
if (!$this->isPropertyEnabled($property, $resourceClass)) {
return;
}
$parameterName = $queryNameGenerator->generateParameterName(self::FILTER_NAME);
$queryBuilder->andWhere('SUBSTRING(o.missionType.name, 1, 2) in (:'.$parameterName.')');
$queryBuilder->setPara... | 0 |
6d9e02b4baa83ae151dea732531b2e97 | ec6d86669b43a75ea9ad38ae305da4e7 | Q&A 글 저장 | public String QandA_write(
HttpServletRequest request, Model m, HttpSession session,
HttpServletResponse response) throws Exception {
response.setContentType("text/html;charset=UTF-8");
String user_id=(String)session.getAttribute("user_id");
PrintWriter out=response.getWriter();
int page=1;
if(request.... | 0 |
4594bdc3741fc13e984f2f601addeb6d | 958d4ccc6d4a1f281285190c684f6113 | Allows to map additional table columns to menu properties, like
<pre>("HREF_TARGET" => "hrefTarget")</pre> | class Table
public function map(array $map): self
{
$this->map = array_merge($this->map, $map);
return $this;
} | 1 |
3e0c657a76f8d3d3d03677d61cfc68f7 | 7513e2945c33067d01eb448344ffdde5 | Gives the edges that have matches. | namespace NetControlApp.Algorithms
class AlgorithmGreedyFunctions
public static List<String> GetMatchedNodes(List<(string, string)> matchedEdges)
{
return matchedEdges.Select((edge) => edge.Item1).Distinct().ToList();
} | 0 |
d5785fa119c2186c6ff7feca0c20cf58 | 16b5baa9ba8ea26aba62d310253a45bd | Записывает сообщение в журнал импорта | {
try {
if (_PS_VERSION_ < '1.5') {
return Db::getInstance()->autoExecute(
_DB_PREFIX_ . 'lengow_logs_import',
array('mail' => 1),
'UPDATE',
'`id` = \'' . (int)$idOrderLog . '\'',
... | 0 |
77094ce8d74fa20d9cd08dffb4a2b681 | 95264119f88083cd0256f37a1d9fde4f | 教师的标题函数 | if(!IS_AJAX) halt('页面不存在');
$UserId=M('student')->where("UserName='".$_POST['UserName']."'")->getField('UserId');
$t_list=M('t_list');
$query="select TextId from textsta where StudentId=".$UserId;
$textsta=M('textsta');
$result=$textsta->query($query);
$i=0;
foreach($result as $data){
$titl... | 0 |
b200f5d93859049bb2a97c6da9cf61f2 | af9bbe9c7627b9240ca36a3b8bcd5f05 | Create a Task which writes to Digital Output Channels | void task_D(void)
{
uint8_t i;
cnt_D = 0;
while(1)
{
for (i = 0; i < 5; i++)
{
OS_Fifo_put(++cnt_D);
}
OS_sleep(50);
}
} | 0 |
09a7850273164a8f378707c42dd62e7a | b1cf648b88bc71763838c1470e13eb26 | Uploads a folder using the #open-folder input | function uploadFolder(browser, foldername) {
const folderpath = require("path").resolve(__dirname + "/../samples/" + foldername);
browser.execute(() => {
document.getElementById("open-folder").style.display = "block";
});
browser
.pause(100)
.setValue("#open-folder", folderpath)
... | 1 |
d1027aaf8873d38b22ef093c259c5b51 | c28889a13f6d49123b4437a2fae0e884 | indicates that the implementation supports the generation of vendor-specific binary crash dumps. These may provide additional information when imported into vendor-specific external tools. | pub fn has_driver_support() -> bool {
unsafe { simpleperf_profcollect_bindgen::HasDriverSupport() }
} | 0 |
0307d7479278009da093fc6ba909ed33 | 994ac6b0a764284f2c311eefffb1b184 | GET /batches : get all the batches. | class BatchController extends Controller
public function index()
{
$batches = Batch::all();
return view('batch.batch')->with('batches', $batches);
} | 1 |
1eff3c1879f03452349633a474b455bb | 0e76a3d5d62468413dd84f651c4ae49b | 给定query_list,返回是否有至少一个query存在 | class HouQuery(SQueryCommon):
def _has(self):
pass | 0 |
116f10d241d4673ca156be65e415dc5d | 6bc310ebe3b8eb06f68dc28ea2364fe2 | Get the setting from the given scope by name. | namespace CsChatClient
public class ChatClient
public string getUserSetting(UserSettingScope scope, string key)
{
return PROTO.getUserSetting((int)scope, key);
} | 1 |
a8c686ab6d66ed5134d966318f3d563e | 931a0af5a1125691ae01cddc98411f19 | Получить наименование схемы | class Relation extends Record
public function getSchemaName($prettify = false) {
return $this->getString('table_schema'
, $prettify, array('public' => 'Common'));
} | 1 |
1fea1d5f01d377cbadd5c63851eb68b0 | 41e20b7d2595b9dc48d59961b4a4cc76 | 开始一次收缩 | mAnimatingExpand = false;
mAnimatingCollapse = true;
mAfterCollapse = after;
mCollapsePoint = collapsePoint;
startOrUpdatePathAnimation(false );
} | 1 |
1b1b28ff9a9b540fca46c8b94c9558c2 | 648d3fdaa009011b0156a69f87669a74 | === look for indicator that the tile is clickable ===-- | [RequireComponent(typeof(PathPoint))]
[RequireComponent(typeof(Image))]
public class CombatTile : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler, IPointerClickHandler
public void OnPointerClick(PointerEventData eventData_)
{
if(this.inActionRange)
{
}
} | 1 |
49069718693541e80a97416fd5009d02 | 83ef2bf49def2264c202f750b1d6a479 | Returns the number of neighbors to a node that have state 0. | namespace VRage.Algorithms
int GetNeighborCount(); | 0 |
da64404ae70df3d1494562392c78debb | dfe29600cb8de34cf4f71fac6f1c16f8 | 验证邮箱中的特殊单词,不要出现网址标识 | String input = email;
Pattern p = Pattern.compile("^\\.|^\\@");
Matcher m = p.matcher(input);
if (m.find()) {
return false;
}
p = Pattern.compile("^www\\.");
m = p.matcher(input);
if (m.find()) {
return false;
}
p = ... | 1 |
6402e93c0171dccd574b83e213b8717f | 06d3b48f1f98a4fff01066e9267c8bad | This function changes the current overlay depending on which one is active at the time
that it is called. | {
if (!overlay.activeSelf)
{
overlay.SetActive(true);
} else
{
overlay.GetComponent<Animator>().SetTrigger("BackToSlide");
Invoke("disableOverlay", 10);
}
} | 0 |
0f31de118795563bd8f88d2e7e0cc90a | b7945deb148915c6197c1a929bd7f00a | 地毯垫详情 | class Carousel extends BasisController
public function detail() {
$id = input('id');
$validate_data = [
'id' => $id
];
$result = $this->carousel_validate->scene('detail')->check($validate_data);
if (true !== $result) {
return $this->error('验证出错'.$re... | 0 |
93a6bbdbe1934880f4bad13c92227ca4 | df836166a5db320e4bd65e5282882c3e | returns the total nuclear binding energy given the mass defect | double Atom::calcBindingEnergyJ(){
if (Atom::useAccurate_){
return (this->calcMassDefectkg() * std::pow(this->speedofLight_, 2));
} else {
return (this->calcMassDefectkg() * std::pow(this->speedofLightA_, 2));
}
} | 1 |
854ff72010fc547d17791160f104cf0f | 118be6df3d74084a0d834533eaa8aa40 | 异步查询优惠券进行推送 | void asyncConstructCouponByTemplate(CouponTemplate template); | 0 |
02b78714008bc6e2a904c6cf8592b38b | 6f3f51325beb0cc64981fc6e7a8c90f1 | Initializes, if needed, the global vars for prefetch and batch, and starts the context if batch is activated | function startBatch() {
if (batchNestingLevel == 0) {
batchDefer = new DeferredAction();
}
batchNestingLevel++;
} | 0 |
508bebb85ae18a4b0d2d4c7b12f48065 | 0dd3c76d9cc47dd7f0c0020d37c361db | Test the bad relay rule with a msg containing ipV6 in parentheses | with io.open(os.path.join(SAMPLE_FILE_DIR, 'themelock.com'),
encoding='utf-8') as _fh:
data = _fh.read()
parser = domain_intel.parser.GeoDNS(data)
received = parser.db_ipv6_vertex
msg = 'Extracted IPv6 content error'
expected = [
{'_key': '2400:cb00:2048:1::681c:226'... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.