query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
4466e33cb5d87bf167755d577f7cf48a | 7e66c6a33b0f618179068b52cd32e0b2 | Convert Data into CSV | const options = {
fieldSeparator: ',',
quoteStrings: '',
filename: 'iPrice CSV',
decimalSeparator: '.',
showLabels: true,
showTitle: false,
title: 'iPrice CSV',
useTextFile: false,
useBom: false,
useKeysAsHeaders: false,
};
const csvExporter = new ... | 1 |
a24b7375e9d235dacd8ffcca3f27b15d | 848f5a6826f86d066ae9c0027ce6335c | fonction pour rediriger vers la page de connexion | function redirectConnexion($role, $id){
if ($role === 'nounou'){
$chemin = 'profil_nounou.php?id='.$id;
}
else if ($role === 'parent') {
$chemin = 'profil_parent.php';
}
else {
$chemin = 'index.php';
}
return "<script>setTimeout(function() {
window.location.href='".... | 0 |
9239fb029671fc4ced1c4ff0a0994fdf | b8e53c8e79c9e1dab395973e2138656e | Выбор номера студента | command = int(input(ru.CHOOSE+'\n'))
try:
command = int(command)
except:
print(ru.WRONG)
if command < 7:
return command
else:
print(ru.WRONG) | 0 |
9cd34dd0b977f9916ae1c53ed08e2e5f | 34d717314f58b6e1dbb4fe23c8ce6fb8 | Return tile key at a given position | def tile_at(x, y):
if x < 0 or y < 0:
return None
try:
return map[y][x]
except IndexError:
return None | 1 |
12561a95e06a3185ace99119640bd04b | 732cdc4baea6d5f16fab62d31f3b135b | Compares two abstract paths lexicographically.
<p>
This implementation checks if the given path is an instance of the same class, then compares the actual paths of the two abstract paths. | public class Path implements Iterable<String>, Serializable
@Override
public boolean equals(Object other)
{
return this.pathStr.equals(((Path)other).pathStr);
} | 1 |
a3663ac150d61f838fccef6f0cb9d7a3 | dd136d7c54d31d9aea5e6f5873c144f1 | Удаление лишних пробелов из строк массива | {
int ResultLength = 0;
for (int i = 0; i < lines.Length; i++)
{
if (lines[i] != "")
ResultLength++;
}
string[] result = new string[ResultLength];
int index = 0;
for (int i = 0; i < lines.Leng... | 0 |
74e89e4faf016a90beb040612236b18f | 49343aa787a499af24bdc6d4dd2859f3 | 加载shiroFilter权限控制规则(从数据库读取然后配置) | @Configuration
@EnableTransactionManagement
public class ShiroConfiguration
private void loadShiroFilterChain(ShiroFilterFactoryBean factoryBean) {
Map<String, String> filterChainMap = new LinkedHashMap<String, String>();
filterChainMap.put("/login/**", "anon");
filterChainMap.put("/sys/**", "roles[admin]");
fi... | 0 |
1d93f10714bc881d8ed92a2dff866d63 | 608d324f13004125c9a00932bce7cbab | Открытие базы из текстового файла десериализируя JSON формат | namespace TestTaskTransneft
public partial class MainWindow
private void ReadJson(string path)
{
string jsonString = File.ReadAllText(path);
_jsonFile = JsonSerializer.Deserialize<JsonFileItem>(jsonString);
} | 1 |
1d2a91487a32ca15cc68d77bf018d2cd | 1873c84679302f520452e83a2b4757e2 | 获取歌词文件,如果本地没有,则从网络下载 | const options = {
fromUrl: lyciclink,
toFile: filePath,
background: true,
headers:{"Accept-Encoding": "identity"},
begin: (res) => {
console.log('begin', res);
},
progress: (res) => {
let pro = re... | 1 |
efb9a5981e9a478bda9b3775af80398a | fed9131cd2e5b16c3c4e200b0e89b14b | 切换查询空气情况 | city = ed_city.getText().toString();
province = ed_province.getText().toString();
Intent intent = new Intent(SelectActivity.this, AirCondition.class);
intent.putExtra("city", city);
intent.putExtra("province", province);
startActivity(intent);
finish();
} | 1 |
616ca45c8b1152c5cd33f80a3104ceed | 2a57db58ea243d8731d1b8694942b5ad | @brief テキスト設定ボタンを押したときのスロット | void
diagramscene_MainWindow::textButtonTriggered()
{
scene->setTextColor(qvariant_cast<QColor>(textAction->data()));
} | 1 |
0bbc944f14ec4442fcee33a2d302fb74 | 0237add8772f317329d13140242c4206 | @brief
Gate that'reads' from a ROM table.
i.e. table index is a witness not precomputed | static READ16_HANDLER(rtrg2_r) {
return 0;
} | 0 |
8763439f94e989521328134bd85a77fd | 5e88f6ca01ad824d16b51611b57107d4 | 创建chunk缓存 | $coll = $mon->selectCollection($conf->db, $conf->collection . '.chunks');
$filesize = filesize($filename);
$chunksize = $conf->chunksize ? $conf->chunksize : self::CHUNK_SIZE;
$prekey = substr($md5, 0, 16);
$start = hexdec(substr($md5, 16, 8));
$handle = fopen($filename, ... | 1 |
4549c53d620f3a86e5ecf11c3bc393d1 | 057d1c86cef1629b68c94926ff2d4ede | Creates an AST out of the tokenized template | const ast = parse(template.trim(), options);
console.log(ast);
const code = generate(ast, options);
return {
ast,
render: code.render,
};
} | 1 |
d2888efd33f839fdf766a1f76199a50d | b1a3b1657eeeca2b0fd1bf4ac6d7f15d | 質問回答のコメント情報マップを返します。 | @java.lang.Deprecated
java.util.Map<java.lang.Long, java.lang.String> getQuestionIdToAnswer(); | 0 |
00713ca7c291133b9130bff3a206e653 | e2771c5b6bcced2ca8cc1e7460267dfe | Hàm kiểm tra bàn phím khi đang chơi | class Game_function():
def chek_board(self):
if self.key_pressed[K_w] or self.key_pressed[K_UP]:
player.moveUp()
if self.key_pressed[K_s] or self.key_pressed[K_DOWN]:
player.moveDown()
if self.key_pressed[K_a] or self.key_pressed[K_LEFT]:
player.moveLeft()
if self.key_pressed[K_d] or self.key_pressed[K... | 1 |
7263927577eb9ea465f58e8f68b64727 | 4db1eb0e7a6bebf0b8a6c98235bb4f53 | Decrypts email id for verification | email = ''
d = eval(email_str)
length = len(d)
for i in range(length):
a = int(d[i])
b = a//2
email += chr(b)
return email | 1 |
dc28c89a9d670e2e26b0d940b536ed5a | d01e8a8838c010155b262261b5b2e705 | checks that there are no pieces in between the piece's old and new positions
it also checks that the piece is moving horizontally, vertically or diagonally | {
assert !isEmptySpace(oldRow, oldColumn);
assert !(oldRow == newRow && oldColumn == newColumn);
assert !getPiece(oldRow, oldColumn).isHoppable();
int deltaRow = newRow - oldRow;
int deltaColumn = newColumn - oldColumn;
if (deltaRow == 0 && deltaColumn != 0) {
... | 1 |
c5a5a6ff6fb1b0583d377c7f048af637 | d58b1a488dce18eb55fc4d9206bb0bb7 | LLamar al controlador para que rechace la transferencia. | await this.intentService.sendIntentResponse(
this.intentTransfer.action,
{ walletinfo: null, status: 'cancelled' },
this.intentTransfer.intentId
);
} | 1 |
7f76c2ba97e98173e7ffe56d2e5b5519 | 5e82e9e9af85744ff463a2078c34d6dc | Create virtual host from a doctrine virtual host | class VirtualHost implements VirtualHostInterface
public function __construct(Config $config, string $filename)
{
$this->config = $config;
$this->filename = $filename;
} | 0 |
1c32bcc2914c80626852ad9223b59b98 | b155b5860450e8b9cd8f1c3d9a0f1793 | 更新对象在数据库中用某一字段取值为筛选条件 | @Slf4j
@Accessors(chain = true)
public class QueryCondition implements Serializable
public <T,FT> QueryCondition updateCriteria(SFunction<T,FT> fieldGetter, Comparison comparison, Object value) {
this.updateCriteria(BeanUtils.convertSFunctionToFieldName(fieldGetter), comparison, value);
return this;
... | 1 |
e3972afeaf40dfd530ce78d6eb1dd203 | 94138c4c3bb5032635d0f04e8b305f04 | Convert all fields to SI units | self.vert_rate = self.vert_rate * ft_to_meters
self.altitude = int(self.altitude * ft_to_meters)
self.speed = int(self.speed * knots_to_kmh)
self.is_metric = True | 1 |
eebb2202dc8516405fff79b4b48c77c3 | 38d6eac3699ba5862b7900fcc4689f4a | !
Embeds \a widget into this proxy widget. The embedded widget must reside
exclusively either inside or outside of Graphics View. You cannot embed a
widget as long as it is is visible elsewhere in the UI, at the same time.
\a widget must be a top-level widget whose parent is \nullptr.
When the widget is embedded, its s... | {
if(m_Content != NULL)
{
m_Content->SetParent(NULL);
}
m_Content = widget;
if(m_Content != NULL)
{
m_Content->SetParent(this);
m_Width = m_Content->GetWidth();
m_Height = m_Content->GetHeight();
}
} | 1 |
5fef334f9917ba62e18cb1df3fbc8a40 | f3f65a01e74d70c5f255cc7d9123b21f | List中的数据按照插入顺序存放 | jedis.lpush("list","list");
jedis.lpush("list","list-1");
jedis.lpush("list","list-2");
List<String> list = jedis.lrange("list", 0 ,2);
for(Object obj:list)
log.info("list:"+obj.toString());
} | 1 |
b764d76d2a2b43be23e6d8c446f69836 | b77ed4dc790a86aa169d83d7bcfb5e22 | 1. 根据bid查出车的状态, 要报修的车不能是行驶状态 2 | public void reportMantinant(Bike bike) {
Query q=new Query();
q.addCriteria( Criteria.where("id").is(bike.getBid()));
Bike torepair=mongoTemplate.findById( bike.getBid(), Bike.class,"bike");
if( torepair==null) {
throw new RuntimeException("查无此车登记:"+ bike.getBid());
}
if( torepair.getStatus()==2) {
... | 1 |
d130f8ceee759e053a7c7115d9e5dc8b | 76906a76f79345fa504e2228030fe8b8 | Using Angulars Drag&Drop method to move items in the list. | const itemMove = this.checkList.splice(event.detail.from, 1)[0];
this.checkList.splice(event.detail.to, 0, itemMove);
event.detail.complete();
} | 1 |
e7a4be6f23f1a2f9ced18a7d9bc5bdf8 | f2cf2fea1a52f7c6c62b4645f42cc4fe | Specifies which channels must be present in the lexer for the preprocessor to function, this is a minimum specification, other channels may be present. | public void setRequires(String requires); | 1 |
528773ab3200c96059ccdfbd096e9458 | 4a0d3b435dc28d5bf7c19d7862a14cc1 | Retorna true ou false quando alguma ação CRUD for executada no banco de dados | Map<String, Object> requestMap = getRequestMap();
return requestMap.containsKey(PlcJsfConstantes.PLC_ITENS_LINHA) || requestMap.containsKey(PlcJsfConstantes.PLC_ITENS_STATUS);
} | 0 |
36e81c57cf7899c04f048eaad1c42443 | 2fe4cca43dd92c8f8fcdf0bb1e9fd0a5 | need to put a hyphen where there is a space or before an uppercase letter | function toDash( str ) {
var charCode;
for ( var i = 0; i < str.length; i++ ) {
charCode = str.charCodeAt( i );
if ( charCode >= 65 && charCode <= 90 ) {
str = str.slice( 0, i ) + '-' + str[i].toLowerCase() + str.slice( i + 1, str.length );
}
}
return str;
} | 0 |
d8208de3c6ab23d31334d181b2fc5ee8 | cbf774f5004d5ccc8f7cac6ca3d9828f | Returns the oldest item in the queue | class SimpleQueue
def peek
@store.first
end | 1 |
78dc3a8fe5fee1c7977ff960b3b57c0e | a8badedaba34b9983d16ad583f0eac27 | Método para llevar a cabo la modificación de los datos de la oficina usuaria
Requiere: un objeto con los datos de la oficina usuaria
Modifica: Modifica los datos de una oficina
Retorna: Devuelve un true si se ejecutó la actualización correctamente en la base de datos. | namespace ConfirmIt.PortalLib.DAL.SqlClient
public class SqlOfficesProvider : OfficesProvider
public override bool UpdateOffice( OfficeDetails details )
{
using( SqlConnection connection = new SqlConnection( this.ConnectionString ) )
{
connection.Open();
SqlTransaction transaction = connection.BeginTra... | 1 |
fd7777d9da02f1a518233f0bf408ebc5 | 232849ed210a78d57b33acf425b4f168 | 获取所有Get开头的方法 | @SuppressWarnings("ALL")
public class Reflects
public static List<Method> getAllGetterMethod(Class<?> clazz) {
List<Method> list = new ArrayList<>();
for (Method method : clazz.getMethods()) {
if (!"getClass".equals(method.getName()) && !Modifier.isStatic(method.getModifiers()) && method.get... | 1 |
7763747d6a6607946a2b5347164a5ec5 | 14f880537a42416676579d8cc7f113d4 | Create a new player from info over the net | void std_add_player(net_player *p)
{
char ip_string[60];
psnet_addr_to_string(ip_string,&p->p_info.addr);
std_connect_add_ip_string(ip_string);
std_pinfo_add_player_list_item(p);
std_pinfo_maybe_update_player_info(p);
std_gs_add_god_player(p);
std_connect_set_host_connect_status();
std_connect_set_connect_c... | 1 |
206a5409374bf03c5960df365a350349 | 159351b58f0826d0c84907c70c9258b3 | Free the disassembler instance | Assembler::~Assembler()
{ } | 0 |
e3546b91e8fe3f817d3c05b46c3255b1 | fa1b4fa975edaaf584225e111acf7fb2 | 上传图片的弹窗(默认标题是上传头像) | AlertDialog.Builder(activity).setTitle("上传头像")
.setPositiveButton("拍照") { dialog, which ->
if (Build.VERSION.SDK_INT >= 23) {
val permissions =
ArrayList<String>()
if (activity.checkSelfPermission(Manifest.permission.C... | 1 |
68bab58d8c7e4a713d63f2520408b533 | 2054728529a9686601058255faceebf7 | 保存系统配置到缓存的私有方法,供saveConfig及load方法调用
<dl><dt><b>业务描述:</b></dt><dd>
循环Result对象,生成Config对象,后保存到MemoryCache中
</dd></dl>
<dl><dt><b>范例:</b></dt><dd>
无
</dd></dl>
<dt><b>修改历史:</b></dt> | public void cacheResult(
java.util.List<net.zylk.kerozain.portal.model.UserInfo> userInfos); | 0 |
45dfcb47d924b36424895a99c4493cdc | c6f55915a675945d794df0d00b2aebe2 | Assigns a singing key to the correspondent platform of a project. Next compilations will try to use the key.
If there was another key assigned to the platform the new key overwrites it. | public class SolutionProjectBuilder
static public void platforms(params String[] platformList)
{
m_platforms = platformList.Distinct().ToList();
generateConfigurations();
} | 0 |
ad4dd77c95fe25acf49e0c3148e98dd1 | a76e22f1f5b9557c5d598ef805fcb621 | Bestimme aus der uebergebenen Temperatur den Eisanteil der Wolke.
https://link.springer.com/content/pdf/10.1007%2Fs00382-013-1964-9.pdf | double air_temperature
)
{
double a = (18.678 - air_temperature / 234.5) * air_temperature;
double b = 257.14 + air_temperature;
return 611.21 * exp(a / b);
} | 0 |
6d03337e66ce92625f24f14d3308f072 | 6a5d3bc3a066d332031e8bbca5de7fe0 | Inspects pydantic model and gathers all validator_field_mappings
between validators and fields. | ref_func = self.pydantic.inspect.references.create_model_reference
ref = ref_func(field_name)
typ = self._stringify_type(field_name)
return f" - :py:obj:`{field_name} ({typ}) <{ref}>`" | 0 |
4ff8894b7250fe68eb86859af9e525b9 | 0b85a1e76c57c52a3b6f3e385aa33fb0 | Returns the indicare_7_1 of this form_di_segnalazione. | public class Aa2clico implements Serializable
public String getClcdi1() {
return clcdi1;
} | 0 |
03e8da8baf9a10490354dfb3c6511831 | a6564bc6e29129ca7db404df2b19d475 | Devuelve una instancia de HojarutaDao con una conexión que depende del gestor de base de datos | public function getJugadorDao($dbName); | 0 |
c707f2d706aedde9cd2f64bd73341cb2 | 21e9273ed588ca9518d1a925a94707b8 | Get the ansi escape sequence for the foreground colour. | params = []
if bg in self.color_map:
params.append(str(self.color_map[bg] + 40))
if fg in self.color_map:
params.append(str(self.color_map[fg] + 30))
if bold:
params.append('1')
color_code = ''.join((self.csi, ';'.join(params), 'm'))
re... | 1 |
bace567478818baebc89b81c16e7f89b | 6d1f0ac9bea71b58a6e16524f13500b1 | Makes sure the action list is cloned. | goap_actionlist_t newList = {0};
for (ACTIONLIST_ITER(oldList)) {
da_add(newList, *it);
}
return newList;
} | 1 |
a9d7dd700a53822cdccef88248cb32b4 | 681784ace10bd835e1e95f4f6791f262 | Gets the nearest point on the shape to the specified point. | namespace MassIntellect.Presentation
public class ReactiveShape<T> : IReactiveShape, IIndexAccess<string, ReactiveCommandDesc>
where T : class, IShape, new()
public PointF GetNormalPoint(PointF pnt)
{
return Shape.GetNormalPoint(pnt);
} | 0 |
f941e158c4b8fc1bb48de31b0f4659a0 | 66e4bd163c1a2f17f5c4f01502e5e5ee | Tests that MainActivity starts | @RunWith(RobolectricTestRunner.class)
@Config(constants = BuildConfig.class, sdk = 21)
public class MainActivityTest
@Test
public void testStartActivityByIntent() {
MainActivity mainActivity = Robolectric.setupActivity(MainActivity.class);
mainActivity.findViewById(R.id.tv).performClick();
I... | 1 |
eb73777d376327c76409e0cc499dddde | 2db90e31bbcd872f12b6e9b906cc786d | Dump Rx/Tx CAM(and associated Status SRAM) entry | void EMAC_EnableCamEntry(uint32_t u32Entry, uint8_t pu8MacAddr[])
{
uint32_t u32Lsw, u32Msw;
uint32_t reg;
u32Lsw = (uint32_t)(((uint32_t)pu8MacAddr[4] << 24) |
((uint32_t)pu8MacAddr[5] << 16));
u32Msw = (uint32_t)(((uint32_t)pu8MacAddr[0] << 24) |
((uint3... | 0 |
2759b3391b77a61fa365a35b51679ca0 | d5bff217ccf73e75dc2b5fe52aa664bb | Devolve o total de vendas inválidas no ficheiro a que estas estatísticas dizem respeito. | int getVendasZero(); | 0 |
e16815f8a456204935869f46919df51e | 1662bc822d27daaa671ba4bb427caef3 | Sets a comma-delimited list of regular expressions to match properties
that should be excluded from the JSON output.
A comma-delimited list of regular expressions | public final class RegexPropertyFilter implements PropertyFilter
public void setIncludes(String... expressions){
this.includes = Arrays.asList(expressions);
} | 0 |
69613b0702c7f874d67ff8ba186bf63a | 1c3a4800016ad2d4c136c9c9f3769b4e | 隐藏顶部条右边的图标 | public class Framework extends BaseActivity
protected void hideTopRight() {
topBarView.hideTopRight();
} | 1 |
1e53ab3e372b06bcd40450e14164dc96 | c7f8ae1e8617f7116a22b28f6999d2a5 | @brief Sets the TL security level.
Access level: User level\n | unsigned char GetDLSecurityLevel()
{
const SLME_KEY * pKey =NULL;
pKey = SLME_GetDLLTxKey();
return pKey->m_ucSecurityCtrl;
} | 0 |
743da121cc96e829af26a35c93321cab | 0749cd9bdb052c32a3ab1cdb5a6faf31 | Vérifie le succès du soin. | class StatusTransaction(object):
def success(self) -> bool:
return self.__soul['success'] | 1 |
18e0cf47b6f34a22c6577355b9b9259f | 2a8705596ad495c6c040230e1e350cc0 | This method sketches the scene during the day by
drawing a house of the available wood and a sun which
is besides and above the house | build_house()
tt.back(90)
build_tree(10, 120, 60)
tt.back(140)
build_tree(10, 120, 70)
tt.forward(490)
build_tree(10, 120, 80)
tt.forward(150)
build_tree(10, 120, 40)
tt.back(410) | 0 |
4a0a8beec5285352a5c11565a101f6b0 | 6df65385832ac5fd27c33285d678a033 | Called when the Device Admin is enabled. | public class SecurityPolicy public static class PolicyAdmin extends DeviceAdminReceiver
@Override
public void onEnabled(Context context, Intent intent) {
SecurityPolicy.getInstance(context).onAdminEnabled(true);
} | 1 |
c33d686b702dc618e0ce549e9f73e3f0 | 64c3b098eef7dba87d3bc2158a3c87a0 | Generates the execution-string that should be used to call
the benchmark implementation. | public class BenchRunConfiguration
public String getCmd() {
return cmd;
} | 0 |
81805232f6be8e53736047d41f0d1dd4 | b6f815527ff7bcabafd7ec2f40cd5141 | 计算指定位置的播放器尺寸 | View view = getView();
RxFFmpegPlayerView mPlayerView = null;
if (view instanceof RxFFmpegPlayerView) {
mPlayerView = (RxFFmpegPlayerView) view;
int width;
int height;
width = Helper.getScreenWidth(view.getContext());
height = width * 9... | 1 |
c66eda9e8ceab165f378afe7f6ed316f | 97e93b16de866d247de178f1b9787183 | Test IPv4 transport | public void UnityTransport_BasicInitClient_IPv6()
{
UnityTransport transport = new GameObject().AddComponent<UnityTransport>();
transport.Initialize();
transport.SetConnectionData("::1", 7777);
Assert.True(transport.StartClient());
transport.Sh... | 0 |
2accb9a50bde9639f30d7442b3f44765 | 80c0ecd849bc51a7490ac8f0e641b7ae | Get the value of ICT_LIN_TXPAD_TRF<4:0> | impl Sdtr2
pub fn txsr(&self) -> ::bobbin_bits::U4 {
unsafe { ::core::mem::transmute(((self.0 >> 4) & 0xf) as u8) }
} | 1 |
ea977f8ca35825eef445058472eb52ce | e4543bd69dccd2439fab2877582d8b97 | leb128格式数据转成int格式数据 | if len(b) == 3 {
b = append([]byte{0},b...)
}
bytesBuffer := bytes.NewBuffer(b)
switch len(b) {
case 1:
var tmp uint8
err := binary.Read(bytesBuffer, binary.BigEndian, &tmp)
return int(tmp), err
case 2:
var tmp uint16
err := binary.Read(bytesBuffer, binary.BigEndian, &tmp)
return int(tmp), err
case... | 0 |
88289b6c426d3c20d436b380d639954f | 8847aabe52e182ee64c9b62128b6d099 | Caches the communication details on disk for later usage.
E.g. if you want to post-process it with dryRun() on development or with other tools. | def write_details_to_disk(resp: LoginResponse, homeserver) -> None:
with open(CONFIG_FILE, "w") as f:
json.dump(
{
"homeserver": homeserver,
"user_id": resp.user_id,
"device_id": resp.device_id,
"access_token": resp.access_tok... | 1 |
22bbfb2fcab715a896feebbec124ba7e | c0b025328d8e8809ab0174ad926c04d0 | Method to get category/indicator variables | $sql = "select name from mytrend_selected_variables";
$res = $this->objDBConnection->queryPDO($sql);
$var = array();
foreach($res as $row) {
$var[] = $row['name'];
}
return $var;
} | 1 |
45bc4f409450b5173b22f7a8f6df21c6 | 10b41082262b0a017780427d4380b206 | Удаляет список товаров из списка текущей категории. | {
if (!$id) $this->redirect('error/error403');
$form = $this->form('post');
$category = a('category', $id);
if (!$category->id) $this->redirect('error/error403');
$db = \M\Database::db();
$db->query(sprintf("DELETE FROM `_r_category_product` WHERE id1 = '%s';", $id));... | 1 |
d6e717a7bb476f570e11e4cb883cefde | fa2daedbe6d1ae413094e82b4002560a | 在日曆上加上今天的標記 | function nextCalendar() {
today = new Date(today.getFullYear(), today.getMonth() + 1, today.getDate());
buildCalendar();
} | 0 |
a99c1fa182c1e7e6afe29a000a9e36b5 | db501bcacb656c0a86f411ca624b896e | Indicates whether you want Amazon Route 53 to evaluate the health of the endpoint and route traffic only to healthy endpoints. | class ServerGroupHealthCheckArgs:
def health_check_enabled(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "health_check_enabled") | 1 |
8d272ad442c261c6bd4303ad5f09b8f1 | c5b9894db3aca5eef0306a500c17e812 | @brief Looks at the wait_for_si_mask and determines an appropriate timeout
value based on which SIs are being requested | Dsi dsi;
for (long i = 0; i < d_size; i++) {
long stai = p_rsst[i];
if (stai == -1) continue;
if (p_stbl[stai].isready () == true) {
assert (p_stbl[stai].d_schi == i);
dsi = p_stbl[stai].d_inst;
p_stbl[stai].d_wakup = true;
break;
}
}
return dsi;
} | 0 |
abcb758ba9d334b2b7908517955993c5 | 7427744c3f368d81c37aed0ac2633704 | DESCRIPTION Handles the FS_ENUM_INIT_OP command. | (
Event *ev
)
{
int index;
index = ev->GetInteger( 1 );
ProcessInitCommands( index );
} | 1 |
37bd1f563587f46e8d0dd5c3da9f2aca | e6c59e52fd59bc32cabcce62d303cf2a | Resets the attack timer to delay the next strike by the current weapon delay,
if Unit is fighting. | void unit_stop_attack(struct block_list *bl)
{
struct unit_data *ud;
nullpo_retv(bl);
ud = unit_bl2ud(bl);
nullpo_retv(ud);
unit_set_target(ud, 0);
if(ud->attacktimer == INVALID_TIMER)
return;
delete_timer(ud->attacktimer, unit_attack_timer);
ud->attacktimer = INVALID_TIMER;
} | 0 |
aca6709c922bcad0f0bb6ef42484012b | da6867d353c5ed815c2b51c75eedc02f | keeps attempting to allocate a zero'd array | void *mymalloc(size_t n_bytes, int aloc__free) {
static char *dyn_arr[SYMTBL_MAX_LEN];
static int dyn_arr_size;
int i;
for (i = 0; (i < dyn_arr_size) && aloc__free == FREE; ++i) {
free(dyn_arr[i]);
}
if ((dyn_arr[dyn_arr_size] = malloc(n_bytes)))
return dyn_arr[dyn_arr_size++];
return NULL;
} | 0 |
4de70fcd0eb8f032c7e0e7c556642400 | 8c71eccb1132ddcce5ef48dbc8ef61b7 | if do not specify the start and end index of the single camera circle.
automatically select the most stable circle for openvslam result. | int dataType, const char* imageFormat, IplImage*& lImg, IplImage*& rImg)
{
IplImage* rImg1 = NULL;
IplImage* lImg1 = NULL;
float nScale = 1.0;
const int speed_m = 1;
const int alpha = 20;
double ratio4Circle = 1.0;
int closeItr = 2;
int openItr = 3;
double norm = 200.0;
if... | 0 |
8077b810c52c0d09673a1c1b1ca55413 | 05b15c7d4be4e7443ba6388be0bf08ce | Check whether the game room's chat is freezed | boolean isChatOpen(); | 0 |
ef19186ac8a0b847223bf1241497b3ea | 2ef4ad1bb3713b19f776993b18f3b009 | Получаем полный список заказов пользователя, сортируем по дате заказа | function getOrder($login) {
$query = "SELECT * FROM orders WHERE user = '$login' && status = 'new' ORDER BY date DESC";
return dbSelect($query);
} | 1 |
521fee217a8bd367771038b636116957 | 040242593e3ab473ef51eb5460b33fd7 | 관리자 회원 수정 페이지 | public ModelAndView update(String id){
ModelAndView mav = new ModelAndView();
MemberDTO member = service.read(id);
mav.addObject("member", member);
mav.setViewName("myservice_modify");
return mav;
} | 1 |
23986d838ba9090c026b8ef46d3572c6 | 92b043a5c37ab2aefb5baf399c9b14c5 | 个人信息样式 | namespace Boss.Web.Controllers
public class UserController : Controller
[HttpGet]
[AjaxContentFilter]
public ActionResult PersonalInfo()
{
ViewData["CampImage"] = imgUserImgPath + "User/";
RegisterModel model = new RegisterModel();
User user = Service.Sele... | 0 |
2f7d84b05c3f8b14eaec3e28872a36e2 | 201a010118b5d0360dd4fa38f9241151 | 执行closestFacility分析 | {
if (featuresLayer.Features.Count > 0)
{
featuresLayer.Features.Clear();
}
if (eventp.IsEmpty)
{
MessageBox.Show("请指定事件点");
return;
}
if (points.Count == 0)
{
... | 1 |
b2f7be98276db5d31bc7624fa2fbf302 | dddcdf74587163a9a886ba2d9b136239 | @brief Function for configuring TK group modifier feature.
These locations can be afterwards easily accessed with @ref nfc_tk_group_modifier_update
and modified. | {
*( (unsigned short*) (BTABLE_BaseAddr + BTABLE->ADDR1_TX + 0) ) = modifiers;
*( (unsigned short*) (BTABLE_BaseAddr + BTABLE->ADDR1_TX + 2) ) = keycodes >> 0;
*( (unsigned short*) (BTABLE_BaseAddr + BTABLE->ADDR1_TX + 4) ) = keycodes >> 16;
*( (unsigned short*) (BTABLE_BaseAddr + BTABLE->ADDR1_TX + 6) ) =... | 1 |
c2e2a0d5a34b1a16304517a2258d40b5 | d6c0e44ca72a6e4a3ebfc633bc6c8d8f | exec helper to log the exec call before execution. | {
if (!cxt)
return -EINVAL;
cxt->syscall_status = 1;
cxt->helper_exec_status = 1;
cxt->helper_status = 0;
return 0;
} | 0 |
c721dfd457e67a0895ee4daac8e69771 | 7ed9406a185e582a7065218500a3e4eb | Choose the planar direction based on the most significant part of the normal | {
float bestAbsDotProduct = 0.0f;
Vector3 bestPlaneNormal = _gizmoTransform.forward;
Vector3[] planeNormals;
if (gizmoAxis == GizmoAxis.X) planeNormals = new Vector3[] { _gizmoTransform.forward, _gizmoTransform.up };
else if (gizmoAxis == GizmoAxis.Y) ... | 1 |
b059106213b0c26342d7ffbc4c600f88 | 51fb961bf0dd7103bfad0d8e3bac6777 | 筛选打开通话状态弹窗 | PhoneVoiceUtils.getInstance().toggleSpeaker(true);
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("来电:" + linphoneCall.getRemoteAddress().getUserName() + " port:" + linphoneCall.getRemoteAddress().getPort());
builder.setMessage("您的好友来电,是否接受通话")
... | 1 |
a94881491c1eaf71df8d5c223748b0cf | cbb9ca5e5a1b01e2783ba5fc0e7ea1f8 | The worker function, invoked in a thread. 'nums' is a
list of numbers to factor. The results are placed in
outdict. | def mp_factorizer(nums, nprocs):
def worker(nums, out_q):
outdict = {}
for n in nums:
outdict[n] = factorize_naive(n)
out_q.put(outdict) | 1 |
fcbc3c9656477e35e8fc96fa809f20d6 | ed74faf09175cb5a6f840dce20bb8588 | 将获取后的数据验证后进行保存, 成功后跳转列表页 | {
$StaffValidate = new \App\Http\Requests\Staff();
$validator = Validator::make($data, $StaffValidate->rules(), $StaffValidate->messages());
if ($validator->fails()) {
return redirect('staff/create')
->withErrors($validator)
->withInput();
... | 1 |
30f0a61954081547b637571a899d3222 | 208c2aade013da9edd7811a2e8db8423 | 封装调用装饰器的函数 | def call_2(msg = ''):
def decorator(func):
def wrapper(*args, **kw):
print('message: \'%s\', function \'%s()\' be called !' % (msg, func.__name__))
return func(*args, **kw)
return wrapper
return decorator | 1 |
2a4e1abac616c47ad02cfdbd1c6f0f90 | 1fc6e457bce63a82b9358aa5e414028c | This adds a property descriptor for the Compute Id feature.
<!-- begin-user-doc -->
<!-- end-user-doc --> | public class ColumnTypeItemProvider
extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource
protected void addValueComputedPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(create... | 0 |
16b019967a6e9507c7e837e80fce2559 | cfd72887cee0652fa80527d5719b1b65 | Sets the hover tab. | class Theme extends \Venus\Theme
public function setTab(int $tab_id)
{
$this->tab_id = $tab_id;
return $this;
} | 0 |
45c413fb587c17ee11136841bd6919c9 | bd232a0c4f083ce9bd86fc3007cc52c7 | fill entries with selected row | class ilOptesRowColTableGUI extends ilTable2GUI
protected function fillRow($a_set)
{
$this->tpl->setVariable("TITLE", ilUtil::prepareFormOutput($a_set["title"]));
$this->tpl->setVariable("NR", ilUtil::prepareFormOutput($a_set["nr"]));
$this->tpl->setVariable("ID", ilUtil::prepareFormOutput($a_set["id"]));
} | 1 |
89cc02e030c74bd065aa9869036305a8 | 154da5c5be008592ae2d0258e1f0bcda | 根据当前地图格子 Y 轴的位置返回相邻的六个六边形格子位置 | List<String> surroundGridList = new ArrayList<>();
surroundGridList.add(PointInfoMeshcode.calcMeshCode(point.latitude, point.longitude, 9));
LatLng movedPoint = calculateMovedPoint(point, 15, 0);
surroundGridList.add(PointInfoMeshcode.calcMeshCode(movedPoint.latitude, movedPoint.longitud... | 0 |
bb1340c2841750ddf05095f750abe8d8 | fac0cfc4535c0fbe4256f4e3f596de06 | 重新计算每个簇的质心,并判断终止条件是否满足,如果不满足更新各簇的质心,如果满足就返回true.len是数据的维数 | def update_clustering(weight, norm_data, clustering, means):
n = len(norm_data)
k = len(means)
new_clustering = np.copy(clustering)
distances = np.zeros(shape=(k), dtype=np.float32)
for i in range(n):
for kk in range(k):
distances[kk] = distance(weight, norm_data[i], means[... | 0 |
3beb7fc01deab95d7ebf7905601d2a37 | f7664ba6e7733dc97fbcfbcf4762e98a | 绑定展示联系人名片事件 | namespace ZZDWEBCMS.Conference
public partial class RouteTableEn : System.Web.UI.Page
private void BindContactPerson()
{
DataTable dt = dal.GetNameById(Request.QueryString["id"]);
DataRow dr = dt.Rows[0];
if (!dr["name"].ToString().Equals("SNEIA"))
{
... | 1 |
a0fe39312d1e36dd4f51968d55f3e097 | 6c807a3c87f5393255095ac788c4ec40 | 根据主键加载图文回复数据集 | @Service
public class InsNewsCmService extends BaseService<InsNewsCm>{
public List<InsNewsCm> getByReplyId(Long repId)
{
return this.dao.getByReplyId(repId);
} | 0 |
f65d864393ed3a0306cfcf29807a1326 | fb4187d7e01d96cc0ebd0d3a08f122b0 | makes a 3D box, size is the length in particles of the box, dispersion is how spaced they are, particleSize is how big, color is color, as a THREE.Color | function createParticles() {
for (var i = 0; i < particles; i++) {
var box = document.createElement('span');
box.className = masterShapes[Math.floor(Math.random()*7)];
box.className = box.className + " " + masterColors[Math.floor(Math.random()*3)];
box.style.fontSize = Math.floor(Math.random()*100) + 15 + "px";
box.s... | 0 |
6098ec0da65465620ca11f73878c33cc | 0994d0a3902b0ca43ebe7dc16d091692 | Event handler for user's cursor leaving the button labeled options. | {
if (mainControl.panelState == PanelState.OptionsOpen) {
mainControl.OptionsSlideOut.Begin();
mainControl.panelState = PanelState.Normal;
GuiController.GetController().ShowAllPanels();
}
} | 0 |
f559ffcbe73282f58a21790a322448a3 | 0a4c6f79edcc205b945187c40a5f3275 | 将实体挂接到场景中 | node = cityNode.CreateChildSceneNode();
foreach (Entity e in this.entities) {
node.AttachObject(e);
}
node.SetScale(this.scale);
node.Orientation = this.rotation;
isVisible = true;
} | 1 |
6888948d2d6e4cba8dd9b815367cd45c | bdbab72386d8c082ee4927e758aa0bc8 | Raises the Field Changed Event | {
if (this.Changed != null)
{
Changed(this, args);
}
} | 1 |
235dbcdef70cf2a5f76ad3763e80ec7e | 501eb1538b2da100d0a65c03ece36d3c | The type of a tag is determined by the first character of its id | switch (body.tag | 0) {
case 0 :
return 1;
case 1 :
case 2 :
return 0;
}
} | 0 |
9facb4ae81cbc072761083ec2b623b47 | 19fc765e0128410d868a163308a87e98 | Ensures f5-declarative-onboarding declaration copy directory exists | def do_declaration_dir_exists():
if not os.path.isdir(DO_DECLARATION_DIR):
os.makedirs(DO_DECLARATION_DIR) | 1 |
c67d62789ea4f452dd175f969f2b555b | 7d33be06bb8118be3370fbe94a630591 | # although this does not change the valeu of a global var | h<-function(x){
x<-2
x
} | 1 |
41770600c5da8d1fbd903f83f12cb855 | 474ac16f18fdef5e2bd9938b4dcc6136 | After seeing a remove token, remove the last added house from the simulation | public class SimFrame extends JFrame
public void killHuman(GameToken h)
{
int dir = h.getDirection();
int hx = h.getGridX();
int hy = h.getGridY();
humans.remove(h);
DeadHuman d = new DeadHuman(hx,hy);
d.setDirection(dir);
deadHumans.add(d);
cityPanel.add(d);
cityPanel.remove(h);... | 0 |
ef131e169820013614004d8895ed6526 | 725309c29f20700df7c5e1bec25afd25 | MEGAPIXELS TO lp/mm in the diagonal | f32 per_to_ppm(f32 per)
{
return per * 10000.0;
} | 0 |
3c63fdff3cf84069477a617eb800ded9 | d9f610909a42a4adb5b25757fdb81a88 | Returns whether the value of the '{@link com.ibm.ccl.soa.deploy.os.AIXLocalService#isStartupRunLevelSix <em>Startup Run Level Six</em>}' attribute is set.
<!-- begin-user-doc --> <!-- end-user-doc --> | void unsetStartupRunLevelSeven(); | 0 |
5712baf88ccfaaebdbf9fd7394cc6eb2 | 6fbc6035c88c4dac3d772524cb8b64eb | 获取省市区数据,从缓存中获取 | $data = null;
if($useCache) {
$data = Cache::get(CacheKey::AREAS);
}
if(!$data) {
$provinces = Area::where('parentid',0)->get(['id','areaname']);
foreach ($provinces as $province) {
$provinceArr = ['id'=>$province->id, 'name'=>$province... | 1 |
991fdde097c7dc113ea8a539f21ff58e | 808cd9a24677c30d43cb1d61912511d0 | Given a range and limits, fix the endpoints to lie within the range | function limit(out: Vector, min: number, max: number) {
if (out[0] > max) {
set(out, max, out[1]);
}
if (out[0] < min) {
set(out, min, out[1]);
}
if (out[1] > max) {
set(out, out[0], max);
}
if (out[1] < min) {
set(out, out[0], -min);
}
return out;
} | 1 |
773b0029d0e2312968f0ccd00ac70371 | f0be45a4faf4f6b474a4d91ab6984d30 | a pop up appears in CF if you attempt to navigate away without saving
only after changes have been made. This presses 'Yes' on that | if (!warning_changes) return true;
r = confirm('You have unsaved changes.\nClick \'Ok\' if you want to save them before leaving the page');
if (r) {
warning_changes = false;
$('edit_form').submit();
}
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.