query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
47b93b1c3f30370fdf3d945b00c3c321 | 7789797e4b5304cdce34d8ae6f2d975d | Define a function to iterate through the enemies and reset them all | function reset() {
allEnemies.forEach(function (enemy) {
enemy.reset();
});
player.reset();
} | 1 |
8e143aa4659b69b2ecd3240c1d024348 | 99bb69841bb39e7553cfbb9b4002bf0c | Хэрэглэгчийн дэлгэрэнгүй мэдээллийг авах | class Profilecontroller extends Controller
public function index()
{
$id=auth()->user()->id;
$hereglegch = User::find($id);
return view('pages.profile')->with('hereglegch',$hereglegch);
} | 1 |
2f4d7be406e573625a91ccbd7d98b418 | 92db4cd10c3baeb8cdeac5ffe4f8ab39 | Alterna el tiempo de trabajo y descanso | function switchClock() {
var oldClock = currentClock;
if (currentClock == workClock) {
currentClock = breakClock;
}
else {
currentClock = workClock;
}
oldClock.resetTotalSeconds();
} | 1 |
159d622a5851e4624bb6702bcfa613de | 036d0ab816d02eb854812d145c2c39d7 | Asynchronously load the feed content. | {
return _rawContent.BufferContentAsync()
.ContinueWith(t => { _rawContent = t.Result; })
.AsAsyncAction();
} | 1 |
f968c6433c999b6d06346f58b61baeab | 3ecd237f38d2ddb105d39d92ab30203c | Determines whether a <see cref="DrawableHitObject"/> can be hit at a point in time. | namespace D2DShapes
public abstract class DrawingShape : IDisposable
public virtual bool HitTest(Point2F point)
{
return false;
} | 1 |
7427ee933a08ce60ed7e580c25882fe2 | b517e564eb247c7e5a0d8924186f20ef | Sets top promotion ids. | public function setStoreIds($storeIds); | 0 |
f761c3952b2e2b9d657dc5c2546de846 | 09e893a6909d161fb77572659648f7b4 | 取得正在被解析的javascript文件的src | var scripts = document.querySelectorAll('frame[src]');
return Array.prototype.map.call(scripts, function(e) {
return e.getAttribute('src');
});
} | 0 |
80eecf3da2ad394beab21aaa6dd8e9ab | b23a6b6c64eb77ec3c1e0143d09db77b | Returns a Solr hierarchy notation string for rootline of given PID. | result = ''
if not self.is_exist(taxonomy_id) or taxonomy_id == ROOT_TAXONOMY_ID:
return result
lineage = [self.get_name(taxonomy_id)]
(parent_id, _) = self.get_upper_level_taxon(taxonomy_id)
while parent_id != '1':
lineage.insert(0, self.get_name(parent_i... | 1 |
c7562bbd5de454403bbca117b2a88627 | 87f3298092f8d2d532b56b0226305a97 | 新しい luaインスタンスを作成する | {
dynamic create = new Lua().CreateEnvironment();
create.dochunk(script, "LuaHelper.lua");
return create;
} | 1 |
fb338a91b34c64dbf134659c9e6b9e20 | be7847ccb8362159541c3f6fef93d4a3 | Get the tags for a warehouseDocument. | namespace Infoplus.Api
public partial class WarehouseDocumentApi : IWarehouseDocumentApi
public void GetWarehouseDocumentTags (int? warehouseDocumentId)
{
GetWarehouseDocumentTagsWithHttpInfo(warehouseDocumentId);
} | 1 |
49f0f3e7687ba7a8fe2a4f88788aa168 | 4756c759516e45ac6e4f05b03639c651 | Renvoie si la situation est paire ou pas | if (getParterre()){
return "oui";
} else {
return "non";
}
} | 0 |
0f12ff590349630d5ea6d17e3d1a39e3 | 114fbf76337e0ce411af71aa391833f5 | Erstellt eine nächsthöhere ID, die in der Datenbank noch nicht existiert. | class ilFolderDownload
private function getNextId()
{
global $ilDB;
return $ilDB->nextId(self::DB_NAME);
} | 1 |
4262e43cb3e16f53587c338a86a47ecb | 3c3bca0485b302e734aae92594f3e5f6 | 只允许未登录用户访问 | if (!req.session.user) {
console.log('抱歉,您还没有登录!');
return res.redirect('/');
}
console.log('nologin', req.session.user);
next();
} | 0 |
1854007d90ba7463f2c119d452cbf10c | 822c16c556112c03ad2dbd9c468a7ce1 | Load to gl called but the asset already has a gl resource handle.
This seems like an android thing but should never occur because android gl unload is done correctly. | namespace
void CALLBACK LoadTextureNull(ID3D10Device* pDev, char* szFileName,
ID3D10ShaderResourceView** ppRV, void* pContext)
{
*ppRV = reinterpret_cast<ID3D10ShaderResourceView*>(ERROR_RESOURCE_VALUE);
} | 0 |
7f34d13d610d3f37457c7c135638cf71 | 5a3c1164165fc7cd1a2e468ce49a5f2f | 获取帮派战对方帮派信息 | {
GameCmd.stWarClanInfo info = null;
if (null != m_dic_HistoryRivalry && m_dic_HistoryRivalry.TryGetValue(clanId, out info))
{
return info;
}
return null;
} | 1 |
7da277b64d07405280633f24c50869ca | 3bfac1bcbae5c1757b65b394a56c3bd2 | <summary>Registers events required for auto-suggest functionality</summary> | EventBase.call( this );
var self = this;
var ds;
this.init = function() {
ds = new DataSource();
var dialog = new suggest.Suggest( suggestPlaceHolderId );
var format = new suggest.MapDataFormat();
dialog.entered = function( selected ) {
dialog.hide();
self.fireEvent( 'onSelected', selected )... | 1 |
dc4afb20abcf6d61f188af1a626ea7aa | 5e5322faa1c350502e8d7b79781be1aa | 团队搜索框测试 | mp = MessagePage()
mp.click_add_icon()
mp.click_group_chat()
scg = SelectContactsPage()
scg.wait_for_page_load()
scg.click_select_one_group()
sog = SelectOneGroupPage()
sog.wait_for_page_load()
sog.click_search_box()
search_name = "16886176... | 1 |
1ad49de8d18fc105839df87d91bbfa3e | a0b47c69de932590df8c692003996963 | Checks if each event in the event list is due and passes it to handleEvent if it is | {
bool success = false;
while( !handlerQueue_.empty()){
Handler handler = handlerQueue_.front();
handlerQueue_.pop();
switch (handler.getEvent())
{
case Handler::EVENT_INPUT:
success = true;
break;
default:
b... | 0 |
fd06ca22ba878cea07ce0b0c245e7edd | d55a34113926e66e3a1d66fb6a280937 | Returns the pid of the new thread. | {
struct task_struct* parent_thread = running_thread();
struct task_struct* child_thread = get_kernel_pages(1);
if(child_thread == NULL) {
return -1;
}
ASSERT(INTR_OFF == intr_get_status() && parent_thread->pgdir != NULL);
if(copy_process(child_thread, parent_thread) == -1) {
... | 1 |
0044f9cb5b00db2c91094303620ba62f | 1eb02fdb52926cdbd53ca7eaa84dcaf2 | Save an existing RoleResource entity. | RoleVO save(@RequestParam("id") String id,
@RequestParam("code") String code,
@RequestParam("name") String name); | 0 |
37d0f90db419b68b8a7eb91c26142b16 | 58db94a37ad01307f47498a436de7e8b | Revisa el tipo de descuento actual y aplica los filtros correspondientes | let rb = document.getElementById('rbPorFechas');
rb.checked = true;
oCompra.seleccionarPorTipoDeFiltroEnConsulta(rb.id);
oCompra.cleartblConsultarCompra();
} | 0 |
a4eeca3f18dab5f78a017323545a1cb4 | eb74a1c41414bbc2c5ebd0d703659257 | Inserts a new line character (\n) into the reduced model. | public class CategoryLogger
public void logNewLine() {
updateModels();
logLine();
} | 0 |
e6137652fea9df5f245d4eb5210d57d7 | 4e670e1861022c5542361f269a4a913d | Called by RmlUI when it wants to render geometry that the application does not wish to optimise. Note that
RmlUI renders everything as triangles. | void *CD3SObject::RenderGeometry(CRenderSettings &RenderSettings)
{
Mesh->Render(RenderSettings,-1);
return NULL;
} | 1 |
2fe6604a7037ccba0b2aa351cd84ce37 | eb0e81a100e0881d8fdbd83f5cbdd63a | Iterator over the samples of the current trial | bl,crs,trs,els = [],[],[],[]
for smp in self._samplers:
b,c,t,e = smp.sample()
bl.append(b)
crs,trs,els = crs + c, trs + t, els + e
return bl,crs,trs,els | 0 |
a891e64a814c8090082a87539c1efc51 | 5d36887703ccab138288c3ff863fda74 | Return a mask indicating the channel selection. | class PSFGenerationFilter(lib.ProcessingFilter.ProcessingFilter):
def canSelectChannels(self):
return 0 | 0 |
0c65d24d6b6217c111b123cbb500618e | 9462efd0feff6b3ec01b6194756007a6 | Replaces specified singleton service for the specified contract T. | namespace Onbox.Abstractions.VDev
void AddSingleton<TContract, TImplementation>() where TImplementation : class, TContract; | 0 |
a494044b0c058aedab1d5111d47a6f93 | aa1a474d3fc105b4bcb8853de2300d46 | 文档关闭的时候首先中断自动保存线程,然后关闭writer释放资源 | public class Document
public void close() throws IOException{
autoSaveThread.interrupt();
writer.close();
} | 1 |
a0f4e8fd9431208f36b5dd29d6444090 | 6064b4a6b8a1dfb95a0b3cb46eebe49a | 根据工厂编号和仓库类型查询仓库列表 | List<Storage> selectByGoodsType(String goodsType, Integer Repository) ; | 0 |
f3ef0adcd8b4b820feb2bd66c2bcfffb | f8e6e86b5bbc806756b93d099bb8730a | Generate mips spill/reload instructions under the direction of the
register allocator. | : TargetFrameLowering(TargetFrameLowering::StackGrowsDown, 8, -160), STI(sti) {
static const unsigned SpillOffsTab[][2] = {
{ SystemZ::R2D, 0x10 },
{ SystemZ::R3D, 0x18 },
{ SystemZ::R4D, 0x20 },
{ SystemZ::R5D, 0x28 },
{ SystemZ::R6D, 0x30 },
{ SystemZ::R7D, 0x38 },
{ SystemZ::R8D... | 0 |
6ad6d991a415c56b492c096e189e6919 | 7318e0cbbdda6c71b797a41e3e29e95d | newGRPCClient creates a Client that is connected via gRPC. | conn, err := newGRPCConnection(address, timeout)
if err != nil {
return nil, err
}
return &client{
idClient: csi.NewIdentityClient(conn),
ctrlClient: csi.NewControllerClient(conn),
}, nil
} | 1 |
c5ea438acb8cedd3b28678227966dfa4 | 566d555d38a5b82f299fc95adbcbae9f | FToC把华氏温度转换为摄氏温度 | func fToC(f float64) float64 {
return (f - 32) * 5 / 9
} | 1 |
80afb8cee326767665e9eeddffde55cf | 1b71028efa9e6525554338d87801c24c | A human-readable string that identifies the authenticator. Some authenticators are available by feature flag on the organization. Possible values inclue: `duo`, `external_idp`, `google_otp`, `okta_email`, `okta_password`, `okta_verify`, `onprem_mfa`, `phone_number`, `rsa_token`, `security_question`, `webauthn` | public class SMSOTPAuthenticator extends AbstractApplicationAuthenticator implements FederatedApplicationAuthenticator
public String getFriendlyName() {
return SMSOTPConstants.AUTHENTICATOR_FRIENDLY_NAME;
} | 1 |
7963959e248f500e146fbc33929aba54 | 2380eaab18aeaa859d5ce9dc9316c980 | 个人足迹信息 - 按照日期分页 | if($data!=null){
$start_time=$data['start_time'];
$stop_time=$data['stop_time'];
$res=self::where('date','>=',$start_time)
->where('date','<=',$stop_time)
-> paginate($pagenum,false,['query'=>request()->param()]);
}else{
$res =self::order('date desc')->paginate($pagenum);
}
return $res;
} | 1 |
d42a9af43e103d73476d6408fe7520a1 | c2c6b4ef863e892eaea76920a3967323 | 数据库为空时,填充数据 | public class QueueFragment extends Fragment implements View.OnClickListener, NewDoubleSpinner.OnSpinnerListener{
private void initDatas() {
if (GlobeMethod.getQueueNotZero().size() == 0) {
GlobeMethod.initQueue();
}
queueList = GlobeMethod.getQueue();
initData();
} | 1 |
3ebab6147020364fc1b63359c20350f6 | 5d4aad52c0280f3eb6efde3231d47df4 | 下载从事涉税服务人员人员信息采集模板 | public void downloadRepossessionInfoTemplate(@RequestParam(value = "cityId", required = false, defaultValue = "0") int cityId,
@RequestParam(value = "communityIds", required = false, defaultValue = "0") String communityIds,
... | 0 |
f27b93bbf11fa629e24f824ce671bda8 | 714bbd721b2575c9d1f18b7e1c9a00e5 | Writes one line to the Listing file, including Object Code. | public class As6809 extends Assembler
protected String formatListing ()
{
int byteCount = memory.getByteCount ();
output.setLength (0);
switch (lineType) {
case '=':
output.append (" ");
output.append (Hex.toHex (addr.resolve (null, null), 8));
output.append (addr.isAbsolute() ? " " : "' ");... | 1 |
e10a385e7b0ed7929a54e0bc83fdf15a | b9ead1d42b223c5e28824cad8ba8c1ce | Collect data from the client and inserts it into the DB in a parameterized fashion to avoid SQL-injections | query = f'insert into {self.TABLENAME} ' \
f'(Message, Referer) ' \
f'values ("{params.get("message")}","{params.get("referer")}")'
print(f"SQL: Executing {query}")
result = self.conn.execute(query)
return self.get_by_id(result.lastrowid) | 0 |
fcbb00fa2db855c50d4588f8204d7b6b | 8ea06129bbeb0ccd4b03e4a19acf289a | abrindo formulário para consultar vagas | class VagasController extends Controller{
public function create()
{
} | 0 |
fb0e959c134ad67a67222d63acba1432 | 0a261fc69cf97f36ff394efb6f0ca5d3 | Determine a good spot for the next created VM to land. | class StorageProfile
def calculate_storage_index(storage_accounts, vm_count)
increment = 40
storage_account = 0
vm_count += 1
storage_count = storage_accounts.size - 1
(0..storage_count).each do |storage_index|
storage_account += increment
if vm_count <= storage_account
... | 1 |
829b4f29471332210992ee3a9dd1993e | faec1f8d16b306714be36f86d9fa408c | Demonstrates positional args, flexible args, keyword args, and kwargs (flexible keyword args).
- print all arguments/parameters, including the keyword arguments/parameters, in one line | def main():
print("%-3s : %-4s" % ("1a", number_sum()))
print("%-3s : %-4s" % ("1b", number_sum(num2=2, num3=3, num1=1)))
print("%-3s : %-4s" % ("1c", number_sum(5, num3=3, num2=2)))
print("%-3s : %-4s" % ("1d", number_sum(5, num2=2))) | 0 |
e350ed6dcdecea856c81bd9bf3a0a6f0 | 57bf17fb4b7d99d02ef93a8efc4fdad4 | Редактировать существующее расписание | {
$em = $this->getDoctrine()->getManager();
$entity = $this->findSchedule($id);
$editForm = $this->createEditScheduleForm($entity);
$editForm->handleRequest($request);
if ($editForm->isValid()) {
$em->flush();
$this->get('session')->getFlashBag()->add(... | 1 |
519687391e8b77fab5de1bb8b5ec74a8 | 768d210cd6cd67931626492ca5385d01 | Get the start duration | class SpoonICalItem
public function getStart()
{
return (int) $this->dtStart;
} | 0 |
ff731c8cacdd4926be52fec8e5f88265 | d1340b95a7d24a1bf75dbaa37cb1d579 | returns all validations as a list of DTOs | public class EndpointRequestException extends Exception
public List<ValidationErrorDTO> getFailedValidations() {
return this.failedValidations;
} | 1 |
5e8e8db2bf0aae6baf34ff4da2460a6d | 41e45832c3303fefc01b03366c739967 | How important are the individual scores, according to the rater? | sorted_cats = sorted(cats, key=cats.__getitem__, reverse=True)
score_to_test = cats[sorted_cats[0]]
all_values = [cats[key] for key in sorted_cats]
average = sum(all_values) / len(all_values)
logged_rest = [log(abs(average - val) + 1) for val in all_values[1:]]
rest_average = sum(logged_rest) / ... | 1 |
d629b9d8447956ad563ef8cade29b634 | 87d00877d9341531e9eb087234232ea8 | 将打字练习界面呈现在用户显示屏幕上 | public class UIWordGame : MonoBehaviour
public void TestWord()
{
OpenMoudleUI("TestWord");
_TestWord = MoudleUI.GetComponent<TestWord>();
_TestWord.SetStudyQueue(StudyQueue);
_TestWord.ShowBeginTitle();
} | 1 |
6c91e0a23cbb922e3ccce5fe488495eb | d5040431e4f04303446db71c5225c88d | Returns a new object of class '<em>Action Open</em>'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | ActionOpen createActionOpen(); | 1 |
100157b058305b40ef555b9d32cc929f | a0153091463f303d1d847b177287edae | Vracia textovu reprezentaciu kocky | class Kocka(Kvadrat):
def narisi_tocke(self):
fig = plt.figure()
ax = Axes3D(fig)
x, y, z = zip(*self.tocke)
ax.scatter(x, y, z) | 0 |
ecbbef4477fd2276f1ae20a3e0b28e01 | 15618040836e42dba0f77dd715a4d994 | Stirling factorial | {
if (n - k > k) {
k = n - k;
}
double result = 1.0;
for (size_t i = n; i > k; i--) {
result *= i;
}
for (size_t i = n - k; i > 1; i--) {
result /= i;
}
return result;
} | 0 |
ab3413aae503824839baca1f4aa4a124 | c0a556fdc1716fac77ba2d38237e6ead | The area of the smallest rectangle that surrounds all rectangles. | def area(a):
return numpy.prod([max(x.stop - x.start, 0) for x in a[:2]]) | 0 |
c7eeac748f786d7b2f98addb851b28dc | 6a52ad5c6c4a923f79d95a8476484044 | 创建SAP接口属性文件。 | SAPFunction createSAPFunction(); | 0 |
abb459ad448b34cb29b9bdcb97a00423 | 832e8e64a1ef082b9c68d2525e31e21a | Finds all the possible locations to which a dark knight can move | def possibleMovesDJ(x,y):
global board,possibleDestination,enemyDestination,possibleKillstination
possibleDestination=[]
enemyDestination=[]
possibleKillstination=[]
playField()
if currentPlayer=="White":
if board[y][x]==1:
try:
if board[y-1][x-1]==2 or board[y-1][x-1]==4:
if x !... | 1 |
f29f721ca96a28c3c4ce2c5f8efe0a69 | bd6db21cf6d6d53197b609c29abe9769 | Adds int64s. | fn i32(&mut self, value: i32) -> Result {
self.i64(value as i64)
} | 0 |
49e7b4c9b51e75cd38b0a2e42ad0bf31 | 6b9b0cc39e97e36960eda1dc8372f29a | Reads report data from file or URL. | class Report(Serializable):
def load(cls, path, steps_path=None, use_cache=False, service_hub=None):
url = urllib.parse.urlparse(path)
if url.scheme.startswith('http'):
suffix = os.path.basename(url.path)
with tempfile.NamedTemporaryFile(suffix=suffix) as temp_report:
... | 1 |
42edb303542201cfcc76dc78911d3d4b | d60747a8b6cd19b786081870e7c4e1cb | Copies packets from the controller's FIFO to the buffers queued on the
endpoint and invokes the callback for each buffer. | {
uint8_t count;
USB_Status_TypeDef status;
bool callback = myUsbDevice.ep0.misc.bits.callback;
count = USB_Ep0GetCount();
if (myUsbDevice.ep0.remaining < count)
{
myUsbDevice.ep0.state = D_EP_IDLE;
myUsbDevice.ep0.misc.bits.outPacketPending = true;
status = USB_STATUS_EP_RX_BUFFER_OVERRUN;
}
... | 1 |
73f85953a20d2b966c1e809d9954f14e | 3a000fdcf6eb4828cdd63ee914cd5fb9 | Adds a @msg_to key to every message in a list of messages.
Every msg_to uuid is resolved to include details of the user.
If the call for the internal user id fails, an exception will be thrown.
If the external user id cannot be found in the list that we got from the party service. There
won't be a @msg_to value return... | {
Iterator iterator = partySet.keySet().iterator();
MinecraftServer minecraftserver = MinecraftServer.getServer();
while (iterator.hasNext())
{
Object o = iterator.next();
Entity er = minecraftserver.getConfigurationManager().func_152612_a(partySet.get(o));
if(er != n... | 0 |
30e94b4bbec847dcabf0137f73f309f6 | 332f7e41c1064753f2de337d7a98bfde | 删除文件夹(级联删除子文件和子文件夹) | {
List<StorageGifFolder> children = getByParentId(folderId);
foreach (StorageGifFolder tmp in children)
{
deleteCascade(tmp.id);
}
deleteOneFolder(folderId);
} | 1 |
4c5a3f6cb4cb52c66d0e5f486c2f63eb | 1dfd4386aac15f673b3a70d1bc9eb7d0 | mtype: all 全球指数
as 亚洲指数
af 非洲指数
eur 欧洲指数
am 美洲指数 | def stockIndex(request):
china = []
with open(BASE_DIR+'stockindex\china.csv', 'r') as f:
bt = f.readline()
lines = f.readlines()
for line in lines:
blocks = line.split(',')
tmp = [blocks[0], float(blocks[1]), float(blocks[2]), float(blocks[4]), float(blocks[3])]
... | 0 |
0aa690fec6ee0066671090c533f1701e | da03b74869063934be1e47f5cd3c1d28 | 7일 후의 날을 구한다. | {
Calendar calendar = Calendar.getInstance ();
calendar.setTime (currentDate);
calendar.add (Calendar.DATE, 7);
Date newDate = calendar.getTime ();
return formatDateToString (newDate, dataformat);
} | 1 |
afb00fc8ed727cb83c4816c60f56ff4e | ba08b08fdcc81fdfcb0793736664a1fb | Answers the folder's synchronization information or <code>null</code> if the folder
is not a CVS folder.
<p>
To modify the folder sync info the caller must call <code>setFolderSyncInfo</code> with
new sync information.</p> | ICFolderDescription[] getFolderDescriptions(); | 0 |
043daedf4677aef90d3bc2ced8f40134 | 1b4909f924bd2278249ade400500eb44 | 看是否有lua文件更新,如果有,则重新打包Lua | {
if (Directory.Exists(sTempLuaDir))
{
Directory.Delete(sTempLuaDir, true);
}
Directory.CreateDirectory(sTempLuaDir);
string[] srcDirs = {
CustomSettings.lfuLuaDir
, CustomSettings.baseLuaDir
... | 1 |
10309a55755644a3b6c9d8f4f2a4af64 | 30d37d0f138301c38661ead643a12cd1 | Заканчиваем текущую игру и удаляем запись юзера | def finish_user_game(game, chat_id):
with shelve.open(sh_name) as storage:
if game + str(chat_id) in storage:
del storage[game + str(chat_id)] | 1 |
13a06f2c788334fb68b641cd42412979 | 30fbdde4d6357fcb905dd85048142ef6 | 跳转至快速投票页 | tools.session("voteText", text);
tools.session("voteDisable", disable);
tools.session("voteStepIdx", stepIdx);
tools.session("voteID", id);
tools.loading("链接跳转中");
location.href = tag.attr("data-href");
} | 1 |
904fb83605d3914e34740686c002a5c2 | a0161ffb56233dd1c1d44970de2a8ed2 | display the selcted artist to confirm delete | private void selectArtist(ActionEvent event){
tableView1.getSelectionModel().clearSelection();
ObservableList<MediaItem> tableItems = tableView1.getItems();
ArrayList<String> foundArtists = new ArrayList();
for (MediaItem m : tableItems){
if (!foundArtists.contains(m.getA... | 0 |
4876d80e7d8428c3662ebc6b56d995ed | c0c66d061379ae301af58a62e9e5cff0 | <p>
Return the County from the address of the contact
</p> | public class PhoneContact extends AbstractContactInformation implements ContactInformation, Domain
public void setCountyCode(final String countyCode) {
this.countyCode = countyCode;
} | 0 |
05823e252ae60d36c6b0f3788fd73f2b | 754b5b62a0958131bfc7609b56700a34 | Measures the time to run findClosestPoints() or findClosestPointsToEdge() with the
parameterized benchmark state configurations defined above. | perf::TimingsVector results;
arma::fmat data = perf::getRandomData(LEN, NUM_DATA);
vis::Index index;
index.build("benchmark", data, TYPE, NUM_TREES);
for (size_t maxComparisons : perf::MAX_COMPARISONS) {
perf::Timings t;
t.addParam("numData", NUM_DATA);
t.addParam("length", L... | 1 |
301dbf416beefc142c20e92a011f1d1f | bc96cc8cdb6bc9ab031160dd8d3f8f99 | Returns Heating Degree Days (meteo method) | Tmed_hour = weather_d.tmean.values
dNdt_sum = params['N_max'] * 1/24 * fN_T(Tmed_hour, params).sum()
return dNdt_sum | 0 |
1a2bf775b03041c2ef62871d22611579 | cde914a2df292145769caded1ec4aeb3 | A function to be called whenever something enters a spellmovement collider; in terms of functionality, we'll use this function to destroy the spell object prefab after it strikes with something's collider. | {
if (collision.gameObject.name.Equals(targetLocationObj.name))
{
isMoving = false;
GetComponentInChildren<WispAttackModel>().StartAttacking();
}
} | 0 |
8ff62f949d74273a4b7be5dafa46468d | 1f56bdfd7420828519e1e87b5d23431d | Function that integrates the velocity to obtain the new pose | {
double delta_x = (currentVelX * cos(currentPoseYaw) - currentVelY * sin(currentPoseYaw)) * dt;
double delta_y = (currentVelX * sin(currentPoseYaw) + currentVelY * cos(currentPoseYaw)) * dt;
double delta_th = currentVelYaw * dt;
currentPoseX += delta_x;
currentPoseY += delta_y;
currentPoseYaw += delta_th;... | 1 |
db2d656cf8d3f09ef351ebd25669de5c | 3a03d154605962cf72c75c6163156f83 | Return the word for a number less than 100 | def intToWord(numeric):
wordNumbers = ['zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten']
if numeric <= len(wordNumbers)-1:
return wordNumbers[numeric]
return random.choice(['lots of', 'many']) | 0 |
372a910cb79af9ba65b43d4950b087bf | e7bd1a4aeb65e33b2a3ddaaffada4b91 | write features for each token to a file that can be read by
the Mallet simple tagger | ft = codecs.open(t_file, 'w', 'utf-8')
k = 0
for s_file in s_file_list:
with codecs.open(s_file, 'r', 'utf-8') as fs:
lines = fs.readlines()
for line in lines:
word_list = line.strip().split()
for word in word_list:
if len(w... | 1 |
0d21bf976b312f27e479336567d46756 | c206e75fd2f5f49f53a957358a3765e0 | 获取更改用户密码的短信验证码, 如果手机号码格式正确返回数据为 {success: true, msg: \"已发送短信验证码至xxxxxxx\"} | class UserAccountController extends BaseController
public function get_sms_code(Request $request)
{
$phone = $request->get('phone');
$infos = array();
$rs_phone = check_phone($phone);
if(!$rs_phone){
$infos['status'] = 'f';
$infos['code'] = '4000';
... | 0 |
23aa264ce6b46908a7b4bc98dfc1b9a9 | 963c481bcc9a5f21cc2c757c5bbf6a21 | Método para ver las carreras administradas por determinado deportista | {
$ids = \DB::table('carrera')
->join('jornada', 'jornada.id', '=', 'carrera.jornada_id')
->leftJoin('combination', 'combination.carrera_id', '=', 'carrera.id')
->leftJoin('user', 'user.id', '=', 'combination.user_id')
->leftJoin('clien... | 0 |
5e68eb37681fec79dcbc714b0a689556 | 20683e4aeae204bab197812c1a2c8bc4 | Funzione che consente l'annullamento dell'operazione di inserimento di un link. | public class ReplaceDialog extends javax.swing.JDialog
private void btnAnnullaActionPerformed(java.awt.event.ActionEvent evt) {
highlighter.removeAllHighlights();
this.dispose();
} | 0 |
a28a801166dc99369717b43100dda432 | 81191b701ea3c26347683e6d9f412bcd | 更新录音时长 | public async Task UpdateDurationAsync(long id, int seconds)
{
if (id > 0 && seconds > 0) await _bookReadRecordAppService.UpdateDurationAsync(id, seconds);
} | 1 |
40b66ff1360e73e603e8d67e4fffcb31 | 5a9fc173c0555ecba53183cf853f7541 | Sets a List of MediaTypes for the Accept header. If not set the default value
is a list of MediaTypes which is taken from the defined {@link com.hubrick.vertx.rest.converter.HttpMessageConverter}.
Basically it means that you accept all types which you are able to convert. | T consumes(final List<MediaType> consumes); | 0 |
beaf84b2bde951b0cdc481a7396674c8 | 30158ef86c55de1d0b93ef5dcf83aa0c | Format we want to output | class CourseSerializer(serializers.ModelSerializer):
def get_format(self, instance):
return "Online" | 1 |
3cda1bedde753940ff1d867fdfbeac3f | 5b20472e0b1778d2f6df6ebba7dd858e | ! Set the damping parameter [0=low damping, 1=higher damping]. | class set_(PybindBase):
def _get_dampening(self):
return self.__dampening | 0 |
eb39da153195402484d1f2dc748257d0 | bd4277b536df65ba9ddab3a1ff7d2b53 | removes each relation between courier and regions | class CreateRegionsTable extends Migration
public function down()
{
Schema::table('representatives', function($table){
$table->dropForeign('representatives_user_id_foreign');
});
Schema::table('customers', function($table){
$table->dropForeign('customers_region_id_for... | 0 |
9b448c5acc6685d32f8e9e5de129498c | 0a797e19df22e18fb444647892755824 | Specifiy some game specific parameters, such as number of players | class Settings:
def __init__(self):
self.nrow = 3
self.ncol = 3
self.consec = 3
self.players = 2 | 1 |
2f4632f1b33033c57809e6a9cf32679e | 08a41bd821e15da46e566ebbbd82a933 | Display a listing of the futbolCinco. | class CuartosController extends Controller
public function index()
{
} | 0 |
75243fd587e0eb5933ab6a304c8326ca | 388bde81552eb096b41f3f45c350f4b3 | # lnames: list of variable-name vectors to add suffixes to
# csuffixes: character vector of suffixes -- one suffix per variable-name vector | cvNames.cv <- function(x) names(x$cv) | 0 |
0866d63acd13b5f93de2735463b49b0a | d378fdfee86f02009bae9bf7d46d2eb6 | On downloaded document. | void onDownloaded(Object beanId, long length, String filetype, String topic); | 1 |
d76c0413c23015bc9339a56ccc2b5f20 | 5f5bf252b4e58b637660c461645ea68b | 根据用户id更新用户微信信息 | void update(@NotNull Long id, @NotNull WeixinMpUserInfoDto dto); | 1 |
099e50530642233ac7f90b8d6b1568e5 | ad516208e717b202ada8c8bd9e8c3d72 | set number of threads allocated for ilastik classifier | void Likelihood_Dataset::set_threads_per_protein(int threads){
this->nr_threads_prot = threads;
} | 0 |
d2479480314f374d88f49367a6510153 | 4d7862c0d93ad520647f424818f3c595 | Méthode qui sauvegarde les commandes | class command_model extends CI_Model
function save($user_id, $montant_total, $rue, $infos, $ville, $code_postal, array $articles_in_cart) {
$data = array(
'user_id' => $user_id,
'rue' => $rue,
'code_postal' => $code_postal,
'ville' => $ville,
'infos' =... | 1 |
98b4b33cd37d4921249e71a2cfaa9e04 | 32b2520efdfa7f9c8fe627cba462251c | 通过菜名返回菜品信息 | can_name = request.GET.get('keyword')
diet_list = Diet.objects.filter(diet_location__icontains=can_name)
fried_list = []
veg_list = []
wheaten_list = []
soup_list = []
dessert_list = []
for diet in diet_list:
single_result = {'diet_id': diet.diet_id,
... | 1 |
f9a666d4dde8c595e972783e67d46ced | 810092c3c6a768758cccdfc6bf0c9309 | Called on reveal animation start | void Cards_Image::Reveal(Uint duration, Uint time_lag, Uint current_time)
{
_first_sprite = true;
_half_duration = duration /2;
Set_Transparent((Uint8) 30,_half_duration,time_lag,_info.Time());
} | 1 |
52a892bca961543d7c61ca228643bf56 | 7af62a9d7325c40828ffe021168e4525 | Shows the second step for the registration | {
if (Session["reg"] == null)
{
return RedirectToAction("Register");
}
var user = Session["reg"].ToString();
var cate = db.Category.ToList();
return View("SecondStep", "_Layout", cate);
} | 1 |
2ebe101a9f600b92392414f33fa2310e | 8b3c497f9de98addd5d637178c969978 | Hides the pause menu when resume is clicked. | namespace Assets.Resources.Classes.Driver
public class Driver : MonoBehaviour
public void HidePaused()
{
Time.timeScale = 1;
this._pauseMenu.SetActive(false);
} | 1 |
6fb2017b2eea72428744ce91bcdfa096 | ea9a1317521c98166918fd2bf5f78ed1 | Tested by Calling post call with invalid field value type
Eg : Field that supports number populated as String
Expected : 400 | public void testHasNoField() {
HttpResponse res = sendReq("/hasNoField?resetVal=a");
assertEquals(500, res.getStatusCode());
} | 0 |
74bc201e02eb969b43372faf3f96535f | d77ea3bce3adc88ca7cf286b3fb792f7 | Set starting state of scene objects | public class GameLoop : MonoBehaviour
private void Start()
{
m_SceneController.SetState(new StartScene(m_SceneController), "");
} | 1 |
1d5bb7599d3af0058f310fe5250c4c06 | 112ac656d25c825040fe70e1627e3c7f | 合并配置项的值,相当于数组merge操作 | {
$array = array_merge($original, $merging);
foreach ($original as $key => $value) {
if (!is_array($value)) {
continue;
}
if (!Arr::exists($merging, $key)) {
continue;
}
if (is_numeric($key)) {
... | 1 |
ad77aad7f9237e7b67c316d094ce496a | 21d59ebfa51c2429b20016736e18272f | Deleting all meals and orders in database | String hql1 = "DELETE FROM Meal";
try {
entityManager.getTransaction().begin();
entityManager.createQuery(hql1).executeUpdate();
entityManager.getTransaction().commit();
} catch (Exception e) {
entityManager.getTransaction().rollback();
... | 0 |
bd8e91df2ec61ada80b53bdede2419c3 | dd2b19d5e71848311060825f1bee7e9f | Writes the text representation of an object to the text stream. If the
given object is null, nothing is written to the text stream.
Otherwise, the object's ToString method is called to produce the
string representation, and the resulting string is then written to the
output stream. | public static void SerializeObject<T>(T value, TextWriter textWriter, JsonFormatterOptions options)
{
using (var jsonSerializer = CreateJsonSerializer(options))
{
ValueInterface<T>.WriteValue((IValueWriter)jsonSerializer, value);
VersionDifferences... | 0 |
79f789569961ab1117c67224bfc3445b | 35e2b9cdcab8f70f5aa07fec9e82a55f | converting all of them to single one-dimention list | res=[]
for i in a:
if type(i)==list:
res.extend(i)
else:
res.append(i)
return(res) | 1 |
1550d66652e6b346e9fc1c56182a5357 | daac7c70f080b06b68241f0f5a3807eb | Private abstract function to get wordnet synsets for the lemmas in the questions and answers | class Word:
def Noun_synsets(self):
return self._nounsyn | 0 |
511604e12248c4fe23baa03414eccde1 | 2ac86b1b8bee46b5c3b28985f0fca103 | GET: GiaoHang | namespace DoAn003.Controllers.Clt
public class QLGioHangController : Controller
public ActionResult Index()
{
return View();
} | 0 |
04df37cdab502d7fb3211682362a094e | 0c394870735806fc38d8dc20e98fc009 | 目前尚不需要返回ID | public class ImageAdapter extends BaseAdapter
@Override
public long getItemId(int i) {
return 0;
} | 1 |
1c2aa20caaed55a6d0fc2c3e46573525 | 4769852fef5cf329faac0b43ad6d49dc | The user made a guess by double-clicking on a list. | class Application(Frame):
def press_enter(self, event):
self.make_guess() | 0 |
66c110e234b4d996cb5b3140ae89e756 | 3615fbf14eecc5d73f45c2cbc61b3bc2 | Gets the optional link to the page
describing the error in detail | public class ValidateErrorException extends Exception
public String getErrorPage() {
return errorPage;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.