query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
553a0baa0f7a8f82481519bc7e694f48 | 10dc4b7b91d3b0db561793fab8c227d7 | Adding or removing current media id to selected list into localstorage
Changing other button state if needed | console.log("inside favs");
const userId = firebase.auth().currentUser.uid;
switch (this.currOption) {
case 'prayer':
{
if (this.favourites.includes(this.currOptionId)) {
this.firestoreService.removeFavouritePrayer(userId, this.currOptionId);
this.favourites =... | 0 |
48a5606953cc67857703f03d5bc55ae5 | 1eac0f4b8a74e59ace4a9043713435bb | 获取过期劵列表 | tokens := make([]Token, 0)
DB.Where(&Token{UserID: userid}).Where("`expire_at` >= ?", time.Now().Format("2006-01-02 15:04:05")).Find(&tokens)
return &tokens
} | 0 |
a2bf9be2d66b633befc6ea3d4c4c954d | a0d245e75d8f9debba79d6995516e4da | Hide the caret when the VisualKB window loses the input focus. | void CMainFrame::OnKillFocus (CWnd* pWnd)
{
HideCaret ();
m_ptCaretPos = GetCaretPos();
::DestroyCaret();
} | 1 |
5b320845e6dce35086fddc17ab7fc5a7 | 8e600023801146839dc106d1484b0bcc | 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 | p = figure( tools = "pan,wheel_zoom,box_zoom,reset,save", \
toolbar_location = "above", \
plot_width = 560, \
plot_height = 500, \
x_axis_type = 'datetime'... | 0 |
7209c3441ca4f3ef054479c158a3da84 | 38327ebb12bfb1af59f33c13817cf7dc | 按主键删除单条BpmDicision. | AjaxResult deleteSysDictryCd(SysDictryCd sysDictryCd); | 0 |
76fa06522df8cc9c01dfa378b1110220 | ef21e19416fba915ce825e1be8f47643 | Check that the list is empty, otherwise gather all conflicting references and display them in the error message. | if self.conflictSolver is not None:
conflictsListStore = self.wTree.get_object('conflictsListStore')
conflictsListStore.clear()
for conflict in self.conflictSolver.GetUnresolvedConflicts():
conflictsListStore.append([str(conflict), conflict]) | 0 |
6748e0fd8ddb56f09ae96164e9f23af2 | af58f38d6f92d3c17df7a4fd18b95486 | Reúne as funções extras que devem ser executadas on create. | class Controller
public function adicionaFiltrosExtras() {
} | 0 |
2bad57e48361266bac3141ae349647af | 34a843480a1b4e4392439b3028789559 | 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. | static
SCIP_RETCODE treeApplyPendingBdchgs(
SCIP_TREE* tree,
SCIP_REOPT* reopt,
BMS_BLKMEM* blkmem,
SCIP_SET* set,
SCIP_STAT* stat,
SCIP_PROB* transprob,
... | 0 |
6b06c5b94e10e563effa8520a4b0c39d | 84505ed44aecacc36e705404292e46d4 | 展示请假球员 | const { id } = ctx.request.body
const res = await PlayerInjury.findAll({
where: {
player_id: id,
},
order: [['end_time', 'DESC']],
attributes: {
include: [[sequelize.col('t.name'), 'team']],
},
include: [
{
model: Team,
as: 't',
... | 0 |
33ce82f12bb1a2ebff89538364ac0945 | 68a0639c19aa1681f819368753375292 | verify that adding this edge will not create a cycle | for x in range(1,len(path)-1):
pred = path[x-1]
suc = path[x+1]
if self.has_edge(pred,suc):
return False
return True | 1 |
ceb63caf4dff5600220bc40a94175851 | dc3beeff2fecf56a576ee6f228d46145 | reset objects locations | {
foreach (var obj in _manipulatedObjects)
{
obj.transform.localPosition = _initObjPositions[obj];
obj.transform.localRotation = _initObjRotations[obj];
}
foreach (var cam in _cameras)
{
cam.gameObject.transform.localPosition = _initObjPosi... | 1 |
933145279b43d19fe75f5cef1d8cd905 | 0c5d2ab6ada2ed0385a3133917013b37 | 使用.NET 4.5任务异步执行单行查询 | {
if(string.IsNullOrEmpty(connectionString)){
throw new ArgumentNullException("connectionString");
}
int result2;
using (SqlConnection connection = new SqlConnection(connectionString)){
connection.Open();
int result ... | 0 |
98d2e236b3ed0fd3bb211bebfb8e4886 | bcac6c2b8240a62b42f53e4fc7895c71 | Create a unique name for the node in the graph, on node creation a digit is appended , eg nodeName00, nodeName01 | new_num = random.randint(0,999)
if new_num in [node.name for node in self.nodes]:
get_new_name(self)
return Node(new_num) | 0 |
9130903b63642fc0f35cefebfab33436 | 7bc7b6213161998469d0d378759ec5dc | api to create new subadmin | class UserController extends Controller
public function create()
{
if(Session::has('subadmin')){
$subAdminData= SubAdmin_Page::where("_id",Session::get('subadminid'))->get();
return view('admin.add_user',['subAdminData'=>$subAdminData]);
}
$subAdminData= SubAdmin_Page... | 0 |
380035449d1fb9d5f6f4e78c94659c5b | bf99c118e88e5851c65116dd9a5fa114 | !
\brief Criptografar array de bytes no modo CBC | void sm4_crypt_cbc( sm4_context *ctx,
int mode,
int length,
unsigned char iv[SM4_BLOCK_SIZE],
unsigned char *input,
unsigned char *output )
{
int i;
unsigned char temp[SM4_BLOCK_SIZE], iv_tmp[SM4_BLOCK_SIZE];
me... | 1 |
5824053047617367e39dd5696668833c | 11147cc351fd85e7c23f3abca9f935d2 | Convert an input dicom directory to a nii file. | anonymize=True, output_dir=None, caching=True,
**other_dcm2nii_kwargs):
if is_niimg(source_names):
return source_names, None
for source_name in [source_names] if isinstance(
source_names, basestring) else source_names:
if not isdicom(source_name):
retu... | 1 |
2e4683bc9424148aa67ca33993fc309e | c7e163ff238f370fe38d3b1450166fe4 | Filter by division | namespace LPWeb.Settings
public partial class UserList : BasePage
protected void ddlDivision_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlDivision.SelectedIndex < 0)
{
return;
}
try
{
if (ddlDivision.Sel... | 1 |
c7e97b18345d1d763db1ff246a1e83a6 | 6d483615921492877837d94feeee9743 | Combines a list of summaries so there are no duplicates statuses and the counts are added together. | def combine_data(list_of_summaries):
combined = list_of_summaries[0]
for i in range(1, len(list_of_summaries)):
combined = combine_batch_pair(combined, list_of_summaries[i])
return combined | 0 |
959073fb0b29b480b185ceddc7665075 | 60074f31dbc84a3d736380b90882059f | Test movie page for movie randomly choosen. | class TestMovieApp(TestBase):
# checks if the home page is accessible
# routes.py line 14
def test_all_movies(self):
with self.client:
response = self.client.get(url_for('all_movie'))
self.assertIn(b'Test Movie!', response.data) | 0 |
2862322e7ce10bf2820be01d3d50fbf8 | b006cab1489d584bb83ae13589d8d1af | 根据SSID重连一个之前连接过的网络 | List<WifiConfiguration> list = wifiManager.getConfiguredNetworks();
for( WifiConfiguration i : list ) {
if(i.SSID != null && i.SSID.equals("\"" + ssid + "\"")) {
connectToNetworkID(i.networkId);
return;
}
}
int newNetworkId = wifiMa... | 1 |
4a719241403930ba934aa7dc86ee0487 | 8f32bcfe11a51829c6a12d973e5b4356 | Exit a parse tree produced by the {@code showRoutine}
labeled alternative in {@link MySQLSQLStatementParser#showStatement}. | public class sqlBaseListener implements sqlListener
@Override public void exitShow_table_statement(@NotNull sqlParser.Show_table_statementContext ctx) { } | 0 |
6eb0f165eab5d0eaaec8ec678c6f5ddd | 6b9f392bb3aee68c454ce82e5b37c897 | 展示所有事件状态(分页) | @namespace("systematic/event")
public @caption("系统事件") @table("cs_event") class CsEvent implements java.io.Serializable
public static @api Page<CsEvent> page(int page,int size,Map params){
return getCsEventPage(page, size , params);
} | 1 |
ff23ef41582928dd1fe0691dadd9e9c9 | 423b3d6f76ebc19ed32894ce860a8bcc | Read an unsigned 24-bit little-endian integer from the stream. | namespace Kaitai
public class KaitaiStream
public UInt32 readU4be() { throw new NotImplementedException(); } | 0 |
0a6ac2fe14ebd267eed0096892c4c25d | f4476b27c94de19b02605d3caef70d73 | Unset the vhost-user feature flags as they are not supported by the underlying vhost
device. | {
if (conn->host == 0x0100007F) {
*res = portmapper_unset(args->prog, args->vers);
} else {
*res = FALSE;
}
return SUCCESS;
} | 0 |
de51c1e708d53247cf16a0232370c625 | 352a3cbb3d96e81587c136036667d409 | Mark movie as watched | {
if ( $this->_isMoviePlayed( $oUser, $iIdMovie ) ) {
return;
}
$oPlayedMovieVarset = $this->GetProject()->GetVarSet( self::PLAYED_MOVIE_VARSET_PREFIX );
$oPlayedMovieVarset->SimpleInsertData( array(
'id_movie' => $iIdMovie ,
'marked_date' => date( 'Y-m-d' )
), $oUser );
} | 1 |
8f049bade808fb21cd8e62092db107bc | 32fc5e8cae3a4f6bb5fcd4ce7ded3d29 | Adds and defines the shutdown hook, which stores the parameters | final MainFrame frameWrapper = frame;
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
try {
System.out.print("Shutting down, saving last used values...");
ParamFile var = new ParamFile(Main.paramFile);
var.set("winWidth", frameWrapper.winW... | 1 |
ab1336eae496472c2510c36e8a0fd74f | 8bc269b949088592cc3780c76d58c5c0 | Runs the SHA256 algorithm on the binary content of the file named file and returns the hexadecimal digest | func GetSHA256HashCode(file *os.File) string {
hash := sha256.New()
_, _ = io.Copy(hash, file)
bytes := hash.Sum(nil)
hashCode := hex.EncodeToString(bytes)
return hashCode
} | 1 |
15e8202dfd5337adcbce65b9a2a24c59 | 5c90ed61e042af16b9c35f488e0ea419 | check if a fired bullet is offscreen
if it is, send it to the destruction list | for i in range(len(asteroid)-1, -1, -1):
x = getCoords(asteroid[i])
x = x[0]
if x < -100 or x > width+100:
deleteAsteroid(i)
for i in range(len(bullets)-1, -1, -1):
x = getCoords(bullets[i])
if ((x[0] < -20 or x[0] > width + 20) or (x[1] < -20 or x[1] > height... | 1 |
98a7145dbb7e16d25f68e64e31210bc4 | 1441c36b45b8445d2d0c65e7b10be9dd | Gets commission_percent | class TransactionHistory
public function getCommission()
{
return $this->commission;
} | 0 |
3558f420faf9c46ba627daf91877c325 | 128ecb6f8fbfdfe8ec11c15438df8406 | Returns the meta object for the attribute '{@link nosql.Column#getDatatype <em>Datatype</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getDatatype(); | 1 |
a8787edc1b21a5fba8b496f62f1be4a0 | 077360043396f07537124c8788072c71 | get flag to save raw response from api request | class DaData
public function getIsSaveRawResponse()
{
return $this->isSaveRawResponse;
} | 1 |
01bfa5420e52a4e9b8dbf51dda272b2a | a6141fac0700c2efaedff85ea5c1fdd2 | Return text that contains start and enrollment
information about the course. | class banner_course_CourseOffering
extends phpkit_AbstractOsidObject
implements osid_course_CourseOffering,
middlebury_course_CourseOffering_InstructorsRecord,
middlebury_course_CourseOffering_AlternatesRecord,
middlebury_course_CourseOffering_LinkRecord
public function getFulltextStringForIndex () {
... | 0 |
743026e4ffcccc25b786fd2ca39a55c8 | ba08b6b90ef618f1652005c4ca32926f | Gets a list of all example definitions. | [Route("get")]
[Authorize]
public ActionResult<List<ExampleDTO>> Get()
{
_logger.LogDebug("Get All");
var result = _service.Get();
_logger.LogDebug($"Get All result: {result.Count}");
return result.Count > 0
? (ActionResult)... | 1 |
c46433255d1bf65ed04776c0e2060c21 | a4c00cdf3630c34294920922527586b8 | 扫描指定目录及其子目录,获取全部文件路径 | 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 |
84ac9f65ad15e94051894ea1e46825cf | 545ee3ae295bcae76586e4d1cb4d8b1c | Called after the tab has been closed. | class Searchable(object):
def _close(self, widget, event):
self.srchtab.hide()
self._clean()
self.searching = False | 1 |
48581903e2399fd1795a686ced469681 | c388c3b3f9ec24ce0781476e1b3155cf | https://stackoverflow.com/a/62366144/3522933 | let negative = if num.is_sign_positive() { "" } else { "-" };
let num = num.abs();
let units = ["B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
if num < 1_f64 {
return format!("{}{} {}", negative, num, "B");
}
let delimiter = 1000_f64;
let exponent = cmp::min((num.ln() / delimi... | 1 |
8ea7a7979541d34727cd6299664c9639 | 9bd9eca4454e08cc2af798978036c41b | Okresla jakie wielkosci (w pixelach) ma szerokosc lini pomiedzy komorkami
na zdjeciu, oraz komorki | public class BitmapView extends View
public Dimension getCellSize() {
if (board.getWidth() == 0 || board.getHeight() == 0)
return new Dimension(0,0);
return new Dimension(getWidth()/board.getWidth(), getHeight()/board.getHeight());
} | 1 |
9f643e9a2fe5254f1b003ab629f5ca1b | b435dc497d07c738617a703a01a563f2 | @brief 선택된 회원의 간단한 메뉴를 표시 | void printMenu()
{
printf("1. 플레이어 정보 기록\n2. 플레이어 정보확인\n3. 종료\n");
printf("입력하세요> ");
} | 1 |
aec08f4c2c28afec1bbb65d1043f747e | 20f055db50b6ad3ac460e4b097b6ffdd | MOD ONLY | function r() {
return (
<Section title='Modals' className = 'vp_modals'>
<h3> Simple Modal</h3>
<Modal
theme='red'
title='Red Modal'
text='Please decide something right now!'
confirmButton = 'Ok'
onDone = {onModalDone}
onFail = {onModalFail}
rejectButton = 'No way!'
/>
<h3... | 0 |
ab36d915cd2edf7f5f8a38dc49d353a4 | 644e5c79b2df260096f70b3be2a552d7 | Requests that device connector selects a specific device. | def culaSelectDevice(dev):
status = _libcula.culaSelectDevice(dev)
culaCheckStatus(status) | 1 |
8296adca64d3dbae3ae2c184e89f0ba4 | c6f90fcf42919a39a490207d7d0432df | Tells BrailleIme commit holdings to the editor and perform editor's default action. | void commitEdit(); | 1 |
6313e520cfb1f4b3b0e565d395ec8924 | d3702548df802fa1ef6b7ae9a1820954 | Gets the area codes and mobile prefixes from calls made. Returns a list of codes. | from_Bangalore_set = set()
for record in call_list:
if record[0][1:4] == "080":
if record[1][0] == "(":
area_code = record[1].find(")")
from_Bangalore_set.add(record[1][1:area_code])
if record[1][0] in ['7', '8', '9']:
from_Ban... | 1 |
6b487f403f904ff686b8d4356acb5b3b | 31becce98b8a38643277a906839e3159 | Template variable getter. Returns searched Manufacturer id | $method = 'products';
$action = 'getManufacturerID';
$data = array(
'name' => $name
);
$result = Dispatcher::send($method, $action, $data);
return $result;
} | 1 |
b079737874d8123923796d927866a8d1 | 57d77c7ca13da0184a5d7ef9372fbaf7 | 검색어를 입력한 query와 1로 초기화한 page를 통해 다시 스레드를 실행하기 이전에 배열을 clear해줌 | self.ResultTable.setRowCount(0)
self.ResultTable.setRowCount(25)
self.ResultTable.resizeColumnsToContents()
self.ResultTable.resizeRowsToContents()
global searchBtnCnt, PageCnt
global url_col, keyword_col, ranking_col
url_col.clear()
keyword_col.clear()
... | 1 |
8f745907ca560d8021de0dd73e081572 | 096c1a40b410182d97a6effa9c905cd7 | Add a label to a bucket.
See {@link https://docs.influxdata.com/influxdb/v2.4/api/#operation/PostBucketsIDLabels } | namespace InfluxDB.Client.Api.Service
System.Threading.Tasks.Task<ApiResponse<LabelResponse>> PostTelegrafsIDLabelsAsyncWithHttpInfo(
string telegrafID, LabelMapping labelMapping, string zapTraceSpan = null,
CancellationToken cancellationToken = default); | 0 |
5b603529dbdfa35850357d8b3163e931 | 51eaf5b965b53659d1bc5fab90dc324d | Adds a raw signed cookie. | class Response(object):
def add_signed_cookie(self,k,v):
v = self.s.dumps(v)
self.__cookies[k] = v | 1 |
1168c6ddf30ddf244d5116f3a63c6cb2 | b6161b9efcd8e22b79e0ed6e36553595 | 获取退出登录按钮元素信息 | class QuitLoginPage:
# global driver
# 获取登录退出页面所有的页面元素信息
def get_left_button_element(self):
print('button_element:',self.get_by_local.get_element('left_button','quitLogin_element'))
return self.get_by_local.get_element('left_button','quitLogin_element') | 1 |
a42445caa9f599851ec945e4046d72ed | f3cec973746d97b463cf6247cde114e0 | 从历史纪录快速加载已经访问过的页面 | let searches = getSearches();
if (searches) {
for (let i = 0; i < searches.length; i++) {
createHistory(searches[i].name,searches[i].url);
}
}
} | 0 |
3a334108f23c250669d4d3e301c5e47d | d9e32c8cb85e6788f0d64a66b5e2d640 | 检查杯栈管理的门状态 | {
if (ModelManager.SuctionLParam.iCurrentTrayIndex == 1)
{
if (ModelManager.SuctionLParam.bExitTray[0])
{
if (SuctionL.lstTray[0].bFinish)
{
ModelManager.SuctionLParam.iCurrentTrayIndex = 2;
... | 0 |
d7eb466fe7b49b9cdea3d0890d68b964 | df0781bb8da86fab0cd24de8a9a79150 | Get all the atomic sets that have had their saves delayed. | if (m_primitives == null)
return Collections.emptyList();
List<PrimitiveSet> result = new LinkedList<PrimitiveSet>();
m_primitives.getSets(result);
return result;
} | 0 |
505493a576b30c4a71ace726b144fb01 | 7701fa449c3514edd281212974bbf232 | Allows enumeration over segments of the given list. | {
if (_sequence == null)
return Enumerable.Empty<string>().GetEnumerator();
else
return _sequence.AsEnumerable().GetEnumerator();
} | 0 |
9379ae84e9f15a8816fc4b4843817904 | 85c45ac4c8448d6c30d8ca5414de21a5 | remove all the child forums | public void removeAllChild(); | 1 |
c2d4f5802fedfa8b97c7c395ce6b3b77 | ba6191702abfcaf81aeee3d163ad27b0 | 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. | img = cv2.imread(img_file)
img = cv2.resize(img, (self.scale_shape[0], self.scale_shape[1]))
img = img - self.mean
return img | 0 |
cbaa7a3294a03855e608906fd2e3a0f9 | 4c8b7c12d209ad3106135015e86f1834 | 取最大的进阶级别 | class tb_users_level_change_log extends CI_Model
public function getMaxLevelOfLast($uid){
$oldLevels = array();
$res = $this->db->query("select old_level from users_level_change_log where uid=".$uid)->result_array();
foreach ($res as $value) {
$oldLevels[] = $value['old_level'];
... | 1 |
c9ed40a7a567c10f62e1918a3ed561a6 | 807f3e75c22cfb2f1e97180df80d7dbe | Gets the albumArtist
The artist named on the album for the audio file. | if (album_ == null)
return "Unknown artist";
return album_.getArtistName();
} | 1 |
28be82f3540c4f7b01688c3c1d258cc9 | c956f3cd190251614fc64407c0ae79ce | 更新任务的领取成功和失败数目 | @Modifying
@Query("update TaskSubmitBatchLogEntity l set l.successId =:successIds,l.failId = :failIds,l.success=:success,l.fail=:fail where l.id=:batchLogId")
void updateBatchSuccessAndFailIds(@Param("batchLogId") Integer batchLogId, @Param("successIds") String successIds, @Param("success") Integer success,... | 1 |
f552669c4561973656674565b0f26227 | 22777bd25c80ca559fc27521fa5e147e | 如果*里面的字段,在select中有 做as 处理,则返回true | {
if (stripos($field, ' as ') !== false) {
$arr = explode(' as ', $field);
$this->field = trim($arr[0]);
$field = trim($arr[1]);
} else {
if (stripos($field, '.') !== false) {
$field = str_replace('.', '_', $field);
}
... | 0 |
5bdb4a253d7db035c0466ec88e0df4c8 | 17da958fc6eb5ed49c91cdc1b97af6d9 | Bridges virtual tty over to serial connection | {
int fd;
fd=open(serial_device,O_RDWR | O_NOCTTY | O_NDELAY);
if(fd == -1)
{
perror("open_port: Unable to open /dev/ttyS0 -");
return(fd);
}
else
{
fcntl(fd, F_SETFL, 0);
printf("open ttys1 .....\n");
return(fd);
}
} | 0 |
85be3df8758b9795b9f76ee4c6f3b0d1 | 2770c1620a6241d3ee645f1c787762da | These are the series of register values used to configure the
decoder for a specific standard.
The first 21 register writes are copied from the
Settings\DecoderDefaults registry keys present in the Windows driver
.INF file, and control various image tuning parameters (color
correction, sharpness, ...). | {
Reg[0x00] = 0x001d;
Reg[0x03] = 0x0012;
Reg[0x04] = 0x888b;
Reg[0x05] = 0x13aa;
Reg[0x06] = 0x001f;
Reg[0x07] = 0x0fe6;
Reg[0x08] = 0x0800;
Reg[0x09] = 0x041d;
Reg[0x0a] = 0x3ec3;
Reg[0x40] = 0x0000;
Reg[0x41] = 0x0000;
Reg[0x4c] = 0x0000;
Reg[0x62] = 0x0000;
Reg[0x70] = 0x0000;
Reg[0x71] ... | 1 |
7d816fba1031856f354d3219f6b4c18c | b640531b39133c336e5a697ea85056a7 | Notifie tout le monde de définir l'état courant à "Premier coup Bataille" | {
if (!joueurActifEst1)
{
ChampBatailleUnitesJ1.Preparer();
}
else
{
ChampBatailleUnitesJ2.Preparer();
}
} | 0 |
fd202656dcffff33579a75c808e55641 | 9e4437a3cbe5f21f7a64113e70e1a82f | Macht einen Screenshot von dem Spielfeld | namespace DistantStars.Client.GameModule.ViewModels
public class GameToolViewModel : ViewModelBase
Bitmap ScreenShot()
{
GameIntPtr.ActivateByIntPtr();
Thread.Sleep(10);
Bitmap bitmap = new Bitmap(AreaWidth, AreaHeight);
Graphics g = Graphics.FromImage(bitmap)... | 1 |
6846dea76f58eb0548fb496cc58263fb | 6165b2e2b7535286d0a1f57f71339c01 | Removes particle segmentations that exist on the edge of the image. | if thresh_abs is None:
if thresh_perc is None:
thresh_abs = skimage.filters.threshold_otsu(im)
else:
thresh_abs = np.percentile(im, thresh_perc)
peak_indices = skimage.feature.peak_local_max(
im,
min_distance=particle_size,
threshold_abs=thresh_abs... | 1 |
e37fa4171d86b0cb3b53049599635ee3 | 785e448416065246a31a82d90c96dc8b | دالة حفظ نوع العرض الخاص بشاشة الكاشير | class app_ProfileSearch
public static function saveSearchType( $value )
{
SK_HttpUser::set_cookie('search_type', trim($value));
$_SESSION['search_type'] = trim($value);
} | 0 |
322f7283fd0b7e32b92c20462bd12d11 | 942619293222f293c99e932c4d463e05 | Определить какой четверти принадлежит точка с координатами (х,у) | public class MathUtils
public static int getQuadrant(Point vector)
{
if (vector.x >= 0 && vector.y >= 0)
return 1;
else if (vector.x <= 0 && vector.y >= 0)
return 2;
else if (vector.x <= 0 && vector.y <= 0)
return 3;
else
return 4;
... | 1 |
241371e278ac72f17d1003894f96b905 | fb55b9a1087df0c0a29c0dbfebaab57c | 学生端:根据学号查询学生选择的课程,用做课表显示 | public class SelectCourseDao
public static List selectSelectCourseByStudentId(String id) {
Session session = HibernateUtil.currentSession();
Transaction transaction = session.beginTransaction();
List sc = session.createQuery(
"from SelectCourse sc where sc.student_id = " + id).list();
transaction.commit();
... | 1 |
d85ba4220ac30a2ba0c78aeec2ed2b65 | 0f4cad77698c5afe439e68e58c06dab3 | 下载文件并自动打开 | SystemFileService.downloadFile(fileID, function(data){
if (data)
{
dwr.engine.openInDownload(data);
} else{
alert('该文件不存在');
}
});
} | 1 |
ab0acb0fa681ce73686a42f0976b8997 | 202287a6fe80052c6d1e37c6f8167c8c | Should everyone be permitted to view the transcription | class GigPolicy
public function viewAny(): bool
{
return true;
} | 1 |
679fa480491d461aa7de049d637b6350 | 526ee087d77f06612246a72f79775c35 | compare by starting index | public class BytesInlineIndexKeyType extends NullableInlineIndexKeyType<BytesIndexKey>
@Override public int compare0(long pageAddr, int off, IndexKey bytes) {
long addr = pageAddr + off + 1;
int len1 = PageUtils.getShort(pageAddr, off + 1) & 0x7FFF;
addr += 2;
byte[] arr = (byte[])byte... | 0 |
ece26160f26b18ceccb7ed7a8242f8b1 | ecf81053444239ececcefe96cae3c356 | 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 ... | namespace StackExchange.Redis.Expressions.Clients
public class ListCacheClient : CacheClient, IListCache
public List<T> GetRange<T>(string key, long start = 0, long stop = -1) where T : IModel
{
return Execute(key, (newKey, db) => db.ListRange(newKey, start, stop).Select(e => e.DeSerialize<T>())... | 1 |
5593a22bb25ae0be32d62cb8ca3b0bee | 0eeabec99a71c4ee3c0b2894e6d5517c | 获取数据库查询用的商家排序项列表 | class Shop extends Base
private function _getListField()
{
return [
's.*',
'u.user_name',
'rp.region_name province',
'rc.region_name city',
'rco.region_name county',
'rt.region_name town'
];
} | 0 |
4c7b26a8dd6ac9f8f07f610f58b9b922 | 9a95766f4f21ddbd9b4dbb931719a169 | 실명확인일자의 정보를 설정한다. | @Entity
@Table(name = "PrpLCertifyCollect")
@IdClass(PrpLCertifyCollectKey.class)
public class PrpLCertifyCollect extends BaseEntityImpl{
public void setCheckCertiyDate(String checkCertiyDate) {
this.checkCertiyDate = checkCertiyDate;
} | 1 |
aa2ed4f831829c35f205ac42355c3b3b | b055c48b7e12659da9e2e29dd8f17703 | @brief Método que retorna un arreglo con la información de los archivos de texto. | class ListaArchivoTxt
public function getListaArchivo()
{
return $this->_lista_archivo;
} | 1 |
9989e1e235f03487775d899d212670e7 | 085e8b7ef618eefa70655769d6cc36d4 | 提取每条评论的词,去除停用词 | words = {}
total = 0
try:
with open("D:/vscodeproject/python/search-generates-wordcloud/file/word_cut.txt" ,'r',encoding="utf-8") as f:
stop_words = f.read()
seq_list = jieba.lcut(str(context.chinese(context.content())), cut_all=True)
for comment in seq_list :
... | 1 |
08e8cead3f9b3cf9068c5ce55d6cb8ae | 71e3f1ded4bc85516711a0dbde099850 | Prints an odometer reading to standard out | class Car():
def read_odometer(self):
print("This car has " + str(self.odometer) + ' km') | 1 |
8ef579400e280f0238f2a24736f9ded8 | f9d236809862928f16f7db9179827caf | IBTabItemが今どこにドロップされようとしているか、カーソルの位置から判定します | {
if (this.tabstripBounds.Contains(position) && (!this.closeButton.Bounds.Contains(position)) && !this.pinButton.Bounds.Contains(position))
{
foreach (DockControl dockControl in this.Controls)
{
if (dockControl.TabBounds.Contains(posi... | 1 |
7c34fe2733c9b3bc5c55642682c900ac | a2fc8619f1d73aa7c5acb1d8c74db7b1 | Returns the name of the HTTP method with which this request was made, for
example, GET, POST, or PUT. | public class MyRequest
public String getMethod() {
return httpReq.method().name();
} | 1 |
e2016ea6321c45f00cbffc7de1494f67 | 13e2023329b53aefe38db5161573fca7 | The spatial distribution will model a point at the origin by default | RFGeometry::Geometry::Geometry()
{
this->_Construct(RFMath::Vector3(0.0f, 0.0f, 0.0f));
} | 1 |
0e1be581ad3452db5adf46ac9f605bef | b8c86585fc7c8c5c630231030f1376db | Converts VariableSecificationMessage (Scalar) to Python value. | class yc_cmd_start_ietf_ped_catalog__ped_catalog_peds_experiments_parameters_cmd_start(PybindBase):
def _get_scalar(self):
return self._yc_cmd_start_ietf_ped_catalog__ped_catalog_peds_experiments_parameters_cmd_start__scalar | 0 |
7b7254743a256a9d3d1efd57440f41d6 | d26da7c3c33bc38be65dcc2f1b348ddd | Apply the stored movement again. | namespace RPG_ver_8
public class MoveBehaviour : Behaviour
public override void Apply(GameObject gameObject)
{
gameObject.Position = CurrentPosition;
base.Apply(gameObject);
} | 1 |
00a4a985370e1a100267380c4cf3c8aa | fa11e787d8c779ba5706d4064572c925 | アプリケーションユーザペイメント取得
アプリケーションユーザペイメントを取得します。
引数のモデルに、条件となる値をセットしてください。 | class Logic_Payment_PaymentUpdate extends Logic_Payment_Abstract
private function _readApplicationUserPayment()
{
return $this->getApplicationUserPaymentMapper($this->getDbSectionNameMain())
->find($this->pickUpId());
} | 1 |
42beb197d9bba4279847a9833bc52e97 | 2789085148b654cbd20573393bfb8f73 | 查询健身房分页列表 | PageResult<SchoolDto> findSchoolList(SchoolDto schoolDto, PageQuery query, Integer isPage); | 0 |
26dcdb48d9fa3f63eb8c66e4cbe9a596 | d084e39495c97bbed6000fba96c0e4c3 | 주소명으로 위치 찾기 메서드 | List<Address> list = null;
String str = et3.getText().toString();
try {
list = geocoder.getFromLocationName(
str,
10);
} catch (IOException e) {
e.printStackTrace();
Log.e("test", "입출력 오류 - 서버에서 주소변환시 에러발생");
... | 1 |
bd1da889ba140b6f3d147bf366675310 | 5b2839ac1286ce79a44e8d8119d12a2e | Adds type parameters to list box | {
pManager.AddTextParameter("Calc type", "", "Name of assembly and type", GH_ParamAccess.item);
pManager.AddIntegerParameter("Index", "", "", GH_ParamAccess.item);
} | 0 |
8cb44147c321836d9c0bf8c3f9fc95ef | c08e1f3ec53d568487f38a785167dfd4 | gọi các store SELECT, không có tham số input | this.storeService.getObjListInSelect()
.subscribe((res: any) => {
if (res.meta.code === this.config.SUCCESS) {
this.storeList = res.data;
} else {
this.storeList = [];
this.alertService.pushAlert({type: 'danger', message: res.meta.message});
}
});
... | 1 |
2603126e0a9808ef36c6720204c77e6d | 90307e672b58775ab81d5b372778cf23 | Draws every single text area. | rnum = 0
if canvas is None:
canvas = self.GetCanvas()
dc = wx.ClientDC(canvas)
for region in self.GetRegions():
text = region.GetText()
self.FormatText(dc, text, rnum)
rnum += 1 | 1 |
55ae4864705e1191ed6c08a099584b52 | a909bd62bf4ac5af39fdc9d96c05482e | used for reading the bytes from a file channel into a set of buffers | fun ByteReadChannel(content: ByteBuffer): ByteReadChannel = ByteBufferChannel(content) | 0 |
0951ad8d4602216bbb059c106b7b92ee | 154b32068a15bbe2f3f32fc124cded37 | Return the MD5 sum of `data'. | def data_md5(data):
m = md5()
m.update(data.encode())
return m.hexdigest() | 1 |
f8c87a07bd5bee9f8b68f1d0779a9a6f | 6013297c0c254cc2c7ccc0c990f025f9 | <br/><li>说明:自定义单字段查询
<br/><li><font color=red>注*:字段名和字段值均自由定义, 但只支持精确匹配, 不提供Like方式的模糊匹配, 支持的数据类型有NUMBER,VARCHAR2,CHAR,INTEGER</font>
<br/><li>创建人:谭诚
<br/><li>创建日期:2013-8-21
<br/><li>修改人:
<br/><li>修改日期:
<br/><li>修改内容: | String pkCol, String pkValue) {
if (!fields.equals("*")) fields = fields.replaceAll(";", ",");
StringBuilder sbsql = new StringBuilder();
sbsql.append("select ").append(fields).append(" from ")
.append(tableName).append(" where ").append(pkCol).append(" = ? ");
DaoParam param = _dao.createParam(sbsql.toSt... | 1 |
e13301b00f627de63901dd204fea2774 | beb8760e480abaf28ae0f6976104ff0f | Get list with IDs of apps that the customer also bought. | sales_table = data_manager.get_table_from_file("sales/sales.csv")
csv_table = data_manager.get_table_from_file("crm/customers.csv")
index_of_id_from_sales_table = len(sales_table[0]) - 1
index_of_id_from_crm_table = 0
index_of_name_from_crm_table = 1
dict_with_buyers = {}
for row in sales_ta... | 0 |
21d8146d14f75599655336d0a947c2e6 | b0b945fe1701934e2162e8caf1a6ca2d | maps method of payments to their total cost | public class Payment
double getTotalCost() {
return totalCost;
} | 0 |
3a6c524dc327ce19e6b8ed13ff5bc149 | b07f0b2f05ec9f320559f895d2780cc4 | Matches a raw command on a given regex and returns the available arguments | class MenuSettings(
val title: Titles,
val options: Options,
val bindings: Bindings,
val events: Events,
val tasks: ScheduledTasks,
val functions: Funs
) class Bindings(val boundCommands: Array<Regex>, val boundItems: Array<ItemIdentifier>)
fun matchCommand(menu: Menu, command: String): Arra... | 1 |
3172f1fe76e7d7308fc83c17cffb6102 | 3b5e30dd6183f16915bdef3c47e319c8 | Get the address of a particular sector. | {
unsigned long ulSectorSize = 0x10000;
if( ( nSector >= 0 ) && ( nSector < gNumSectors ) )
{
*ulStartOff = nSector * ulSectorSize;
*ulEndOff = ( (*ulStartOff) + ulSectorSize ) - 1;
}
else
{
return INVALID_SECTOR;
}
return NO_ERR;
} | 1 |
afb1210de5b11714cada137626583ac0 | ed224c2eec4cbad71580fee5599cd0c3 | Defines which lines are wanted/unwanted when writing previous run information during integrating | if "s_data_source" in line or "findex" in line or "s_processed_loc" in line or "lindex" in line or "stitch_image" in line:
return True
return False | 1 |
36974236862223c179bb9c2fe4060b4f | 4ea61237a22839ee96706251f679d6d8 | 求每日已实现波动率 | for s in stocks:
k = s.getKData(q)
x = my_tm.getProfitCurve(k.getDatetimeList(), KQuery.DAY)
z = PRICELIST(x)
z -= z
break
for s in stocks:
k = s.getKData(q)
x = my_tm.getProfitCurve(k.getDatetimeList(), KQuery.DAY)
z += PRICELIST(x)
d = k.getD... | 0 |
882fafd1135eb106d48e410ad89e44e2 | fe58fcfee5cb70d1170f5d8ee76afc55 | Returns the value of the '<em><b>Labor Duration</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Labor Duration</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | public class CULaborItem extends IdentifiedObject
public float getLaborRate() {
return laborRate;
} | 0 |
62a871265d83c31b436f74b05b89a3bf | 40bdadececfdaef3316b10a069c86e63 | ajax异步接收搜索框传来的数据,并进行正则匹配,将匹配的数据用json返回 | {
try {
Response::format(Response::JSON);
$data = (new ottService($uid, $data))->getRegex($uid, $data);
return $this->view->success($data);
}catch (\Exception $e) {
$this->setErrorLog($e->getMessage());
return $this->view->response($e->getC... | 1 |
888c8a2e82e8b4785c121b7693d41dd3 | 348fb25dab3bc06ce3865bfb8265805a | !
Finds number of favorite stations | global $wpdb;
$user_id = (int)$user_id;
$user_faves = $wpdb->get_var( "SELECT user_faves FROM $wpdb->users WHERE ID = $user_id" );
$user_faves_arr = explode( ',', $user_faves );
$coo = count($user_faves_arr);
if($user_faves)
return $coo;
else
return 0;
} | 1 |
5be75ef52cabbfd06661ac676c3dfd2f | 759f5d0f829df25469eff0add4f146c6 | Setter for <code>WETRN.DLTD_OFFR_SLS_CLS_SKU.CREAT_TS</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 DlyBilngOffrSkuLineRecord extends UpdatableRecordImpl<DlyBilngOffrSkuLineRecord> implements Record13<BigDecimal, BigDecimal, BigDe... | 1 |
c7dd6c82e06a586b7baa3d3d070e6ea1 | 5bc902f09f4b717886e006c0a2ddc11f | Returns the currently selected columns from a query | public class SortController
public int[] getSelectedColumns() {
return this.uiController.focusOwner.getSelectedColumns();
} | 1 |
e92626dd3dd4adbfd0b367825736e5ee | 1b3335e9e9f7cbe6a10e03596e4d5f0a | When an enemy exits the range of the towers, remove it from the list | public class TowerComponent : MonoBehaviour
private void OnTriggerExit(Collider other)
{
enemy.Remove(other.gameObject);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.