query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
6f09e8209092709bba6c6bea19de8d4a | d71b64433ad27c151eff63e6c9f142d2 | If <standard_name> is a loop variable, return True only if it
is appropriate for the phase (e.g., horizontal_loop_extent is okay
during a run phase only while horizontal_dimension is not allowed
during a run phase).
If <standard_name> is not a loop variable, return True | if (standard_name in CCPP_LOOP_VAR_STDNAMES) and (not is_run_phase):
retval = False
elif (standard_name == "horizontal_dimension") and is_run_phase:
retval = False
else:
retval = True
return retval | 1 |
0d760af53c72ee76727fa01a39693b77 | 7e1585f544222df6c02143727ed198e7 | 获取流量券充值虚拟url | @POST("newService/getTaolijinUrl0Buy")
@FormUrlEncoded
Observable<String> getTaolijinUrl0Buy(@FieldMap Map<String, String> map); | 1 |
0e531822513c1949f314c3b89e6ce55c | 4bc674fc87d1072921b6508a5f025f70 | Case2: with promo code | boolean iLoveAmaySIM = false;
for (Product product : products) {
if (!(product.getPromoCode() == null)) {
if (!product.isFreebie()) {
if (product.getPromoCode().equalsIgnoreCase("I<3AMAYSIM") && !iLoveAmaySIM) {
totalAmount = totalA... | 1 |
e8440ad69dfed982aff5f527d1524ced | ecadfe5c2c805708bd1b6fc59efe75c8 | @brief 毫秒延迟,由于SysTick->LOAD寄存器是24位的,所以nms<=16777215*8*1000/SYSCLK
如SYSCLK=168MHz,则最大延时为798ms | void delay_ms(u16 nms) {
u32 temp;
SysTick->LOAD = (u32) nms * fac_ms;
SysTick->VAL = 0x00;
SysTick->CTRL |= SysTick_CTRL_ENABLE_Msk;
do {
temp = SysTick->CTRL;
} while (temp & 0x01 && !(temp & (1 << 16)));
SysTick->CTRL &= ~SysTick_CTRL_ENABLE_Msk;
Sy... | 1 |
1f264e15995469a49d0082d77da2731c | 95a9ee0170f6bfa014871d15244c3251 | 关闭指定dock面板 | namespace HydroDesktop.Plugins.Docking
public class HydroDockManager : IDockManager, IPartImportsSatisfiedNotification
public void Remove(string key)
{
DockPanelInfo dockInfo;
if (!dockPanelLookup.TryGetValue(key, out dockInfo)) return;
var content = dockInfo.WeifenLuoDoc... | 1 |
e7a2bfa6cf92bf1c30d044b0e2c919f5 | 4ca9a2048b9ba516b337b1705b703fe5 | Returns true if there's any page had done. | protected function hasCurrentPage()
{
return !$this->getPageCallStack()->isEmpty();
} | 1 |
34d10271f5e8991516f8f8afbaf48672 | 0752afa9b63e900fbb2f6dcec6832380 | 返回防御塔价值 | int value(const Board &board, int x, int y){
int VALUE[4]={0};
int VALUENUM=0;
int hidedanger=0;
int hideattack=0;
int dx[4]={1,1,0,1};
int dy[4]={0,-1,1,1};
if(board.at(x,y)==-1){
for(int i=0;i<4;i++){
char set[12];
int kk=0;
for(int k=-5;k<=5;k++... | 1 |
0a140dfef7a4909077d825617485f93a | 7a137b56790609c0b552a9e37a10eeb5 | 反加载脚本 | this.load=function(url){
var jslst=document.getElementsByTagName("script");
for (i=0;i<jslst.length;i++){
if (jslst[i].src && jslst[i].src.indexOf(url)!=-1){
this.onsuccess();
return;
}
}
js=document... | 0 |
7928c4385c5afb8be3e3f801f9e54a6f | e28d0fd4192654a0660460c11f22a40a | Sets the data and stores it in the Maya skinCluster node. | cmds.textFieldGrp('skinCluster_nameTFG', e=True, text='')
cmds.textFieldButtonGrp('skinCluster_geoTFB', e=True, text='')
cmds.textScrollList('skinCluster_infTSL', e=True, ra=True)
cmds.textScrollList('skinCluster_wtTSL', e=True, ra=True)
cmds.optionMenuGrp('skinCluster_methodOMG', e=True, sl=1)
... | 0 |
ff23b8a2047f6a6cbf4cb1193ed0828f | 49df36508221e87da18b2d158328444d | Is this atom a Hydrogen atom?
returns
value: 1 if Atom is a Hydrogen, 0 otherwise | if(atomo1 == atomo2 && atomo1 == 1){
return 1;
}else{
return 0;
}
} | 1 |
930f7f35ecf28fbf42174484824a52e9 | 30e81733c5ddab5bf793499ee87dd633 | 13. Ход ПК | namespace CrestZeroProject
class TicTacToe
public void PCTurn()
{
Random r = new Random();
int metka = TryToWin(second, secondCanWin, false);
if (metka < 9)
{
Turn(2, metka);
return;
}
metka = TryToWin... | 1 |
646c4644b886a53370a0fe40a2cbf912 | 6dd70b1eb044fb9d4ea9425d1db7afa9 | Client Area Output.
This function renders output to the domain details interface within
the client area. The return should be the HTML to be output. | class Pronamic_Pay_Gateways_Ogone_OrderStandard_Gateway extends Pronamic_WP_Pay_Gateway
public function get_output_html() {
return $this->client->getHtmlFields();
} | 1 |
10e09e277c1928bcc6997e4c2cf64dfb | 440360b1e51a479140dd29bda8cd1a28 | 如果是大厅启动子游戏,则绑定到启动大厅内场景的命令 | if self._gameApp then
local sceneName = gameConfMgr:getCurrentHallScene()
self._gameApp:enterScene({sceneName = sceneName })
audioMgr:playMusic("hallMusic.mp3",true)
marqueeMgr:changeScene()
end
end | 1 |
0dc4ac8e852cef8985595ff4ef335669 | dbe2038f971a6fc89b8c14c3429af591 | wait a frame for the image to have a size before calculating the new scale | export class ImageStim extends Stimulus
_makeSize() {
if (this._img) this._size = [this._img.width * this._scale, this._img.height * this._scale];
} | 0 |
2005afa08276dc96373cfe7856bc38e0 | cbfc5ea4cba0525b1524b08ef6055156 | Given:
- Pack name.
When:
- Validating pack name does not contain excluded word.
Then:
- Ensure expected result is returned. | class TestPackValidation:
def test_integration_validate_pack_negative(self, mocker):
logger_info = mocker.patch.object(logging.getLogger("demisto-sdk"), "info")
logger_error = mocker.patch.object(logging.getLogger("demisto-sdk"), "error")
mocker.patch.object(
ContentEntityValidator, ... | 0 |
52b30bd8fe1733364ac2f93aaa27eb28 | f2c00e8122f99046d9bddba37187b980 | o metodo abaixo envia informaçoes do usuario atual do sistema para reabertura da tela principal | {
User_Name.Text = String.Format("{0} {1}",usuarioLogado.FirstName, usuarioLogado.LastName);
byte[] Base64Stream = Convert.FromBase64String(usuarioLogado.ImgBase64);
User_image.Source = ImageSource.FromStream(() => new MemoryStream(Base64Stream));
} | 0 |
3d10d6805f1294e659515fd174d40251 | 483e64afc59e5bd791dce8463102380b | \brief devuelve un ID disponible de la lista.
debe ser ordenada de forma ascendente antes de usar. | {
int a;
int length = ll_len(pArrayListEmployee);
int position = length + 1;
Employee* auxEmpleado;
for(a = 0; a < length ; a++)
{
auxEmpleado = ll_get(pArrayListEmployee, a);
if(employee_getId(auxEmpleado) != a + 1)
{
position = a+1;
break;
... | 1 |
090135b8cfbd9fc2cca0428128971f39 | f3439da70e179a5d59f77936c1443668 | Gibt den Raum an der übergebenen Position zurück. | class Room1ManagerAdapter implements IRoomManager,
I08T_SpaceManagerT
@Override
public
Room1 getPlace(String name)
{
return Room1.getPlace(name);
} | 0 |
bff11c5fee715702db13be4f1dbb816e | 662670ee75b66639c23d19176be5df6a | This method will print out the symbol table into a file called "GlobalSymbolTable.txt". | file = open(fileName,'w')
for i in range(len(self.symtabList)):
symtab = self.symtabList[i]
for j in range(len(symtab.symbolList)):
data = "%s\t%4X\n" % (symtab.symbolList[j],symtab.locationList[j])
file.write(data)
file.write("\n")
... | 1 |
614e2a576d90bbd644cef4e012b65ba4 | 407dfb28e91a1512ceda9efc17f734c4 | getPostsCount
Fetches number of posts based on different critera (useful for pagination when combined with getPosts()) | namespace Sheep.Model.Content
Task<int> GetPostsCountAsync(string titleFilter, string tag, string contentType, DateTime? createdSince, DateTime? modifiedSince, DateTime? publishedSince, bool? isPublished, bool? isFeatured, string status,
List<int> excludedAuthorIds, List<string> exc... | 1 |
be17006872a05d65b9f01c353a624705 | b2a18077ed31062d02bacb1d522b67ee | Event spawned when bullet loading starts. | {
Super::BeginPlay();
MeshComp = Cast<USkeletalMeshComponent>(GetOwner()->GetComponentByClass(USkeletalMeshComponent::StaticClass()));
bIsReloading = false;
AmmoInReserve = FMath::Max(MaxAmmo - ClipSize, 0);
AmmoInClip = FMath::Max(ClipSize, 0);
} | 0 |
ae595b0a7041e8f6120b240243d0566b | a3e1f759baeca572d4e0af32175657e2 | Returns a reference to the custom map controls container | @JsType(isNative = true)
public abstract class PluggableMap extends Object
public native Collection<Control> getControls(); | 1 |
627d4335bd68f153424eb56ddcec3b16 | 8085f93d0b108ce04e0a2c6167a6e547 | Kmeans++ algorithm implementation | class CosineMeans(KMeans):
def _kmeanspp(self, X, random_state):
Xp = type(X)(X, shape=X.shape, dtype=X.dtype, copy=True) if sparse.issparse(X) else np.copy(X)
idx = random_state.randint(X.shape[0], size=(1,), dtype=Xp.indptr.dtype)[0]
centroids = Xp[idx]
Xp = self.delete_row_csr(Xp, idx) if sparse.issparse(Xp)... | 1 |
99e5feeb8ecf5c4bf0144ed4cf0092fc | 0a892a453ce6635487dcc325c4e2d3b9 | Method for clicking on the course title | namespace CloudEDU.CourseStore
public sealed partial class CourseOverview : GlobalPage
private async void OverPreRequest_Clicked(object sender, TappedRoutedEventArgs e)
{
TextBlock tappedText = sender as TextBlock;
Grid tappedGrid = (tappedText.Parent as Border).Parent as Grid;
... | 1 |
12cae0902efeae4982dd99cc0a9ba317 | a800c3e4a1d92b611af2e4938fc978ba | helper for generateDents, moves vertex to new inward position | {
VertSlideData *sld = t->customData;
float mval_fl[2] = {UNPACK2(mval)};
float dir[2];
TransDataVertSlideVert *sv;
int i;
sub_v2_v2v2(dir, sld->sv[sld->curr_sv_index].co_orig_2d, mval_fl);
normalize_v2(dir);
for (i = 0, sv = sld->sv; i < sld->totsv; i++, sv++) {
if (sv->co_link_tot > 1) {
float dir_dot_be... | 0 |
0696ee426db6b5ba1bb387f50186aadb | a63bffd655e1dc8f6d7cc07624afe3c0 | Add a binding to the current scope and set the depth for
this declaration. If the name already exists, an exception
will be raised. | if decl.name in self.current_scope():
raise BindException("name already defined in scope: %s" %
decl.name)
self.current_scope()[decl.name] = decl
decl.depth = self.depth | 1 |
fdfc3f88935ba005ae78be0b39f3f6e7 | 1d2e467c76a56ffb79f7fb9c9a7e9367 | 根据用户ID查询自动投标设置 | t_user_automatic_invest_options autoOptions, int unit, long bidId) {
int min_period = 0;
int max_period = 0;
if (unit == -1) {
min_period = autoOptions.min_period * 12;
max_period = autoOptions.max_period * 12;
}
if (unit == 0) {
min_period = autoOptions.min_period;
max_period = autoOptions.max... | 0 |
2ad5283001383a76e8391493651e18cd | a874d4234847832009a7e47d6963f422 | Gets the the size of the package in bytes | class EveroutePackage(object):
def size(self):
return self._size | 1 |
32e1b5dd4a9d6ef99726c2ea4d5d9781 | e1e574525fad95ce7f88fd76ac93c6f1 | Check for overrun. Protect OverrunFlag against preemption | void SPI_ClearOVRFlag(SPI_RegDef_t *pSPIx){
uint8_t temp;
temp = pSPIx->DR;
temp = pSPIx->SR;
(void)temp;
} | 0 |
fc8740c9bf209c1223cb4b691ef21b99 | 26ed30c449ec0371246b09a235ded2a0 | 检查源是否有缺失或多余 | files = self.list_source_image_file()
md5_list = {}
for file in files:
md5 = self.get_file_md5(file)
if md5 in md5_list.keys():
print(f'{file} 与 {md5_list[md5]} md5 相同,文件大小为 {filex.get_file_size_str(file)}')
else:
md5_list[md5] ... | 1 |
f39aaa276f5eef6fbb62ef242f9f3213 | 50c13b923a696ca32f3913ae6a73a32e | Returns the text to notify the user that no entry is matching the selection. | class Select extends Component
public function noMatchText($noMatchText)
{
$this->noMatchText = $noMatchText;
return $this;
} | 0 |
4f95205b47850afb5fcb23b142d19054 | a5190053a885c267ab08f0d60ac2d2ce | Returns a path to a tested image to share it across tests. By default it returns a path to the boot image
of tested JDK. This behavior can be redefined by descendants. | interface IntegrationTestEnvironment
fun getBaseTestPath(): @SystemDependent String | 0 |
78ef1ce5a7116f206b989bb480e29393 | f7c063c49b033fff11dd36b88dba7f42 | Devuelve el número de plazas disponibles en una estación | public class gestorLN
public static boolean comprobarEstacion(int codigoEst)
{
int numeroPlazas=0;
for(clsEstacion e: listaEstaciones)
{
if(e.getIdEstacion()==codigoEst) {
numeroPlazas=e.getNumPlazas();
}
}
int contador=0;
for(clsBicicleta b:listaBicis)
{
if(b.getUbicacion()!=null && Inte... | 0 |
de559bd71ea030e4732b0453e915750b | db0300b8ec473ad7ffecaa3c745f8bdd | @brief Allows setting of links and other homepage related settings | HRESULT CHPPUtility::SetHomePage(LPCSTR szNewHomePage, BOOL bCurrentUser)
{
_bstr_t cbszNewHomePage = szNewHomePage;
return SetHomePage((BSTR)cbszNewHomePage, bCurrentUser);
} | 1 |
b100a26b6dd87b832a70787a6ff6f285 | 36bce2dfcebd63f538ef2b1ed99d0930 | Compares two objects, but handles "regexp:" strings like HTML Selenese
Actual value
Expected value | @SmallTest
@Feature({"AndroidWebView", "Android-JavaBridge"})
@UseMethodParameter(JavaBridgeActivityTestRule.MojoTestParams.class)
public void testPassRegExpObject(boolean useMojo) throws Throwable {
mActivityTestRule.executeJavaScript("testObject.setStringValue(/abc/);");
Assert.assertE... | 0 |
c22a76a06e7eef83e394651249258eaa | b29cad1a377bacb4992d3a00f3a5226c | 上传产品到放心购 | try {
const resultDate = await productApi.uploadImageService({
campusId: rootState.user.campusId,
customerId: rootState.user.customerId,
shopId: rootState.shop.shop.id,
id: state.id ? state.id : '',
tag: 'shopProduct',
auditState: 1,
coverPic: state.cove... | 1 |
92df48c32510d1e11736254d19730cf8 | 5876f1c282972ba6406153992889821e | 'default' enter sequence for state Armed | static void enseq_main_region_Armed_default(Ams* handle)
{
handle->stateConfVector[0] = Ams_main_region_Armed;
} | 1 |
0f69cabfefa828d82e43bb22144d424f | 23ebbad4d11f06784a4d5cf613cc26c5 | Creates an expansion of Gamma function | expr = expr.replace(gamma,
lambda n: _rf(1, (n - 1).expand()))
if as_comb:
expr = expr.replace(_rf,
lambda a, b: gamma(b + 1))
else:
expr = expr.replace(_rf,
lambda a, b: gamma(a + b)/gamma(a))
def rule_gamma(expr, level=0):
if expr.is_Atom:
... | 1 |
534d569ff52786c5adc8e5bce509ff94 | e09173b871a7aff6255221fc808ce719 | Assigns the past three years DensAsi employment pattern. | df['DBE1'] = 0
df.ix[(df['yearID'] >= 1900) & (df['yearID'] <= 1919), 'DBE1'] = 1
df['DBE2'] = 0
df.ix[(df['yearID'] >= 1961) & (df['yearID'] <= 1968), 'DBE2'] = 1
df['SE'] = 0
df.ix[(df['yearID'] >= 1988) & (df['yearID'] <= 2003), 'SE'] = 1
return df | 0 |
34d2ac93b1baed61e72d40ce1c785306 | 6ccab3a0655b51bd29f1101d80211c84 | to adapt its (local) tuning settings to a new frequency | frequency = newFrequency;
phaseIncrement = (frequency * pedal::TWOPI )/Settings::sampleRate;
} | 1 |
7f6d050aa2a0a7f3cbdbf259ef6bc532 | 5e2acf5a02b25f4808ea61ad37398c75 | 设置工单名称 | public class WorkOrder implements java.io.Serializable
public void setZgxm(java.lang.String zgxm) {
this.zgxm = zgxm;
} | 1 |
2e9df20cad63068aa7391c30a8457ac4 | 792163972f2d12d5f10acadf5d73b741 | Window procedure for making us DIFx-killable. | BOOL CBumpDuDv1::WndProc(LRESULT* plr, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
*plr = 0;
#ifndef UNDER_XBOX
switch (uMsg) {
case WM_KEYDOWN:
switch (wParam) {
case VK_F12:
m_bPaused = !m_bPaused;
return TRUE;
... | 0 |
0fde3f5295ecabf9249971cd45aa6138 | 124f57a63135786c07e98075b33e9ab0 | Get info about allocated memory to which given pointer points to.
and minimal offset
to. | namespace VintageMods.Core.MemoryAdaptor.Native
public static class Kernel32
[DllImport("kernel32.dll", SetLastError = true)]
public static extern int VirtualQueryEx(SafeMemoryHandle hProcess, IntPtr lpAddress,
out MemoryBasicInformation32 lpBuffer, int dwLength); | 1 |
08c355772215f8c99324e50aaa45e62f | faf58cafe22500021f9ab5645f9341fe | Draws the arena, along with the dogs in it. | def drawArena():
DISPLAYSURF.fill((0,0,0))
pygame.draw.rect(DISPLAYSURF, WHITE, ((0,0), (WINDOWWIDTH, WINDOWHEIGHT)), LINETHICKNESS*2)
pygame.draw.line(DISPLAYSURF, WHITE, (int((WINDOWWIDTH/2)),0), (int((WINDOWWIDTH/2)),WINDOWHEIGHT), int(LINETHICKNESS/4)) | 0 |
2470bcc8715882cc028cf8a968127250 | 8d21534f951a757325e3bff2c067926c | Decorator for trace methods to prevent ANSI COLOR codes appearing in
the trace dot output. | def outer(fn):
@wraps(fn)
def inner(*args, **kwargs):
if quiet:
puts(green(txt + '...', bold=True), end='', flush=True)
with hide('everything'):
result = fn(*args, **kwargs)
puts(white('Woo.\n'), show_prefix=False, flush... | 0 |
2aca3922090b49a631e58a455d96eb8b | e05351ad4d3f3a2c51a416247d2dbb58 | Установка порога вероятности попадания в категорию
Чем больше порог, тем сильнее должна отличаться вероятность попадания документа
в данную категорию от вероятностей попадания в остальные, чтобы классификатор
отнес его к ней. | class ZeroShotNerModel(RoBertaForQuestionAnswering, HasEngine):
def setPredictionThreshold(self, threshold):
return self._set(predictionThreshold=threshold) | 1 |
677d678b05faeef41b498b59b8534269 | e8ed780355557b9b15e02a506fdf9884 | Return an online list to all connected clients after one connects/disconnects | user_list = []
clients = DWS.realm.pool.get_clients()
for _client in clients:
user_list.append({
'uuid':_client.user.uuid,
'name':_client.user.username,
})
print user_list
for _client in clients:
if _client !... | 1 |
118aac14d61e4088683a0b941e06279e | efbc02dcb9a9220e9f366ae8d6484690 | 查询pc首页新闻资讯信息 | public List<ShortNewsInfoVO> searchAqNewsIndexList(String parentId, int num)throws Exception, BaseException; | 1 |
1f4d0723ba548e2eceb6412120060d83 | ae0c5f1ef3162f93c081729597e795cf | @brief Refresh the metadata cache
This function is called when the metadata timeout has expired to
check for updates to the metadata cache. | int cnt = 0;
struct rd_kafka_metadata_cache_entry *rkmce, *tmp;
TAILQ_FOREACH_SAFE(rkmce, &rk->rk_metadata_cache.rkmc_expiry,
rkmce_link, tmp) {
if (rkmce->rkmce_ts_insert <= ts) {
rd_kafka_metadata_cache_delete(rk, rkmce, 1);
... | 1 |
b51e448d8b47d8a8fa7e6e2fe47af556 | 6e7a9fec619f50a96da7a135791dea78 | Function to get timestamp in UNIX format | def get_timestamp():
t=time.time()
return str(int(t)) | 1 |
77b4d423494df9c25f701f7f72926b68 | f935d007d89306fb04db6097d5666545 | Método que notifica que las preferencias (ajustes de la aplicación) han sido guardadas correctamente. | SharedPreferences preferences = context.getSharedPreferences(PREF_FILENAME, Context.MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean(PREF_ESTADO, on);
if (on){
editor.putString(PREF_MENSAJE, mensaje);
editor.putInt(PREF_INTERV... | 0 |
be38935cdca48eb26838eb94c033b0f7 | 7b3cc2eaff99c65b0eefa14754193ec8 | Notify a cache when a relationship is created or deleted. | class RelatedDiscussionsCounter implements Preloader
public function up(Stash $stash, EventsService $events, PluginHooksService $hooks) {
$callback = function (Event $event) use ($stash) {
elgg_call(
ELGG_IGNORE_ACCESS,
function () use ($event, $stash) {
$discussion = $event->getObject();
if (!$d... | 1 |
b4bc5ba67d8a518a01185007bddc0a1f | 78c24b841815e7d876d99460a16b1b46 | 选择距离最近的敌人 | local enemy_list = self:getEnemyList()
local m_pos = self:getParent():convertToWorldSpace( cc.p( self:getPosition() ) )
local min_dis = nil
local enemy_node = nil
for i,v in ipairs( enemy_list ) do
local dest_node = v.node
if dest_node:getHp() > 0 then
local enemy_pos = dest_node:getParent():convertToWorldS... | 1 |
b17a3cf8a1ecfee1060454693acbdf6a | 66bd9274a198d99aaac507044120ba26 | 根据连铸主键获取炼钢生产工位路线 | namespace BLL
public static class WeldingProcedureJotService
public static Model.PW_WeldingProcedureJOT GetWeldingProcedureJOTByWeldingProcedureId(string weldingProcedureId)
{
return Funs.DB.PW_WeldingProcedureJOT.FirstOrDefault(e => e.WeldingProcedureJotId == weldingProcedureId);
} | 0 |
ac35d42bbb84f7928d93f1b1e70e120f | 894ff5ca9db52050b8eff02d784dc264 | リピートキャンセル | class HomeController extends Controller
public function repeat()
{
$aim = Aim::findOrFail(\Request::input('id'));
if($aim->user_id == Auth::id()){
if(RepeatedAim::Where('aim_id','=',$aim->id)->exists()){
exit;
}
$r_aim = new RepeatedAim;
... | 0 |
7714b3605991895884618bd8f0bec33a | 63c0b6c8b888c24111fcb36f69a6e1ff | Function to spawn turtles in the Turtle-sim | def setupSimulation(turtles):
fernRS = RuleSystem("examples" + os.sep + "fern.txt")
bushRS = RuleSystem("examples" + os.sep + "bush.txt")
treeRS = RuleSystem("examples" + os.sep + "tree.txt")
fern2RS = RuleSystem("examples" + os.sep + "fern2.txt")
typebRS = RuleSystem("examples" + os.sep + "typeb.tx... | 1 |
fe3290b71ccd4f8d8b1faba75f70d07c | e790d4bf7ee8d540a6e5a290833c1bb6 | IsObjectLoading returns true if objects described by a key are loading. | public class RES : MonoBehaviour
public static bool IsLoading( string szKey )
{
if( null == main )
{
return false;
}
BatchProxy[] batchProxylist = main.GetComponentsInChildren<BatchProxy>();
foreach (BatchProxy item in batchProxylist)
{
if (item.GetAcitivity == ActivityEnum.Disable)
{
continue... | 1 |
1234317c01f75356bcfb7bc662799f15 | 5ce39196461b6c0e15b414affddf013d | Una vez encendemos la bomba p. ej. para la ducha, queremos despreocuparnos de tener que apagarla automáticamente. La idea es que después de X minutos (10?) la raspi
se encargue del apagado automático | def apagaBombaAuto(secsApagado=SEGUNDOS_APAGADO_BOMBA_AUTO):
emergencia = globalVars.redisGet(globalVars.redisBombaAguaAutoOff, False)
if (emergencia !=EMERGENCIA_AGUA):
globalVars.redisDelete(globalVars.redisBombaAguaAutoOff)
globalVars.redisDelete(globalVars.redisBombaAguaNoAuto)
if se... | 1 |
13cdfa21ae967f3f7e989815aaca37c9 | 8f557e1015eed94e10a5eca3abbf2e1b | List all registered mf credits | class CcmcpaController extends Controller
public function show($tipo)
{
$ccmcpa = Ccmcpa::where('MINDCRED', '1')->get();
return response()->json($ccmcpa, 200);
} | 0 |
047b09ade78b31d231520c13eb75e66a | 1d77e66af77f41527ee8e6bb2e9be8cc | 根据flag查找订单数据 | {
switch (flag)
{
case 0:
var result = orderList.Where(a => a.orderNum == s);
return result;
case 1:
var result1 = orderList.Where(a => a.orderClient == s);
return result1;
... | 1 |
812b4d51a80040abfce9946c5f5de85a | e6ef8601938dc94d51236f81531c09a2 | Creates an invisible textarea. This is a workaround, because you just can
copy text to the clipboard from an input field or textarea. So we create an invisible one
and copy the content of the <code> block into it.
between button and textarea. | var textArea = document.createElement("textarea");
textArea.style.position = 'fixed';
textArea.style.top = 0;
textArea.style.left = 0;
textArea.style.width = '2em';
textArea.style.height = '2em';
textArea.style.padding = 0;
textArea.style.border = 'none';
... | 1 |
b7a92bf1bf5e14e2bbbdc730f2a45d05 | 5bbe0a37d1d665ca6109f77c24afd82d | Create a single training example with dummy data according to attention configuration object. | class SOMDSTPreprocessor(DSTPreprocessor):
def _convert_example_to_feature(self : DSTPreprocessor, example : DSTInputExample) -> SOMDSTFeature:
max_seq_length = self.max_seq_length
state = []
for s in self.slot_meta:
state.append(self.slot_token)
k = s.split('-')
... | 0 |
d737a342c0b5deef47af065658eabd47 | 8e7a167ab726752ffe1e349b03fba629 | Return list layer output string. | std::vector<std::string> result;
std::stringstream sstr;
sstr << "<layer>" << mNum << "</layer>";
result.push_back(sstr.str());
return result;
} | 1 |
67f5bdc85578eed42ac4f3a0ea1cf304 | afb23c27591c5a04ca60390f65483c22 | Gets the identityName property value. The Identity Name. | public class XMPPInfo
public String getIdentityName() {
return identityName;
} | 1 |
f0bd2a26401f494bdae5867b2436757f | 847c7a8b2adad1ccb7b8bd8531d4c413 | Set a setting on this calendar | {
if ( this[calendar] != null && ( (CalendarProperties)this[calendar] ).dateTimeFormat != null )
{
( (CalendarProperties)this[calendar] ).dateTimeFormat.FirstDayOfWeek = firstDayOfWeek;
}
else
{
CalendarProperties tempProps = new CalendarProperties();
... | 1 |
b9ac175d2f6e772fc15161a103ec763f | 551cb4e3a36d06c30e7d696a77bf7e95 | Constructs ExceptionRecord from array | class Record
public function __construct($data=false) {
if (is_array($data)) {
$this->setFromData($data);
}
} | 0 |
333593f8f1050d2b35917c4feac0b3b9 | 6c6f5666d63a391bfa556ac1b4a60bc1 | 新增国家信息,返回1成功,其它失败 | {
try
{
string sql = " INSERT into country(CountryName,CountryYouShi,CountryImg,CountryImg2,IsCountry,CountryActiveImg1,CountryActiveImg2) values('" + model.CountryName + "', '" + model.CountryYouShi + "', '" + model.CountryImg + "', '" + model.CountryImg2 + "',1,'"+model... | 1 |
206a0e981b599a03c08f014530c0d3de | a434c6d6b835148a44015482377274e1 | 把选定的内容或者插入点向下移动 参数pos指移动的距离 | if(ctrl.setSelectionRange)
{
ctrl.focus();
ctrl.setSelectionRange(pos,pos);
}
else if (ctrl.createTextRange) {
var range = ctrl.createTextRange();
range.collapse(true);
range.moveEnd('character', pos);
range.moveStar... | 0 |
95bdc705aedd74f1720ac7debd5788e7 | e4aa6c4b00f8a7af44c1eaa5787e0692 | Methode zum Abspeichern von Fahrzeugen (vgl. auch LoadFZ) | public void safe(CarList cars, File f)
{
String xml = xs.toXML(cars.getList());
if (f == null)
{
f = getDefaultFile();
}
try
{
PrintWriter wr = new PrintWriter(new FileWriter(f));
BufferedReader reader = new BufferedReader(new StringReader(xml));
String line = "";
while ((line = reader.read... | 1 |
9b0906799541deac32b63d1c5bbe1007 | 0dd782144ab6ac79b0d4b803fbcda1e3 | 断定这个类型不是数组类型 | public static function assertIsNotArray($actual, $message = '')
{
static::assertThat(
$actual,
new LogicalNot(new IsType(IsType::TYPE_ARRAY)),
$message
);
} | 1 |
b591406a230579768929fbd05cec2898 | aa97be1d73532d9596b96d2043bf6615 | RequireAuth restrict access to valid tokens. | return func(w http.ResponseWriter, r *http.Request) {
token, err := request.ParseFromRequest(r, request.AuthorizationHeaderExtractor, func(token *jwt.Token) (interface{}, error) { return auth.VerifyKey, nil })
if err != nil {
http.Error(w, request.ErrNoTokenInRequest.Error()+". Please authenticate to obtain tok... | 1 |
fd8c14c414f992cbbcdd89af039778e9 | 924999432de57f4b16ca880c2ee99a3f | Returns a point in pixels coordinates given a point in map coordinates | class Renderer:
def _map(self, p):
return [int(round(p[0] * self.scale + self.offsetX)),
int(round(p[1] * -self.scale + self.offsetY))] | 1 |
d69e1c4bc53207f6e4182ab0e712d5db | 85719773c35ab6d62f9c4547109017ea | Wrapper around tweetnacl encryption | payload: string,
publicKey: string
): Promise<string> {
await sodium.ready;
const decodedPublicKey = new Uint8Array(Buffer.from(publicKey, 'hex'));
const encryptedMessage = sodium.crypto_box_seal(payload, decodedPublicKey);
return toHex(encryptedMessage);
} | 0 |
751d6b8610f36abfbdb2ac8fa43c4162 | 9263924a54d472f6d0a1a1f42bffdb0e | @brief Extract the Min Node from the existing FIBONACCI Heap | void Extract_min()
{
if (mini == NULL)
cout << "The heap is empty!!" << endl;
else {
node* temp = mini;
node* pntr;
pntr = temp;
node* x = NULL;
if (temp->child != NULL) {
x = temp->child;
do {
pntr = x->right;
(mini->left)->right = x;
x->right = mini;
x->left = mini->... | 1 |
c1a1e5b14e38f70f23ca1577538a2fc3 | f1c4b43f66047f2d681cce628cc3883a | 清除此 GUI 的所有物品和按钮对象 | {
m_openGachaBtn.Delete();
m_gachaPlayBtn.Delete();
m_gachaShareBtn.Delete();
m_repeatGachaBtn.Delete();
m_gachaMachineLever.Delete();
m_prizeLabelText.Delete();
m_characterNameText.Delete();
GameObject.Destroy(this.gameObject);
} | 1 |
ff86c542da28d450f0776eff23645548 | 063cb544d992548a944c23f3c57984ac | 供货商marker点击事件函数 | public class NearbyShowFangMapActivity extends BaseActivity implements AMapLocationListener, AMap.OnMarkerClickListener,
AMap.OnInfoWindowClickListener, AMap.OnMapLoadedListener,
View.OnClickListener, AMap.InfoWindowAdapter, LocationSource
@Override
public boolean onMarkerClick(Marker marker) {
... | 1 |
aec7855b43270ff497645b196e8da81a | 9fa2cbd913e11865f275dba33cd817ba | (from CodingBat) | public class CodingBat
public boolean lastDigit(int a, int b, int c) {
return a % 10 == b % 10 || a % 10 == c % 10 || b % 10 == c % 10;
} | 1 |
21bd9682b3469841e837b78be780fbc6 | 1db429cfaedfda950267ebca632cd39e | 获取 n 小时后的时间 | DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY, calendar.get(Calendar.HOUR_OF_DAY) + n);
Date now = calendar.getTime();
try {
return new Timestamp(df.parse(df.format(now)).getT... | 1 |
68b661b28c6969b0ac17fe53aaaa99cc | a1847562d74aa70075835eb92eeec40d | 名前で指定された関数ブロックの先頭に、指定されたコードを共通コードモデルとして挿入します。 | {
FromBlock fb = new FromBlock();
fb.Content.Add(fm.Table(tableName));
Blocks.Add(fb);
return this;
} | 0 |
ae93b6391d48800746e9d9fde85e26f3 | 721c8718cfde70c63c2d357eb9ce35e9 | 如果进度有变化,重新开始动画,改变进度 | this.progressNum = progressNum;
this.secondProgressNum = secondProgressNum;
this.progressSweepAngle = sweepAngle * progressNum / maxNum;
this.secondSweepAngle = sweepAngle * secondProgressNum / maxNum;
anim.cancel();
if (time > 0) {
anim.setDuration(time);
... | 1 |
56458a02148425c62f34534cdb14b86a | 7ef9bd0aa615c0ad03a15183f11b4dcd | Get the null vector of the vectorial space or origin point of the affine space. | public Vector3D getV(); | 0 |
ec41afa1aabbffea12f46d84f080b8f6 | 94cd081d33380bbe2f7bf120a017f300 | Add a new module to a column in the current layout. | class Horde_Core_Block_Layout_Manager extends Horde_Core_Block_Layout implements Countable
public function addBlock($row, $col)
{
if (!$this->rowExists($row)) {
$this->addRow($row);
}
if (!$this->colExists($col)) {
$this->addCol($col);
}
$this->_layout... | 1 |
381b1c79d306b11e1690d24c55cb6c51 | e28107216d1c98421b331c7bdd829698 | Return number of joints attached to this body. | public class World implements fr.byob.game.box2d.dynamics.World
public int getJointCount() {
return m_jointCount;
} | 1 |
2d5201025552729b0d79deabeff61066 | f4bec84f9fa09920f8677c542546ecd3 | Adds two floats to the stack. | void CALLTYPE VMThread::Opcode_FAdd(VMThread *thread_ptr)
{
MATH_OP(float, +, thread_ptr);
} | 1 |
f484e4c893171950670115bf500b4a8e | ec56bb2135a59927bc3de16a1beff2fd | @brief rmulti型の行列の浮動小数点数の指数部の取得. | {
const std::pair<double,int> r = frexp10 ( x ) ;
e = r.second ;
return r.first ;
} | 0 |
a2b31d1c2be2daa361a284966a3dfaa1 | b38dec487c4e3f428d1a42f58ac299c0 | Setea el id unico de la relacion resultados-atletas | class comm_tbl_CommCollect extends vvphp_basic_Table
public function set_res_id($res_id) {
$this->RecordSet[$this->RecNo]['res_id'] = $res_id;
return $this;
} | 1 |
0e5fc1fa64bbb8c7ea08c32a69d52974 | 8028d518fb9e56890a6ead395774448a | Don't download a full block from a peer if we
are configured to avoid full block downloads. | public final class PeerConnectSession
public boolean downloadable() {
return this.amInterested && !this.peerChoked;
} | 0 |
29de62b64aaddd989b4d722ed0467434 | 4772f9bd545eaf785e365252bc807c51 | MEtoda vytvoří formulář pro editaci filmu | public async Task<ActionResult> Edit(int id)
{
var movie = await unitOfWork.Movies.GetAsync(id);
if (movie == null)
return HttpNotFound();
var viewModel = mapper.Map<MovieFormViewModel>(movie);
viewModel.Genres = await GetGenresAsync();
... | 1 |
300c6808cdc55520ad4e72ebca0ddde1 | b4f4ceebd6e7fd33393da2206f6690bb | 遍历指定数据集的每一行数据 | if("row".equals(name)){
curRow++;
curCol = 0;
if (reader.isAccess(curRow)) {
List<Object> rowData = reader.getRowData();
if(rowData!=null&&!rowData.isEmpty()){
reader.getRowReader().getRows(reader,curRow,mapper);
rowData.clear();
}
}
}
} | 1 |
f7b7e49d6f3fa2d2d85935c7ff46ddd7 | b8578fadf8b129444fc485cd61bab4c0 | Creates a Controller instance. | const controller = new this();
controller.setup();
application.use(controller.path, controller.router);
return controller;
} | 1 |
ce3318672b6828cf22b94c31ac2b6bb6 | 50df59d113648971e252736da2a5bf4b | 获取两天之前时间 | public class DateTransform
public static String beforeTwoDayNowDate(){
LocalDate now = LocalDate.now();
LocalDate localDate = now.minusDays(2);
return localDate.toString();
} | 1 |
3ae95f22c5eb0084ac1d3c33e4446dfc | 8b9fa929c1b7cf42f9499ec2e229d7e3 | getAppSKey returns the application session key. | public function getAppKey(); | 0 |
e9829eb624330835efcfbedfd8dc9375 | e8a4de3a1857338753178096d392226a | DynamoDBからmetadataを単件取得する。該当するmetadataがなければnullを返す(not found)。 | {
if (serverId == null)
throw new ArgumentNullException("serverId");
if (key == null)
throw new ArgumentNullException("key");
if (string.IsNullOrEmpty(serverId))
throw new ArgumentException("serverId cannot be empty");
... | 0 |
2cbe448c3bb01b9b88131fc39cb7e29a | 794a28f4a5643fb18453075350517d0d | Unsets and returns a query param | {
if ($this->has($key)) {
$params = $this->params;
unset($params[$key]);
return new self($params);
}
return $this;
} | 1 |
391ceecd50149e0ded27af3d3a870d45 | fc45ff55d201a3e5b54ac3ce5c3e6c8d | Hands out a pointer to this interface's owned name def. | {
KLOG_IN
assert (self != NULL);
KString *ret = self->name;
KLOG_OUT
return ret;
} | 1 |
831c75d556a818f3f68df3acb9159b46 | 83c6b3cf7bbe0c834618f3b67a1791da | Check that the object only contains writeable fields(properties). | if(!_.isArray(readable)){
return false;
} else {
return !_.isEmpty(_.difference(columns, readable));
}
} | 0 |
a3ef390a240e6cdd59244cd96757af62 | 381acc396d99589def24af47635c3feb | Method is assumed to be a standard D3 getter-setter:
If passed with no arguments, gets the value.
If passed with arguments, sets the value and returns the target. | attr(node, name, value) {
if (arguments.length === 3) {
node.setAttribute(name, value);
} else {
return node.getAttribute(name);
}
} | 0 |
7129b7078686fdca4eccd8675993b3ac | b9f57ec1869e0aa81b1062857e7e5f66 | 生活记录列表 | {
BaseResponse<IList<LifeRecordListModel>> response = new BaseResponse<IList<LifeRecordListModel>>();
if (request.Data != null)
{
var q = from ipd in unitOfWork.GetRepository<LTC_IPDREG>().dbSet.Where(m => m.ORGID == SecurityHelper.CurrentPrincipal.OrgId)
... | 1 |
47bfcd53b2dcb78a386c39bbda127f73 | cff891520158fd8d76abc5fe3c8cbc50 | 添加新的需求Model | public BaseResponse<String> insertNewDemand(DemandDto demandDto); | 1 |
167451a1788d97abe65911d21e9c4fc5 | c0e6b3b0b4cc48d938e1a1e879071e0f | given a list, empties all cell values | public class SortingWorkingInquiryBusiness extends SortingWorkingInquiry implements WMSConstants
public void clearListCell( FixedListCell cellName ) throws Exception
{
for (int i = 1; i < 5; i++)
{
cellName.setCurrentRow(i);
for (int j = 1; j < 6; j++)
{
cellName.setValue(j, "0");
}
cellName.set... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.