query_id
string
corpus_id
string
query
string
code
string
label
int64
a55ee1c598d9b04be178140e6f675345
80e65fdb20cc2341f888a65e35008168
域名7天内到期提醒
class crond_domain_reg extends tController{ private function __domain_gq_del() { global $timestamp; set_time_limit(7200); $endTime = time() - 61*86400; $del_domains = M("register_domain")->query("exp_time > 0 AND exp_time < {$endTime}","","",500); if (count($del_domains) > 0) { foreach ($del_domains as $k...
0
d413737add0f69747a57ed83db2a57a7
57342c417a33ee005170ec917df47310
This function opens the systems fileChooser
jFileChooser1.setFileSelectionMode(javax.swing.JFileChooser.FILES_ONLY); int result = jFileChooser1.showOpenDialog(this); if (result == JFileChooser.APPROVE_OPTION) { fileController.openFile(jFileChooser1.getSelectedFile().getAbsolutePath()); } }
1
2a3440d7dec5a3364fe7815d9a919a4d
19ee54acc34279bbab6f09e4705d9fe6
Gets a Box2D Body Definition from its name in the Scene
{ int res = pwrapSceneNodegetBodyComponent(l); if(res >= 0) { return res; } lua_error(l); return 0; }
0
1175385de4bf7e004e6e0e37baf476ca
906b8dedd6aa21cbab2b20e430bb259a
Get the default email body from name.
class MyRestful(Restful): def mkSenderMailBody(self, last_name): return "Dear %s,\n\nWe have received your application. Please do NOT reply this email.\n\n\ Thanks,\nTech Team" % last_name
1
e5c0be6957f2e31c5fa74f5675de0ef1
a72bfb2b2d25babbc1c29d713ff7b152
Generate a pandas series of the month as a string in YYYY-MM format from the date column.
def get_month_as_str_col(df, date_col): return df[date_col].dt.to_period("M").astype(str)
1
118eb5c571e3ad6ec7884f897eec87f5
6e1b734a679938ac7389c3783a3d6273
Fungsi untuk mengkonversi bilangan oktal menjadi bilanganhexa
remstack = Stack() base="0123456789ABCDEF" while nilai > 0: rem = nilai % 16 remstack.push(rem) nilai = nilai // 16 x="" while not remstack.isEmpty(): x = x + base[remstack.pop()] print(x)
0
18131fadaa2cc878f8f87957e006dc81
672a7e3739600fb7aea4492d1257be12
过渡性的路由,用于使用uid跳转到userIndex的情况
if (params.uid || params.id) { uni.navigateTo({ url: `../personal/main?id=${params.uid || params.id}` }); } }
1
4506de8506caf42ea6ef38d43d84febd
585ebb1fd6197db5bc98e6058451bef7
Map linearly from the interval [a,b] to [c,d]
linearMapping( x: number, a1: number, a2: number, b1: number, b2: number ): number { return b1 + (x - a1) * (b2 - b1) / (a2 - a1); }
1
997819d1ff1ad2fcc7d2e578f268b5c3
43e3f82b3f0ad6f9a388037101c81cf0
Get subgroup by name.
public ContactGroup getGroup(final String groupName) { if (groupName == null) { return null; } for (ContactGroupIrcImpl group : this.subgroups) { if (groupName.equals(group.getGroupName())) { return group; } ...
1
26536b4c18e3b443ac76757786ac0716
d6a26cebf0768821007ea4450805a5fe
价格走势
this.http.post('/api/v1/jade/jade-price/get', {length: 7}).subscribe((info: any) => { if (info.status === 200) { if (info.data.list.length > 0) { info.data.list.forEach((key, i) => { this.xAxisData.unshift(key.priceDay); this.yAxisData.unshift(key.jadePrice); ...
1
30209845197dd70a0ddee5ef2c4e1ab3
1bcf3c613824107bfac45c45dc736903
Initialize a :class:`Molecule` instance.
class MolecularGraph(nx.Graph): def __init__(self, molecule): super().__init__(self) self._molecule = molecule self._compute_rotamer_graph() self._build_core_nodes()
0
5be7c66f7bb212d3802e7ab127a685b2
f2b2f823829bcfb69bdfd6d744bb4b8c
Returns the EventAttendanceModel object associated with the given userID and eventID
{ return $this->model ::where([ ['eventId', $options['eventId']], ['userId', $options['userId']], ]) ->first(); }
1
a8b552063a4a6cd0ae34cab3bc0f7a22
464c31f6909f522f0a3d6bdce391dba5
True if no conflicting reservations and two weeks or less False otherwise
class Reservation(models.Model): def is_valid(self): return (self.is_not_conflicting() and self.is_valid_length())
1
61ece2e5a7fd1c4265de1f71ebd36e69
3d9aa525987e98b18f7fdfe31eb352c0
Helper method to set hair overlaps for each direction.
{ int i = index; if (hairGO != null) Destroy(hairGO); if(currSex == Sex.Boy) { if (index <= 0) i = boyHairPrefabs.Length - 1; else if (index >= boyHairPrefabs.Length) i = 1; hairGO = Instantiate(boyHairPrefabs[i - 1], hairNodeTransform); } ...
0
cc5b3771ee03b6db00386ab207296a90
2c6e89d0869593e04c391818fbefc74e
查找在矩形rc里的元素,pfnSHCB是回调函数,pfnParam是回调函数的参数
{ int cxScreen = GetSystemMetrics(SM_CXSCREEN); int cyScreen = GetSystemMetrics(SM_CYSCREEN); FindPic(0, 0, cxScreen, cyScreen, pszPathName, similar, coordinatex, coordinatey); }
0
06cb1e625c1bb23a7027925a62ce5425
284dfd339d7cfacc4f7c5455962c5e3b
Gets the only buy stock quantity.
public int getBuySize();
1
4d2b4cc614672a6a5cf74304b915d393
8927658dc1be7853fc0fac154d889ca2
Fire event logout to attached listeners.
namespace WheelMUD.Core public class PlayerManager : ManagerSystem public static void OnPlayerLogOut(Thing player, GameEvent e) { var eventHandler = GlobalPlayerLogOutEvent; if (eventHandler != null) { eventHandler(player.Parent, e); } ...
1
f116c6d39c804f9f8984a354ffc30e92
15f2d12fbbc6e2fae7ebda59f90f399d
Get a collection of possible check types.
class ActionProcessorDataCollector extends DataCollector public function getApplicableCheckers(): array { return $this->data['applicableCheckers']; }
1
e2e69cad27e7a8e081b4d2bd6be944c0
acbef7e24e5f0e498150320a4d287dd5
Just toggle a pin to make some noise
static PyObject *py_touched(PyObject *self, PyObject *args) { int pin; PyArg_ParseTuple(args, "i", &pin); return Py_BuildValue(""); }
0
bb083082948fd99033edf7637683cb92
a4451d48c37f0cb45e34b4acc5157de4
从小时集合中获取最相近的时间点
public abstract class TvInputProvider extends TvInputService public long getNearestHour(long startMs) { return (long) (Math.floor(startMs/1000/60/60)*1000*60*60); }
0
30530d543a37a3096195b143822eb118
9ff51504a92db19f42ca01f4c7a4074c
Get the total number of bytes sent over the interface since the CPE was last reset.
class IgdDevice(UpnpProfileDevice): async def async_get_total_packets_sent(self) -> Optional[int]: action = self._action('WANCIC', 'GetTotalPacketsSent') if not action: return None result = await action.async_call() total_packets_sent = result['NewTotalPacketsSent'] ...
0
6be301fc319a13764dbe72197891faa0
2117c3c956599fd14075cfd3b9e3e990
https://edabit.com/challenge/9iLhKgqZn5exBrmWm
let change = 0; for (let i = 0; i < x.length - 1; i++) { if (x[i + 1] !== x[i]) { change++; } } return (change > x.length * 0.2) ? "Throw Up" : "No Problem"; }
1
69b69618adb7e292b889f9f2b8121677
679073f58c0bf5c2422eccca8a8b7b97
根据user的缺失参数列表构造询问消息
namespace myselfFast.Component.MsgMobile.qxt public class SendMsgHandler : ISendMsgHandler private string CreateMsgPameters(SendRequestModel model) { StringBuilder paramters = new StringBuilder(); paramters.Append(string.Format("?{0}={1}&", SendMsgParamters.username, model.username))...
0
5a9c241da5bc68fde7831b3946f225d3
477422ef2e82559d685eb427cd6200bd
获取Consumer名称
@Log4j2 public class ActionMQ public static ActionConsumer getConsumer(@NonNull String name){ return consumers.get(name); }
0
cca975245ba5f1c152cfabdb98cff798
386ae9f7a0942b911ccbbc834d9cdf75
Generates adversarial examples using Carlini and Wagner's targeted L2 attack.
def fgm(x, preds, y=None, eps=0.3, ord=np.inf, clip_min=None, clip_max=None, targeted=False): if y is None: preds_max = tf.reduce_max(preds, 1, keep_dims=True) y = tf.to_float(tf.equal(preds, preds_max)) y = tf.stop_gradient(y) loss = model_loss(y, preds, mean=False) ...
0
ca5fabdbd3e53794dec5e35c13c876cf
23058c745336d252430c7448c5caab92
Get All Permission Display Name.
class PermissionService public function getAllPermissions() { return array_map(function ($a) { return $a['description']; }, $this->allPermissions); }
1
3898990cb90c8c82c2bd009d9a103f02
c236984e63fbd954d89d4185089b0d43
返回两个Interval对象的交集时间
namespace antlr4 namespace misc Interval Interval::intersection(const Interval& other) const { return Interval::of(std::max(a, other.a), std::min(b, other.b)); }
1
4a3182a8c83315083dd2e064a7659f0d
60c494303c151546d63fef5c7e9b8df9
장바구니에서 주문한 제품 삭제
@Controller public class CartController @RequestMapping(value="/cartdel") public ModelAndView cartdel(CartDTO cartdto,HttpSession session) { System.out.println(cartdto); String mid = (String) session.getAttribute("loginId"); cartdto.setMid(mid); mav =caservice.cartdel(cartdto); return mav; }
1
d947d9265ca92257264159ba7a5cb7f1
b7a00d73063e51253788c720e3b271ec
scalar object for states - run some episodes -> get some states -> normalize along dimensions with this gathered data state.size = 2 * n_stocks + 1 number of shares for each n_stocks + prices for each stock + total amount of cash in hand
class Alg(object): def process_global_state(self, v_global, n_steps): v_global_one_agent = np.reshape(v_global, (n_steps*self.n_agents, self.l_state_one_agent)) v_global_others = np.zeros((n_steps*self.n_agents, self.n_agents-1, self.l_state_one_agent)) for n in range(self.n_agents): ...
0
461037a901cf02ee78c5e19924159bf7
767930180d1abb86785f0172426cd9da
获取样条上的二阶导数
lx = len(x) slope = [] slope.append((z[1] - z[0]) / (x[1] - x[0])) for i in range(1, lx - 1): slope.append((z[i + 1] - z[i - 1]) / (x[i + 1] - x[i - 1])) slope.append((z[lx - 1] - z[lx - 2]) / (x[lx - 1] - x[lx - 2])) return np.array(slope)
0
c8d9e4b85947b82aa8540fc41f11b651
1df8bb1bdfd2a7cc3e7f742c6f188ad8
Restart the position by resetting the direction variable
void ballFlip::posReset() { setDirection(DIR_RESET); while (checkSensor() == LOW) { step(); delayMicroseconds(StepPeriodUs_reset); } }
1
8866c1c2f1d46affd3ade60ee9e91f75
51da1201ec761fc43bd2846aae6ae3e8
根据案件ID查询当事人选择的仲裁员
ArbitratorInfoVO selectArbitratorInfoByCaseId(String CaseId);
1
760e75c2b8c43e6e88636056d6f6f8ba
ca0331df6e8918cbab77a79b0bb9ad70
метод который ограничивает движение Ладьи по игровому полю
public abstract class BaseTank protected void bondsCheck() { if(this.x < 0) x = 0; if (this.y < 100) y = 100; if (this.x > TankFrame.GAME_WIDTH - Tank.WIDTH ) x = TankFrame.GAME_WIDTH - Tank.WIDTH ; if (this.y > TankFrame.GAME_HEIGHT - Tank.HEIGHT) y = TankFrame.GAME_HEIGHT - Tank.HEIGHT...
1
979857f3f2effcaef8593f1b68ff5479
902643d6f9932470cc3a3ebcbc92d3c7
show ping statistics
printf("--- %s ping statistics ---\n", hostname); printf("%d packets transmitted, %d received, %0.0f%% packet loss\n", sent_num, recv_num, 1.0 * (sent_num - recv_num) / recv_num * 100); }
1
8897f75aa6962f9c5806829956012837
70baf4fee2bce2f088dbbbe0bcfe6007
Verify the Request Abstract Types 3.2.1 Complex Type RequestAbstractType All SAML requests are of types that are derived from the abstract RequestAbstractType complex type.
const requestType = requestBody.requestType; if (!requestType) { logger.info(`Error, you must provide requestType`); return false; } else if (!requestTypeTable[requestType]) { logger.info(`Error, invalid requestType ${requestType}. Choose from ${Object.keys(requestTypeTable)}`); ...
0
ffabef89412c1475a651d6220b4f0616
6cf202a61d3a7a0fa4a0da9131780136
获取指定UID的应用程序接收的流量(KB)
public class DataTraffic public static long getUidTotalSendKB(int uid){ return TrafficStats.getUidTxBytes(uid)==TrafficStats.UNSUPPORTED?0:(TrafficStats.getUidTxBytes(uid)/1024); }
0
b99d072c6b4fd31adfae2ad36254a5b8
24733588ddfd8a44a85b3a22465598ed
Отправка уведомления при создании жалобы
class CommentObserver public function created ($comment) { $stuff = $comment->stuff()->first(); $user_id = $comment->user_id; $res = $comment->reminds()->create([ 'sender_id' => $user_id, 'user_id' => $stuff->user_id, 'related_id' => $stuff->id, ...
0
2810178276813e98baec9f62cc812c66
267bbd6ef0529f26b78fdcccf820c7d8
将字节流转换成数组
namespace EInfrastructure.Core.HelpCommon public static class TypeConversionCommon public static byte[] ConvertToByteArray(this Stream stream) { byte[] bytes = new byte[stream.Length]; stream.Read(bytes, 0, bytes.Length); stream.Seek(0, SeekOrigin.Begin); retu...
1
d272f95dda88638991841f5f2fea2d7e
121ca376d70193add237e1eb26045bd6
Determines how many milliseconds elapsed between the user navigating to the page and the current time.
function redirectInterval() { return time.redirectEnd - time.redirectStart; }
0
69595d2e98ed4c4fbcf537ca3e9cf048
997c1072dc486257b72abfb04bce32c7
Returns elements where the second token is ASSIGN (updating rules with no LABELs)
class MatlabParser(sly.Parser): def expr(self, p): return ('assign', (p[0], p[2]))
0
544b051b4e0831930d06e3843e40ea95
00f9c3f9980f5fe0c42ef1cb38ba2560
@brief Constructor for KinectAngleController class.
TwistExtractor::TwistExtractor() {}
0
9a37919048b48563160c72ed4cd9e5b1
ea4bb6cb1729f7dec45e3358b63f5d5d
获取BigInteger型属性值
{ object obj = GetSingleValue(attr); return obj != null ? (BigInteger)obj : null; }
1
59bc26a9b7c0f0320b738411ada86e14
52bd8f66c3057ca401091d49500dc786
Handles player attack mechanics
public class Player : MonoBehaviour private void HandleAttacks() { if (attack && grounded && !this.myAnimator.GetCurrentAnimatorStateInfo(0).IsTag("Attack")) { myAnimator.SetTrigger("Attack"); myRigidbody.velocity = Vector2.zero; } if (jumpAttack && !grounde...
1
2681714c5169c2dca4c339e310feaad7
258d24131e57ccf43c58da9699f9f7cb
Visit a bound NotEqual predicate.
public class RootBaseVisitor<T> extends AbstractParseTreeVisitor<T> implements RootVisitor<T> @Override public T visitNotEqual(RootParser.NotEqualContext ctx) { return visitChildren(ctx); }
1
8078a0566cd4d2110b231b0d2f2dcbde
f42dbe928eaa65b9d287426d1e0d8e91
按年统计销售额
@Query(value = InvoiceQueries.SUM_BY_YEAR, nativeQuery = true) List<SimpleStatistic> sumByYear();
1
99565ec488e666add22449479d1b00e9
a0a587fc962ad0b313591e1a46007af2
(Used in 'matching_question', set to 'NULL' in others) Correct match for the value given in 'answer_match_left', displayed in a dropdown with other 'answer_match_right' values.
public class QuizQuestionAnswerDim implements DataTable public String getAnswerMatchRight() { return this.answerMatchRight; }
1
7a8f6fb7465c5a585fa09f9d43314bab
135219c9ebe2b96939c1bf822cf67857
checks if collectorName only consists of letters
{ if (string.IsNullOrEmpty(collectionName)) { throw new ArgumentNullException("collectionName"); } if (collectionName.IndexOf('\0') != -1) { return false; } if (Encoding.UTF8.GetBytes(collectionName).Length > 121) { return false; } ...
0
275c0de1efbc66126a0e76224c088264
64e9f84510d474957af91b7249604a14
Method untuk menambahkan pecahan 1 dan pecahan 2
class Fraction public Fraction plus(Fraction r) { int coDeno = this.Deno * r.Deno; int coMole = (this.Mole * r.Deno) + (r.Mole * this.Deno); Fraction res = new Fraction(coMole, coDeno); return res; }
1
60fe19ad3d002ef9ac64ae64a94fce74
7311668ff56649a0f63c1742952a7e6f
Make sure datetimes returned from the database are UTC datetimes
if not prepared: value = self.get_prep_value(value) if value is None: return None return connection.ops.value_to_db_datetime(value._date)
0
336bd3d0dfd94f09c9333bb9857ed77b
c7d5b3b08ed7d42a9dcb3c534d439a0c
查询所有学生(查看同班同学)
public List<Students> queryAllStudents();
1
0db755d24ff52a3846cec4605dde2410
f399814c8a4fefe97a9d56c8fadc1ff8
Returns wether the channel update task is still active or not.
bool TaskActive();
1
6868cbb05af820e6709d30e0095a974a
c962d1bd715a6060e65bd3292e39c533
remove all columns in model
for _key in self.dic_list_view: for _listview in self.dic_list_view[_key]: try: _view = _listview.treeview except AttributeError: _view = _listview.matrix _model = _view.get_model() _columns = _vi...
1
8099f14967ad06fb84cf7c806ee1429a
5cd1303f1377c31061b0a675fa1a93c4
Validation rule to test if the supplied collection does not contain the specified value.
where TVal : IEnumerable<TItem> { var current = builder._impl(); current.State.CurrentToken = new ValueNotInToken<TVal, TItem>(current._contract, collectionFunc); return current; }
1
fadaa9a1f8805ad9ff395fa368d13fd8
18db9413daf67ca35e1ae6835c19b167
将hex转rgb 需要兼容三位的hex
var rgba = []; if (/^\#[0-9A-F]{3,4}$/i.test(hex)) { var sixHex = '#'; hex.replace(/[0-9A-F]/ig, function (kw) { sixHex += kw + kw; }); hex = sixHex; } if (/^#[0-9A-F]{6}$/i.test(hex)) { hex = hex + "FF"; } if (/^#[0-9A-F]{8}$/i.test(hex)) ...
1
d1d24229e7d405485f8f248979e901fe
ca9e5e08dbc159ba2868b02f8b911dd9
_____________________________Input_________________________________________________________________
bool input() { std::string text; std::string string; char joker = 0; std::cout << "CHOOSE WHERE W/R DATA:" << std::endl; std::cout << "c - console;" << std::endl; std::cout << "f - file." << std::endl; std::cout << "READ DATA FROM" << std::endl; std::cin >> in; std::cout << "WRITE DA...
1
f70ab3a041c6cccf74044d845cd802ba
375429f5eecbdba9c7cf16071e945aec
Case insensitive ends with
function EndsWithIgnoreCase( $haystack, $needle ) { $length = strlen( $needle ); if( $length == 0 ) { return true; } $haystackEnd = substr( $haystack, -$length ); return ( strtolower( $haystackEnd ) == strtolower( $needle ) ); }
1
1e1a190be5a4c39d795fe3d5b737a81d
19ec6bd8ea26920084e90b57533fcdd5
This function shows the waiting image while ajax request response is pending
function showLoadingImage (elementId){ $("#" + elementId).html("<div id=\"loading-image\"><img src=\"/images/ajax-loader.gif\" alt=\"Loading...\" /></div>"); $("#loading-image").show(); }
1
383013ed5323b549d69e7c95280b1f0c
e305917de4cbcc254e013b9f4b9a4e3e
bool: Whether to enforce detailed balance.
class ExpectBase(): def thrifty(self) -> bool: return self._thrifty
0
1a2edfa92e65ba0682ef7af21961e19e
a2ce9ec048549a1c590d6dc1a4a96e43
Indicates that a row has been processed.
namespace galogen namespace internal class ApiEntity void markProcessed() { processed_ = true; }
1
48e09e00e4f0d30051d8d2c7741f49e2
087c7852c145bfa65fdc22a1347a2448
# this function will join overlapping bed regions
liftoverBedFile.hg19.hg38 <- function(filename.hg19, filename.hg38) { tbl.19 <- read.table(filename.hg19, sep="\t", as.is=TRUE) tbl.38 <- liftoverBedTable.hg19.hg38(tbl.19) printf("writing %d rows to %s", nrow(tbl.out), filename.hg38) write.table(tbl.out, file=filename.hg38, col.names=FALSE, row.names=FALSE...
0
466efb2e22aa241c071005a4775b62a3
bb2e1788ca70ebdf3a6cf9e869e47a69
Return a padded localfile. Local files should be a fully qualified path. If the path is not fully qualified, this method will add the tools prefix to the file.
public function addFile($filename, $localname=null);
0
67b23c2f5984b405a0db86deefc33e7e
186a54a1dc0b7a3e2a8f943fced72b5c
Método que cria o grid de botões
public class CadastroCliente extends JFrame implements ActionListener, MouseListener private void insereBotoes() { linha(); gbc.insets = new Insets(10, 5, 15, 0); botaoInserir.addActionListener(e->{ limpaTxt(); botaoClicado = 1; txtId.setText(Integer.toStrin...
1
5b7f5c75519d5d0ba1804204dffcd52c
006c2d696c33c44505446e4e5fb8f636
模型添加的模态框
function ModelList(){ layer.open({ type: 1, title: "列表", btn: ['确认', '取消'], area: ['400px', '500px'], yes: function(index) { layer.close(index); }, no: function() { }, content: '\<\div class="model-body">' +'\<\div class="form-margin">\<\label class="control-label">入库批次\<\/label>\<\div class...
1
eba23a22ef7d196a8bb1e0ce534b1198
4b01c941c3315e884719679f7815c240
This function returns a date's day field
def get_day_from(date): day = int(date[8:]) return day
1
0bbfa959ef9aff8f01fa79daa7bc47d1
871732553cf9e311f01c6efab05480ed
自动急救
local actor = args.actor if actor.lastBusy == nil then actor.lastBusy = app.battle:getTime() end if not actor:isIdle() then actor.lastBusy = app.battle:getTime() return false end if actor:getManualMode() ~= actor.STAY then return false end if actor:isRanged() then ...
0
5a8b49c6bbe364028a55ccab3ff5ea95
c0baf06575271da1ac60f84c235e6dfd
Sums the incoming querries up.
public class QryopSlSum extends QryopSl @Override public void add(Qryop q) throws IOException { args.add(q); }
0
d4eae6ba360ac7487f44e8f234d3a904
f27b017a3d5b164c243f75bc5d788143
Read and return model metadata and input/output variables as dictionaries from an MLFlow model directory. Current implementation only handles simple pickled models. Future feature work is required to include more types of MLFlow models.
if not mlmt_supported: print("Model tracker not supported in your environment; can load models from filesystem only.") return None mlmt_client = dsf.initialize_model_tracker() if collection_name is None: collection_name = get_model_collection_by_uuid(model_uuid, mlmt_client=mlmt_clie...
0
ac5896f31affae810c260c129be385cb
f7308a22435abcf4856427416ffee120
Acknowledge an bank notification.
try: notification = Notification.objects.get(uuid=uuid) except Notification.DoesNotExist: return Response( {'errors': ['No notification with this id.']}, status=404) if notification.acknowledged: return Response({'notes': ['Noti...
1
3176549bb751bf1939db8e730084ebb0
38755cfdb743d4f6fdc2cfa6c7c97634
弹窗消息数组中是否包含希望内容
namespace GameFramePro.UI public static class UIHomeAutoPopupManager public static bool IsContainPopupInfor(UIAutoPopupMarkInfor popupMarkInfor) { foreach (var item in s_AllWillPushPopPages) { if (item.mWidget == popupMarkInfor.mWidget && popupMarkInfor.mPagePrefabNam...
1
1c70ec040acd1e6959fb3627cda0984e
b02fb632efaf0056352ae66538d7423f
Check if required sounds exist locally and download them from server if required.
global soundsList soundsList = "" fullpath = os.path.join(AudioFilesPath, MySet.SF) if not (fullpath and os.path.isfile(fullpath)) and MySet.PS: soundsList += (MySet.SF + "\r\n") fullpath = os.path.join(AudioFilesPath, MySet.SFB) if not (fullpath and os.path.isfile(fullpath)) and MySet.P...
0
980b7b991ddd41c08cb3cfd6eddfc4a9
8342faa38ddf283acc75342295cbd869
Comprueba comportamiento normal ante grados inexistentes.\n Comprueba que ni un docente ni una sesión extraña puedan obtener los alumnos de un grado, con independencia del grado indicado.
class TestAlmacen(TestCase): def test_listar_expedientes_grado(self): self.assertNotEqual(self.almacen.listar_expedientes_grado(self.grado_valido), None)
0
b13ce755309ae75fe9376facd61b00e0
d98ac27b4527ab0a064b0ff038a9d694
Function to log the bugs inline ie. as the crawling happens
function introduceBugs() { }
0
fac487a4d67938e9ab610729570c7cee
a448487cf046c44d9174c9cdb7339afc
Metodo que retira o primeiro objeto Atendimento da fila
class FilaPreferencial(Fila): def atender(self): if self.enfila > 0: self.enfila-=1 self.fila.pop(0)
1
967be293ad3740104d8aa8e812fcd96e
15a78b3c2b6a8605acaf4e75398e5a1e
Remove the last SP colormap
mycmap = cmap mycmap._init() mycmap._lut[:,-1] = np.linspace(0, 0.5, N+4) return mycmap
0
8c2ce28a91efbc6e47d63ca8ca375697
da345f0b0cfd4a0432ada96026ab9dab
在节点列表中, 过滤指定包名的节点
public class XDockView extends HorizontalScrollView implements View.OnClickListener, View.OnLongClickListener, DropTarget, DragSource, DragController.DragListener public void removeItemsByPackageName(final ArrayList<String> packages) { final HashSet<String> packageNames = new HashSet<>(); ...
1
4cbc8415c30e6e6d8999df7c17a58c15
6521b1f58feb2c94f44557ba49da58f1
求差价数组 ==> 求最大连续子数组和
class Solution: def maxDiffSubArrays(self, nums): n = len(nums) mx1 = [0]*n mx1[0] = nums[0] mn1 = [0]*n mn1[0] = nums[0] forward = [mn1[0], mx1[0]] array_f = [0]*n array_f[0] = forward[:] for i in range(1, n): mx1[i] = max(mx1[i-1] + n...
0
cefb912d97f83d41d9d2680f08b6261b
c4306390fcc7d6d8b97f1e51f70a4588
向房间中添加Model类
namespace PackingCygest.ViewModel public class LoadingDetails public void InsertRooms(List<RoomsModel> roomModel) { _data.InsertRoomModel(roomModel); }
1
e4377f8b6119be37b5ac5c4fca09cefa
5a926fd01784f2054c82966757953bf1
Set SSH Options for ssh calls. This is used to set the SSH credentials for calls that use SSH instead of REST HTTP.
class PiRelay public function setSSHConfig($host, $user, $keyPath = null, $active = true, $port = 22) { $this->_ssh['host'] = $host; $this->_ssh['user'] = $user; $this->_ssh['keyPath'] = $keyPath; $this->_ssh['active'] = $active; $this->_ssh['port'] = $port; return $this->_ssh; ...
1
c9c2acdbf3cd220c00106bc57dd266e4
d65a51df6c5defe13f3d65cb3cd49e6b
读取8位无符号整型数
class ISerial(): def readUInt8(self)->int: b = self.read(1) return b[0] & 0xFF
1
86716afbc99a4e590f1165db2365cd3a
7700a936a92670ce35d36456e824ae34
Execute all above methods to create order and task and users using transaction query.
OrderDao dao = new OrderDao(); try { DataSourceUtils.startTransaction(); dao.addOrders(order); dao.addOrderItem(order); } catch (SQLException e) { try { DataSourceUtils.rollback(); } catch (SQLException e1) { ...
0
9cd560d60ed073845987614efa51a8bf
e890ed7979fe06029678d450df147847
Invia un suggerimento agli amministrazioni sulle funzionalità che vorresti vedere aggiunte al bot
def suggest @suggestions = suggestions_service.suggestions render 'suggest', layout: false end
0
b521c2819b3e81c1a6f8b9e5815aac4d
529b2e03e6de9cbe33e262c0c090af7f
Writes attachments contents to the specificed output stream object using base64 encoding.
if (Collections.isEmpty(email.getAttachments())) { return; } for (EmailAttachment ea : email.getAttachments()) { final String mimeType = MimeTypes.getMimeType(ea.getName()); out.write("--"); out.write(boundary); out.write("\n"); out.write(SMTPHeader.CONTENT_TYPE); out.write(": "); out.writ...
1
6997a7ea030361961597c99ce91dde58
65f1bbde731d67b7dcefde89017bd80a
增加教育教学评比竞赛情况
@SuppressWarnings({ "unused", "unchecked" }) public String publishAOCSC(HttpServletRequest request){ Student stu = (Student)request.getSession().getAttribute("student"); try { String achievementId = Common.uuid(); Object[] obj = Common.fileFactory(request,achievementId); List<File> files = (List<File>) o...
1
a84fc877307223966c894c9f8c3cc579
8e94267586abff94acebb2bb20b2bfc3
Removes the strategy with the given name.
default void removeFromStrategy(Object key) { objectsStorage.remove(key); }
0
d86dcb383caab320881621f6345ae368
b3b9c161218a98384a914b52634c8574
Получение цены закрытия
class MarketDatabase: def get_close_price(self, contract, settle_close_datetime): cur = self.cnx.cursor() query = ("SELECT max(datetime) FROM {contract} " "WHERE " "datetime < '{settle_close_datetime}'".format(contract=contract, ...
1
c3a53dc86c8bc90aa2214fef9f2b7b6f
09c5319bc757698ef199fc2161ac0994
Sets the value of the '{@link com.concur.babel.babelIdl.Struct#getSuperType <em>Super Type</em>}' reference. <!-- begin-user-doc --> <!-- end-user-doc -->
@Entity @Table(name = "code_transitive_rels", uniqueConstraints = @UniqueConstraint(columnNames = { "terminologyId", "terminology", "version", "id" })) //@Audited @XmlRootElement(name = "codeTransitiveRel") public class CodeTransitiveRelationshipJpa extends AbstractTransitiveRelationship<Code> implements CodeTr...
1
9462af7cdf22ecc9dd8255229d3137d8
9fc9b8ea043519cbb05cf4a5390ff8dc
! @brief Trickle timeout handler function for PC.
{ volatile U32 i; print_dbg("... T I L T !!!") ; print_dbg("\r\n"); for ( i=0 ; i < 1000000 ; i++); }
0
b4494dee75e37851f456849e69d9fd34
5cf14b971d1b513435382a7c9bc484c3
检测产品是否有折扣活动 《优惠购买》 同时检测用户是否有资格参加打八折活动、
public class ApiGetTempletePageInfoNew extends RootApiForVersion<ApiGetTempletePageInfoResult,ApiGetTempletePageInfoInput>{ private void refreshVipLevelActivity(String mobile,List<PageTemplete> tempList,String sys_time,String channelId) { boolean isHasActivity = false; boolean isNeigou = false; boolean isVipDicou...
1
5fa53253d57e910201abcdb1482a35b2
53b706460323a91b6230dd48968b9e4e
Actualizar el modelo Persona y el modelo Cuenta con la informacion eviada desde el formulario, tomando en cuenta el external_id de ambos modelos
namespace BSD.C4.Tlaxcala.Sai.Dal.Rules.Loaders public partial class PersonaExtraviadaLoader<T> : BaseLoader< T, PersonaExtraviada, ObjectList<T>>, IGenericGateway where T : PersonaExtraviada, new() protected override void CompleteEntity(T entity) { ((IMappeablePersonaExtraviada)entity).Complete...
0
d74a69278260028c9dbeb71f9ee97691
7817877d30a4171bc278de9b6725f7b2
Determine location of database.
class Database public function getLocation() { return $this->location; }
1
62f92786303d7b068cf649d390dc282e
a8df31d0906e71a18e0b36e23abf2687
客户端检测app是否被打开过
public class Tools public static boolean checkAppIsOpen(Context context) { ActivityManager am = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); List<ActivityManager.RunningTaskInfo> list = am.getRunningTasks(100); for (ActivityManager.RunningTaskInfo info : list) { ...
1
99ce549c6ce4019c1df4c8ef3c6c941a
d3206874b2cb6fbc4cd0bc52cf10f0de
Determines whether this instance can deserialize the specified XML document.
namespace Dot42.Ide.Serialization public class AppResourceSerializer private static bool CanDeserialize(XElement element) { if (!Serializers.Any(x => x.CanDeserialize(element))) return false; return element.Elements().All(CanDeserialize); }
1
9f7da970e56bf96140fb4202f4ecbe17
4fe9d5594617bad5c56ed61c5e30e155
OAuth2 initiate authorization flow
var authUrl = oauth2Client.generateAuthUrl({ access_type: 'offline', scope: SCOPES }); console.log('Authorize this app by visiting this url: ', authUrl); var rl = readline.createInterface({ input: process.stdin, output: process.stdout }); rl.question('Enter the co...
1
11890f6fb8f6a2d90b9d30664f76bf85
1dffffa6b93987d10d8bc5740086665f
returns true if the ipAddress is in the IPList.
_Bool icSearch(PIPCACHE pIpCache, PIPADR pIP) { if (pIpCache) { PIPLST pIpEntry = &pIpCache->ipList; PIPLST pIpEnd = pIpEntry + pIpCache->uiCacheSize; IPADR ipAddress = *pIP; while (pIpEntry < pIpEnd) { if (pIpEntry->ipAddress == ipAddress) { ...
1
fd39081d142773623d03936210395eab
ce8530b3f08b27079be56b35f94593d8
Test models merge OK and have expected model coordinates
existing = self.instance.locations.all() eid1 = existing[0].id eid2 = existing[1].id form = { 'name': 'Test 1 - Updated', 'locations': json.dumps({ "type": "FeatureCollection", "features": [ { ...
1
bedcbfd810b3e3fe253910b581ba2292
7dfedc4f8a583d3a13b10a8b6fb2e084
look up page that matches permalink
{ $page = $this->db()->query() ->sql(' select pg_id_pk as id, pg_synonym as synonym, coalesce(pg_title_#lang#, pg_caption_#lang#) as title, pg_caption_#lang# as caption, pg_css_class as css_class, pg_keywords_#lang# as keywords, pg_description_#lang# a...
1
7bf8840041e445f05647572c64cd832a
688a9661c396e77c5208709cbf852919
Reports on urls that rules fired on.
class BucketEventRule def callback(urls, host: '') urls = [urls] unless urls.is_a?(Array) @callback_urls = urls @callback_host = host self end
0
0c1cbf4712f6b3de03cbe13a01bacfbe
e87fc440432836b63ced8e6b4e5781e0
Gets the transaction_amount of this PaymentTerminalDccTransactionSum.
public class PaymentResponse implements IPaymentResponse public long getTransactionAmount() { return transactionAmount; }
0
cbbd26485bf1a197c899c8c1beca3f2e
8bb9416a78f14f883492e95212c558d3
Set the suPos.
class CMDExec(object): def setSuString(self): if not self.isSuSupport(): self._su_arg = ""
0
2b746e5e632c1d158f4df77ce36c82a2
9d644eab4dacc83d9a0adc6dd42e0fa3
Attempt to login to PlayFab
public class Controller : MonoBehaviour void PlayfabLogin() { var request = new LoginWithCustomIDRequest { TitleId = "E0B82", CreateAccount = true }; PlayFabClientAPI.LoginWithCustomID(request, Success, Error); }
1