query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
7b1dd8a611d50747b8839476ea80a827 | c0f0e6b20aeb30d7af22559c34565750 | Inserts the specified key-value pair into the symbol table, overwriting the old value with the new value if the symbol table already contains the specified key. | public class SymbolTable
public void putSymbol(String symbol, STEntry entry){
this.ht.put(symbol, entry);
} | 1 |
4ffb4e476b8b3a656444af6746bbd5e6 | c01328a9e195a00801d0f50a9a23f5f2 | Verifica em qual posicao eh melhor alocar um cliente dentro da rota | maxQ = math.floor(x*e2k/100)
for i in range(0, e2c):
if(len(servers[i][1]) < maxQ):
return i
return random.randint(0,e2c-1) | 1 |
04afb3930aa72238b0f76da6312664df | 5dc405f6f4431203584586be6f779658 | 计算并添加割平面。 | const points = this.linePositionList
var pointsLength = points.length;
var clippingPlanes = [];
for (var i = 0; i < pointsLength; ++i) {
var nextIndex = (i + 1) % pointsLength;
var midpoint = Cesium.Cartesian3.add(points[i], points[nextIndex], new Cesium.Cartesian... | 1 |
004a44b740eb356766d6696131693ccf | b0e1fd94fdc4fc8f0f9865a71dd7b4c8 | Przekierowanie na strone główną sklepu jeżeli nie została wybrana żadna akcja | class SiteController extends Controller
public function actionIndex()
{
if (Yii::$app->user->isGuest) {
return $this->redirect(['login']);
}
return $this->redirect(['principal']);
} | 0 |
dad62474090fd8ef40a8533609e66385 | 5c537a09b423f574bba605b099a55cd1 | 话题前五 | class TopicController extends Controller
public function index()
{
$topic_ids = TopicMessage::selectRaw('max(id) as id, topic_id')
->groupBy('topic_id')
->orderBy('id', 'desc')
->limit(5)
->get()
->pluck('topic_id');
$topics = [];
f... | 1 |
38143d45077adfbc87ef851bbedf7081 | dd38942629daa69aa3d2e7a3a97d9d7f | Navigating the customer to his allocated seat | {
try{
$params = $this->_getAllParams();
$ride = new Rides_Model_RidesService($params['where']);
$this->view->val = $ride->acceptRequestToBookSeat($params);
$this->view->passenger = $params['passengerName'];
}catch (Exception $ex){
print($ex->getMessage());
}
... | 0 |
9e264dc393b5f46974985fd47e33af12 | 638ea25f6341a7369d5d55235eff4813 | one liner: | function square(n) { return n*n } | 1 |
4072df2de6867eaebb17a0e0bb587e89 | 04f6fc0dc6be9e7e775067135e3d75d6 | 第一の引数がnullの場合第二の引数を返す関数 | function MainOrSecond($main, $second) {
if($main == NULL) {
return $second;
} else {
return $main;
};
} | 1 |
654b1be6289d21a6ffa132cd6392f6a1 | 0ec950b66a9921a3e80638aa9a6af14e | Free memory when the reference count goes to zero | if(!this->ReferencedElsewhere()) {
delete this->name;
if(this->buf) {
delete [] (char*)this->buf;
}
}
} | 1 |
f4d227bf910c8de225f3aa469c631848 | b4686d085edde8653ec614eb66965781 | Determines the numner of days left in the current month. | int howManyRemainingDays;
howManyRemainingDays = howManyTheYearMaxDate() - elapsedDays(mMonth);
return howManyRemainingDays;
} | 1 |
099f06e1ff3d765cbda781495b3475a8 | 8115844694ed1efde4587e08e5dcd610 | TestNames returns test names for the case key (in TEST_DIRS). | result := make([]string, 0, len(filesWithTests))
for _, fileName := range filesWithTests {
if !strings.HasSuffix(fileName, "_test.go") {
result = append(result, fileName)
}
}
return result
} | 0 |
a5b133ded82ced48a2b071ed0047f060 | d8e02f348bec1dbe8da96e49af08f30b | 初始化一般反反爬模式的edge_driver | self.driver = webdriver.Remote(command_executor='http://127.0.0.1:8080/wd/hub', desired_capabilities={
'takeScreenshot': False,
'javascriptEnabled': True,
"phantomjs.page.settings.userAgent" : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:25.0) Gecko/20100101 Firefox/25.0"... | 0 |
5000edb37fd731518511ff2a3cd63cba | 13f393a38c2039aa62bff33e7c99bd29 | Accessor for this object's sensor timestamp. | class Sensor(abc.ABC):
def get_timestamp(self):
return self._timestamps[self.timestamp_index] | 1 |
e815a46bd02a09fe666179f9881de435 | 3ff22f89c8db9fe0248eac620f682f71 | 得到一个人员所在的组织架构ID | namespace RoadFlow.Business
public class User
public Guid GetOrganizeId(string userId)
{
Guid organizeId = Guid.Empty;
if (userId.IsGuid(out Guid uid))
{
var organizeUser = new OrganizeUser().GetMainByUserId(uid);
if (null != organizeUser)
... | 1 |
2cf38880fc5fa095220ce16d6d08dcb3 | 8df7e4eda1892da74fec1475b605d3ca | 登录并获取open_id | var self = this;
return new Promise((resolve, reject) => {
wx.login({
success: res => {
console.log("login", res);
var code = res.code;
wx.request({
url: this.globalData.serverUrl + "/rest/littlecat/caobao/wxuserinfo... | 1 |
1fbadc7c5e30269abe69485ea8266282 | 2ad590229797363deb2e329c0d80fad0 | Fetch the source data stored in S3 bucket and dump it in the local_results_file | def load_raw_source(local_results_file):
try:
with open(config.MODEL_CONFIG, "r") as f:
model_config = yaml.load(f, Loader=yaml.FullLoader)
load_config = model_config["acquire_rates"]
bucket_name = load_config["S3_LOCATION"]
file_name = load_config["S3_FILE_NAME"]
... | 1 |
4a09dc6c73e097d89274ad8f49ad0355 | 5a4b7b2117153c21e881abcb92d56435 | Cherche le sommet de degré maximum toujours pas colorié | function DSAT(G)
local D = defaultdict(0, {[-1]=-1})
local C = {}
local sommets = tolist(G:nodes())
table.sort(sommets, function(a, b)
return G:degree(a) > G:degree(b) end)
for _ = 1,G.ordre do
local i, s = max(sommets, itemgetter(D))
C[s] = trouve_couleur(G, C, s)
D[s] = -1
for v, _ in G:edges(s) do
... | 1 |
283f8f584cbca20f9786f1434672fb41 | 30ccce95e71f15001a7562958289792c | =============================================================================
Que hace: habilita las interrupciones desde la máscara (PRIMASK).
Que recibe: N/A
Que devuelve: N/A
Variables externas que modifca: N/A
============================================================================ | void md_usb_system_int_disable(void)
{
__set_PRIMASK(1);
} | 0 |
1fe91b275e72a6c6e87bf6b03fe8121d | c4ed0d5a9ae069f4c74cfe4e4d6b7c74 | Clears the custom border from the token. | void clearBorder(); | 1 |
26ef6e3087703b675c3cc77142906a6b | 25f5c795a379cc587fb5a8e72c6a9b16 | Exit a parse tree produced by PeopleCodeParser#WarningStmt. | {
WarnError (_String ("While parsing:\n") & context & "\n" & st);
} | 0 |
23e17f3762107d2db0c2e4e14eafc36b | 042335d0a28e1380bbdfa2b0e034613e | Set Auto-renewal flag. Valid values: `1` (auto-renewal), `2` (no renewal upon expiration). | public class RenewIntlDomainBatchRequest extends AbstractModel{
public void setAutoRenewFlag(Boolean AutoRenewFlag) {
this.AutoRenewFlag = AutoRenewFlag;
} | 0 |
4cd52d10854cfb605ca5fbbdaf441de8 | 83aa508e592af0c2a18f303676529282 | 设置时间为一天结束 | public class CalendarUtil
public static void setCalendarTime23(Calendar calendar){
calendar.set(Calendar.HOUR_OF_DAY, 23);
calendar.set(Calendar.MINUTE, 59);
calendar.set(Calendar.SECOND, 59);
calendar.set(Calendar.MILLISECOND, 999);
} | 1 |
e37604eca9ec005fb8383ac0c9df9a3d | 4a3dcf1edb41a43d6098856df047b5a4 | 生成购买道具订单号,生成规则示例:20160622+游戏类型(5位)+玩家id(9位,不够前面补0)++8位随机数 | char orderno[60];
int num = GameUtil::randomInt(100000);
sprintf(orderno,"%ld%05d_%d_%lld",abs(GameUtil::getTimeNow()),num,sGlobal->mCurrZoneId_pay,sGlobal->mUserId_pay);
return orderno;
} | 0 |
8c7bd8bd7ecc7dd5863c2c3cfc3b7797 | 95e6b138adeb7cb41c669e63e0910053 | Takes in player information from All_Player_Information.txt and outputs a ranked list of positions players for each position. | def main():
f = open('/Users/Swanson/Programs/Python/All_Player_Information.txt', 'rU')
lines = f.read()
line = ast.literal_eval(lines)
path = '/Users/Swanson/Programs/Python/redditdynasty2/'
names = ['0Total_', '1Weighed_', '2Three_Years_']
for string in names:
raw = open('%s%sRaw.txt' ... | 1 |
5e4343a30d05de09370f89358df79d64 | bfc90c3615b6a85824edd6ff6f9755f7 | Missing last name in second level of object graph | public String getSecondLastname(); | 0 |
6fa47480f00680b03b52eaaa131b150e | d2ccc0794f39803f7c75ef3c6dcc758c | Overload this method to return a rewritten IR basic block when a
match has been found. | def rewrite pattern, output
bindings = pattern.match(self)
return output.with(bindings) if bindings
self
end | 1 |
383d4ef551790d97483c98f8ecf5c242 | dd0da837d869da19947812a9e37f9292 | Switches to the next month | selectedDate = LeafDateSupport.nextMonth(selectedDate)
currentMonthTextView.text = String.format(
resources.getString(R.string.current_month_text_view_text), selectedDate
)
currentMonthlyBill = MonthlyBillDao.getInstance().getByDate(selectedDate.toString())
enable... | 1 |
419b3d31089e517913c30d105e719f21 | ed3cd92f7b5716782c929b6bab5eb99e | Deletes the loser from the Line-up and adds it to the Loser pile which is a stack-like
linked list. The newest loser added to the list is at the head. | {
MoveX* ml = moveNext = lcapEnd;
if (ttmove)
{
verify_killer_move(ttmove);
ttmove = 0;
}
stackPtr = moveEnd = enqQuiet(clr, ml);
quietSort();
stage = GEN_LOSERS;
} | 0 |
59e3cf2f030e1ebb2c412217ee8c8937 | 6496ab1f90b9db03e045cec8ba440a28 | Clear <push_config> value | class Subscription extends \DrSlump\Protobuf\Message
public function getPushConfig(){
return $this->_get(4);
} | 0 |
e34ae470f86f73819ae20ac2a6afc89a | 322692fa55975b73fc3fdd2d89edb1f9 | 通过账号查询某个人的发售的所有商品 | List<TradeItem> getTradesForAccount(long accountId); | 1 |
8b8e6a1611b026fd564b0772c13ce5d7 | 9ec96fe8cc182648fe19dc937957cec4 | Additional low power setup | {
LDO_ADJ |= (BIT7 | BIT4);
LDO_ADJ &= ~BIT0;
SC_MPLL_DIV = 0x05;
SC_MPLL_LDO_VADJ = 0x2A;
SchmittTriggerPowerOn();
#if ENABLE_HW_CEC == ON
CECUpdateRefClock();
#endif
bLowPowerMode = FALSE;
} | 0 |
faa9dc3bb7a80db7f4c3906e50f6ae29 | 9a232b2f4516cddd8ceffa68b91e9eac | This function sets the absoluteDeadline equal to arrivalTime+Criteria::relativeDeadline | static void prvCheckDeadline( SchedTCB_t *pxTCB, TickType_t xTickCount )
{
#if PRINT_SCHEDULER_DEBUG
char msgBuf[50];
sprintf(msgBuf, "\t(Sch) Chk DL: %s, DL: %d, Cur Time: %d", pxTCB->pcName, pxTCB->xAbsoluteDeadline, xTickCount);
Serial.println(msgBuf);
#endif
pxTCB->xAbsoluteDeadline = pxTCB->xLas... | 1 |
2f982512b3352f0c478d56252c39f133 | 27972c567a67606117b6cd3834b9cc55 | <p>
批量向名称为key的zset中添加元素member,score用于排序。
</p> | Long zadd(String key, Map<String, Double> scoreMembers); | 1 |
bfd4ff5033f5872483b56ac99fc387f4 | c8da496123294aecd0fa94f9b9cd838d | Gets the amount of arrows in an entity's body. | public int getArrowCount(); | 1 |
daee4546254512526971873be55fc445 | 76559afe33c66559e307bbd2a97616f8 | 获得当前自动控灯的时间 | {
var info = Wlst.Sr.TimeTableSystem.Services.SunRiseSetInfoServices.GetSunRiseItemInfo(DateTime.Now.Month,
DateTime.Now.Day);
if (info == null)
{
updatesucc = fa... | 1 |
43c519eb36f262eda90478f8980acf48 | c35c38e72610a857da9d4865ac1921cb | 获取指定部门并修改其描述 | {
if(empty($param['department_id'])) return array('code'=>300,'msg'=>'缺少参数');
$result = D('Department')->editData($param,$param['department_id']);
if ($result['code']==0){
if (F('Cache/department')) {
$new_info = D('Department')->getFind(array("department_id"=>$pa... | 1 |
6398be5732ef6142eaf426f3d7371b5f | 6c4fb9570a4d98aeed398e000de54cd7 | Gets the non-qualified method name. | public class JMethod extends JModifiable
public String getName() {
return getIdentifier().getLastFragmentWithQualifier(JavaCodeModel.METHOD_KEY);
} | 1 |
6d061903d75c9403308c6a5dc1c7de7b | 77c1f8654bcc14c5edc38a90aa633e54 | 使用PrintStream进行格式化输出 | try {
Class<?> systemClass = System.class;
Field outField = systemClass.getDeclaredField("out");
Class<?> printStreamClass = outField.getType();
Method printlnMethod = printStreamClass.getDeclaredMethod("println", String.class);
Object object = outFiel... | 0 |
a731c3aea34f67dbdb44975d5e54f63e | 3324aa4a6ac3aa3a8a520b83fa42060f | Serialize a response type into a ResponseMessage | {
IResponseMessageBase responseMessage = null;
ResponseMessageText text = this.CreateResponseMessage<ResponseMessageText>();
text.Content = Newtonsoft.Json.JsonConvert.SerializeObject(requestMessage);
responseMessage = text;
return responseMessage;
... | 1 |
72da11fbe151181ba4120d39988e5f94 | dfd5da3f42bb10372420a9d8210eefc4 | Gets the inspected property by the regex specified. | public sealed class RegexPatterns
public object GetValue(string propertyName) => GetType().GetField(propertyName).GetValue(null); | 0 |
8ef1aef8884e4b82877f2947355a1607 | 963ae92e35025da6a88d7766a1cd677e | Stores recently opened files and updates menu with 5 most recently opened files | void MainWindow::updateRecentFiles()
{
m_fileUI.updateRecentFiles();
m_fileUI.saveRecentFiles();
QStringList recentFiles = m_fileUI.getRecentFiles();
if (!recentFiles.isEmpty())
{
ui->menuRecent_Files->clear();
ui->menuRecent_Files->setEnabled(true);
if (m_welcomePage != NULL... | 1 |
970ccfecfd71d121918be8b6070fb721 | e0b364c20e03791a59e7e1f1fe4f14c0 | Call the display routine next time through the main loop | void
glut_idle_func()
{
glutPostRedisplay();
} | 1 |
d8b33f85e55e91555dc7ffefb5acceac | 90f25fe0e076db0b8ae4735f5dc24f9f | joywok转发到微信端的关注提示页 | @ResponseBody
public String index(HttpServletRequest request) throws IOException {
System.out.println("微信手机关注事件");
String content = IOUtils.inputStreamString(request.getInputStream());
Wechat wechat = XmlUtils.xmlEntity(content);
System.out.println("接收到微信消息!!!" + wechat);
... | 0 |
236258a698317b3b9c1d534aea5c6c90 | 06f2d4ed204cbfecbbef44c8e042aa2e | Get the global secondary index name. | if self._index_name is not None:
return self._index_name
if dataframe.index.name is not None:
return dataframe.index.name
return "key" | 0 |
5bee266a616988b1d13b8a6aa24c41b7 | 224ab92702fb5f40ac344b8e16bcb56e | Metoda zwraca unikalną nazwę obiektu (dla klasy CMapWork) | class Lesson6 : public SimpleObject2
TCHAR *GetObjectName() { return GetString(IDS_CLASS_NAME); } | 0 |
1e0f8ff1df9defa6f0b4bbdc648a70b6 | cc549c7e22972a2a3359d3648e7dc633 | Generate random strings using RandomLib. | char *RandomString( char *name ) {
bot_randomlist_t *random;
bot_randomstring_t *rs;
int i;
for ( random = randomstrings; random; random = random->next )
{
if ( !strcmp( random->string, name ) ) {
#if !defined RTCW_ET
i = random() * random->numstrings;
#else
i = rand() % random->numstrings;
#endif
for ... | 0 |
080000ad7ed3f4928477e00679a4bceb | a3dd51fa4eca412c202633514bd92d72 | バトルシーンへ移動. | class Scene_Battle
def call_title
$game_temp.next_scene = nil
$scene = Scene_Title.new
@message_window.clear
Graphics.fadeout(60)
end | 0 |
3e444b6b1d0d9501da9aa8491a5bc4c8 | 9af8ac6bc3e03067b6f0abad0c40aa31 | Removes all events. Useful when player lost. | local function ClearAllEvents(self)
if type(self) ~= "table" then return; end
local i;
for i=#self.events, 1, -1 do
self:ClearEvent(i);
end
self.autoEventCounter = 0;
self.remindedEvent = nil;
end | 1 |
b88bc4bf5e92fab74b7cbd1da743271d | b0c4b8c8f1713acd1a0de9504453a904 | Append **guideline** to the glyph. The guideline must be a defcon
:class:`Guideline` object or a subclass of that object. An error
will be raised if the guideline's identifier conflicts with any of
the identifiers within the glyph.
This will post a *Glyph.Changed* notification. | class Glyph(BaseObject):
def appendGuideline(self, guideline):
self.insertGuideline(len(self._guidelines), guideline) | 1 |
18c0af2d049c79e3535b5ecb7d56856f | 06c2a66bc7baf442e6916a4bc0858316 | Takes a snapshot of the currently playing video and saves it to the given file | namespace WebcamUserControl
public partial class VideoPortControl : UserControl
public void SaveSnapshot()
{
using (Bitmap bmp = videoSourcePlayer.GetCurrentVideoFrame())
{
var saveFileDialog = new SaveFileDialog()
{
Filter = "PNG I... | 1 |
9e9e0053b6990265af9f2c03244cc986 | bf3878722c3cc4045eff14426ba2a3a9 | 提取全部系数 | index = (sqrt(len(self.vector_max)) - 1.) / 2.
index1 = int(len(self.table) / 2.) - index
index2 = int(sqrt(len(self.vector_max)))
coefficient = list(np.zeros(index2 * index2))
for i in range(index2):
for j in range(index2):
coefficient[j + i * index2]... | 1 |
e7db6c396c8784c6dc2d59f7a4d0bc09 | 677edd5d8f8ee8a35b7b5ae1c9e80186 | Returns a list of available datasource types for the given nodenet. | def get_available_node_types(nodenet_uid):
nodenet = get_nodenet(nodenet_uid)
return {
'nodetypes': nodenet.get_standard_nodetype_definitions(),
'native_modules': nodenet.get_native_module_definitions()
} | 0 |
4ea086da632e2843af08e2c02b9b4532 | 2f9c867041d9722b22ea01ed5fb39fbc | Return the first page of TargetInstances that meet the specified criteria. | namespace Pulumi.GoogleNative.Compute.Alpha
public static class GetTargetInstance
public static Task<GetTargetInstanceResult> InvokeAsync(GetTargetInstanceArgs args, InvokeOptions? options = null)
=> global::Pulumi.Deployment.Instance.InvokeAsync<GetTargetInstanceResult>("google-native:compute/alpha:get... | 0 |
b973236c01c323990af2b21d8c3786d0 | 8779245888c9f1ee8f6264632ff88cda | Edit a newsletter subscriber | $subscriber_hash = $this->get_subscriber_hash( $args['email_address'] );
$resource = sprintf( '/lists/%s/members/%s', $list_id, $subscriber_hash );
if ( isset( $args['merge_fields'] ) ) {
$args['merge_fields'] = (object) $args['merge_fields'];
}
if ( isset( $args['interests'] ) ) {
$args['interes... | 1 |
8d5404cb8ba5904aa1993a852fa3092b | bc808ae8a205fa4441d9d3d7285ac1cc | Calculate derivative of the neural network output with respect to the
hyperparameters gamma. | class Neuron(object):
def d_phi(self, y):
dy = self.a * y * (1 - y)
return dy | 0 |
e5159b70f33bb9295bd4353193690921 | 825d8b2fa3ca002131d6eceb564384fb | Returns the meta object for the reference list '{@link gemRBAC.Delegation#getDelegatedPermissions <em>Delegated Permissions</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getUser_Delegation(); | 0 |
ee4cca1bfa7edcfce6821d634552a3d2 | f20936edf841c7be22d74a4e6a5130ca | Check that all application instances are running. | msg = "{0}: instances: min:{1}, running:{2}, max:{3}"
self.logger.info(msg.format(self.app_def.app_name,
int(self.min_instances),
int(self.app_def.tasksRunning),
int(self.max_instances)
... | 0 |
7f44961dabc9788e2f6c6db2dd9cbe26 | ed0a75b4e533df0c224ad5126794d990 | [test__is_mutable_heap__boost_heaps | {
Kokkos::Array<int, 6> a = {11, 5, 8, 3, 4, 15};
BOOST_TEST(isHeap(a.data(), a.data() + 5, Less<int>()));
BOOST_TEST(!isHeap(a.data(), a.data() + 6, Less<int>()));
pushHeap(a.data(), a.data() + 6, Less<int>());
BOOST_TEST(isHeap(a.data(), a.data() + 6, Less<int>()));
Kokkos::Array<int, 6> ref = {15, 5, 11,... | 1 |
5e7a40b4769847cdb4055fb2a46d52fe | ecb7c292c7e12955307320e7dfbdad31 | Helper function to set stalls. Input is the stage you "start"
stalling at. Then you work backwards. EX/ if you "start" at MEM,
then stall MEM, EXEC, DECODE AND FETCH | void Program::Halt(){
for(int i=3; i>0; i--){
cycle++;
if(i == 2){
if(stage[4])
WriteBack();
if(stage[3])
MemoryAccess();
if(stage[2])
Execution();
}
else if(i==2){
if(stage[4])
WriteBack();
if(stage[3])
MemoryAccess();
}
else{
if(stage[4])
WriteBack();
}
}
} | 0 |
31c9e324815a8e253ca93d7ea4e3d46a | d0f40a4eeb31530a225369cefa592b15 | 处理成功支付的课程订单.
在支付通知结果返回中,调用此接口 | {
if ($order->product_type !== ProductType::PLAN) {
return ajax('400', __('Coin only in used for course and classroom.'));
}
if (auth('web')->user()->coin < $order->pay_amount) {
return ajax('400', __('Account balance is not enough.'));
}
$product = $o... | 1 |
075df1ea77602e1aab5002227ea2e151 | 883e26c34ffd15e13a608c43b06f6664 | :math:`V_u^0` - u matrix coefficient at initial shooting node (0).
Default: :code:`None`. | class Sim:
def u0(self):
ufile_name = self._ufile_base + str(0)
u0 = pd.read_csv(rfile_name, delim_whitespace=True, header=None)
return u0.values.T | 1 |
51d4557992bb03aceed9a0b786efab0b | 5b7f1a17d3d89c9a1c27edbeecc378e7 | Template factory. Given an enum subtype, turn it into
a Selection. | params = {
'classname' : self.classname,
'enumtype' : self.typename,
'enumdefault' : self.enum_default,
'string_to_enum_case' : self.__string_to_enum_case(),
'enum_to_string_case' : self.__enum_to_string_case(),
'pushback_all_values' :... | 1 |
72d79472d6fe54bd64c1015b5606e5a9 | 93c2c4c935a4f8481ab1455c66111f48 | 读取店铺下未绑定的套餐商品列表 | if(empty($params['shopID']) || empty($params['merchantID']) || empty($params['cityID'])){
$this->setError(-1,'参数错误');
return false;
}
$request = array(
'cityId' => $params['cityID'],
'supplierId' => $params['merchantID'],
'shopId' => $params['shopID'],
);
$response = Client::send('Open/Product/... | 1 |
e1c4ecec01c502cc484eee82b95fb700 | 99c0002430921a51dc04ded51607f4b5 | Static method for returning the names of the observation objects | class SpectrumAnalysis(object):
def obs_ids(self):
return [o.obs for o in self.observations] | 0 |
f541701797dd0edd2a56558c082e0c5e | e06cf694562da7d844bdda1cd74c7508 | FUNCTION : LookOrder_Click
DESCRIPTION :
This function is the event handler for when the look-up Order button is clicked
PARAMETERS :
object sender : the object that sent the event
RountedEventArgs e : the event
RETURNS :
N/A | {
if (tbxOrderID.Text != "")
{
ProgOps.DisplayOrderInfo(tbxOrderID, dgvOrderInfo, false);
}
} | 1 |
3b859e3cd773386c9e77b48fa931eb82 | 3753035774451179ce2d82c86fd8703e | Data provider for getItemSubtotalTaxValue() method. | {
return [
[\Magento\Weee\Model\Tax::DISPLAY_INCL, 1.23, false],
[\Magento\Weee\Model\Tax::DISPLAY_INCL_DESCR, 1.23, true],
[\Magento\Weee\Model\Tax::DISPLAY_EXCL_DESCR_INCL, 1.23, false],
[\Magento\Weee\Model\Tax::DISPLAY_EXCL, 1.23, false],
[4, 1... | 1 |
f6bbb6bf259146d773e1e9bbc1146e99 | bd3715079044ef0ea70375542f816fba | Define Valor da BC do PIS | public class RegistroC130
public void setVL_BC_ISSQN(double VL_BC_ISSQN) {
this.VL_BC_ISSQN = VL_BC_ISSQN;
} | 0 |
c3e3d26214b2f0ad19e3c1fdfaa16a6a | 0529fc4bb7ed981c5125328477061bb8 | toggle the reference mode | {
watching = !watching;
return(encPtr_to_objRef(watching ? trueObj : falseObj));
} | 1 |
567e8ec9cf4de4f97af12dae7ebb6213 | df0de19b115e40f170f1ddd8e3bb5d1b | bu buton ile datagrid listesinde seçilen herhangi bir task veritabanından silinecek. | {
int selectedRow = e.RowIndex;
int TodoID = Convert.ToInt32(TodosGridView.DataKeys[selectedRow].Values["TodoID"]);
using (TodoConnection db = new TodoConnection())
{
Todo deletedTodo = (from t in db.Todos
where ... | 1 |
dfd247298faa7d15f47dcacf90a356c1 | 8ff15bd6d41ea5c8b3ad7626a48598b8 | Get the position from piece is moving. | public class Piece implements ModelUpdate
public int getPosition(){
return position;
} | 1 |
18a1873a7f0634b6e3397aec039545e3 | dcddc310a17c43ccbc3cd9fafbf182e0 | Gets user session id for the specified chat user id. | String toChatUsername = call.argument("toChatUsername");
ChatClient.getInstance().chatManager().getCurrentSessionId(toChatUsername, new ValueCallBack<String>() {
@Override
public void onSuccess(final String value) {
registrar.activity().runOnUiThread(new Runnable(... | 1 |
d8a2684187bb501cbb7f9b76033ac877 | cafc64c61fa9626e76b249d763701472 | 根据栏目名称取Banner | List<Banner> getBannerList(String channel); | 1 |
a87c4811fdc3fdfa9c30a63c8697580a | 43bcd797b0943392c07fb03633db5fa7 | 상품판매 시작 날짜를 업데이트 한다 | public class InventoryVO implements Comparable<InventoryVO>
public void setStartDate(Timestamp pStartDate) {
mStartDate = pStartDate;
} | 1 |
2d9f28cedf1aece82a6eb21ac80e4a41 | 33f681f363a93c0d568d84d4fc32dd28 | Validate attribute mapping | List attrMappings = getAttributeMappings(transMappingRoot);
if( attrMappings.size() != targetAttributes.size() ) {
return false;
}
List localAttrList = new ArrayList(targetAttributes);
Iterator iter = attrMappings.iterator();
while(iter.hasNext()) {
... | 1 |
569f25dd7a50c6cc97bd2e9460eafd65 | 3806c80e14e21965c67c5997bf35b6ec | 在图的顶点表中插入一个新顶点vertex。若插入成功g,函数返回true,否则返回false。 | bool graph::addVertex(Label l, Graph& g) {
if (isEmpty(g)) {
VertexNode* vn = new VertexNode;
vn->label = l;
vn->next = (VertexNode*)noVertexNode;
vn->adjList = noAdjNode;
g = vn;
return true;
}
if (g->label == l)
return false;
return addVertex(l, g->next);
} | 1 |
e23b3458563822abfaf8c5d7d05664af | 43c358aedcf49eec0a822d0e4762633d | 获取License文件路径 | public class Common
public string getUploadFileUrl(string id)
{
string root = ConfigurationManager.AppSettings["UploadFileRootDir"].ToString() + "LicFile\\" + id + "\\";
return root;
} | 1 |
5bea609f245bc689fde6311c0e152665 | cc845e970d7af57846515e854b792ee5 | End emitting an instruction
Should not typically be called directly use InstConstructScope to scope construction | namespace Internal.IL
partial class ILImporter
private void EndImportingInstruction()
{
_constrainedType = null;
_builder.CurrentDebugLocation = default(LLVMValueRef);
} | 1 |
18200c4b9f2c91134953292a7a617371 | 61a42740a29a63bf4e1b7df35721f46d | 恢复商家,该商家将可以继续向卡券库提供卡券 | class MerchantCard extends \BB\DurianBundle\Entity\MerchantCard implements \Doctrine\ORM\Proxy\Proxy
public function resume()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'resume', array());
return parent::resume();
} | 1 |
066283c9c7ea193c348598c5830c1db0 | 12ce545918b0c577667b52ea1499d42e | Returns the CFG nodes created by the visitor. | class CFGGenerator(ast.NodeVisitor):
def generate(self, node, source):
self._init_variables()
self.tokens = TokenGenerator(source)
self.visit(node)
return self.block_list | 1 |
fcd8fc04491313e19ba59843fc5811ef | 939d3c9ec308f50e7d84a43b8d528494 | 计算标题和正文(分别)每个词在各个类别下出现的频次 | def readfile( path,cate ):
cates = [0]*NUM_CATES
words = [ [0]*(NUM_CATES+1) for i in xrange( NUM_WORDS ) ]
rf = open( path )
for line in rf:
if not line or line[0]=='#':continue
items = line.split()
cid = int(items[0])-1
cates[cid] += 1
fo... | 1 |
abfeb52d8b0a6362b62a9cbc21952579 | b81ace1f172a9ffd2aea43ccab2ac943 | Method checks if user logged in,
then transfer it in the cabinet - if no - asks logina and password page | namespace ComicsShop.Forms
public partial class BasketForm : Form
private void pictureBox1_Click(object sender, EventArgs e)
{
if ((UserData.Login == null) && (UserData.Password == null))
{
LogInForm newForm = new LogInForm();
newForm.Left = this.Left;... | 1 |
d575a4d2b7f8330fa63fb3ef11808fcc | 954a4c597cf0e26f401762e0d158e353 | Calcula a função de utilidade do modelo baseado em cada instancia criada | class Genetic_Algorithm():
def calcularAptidao(self):
self.aptidao = []
for individuo in self.populacao:
self.aptidao.append(self.funcao_objetivo(individuo)) | 1 |
5837023f7788b041477f9baaad1f0ced | 99df7e6bc875cb221f7319089bc548a1 | \brief Handle the Edit>Set Keyframe menu option | bool CStudioApp::handleWelcomeRes(int res, bool recursive)
void CStudioApp::SetAutosetKeyframes(bool inFlag)
{
CStudioPreferences::setAutosetKeyframesOn(inFlag);
m_core->GetDoc()->GetStudioSystem()->GetAnimationSystem()->SetAutoKeyframe(inFlag);
} | 0 |
83a7996a6c4863a40c80a4bd5cc6379a | 7666d67421a603d068b631f1db8e65e8 | set client-key used for authorization on frontend API request/configuration. | class _ExportableConfig(types.ModuleType):
def client_key(self) -> Optional[str]:
return __config__.get('clientKey') | 0 |
5461a399a70bbe170ed4bf0aa93a5587 | 80f506321cf000782d25c638b83ec8be | uzak sunucudan eklentinin güncellemesi olup olmadığını kontrol eder | class Redis extends Adapter
public function isUpdate(){
return $this->_isUpdate;
} | 0 |
f703476ccd44816587d6a4b6ce7f24ce | 0dd4fc83826c83afcec1b1af30efe9ce | 乐观锁, 以特定字段的值作为限制条件,更新对象,并自增该字段.
<p/>
<p/>
<code>update t_user set age=30, city="广州", version=version+1 where name="wendal" and version=124;</code>
需要更新的对象, 必须带@Id/@Name/@Pk中的其中一种.
需要过滤的属性. 若设置了哪些字段不更新,那务必确保过滤掉fieldName的字段
参考字段的Java属性名.默认是"version",可以是任意数值字段 | @SpringBootTest
class Mpdemo1010ApplicationTests
@Test
public void testOptimisticLocker(){
User user = userMapper.selectById(1250573370756440066L);
user.setAge(200);
userMapper.updateById(user);
} | 0 |
71ee92db98da7731d8891af1b59e41d2 | 4a37954f076aa6001fb2f5acbea3a8a5 | Récupère tous les commentaires ayant été signalé | {
$requete = $this->db->query(
'SELECT comments.id, comments.auteur, comments.contenu, comments.datePublication, comments.nbrSignalement, articles.titre
FROM comments
INNER JOIN articles
ON comments.idArticle = articles.id
WHERE comments.nbrSignalement > 0
ORDER BY comments.nbrSignalement
... | 1 |
82c786ffd6792c6ed049b417dc75d08e | 5788dc0da0994f5ea9556d5db95b0317 | Estimates simple or multiple linear regression model using the ordinary
least squares method
Inputs: X_vars - a pandas dataframe containing the X variables
(regressors), Y_vars - a pandas dataframe containing election
results data
Returns: results - tuple of parameters of regression model, the
model itself | regr = linear_model.LinearRegression()
Y_v = Y_vars.values
X_v = X_vars.values
regr.fit(X_v, Y_v)
coeff = regr.coef_
b_0 = regr.intercept_[0]
list_of_coefficients = [b_0]
for i in range(len(coeff)):
list_of_coefficients += [coeff[i]]
return list_of_coefficients, regr | 1 |
fbd668d9e79324bbc6f38fe9a6fd1e54 | 79df350bb53a3ce121fac15f86e15406 | Block A: Main. Implements the Merge Sort algorithm.
Input: 1-D Array of unsorted numbers.
Output: Sorted version of the input. | unsorted_list: LinkedArray,
in_place = false
): LinkedArray {
let list: LinkedArray;
if (!in_place) {
list = new LinkedArray();
list = Object.assign(list, unsorted_list);
} else list = unsorted_list;
if (list.length < 2) return list;
let mid = list.length;
mid = (mid - (mid % 2)) / 2;
let side... | 1 |
decf702af2a30e04b41c88881fdd7ab7 | a24cb3942547aa5dfd241502579e79ab | test to check if we can find a user_credential by social media and display information | self.new_credential.save_credential()
test_credential = Credential("Alex", "Otieno", "Alexotieno1717", "Alex123", "alexotieno900@gmail.com")
test_credential.save_credential()
found_credential = Credential.find_email("alexotieno900@gmail.com")
self.assertEqual(found_credential.fir... | 0 |
0e9515c00e9a3720938297554eb49005 | 19e0f828bb6b1e7c02ee7f98983bf206 | Sets the requested accent to the application's appearance. | bool SetAccent(SolidColorBrush accentSolidBrush); | 1 |
e59ea774c357d96fac23be6d4e31e8ce | d17284f05d6340ffbc4dc8f22200f744 | 条件分页获取品牌下的商品 | {
$message = '';
$status = 1;
$data = Brand::model()->getBrandProductByPage($_REQUEST);
$this->ApiAjaxReturn($data,$message,$status);
} | 1 |
4bc500fb36031aa7d11267c7769d1df0 | d5bd9f96ba67bd00807743a7c9fdf144 | Writes the deletion update to XML. | public class TombstoneProducer
public void appendTombstones(final XMLStreamWriter writer, final EntityInfoAggregator eia,
final EntityProviderWriteProperties properties, final List<Map<String, Object>> deletedEntries)
throws EntityProviderException {
try {
for (Map<String, Object> deletedEntry : d... | 1 |
dbddc676e55c6a535542a508c7ee4a36 | 76e150e43569cdf1c2cfa3717cc7744d | @brief 将CLIParseResult结构体设置为默认值 | int8_t result_init(type_CYCLOGRAM_RESULT* result_ptr, type_PL* pl_ptr)
{
type_PL_CYCLOGRAMA_RESULT *rs_box = &result_ptr->box;
result_ptr->cyclogram_result_ready_flag = 0;
result_ptr->tmi_slice_num = 0;
result_ptr->body_num = 0;
result_ptr->body_offset = 0;
result_ptr->result_num += 1;
result_ptr->box.header.cyc... | 0 |
8ca5c4dbea65732b8e71113fe76ca636 | b79181d16c79dbb22cbd84f88b765613 | function to create root directory and its corresponding inode. | {
DEntry d1, d2;
d1.inum = 1;
strcpy(d1.name, ".");
d1.strlen = strlen(d1.name);
d2.inum = 1;
strcpy(d2.name, "..");
d2.strlen = strlen(d2.name);
Inode inode;
inode.flags = 1;
inode.fSize = 0;
write_dentry(&inode, &d1);
write_dentry(&inode, &d2);
write_inode(&inode, ... | 1 |
7a2f6d5865be35800dbac649bad305c1 | 8e167cf0ff93fd8c3b3c975b4a10f756 | @brief Compare the raw pointer values. | int compare_pointer(void *pointer_0, void *pointer_1) {
return pointer_0 - pointer_1;
} | 1 |
e468e97e7cda3ebc614b473cbbb6efec | fa76698d83dea9f09a6b1e47212a97ea | 获取操作类型名称 | $op_arr = array('0'=>'创建', '1'=>'更新', '2'=>'改名', '3'=>'移动', '4'=>'删除', '5'=>'上传', '6'=>'下载', '7'=>'还原');
return $op_arr[$opid];
} | 1 |
f553c4587d79b9d069b1c4f10ba8617a | 3ec5f59e24c875fc379f924ca1cb9398 | GET /data_classification/low_level_categories/{low_level_category_id}
Retrieves a low level category based on the supplied low level category ID. | {
$category = Category::findOrFail($id);
return response(['category' => new CategoryResource($category), 'items' => $category->items, 'message' => 'Retrieved successfully.'], 200);
} | 1 |
919410e53a8c9552fb18a49432027ddb | 459adfd5dc6095bafe8758d4b9e296b4 | URL Encode String takes in a string and converts it into fully 'percent-encoded' string | inline QString encode(QString string) { return QString(QUrl::toPercentEncoding(string)); } | 1 |
8d7af9fb420679dc369cc6cd1fec3ca1 | 90731fb16bf6e8e6fbdfced40c6c5247 | @brief
Detruit les threads d'envoi | void disaptch_release(){
pthread_mutex_lock(&QUEUES_MUTEX);
for (size_t i = 0; i < queues->size(); ++i){
dispatch_queue_t *queue = (*queues)[i];
pthread_mutex_lock(&queue->queueMutex);
for (int i = 0; i < queue->numThreads; ++i){
_destroyWorkerThread(queue->threads[i]);
}
pthread_mutex_destroy(&queue->qu... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.