query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
bba03467132332bd1560906558593219 | cb87d23940b16bd1d96329f9f6e4640a | Updates Now Playing fragment | self.lastfm.update_now_playing(
artist = artist,
title = title,
album = album,
) | 1 |
f682320da53a68b162eac22c13bc13b9 | 836d2c2defa16dd741afdf3b76a31141 | Paints borders around pieces that must capture pieces | {
foreach (int[,] end in possibleEndLocations)
{
byte colourLoc = (byte)((end[0, 0] + end[0, 1]) % 2);
byte[] backColour = colourLoc == 0 ? Settings.SquareColour1 : Settings.SquareColour2;
if (!Settings.CanHighLight)
{
... | 0 |
345bbf41e1be81de4bab23909326a80d | b728f1ce471f9d976cc35035b6b6ab3c | 本脚本名 | local function script_path()
local str = debug.getinfo(2, "S").source:sub(2)
return str:match("(.*/)")
end | 0 |
ade21963f44f359b177fe202b0c76111 | 242a71967c124b789b70a91c044f5540 | 设置 到达机场. | public class CourseRequest
public CourseRequest setToAirport(String toAirport) {
this.toAirport = toAirport;
return this;
} | 1 |
51c8e73c9e655a4ae762ba6bd221fed1 | 8110c7f31ce2417293bb24e2fa405cde | Демонстрируем показания счётчиков за выбранный период | $userId = $_SESSION['user_id'];
$startDate = new DateTime($startDate);
$endDate = new DateTime($endDate);
$docNumber = 32;
$falseSum = 0; $trueSum = 0;
while ($startDate <= $endDate) {
$documentTimestamp = new DateTime(date('YmdHis'));;
$dayTimestamp = $startDate->format('Ymd');
$INN = 6749387456;
... | 1 |
59be194247a3476190d1be484dc950f3 | bc82016353aa416610dc27fcccdcdf4b | Depth-first search for all vertices reachable from a vertex. | export default class Graphics
dfs(vertex = null) {
return this[_g_i].traverseDirection(vertex, 'dfs')
} | 1 |
39c406e3decec58ecf31ebcafd878e35 | c61364783c2bbc0a1954864274c01ccf | Obtient la liste ordonnée des rubriques dont la rubrique est sous-rubrique | class oktTheme extends oktThemeBase
public function getRubriquesMenuBas()
{
return $this->getRubriques();
} | 0 |
dd6c4f86f113b94d6250aebc6380643a | c950ad988c963c813bb8b940ef547814 | Lấy thông tin của tin bài theo ID | class Blog_model extends CI_Model{
public function getid_blog($id){
$query = $this->db->get_where('blog',array('id' => $id));
return $query->row_array();
} | 1 |
573f8b95df99524b6eb09862c813d5a5 | 9ac344ab3a3d5486f47b2ed709edcb64 | Extract FQDNs (Fully Qualified Domain Names) from a file or stdin. | class DataSources(object):
def _ExtractHostsFromHistoryFile(self, path):
parse_re = re.compile('https*://([\-\w]+\.[\-\w\.]+)')
return parse_re.findall(open(path, 'rb').read()) | 1 |
cc9eef12d1ddcf6807ede4309c375a61 | 2fd14ccf2b2d57591e92318fa1e84ea5 | 查询多天总的展现量和点击量以及其他数据 | {
string sql = string.Format(@"select nvl(sum(s1.reveal_cnt), 0) as showcnt,
nvl(sum(s1.click_cnt), 0) as clickcnt,
nvl(sum(income), 0) as incomesum
from bee.BEE_Rpt_StatByAdvD s1
... | 1 |
52d7425cca965a4ba706d921c1a753b0 | b9c6eb4324982369cdd83129f96707bd | Add the given contract to the player contracts | namespace HeadHunter.Core
public class HeadHunterCore
public void AddHeadHunterContract(ulong steamID)
{
try
{
MyDefinitionId definitionId;
MyDefinitionId.TryParse("MyObjectBuilder_ContractTypeDefinition/CustomContract", out definitionId);
... | 1 |
5afcffbd6d7d990c06c4101127551738 | 506be45f84e0fa5abde9209553ecf538 | Forward a batch of actions to the wrapped environments. | class VectorEnv(gym.Env):
def step_async(self, actions): | 1 |
458e14218c37d5e001173a14ec9c0fcd | 245b916b599f16fc0f3481a8a6e9c58c | Prepend environment variables to a shell command. | class ROS(object):
def _parseBashEnviron(preCommand=''):
command = ['bash', '-c', ('%s; env' % preCommand).strip('; ')]
pipe = Popen(command, stdout=PIPE)
data = pipe.communicate()[0]
env = dict((line.split("=", 1) for line in data.splitlines()))
return env | 0 |
57cd993abee0f25162030ccb2f92be8d | f7eb11e5809b000bfccf5c1c877f362d | Method that returns if the clock is in the default value | {
if (_default == null)
{
return false;
}
else
{
return _default;
}
} | 0 |
bfea315f55b1e5f0ae177a92d1e11c95 | 4243f6a37908fa038240d9480a3081b4 | 新規に遷移してきたかどうかの判定メソッド | public class InputPaymentForm extends AbstractSlipEditForm<InputPaymentLineDto>
public boolean isNew() {
return !StringUtil.hasLength(paymentSlipId);
} | 1 |
a85f4593e871014d108f3d8722a1a92a | a483949383696716d9a628efa2a4baf2 | Runtime configuration options for the Netty container | @Scope(ConfigurableBeanFactory.SCOPE_SINGLETON)
public ProtocolConfig protocolConfig() {
ProtocolConfig protocolConfig = new ProtocolConfig();
protocolConfig.setPort(20880);
protocolConfig.setServer("netty4");
return protocolConfig;
} | 1 |
b9e1cca78af89b327818e737ef7f6d1e | f48b5f61b869d1b78faa2dc20c971d78 | Устанавливает форму оплаты | class Interkassa_Payment
public function setFormAction($url) {
if ($url)
$this->_form_action = (string) $url;
return $this;
} | 1 |
a1b7b4490c948ba08a5b000ffb1bffa1 | 71013b55a923001adf3f52e7021ac5ac | 对 attd_approve_list 的数据分页查询操作 | @Service
@Transactional(readOnly = true)
public class ClAtmService extends CrudService<ClAtmMainDao, ClAtmMain>
public Page<ClAtmMain> findPage(Page<ClAtmMain> page, ClAtmMain clAtmMain) {
clAtmMain.getSqlMap().put("dsf", dataScopeFilter(UserUtils.getUser(), "o1", null));
clAtmMain.setPage(page);
List<ClAtmMain> ... | 0 |
5a6b64fd53ca33064ab24e05913612c8 | 5aa415666f2573a5948e0e1e63134029 | 决定系数R2 | def R2(y_true,y_pre):
y_true = np.array(y_true)
y_pre = np.array(y_pre)
e = y_true - y_pre
g=y_true-y_true.mean()
R2=1-np.dot(e.T,e)/np.dot(g.T,g)
return R2 | 1 |
558236b498a654e4762c88fffd7b4f66 | f082147ec786295b8abdc88db9f84b43 | Asynchronously performs a partial update on a table row based upon the values specified in the object delta. | java.util.concurrent.Future<UpdateItemResult> updateItemAsync(String tableName, java.util.Map<String, AttributeValue> key,
java.util.Map<String, AttributeValueUpdate> attributeUpdates, String returnValues); | 1 |
5cb7e0dc0cd443a222b5b63c8e48d4ad | fc95f38b889be3cad57ba1307a51cafa | Get the Sponsor's ID. | {
$retval = 0;
if (isset($this->data[self::KEY_PARTNER_ID])) {
$retval = $this->data[self::KEY_PARTNER_ID];
}
return (int)$retval;
} | 1 |
33a21f7c21463e4e984ae14c712e24b1 | a9db5895dc5de1bffe94962dcb7e3229 | Finds "docs" with some keyword in some field. | def application_docs_finder(d: dict, tag: str) -> dict:
found_docs = nested_lookup(
key=tag,
document=d,
with_keys=True,
wild=False,
)
print(found_docs)
clean_docs = {}
if found_docs:
for docs in found_docs[tag]:
for key, value in docs.items():
... | 0 |
4cf727644681589394471b1a81951449 | e888f096928dffe2e76b5c95016628e0 | Saves raw file uploaded by user | {
$file = \App\Fields\File::loadFromContent(\base64_decode($raw['baseContent']), $raw['name']);
$savePath = \App\Fields\File::initStorageFileDirectory($this->getStorageFileDir());
$key = $file->generateHash(true, $savePath);
if ($file->insertTempFile(['path' => $savePath . $key, 'key' => $key, 'fieldname' => $... | 1 |
dd29b3e985205ae8a84f1608f3df0ed2 | f90de6d0155ebaa6eff2e657dac366b4 | Indicates whether the model building should happen in two phases. If enabled, the initial invocation of the model
builder will only produce an interim result which may be used to analyze inter-model dependencies before the
final invocation of the model builder is performed.
step. | public class ExecutionModel
public ReadOnlyBooleanProperty parallelExecutionProperty () {
return parallelExecutionProperty.getReadOnlyProperty();
} | 0 |
4a0fbfcb1825ae1194e7a6d49825dee2 | f57b7b0567de8c31986f72155d0a2a00 | указать марке на цель | public class Mark_Player : MonoBehaviour
private void OnTriggerEnter(Collider other)
{
if (other.tag == "Enemy")
{
other.gameObject.transform.FindChild("mark").renderer.enabled = true;
}
} | 1 |
ca6209e24ed0561944a458493aad6150 | bbf7132e2d084afd5291188e60f28aea | nastavi hodnotu odpovedi (text, moznost) nebo prida moznost (pro MultipleChoiceAnswer) | public class TextEntryElement extends ProcedureElement
public void setAnswer(String answer) {
this.answer = answer;
if(isViewActive()) {
et.setText(answer);
}
} | 1 |
a4dc01625cd3dd6df80ddce4676ba083 | d7a61d537d1fc22b479142126ed4ac51 | Returns true, if current period points to whole month | public class JCalendar extends GregorianCalendar
public boolean isToMonth() {
return eqMonth(getNOW());
} | 1 |
0fbe0eb15a8c7f4d6c765b24c8ab6874 | b20dcf6d7d1bbdb4640c8149dd6f52b1 | Function Name: I2CM_Sleep
This is the preferred method to prepare the component before device enters
sleep mode. The Enable wakeup from Sleep Mode selection influences this
function implementation:
component by calling I2C_Stop() if it is currently enabled.
I2C_SaveConfig() is then called to save the component
non-rete... | {
#if(EZI2C_WAKEUP_ENABLED)
EZI2C_backup.enableState = EZI2C_DISABLED;
#else
EZI2C_backup.enableState = EZI2C_IS_BIT_SET(EZI2C_PM_ACT_CFG_REG, EZI2C_ACT_PWR_EN);
if(EZI2C_IS_BIT_SET(EZI2C_PM_ACT_CFG_REG, EZI2C_ACT_PWR_EN))
{
EZI2C_Stop();
}
#endif
EZI... | 1 |
16040eff292390d87a3ebf38517d1c55 | d1a0bbe46f9f69c7abd532df21ef5431 | 測試所有子層註記或取消為測試帳號 | class UserManagerTest extends WebTestCase
public function testRemoveDomain()
{
$em = $this->getContainer()->get('doctrine.orm.entity_manager');
$emShare = $this->getContainer()->get('doctrine.orm.share_entity_manager');
$userRepo = $em->getRepository('BBDurianBundle:User');
$vendor =... | 0 |
ad669292356317de453d79cfe3230780 | 733aef274e80b936578fb6c09df78dbe | Gets all the UI cultures and fill them in the drop-down list. | namespace AS.Domain.Interfaces
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate",
Justification = "This method involves time-consuming operations", Scope = "member")]
IList<string> GetAvailableCultureList(); | 1 |
c4c958240014b24c4d2f07ea815a8c92 | 1ebc229553e92bab25e89cdc6a0d8fef | 设置是否返回主键
默认find或findAll查询中返回主键,以便后续可以用此主键值操作对象 | class Query
public function noPk($noPk = true) {
$this->_noPk = $noPk;
return $this;
} | 1 |
dc74c5d001089225edda0699d43d0d85 | eabd117e660a29f98fa24d2504167ac8 | Returns two lists, where the first one contains answers that would be
lost due to tokenization, while the second one contains wrong answers | result_list = []
correct = []
wrong = []
for a in open(txt_list[1], 'r').readlines():
result_list.append(a[a.index('.')+1:-1])
for i, v in enumerate(open(txt_list[0], 'r').readlines()):
problem_result = v[v.index('=')+2:-1]
correct.append(i+1) if result_list[i] == problem_r... | 0 |
b59e83c7079100a68df88803d7042c44 | 2dff718fdc4a7903607c85163252ad0e | Get the name of the object on which the invocation occurred.
For constructor calls, returns the name of the constructed object.
For static method calls or free-form invocations returns null. | ExplicitConstructorInvocation getInvocation(); | 0 |
2d45b696722f7cf7da35052cdd9174c9 | 8a4cd80ecc18f24c005451da11650e2e | Get a color from alpha, hue, saturation and brightness. | uint8_t const f = (h % 60) * 255 / 60;
uint8_t const p = (255 - s) * v / 255;
uint8_t const q = (255 - f * s / 255) * v / 255;
uint8_t const t = (255 - (255 - f) * s / 255) * v / 255;
switch((h / 60) % 6) {
case 0:
return { v, t, p };
case 1:
return { q, v, p ... | 0 |
118756bb0f9140ae5bfff97ac929816a | 0309e359a798ce72eed12b5269280d76 | 加载失败后显示视图 | public abstract class BaseFragment extends Fragment implements
OnClickListener, IBaseFragment
public void onShowFailed() {
showView(LOADING_FAILED);
} | 1 |
ab563d8019caee09ea91ed9eeddb384e | 1017fa1e6965a37eba17355c84ff3dd2 | Retrieves all employees of tenant | public IActionResult Get([FromQuery] int tenantId)
{
var companies = _companyService.ReturnAll(tenantId);
return new OkObjectResult(companies);
} | 0 |
0e63a947765a3064fdcdfe5f64ad3c30 | d64f5ab0ca3542103e9add23cfe2a651 | Implementing switch to job maintenance functionality | while(1) {
m_nCurCommand = GetCommand();
switch(m_nCurCommand) {
case 1:
AddProcess();
break;
case 2:
DisplayStatus();
break;
case 3:
MoveJobToReady();
break;
case 4:
MoveReadyToRun();
break;
case 5:
MoveRunToWait();
break;
case 6:
MoveWaitToReady();
brea... | 1 |
5a198bce3ad04183bbd3fb533db5f69c | cbd126edad737c3c5b52b8d71dea950b | Fill a dictionary with default values. | result = {}
for x in keys:
result[x] = default
return result | 1 |
29db297b44396536abc5c91c28437407 | 806e8082628180f5200fe65881bad51f | This method gets a copy of the tile-array. | namespace AStarPathfinding
public class Tileset
public int[,] AsArray()
{
return (int[,])tiles.Clone();
} | 1 |
a381ac1d311451cce8123e17a951bef8 | 063d8ba4304de8787b4131d9777c1607 | 设置最大重发次数,默认3次 | if (retryCount < RETRY_COUNT_MIN || RETRY_COUNT_MAX < retryCount) {
return;
}
mRetyrCount = retryCount;
} | 0 |
52379b5c303b1c9d3a4d2e14647766ff | dbd5f90ca35de2a2a772f1ab2b50b022 | 设置踢人回调事件 | public class UIMiniGameDebate : UIBaseMiniGame<MiniGameDebateBean>
public void SetCallBack(ICallBack callBack)
{
this.mCallBack = callBack;
} | 0 |
f8e31d842e5a6f4886aa8434751f778e | eea7825a4fd73106e10cf94c34eaa05e | 선택한 작품들 가져오기 | username = request.session["name"]
user = User.objects.filter(name=username).first()
id = request.POST.get("categoryID")
select = Category.objects.filter(writer=user, id=id).first()
return select | 0 |
5888238c818653c6d5b880bfd91495a3 | 689cf1d40dddb174dcb52b122ab12f92 | This function calls a Lua Script to delete keys prefixed with 'LIMITER'
in block of 5000.
.. warning:: This operation was designed to be fast, but was not tested
on a large production based system. Be careful with its usage as it
could be slow on very large data sets. | struct s_Linda *linda= lua_toLinda( L, 1 );
struct s_Keeper *K= keeper_acquire( linda );
{
int pushed= keeper_call( K->L, "limit", L, linda, 2 );
ASSERT_L( pushed==0 );
}
keeper_release(K);
return 0;
} | 0 |
9b152e19c15295d869fc280d04f5563e | c79de110eaea735fb23af57c228c2991 | Gibt den Spieler zurück, der im Highscore an i-ter Stelle steht, null,
wenn i ungültig
Stelle des Spielers, bei 0 beginnend | public class Game implements Cloneable{
public Player getPlayer(int n) {
try {
return players[n];
} catch (Exception e) {
System.err.println(e.toString());
return null;
}
} | 0 |
29910a4b32afbb52f2df7fc185582901 | b611b1ee6ce7bb2f686a570cdeec7a69 | Determine whether the hand can be split. | boolean isSplittable(); | 1 |
d427fd793ee0279e25516c073def7a4e | 24c95281a06e195ef9986579e33132b2 | 根据品质和字符串,返回相应颜色的富文本 | {
if (subStr.Length <= 0 || !value.Contains(subStr))
{
return value;
}
string valueRich = value;
int index = valueRich.IndexOf(subStr);
if (index >= 0) valueRich = valueRich.Insert(index, "<b><color=" + color.ToHexSystemStri... | 1 |
e8933624d08e8d765c7b5b3515efa567 | 44f6a46d54b37fea3d1a27ee398281f4 | Acción que actualiza la versión activa de un juego. | {
var idGame = Game.obtainFromCookie().getId();
switch(idGame)
{
case 3:
window.location.href = "juego_cataloga_cataloga.html";
break;
}
} | 0 |
0afddae443ce0d8ac1e384614d50f11e | 688331e9ac840750b986f5b23af23ee1 | Takes in 2 ints to find the common divisor. Checks each number going up from one until it hits the smaller of the two values. MaxDivisor keeps updating if a number not one is a divisor. | n1Divisors = []
n2Divisors = []
for n in range(1,n1):
if n1 % n == 0:
n1Divisors.append(n)
else:
pass
for n in range(1,n2):
if n2 % n == 0:
n2Divisors.append(n)
else:
pass
CommonDivisors = list(set(n1Divisors).intersecti... | 0 |
6ec3796c0266ee1983c245dbba6a2e24 | 708a555a5f8f57b0c0d126f3705dcccc | The text that should be shown to the user on the CLI | class ServicePaths implements IService
public getCLI(): string {
return this._cli;
} | 0 |
ccf9e18b06772cf3477c5afe5bf37eeb | b73d9c2c327439520077f0e4a1c1d18c | drops lifted object | namespace Assets.Scripts.PickUp{ public class PickUpScript : MonoBehaviour
private void DropObject() {
_carrying = false;
_carriedObject.GetComponent<Pickupable>().SetDropped(true);
_carriedObject.transform.localScale = _carriedObject.transform.localScale*2;
_carriedObject = null;
} | 1 |
42db83ea0166a623b9b78b666fc442cd | 598c1b28a4be396bc0eccca3f76c70dc | 关闭复活按钮点击事件 | export default class PausePanel extends Laya.Script{
CloseBtnClick(){
Laya.SoundManager.playSound("res/Sounds/ButtonClick.ogg",1);
Laya.timer.resume();
(this.owner as Laya.Sprite).visible = false;
(this.owner.parent.getChildByName("GamePanel") as Laya.Sprite).visible = true;
this... | 0 |
b48b3ed4f09a469f35868a03fa60210b | fe0c20848682dd96fb3776f941ac7b7b | Get possible counts of simultaneous downloads of the same source | @Stateless
@LocalBean
@Path("/download")
public class DownloadRest
@GET
@Path("status/number")
@Produces(MediaType.APPLICATION_JSON)
public String getDownloadStatusNumber(@QueryParam("sessionID") String sessionID,
@QueryParam("startDate") String startDate,
@QueryParam("endDate") Stri... | 0 |
1290f71bf5285907a96f167970ce580c | 504aeb1398451dd65c3d15957e89e37f | Read the properties of a drive object (Drive ifaces) | CETYPE FS_GetDiskProperties(FS_DISK_PROPERTIES* DiskProps)
{
if (FALSE == SDFS_InitStatus)
return CE_NOT_INIT;
if (NULL == DiskProps)
return CE_INVALID_ARGUMENT;
memset(DiskProps->VolLabel, 0x20, NAME_SIZE_8r3);
DiskProps->TotalClusters = SDFS_VolumeInfo.clusterCnt;
DiskProps->FreeClusters = 0;
DiskPro... | 1 |
9ff1cffd60f721a298047722f01bf048 | 895122c731cb86f8ac310e4606e1d854 | 유닛의 아웃라인 출력을 끔 | public class AuthorManager : MonoBehaviour
void TurnOff()
{
tForm.enabled = false;
mText.enabled = false;
} | 0 |
2a1fee6d7fba298d4ab700dcffee6a93 | cf5aef14e41802e4942d6edd10ad7214 | Register payment method integrations bundled with blocks. | if ( class_exists( '\WC_Stripe' ) && ! $payment_method_registry->is_registered( 'stripe' ) ) {
$payment_method_registry->register(
Package::container()->get( Stripe::class )
);
}
$payment_method_registry->register(
Package::container()->get( Cheque::class )
);
$payment_method_registry->register(
... | 1 |
a39d67999a19f2a2794272181796fcc3 | 425359ffb54e4ee20fc59837bb2d1d0d | Tests that create_handle() returns FALSE if error occurs. | def test_no_handle():
clear()
with pytest.raises(error.InputError):
assert auth.auth_register("test@gmail.com", "password", "Firstname", "") | 0 |
3e283c6553484c0ef588983ac7a94ee3 | 7a04084634a7c906074eb5576238f4ef | Constructor of Timezone controller. | class TimezoneController extends ControllerBase
public function __construct(ConfigFactoryInterface $configFactory, LoggerChannelFactoryInterface $loggerFactory) {
$this->configFactory = $configFactory;
$this->loggerFactory = $loggerFactory;
} | 1 |
8f5e71eb7b4d8f071ff530f17f5a6f9c | 5e088279d4d5ebf9352b09f9673f3b68 | Composite widget with buttons to control loading and saving a configuration file. | parent, title, listvar, load_fn, refresh_fn, save_fn,
delete_fn, **args):
(lf, lb, buttons) = create_readonly_file_list_buttons(
parent, title, listvar, load_fn, refresh_fn, **args)
save = create_trigger_button(buttons, 'Save', 'Save current', save_fn)
save.pack(side=TOP)
delete ... | 1 |
7e6ddb31dce7b2daaa1643e903a9bdd0 | a4ba103d3dfd1a0df8531726ca4096cd | @brief Toglea el led de la BluePill | static void ledtoggle2(void){
palTogglePad(GPIOB, GPIOB_PIN15);
} | 1 |
21dced8fb9f10827362d1390de3912df | 73801d33279f0286e0ce6d5110df049b | To replace each blank with its correct answer. Part 2.
Inputs: 'blanks' list, the replaced paragraph that has the correct answers so far, if applicable,
the 'user_answer' for that blank, the index number of that 'user_answer' to correctly match that with the right blank to fill in.
Outputs: The correctly replaced parag... | def is_answer(user_input, string_answers, blank):
blank = blank.split('__')
raw_number = blank[1]
set_index_position = -1
return user_input == string_answers[int(raw_number) +
set_index_position] | 0 |
c44754cb5d8cc219a9d385d5f0b1cae5 | a25fb58276e9ad69e27b397c7c725ad4 | Resets the Grace timer | function setGracePeriod(seconds: number): void {
gracePeriod = seconds
} | 0 |
fe31d408977b9b5fb4e3da4d1725e9b9 | b2c65f4fb26b004467f0e0e443902a7a | Prepare GTBS - Initializes all required to draw scene data | {
getbodies();
getplanets();
getmoons();
lastknownmainbody = vessel.mainBody;
getorbitbodytype();
init = true;
boldstyle = new GUIStyle(GUI.skin.label);
boldstyle.normal.textColor = Color.yellow;
boldstyle.fontStyle = FontStyle.Bold;
bo... | 1 |
508e8561236c77957eb29f0d0d100001 | 866cbcecb511652fddefd20748490367 | Set storage invoice as implemented. | final class StorageRemoveProductInvoiceHandler extends StorageReplaceProductManager
protected function completeOutgoingStorageInvoice()
{
if (!$this->isInvoiceProcessing()) {
return false;
}
return $this->setOutgoingStorageInvoiceImplemented();
} | 1 |
816ffa9b6740099ab3e55395324f5f70 | f64a7bff9c51c2681d44d2e3286eca38 | Gets the detectorId property value. The ID of the detector that triggered the alert. | namespace Amazon.GuardDuty.Model
public partial class Service
internal bool IsSetDetectorId()
{
return this._detectorId != null;
} | 0 |
c3502d9902da0a44370bca3f006be132 | bb3ff6fffb11e88dc4f90643c4534135 | drag from x, y location relative to upper left corner, by distance dx, dy | var _ret_var = Efl.Ui.IDragNativeInherit.efl_ui_drag_page_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), dx, dy);
Eina.Error.RaiseIfUnhandledException();
... | 1 |
4711d49e431a1e14b5c8d8f315485f8a | 4deaec6f1161f210c0d8901fc269d61e | Установка значения флага последнего монстра в волне | public class ExplodeThread extends Thread
public void setFlag(boolean flag) {
this.flag = flag;
} | 0 |
70cd4e3684e32a9c2b5c837bcba82a9a | 1992f2c1b18898da086d4286fd5134f5 | Function to convert {@link LookupItemCriteria} to a {@link Specification} | @Service
@Transactional(readOnly = true)
public class ParentQueryService extends QueryService<Parent>
private Specification<Parent> createSpecification(ParentCriteria criteria) {
Specification<Parent> specification = Specification.where(null);
if (criteria != null) {
if (criteria.getId() != ... | 0 |
cf335002c6d13a27aac908eec4901bd9 | 9f272bc3a352623311c06f5cb4b438f7 | Da de alta a una relacion entre una promocion y una bebida | export class GeneralService
bajarelacion(datos){
return this.http.post(environment.urlserver + 'bajarelacion', datos)
.pipe(map(data => data));
} | 0 |
cf6a90894e22ff154034b84795ad705e | 6735387c72846280a8029bbc11c80ea1 | The function deletes the last move made from the tic-tac-toe game board | global step, matrix
i=0
while i!=2 and len(movements):
step = step - 1
x = movements[-1][0]
y = movements[-1][1]
del movements[-1]
matrix[x][y] = 0
i=i+1 | 1 |
5a9770778682d036af941edaf1dbeaec | 9117e8330e8442f2c270cb8a3c7f187f | Metodo para consultar las propuestas ordenadas por fecha de inicio | public class ProyectoJpa extends JpaDao<Long, Proyecto>
implements ProyectoDao
@Override
public List<Proyecto> getAllOrd() {
return (List<Proyecto>) getEntityManager()
.createQuery("select s from "+ entityClass.getName() + ""
+ " s order by s.fechaInicio asc")
... | 1 |
62294b86e3b96b2f0ce17513fe4a53b3 | 951cf08a4472e362a4079f24908e3ca2 | Возвращает диалоговые сообщения (заголовок, текст, кнопки, индикатор загрузки). | namespace Core
public class CoreFunc
public List<Dialog> GetDialog(Guid message_id)
{
List<Dialog> dialog = new List<Dialog>();
SqlCommand sqlCmd = new SqlCommand();
sqlCmd.CommandText = "dbo.p_get_dialog";
sqlCmd.CommandType = CommandType.StoredProcedure;
... | 0 |
a4d5acdc9accb0e1680cf58438bfad01 | 2ac894238068bb6f49c0688cec494715 | Sets the value of the '{@link uk.ac.glam.wcsclient.gml311.StyleVariationType#getValue <em>Value</em>}' attribute.
<!-- begin-user-doc -->
<!-- end-user-doc --> | void setValue ( String value ); | 1 |
1ba51d9d40128c16d063ebb8fa95e96e | 5cee598d62d66bf48747119d0c2be8d6 | 生成跨项目依赖Job | fun <T : Task> cascadeTask(project: Project, task: TaskProvider<T>) {
if (project.rootProject === project) {
project.subprojects {
afterEvaluate {
tasks.maybeNamed<Task>(task.name)?.let {
logger.info(
"Cascading :${project.name}:${task.... | 1 |
bb78b5d7a1e02ef73d749ad0afe8ac64 | f4687e3430cf3ae7dd123f1b2b39b744 | Returns the meta object for the containment reference '{@link jp.hishidama.xtext.dmdl_editor.dmdl.PropertyExpressionMapEntry#getName <em>Name</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Parameter_referenceName_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_Parameter_referenceName_feature", "_UI_Para... | 0 |
62b2cce64686b87087da3f2448c7a9ec | c0329a66a9024228cd3df3abfe7f0fe9 | Separate a TCP packet into smaller one-message packets
Gets a TCP packet that may contain multiple aggregated OpenFlow
messages and separate it into smaller packets each containing
exactly one message. returns a list. | sessions = []
iso_messages = self.iso_messages
first_sent = None
for i, msg in enumerate(iso_messages):
if msg.src ==src_addr:
first_sent = i
break
if first_sent is None:
return
this_session = ISOSession(src_addr).ad... | 0 |
29c67c64a6f0fe3e77fe510b5640d524 | e9757e74dcc499f04ff840775db2a12d | Method verifies whenever the default password for default user has been changed or not | public void testRequireCurrentPasswordDefault()
throws Exception
{
PasswordPolicy p = DirectoryServer.getDefaultPasswordPolicy();
assertFalse(p.isPasswordChangeRequiresCurrentPassword());
TestCaseUtils.dsconfig(
"set-password-policy-prop",
"--policy-name", "Default Password Policy",... | 0 |
6e80bfaadcfe18cc2ca4f43b18f7c0ad | 64ebe045b8b887acc123fa5696eaed12 | Keep the text box in sync with the dimensions of the host window. | namespace DarkBlueTheme
public partial class DBCopyTextBox : TextBox
private void DBCopyTextBox_TextChanged(object sender, EventArgs e)
{
this.Width = TextRenderer.MeasureText(this.Text, this.Font).Width;
} | 0 |
b26646be8dc29fad881a086be0df29f1 | 6dd42b1f8ac51ffba5d211474e305e8c | If something went wrong, this cleans up the environment | console.log("Time to sleep...",exceptions);
try{
exports.cleanFiles();
} catch(e) {
console.error(e);
}
process.exit();
} | 1 |
745e721a47c502cf648854553fae96b9 | 5d76941d2e2ee31fca3996e31eb327f5 | Функция управления запуском помпы (инверсия или нормальный выход) | static
void sol_Pumpe( sol_out_t *out_p )
{
if( ( out_p->av_sb[SP1] == IO_ZU ) &&
( out_p->av_sb[SP2] == IO_ZU ) ) {
out_p->pu_sb[KO1] = IO_AUS;
}
else {
out_p->pu_sb[KO1] = IO_EIN;
}
} | 1 |
db0bf0f85b4d9fed89fa5baa32c1c02f | 2f88c0bd9a8533c93a68d4970cb404f3 | Returns the length of the string present in the input field of the Search | class SeleniumWrapper(object):
def get_search_string_length(self):
retrieved_text = self.get_search_input_label()
index = retrieved_text.rfind('_')
if index > -1:
retrieved_text = retrieved_text.rstrip('_')
return len(retrieved_text) | 1 |
8e8fc4a845f0bdf635e80286b641751e | 15ac9069672c0eb36a27481c4e593268 | Handles mini-choruses and mini-inscriptions. | var first, last;
var newStr = replaceFrom(this.props.verse, this.props.check.index,
this.props.check.index + this.props.check.word.length, '|');
[first, last] = newStr.split('|');
return [<span key={0}>{first}</span>,
<span key={1} className={"text-primary"}>{this.props.check.word}</span>,
... | 0 |
145a4740d84e0478b57183d2d6f473e6 | 562a14aeee76f3edf62e30fa45542c20 | Method to determine which polygon contains the current point | var leftOffset = $("#left").css("width");
leftOffset = leftOffset.substring(0, leftOffset.length - 2);
var rightOffset = $("#right").css("margin-top");
rightOffset = rightOffset.substring(0, rightOffset.length - 2);
var xCoord = left - leftOffset;
var yCoord = top - rightOffset;
if(xCoord < ... | 0 |
dc1c73f00ad1d8a6b79e4779b3766cfa | 180c96f576ed710f971430fa65725a07 | funcao para zerar o vetor | {
int i;
for(i = 0; i <= SIZE_ASCII; i++)
{
vetorASCII[i] = 0;
}
} | 1 |
bd7e89199370a95e2827dded3a6d3fed | ffe717af5b79c6bd8126a5979b771738 | Transforms min and max vertices,
then gets min and max after they're transformed | void Geometry::getBoundsByTransformedMinMax(
const glm::vec3 &min, const glm::vec3 &max,
glm::vec3 *outMin, glm::vec3 *outMax) const {
std::vector<glm::vec3> points;
points.push_back(glm::vec3(min.x, min.y, min.z));
points.push_back(glm::vec3(min.x, min.y, max.z));
points.push_back(glm::vec3(min.x, max.... | 1 |
39ac85b9de935732115b719dee15cd2a | 5a96fceb7ca7fc3c2d69fdd7cae7696f | 根据关键词匹配简历和公司情况得出匹配程度 | class LaGou():
def check_page(self):
element = self.browser.find_element_by_xpath('//span[@class="salary"]')
text = element.text
a = re.findall("(\d+)", text)
salary_range = [i for i in range(*[int(i) for i in a])]
element = self.browser.find_element_by_xpath('//*[@id="job_detail... | 1 |
8e943bd4b828cdb26d2ccd778ce74a5f | 09538d05a60dc677a0ed862871845d27 | Get accomodations for given users | class My_Houseshare_User extends My_Houseshare_Abstract_PropertyAccessor
public function getAccommodations() {
return $this->_user->_row->getAccommodations();
} | 1 |
7c03e38744d23e8029bbf0b4640d3210 | 3dba62367bda4bd01d7cf50c7d32cb28 | This function removes unnecessary spaces made by the user such as leading and trailing spaces | {
str = removeLeadingSpaces(str);
str = removeTrailingSpaces(str);
return str;
} | 1 |
208e472340488aeaaa49c0d127dd35ac | b844622eafa0aa5bfe62b8d64bb86532 | 获取当前线程的 PCB 指针 | void *
md_getpc()
{
return((void *)DBGREG.srr0);
} | 0 |
e3f0517a69cde8cc284bedb28f1c6b80 | 8c5965352940b23cec20f70838f1ac85 | Move the balls based on their speed and time elapsed. | class Ball():
def update(self, dt):
self.move(self.v * dt) | 1 |
4b66a4c8f3040fd811ceff97b7355201 | 75e6a2bfa1e48f1e235827b6ec1fb749 | Exécuté lorsqu'un utilisateur est supprimé | {
$user = User::find($request->id);
$user->delete();
return redirect()->route('index');
flash('Désolé de vous voir partir, surement à bientôt !')->success();
} | 1 |
43422f35c690dd3b567f1b50325a29ff | e724b12443b74a1cf28345d310fe4028 | GET: Registractions | [ResponseCache(Duration = 3600)]
[HttpGet]
public IEnumerable<ListRegisterViewModel> GetRegister()
{
return _repository.GetRegister();
} | 1 |
eb125ba56db1a0aecff070a6c4a46d07 | 19461fc775d2601ba1763a6b05865c03 | Evaluate the loss value for a given 'net' on the dataset provided by the loader. | def evaluate(model, dataloader, device): | 1 |
0fba7a92c13cecb599b72ece4836bc1f | ccc31f142949d0e780b0b2b60fb651ae | Returns a prototype of a function.
This function returns essentially a normalized version of the function that
is independent of attached instance and only depends on the actual code
that will be executed when this function is called. | public class ScriptFunction extends ScriptObject
private static PropertyMap createBoundFunctionMap(final PropertyMap strictModeMap) {
return strictModeMap.deleteProperty(strictModeMap.findProperty("prototype"));
} | 0 |
ca38b42ceac1ff710f9555ab1bc41114 | f5b1c0c4e5c64b8a6a3e11ab7f4795e6 | 初始化$_model属性 | class MemberController extends \Think\Controller{
protected function _initialize(){
$this->_model = D('Member');
} | 1 |
b466a774cc5790a84bb9e5c4bb61ce5b | 0a942c42eac04622730195b9225a84e0 | Configure the image optimization default config options | {
return [
'autoOrient' => true,
'crop' => false,
'blur' => false,
'grayscale' => false,
'height' => null,
'quality' => 90,
'width' => null,
];
} | 1 |
e6fe6580c4d0fc8142ec9ec721b8d1ec | 18a94aec8dca9d50e306c05dc67e982a | 获取指定时间所在的月的第一天日期 | Calendar calendar = toCalendar(date);
calendar.set(Calendar.MONTH, Calendar.JANUARY);
calendar.set(Calendar.DAY_OF_MONTH, 1);
dayBegin(calendar);
return calendar.getTime();
} | 0 |
1c4ff788e90ce02d8d52db44ef13e88f | 210dcfa1971315934072f14c395c6023 | Get Apollo Graphql server instance | const apolloServer = new ApolloServer({
debug: process.env.APOLLO_SERVER_DEBUG === 'true',
introspection: process.env.APOLLO_SERVER_INTROSPECTION === 'true',
formatError: (error) => {
return new Error(error.message)
},
schema,
... | 1 |
c30aadb290ee947e976d6e58e6ba8a5a | 7f61448ad6da3ef0f9cb03f40c5be655 | #Note, don't need to escape dash symbol '-' | cases like (1) | 0 |
46e01596a6a483232dcd85a491a78454 | 6d852c52f2c38ba682ddc715c9f97178 | 渡された要素がすでにDBへ登録されていないか確認する | var result = true;
var keys = $(tableId + ' tbody input.id');
for (var i = 0, imax = keys.length; i < imax; i++) {
if (keys[i].value === data.id) {
var selector = '#modal_select_member';
Commons.showMessage(selector, {text:Commons.getCommonMessage('E00... | 0 |
f6d11027ab374c2ba8f5a1105d129623 | 0cbf41d0d801ac895adeeb65a9af3994 | Four-channel planar 32-bit signed integer backwards affine warp. | public static extern NppStatus nppiWarpAffineBack_8u_C3R(
IntPtr pSrc,
NppiSize oSrcSize,
int nSrcStep,
NppiRect oSrcROI,
IntPtr pDst,
int nDstStep,
NppiRect oDstROI,
[MarshalAs(UnmanagedType.LPArray, SizeConst = 2)]... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.