query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
4b66917342fbf674172e4a95948a9df7 | 45f6fc7fd168206c95e7245d0cb85660 | function to get static variable welcome | function welcomeToProgram() {
console.log(welcomeMessage);
} | 0 |
07cf17077b96b82cf1608104591ede0f | 007eb9e9a614d50b8fc350e344f64fcd | function will set player name and update database | class Hangman:
def set_player_name(self, player_name='Unknown Player'):
self.player_name = player_name
self.player_id = dbconnect.insert_player_name(self.cur, self.con, self.player_name) | 1 |
c3d32251484b3c5248984227467f4288 | 4461892e2662f912cd0cc0b78fa38ec2 | 返回此方法调用使用的代理. | Object getProxy() throws Exception; | 1 |
d9eab9c5c09794f8dc6eb1fcbcf63792 | 9747430aaef1771c32c69fb6ba4c64e1 | 根据信息将车的状态改为已删除 | int delTbParkCarInfo(Map<String,String> map); | 1 |
58f4bb519ca20de9d91ee12a1cefa7aa | b3659da324a26200626eaa8e0a958631 | Closest points between two OBBs | local obj1Corners = getCornersOfOBB(obj1)
local obj2Corners = getCornersOfOBB(obj2)
local axes = getAxesOfOBB(obj1Corners)
for i,axis in ipairs(getAxesOfOBB(obj2Corners)) do
if table.indexOf(axes, axis) == 0 then
table.insert(axes, axis)
end
end
local minDepth = math.... | 0 |
5ff854c09916e91940859eb7e86ba518 | e34d7793a63f540d9537323882cef3be | 获取给服务器发送命令的结果 | namespace ESTCore.Common.Enthernet.Redis
public class RedisClient : NetworkDoubleBase
public OperateResult<string> OperateStatusFromServer(string[] commands)
{
OperateResult<byte[]> operateResult = this.ReadFromCoreServer(RedisHelper.PackStringCommand(commands));
if (!operateResult.I... | 1 |
e6a01bf8d5f40447c2bef371d7ddf5ae | a8f0d9434567f7d64ec9bbd9905b4036 | Retrieves a list of owned addons for the site in MyYoast. | public function getOwnerList($siteId); | 0 |
e9f425fc741297b58da1a2d5ad06f50b | 61a336d517bb0cb397281a780729d27a | Respond to changes in plugin name | $value = (string) $value;
$parent = $this->getParent();
$plugin_instance = $parent->getContainedPluginInstance();
if ($value && (!$plugin_instance || $plugin_instance->getPluginId() != $value)) {
$plugin_instance = $parent->createContainedPluginInstance($value);
$parent->setContainedPluginIn... | 1 |
e7732b881a4f2a417b0f54ad14b1f14b | 2487a35fe8986bad50ff18c12a2d6847 | This method is called to translate the input name into an appropriate
field name for the structure/record. If the name is already used it
automatically creates an alternate version for the structure. | public String translate(String columnName); | 1 |
5a5dea1caec46825bb094971c0c90f27 | 8bd2a9954d9196c698c83f5decb2fa26 | Creates the highpass filter design and layout | Image make_highpass_filter()
{
Image f (3,3,1);
f(0,0,0) = 0;
f(1,0,0) = -1;
f(2,0,0) = 0;
f(0,1,0) = -1;
f(1,1,0) = 4;
f(2,1,0) = -1;
f(0,2,0) = 0;
f(1,2,0) = -1;
f(2,2,0) = 0;
return f;
} | 1 |
4986a9bae2afb5a116e953f8d63b0ed0 | b6f65591433f8d2b821eba06c47441e0 | 虽然没有声明参数列表,但可以传入任意个数,任意类型的参数值 | def fun(*para):
print para | 1 |
94c7cd9d3726ee5e27e0b266a4e7f5ef | 769a0c841f0a5a004308b0ef5f707994 | Build the GPIO handler.
If a consumer name is provided (which can add more semantic information to
other programs trying to find out who holds a line) then it will be used;
otherwise, the default is opentrons. | this->number = number;
ostringstream s;
s << "gpio" << number;
this->name = string(s.str());
this->path = GPIO_PATH + this->name + "/";
this->exportGPIO();
usleep(250000);
} | 0 |
c46ef75acd0128547cdcb7fe771b08bd | 9f0fa5cdb2fd011ddd101590439ba14a | 도형의 둘레를 리턴한다: 추상 메소드이므로 자식 클래스가 반드시 Overriding 해야함. | public class Rectangle
public void recTotalLength() {
System.out.println("사각형의 둘레는 " + (width*2 + height * 2));
} | 0 |
4e9a709bf463f2778fea47be4b3786e0 | 9169a4d523e55cea8723706630e9010a | Returns the last stack frame, if available. | final Stack stack = (Stack) callStack.get();
if (stack != null && !stack.isEmpty()) {
return (CallFrame) stack.peek();
}
return null;
} | 1 |
2e78c5abacbe3e4a54e3bcec62bc3228 | 1184da7ec3492467ea8e52ecc37eafc7 | Apply multiple functions on a column of a dataframe | def apply_to_column(f):
def wrapper(data, columns=None):
return f(data[columns])
return wrapper | 0 |
e2c5515aa853bea339585d60e4363b2e | 5ed1ebd11a4cddd3d4ec1244d7dfbc66 | Metodo responsavel por inicializar o dialogo | public class AddMesaDialogView extends JDialog{
public void initDialog(){
setActionCommands();
setVisible(true);
} | 1 |
dc31eb5fe1c940cf313ca3c4e833dad6 | f057b013ca3ed6622408d858939ee477 | Area del cuadrado | function areaCuadrado(lado){
return lado*lado;
} | 1 |
3c23629c2db196f6cd49296cd79e79df | 456aa8c67c8a0409a659e13f5c2e45b7 | 读取url上的数据 | class baidu_google_bing(threading.Thread):
def open_url_data(self,url):
try:
req = urllib2.Request(url)
s = urllib2.urlopen(req,timeout=20)
return s.read()
except:
return 0 | 1 |
9e86090b21b693954bb1368a0280321d | 48addb84f804e45b189c2ba5789d5edf | Initialization routine for the right-click context menu for map buttons. | MenuItem menu;
dlgMapDetail dlgMap;
dlgMapDetail2 dlgMap2;
string sMapID="";
int iSortCenterID=0, iClientID=0;
MapTypeEnum eType=MapTypeEnum.MapTypeTerminal;
DialogResult res;
try {
menu = (MenuItem)sender;
switch(menu.Text) {
case MNU_OPEN:
base.mnuLSVEdit.PerformClick();
... | 0 |
6c87636b6b68662f7df7097c723d6ca8 | e6c02cab0d0e6cbf7abfeb50be48e856 | Create a directory on remote SFTP server | {
$storage = $this->getStorage();
$sftp = $storage->getSftp();
if (file_exists($this->composeSftpPath($path))) {
return true;
}
$parentPath = dirname($path);
if (!file_exists($this->composeSftpPath($parentPath)) && $parentPath !== $path) {
$thi... | 1 |
2d27b4d25e224da79b94ad3313f38f4c | f3aee102d129d9ecdcfdcc9b2b450a0e | Sets the transparency of the joint. | class DefaultJoint:
def set_joint_visibility(self, is_visible):
if is_visible is not self.visible:
self.__graphic_obj.visible = is_visible
self.visible = is_visible | 0 |
354680ebb4b2653890b0faeede67efdc | b729a711f0c3f42d4243726ed52888d7 | @brief Unlocks the Fast Program Erase Mode. | {
uint32_t primask_bit;
if((FLASH->PECR & FLASH_PECR_PELOCK) != RESET)
{
primask_bit = __get_PRIMASK();
__disable_irq();
FLASH->PEKEYR = FLASH_PEKEY1;
FLASH->PEKEYR = FLASH_PEKEY2;
__set_PRIMASK(primask_bit);
if((FLASH->PECR & FLASH_PECR_PELOCK) != RESET)
{
return HAL_ERROR;
... | 1 |
1d26fb734efd76813187e7a79668f94b | bb22ba6375079eede378cda4d8e346f3 | Updates an existing Bo model.
If update is successful, the browser will be redirected to the 'view' page. | {
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post())){
$model->updated_at = strtotime(date('Y-m-d H:i:s'));
if($model->save()){
return $this->redirect(['view', 'id' => $model->name]);
}
} else {
return ... | 1 |
7802fd325dd732ad11b02df62f70af9c | 6614af9fba411b102a7678d20ff3c618 | 照合済み伝票データを過去データに登録する | {
using (var context = new BfDbContext(Static.B2Com))
using (var transaction = context.Database.BeginTransaction(IsolationLevel.ReadCommitted))
{
try
{
var headers = context.HacchuHeader.Where(x => x.PrintKubun == 0).ToList(... | 0 |
85763e6fcc06dd6edf77b092a7461363 | 75c176d36bbf784c08559acdda90298e | Проверка требований перка | const int police3MinLvl = 3;
const int police2MinLvl = 4;
if (!PlayerHelper.GetData(player, WorkData.IS_POLICEMAN, false)) {
API.sendNotificationToPlayer(player, "~r~Вы не работаете в полиции", true);
return false;
}
var workInf... | 1 |
c7d6fa1a670ad94601ee992fc8355172 | b382cfbc3b99847d744ed46b686285fa | Prints the cards in the players hands with commas inbetween each of them | player_number = 0
for i in deck:
player_cards[player_number].append(i)
player_number += 1
if (player_number >= player_numbers):
player_number = 0
print(player_cards[0])
print(player_cards[1])
print(player_cards[2]) | 0 |
07a11d868d4b63fa36cefa7788de01f1 | 1c6068c3cba5f6a3a9e2dfb75e8890b8 | Method to clean out the include statements | class template extends nerror
final private function Purge($string)
{
$patt = '/\{\&[a-zA-Z][a-zA-Z0-9\.\_\-]{2,}\}/';
$cIncludes = preg_match_all($patt, $string, $matches);
if($cIncludes != false)
{
foreach($matches[0] as $key => $incMarker)
{
$bits = array('{&', '}');
$inc... | 1 |
dd3f2b53f2e31fd675c59a79d9b292d2 | 94eb6d2f3572ad86fca447a94aa316e7 | Connect qvtk-widget and pcl-visualizer. | {
cv::Mat color, depth;
pcl::visualization::PCLVisualizer::Ptr visualizer(new pcl::visualization::PCLVisualizer("Cloud Viewer"));
const std::string cloudName = "rendered";
lock.lock();
color = this->color;
depth = this->depth;
updateCloud = false;
lock... | 0 |
aac9e2ec04ab312ec0722d5335b64c8a | 7e127781d7c3c8d8af44ad401a319694 | <p>Returns a path to current JVM home folder.</p> | String cp = System.getProperty("java.class.path");
String fs = System.getProperty("file.separator");
String acp = (new File(cp)).getAbsolutePath();
int p, q;
for (p = 0; (q = acp.indexOf(fs, p)) >= 0; p = q + 1) ;
return acp.substring(0, p);
} | 0 |
dea1ee492dd91638af35fbb437f4ea26 | c85d5522a681bce0c496e4901dc334a3 | VIN码识别接口
对车辆车架上、挡风玻璃上的VIN码进行识别 | class OcrClient(AbstractClient):
def VinOCR(self, request):
try:
params = request._serialize()
body = self.call("VinOCR", params)
response = json.loads(body)
if "Error" not in response["Response"]:
model = models.VinOCRResponse()
mo... | 1 |
dd658db32db020aad0be351a72cd49e9 | 3ca3b05afe10bc6bb6e3e3f025735012 | Saas模块管理 | $proj_id = $request->projid;
$data = (new Module())->getByProjId($proj_id);
$proj = (new Saas())->getProById($proj_id);
return view('saas.module', ['data'=>$data, 'proj_id'=>$proj_id, 'proj'=>$proj]);
} | 1 |
2adae79643519dea6340b75dc4f621da | 9c2632345f5f0851d940158d769bac98 | 删除维修菜单内容 | class MenuAction extends AdminAction
public function delete(){
$id = intval($_POST['id']);
$token = $this->get_token();
if ( !$token ) {
$token = 'testtoken';
}
$rt = array(
'success' => 0,
'msg' => '非法提交数据',
'data' => $id,
... | 1 |
ecdb86aa1eab015412bba2cb28593da1 | c264b41a2047b6bb57343a94fbcc44b3 | 通知に応じたFragmentを起動させるためにデータを取得しActivityを起動する | class MainActivity : AppCompatActivity()
fun startFragment(view: View) {
text.text = editText.text.toString()
val bundle = Bundle()
Log.d("TEST", "send Bundle from Activity")
bundle.putString("key", editText.text.toString())
val fragment = TestFragment()
fragment.argument... | 0 |
6beab3d85196e1fffd92880e673e75f5 | f42e317fea5bd68f6bbdccecd0f17b21 | 長時間のメッセージ表示を行う。 | public class VoicCallActivity extends Activity
public final void showLongToast(final String msg) {
this.runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(getApplicationContext(), msg, Toast.LENGTH_LONG).show();
}
});
} | 1 |
cd274582fb5f0cd3a4265472c47cf582 | d9a6be8cc18304b699edaa810a124a0c | 上传商品信息Excel方法 | class Goods extends Controller
function actionUpload() {
include_once(CFG_PATH_LIB.'PHPExcel/Reader/Excel5.php');
$objReader = new PHPExcel_Reader_Excel5();
$objReader->setReadDataOnly(true);
$objPHPExcel = $objReader->load($_FILES['file_path']['tmp_name']);
$currentSheet =$objPHPExcel->getSheet(0);
$allRow... | 1 |
91433b62e686bc30fd4b4916bfaad408 | 6cae1de8d042b010478b8b1451f476f0 | Validation method to check if user has chosen Tables.xml and Reservations.xml files. | public class Validator
public boolean matchFiles(){
boolean result = false;
if(args.length == 3){
if(matchArgument(args[0],"xml", false)
&& matchArgument(args[1],"tsv",false)
&& matchArgument(args[2],"txt",true)){
System.out.println("Th... | 0 |
5a449679e9f4d6962aa34e9b21705a83 | 70e5cbb113efcde5afaf3656922eceae | EASY MODE: Returns a random available square | available = []
for i in range (7):
if board[i] == 9:
available.append(i)
return choice(available) | 1 |
92c4f02f4d6f0960079934bf30850dab | 694ca6f47c5a93d1f31e3a5015927b5c | Retrieve the first available {@link CardDto} (removing it from
the list).
<p>
If there are no available {@link CardDto}s left, this method
will return <code>null</code>.
if there are no cards left. | {
if ( ! $this->hasCards()) {
throw new NoCardsToPlayException();
}
if ($this->cards->isEmpty()) {
$this->reloadFromCaptured();
}
return $this->cards->shift();
} | 0 |
20beef3083644e26be27e724ea3f0be5 | f9942c02d2caa12735cb810958217122 | Get list of images in view format | class ImageController extends Controller
public function index()
{
return Model::all();
} | 0 |
c95fec2c84ac80b1906bc84a80e6236c | d989c86d51d327aff66050349d52edf5 | when something is caught in the AOE of the attack. | public class AttackArea : MonoBehaviour
private void OnTriggerEnter(Collider other)
{
other.SendMessage("Damage", GetAttackInfo());
status.lastAttackTarget = other.transform.root.gameObject;
hitSeAudio.Play();
} | 1 |
4a5da79c6f3fb0be6a98c309ed472d2c | 19a728535c43d60ee13529e70b6e3bbf | Back substitution function, completely serial-based programming. | def computeReverseSubstitution(A, X, b, size):
for i in range(size-1, -1, -1):
X[i] = (b[i] - computeSumReverse(i, A, X, size))/A[i][i] | 1 |
ef0cf087068d8fb6f7c05613acd923ff | e1f972e4615f61e375f6bbd201e6bdbe | !
The number of data entries in the model. | {
Q_D(const QXYSeries);
Q_ASSERT(d->m_x.size() == d->m_y.size());
if (d->m_model) {
if (d->m_mapOrientation == Qt::Vertical) {
return d->m_model->rowCount();
} else {
return d->m_model->columnCount();
}
}
return d->m_x.size();
} | 1 |
9f2991808fab1a6de55badfa350e5809 | e8e4098e52193d08d1e0d639554e9c7f | Get player rankings for a specific location. | class PlayerRankingFacade
public function getPlayerRank($mode, $player_uuid)
{
return $this->resolvers[$mode]->getPlayerRank($player_uuid);
} | 0 |
2e9909d0fc79a27e474fd7b7a6f0b1b4 | eb5efad4e262925702786e2b9b4af2f7 | This ensures that the script has loaded and that the page has finished loading so everything is available | public class DownloadUserReportToExcel
@BeforeMethod
public void checkThatPageHasLoaded() {
Assert.assertEquals(Util.IsDOMReady(driver), true);
} | 1 |
8076976dbadd4026f5c09e21db5b4a54 | beb7427fd2497753e332e2ebed3a110c | Change the players name to [name]. Rely on normal replication code
to actually get that information to clients. | public class SessionManager
implements ViewListener
public void setName
(ViewProxy proxy,
int playerId,
String playerName)
throws IOException {} | 1 |
2b25fad0cd04b16b02e1643fff3f3eb2 | 7dabc9a4d7cd441687ae8de667b4a571 | 获取添加引号后的值 | namespace YAME.INI
public class ConfigBase
public static string AddQuotes(string val)
{
return "\"" + val + "\"";
} | 1 |
0fd9598de9709c4906edca265d3ba91a | c3038c3549812fea4b3b82446ef064aa | Check that there's not another reservation for same room in same range of time and the same room | @Service
public class ReservationService
public boolean isVacant(Long rid, Date date, Date startTime, Date endTime) {
Long count = rRepo.countAlreadyBooked(rid, date, startTime, endTime);
return (count == 0) ? true : false;
} | 1 |
934131cdf3c727c92160aa55ddef04d1 | ab1fa296638d23b29f94142f5068746a | 获取指定句柄对应的字段信息 | class SimpleDAO{
static public function getFieldInfo(QueryInfo &$sumary, $i): object|bool
{
return mysqli_fetch_field_direct($sumary->result, $i);
} | 1 |
be3a1b7fe196a50402afaa22cb598a94 | 11360c6a7bc1be809adb2ff05004de97 | 加载对象DDL | @Query(value=DbmsMetadata.GET_DDL_NO_SCHEMA, nativeQuery=true)
public Clob getDDL(@Param("objectType") String objectType, @Param("objectName") String objectName); | 1 |
7019da13f992ae28199bf0132045b60c | 4a558905ec28b0476911ef585b350325 | Get a word from specified address, adjusted for little endian.
Consume 2 cycles. | {
return static_cast<u16i>((rb(addr + 1) << 8) | rb(addr));
} | 1 |
2d4b5d4ca6816e47f5cc6ad807dd312a | 333d5fa7022864a818d64becc68e8d49 | Remove a reader thread, from the list of threads reporting their
quiescent state on a QS variable. | class SelectReactor(posixbase.PosixReactorBase):
def removeReader(self, reader):
if reads.has_key(reader):
del reads[reader] | 0 |
0ec84e204fdcf561f6022e4205a81bc2 | fa22abe3b2860aff1ba778a5a96c9431 | Выбросить исключение, если кэш неисправен. | class ErrorHandler
private static function salvageError (ErrorException $e)
{
if (TEST === true) throw new QoException($e->getMessage());
} | 0 |
0ab7f4288d34d6fc22c547496d972daa | fd9205b12f40f35d02dfdcfcb843ac09 | Returns a range of all the candidates where companyId = ? and groupId = ?.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first resul... | long groupId, boolean processed)
throws com.liferay.portal.kernel.exception.SystemException {
return getPersistence().findBygp(groupId, processed);
} | 0 |
c2a5c0bfacf58ff59244aa9d4ea84a85 | 7e48856c64ee674dd24506fe36e5014c | Return playerCharacter list's size. | public class CharacterMap
public int size() {
return characters.size();
} | 0 |
7eb6af1a113f8b13a17438e367944c54 | 0e07f7008b25108720d0fa48d35d5108 | Списывает голоса со счета пользователя на счет приложения. | class ContestMember
public function addVote(ContestVote $vote)
{
$this->votes[] = $vote;
$this->votes_number = $this->votes->count();
return $this;
} | 0 |
38cf0fe97a75523ca726ab62027ddf0e | 3d64cfb396fb3c6e494fd512a6c58f97 | creates a <xsd:simpleType> tag | String qName = getXdefTypeQName(xdefType);
if (qName != null) {
_xsdDoc.addDocumentation(contextElem, xdefType.getTypeString());
_xsdDoc.setType(contextElem, qName);
return;
}
Element sTypeElem = _xsdDoc.addSimpleTypeDecl(contextElem, null);
addXdefTypeToSType(xdefType, sTypeElem);
} | 1 |
ed1e395ff8e79783130187d0450ab151 | 7d51910ded0ee1dfcdba7501dcd35c04 | Prints information about the last move did in the current match. | public class Board
public void printnextmove() {
System.out.println(nextmv);
} | 0 |
c2027407971b585554b1b3066ac23f43 | 53353b8da771c1398adcbf9c56bfbc80 | Checks or unchecks the Quick Notes Report Checkbox | {
if (!reportPanel.activeInHierarchy) {
reportPanel.SetActive (true);
} else {
reportPanel.SetActive (false);
}
} | 0 |
f42db938b4d323d25dad10ffe8d2dcaa | 5c83c93898a5aa80c75a0f91fc8ba83d | Maximum number of LSP sync can be sent per interval.
Returns:
obj(ixnetwork_restpy.multivalue.Multivalue) | try :
self._maxclient = maxclient
except Exception as e:
raise e | 0 |
f38de15027b1340e745073bf50039ada | 7bd550f447a255b3845c0ea91c112a8c | \brief Processes View Scene command | static void processStoreSceneCmd(const ScanValue_t *args)
{
scenesSendStoreScene(determineAddressMode(args), args[1].uint16, args[2].uint8, srcEp,
args[3].uint16, args[4].uint8);
} | 0 |
e3a0d6e8d0dc2b4f21020c0a1ff44474 | 80ea39bfa36b0ffcca2d64719b8b67ba | Returns the Log of a specified number (Use Math.Log() instead) | public Builder Log(double @base)
=> Log((IExpression)new Number(@base)); | 0 |
f8c9a7ae6225670b5cdca2d20c2a8061 | 5c6baa36fad1191817723f2471d8d2c0 | # Funciones para Eliminar duplicados en fila/columna y para crear grilla completa de datos | row.vars <- all.vars(formula[[2]])
col.vars <- all.vars(formula[[3]])
data <- data.table::as.data.table(data)
data[, row__ := .GRP, by = c(row.vars)]
data[, col__ := .GRP, by = c(col.vars)]
if (is.null(fill)){
fill <- 0
} else {
}
rowdims <- unique(data[, (row.vars), with = F... | 1 |
9162d47ec483056076538a1c991ab473 | b9fa5ef4bff144492b1c01a0e3d78299 | 根据网关应用id获取全部环境列表 | def env_list():
pro_id = request.args.get('proID')
response = EnvM().get_env_list(pro_id)
return response | 1 |
f4cabca9da428018e26387982d0b1afd | 94e43e31cacc75230e3b115adef4209f | 弹出前面的元素 | E element = elements[front];
elements[front] = null;
front = index(1);
size--;
return element;
} | 1 |
7e53e5571f296ad180c95cf5b19fa05c | 0c6acefff6f109b32f36c923e1d74eb7 | Takes a list of UpdateExpressions (or just a single UpdateExpression) and
compiles it into a single dict containing the necessary keys to send to
DynamoDB | table = self.tables[kwargs['TableName']]
update_expr = kwargs['UpdateExpression']
for attr_key, attr_value in kwargs.get('ExpressionAttributeValues', {}).items():
update_expr = update_expr.replace(attr_key, str(attr_value))
table.update_item(kwargs['Key'], update_expr) | 0 |
55b9535dada0d1e26f33e18f4ed7194c | 5231031b05ce342e5bbc5ceb52cc1f82 | 根据帖子id创建回复 | func createReply(reply *Post, post *Post, user *User) (err error) {
setPostDefaultValue(reply)
reply.PostParent = post.Id
reply.AuthorId = user.Id
reply.AuthorName = user.Name
err = db.Create(reply).Error
if err == nil {
post.ReplyCount += 1
post.LastReplyAt = time.Now()
if err2 := db.Save(post).Error; err2... | 1 |
5ffd9a93843a84a6b2185c8cc85c6637 | 57f089e9719fc49e8d822cfae536e7f7 | Specify that the field may not be empty. | public abstract class Field
public Field permitEmptyValue () {
this.emptyValuePermitted = true;
return this;
} | 0 |
4f5c05c357a8c3aacb083469bff290dc | 1b20cce925b63d07a340693ebdefbd66 | Gets the y value for the last row of the grid. | public class MetaGrid
public int getBottomRightY() {
return bottomRightY;
} | 1 |
814ee1514039c28b7436e993626783d9 | a56029f8b75350ca06aa05557e2fe694 | 隐藏输牌标记 | void HidePlayerCard()
{
for (int i = 0; i < 2; i++)
{
for (int y1 = 13; y1 < 19; y1++)
{
gotoxyGame(x + 8 + (12 * i), y + y1); cout << " ";
}
gotoxyGame(x + 10 + (12 * i), y + 21); cout << " ";
}
for (int y1 = 0; y1 < 9; y1++)
{
gotoxyGame(x + 40, y +14 + y1); cout << " ";
... | 0 |
3756b3c6198d87e627aa2657b32ab03f | 8aeed10da1ead477b8d52ebf015aaa57 | 删除上架图书信息(商户) | SqlSession session = sqlSessionFactory.openSession();
try {
iBookInfoMapper = session.getMapper(IBookInfoMapper.class);
iBookInfoMapper.updateOutStoreBook(bookInfoBean);
} finally {
session.commit();
session.close();
}
} | 0 |
b09ab3e496488407fbbe0615e7b1fd53 | 56e0f693674044d0bdd93e17020b079c | Returns the node with the id
If no node exists with that id, than null is returned | class Graph
public function getNodeById( $node_id ) {
return $this->nodes[ $node_id ] ?? NULL;
} | 1 |
7d59dc0f3184a63ae2a8342d67de0c2b | a6bebe4604ddeaad2cc81bcefd9682cf | Deletes given file from the database | class File:
def delete(self, conn: database.sqlite3.Connection) -> None:
conn.execute('DELETE FROM files WHERE file_md5=?', (self.file_md5,)) | 1 |
853ac680fb9746330cf82bf66d0c4eaf | 60d849e75b977186cbb3bb71473be187 | 传入ReadFile()处理文件后返回的列表,返回关键词的个数 | def word(f):
w = re.compile("[a-z]+", re.I).findall(f.read())
print("Word number is ",len(w))
f.seek(0, 0) | 0 |
4677311b34a01979b694294b6b0a6122 | 17c905757ec38a3594408830e46e1d00 | ERASE MARKS | textbox = event.widget
textbox.tag_remove("mchar", "1.0", "end")
begin = textbox.index("insert")
coords = textbox.index("insert").split(".")
if int(coords[0]) >= 1:
begin = str(int(coords[0])-1) + "." + str(int(coords[1]))
begin_plus_one = str(int(coords[0])-1) + "." + str(int(coords[1]) + 1)
textbox.tag_add... | 1 |
8638b8f87df65a76f35c0821ae7f719d | c8ffadda8e234c454b00f97bc9869081 | ensure autobuilding is turned off | AHouseBuilder::AHouseBuilder()
{
PrimaryActorTick.bCanEverTick = true;
SetActorTickEnabled(false);
} | 1 |
36f4a0a77ab0e6a20e917f0053b368a1 | b30676d1ccf7519f09eb5a51aa40d831 | This method return a list of the string which match the given
regex. | self, regex: Union[str, Pattern[str]], replace_entities: bool = True
) -> List[str]:
data = self.get()
return extract_regex(regex, data, replace_entities=replace_entities) | 1 |
4b8dae97daab6fcb2a9d66db78d087fc | 6059aea04e845ed0855dff4ff65f4cd6 | Returns the keyword wich is the current token | public class ArgumentLexer
public String getCurrentToken() {
return currentToken;
} | 1 |
9d34165fc7015e4cb36739abd65ac73f | 84efcd4ae4fe2dee24d6fcc986319a6d | 迭代 DFS 从出发点到终点的所有路径 | class Solution
void DFS(vector<vector<int>>& grid, int x0, int y0, int x, int y, vector<vector<int>>& path)
{
path.push_back({x-x0, y-y0});
int k, nx, ny;
for(k = 0; k < 4; ++k)
{
nx = x + dir[k][0];
ny = y + dir[k][1];
if(nx>=0 && nx<m && ny>=0 &&... | 0 |
59f4cbc084122c2aba55f72048889f54 | e4e830f32df8dca70b812c95a8e8a1e5 | Metodo para mostrar que boton esta seleccionado | function selected($comidaOb, $num){
if($comidaOb->get(3) == $num){
$aux = ' selected="selected"';
}else{
$aux = '';
}
return $aux;
} | 1 |
36c6c3f254a101dc53265ddbfe40381f | 1359b8caf2f00d8c22a743b624d862e6 | Check the times of both players and determine the winner. | {
lock (this)
{
if (!playerOne.IsPlaying && !playerTwo.IsPlaying)
{
switch (playerOne.Status)
{
case PlayerStatus.FiveCards:
if (playerTwo.Status == PlayerStatus.Fi... | 0 |
f7074d5bed0b89ec0c779931cd5afc7b | 66be05b07b4a24f44f66a978d4b6e217 | Sets whether the display is allowed to sleep while the program is running.
<para>Display sleep is disabled by default. Some types of input(e.g.joystick button presses) might not prevent the display from sleeping, if display sleep is allowed.</para> | namespace de.unika.ipd.grGen.grShell
void PreventComputerGoingIntoSleepMode(bool prevent); | 0 |
ae988895c42b2fecf37798e27d8c876a | 70421e52fd286784fd276b0e3270482a | Register SIGINT handler. | def worker_init():
signal.signal(signal.SIGINT, signal.SIG_IGN) | 0 |
052f713297f7cd6e352cce1ff18277aa | f6407330139c15f544ab3b34ee6cc615 | 获取bucket下指定路径的文件集合 | String bucketName = param.getBucketName();
path = StringUtils.trimStartSlashes(path);
String fullPath = StringUtils.trimStartSlashes(StringUtils.concat(param.getBasePath(), path, ZFileConstant.PATH_SEPARATOR));
List<FileItemResult> fileItemList = new ArrayList<>();
ListObjectsReq... | 1 |
6fb47e0aa7376bb6aebfe5f1825fdf3a | 391ff306460ee2105764d0abc80b9c10 | 跳转到登录页. | public String toLogin() {
logger.debug("to login page!");
return "login";
} | 1 |
aa31966336e5551ce6f67d1a3cf4c326 | 01a0fc306761c88350752fba51154b15 | Overridable method, invoked when the document is being opened. | namespace innovoCAD.Bentley.CONNECT
public class IWizardImplementation : IWizard
[CLSCompliant(false)]
public void BeforeOpeningFile(ProjectItem projectItem)
{
} | 1 |
3da6fea40dc0017ca744e74117a2e3c5 | 125f6fa7750d1f7acb6e68a29d9632ad | RunUptimeChecksDelete deletes an uptime check by ID. | class HealthChecksApiClient
async deleteCheck(uuid) {
this._checkInput([ uuid ], [ uuidSchema ]);
try {
const options = this._getRequestOptions('DELETE',
`/api/v${this.apiVersion}/checks/${uuid}`);
return await this._performRequest(options);
} catch (err) {
throw this._handleError(... | 1 |
cebca58053b1dd0d7a5fdc0a5d99d68f | fe3495dc6e37ee631cf02d79ccf4e78c | 補充予定数(<code>PLAN_QTY</code>)の検索値をセットします。 | public class PCTRetrievalOutParameter
extends OutParameter
public void setPlanQty(int planQty)
{
_planQty = planQty;
} | 1 |
7f2fa72560d1dcdee7c20826c0b97c3f | d5484cfecaa2157a4db3a18161491619 | 获取正在运行却没有URL的notebook | book = self.w['left_frame']['notebook']
try:
return book.children[book.select().split('.')[-1]]
except KeyError:
return None | 0 |
1fc7ba3979a462b620c2e44e4b4b1331 | ea89f3f31b1c36fa38d1885d5c20608c | Funkcja rysująca Trójkąt Sierpińskiego | if(order < 0){
throw "Invalid number.";
} else if(order == 0) {
window.drawLine(0, 0, 0, 0);
} else if(order == 1) {
drawTriangle(window, x, y, size);
} else {
drawSierpinskiTriangle(window, x, y, size/2, order - 1);
drawSierpinskiTriangle(window, x + size/2, y, s... | 1 |
98d8170c71f89d3f2c95a15a347ff4c0 | 978c562a2718cea93f3b377d759e707a | Run the void saveProperties(String,Properties) method test. | WoofLoaderSettings.contextualLoad((context) -> {
context.notLoadExternal();
this.doSystemPropertiesTest("/property", "DEFAULT_OVERRIDE", "OFFICE.Property.function.override",
"SYSTEM_OVERRIDE", WoOF.DEFAULT_OFFICE_PROFILES, "test", USER_HOME, this.userHomePath());
return null;
});
} | 0 |
1a1bdb8429f0f1ff8c02f0c489c1664a | 28c2d37e6598b03b858ca6dac4e907a8 | Replace parameterized nonterminals with specialized copies.
For example, a single pair `nt_name: NtDef(params=('A', 'B'), ...)` in
`grammar.nonterminals` will be replaced with (assuming A and B are boolean | class Symbol:
def substitute(self, r):
self.cleanup()
self.n.cleanup()
self.p.insert_after(NonTerminal(r))
if not self.p.check():
self.p.n.check() | 0 |
17d46aff770f305752f6ac465766fc05 | cd5fb44cfd82b3dda8646ddb47d3c6f7 | this method is to get the id of the last promo added to promo's database | db = getReadableDatabase();
String str="";
cursor = db.rawQuery("SELECT _id FROM " + TABLE_NAME + ";", null);
cursor.moveToLast();
str += cursor.getInt(0);
cursor.close();
return str;
} | 1 |
2849930237aac2dc2d82e4f736175680 | 56e3df6ffa2044785f0fa04f083594d2 | Return the current state, the reward and terminal status. | class FirstOrderEnv(gym.Env):
def _get_state(self):
ob = [self.TOTAL_TIME_STEPS - self.curr_step]
return ob | 0 |
70c75112ef7700d97052971278b9de2e | 385d746ea7319e4dedc6c33f20a4bfb5 | 자유게시판의 내용을 삭제할 수 있게 해주는 기능. | @Controller
public class FreeboardController
@RequestMapping("/freeboard/freeboardDelete")
public String freeboardDelete(HttpServletRequest request){
freeboardService.freeboardDelete(request);
return "redirect:/freeboard/freeboardList";
} | 1 |
41ab37b124b2a3635b1e15dd4345bca0 | 689b9d5f412d6eb1b6daa2866eec1f01 | 同步服务端素材到本地数据库 | String token = getAccessToken();
NewsRequestDto in = new NewsRequestDto("news", 0, 10);
String response = restTemplate.postForObject("https://api.weixin.qq.com/cgi-bin/material/batchget_material?access_token={1}",
in, String.class, token);
... | 1 |
2d8ad05aa7f5542fb1b2f39bb1336b40 | 6e4d2b815d297cd5f7698894f5292f61 | Operations to perform after snapshotting a virtual source. | class SpectrumGroup(DataGroupBase):
def post_source_function_hook(self): | 0 |
3609743f39c3032d510d145dbc3719e5 | acfbeec778d8c427608bafd36fd8fcf4 | 滚动中处理函数 | if(scrollDirection==1){
console.log(1);
if((document.body.scrollTop-229)%(height-71)!=0){
document.body.scrollTop+=1;
}else{
clearInterval(clock);
}
}
if(scrollDirection==-1){
c... | 1 |
18e7b4c5bbb6ba57f54a07ee0b76b33b | 944cf03012c4f21c2b64ea10c58d68d8 | 移除指定的 Fragment 的回调监听 | void remove(T fragment); | 0 |
bf61d893eefc60b873464ecf5de730b3 | 02a483a8b0f3e7b815dd1f137d86b982 | <para>「選択可能な値のリスト」についての情報を取得します。</para> | namespace WodiLib.Sys
[Serializable]
[EditorBrowsable(EditorBrowsableState.Never)]
public abstract class FixedLengthList<T> : ModelBase<FixedLengthList<T>>, IFixedLengthCollection<T>,
ISerializable
public IEnumerable<T> GetRange(int index, int count)
{
var indexMax = Count - 1... | 0 |
e46f53545024ece9aa4aca765aecd7c1 | 26a6e3c85a7248add76b3faf6b6fefb8 | 加载宝贝库存信息 | namespace Zodo.Assets.Website.Controllers
[WeixinUserFiler]
public class WeixinStockController : WeixinWorkController
public JsonResult Load(int id, int stockId)
{
var result = _service.LoadDto(id, stockId);
return Json(result);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.