query_id
string
corpus_id
string
query
string
code
string
label
int64
992f7db835cde4d6a7dad26763f65c22
964456b8bac71caa51b92bb9c15b4917
Função para mandar a lista de salas abertas para os clientes conectados no salão principal
function ListaSalas($Campus, $Salas = ""){ global $conexao; $SQL="SELECT s.salanumero ,s.salacodigo ,s.salanome ,f.filialnome FROM salas s LEFT JOIN filiais f ON f.filialcodigo=s.filialcodigo WHERE s.filialcodigo = $Campus "; if (!empty($Salas)) $SQL .= " and s.salan...
0
89e1e696360b56c4511b3d3e6943013d
9f52e9a9bf4541f0164e0f7400e46e25
Returns the index of the first character in the row containing a given character index.
public class Utilities public static int getRowStart(JTextComponent c, int offset) throws BadLocationException { return getRowStart((BaseDocument)c.getDocument(), offset, 0); }
1
fc9b7f87519add8be440193a7a76c196
722735bab556657a66589d7546159b81
Convert a calcsfh solution and parameter file into a fake parameter file
class ParFile: def createParameterFile(self, template='hsls.p%{pressure)s.df.par'): pars = self.templ % self.subs parf = open((template % self.subs),'w') parf.write(pars) parf.close()
0
17eb50dabc606ec2a4713d03a491464e
244375491c6b68333c476bc6628de95c
在某个类目录下查找并加载某个类对应的类文件 类名 类目录
String packPath = packName.startsWith("/") ? packName.substring(1) : packName; String classPrefix = packPath.replace('/', '.'); URL url = this.getResource(packName); if (url == null) { url = this.getParent().getResource(packName); } if (url == null) { url = ClassLoader.class.getResource(packName); }...
1
8e3871b1a1d1c2a52aa4f1382215f579
dacd950f9f1ee2ac4a8134f13a939cbd
@brief Renvoi une colonne d'une table de la BDD en fonction de la requête passée en paramètre
class PDOadm extends DBConect public function ADMObtCol($_select, $table, $colum, $param) { $sql = "SELECT $_select FROM $table WHERE $colum = ?"; $param = array($param); $query = $this->con->prepare($sql); $query->execute($param); $column = $query->fetchColumn(); return $column; }
1
7e4acb696f7be96c0903651feea232cd
fa66da30b43453478e8615b90aa98e2f
add permissions to file if necessary
void ProtocolFile::makeFileWritable(const QString& fileName) { #ifdef WIN32 qt_ntfs_permission_lookup++; #endif QFileDevice::Permissions per; if(QFile::exists(fileName)) { per = QFile::permissions(fileName); per |= QFileDevice::ReadUser; per |= QFileDevice::WriteUser; ...
1
35cb4d71cdb1fa412153fb5e1f75516f
e5183dafa5046589e0bc104dc65ff528
Returns the mp4 size.
{ long retVal = 0; const string key = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\MCI Extensions"; string fileExt = ""; var fileInfo = new FileInfo(filepath); if (fileInfo.Exists) { fileExt = fileInfo.Extension.Replace...
0
245fbe938ce8e0bead2740e23e813820
468bfc055393115b48ee8b4f5dc83866
调用studentMapper查询学生成绩信息
@Service public class StudentServiceImpl implements StudentService @Override public List<TbStudent> selectStudentScore(HttpServletRequest request) { return tbStudentMapper.selectStudentScore(Integer.parseInt(request.getParameter("schId"))); }
1
e6f1c24f5edd0ddce9ef5a5397f8861f
b7813fa3db7601c399d65c9b9556b030
Sets the current lower value of the model. For a slider, that determines where the knob appears. Ensures that the new value, lowVal falls within the model's constraints: minimum <= lowVal <= lowVal + lowerExtent <= upperValue
lowVal = Math.min(lowVal, Integer.MAX_VALUE - lowerExtent); int newValue = Math.max(lowVal, min); if (newValue + lowerExtent > upperValue) { newValue = upperValue - lowerExtent; } setRangeProperties(newValue, lowerExtent, upperValue, upperExtent, min, max, isAdjusting); }
1
c75b95a69e97b6dcb7129c3c000d24f5
abed995e73c238d3e5bf3c588123fb29
Checks if a NegationDetector was initialized.
class FeatureExtraction(object): def check_neg(self, tagged_token): tags = [tag for tag in tagged_token[2] if tag is 'neg'] if tags: return True else: return False
0
56b3a03fa7d7c55cc17f6f2c6bce27bb
9fd2f8cbdb3f580b53123680eac496f0
Return the set of all used table aliases.
public class XMLQueryParser extends DefaultHandler public String[] getAliases() { return aliases; }
1
dc00519c041710ec0d837a6d26db4981
47f5ada1cac33c9f4a5e7c24eaa848c7
Updates the GUI perk elements on the screen
void refreshGUIElements();
1
97594dc831d9e07029514569dfe61e73
3a2c034484c79bec843452a5b8983250
register track handlers for pilot GENCODE tracks
this->register_for_event(ON_BLOCK_BEGIN); this->register_for_event(ON_BLOCK_END); this->register_for_event(ON_GCODE_EXECUTE); this->register_for_event(ON_GCODE_RECEIVED); this->register_for_event(ON_PLAY); this->register_for_event(ON_PAUSE); this->register_for_event(ON_HALT); this->on_co...
0
3d4af8c85b77a51672089f53ed041d13
b5e55da2197cff44dd27c49a9c956f27
Fonction de traitement d'évênement pour le déplacement de la souris Crée le rectangle ou met à jour le rectangle du zoom
class RectangleElement extends PointElement _mousemove_event(event, viewport, force) { if(!this.visible || !force && (!(window.uiControlHandler.getAction() === ACTIONS.DO_NOTHING || window.uiControlHandler.getAction() === ACTIONS.ADD_ANNOTATION) )) return; var coords = viewport....
1
06415f97258f001abff983869070c70a
15237932799878b1c86d3acac993a5c6
Atualiza apenas a informação alterada.
@Service public class VeiculoService public Veiculo patch(Veiculo newObj, Map<String, Object> values) { values.forEach( (change, value) -> { switch (change){ case "veiculo": newObj.setVeiculo((String) value); break; case "marca": newO...
1
e07eef0e5c613240ef8102510ce3333d
7447a5d48a61b299cf0275344f1eed7c
해당 컴포넌트가 선택된 상태인지 아닌지 알려줌.
public boolean isSelectionComponent(){ return false; }
0
e2786128a78193575dda47ec80cead25
cf48a39ff712eeb40ae1bfb22a1e1576
查看收藏的图片
public ActionForward galleryView(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String id = request.getParameter("id"); ImageGallery imageGallery = imageService .getImageGallery(new Integer(id)); String username =...
0
361cf2a74602699e5f2f034be8c6b07a
b2fe2530b40ea0e97c5d44ec1ccc6019
查询卡池具体信息,包含具体卡牌(刷屏预警,建议私聊)。不带参数可查询卡池列表。
class One extends OneBase public function hookpoolInfo(int $a, int $b, int $c) { return $this->makeCall('one.hookpool.info', $a, $b, $c); }
0
42fb96ec3177d244355baf9ba492a4c9
6a826640912286dd7e15b9cec11e3332
This method implements the incremental level of the feed. It checks if any updates have been made in the tags from the last fetch time, and returns the updated tags.
uint? count = null, CancellationToken token = default) => TypeHelper.TryInvokeMethodAsync(() => GetNewTags(offset, count), token);
0
c3692419488f4635e97fa456ccdbb87d
fee4b86fbe497105ba0e83a0c6ae5d4b
Computes the forward FFT transform.
public class DoubleFFT_1D public void complexForward(final double[] a) { complexForward(a, 0); }
1
97a9cd2b82d8dfda13e8f45c15f0e3a2
fb9b1a5f34567cabaf58cbbfdbacd0ad
Function that adds all the solvant exposure area of each atom of each residue
df_coul = df_coul.rename(columns={"Index": "Index", "ResA": "ResA", \ "ResB": "ResB", "AvgCoulomb": "AvgIntTot", "AvgCoulSD": "AvgSD"}) df_vdw = df_vdw.rename(columns={"Index": "Index", "ResA": "ResA", \ "ResB": "ResB", "AvgVdW": "AvgIntTot", "AvgVdWSD": "AvgSD"}) df = pd.concat([df_coul, df_vdw])...
0
2b0407282c4e11e5ae4ea3a881f0c65e
040143b3a31f3ff77f3b0f85862a9ef1
Participant pages always respond successfully.
url = build_url(partial_authed_server.port) + "/simple" resp = urlopen(url) assert resp.getcode() == 200
0
1a28aaae1b9f5243cae4d5eae7681374
e404bc3fbf76d7c31accfacbc14986ab
GET /pois : get all point of interest.
class CdlPoi extends Controller public function index() { return \App\CdlPoi::all(); }
1
c7101feb76f22c8be79e69d3774c960a
a65cd79e327a448dc31a0a8ca77c3802
@brief 引数のいずれかが文字列であることを評価する。
ORACUL_FUNCTION(is_string) { oracul_is_type(INTERNAL_FUNCTION_PARAM_PASSTHRU, IS_STRING); }
0
4ae0867f99a164cfdc4896cb8efe3fc2
64a245b1c0c61e03cb6595a9fb82f8a6
A test for UpdateBbieName
namespace VIENNAAddInUnitTests.upcc3.Wizards.dev.temporarymodel.abiemodel [TestFixture] public class TemporaryAbieModelTest [Test] [Ignore] public void UpdateBbieNameTest() { string updatedBbieName = string.Empty; target.UpdateBbieName(updatedBbieName); ...
1
406fa8a9d5913b16d9fb8d87da48eee5
1315ccd0b4865e40ccfae8a6c4e99919
This method takes a browser instance and a url. It then navigates to the page, pulls the html from it and parses it in to a BeautifulSoup object we can use in python to get the information from it.
def getParsedPage(url): response = requests.get(url) parsedPage = html.fromstring(response.content) return parsedPage
0
487556b3f1fba79d537059703abc59a5
2f3d6a06e934b51c671a358b29799c40
更新总的钻石数量
updataInfo() { this.labDiamonds.string = this.getFixNumber(glGame.user.get("diamond")); }
1
4e7d6e6bc2b1e7ec352f9d1d6733b235
7a5f3a5a347bcc473b0bd9d4e09a8399
The number of bytes in the slice.
impl<'a, T: ?Sized> BufferSlice<'a, T> where T: Content + 'a pub fn get_size(&self) -> usize { self.bytes_end - self.bytes_start }
1
a3f8b23dcc5c24ab0c9ce89d80167507
221369d395cf6edd7fde46bfa083c8eb
This method must be implemented in every extended class to fill $availableTypes
abstract class TagTypeEnum public static function getAvailableTypes() { return [ self::TYPE_GENERAL, self::TYPE_MACHINE, self::TYPE_DEPARTMENT, self::TYPE_DOCUMENT ]; }
0
469d3c56f7d42b57f1baea7a7f42bf55
024c64c99bb61a473587bd5bae483148
检测指定时间内重复评论
function queryReplyInterval($query,$nowTime,$posterID) { $sql = 'SELECT * FROM ' . jieqi_dbprefix('article_reviews'). " WHERE posterid = '" . $posterID . "' ORDER BY `posttime` DESC LIMIT 1" ; $status = $query->execute($sql); if($status) { $info = jieqi_query_rowvars($row = $query->getRow()); $replyTimeInterv...
0
f2b44e97303f9cc6b0769559cbf3f270
f851a9ae25685959ddb0ff82b4939e32
请求遗留订单数据
var url = _host.api_url + "/storageOrder?entrustId=" + $scope.orderInfo.entrustId + "&orderStatus=" + $scope.payStatusList[0].id; _basic.get(url).then(function (data) { if (data.success) { data.result.forEach(function (value, index, array) { if (value.id !...
1
f0747fef94b3af57cebe125d8dc9a00e
cbc412f397b802816bfa92cf59ab3013
Handle a QUIT message
m_log.trace("eventloop: Received QUIT event"); m_running = false; if (evt.reload) { kill(getpid(), SIGUSR1); } }
1
fa03831d46b5cebba27910d3fe7f7aea
f201b84797c92962722166e59362a35e
제휴시설삭제리스트 조회
List<Map<String, Object>> selectFacilityDelectSearchList(SqlSession sqlSession, String facility_Name);
1
5ec268c86148677d1efdd12897985089
7a468f6d4c12a9b417ec7c61d52c1032
If we try to pass a null comparer, an exception will be thrown.
[ExpectedException(typeof(ArgumentNullException))] public void TestStableSortAdd_WithComparer_NullBuffer_Throws() { IReadOnlySublist<List<int>, int> list = new List<int>().ToSublist(); IExpandableSublist<List<int>, int> buffer = null; IComparer<int> comparer =...
0
1adb60ab10b1110e51e487a6c6f85900
09e135055721e20270d60296244a9433
Tests copying one top-level file to a bucket.
class GsutilNamingTests(testcase.GsUtilUnitTestCase): def testCopyingBucketToDir(self): src_bucket_uri = self.CreateBucket(test_objects=['foo', 'dir/foo2']) dst_dir = self.CreateTempDir() with SetBotoConfigForTest([('GSUtil', 'check_hashes', 'never')]): self.RunCommand('cp', ['-R', suri(src_bucket_uri...
0
e65992e15414d70a99fb12bc71256ec5
5f3ba93948ea46da7de02af09c3a6985
Ссылка на оригинал
public class OpenGraph public String getOriginalUrl() { return pageUrl; }
1
a58d0d411b3f03cca6bd15fcb550f018
d2dd0187815b072d47e1f8a938c462b9
Return the number of pixels in img that are not black. img must be a Numpy array with colour values along the last axis.
def area(image): return int(np.count_nonzero(image))
1
ffb94527856dc7eed2c97b5049a16be7
2f0193aa7f82c396ec986de43622c24c
when correcting results, process the most recently modified one first
String[] builds = DB_Results.getBuilds(); class BuildDateComparator implements Comparator { public int compare(Object o1, Object o2) { String s1 = (String) o1; String s2 = (String) o2; return Util.getBuildDate(s1).compareTo(Util.getBuildDate(s2)); } } BuildDateComparator comparator...
1
01511cd460a0e002bba31afb7b07a53f
eabf39a5f74f5b2343311cb0c3e5758d
根据车位id查找车位及包租婆信息
$id=input('id/d'); $parkType=input('parkType/d'); $ptypes=input('types/d'); if($parkType==1){ if($ptypes==1){ $data=DB::table('pk_carpos')->alias('c') ->join('__MANAGER__ m','c.mg_id=m.mg_id') ->join('__USER__ u','u.uid=c.u...
1
9edb4acca980a42a7fe98583336622b5
78972b9b0e73bc243a201d14e2c75217
Returns the cell or cells defined using excel style A1:B3 references.
public override TXlsCellRange[] GetSelectedCells() { CheckConnected(); TXlsCellRange[] cellRange = ActiveSheetObject.Window.Selection.GetSelection(ActiveSheetObject.GetActivePaneForSelection()); if (cellRange == null) return new TXlsCellRange[] { new TXlsCellRange(1, 1, 1, 1)...
0
e1f7e2eb3a0c06318967b645b5928ce5
028a2beaaa4fc8956bc2fa6ca399a91c
Returns the distributed object manager in effect for this session. This instance is only valid while the client is connected to the server.
public abstract class ChatSession extends ImsServiceSession implements MsrpEventListener public ImdnManager getImdnManager() { return ((InstantMessagingService)getImsService()).getImdnManager(); }
0
8f1c3b123f662c040a4301c8c542b137
397ab4c8161e367a06af4f6b20b54271
Check that token is related to assign tokens.
function initProgramCompilerExpression(compiler, CompilerException) function is_assign_op(token) { }
1
bb81983385adb8089968b187983ae0f3
a1d30410e12c44d325b9552b39d2b30c
Returns a zero controller
int zero_out_controller() { int i; rc_filter_reset(&D1); setpoint.pos_x = 0.0; setpoint.pos_x_dot = 0.0; setpoint.pos_y = 0.0; setpoint.pos_y_dot = 0.0; setpoint.current_waypoint = 0; cstate.pos_x = 0.0; cstate.pos_x_dot = 0.0; cstate.pos_y = 0.0; cstate.pos_y_dot = 0.0; cstate.rho = 0.0; cstate.alpha =...
1
64981715ddf1142017e3413d640e6a2a
8c8e19a785cb74b7eb454629c25d594b
Devuelve el nombre de usuario de una persona
String getNameUser (int id) throws RemoteException;
1
3b86684087ece4b96129e8cb5624e248
108ff39eb1b3bbc59308c2e9a8745edd
This program convert time in second to hh:mm:ss
t = t/100 no_secs = t/10 A = no_secs//60 B = (no_secs%60)//10 C = (no_secs%60)%10 D = t%10 message = str(A)+":"+str(B)+ str(C)+"."+str(D) return message
0
12619bd1134312daaa7d0c6130857633
ac51de47a46a126b043e81a14bdc8c7b
Produce a user-friendly string representation of GradeEntry self. :@return: string representation of GradeEntry self :@rtype: str
report_str = "student: {:s}\n\n".format(self.__student) for course,grade in self.__course_grades: report_str += " {:s}: {:s}\n".format(course.get_course_name(),grade) gpa = self.grade_point_sum() / self.total_course_units() report_str += "\ngrade point average - {:.2f}".forma...
1
326836fa806138a41128af0a460103d6
a2d8ed52a15d0e06a2055ecb18b10ecc
Test dictionary comparison where one key's value differs.
class DictionaryObjectTests(FantasticoUnitTestsCase): def test_dictionary_eq_differenttype(self): obj1 = MockDictionaryObject({"attr1": "abcd"}) obj2 = object() self.assertNotEqual(obj1, obj2) self.assertNotEqual(hash(obj1), hash(obj2))
0
e6c8a1270d86e2077fcd52d3b8276ebe
2a02bbd78131e06cb3dfdd7b03795bc7
http://stackoverflow.com/a/3212885
def chunks(l, n): n = max(1, n) return (l[i:i+n] for i in range(0, len(l), n))
1
534549c3751e1d98e6d67fdcee566c24
9e5ddc3951c3df05ac2254f2fcbe5fed
Этот метод создаёт TTL объект на основе полученных данных и записывает его в файл вывода
info.TS = Date.now(); info.TTL = parseInt(Date.now()/1000,10)+60*60*4; await dynamo.put({ "TableName": "chatbot_TETO", "Item": info }).promise(); }
0
6b4b2dafd140546535b0c09107b42c40
51e170839c53494faf55b456b4547a5e
Berechung des Alters über die ausgewählen Werte aus dem Dialogfenster
String sJahrgang; String sLagerdauer; this.jahrgang = 0; this.lagerdauer = 0; InputStreamReader rdr = new InputStreamReader(System.in); BufferedReader reader = new BufferedReader(rdr); do { System.out.printf(MSG_INFO_JAHRGANG, this....
0
ab65b9be608bc76875b2ab400aa23ab7
06fa681e3f6cba6c3a501a1a8f03dc98
agregar una unidad de negocio
class UnidadController extends ApiController public function store(Request $request) { $reglas = [ 'nombre' => 'required|string' ]; $this->validate($request, $reglas); DB::beginTransaction(); $data = $request->all(); $unidad = unidad::create($data)...
1
aede02bca3747febd9ce87bc96a82379
f1d681390ee5a8b5eb2449df0d234745
当地形在摄像机中不可见时,销毁该地形
[RequireComponent(typeof(Rigidbody2D))] [RequireComponent(typeof(SpriteRenderer))] public class BlockTile : MonoBehaviour private void OnTriggerExit2D(Collider2D vCollision) { if (vCollision.gameObject.GetComponent<Camera>() != null) { Destroy(gameObject); } }
1
366f9eab8c2d4b5dd32c7ff877b0f459
2ae117c7a10a399c183a7a0e4babd310
根据配置节获取XPO数据库最大并发连接数
String maxPoolSize = this.getValue("maxPoolSize"); if(StringUtils.isEmpty(maxPoolSize)){ return 100; } return Integer.parseInt(maxPoolSize); }
1
030ad1d25fade841bb960888eb763c5f
7efb9b75a0749c16abed40687b3f23d7
Update the doc history with the current view
class TypeSetDlg(QtGui.QDialog): def updateViews(self): globalref.docRef.modified = True globalref.updateViewAll()
0
b6894f6885dbc56329301ec982fefd11
a65621fd92f38a7f07e8bf87ee0895a3
ВОЗВРАЩАЕТ КЛЮЧ, СГЕНЕРИРОВАННЫЙ ОТ ПОЛУЧЕННОГО СООБЩЕНИЯ
class Users extends Model public static function getKey($params) { $user = self::getUser($params); if($user === false) { return false; } $key = $user['salt']; return $key; }
0
ce832a01e384917c644a10dbc6f18794
6fcddaf33464b4ccbfa95e954b6849eb
@brief Слот: отправка данных на сервер
void NetMasterTcpClient::slot_send_to_server() { qDebug("Slot: send to server..."); current_type = Text; QByteArray arr_block; QDataStream out(&arr_block, QIODevice::WriteOnly); out.setVersion(QDataStream::Qt_5_1); out << quint32(0) << QTime::currentTime() << m_ptxt_input->text(); out.device...
1
28b0963b11c3d48abc1cd7735295ba53
9a15f2b88c27fbdb23b2a7e04cae2e52
设置清空按钮是否可以点击
public class QuizQuestionAskPage extends PageImpl implements KeyboardListener private void setCleanImageVisibility(boolean isVisible) { if (mEtClearBtn != null) { mEtClearBtn.setVisibility(isVisible ? View.VISIBLE : View.GONE); } }
0
5829e0f44575c9add63b165532a6c263
c1e7d58683be3cc97b821565ebb0c3f3
Get visible tiles in sight range
impl Level pub fn get_locations_within_sight( &self, start_loc: Location, include_self: bool, sight_range: i32, ) -> FxHashSet<Location> { let mut visible_locs: FxHashSet<Location> = FxHashSet::default(); let mut walked_distance_by_loc_to_consider: FxHashMap<Location,...
1
e56057c51a0d761dd38ed9839312b783
8e96f6157a70532dd118d5c28750aeae
删除船盘信息
public abstract void delSysShip(SysShip vo, Long memberId);
1
2d94612f3bb7568dfadabda9d2fb17b2
9ca088489a76281984567340b822b31c
Updates an enemy's last Trap time.
if(trap_current != 6) { for (int i = 0; i <= 5; i++) { if(!entity_location(round(t_x), round(t_y))) { if(global_trap[i].x == 0) { global_trap[i].x = round(t_x); global_trap[i].y = round(t_y); ...
0
b739149f5cd06200501220888320c383
be11780444ce0268e4968e3cbcdd83d5
사이트 진입시 세션을 확인해 이동시키는 메소드
public String login(HttpSession session) { if (session.getAttribute("s_user") != null) { return "redirect:main.action"; } else { return "login"; } }
1
bb4073286db3ac2d57aec2615b215fd4
1edae837f2d731592eaba44f55d0792e
Function Name: Round Constructor. Sets number of cards to deal. Sets dataLayer object. dataLayer, pointer to DataLayer class. dataLayer is the model in MVC of the game. Return Value: Object of the class Local Variables: none Assistance Received: none
Game::Game(Player* p1, Player* p2, int numRds) { setNumRounds(numRds); setPlayerOne(p1); setPlayerTwo(p2); setCurrentRound(1); }
0
9fe9ad11ef867588c3f979f8718610a2
0f8074de1244596b022dfcbb1e9040d3
Returns a copy of this key, but with the public point represented in uncompressed form. Normally you would never need this: it's for specialised scenarios or when backwards compatibility in encoded form is necessary.
val ret = keypair.publicKey.toBytesPadded(PUBLIC_KEY_SIZE + 1) ret[0] = 4 val point = CURVE.curve.decodePoint(ret) return point.getEncoded(true) }
1
9797dc98c72871cfbcf0a98bc64c9e01
f89c607b316231b60a699cf12e06bda7
依會計科目代號查出費用項目
public class BqmFU01DelegateImpl extends GateThreeBaseDelegator implements BqmFU01Delegate @Override public Result findCostCodeById(CnfCostCodeBean cnfCostCodeBean) { return costConfigurationService.findCostCodeById(cnfCostCodeBean); }
1
70a3db32924746fe107922c03b725042
c4b8be447cab3d2a7c34dbc3152b42dd
设置播放模式并更新下一首歌曲
[SET_PLAY_MODE](state, mode) { state.playMode = mode }
0
f9605f868aa27068b52c0af22fb4514a
df5d685f540a23208bb7730c9857c165
处理商家退款超时(平台返款)
handleWrongInput(false); BuyerTask bt = BuyerTask.findById(id); if (bt == null || bt.status != TaskStatus.WAIT_REFUND) { renderFailedJson(ReturnCode.WRONG_INPUT); } if (!isAdminOperate()) { User seller = getCurrentUser(); if (bt.sellerId.longVa...
1
a0cdddf4370002d0b7c022d27f4d4d32
7a53a80bf651abc1a8e5f0cc84f5a4fb
see if there is a value with a key == to prefix and return it
data_t *find_prefix(tree_t t, char *pref){ if ( t == NULL ) return NULL; int s = strcmp(pref, t->d->prefix); if ( s == 0 ) return t->d; if ( s < 0 ) find_prefix( t->right, pref ); if (s > 0) find_prefix( t->left, pref ); }
1
04381bcb07911d6bec9495d0ee528cec
c8409e034d44588cfb7487cf32275e00
Function to get correlation coefficient for 2 timeseries
def get_corr(x_data, y_data): cov_mat = np.cov(x_data, y_data) cov, var_x, var_y = cov_mat[0,1], cov_mat[0,0], cov_mat[1,1] rho_xy = cov / (np.sqrt(var_x)*np.sqrt(var_y)) return rho_xy
1
313522dab1cefd34eda0c454528af285
86619e9f711423a345f54a9cdea27a8c
@brief Initialise DMA interrupts
{ write1_sfrbit(DEN3, 1); write_sfr(DSA3, CSI20_SIO20); write1_sfrbit(DRS3, DMA_RAM_TO_SFR); write1_sfrbit(DS3, DMA_UNIT_8B); write1_sfrbit(DWAIT3, DMA_TF_NO_PEND); write_sfr(DMC3, (uint8_t)(read_sfr(DMC3) | (DMA_SRC_INTCSI20 & 0x0FU))); write1_sfrbit(DMAIF3, IRQ_CLEAR); write1_sfrbit(DM...
1
d020fa96b944005b5f9b9a236f020af4
839a383ecb6079923be7b417384e8350
Configura la memoria compartida necesaria para el monitor.
void memoriaControl() { int idCantAdm = crearMemComp(RUTA_MC_CADM, ID, sizeof(int)); int idCantClt = crearMemComp(RUTA_MC_CCLT, ID, sizeof(int)); int *cantAdm = shmat(idCantAdm, 0, 0); int *cantClt = shmat(idCantClt, 0, 0); *cantAdm = 0; *cantClt = 0; }
1
9dfe5b7b5b516489f09d99d60204d08f
8911c2ed4a65dd2a2f0b15b794b79c0d
Calculo o erro médio quadrático do modelo
def erro_quadratico_medio(yO, yE): return np.mean((yO - yE) ** 2)
1
10741e38ef9ebfd16e81eb890f5af84f
5331a5e107fa3505b0f03aa7b3507688
Action for viewing and editing POPS
HttpServletRequest request, HttpServletResponse response){ UserBean userBean = ParamUtil.getUserBean(request); if(Consts.FUN_CHEK_PVG&&!QXUtil.checkMKQX(userBean, PVG_EDIT)) { throw new ServiceException("对不起,您没有权限 !"); } String POPSJID = ParamUtil.get(request, "selRowId"); if(!StringUtil....
1
919fcefd0929dcf6eecba40451b3960d
466e773ded66023bb9b779ff31770fc5
172:阶乘后的零
zeros, p2, exp = 0, 5, 1 while p2 <= n: zeros += n // p2 exp += 1 p2 = 5 ** exp return zeros
1
5a9563ceaccf4e89c0a8c10201e93100
fcdb4013133cd5c83af46863ef005f44
specifies which objects this can collide with
export default class Enemy extends Entity public setColliderLayer(colliders :ColliderLayer) { this.colliders = colliders; }
1
88dfcf18b38a086579da8444f940f4a8
8b2ebf7a2d7780c3d64945295665ba39
This function check the cable state either attached or detached, and then divide precise type of cable according to cable group.
BYTE mhal_tmds_DetectCablePlug(MSCombo_TMDS_PORT_INDEX enInputPort, Bool bFlag) { Bool bCable5VDetect = FALSE; BYTE ucCableDetect = TMDS_CABLE_DETECT_NO_INPUT; BYTE ucCableSARDetect = 0; switch(enInputPort) { case MSCombo_TMDS_PORT_0: if(bFlag) { ucCab...
1
fce56ebbbe58a02304e7a90ee114a9f3
3a0f3048be33f12b1b6cdda7a90a2066
Генерируем и устанавдиваем токен оплаты за конфигуратор
{ $this->newTransaction(); $fields = array( 'Action' => 'token', 'Amount' => $this->amount, 'TerminalId' => $this->config->get('saman.terminal-id'), 'ResNum' => $this->transactionId(), 'RedirectURL' => $this->buildRedirectUrl($this->config-...
1
701a17bcb23de536b8b63e4091f61a44
4d5a5fde66057f6300eff6181378ff53
遍历二叉树;
public traverse(): void { let treeNodeList: Array<BinaryTreeNode<T>> = []; treeNodeList.push(this.root); while (treeNodeList.length > 0) { let tempList = new Array<BinaryTreeNode<T>>(); let sb = ''; for (let i = 0; i < treeNodeList.length; i++) { ...
1
6f8f8fa36bf45bdaa965623963300004
c209dcd471023eaeea910a6cc7d4bbaa
判断是否为中文.
@SuppressWarnings("unchecked") public class InfectStatistic public static boolean isChinese(String string) { int n = 0; for (int i = 0; i < string.length(); i++) { n = (int) string.charAt(i); if (!(19968 <= n && n < 40869)) { return false; } } return true; }
1
f66626dcc0709ad0fb418f15de40acdc
4696e13359a11d95380536013a73035f
Render a form to be used for creating a new kardex.
{ $this->authorize('create', Koor::class); $user = Auth::user(); return view('koor.create', compact('user')); }
0
0a8975a1605d48120af1b9906424aa16
de8e324326c3748df54dd0d4c646c717
переход к предыдущей директории
{ char *tmp = NULL; size_t len = 0; if (!strcmp(s_files->path, "/")) { return ; } len = strlen(s_files->path); if (s_files->path[len -1] == '/') s_files->path[len -1] = '\0'; if (strchr(&s_files->path[1], '/')) { tmp = strrchr(s_files->path, '/'); if (tmp) { *tmp = '\0'; } } else { strcpy(s_files...
0
136b2b21100ebcdadfcd93a1409d01bd
007a6f20a9cf0dcb630e5b35538052ec
Debug mode should pass. Non-debug should fail.
public void TestDebuggableAttribute_04() { var source = @" using System.Diagnostics; [module: DebuggableAttribute(DebuggableAttribute.DebuggingModes.Default)] [assembly: DebuggableAttribute(DebuggableAttribute.DebuggingModes.None)] public class Test { public static void Main() { ...
0
49c755db1c34cc999c5b644d5bfcddc5
8c48cd6f0f25e7356008afae90f64315
获得可以使用的图集路径 高清图集如果不存在,就自动加载低清的 保底是低清必须存在
function get_picture($path) { if (is_file(get_picture_path($path))) { return $path; } else { return C('DEFAULT_IMAGE'); } }
0
359f0a1165a3a484652c127cf4a0485c
8f918b5e65ed65531372d9a1990e3371
Exception handler which outputs a stack trace to the logging facility
def ErrorHandler(type, value, traceback): try: value.printExceptionInfo() except AttributeError: sys.exit() return None
0
b0eacdef61e95b63429c11d40f3b4e44
d7a8fbcf78ddad4b04dd1d75aba8c2ce
Check to see if we've created this shot before, and, if so, return it
driver = webdriver.Chrome("/Users/Bryce/Projects/selenium/chromedriver") driver.get(link) shot_dict = None if check_exists_by_xpath(driver, True): shot_dict = driver.execute_script("return shotsData;") driver.close() return shot_dict
0
42d7ea7041a904ef9e910bc425d0f2af
89ea1a454b9250f857b181c5cd455a2e
Confine or unconfine pointer for this window.
lock.lock(); try { gtk_widget_set_sensitive(this.pointer, enabled); } finally { lock.unlock(); } }
0
8f4d657e2e914dce7811bd7d2b1c004e
02a5529ebc8896d56715ac2d44d2da33
Storing selected date from the calendar into textbox
namespace YMS5120_StandartKontroller public partial class _1_Calendar : System.Web.UI.Page protected void Calendar1_SelectionChanged(object sender, EventArgs e) { Response.Write(Calendar1.SelectedDate); }
0
eaf9a5302dae9cf18a4f3e10c9445ccc
740c5ebeaf47ec5edbbee37fc04dced0
function for mapping top-funds
axa_fundcodes_dict = {} axa_fundcodes_dict['AB - American Growth Portfolio'] = 'ACMAGP' axa_fundcodes_dict['AB - Emerging Markets Growth Portfolio'] = 'ACMEMGP' axa_fundcodes_dict['AB - Global Equity Blend Portfolio'] = 'M-ALLBP' axa_fundcodes_dict['AB - Global Growth Trends Portfolio'] = 'ACMGGTP' ...
1
3b291c74e1f4585ef5330aa0054dd17c
01a5a9a89910f165b0c65bd78c204845
輪郭に沿うように頂点を整列させる
{ int i0; Vector3 min, max; var indexList = new List<int>(); float sub; float maxSize = 100000f; min = new Vector3( float.MaxValue, 0f, float.MaxValue); max = new Vector3( float.MinValue, 0f, float.MinValue); for( i0 = 0; i0 < pointList.Count; ++i0) { if( Mathf.Abs( pointList[ i0].Posit...
0
8827d1da7793158f2e201a15cc436510
9013d444d214e95c05e4dbd0aef6032c
Returns true if the Game is currently asking the player to place an object with the mouse cursor.
public class JPanelMouse extends JPanelRendererJ3D implements MouseListener, MouseMotionListener, ChangeListener, MouseBehaviorCallback public boolean isPlaying() { return mode == PLAY_MODE; }
0
2695dd72e68147ac216e5d383c43079c
9015a87c118cd4acfb452767551d546d
The name of the connected registry.
class REGFBlock(RegistryBlock): def hive_name(self): return self.unpack_string(0x30, 64).decode("utf-16le").rstrip("\x00")
1
796eb392b763205acd2b2f0d64637303
134ae654ffaf2ba5cf1997406307465c
Returns the value `underlying` branded according to the type parameter ```ts const radians = brandT<BrandType<number, "AngleRadians">>(Math.PI); ```
return <U extends T>(constructor: U) => { constructor; }; }
0
1ab156db73d4a927a43211287843fd33
64e104725adbbdd869f6469b991b2b65
Runs API call on page render
class Results extends Component componentWillReceiveProps() { this.apiCall(); }
0
c82d5a422d652e52b03c6ba76d166952
5179517cb74f7f4bbe41f73a645e9c64
Clear <TraceId> value
class QuestPConfig extends \DrSlump\Protobuf\Message public function clearTraceInfo(){ return $this->_clear(15); }
1
096765091c915dd83d0368783a3e4e22
ec3860b5c8193ab32e65e8e11befb29e
Return boto3 client for requested service.
def boto3_client(apigateway_client, s3_client, dynamodb_client, kms_client): def produce_client(name): return { "apigateway": apigateway_client, "s3": s3_client, "kms": kms_client, "dynamodb": dynamodb_client}[name]
1
b6bd3212fbee6ac42689ec67a780b7e9
32a4b5e70e8805128b09e186ee4bf3d8
This is a Q-Widget that acts as a tab in a QTabWidget and displays a mpl-canvas.
class CustomQMainWidget(QtWidgets.QMainWindow): def __init__(self, *args): super(CustomQMainWidget, self).__init__(*args) pass
0
3bdb8a254e032d84946e49b808d85754
eefd0d5b2a4e0b07b96c27d448303f22
<p> Enables one or more alarms. The alarms change to the <code>NORMAL</code> state after you enable them. </p> target="_top">AWS API Documentation</a>
namespace Amazon.IoTEventsData BatchEnableAlarmResponse BatchEnableAlarm(BatchEnableAlarmRequest request);
1
a30193a7ac4aa94106cb244efe3c41f1
5b80bb7c211a3ad9711ec0bcfd8092f9
Display board as a rectangle with dimensions `self.N` x `self.N`.
class ColorGameGUI(ColorGame): def displayBoard(self): pass
0
b099351dbc8a76055e78f556180390f3
3256a126cc7bdb8466825fab661379cb
创建新的tableWidget对象,放在parent中,类型是twType(定义在uiBasicWidget中),
if mainEngine and mainEvent : var = twType(mainEngine,mainEvent) else : var = twType() var.setObjectName(name) if layoutType : lo = layoutType(parent) lo.setObjectName('layout'.join(name)) lo.addWidget(var)
1
d102b0f6f0921df704528ccfb40cc99c
cb355d858c4cf048b12f992dd68e6821
Removes an Occupant from this Location
namespace BeauUtil public abstract class AbstractColliderProxy<TCollider, TCollision> : MonoBehaviour where TCollider : Component protected bool RemoveOccupant(TCollider inCollider) { if (!m_TrackOccupants) return false; return m_Occupants.Remove(inCollider); ...
1
9dbabcec68e65eea92af153122d41120
6b7ddecaeaaedb729006da32c8d8a5c5
Get devices MAC address/serial number.
export default class IDevice getMAC() {}
1