query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
d8f0d2e59e4cdee44a86bd0efe291ff2 | 7563eac70461f764417c5dba21f98932 | Returns whether this ticket type is visible to specified user group. | public function isVisibleFor($login); | 0 |
3a9e5bbac3d87cc4ad0631743d5d24ea | 7b83e9fbe4790ef068ccc3a094ab7e23 | 0-forceless, 1-normal, 2-protected | char do_force_mode(char *opt) {
if (opt[0] == '+') opt++;
else force_mode_off = force_mode_on = 0;
char *op = opt;
char c;
int *word_to_set, *word_to_notset, bit_to_set;
while ((c = *op++)) {
if (c & 0x20) {
word_to_set = &force_mode_off;
word_... | 0 |
642db36176e7a4119702cd6c08da6e5b | d1929d16bbc267635db103211f7480cc | 将合并范围字符转换为偏移后的新范围字符 | local num = #str
local result = ""
local charNum = 0
local addNum = 0
local startBtye = 1
local currentIndex = startBtye
count = count+1
while currentIndex - startBtye < num and (addNum <=count)do
charNum = charNum + 1
local char = string.byte(str, currentIndex)
local temp = chsize... | 0 |
8e2d18d7e0de675add31b1187d4f7d42 | b5f1783197e1c65c369814d80f1999a3 | Return descriptive information about this Service implementation and the
corresponding version number, in the format
<code><description>/<version></code>. | @Stateless
@WebService(
name = DioscuriArjMigration.NAME,
serviceName = Migrate.NAME,
targetNamespace = PlanetsServices.NS,
endpointInterface = "eu.planets_project.services.migrate.Migrate")
@MTOM
@StreamingAttachment( parseEagerly=true, memoryThreshold=ServiceUtils.JAXWS_SIZE_TH... | 1 |
202c4b443f10b412ca36d4807448ccd6 | 72071f67cdc0158b82d385deac933c7a | 获取接口地址:合同查看接口 | static getContractInfo() {
return httpUrl + "/yyht/getContractInfo1.0";
} | 1 |
c4d985e5c0ae9b7890e428a48cfc678d | 6a4b3670052672c40d0cc9e578498924 | Toteuttaa ratkaisun poiston perumisen. | public class AlustaNopeusViesti implements Viesti
@Override
public void otaVastaanVierailija(ViestiVierailija k) {
k.vieraile(this);
} | 0 |
ae3db354ce0ef8f382800d9702d68469 | 33d792c589b88b0bcf74f0c60f6780dd | Fires a PUT request to the specified URL path of the base URL with the specified request data. | export class HttpHelperService
put(url: string, body?: any, options?: any): Observable<any> {
return this.http
.put(API_BASE_URL + url, body, this.requestOptions(options))
.pipe(catchError(err => this.catchError(err)));
} | 1 |
100374c01419a7f4cfb06e66cbc80982 | 55f17b739de5c6f8eb255d3dfb8b1b5d | 如果是存在Object.create方法,那么__data__是通过Object.create(null)的方法创建,不会有原型链。
所以直接去key值就好。这里可key值要求的是本身自带的,不是通过原型链获取的值。 | var data = this.__data__;
if(nativeCreate){
var result = data[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty.call(data,key) ? data[key] : undefined;
} | 1 |
df7bce60c0165d0b9e2397e9daae2c6a | 08913b273420b8b7a87a6044acbe5b70 | Save命令的Excuted事件处理函数 | namespace GraphDB.Tool
public partial class ConfigWindow
private void SaveCommand_Executed(object sender, ExecutedRoutedEventArgs e)
{
try
{
myGdb.SaveDataBase();
}
catch (Exception exception)
{
MessageBox.Show(excep... | 1 |
a903331628d1784f026573dfc3934f7c | 6f92f22f966ad5beb8dd959276e782cd | Creates Explore Data Structure | struct expfs *
get_expfs(void)
{
struct expfs *xf;
xf = malloc(sizeof(*xf));
if (xf == NULL) {
return NULL;
}
memset(xf, 0, sizeof(*xf));
TAILQ_INIT(&xf->xf_dirl);
return xf;
} | 1 |
d09fbb7f9c51d83e6f070fc639ad3944 | 39082cb8eb4c5d6631f957d1122a0398 | 測試一篇文章能夠辨別相同的標題,並產出不同的title、slug. | class SeoBehaviorTest extends CakeTestCase
public function testDisambiguateSlugsWithCommonTitles() {
$createGenericContent = array(
'GenericContent' => array(
'title' => 'Running a Test',
),
);
$this->GenericContent->create();
$this->GenericContent->save($createGenericContent);
$... | 1 |
537018a25382ab5efee45ccf9be0e121 | 1011a21c755333908ff63e47296fe856 | Checks the SD card, initializes it if not already, and draws the status icon. | void init_SD(void)
{
disk_initialize(0);
mount = f_mount(&FatFs, "", 1);
switch(mount)
{
case FR_DISK_ERR:
while (!(mount==FR_OK))
{
draw_text("FR_DISK_ERR",10,20,Tahoma7,1);
glcd_refresh();
}
break;
case FR_OK:
draw_text("FR_OK",10,20,Tahoma7,1);
glcd_refresh();
_delay_ms(1000)... | 1 |
7cea4babd35fcca71f63bd2e06578426 | 2213ec346452f59722af32fd53ebbb27 | Считается ли текущий раздел админстративным? | {
$adminPaths = static::config()->get('admin_url_paths');
$adminPaths[] = AdminRootController::config()->get('url_base') . '/';
$adminPaths[] = 'dev/';
$currentPath = rtrim($request->getURL(), '/') . '/';
foreach ($adminPaths as $adminPath) {
if (substr($currentPa... | 1 |
b2c79cb4fcbb7217b102a9565b6ea3bc | 8a25ce209e353aba24165881cf765983 | Erase any existing saved combustion mixture if detonation gas type changed. | fuselage = aircraft.fuselage
battery = aircraft.battery
battery.c_g = fuselage.c_g
return | 0 |
5200d279489f25e6b3a55bf53471dfb5 | 753b28dcc30979901882247c0a2b36ab | Returns the random consistency index (RCI)of the matrix | def compute_RkCC(CM):
rows, cols = np.shape(CM)
RkCC_numerator=0
for k_ in range(cols):
for l_ in range(cols):
for m_ in range(cols):
this_term = (CM[k_,k_] * CM[m_,l_]) - \
(CM[l_,k_] * CM[k_,m_])
RkCC_numerator = RkCC_numerator +... | 0 |
1d7870a6b79f79c1703d06eb9312f59c | ff93edaee06c65384ae3f364447c9e52 | Test if there are virtual nodes | if 'virtual' in node_desc:
virtual = node_desc['virtual']
return virtual
else:
return False | 1 |
211e70a14a647fdc8906dddde472c738 | faccb8347588bf985d9b8adfe546aa5f | Getter for accessDevice | class UserPolycomPhoneServicesModifyRequest extends \CWM\BroadWorksConnector\Ocip\Models\C\OCIRequest
public function setAccessDevice(\CWM\BroadWorksConnector\Ocip\Models\AccessDevice $accessDevice)
{
$this->accessDevice = $accessDevice;
return $this;
} | 0 |
64df5a105608c8e87cef115358d1cfa8 | 73f239f6c3807946f82df45a98d987e4 | make sure no objects were modified during a test | objs = self.get_created_objects(service_manager, VirtualServer)
assert 1 == len(objs)
assert objs[0].name == 'vs1'
self.service['virtualServers'][0]['name'] = 'virtual2'
objs = self.get_updated_objects(service_manager, VirtualServer)
assert 1 == len(objs)
assert o... | 0 |
f0a6ed41d38b814670cc91725c9685f4 | 1c3e5dbd4d3c0679d0eeb07cba0c9238 | Downloads a single file from the torrent network. | let extra = download_file.as_ref().extra().ok_or(NO_EXTRA)?;
let signal = OBSERVER.subscribe(&extra);
self.tdlib_client
.send(self.get_client_id()?, download_file.as_ref())?;
let received = signal.await;
OBSERVER.unsubscribe(&extra);
match received {
... | 0 |
7757836a6d73f198c188a82b66a94ea3 | e61424ffbf96df9bf5b1d4c8b3ad05da | 读取hdfs上的csv文件,返回pandas的DataFrame | def readonecsv(filename):
df = pd.read_csv('/home/hadoop/sdl/hdfs_data/61/{}'.format(filename), header = None)
df.columns = ['tdid','pkgName','is_active','type','type_code','frequecncy','appHash']
return df | 1 |
7afe3230a78e7812d53df559e731bf6d | 20c3e2b13ae7bef11f23fb63211610e2 | 通过数组定义来引用类,不会触发此类的初始化 | public class App
public static void main(String[] args) {
System.out.println(SubClass.value);
SuperClass[] sca=new SuperClass[10];
System.out.println(ConstClass2.HELLOWORLD);
} | 1 |
89d4399cf4c17e277ce1b819fc79ca0a | 5082a893fc383bbb6444c962617f24d4 | 更新学员签到记录并且更新长期班卡票剩余次数 | public class DatabaseManager extends SQLiteOpenHelper
public void updateClassesSignIn(String classNum){
String sql = "select sign_in_times " +
"from classes " +
"where num = ? ";
Cursor cursor = mSqLiteDatabase.rawQuery(sql, new String[] {classNum});
int times = 0;
if (cursor.moveToFirst()) {
do {
... | 0 |
89ad9b08b8ba9a72672e214a0bc71750 | 230fa282f232149cc40f140872a6b52e | turn on/off oscillator
on - boolean, Osc on if True, else - Osc off | {
struct dib7000p_state *state = demod->priv;
return dib7000p_write_word(state, 212, 0x169 | ((!onoff) << 2) );
} | 1 |
6e5c7d2a3d28d53abcf67c544768d724 | 7f0bfc2645011a37ddbd48c568158f65 | @brief Get first entry from the TX packet generator table. | CMD_STATUS wrCpssPxNetIfRxPacketTableGetFirst
(
IN GT_UINTPTR inArgs[CMD_MAX_ARGS],
IN GT_UINTPTR inFields[CMD_MAX_FIELDS],
IN GT_32 numFields,
OUT GT_8 outArgs[CMD_MAX_BUFFER]
)
{
return wrCpssPxNetIfRxPacketTableGet(inArgs,inFields,numFields,outArgs,
GT_FALSE, 0);
} | 0 |
6d205e2e653b848f50ce806c3a990a0a | 9838e51979232db942a35eeb793f3223 | Tests if whitespace in columns are preserved when saved to a file. | contents = "A\n\n1"
expected = [
{'A':''},
{'A':'1'}
]
with open(test_filename, "w") as f:
f.write(contents)
assert read_csv_file(test_filename) == expected
os.remove(test_filename) | 0 |
4f0da583185bd87a57e8220b962ba2d5 | a6ee5ecb169baba1c07d6aff20f1bc9c | Stream file and close server on success or error. | class TCPClient:
def close(self, filename):
file_uploaded = False
if filename in self.open_files.keys():
request = self.__get_directory(filename)
if re.match(self.SERVER_RESPONSE, request):
self.__unlock_file(filename)
params = request.splitlines()... | 0 |
15053fc8e48d362fb994e1aceec0f479 | 150f5384a02d08a0fe9327b96b48dfe8 | Creates a structure that defines the optional arguments of a function. Used for type checking. | public static A ArgList<T, A, R>(this Function<T, A, R> function)
where A : struct
=> new A(); | 0 |
e062f63ce3900047b753fc8d199cb3de | 80e3d5236c792e797b8807fe7a366ede | Indicates whether the refresh argument for this handler has been
set to yes. This is used to force a refresh of the cached graph so
that we don't show inconsistent state to the user.
Returns:
a boolean indicating whether this handler should refresh the graph | class DataActionResponse(object):
def refresh_query(self, refresh_query):
self._refresh_query = refresh_query | 0 |
73e9a70c85f296e052f2a9cba4bdf7f1 | b24bc8981c6053fd26331da35a0b8af8 | .................................................................................................................................
Desallocation d'un etat sauvegardes
Arguments en entree :
IdentifiantEtat : Identifiant de l'etat Mascaret sauvegarde par SAVE_ETAT_MASCARET qui va etre supprime
.......................... | EtatNoMana::~EtatNoMana()
{
} | 0 |
180a6ca648672ff9ee99e5a632b85e23 | 844491e6bad484c4bf6ba7fb9116a65d | Devuelve un Set de los Paises de este Jugador | class Region extends Model
public function pais() {
return $this->belongsTo('App\Pais');
} | 0 |
2184e9113fa4ace93282be535533d554 | d1c7e6080c9b4cecb2039ec5a66f0490 | Gets the name of this Container. # noqa: E501 | class Container(object):
def name(self):
return self._name | 1 |
8ced89206b43dd00d03f2c772c5d9fba | 0b6e49cdd54447bc38be78da8681967b | ===========================================================================
It converts the string provided by SPREAD into a node ID
=========================================================================== | $_sNodeID = preg_replace('/.+\/(\d+)\//', '$1', $sPageURL );
return is_numeric( $_sNodeID )
? $_sNodeID
: '';
} | 1 |
3595442da315b9354040fb1854c5ef99 | b4df8b7dffff25c7929e39bdec434d4b | Adding a row to the row cache to render them later on into a uniform
table. | rowToIndex.put(getRowCount(), index);
indexToRow.put(index, getRowCount());
addRow(new Object[]{flags, hexWordPlain(index), hexWordPlain(address), bytes, label, code});
} | 1 |
b0791aab6fea0518b11bd3ad415820e3 | 0cb7e2d8378372997dca34f5efd63119 | This adds a property descriptor for the End Index feature.
<!-- begin-user-doc -->
<!-- end-user-doc --> | itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_EDFDToGraph_endtoendgraph_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_EDFDToGraph_endtoendgraph_feature", "_UI_... | 0 |
aa843db2fd02fc59958ee1e822cbd7f9 | 6cd84ee19a4b71af3b6b9b7cc5bc54c0 | 获取?后面的参数 | function GetArgs(params,paramName){
var argsIndex = params.indexOf("?");
var arg = params.substring(argsIndex+1);
args = arg.split("&");
var valArg = "";
for(var i =0;i<args.length;i++){
str = args[i];
var arg = str.split("=");
if(arg.length<=1) continue;
if(arg[0] == paramName){... | 1 |
8e181ed83dcd35eca0ef96a3caee0367 | de9d97314a4e7e4ef76ff02111ac5d4e | Activity被系统杀死后再重建时被调用.
例如:屏幕方向改变时,Activity被销毁再重建;
当前Activity处于后台,系统资源紧张将其杀死,用户又启动该Activity.
这两种情况下onRestoreInstanceState都会被调用,在onStart之后. | public class BaseActivityAction<A extends Activity> implements ActivityLightCycle<A>
@Override public void onRestoreInstanceState(A a, Bundle bundle) {
} | 1 |
dd6ac13079f73a4e837a73dda78a86f5 | cd606570c7b8d1b22b30e2a1a341d0af | GET: TicTacToe | namespace ApsRedes.Controllers
public class TicTacToeController : Controller
[HttpGet]
public ActionResult Index()
{
return View();
} | 1 |
5ecfe89b9fa640cb03577c6eb3c89536 | 8027df1ba4e77a5528243fd7d75ad089 | 简单选择排序:每一趟在n-i个记录中取关键字最小的记录作为有序序列中第i个元素 | {
int min,i ;
for (i = 0; i < n;i++)
{
min = i;
for (int j = i + 1; j < n;j++)
{
if (a[j]<=a[min])
{
min = j;
}
}
swap(a[min], a[i]);
}
} | 1 |
e1f65b1b87f432549a141fcee5cc4a92 | 94b8aa786674f3181180df349187ec44 | 直前にINSERTしたAUTOINCREMENTのIDを取得する | class Model(object):
def __get_insert_id(self):
info = self.__db.select("SELECT LAST_INSERT_ID()")
self.__last_insert_id = info[0]["LAST_INSERT_ID()"] | 1 |
82e96585a288281bd43610e8d5807ad1 | 0e2026934025be31ae206dd3487960e6 | Lists information about the available report types. | class Fields
public function reportTypes()
{
return ReportTypes::getList();
} | 1 |
a4df38ee9a3895522a596da40d8e47d0 | bc68eb187ba438890643e3a5695cc05a | Allows customers to return their bikes to the rental shop. | public class RentedBikeScreen
public void goReturnBikeScreen(ActionEvent e) throws IOException {
App.getInstance().display_ReturnBikeScreen(this.getRentedBike());
} | 1 |
7aeb7bbb5760efe993b6cadf8a1a3b2a | 6a20b95d8f6279f16ef52994394dfda7 | 获取教材版本集合 | interface ParentsService
@POST("data/getBookUnit/{version}")
fun getBookUnit(@Path("version") version: String, @Body requestBody: RequestBody): Observable<ResponseBean<java.util.ArrayList<UnitBean>>> | 0 |
f21b9e422fd59f72f733115ec808eb9e | b2d56e650d1abe0fa9a074de22db73c7 | Get the contacts by filtered paramaters (called via ajax)
POST params: filter_type, contact_id, contactgroup_id, search_string | global $apiBaseURL;
$type = ucfirst($type);
$query = trim(strtolower($query));
$filter = "filter=substringof('".$query."',%20CoLastName)%20or%20substringof('".$query."',%20FirstName)%20eq%20true";
$response = getURL($apiBaseURL.$_SESSION['companyFileGUID'].'/Contact/'.$type.'/?$'.$filter, $_SESSION['username'], $... | 0 |
7655051c37a617a3ccad748c214347f7 | b7801033f4d4cec544ac65a5ab39481b | 此回复所属问题 | class Reply extends Model
public function topic()
{
return $this->belongsTo(Topic::class);
} | 1 |
4ac6012fd1f02057361ec997d89e7677 | 2b746c783d3732c625f799dac7118d6b | https://leetcode.com/problems/paint-house/ | if not costs:
return(0)
house = len(costs)
color = len(costs[0])
dp = [[0] * color for _ in range(house)]
dp[0] = costs[0]
for i in range(1, house):
for j in range(color):
last = []
for z in range(color):
... | 1 |
e127de32c13f8f51ed5910fcf8f1f9e5 | a7a962d4425498ecb079a38731e2345f | Check the headers have data in them | var headerList = [];
if (util.checkFields(inMail, headerList)) {
winston.debug('All headers present.');
return next();
}
return next(new Error('Malformed email.'));
} | 1 |
696ea54a19501bd20d66419b47c74fc8 | c0b3ace1335e29d76986da2f754b5266 | Run the BAS task asynchronously. | {
_taskCancellation = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);
_task = ExecuteAsync(_taskCancellation.Token);
return Task.CompletedTask;
} | 1 |
17ba81e50e264b6ab5c1151f2631db78 | 513100f3d0c81e3351a20e2737724ad9 | Returns an array consiting of all controller tests. | def resource_tests(resource)
integration_tests(resource) << controller_test(resource)
end | 0 |
4a8b4515391dc3c1e33783833f8d426d | 0dda56becf5795e73f9169461deb2e1c | Create a robust scaler component. | def get_scaler(name):
return _autoscaling_components[SCALER_KEY][name] | 0 |
ffe33985e47f0856066aecc81e6f7438 | 728c53a16a5e34e0c2c6729ac0cf5b0f | 根据用户是否关注/点赞work,更新menu | if ($('div.tag_wrap').find('.flagbg').size() > 0 || $('#star').hasClass('attention')) {
$('div.option-menu-wrap').find('[name="sep"]').show();
} else {
$('div.option-menu-wrap').find('[name="sep"]').hide();
}
if ($('div.tag_wrap').find('.flagbg').size() > 0) {
$('div.option-... | 1 |
2937b61e338e0c556b4397080e148cf2 | 14aea1bf2f8ad298b9a44f577a05c6b0 | Rebinds setting proxies to the current configuration. | {
foreach (var binding in GetDependentBindings())
{
if (clear)
{
binding.SetRefName(null);
}
if (clear || rebind)
{
binding.Rebind();
}
}
... | 1 |
fc5e74c9850ce379aedfd72bb89792f8 | 6f486cad7f14b967a6b3a037ffd8791e | Get first child data collection. | abstract class Pan_Db_Propel_TemplateDirectory extends BaseObject implements Persistent
public function getFirstChild($query = null, PropelPDO $con = null)
{
if($this->isLeaf()) {
return array();
} else {
return Pan_Db_TemplateDirectoryQuery::create(null, $query)
->childrenOf($this)
->orderByBranch(... | 1 |
821978652e24863ab9c3b7ffa716e959 | 252d2a5744670170b46f89897d91d9d6 | draws the shape on the canvas with the specified color. | public void drawShape(); | 0 |
59d87efe019fcceba25e9b6b431d917f | 269324d50a874393aa40369f37f8d892 | Filling tank with nothing. | {
this.liquid = liquid;
amount = 1000;
return "Liqiud tank is filled with " + liquid.GetType().Name.ToLower();
} | 0 |
36efb19ea62545bb07fcd8168c16dc8b | dc4c1a9a723080fbb51ceadf2909ac6e | 現在選択中のアイテムを削除する | if (!this.$currentTarget_) {
console.error(TAG + "[FullCutsom._deleteCurrentTargetItem] target item is not found.");
return;
}
var model: ItemModel;
switch (this.currentTargetModel_.type) {
case "button":
if (this.currentTargetModel_.button) {
model = this.currentTargetModel_... | 0 |
5b193cc1e782df57349f9bd1ada4bccc | 4830f0e5fc9595f9454e779b01c6e605 | Disable sync. | def no_sync():
def wraper(callback):
callback.__sync__ = False
return callback
return wraper | 1 |
eb71dc819299bd8fa95d9749f5196c76 | 3984a6305b536e2ac2d33dd6bccc3dbb | 使用免费次数刷新商品列表 | def refresh_goods(data, shops, goods_list, now, refresh_item = None, free = False):
user = data.user.get(True)
resource = data.resource.get()
original_gold = resource.gold
resource.update_current_resource(now)
use_refresh_item = False
if not free and refresh_item != None:
if not refresh_... | 1 |
968fdc4afc33ed3703da2d3c823e8e9f | ce34a09392e26c487fdc0ba486695a54 | Calculate the size of each thumbnail. Based on padding, and number of
columns. | function calculateItemSize(columns: number): number {
return PixelRatio.roundToNearestPixel(
(calculateContainerSize() -
containerPadding * 2 -
itemMargin * (columns - 1)) /
columns
);
} | 1 |
ac9147e2d67f515b442b91a75ff33155 | fb555c9b080dc822ef27190e3211d6a7 | Cacoo OAuth用のコンシューマを作成する。 | class GoogleService extends Service
public function __construct()
{
parent::__construct();
$this->consumer = app('oauth')->consumer('Google');
$this->consumer->setAccessType('offline');
$this->provider = $this->providers->where('name', 'Google')->first();
} | 0 |
3dddf5707def1519954cae327bf6eb9d | cfe206e7a1b08cd6e6e002d539789030 | <pre>
Updates the specified
[Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
</pre> | @javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/cloud/dialogflow/cx/v3beta1/experiment.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ExperimentsGrpc
default void deleteExperiment(
com.google.cloud.dialogflow.cx.v3beta1.DeleteExperimentReques... | 0 |
dfafce20144f9bd411962370665546ac | 1c8dbb4f2a336a0cd95bfa4ba7965cde | Add fields for billing address and required fields to the validator. | {
$builder
->add('formOfAddress', 'text')
->add('company', 'text')
->add('firstName', 'text')
->add('familyName', 'text')
->add('address', 'text')
->add('customReg', 'text')
->add('companyReg', 'text')
->add('bui... | 0 |
6b39297193f1af8a92cc218e887702c8 | 82b775971c03570d0e26f4c0fba5882b | 用于提取自定义标记的待翻译字符串,只匹配以下四种格式
_("...") 适用于html等
_('...') 适用于html等
'_("...")' 适用于html、js、php等
"_('...')" 适用于html、js、php等 | namespace com.artgital.ajhsu
public class AGTextBlock : TextBlock
private string MM_LanguageResolve(string p_MixedString, string p_Tag)
{
string t_Result = "";
string t_TagStart = string.Format("[{0}]", p_Tag);
string t_TagEnd = string.Format("[/{0}]", p_Tag);
... | 0 |
16604bcd60d841794c1268b724346d64 | 122e51ee0795c5c6d8dff2a238f6af61 | Wrapper around prediction error to make it compatible with gsl | double calcPrediction(const NodeData& movie_data, const NodeData& user_data) {
double pred = galois::innerProduct(movie_data.latent_vector,
user_data.latent_vector, 0.0);
double p = pred;
pred = std::min(MAXVAL, pred);
pred = std::max(MINVAL, pred);
#ifndef NDEBUG
if (p... | 0 |
22081c70879d16416f8d6ed0f2d4b75d | 7b86d802e1f3e33197937aa8e6a0685c | A work stub for future functionality | local function dummy()
end | 1 |
f55149fd8978e3066ef601cf5d12fe3c | c5180970278b113241c03a13948f73da | Gets the lead adapter job log details database. | namespace LexisNexis.Evolution.Infrastructure.Jobs
public static class DatabaseBroker
public static string GetLogDetails(int jobId, int jobRunId, int taskId)
{
EVDbManager DBManager = new EVDbManager();
DbCommand dbCommand = DBManager.GetStoredProcCommand(Constants.GetLogDetailsProce... | 1 |
c037537054cc9b73635202378a93f157 | e409f410d0ec9fb92467065a3b44228c | borrar una nomina indicando id | function eliminarNomina($conexion, $oidNomina) {
try {
$stmt=$conexion->prepare('call delete_nomina(:oid_nomina)');
$stmt->bindParam(':oid_nomina',$oidNomina);
$stmt->execute();
return "";
} catch(PDOException $e) {
return $e->getMessage();
}
} | 1 |
d5f72d651dfb3c65e442a9dd5b774bdf | a5ea3b6e6c44823ec343458f5eec5ad2 | 결제 완료시 디비 저장 함수. | public class ItemPaybillActivity extends AppCompatActivity @Override
protected void onCreate(Bundle savedInstanceState) @Override
public void onClick(View v)
@Override
public void onDone(@Nullable String message) {
Respo... | 1 |
9795926db5cb6f38131580a2229b078a | ed4ee99187f674eaa7b01d37f54cf112 | Clean up any realms whose ref counts have dropped to zero. Note
that this does not include realms who were created but not yet
used.
Called under snap_rwsem (write) | void AtCleanup_Portals(void)
{
HASH_SEQ_STATUS status;
PortalHashEnt* hentry = NULL;
if (u_sess->exec_cxt.PortalHashTable == NULL)
return;
hash_seq_init(&status, u_sess->exec_cxt.PortalHashTable);
while ((hentry = (PortalHashEnt*)hash_seq_search(&status)) != NULL) {
Portal portal = h... | 0 |
74ac07daad6861cd77b9047931400ff5 | 16a65c93c8531c8dc377395e0173a4ff | 已登录不能进入此页面 | if(MemoryUtils.user && MemoryUtils.user._id) {
return <Redirect to='/'/>
}
const {errorMsg} = this.state
return (
<div className='login'>
<div className='login-header'>
<img src={logo} alt="logo"/>
React项目: 后台管理系统
</div>
<div className='login-conte... | 1 |
1a679e15427f4185420f2cae5f1d55a9 | 4e0f8273f0bf524dfa0a5321d9045e9a | Restore floating point error handling. | void enableFloatExceptions()
{
_clearfp();
unsigned int cw = _controlfp(0, 0);
cw &=~(EM_OVERFLOW|EM_UNDERFLOW|EM_ZERODIVIDE|EM_DENORMAL|EM_INVALID);
unsigned int cwOriginal = _controlfp(cw, MCW_EM);
} | 0 |
597ce743a1a0fd13ea7763ff0f531cb0 | 0731406184077f624a219ad540434a17 | 玩家头上显示的帮派信息 | String title = player.getGuildName() + "•";
PlayerSinConsortia playerSinConsortia = ServiceManager.getManager().getPlayerSinConsortiaService().findPlayerSinConsortiaByPlayerId(player.getId());
if (null == playerSinConsortia) {
return "";
}
return title+player.getCommu... | 1 |
b7fd795ccd1ff496e129f0f410a054c4 | ed9b5fbb08ed1d17fccfd2adbb3e7a03 | 重构k-d树,使之平衡 | if root != nil {
for i := 0; i < root.n+1; i++ {
rebuild_b_tree(root.p[i])
}
split(root)
}
return 0
} | 0 |
7aa576550aeccb163294f0025f6abe60 | fe32362f27e9c2a173b4e9a65449e8b3 | 设置属性限额数值的值 | @ApiModel("限额")
public class LimitInfoBean
public void setValue(String value) {
this.value = value;
} | 1 |
129847a03b84ecd2fde4fc7014e40d66 | e77ca23445ee269fb4cb8ce026881167 | 比较酒款名称 | @Entity
@Table(name= "BIERE")
public class Beer implements Serializable, Comparable<Beer>
@Override
public int compareTo(Beer b) {
int i = String.CASE_INSENSITIVE_ORDER.compare(getName(), b.getName());
if(i != 0) {
return i;
}
return String.CASE_INSENSITIVE_ORDER.comp... | 1 |
9431b4d00a7466b42ca88173a6473d7e | b8094f35e13df65fd5b828c2131bb850 | Called when each port is being validated | for (const val of this.globalComp) {
val[1].checkHintForPort(list, type)
}
} | 1 |
dab787d3547af9e567fadaca69877226 | edb85d607291728bbe6d1fc1c0f2f72e | Remove Single D-U-N-S Number from a LOD Registration:
At any time after a registration is created, you may remove single D-U-N-S Number
from the registration; any existing notifications for the deleted D-U-N-S Number
will still be delivered.
https://directplus.documentation.dnb.com/openAPI.html?apiID=monRemoveSingleDun... | oneTimeTravelNotificationKey: string,
headers?: Headers
): Promise<IJsonResponse> {
const response = await this.baseService
.apiNskV1OneTimeTravelNotificationsByOneTimeTravelNotificationKeyDelete(
oneTimeTravelNotificationKey,
'body',
headers
)
.toPromise();
r... | 0 |
9fa03392e65f57c6870ffd9ee1a98792 | 04a5272053579beae40f628a066fbb53 | Initializes this Blood MiniGame playthrough. | startTime = Time.time;
numCollected = 0;
if(!freePlay) initUI();
initSong();
gamePlaying = true;
} | 1 |
cff519044ec22c4c3d541996c6478dab | 5e699e036a28645a257af35bccd4eb60 | Test model name to context size on a valid model. | ms.set_context(mode=mode)
x = Tensor([[[0, 1, 2],
[3, 4, 5],
[6, 7, 8]],
[[9, 10, 11],
[12, 13, 14],
[15, 16, 17]]], ms.float32)
y = Tensor([[[28, 29, 30]],
[[31, 32, 33]]], ms.float32)
net = Net(1, 0, 1,... | 0 |
5a87436099a9ed13e14030c51198591a | 13f98792259f5144464430110b05a1cd | SET-CURSOR-POSITION-FOR-MENU-IF-APPROPRIATE | menu_cursor(int *row, int *col)
{
if (menu_is_up & KEYPAD_IS_UP) {
keypad_cursor(row, col);
return;
}
if (menu_is_up & MENU_IS_UP) {
*row = 0;
*col = current_menu->offset;
} else {
*row = 0;
*col = 0;
}
} | 1 |
edfc8b4358d5e85a31c42d7db0ddda10 | 68fcd4a4aac346eadff96f948b9b9fcd | Calcula las distancias características de la imágen neutra | for filename in os.listdir(folder):
img = cv2.imread(os.path.join(folder,filename))
if img is not None:
cv2.imshow('imagen inicial',img)
cv2.waitKey()
lh=[]
ll=[]
for i in range(len(img[0][0])):
h=cv2.calcHist([img], [i], No... | 0 |
c51af1e5fe47511b80ba384dcca0b295 | e6816c7a6ca821fa4e96d4a88f1ec46d | 首次创建地刺 | let _t = this;
var e = cc.instantiate(_t.maskBg);
e.parent = _t.daxiguaEffectNode;
e.active = true;
e.opacity = 0;
cc.tween(e)
.to(0.5, {
opacity: 150,
})
.start();
var c = new cc.Node();
c.addComponent(cc.Sprite).spriteFrame = _t.fruitSprites[10];
c.parent ... | 0 |
3160093d1ad26b71f93dd712d464b4a3 | 4a632aeb83a15f5e6a6353e9f6b1f8fc | Получение списка тем, привязанных к покупкам, в которых пользователь является участником | namespace ERP.Wholesale.Domain.NHibernate.Repositories
public class DealRepository : BaseRepository, IDealRepository
public IEnumerable<Team> GetTeamListForDealDocumentByDeal(int dealId, int userId)
{
return CurrentSession.Query<Team>()
.Where(x => x.Users.Where(y => y.Id == user... | 1 |
e23c8e15c56f19e61425866f1e1ad5ff | 93fd0999e5255ac088cde96f9b977cf6 | Dispatch toggleMenu event. | if ($scope.menuState === openState) {
close();
} else {
open();
}
} | 0 |
175d174b6f89af82a03cd2ac3f80ce85 | 908ff1cc56f65384fdf0ab22075f9d32 | Get a user's cart id | public function getCartId(); | 1 |
b1b0b18f657ded6d17110b6750c9d6a6 | 050f077fc48838c642f613faa9a879c8 | En handler som tar hand om den tolkade signalen ifrån gps:en. | if ((HAL_GetTick() - GPS.LastTime > 50) && (GPS.rxIndex > 0)) {
char *str;
#if (_GPS_DEBUG == 1)
printf("%s",GPS.rxBuffer);
#endif
str = strstr((char *) GPS.rxBuffer, "$GPGGA,");
if (str != NULL) {
memset(&GPS.GPGGA, 0, sizeof(GPS.GPGGA));
sscanf(str, "$GPGGA,... | 1 |
053fa4fa28ab7817c84faccafd0d6368 | 61e00e367b2c6cb9c7e874ebbf545f6e | Относительное форматирование даты | {
if($format == "H:i") {
$resultDate = CIBlockFormatProperties::DateFormat($format, MakeTimeStamp($date, CSite::GetDateFormat()));
}
else {
$timeStamp = MakeTimeStamp($date, CSite::GetDateFormat());
$formDate = CIBlockFormatProperties::DateFormat("j m Y", $timeStamp);
$curdat... | 1 |
0ff997b7f309d7fe0bd2b9f1dfba1c62 | 608ccd765e20466c831c9f6899d5a80f | 按发布时间正序获取所有已发布文章的ID | times = "".join(date.split("-"))
id = []
url = "https://s.prcdn.co/se2skyservices/toc/?callback=tocCallback&issue=1047"+times+"00000000001001&version=8&expungeVersion="
header = {
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, ... | 0 |
95db272a13e3e41f04444de118996b85 | 8b5f0187cfe98bb7d84df3e9f1f78430 | Creates a clone of this OpenXml package, opened on the given stream. | namespace Pomelo.Data.Excel
ExcelStream Load(Stream stream); | 0 |
9302118159ff5483acae8eee21684d90 | 581520525c647bed9e4a8574b9e8638b | Returns the value of the '<em><b>Mip Cuts Covers</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Mip Cuts Covers</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | public class SolverCplexParamsItemProvider extends SolverLpParamsItemProvider
protected void addMipCutsGUBCoversPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
get... | 0 |
31941468f0452977f24f9a2136a767ed | 222a6724c3bc6ac04c594d8ffa752771 | KMP_USE_YIELD | final class BetterStandardPrinter extends Standard
protected function pExpr_Yield(Yield_ $node): string
{
if ($node->value === null) {
return 'yield';
}
$parentNode = $node->getAttribute(Attribute::PARENT_NODE);
$shouldAddBrackets = $parentNode instanceof Expression;
... | 0 |
838c1834c814c915eded5b0ad8e23696 | 5f21ebb6ea42adc2dff431765d478108 | Displays current and complete tasks when display tasks button is clicked | namespace BLlayer
public class taskManagement : ProjectsandTasks
public void ViewTask()
{
if (taskcount == 0)
{
Console.WriteLine("No Current Task Assigned");
Console.WriteLine("");
}
else
{
Console.W... | 0 |
d31e39a9dc23127cae8f682523e381fc | 8cfd23b6f07d27699017abf1fb239249 | Ensures a unique slug field by appending an integer counter to duplicate slugs.
The item's slug field is first prepopulated by slugify-ing the source field. If that value already exists, a counter is appended to the slug, and the counter incremented upward until the value is unique.
For instance, if you save an object ... | {
parent::__init();
static::finder('slug', function($self, $params, $chain) {
$params['options']['conditions'] = array(
'slug' => $params['options']['conditions']['_id']
);
$data = $chain->next($self, $params, $chain);
$data = is_object... | 0 |
1853411a319769f16ab64ebbdadefdf1 | d9ab5e47557fdeed4e660300a6540f14 | 控制放大、缩小比例 | public boolean onScale(ScaleGestureDetector scaleGestureDetector){
mScaleFactor *= scaleGestureDetector.getScaleFactor();
mScaleFactor = Math.max(0.1f, Math.min(mScaleFactor, 5.0f));
mImageView.setScaleX(mScaleFactor);
mImageView.setScaleY(mScaleFactor);
... | 1 |
e9e5a047c2f746f54815814ac9e676a5 | 0a34f401e29026de5d1ee8fe67a7c4b1 | Get the sum of the branch lengths of this node and all its descendants. | accum = 0.0
curr = self
while curr is not ancestor:
if curr.is_root():
raise NoParentError("Provided ancestor is not in the path")
if curr.length is None:
raise NoLengthError("No length on node %s found!" %
... | 0 |
ef574a8dedc13a33d2ae7225be1d0fa8 | f27a0014b67e2800b1044d1c175f942c | Unsubscribes from all chip events. | [RequireComponent(typeof(Collider2D)),DisallowMultipleComponent]
public class Pincher : MonoBehaviour
void UnsubscribeEvent() {
EasyTouch.On_TouchStart2Fingers -= On_TouchStart2Fingers;
EasyTouch.On_PinchIn -= On_PinchIn;
EasyTouch.On_PinchOut -= On_PinchOut;
EasyTouch.On_PinchEnd -= On_... | 1 |
3ffea1919c0eaa20e6cfd0a701bab08e | d7140d034c37d9d602154814abd82642 | @brief Convert temperature in Fahrenheit to Celcius. | double TempData::fToC(double tempF){
return ((tempF - 32) * 5 / 9);
} | 1 |
1928741a1a8cbb2598556c0d7937b3d1 | cf8f56b92de4b02f5e211d1a31c7d8c8 | Test that the Circles can be compared with less than statement | c1 = Circle(2)
c2 = Circle(4)
result1 = c1 > c2
result2 = c2 > c1
assert result1 is False
assert result2 is True | 0 |
5d4bd7a88ca4e59f0bb837deb69f1f55 | cff5b0d2d278338e9542c0873d1d6679 | Getter for <code>WETRN.DLTD_DSTRBTD_MRKT_SLS.OFFR_SKU_LINE_ID</code>. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.7.2"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DlyBilngRecord extends UpdatableRecordImpl<DlyBilngRecord>
public void setOffrSkuLineId(BigDecimal value) {
setValue(32, value);... | 0 |
cf6111f8524066a343db68424fb3064f | e2dd5e837d15e812c140036f955ee6dc | Gets the allowedAccounts property value. Type of accounts that are allowed to share the PC. | {
if ( configurationValues?.ContainsKey( CONFIG_LIMIT_TO_ACCOUNT ) == true )
{
return configurationValues[CONFIG_LIMIT_TO_ACCOUNT].Value.AsIntegerOrNull();
}
return null;
} | 0 |
a5171ab11e7faeab6e80607786a0a790 | 287a174feac498759510cdafd42b19f5 | Returns the header-item structure associated with the module | class StudentController extends Controller
public function getModuleDWHeadersStructure(Request $request, $id) {
return $this->getGenericHeaderItemStructure($request, 'module_dw', 'dw_id', $id);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.