query_id
string
corpus_id
string
query
string
code
string
label
int64
8b13a3265dcacc0096aa551bf5da2560
7fdef2554c204d4901a95423eb46bd06
根据行号列号取得单元格xmlDom超链对象
var returnValue=null; if(xmlDom!=null){ var pois = xmlDom.selectNodes( "/"+XZSoft.variavle.Root+"/"+XZSoft.variavle.CellNode ); for (var i=0;i<pois.length ;i++){ var flag=-1; var attrs=pois[i].attributes; for(var j=0;j<attrs.length;j++){ if(attrs[j].name==XZSoft.vari...
1
b91cf881a1874422bc7291e118b95a57
922465907deba0b489d243ee8e333d34
Called when command prefix is not recognized.
{ Console.ForegroundColor = ConsoleColor.Red; Console.Write("That command is not supported or is misspelled!\n"); }
1
d3eadc5610217b454df06c29afbdf629
763bb5854fb4178bd79ab0473b7269cf
Konwertuje char na string
public class Console public static String CharToString (char ch) { return String.valueOf(ch); }
1
b2e8578b6bf738ea561fd672a6d985e2
4f642b461ed14bac4c23410e1c95b033
返回子公司Id列表
@Component @DependsOn("springContextHolder") open class ConstantFactory : IConstantFactory override fun getSubDeptId(deptid: Int?): MutableList<Int> { var wrapper: Wrapper<Dept> = EntityWrapper() wrapper = wrapper.like("pids", "%[$deptid]%") val depts = this.deptMapper.selectList(wrapper) ...
1
ad6d0c4cfd55157296474af2c59bf0ad
ad21ea280267b4ecb35f099f1b966461
Overridden to catch special relationships to standard CMS models
{ return [ $this->relation->getPlainMorphType() => $this->relation->getMorphClass(), ] + parent::getExtra($model); }
1
c9548d776093d3c626ec82dac12a0e43
90669b6ccc1102393b41cfcaa0c5c200
defining the relationship with SubCategory class
class Items extends ActiveRecord public function getSubcategories() { return $this->hasOne(Subcategory::className(), ['id' => 'subcategory_id']); }
1
dc4eff1c8661d34f8a1420e63b6d5172
c5280ae6ddd8e8d92584990a1fc718bd
Method that turns input into a SchoolSet
def make_set(x): return str(x).split()
0
aad953895404c64ed897e44e9721a6ae
1c50739f80f755ffe1b8ccd9e3baf0da
Generate zoomed versions of radar scans keeping array size constant. Note: https://stackoverflow.com/questions/37119071/
print("\nDownsampling array by %.2fX" % (1. / factor)) shape = array.shape if len(shape) == 2: new_array = zoom(array, zoom=factor) print(new_array.shape) return new_array elif len(shape) == 3: N_PSF, old_pix, _p = shape ...
0
a0344a107a569c6d472bfba422c4721c
04f7eaa7abcc483588865ba92341af24
Сохраняет информацию о пункте автозаполнения.
namespace Remontinka.Client.Core void SaveWorkItemServerHashItem(WorkItemServerHashItem workItemServerHashItem);
0
d7dbbabc9746c02e2f5b0da24a9eb2ab
d7ff8fbfb704e963f20cd9690e142f38
Averages the values of border pixels.
Quickdescent::averageBorderValue(PyArrayObject *im) { npy_intp y, x; double total = 0.0; int n = 0; for (y = 0; y < shape[0]; y++) { for (x = 0; x < shape[1]; x++) { if (isBorder(y, x)) { total += *(float *)PyArray_GETPTR2(im, y, x); n += 1; ...
1
351db2e934ebc191e6e8f1a55f6e3bb7
de8dbaa4e6b93da6068bd90b7689bc78
WithTracer returns an option that sets the tracer.
func NewTracer() *tracerS { return NewTracerWithOptions(nil) }
0
10f2b55436843ae0b6185b993b29513d
2215028d314bb1195175b0aca635591c
根据用户ID与系统类型查询菜单授权码
{ var funcs = base.CommonDAL.GetUserAuthority(iAdminID, systemType, out string msg); if (string.IsNullOrEmpty(msg)) { return MessageEntityTool.GetMessage(funcs.Count, funcs, true, "完成", funcs.Count); } else { ...
1
56d499102095b6bfe367ba95c9999ebe
baa23ce796782a5440ced199ae8caed3
First checks if only positional arguments are provided. The resource_free() function is being called every time the program exit with error or normally Then the resources are alloated (shared memory and semaphores opened) For random values which are needed for the vertices shuffle, the current time in nano-seconds is u...
shmResourcesSemId = createSharedMemory(sizeof(int), 0, SHM_SEM_RESOURCES_ID); printf("%d\n", shmResourcesSemId); resourcesSemId = (int *) attachSharedMemory(shmResourcesSemId); }
0
b9707eb6464a196a8304fb597c33f3f8
1e196a01c646eaeea94d01231ebe967c
Deletes downloaded and stored files related to the entity about to be deleted.
{ if (! isset($this->entityFiles)) { return parent::beforeDelete(); } $modelKey = $this->getModelKey(); return $this->deleteDir($this->{$modelKey}) && parent::beforeDelete(); }
1
a79f9b8fb335349d90c11d6e16ada461
3f3848a94d77b2e41c54949f24da9336
Login to some account, with a given username and password. A function, kickout_method, can be provided. If provided, the function is called on this username, to kickout an already logged in user. kickout_method exists as this logic is required for any chat application that cannot have multiple people using the same acc...
def login_to_account():
0
5a23a2092278ff535ee35c166b306a38
91d0d43a2711e04ab99dafaa7991cf33
Clears all data from the lab work list.
class AlgorithmWorkspace: def remove_all(self, event): self.list.delete(0, tk.END)
1
3aeda6fef696f025ebb7b889a4d64b0f
0b37ba2f249ce9e9ec92788194a105f5
Enqueue scripts for back-end.
final class Revealer function enqueue_backend() { add_action( 'admin_enqueue_scripts', [$this, 'load_admin_styles'] ); add_action( 'admin_enqueue_scripts', [$this, 'load_admin_scripts'] ); }
1
366c3d9288dbd90af647c4a0cb7200d4
44cab7c4600b0aad48a0d9f942ac7657
Initialize the RTC oscillator and select 24 hour representation.
static void* rtc_init(device_t *dev) { rtc_read(); IRQ_OFF(); io_outb(CMOS_REG_PORT, 0x8B); uint8_t reg = io_inb(CMOS_DATA_PORT); io_outb(CMOS_REG_PORT, 0x8B); io_outb(CMOS_DATA_PORT, reg | 0x40); io_outb(CMOS_REG_PORT, 0x8A); reg = io_inb(CMOS_DATA_PORT); io_outb(CMOS_REG_PORT, 0x8A); io_outb(CMOS_DATA_PORT,...
1
3e216407febfee30360a6598d9206ba5
8a9872a57108b0a37946c46555a4f096
Drawing cube with edges only.
a, b, c, d, e, f, g, h = cube draw_3dline(surface, color, a, b) draw_3dline(surface, color, b, c) draw_3dline(surface, color, c, d) draw_3dline(surface, color, d, a) draw_3dline(surface, color, e, f) draw_3dline(surface, color, f, g) draw_3dline(surface, color, g, h) draw_3dline(surf...
1
a8c1457d65af42fa3037d571de7f61a6
0ab258ffa2488a2697d84b8aff291e0a
Filter list of machines matching an expression
expression = re.compile(exp) instances = [] for node in ec2_instances(): if node.tags and ip(node): try: if expression.match(node.tags.get("Name")): instances.append(node) except TypeError: pass return instances
1
4969bce25c12a01cb5788b8e671cef98
86ba775120f23a2d9d295eddf946b228
输出较长的字符串
class Helper public static function breakLongString($input,$length=0,$ellipsis=false,$tail="") { $len=mb_strlen($input); if($len>$length){ $new = mb_substr($input,0,$length); $ellipsis and $new=$new."...".$tail; }else{ $new=$input; } return $ne...
0
585cb1871a9414b2729bd8e6122aa703
2d834559065ad90b4acea22708d8a239
Disable logging completely regardless of any set loggers.
namespace MACS public abstract class StaticLoggable public static void DisableLogging() { enableLogging = false; }
1
f029808979dfef80907360e36ee10e8d
74b87913182f7b05ca3b462885ed0709
Method called before a package is removed from the rule base
public boolean onRemoveBefore(SharedContext context, boolean isLocal, Object key);
1
93ebd9ad946ac68c5052552340f31525
d444406701c28b92f9330980a034e926
Gets the default recipient.
final InternetAddress[] senders; try { senders = InternetAddress.parse(MailConstants.DEFAULT_FROM); } catch (AddressException e) { throw new MojoExecutionException("Could not parse default sender mail address " + MailConstants.DEFAULT_FROM + ".", e); } return senders; }
0
607f1d373b8c7acf26bb6791ff615f57
7aae95b4f9cbcc4d3c306e22a2d4539f
Selects MapAccuracy records by PK
{ SqlParameter _MapAccuracyID = new SqlParameter("MapAccuracyID", SqlDbType.VarChar); _MapAccuracyID.Value = DO.MapAccuracyID; SqlParameter[] _params = new SqlParameter[] { _MapAccuracyID }; return DataCommon.ExecuteScalar("[dbo].[MapAc...
0
90ef2eeba96410cb3aba767dbedadb8a
66f387b7578d4a00a088b8762a823099
システム日付を取得する(yyyymmdd)
public class DateUtil public static String getSystemDate() { Date d_Temp = new Date(); Calendar calendar = null; calendar = Calendar.getInstance(); calendar.setTime(d_Temp); int i_Year = calendar.get(Calendar.YEAR); int i_Month = calendar.get(Calendar.MONTH) + 1; ...
1
6c1c85fa172cbaaaa64918497a15d617
4334c2e8b0d984b82a4e0c6027c8d943
Displays a tree of all available folders for the current user
{ $data = Folder::with('parent', 'childs', 'documents')->where('root', true)->where('group_id', Auth::user()->group_id)->first(); $folders = Folder::where('group_id', Auth::user()->group_id)->where('id', '!=', $data->id)->get(); $foldersArray = array(); foreach ($folders as $folder) { $foldersArray[$f...
1
43b4a8e2f7dc89cfeb29c99440b39dc5
56bf3941ca77f2e1e7cf3184f4147d70
return true if row is a property row false otherwise
public function isProperty(): bool;
1
c7d04d3e0af316ac04f4719cda3568bc
5dd3e724e8191afc88afb273ec0d8153
Print an output line.
int PrintLine ( char* data) { int i; int number; int line_char; number = atoi (data); if (number <= 0) number = pageWidth; if (strlen (data)) line_char = * (data + strlen (data) - 1); else line_char = '='; for (i = 0;i < number && i < pageWidth;i++) dataOutput [i] = line_char; dataOutp...
1
42505c7ce7224b3220786223fff250d6
9bb0674d5551ab09aced392646130d2d
Skinned draw function for moving meshes.
namespace yocto void skin_vertices(vector<vec3f>& skinned_positions, vector<vec3f>& skinned_normals, const vector<vec3f>& positions, const vector<vec3f>& normals, const vector<vec4f>& weights, const vector<vec4i>& joints, const vector<frame3f>& xforms) { if (skinned_positions.size() != positions.size() ||...
1
5ecd36c08e7428a0de1d9446ef47ce97
cd7184b731d611a4343657814390643c
Метод getDateWhenUserLoggedFirstTime() должен возвращать дату, когда пользователь залогинился впервые за указанный период. Если такой даты в логах нет — null
interface QuarantineRepository fun observeDateOfFirstSelfDiagnose(): Observable<Optional<ZonedDateTime>>
0
db3b37bd2b60677af72807e311379b97
3fc6c4874677e143b0700567255ec8bb
Checks to see if Left Mouse Button is held.
namespace Jewel_Chase public static class Input public static bool LeftMouseButtonIsPressed() { return currentmouse.LeftButton == ButtonState.Pressed; }
1
f47c87552181605b4b476df3ca314ff2
ff65f17f854bdc192835777690dbefb0
Вызывается при успешной проверки формы регистрации и сразу авторизует юзера после регистрации
class UserRegistration(CreateView): def form_valid(self, form): response = super(UserRegistration, self).form_valid(form) username = form.cleaned_data['username'] password = form.cleaned_data['password1'] self.auth_login(self.request, username, password) return response
1
4f0cada8cb5d1c5aa26bf5d0c89322e4
e8b530d92400b9a0c5b0726d12f26bf8
Effectue la réservation d'une occurence.
class CalendarAction public function reserver($journee, $id) { $sql = $this->db->prepare('INSERT INTO calendrier(journee, id_user) VALUES (?,?)'); $result = $sql->execute(array($journee, $id)); if ($result) { $this->db = null; return true; } else { ...
1
bc0e0275d9adfc8303c5ed8ea1260fcf
bed8c5cd7bc9ed618a7e1f1e3137ba19
Deletes one row from the [dbo].[Grant] table.
namespace DataAccess public class UserPermission : DataAccessBase public void Delete(Guid recordId) { string commandText = "DELETE FROM UserPermission WHERE RecordId=@RecordId"; try { SqlConnection conn = null; SqlCommand command = null; ...
0
6a49ff9c3136d4520241ac5d07888ed4
5a22b35dadc5afda3dc18797a7ab27f4
Construct a rollback task.
class StructuredRollbackCommand extends RollbackCommand public function __construct(StructuredMigratorInterface $migrator) { Command::__construct(); $this->migrator = $migrator; }
1
8a29c97b1e4b8a5fc71e0d15cab96e46
3ee418fb3cd32ddea78454618efcb69a
Make sure the first and second type names, type types, and type type names are recorded correctly.
simpleType1 = XSDData.XSDSimpleType("Test1","string") simpleType2A = XSDData.XSDSimpleType("Test2","string") simpleType2A.enums = ["Enum1","Enum2","Enum3"] simpleType2B = XSDData.XSDSimpleType("Test2","string") simpleType2B.enums = ["Enum1","Enum2","Enum3","Enum4"] simple...
1
43d14f881b83a6570c8c0e6370acb22b
8f2a79676990209368e543d379f35656
Call this to stop the main networking thread
namespace Kingdoms_Clash.NET.Server public class Multiplayer : IMultiplayer public void Stop() { this.StopMainLoop = true; }
1
f4f56a6a453a68d5594a1b67e538c38a
45994b4b25b6ad0dfeeb4cfa81417942
Changes total amount to be displayed after a purchase has been made
public class EditingFrame extends JDialog public void updateTotal(int newValue) { EventQueue.invokeLater(new Runnable() { @Override public void run() { totalField.setText(String.format("%,d", newValue)); } }); }
1
368e12543d720cc3a42ae12559918315
36b0e43ccf6a49fda5e37183f3a5a952
Say the time in portuguese language.
class LoginPage(BasePage): def lenguagePortuguese(self): time.sleep(3) self.elementClick(self._lenguaje_dropdown, locatorType="xpath") self.elementClick(self._portuguese_button, locatorType="xpath") time.sleep(1)
0
ba6a4a6c78ce42dd7ac5a0e006597bca
8bb95ad08cd7ff5daa96c00b6d24bbbd
Returns the meta object for the containment reference '{@link robomodel.robo.condition.Comparison#getLeft <em>Left</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getComparison_Left();
1
3132b5226422b550a324c3ea54033504
c8f63ecc029e6216bced05a2c902180c
populates data into the selection panel based on which npc the player is in range of
class CvMercenaryManager: def populateHiredMercenariesPanel(self, screen): mercenaries = objMercenaryUtils.getPlayerMercenaries(self.iActivePlayer) mercenaryCount = 0 for mercenaryName in mercenaries: mercenary = mercenaries[mercenaryName] mercenaryName = str(mercenaryName) if(mercenary.getBuilder() == m...
0
2ab0ea137c9e01d058a64c201588975f
9b40af48fee6a32219814c83a2ffa4a5
NewCleanup returns an initialized cleanup object.
return &PostfixExporter{ showqPath: showqPath, logfilePath: logfilePath, cleanupProcesses: prometheus.NewCounter(prometheus.CounterOpts{ Namespace: "postfix", Name: "cleanup_messages_processed_total", Help: "Total number of messages processed by cleanup.", }), cleanupRejects: prometheus....
0
4bd4415a5936569d7b747b88fa107233
cab365edb2ace89f0d00b1758d6abfd4
传感器信息更新并发送HCU控制命令
namespace TwoPole.Chameleon3 [Activity(Label = "HuaZhongSensor")] public class HuaZhong : BaseExamActivity public void UpdateCarSensorState() { try { if (ExamContext.IsExaming && !StartEndStatus) { tvScore.Text = string.Format("...
0
6768c4d4199f0a1f63a36827cc27a776
6928e6c44f85eb1b4d93bf283a5e3279
Saves a play that was made by the human or the computer
Path p = Paths.get(System.getProperty("user.home"), "hive-" + System.currentTimeMillis() / 1000 + ".txt"); try { Files.write(p, moves.stream().map(Move::representation).collect(Collectors.toList()), StandardOpenOption.CREATE); new InfoMessage(Hive.BUNDLE.getString("modes_play_report"), MessageFormat.format(Hi...
1
2376c80bcf53df88a5b047453dfdaec3
79ed110461bf78bb527f3fce8f3fe02d
移除聊天室白名单成员。
export class ChatService extends CommonService public removeblack(blackId: string): Observable<Signalman> { let url = IMCONSTANS.path('im/black/remove/'); return this.post(url, {blackId: blackId}); }
0
b8d335ff0631dc729e21720d975902b6
a441a0021040a4bfc4739e303723c657
Throws the exception being built (to be used in {@code Consumer} lambdas).
@Slf4j @RequiredArgsConstructor public class Then public void withCustomException(Class<? extends RuntimeException> clazz, String msg) { if (this.value) { throw createInstance(clazz, msg); } }
1
f19ce963a88330f88bea594f97841b30
e5afaba160b366fc29a7630ad2c9cfb0
密码输入框禁用复制,粘贴功能
var ev = e || window.event; var obj = ev.target || ev.srcElement; var t = obj.type || obj.getAttribute('type'); var vReadOnly = obj.getAttribute('readonly'); var vEnabled = obj.getAttribute('enabled'); vReadOnly = (vReadOnly == null) ? false : vReadOnly; vEnabled = (vEnab...
0
0e43f8bf83192e408232bf629fd32dc3
188e1aa6c1aa88f5fd2dafc0d6e5d860
判断一个物体是否被选择
{ bool isSelected = false; #if UNITY_EDITOR Object[] selectedObjects = UnityEditor.Selection.GetFiltered(typeof(GameObject), SelectionMode.Deep); for(int i = 0; i < selectedObjects.Length; i++) { if(selectedObjects[i] as GameObject == gameObject) { isSelected = true; break; } } #e...
1
cabd0d1328ab213117ab189e8c6e8834
2b482c0def37f8ceb3ed7aaa490985e4
菜单相关服务
function sessionService(HttpService, $cookies, AlertService, $location, $rootScope, $rootElement) { var service = this; service.login = login; service.register = register; service.getCheckNumber = getCheckNumber; service.forgetPassword = forgetPassword; service.modifyPass...
0
480b01a27a2895309042fab8d87410d9
0e9aa72410f843e84a4fd2e95ced3226
Shift blocks downward after a block clear
void blockdown() { for(int i = 0; i < 6; i++) { for(int j = 10; j >= 0; j--) { if(zone[j][i] != '.') { int blockx, blocky; blockx = i; blocky = j; while(blocky + 1 < 12 && zone[blocky + 1][blockx] == '.') ...
1
7a93015e8e0ca984b36867a42d607e40
162337a124c9b592cfe709fdb7e6fb26
This method is invoked when the mouse leaves the rating item.
{ if (HoverLeave != null) HoverLeave.Invoke(this, EventArgs.Empty); if (ToolTip != null) Gwen.ToolTip.Disable(this); Redraw(); }
1
765be6daada64fb39f5935a6acc99609
74db48dcf2d626d76e4428cf6459a35b
修改主题状态,同时修改主题所有回复的状态
class Topic extends Controller public function updateStatusByTid($tid,Request $request) { if (!$request->isPost()){ return json(['msg'=>'请求错误'],400); } $input = $request->post(); $validate = $this->validate($input, UpdateTopicStatusValidate::class); if (!$validate...
0
437269bf867f78624cdd6ad313edd356
51edc2e2c1daa053a5565ca729befbd5
Catch all mechanism to add additional database calls to the batched updates in SaveChanges()/SaveChangesAsync()
namespace JelaCoreLib.Base.Data public abstract class JelaDbContext : DbContext, IJelaDbContext public override Task<int> SaveChangesAsync(CancellationToken cancellationToken = default(CancellationToken)) { OnBeforeSaving(); return base.SaveChangesAsync(cancellationToken); }
0
0c4518eae4bc821e14cad43fb81950d8
489edaf372d8a61042c78bbca3483a49
Implementation of iSLIP scheduling
for (VertexScheduling a : list) { int relatSlot = slot % a.getGraphDead(); int dId = a.getGraphId(); if (level >= 1) { if (level != getLevels() - 1 && a.getWcet(level + 1) != 0) { int deltaI = a.getWcet(level + 1) - a.getWcet(level); if (scheduledUntilTinLreverse(a, slot + 1, level + 1) <= delt...
1
9c5cfadd2c6ae654a2e61f3e0da0cabc
5482278e5f87137ec04b6ad3e276c3c6
Проверить равны ли строки, и если нет то обьяснить какой кодпойнт отличается. Совершенно необходимо для работы с различными пробелами.
def primary_check(redirect, target): def compare(redirect, target): replaces = { "е": "ё", "'": "’", "\"": "«»„“", "-": "—" } if len(redirect) != len(target): return False for idx, rchar in enumerate(redirect): tchar...
0
568c0babd75454611d332c2ace645435
3aa5cf425832b1857c5db190c61d9c95
Devuelve verdadero si un detalle de producto está en el rango de valores del filtro
if (row >= 0) { String cod = tblLineaPedido.getModel().getValueAt(row, 7).toString(); for (LineaDetalle l: factura.getLineasDetalle()) { if (l.isProdVario() && l.getVarios().getCodigo().equals(cod) ) { return true; ...
0
bee89f2bbafd4fc3809e29a857d3a0dd
d6baf9377e8bf99123a9e7ef19abd415
获取径流旱天模拟步长
public class ThreadPool public int getStep() { return config.getStep(); }
1
6f41e60bcfd7e6bd3488b9262125377c
399dba6f08841fdf2d61ea42c0281280
Cree une liste composee seulement des lignes possedants plusieurs mutations.
class Trace: def prune_list_M(self, list_M): debug_prune_list_M = False if debug_prune_list_M: print "prune_list_M():" uniq_list_M = [] n = len(list_M) for l in range(0, n - 1): lMl = list_M[l] lMl_dG = float( int(1000*lMl[3]))/1000.0 ...
0
e09ed1f0922258c4ab208b826a088cbe
5365bf87750c68be421f28ad55466737
Verifica se houve erro ao alocar memoria para algum dos items do menu.
{ try { Node *q = new Node; delete q; return false; } catch (bad_alloc exception) { return true; } }
1
e96248af474a6df3e6ff15ea1d37261c
b3c495968fa3b888221b91640ed98a63
{@inheritDoc} <pre> colValueは保存されたファイルパスが渡ってくるので、その内容を解析し、fobjに設定します。 </pre>
@ASourceMachine public class FStatisticsFinancialMarketerPhaseUnit extends FLogicUnit @Override public void load(FRow row){ super.load(row); for(IStringPair pair : row){ String name = pair.name(); if(RString.isEmpty(name)){ throw new FFatalError("Row format is invalid....
0
acbeb2f1c32409d57edc9a303017aa57
e33aa990f867fbf5e41cadbe055bf21e
Перегруженный оператор вывода
{ if (typeid(ustream).name() == typeid(ofstream).name()) { ustream << obj.size << endl; for (int i = 0; i < obj.size; i++) ustream << obj[i]->getData() << " "; return ustream; } else { ustream << "Вывод списка из " << obj.size << " элементов:"; ustream << endl << "-------------------------------------...
1
59b2055620973bd2be6f09ea7f3ee521
d9531e08a287699428298c61000169ed
Handles the <b>Grafana Dashboard</b> command.
String result = HttpUtil.get(grafanaUrl + API_DASHBOARD + "/" + appName, BEARER + apiKey); return result; }
1
307c21171b702b7395daaa9d0ce0975a
5d314704c26e816707afd2752f1c588d
Function to generate new MAC address
last_two = "".join(macaddr.split(":")) last_two_int = int(last_two,16) new_last_two_int = last_two_int + 1 new_last_two = hex(new_last_two_int) new_last_two = new_last_two[2:-1] for i in range(len(new_last_two),12): new_last_two = '0'+str(new_last_two) new_addr = "" for item in r...
1
8adfb908c7871c5e9899091fea5010b7
27830bc7f433b547ba734ab6030c431c
Construct a Solid by lofting an array of curve cross sections and using curve(s) as the guide to control the lofting shape.
url = "rhino/geometry/brep/createfromsweepinparts-curve_curve_curvearray_point2darray_bool_double" if multiple: url += "?multiple=true" args = [rail1, rail2, shapes, rail_params, closed, tolerance] if multiple: args = list(zip(rail1, rail2, shapes, rail_params, closed, tolerance)) response = Util.Co...
1
5cef03ad398421aedd6ef0a960b3e5c1
aa3c396c2912f064bae614da97f97f8d
This function will configure and program the CPGC DPAT Unisequencers. The PGs must be selected before this call.
void io_set_cpg(void) { SYSTEM.SCKCR.LONG = 0x00020100; }
0
efff11e8af40c6bee6730eea89a11ece
bebec10ef3fd7db3bc63dafaa0aaae20
Gets the number of formatting records on the list. This is used by the writable subclass because there is an upper limit on the amount of format records that are allowed to be present in an excel sheet @return the number of format records present
{ InterfacePtr<ISelectionManager> selMgr (Utils<ISelectionUtils>()->QueryActiveSelection()); InterfacePtr<IExportProvider> inCopyExportProvider (selMgr, IID_IINCOPYEXPORTSUITE); if (inCopyExportProvider) { return inCopyExportProvider->CountFormats(); } return 2L; }
0
2bd2cef1b1d7ecc95ea4e01033ba5c9b
3ffb4cd204cece0069dc83a6548892fd
根据科目号得到对应信息
function get_subject_info($id){ return get_row_info($id,'subject','sj_id'); }
1
5c024142e4119148f226a21857058cff
25c52cb8e51ed396f123d9b5615ee3cb
Sets balance for some currency. Overwrites any previous balance of same currency
boolean setBalance(BigDecimal money);
1
267b52d0cc230212471d7d2192ea82d1
714213fdf8081a0ca778caf912e9a8cf
pobiera liste zawodnikow w meczu, pelnych obiektow zawodnik
{ $rowers = array(); $query = ' select id, name, surname, rowerstatus from rower left join event_has_rower on rower.id = event_has_rower.rower_id where event_has_rower.event_id = '.$eventId; $result = mysql_query($query); while($row = mysql_fetch_assoc($result)) { $rower = new Rower(); $rower->id = $row[...
1
cb8ebf2b6ea9249b0d3cccb486f58af6
7b1505731a54c5fb84cbc349933a09ad
Given an image below function returns rectangle for face detected alongwith gray scale image
def face_extractor(img): try: detector = MTCNN() a = detector.detect_faces(img)[0] box = a.get('box') cv2.rectangle(img , (box[0],box[1]) , (box[0]+box[2] , box[1]+box[3]) , (0,255,0) , 2) cropped_face = img[box[1]:box[1]+box[3] , box[0]:box[0]+box[2]] return cropped_face except: pass
0
732f88e5911a209484e39b5cae32bcb5
8a4c37ec881fa8eff36c383478526f39
open a file or die with an error
{ $f = mayOpen($filename, $mode); return !$f ? die() : $f; }
1
9279aabd46719646bb922cbd383bfd98
64ce40e9fdcc8b252ff7e65b8fcf80d0
parsing:
fn parse_let(input: Span) -> IResult<Span, SpanExpr> { map( tuple(( preceded(multispace0, tag("let")), alt (( map( parse_prefixed, |p| p ), map( parse_var_with_type, ...
1
7d0dc2ee82b6fa9ffea79304884951c5
88ac2ca980ad798bd990b9fabe0f812e
Serializes the FlexMatcher object into a model file using python's picke library.
retval = self.to_dict() retval['class'] = self.__class__ with open(fname, 'wb') as fid: pickle.dump(retval, fid)
1
16fa67cec8377be5bb42478594c9f170
f522e4d6feb5211ffa99da0dd25cae24
Поиск максимума целевой функции
public class MonteCarloIntegrator implements Integrator private double getFunctionMax(Function<Double, Double> fun, Range range) { double max = Double.MIN_VALUE; double t = range.getFrom(); while (t <= range.getTo()) { if (fun.apply(t) > max) { max = fun.apply(t); ...
1
02050c97abfbb450ca4386cbfa643d82
a325e2e3195b38c668a2ea4d222fd184
getter for the lesson description
public class CreateTeacher extends Activity private String getLessonDescription(){ EditText descriptionET = (EditText) findViewById(R.id.lessonDescription); return String.valueOf(descriptionET.getText()); }
1
8905d114f47b98eca28553114ff4f782
f2ce3c90ca793b82ca1261bc76d11b07
Creates an image URL with http://lorempixel.com. Note: This service is slow. Consider using PicsumUrl() as a faster alternative.
namespace Sitecore.Reference.Storefront public static class Helpers [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2234:PassSystemUriObjectsInsteadOfStrings", Justification = "I want to use them as strings.")] [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA10...
1
3b531222606361fc7dc59656ac84d4ab
64e67a2b4ee5c97d38791d822f6265e5
Generate tables for precision and recall at a query level for given precision and recall indicies.
pairsScores= resDf["prediction"] testLabels= resDf["categ"] auc_val = computeAUC( testLabels, pairsScores) precisionAt=[] recallAt=[] probability_sorted_indexes = pairsScores.argsort(axis=0) probability_sorted_indexes = probability_sorted_indexes[::-1] for evalPoint in EVAL_PAIRS_AT: try: labe...
1
012d95be7ca229e38141578c4f07f751
1757d53131a25e1c0195bb8550683a19
Updates the progress of the read only initialization.
{ if (ExitIndication) return; if (CountAllReads < InerationRead) { ClearConsoleLine(); Console.WriteLine("Please wait..."); } else if (InerationRead == 0) { Console.WriteLine("Loading 0%"); ...
1
18de6029c5155679587136d702a45de6
ade07f3782216bbf88ad836329c90d7e
Clear all items from localStorage that are using our prefix
let len = localStorage.length let keys = [] for (let i = 0; i < len; i++) { let key = localStorage.key(i) if (key && key.startsWith(prefix)) { keys.push(key) } } keys.map(key => localStorage.removeItem(key)) }
1
123018c19944c793a72e056244d729d1
8774b38d9888cb90fca53abc0d8e80a2
初始化神经网络,支持五种类型
if init_type == 'normal': net.apply(weights_init_normal) elif init_type == 'xavier': net.apply(weights_init_xavier) elif init_type == 'kaiming': net.apply(weights_init_kaiming) elif init_type == 'orthogonal': net.apply(weights_init_orthogonal) else: raise NotI...
1
825106a0e577cdebb60633c92b210c7d
95867b8adb4d7fc90b48eca8a30167ca
Returns if a landmark can be visited (if it is within range of the user)
{ if (!IsHexWithinBounds(x, y)) { return false; } if (!GetHexTile(x, y).IsTraversable) { return false; } return true; }
0
6ceaeb96441ce515318d6dc395b6d131
fd1842498e462cd6881e88d96f3c090e
计算实体之间的互信息量并且保存成供下一步最小生成树的生成
print( '计算实体相似度矩阵...' ) metapath_simMatrixs = { } for r in tqdm(metapath_al): metapath_simMatrixs[r]=\ s42_pathSim.getSimMatrixFromAl( metapath_al[r], max(movie_set)+1 ) return metapath_simMatrixs
0
895c181d64134b2027eb945db3cba446
d806e128ad4527bbea31eaab7bce6351
Instructs the Raspberry Pi to dump the last N frame to disk. This can be useful in debugging to obtain a record of what the camera saw.
class SEM_SmartSEM(SEM): def save_frame(self, save_path_filename): ret_val = self.sem_api.Grab(0, 0, 1024, 768, 0, save_path_filename) if ret_val == 0: return True else: self.error_state = Error.grab_image self.error_info = ...
0
c0b43aee8fea34fe9635ef51137bd96e
37a37420b4052e7c6f9d70713eb86552
Changes route when type selection is modified
namespace CarRentalSystem.Forms public partial class SearchPage : Form private void carTypyCB_SelectedIndexChanged(object sender, EventArgs e) { UpdateList(); }
0
babd7910a982dfd7e9a3a06df40729d2
d6db3875ad270c3153283d681e465d85
Создает папку на Google Drive
[HttpGet] public IActionResult NewFolder(string parentID, string name) { var service = GetService(); var newFolder = new Google.Apis.Drive.v3.Data.File() { Name = name, Parents = new List<string>() { parentID }, ...
1
0d2a2d90a9f5a5be2795074ab8260352
7326d62594c96c0100b4b340db801b2f
최종 환불
class class_EN00 extends class_top function return_complete() { global $connect, $seq; $query = "update return_money set is_complete = 1, complete_date = now(), complete_worker = '$_SESSION[LOGIN_NAME]' where ...
1
5754b87f2b982ffc71b142d1d4c8d384
ffd41e68b5e976cd318927ead0dda8df
Hide a loading view.
interface ILoadDataView : IView fun hideLoading()
1
3291dcea785d7b389b4275c18b3a4f04
b5a41dd377fc538d60886f214bb13a06
设置鼠标经过时的外边色
function mouseOut(obj) { obj.style.border = "1px solid #F7F7F7"; }
0
e53f8d0d10561c4d14bd948a3a8f4140
15fd8301b18ab102c9a83beb6276230e
jsonpレスポンスを返す
class ApiController extends Controller public function responseJSON($data): Response { return new JsonResponse($data); }
0
a61c10d0ee5a0b2b32a86aba93417445
501b8df706417ef4a3f2d4b8ad041ab0
Given a set of changed filenames, invalidate all related FilesystemNodes in the graph.
class baseFileCommands: def writeDirtyAtFileNodes (self,event=None): c = self.c self.assignFileIndices() changedFiles = c.atFileCommands.writeAll(writeDirtyAtFileNodesFlag=True) if changedFiles: g.es("auto-saving outline",color="blue") c.save()
0
976bfc55385e6c225af00d9ee0f85be5
21ce4b61345ef5465a07072b6f38c2f4
设置是否为独立文档
@Table(name = "project_contract") public class ProjectContract public void setContractAlone(Integer contractAlone) { this.contractAlone = contractAlone; }
1
a2f8713f6b7bdf33302904c60533d578
1d877d6733b3518a8dfbf3a1c6585a41
UltraText filter using Adaptive convolution
{ assert(src.type() == CV_8UC1); int half_size = int(floor(0.5 * filter_size)); int full_size = 2 * half_size + 1; assert(half_size > 0); Mat source_uchar = src.getMat(); Mat source, destination; source_uchar.convertTo(source, CV_32FC1); Mat avg, power, avg_power, power_avg; Mat standard; boxFilter(source, av...
0
64ced259a38f91cc1eca7460c5532e08
57560ee514577de2d5e5061cb46b10bc
Test of equals method, of class Course.
return (type(self) == type(other)) and \ (type(self.course_weight) == type (other.course_weight)) \ and (type(self.course_grade) == type(other.course_grade)) and \ (type(self.course_name) == type(other.course_name))
1
765b1dab28456d4127ac6938b43ebf95
947e7a765cc81163993811037a10f80d
get 对称密钥的轮换配置;非对称密钥的操作,不支持该配置
@Fluent public class CreateKeyOptions public List<KeyOperation> getKeyOperations() { return this.keyOperations; }
0
4ead4553f9321ca12e34b127a8e16012
a991a28bcdaf021fdb107cc789d312d0
Getter for the property containing cached photos.
public class HotelDetails public List<Photo> getPhotos() { return Collections.unmodifiableList(photos); }
1
6d9fe44f9577f9953c6e6b933ab80ed5
898643cc2bdb5dcff13580dc6fc5abd1
Reindex column objects from the given index
class Component(Model): def update_from_indexes(self, data, **kw): for i in data: self.update_from_index(i, **kw)
0
f2ddf4e44d337950e856b4dd7ea5cfa2
d2c3814519d3dc6dd97164222f9f6c06
Generator for iterating over all valid tile positions for this tilemap.
Pos = 0 for Col in range(self.Width): for Row in range(self.Height): try: yield ((Col,Row), self.Ground[Col][Row]) except IndexError: print(self.Width, self.Height) print(Col, Row, Pos) raise
1
0c81c4cfa0829d94f63bc949e4035213
8ad484dc3249133f37a6afcf5692cc6e
Returns the topmost folder name
const trackList = this.trackList.getValue(); if (trackList.length) { return trackList[0].meta.folder; } else { return ''; } }
1
1f06cb2b4ea02da5b90b8c0bb5337851
3ac5eabdca4e253960961522a78313ad
function sem býr til kúlur á hverri sekúndu
class Square { constructor (x,y,w,h) { this.x=x; this.y=y; this.w=w; this.h=h; this.visibleId=0; this.visible=false; } } class LifeS...
0