query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
af32ffafa9199723d6418bdba7b7d476 | e4e035433b04cc45febdd250af3a27b0 | @brief Definir o número da Ficha que sofreu a Ação | class ActionsCoDocs
public function setNumero(?int $numero): ActionsCoDocs {
$this->numero = $numero;
return $this;
} | 1 |
c3ae064324655d8dad168539ca7e6318 | 4395880d6229a045f4455e6cb9d2bb97 | Получить регулярное выражение по списку параметров, входящих в паттерн таблицы | namespace Botwave.Web.UrlRewriter
public class UrlRewriterContext
private static string GetRewriteFilterPattern(IList<string> filters)
{
if (filters == null || filters.Count == 0)
return null;
StringBuilder patternBuilder = new StringBuilder();
foreach (st... | 1 |
4071896cc166e231f64f92c66519739e | 0a5e197f428e581b0b4ec6de9be0cfe0 | 更新Xaml信息 | {
TxtHomePage.Text = AppInfo.HomePage;
TxtHomePage.ToolTip = AppInfo.HomePage;
TxtGitHubPage.Text = AppInfo.GitHubPage;
TxtGitHubPage.ToolTip = AppInfo.GitHubPage;
TxtQQGroup.Text = AppInfo.QQGroupNumber;
TxtQQGroup.ToolTip = AppInfo.QQGrou... | 1 |
6c8fa365c215d4603cc42c19be8c3071 | cc1729573dc567c10dda4d82f1a9ec0a | Set that this key should be compressed | public function setCompress($compress); | 1 |
2a3d364886ee6fe9817644477fb3aaad | d21860f02da7998e59c64e083d215898 | User aborted the verification process (X click or esc keyup) | public class FragmentKycOverview extends AbstractFragmentBase
private void onButtonClickAbort() {
DataContainer.instance().mVerificationStep = KYCCommunication.STEP_START_DOC_VERIFICATION;
getMainActivity().getSupportFragmentManager().popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE);
} | 1 |
7eca61da002a329c1d73ce8bada2ee2e | 26325e2d3a38c5abbdcbfecd789fbb54 | IsYAMLEqual returns whether the expexted YAML matches the actual YAML. | ok := true
for name, file := range expected {
_, inActual := actual[name]
if inActual {
if !assert.Equal(t, string(file), string(actual[name]), name) {
t.Logf("%s did not agree", name)
ok = false
}
} else {
t.Logf("File %s was expected but is missing from the actual fileset", name)
ok = fals... | 1 |
0436d3b7d68cf9fea9d15bab8f83daa4 | 76d2dcd2442560281fa1d299f3fdcfb5 | 保存多张表的数据 | namespace RIPP.OilDB.Data
public class OilBll
public static void saveTables(List<OilDataEntity> OilDatas)
{
var dt = getTable("OilData");
#region
foreach (OilDataEntity d in OilDatas)
{
if (d.oilInfoID > 0 && d.oilTableColID > 0 && d.oilTableR... | 0 |
bf477cc591e24db461aa53fd1354c600 | f3bb7419b5912aba3aeecb9a0ca4a214 | takes one of the three name lists as a parameter and
returns a name chosen at random from that list | int val = rand.nextInt(10);
if (val < 6) {
return greekName();
}
else if (val < 9) {
return astroName();
}
else {
return otherName();
}
} | 0 |
16222ef6cd6151150e37ec985ef063aa | 5c4437bf392bd134528e81657f610b99 | Get a well's size in x, y, z dimensions based on its shape. | {
float minX = 100;
float maxX = -100;
float minY = 100;
float maxY = -100;
float minZ = 100;
float maxZ = -100;
for (int i = 0; i < positions.size(); ++i)
{
const int index = i % 3;
const float value = positions[i];
switch (index)
{
case 0:
{
if (value < minX)
... | 1 |
389cdd063760864ffbe994458f2247d1 | 8c0fc409b5ca8eab1cb71d1976649343 | FCom_Core_Model_Abstract_State_Concrete constructor. | if ($ignore_request) {
$this->__state_set = true;
}
parent::__construct(Web::getInstance()
->getDb(), $state);
} | 1 |
233f785ec1c8846d7d2234307e6c78e3 | 11c62291d46d13f0c92a393f85f7ec69 | Modify the `ImageSource` in-place by appending a whitening filter to the generation pipeline. | class ImageSource:
def whiten(self, noise_filter):
logger.info("Whitening source object")
whiten_filter = PowerFilter(noise_filter, power=-0.5)
logger.info("Transforming all CTF Filters into Multiplicative Filters")
self.unique_filters = [
MultiplicativeFilter(f, whiten_filte... | 1 |
1fd935b0aadce5b83f4ef83a0b126ba4 | 2c24552b6a76fa20fcbd988323dcf18a | Récupère les informations d'un voyage (prix, nom, étapes, etc...) | class TrTravelDataService extends DataServiceBase
public function get($id) {
$sql = 'SELECT * FROM ' . self::TABLE_NAME . ' WHERE id = ' . $id;
$result = $this->getAdapter()->query($sql);
$result->setFetchMode(\PDO::FETCH_ASSOC);
return $result->fetch();
} | 1 |
a9e2e45bbbd45af607676387cb82cc37 | 5c0d3f8d072a348f5d3101efeb146de9 | 检查脚本当日是否已经执行 | class Resource extends LogDo
public function CheckDo()
{
$s = $this->db->query('Select `stationid` From `rha_scriptlog` Where `type` = 4 And `ctime` = CURRENT_DATE()');
$s->setFetchMode(PDO::FETCH_ASSOC);
$sid = $s->fetchAll();
$ss = array();
foreach ($sid as $v)
{
$ss[] = $v['stationid'];
}
return ... | 1 |
59017b43fe5641518cadcc99822bfa7e | 59ed4323e6c8ff889c96335a564fa3d4 | Await termination of all workers. Calling this on its own will not stop the worker pool. Call this after
initiating a shutdown. | for wp in worker_procs:
launcher.cancel(wp, timeout=libE_specs["worker_timeout"])
if exit_logger is not None:
exit_logger() | 0 |
242436a8f93b1bc48479a8bd567e5cd2 | 0e63bf0604fc102338d8919534adb301 | 根据功能子项ID查询对应的最近业务域对象 | List selectSubFunctions(String functionid); | 0 |
bd293d5f35504a3ef80247ea83c3f04c | 90ba357d5fdaf0d67084157fe773ef39 | 上传歌曲封面或歌星图片文件 | String uploadCover(MultipartFile multipartFile); | 1 |
b1bb78adb2bb218f111095ae652bbfdc | b959f9ba234d72843826d26537a46691 | Allocates a memory buffer
When memory allocation is failed, run GC and retry it | {
if (unlikely(_bytes == 0))
{
return 0;
}
static __thread int gc_inited = 0;
if (unlikely(!gc_inited))
{
if (!atomic_flag_test_and_set(&gc_init))
{
pthread_create(&garbage_collector, 0, cleanup, 0);
}
gc_inited = 1;
}
static __thread char* data = 0;
static __thread char* data_end = 0;
size_t con... | 0 |
f01592e50b71aabe8267bc0ffc99f0a2 | b5bb61eaa0b35ba01730e7e63278ac04 | Получает флаг нажата ли кнопка буста | char SwitchStatus_Booster_Button1()
{
return (P5IN & BUTTONB_1);
} | 1 |
a9467804665c985479071a3273c174e3 | ffa89fcaf18f319e8de9b7ae387fa320 | Returns title for definition views (dialog, widget, etc.) | class ProjectContentView(BrowserView):
def title(self):
context = aq_inner(self.context)
portal_type = self.requested_type()
type_map = {'iteration': u'Iterations',
'offer': u'Offers',
'tracker': u'Issue trackers',
'other': u'Attachment... | 0 |
ec6253d8e86e64f476f459aaadea11da | f22060b0443f5de9907b756ede0f794e | Preprocess image data, and convert labels into one-hot | def preprocess_data(image, label):
image = tf.image.resize(image, (300,300))
return tf.cast(image, tf.float32) / 255., label | 0 |
0c05028fd6d105d121586fbabaaf74da | 7091aa7e225cf743881e51998d13a221 | 先将全部地址默认取消 | for (var i = 0;i < $scope.address.listArray.length;i++){
$scope.address.listArray[i].default = false;
}
$scope.address.listArray[index].default = true;
console.log(index);
} | 1 |
592b4da891b15d0963a840081ac6d3b6 | 367b891bb1cf29820d099bba35df211d | Perform minical. This calibrates the power meters in the Front End,
creating a correspondance between Power meter readings and sky temperature. | self.info["tsys_calibration"]["date"] = \
datetime.datetime.utcnow().strftime("%Y-%j-%Hh%Mm%Ss")
try:
self.info["tsys_calibration"]["el"] = float(self.hdwr("Antenna",
"get","ElevationAngle")["ElevationAngle"])
except Ex... | 1 |
56eaa4eeda828c18424f060a9dec81c1 | fce10a7d4a8fdf50770dcd4570043af6 | Creates and adds the specified mail to the database as well as registers it to the specified users. This
function also takes care of updating the total amount of messages on the receiving users. | namespace EmailService
public class EmailService : IEmailService
public int TriggerMail(string userName, string uid)
{
return new Database().TriggerEmail(userName, uid);
} | 0 |
347783692b789a5b0e091f794871e93a | ca9e46d97682c2dcbc2efa0d80340ae8 | Get all forums that the current user does not have access to ("Restricted forums" in the profile) | {
$parent = isset($args['parent']) ? $args['parent'] : null;
$userId = isset($args['userId']) ? $args['userId'] : null;
$ids = array();
$forums = $this->entityManager->getRepository('Dizkus_Entity_Forum')->findAll();
foreach ($forums as $forum) {
$parent = $forum-... | 0 |
9ac42581b601ee5bf7565cdce5dd4a0a | 60554626f93be0ddc5cf00438813b5e3 | 根据uuid查询放款渠道 | Gateway getGatewayByUuid(String uuid); | 1 |
db27383bfa97a476d263151303ab1c35 | 76fbea2948898f56b2eb9dd9cc1ed406 | extract only the last price that was recorded already of a given cryptocurrency | def getLastPriceBTC():
lastprice = Decimal(0)
apiurl = ENDPOINT + TICKER
response = httpcon.getJsonResponse(apiurl)
if response is not None:
for ticker in response:
if (ticker['market_name'] == 'NANJ_BTC'):
lastprice = Decimal(ticker['last'])
return lastprice | 1 |
12b8ea97b8c184fcbf708cfb9be96f0e | 9e4beb482784b2614b1dd8e72e085d4b | 解析小游戏开始地址 | {
if (string.IsNullOrEmpty(miniGameConf.ProjectConf.DST))
{
this.showToast("请先转换为小游戏", true);
return;
}
if (!File.Exists(miniGameConf.ProjectConf.DST + "/webgl/index.html"))
{
this.showToast("请先转换为小游戏,并确保... | 0 |
42286c9fc8d746aec814bc3a230140c7 | d949f085f2f33399c070121f0c8b41d2 | the diagonal elements of a rbf kernel are 1 | x = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12]])
expected = sklearn_rbf_kernel(x, gamma=0.5)
actual = distance_matrix(x, measure=rbf_distance)
n = len(actual)
actual[range(n), range(n)] = 1
assert_almost_equal(actual, expected, decimal=20) | 1 |
a97bf2346cb38526211321482157eb5b | d8e6a96c57a6db9eb3899d008a12d64f | Enabled state of ALL of the power supply outputs. | class EOS_Driver:
# CONSTANTS
def allOn(self):
self.pwms[0].setAllPWM(0,self.PWM_ON)
self.pwms[1].setAllPWM(0,self.PWM_ON)
self.status = [1.0] * self.NUM_LIGHTS
return self.status | 1 |
553a0baa0f7a8f82481519bc7e694f48 | fcb80d6807df16d5385d3dc36797379d | Adding or removing current media id to selected list into localstorage
Changing other button state if needed | export class ListButtonsComponent implements OnInit
public updateList(type: string) {
this[type] = !this[type];
let list = this.localStorageService.getList(type);
const otherType = type === 'seen' ? 'mustSee' : 'seen';
if (!list) {
list = [];
}
if (list.find(media => media.id === this.curr... | 1 |
48a5606953cc67857703f03d5bc55ae5 | 51883a1a4e887cf19387c60393a17c04 | 获取过期劵列表 | public List<Coupon> expire( HttpServletRequest request ) throws Exception {
List<Coupon> list = couponService.expire();
return list;
} | 1 |
485c3ddbab89b05312d1c55f501909d7 | 2016f2a55d25abdfe0fe5e62a8c0a701 | Shows the security alert. | showSecurityDevices() {
gSubDialog.open("chrome://pippki/content/device_manager.xhtml");
} | 0 |
5b320845e6dce35086fddc17ab7fc5a7 | dd3cef1e3096c434e809badfa3e21157 | Description: Converts the dict of industries to holoviews time series plot
Input: Dict of industries where each key value is a dataframe
Output: Panel app which updates the plot based on menu selection | fig = make_subplots(specs=[[{"secondary_y": True}]])
indi_y = indicator_df["values"].astype('float64')
indi_dates = indicator_df["dates"].astype('datetime64[ns]')
senti_y = senti_df["final_sentiment"].astype('float64')
senti_dates = senti_df.index.astype('datetime64[ns]')
x_axis_limit_l = max([... | 0 |
7209c3441ca4f3ef054479c158a3da84 | 5400b8414ce0b22c92fc9162a90704cb | 按主键删除单条BpmDicision. | int deleteBasicSysDic(Assist assist); | 0 |
76fa06522df8cc9c01dfa378b1110220 | 0918f5de1ead0e4297a3aaf62dd832a0 | Check that the list is empty, otherwise gather all conflicting references and display them in the error message. | addresses = self.addresses.to_set
missing = Set.new
result = map do |r|
common = (addresses & r['references'])
if common.size != r['references'].size
missing.merge(r['references'] - common)
end
r = r.... | 0 |
6748e0fd8ddb56f09ae96164e9f23af2 | 6ce703c0ebecaf3d2f1831cc46b439b8 | Reúne as funções extras que devem ser executadas on create. | class Template
onCreate() {
} | 0 |
2bad57e48361266bac3141ae349647af | 753eee228c60ddc2c0adf140e3bcb318 | Adjust the active boundary of the vertex tree.
Walks the boundary of the active tree from left to right,
calling a user-specified function to determine whether to
unfold boundary nodes, lowering the boundary, or fold parents
of boundary nodes, raising the boundary. | class _Settings:
def folding_func(self):
return self.run_settings['folding_func'] | 0 |
6b06c5b94e10e563effa8520a4b0c39d | a0444ae3ac28193e290d92ab6cd56838 | 展示请假球员 | $id = input('id');
$starttime = strtotime($id.' 00:00:00');
$endtime = strtotime($id.' 23:59:59');
$signs = new Signed();
$students = $signs
->alias('a')
->field('a.tid,t.tname,signtime,a.position')
->join('teacher t','a.tid = t.mobile')
... | 0 |
7120da229d2027dc1a527b822ef89c67 | fcb7ca7340eca6b4e0d88aa64102d2a3 | 表空间配置校验重复 | String checkTable(@Param("tableSchema") String tableSchema, @Param("tableName") String tableName); | 0 |
9ec348d0251cec3c1e098dd6e79b4b4e | 7f61448ad6da3ef0f9cb03f40c5be655 | Make it proper | cases like (1) | 0 |
933145279b43d19fe75f5cef1d8cd905 | 1b286340ed15619127acdf5c6aa33326 | 使用.NET 4.5任务异步执行单行查询 | namespace Startest.DataAccess
public sealed class DbConnection : MarshalByRefObject, IDisposable
public Task<T> SingleAsync<T>(string sql, object anonType = null, CancellationToken token = default(CancellationToken))
{
return dbConn.Exec(dbCmd => dbCmd.SingleAsync<T>(sql, anonType, token));
... | 1 |
98d2e236b3ed0fd3bb211bebfb8e4886 | ae521a41e1a30111d9f04ca53f4bbde6 | Create a unique name for the node in the graph, on node creation a digit is appended , eg nodeName00, nodeName01 | function node_namer(node) { return 'node_' + node.code_generation_numbering; } | 1 |
9130903b63642fc0f35cefebfab33436 | d48a796af2f55f75138459821f16e2c1 | api to create new subadmin | class SubadminController extends Controller
public function add_subadmin()
{
$states = State::all();
return view('dashboard.subadmin.add_subadmin', [
'states' => $states
]);
} | 0 |
380035449d1fb9d5f6f4e78c94659c5b | 28171e57f3de5f68ddfa16e762c1aec2 | !
\brief Criptografar array de bytes no modo CBC | void AESCrypt(long direction, char *sourceBuff, char *resultBuff)
{
unsigned int uiMsgLen,iSize;
int iMod=0;
uiMsgLen = strlen(sourceBuff);
iSize=uiMsgLen;
iMod=uiMsgLen%16;
if(iMod)
{
iSize=((uiMsgLen/16)+1)*16;
}
PRCMPeripheralReset(PRCM_DTHE);
AESConfigSet(AES_BASE, (direction | AES_CFG_MODE_CBC | AES_CF... | 1 |
b97193cd9aa9bfddb277881a605231a9 | b32fe6a5a67c833f175d2ce939d92a2f | Adds a configuration callback to the builder that is used to configure the receiving endpoint. | this IEndpointsConfigurationBuilder endpointsConfigurationBuilder,
IOutboundRouter<TMessage> router,
bool preloadProducers = true)
{
Check.NotNull(endpointsConfigurationBuilder, nameof(endpointsConfigurationBuilder));
Check.NotNull(router, nameof(route... | 0 |
2e4683bc9424148aa67ca33993fc309e | 309e6be605d325489a149224da84377f | Filter by division | setDivisionFilterByBusinessUnit(businessunitId) {
var divisions = this.filterData["divisions"]
if(businessunitId === "") {
this.setProperty("/filterData/divisions", divisions);
return;
}
var items = divisions.filter(function(val, index) {
return val.parentId === businessunitId || val.id === ""
... | 1 |
c7e97b18345d1d763db1ff246a1e83a6 | 3ee860089d8452883178a7b15b5c2ec8 | Combines a list of summaries so there are no duplicates statuses and the counts are added together. | for (key, val) in summaries.items():
summary_vals = self.summaries.get(key, [])
self.summaries[key] = summary_vals + [val] | 0 |
959073fb0b29b480b185ceddc7665075 | a3d8ead40b34809991c09053bb5955df | Test movie page for movie randomly choosen. | namespace OnVideo.Controllers
public class MoviesController : Controller
public ActionResult Random()
{
var movie = new Movie() {Name = "Shrek"};
return View(movie);
} | 1 |
2862322e7ce10bf2820be01d3d50fbf8 | 143622f3a4db93133b6b1c4e52ec8286 | 根据SSID重连一个之前连接过的网络 | ifprofile = False
rawcmdlines = subprocess.Popen('netsh wlan show profiles', stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
rawcmdlines.wait()
cmdlines = rawcmdlines.stdout.read().decode("GBK", "ignore")
profiles = re.findall(r'(.*): (.*)\n', cmdlines)
for profile in profiles:
if pr... | 1 |
4a719241403930ba934aa7dc86ee0487 | 0e1ff5b062095154e2a7344c7822eab7 | Exit a parse tree produced by the {@code showRoutine}
labeled alternative in {@link MySQLSQLStatementParser#showStatement}. | void exitShow_tables_stmt(FusionTablesSqlParser.Show_tables_stmtContext ctx); | 0 |
6eb0f165eab5d0eaaec8ec678c6f5ddd | d7812b63eb577886a53eb5a99bb8c725 | 展示所有事件状态(分页) | PageHelper.startPage(curPage, pageSize);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
List<MassEvent> list = massMapper.queryMassEvent(type);
for(MassEvent massEvent : list){
massEvent.setStatusDates(sdf.format(massEvent.getStatusDate()));
}
PageInfo<MassEvent> page = new PageInfo... | 1 |
ff23ef41582928dd1fe0691dadd9e9c9 | b5f505a7df2b055301198d9d75d1d544 | Read an unsigned 24-bit little-endian integer from the stream. | public final class ParsableByteArray
public int readUnsignedInt24() {
return (data[position++] & 0xFF) << 16
| (data[position++] & 0xFF) << 8
| (data[position++] & 0xFF);
} | 1 |
0a6ac2fe14ebd267eed0096892c4c25d | 777665ba55fee0d0b90ca69287ad072c | Unset the vhost-user feature flags as they are not supported by the underlying vhost
device. | class CiscoNexusBaseDriver(object):
def disable_vxlan_feature(self, nexus_host):
pass | 0 |
de51c1e708d53247cf16a0232370c625 | 962fde37e878736eec809893e0a29a69 | Mark movie as watched | public class UserDaoPostgres extends PostgresBaseDao
public boolean markWatched(int movie_id) {
try(Connection conn = getConnection()) {
String query = "INSERT INTO USER_MOVIE (USER_ID, MOVIE_ID) VALUES (?, ?)";
PreparedStatement stmt = conn.prepareStatement(query);
stmt.setI... | 1 |
8f049bade808fb21cd8e62092db107bc | 277f5f5b2d1ae310be821ce3b21620cb | Adds and defines the shutdown hook, which stores the parameters | class StartHandler(webapp.RequestHandler):
def get(self):
runtime.set_shutdown_hook(_counter_store.shutdown_hook) | 1 |
ab1336eae496472c2510c36e8a0fd74f | c29022916e2701d2842b8a9a65a53173 | Runs the SHA256 algorithm on the binary content of the file named file and returns the hexadecimal digest | namespace ObjectsConverter
public static class Converter
public static string GetSHA256(string filepath)
{
using (var sha256 = SHA256Managed.Create())
{
using (var file = File.OpenRead(filepath))
{
var generatedHash = sha256.Compute... | 1 |
15e8202dfd5337adcbce65b9a2a24c59 | 4f592753f2db07432f1869cac27d11e2 | check if a fired bullet is offscreen
if it is, send it to the destruction list | void removeBullets(std::list<Bullet> &bullets)
{
for (std::list<Bullet>::iterator it = bullets.begin(); it != bullets.end(); ++it)
{
if (it->collided) {
bullets.erase(it);
}
break;
}
for (std::list<Bullet>::iterator it = bullets.begin(); it != bullets.end(); ++it)
{
sf::Vector2f bulletBoundary = it->fac... | 1 |
98a7145dbb7e16d25f68e64e31210bc4 | aa667bd7889a7e36b83aff47acf72628 | Gets commission_percent | class Deal
public function getCommission()
{
return $this->commission;
} | 0 |
760b9d736a7876faca3727ff559a92a9 | 6d5297ea2bbdfcfc06a2359252e2ad64 | (PECL gnupg >= 0.5)<br/>
Removes all keys which were set for signing before
<b>gnupg_init</b> or <b>gnupg</b>.</p> | gpgme_sig_notation_clear(gpgme_ctx_t ctx)
{
gpgme_sig_notation_t notation;
if(!ctx)
return;
notation = ctx->sig_notations;
while(notation)
{
gpgme_sig_notation_t next_notation = notation->next;
_gpgme_sig_notation_free(notation);
notation = next_notation;
}
} | 0 |
a8787edc1b21a5fba8b496f62f1be4a0 | 939ad2bac504445324ea5387fcccc369 | get flag to save raw response from api request | class ServerConfig
public function isRaw() {
return $this->isRaw;
} | 1 |
01bfa5420e52a4e9b8dbf51dda272b2a | e6f688c9cec1963f989f92be0ee9f09c | Return text that contains start and enrollment
information about the course. | return `
<div class="text-xl">Marist College, B.S. in Computer Science</div>
<div>Minors: Math, Music, I.T., I.S.</div>
<div>Favorite Coursework: Algorithms, OS, Compilers, Web Development, Theory of Programming Languages</div>
`;
} | 0 |
743026e4ffcccc25b786fd2ca39a55c8 | a8a9a283caaa8361b01b22c0b4cdf7a5 | Gets a list of all example definitions. | public class AvailableExamples
public ExampleDescriptor[] getExamples() {
return availableExamples;
} | 1 |
c46433255d1bf65ed04776c0e2060c21 | 0455ad35602cc950f27bb295bc103065 | 扫描指定目录及其子目录,获取全部文件路径 | List<String> list = new ArrayList<String>();
File baseFile = new File(directoryPath);
if (baseFile.isFile() || !baseFile.exists()) {
return list;
}
File[] files = baseFile.listFiles();
for (File file : files) {
if (file.isDirectory()) {
... | 1 |
0c2c09936543a2fa7e5a657644907612 | c5bfc9fcf1b08f7f0ffd4641be4e1857 | 实现侧边栏的删除 | function topTabDelete(layid) {
var element = layui.element;
element.tabDelete('layadmin-layout-tabs', layid);
} | 0 |
48581903e2399fd1795a686ced469681 | cdc3710b7be908b007351898e2aec32f | https://stackoverflow.com/a/62366144/3522933 | function weighted_random_pick<T>(items: T[], weights: number[]): T {
for (let i = 0; i < weights.length; ++i) {
weights[i] += weights[i - 1] || 0;
}
const random = Math.random() * weights[weights.length - 1];
let choosen = 0;
for (let i = 0; i < weights.length; ++i) {
if (weights[i] ... | 1 |
301dc3256f9d5ba4285d5d3d0b8317ea | 46ab0102b1747f94c0ba1cc014443b9b | parses the http post and gets the message
and makes a call to get a new message that
is reversed
Returns | class ELJ(IScanIssue):
def getHttpMessages(self):
strRes = self.helpers.bytesToString(self.reqres.getResponse())
marks = [None, None]
marks[0] = strRes.index('1337')
marks[1] = marks[0] + 4
marks = array(marks, 'i')
marksList = ArrayList()
marksList.add(marks)
... | 0 |
9f643e9a2fe5254f1b003ab629f5ca1b | 847324b1fd7d22258f229796b50e485e | @brief 선택된 회원의 간단한 메뉴를 표시 | {
system("clear");
printf("+--------------------------- \n");
printf("| => ID : %s \n", pCus->ID);
printf("| => 이름 : %s \n", pCus->name);
printf("| => 전화번호 : %s \n", pCus->phoneNum);
printf("+--------------------------- \n\n");
getchar();
} | 1 |
aec08f4c2c28afec1bbb65d1043f747e | 7f61448ad6da3ef0f9cb03f40c5be655 | MOD ONLY | cases like (1) | 0 |
ab36d915cd2edf7f5f8a38dc49d353a4 | 9168d0d9958e0a5d9e4f848eb81872ee | Requests that device connector selects a specific device. | namespace Mediaportal.TV.Server.TVLibrary.Implementations.DVB.Graphs.SS2
public class TvCardDvbSS2 : TvCardDvbBase, ICustomDevice, IPidFilterController, IDiseqcDevice
[PreserveSig]
Int32 SelectDevice(UInt32 deviceId); | 1 |
d01cb8e609327751adc21ee35f18094f | 333e77fa30e9d2311e7369e20b1a8280 | @brief Process AF Incoming Message Indication message | void
limProcessMlmAssocInd(tpAniSirGlobal pMac, tANI_U32 *pMsgBuf)
{
tANI_U32 len;
tSirMsgQ msgQ;
tSirSmeAssocInd *pSirSmeAssocInd;
tpDphHashNode pStaDs=0;
tpPESession psessionEntry;
if(pMsgBuf == NULL)
{
PELOGE(limLog(pMac, LOGE,FL("Buffer i... | 0 |
6313e520cfb1f4b3b0e565d395ec8924 | 3fa58299e745ff0c4f46c16984e63b78 | Gets the area codes and mobile prefixes from calls made. Returns a list of codes. | request: GetAreaCodesRequest,
options: GetAreaCodesOptions = {}
): Promise<GetAreaCodesResponse> {
const { countryCode: country, locationType, phonePlanId, locationOptionsQueries } = request;
const { span, updatedOptions } = createSpan(
"PhoneNumberAdministrationClient-getAllAreaCodes",
op... | 1 |
6b487f403f904ff686b8d4356acb5b3b | ad9b0b94e3f29be6dadd73d30c6b6839 | Template variable getter. Returns searched Manufacturer id | class LitExtension_CartMigration_Model_Cart_Xcartv44
extends LitExtension_CartMigration_Model_Cart{
public function getManufacturerId($manufacturer, $manufacturersExt){
return $manufacturer['manufacturerid'];
} | 1 |
b079737874d8123923796d927866a8d1 | 1886fb0cf087f09657d3b0156f3bb8a4 | 검색어를 입력한 query와 1로 초기화한 page를 통해 다시 스레드를 실행하기 이전에 배열을 clear해줌 | NaverKeywords.clear();
Fanpages.clear();
Filtered_Fanpages.clear();
navercnt = 0;
fanpagecnt = 0;
filteringcnt = 0;
} | 1 |
8f745907ca560d8021de0dd73e081572 | 2932f836459dc46a27220485a6a752b4 | Add a label to a bucket.
See {@link https://docs.influxdata.com/influxdb/v2.4/api/#operation/PostBucketsIDLabels } | namespace InfluxDB.Client.Api.Service
LabelResponse PostBucketsIDLabels(string bucketID, LabelMapping labelMapping, string zapTraceSpan = null); | 1 |
5b603529dbdfa35850357d8b3163e931 | 88a713752493229cb4b7c257851ae7f4 | Adds a raw signed cookie. | class AppsFactory(object):
def set_signed_cookie(self, request, key, value):
response = HttpResponse()
response.set_signed_cookie(key, value)
request.COOKIES[key] = response.cookies[key].value | 1 |
1168c6ddf30ddf244d5116f3a63c6cb2 | ee09c007340a5ebd3d394d1d6abd7cb1 | 获取退出登录按钮元素信息 | class HomePage(BasePage):
# 元素定位信息
def get_loginout_button(self):
return self.find_element(self._loginout_button) | 1 |
a42445caa9f599851ec945e4046d72ed | 1f8eb897035fbbc05f295e64cfa95c27 | 从历史纪录快速加载已经访问过的页面 | startUrl='http://www.qiushibaike.com/history/'
if(len(self.urls)<=0):
return
pageUrl=startUrl
while self.enable:
if len(self.pages) < 3:
myPage=self.ReadPageFromUrl(pageUrl)
if(myPage):
self.pages.append(myPage)
... | 0 |
3a334108f23c250669d4d3e301c5e47d | a618770bc6d7e6ebd48d61c5317a1011 | 检查杯栈管理的门状态 | {
LH_ERR errorCode;
uint8_t currentCount = 0;
int32_t emptyresetcorrect;
BitAction emptyStackDiskExistSensor;
BitAction emptyStackTestingPushOnPosSensor;
TaskUtilServiceSetCupStackManagementEmptyStackCount(0);
SystemReadActionParamWithIndex(MODULECUPMANAGEPARAM,EMPTYSTACKRESETCORRECTION,&emptyrese... | 0 |
d7eb466fe7b49b9cdea3d0890d68b964 | 9768067a1ab5b605dccd9fee13267b1f | Get all the atomic sets that have had their saves delayed. | class DatabaseAccessor
String[] getRegisteredArchivingSets() throws SQLException
{
Connection conn = null;
PreparedStatement loadStmt = null;
try
{
conn = dbPool.getConnection();
conn.setAutoCommit(false);
loadStmt = conn.prepareStatement(LOAD_ARCH_SETS);
ResultSet loadResult =... | 0 |
505493a576b30c4a71ace726b144fb01 | 156b463aff8b8ce579e31ed114e89595 | Allows enumeration over segments of the given list. | class Timeline:
def __iter__(self) -> Iterable[Segment]:
return iter(self.segments_list_) | 1 |
9379ae84e9f15a8816fc4b4843817904 | ff238deaef4bc56d9e6eae7e0ea8ba62 | remove all the child forums | {
$item = Item::findOrFail($item);
try {
DB::beginTransaction();
$item->removeAllChildren();
DB::commit();
} catch (\Exception $e) {
DB::rollBack();
throw $e;
}
return response()->json(true);
} | 1 |
c2d4f5802fedfa8b97c7c395ce6b3b77 | 1fc3680a9d454e70c90a4f43bd6f679a | Crop an image to the appropriate size, scale in contrast and
set mean. Currently just crops to centre of image.
Returns:
A numpy array containing the scaled image. | def process_image(image):
factor = 256 / min(image.width, image.width)
if image.width < image.height:
new_width = 256
new_height = round(image.height * factor)
else:
new_height = 256
new_width = round(image.width * factor)
image = image.resize((new_height, new_width))
... | 1 |
354bf56d7497d2e5925f7ee55ed347c0 | b82b8e96fafc90e5ae93f1264517a558 | Generates an IMEI. | String IMEI = telephonyManager.getDeviceId();
return "IMEI:" + IMEI + ";";
} | 0 |
c9ed40a7a567c10f62e1918a3ed561a6 | 2b86e7e22d9ff752a760db9666121ec5 | Gets the albumArtist
The artist named on the album for the audio file. | class JellyfinDevice(object):
def media_album_artist(self):
try:
return self.session['NowPlayingItem']['AlbumArtist']
except KeyError:
return None | 1 |
065127058547e3002a6c58f5a515c79a | 9607a74c999b1a433c5cc07ec8e18947 | Encode the NDEF record and return the encoded octets as a bytes
object (if stream is None) or write the octets into the
file-like byte stream and return the number of octets
written. The mb, me, and cf arguments are interpreted as truth
values for the NDEF Record Message Begin, Message End, and
Chunk Flag bits in the f... | uint16_t NDEF_WriteNDEF( uint16_t NDEF_Size, uint8_t *pNDEF )
{
return NfcTag_WriteNDEF( NDEF_Size, pNDEF );
} | 0 |
f552669c4561973656674565b0f26227 | 59ccfcccdb5b6ad2fb41f0a8fa2c88b7 | 如果*里面的字段,在select中有 做as 处理,则返回true | if(selectBody instanceof PlainSelect){
FromItem fromItem = ((PlainSelect) selectBody).getFromItem();
if(fromItem instanceof SubSelect){
SelectBody subBody = ((SubSelect) fromItem).getSelectBody();
if(subBody instanceof PlainSelect){
Fro... | 0 |
5bdb4a253d7db035c0466ec88e0df4c8 | cc5b680b9610684abe7c89c1a2bed9dc | Bridges virtual tty over to serial connection | UART = serial.Serial()
UART.port = '/dev/ttyUSB0'
UART.open()
if( UART.is_open):
print(" ttyUSB0 Opened Successfully... \n")
print(UART)
print("\n")
else:
print(" Error! in Opening ttyUSB0 \n")
sys.exit("\n********** Sorry ****************\n") | 0 |
fd5f3e7b110e1d1069eb8c8311d4af5c | 1f2865fff3f605efd8a296188c1db6b6 | Move to zero stop on X axis. | public void homeToZeroY() throws ReprapException, IOException; | 0 |
7d816fba1031856f354d3219f6b4c18c | fab5b958b7509bba6489405dbd302304 | Notifie tout le monde de définir l'état courant à "Premier coup Bataille" | confirm_connection_status.action_id = 2;
confirm_connection_status.worked = true;
game_start_protocole.action_id = 3;
game_start_protocole.round_nb = config_s.round_nb;
start_round_protocole.action_id = 4;
send_choice_protocole.action_id = 5;
send_choice_protocole.coop = true;
send_round... | 0 |
aa6dd821eb09c37815109289e2ed3c26 | f36d1f61ba0dfcdc3f7aecf09f6b97dd | Слот, срабатывающий когда пользователь хочет вручную закрыть процесс | {
ui->progressBar->hide();
file->flush();
file->close();
reply->deleteLater();
reply = 0;
delete file;
file = 0;
} | 0 |
6846dea76f58eb0548fb496cc58263fb | 6a37d55aa6d5c606a5b426bd97f4b669 | Removes particle segmentations that exist on the edge of the image. | def remove_border_segmentations(input_file, output_file):
im = cv2.imread(input_file, -1)
xdim, ydim = im.shape
print('xdim {}; ydim {}'.format(xdim, ydim))
border_seg_ids = set()
border_seg_ids.update(set(im[0,:]))
border_seg_ids.update(set(im[:,0]))
border_seg_ids.update(set(im[xdim-1,:]))... | 1 |
e37fa4171d86b0cb3b53049599635ee3 | d534f448370900abd102c0d367b59c54 | دالة حفظ نوع العرض الخاص بشاشة الكاشير | {
try
{
db.Open();
Edit(db,tbType);
}
catch (Exception e)
{
throw e;
}
finally
{
db.Close();
}
} | 0 |
e7f361e61f612e3dc37b0d8c4247fb7b | 519a44fe5833c434c6b031210eedb7e8 | Broadcasts the announcement. | {
if (Channel != null)
{
_navService.Navigate("AddAnnouncement", Channel.Id);
}
} | 0 |
241371e278ac72f17d1003894f96b905 | 5077f998f2345dcbc6d70698d2e0fe6c | 学生端:根据学号查询学生选择的课程,用做课表显示 | @Service
public class ServiceImpl implements YuanService
@Override
public List<SelectCourse> getSelectCourse(String studentID){
return yuanDao.getSelectCourse(studentID);
} | 1 |
131a3ca8d35eeded92f5db795d11bc74 | f32c1d821d1cf2134d2828b5927df26e | ################################################
# Calcolo dell'intervallo di confidenza #
# derivato dalla distribuzione t di Student. #
################################################ | se1,se2,se3) {
betas <- c(beta1,beta2,beta3)
se <- c(se1,se2,se3)
w <- 1/(se^2)
sw <- sum(w)
BETA <- sum(w*betas) / sw
SE <- sqrt(1/sw)
Z <- BETA/SE
return(2*pnorm(-abs(Z)))
} | 0 |
ab0acb0fa681ce73686a42f0976b8997 | 1fba5fca26526c8e4624e6149724130d | Should everyone be permitted to view the transcription | def can_view?(_user)
true
end | 1 |
679fa480491d461aa7de049d637b6350 | a5e57de40b58bbef07ecd27a60c8f236 | compare by starting index | class Solution
int compare(vector<int> &subsequence1, int index1, vector<int> &subsequence2, int index2) {
int x = subsequence1.size(), y = subsequence2.size();
while (index1 < x && index2 < y) {
int difference = subsequence1[index1] - subsequence2[index2];
if (difference !... | 0 |
ece26160f26b18ceccb7ed7a8242f8b1 | 268d39ac15afaadd74155ee9af90fc53 | Returns the specified elements of the list stored at the specified key in the range [start, end].
start and stop are interpretated as indices:
0 the first element, 1 the second ... -1 the last element, -2 the penultimate ... | CommandArgs<K, V> args = new CommandArgs<>(codec).addKey(key).add(start).add(stop);
return dispatch(LRANGE, new ValueListOutput<>(codec), args);
} | 1 |
5593a22bb25ae0be32d62cb8ca3b0bee | e58e26f557208527b82a605dfc6ab9e5 | 获取数据库查询用的商家排序项列表 | {
return array(
'0' => 'serial ASC',
'1' => 'score_avg DESC',
'2' => 'make_time_avg ASC',
'3' => 'total_sales_num DESC',
'4' => 'on_time_rate DESC',
'5' => 'refuse_order_rate ASC',
'6' => 'distance ASC',
'7' => 'rec_serial ASC',
);
} | 1 |
4c7b26a8dd6ac9f8f07f610f58b9b922 | 431f9010c7b27d488aaf6c199e8ec188 | 실명확인일자의 정보를 설정한다. | public class MemberVO extends CommonVO{
public void setRealBrthDy(String realBrthDy){
this.realBrthDy=realBrthDy;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.