query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
122cac6ac38f2a218c87974de32ded94 | 7b37e8716cb7c7746eb232b86c12892e | 获取图片循环时间秒 | public class SlideSettingsDialog implements OnClickListener
public int getLoopTime() {
return loopTime;
} | 1 |
77fb0f359b3eb8e0b4d1be6585780db9 | 482aa025914191c5f043960e10248c00 | Adds item to the back of the list. | namespace Tdf.CSharp.LinkedListLibrary
public class List
public void InsertAtBack(object insertItem)
{
if (IsEmpty())
{
_firstNode = _lastNode = new ListNode(insertItem);
}
else
{
_lastNode = _lastNode.Next = new Li... | 1 |
19ef5891ae7cae3836dfe2a68f4d1f0c | 98fa5576de4e3e0e17693c2ee4df0d49 | 服务端不停地接收客户端发送过来的消息 | class MyServer(socketserver.BaseRequestHandler):
def handle(self):
self.request.send(b'welcome to connect')
while True:
msg = self.request.recv(1024)
print(msg.decode('utf-8')) | 1 |
de7d55dd2b45caed92d119b4227120f4 | c13462ba1a9cd95779cd1dc4f7daa6d7 | Get argument registers based on processor type. | {
switch (_transitionBlock.Architecture)
{
case TargetArchitecture.ARM:
{
ArgLocDesc pLoc = new ArgLocDesc();
pLoc.m_fRequires64BitAlignment = _armRequires64BitAlignment;
int byteA... | 1 |
cf5d55d2d3f94baf3db68b85b46fe3fa | 3991576f58d9049c829231f97f00fa38 | 表示求复杂可以求left和right的并集, 并集元素个数不超过CAPACITY | int i = left, j = mid + 1, k = left;
while (i <= mid && j <= right) {
long long l = nums[i], r = nums[j];
r *= 2;
if (l > r) {
j++;
res += mid - i + 1;
}
else
i++;
}
i = left, j = ... | 0 |
a64db1e4591c322d5f21d8f474d4a70e | 0c832a50d718a22c38382a07d680c9e5 | Remove the specified Scene from storage. | class SceneController extends Controller
public function destroy(Scene $scene)
{
$scene->delete();
return redirect()->route('admin.scenes.index')->with('info','La escena se eliminó con éxito');
} | 1 |
d8e35ebac6001ca3c9e0104bf6b8d521 | babd8d765a3b158ad0506f26371c140a | Turn on IPv6 networking for this droplet | cmd = "ip -6 route add %s/%s dev %s" % (ip6_subnet, prefix, self.__DEVNAME)
os.system(cmd)
os.system("echo 1 >/proc/sys/net/ipv6/conf/all/forwarding")
os.system("ip -6 route add default via %s dev %s" % (ip6_gw, eth_name,))
os.system("ip6tables -t nat -A POSTROUTING -s %s/%s -o %... | 1 |
7f41c2746235a51f393e46c018434db7 | 60eabc389d845cd54fd9282c94cabd52 | implementation of abstract method(Method2_Print) from abstract class(AbsClass) | public void methodA()
{
System.out.println("This is methodA from ClassC3");
} | 0 |
715957efc77da89dbd5255c4adaac308 | 67cd039d70a138681e4413cc596fc51b | Is the whole contour selected | class Ensemble(object):
def isSelected(self):
return self._indices is not None | 0 |
2596c0ac81c072dd8bd143df74bdb072 | 7502c6bd5fee256b4c0d5161f4318034 | Callback function for FFmpeg logs. | static void fs_callback(gameswf::movie_interface* movie, const char* command, const char* args)
{
message_log("fs_callback: '");
message_log(command);
message_log("' '");
message_log(args);
message_log("'\n");
} | 0 |
a4010074f22b83ff41924bf1f34fcc02 | 587b779a4b7c7a5112cc490e98f52646 | Gets the log manager. | public abstract class StepTask<T> implements Callable<ExecutionResult<T>>,
Serializable
protected final LogManager getLogHandler() {
return m_log;
} | 1 |
9cdee0792fa083a1ea5d824bbe82c185 | dbe2b5258e4c7b1e2bb109160dcac12c | *************************FUNCION PRINCIPAL*************************** | int main(int argc,char*argv[]){
if (argc < 3){
printf("\n Falta un parametro ");
printf("\n 1. Dimension de la matriz ");
printf("\n 2. Numero de hilos ");
return 0;
}
N = atoi(argv[1]);
NUM_THREAD = atoi(argv[2]);
pthread_t hilos[NUM_THREAD];
int i, j, id_hilos[NUM_THREAD];
double timetick;
timetick = dwalltim... | 1 |
c170ea75602c1aa04b67e5367987ff66 | 3f0e1723bc74836008f8ea987b10e983 | create list using variadic paramethers | va_list ap;
T seq = Seq_new(0);
va_start(ap, x);
for(;x; x = va_arg(ap, void *)){
Seq_addhigh(seq, x);
}
va_end(ap);
return seq;
} | 1 |
2c41fa6664ccfccf094ab30029d27328 | 781840b457ca04fc0e7472ef517daee2 | Returns the hash function for this cached model key. | def model_key
@model_cache_key ||= "#{self.class.model_name.cache_key}"
end | 0 |
18fe786d5be7b358dd437ed6ff23ee85 | f038f302666e8d9b106147cc44c64003 | Attempts to read a rewrite tracker file. | class TestTrackerFile(GsUtilUnitTestCase):
def test_RewriteTrackerFile(self):
tracker_file_name = GetRewriteTrackerFilePath('bk1', 'obj1', 'bk2', 'obj2',
self.test_api)
DeleteTrackerFile(tracker_file_name)
src_obj_metadata = apitools_messages.Object(bucket='... | 1 |
ca807b626ab2bcda0f2116085b5e5965 | 0c6a089bb5b6266c46e79cb5a9f35da8 | Sets the phase during which communiction takes place. The default is the
main tick phase (see {@link Simulation#TICK_PHASE}.
the communiction phase | public class GenericMessageEndpointManager implements SmartLifecycle, InitializingBean, DisposableBean
public void setPhase(int phase) {
this.phase = phase;
} | 1 |
19b9ce8a7a514cb7764730952fca8e65 | e6ef8601938dc94d51236f81531c09a2 | https://stackoverflow.com/a/7970461/7609067 | var textArea = document.createElement("textarea");
textArea.style.position = 'fixed';
textArea.style.top = 0;
textArea.style.left = 0;
textArea.style.width = '2em';
textArea.style.height = '2em';
textArea.style.padding = 0;
textArea.style.border = 'none';
... | 1 |
bc797b6dfe36ba36a2efab523d7c8b9b | b11e39e9754a1f919ccae8a6e7673ad1 | Defines values for specifying how the width of a column is adjusted.
enum DataGridViewAutoSizeColumnMode,values: AllCells (6),AllCellsExceptHeader (4),ColumnHeader (2),DisplayedCells (10),DisplayedCellsExceptHeader (8),Fill (16),None (1),NotSet (0) | class HBoxColumn extends BaseRenderer
public function mode($value = '')
{
return $this->set('mode', $value);
} | 0 |
acdcf07c8514c87c59e134e9f87ec404 | f27738d378140459a586deb67ff3a2b0 | Returns the extension slug. | abstract class AbstractAddon extends PimpleContainer implements AddonInterface
public function slug(): string
{
return $this->get('slug');
} | 1 |
c3336c2830b99b7c0ef2cc6ba48f52b7 | 06291722e8f1456d372a745122c69293 | Low-priority interrupt redirection to the firmware code. | void
ideintr(void)
{
} | 0 |
03786d7a02fdac0a246831f793561655 | 8d31b5e53573015b3d093be458355411 | \brief Hide direct children widgets of current widget
\note The function is private and can be called only when GUI protection against multiple access is activated | {
if (m_widgets.size() > 1)
{
SBWidget* pWindow = qobject_cast<SBWidget*>(m_widgets[1]);
Q_ASSERT(pWindow);
Activate(pWindow);
pWindow = qobject_cast<SBWidget*>(m_widgets[1]);
Q_ASSERT(pWindow);
Lower(pWindow);
}
} | 0 |
cf04969b31fcea3fdf3ecb26107d626c | 10c168692f6866a719d1af2aace5fc72 | Helper function to return the appropriate comparison operator function from a specifier string like ">=" or "<". | def get_comparator(var):
if utils.is_numeric(var):
return operator.le
return operator.eq | 0 |
c281c208df251a50a3fae387612ba1e7 | 1c7dd2a374e2a3231de5912bce0ef25f | Ajout d'un nouveau jury dans la base de données | {
try{
$handle = fopen($filename,"r");
$tabJury = array();
$id = getMaxIDJURY($connexion)+1;
if($handle)
{
while(($data = fgetcsv($handle, 1000, ",")) !== FALSE)
{
$Login = $data[0];
$Mdp = $data[1];
$g =... | 1 |
079a4e1591185fe519955dbb94299b97 | 77fb410d40a1684cab097f02077d3e4e | calculates entropy and prints table using the second method | class QueryResult
def print_contingency_table
results = calculate
tp = results[:true_positives]
fp = results[:false_positives]
tn = results[:true_negatives]
fn = results[:false_negatives]
print "\t\t"
print "| Relevant\t| Nonrelevant\t| Total\n"
print "-------------------... | 0 |
90eacbaeaaf66f10422107cb4cdd5400 | 7ccae663310ba47da65a3f64d66f574f | Add a new element to <attributes> | namespace tinyXMLpp
void ElementNode::addAttribute (Attribute* attrib) {
attributes.push_back(attrib);
++numberOfAttributes;
return;
} | 1 |
2ef41052319e13baa4eeed6748757b17 | 2176bb640e1c808f1c1dd9f3a8fddfaf | Returns new empty User instance. | class UserRepository implements AdminUserInterface
public function getEmptyUser()
{
return $this->sentry->getEmptyUser();
} | 1 |
d41affec70ed05ed2546c6e900a58008 | be13e2369cf2004f59a5a0d04f56807d | Возвращает список типов линий. | listaderetorno = []
for _ in self.linelist:
if isinstance(_, SimpleLine):
listaderetorno.append(f"{_.gettipo()}")
return listaderetorno | 1 |
7d4c1b0500a9f60318f11a9465fc52bf | eb4db597bb7d84b5c250642c22105711 | Provides unit for given code. | namespace Microsoft.Cci
IUnitReference GetUnit(EmitContext context); | 1 |
b320bb52f5122f29e8bbaa9f27cdb400 | 518aa4fa2487c21eb96d4858358f7575 | Sets whether to use authentication | public class EmailServerSettings
public void setUseAuthentication(boolean useAuthentication)
{
this.useAuthentication = useAuthentication;
} | 1 |
f790553b49eed9ab63aa32fa8dde3fa0 | a3b1f508a9123fdaaded8f9f14853bc4 | uses_all函数,接收一个单词以及由需要的字母组成的字符串,当单词中所有需要的字母都出现了至少一次时返回True | def contains_all_letters_in_word(word, contains):
word_set = set(word)
for char in contains:
if char not in word_set:
return False
return True | 1 |
33a4c94dd103164d1d5eadd6339817ee | 5f51c006dc3254d477bd3fb94ac4cedd | 获取短信通知信息. | class MailTemplate implements
iUmiCollectionItem,
iUmiDataBaseInjector,
iUmiConstantMapInjector,
iClassConfigManager
public function getNotification() {
$mailNotifications = Service::MailNotifications();
$map = $mailNotifications->getMap();
$result = $mailNotifications->get([
$map->get('ID_FIELD_NA... | 0 |
47adfe571fdee0823fb27f98e4161af6 | c97adb2e5e4900285c98fc0845b5b98e | Requests self.endpoint and extracts relevant data from the HTML response | result = res.result()
if result and result.status_code == 200:
self.parse_links(result.text)
self.scrape_info(result.text) | 1 |
121fbef2182c7d1bbd00ee8783e78d49 | 0fe24a0b77fcaf7ffc08fd1fa75feb05 | Create additional elements. They are needed for scrolling. | const icons = document.createElement('div');
icons.style.display = 'flex';
icons.style.flexDirection = 'row';
container.appendChild(icons);
const clearDiv = document.createElement('div');
clearDiv.style.marginRight = '10px';
clearDiv.style.cursor = 'pointer';
clearDiv.className = 'output-action clear-ou... | 1 |
0c8e2f36286139dd315440e47d85cc73 | 8be0d84526472595e03c413ebba36c85 | The names of fields to check for links in. | return array(
'objectname',
'objecttype',
'refname',
'*objectname',
'*objecttype',
'subject',
'creator',
);
} | 1 |
c6e9e05f56746f403618ab78bcc69fc0 | fe9bb6579508138ed3134ffd3dd20852 | 获取某个OID对应的元信息定义
<ul>
<li>如果尚未加载对应的MIB库,则返回null</li>
<li>如果传入了实例的OID,也将返回null</li>
</ul> | ObjectInfo getObjectInfo( ObjectIdentifier identifier ); | 1 |
ea3ad0a7764e0899b1eb930514de6179 | 0f1ce4d66ba66c89988c92ef5b153eea | Formats a stack trace into a single line that provides relevant information for debugging
that, when clicked in the logcat, will display the line or source from where the message originated. | if (stackTraceElements == null || stackTraceElements.length == 0) {
return null;
}
StringBuilder sb = new StringBuilder();
int stackMessageSize = stackTraceElements.length;
if (stackMessageSize > STACK_MESSAGE_SIZE_LIMIT) {
stackMessageSize = STACK_MESSAGE... | 0 |
f27d4930183d0a5581a35b0ae8838620 | 3685a535432cce278b9696794a6f974e | 获取能否使用Y/N | getyesno(void)
{
int c;
while (1) {
c = toupper(getch());
if (c == 'Y' || c == 'N')
break;
}
putchar(c);
putchar('\n');
if (c == 'N')
return NO;
else
return YES;
} | 1 |
fb7334cdfb38897963bc1248ee4c0a6c | aa162a69654f37b18d061287481e0617 | 检查ip与域名记录值是否相同,不同则更改,并记录log | public void checkDomainNameValue(){
String value = HttpUtil.get(netWorkAddress).replace("\n", "");
try {
aliDns.updateDomainRecord(value);
} catch (Exception e) {
log.error(e.getMessage());
}
} | 0 |
f339d84e5461842926f7ef5f8435db42 | cb2e5d57f7e3addbc257c77898290247 | Store trigger polarity for use during acquisition start | print('\n*** IMAGE ACQUISITION ***')
try:
ptr_trigger_mode = PySpin.CEnumerationPtr(nodemap.GetNode("TriggerMode"))
if not PySpin.IsWritable(ptr_trigger_mode):
print('Unable to configure TriggerMode. Aborting...')
return False
ptr_trigger_off = PySpin.CEnumEntryPt... | 0 |
301e4e3d39249474ef8bb9a8c250a5d0 | af501e341881b0fb7d972d8b6966a492 | Write a BER encoded unsigned integer to the buffer | export class ByteArray
public writeUnsignedInt(value: number): void {
this.validateBuffer(ByteArraySize.SIZE_OF_UINT32);
this.endian == Endian.LITTLE_ENDIAN ? this.data.writeUInt32LE(value, this.position) : this.data.writeUInt32BE(value, this.position);
this.position += ByteArraySize.SIZE_OF_UIN... | 0 |
59e7d82bef55beebf0b8375f31a4fb2d | 18c20c4d48434ac755908971d54abe2d | Returns summary info for all applications in the given organization. | @ApplicationScoped
public class RestInvokerService
public void getOrgApplications(String organizationId, IRestInvokerCallback<List<ApplicationSummaryBean>> callback) {
CallbackAdapter<List<ApplicationSummaryBean>> adapter = new CallbackAdapter<List<ApplicationSummaryBean>>(callback);
organizations.call(... | 1 |
fd6f00da227e2efaebdd12ed848d8be8 | 076c7cdbdeac546741e67beca471a0be | Install the Python package PyText. | try:
subprocess.check_output(
[sys.executable or 'python',
os.path.join(self.pinstall_path, 'main.py')],
stderr=subprocess.STDOUT, env=self.env)
except subprocess.CalledProcessError as e:
print(e.output.decode('utf8'))
... | 0 |
972b00fdc658a91d7103d96c1a528cfd | 38d19abba757cb93fbe1941cad77f191 | Returns a mock BatchGet Object. | export class BatchGetReportsCommand extends $Command<
BatchGetReportsCommandInput,
BatchGetReportsCommandOutput,
CodeBuildClientResolvedConfig
>
constructor(readonly input: BatchGetReportsCommandInput) {
super();
} | 0 |
81a4acf05f9e96ebdf9a40d1f1c320d4 | 8200960afac821eabd2abe616136a550 | Form for input events in calendar | {
var vm = new CalendarEventViewModel()
{
DateFrom = start,
DateTo = end
};
return PartialView(vm);
} | 0 |
41f51b07cd77b09c9462dc08d742d180 | dee627a8787d0f82dedaa963f56cf689 | 星空上加入随机闪烁的星星 | void SGSpecialBattleLayer::flashStarOnSpace()
{
ResourceManager::sharedInstance()->bindTexture("animationFile/flashStar.plist", RES_TYPE_LAYER_UI, sg_specialBattleLayer);
CCSize winSize = CCDirector::sharedDirector()->getWinSize();
for (int i = 0; i < 3; i++)
{
int posX = CCRANDOM_0_1() * (winSi... | 1 |
173a9ad4c7a9595b5a29c0ecbdeaa603 | 4a2ad41805e8e3a4176fd1f34e7a35b7 | \brief DOS conio.h cputs() equivalent | static void cpm_conout_str(const char *src)
{
while (*src)
cpm_conout_chr(*src++);
} | 1 |
1eda6acb91e2bb22aa6b043b4787c5cd | ac2d6fccb735da0e9d2d78059d2313e7 | Play C Major Chord | {
PlayNotes("E4", "C", bpm, instrument);
MoveForward("C", bpm, instrument);
PlayNotes("D4", "C", bpm, instrument);
MoveForward("C", bpm, instrument);
PlayNotes("C4", "C", bpm, instrument);
MoveForward("C", bpm, instrument);
Play... | 0 |
389d5c0b3de5027c8a2be8567bd741a6 | d27b317d4b0224c7e445b121194c027d | Check if the method can properly count trophies for the specified gamer | {
$query = $this->trophyTable->newSelect();
$query->select(1)->where(['hash' => $trophyHash]);
$row = $query->execute()->fetch();
return !empty($row);
} | 0 |
f5f9ade632c76f6bd2ccac09249a45af | af66bdd4512e5bde27c863d4f2c71966 | Takes a number of measurements, averaging the distance, and returns the detected distance in centimeters. | int sum = 0;
for (int i = 0; i < MEASURES; i++) {
sum += SENSOR_FRONT.getDistance();
Delay.msDelay(MILIS_BETWEEN_MEASURES);
}
return sum / MEASURES;
} | 1 |
b68fbc60de0be4b070b39e6ba9cf5381 | b56538b2574df1e4b2e6767fe7330e41 | Handle the down arrow key. | public abstract class MapEditor extends FieldEditor implements Messages
private void downPressed() {
swap(false);
} | 1 |
abad9aabb51853085f9e7204cf7c2951 | e96c77e9c61b12001d2a3aca15e25561 | Unrolled version of FNV
http://www.isthe.com/chongo/tech/comp/fnv/index.html | {
return (int)((((((OFFSET_BASIS ^ (UInt32)X) * FNV_PRIME) ^ (UInt32)Y) * FNV_PRIME) ^ (UInt32)Z) * FNV_PRIME);
} | 1 |
32598a7d067f27be4dc451a3793e1333 | f870ec44e8d17e3009ff9b5b625430e4 | 将上面的item数据与获取的itempic拼接成json字符串 | JSONObject jsonObject = new JSONObject();
String word = etInfo.getText().toString();
try {
jsonObject.put("word", word);
JSONArray imgs = new JSONArray();
for (DynamicPublishVo item : list) {
JSONObject img = new JSONObject();
i... | 1 |
d6fbe11e9ded54097a69037b400fe127 | 1118f24ffa0687b01849c6df4b278cd6 | 某个id的书的评分 | {
$req = $this->querySimpleExecute('select * from t_evaluate LEFT OUTER JOIN t_book ON t_evaluate.idBook = t_book.idBook WHERE t_book.idBook=' . $bookId);
$results = $this->formatData($req);
$this->unsetData($req);
return $results;
} | 1 |
780c71cb4dfd8c47260da6510d0cbe1b | 77a77fefb780abc4bbe9d50bd22eb4fe | 备份渠道文件(写入远程服务器文件内容) | {
try {
return $this->sdk->writeFile($remote_path, $local_path);
} catch (\Exception $e) {
return false;
}
} | 1 |
e434517ba08d3aa3770d43f03141c174 | 128b8e360ee1ebd2c2bdebde402249d6 | Solve non negative least squares problem:
min 0.5*||y- A x||_2^2 s.t. x >= 0 | def nuclear_norm_solve(A, mask, mu):
X = Variable(shape=A.shape)
objective = Minimize(mu * norm(X, "nuc") + sum_squares(multiply(mask, X-A)))
problem = Problem(objective, [])
problem.solve(solver=SCS)
return X.value | 0 |
45774959be9ce92f07d141bef4ec819d | 396270580ef683ebc379da591a8e5ac2 | 将comboBox的值填到textBox中 | {
IDataObject data = Clipboard.GetDataObject();
string str = (string)data.GetData(DataFormats.StringFormat);
findComboBox.Text = str;
} | 0 |
3dadfa4e4c6fd95be757461b149a2df2 | 3468fd26175fcc91f38a5f0c54c8b419 | Remove all entries from the pending list | List<Context> clearPending(); | 1 |
b38a6b800e2a31bc6c87af2f30d46672 | acedab91d305f5ad7838fc018e7928fa | GET /shopping_lists
GET /shopping_lists.json | class ShoppingListsController extends Controller
public function index()
{
} | 1 |
90a91c1c13ffbb3e3a80e5a9205853dc | f21b593fc06d1f621393c92dfdb5b06e | Get min PHP version. | class PhpFixerOptions
public function getMinimumPhpVersion()
{
return $this->minimumPhpVersion;
} | 1 |
1a28a9d58ce59b99b23c190a0b06b87a | 389f64497f5b8760b24572cde896818c | Metodo che permette l'inserimento nel database di un servizio passato al metodo | namespace Service_Center
class DBProcedures
public void Service_Insert(string Name_of_Service, decimal Price_of_Service, Int32 Technic_ID)
{
commandConfig("Service_Insert");
command.Parameters.AddWithValue("@Name_of_Service", Name_of_Service);
command.Parameters.AddWithVa... | 1 |
9fecd83249874eef7ae198127c22efe8 | 6a9ebe775d83589b0c809b722b1b8219 | 查询主症状下疾病下的所有问题,并计算答案数量 | baseQuesAnls = db_tools.find_dict_list_by_sql(
""" select t.testQuesId,
t.replyNum,
round(case when t.replyNum = 0 then 0.0 else (t.rightNum * 100 / t.replyNum) end, 2) as rightPercent,
round(case when t.replyNum = 0 then 0.0 else ((t.replyNum - t.rightNum) * ... | 1 |
3f6a3b41928b6fcd999d10ab285685af | 35fb187e6f7f6d0edf1164479e894aca | Get URL, for example 'http://subdomain.example.com' | public function get_url(); | 1 |
af0fffc86a0fa765f241517d9287e7dc | ac7ef916bf47184b33a362f35396a53b | Gets the value of the dspnsdNb property.
possible object is
{@link BigDecimal } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ATMCassetteCounters2", propOrder = {
"tp",
"addedNb",
"rmvdNb",
"dspnsdNb",
"dpstNb",
"rcycldNb",
"rtrctdNb",
"rjctdNb",
"presntdNb"
})
public class ATMCassetteCounters2
public BigDecimal getDspnsdNb() {
return dspnsdNb;
... | 1 |
bd81577a6fd4956e676cec499bb70d00 | 0f8a182bcf142ee9e45af8f486c0703f | 合并 | $(".budget").addClass("yc")
$(".merge").removeClass("yc")
$.ajax({
'type':'GET',
'url':'/index/Budget-merge-order/',
'data':{},
success:function(result){
if(result['code'] === 200){
$('#megre_form').empty();
data_meger = result['dat... | 1 |
4cc1ba4b2c606f1ab630e416eed10f08 | b7c6a930664db6af45e0f6502200473e | Sets the commit message by parsing a given string into the different parts of a commit message | class Commit(object):
def parse(self, commit_entity):
match = re.match(
(
'author_name:(.*)'
'author_email:(.*)'
'commit_date:(.*)'
'subject:(.*)'
'body:(.*)'
),
commit_entity,
re.S
... | 1 |
efb92250402573baf2acb7b1476d330a | 8d72b291cf9d9c1d0b20d3a922c4f318 | 指定ファイルをISOイメージとみなして開く | static BOOL OpenImageFile(HWND hwnd, PCTSTR pszFileName)
{
_ASSERTE(g_hBitmap == NULL);
static const TCHAR szBmpFileExt[] = _T(".bmp");
size_t nFileNameLength = _tcslen(pszFileName);
const size_t nBmpFileExtLength = countof(szBmpFileExt) - 1;
if (nFileNameLength >= nBmpFileExtLength && _tcsicmp(pszFileName + nFile... | 0 |
608fbe20efe5acfd8e4d5b00a62beb7d | fd66216f5ce184250f0c81b12aa75b49 | Gets the page count. -1 if none. | int GuidoComponent::pageCount() const
{
return fGRHandler ? GuidoGetPageCount (fGRHandler) : 0;
} | 0 |
a1499b023784d0e9fab1f5c0873ff268 | 825ef42eb18df529c3fa9946f8840eb8 | Gets the default notification channel ID. | public class PluginManager
@Nullable
public String getDefaultNotificationChannelId() {
return sharedPreferences.getString(DEFAULT_NOTIFICATION_CHANNEL_ID, null);
} | 1 |
52ccf106fc3af6d50ada52f4cf497a2a | 51eca6d8c4d8fc9435cac39b381dc914 | 根据角色ID统计关联到此角色的菜单数 | int getRoleMenuCount(Integer menuId); | 0 |
526219b36080e9c07e0c562c40883345 | e477a5884dafb9139dcda16bba47aecf | Should we make a new backup of this type, given that we have these backups already? | backupName string,
permanentBackups *map[string]bool) bool {
if _, ok := (*reverseLinks)[backupName]; !ok {
return false
}
for _, b := range (*reverseLinks)[backupName] {
if _, ok := (*permanentBackups)[b]; ok {
return true
}
}
return false
} | 1 |
577d9bb882974d04d5e6a9e829ed9434 | 175e3a8c10364be1f0197b3ef35def95 | Converts Project Task Time Entry Model for edit. | {
$last_updated_at = $this->updated_at;
$tempItem = $this->whenLoaded('tempItem', $this->tempItem);
$author = $this->team->users()->find($this->author_id);
$author_name = $author ? $author->pivot->username : '';
return [
'id' => $this->id,
'team_task_i... | 0 |
246c5b23fb168392c7577f6cbe7d2cd1 | 467e2cf104994677c1b1658068ccce0f | Handles the ButtonClick event of the repositoryItemButtonEdit1 control. | {
try
{
this.EditEnabled();
this.DisableHeaderControls(false);
}
catch (Exception ex)
{
ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
}
} | 0 |
2b65e25e8824c3532ab0d42b2ecf9bec | cc11466c7ca7668733abb9eb0992b35d | @brief Funcao que determinar taxas de crescimento populacional | {
int T;
int anos;
int PA, PB;
double G1, G2;
cin >> T;
for(int i=0; i<T; i++)
{
anos = 0;
cin >> PA >> PB >> G1 >> G2;
while(PA <= PB)
{
PA = PA*(1+(G1/100));
PB = PB*(1+(G2/100));
anos++;
if(anos == 101)
... | 1 |
fcfda3b0b023eae5888b47c4ddfd4888 | 9b733bd2093490e2fc911248e88a55a0 | 根据考试计划id获取考试计划 | class ExamPlan extends MExamPlan
public function findExamPlanData($id){
$datas = $this->BaseFind(['id'=>$id['exam_plan_id'],"status"=>1]);
return $datas;
} | 1 |
97ee73e6c6067642fef2521e7c0e9f91 | dd21cd03dc9f1b48b3ef9c6cdcd35bb6 | 仙宗图标选择, 左 | function GeniusJinJiePage:init_left_up_view( left_up_panel)
self.fabao_panel = CCBasePanel:panelWithFile( 1,1,390+20-2, 263-2, UI_GeniusWin_0013, 500, 500 )
left_up_panel:addChild(self.fabao_panel)
local corner_1 = MUtils:create_sprite(self.fabao_panel,UI_GeniusWin_0052,20,241)
corner_1:setRotation(270)
local corn... | 0 |
7ba76446ebbf0f5eb7216dc2d135cb76 | e48430ecdf818234ec319cb65fee8d9f | Función que permite asignar desplazamientos conocidos a los grados de libertad restringidos | F=[0,0,0,0,0]
if pert_tita[0]!=0 and pert_v_tita[0]!=0:
minimo=min(pert_tita[0],pert_v_tita[0])
F[4]=max(minimo,F[4])
if pert_tita[0]!=0 and pert_v_tita[1]!=0:
minimo=min(pert_tita[0],pert_v_tita[1])
F[4]=max(minimo,F[4])
if pert_tita[0]!... | 0 |
d07b85d1acf5bd9404dda8c2285f5961 | 361c5c976ece2aa95f81c84cec247b36 | Check if both type specifications are integer. | class MulOp(BaseAST):
async def check_types(self, checker):
left_type = await self.left.check_types(checker)
right_type = await self.right.check_types(checker)
self.check_issubclass(left_type, (int, float))
self.check_issubclass(right_type, (int, float))
return (int, float) | 0 |
a936274b292e3ca253df76c88343ff90 | bff058819c9b7b5169f5b6d958e7be50 | ビルボード用姿勢セット | static void setPosesFall(struct hknwCharaPoses **ptrPoses, bool isActive){
hknwCharaPosesSet((*ptrPoses)++, HKNWCHARAPOSESID_FALL, 0, HKNWCHARAPARTSID_HUMAN_HEAD, 0.03, 0.00, 0.38, CONST_PI * 0.0, 0x00, isActive);
hknwCharaPosesSet((*ptrPoses)++, HKNWCHARAPOSESID_FALL, 0, HKNWCHARAPARTSID_HUMAN_BODY, -0.02, 0.00,... | 0 |
dbc38e51b43c10f6081acb4605037d94 | b853ef192536e9d285dcbde0830ff0a3 | we want to process search results as long as the dropdown is open | function search_open() {
var search_state = drupal_get_cookie('search_state');
if (search_state) {
return true;
} else {
return false;
}
} | 0 |
0a1d85629c1d61331bc30b1b0ce959dc | 5d956bf47ef89fbe8d091e2d64d0a61e | Testea la funcion left_rotate | void test_rotateLeft(void)
{
Node *root;
initNode(&node35,NULL,NULL,0);
initNode(&node50,NULL,NULL,0);
initNode(&node40,&node35,&node50,0);
initNode(&node30,NULL,&node40,+2);
root = rotateLeft(&node30);
TEST_ASSERT_EQUAL_PTR(&node40,root);
TEST_ASSERT_EQUAL_PTR(NULL,node35.left);
TEST_ASSERT... | 1 |
963a757bac01b326fecc1b6f5b5b218a | 43d7d7552fb909f1b1cc54f5b8e6afa4 | リクエストエンティティに沿ってREST通信し、取得した結果をコンソール出力する。 | {
$this->info($request);
$httpResponse = $this->_sendHttpRequest($request->getHttpRequest());
$response = $this->getResponseFactory()
->createSpResourceResponse($httpResponse);
$this->info($response);
$this->info('Resource data: ' . $response->getContent());
... | 1 |
e5c7c3decd15e43e020b0ed98af009a2 | b468062b1c834d389269b0567187d033 | Update database to version 0.9.0 | outputDebugString("[DBUPDATE] Old database in car_system! Needs to add column `flag`. Updating to version 1.8")
exports.mysql:dbExec("vehicle", "ALTER TABLE ?? ADD COLUMN flag VARCHAR(20);")
exports.mysql:dbExec("dbData", "REPLACE ?? (`key`, `value`) VALUES ('version', '1.8');")
outputDebugString("[DBUPDATE] Databa... | 0 |
2858e6fe605bbed375b66dafeb292376 | 7f4fe7000dc0f15ebfe1210a58a03880 | Sets the keystore type.
<p>
If not specified then the JDK default type will be used (see {@link KeyStore#getDefaultType()}).
</p> | public void setTruststoreType(String type); | 1 |
943695aabf0fc09e39abdc297871c9b0 | 94036937845a216d88db2994cb7cac64 | Converts unsigned int to float | {
union
{
unsigned u;
float f;
} a;
a.f = f;
return a.u;
} | 0 |
af982a5e0107990c32fc59dded6df158 | 75a8978546df0f0529b490f0e458314b | Méthode permettant de récupérer TOUS les voyages | @RequestMapping("/blog/journey")
@Controller
@AllArgsConstructor
public class JourneyController
@GetMapping("/all")
public @ResponseBody
List<Journey> getAllJourney(){
return journeyService.getAllJourneys();
} | 1 |
fccdb86d738aef9604cc5811f4b61969 | 60f242632066da3d04e57e0159b051c1 | modify a lock code (re-key a plugin or metadata db) | {
try {
$parameters = $this->_validate();
} catch (Exception $e) {
$errorCode = $e->getCode() ? $e->getCode() : 20001;
$this->_UnauthorizedCall($e->getMessage(), $errorCode);
exit();
}
Com_KeyManager_Client::getInstance()->updateCache();
... | 0 |
dc5ca6d1955af324c21274b9e3fd156c | 8b859c5ae309a9da86b824034c2d524f | Setter for <code>NBC_DIAG_SYS_HIS.SHORTS</code>. | public class DiaryData
public void setShortBreath(String shortBreath) {
ShortBreath = shortBreath;
} | 0 |
60265289af5d054b8e58cdffe176f77b | e197d8477cb2d515518b4fa2b8a3004a | Get stats for the Pi-Hole instance's history. | const text = await this._get("/stats", { noStats: !stats });
return JSON.parse(text);
} | 1 |
ccba48a91ec922ab03b8f4d8f1649076 | d3863997edd115d1f101de9f751e7ae8 | Resolves a set of mosaics provided by the user. | imgsToMosaic,
overview=True,
i=0):
outMosaic = []
for imgs in imgsToMosaic:
filePrefix = os.path.split(self.port.projDir)[-1]
fileSuffix = os.path.split(os.path.dirname(imgs[0]))[-1] + '_mosaic_'+str(i)+'.vrt'
o... | 1 |
079c15c5af8cb57efc9d94c49beb131a | 997e65044008b4105474d140d98a3f80 | Convert multi-part geometry of GeoDataFrame to single-part geometries. | gdf = gpd.read_file(filepath)
gdf = self._rename_geopandas(gdf, filepath)
gdf = self.preprocess_multipoly(gdf)
return gdf | 1 |
5e917b2f4eae5d0f6a3bb3ab3b35905f | 4f1cf049091021690a9b837e555bd415 | find the nearest date before a given date | def find_nearest_date(arr, search_value):
return min(arr, key=lambda x: abs(x - search_value)) | 0 |
dc0198918e7b01d83168e2d5b1ce44de | 6c0da6f6fb55916ff9a376ce29e04f82 | Implementation of ::kxml::logic::distributed::ConsistencyManagerSrv::createUserDist | const char* client_id,
const char* client_id_tag,
const char* client_app_version,
gnsdk_user_handle_t* p_user_handle
)
{
gnsdk_error_t error = GNSDK_SUCCESS;
gnsdk_user_handle_t user_handle = GNSDK_NULL;
char* user_filename = NULL;
size_t user_filename_len = 0;
int rc = 0;
FILE*... | 0 |
4560bad4216cad53396d51e493fca0cf | 09920a3754950f7a632aedc54eee6256 | print to stdout | SLprint (char *str)
{
fputs (str, stdout);
fflush (stdout);
} | 1 |
ee31318866523102f9cae7075e1754f8 | 6f3c10ad8889377ab618c127a167e426 | 更新隐患图片信息 | netClient = new NetClient(context);
String hiddenpicStr = Utils.getValue(context,Constants.ADDPIC);
Log.e(TAG, "上传隐患图片上报数据: "+hiddenpicStr);
if(!TextUtils.isEmpty(hiddenpicStr)||hiddenpicStr.length()>2){
final List<UploadPic> uploadPicList = JSONArray.parseArray(hiddenpicStr, UploadPic.class);
RequestPara... | 1 |
7d90271750bdd08c30983c1c759a8524 | 87c8e177a2059856c92a496c7b68d8bf | 初始化指针图片的Bitmap | public class CameraOverlayView extends View implements SensorEventListener
private void initBitamaps() {
mPalaceIconBitmap = BitmapFactory.decodeResource(getResources(),
gs25img);
mPalaceIconBitmap = Bitmap.createScaledBitmap(mPalaceIconBitmap, 100,
100, true);
mC... | 1 |
aad7d4f0098d4ae13230fb7c7fd0d7dc | a16fe36b2f3523acd8a44ff97cacbdda | Read the timestamp in format of milliseconds since epoch. | public long getTimeStampMs(); | 1 |
765616ff04884e0441006467a614b8e9 | e71a59bf0873dc23292a0fe35e7759cc | Получает строку данных из базы данных MySQL в соответствии с запросом | namespace RIS.Connection.MySQL.Requests
public sealed class SelectFunctionRequest : IQueryRequest<string>
public async Task<string> ExecuteAsync()
{
string result = string.Empty;
if (!Engine.CurrentMySQLConnection.ConnectionComplete)
{
var exception = new ... | 1 |
85b25d5eddb2dffd87a561ea5b6ba21e | 17ac2da9db3fed28ee45a3245155bef3 | GET /educational-records/count : count all the educationalRecords. | class EducationsController extends Controller
public function index()
{
return EducationResource::collection((
Education::withCount(['educationalqualifications'])->orderBy('id', 'DESC')->get()
));
} | 0 |
c5598765ce62506af9d38e967c14f2a1 | 849246d68542e7c4d7b546874d370050 | 模板1:只有一个标题 | class MyDocument extends Component
oneTitle1() {
const { date } = this.props;
return `一、${date.month}月${date.day}日境内机构数据摘要:`;
} | 1 |
f964067b8ca9dfd6ffd30c8a338b7b85 | bea030d94eb769c1f35f266bceae41c6 | Clears UI when there is no result returned. | noResultsUI.forEach { it.visibility = View.VISIBLE }
hideResults()
hideError()
hideProgress()
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.