query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
c59a9a43862003263e83a247430220c4 | da9822089f08eb43bc5bc6229a895ff0 | Visit a parse tree produced by MySqlParser#partitionOptionComment. | public class SQLStatementParserBaseListener implements SQLStatementParserListener
@Override public void exitPartitionOptionComment(SQLStatementParser.PartitionOptionCommentContext ctx) { } | 1 |
d315a3be249ed3960e9f0a7313229a93 | 675265d8fa6e97554f7c97935f1a9cf0 | 广播玩家退出 | logger:log(uid, 'player exit')
local tmp_player = Runtime.tmp_player_manager[uid]
if tmp_player_manager then
Runtime.tmp_player_manager[uid] = nil
end
local player = Runtime.player_manager[uid]
if not player then
logger:error(uid, 'player out found')
return
end
lo... | 0 |
c7587ebe39cd99cdf205a8e1db669f3b | 5da0f87fd4c4f5a48a01a2b2e562b278 | Declares one more box as closed by computer. | namespace cs31
bool ShutTheBox::computerCanPlay( ) const
{
return( canPlay( false ) );
} | 0 |
59d3f5be1ec293406e8dc690f98e238b | f6aafda8c59641d10fc6da8cde16c20e | Check if mpmath is installed. | def is_available():
return _itt.is_available() | 0 |
a01a5d1932e3919d6fad7eee70998189 | 94e9a86659ab6e11e4ed11e18596ac3e | Return the main tags associated with this class | public abstract String[] getTags(); | 1 |
8c94f2c091011bac341f93278c255eb8 | 15aa73129c5861aeec6d2eebd397a5fc | Find the distance between given lighthouse and user's chosen location.
Haversine formula is used. | userLat = math.radians(loc1[0])
userLong = math.radians(loc1[1])
shelterLat = math.radians(loc2[0])
shelterLong = math.radians(loc2[1])
dLon = shelterLong - userLong
dLat = shelterLat - userLat
R = 6373.0
a = sin(dLat / 2)**2 + cos(userLat) * cos(shelterLat) * sin(dLon / 2)**2
c = 2... | 1 |
59e42124737b1eb62655abeba18bca89 | def293e5b75b4f5b431c88254c2caa5c | \brief Função que verifica se uma peça que foi posta no tabuleiro pode ou não estar lá
de acordo com as restrições 0 e 1 | {
for (int i = 0; i < N; i++)
{
if (tab[linha][i] == 1)
return false;
}
for (int i = 0; i < N; i++)
{
if (tab[i][coluna] == 1)
return false;
}
for (int i = linha, j = coluna; i >= 0 && j >= 0; i--, j--)
{
if (tab[i][j] == 1)
ret... | 1 |
762c58e261a98d6fc91fb0bb4d18cc41 | d3cd109523df612a721b272c9c6dd7be | This method was generated by MyBatis Generator.
This method returns the value of the database column tyc_company_bond.created_at | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "abstractContinent", propOrder = { "continentId",
"continentName", "created", "modified" })
public abstract class AbstractContinent
public Long getCreated() {
return created;
} | 0 |
2fb73902f7d13b45a3f6a25b25d761f7 | 13f396e8a5b1de749735401f07c1e439 | Updates the joined members counting. | int count = getActiveSessionsCount();
try {
if (count > 0) {
messageSender.sendMessage(new AddSessionCountMessage(count),
member);
}
} catch (RuntimeException e) {
log.error("Error informing new member about sessions count", e);
}
} | 0 |
8461264981aae348d7bbb9b0dc1a9edb | 5ddca0d60ef2a09910a846c0330e8726 | Validate that the Wave format is consistent. | func Test_IsWavefileHeaderOk(t *testing.T) {
wavefile, err := os.Open("testdata/validinput.wav")
if err != nil { panic(err) }
defer wavefile.Close()
reader := bufio.NewReader(wavefile)
if !IsWavefileHeaderOk(reader) { t.Error("valid Wavefile header misinterpreted") }
} | 1 |
7f6f0ebc0f92b554b3d780855aec289e | 0b3eda056a0b017f1fc6b9a2d15cb0eb | 用有序数组中最中间的树生成搜索二叉树的根节点,然后用其左边的数生成左子树
用右边的数生成右子树,递归实现 | public class ArrayToTree
static void arrayToTree(BinaryTreeNode treeNode, int[] array) {
if (array.length == 0)
return;
int middleIdx = array.length / 2;
treeNode.setData(array[middleIdx]);
if (array.length == 1)
return;
BinaryTreeNode leftNode = new Binar... | 1 |
83826a7aa715c7eb4df9b1383814b56e | 71f137d676714e79960c446db5f12d6e | Валидация СНИЛС. | {
if (!(Char.IsDigit(e.KeyChar)) && (e.KeyChar != (char)Keys.Back))
e.Handled = true;
snilsTextBox.MaxLength = 12;
} | 1 |
51971c994d48ef72f50056040716a94a | 80cd768ccd9b16aa7c97028e80123352 | Initial headers setup, creates headers, checks active sessions, and sets browser's active language | {
if (this.UserService.GetCurrentUser(false) != null)
{
User currentUser = this.UserService.GetCurrentUser();
this.SetLanguage(currentUser);
}
if (context.Request.Headers.AcceptLanguage != null && context.Request.Headers.AcceptLangu... | 1 |
9f5e61331092d00f8d3bc8c135a25c58 | fc38cdb9b4fdada3aee89a794044e438 | Base request for issuing API api_requests to Tableau Server. | namespace NiFi.Swagger.Core.Api
System.Threading.Tasks.Task KnoxRequestAsync (); | 0 |
daacaac35e35e0f62763d64796af3ab5 | 36e8b83cbfdf25aa76072150bf0a220f | テンプレートパスを変更 | class TemplateBase extends Html
public final function setTemplatePath($templatePath) {
self::$_templatePath = $templatePath;
} | 1 |
cfb7fc8fdfe013c6c1106629136f1533 | e991111d4c6af5d36d610d65865dc559 | Resets the Auto Tile Matrix assignments | class NECPD(object):
def command_auto_tile_matrix_reset(self):
logging.debug('')
send_data = []
send_data.extend(ascii_encode_value_4_bytes(0xCA03))
send_data.extend(ascii_encode_value_2_bytes(0x06))
write_command(self.f, send_data, self.destination_address, 0x41)
reply_d... | 1 |
8755aec3c52b3bc7594fcee5f4efaa96 | 00286de19aeccd4868a6c077214bb84b | 删除文章(逻辑删除,移动到回收站) | class ArticleController extends \yii\web\Controller
public function actionDelete($id){
$obj=Article::findOne(['id'=>$id]);
$obj->status=-1;
$obj->save();
\yii::$app->session->setFlash('danger','删除成功,彻底删除请前往回收站');
return $this->redirect(['article/index']);
} | 1 |
50136e511d848a4d8f60729792a14771 | a9ea36d03040f8bdf201937e9e37dd3f | 基类方法: 经济变量概述, 返回经济变量的均值统计 | {
if(current_xmachine->xmachine_Eurostat) return current_xmachine->xmachine_Eurostat->range;
if(current_xmachine->xmachine_Household) return current_xmachine->xmachine_Household->range;
if(current_xmachine->xmachine_ClearingHouse) return current_xmachine->xmachine_ClearingHouse->range;
if(current_xmachine->xmachine... | 0 |
6722c950c4df8ef88c21d8553b32f233 | a57c9a3a699bec5e5d5a2803bee1b589 | Checks if a user is a club member | namespace MyFlightbook.Clubs
[Serializable]
public class Club
public bool HasMember(string szUser)
{
return MembersAsList.Exists(cm => cm.UserName.CompareTo(szUser) == 0);
} | 1 |
3a101711fe84fc991126626b9fb0af26 | 38662d966a567ec662f60d3ee6648434 | Create an instance of {@link CustomObjectSharingRules } | @XmlRegistry
public class ObjectFactory
public CustomObject createCustomObject() {
return new CustomObject();
} | 0 |
fa56113ecbcc30bb0b8b9158aaee073d | 42f41962c28b2166323b74079c8d1062 | get the root inode of the file system | {
struct ch10fs_dir_block db;
struct inode *i;
int ret;
ret = ch10fs_dev_read(sb, 512, &db, sizeof(db));
if (ret < 0)
goto error;
i = iget_locked(sb, 0);
if (!i)
return ERR_PTR(-ENOMEM);
if (!(i->i_state & I_NEW))
return i;
set_nlink(i, 1);
i->i_mtime.tv_sec = i->i_atime.tv_sec = i->i_ctime.tv_sec = 0... | 1 |
da2a3e846fa85ae54ed8664005493316 | 6ecc7d76d30cde3828cdcdfb5d71ed7e | Given a path or list of paths, recurses through directories appending to
the MAYA_SCRIPT_PATH environment variable any found directories containing
mel scripts
The root directories, if given, are always added to the MAYA_SCRIPT_PATH,
even if they don't contain any mel scripts. | def register_dcc_paths(dcc_paths=None):
dccs_path = utils.force_list(dcc_paths)
valid_dcc_paths = list()
dcc_paths_str = ''
default_dccs_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'dccs')
dccs_path.append(default_dccs_path)
for dcc_path in dccs_path:
if os.path.isdir... | 0 |
19550609ae803179fbefc83bf9de3f1e | d46055cea6a22185446dbbc900fc2e22 | Gửi mail kích hoạt | {
try{
$this->validate($request,['email' => 'bail|required|email|max:255|unique:users']);
$token = base64_encode(Hash::make($request->email));
Cache::add($token,['email'=>$request->email,'userId'=>Auth::id()],1440);
$data = ['email'=>Auth::user()->email,'newEm... | 0 |
db4be01ba55d34a482ec60f1cded5f4a | 3bd44bd56352191d594f3c552be87aa3 | 用递归法将一个整数n转换成字符串。 | void toN(int i,int n){
if(i==0){
cout<<i<<endl;
}else{
string temp="";
while(i!=0){
int x=i%n;
char c=x+'0';
temp=c+temp;
i/=n;
}
cout<<temp<<endl;
}
} | 0 |
1c0a448c831216ad7f1b6e9e58c02d51 | ed8c55e37972bc90a7cc7241718b986e | read mapping of equipment measurement IDs to BLIS measurement IDs | @Slf4j
@Component
@ConditionalOnProperty(prefix = SmaConverterConfig.CONFIG_PREFIX, name = "enabled", matchIfMissing = false)
public class SmaConverterMeasurementDevice extends AbstractMeasurementDevice
protected void initCustom() {
for (Measure lCurrMeasure : Measure.values()) {
registerMeasureId(lCurrMeasure.id)... | 0 |
fc599c3406c5cd961783ab6c6864558b | cf507d8bb7df0c217507f389f7bb5d6c | Checks if this tangible object condition has the given cover. | {
if (tangibleObject != null)
{
foreach (ConnectionItemCondition connectionItemCondition in this.ConnectionsToRemove)
{
if (tangibleObject.Equals(connectionItemCondition.TangibleObject))
return true;
... | 0 |
835889ae7f6ec337d02920ef8c9eeb4b | 0e3b2f6f24783c15d50c38dcc78e319c | Accessor for timeElapsed | class Solution(object):
def elapsed_time(self):
return self._elapsed_time | 1 |
f268199dec7b2dfcc7715af782d310ab | d371f49cce60d13282bf88fdf57f023a | 查找已加载的指定资源。 | namespace TDFramework
public class AssetBundleManager : Singleton<AssetBundleManager>
public ResourceItem FindResourceItem(uint crc)
{
return m_resourceItemDict[crc];
} | 1 |
83e67f2185949d4f3a46a4575c130ec0 | a4aec40f5fa9ba1d83028c542037258d | m_id与b_id hash 检查去重 | try:
return len(list(set([x['id'] for x in a]) & set([x['id'] for x in b])))
except TypeError:
return 0 | 1 |
a9ef3538ce7d9dbab0e0f6bb8dbbcf1c | 0d8bcc501519e789e4d28b7172cd450d | Returns a collection of {@link ObjectPrx proxies} for the specified peer, where the proxies returned are those
specified by the given {@link Set} of private proxy identities. In this implementation, the
<code>peerIdentifier</code> is the peer's user id and the <code>proxyIdentities</code> is a {@link Set} of
private p... | public Ice.ObjectPrx[] addProxies(Ice.ObjectPrx[] proxies); | 0 |
b462e959cd7e91db70c2503a4955c0dc | d5214f284743745d64314230d0debde8 | Returns the centroid and zoom level for the locations in route. | $routeID = $this->fetchRouteID($route);
$stmt = "SELECT ST_X(location) as Xpos, ST_Y(location) as Ypos ";
$stmt .= "FROM routeMap WHERE routeID = ?;";
$query = $this->conn->prepareQuery($stmt);
$this->conn->bindVal($query, 1, $routeID, $this->conn->INT);
$this->conn->executeQuery($query);
$data = $this->c... | 0 |
1d0bda329996b20adc90d62300bbcd23 | 44cfa37898c226fc79377bade750be58 | 返回T_Storage(产品信息表)的所有信息 | {
string sql = "select * from officedba.StorageProduct where CompanyCD='" + CompanyCD + "' and ID=" + ID;
return SqlHelper.ExecuteSql(sql);
} | 0 |
27cf44bc9680be61ed452921db3562cd | eeff15a8b8dfe5ff36af73a09ce02929 | 更新SQLite数据库 | public class DBHelper extends SQLiteOpenHelper
public void updateTable(String sql) {
mDatabase = getWritableDatabase();
mDatabase.execSQL(sql);
} | 1 |
482934dec49aa53318889c3757f02da7 | 84f8e8c22813d2cd581b7722b9c458d3 | GET: api/SuggestionModels1 | namespace HotelWebProject.Areas.WebHotelManage.Controllers
[Authorize]
public class CompanyController : Controller
public ActionResult SuggestionManager()
{
List<Suggestion> list = new SuggestionManager().GetSuggestion();
return View("SuggestionManager", list);
} | 0 |
3d2038d852068b171c0950f857f66827 | bfce7a8d1fb8940caf4907a29ca82cd2 | Build array of child progress bars | function renderProgress() {
for (var qIndex = 0; qIndex <= lastQuestion; qIndex++) {
progress.innerHTML += "<div class='prog' id=" + qIndex + "></div>";
}
} | 0 |
d693f3d51599184b427d3d712beaaa33 | 0db8d6675b3a770c4754400fcd1cef4f | Unipolarna funkcja aktywacji neuronu. | double NeuralNet::activationFunction(double x) const {
return 1/(1+std::exp(-x));
} | 1 |
91f45505d9070d04316ab6e4f25ff040 | ad462bcd5d33a2d9f1e4501ba80ec628 | 退出游戏的时候,需要先退出pygame和mixer播放器 | static int eu_quit(lua_State *L)
{
Mix_CloseAudio();
Mix_Quit();
IMG_Quit();
SDL_Quit();
return 0;
} | 0 |
268e01d2df2d38fc86d6afeb84ecab45 | f35e51106b014cf45ca3f14850ed6913 | Checks the GPRS signal level received from device and change its icon. | wifiManager = (WifiManager) getSystemService(WIFI_SERVICE);
wifiInfo = wifiManager.getConnectionInfo();
int strength = 0;
if (wifiInfo.getBSSID() != null) {
strength = WifiManager.calculateSignalLevel(wifiInfo.getRssi(),
wifiLevel);
}
switch (strength) {
case 1:
iv_wifi.setImageResource(R.drawa... | 0 |
dd39b9a4cce0e34051825204806db497 | 3a2a6f19013609c06689b0fd591243e1 | Test function from the AES-CMAC Algorithm Network Working Group Spec (NIST) - June 2006 | {
unsigned char tag[16];
unsigned char ct[114];
int i, ret;
struct chachapoly_ctx ctx;
unsigned char key[32] = {
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f,
0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9... | 0 |
6671f850f298a23ed404ec28d45f8f3e | af63c948c50402b9f83fc67b20fb80e4 | Find rays which could intersect with this wall, eg.: orientation of
their ending to wall starting vertex is clockwise and to ending
vertex is counterclockwise. | public customIntersectionPlanes() {
return this.model.floorplan.wallEdgePlanes();
} | 0 |
2d5e11125418b203cd76d5b2e620abca | 9b89bd438bdb493a03c4bebcf62a5c2c | stop movement when lifting a key for smooth mvment | if(IS_CROUCH_SPEED_ENABLED) then Task.Wait(.005) end
if (binding == ABILITY_BINDING_KEY) then
sprintKeyPressed[whichPlayer] = true
end
UpdatePlayerMovement(whichPlayer)
end | 0 |
a671b12a4eeeaef72c5697c3b8f971af | 9c124c86b590cf1ddd685d6b2477ca29 | Checks for the selected number exist in other contacts | @JvmStatic
fun contactExists(context: Context, number: String?): Boolean {
var cur: Cursor? = null
try {
val lookupUri = Uri.withAppendedPath(ContactsContract.PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number))
val mPhoneNumberProjection = arrayOf(ContactsContract.PhoneLookup... | 1 |
addb5f29081e31a4e9a309a2388f3aa2 | de4f229b080b3de92254d482c90591a8 | Modifica la educacion del programador. | @RestController
@RequestMapping("/user/profile")
public class UserProfileController extends BaseController
@PutMapping("/educational")
public ResultDTO updateEducational(HttpServletRequest request, String educational) {
return userService.updateEducational(getUserId(request), educational);
} | 1 |
2228363426bfaa1fc78861eb2ddef66b | 22be011fd5d7a608330a0cb33615d7ba | 向购物车中存储商品,商品对象的为key,数量为value | var goodsObj = getItem();
goodsObj[obj.gid] = obj.count;
localStorage.setItem(key, JSON.stringify(goodsObj));
} | 1 |
417cc621098a5d29b4044ac7d64564f8 | 2aa450469951f7efc5a91d9df10b8653 | Whether the http status code is 200. | public function isOk(): bool
{
return $this->isStatusCode(200);
} | 1 |
d74913f4e0c7342131ef79eccd25de49 | 607256809cb089184230198b1692447c | backup entire library before making changes | class LibraryController:
def recreate(self):
self._repo.createFreshLibrary() | 0 |
45ff8e6ff90a23aa076ac24b736a575c | 2fd4460f84f745ef2546833c86a7469d | 提交用户的一周的工作计划安排 | SubmitPlanReqBean bean = new SubmitPlanReqBean();
if (type==1){
bean.setYear(year + "");
bean.setWeek(week + "");
}else {
bean.setYear(nextYear + "");
bean.setWeek(nextWeek + "");
}
bean.setAudit_status(status);
bean.setFrom... | 1 |
5928f1409923822f8760898abedcf358 | 3b07da83c70bb8f11097206eac1e7c8f | Returns the nearest neighbour of each particle in this set. If the 'neighbours'
particle set is supplied, the search is performed on the neighbours set, for
each particle in the orignal set. Otherwise the nearest neighbour in the same
set is searched.
:argument neighbours: the particle set in which to search for the ne... | global cached
if not cached:
proximity.build_cache(dataset, distance)
cached = True
pairs = proximity.cache[instance]
neighbour = [which for which, dist in pairs if radius >= dist]
return neighbour | 0 |
67df87d4e1cd7a0a9d4c42e13aea6e86 | 4ec7020cd6004df3d9728d7d94dd306c | Returns the cross-correlation function with lag in [-width,width] and given bin size.
T is the total duration (optional).
The result is in Hz**2:
CCF(T1,T2)=<T1(t)T2(t+s)>
N.B.: units are discarded. | int N_freq = signal.Width();
int N_time = N_freq;
int *time_instants = new int[N_time];
for (int i = 0; i < N_time; i++) {
time_instants[i] = i + 1;
}
Img1dsf freq_bins(N_freq);
for (int x = 0; x < N_freq; x++) {
freq_bins[x] = (float) x / (2 * N_freq);
}
int size = fft::nextpow2... | 0 |
a00a55a737e11af8903db2471677387c | f40e61508033127974020abb48beb307 | PopAllIM 即时消息告警读取 | go func() {
d := time.Duration(1) * time.Minute
for range time.Tick(d) {
combineIM()
}
}()
} | 0 |
21efd14276b4e5577d0729bb80836410 | 5245d7a8a405c1fec3c5bada7c612342 | Path compression by halving: Returns root value by having each link skip to the next node in the path up the tree | function QuickUnionFind:_root(i)
while i ~= self._id[i] do
i = self._id[i]
end
return i
end | 0 |
562440353e4bddfa34f08f2b6d943b98 | 6e4f7ca137846d4d672afa2813d24b92 | <p>If true, the ripple will remain in the “down” state until <code>holdDown</code><br>is set to false again.</p>
JavaScript Info: | @JsProperty boolean getHoldDown(); | 1 |
c79ac8aae87fbd784c94ff66d64aeb94 | fdf5a1ba8ff5463aaef1113ec507575e | Renvoie la liste des mots-clés. Initialise celle-ci si cela n'a pas déjà
été fait. | class FVS(object):
def keywords(self):
if self._keywords is None:
self.init_keywords()
return self._keywords | 1 |
187b291a11f4c81306238691ddf178b3 | 6bf4b692c734e449880860c3e753cf81 | The notebook that contains the page. Read-only. | class NotebookInstance(pulumi.CustomResource):
def root_access(self) -> pulumi.Output[Optional[str]]:
return pulumi.get(self, "root_access") | 0 |
f616140fd261115ac9cadfc4ddcf24c0 | 872735e01ae7520bf1c8703154688afc | 查找指定类别和pid的表单集合 | public List<MaterialVo> getMaterialByPidItemid(String pid,String itemid,String bsnum){
List<MaterialVo> volist = new ArrayList<MaterialVo>();
String hql ="select m from TSysMaterial m, TSysPermissionmapmaterial map where m.mid = map.id.mid and m.status ='1' and map.id.pid =? and map.id.itemid =?";
List<TSysMat... | 1 |
29b80a178afacc8d25a68d4eba373952 | db69c7e77d11ab60c3dbbe2738521648 | Tests state transitions by activate and passivate | {
TestStdActiveObject* mUnderTest;
void setup()
{
mUnderTest = new TestStdActiveObject();
}
void teardown()
{
delete mUnderTest;
mock().clear();
}
void Start()
{
mUnderTest->Start(cms::ProcessOption::UNIT_TEST);
}
void ActiveObjectProcess()
... | 1 |
d7877654eb01d7065cfc34e12c98aff8 | 69da0ff95c96271eb6e762e6013ac00a | 根据用户DN查询用户 | {
$user = $this->info($username, array("cn"), $isGUID);
if ($user[0]["dn"] === NULL) {
return false;
}
$userDn = $user[0]["dn"];
return $userDn;
} | 0 |
af47ae3a81111883f149cb1041ce60ca | cdfb491d50d1116e1836ff18ee9906db | SetDebugFlag initializes debug switches. | func init() {
if os.Getenv("DEBUG") != "" {
log = glog.New(os.Stderr, "", logFlags)
} else {
log = noopLogger{}
}
} | 0 |
5bde3a5bae088fd867b761de97024247 | 14058f94539cbac1d20f9cd50aec16c7 | \brief Une fonction booléenne qui renvoie vrai si la liste est vide. | int listeVide(liste_t *maListe){
return maListe->drapeau->succ == maListe->drapeau;
} | 1 |
bc408702a4ebec3014ebf6f4a7f90f20 | 4593b5adda29b401b344ebd7652d824d | checks for the current evolution stage and sets the proper alert response gif | switch (stage_num) {
case 0: hangman_file_path = "gameplay_images/stage0.png"; break;
case 1: hangman_file_path = "gameplay_images/stage1.png"; break;
case 2: hangman_file_path = "gameplay_images/stage2.png"; break;
case 3: hangman_file_path = "gameplay_images/sta... | 0 |
8b3b0de056188e790b4e863541c4eab6 | 6fa8e433430022383227a913076c57b2 | Map BOAA Revoke reason to IWS ReasonForDeactivation | int wfcRegErrorCode = WfcReasonInfo.CODE_UNSPECIFIED;
switch (sipErrorCode) {
case 40301:
wfcRegErrorCode = WfcReasonInfo.CODE_WFC_403_UNKNOWN_USER;
break;
case 40302:
wfcRegErrorCode = WfcReasonInfo.CODE_WFC_403_ROAMING_NOT_ALLOWED... | 0 |
060d199d3bd6915a95317277143a4fa4 | f00e96763acbcb834b57e03605318d58 | Create a new Field Interview Event. | namespace TriTech.InformRMS.Application.Contracts.DataEntry
[OperationContract]
Guid CreateFieldInterviewEvent(Guid fieldInterviewId, FieldInterviewEventDetails details); | 1 |
d47bea24209b10f9f52a98c3a676a004 | 35c585377d749b0048e28c09c81dda5a | 只有老师才有权限创建课堂 | class AnnounceCreateView(CreateView):
def render(request, self, context):
if not is_teacher(self.request.user, self.kwargs['classroom_id']):
return redirect('/')
return super(AnnounceCreateView, self).render(request, context) | 1 |
1805a04a527c219ca2734263780777c7 | 0f0253d0ac765e35acfad5b45121d735 | Получение городов по id страны | class CityController extends AuthController
public function getCitiesByCountryId($countryId, CityRepository $repository)
{
return $this->jsonSuccessResponse([
'cities' => $repository->pushCriteria(new CountryIdCriteria($countryId))->all(),
]);
} | 1 |
5ee59b3f5275b48bae34eb86acc86d7e | 55acba87ace8cab4a2631963b716c289 | Description Get bdaddr from Android Property System
Returns bdaddr | BLEAddress BLEDevice::getAddress() {
const uint8_t* bdAddr = esp_bt_dev_get_address();
esp_bd_addr_t addr;
memcpy(addr, bdAddr, sizeof(addr));
return BLEAddress(addr);
} | 0 |
a46337cedb6a7b4a0b827607a8d750ba | c2c21a58f35e7fb54eaadc696e2cf3a7 | Returns true iff string matches pattern
with arbitrary offset. | class StringScanner:
def check(self, pattern):
return self.search(pattern, advance_pointer=False) | 1 |
58b6eb85eafd14ce3a66040a7f78ff52 | 3edd4e40123db6f669852827238e21bd | Returns Williams %R | def WilliamR(price,high,low,n):
highp = pd.rolling_max(high,n)
lowp = pd.rolling_min(low,n)
WR = (highp - price) / (highp - lowp)
return WR | 1 |
4709e1f7ef88a2734e9b9eac04991494 | 6645800ae861a195ed4ece09b9a88037 | Go to the Next Visited Node | void goToNextNonTerminalNode()
{
if(currentNode->childNode != NULL)
{
currentNode = currentNode->childNode;
}
else
{
if(currentNode->sisterNode != NULL)
{
currentNode = currentNode->sisterNode;
return;
}
else
{
if(currentNode->parentNode == NULL)
{
currentNode = NULL;
return;
}
... | 0 |
eab55796b41929156c182baf5af6ceb6 | b235e623cec0202af88b2ddd78792d6c | Return true if index is within bounds. | func bound(i int) bool {
return i >= 0 && i < BOARD_SIZE
} | 1 |
7b23cc30daf077cdbe466abbe4060d53 | 1244e7b22d253ce3571dec56cd809279 | Evaluate the sparse hessian of the Lagrangian. | n = len(x)
h = _get_epsilon(x, 3, epsilon, n)
ee = np.diag(h)
hess = np.outer(h, h)
n = len(x)
for i in range(n):
for j in range(i, n):
hess[i, j] = np.squeeze(
(f(*((x + 1j*ee[i, :] + ee[j, :],) + args), **kwargs)
- f(*((x + 1j*ee[i,... | 0 |
ae16e8c1587ba6f8b55ff316fc5c1373 | ee3db9f160fe94de3b9ee69a6a9dbea0 | Kompatabilnost | class Config
public function checkCompatibilityOfConfig()
{
$I = $this->tester;
$I->checkElementOnPage(['class' => 'main_content_inner']);
$bool = null;
$I->lookForwardTo('check compatibility');
$compatible = $I->grabTextFrom('//span[contains(@class, "configurator-compatibili... | 1 |
df3f02134c7df47507b6f0faf4020bb8 | bb9a8a72db82d2621a3023c280f677d8 | 添加包厢信息 | class HotelController extends BaseController
public function doAddRoom(){
$id = I('post.id','0');
$save = array();
$hotel_id = I('post.hotel_id','','intval');
$save['hotel_id'] = $hotel_id;
$save['name'] = I('post.name','','trim');
$save['type'] = I('post.type','','intval');
$save['flag']... | 1 |
9fef9f54ecb06fdcc228b8a3c3b6619e | 5db21c4ddf53bb787e0f83228fc81ec0 | 通过文件路径反序列化获取类
返回存储文件中的所有对象集合 | {
T result = default(T);
lock (LockObject)
{
if (File.Exists(filePath))
{
try
{
using (StreamReader reader = new StreamReader(filePath))
{
... | 0 |
14c901e0033d47d940dc94a348e64b74 | 90b8595e15eefebd3e6f92b3c5cd79d6 | @brief Sleeps in EM2 in given time | void EM2Sleep(uint32_t msec)
{
NVIC_DisableIRQ(LCD_IRQn);
RTCDRV_Trigger(msec, NULL);
EMU_EnterEM2(true);
NVIC_EnableIRQ(LCD_IRQn);
} | 1 |
bc30481edaf3c4b309187307564bd35d | 8ad79a9df9a37073bf8e5d07058268e6 | 删除id为1的用户数据 | sqlStr := "delete from user_info2 where id =?"
result, err := db.Exec(sqlStr, 14)
if err != nil {
fmt.Println(err)
return
}
affectdRows, err := result.RowsAffected()
if err != nil {
fmt.Println(err)
return
}
fmt.Printf("delete data success,affected rows:%d\n", affectdRows)
} | 0 |
3582f9d1e68ca38a7651c619feea35f8 | 571792e20db7580016770cda4882697e | It uses the default error message for "Bad Request". | namespace WebPryton.Controllers
[Route("api/[controller]")]
[Produces("application/json")]
[ApiController]
public class UserController : ControllerBase
[HttpGet("badRequest")]
public ActionResult GetUserBadRequest()
{
return BadRequest("User bad request");
} | 0 |
5d502a439ac19127a457a6436a0b6137 | 0385c6c3aae9b125259dbaf2c22362a0 | Validates the clock path. Checks whether the source clock of the clock path
is enabled.
CY_PRA_STATUS_SUCCESS For the valid input configuration.
CY_PRA_STATUS_INVALID_PARAM For the invalid parameter. | {
static BYTE xdata ucCounter = 0;
WORD xdata usCDRClk = msRead2Byte(REG_16B6) &0x0FFF;
if(bPathEnable)
{
if(_mhal_mhl_CheckClockStatus(usCDRClk))
{
if(!GET_MHL_SYSTEM_PLL_POWER())
{
msWriteByteMask(REG_01C3, 0, BIT6);
SET_MHL_SYS... | 0 |
986bc801db99e4b6aae45179a3fbc5aa | 566e7eec89e3f6bd6508207ae72d3d0e | アニメーションクリップを追加します。 (レイヤー0 へ追加されます) | [System.Serializable]
public class Uni2DSpriteAnimation
public void AddClip( Uni2DAnimationClip a_rAnimationClip )
{
if( a_rAnimationClip != null )
{
int iClipCount = this.ClipCount;
for( int iClipIndex = 0; iClipIndex < iClipCount; ++iClipIndex )
{
if( a_rAnimationClip == m_rAnimationClips[ iClipInde... | 1 |
4171c1d0f3817edd996679f64a155de6 | 32bbde6bcd824ba63782e9db68cc3134 | whenever the file input element changes, parse the file the user selected | {
const tempReader = new FileReader();
const currentFiles = evt.target.files;
tempReader.onload =
function(event)
{
tspReqBuffer = event.target.result;
parseTSPReq();
};
tempReader.readAsArrayBuffer(currentFiles[0]);
} | 1 |
174889a73961ff96ca169c445a76a621 | 1ae73bc5fe0a5e4ab6ab1bcec5ce30d8 | This method was generated by MyBatis Generator. This method returns the
value of the database column TRSDEAL_PROMISSORY_FX.BANK_AMOUNT | public class TRSDEAL_PROMISSORY_FXVO extends TRSDEAL_PROMISSORY_FXVOKey
public void setACTUAL_PROMISSORY_DEAL_AMOUNT(BigDecimal ACTUAL_PROMISSORY_DEAL_AMOUNT)
{
this.ACTUAL_PROMISSORY_DEAL_AMOUNT = ACTUAL_PROMISSORY_DEAL_AMOUNT;
} | 0 |
9cb9c26a0c3f1a53f2513f6b69cf2a21 | 89ce14bec0c25ab1b4c87d7da111b67c | Creates new patterns according to given parameters | function addPattern(mKey)
if mKey == 0 then rollingShutters(getRandomSide(), 2, 0, 0, 0, false, bRandom(1, 2), 20)
elseif mKey == 1 then alternatingCurveCage(getRandomSide(), 2, 0, 0, 0, false)
elseif mKey == 2 then fracAccWallRing(bRandom(2, 3), (index / 2.0) * cFlip, 0, 0, 0, false)
end
end | 1 |
01b42dcb283d1484f605d73b36c0b2ae | 1b9dbef55356484415c7b3209b20ef9e | Scope a query to only include enabled rooms. | class ChatRoom extends Model
public function scopeEnabled($query): Builder
{
return $query->where('enabled', TRUE);
} | 1 |
64b560cb21db2812fcd3ce74a887ef96 | 6a99ac9432581b7acc57ee2dfe0143f5 | 根据id删除灯光 | public void delLightInfo(String expId); | 1 |
7574a03f8eae0075545d7708df29a52a | 8797364cf052c92ee9bf41ad218da10a | The MSP ID of the member that created the transaction | export class EventSubExtensionBitsTransactionCreateEvent extends DataObject<EventSubExtensionBitsTransactionCreateEventData>
get userId(): string {
return this[rawDataSymbol].user_id;
} | 0 |
0821d88fb1ccc31d57b2f5662400ad49 | 5b1340998642abf9fe3d9e295263a805 | Called when the player presses the 'Back' button on the register UI. Switches back to the Login UI | public class FXMLRegisterViewController implements Initializable
public void backButton(ActionEvent event) throws IOException {
sceneChangeToLogin(event);
} | 1 |
3520f34706339e837efbf9475012461c | 1b1fcb7a195baa3946eeeb673d142c62 | 写入最后登录ip 登录时间 | @Modifying
@Query(value="UPDATE IGNORE t_user SET last_date=?3,last_ip=?2,curent_date=?5,curent_ip=?4 WHERE user_id=?1",nativeQuery=true)
public void login(Integer userId, String lastIp, Date lastDate, String curentIp, Date curentDate); | 1 |
bc3efaea816958d3149dfdb58a875013 | c5e01992660cb23eabc1db111faabc1c | Проверяет, дублируется ли телефонный номер в списке | public class AddressBook
public boolean checkNumber(String phoneNumber){
for(String s : contacts.keySet()){
if(phoneNumber.equals(s)){
return false;
}
}
return true;
} | 1 |
76b86f2d6ebbaeb7c301b0e41eb7a2ff | b0b2bff73b0d3289d0c3452520884b67 | 把每个session访问的详细页面写入数据库 | now = datetime.now()
now_time = now.strftime("%d/%m/%Y %H:%M:%S")
mongo_db = conn_mongodb()
mongo_db.insert_one({
'session_ip':session_ip
,'user_email':user_email
,'page':webpage_name
,'access_time':now_time
}) | 1 |
1a79d28ce001a8b73b9e52ad70351903 | 9b80e9c771b4162f6d7f1a43050a7a81 | 한글자를 점자 코드로 쪼개서 리턴함. | if '가' > complete_ko or complete_ko > '힣':
raise Exception("split_gks() got wrong parameter {}".format(complete_ko))
unicode = ord(complete_ko)
initial = (unicode - KOREAN_OFF_SET) // INITIAL_OFF_SET
medial = ((unicode - KOREAN_OFF_SET) - (INITIAL_OFF_SET * initial)) // MEDIAL_OFF_SET
final ... | 1 |
a7cfbd0e1b3c74793982918d40b65649 | 28f05cdc0fcd97ca455d0b689f6b72cd | Get faq statuses as option array | {
$settingsValue = $this->scopeConfig->getValue(
self::XML_PATH_FAQ_GROUPS,
ScopeInterface::SCOPE_STORE
);
return $settingsValue !== null ? explode(',', (string)$settingsValue) : false;
} | 0 |
0bfba5a5aabca9cf623a12af51bd77fa | 670f4f1a9490a2da8ed0e9bc161a6b14 | Handles the Click event of the tsiPhotomatixCommandline control. | {
if( FileOkCommand != null )
{
FileOkCommand.Execute( Dialog.FileName );
}
} | 0 |
d2722861d9781144dc77e089c49d08e5 | ef3ebe561427eecc3852eab0b615b1a5 | 定义一个方法 把一个字符串转换为int类型输出 | public class CommonMethod
public static int changeToint(String string) {
return Integer.valueOf(string).intValue();
} | 1 |
935f3a5c331ff1c2c1e8e6805be34daf | f65f03cdfcc57c0b310a8b42d4d341a3 | 根据查询条件过滤zabbixAgents | List<Object> params = new ArrayList<Object>();
StringBuffer sql = new StringBuffer("SELECT T.AGENT_TITLE,T.AGENT_ID,T.AGENT_TYPE");
sql.append(",T.AGENT_USERNAME,T.AGENT_ISVALID,T.AGENT_PROXYERNAME,");
sql.append("T.AGENT_BEGINDATE,T.AGENT_ENDDATE FROM JBPM6_AGENT T");
Map<String... | 0 |
8e11bff85c37fd0ee7e88b2bcb18e852 | 695e33643a7e92bb5501747561d09012 | Function for mapping integers representing CIGAR operations to their single-character abbreviations | matchTypes = re.sub('[0-9]', " ", CIGAR).split()
matchCounts = re.sub('[A-Z]', " ", CIGAR).split()
matchCounts = [int(i) for i in matchCounts]
return matchTypes, matchCounts | 0 |
db3a0c9b9bd101a1ad182640abc3efc7 | 694a8e30b2b63b82a809f280dbe93ffc | Funcion que genera circulos aletorios de un tamaño dado por constante y que almacena los centros
en el vector de obstaculos para poder usarlos en el grafo. | extern void Init_Circles(Circle *circ, int nc, double base_ray){
double xc=0.5*(g2x_GetXMax()+g2x_GetXMin());
double yc=0.5*(g2x_GetYMax()+g2x_GetYMin());
double dx=0.5*(g2x_GetXMax()-g2x_GetXMin());
double dy=0.5*(g2x_GetYMax()-g2x_GetYMin());
bool flag;
double x,y,r;
Circle *ci,*cj;
int count;... | 1 |
bf3fce10f0f76cb2dbbe082cb14fae08 | 346179e43598669a2acef9dd82e433b5 | Renders value for console output. | class ScalarTypeRenderer implements TypeRenderer
public function render(string $type, $value, array $options): ?string
{
if (null === $value) {
return null;
}
switch ($type) {
case 'int':
return $this->renderInt($value, $options);
case 'flo... | 1 |
40002a14a04c25974eb790ffb1f80119 | 211e253dfb73ca1959e435027b20660e | Create a unique ID for the client using UUID. | class Location
private function generate_client_uuid() {
$this->client_uuid = UUID::generate(UUID::UUID_NAME_SHA1, UUID::FMT_STRING,
$this->client_name);
} | 1 |
52174c6417c165b02a181092ec96ebff | b34e7fe5f33958fa8a73b3e36de66666 | Fonction qui dessine un entier (ici score ou temps) sur le coté de l'écran | void afficherScores(SDL_Renderer *renderer , SDL_Texture *scoreTexture, Score scoreAffichage, int iScore)
{
if(scoreAffichage.frame && scoreAffichage.frame<=SCORE_TTL){
int len, size;
SDL_Rect src, dest;
len = lenNum(scoreAffichage.score);
src = SCORE_SRC;
size = SIZE_SCORE;
dest = (SDL_Rect){SCORE_DEST + ... | 1 |
52f80205f1e219c74aee56d8586f9943 | 80af5698a6f59676b37ce718120adee6 | for text that flows right to left (Hebrew, arabic, or whatever you want) | function makeRTL(val) {
return val.replace(reWords, function(match) {
return '\u202e' + match + '\u202c';
});
} | 1 |
82ac1ad5fbc9d8281ddbbef44fb8ed1e | 86d35425309c7d66009ef48ef2b4782e | Record ID of the health data record this file is attached to. | try {
entity.setHealthRecordId(value);
}
catch(Exception ex) {
hasError = true;
}
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.