query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
42b603fdf173295fc55601662804b513 | e1c0e6b2bb50b1930bfbbdbd2612de62 | 创建RoleDal数据层接口 | namespace XF.DALFactory
public sealed class DataAccess
public static XF.IDAL.IXF_Roles CreateXF_Roles()
{
string ClassNamespace = AssemblyPath + ".XF_Roles";
object objType = CreateObject(AssemblyPath, ClassNamespace);
return (XF.IDAL.IXF_Roles)objType;
} | 1 |
c0d6366082f8289e06532dd7bc2d7919 | 2bf8a6992dd2603809d77641cfcd2925 | Sets whether cookies are accepted for file scheme URLs.
Use of cookies with file scheme URLs is potentially insecure. Do not use this feature unless
you can be sure that no unintentional sharing of cookie data can take place.
<p>
Note that calls to this method will have no effect if made after a WebView or CookieManage... | namespace Elastos namespace Droid namespace Webkit namespace AndroidWebview
void AwBrowserProcess::SetAcceptFileSchemeCookies(
Boolean accept)
{
NativeSetAcceptFileSchemeCookies(accept);
} | 1 |
8a7556e77559d0826649e40409b19bec | d876e0775f4a5e0756fb64c20e29c3f1 | hiç bir filtre olmadan tüm kullanıcıları tabloya çekme | namespace MVC_Uygulama.Controllers
public class UyeController : Controller
public ActionResult Index()
{
MembershipUserCollection user = Membership.GetAllUsers();
return View(user);
} | 1 |
d278980558035970c711d3d9b092ec01 | 663d48a06d8dee910f19eeca19f01d52 | Reduction parameters for the FLITECAM Imaging pipeline. | self.input_file_pattern = None
self.CNN_encoder = None
self.fine_tune_cnn = None
self.CNN_ckpt = None
self.values_per_input_shard = 1200
self.input_queue_capacity_factor = 2
self.num_input_reader_threads = 2
self.num_preprocess_threads = 2
self.batch_size = 5
self.image_height = ... | 0 |
7d41fe7158f17de86b61e85dd8ef4c25 | ee7177c02f043b15381811f92f26cec5 | Envia la petició al servidor demanant la cadena de trasplantament
optimizada pel donant passat com argument afegint al llistat
corresponent el donant ignorat, el receptor ignorat o el resultat
positiu de la prova encreuada.
La petició tindrà en compte els llistats de donants i receptors
ignorats, la profunditat i els r... | public String daTransmision ( ); | 0 |
9d21ec8118fcabce0db866aa1795cfd9 | a59fd9b015f31e5aa58e7eae1e0b099f | 获取指定日期段内每天的日期 | public class DateTimeUtils
public static List<Date> getDaySection(Date start, Date end) {
if (start.compareTo(end) > 0) {
return Collections.emptyList();
}
List<Date> result = new ArrayList<Date>();
Calendar calendar = Calendar.getInstance();
calendar.setTime(start);
... | 1 |
54aad877957b91d764ca36db968a264e | 2de02d8718bba3847648759b2980aa71 | Returns a status report from the selected subsystem,
or a summarized report of all systems | class WorldSimulator:
def GetStatus(self, verbose=HIGH):
if verbose == LOW:
return {
"num of people in quarintine" : len(self.world.GetQuarantined()),
"num of people out of quarintine" : len(self.world.GetOutOfQuarantine()),
"num of peo... | 1 |
b02ad69bec50dd7bb2429c73c178ed24 | 29d92503874cb04025b8d29589b0dea0 | !
Addition with a scalar. | Vec1f plus(float scalar); | 1 |
8b56a2c8959eff0df72d830b1acb2d0a | 01f07f2503c4012abcbec958f04aabbc | Verify that using the HtmlSliceFormatter without passing
begin_line and end_line works identical to HtmlFormatter. | def test_unsafehtml_headerless():
expected = "\n".join(
[
"<table>",
"<tbody>",
'<tr><td>spam</td><td><font color="red">41.9999</font></td></tr>',
'<tr><td>eggs</td><td><font color="red">451.0</font> </td></tr>',
"</tbody>",
"</table>"... | 0 |
eb1605d0f5fe256b8b110a5ae7e331c1 | e3665b8c109875f1cea4ec6b437db265 | 导航设置-恢复默认 | function mobile_navigation_default(variable, findEl) {
variable.attr('data-show', '0');
variable.find(findEl).attr('data-active', 'no-active').next().attr('data-show', '0');
$('.manuals-nav').attr('data-focus', '0');
} | 1 |
a75324e27788a059dd3fbf8d573ce46e | 0f6f475fa15084cc6e86bdcd905444da | 发送ShowPage相关的信令 | function PokerMysteryStoreCtrl.sendShowRequest()
Log.i("PokerMysteryStoreCtrl.sendShowRequest")
local md5 = ""
if this.jsonTable then
local tmd5 = PLTable.getData(this.jsonTable, "body", "md5_val")
if not PLString.isNil(tmd5) then
md5 = tmd5
end
end
local jsonStr = this.constructShowJSON(this.channel_... | 1 |
2d9b2556c164ff47ed099513cbbd11b6 | ca229c440f663ec96644bd8ce00b914e | Returns the website status along with details like - UP/Down status,
uptime/downtime, URL and Average response time | hostname = request.matchdict['hostname']
read_data = readDB()
history_data = read_data.get_host_history(hostname)
service_data = read_data.get_host_services(hostname)
host_data = read_data.get_host_status(hostname)
uptime_percent = read_data.get_uptime_percent(hostname)
return dict(hostname ... | 0 |
d23b7868542462fddece70bfaa772511 | 51ab2639c57d01e2fd97960f22e42087 | 获取指定键的值,如果没有,则是null | if(key == null){
return getForNullKey(key);
}
HashMapEntry<K,V> e = getEntry(key);
return (e==null) ? null : e.value;
} | 1 |
03dee74dcbd67a31e81915de36af7a25 | 51adaebda79ccac8751c727b5f7bd88c | 选出小市值股票 | df = get_fundamentals(query(factor).filter(fundamentals.stockcode.in_(stocklist))).T
sorted_df = df.sort_values(by=df.columns[0], ascending=params[0]).astype("float")
sorted_df_quantile = sorted_df.quantile([params
[1], params[2]])
thres_1, thres_2 = sorted_df_quantile.values[0], sorted_df_quantile.... | 0 |
06b96a0f96eb632ed780facea74107da | 2fb8655bbf362f644ae6475fda217a71 | Check on button state and update circle color | if button.rect.collidepoint(x, y):
button.color = (100, 100, 100)
else:
button.color = (000, 000, 000) | 1 |
cca3115c8943767bafa704b76c046cc4 | 7e501a0708ce5ff3037aef42483ecfb1 | Get the type that corresponds to an objectId | FSqlFunction getRecordTypeId(Object objectId); | 1 |
4a7ff7a8e5a295ff1a8d92b5b4118b3f | f25e026f7193e2fc174ebb7e22c184b2 | матриця ХІ | {
try
{
int[] Points1 = new int[3];
int[] Points2 = new int[3];
int[,] matrix = { { 1, 0, 0 }, { 0, -1, 0 }, { 0, 0, 1 } };
Points1 = (Multiplication_Matrix(a, matrix));
Points2 = (Multiplication_Matrix(b, ma... | 0 |
064c126e88ebeee392081d83c2a5111a | dd8af6c09f071997ae601db16b7fd190 | 服务器异常带数据 | void showDataException(String msg); | 0 |
121feb1c3729f5d8d374b1c2622b344c | 2bac6444a65e9f0a032985a92f00c2ed | Apply the approximate feature map to X, only upto k features. | class KLDivergenceSelector(object):
def transform(self,
X):
X_red = X[:, self.top_k]
return X_red | 1 |
5fb1072bec36de3a84f50839bf85737d | 39b498c796166a1e75190df092ba9b67 | method that check given vm is power on or not. | class TestConoHaCmd(unittest.TestCase):
def test_power_on_vm(self):
self.check_arguments(self.cmd.power_on_vm)
table = self.cmd.power_on_vm(self.__server_id)
self.assertTrue(isinstance(table, texttable.Texttable))
print('\n' + table.draw() + '\n') | 0 |
5c676d571079ca1932263aa95ad637f1 | 033fe217142dfe813320b3afda7465b5 | Creates association between User instance and Event instance | class SubEvent extends Model
static associate(models) {
SubEvent.belongsTo(models.Event, { foreignKey: 'eventId', as: 'event' });
} | 0 |
a59083758440be051b9d54d5edbaeb6f | ba3afad50abde4adca6ad8def249109d | Logs info for a POST path | class LogReqRes implements SubscriberInterface
private function logPostOrInput()
{
if (!$this->debug->getCfg('logRequestInfo.post', Debug::CONFIG_DEBUG)) {
return;
}
$request = $this->debug->serverRequest;
$method = $request->getMethod();
$contentType = $request->... | 1 |
f380bfe03adf2e40df497472b4421b64 | aa711f180772be84f7074cc5d1c79333 | Add relevant styles to wp_head | wp_enqueue_script( 'header-shrink', get_stylesheet_directory_uri() . '/js/global.js', array( 'jquery' ), '1.0.0', true );
wp_enqueue_style( 'dashicons' );
} | 0 |
4740eaffa931f194c86a029fd9ce9bec | 58a8452cec2cfc315583116c248c9ee8 | 根据表单属性获取最大值 | namespace CommonService.DAL.CustomerForm
public partial class F_FormPropertyValue
public int GetMaxId()
{
return DbHelperSQL.GetMaxID("F_FormPropertyValue_id", "F_FormPropertyValue");
} | 1 |
e045f04ecbcb4715017f8392f1894241 | 3cc403b09a83a6e846c8a1980e519f98 | Find the lowest salary | namespace FirmDZ11_PetrovGN_
public partial class CommonWorkerList : Window
private void BtnLowerSalary_Click(object sender, RoutedEventArgs e)
{
Worker rez = workers[0];
foreach (var i in workers)
{
if (i.Salary <= rez.Salary)
rez = i;... | 1 |
a67e7e93e47d448434b66d759ee658f0 | 4952d31e4281668c4dc43b3a8d59f072 | 全局配置参数标签 | public ActionResult ConfigParameter()
{
ServiceController serviceController1 = new ServiceController();
var serviceName = System.Web.Configuration.WebConfigurationManager.AppSettings["SevicesName"];
var machineName = System.Web.Configuration.WebConfigurationManager.Ap... | 1 |
8719ae9d34ffa23239959ee10fdf0e5e | 03feecaa3e3b94579fa8594e914bf5db | Removes denomination quantity from particular denomination | public int countFor(final BigDecimal change, final Denomination denomination) {
final BigDecimal[] result = change.divideAndRemainder(BigDecimal.valueOf(denomination.get()));
return result[0].intValue();
} | 0 |
6856e829d94431368418f92b74d964bf | 8c4bdc57e4cf7d40862476056a122f89 | Getter for the player. This will return null if the player has not been spawned | IPlayHelper getPlayer(); | 1 |
ffa62d52c825d5e43cef93946d586bc7 | a9d307c0f75f6337514b803d6ca78ec8 | 创建艺术二维码 | class ArtisansController
def generate_qr
@qrcode = RQRCode::QRCode.new(artworks_path(:artwork_id), :size => 7, :level => :h )
end | 1 |
84b47cb111167a22b5a3d86cee9c5717 | fa16e80c832884be3af3ca3dcce3d9da | Prints the devices with their addresses on the given bus | for (int i = 0; i < this->c->GetSizeBusses(); i++) {
cout << this->c->GetBusses()[i];
}
} | 0 |
e5415f3cc83a8164ba94e71fe9257423 | 48ed7f31af1ea1abaa571da6dc774b48 | Gets the regional sql db storage configuration for a BAP environmentId or AAD tenant id | {
Contract.CheckNonEmpty(environmentName, nameof(environmentName));
var keyVaultUri = GetKeyVaultUri(environmentName);
return CreateGlobalDocumentDbStorageConfiguration(keyVaultUri);
} | 0 |
b33c0f7da5c16910aed87401732c06f9 | 6b54760f73ca5af88e2c4213d04bc11c | 关闭ChannelPromise的Channel,当完成后通知ChannelPromise | if (channel !== null) {
return channel.close();
} else {
return Q.fcall(function () {
return 'Channel is already closed';
});
}
} | 0 |
5094932cf6c2b49c88c01bc3efe6a06f | 3b41720fcc4e0ab0e81f818d465036f3 | Set do atributo Habilidade Reflexo | public class UC11_RegistarAcessorioController
public void setRef() {
this.acessorio.setRef();
} | 0 |
0cee3068182a1f581f41462701616b8f | a69bf61f09042dfb5af4c636501feb2e | improved (pocket) perceptron learning algorithm | def perceptron_learning(X, y):
X = insert_column(X, np.ones([X.shape[0], 1]))
w = np.random.randn(X.shape[1])
y_pred = evaluate_output(X, w)
while (y_pred != y).sum() != 0:
i = (y_pred != y).argmax()
w = w + y[i] * X[i, :]
y_pred = evaluate_output(X, w)
return w | 0 |
3f3fecac2c444fc6c15a16acaa566ba0 | f3087faaf517a8cd97f6c7d1be7bd545 | With this functionality business logic can get the first data block of
an query result set (from all records a query returns). | namespace Dapper.Web.DataAbstractions.SqlQueryable
dynamic First (); | 1 |
47ada1a634feb687286e7ea0681a3409 | a91eed1e7a6944c00e838f8a7dcc2f06 | 小程序体验者列表 | function receiveUserList(params) {
return request({
url: '/v1/experience/receiveUserList',
method: 'get',
params,
})
} | 1 |
d0a09858204d2c708192d6af67c0ba47 | ff7eea057eeb1944fd5eba3716348d89 | 打开相机,并传入相机参数 | class RxCameraView : FrameLayout, CameraViewImpl
override fun openCamera(config: Config): Observable<BaseEvent> {
this.config = config
return cameraImpl.openCamera(config)
} | 1 |
859c16132b93e2288a89db485ea22d7b | cf6bf07145914ddf5030aa49689afea0 | Muestra el formulario para subir los archivos INI_JUGA_HCP y JUGADORES que envia la AAG del Modulo Club mensualmente para luego
importar los datos de los nuevos jugadores y actualizar los handicaps de los existentes. | {
$equipos = Equipo::where('estado', 1)->get();
$categorias = Categoria::all();
return view('jugadorc')->withEquipos($equipos)->withCategorias($categorias);
} | 0 |
e4ca61abf54a4d919e853589156de4b6 | 9c7ac6ee1a36a77c44139dd3d9f241fe | 今月のカレンダーからイベントを取得する | {
$events = DB::table('calendar')->select('id', 'title', 'color', 'start_date', 'end_date', 'case_no', 'control_num')->where('user_id', auth('api')->user()->id)->where('start_date', '!=', null)->where('end_date', '!=', null)->get();
return $events;
} | 0 |
50a380d0c867276f081c5fa23bb16441 | 396cf620a6e8d36e1f408d0954d78757 | ===========================================================================
DESCRIPTION
Invoke FL activity cb to inform ARD that there is forward link activity.
The callback is then un-registered, so only 1 FL activity cb is invoked
until it is re-registered.
DEPENDENCIES
Must be called from HDRRX task
PARAMETERS
None.... | {
#ifdef FEATURE_HDR
ps_iface_type *iface_ptr;
iface_ptr = dshdr_an_get_iface_ptr();
ps_iface_disable_flow(iface_ptr, DS_FLOW_HDRAN_RLP_MASK);
#endif
} | 0 |
505d53752b50345615ca799ce2406aff | a24c782cad53013777bbfed15f195256 | Turns a local system filename into a URL by comparing it to the script
filename. | class NetworkResolver(etree.Resolver):
def resolve(self, system_url, public_id, context):
if '://' in system_url and system_url != 'file:///__diazo__':
return self.resolve_filename(system_url, context) | 0 |
1acaaad3240923684cb0412d80a6bc9e | 5e43078dbafc987df3a8157685b3f639 | @brief Returns the driving mode as string | ModeCfg::MODECFG ModeCfg::getMode()
{
return currentMode;
} | 0 |
61c992d9fdf3e60db2945fcc45c1c539 | a620b46aac019ec6ad0fc17b043f52da | Extract LEMME feature with TreeTagger. | String ttPath = writeFile(parsingText());
Process p = Runtime.getRuntime().exec(new String[]{"bash","-c", _treeTaggerParameter.parse() + " "
+ ttPath});
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(p.getInputStream()));
_ttOut =
... | 1 |
799d595d0ae856ca6bc265bf81f4a6e3 | 1136c018ce684091857ffe8fb288317a | Sets the global preferences object | namespace Agebull.EntityModel.Config
public class GlobalConfig : NotificationObject
public static void SetGlobal(IDesignGlobal global)
{
Global = global;
} | 1 |
6c3f9b0f16205222ea95fc90ef4ff7a8 | 02a96f342eb3bfdb94d4ae4418c96fc2 | <p>The number of seconds after which the system removes the object. Internally, the Object Storage system stores this value in the {@literal X-Delete-At} metadata item.</p> | @TransportCompatibility({Transport.HTTP, Transport.GRPC})
public class BlobInfo implements Serializable
public OffsetDateTime getDeleteTimeOffsetDateTime() {
return deleteTime;
} | 0 |
19fc7e8b850ea0f19903c88afb6e6866 | 2c303ac1d01cdcdc7c5c3d212ffdb3c5 | 设置动态客服B | public void demo5() throws IOException, InterruptedException {
Thread.sleep(2000);
webtest.click("xpath=//td[contains(text(),'客服2')]/../td[7]/a");
webtest.click("xpath=//input[@value='0']");
webtest.click("xpath=//button[@type='submit']");
baseLogin();
assertFalse(webtest.isTextPresent("客服2"));
adminLogi... | 0 |
96f6cf9e75aefa192dcbc3d6b6d006c7 | 260cb23cded001682edd6a242e908806 | 获取DataSign。 | DataSignRequest request)
{
var result = await Http.PostAsync<
DataSignResponse,
DataSignRequest>(
$"{Option.BaseUrl}/v1/dataSign", request
);
return result;
} | 1 |
f4033f18abf67f8512ae9bad489eab5f | 1ff92811773f9967c5124d2c68198cbf | Iterates over dict actions by requested interface. | namespace Xdoc.Api.Controllers
[Route("Api/Log")]
public class LogController : BaseApiController
[HttpPost("UserInteraceActions"), ProducesDefaultResponseType(typeof(SearchUserInterfaceActionsResult))]
public Task<SearchUserInterfaceActionsResult> UserInteraceActions(SearchUserInterfaceActions model)
... | 0 |
793379b4517f0f975f036e04b0db2371 | f8f15448978e03e28b55b6adbbb0bfc3 | Called on completion of any requests the driver itself submitted for
EP0 setup packets. | void onDriverRequestCompleteSuccess(); | 1 |
50b31fae0c2a42b041fe29bfea0b0e75 | d4f8a0bf370d254d85493a8020440215 | Define u plano de fundo pré-definido à página de acordo com o tema de skin escolhido. | class ThemeHolder extends Page
function BgColor() {
return 'black';
} | 0 |
168006df1009331850e747b882aaf95f | 5e184de123ff1b76d84d2ada6bb43cc3 | Generates self.__graph_dict from 'graph_dict'. | class Graph:
def __generate_adj_dict(self):
res_dic = {}
for key, val in dict(self.graph.adj).items():
res_dic[key] = dict(val)
return res_dic | 0 |
e4763e126f07fcb0c1436612c6b3c3ab | f65bc0863bbf96b3df0d290e4d435208 | Disables field caching, and causes each field fetching to fetch the actual up-to-date value from the system | @NotNull
RequestBuilder disableCaches(); | 1 |
1092c97e2d2b99ba2c03b626e269e91a | 9b5f88270411af20e79de8bd03d20d55 | Manually overrides the DeepSpeed engine's gradient accumulation boundary state, this is an optional
feature and should be used with care. The state should be set before to the intended
value before each forward/backward. The final forward/backward should have the
boundary state set to True. This style allows client cod... | self,
grad_clip_params: Dict = None,
accumulation_steps: int = 1,
optimizer_key: str = None,
loss_key: str = "loss",
decouple_weight_decay: bool = True,
weight_clamp_value: float = 0.01
):
super().__init__(
grad_clip_params=grad_clip_params... | 0 |
3669799d2daf35f7be62c3890c3aa3a5 | 5b78eceb7aca7b1633b29f6bce6cb4d4 | Replace editor selector for the lightboxes so we can select the TL Element which is outside #tve_editor by default | class TCB_Landing_Page extends TCB_Post
public function ensure_multi_lightbox( $lb_id_map = array() ) {
$lightboxes = $this->cloud_template_data['lightboxes'];
$post_content = $this->meta( 'tve_updated_post', null, true );
foreach ( $lightboxes as $lb_id => $lb_data ) {
if ( isset( $lb_id_map[ $lb_id ] ) )... | 0 |
a09035d496b2c2252eeed76ae50a37f6 | dee358fbc6e06642deeea7daeb7b8abf | 校验纯中文 | class ValidateBuiltin extends StaticComponent
static function chs($value): bool
{
return self::regex($value, ['chs']);
} | 1 |
76523ebf1190820ff776b998caec38d8 | 1032e36e153721a84d0fec1bdc67893f | 同步课程列表到Elasticsearch中 | class Annualplan extends CI_Controller
public function syncourse($planid){
$this->isAllowPlanid($planid,false);
$acourses=$this->annualplancourse_model->get_all("company_code = '".$this->_logininfo['company_code']."' and annual_plan_id = ".$planid);
foreach ($acourses as $ac){
$c = a... | 0 |
36a34ef323a56bd5180eddef174e8319 | 52d5597b5d3fb1e58451a2a37ee2df68 | 获取 服务语种 字段:yt_touristAgency.WZ_LANGUAGE | public class RestScheduleConfDTO
public String getLanguage() {
return language;
} | 0 |
08ac869456d10aa95f0bab6edb9ebdc1 | 2688a983cf60feb248dd9dabe32be6ff | Funcion la cual llama al procedimiento para convertir una remision en
factura | def remision(num_remision):
cursor_remision = connectiondb.cursor()
sql_remision = """SELECT * FROM Remision
WHERE num_remision = '%s'""" % num_remision
cursor_remision.execute(sql_remision)
remision = cursor_remision.fetchone()
cursor_remision.close()
remision['sub_total'] ... | 0 |
231cb05bdd9586209180434ebc3853ff | 0bcb0911694af1b3ca0a745a7c33d35e | 单场战斗专用播录像 | class GameSound
public static playBattleEffentSound(frameEvent){
if(!frameEvent) return;
var index:number = frameEvent.indexOf("_v");
if(index ==-1)
index = frameEvent.indexOf("@v");
if(index>-1){
let name;
if(frameEvent.indexOf("v10")>-1){
... | 0 |
a0c6072cbc10dc9263938b3c148cd97a | 81455f1d2c8c7090b2a0a4cbefd53492 | 根据文本图像创建一个rect,并将其center属性设置为按钮的center属性 | export class UISkin
public static getRoundRectText(w: number, h: number, c: number, str: string = "click"): Sprite {
var s: Sprite = new Sprite;
s.addChild(this.getRoundRect(w, h, c));
var text: TextField = new TextField;
text.name = "text";
text.text = str;
text.x = (s.width - text.width) >> 1;
te... | 0 |
dccd6fcf28c4bc8ef5371364a7368275 | 34210e7eb73f65ebdb4310c08db6bca6 | Test result is independent of order of sea/land handling. | class TestExPlot(unittest.TestCase):
def testSeed(self):
r1 = ep.evaluate(experiment, x=range(100), repetitions=2)
r2 = ep.evaluate(experiment, x=range(100), repetitions=2)
self.assertNotEqual(list(r1.values.flatten()), list(r2.values.flatten()))
r1 = ep.evaluate(experiment, x=range(100)... | 0 |
feeaf81a794095fd2ce2b0c9029f3743 | 551c04003fd744056b699f27a6e406ce | geef een lijst van rubrieken op basis van een zoekterm. | public List<Rubriek> findAlleRubrieken(); | 0 |
6800799cf88aa00b73ffe26406811c9c | 7ec19bb8030dcaef7a2dbba1c3feb6b4 | Bans the player for the specified reason and duration | class RconClient(object):
def ban(self, uniqueid, duration=0, kick=True):
if kick:
self.command("banid", duration, "%s" % uniqueid, "kick")
else:
self.command("banid", duration, "%s" % uniqueid) | 0 |
1988c1e9158e685d8f71a3646bc0cf08 | b48931e928814ad152c3937904ba2169 | 将字符串类型的键值对保存到Redis时调用的远程方法
正数表示过期时间分钟数
0和null值不接受 | @RequestMapping("/redis/set/kv/remote/timeout")
ResultEntity<?> setKeyValueRemoteWithTimeOut(@RequestParam("key") String key,
@RequestParam("value") String value,
@RequestParam("time") long time,
... | 1 |
9fa967b1f69fff3201b74a5cabace1d4 | be8e495bd5f611d2dd8d43aa90a45abe | 将输入的一个字符串 拆分成两个子字符串 | void split(string &str, string sep_char, string &str_bef, string &str_aft)
{
size_t found;
size_t length;
int loc;
char buffer[5000];
found = str.find(sep_char);
if (found != string::npos)
{
loc = int(found);
length = str.copy(buffer, loc, 0);
buffer[length] = '\0';
str_bef = buffer;
length = str.co... | 1 |
f16f8f22648fc806de74614db92d9791 | 03525061168022630f1b699775954e94 | Errors like invalid graphics state which go to the REPL stderr will come back
in an Microsoft.R.Host.Client.RException, and we don't need to do anything with them,
as the user can see them in the REPL. | class RandomPlayerAI extends _battlestream.BattlePlayer
receiveError(error) {
if (error.message.startsWith('[Unavailable choice]')) return;
throw error;
} | 0 |
b24e8148cad61c99330ccdc19d4d4a51 | 434a8418c8ff6760e16bc85d7e8a6ffd | 使用ByteBuffer 把int转换成byte数组 | final byte[] arr = new byte[4];
arr[0] = (byte) i;
arr[1] = (byte) (i >>> 8);
arr[2] = (byte) (i >>> 16);
arr[3] = (byte) (i >>> 24);
return arr;
} | 0 |
8b4273b465c9ec05d590dc4445d47193 | e163472f752d0920d320cec1367df15b | Generate a string of parameters to send to Authorize.net | {
$requiredParams = ['amount', 'currency', 'accountId', 'description', 'email'];
if ($this->getFingerprint()) {
$requiredParams[] = 'fingerprint';
} else {
array_push($requiredParams, ['browserIp', 'browserDomain']);
}
$this->validate();
$card ... | 1 |
828b0c58369bfa62d011663d46aba8fe | a6bf6422772eb93e50a6eddb9d948023 | 根据网址获取虚拟路径 | namespace Common
public class ConfigurationHelper
public static string MapPath(string virtualPath)
{
if (String.IsNullOrEmpty(siteroot))
{
siteroot = System.Web.Hosting.HostingEnvironment.MapPath("~/");
}
string path = siteroot + virtualPath;
... | 0 |
b09ef4be2615045eaa0dba465b6b5875 | 1a0b389268089b59164d18d6414850d5 | Allocates the structures saving the contents of the clustering main data structures used for clustering and properly initializes them. | self.__pointer_data = data
self.__number_clusters = number_clusters
self.__similarity = link
self.__verify_arguments()
if self.__similarity is None:
self.__similarity = type_link.CENTROID_LINK
self.__clusters = []
self.__ccore = ccore
if self._... | 1 |
0b757820391d81fba2ded87bfed987de | fd176ecddcfd7b01cab949de01365b35 | 获取楼层发布记录 | public class PostModuleNGTest
@Test
public void testGetFloorInfo() {
System.out.println("getFloorInfo");
String post_id = "27";
String begin = "";
String end = "";
List expResult = null;
List result = PostModule.getFloorInfo(post_id, begin, end);
} | 1 |
bef09d8a478586c137a8f2be6cfa9a11 | 708d03984c8a7a079b40b68be8013c63 | Make sure the FTP host directory is an absolute path. | if (self::$ftpChroot === false || self::isRelative($dir))
return $dir;
else {
$replaced = str_replace(self::$ftpChroot, '', $dir);
if (!preg_match('/^(\/|\\\)/', $replaced))
$replaced = DIRECTORY_SEPARATOR.$replaced;
return $replaced;
... | 1 |
fd7adbd15804422066b4e8c081e35807 | 407d604733ca6afb18000c90c3fa9494 | POST /time_windows | @timeframe = Timeframe.new(timeframe_params)
respond_to do |format|
if @timeframe.save
format.html { redirect_to @timeframe, notice: 'Timeframe was successfully created.' }
format.json { render json: @timeframe, status: :created, location: @timeframe }
else
format.html { rend... | 1 |
92200c6ff8482179cf1abd2d2f5f8d88 | 78d435bce28c8d6bc7c67410a2b54af4 | 信息流创意信息写入redis | getbaseinitBannerToRedis({ }, postdata) {
return base.baseinitBannerToRedis(global.baseinitBannerToRedisPath, postdata)
} | 1 |
9ff2516711da0b4e47f6eb74bb7cafd5 | cea4cb8c571fffe7ec551884c8bf56e4 | Command handler - always forward | BOOL CFrmMain::OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo)
{
if (m_wndView.OnCmdMsg(nID, nCode, pExtra, pHandlerInfo)) return TRUE;
return CFrameWnd::OnCmdMsg(nID, nCode, pExtra, pHandlerInfo);
} | 1 |
d871aef7dc686487736ee73dc4bec76e | 903c06effddd510e55286b3121c1c69b | 最大値とそれのインデックスを返す | def maxVec(vec):
MaxVal = max(vec)
return MaxVal, vec.index(MaxVal) | 1 |
f5c655ba1a07b3fe5543b9f7d844ddfe | 61d96c7d3ae4b77382a02b81f3888e5d | 将系统配置的需要校验验证码的URL根据校验的类型放入map | @Component("validateCodeFilter")
public class Filter extends OncePerRequestFilter implements InitializingBean
private Set<String> getRequireTypes(HttpServletRequest httpServletRequest) {
Set<String> result = new HashSet<>();
String requestURI = httpServletRequest.getRequestURI();
if (StringUtils... | 0 |
d371b7de4051c79e4be8872deef6f2e2 | cf9bf2598e6b8e7c562c6df9a8a76dbc | 生成Webconfig的machineKey元素 | namespace CodeProject.XmlDSigLic
class ExtractPubKey
[STAThread]
static void Main(string[] args)
{
CspParameters parms = new CspParameters(1);
parms.Flags = CspProviderFlags.UseMachineKeyStore;
parms.KeyContainerName = "CodeProject";
parms.KeyNumber = 2;
RSACryptoServiceProvider csp ... | 0 |
073f16343ad24b18d6d17e7b85f5de65 | 95a91a94cfb355e9d324c464161c091d | Test case for icons_get | async def test_get_icon(
input, tvliftbox, hass: HomeAssistant, caplog: pytest.LogCaptureFixture
) -> None:
caplog.set_level(logging.ERROR)
feature_mock, entity_id = tvliftbox
feature_mock.query_string = input[0]
_ = await async_setup_entity(hass, entity_id)
state = hass.states.get(entity_id)
... | 1 |
c59530ecc67f5acc73b9ff6f623c652e | e2651f39ef8cf0065f8d79845877939a | Test case for start_post | def test_post():
robot = RobotPost(r'ABB_RAPID_IRC5', r'ABB IRB 6700-155/2.85', 6, axes_type=['R','R','R','R','R','R'])
robot.ProgStart(r'Prog1')
robot.RunMessage(r'Program generated by RoboDK 3.1.5 for ABB IRB 6700-155/2.85 on 18/05/2017 11:02:41', True)
robot.RunMessage(r'Using nominal kinematics.', T... | 0 |
1af684fa7bfc47b5f478c328af5db987 | f09e970411dc52820917d95fc9cf9f33 | This will return the index of the last point where the numbers were decreasing.
If the numbers just keep decreasing and the pattern doesn't change, then -1 will
be returned. | {
int pointCount = aDataSet.getPointCount();
int end = pointCount - 1;
while (end>0 && !isArrayValueAtIndexInsideOrInsideAdjacent(aDataSet, end, pointCount, aMin, aMax))
end--;
return end;
} | 0 |
ab131c5a2c755b09efea633e039fe150 | cb4eb54309b69832d1147595379be58f | Handles teleporting to various runecrafting altars. | if (!RunecraftTeleport.forId(object.getId()).isPresent()) {
return false;
}
RunecraftTeleport teleport = RunecraftTeleport.forId(object.getId()).get();
Teleportation.teleport(player, teleport.getPosition());
return true;
} | 1 |
b536ba34a5857404ab93a1cb025b3a2a | a3146886105ebc07a907debd3a08fb11 | 成绩列表筛选函数 | var periodIndex=$('#periodIndex').val();
var columns=[
{ display: "员工", name: "staffName", width: 100, minWidth: 60, type: "string", align: "center" ,align: 'center'},
{ display: "分数", name: "score", width: 50, minWidth: 50, type: "string", align: "center" ,align: 'center' ,
editor: { type:'text'}},
... | 0 |
d9af7cbcb79971d67b2ea2ae886a8cfb | 0ebf0a27a67fe2f9bf8425207bbeaa00 | 路由激活时的回调函数 | if (!routeState.activeRoute) return;
var stack = this.middleware[routeState.activeRoute.path] || [];
stack.forEach((fn) => {
fn(routeState);
});
} | 1 |
be9f612e45bc2e82e4540e1fb1551e9f | 6f538d63ad2a61aba43ae3adff020a15 | The value indicating whether to send or request a MDN. | export class ServerState
public setRequesting(requesting: boolean) {
this.requesting = requesting
this.number = !requesting ? this.number + 1 : this.number
} | 0 |
3310cdb846954f7d6861ab63f34dca17 | bec75bd62e5d3c205e073ca15fa6f460 | Should match when no key names specified | keys_to_filter = ['foo8']
expected_dict = {}
self.assertEqual(
dicts.filter(self.dummy_dict, keys_to_filter), expected_dict) | 0 |
f428ff92a886cb94e495419c38a66a78 | 4363b167e8211dd4fa4194bb9b54e237 | Validate the parameters for VAR model | class GaussianMixture(EMfitMMMixin, MixtureModelMixin, BaseEstimator,
DensityMixin):
def _check_parameters(self, X):
if self.covariance_type not in ['spherical', 'tied', 'diag', 'full']:
raise ValueError("Invalid value for 'covariance_type': %s "
"'... | 0 |
55309f70e03cf1ece2625d2965c1d7db | eb992acc7f78a58717767a3fefb07a8d | развитие жизни--------------------------------------------------------------------------- | function lifeSystem () {
info.setLife(10)
} | 0 |
b58ebbb9d385f5ae9ca7474d3bd31ed2 | 2de1aec652a680942b384cba06499ab0 | Returns the meta object for the attribute '{@link areva.Element#getRating <em>Rating</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getService_Rating(); | 0 |
a1c9c32a6c74d775b021ced82b0fa898 | 2a2a511d2c52990c89b8fb9ef5132c0e | Given coordinates in Tuple form, returns the Place at that location | class World:
def get_location(self, pos):
if pos not in self.locations:
loc = Location()
self.locations[pos] = loc
if self.p_food > 0:
loc.place_food(self.p_food)
else:
loc = self.locations[pos]
return loc | 1 |
fb908642a89f8300a06b6821e6ee6ed9 | a7b723ddd90591a38e09ec1d55fc0420 | separates the input vectors from their target outputs | def seperate(theta_all):
W_1 = np.reshape(theta_all[0:features*length_hidden],(length_hidden,features))
B_1 = np.reshape(theta_all[features*length_hidden:features*length_hidden + length_hidden],(length_hidden,1))
W_2 = np.reshape(theta_all[features*length_hidden+length_hidden:2*features*length_hidden+length_hidden]... | 0 |
590039077a621ebac93d1cf756ece234 | b7bc62d58d2255c6f9881f2e06b01d57 | Returns a list of patients by date of birth.
Input:
DOB (str): patient's date of birth
Output:
jsonfile: list of patients found in json format | @Path("findByDob/{dob}")
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public List<Resident> findByDob(@PathParam("dob") String dobString) throws ParseException {
SimpleDateFormat dobConvert=new SimpleDateFormat("yyyy-MM-dd");
Date dob=dobConvert.parse(dobString);
... | 1 |
c4ebddcac4f380d3319b4ecd0b825e3e | 4293e32fe8f41b3a7338a0f501a5fdf5 | Returns all possible tag paths for a given input | List<String> paths = new ArrayList<>();
List<Integer> tagIDs = new ArrayList<>();
List<Integer> fileIDs = new ArrayList<>();
////////////////////////////////////////////////////////////////
if (Tag.size() == 0) {
return paths;
}
SQLiteDatabase db = getDatabase... | 1 |
fe76e07360051f0459e0cb870518e940 | f5887ef169355f7e1f91f0a634ca8f10 | Assuming time is always denoted as xx:xx | def Time(timestr):
time = 0
time += float(timestr[1:3])/24
time += float(timestr[4:6])/24/60
time += float(timestr[7:11])/24/60/60
return time | 0 |
1dbed971d8714f4e3e5df40292d0419e | ff85bb4227f6cb853b1fd88e4d10026c | Decoder that computes the implicit intersection between two state vectors.
Takes a simple element-wise min. | s = np.asarray(s) / np.linalg.norm(s, axis=1, keepdims=True)
q = np.asarray(q) / np.linalg.norm(q, axis=1, keepdims=True)
distances = 1. - np.dot(s, q.T)
return distances.min(axis=0) | 0 |
0c8695cf8680e173f87793ccf6a17fca | f23103bbd4d6cb6f5b6abb70b12bf520 | 画面上のセレクトボックスで選択した自治体の自治体情報でフォームを更新 | feature = evt.feature;
flug = 1;
table = '<table>';
table += '<tr class="parameter"><td>町名</td><td>' + feature.attributes["MOJI"] + '</td></tr>';
table += '<tr class="parameter"><td>人口</td><td>' + feature.attributes["JINKO"] + '</td></tr>';
table += '<tr class="parameter"><td>世帯</td><td>' + feat... | 0 |
36af934818863627d0f1b476ccdc494d | b655b29aabb71ef75e61ee3b8acee470 | 用于做测试的方法 | class IndexController extends Controller
public function test()
{
} | 1 |
a7915e245ad7281c2fdc2bbbac4cff40 | 2f2e3f8e99364da856af8d331c4859f4 | metoda za azuriranje vozila u bazi | namespace RegistarAutomobila.Forme.Ažuriranje
public partial class FrmAzuriranjeMarke : Form
private void AzurirajMarku()
{
MarkaAutomobila selektiranaMarka = new MarkaAutomobila()
{
Id = this.ŠifraSelektiraneMarke,
Naziv = this.NazivSelektiraneMarke,
... | 0 |
d86aa2ec95474ab762cc90badd460b45 | 9af0f176c49ff481463dfd9a5eab2e51 | Convierte el objeto a 'int' base 10.
Se usa en slices, entre otros. | namespace SGBDynamoLibrary
public class StringOperator
public static int ObjectToInt(object expression)
{
return ObjectToInt(expression, 0);
} | 1 |
4e0e17a201f9f4bf0cd3b34c0174b80a | 6b3e0fb61a5baae97e56fe9b8cbdf1f6 | Return log(v[0]+v[1]+...), avoiding arithmetic underflow/overflow. | def _log_add(*values):
x = max(values)
if x > _NINF:
sum_diffs = 0
for value in values:
sum_diffs += 2**(value - x)
return x + log2(sum_diffs)
else:
return x | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.