query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
a4629b7e36ba2ba33d46e7fea2cddf23 | 776ab3539ffa295d9788830e5043a9ef | Calculates the next Lerp step between the current and next points. | public class DogControlPoint : MonoBehaviour
private void UpdateInterpolatePoints() {
Vector2 placementDirection = (directionToNext - directionToPrevious).normalized;
placementDirection *= interpolationDistance;
p1 = position + placementDirection;
p2 = position - placementDirection;
... | 0 |
2c56029485237468d727abe18fd0faa4 | 0ed02b4ac1d47c3dd7a00c41e2e8ea2d | @brief Slaveに関節角の読み取りをリクエスト 対象は全関節 | void MainWindow::Request_Data()
{
QByteArray txbuf;
txbuf.append(0xAA);
txbuf.append(slave_address);
txbuf.append(0x0B);
serial->write(txbuf);
} | 1 |
15c9e856142422125878a6ec1afe455b | 5319676d47d38e350ba11f0efe9c7d1c | Get total number of karma | class User
public function getKarma()
{
return ($this->getGoodKarma() + $this->getContributionKarma()) - $this->getBadKarma();
} | 1 |
e3dd040a51dbcd00f4a741b7deadc1fe | 9276781a0357c41feb7df33556a210f8 | Check for energy surplus, set bool and trigger events | this.wipeTaskMemory()
val success = this.retrieveEnergyFromStorage()
if (success) {
this.startRetrieving()
} else {
this.startMining()
this.harvestOrTravel()
}
} | 0 |
cef3198b37ed4924b0bd53653cb99ae6 | 7329432312f525fac30c25e109fcca26 | 将数据转换为分组字母顺序联系人信息 | public class BaseActivity extends ActivityGroup{
public void addressHandlerGroup(StringBuilder strBuilder, StringBuilder groupid, StringBuilder groupname) {
GlobalApp app = (GlobalApp) getApplication();
@SuppressWarnings("unchecked")
List<Map<String, String>> listDepart = ((List<Map<String, Stri... | 0 |
b798dea173566d6903b3c7cb5cb8ad2d | e7a69af15b56b9d9069e67096fd727f5 | A SecurityConfigurerAdapter to install a servlet filter that refreshes OAuth2 tokens. | AuthenticationSuccessHandler successHandler = new AjaxAuthenticationSuccessHandler(jwtTokenFactory());
AjaxLoginAuthenticationFilter filter = new AjaxLoginAuthenticationFilter(successHandler, null);
filter.setAuthenticationManager(this.authenticationManager);
return filter;
} | 0 |
8a1e184502d75be4dfe597aa98f97f06 | 4aff35bc722eb30b9b6a08a7c58b7c5e | Get a Random Anime Waifu.
Does not return a model due to sheer complexity and impracticality. | def get_rand_pet(): | 0 |
43ca0769af6128757e8f60d3de2ca111 | 2d6f64c1763d49c95c505e82178c2d5f | Support pickle by serializing the VTK object data to something which can be pickled natively.
The format of the serialized VTK object data depends on `pyvista.PICKLE_FORMAT` (case-insensitive).
- If `pyvista.PICKLE_FORMAT == 'xml'`, the data is serialized as an XML-formatted string.
- If `pyvista.PICKLE_FORMAT == 'lega... | class PointCloud(models.Model):
def serialized_data(self):
return self._cpp_pointcloud.serialized_data | 0 |
9b1f605d23db9e7ed547d23ed0cfa6c0 | 8c632e80867d05bb4b882cc36315586b | Connects to the database, loads the DB version
and display the current student list. | {
student = new Student();
studentList = new List<Student>();
MySqlConnection myConn = OpenDBConnection();
string cmd = "SELECT * FROM yfc.new_student_t";
MySqlCommand SelectCommand = new MySqlCommand(cmd, myConn);
MySqlDataReader myReader;... | 1 |
406c09fa96277ed367908bfe6637012c | e928638100524c9710ae1999d8a11fab | Write inscription sheet to a PDF | Document document = new Document(
new Rectangle(Utilities.millimetersToPoints(35), Utilities.millimetersToPoints(50)));
PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream(filename));
writer.setViewerPreferences(PdfWriter.PageLayoutSinglePage);
document.op... | 1 |
335ccd0dd6c21d998e4cc0fdaf352549 | d9a56b3bd6793ca48a1982cb20076635 | 将一个字符串通过空格分割成table 为了便捷模糊查询 | local sub_str_tab = {}
while (true) do
local pos = string.find(str, split_char)
if (not pos) then
sub_str_tab[#sub_str_tab + 1] = str
break
end
local sub_str = string.sub(str, 1, pos - 1)
sub_str_tab[#sub_str_tab + 1] = sub_str
str = string... | 1 |
0d0736fcd2ec8c5774d570417797f849 | 34e06cde8239298c9d09ea2e03095e2f | 设置底部栏样式 | class MainActivity : AppCompatActivity(), View.OnClickListener, BottomNavigationBar.OnTabSelectedListener
private fun initView() {
bottom_navigation_bar.setMode(BottomNavigationBar.MODE_FIXED)
bottom_navigation_bar.setBackgroundStyle(BottomNavigationBar.BACKGROUND_STYLE_STATIC)
bottom_navigation... | 1 |
93b1ce23dc639be883b0708ee22aefd2 | cd90ceb2e9f9bf9da1e7a0bbbc332a68 | List of IP Addresses and account statistics. | IPRangeStatisticsResult allIPPageStatistics(); | 0 |
2468381e2f9e7294513000ec2cbcf1fd | 92b8fd4c2ea26cee78fc7015c695c47c | `true` if there is an active connection to STOMP Broker | export class WebSocketDataService
connected(): boolean {
return this.stompState.getValue() === StompState.CONNECTED;
} | 1 |
983292a989937a7fc648e442195239ab | f8435725a9d328571b9a7a8f6fe2ce37 | Cabinetのルートフォルダが存在するか | namespace STPInspectorLib
public class CabUtil
public static bool IsCabinetFile(string path)
{
using (CAB.CabDecompressor deComp = new CAB.CabDecompressor())
{
using (FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read))
{
... | 0 |
790b9c3b4ae0e2c5d2063b595054526e | 9f49da76edc1c463ced0136917ded2ae | Gets a number of last page of objects for a specific user. | {
int count = -1;
return GetByLastName(transactionManager, _lastName, start, pageLength, out count);
} | 0 |
db9eae9308fc9125079f5fcef70fbca2 | 1c011172f835abaa7955896a61fdfdd8 | Суммирует полученый массив | class Math
public static function sum($values)
{
if(!is_array($values))
{
throw MessageErrors::get_exception_by_code(5001);
}
$response = 0;
foreach ($values as $item)
{
if (!is_numeric($item))
{
throw MessageErrors:... | 1 |
034bc0436415b2de926e032671b5372a | 922b52eafa1a88e133f07a4a7c9eaaa2 | 获取除去header和footer以外的高度 | if (this.header) {
return this.header.element.nativeElement.getBoundingClientRect().height;
} else {
return 0;
}
} | 0 |
5b271a6f8b8429957f7e6b79e45281fe | 1522a61a49d1c8623b2b2bbc9b0104b4 | {EV_APPLICATION_I}.process_events_until_stopped | {
GTCX
RTCDT;
RTLD;
RTLI(1);
RTLR(0,Current);
RTLIU(1);
RTGC;
*(EIF_BOOLEAN *)(Current + O10410[dtype-1440]) = (EIF_BOOLEAN) (EIF_BOOLEAN) 1;
*(EIF_BOOLEAN *)(Current + O10345[dtype-1436]) = (EIF_BOOLEAN) (EIF_BOOLEAN) 0;
if ((FUNCTION_CAST(EIF_BOOLEAN, (EIF_REFERENCE)) R10179[dtype-1413])(Current)) {
(FUNC... | 0 |
d7ed35ef95d351024e3e5e2c9ffac27e | 7dbcec073efa95b95c140b9dd5849302 | Returns the value of the '<em><b>M12</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>M12</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | public Double getF12(); | 0 |
8d16443028c5dd402f614c7ee18a89ae | cc46a240d969d00241ca2c46291aff91 | 事件生成器,见论文公式6 | function getEmitter() {
const events = {};
function execute(contexts) {
contexts.forEach((eventHandlers, context) => {
eventHandlers.forEach(event => {
if (event.exeCount < event.times && event.exeCount % event.frequency === 0) {
event.handler.call(context... | 0 |
77087cdc5019ba6687d64cab342cd43c | d0bb68078def457d3c85432660239e7f | Set attack range. | sightRange = range;
if(sightRange > MAX_SIGHT_RANGE)
sightRange = MAX_SIGHT_RANGE;
} | 0 |
e549eedd9f70757a9fe82d1cd2ebbbe4 | 6d286b991ecb4462ed026d378ec1d2b4 | switch between world and drone camera | class BasicDroneController(object):
def ToggleCamera(self):
os.system("rosservice call /ardrone/togglecam") | 1 |
1c385119e4d1cdaefc31dd9dbf47ba6b | 2b1c4ef010210b5ea33a9897875e1aeb | Creates a new Currency | class Instance extends Entity
public function __construct($mObj = [])
{
parent::__construct($mObj);
$oCurrency = Factory::service('Currency', Currency\Constants::MODULE_SLUG);
$this->currency = $oCurrency->getByIsoCode($this->currency);
} | 0 |
8a857cdbf6f6314cb204cb6695f9f5de | 10eee5b2db596c09fa1b91518d0f6c96 | ! format the time into "Sat Feb 17 17:45:23 2001\n" | {
_strftime_H(buf, maxsize, timeptr);
_strftime_ch(buf, maxsize, ':');
_strftime_M(buf, maxsize, timeptr);
_strftime_ch(buf, maxsize, ':');
_strftime_S(buf, maxsize, timeptr);
} | 0 |
0b3db855b882e3bac4724d6fe53e33e4 | 35c7539d5f87d32ce4b7bfb1d709adf9 | Set fullyQualifiedName of an entity | {
if (this.get_movie_director() != null)
this.entity_movie_fq_name = build_fq_name(this.get_movie_name(), this.get_movie_director().get_person_name());
else
this.entity_movie_fq_name = build_fq_name(this.get_movie_name(), null);
for (String label : this.entity_movie_labels)
{
if (this.get_movie_direc... | 1 |
b075985adb35b49b7111c531af91d3ba | 7fcf01658a4889db232d209816cf5e40 | 获得竟彩篮球即时比分状态描述 | @Service("jcDataService")
public class JcDataServiceImpl implements IJcDataService
@Override
public ResultBO<?> getBasketBallImmediateScore() {
return ResultBO.ok(redisUtil.getObj(C_COMM_SPORT_YBF_BASKETBALL_JISHI_BIFEN));
} | 1 |
129c402e2ef3d8d0176ed4c325598aa0 | cb49fbe21a3d6b8e6e663cdd0f5c526a | Gets the highlights Density value.
The density value is in range [-100,+100] where 0 means the color filter has no effect and +100 means the color filter has maximum effect.
Values less than zero provide a filter of opposite hue. | export class ColorCurves
public get highlightsDensity(): number {
return this._highlightsDensity;
} | 1 |
d7296f5a36d278968b01cd70b7133edc | 114e9d5e7add0f2c444e33b484500342 | ===========================================================================
DESCRIPTION
This function drives all of the scan column GPIOs low and ensures that
they are set as outputs.
DEPENDENCIES
The proper GPIO bank descriptions must be set up (above) so that the
compile-time logic wiggles the right GPIOs.
RETURN VAL... | void initKeypadColScan(void)
{
initInputGPIO_PULLDOWN(COL_GPIO, COL_1_PIN | COL_2_PIN | COL_3_PIN | COL_4_PIN, COL_PERIPH);
initOutputGPIO(ROW_GPIO, ROW_1_PIN | ROW_2_PIN | ROW_3_PIN | ROW_4_PIN, ROW_PERIPH);
GPIO_ResetBits(ROW_GPIO, ROW_1_PIN);
GPIO_ResetBits(ROW_GPIO, ROW_2_PIN);
GPIO_ResetBits(ROW_GPIO, R... | 1 |
b1f5ed40656f084b916e70b35317eccd | 403fe7329013c8c9d29efc258a02dc77 | 中缀表达式初始化 | {
infixExp[0] = '\0';
postfixExp[0] = '\0';
for(int i = 0; i < MAX_STACK_SIZE; i++)
postfixStack[i] = '\0';
postfixStackTop = -1;
evalStackTop = -1;
evalResult = 0;
} | 1 |
8e0cf53b919435e3119f3c1413a2ead1 | 9767f2a44c9b381a3de109a0320da589 | Gets the Name of the Suit. | public class Suits implements Suit
public String toString() {
return name;
} | 1 |
ca619e19c05bbf338c29f4bc8c62aaa8 | 04bc900437c1da638bf9f802de04ed05 | Computes a mask that is true everywhere | VALUE
rb_create_mask(VALUE self)
{
VALUE mask = cCvMat::new_object(cvGetSize(CVARR(self)), CV_8UC1);
cvZero(CVARR(self));
return mask;
} | 0 |
138b83a7466b2fcb9708ecc767d6bfcd | b1ed86c4f6d9aa6956f9234bb59f9159 | Gets member id for a given tag serial number | class ec_mainDelivMethodDb extends BaseDb
function getDelivMethodDefIdBySerial($serial)
{
$id = '';
$queryStr = 'SELECT * FROM delivery_method_def ';
$queryStr .= 'WHERE do_deleted = false ';
$queryStr .= 'AND do_serial = ? ';
$ret = $this->selectRecord($queryStr, array($serial), $row);
if ($ret) $id = $... | 0 |
e4e1f77d7d20b9252ea035739c15e844 | 81ea94ff39a0b0892210c6c968f9c81d | Handles how a Fighter behaves after winning a battle.
Subclasses must override this function. | class Player(object):
# noinspection SpellCheckingInspection
def on_defeat(self, board):
raise NotImplementedError('You should implement this.') | 0 |
b80cc622eb5465456d74b784da3dfee4 | cab4bb4895305f494fa9e7fae3b906de | ============================参考版本:Accepted,68ms===============================// | class Solution
bool isMatch(const char *ss, const char *pp) {
string s(ss);
string p(pp);
vector<vector<bool> > dp(s.length() + 1, vector<bool> (p.length() + 1, false));
dp[0][0] = true;
for (size_t i = 0; i <= s.length(); ++ i) {
for (size_t j = 1; j <= p.length(); +... | 1 |
4f7b9f6e3fa94c4ba3e15a29b287656b | 11f1355540f8ad8a47f38bdc1b96e641 | Creates (if required) System Admin user and it to the appropriate roles. | public UserEntity createAdminUser(String email, String password, UUID accountId) {
requireUniqueEmail(email);
UserEntity adminUser = createBaseAdminUserEntityForAccount(accountId, email);
UserEntity adminUserWithIds = createInternalUserInDatabase(adminUser);
setDefaultPermissionsForUser(adminUserWithI... | 1 |
3e3fe3282f84f4ece2a1967cd48e58c6 | cc4966681c94832fa68e36db1731a768 | Méthode qui permet d'effectuer l'ensemble des setters lors de la création d'un nouvel objet. | abstract class Vehicule
public function hydrate(array $donnees)
{
foreach ($donnees as $key => $value) {
$method = "set" . ucfirst($key) ;
if (method_exists($this, $method)) {
$this->$method($value);
}
}
} | 1 |
8bbb7d87fc8fbaef2eea190988b6ecbb | 9951f0b297cfb876c8140da3d257b3e2 | Get meta info of specified email message. | msg = []
for meta in _known_email_metadata:
if email[meta] is not None:
msg.append(
meta + ":" + email[meta] + os.linesep)
msg.append(email["Content"])
return "".join(msg) | 1 |
4239eef9efa578c0a879057fd2827f84 | 800e03d9e492b4d5bd2aa5ad763ea563 | Gets the entire backlog of a project from the database and its all its planned hours. | namespace DatabaseLayer
Sprint GetProjectBacklog(int projectID); | 1 |
6b10451b8fc891f72343ee3fa6154885 | b1181f6e47a1c0661a94fa0e00f65f39 | Call DragSource (ISupportDrag).QueryDrag and assign result to destination. | => AsyncOperation.FromTask(async ct =>
{
var target = await UpdateTarget(dragInfo, null, ct);
if (!target.HasValue)
{
return DataPackageOperation.None;
}
(_, var args) = target.Value;
(args.OriginalSource as UIElement)!.RaiseDrop(args);
if (args.Deferral is { } deferral)
{
... | 0 |
63edd7b3cee42e2bc2f6d22bf8f1e0b5 | 74da6e6e81778343f5db40aa768d0c0a | Stops the callback timer when the window closes | class DropboxDetectWindowController(UpShotWindowController):
def stopTimer(self):
if self.timer:
self.timer.invalidate()
self.timer = None | 1 |
5d773f2bc7b300b50796ea264f044e14 | fe99ad748ec12792f51b8bb3003cd8e2 | 尝试碰撞连接服务器 | if sessionID ~= SESSION_ID.GAME then return end
UIUtils:showTwoBtnMsgBox(STR(11004),
function()
_MyG.NetManager:doConnect(sessionID)
end,
function()
gameExit()
end)
end | 1 |
c9a0bbd69f07e31885221d6f4899b9d2 | bbbd52f6e8e84419e38586b23560ebf2 | Map bdl utente to utente dto. | public class EntityHelper
public static UserShortDto userToDtoShort(User user) {
if (user == null) {
return null;
}
UserShortDto userTransferObject = new UserShortDto();
userTransferObject.setId(user.getId());
userTransferObject.setName(user.getName());
userTr... | 1 |
e85f9c7ee0ea85e54a6e43b9c4c72e4c | 62a1b548671195cba2cdd1157a83ac0d | Returns the number of view with parameters that are not fixed | numVisualReals() {
if (this.isVisual) {
return bbn.fn.filter(this.visualList, a => (a.view.idx !== this.selected) && !a.view.pane).length;
}
return 0;
} | 0 |
9cd4c4c5b6bbd38a8a48a7f4f5b0df45 | a616ce4b8aaa5564c8d13779b2da89ee | defines function to be minimised, and parameters to be varied | class TestOptimizer(unittest.TestCase):
def setUp(self):
def func(x):
return 100*(x[1]-x[0]**2)**2+(1-x[0])**2 | 1 |
0eb530c8bc49c7e7b7c85afd59952131 | cf90473c70b8d54ef98bbabffc5884d0 | single digit division (based on routine from MPI) | static inline mp_limb_t
div1 (mp_ptr rp,
mp_limb_t n0,
mp_limb_t d0)
{
mp_limb_t q = 0;
int cnt = lzcnt(d0) - lzcnt(n0);
d0 <<= cnt;
q = 0;
TRY_SUB(n0, n0, d0, q);
while (cnt)
{
q <<= 1;
d0 >>= 1;
TRY_SUB(n0, n0, d0, q);
cnt--;
}
*rp = n0;
return q;
} | 1 |
1fe4965c2c750013b6922eef84ffd3f7 | cfcd53012c5189a0397787c50ab399a0 | 内部调用,更改第三方网关的mq_tag | @Component
public class RocketMqStarterProducer
public void sendTagMsg(String msgBody) {
SendResult sendResult = rocketMQTemplate.syncSend(
topic + ":tag1",
MessageBuilder.withPayload(msgBody).build());
System.out.println("sendResult--->>" + sendResult.getSendStatus());
... | 0 |
36438996e48becbb5c5360c50ca8bb3e | d25f2f4f5131078395682036ab091a15 | Cleans all installed gems and the bundler config directory. | class C:
def clean():
C.libs.clear()
shutil.rmtree(C.cache_dir, ignore_errors=True) | 0 |
b8d02597080c8897fcf43d9983cec72e | 90e0816e74e2676cb40f0ae76c426b66 | 遍历slice,对每个值调用f1和f2的方法 | func main(){
for _,i:= range []int{7,42}{
if r, e := f1(i); e!=nil{
fmt.Println("f1 failed",e)
}else{
fmt.Println("f1 worked:",r)
}
}
for _,i:= range []int{7,42}{
if r, e := f2(i); e!=nil{
fmt.Println("f2 failed",e)
}else{
fmt.Println("f2 worked:",r)
}
}
_,e:=f2(42)
if ae,ok:= e.(*argError... | 1 |
2d991fd45cd7b368c061feeda0a29bc5 | bf20084c3e1bb1e16942ac658279eee9 | Контроллер для страницы с описанием автомобиля | class SiteController extends Controller
public function actionIndex()
{
$this->layout ="index";
$model = new Cars();
if($model->load(Yii::$app->request->post())){
$this->layout="display_cars_layout";
return $this->render('display_cars',['model' => $model]);
}
... | 0 |
1cfb73f21ae846cf3582b095c1046f3c | 4b2f1abfd50d105e868895b9d9abcae0 | 연동회원의 회사정보를 수정합니다.
- https://developers.popbill.com/reference/easyfinbank/dotnetcore/api/member#UpdateCorpInfo | {
$CorpNum = '1234567890';
$CorpInfo = new CorpInfo();
$CorpInfo->ceoname = '대표자명';
$CorpInfo->corpName = '링크허브';
$CorpInfo->addr = '서울시 강남구 영동대로';
$CorpInfo->bizType = '업태';
$CorpInfo->bizClass = '종목';
$UserID = 'testkorea';
try {
... | 1 |
085afa01a74c60afef079e6a9611da7f | 999ea0067c588e08a05141a8b6d7a375 | Processes the new XML Model, which XML root node is given. | public class XmlBuilder
public void processElement(String systemName, Element root,
Map<String, Object> params) {
Map<String, DatasetModel> dataSetMap = new HashMap<String, DatasetModel>();
List<?> elements = root.elements("DataSet");
Iterator<?> iterator = elements.iterator();
while (iterator.hasNext()) {
... | 1 |
5384d29b4aed251d0b7d144c3542aa51 | 5f416a77b2a9b0021f57ab5ca6260a8d | Driver program to test maxSubArray. | std::cout << "Hello, World!\n";
vector<int> nums{1,-2,2};
Solution s;
cout << s.maxSubArray(nums) << endl;
return 0;
} | 1 |
1ffe199f1438330c1593d070c741d64f | 3190b2decf9bf1062d320acedd2aa924 | Converts a percentage value to pixels relative to the current resolution in the y-axis | namespace com.tinylabproductions.TLPLib.Utilities public static class ScreenUtils
public static float pHeightToAbs(this float percentHeight) => Screen.height * percentHeight; | 1 |
be9babca57721d47ae9c06ead3627ec4 | 5af91b7c38453b4eb11938f67fce6294 | Gets the metadata for the ending reference event. | class OffsetEventForm:
def get_end_reference_event_metadata(self):
return | 1 |
92c5d8668e4219f25bc2d124a0480e1e | 60ec6f2b5cfb0770b3c085d38bd39eb7 | A wrapper module for functional dense layer that performs local reparametrization | class ReparamFullDense(nn.Module):
def forward(self, x, num_samples=1):
mean = self.mean.weight
post_sample = utils.sample_lr_gaussian(mean.view(1, -1), self.F, self.variance, num_samples, squeeze=True)
post_sample = post_sample.squeeze(dim=1).view(num_samples, *mean.shape)
return (pos... | 1 |
cfffec41910f2748e82cc83a30ca54a4 | 7abcf5e53678eff8da731da28fdee31e | 儲存更新資料的時間 | public class SystemActivity extends AppCompatActivity
private void upDateTimes() {
setDateSQL();
ContentValues addbase = new ContentValues();
time();
addbase.put("cUpdateDT",today);
db2.insert("tblTable2",null,addbase);
db2.close();
} | 1 |
67aa7d0e5db803bdcff0f2beac0c3491 | e420a25a97f14c2121da5f2a5a405f9f | The getter for fightList | class Lutteur
public function getCombats()
{
return $this->combats;
} | 1 |
5e0c98b8f33f2f34c7dc09947ae69a73 | 253e42954099900186d4d1ab2f2effd4 | 该峰是否属于这组,true属于该组 | class PeakedHelp
static statusIsOverByGroup(group: number): boolean {
let isOver: boolean = false;
if (PeakedSys.ins().isKf()) {
if (PeakedSys.ins().isKFSixteen()) {
if (group == this.PK_GROUP_1) isOver = PeakedHelp.statusIsOver(KF_PeakStatus.Prom16, false);
else if (group == this.PK_GROUP_2) isOver = Pe... | 0 |
5ca5ab25e039c78f1fe2d3fc9af56a27 | 23d59ffc4716225581537914abda4199 | 判断该线程是否能获得读许可 | class swoole_lock
public function trylock_read() {} | 1 |
e6aa2ad7745ae1798dab3cb9d85b64e4 | ccd94d534d0dcbf288433d3f7e3e339d | Method for updating the active record classes | {
if (empty($activeRecordClass)) {
throw new InvalidConfigException('activeRecordClass can not be empty');
}
$this->activeRecordClass = $activeRecordClass;
return $this;
} | 1 |
8a57f014623dcd14d9e17e6b76979149 | c4e45a7738109432a8c14a1dfe18127b | 返回应用使用的fd句柄总数 | public int countFileDescriptors(); | 1 |
4f287828a7bba35fba30fa99410975f4 | 4f64b3b2adb2c9d55c89317a041c88af | テーブルから値をEffect型配列で取得する | namespace Utage
[System.Serializable]
public class StringGridRow
public T[] ParseCellArray<T>(string columnName)
{
T[] ret;
if (!TryParseCellArray(columnName, out ret))
{
Debug.LogError(ToErrorStringWithPraseColumnName(columnName));
}
return ret;
} | 1 |
2d0d80bc109b6731108822b46fc93961 | 5916df19fe1aca6582fb774f8bc80bbd | 获取发布房源的缓存key | {
return $this->cachePrefix . '_' . $this->pubnum . '_' . $name;
} | 1 |
2d850f81d8b3fb28d333066a2cc63443 | 20d17cb2c2891776290d8056aef40475 | 根据学生姓名以及学生状态 查询学生信息 | @RestController
@RequestMapping("/teacher")
public class TeacherAjaxController
@PostMapping("/selectStuStatus")
public List<StuManageBean> selectStuStatus(@RequestBody List<StuManageBean> smb) {
return as.selectStuStatusCtl(smb.get(0));
} | 0 |
e80d28136fb7a433e5d68bb813fec240 | a30421db09685d577829468677543a3c | Search for and return one or more documents based on a free text string passed in as an argument called 'text | rval = list()
if text:
rval = self._Find(text);
return rval | 1 |
b6f2416965642b32ba469939c27a4cd1 | dcb4d3049689b654b8629fcdf9e16adb | Set reset control of nf_rst_n terminal.<br>
<ul><li> 0:nf_rst_n terminal reset is released.
<li> 1:nf_rst_n terminal reset is set.</ul> | namespace target namespace crc namespace reg class CR
__attribute__((always_inline)) unsigned long setRESET(unsigned long value) volatile {
raw = (raw & ~(0x1 << 0)) | ((value << 0) & (0x1 << 0));
} | 1 |
9818b0971249f6445759d2a3391738c8 | 2893b0ff48ec48905a55352364f5ddd6 | Menu handler for `OptionMenu (Show Version)'. | self.menu_options.clear()
self.menu_versions.clear()
versions = self.versions if self.versions else []
version_actions = []
for version in reversed(versions):
action = create_action(
self.widget,
version,
triggered=lambd... | 1 |
e5ec7ccda8df9185423e5d79428f2f33 | b228a84c9fb8a5f1929d7fb9ede12988 | Convert list of authors pairs to a dict of dict to pass to the networkx.Graph constructor.
Count the duplicates and store them in the "weights" attributes of the dictionary so that
an edge that appears k times in sorted_edges_list will get a weight of k in the graph. | def multigraph_to_weights(G):
seen = defaultdict(float)
for e in G.es:
try:
weight = e['weight']
except KeyError:
weight = 1
seen[e.tuple] += weight
G.delete_edges(None)
es = list(seen.keys())
weights = list(seen.values())
G.add_edges(es)
G.es[... | 1 |
30a505672620bfe0068970fa44403565 | 953a6a7e940e334d3e71cb264800e99a | The mapper to transform a genotype to a phenotype for testing. | genos = {"0": "0/0", "1": "0/1", "2": "1/1"}
child = genos[geno[0]]
mom = genos[geno[1]]
dad = genos[geno[2]]
var.child.format["GT"] = child
var.mother.format["GT"] = mom
var.father.format["GT"] = dad
var.child.set_genotype()
var.mother.set_genotyp... | 0 |
99c762597483dbc9a3704418a57dc3a7 | 373b9fc764823ee9233e74446e86c1e2 | <include file='Windows.xml' path='doc/member[@name="Windows.GetPaletteEntries"]/*' /> | namespace RD_AAOW
public class ConcurrentDrawLib
[DllImport (ProgramDescription.AssemblyRequirementsCDL)]
private static extern IntPtr GetPalettesNamesEx (); | 0 |
c52a09e445049714b114c22fb7129edf | 8d1bcbcc3d2ff7f4f174a02d681eb649 | Get facultyId | class employees{
public function getEmployeeId(){
return $this->facultyId;
} | 1 |
f8995797a086ade2590ff10ba77f237e | 118ccee764700064af9f4750cd9a554d | Dispatch an action with view as source | void Dispatch<TAction>()
where TAction : IAction<TState>; | 0 |
a0ce0b328aa9c4967bed0b03c87df827 | 90f26473f8329e801a861a0f91cef5c9 | 把字符串数组转换成SQL语句中,where条件中的in所需要的字符串,转换成: 'a','b','c'的样式 | class BaseModel{
static function _get_sql_in($ids){
$ids=array_unique(array_filter((array)$ids));
$rt='0';
if($ids){
$rt= join(',',$ids);
$isString=preg_match('/[a-z]/i',$rt);
if($isString){
$rt="'".str_replace(',',"','",$rt)."'";
}
}
return $rt;
} | 1 |
1ab27ff6c329be19e2932d362bbf0375 | d68222d12fae82e6289830ce6f4c939c | 维密老虎机自由转动结束后发送这个消息 | this.handler.querySelector ("message_free_spins_end.winValue").text = number_format(amountWin / 100, 2, ".", ",").toString();
this.showGameInfoPopupEvent({
messageAlias: amountWin > 0 ? "free_spins_end" : "free_spins_end_zero",
states : [state],
okButtonName: "free_s... | 1 |
7d21c02bfb2cd12295cda86205b5240e | 638f364fd5db81243481e2d8738ebe50 | Parse a helical move gcode line and send the commands to the extruder. | class StretchSkein:
def parseStretch( self, line ):
splitLine = line.split( ' ' )
if len( splitLine ) < 1:
return
firstWord = splitLine[ 0 ]
if firstWord == 'G1':
line = self.getStretchedLine( splitLine )
elif firstWord == 'M101':
self.extruderActive = True
elif firstWord == 'M103':
self.extrude... | 0 |
3bc6fbf0561fe0bc891ecb9b86b5835d | 9d9e9280887c14242be6e0ed360eeda8 | Deploys all event sources. | try {
SvcSourceSelectionService.setDeploying(true, vdbName, false, null);
RepoRestService.deployVdb( vdbName ).then(
function ( result ) {
vm.deploymentSuccess = (result.Information.deploymentSuccess === "true");
... | 0 |
e62e374855dce5d4a1b8b43a68d6937e | a943693514ce74be999ad1631543f720 | The CXX standard level. If set, will add the required flags. If left at
0, it will trigger an automatic search when pybind11's build_ext is
used. If None, will have no effect. Besides just the flags, this may
add a macos-min 10.9 or 10.14 flag if MACOSX_DEPLOYMENT_TARGET is
unset. | args = []
args.append(
"-DCMAKE_CXX_STANDARD=%s" % self.spec["root"].variants["cxxstd"].value
)
return args | 1 |
9d391cb0dea39d0248fa765b45a66b70 | b85ca66565d20c113dbd12842f18d6a3 | 获取y轴顶高到第一条线之间的距离 | {
string sql = "Data Source=" + Program.ReadProgramPath() + "\\" + _projectName + ".gsygeo";
using (SQLiteConnection conn = new SQLiteConnection(sql))
{
conn.Open();
sql = "select yAxis from jkBasicInfo where name ='" + _name + "'";
... | 0 |
4611d39284a862e3b49b095c8d5b67bf | 943102dc00bb528684b4d676801a12e4 | 使用concat()函数可以将两个或者多个数据表的记录合并一起, 用法: pandas.concat([df1, df2, df3.....]) | def concat_data(infile):
for path in csvPaths():
print(path)
tmp = csv2df(path)
try:
df = df.append(tmp)
except:
if tmp is not None:
df = tmp
try:
df.to_csv(infile, index = False)
return(df)
except:
pass | 0 |
8a2e089faa03ed53101f32d3d4d265a0 | 41d1ab5969f991813e57535f6c21cded | Plays a game level until it wins, then moves to the next one until
completion. | screen, resource_loader, cfg = self.screen, self.resource_loader, self.cfg
resource_loader.playbgm()
while True:
self.__startInterface()
for idx, levelpath in enumerate(self.cfg.LEVELPATHS):
state = self.__runLevel(levelpath)
if idx == len(... | 1 |
f0397b77f2216ebd1b5356a6836ce27e | 76e2eb2aa9be8c2fc470215ebb122527 | 保存数据至excle文件中 | namespace WordStatistics
public partial class Form1 : Form
private void savebtn_Click(object sender, EventArgs e)
{
setExcel(dataGridView1);
} | 1 |
9eac8eab9c89ccd385240fb73efc7704 | 20d36850416e2004613881fcee63abcb | Get a list with users by firstname | {
$fullname = $this->db->quoteName('first_name') . ", " . $this->db->quoteName('middle_name') . ", " . $this->db->quoteName('last_name');
$query = $this->db->getQuery(true)
->select(
array(
$this->db->quoteName('virtuemart_user_id', 'user_id'),
"IF (LENGTH(TRIM(CONCAT_WS(' ', " . $fullname . "))) ... | 1 |
6be89045a76fada5be4052c183b0f00e | d5c84854f09bcdd56c255fcf4815da1d | Detect whether the player is reaching this teleport point | public class PlayerBehavior : MonoBehaviour
private void OnTriggerExit(Collider other)
{
if (other.CompareTag("Teleporter"))
{
nearTeleporter = false;
}
} | 0 |
b0ae651354dc815a2632b55389d0c7ab | b02f1e6960287e8b62ce6efd4734620c | function to extract the set bits in a given address | uint32_t boot_count_set_bits(uint32_t input_val)
{
uint32_t count = 0;
for(count = 0; input_val; count++)
{
input_val &= input_val - 1 ;
}
return count;
} | 0 |
e32a6210183e1d9c7df99dab87b3992e | 1f0d283aea0dbfb0ae1f12640eb7b99d | Restore specified PARAM_EXEC parameters. | class NF8742(Device):
def restore_params(self, slave = "", Bin = 0):
self.pass_command("*RST", slave) | 0 |
2c83bc80559e1e7c0be5f182abe27ee7 | 3fd04547cd355ee78c95eea72230c989 | System.Boolean System.Collections.SortedList/ValueList::get_IsReadOnly() | IL2CPP_EXTERN_C IL2CPP_METHOD_ATTR bool ValueList_get_IsReadOnly_m312328E4435C92F023F6F29D645A595337C371E4 (ValueList_t9DF653525F9B5641C9B6143901F62A7BF447D331 * __this, const RuntimeMethod* method)
{
{
return (bool)1;
}
} | 1 |
a41a8c089d811920a1bfc78f83b178ed | e7a5a370e0040fdfb2398b620ea0af5d | Delete the immutable tag rule. | req: CreateImmutableTagRulesRequest,
cb?: (error: string, rep: CreateImmutableTagRulesResponse) => void
): Promise<CreateImmutableTagRulesResponse> {
return this.request("CreateImmutableTagRules", req, cb)
} | 0 |
ae32ca72c58bac8d25a30ad841ab40a8 | 1904c90fee76feac9a324e867ded75da | 敵の一括更新処理 | public class Enemy implements GameObj
public static void fresh() {
for (int i = 0; i < enemyList.size(); i++) {
Enemy tmp = enemyList.get(i);
if (tmp != null) {
tmp.updateSelf();
}
}
shootCheck();
for (int i = 0; i < list.size(); i++) {... | 1 |
ae5c5466aec0738d113f01d9c317ec77 | bfafe3ed62cd112994ac4f1542a5c169 | @brief Returns i'th element in group | {
if (i >= 4 || i < 0){ cout << "Index out of range" << endl; exit(1); }
return m_elements[i];
} | 1 |
560e65db3f8b53a97c2493cfea7a6744 | a36572b8e4493612836008203f701d8c | Runs a program, and it's paramters (e.g. rcmd="ls -lh /var/www")
Returns output if successful, or None and logs error if not. | def run_command(command):
try:
return check_output(shlex.split(command))
except:
print "Command %s failed" % command
return None | 1 |
790d9b7638f25fb291cb8f7ad3b734ab | a4cb5e737f56066e212e2e25a599a4c5 | Gets the value of the dia property. | @Entity
@Table(name = "tm_turn_rotary")
public class TmTurnRotary extends BaseDomain
public String getDiaCode() {
return this.diaCode;
} | 0 |
c17e97bef75271a3cd42c03e4db50e3f | 8135bb2b368c110277a46800471d5029 | función para hacer el borde rojo en caso de error | function bordeRojo(input){
input.style.border = "1px solid red";
} | 1 |
54f932aa923985dbb1bc45904130506d | daea2d4a977f7fc6d3bc83871b6a2f3a | DEG2RAD | double BinarySearchTree::deg2rad(double deg) {
return (deg * pi / 180);
} | 1 |
60aba3df692c52b46bfb6cef26712165 | 1f3dcb1591bbb0593eb1233888186f64 | This method returns the absolute url for the next connector object in the testkit algorithm sequence after this very object if any | namespace Simulation.Core.Primitives
ILinkageBase GetNext(); | 0 |
c8db4e1fdbe2c541f5e115b057f2ab17 | c335e46d7753b6cdb572cba2982d3c85 | Override this method to get notification when lock file was removed. | abstract class ExecutableApp
protected function onLockCreated() {
} | 0 |
d7ff4f5c5ef384eeb77b4e3e1047f05c | 945f0bddb33a997ee344fa7014f79193 | Returns a list of child ID's for the specified ID. | {
$obj = &$this->root_node->FindChildById($id);
if($obj)
{
return trim($obj->GetChildrenIds());
}
else
{
return false;
}
} | 1 |
62850159a6e977cb7a7747a8cfa441a2 | 9f0d1d3d87edfe26ea0d2ecfb0158c12 | operator=
Assigns from a double. | Complex const &
Complex::operator=(double r)
{
re_=r;
return *this;
} | 1 |
f59ef522e61b2a8b3bbd4bfc19419a25 | 67c549812afb70138343c5eecbec0cfa | キューから優先順位が最大の値を取り出す | {
if(isEmptyMQ(mq))
return NULL;
int max_prior_index=0;
for(int i=1;i<total_queues;i++)
{
if(mq[i]->p>mq[max_prior_index]->p)
max_prior_index=i;
}
return front(mq[max_prior_index])->value;
} | 1 |
99b8f2883428a24b149ada087d36ee59 | 60004453d41fe9cee2d12d35560e44f2 | 根据类型从对象池里拿一个出来,如果没有就返回null | let className = getClassName(clazz);
if(!className){
egret.warn(clazz['__proto__']['__class__']+'需要加到window里面~~~~~~~~~~')
}
if(clazz.prototype["__types__"].indexOf("ICacheable") < 0){
throw new Error(className + "未实现ICacheable接口,只有实现ICacheable接口的类才能使用对象池");
... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.