query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
61144684b2ee0dc09e725ee70cad2e5f | 40b778c140f6d73e79d07b49a590bea1 | Dictionary containing all available AOVs. | def getShadingGroupAOVMap(nodeAttr):
nodeAttr = str(nodeAttr)
lastIndex = -1
nextIndex = 0
nameToAttr = {}
idx_list = cmds.getAttr(nodeAttr, mi=True) or []
for i in idx_list:
_a = '{}[{}]'.format(nodeAttr, i)
name = cmds.getAttr('{}.aovName'.format(_a))
if name:
... | 1 |
6f45f71a10dff3d4cfa0e9449bf88c5a | b4a55d5a47f1f85dce1323c1e7a1e758 | ---METHOD TO ALLOW THE USER TO VIEW THE CHART AS A BAR GRAPH--- | class mygraph
private function bar($mydata) {
$keys = array_keys($mydata);
$data = array_values($mydata);
$b2plot = new BarPlot($data);
$b2plot->SetFillColor($this->bar_color);
for ($i = 0; $i < count($mydata); $i++) {
$targ[] = "bar_clsmex2.php#" . $i;
$a... | 1 |
567a34acf671b5f6fda512ef67d06fc8 | 2ad3e628aba643051cafe36f2c867375 | 返回结果: | def function(a, b):
……… | 0 |
2d61a9892c4a28a5af67b751dce87925 | 9ffc7edbbc7bfcb709133c0c94e7f2c0 | Check filename prefix. | rstr = ".*" + prefix + "([0-9]{5})" + filetype
regex = re.compile(rstr)
_fname = os.path.basename(fname)
r = regex.search(_fname)
if r:
return int(r.groups()[0])
return None | 1 |
aba4adc5cd90a70cbc656bb33680fc31 | bc530b9351591cc1037d52f13891cabf | Sets per-process limits on POSIX (Linux) systems | struct rlimit rl{};
rl.rlim_cur = (config.timeout / 1000) + 1;
rl.rlim_max = rl.rlim_cur;
setrlimit(RLIMIT_CPU, &rl);
rl.rlim_cur = config.max_memory << 10;
rl.rlim_max = rl.rlim_cur;
setrlimit(RLIMIT_DATA, &rl);
rl.rlim_cur = config.output_size << 10;
rl.rlim_max = rl.rlim_cur;
... | 1 |
3ac7c59aa0c0219c168a394ebf3c7f07 | db9c753af8eaf959d016f66e32add8aa | A wrapper around the 2nd single line text getter dialog | class GetText:
def __init__(self, name, resultidx=0, dataidx=0, silent_fail=False):
self.name = name
self.resultidx = resultidx
self.dataidx = dataidx
self.silent_fail = silent_fail | 0 |
2fccee9c0c296c0db3dd2ec4890e2265 | 1eb9aec44f83a4e8a12da95ca440e951 | Changes the status of InputManager | public class GameModel extends Observable
public final void enableInput(final boolean enable)
{
manager.enableInput(enable);
} | 1 |
49cd8b21742ee420b428c66b99e59def | f128f6fafb8816f3f38c923e53defadd | Sets new mipmapping mode for the sampler | export class PVRTexture implements ITexture
public set useMipmap(flag: boolean) {
this.texture2D.useMipmap = flag;
} | 1 |
35dcb6ac2325ddddf90570888b5e1f53 | d5359f433c6b019c9f1d00c7822323a1 | 获取cup的序列号。 | {
var disk = new ManagementObject("win32_logicaldisk.deviceid=\"c:\"");
disk.Get();
return disk.GetPropertyValue("VolumeSerialNumber").ToString();
} | 0 |
8e0afcc1347d1182c514834f44c47b72 | 7b1c69abe45a4419f5275cf133a6d375 | Запускает новый тест и возвращает html результатов теста | class Controller_UnitTest extends Controller
public function action_index()
{
$this->request->response = UnitTest::factory()->run();
} | 1 |
abea52169d11f8a684b3f2deda6d5585 | fb33edd055cae0eb1abdc140f5cc8f3c | Init catalog data for update. | def init_catalog():
return controller.init_catalog() | 1 |
5b75556f526124fd109413f691bffe7c | 2a57fb5ad1ec4156f25a6f0aba9a21ce | 删除主键值为sid的角色对应的所有页面权限(供更新页面权限时使用) | public boolean deleteRole(int sid) {
Role role=roleDao.findOneRole(sid);
roleDao.deleteEntity(role);
return true;
} | 0 |
085f4f6e43a9d69fa0c1aef20d747b6d | 77e0bf03d7ff8048856af4053374c343 | Asynchronously waits for a condition to be true for specific object in certain time frames | namespace UnrealM
public static class ActionSequenceSystemEx
public static ActionSequence WaitFor(this Component id, Func<bool> condition, Action action)
{
return id.Sequence().WaitFor(condition).Action(action);
} | 0 |
5aba0101a443836a29af61c4ad8ffc8f | e45114555591f794486db457266d2e4d | QuatGetAngle gets the angular distance between two unit quaternions | {
double *q1 = p1->q;
double *q2 = p2->q;
double dir1[3] = { 1, 0, 0};
double dir2[3] = { 1, 0, 0};
quat_rotate (q1, dir1);
quat_rotate (q2, dir2);
double norm2 = 0.0;
for (int i=0;i<3;i++)
norm2 += pow(dir2[i],2);
norm2 = sqrt (norm2);
double norm1 = 0.0;
for (int i=... | 1 |
701d6ccf4c3f0a50d9bb742fc3e026a7 | 9db9c66a9d2e0b416a63a94480ff3c85 | AES-128 GCM Decrypt and Verify | GCM_AAD_LENGTH = 16
GCM_TAG_LENGTH = 16
GCM_NONCE_LENGTH = 12
key = base64.b64decode(key)
cipherText = base64.b64decode(source)
aad = cipherText[:GCM_AAD_LENGTH]
nonce = aad[-GCM_NONCE_LENGTH:]
tag = cipherText[-GCM_TAG_LENGTH:]
encMessage = cipherText[GCM_AAD_LENGTH:-GCM_TAG_LENGTH]
cipher = AES.new(key, AE... | 1 |
95b5adf80b067c191185c59ce8f19f42 | 1c454ba5b111cf38276bbd95643cdbd6 | Set the First Input Sequence Number (component 9) from a Long object. | public void setF9( Integer value ); | 0 |
53d2d3aeda78d741daba25d07330156b | b9f17de7f4778823f0dda55826a80768 | This function verifies that StopCapture directives without dialog request ID work in @c State::RECOGNIZING. | namespace alexaClientSDK namespace capabilityAgents namespace aip namespace test
TEST_F(AudioInputProcessorTest, expectSpeechNoDefaultNoPrevious) {
removeDefaultAudioProvider();
ASSERT_TRUE(testExpectSpeechWaits(WITH_DIALOG_REQUEST_ID, VERIFY_TIMEOUT));
} | 0 |
08d929441fc78db2c85c5c6456b2e9de | fb72955076082392ea4247877624cf9a | 获得设备最新的一条事件! | @Controller
@RequestMapping(value = "alarm/log")
public class AlarmLogCtl extends BaseCtl
@SuppressWarnings("unchecked")
@RequestMapping(value = "newAlarm", method = RequestMethod.GET)
public @ResponseBody String newAlarm(HttpServletRequest request, HttpServletResponse response) {
String sql = "select al.id,al.devi... | 1 |
c53d00338ae8e51a948a4c6ca91e79d3 | 754e7612eb74cda1df96fae6bca23a1b | Starts handling the touchpad. | {
var device = Ultraviolet.GetInput().GetPrimaryTouchDevice();
if (device != null)
{
touchCursorTrackers = new CursorTrackerTouchCollection(this);
device.TouchMotion += touch_TouchMotion;
device.TouchDown += touch_TouchDown;
... | 1 |
ac05b3d9323ba74168782100620ba95d | b012eeb5578c05b31f797f8a5e57a927 | Kivesz egy kártyát a kézből. | public class GameBoard
public int removeOneKorgool(int holeIndex){
return holes[holeIndex].removeOneKorgool();
} | 0 |
41a40d003dbed55397e76ccb948ba2d9 | 0458331ff0bdaa0497a0d0cbb4e9cd07 | @brief To move background to the right. | {
switch (direction)
{
case RIGHT: case ALL:
if (backgroundX < 1920) backgroundX -= 0.1;
else backgroundX = 0;
background.setTextureRect(sf::IntRect(backgroundX,0,1920,1080));
break;
case LEFT:
if (backgroundX > 0) backgroundX += 0.1;... | 1 |
58e1362527d56c2df079ca87656cf979 | 651d2608798aaf51fd754c7ac1154b39 | Create an instance of SampleCreateRequest from a JSON string | public static function createFromJson($json); | 1 |
8f9e08b6bd2af4360be6ad5cfe62faae | b6b6ad2b937a67dcdb0b180e33cea803 | Sum of components | class V3
double total(void) {
return this->x + this->y + this->z;
} | 1 |
6caf74cede9bb9387ef779f484f52c66 | c54e996c725d202fd694eb61d13a4d79 | Gets the amount of tokens to withdraw of the delegator | class ApiInstance:
def get_delegator_total_incentive(self, address, validator_address=None, from_epoch=None, to_epoch=None,
chain_type='WAN'):
message = self._new_message("getDelegatorTotalIncentive", chain_type)
message['params']['address'] = address
if val... | 1 |
8c651f1155cf96e350a7108d061d92d3 | 32ba53e4848341caefdcdc628a009a9b | HarrisParams doesn't have a mask field | class HadamardFeatureMap(_FeatureMap):
def get_param_dict(self, x):
return {} | 0 |
d8b12617e0d38987488579d3e3052bff | 10b1de5911b473be21d29cab29e6853d | Change number of columns used for line numbers | namespace Isis
void ImageImporter::setLines(int l) {
m_lines = l;
} | 0 |
1576c4ab96cf6ec96dab4cbdd55f3d55 | 55d3251a7e4830fac23ca2c48519a0e1 | Returns the max radius param. | public double getMaxRadius(); | 1 |
396bcbaa1a6ddced314496302e83f952 | 2c36e33b9787a8257273290dedac22ac | This function returns true if the TEA5767 is in Search Mode. | {
uint8_t ack;
uint8_t status;
i2c_Start();
i2c_SendByte(I2C_ADDR_SI4730_W);
ack = i2c_WaitAck();
i2c_SendByte(0x01);
ack = i2c_WaitAck();
i2c_SendByte(0xC0);
ack = i2c_WaitAck();
i2c_SendByte(0x05);
ack = i2c_WaitAck();
... | 0 |
9a0e9d8a7b6a558ed5e407d3d43031be | 574b4c84d57bc9b74240aef4a5d21d0f | 18b20写数据 | void ds18b20wr(uint8 dat)
{
uint8 i;
for(i=0;i<8;i++)
{
dq=0;
dq=dat&0x01;
dat>>=1;
delay(8);
dq=1;
delay(1);
}
} | 1 |
0075dc3918d9a72c4d2269c344f03b6e | da081e1c4ef2f5db37862abc1c84985e | Return a `str` version of this Firewall object. | class FirewallRule
def to_s
to_hash.to_s
end | 1 |
4cddd3ab2ec5de0d73ea8399b60cf402 | 0463fd3f438a2a0147c1104836cd2c2b | Add a word to the DB. If word already exists, it's popularity may be enhanced | function add_word_local(word, db) {
var stmt = db.prepare("REPLACE INTO word_list VALUES (?,?,?)");
stmt.run(word.word, JSON.stringify(word.explain), word.times);
stmt.finalize();
} | 1 |
c7b8433cf73509e24a3ad2fa32b933af | 624daab06b270012709ecc9aa90edaf9 | 智能标签foreach 查询 (id List集合查询) | @Query("select t.id, t.serialNo, t.name from Tag t where t.id in ?1 order by t.id")
List<Object[]> findTerseInfoById(List<Long> ids); | 1 |
a18ce541fb9ea7c12f191ce1b0800fdd | e676234cefd2327a1d348946bf08f4a4 | Take the http result of a transmit and raise an error, or return the body
of the result when valid. | function unboxResponse(body, next) {
loadResponse(body, function(err, reply) {
if (err)
next(err);
else if (reply.isSuccess())
next(null, reply.getBody());
else {
var fail = reply.getError();
next(new Error(fail.getName() + ': ' + fail.getMessage()), reply);
}... | 1 |
08e6d7b042c81f83109cb594e108e322 | 0f0d5fee9151ac66154744def14657b8 | keyboard control of arm | {
if (joy1Btn(5))
motor[armMotor] = 40;
else if (joy1Btn(7))
motor[armMotor] = -30;
else
motor[armMotor] = 0;
} | 0 |
b0186dee82513438c7cfe74e1212bc06 | 6982b4299fa411a23d8095902cb09e19 | Метод для закачивания информации пользователей из Firebase Database | public void run() {
currentUser.getReference().child(Chat.CHAT_REFERENCE_PATH).addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(@NonNull DataSnapshot snapshot) {
DatabaseReference reference = database.getReference(Chat.CHAT_REFERENCE... | 1 |
4582062082eb5940412ed44f37b58ce9 | a202e9f21d68b04b20ad6e203597e2aa | GCJ02 转 WGS84
火星坐标 转 GPS坐标 | public class MapUtils
public static double[] GCJ2WGS(double wgLon, double wgLat) {
if (outOfChina(wgLat, wgLon)) {
return new double[] { wgLat, wgLon };
}
double dLat = transformLat(wgLon - 105.0, wgLat - 35.0);
double dLon = transformLon(wgLon - 105.0, wgLat - 35.0);
... | 1 |
272f45971e758a624d7010d63aa195c7 | 7c0f59cf14109545b70d9a634aa30c13 | Calculates n-th percentile at a given vertical level for a given time period. | namespace Razensoft.Trade.Pine
public abstract partial class BuiltinFunctionProvider
public virtual PineSeries<float> percentile_linear_interpolation(object source, object length, object percentage)
{
throw new NotImplementedException();
} | 1 |
76df3c98d7f6dce71d0508b9aecc8dc4 | 680758e6bb1667fe9f69625ccbc0604e | This method takes one line of notation and validates it.
<p>
<b>Example:</b>
<pre>
1. Jc3d5 h2xg3V+
2. a2a4+ Vc2c6
</pre> | public boolean isValid(String s) {
boolean isValid = false;
ExpressionParser parser = new ExpressionBySpaceParser(s);
try {
if (parser.hasNext() && romainNumberValidator.isValid(parser.next())) {
if (parser.hasNext()) {
parser.next();
... | 0 |
2c0fa42b9d262e4b63d765335ca534d8 | deb7376b5b36e1dff991d6ad35706f1f | Get a work by id Returns the work identified by the specified id. | namespace Fantabulous.Core.DataAccess
Task<Work> ForIdAsync(long id); | 1 |
22a67235a876ceb7a340640a01e34075 | 424383c946b251de6c54413cd5e99052 | 函数功能:进程读错误信息槽函数
函数参数:无
函数返回:无 | {
QByteArray output = process->readAllStandardError();
QString str = QString::fromLocal8Bit(output);
ui->textEdit->moveCursor(QTextCursor::End);
ui->textEdit->insertPlainText(str);
} | 1 |
af31730bb7256fb8123e873bb6000a2f | 143f663e0586f4f2385f20b30e4e45b9 | Reverses an array between two indices. | if (array.length == 0 || array.length == 1) {
return;
}
checkArguments(array, startIndex, endIndex);
for (int i = startIndex + 1; i <= endIndex; i++) {
insertIntoArray(array, startIndex, i, reverse);
}
} | 0 |
53f4fd2f5722091ee5de6d36bfd78613 | e53657332157d09f4407bffad49b6acb | Verifies that the Transparent Data Encryption values match the expected values | namespace Sql2.Tests.ScenarioTests
public class Sql2ScenarioTest : TestBase
private static void VerifyTransparentDataEncryptionInformation(string state, TransparentDataEncryption tde)
{
Assert.Equal(state, tde.Properties.State);
} | 1 |
a6f15d132f7143fdeda3906eb0f38a94 | 2992eaef23e2ab7db96d233f8d872602 | Constructs a rotating `Transform` from an angle in radians. | let pi: Scalar = Radians::_180();
self.rot_rad(angle * pi / 180.0)
} | 0 |
4690c52948d412aeea01676511e9e799 | 492152b04f637fb163e6eb12b44672c1 | Confirms that the player is ready | {
if(selectedFollowers.Count == 3 && !playerReady)
{
readyButton.SetActive(true);
} else
{
readyButton.SetActive(false);
}
} | 0 |
b1429c3e8df8410372b7e589df5aadd1 | e8f45d3c39bcb8c77175988dfc19f1bb | Automatically populates the URL field on CKEditor after
a successful upload. | class ExtLinkEditor(ComboEditor):
def addDroppedUrl(self, urlText):
self.setEditText(urlText) | 0 |
8ff050e6f1fffe77fe05522bb9e489eb | 54c8528b2072ad868b33f52741f336bb | Make one grid of points from n different 1d grids. | linspace_args = (np.linspace(*arg) for arg in args)
meshes = np.meshgrid(*linspace_args)
dimensions = map(np.ravel, meshes)
tuples = zip(*dimensions)
return list(tuples) | 1 |
5370b718ac9a13297c8ea251090ec8cb | ec5ad7202f661645e7a6557813112868 | Getter for <code>dev.LABELS.MODIFIED_BY_NAME</code>. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.6.1"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class LabelsRecord extends UpdatableRecordImpl<LabelsRecord> implements Record10<byte[], String, String, String, byte[], Timestamp, Stri... | 1 |
32409175ef8b947ff4d19fae33048cfc | 2a3debad671d8a06f05d0f24abcc14f5 | Fonction permettant de recuperer l'element suivant de la liste | void RetrouverCompletionWindow::suivant() {
pbprecedent->setEnabled(true);
indice++;
associercompletion(completions[indice]);
if (completions[indice+1][0]->toStdString()=="fin") {pbsuivant->setEnabled(false);}
} | 1 |
abb29c502684fded8fe04a58a3ee72bf | 408a958eb62c2624e8bbe720cce4f53c | Get ambry data node associated with given instance name. | Set<AmbryDisk> getDisks(AmbryDataNode ambryDataNode); | 0 |
73d84541e9cbbac53b450dd14e045b73 | edceb18b6da0c8fbb813d251396c4b8e | 根据字母来获取星期 | char i, j;
printf("请输入第一个字母:\n");
scanf("%c", &i);
getchar();
switch (i) {
case 'm':
case 'M':
printf("monday\n");
break;
case 'w':
case 'W':
printf("wednesday\n");
break;
case 'f':
case 'F':
... | 1 |
762d81aa9bc7c3255617ccc3e0d53ea2 | 1728bdbe81c618ab88b42be2c21d0ac1 | 登録したカードを確認する、登録していない場合は空 | class HaveCardList : AppCompatActivity()
fun GetMyCard(){
val NameArray = arrayOf(R.id.Name1, R.id.Name2,R.id.Name3, R.id.Name4)
val HaveCardArray = arrayOf(HaveCard1,HaveCard2,HaveCard3,HaveCard4)
val ImgArray = arrayOf(new1,new2,new3,new4,new5,new6,new7,new8,new9)
val CallArray = array... | 1 |
ba9dc2c1faafbbd9a6a195f3e69eb301 | acb48d763b58f6cf5f9be2e34c3468ce | Remove a list of domains from the black list. | function removeFromBlacklist(domain)
{
setBlacklistValue(domain, null);
} | 0 |
198e5533aca549d1784f95c102ddfeba | 62384c747e58ddf84b3b8efb9165d77c | 判断是否是默认输入法 | public class InputMethodManagerUtils
public static boolean isInputMethodOpened(Context context) {
InputMethodManager inputMethodManager = (InputMethodManager) context.getApplicationContext()
.getSystemService(Context.INPUT_METHOD_SERVICE);
return inputMethodManager.isActive();
} | 0 |
a3591c184ce814edc6cc0b3fa59754f5 | 8a15c6fd12c90ea02979f1b0cd803996 | Given current bounding box and a second one, define maximal bounding box for both | if not bounds: return curbounds
if curbounds is None or curbounds[0] is None: return bounds
return min(curbounds[0], bounds[0]), max(curbounds[1], bounds[1]) | 1 |
d0ca6341332be2599810ea57655077d3 | dcd6f6b2f07f082b8ae757828313800b | 调用命令执行svn diff操作, 返回diff的结果 | args = ["diff"]
if submodules:
args.append("--submodule=diff")
if not stat:
args.append("-U{0}".format(context))
if stat:
args.append("--stat=1000")
if not rev1:
pass
if rev1 and not rev2:
args.append("{0}^!".f... | 0 |
4e8b41443d0ee24a0683cdc9cf5e3b26 | d6db180652ebdc01c97ad36ab80dce75 | 반복문을 사용한 fibonachi 의 수를 구하는 함수 | int fibo(int n) {
int fibo_buffer=0;
int fibo_next=1;
int fibo_3=0;
for (int i=0; i<n;i++) {
fibo_3=fibo_next+fibo_buffer;
fibo_next =fibo_buffer;
fibo_buffer=fibo_3;
}
return fibo_3;
} | 1 |
7abd32f8e32186547e1b25801dfae17b | 33d5798162610561ba04e8bc14990875 | Función que representa el movimiento de los fantasmas | while(p != 1){
pthread_mutex_lock(&mutex);
if(its_your_turn != 2){
pthread_cond_wait(&cond_gen,&mutex);
}
else {
pthread_mutex_lock(&protect);
for(int i = 0; i < FLAITES; ++i){
int x = movimiento(4);
if(p == 1){
... | 1 |
1502647681f3d2eb6edfd67a12e125f8 | c4807a07a4c5e407b098998c768c0020 | creates or overwrites the variable values on the given task | public function setTaskValue($taskName, $name, \Phospr\Fraction $var); | 1 |
16a41b3ee0bf71404313f1c65452f447 | 6106d37b03872bad17a79ab59afb044e | Initiates the editing of the tree node label. | {
if (!_treeCtrl.LabelEdit || _treeCtrl.SelectedNode == null)
return;
_treeCtrl.SelectedNode.BeginEdit();
} | 1 |
760b68c48fe6ae999f84ea888e415d30 | b8af87e571cb8ccab253db06c3735735 | Returns a guest address space structure. | struct addrspace* as_create(void) {
struct addrspace *as = kmalloc(sizeof(struct addrspace));
if (as==NULL) {
return NULL;
}
as->textSegTable = kmalloc(sizeof(struct pagetable));
if (as->textSegTable == NULL) {
return NULL;
}
as->textSegTable->pt_len = 0;
as->textSegTable->pt_vbase = 0;
as->te... | 1 |
90a78a0364c43eb9c76d0e38def26529 | a5d192a469560c4e8795bbd7e5104aa6 | 返回布尔型 大于0也返回true 否则返回false | class AncestorMain
public static boolean isTrue(int num) {
return num > 0;
} | 1 |
84c55a687633b704959968daedb3592c | 41276d701674ee25a44bd1d2707051a7 | Remove possible voltage on output nodes | try:
set_output_current(self, 0)
set_output_voltage(self, 0)
except:
print("An error has occurred.\nPossible reason: method must take a Keithley2400 object")
return "ERROR" | 1 |
d1f937662b89042c97961555cf10e459 | 472749157168186e62da20f1ea880c11 | \brief Sets the equilibrium position for the spring that controls this relaxation.
\author dcofer
\date 3/23/2011 | namespace BulletAnimatSim
namespace Environment
void BlConstraintRelaxation::EqPos(float fltVal, bool bUseScaling)
{
Std_IsAboveMin((float) 0, fltVal, true, "EqPos", true);
if(bUseScaling)
fltVal = fltVal * m_lpSim->InverseDistanceUnits();
else
fltVal = fltVal;
m_fltEqPos = fltVal;
SetRelaxationProperties();... | 1 |
ab40d9a686b21a921dab7781226d5358 | 9149ac2e9c9905e7240942a451ca21b3 | Find whether overread into lead-in and lead-out
is enabled. | bool CRS::hasOver() const { return d->over_; } | 1 |
f6d2bde16182d1b93bb12fd1b75c9a0b | 188a5a1dbc2237b3ac52975e9b4adf21 | For Filling AccountSubGroupName dropdownlist | {
string sql = "select distinct BankName from Banks,Account where BankId=BId";
SqlConnection thisConnection = new SqlConnection(Properties.Settings.Default["FFMSConnectionString"].ToString());
thisConnection.Open();
SqlCommand thisCommand = new SqlCommand(sql, thi... | 0 |
a4dde04949b7e3e0e37fb45f4f8e1f5c | 795d1b86d6eb0da04652b75a0020a2be | Sets line in template file where error has occured. | namespace Utopia
void Parser::Context::setErrorLine(size_t errorLine_)
{
this->_errorLine = errorLine_;
} | 1 |
cba9e3c2513156a781664c2de757b8b7 | a12713e6f5bd8bf7b21e8f9302a3f3df | 현재 퀸이 놓아진 위치에서 모든 가능한 방향을 칠해준다. | for (int i = 0; i < SIZE; i++) {
for (int j = 0; j < SIZE; j++) {
if (maze[i][j] == QUEEN) {
markAllDirections(i, j, THREAT);
}
}
}
} | 1 |
fbc463a54a9ee101578a2ec812abe332 | a52151c4af03a2ff4837daf038b147b9 | 获取签到WiFi列表 | class WifisignsucModel extends Model
public function search($pageSize = 20)
{
$where = array();
if($username = I('get.username'))
$where['username'] = array('like', "%$username%");
if($nickname = I('get.nickname'))
$where['nickname'] = array('like', "%$nickname%");
$signtimefrom = I('get.signtimefrom');
... | 1 |
97f1adef31c618c391b95cfc1c33f69b | d15eb68ca7cd5409ec8aa982449bf745 | Retrieves all children of a specific parent element. This includes all model elements that are reachable
from the parent element through the embedding relationship. | namespace Nexus.Link.Libraries.Crud.PassThrough
[Obsolete("Use DependentToMasterPassThrough. Obsolete since 2021-08-27.")]
public class SlaveToMasterPassThrough<TModelCreate, TModel, TId> :
ICrudSlaveToMaster<TModelCreate, TModel, TId>
where TModel : TModelCreate
public virtual Task<IEnumerable... | 1 |
c9c8b4e53cb7f8767b24ea639050273d | 55e17ebba0ebab6773b21155c5ac706d | The number of control points per v-iso-curve. | class FnSkin(afnskin.AFnSkin, fnnode.FnNode):
def numControlPoints(self):
return pymxs.runtime.skinOps.getNumberVertices(self.object()) | 0 |
d7dc1f00c75a36b5beaf2ff532383bda | 246ee739a3d556ad14aae679e343411b | Retorna o header para acesso a API | class Api():
def create_header(self):
return {
'Content-type': 'application/json',
'x-api-key': API_KEY
} | 1 |
93f82dbb31b8f943077f28d7db0605fc | ad50b87c0083406fbe8d28a4616c03b7 | @brief Clear the CTR_TX bit | void ClearEP_CTR_TX(uint8_t bEpNum)
{
_ClearEP_CTR_TX(bEpNum);
} | 1 |
a8ea743098878b99a6d69ffb8f02061a | 8ec2dec4f0638d010f31cca70a7ea681 | Test radian to/from degrees conversions | public class UnitTests : GameObject
private void testDegToRad()
{
float deg = 180f;
Console.WriteLine("DegToRad works?: " + (Vec2.Deg2Rad(deg) == Mathf.PI));
} | 1 |
f86cf8c31b36503af99a9100c0cd70d0 | c9c84462f90636866d99df6fad25d739 | Find a line that starts with the given prefix. Differences in white
space are ignored. Raises a ValueError if not line matches the prefix. | def _find_prior_matching_line(line_number, pattern):
testName = None
while line_number >= 0:
line = vim.current.buffer[line_number]
if pattern.match(line):
testName = pattern.match(line).groups(1)[0]
break
line_number -= 1
return line_number, testName | 0 |
20f61b359130a3e804c22557f6045b3f | 4977730d98cc0db8822d1c70aa0e8067 | Compares the <see cref="DateTime"/> to see if it is greater than the specified <see cref="DateTime"/>. | public static partial class DateTimeExtensions
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsAfter(this DateTime dt, DateTime toCompareWith) => dt > toCompareWith; | 1 |
b76dc08d0bdffab42a5f719c26361997 | f506d0b5080f7ea8bac8046cb41c7ca0 | Used only with command line input. Gets the command name that was used
on the commandline | function parseCommand() {
if(argv[0]==undefined){
return "";
}
return String(argv[0]);
} | 1 |
db6931904a1051cdf085080a3be3d1a3 | b3e16520dfc640463ac7f9539c7585c4 | Create a new Gateway with optional global user and password | function Gateway() {} | 0 |
d497da4d5b6125ddbb9cc2bc6645111d | b7f27502e3c22223b2583e9524606e17 | Sets tumblr url. | public function getTumblrUrl()
{
return $this->tumblrUrl;
} | 0 |
de3ec5645e89a699dcaf646df180776e | 0ef14fbf67a740a2189bbd685b9ef09a | 设置伤害信息
info长度:2,
0--攻击者方向
1--伤害量 | function OnFightDamageLogic_0(pFightDataParm,pTeamData,iSkillIndex,iTarPos)
pFightDataParm.m_iSkill = pTeamData.m_SkillData[iSkillIndex].m_skillresid
pFightDataParm.m_CdTime = pTeamData.m_SkillData[iSkillIndex].m_timecd
pFightDataParm.m_iSkillIndex = iSkillIndex
pFightDataParm.m_iSkillType = pTeamData.m_SkillData[i... | 0 |
e1a4cff4d9eb279a03958a5552d4aded | c78dc573343265896e4f78e005cade10 | Returns the number of days to the end of the current week | function getRemainingDaysInWeek(beginningDate) {
var day = beginningDate.getDay();
return 6 - day;
} | 1 |
df3d5d87c8c9e4a6aadda1f7ead2a73e | 7d1790d9ee8db1151c8ae7e2d9e13c8c | Generate cache control value | class BlobProperties
public function getCacheControl()
{
return $this->cacheControl;
} | 0 |
97c48353c4de647e1f5db8a4332e55b6 | 7deca6027b996cceeab71c6b44f45d38 | Configures the tax rule repository. | namespace ReceiptModule
public static class PromotionActivityRepository
public static void SetRepository(IRepository<PromotionRuleItem> repository)
{
_repository = repository ?? EmptyRepository<PromotionRuleItem>.Current;
needFlush = true;
} | 0 |
714796d8942a5d996505d51bfc39e51b | 3e71587fde75dc55bb53f342fcdb5931 | Sets a flag in the page directory entry (PAGE TABLE). | void set_page_directory_entry(address_space_t *addrspc, void *vaddr, void *paddr)
{
u32 pde,index;
pde=VADDR_PDE((u32)vaddr);
index=GET_PE(1023,pde);
addrspc->pd[index]=(u32)paddr;
} | 0 |
74e0e06016e5e72997e6b91b955e8b16 | d005b22ca3841ff76935f951db10cd7f | Get the first interpGrid of type g | public class SpecDataComp
public String[] formatInterpolatedLookup( int xg, Plot plot )
{
return ((SpecData)spectra.get(0)).formatInterpolatedLookup( xg, plot );
} | 0 |
425fd57c0c04a53870126c5128235073 | 5ac3fddf527f3930545540e85cb3eaf8 | 根据店铺获得评论,按时间降序排列 | public ResponseEntity<List<Order>> getStoreCommentList(@RequestParam("storeId") Long storeId) {
try {
List<Order> oder =this.orderService.getStoreCommentList(storeId);
if(oder!=null&&!oder.isEmpty()) {
return ResponseEntity.ok(oder);
}
return ResponseEntity.status(HttpStatus.ACCEPTED).body(oder);
... | 0 |
98d08371a10fcdb63ec95cf0ad2a9290 | a8ca8ff2a5428ff3437388eda2ab1c01 | 将对象转换成Boolean类型,默认为false | public final class CastUtil
public static boolean castBoolean(Object obj, boolean defaultValue){
boolean value = defaultValue;
if (obj != null){
Boolean.parseBoolean(castString(obj));
}
return value;
} | 1 |
41024c351882caa21d83d17fdfabe15e | ec56c9e23faf4ae4386ea52c79cb4eb5 | Get hospital admission level data. | data getAadlData(); | 0 |
fe28a805f56651bcfde20f6df6811e00 | 0fe180a305f54f7c043384b3ae24fab2 | construct a choice list for all managers | {
global $managedBy;
$actualAdmin = $_SESSION['id'];
$admins = getAdmins();
$firstone = "";
$options = "";
foreach ($admins as $admin) {
$name = $admin['lastName'] . " " . $admin['firstName'] . " - " . $admin['email'];
$value = $admin['idUser'];
$selected = $managedBy == ... | 1 |
50c12fee8543517b8d6eb75512254edb | 18571434729d1ce7acc64bf11c368da1 | 写入代码块 | def add_code(p):
n = open("Book_code.txt", "a")
n.write(p+"\n")
n.close() | 1 |
20f91bf1eb2bcd7c9c0c94e51ffd1a66 | 6cb2fec9a81e9cbb0768300fdb5396fd | Finds the average gains, appends them to a list, and returns it | average_gain = 0
list_of_average_gains = []
list_of_losses_and_gains = self.get_losses_and_gains()
for i in range(self.period):
if list_of_losses_and_gains[i] > 0:
average_gain += abs(list_of_losses_and_gains[i])
average_gain = average_gain / self.peri... | 1 |
ae93555c962e53522e36b5549f492c46 | ce32ca6c16fdd0684abf124d91a87117 | 返回文件列表 不包括文件夹 | def getFileList(dir):
allList = [os.path.join(dir, x) for x in os.listdir(dir)]
fileList = [x for x in allList if not os.path.isdir(x)]
if not fileList:
print('no below files')
return None
else:
return fileList | 1 |
8b6f6a9b128a3529f5db7af99db95c6f | c812614cf8eaed525604dc2a6636463f | 初始化服务器根目录的所有目录和文件属性 | {
_webServerWebRoot = null;
_webServerRootPath = null;
_webServerFileRootPath = null;
_webServerFileWebRootPath = null;
_fileServerLocation = null;
_fileServerWebRootPath = null;
_fileServerFileRootPath = null;
_file... | 0 |
9395474ff1ee009dfc7d9e4ddcc9d37b | 0fffc6ea31261b373cbce0db41b39839 | returns the objective value if a primal solution is available | SEXP out = R_NilValue;
double obj_val = 0;
checkProb(lp);
obj_val = glp_get_obj_val(R_ExternalPtrAddr(lp));
out = Rf_ScalarReal(obj_val);
return out;
} | 1 |
f256e2927cb7c20ba8dc5f5a26871c57 | 2768590551eba70176c70483dbaf9665 | creates a parse handler for parsing the properties of a physical operator | CParseHandlerFactory::CreatePhysicalDMLParseHandler(
CMemoryPool *mp, CParseHandlerManager *parse_handler_mgr,
CParseHandlerBase *parse_handler_root)
{
return GPOS_NEW(mp)
CParseHandlerPhysicalDML(mp, parse_handler_mgr, parse_handler_root);
} | 1 |
13590172fbea5a28fabf06edf472274b | 2dd08bf0308087af0432a7c4deadde08 | Outputs wheather or not a piece is present on the given square | present = False
for boat in range(len(fleet)):
if square in fleet[boat]["location"]:
present = True
return present | 1 |
678e2a090567316581927cfd6440e0a5 | c3ef86413a1b2f673d90c24d1aded749 | 是否开通合同管理服务 | public boolean isEdocChushichengban() throws BusinessException {
ConfigItem item = getConfigItem_chushichengban(AppContext.currentAccountId(), false);
if("yes".equals(item.getConfigValue())) {
return true;
}
return false;
} | 0 |
5380e943fd2b7416edc53390b3d6f1bc | e96da6e743615012b226d0c0e9bb7356 | 출근 버튼 클릭 시 근태관리 테이블에 데이터 삽입 | btn.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
ArrayList<String> data = new ArrayList<String>();
System.out.println("입실 들어간다");
int result = JOptionPane.showConfirmDialog(null, "<html><font face="+font+">입실하시겠습니까?</font></html>",
"con... | 0 |
7f92a4b819b287af68bba59c0efad6c1 | 7ff58fd5cc1128acce2f031d80839a1f | Generate JSON feeds. | class GoogleMerchantGenerateCommand extends BaseFeedGenerateCommand
protected function execute(InputInterface $input, OutputInterface $output)
{
$em = $this->getContainer()->get('doctrine')->getManager();
$feedRepository = $em->getRepository('CompoGoogleMerchantBundle:GoogleMerchantFeed');
$... | 1 |
8f3c515fad27221503a73ffd95e3449c | 96249f942de97f9173fcf70e578c3d9b | Create the JSON translation driver. | {
if (!$this->isJsonLocalePresent($localeID)) {
$this->ensureJarPresent();
$dir = $this->getJsonDirectoryForLocale($localeID);
$this->fileUtils->createDirectory($dir);
$this->fileUtils->deleteFromFilesystem($dir);
try {
$cmd = 'java... | 1 |
153403d8b5bc82a7bb4999131e863494 | 59508ae02325cc02e6596dd7383c4224 | 写入查阅记录 | MySqliteHelper mySqliteHelper = new MySqliteHelper(SySearchActivity.this);
SQLiteDatabase wd = mySqliteHelper.getWritableDatabase();
ContentValues values = new ContentValues();
values.put("edit", na);
wd.insert("history", null, values);
wd.close();
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.