query_id
string
corpus_id
string
query
string
code
string
label
int64
04e1125a18dcec32cd7b1b020dfbf027
78d395573dab62ce745e734bfce79f9e
Bind and set pointers to the sphere buffers
void SetUpSphereUpdater(){ spheres_updater_program_id = GL_CHECK(glCreateProgram()); Shader::processShader(&spheres_updater_vert_shader_id, spheres_updater_vert_shader, GL_VERTEX_SHADER ); Shader::processShader(&spheres_updater_frag_shader_id, spheres_updater_frag_shader, GL_FRAGMENT_SHADER); GL_CHECK(...
1
8848e3b1632135eec2597fcadb894ae5
f205bb70a27335231bb5a0fae2dfd73f
Simulates playing games during metagame period. When we reach a terminal state, we look at the GDL statements and record it in the class variable goalCache. This is used in evalGoalProximity() as a heuristic.
class InformalPlay(object): def __init__(self, cosmos): self.cosmos = cosmos
0
1c19d814518d2cc96b34db7110b26a10
0afc0a86ed60f8142c1809f9aac5678a
广场聊天发送图片URL消息
WXImageObject imageObject = new WXImageObject(bitmap); WXMediaMessage msg = new WXMediaMessage(); msg.mediaObject = imageObject; SendMessageToWX.Req req = new SendMessageToWX.Req(); req.message = msg; req.scene = SendMessageToWX.Req.WXSceneTimeline; YiBaiApplicati...
0
0cb0fbadb64231f94e2c74995d14d5f0
94b672ebdd2f8c62da0122f800dde2a1
! \brief Returns the number of seconds to do the sync on STANDBY node.
long getSyncWaitSecs();
1
5c18bbe912243bd5cdbf7f994692771c
64582b0c72d524118f1e6745589ccd08
Gibt alle Child-Nodes zurück, die einen bestimmten Namen haben
final List<Node> foundChildren = new ArrayList<>(); final NodeList children = parent.getChildNodes(); for (int i = 0; i < children.getLength(); ++i) { final Node child = children.item(i); if (child != null && child.getNodeName() != null) { if (children.item(i).getNodeName().equals(childName)) { fou...
1
26f8c64f480e9d8b05213c3042d155c9
7a7e2a21ad2dc3d9da27bcbfd1d07ea4
matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
class ApicurioRegistrySpecDeploymentAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorArgs: def match_expressions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['ApicurioRegistrySpecDeploymentAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityT...
0
911dd58c76180178ceb1d363f6f71212
f62375fc725b60fe245804f473ef19a5
When the agent opens a box, we raise an error and mark the task unsolvable. This is a tad conservative, because maybe the box is irrelevant to the mission.
class TaskTransitionController(BrowserView): def uni_open_to_resolved_guard(self, conditions, include_agency): return False
0
6abc9273f1574941f5b0bc34bdaff23d
f292b9f607b2df4a5c0f9c1af7015d3e
L2-regularized L2-loss support vector classification (dual).
double* w, double* lambda1p, double* lambda2p, int* np, int* pp, double* res, int* bBalanced ) { int n = *np; int p = *pp; double lambda1 = *lambda1p; double lambda2 = *lambda2p; double lossp = 0.0; double lossn = 0.0; int nneg = 0; for( int i = 0; i < n; ++i ) { if( y[i] == 0 ) { loss...
0
7ba26de4c3ffefc7af9e2647d9d071d3
504a664848efb0cecbc308359643a41a
Tests that the file io concept for the tests in this file work correctly. writes a small assembly program to disk, assembles it, runs it, and checks that it gives the correct result. The files (source/binary) are then removed.
func main() { file := os.Args[1] f, err := os.Open(file) p := NewParser(file, bufio.NewReader(f)) ast, err := p.Parse() if err != nil { fmt.Printf("Error: %v\n", err) } else { s := new(AssemblyState) s.labels = make(map[string]*LabelRef) s.reset() fmt.Printf("===========================\n") for _, l :...
0
dcc5e3d4eb4ab3193cf414b1f922a584
d2e6d443dae7aa5f5d85b692e79310da
创建高分查询字符串
public class SupportDaoImpl<T extends BaseBean> implements SupportDao<T>{ public String createSortHql(Map<String, SortType> sortParams){ return HqlUtil.createSortHql(sortParams); }
0
0aaebc86a652f01879c15eb08dd2ea86
76e58a3df719e19a228b981b86c00e31
同步第三方商品扣点信息
class Controller_Jifen_Comp extends Tmis_Controller function actionSaveTongbu() { if($_POST) { for($i=0;$i<count($_POST['userCode']);$i++) { $str="SELECT * FROM jifen_user where userCode='{$_POST['userCode'][$i]}' AND realName='{$_POST['realName'][$i]}'"; $re=mysql_fetch_assoc(mysql_query($str)); if($re) ...
0
704bc8ef8d849dfee64254b8564471d7
ae64daa89ddc442b3b0049f1d14d1252
`client` - The Dashactyl client `user` - The Dashactyl user the manager is for `data` - The data to resolve resources from Creates a new manager for client resources.
class CreateNewManager(APIView): def post(self, request, format=None): serializer = serializers.InputManagerSerializer(data=request.data) if serializer.is_valid(): serializer.save() return Response(data=serializer.data, status=status.HTTP_201_CREATED) else: re...
1
117bf78e003ff6104a5d88098d8d75e8
ac7b915addab3c6a77cdd1a538068b99
Delete a ship to preference record for the channel partner. Delete a ship to preference record for the channel partner.
kwargs['_return_http_data_only'] = True if kwargs.get('async_req'): return self.update_channel_partner_ship_to_preference_with_http_info(channel_partner_oid, channel_partner_ship_to_preference_oid, ship_to_preference, **kwargs) else: (data) = self.update_channel_partner...
0
b7d4a7d0a65b88702a7ae1bad5f42df5
cd8e02342504c40b0c09e4946167ee15
Builds a new matrix having all columns not specified by given indexes. containg a copy of the original data.
public class Row extends AbstractVector public Row cols(final AbstractVector vector_of_column_indices) { return new Row(new ViewElemVec(this, vector_of_column_indices._data)); }
0
42ca43f68b6ccadc81a52a74ea6786d5
e5289260878de2429d3dbb18a2f0f8d3
현재 세션의 IQueryable{T}를 제공합니다. NHibernate.Linq.NHibernateLinqMethods.Query{T} 를 사용하세요.
namespace Mvc.TestProject.Data IQueryable<T> AsQueryable();
0
3a4e81d29557a213106a7bc311f3fc13
be1b27e8541777af84b8bbb3bb42ca2e
Metodo que muestra un contacto con el nombre dado
int pos = findContact(name); if(pos==-1){ return "Contact not found"; }else{ return contactos.get(pos).toString(); } }
1
384d7e9c31542a699ceb127fd642c8b9
5cb72f2a01c1401cad25b15e47573514
Fetch EasyMOD Version
class RAD_PM_featured extends RAD_pageModule_base implements iRAD_pageModule public static function getVersion(){ return "0.1.0"; }
0
a1cd2c64e5f778be51977ae6e655d4d6
12c1d0729d106d5fe251774e0e26ec9e
Stops all available components.
{ if (_forwarder != null) { _forwarder.Shutdown(); _forwarder = null; } foreach (var component in _components) { component.Shutdown(); } }
1
72807b8d7e1a3e76605e818d65629a16
6fd280e4465ac7b3decf0651529af003
Sets the first_name of this UserEntity.
class UserEntity implements ModelInterface, ArrayAccess public function setFirstName($first_name) { $this->container['first_name'] = $first_name; return $this; }
1
170b4749061347acdbc203772865fef1
12daa32d25d5aae8339018e311c321cd
获取实习描述
class Altays(ATSSpider): def get_job_description(self, hxs): xpaths = [ "//div[@id='job']/p[@class='job_field']/following::div[1]", "//table[@summary]//tr[count(descendant::td)=1]" ] return self.get_xpath_value(hxs, xpaths)
1
544cd78495d4fe776a786228f13d0b30
65b5f7e6e1a272f98d3c9b4afab79e04
Returns the value of the '<em><b>Parent</b></em>' container reference. It is bidirectional and its opposite is '{@link fumlConfigurationTrace.States.fumlConfiguration.Activities.IntermediateActivities.TracedToken#getHolderSequence <em>Holder Sequence</em>}'. <!-- begin-user-doc --> <p> If the meaning of the '<em>Parent...
EReference getTokenTrace_Root();
0
9b9075877b31d342e6148d76696e060f
1ad28ff9824ff7944f5231e154b354dc
функция для входа в личный кабинет
def lk(): return render_template("lk.html", user=current_user, title="Личный кабинет", goal=goal(current_user.height, current_user.weight, current_user.age, current_user.gender, current_user.body_type))
0
5e9b2d0c130922ff7ab3b0e7259eff42
c4b00ac3969d40da1aa8a3933c19d4ad
Set up test users, images, and albums.
class UserViewTestCase(TestCase): def setUp(self): db.drop_all() db.create_all() user1 = User.signup("user1", "user1@user1.com", "password", None) user2 = User.signup("user2", "user2@user2.com", "password", USER_IMG_URL) db.session.add(user1) d...
1
c7d8ad7bffff83629bb3863d10c043c0
38aa40e5b4678ed9b360e16e9a83290a
利用canvas跨域下载图片(图片服务器已设置跨域)
function imgDownload(imgsrc, name) { let image = new Image() image.setAttribute('crossOrigin', 'anonymous') image.onload = function () { let canvas = document.createElement('canvas') canvas.width = image.width canvas.height = image.height let context = canvas.getContext('2d') context.drawImage...
1
e07fcec07bd5553f3a5eb45c5790ea67
4567d093b9e323c1d963408709f30f6d
檢查學生同一天異動紀錄內是否有相同異動代碼
namespace WinErParentLogin public partial class StudentConsolidate : System.Web.UI.Page private bool CheckStudentHistory() { bool history = false; MysqlClass _mysqlObj = new MysqlClass(WinerUtlity.GetConnectionString(MyParentInfo.SchoolObject)); ParentLogin MyParent = new...
0
77d617551bb7cf379158bb9eab771fe5
99ec89144ec1c6c41f060ef904aceb18
Override. Logic to be executed before the players are allowed to take a turn
namespace SGS.ServerCore.Contest.Data internal abstract class ASkill public virtual void BeforeTurnStart(ChiefBase aChief, GlobalData aData) { }
1
65caab68ba131975127b0eacd93d0f47
91df3bb672cf18b17341b949957b7715
@brief fstatに格納されたファイルデータを文字列にして返す
getFileInfo() { char* result = malloc(sizeof(char) * 60); char* digit = intToString(num_line); int fl = strlen(filename); int dl = strlen(digit); int i, p = 1; result[0] = '\"'; for (i = 0; i < fl; ++i) result[p++] = filename[i]; result[p++] = '\"'; for (i = 0; i < 3; ++i) ...
0
310dfcb1385a689d2bd60af01c294a50
f40681e0a3bbefa2b3fd829083a3aac4
Populate the ability score labels with text and randomly generated scores on the Set Ability Scores window.
{ int tempScoreHolder[4], temp, random; srand(time(0)); for (int x = 0; x < 6; x++) { for (int y = 0; y < 4; y++) { random = (rand() % 6) + 1; tempScoreHolder[y] = random; } for (int y = 0; y < 3; y++) { for (int z = 5; z >= y;...
0
b128fbf5cddb72fea5251abb5d96a431
400d8fb5cb947e798f495fcb3d344352
Create the WORKSPACE stanza needed for this rule set.
export class Workspaces extends PolicyStatement public toCreateWorkspaceBundle() { return this.to('CreateWorkspaceBundle'); }
0
b4b2e6722cb4aa210b0d7028c114d5f4
8daa11b1ad97ecbefff531739fcb6d32
returns true if it's there, false if not
bool Map::containsObject(irr::s32 id){ return Masterdatabase.count(id) != 0; }
1
14d827f58adaa1b798ee4adb912c9799
341776e2dfc177f2b6e877a1540b5e9b
Changes missing translations to English
{ foreach ($this->new_translation as $type => $translation_type) foreach ($translation_type as $key => $translation) if ($type == 'modules') { foreach ($translation as $module_name => $value) if (!isset($translation['old_string'])) unset($this->new_translation[$type][$module_name][$key])...
0
a963628a07479e42df5f49736bf1950b
ce2ad03bdd74f7d902fcf012172ae65b
Sets the IdAuteur
class Message extends \core\Managed public function getId_auteur() { return $this->id_auteur; }
0
e59187dbd27afac7e6128de5725e350e
6a77c0a0450e50f57e85614736c08ff4
We assume `a` contains tf tensors of same shape (maybe scalars) and we stack them together. The dimensions of the elements of `a` will correspond to a group of indices of the result starting at `start_index`.
gather_index = gather_index.view(-1, 1, 1).expand(-1, -1, output.shape[-1]) output_tensor = output.gather(dim=1, index=gather_index) return output_tensor.squeeze(1)
0
53866f420dd663778a3a82116fb01cd7
3fc88ad7a7e8986d31936508b9a4d783
Initialize button object and set alignment
void toolsFunctionWidget::setButtonAlignment(QPushButton *tmpButton , QString iconPath) { tmpButton->setIcon(QIcon(iconPath)); tmpButton->setIconSize(QSize(20,20)); tmpButton->setCheckable(true); }
0
664e7360d3aa0e5f70fd957dc8592c90
d9eb24603f2c3e318164825fb1cbfcdc
根据path获取contours数组
class ContourObject(object): def clipPath(self, path): if self.transform != None: path = numpy.array(self.transform(path)) if numpy.where(path!=path, 1, 0).sum() != 0: pathContainsNans = True else: pathContainsNans = False if not pathContainsNans: tmpList = [] for ind, p in enumerate(path): i...
1
042adb8ad5cbffb2dcd913b2d3f90d04
d717dc157f5466b04ef1102bf76fbbf5
强制获取焦点,解决 mobile safari 无法收起键盘的问题
export class ChatContentPage onInputFocus() { if (this.platform.is('mobileweb')) { setTimeout(() => { this.input.input.nativeElement.scrollIntoView(true); this.input.input.nativeElement.scrollIntoViewIfNeeded(); }, 200); } }
0
b15dba1b50a9837faaf01f523786ae8b
c30cb16ad2bdc6db3c71a2ec34e728d3
定时器3中断
void TIMER3_IRQHandler(void) { if (s_timerCallback[3]) { s_timerCallback[3](3); } }
1
7ba7a2ee8292f11c34fad28119975bb8
f43f1d66635d09af0bcf721484495358
Allows selecting an interrupt handler for PD2 at application runtime
void PORTD_PD0_SPI_CS_SetInterruptHandler(void (* interruptHandler)(void)) { PORTD_PD0_SPI_CS_InterruptHandler = interruptHandler; }
0
690605b10c13760c1d9bcc62e7a37b66
5410879f405f46c0bee0072e557afff9
将计算结果从小数(浮点型)转化成分数(字符串)
StringBuilder num = new StringBuilder(); int gcdNum = gcd(numerator, denominator); numerator /= gcdNum; denominator /= gcdNum; if (numerator >= denominator) { if (numerator % denominator == 0) { num.append(numerator / denominator + ""); } e...
0
73c2eaafaef2dcd9f504f89402295ddc
028d18376e0df0cb0f29fa35eeaeecf0
目标对象值发生变化,通知所有观察者
class Observer defineReactive(obj, key, val) get() { if (Dep.target) { dep.addSub(Dep.target) } return val }
0
89d90ee758d5777133ea27802f0c6c28
7aad03f56f828f884792173dd1b1fabe
@brief Função auxiliar recursiva para aplicar uma função a todos os elementos da árvore InOrder
if (nodo != NULL) { itree_recorrer_dfs(nodo->izq, func); func(nodo); itree_recorrer_dfs(nodo->der, func); } }
1
12fd64c62ca042d5684538042e2a4440
ed7736619b73ed51984bd67401619f3a
returns the lat lng of a pixel X/Y coordinates at given zoom level
function latToPixel(lat, zoom ) { zoom = zoom ? zoom : 18; var siny = Math.sin(lat * Math.PI / 180); var y = Math.log((1 + siny) / (1 - siny)); return (128 << zoom) * (1 - y / (2 * Math.PI)); }
0
d93184ca99f7c7b3f9dc65a9f7e1a954
04d6146d17175849345801c55270b5ef
Generate first and last name when you click generate button
namespace JacobSmetanaTest1B public partial class frmMain : Form private void btnName_Click(object sender, EventArgs e) { MessageBox.Show(tbxFirstName.Text + " " + tbxLastName.Text); }
0
b236a772beedf7b71840cb5db6f2e501
1fa78f58d1ebbc18e57a9bed46df0a25
Check to see if one of the sql keywords is in the log item
{ String[] sKeywordList = {"BEGIN ", "CREATE ", "INSERT ", "UPDATE ", "DELETE ", "COMMIT ", "COMMIT", "ALTER ", "DROP ", "GRANT ", "GO", "IF OBJECT_ID"}; List<String> lList = Arrays.asList(sKeywordList); int iArraySize = lList.size(); sLineRead = RemoveWhiteSpaceInFront(sLineRead); for (int i=0; i< iArraySiz...
1
a3ebe66519f08f5fa057d85446540390
aae8fc8c784d6ecc3095a6e0a959a25d
Coroutine used for fade transitions of any length. Good for respawns, retries, and cutscene cues.
public class UIControl : MonoBehaviour public IEnumerator FadeInCo(bool isFadeIn, float delayTime = -1) { float actDelayTime = delayTime; if (delayTime.Equals(-1)) actDelayTime = _fadeInDelayTime; if (isFadeIn.Equals(true)) return GlobalData.Instance.CoroutineIgnoreTi...
1
b5321e9c8a873d09db586fa4d014948c
55d6a3870bae89b59bf18678e8c37c35
根据会员工号和疗休养点编号获取余额是否足够支付
namespace HIS.ZYNurse_BLL public class OP_Order:BaseBLL public bool getspecamountresult(List<int> presorder_id, decimal amount, int deptid) { try { string strWhere3 = Tables.zy_presorder.PRESORDERID + oleDb.EuqalTo() + presorder_id[0] + oleDb.And() + Tables.zy_presord...
0
1ba81211eac516bec6d349e29dc05907
8b095bb3804c7e80cc1e2007bd3a2154
Setter for falling stroke by function.
public class StateSettings extends Base public com.anychart.core.StateSettings negativeStroke(String strokeFunction) { APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".negativeStroke(%s);", wrapQuotes(strokeFunction))); return this; }
1
d25b582d07aa391bf25f33d7eedc086e
58bce626fca754847ce2fdc6b93d32fe
Gets the number of messages in a specified conversation that match a specified filter constraint.
public class ServiceAccessor void queryMessages(@NonNull final String conversationId, final Long from, @NonNull final Integer limit, @Nullable Callback<ComapiResult<MessagesQueryResponse>> callback);
0
8fe3895bdb446d58c579dc886b6b90f5
ef5d7822e083a38e9cbbfe1bf9847cd8
计算从起点到终点,获取最短解锁的数字拨动路径
func SearchShortestPath(posBegin, posEnd Point, block []Point) ([]Point, error) { var retPoint, tmpBuf []Point var specialPoint Point repeatNode := set.NewSimpleSet() type tmpNode struct { bestPos Point length int64 } var tmpList []tmpNode var tmp, bestNode, secNode tmpNode for _, v := range block { if v...
0
36acc8052f423ba2ba879a95eb8595f2
bd0c5b240c0b9cc44e896ceac1f7ee3e
Run cleanup, increment the current state, then run init
class GamestateManager: def initialize_state(self, core): if self._current_state != self._next_state: self._current_state = self._next_state return self._current_state.initialize(core)
0
afbd1e945897a0baeea26a22af297765
e93473777766487e7243cb497ca675b7
Draw a filled polygon with given corner coordinates in window coordinates using the current color. (Both arrays must be of equal size.) The graph position is unchanged.
if (handle == 0) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (pointArray == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); checkGC(FILL); int cairo = data.cairo; if (cairo != 0) { drawPolyline(cairo, pointArray, true); Cairo.cairo_fill(cairo); return; } short[] xPoints = new short[pointArray.length]; for (int i...
1
12f4579f171c37aac602d3513ba851f6
ccf620ce7f02b6104be1fafda672bf3c
获取我的权限列表
{ $id = $this->request->param('id/d'); $model = new MyModel(); $data = $model->authItems()->getAllByKey(); $result = ['code' => 1, 'msg' => 'error', 'data' => []]; if ($data) { if ($id) { $key = 0; $model->id = $...
1
fe2d3cc37136789edd0cc3a3ef0764df
01bae90c8f4552c149aef62e0818dfa7
Stores history for checking in test.
addTestHistory(state, data) { let storeInfo = { params: state.currentTestApiParams, result: data, }; setLocalStorage('@t:' + state.currentTestApiTitle, JSON.stringify(storeInfo)); state.testHistory[state.currentTestApiTitle] = storeInfo; }
1
eb0ff9d7442b2668cc6e2da4c101910c
bf680c1bdf31d2bffc30be91eef15c5b
矩形框选放大
function enlarge(){ var width = canvasObj.width; var height = canvasObj.height; var selectRect = {}; var dragging = false; var msdown = {}; var selector=document.createElement("div"); selector.style.position='fixed'; selector.style.border='1px solid red';...
1
de742285f319fd92a9c850e1af826481
138e93a1666aeb9ee58889dbdd8f2cbc
class label is last entry
bool RATransition :: isTop ( void ) const { return label.size() == 1 && unlikely(label.front()->isTop()); }
0
c53625c477ab281964914ddc88a2e4c9
f0d715b618b572a12953687b7822a8ff
Don't move, just cover the current node again.
class MazeWalker(things.Sprite): def _stay(self, board, the_plot): return self._move(board, the_plot, self._STAY)
1
b7e14405ef6576fad81cfec7ce3e61de
311fce698f051cb2d44a3d878a4eba3d
Gets the name of solar panel
class Psu(PsuBase): def get_name(self): return self.__name_of_psus[self.__index]
0
ef9cd54046b4e44163650551b15cf081
6fc98f2001466a22ecbb7e2727ff77ee
zwraca rok studiów studenta
class Student: def get_graduation_year(self) -> int: return self.grad_year
1
19c4fa0e6fb22f70b1dca8d25458082e
c1cee0c48185e51d71bf16406e5f9994
as a first filter when adding ifs, avoid adding duplicates further filtering will be done by the dynform_InitializeIfs() function
{ unsigned int i, vsize = m_filter_tags.size(); for(i=0; i<vsize; i++) { if(vehicle_name == m_filter_tags[i]) return; } m_filter_tags.push_back(vehicle_name); unsigned int index = m_filter_tags.size()-1; string label = "ClearHistory/"; label += (truncString(vehicle_name, 25, "middle")); mbar->...
1
e0ee332727ff635d475231c8a4c6c176
80485ec496a1b41ef6d4e7da02835157
Expand curie to uri based on the context given parmas ====== curie: curie to be expanded (e.g. bts:BiologicalEntity) context_info: jsonld context specifying prefix-uri relation (e.g. {"bts": "http://schema.biothings.io/"})
def expand_uri(uri_list: Union[str, List[str]], context: Dict[str, Any]) -> Union[str, Tuple[str, ...]]: expanded_uris = [] for uri in as_list(uri_list): if uri.startswith("http") or uri.startswith("@"): expanded_uris.append(uri) else: prefix, identifier = uri.split(":") ...
1
f14ebc4b3d2266050401db460c614be6
f992b6b14b88a80617f7706459fa4504
Remove frontmatter from the input
class Parse public static function frontMatter($lines) { $lines = explode("\n", $lines); $k = null; $ret = array(); foreach ($lines as $line) { if (!$line) continue; if ($line[0] === ' ' || $line[0] === "\t") { if ($k !== null) { $ret[$k] .= ltrim($line); } ...
0
5c1242df07f23b45368de13b2f10239b
69156b1b78ca22e625231017f59ea8b8
metodo para obtener las deducciones que hay en la base de datos
class RhTemporalNominaVinculados public function getDeducciones() { return $this->deducciones; }
1
bb043958b3154159f6c16174faa6b743
f0ed457cca6fcd31cc1d3dac6a670265
获取固定长度的字符,不足后面补0
namespace ComLibrary public class ComClient public static string sFormatstr(string aStr, int iLen) { while (true) { if (aStr.Length >= iLen) { if (aStr.Length > iLen) { aStr = aStr.Substri...
1
898ab663b109c62954bafc9506c6cc83
ca88ed6dfe9c656844383f3947cab67c
Clear <language_code> value
languageCode_ = getDefaultInstance().getLanguageCode(); bitField0_ = (bitField0_ & ~0x00000080); onChanged(); return this; }
1
4a177e5d44eb9f4ed89b84e313ab2289
c2d9c6c8f9b76579dc61c1deb90fc0b2
Retorna uma lista com a previsão de chegada dos veículos de cada uma das linhas que atendem ao ponto de parada informado.
const arrivalsStop = document.querySelector("#arrivals-stop").value; const arrivalsLine = document.querySelector("#arrivals-line").value; const response = await ( await fetch(`${base_url}/Previsao?codigoParada=${arrivalsStop}&codigoLinha=${arrivalsLine}`, { method: "GET", headers, ...
1
27e23e3670c6824ad186a93a63a48f89
87f80ca6789758599b2cd7c79a84a14b
! Get the delta matrix of this plane
x = self.x y = self.y return x, y, self.xx - x, self.yy - y
0
8d02f03fc998848f4ad2d108a8956481
519718085388fc7f7b6a6ec428adab4b
ガード待機状態でなければ何もしない
class Scene_Battle def execute_action_guard text = sprintf(Vocab::DoGuard, @active_battler.name) @message_window.add_instant_text(text) wait(45) end
0
e216a1d5cc6e6e3ea533750c83095c48
64c018e17b36cf3bd9094e40279be3ec
Wait until the element is not displayed or visible.
public class BrowserWait extends BrowserAccess{ public static void waitUntilElementIsNotDisplayed(final WebElement e1, final int waitTime) throws Exception { WebDriverWaits.waitUntilElementIsNotDisplayed(e1, waitTime); }
1
ed4a6cf84cd781d25c8b0be7d09ec080
43e439da3f765133b80ad64b54e44f48
Imports a signed server certificate into the enclosure.
PVOID pbPublicKey, DWORD cbPublicKey, PVOID pbPKCS10req, DWORD cbPKCS10req, PCHAR pszPassword, PWCHAR pszCAPIStore, BOOL bOverWrite) { BOOL fSuccess = FALSE; HC...
1
7849172c12bf9b3b2815a09c2fdf6b5a
30990b88471364a71794da67cbd9d7b7
this function does a selection sort of the array by price.
function bubbleSort(a) { var swapped; do { swapped = false; for (var i=0; i < a.length-1; i++) { if (a[i]["subscription"]["price"] < a[i+1]["subscription"]["price"]) { var temp = a[i]; a[i] = a[i+1]; a[i+1] = temp; ...
0
a911717dec1831260125e7fea1e1f27f
c6c5a5cf9c79681e5b6f0d904b76003f
Sets the auto update flag
if (enabled) this.mPrivateFlags |= PFLAG_AUTO_INSERT_ON_UPDATE; else this.mPrivateFlags &= ~PFLAG_AUTO_INSERT_ON_UPDATE; }
1
bb517a8b0aa06f9693eafe86161cc267
f36cacbe84859c53fd46b3adbe2584b7
Deletes all downloaded files for given episode
class NineNow(): def download_missing_episodes(self): episodes = self.episodes_to_download() if len(episodes) < 1: print(f"No episodes to download for {self.show}") return for episode in episodes: try: self.download_episode(episode) ...
0
9e2c4022b4e47f17de8394d78b774795
c1a7ad096c54bda0b86271dccb5aba55
Returns the text of current JavaScript alert.<br> <br> This keyword will fail if no alert is present. Note that following keywords will fail unless the alert is confirmed by the keywords 'Alert Should Be Present' or `Confirm Action`.
public class Browser public String getAlertText() { return (String) automationInfo.getCommandExecutionFacade().execute(automationInfo, new GetAlertTextCommand()); }
1
0150039d4eff91ca40edca1a9dca4e77
d04e23afff2165d12af258b6da25986a
Parses the domain from a URL string or returns the string if no URL was found
export class Utils static parseDomain(fullUrl: string): string { const chunks = fullUrl.split("/"); for (let i = 1; i < chunks.length; i++) { if (chunks[i]) { return chunks[i]; } } return null; }
0
8db2ebbe76414d62ddeffa1f5fc33d23
1483a522cc216d3f0a64a998fd6ac05d
! LU分解(ピボット交換なし)
{ Matrix3F3 L( {1.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 1.0f} ); Matrix3F3 P( {1.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f}, {0.0f, 0.0f, 1.0f} ); Matrix3F3 U; uint8 n, i, j, k, c = 0; boolean success = TRUE; U ...
0
2a63b53525d48fae4388056877ef5042
850dc7a50ef78e933fc2a92d79ab89f1
=================================================================================================== Init ===================================================================================================
function Tattoos:init() end
1
be030b7f0b65ff24143a6c73f8110784
91985724ea2ef9a52e3e2ed1b8f1f823
"The interface on which this entry's equivalence is effective. The interface identified by a particular value of this index is the same interface as identified by the same value of ifIndex."
public final class CapsdConfigFactory private static final class LightWeightIfEntry public int getIfIndex() { return m_ifIndex; }
1
6cee13ffcecfebc8d21d41bb08c622e9
abfcef715398f4f31c3876bb2e33cf6c
Test object construction with a string
TestObject::TestObject(String *str, int32_t i) { this->str = str; this->i = i; }
1
2c3e8e7a69b7af2c3fb2195745fadee2
7915a8b8db996b29e57021570fa96d94
获取区代的业绩数据
col_names = ['白日业绩', '晚间业绩', '合计'] cols = ['地区', '学院', '小组', '账号类型', '工号', '推广专员', '提交小时'] cls_sqlserver_1 = MySqlServer(dq=self.dq, start_date=self.final_date, final_date=self.final_date) df = cls_sqlserver_1.get_tg_data()[cols] cond = df[cols[2]].str.endswith('组') df = ...
1
669f9fbd8274a645819208684f31e83d
e432718ae59b37a94445dd1fd54d7f8a
sets date and time as time stamp, e.g. System.currentTimeMillis()
void setTimestamp(long ts);
1
3eeb647f0b88673907c6c72d1af95e78
10108cf595027dbc500ecfa23f16eecd
测试srandmember命令
class Test_redisKeysCommand extends PHPUnit_Framework_TestCase{ public function testsmembers() { $this->redis->del('set'); $this->redis->sAdd('set', 'val'); $this->redis->sAdd('set', 'val2'); $this->redis->sAdd('set', 'val3'); $array = array('val', 'val2', 'val3'); $s...
0
76b71eb1bc80e6036941e41352fb4e49
a3335990f9aac3151a7430e56d94d1a8
Добавление всех узлов в базу данных из XML
namespace books.business_logic.services class ContainsService public void Import(XmlDocument document) { GlobalParamatersService.Delegate.OnDatabaseImportProgress(0); DatabaseConnectionService.Instance.SafeTransaction(_ => { XmlNodeList xmlContainsList = document.DocumentElement.SelectNo...
1
ce6720d50c32048952d9178b5fdb7a48
7da9a7ef756925b6291e50e6c93d4b86
获取合并行的html队列
@Component public class ReportsGeneratorService implements ReportsGenerator<Map<String,Object>> private List<HtmlRowStructure> expendHtmlStructure(HtmlStructure htmlStructure,TableParams tableParams) { List<HtmlRowStructure> htmlRowStructures = htmlStructure.getHtmlRowStructure(); List<HtmlRowStructure> copyRow = h...
1
26b13bef6613d172f02fd7dbb3c8d2e3
634d29ec8831f0804a4f84a90b09c86a
将一个php数组保存为一个文件
if (is_array ( $arr )) { $con = var_export ( $arr, true ); } else { $con = $arr; } $con = "<?php\nreturn $con;\n?>"; write_file ( $filename, $con ); }
1
5c31f0b5f3465928c992a7acb2f7dada
f2bec421785201a8beb94e01c0d81060
Преобразует многомерный массив в плоский
function array_multi2single($array){ static $result_array=array(); foreach($array as $value){ if(is_array($value)){ array_multi2single($value); } else $result_array[]=$value; } return $result_array; }
1
978852f281a6a5f598c9be0424617e38
175f17d00c9c0bfaa646d20f36f9e457
標準偏差(サンプル).
export class TSMT$Normal public get std(): number { return this._std; }
0
12cbb3e67cdac2a4c3a35c54272a7221
6466461c901bee763f39dd68a5800b4a
创建文档,如果创建失败则返回null
public T createDocument() throws Exception;
0
f45d52771c6f79b12cdbf4b6a70b8d75
13c1dad73fc0a3b93fc407b989e59396
Calculates the relative X position of all the actors to a given actor.
public class ActorTransition extends AbstractTransition public float getTransitionalOffsetX() { return transitionalOffsetX; }
0
9882d74c9e6c80111491ca45e702aaa7
fc1662c609063269754ad08de5dd0389
触发数据库变更监听事件
const on = db.on as DbEvents & IDBChangEvent; on("changes", (changes) => { changes.forEach((change) => { switch (change.type) { case 1: change = change as ICreateChange; console.log("[DB CREATED]", change); this.tableChanges$[change.table].next(change...
1
aa48a5e1efb06a78d0ded5061d2676c3
6bcd3ff528225905af9b76d007ad52a7
Returns the "has many items" property for the given array instance.
protected function newHasMany(Builder $query, Model $parent, $foreignKey, $localKey) { }
0
0fbb1c1b377130ab2242faf4c4a23502
61c87721220cb8459ccfcd993e64b3d0
获取生成的巡检结果文件
try: os.makedirs(report_dir, exist_ok=1) for file_ in os.listdir(report_dir): os.remove(f"{report_dir}/{file_}") self.log.logger.debug("获取巡检报告") ssh_client=ssh() for node in check_stats_dict: port=init_dict[arch_dict[nod...
1
959c03d22c639b94832c8cdafdf3d46f
84cbb4d0518df2898bd9063e0becf4dc
Проверка возможности добавить войска
function ArmyInfo:CheckSoldierAddition() if self:GetCardCount() < 2 then return false; else local soldierTypeTable = self:GetArmySoldierTypeTables(); for k, v in pairs(soldierTypeTable) do if v >1 then return true; end end end ret...
1
209917a5b3f51a6717dc16c701d5cc31
d2acb26ae38c37575fb18b8398c8da0a
Imputes na's of column according to distribution
for i in tqdm(range(0,self.nf)): pos_lst = [self.data.iloc[x,i] for x in range(0,self.n) if (math.isnan(self.data.iloc[x,i])== False and self.tr_labels[x] == 1)] neg_lst = [self.data.iloc[x,i] for x in range(0,self.n) if (math.isnan(self.data.iloc[x,i])== False and self.tr_labels[x] == 0...
1
010f20adde17356b60b34ab04b986f8c
04868385a15bb6785d60ef1fd244db2d
Set the default products per page.
function vmagazine_lite_woocommerce_products_per_page() { return 12; }
1
6a858f1774761549bb47a8cd5e25d938
376c94b6a889537d5921fe95fc87f232
Check if signal recording manager configuration is valid
try { return mIConfig.isConfigValid(); } catch (Exception e) { throw new RcsGenericException(e); } }
1
ebc67673c8b5f9388ddcfbdd17ecdcbe
1990c6987dfc4a29673ffba926edea98
接受组队邀请并入队
resp_f = 'arenaTeamInvite' pid = self.player.data.id rs, pids = self.player._game.rpc_ally_mgr.member_pids_by_pid(pid) if not rs: pids = [] p_social = self.player._game.social_mgr.init_player(self.player) pids.extend(p_social.data.fds) p_name = self.pl...
0
dd4dc29305d367c009e4cdb7d743168d
e4a13601973c9917d5f9634eed4bface
loads the robot list from a data file
def f_lstRd(fnam): f=open(fnam,'rb') lst=pickle.load(f); f.close() return lst
1
00873bf82b892a5fa2cda4164a2bf48d
817de6427c8a8e722f12a179b05c989f
Decides whether to increase or decrease card count based on card value. Otherwise, keeps card count the same.
int keepCount (int card_value) { if ((card_value > 2) && (card_value < 7)) { return 1; } else if (card_value == 10) { return -1; } else { return 0; } }
1
5cfd18048bffd80878aa00d25f7c9eba
ac7472fade3e0a49c2bf687e9d655c48
根据维度id集合查询
List<FndUnitDimValueAssign> queryByDimAssignId(IRequest request, FndUnitDimValueAssign fndUnitDimValueAssign);
0
0ba37aebf4c41174d0eb804479c4384d
cacc75c8cabc775300acd0e4d9f5b1e9
移动主题到另一个板块
namespace FBS.Service public class ThreadAdminService public void MoveThread() { }
1