query_id
string
corpus_id
string
query
string
code
string
label
int64
e5c93e7f236c7e16d5e5962840bb4185
09709625040466e8c454bbebe5f77573
返回枚举的Text属性值
{ if (!enumType.IsEnum) { throw new InvalidOperationException("类型必须是枚举:" + enumType.FullName); } if (!string.IsNullOrEmpty(attachDataValue)) { foreach (Enum enumItem in Enum.GetValues(enumType)) { ...
1
9bdbc9f720d604b252bd98f7759b87b7
ca77c58deca153f26edb51d94e15caa4
restore culture in case we changed it.
public void Cleanup() { System.Threading.Thread.CurrentThread.CurrentCulture = CurrentCulture; System.Threading.Thread.CurrentThread.CurrentUICulture = CurrentUICulture; }
1
bf5717d6560b553f9a675886945288d9
be3fdb4609270ccf0843da7399326f43
显示储值通用统计数据
{ $time = strtotime(date('Ymd')) + 86399; $start_time = strtotime(date('Ymd')); $store_id = input('store_id'); if (!empty($store_id)) { $select = Db::table('reserve')->where('store_id=' . $store_id . ' And carte_time <' . $time . ' And carte_time>' . $start_time)->select(...
1
8bddf27ceada5bd015770f60fd469cb6
3d961177bbd17120bf923e84dc492dc5
根据音乐下载地址,下载单个音乐
headers = { 'user-agent': random.choice(USER_AGENT) } response = session.get(url=next_url, headers=headers) file = re.findall('danceFilePath="(.*?)";', response.content.decode('gbk'))[0] src_url = 'http://p21.72djapp.cn/m4adj/' + file + '.m4a' data = session.g...
1
1a460e9b05a04211d03613a9306f9cff
fdb5856e6710fdc061b7ea6ce81456bf
r""" Online hard example mining loss function.
def hard_example_mining(dist_mat, is_pos, is_neg): assert len(dist_mat.size()) == 2 dist_ap, _ = torch.max(dist_mat * is_pos, dim=1) inf = dist_mat.max() + 1 dist_an, _ = torch.min(dist_mat * is_neg + is_pos * inf, dim=1) return dist_ap, dist_an
1
ff8ef00ee3980e245ee0c6a911a829b4
4ab159cad9f1a8acd9f0a9808933ee8b
Handle a potential new state - adding to frontier, origins, calculating costs, etc.
old = None for i,p in enumerate(frontier): if (final_state(p) == final_state(path)): old = i break if old is not None and path_cost(frontier[old]) < path_cost(path): return elif old is not None: del frontier[old] frontier.append(path) frontier.s...
1
a59a59351c894fa616f75fe41c8d78ac
dbf41185c5c359e0c152b66a317a90ed
辅助方法:生成圆的素材
global $fmt; if($fmt == "json"){ return " {\"type\":\"circle\",\"height\":$ry,\"width\":$rx,\"style\":\"$c\""; }elseif($fmt == "svg"){ return "<ellipse fill=\"$c\" stroke=\"black\" cx=\"$x\" cy=\"$y\" rx=\"$rx\" ry=\"$ry\"/>\n"; }else{ $icon = "Imagefilledellipse(\$image, $x, $y, ".(2*$rx).", ".(2*$ry).", \"...
1
10a853ceb096826951981824c8d8dfde
90304e0d17cf8d74e2b41b9abc2fad07
u"""値に2バイト文字が含まれているか判定する.
def is_binary(value): return isinstance(value, bytearray)
0
dfc6cbb6c995a8f3f86d478192da5f28
065a6d812615770c92d119ee1ebe9f41
Searches the list for a given element using a binary search algorithm. Elements of the list are compared to the search value using the given IComparer interface. If comparer is null, elements of the list are compared to the search value using the IComparable interface, which in that case must be implemented by all elem...
namespace BassClefStudio.NET.Core public static class CollectionExtensions public static int BinarySearch<TItem>(this IList<TItem> list, TItem value, IComparer<TItem> comparer) { return list.BinarySearch(value, comparer.Compare); }
1
d8d410594e0b254936357030cfc0023f
7c3314450e5bf93f0b5796e30c859027
根据合同id 获取合同的日周月消耗
public Map<String, Map<Double , Integer[]>> getPross(int crontractId);
1
99564cec7c683ea2ebe4721d9067a999
484f29c4f5e960658406a45607fa8ecc
Remove outliers from a 2D NumPy array.
from numpy.ma import masked_where with np.errstate(invalid='ignore'): if iters > 0: msk_array = masked_where( np.ma.abs(array - np.ma.median(array, axis=0)) > sigma * np.ma.std(array, axis=0), ...
1
517781df40e84129fcac09f0189949a6
b1312d1788a1ffd06d5ae1d60a2eccae
Time complexity: O(N logN) Space complexity: O(1)
def selection_sort2(arr): if(arr == None or arr == []): raise InvalidInputException("Array is invalid.") for i in range(len(arr)): min_index = i for j in range(i+1, len(arr)): if(arr[min_index] > arr[j]): min_index = j arr[i], arr[min_index] = arr[min_index], arr[i] return arr
0
3a8fd33a464621aa5044b5f44729bafb
a49bcee0d6a5d944b65bed91a0a01c1a
Get arguments needed in setup.py.
return { "actions": [TaskCreator.get_pip() + " install --upgrade dist/*.whl"], "verbosity": 2, "setup": ["make_distribution"], }
0
1cc29b45ef0ac25bfd54a4d4e2d58e85
26f177e890858bffb2abb558c697ad06
Adds Cell Society title to window
cout << " +-----------------------+\n"; cout << " | SUDOKU |\n"; cout << " +-----------------------+\n"; }
0
88c9f95955f94d98ddaf48fc0d6f631c
d6ef795d72f6d65c96e63dc24ef94d91
USE WITH CAUTION: This method exposes the address of the native cudf_column. This allows writing custom kernels or other cuda operations on the data. DO NOT close this column vector until you are completely done using the native column. DO NOT modify the column in any way. This should be treated as a read only data...
class Column(object): def to_dlpack(self): import cudf.io.dlpack as dlpack return dlpack.to_dlpack(self)
1
708c7be02da45b3b78435aa04acdc985
fd3cd3365aaf255a26fdc711e44544ed
创建集团-集团编码重复
$fixer = fixer::input($res)->getArray(); $result = $this->dao->selectList('carrier.checkOrgcode',$fixer); if($result){ return array('code'=>0,'msg'=>'organizing_code重复'); }else{ return array('code'=>1,'msg'=>'organizing_code不重复'); } }
1
0159ec5594630a1437419bd4348edb61
b9e63223a5da60a055ade52aadd5e354
BLコード枝番を返します。
public class RecipeBO public String getBlsCode() { return _model.getBlsCode(); }
1
4f876945dbe14e2fe98592cf627f0c23
898b955c6e8ec435f77cb1d7dac1f0e0
Returns the source of temperature measurement for field compensation.
MET_SOURCE CWindField::GetWindSpeedSource() const{ return this->m_windSpeedSource; }
0
59a7f2737c24f01095591619bf35eb8f
cda69cf8710e64c89454a7eac5304bbd
查询短信发送记录列表(村务宝典)
{ SmsrecordSearch SmsrecordSearch = new SmsrecordSearch(); List<SmsrecordNews> content = new List<SmsrecordNews>(); ResultSmsrecord result = new ResultSmsrecord(); PageData page = new PageData(); string dr = Request["dr"]; string statu = Re...
1
faace5fe66866c51ada55b763da8f4f8
859ff663457fa5f5b1673e7b1708da25
Getting 'no-sidebar' layout option.
if ( false === stripos( ulu_get_layout(), 'sp' ) || ! ulu_has_widget_area( 'sidebar_primary' ) ) { return; } get_sidebar( 'primary' ); }
0
50afb7fd65a460c85d5d5fc47bae044d
a6e94a8b0a431638d64fae490bcdbe46
<p> Retrieves a list that describes the permissions for shared AWS account IDs on a private image that you own. </p> The specified resource was not found. target="_top">AWS API Documentation</a>
namespace Amazon.AppStream public partial class AmazonAppStreamClient : AmazonServiceClient, IAmazonAppStream public virtual DescribeImagePermissionsResponse EndDescribeImagePermissions(IAsyncResult asyncResult) { return EndInvoke<DescribeImagePermissionsResponse>(asyncResult); }
1
e2cd7143d60cd7efe44392cc79aad771
f9734a67dec8bdb9fb9740c064c4518c
Test if providing a field name with quotes raises an error ...
class TicketTestCase(unittest.TestCase): def test_set_field_multi(self): ticket = Ticket(self.env) def set_multi_valued(): ticket['component'] = [' foo ', ' bar '] self.assertRaises(TracError, set_multi_valued)
0
f4e727cce2ea5e8227979266c2ace19a
18c591923b6fc75bc250cca04e061781
Renders all the update cards
class CustomCards(): def update_all(self): for name in self.hass.data[CARD_DATA]: if name not in ('domain', 'repo', 'hidden'): try: if (self.hass.data[CARD_DATA][name]['has_update'] and not self.hass.data[CARD_DATA][name]['not_local']):...
0
835006a4e2cc5f7f7c4030485d8cf1d6
6f79fe71b0cdfa6b8cf784306b8c29d5
Sets the "serviceLevelObjectiveKey" element
class ServiceMonitoringServiceServicer(object): def CreateServiceLevelObjective(self, request, context): context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details("Method not implemented!") raise NotImplementedError("Method not implemented!")
0
5c253f90e5b71be045ec0c1458c0e346
516c372a15e637168bba7bdab176564e
Initialize display h/v parameters according to the panel spec.
void LoadDefaultPanelData(void) { UCHAR ch; ch = 0x61; if (UserPanelData.bBitShift == TRUE) { ch |= BIT7; } else { ch &= ~BIT7; } #if ENABLE_TEN_BIT_LVDS == ON if (UserPanelData.ucColorDepth == 8) { ch &= ~(BIT4|BIT3); } else if (UserPanelData.ucColorDepth ==...
1
13d1c29ed7a0005ef86b71d9d0ca2c0e
f9dd67746ff67b5280601575b0172a6f
获取关键句子,形成摘要。
class TextDispose: def get_key_sentences_of_text(self, key_words=[]): title_r = r'【(.*?)】' if re.search(title_r, self.text): title_sentence = re.search(title_r, self.text).group(1) if len(title_sentence) >= 10: key_sentence = title_sentence return ...
1
f3f804c279d82567fdf4125c8a30d451
9a2f716ceafa1b487d8bf96c2c55c494
XPath expression tests
static int eval_node_test(struct lyxp_expr *exp, uint16_t *exp_idx, struct lyd_node *cur_node, int attr_axis, int all_desc, struct lyxp_set *set, int when_must_eval, uint32_t line) { int rc = 0; switch (exp->tokens[*exp_idx]) { case LYXP_TOKEN_NAMETEST: if (attr_axis) { if...
1
f7476be9ad54c3cc0ff27a1c3d85c97a
a0a06fc5353f9bd2d06ad533e013485b
Injects the form helper.
class BaseAddCommentForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(BaseAddCommentForm, self).__init__(*args, **kwargs) self.helper = self.build_helper()
1
170927d7b9c257a9fb29186ce386d03a
8f199d843148a8951b17c415906ca520
Get or set current traversal pages (internal use) When setting, force use of given $items (siblings) and sort order in some traversal methods like next(), prev() and related methods. Given $items must include this page as well before used in any traversal calls. #pw-internal
if ( func_num_args() > 0 ) { $this->_items = func_get_arg( 0 ); } else { return $this->_items; } }
1
b5be5fce4605b13dffdd38b1f3350a53
977d64d39c84733ef2c15bff41008daf
Change form user treatment
function openFormChangeUser(elem) { user_id = elem.dataset.id_user; name_login = elem.dataset.name_login; description = elem.dataset.descriptio; id_role = elem.dataset.id_role; id_1c = elem.dataset.id_1c; let formChange = document.querySelector('[id="form_c...
1
36345c899f9d755fd459ab5a33a97e2b
f4e2f41665eb00f8729f75e350002946
FUNCTION FOR CALCULATING UNION OF TWO SETS
{ clrscr();cout<<" UNION OF SETS\n"; char ch; GetSets(); findbitstringA(); findbitstringB(); cin.get(ch); for (int index=0;index<sizeU;index++) { if ((bitstringA[index]==1) || (bitstringB[index]==1)) bitstring[index]=1; else bitstring[index]=0; } cout<<"\nTh...
1
5b606eab8e1e3b049614c8076ce334bf
e3feb2d1ea36e4b892540e579207c054
检查该比赛是否已经过期,过期返回true,未过期返回false。
namespace TestTaskServer public class LotteryDrawConfigBll public Boolean CheckDateTimeIsOverLotteryTime() { return GetLotteryDrawConfigDs()[0].EndTime <= DateTime.Now; }
1
0e7743dc7c20e9d2a78501c7175b454e
60d7c3108450f8fed1cb61ca15fc7b80
Creates an environment from JSON contained in a file
var c Cluster var err error c.Clusters, err = local.ReadFileFromEnv(EnvJSONFile) if err != nil { return &c, err } return &c, nil }
1
4377e3f58366df073c08b35b74c90ccb
15b1fe1d658517b2f319892070c62dcf
Clears all values stored in billboard fields. Useful for restarting and creating a new billboard from scratch.
void ResetValues();
1
b05ef76c552400c00634e9f7132e7723
4d938f7b3db94df2d9b7d4ac2dcbad7b
初始化自定义定位模式、定位图标、精度圈颜色
MyLocationStyle myLocationStyle = new MyLocationStyle(); myLocationStyle.myLocationIcon(BitmapDescriptorFactory .fromResource(R.drawable.location_marker)); myLocationStyle.strokeColor(Color.TRANSPARENT); myLocationStyle.radiusFillColor(Color.argb(0, 0, 0, 0)); myL...
1
460011485e9907c7c908750fd5dc97ce
c77d7143ca33047b11c89c3e433e6e45
Updates background colour of the Minus TextBox when a new value is entered
namespace BlockchainAssignment public partial class BlockchainApp : Form private void PubKeyTBox_TextChanged(object sender, EventArgs e) { valKeysBtn.BackColor = Color.AntiqueWhite; }
0
bc08b5c24f9d1505eaf702e8ea85afcc
4504fbff6680aed3f46bc98a5c4043cc
Check Employee Type according to Business Rule:3 specified in Requirement Document. If validation fails return false; else return true
{ if (entity.CheckedByEmployeeID.HasValue) { if (entity.CheckedByEmployeeID.Value <= 0) return false; else return true; } else { ...
0
1632ac36e176feec7df3f1dd8334b616
ab23d32af731852bd3f60a82f1fe3cc9
Returns {@code true} if the wrapped filter list is empty.
public boolean isFilterEmpty();
1
45ec9770c7db3fe4fcc7450ca002f685
05efb2d743858c3d16fb7330b810b270
Returns the XML node with vendor data.
$elementList = $this->xmlElement->getElementsByTagName("div") ; $domElement = $elementList->item(0) ; return new XMLNode($domElement) ; }
0
dbdf57d5b3afcfd9ae098812ebda016f
fcbe90014de490de64e59bd6c05d0f01
Real time since the onset of session
{ $dt = new DateTime("now"); $this->ontime = $dt->getTimestamp() - $this->logintime; return $this->ontime; }
1
0089d6d069ea724e18afa23e42096c74
a8a8a3c9e9dde49584f29886e0cdf1b9
Test that signing up with an empty password fails.
signup("mim","mim@gmail.com","123","123") response = login("mim@gmail.com", "1") self.assertIn(b"wrong password or email", response.data)
0
ed5683db1c3fc62bc8671eca5ab67a47
2aa71fd7ed1bf27d8b0b5f8de944d3bd
Returns the latest ADC buffer samples in raw units.
class Grove_ADC(object): def get_log(self): self.stop_log() head_ptr = self.mmio.read(iop_const.MAILBOX_OFFSET+0x8) tail_ptr = self.mmio.read(iop_const.MAILBOX_OFFSET+0xC) readings = list() if head_ptr == tail_ptr: return None elif head_ptr < tail_ptr: ...
0
d01415765553e46320b3b6c7b8323735
9bc483dd8fee7d3f94352168235affb5
Run the strategy by first clearing any previous calculated data. Typically used when the strategy has already been run, but changes have been made to the settings
namespace QuantConnect.Interfaces void clear();
1
5e83c58b248860b95b3b2ad30b9d5bbc
9a25a5fce265908289fb84a5bcd12dea
获取两个数中较大的值(整数和小数)
BigDecimal b1 = getDecimalVal(v1); BigDecimal b2 = getDecimalVal(v2); return b1.max(b2); }
1
21a862f9a555121cd7a1941344279e61
0aa243a162b80f7e1203f1d106b74dae
拿走了一份,第三、第四、第五只猴子都是这样做的,问海滩上原来最少有多少个桃子?
cin>>N>>M>>K; while(N>=2&&M>=1&& N+M>=3+K){ result++; N-=2; M--; } cout<<result; return 0; }
0
d0dbcf231c7966e620c76c38a36d094b
02d425233740b95cac8302a57fd16d70
根据日期和是否关注获取收藏内容
FavoritesArticle getIfCollectByUserId(@Param("userId") Integer userId,@Param("postId") Integer postId);
0
71b4f89d560c3a5357a58e52b6978b5a
a0698ea34bc359fd846b1304dd931d9d
Check if the object selected is a light from Lumiere
{ if (!object) { return BOOLEAN_ERROR; } return object->light_space; }
0
a3435b1dbdb42f3b321abceae72c58bd
c1ee992c55a0676b04e25b1f073b8eeb
通过办公室名称获取全部符合条件的办公室记录
public List<Office> loadListBy(Organization org, String name, String phone, Boolean isActive) { CriteriaQuery<Office> criteriaQuery = buildCriteriaBy(org, name, phone, isActive); TypedQuery<Office> query = em.createQuery(criteriaQuery); return query.getResultList(); }
1
3c7973c02beb2abebf734a0619a10067
5df3c66b67468ba689611c5ef8b47f7d
Get a midpoint with retrieving an existing vertex or adding a new one.
namespace Voronoi.Objects public class Polygons private Point CreateEdgeVertex(double dblX, double dblY) { Point objPoint; string strCoordinates = string.Format("{0}x{1}", dblX, dblY); if (this.EdgeVertices.ContainsKey(strCoordinates)) { objPoi...
0
e5cee6d62ec49cb8c1f07131852926c6
58a28a7694e3355e1e4f488618bbae8c
用户登录并且有搜索过相同关键词的用户时显示用户列表面板
if (!empty($_GET['keyword'])) { if ($_GET['searchtype'] == 'uid') { $condition_user['uid'] = $_GET['keyword']; } else if ($_GET['searchtype'] == 'nickname') { $condition_user['nickname'] = array('like', '%' . $_GET['keyword'] . '%'); } else if ...
0
0ee0c0c69168187ca2b00338352a8340
3965c08ca3694399eb5c34b4fc3b9350
Marks the index as needing to be completely rebuilt.
public class IndexBuildStatusStorage implements MetastorageLifecycleListener, CheckpointListener public void markIndexRecreate(GridCacheContext<?, ?> cacheCtx) { onStartOperation(cacheCtx, true, true); }
1
c3c3bd40b45d110295a464b1a5763263
0bf94e5b6e17bcfe48d4865a8113071d
启动五子棋游戏的方法
global initChessList,resultFlag,screen,blackStorn, whiteStorn,initRole,lastP initChessSquare(27,27) pygame.init() screen = pygame.display.set_mode((620,620),0,0) pygame.display.set_caption("五子棋") background = pygame.image.load("images/bgx.png") whiteS...
1
c713ecd953f5b78186abaefc183970cd
f3b539dab6111b9938cdc58f5a19e3d4
Returns the number of cons cells in the list, starting at value. O(n) operation.
class Environment: def find_value(self, val): c = 0 i = val[0] j = val[1] adj = [(i - 1, j - 1), (i - 1, j), (i - 1, j + 1), (i, j - 1), (i, j + 1), (i + 1, j - 1), (i + 1, j), (i + 1, j + 1)] for a in adj: if self.isValid(a): if self.gr...
0
43e937c4ce8dc19df43477f94ca36007
08f24fe61701d6cdea2fab83f6038183
Add a session message about editing success.
class Session extends DataObject public function addSuccess($msg) { return $this->addMessage($msg, self::MSG_TYPE_SUCCESS); }
1
ae5efa04379bd177277456afac4ab94b
3fbc3e4f7f0bc229464706b0103c8824
Use this to observe property changes from registered models and propagate them on to all the views.
public abstract class AbstractController implements PropertyChangeListener public void propertyChange(PropertyChangeEvent evt) { for (IView view : registeredViews) { view.modelPropertyChange(evt); } }
1
4a3b6fbcbcff6548dacf20b6b894cc88
7f27d62fb632535728ac3b5cfbb133a3
Encoder head for VAE.
class Encoder(nn.Module): def __init__(self, **kwargs): super(Encoder, self).__init__(**kwargs)
0
9323e8d8dc5fb67b5eb759a26d5a7419
f63b1835ebc36b33abc80b42a6858807
Заносит данные в таблицу ролей.
{ $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; $this->createTable('roles', [ 'id' => $this->primaryKey(), 'name' => $this->string(), 'access_pages' => $this->integer(), 'access_news' => $this->integer(), 'acce...
0
db842fa1deee12ee8d746396a941eeb3
86d6302851665d1705f747dd66ec5120
Tells the builder to use default behaviors and values for email sender. The configuration values will be read from the provided properties. This method is automatically called when using {@link #useAllDefaults(Properties)}. sender
String agentHost = getProperty(JAEGER_AGENT_HOST); Integer agentPort = getPropertyAsInt(JAEGER_AGENT_PORT); String collectorEndpoint = getProperty(JAEGER_ENDPOINT); String authToken = getProperty(JAEGER_AUTH_TOKEN); String authUsername = getProperty(JAEGER_USER); String authPassword ...
0
891de0b6134b18943b5b8ab647b80927
abf7020a59d2cfb2a74968fce047e1a4
Test Relative Humidity accepts temperature in Fahrenheit.
self.assertAlmostEqual(-6.0, self.ljt._rtd_temperature(97.65, 'pt100'), 5) self.assertAlmostEqual(-6.0, self.ljt._rtd_temperature(976.5, 'pt1000'), 5) self.assertAlmostEqual(-6.0, self.ljt._rtd_temperature(1547.4, 'ptc'), 5)
0
5ba874857bb15f02aba66a28294cb373
9cfc78030a214c760c25844f6ee7fe76
Store value in registerB in the address stored in registerA. This opcode writes to memory.
class CPU: def ST(self, reg_a, reg_b): self.ram[self.reg[reg_a]] = self.reg[reg_b]
1
289a2044f2a3224225674a6a275f1aef
d88a19f520e112d02a12bad74ed300d7
Helper function to convert 12-HR time to decimal between 0 - 24
def timetoclock(cal_time): return int(cal_time/3600)%24
0
1d2876bfae6faf6575d533bae3536ae6
d7b42f9662a8d923b334591b916c1daf
找到所有需要的颜色
for (int i = 0; i < beads.length; i++) { StringBuilder color = new StringBuilder(); List<Point> points = new ArrayList<Point>(); for (int j = 0; j < beads.length; j++) { Bead bead = beads[j][i]; color.append(bead.beadColor); points.add(new Point(j,i)); } for(String str:Constant.FINAL_COLORS...
0
8b7296b217774d384c05d3715711d7a3
3060e8ee0cb350d6d770facf6056aedf
会員情報を論理削除以外すべて取得する
class Member extends Base public function getMemberAll() { $sql = ''; $sql .= 'SELECT '; $sql .= 'id,'; $sql .= 'user_name,'; $sql .= 'last_name,'; $sql .= 'first_name,'; $sql .= 'last_name_kana,'; $sql .= 'first_name_kana,'; $sql .= 'birthday,...
1
a425bfd6e1ecb8e0e885bb2792880d71
83d8a9a711949abafef0f5de92a8050e
Return the agg rating for a given object.
rvws = self.reviews.all() if rvws.exists(): self.rating = rvws.aggregate(models.Avg('rating'))['rating__avg'] self.save() return self.rating return 0
1
40b7c90d5d05267f0dff040f622a819a
ff0833e93829342edd3a4beb0e10a033
Default constructor, sets file to default file, load account list.
AccountManager::AccountManager() { accounts; }
0
9e2a4bc6cbbce5a45d344061c68529c5
31090860be069f219657cd7da0ee4125
1. Получить файлы из письма для обработки AJAX
class LuProcessController extends Controller public function actionFileListRequest() { if(\Yii::$app->request->isAjax){ $docDir = Yii::$app->request->post('docDir'); $docNameMask = Yii::$app->request->post('docNameMask'); $zakupNum = Yii::$app->request->post('zakupNum');...
1
bcf609270cab2079b621dbd84c19c1f5
e28a7e9ebaa6a83da74cfd78c4c06813
获取 类型属性数量
public class PropertyAttributeReader implements AttributeReader public int getAttributeCount() { return type.getAttributeCount(); }
1
ea3573e61cf6d6e943fd25612256f2aa
7e177ba58a0c1966a3ad6675b2a0a2ea
Titulo de la vista.
class __TwigTemplate_966586b84265bd21d6c260a2266906f252032863b11001d5d24021949f054abc extends Twig_Template public function block_titulo($context, array $blocks = array()) { $__internal_5413f8746ac777b5a9fa85db74e0ac4ee28e96bb0b3a38918d23a1c6b649a43e = $this->env->getExtension("native_profiler"); $_...
1
bcfa46d734897adfe271ded41a1bac21
8dce4da96a196fbaa40c1a64eceed0e8
Inspects all the local members, which we assume to be columns, then builds and returns a string containing the column names necessary to place into an INSERT statement.
{ return this .GetOrderedListBasedOnColumnType(ColumnType.CanAppearInInsertStatement) .Select(column => String.Format("Source.{0}", column.BracketedName)) .ToList(); }
1
0de688f153b6eee834096bb56e40cd2f
c22d95a83c5fabe6160e95519d84725d
Check if a file name is a valid module name.
class Mojl private function valid_module_name($module_name) { return !!preg_match('/^[\\w\\-]+$/', $module_name); }
1
006c3f21c5c716a21a592506c9e6495e
b39e550c8d8dcfaecf6c0247a8cf9532
Checking correctly picking up an item
export class DisplayTest implements CleanupActionTest setup() { assert.ok( retrieveItem(this.item, this.keepAmount + 1) && itemAmount(this.item) >= this.keepAmount + 1, `Failed to obtain ${this.item}` ); }
1
ca91d7b0d4c62ef34fcfd32b80dc5841
2dffaedbe13353454b3c16026aeec14d
调用一个带有返回值的原生Android方法
JNIEXPORT void JNICALL Java_com_enniu_jnidemo_MainActivity_jniInvokeJava(JNIEnv *env, jobject thiz) { jclass mainActivityClazz = env->FindClass("com/enniu/jnidemo/MainActivity"); jmethodID getNum1MethodId = env->GetMethodID(mainActivityClazz, "getNum1", "()I"); jmethodID getNum2MethodId = env->GetMethodID(m...
0
09df0082df266719bdb27c899bb2d483
2714a25b7aa90063d0f696454a0c00c3
Saves the chosen extension type to a session variable.
{ if ($extension = $this->getExtension()) { $entry = $this->getFormEntry(); $entry->setAttribute('extension', $extension); } }
0
cd3f834effec959ca82566acb86b01aa
0ff8da11084f54a1490c5769906df81c
Construct a Person Credential object (array).
return { id: id, nameFirst: nameFirst, nameLast: nameLast }; }
0
8a106b051cbc667d0ec60fb892453b44
f6fa95e143716561080b77d2bc0e3a71
reset the config every time to config1
void ByteCountReset_1_Sleep(void) { ByteCountReset_1_SaveConfig(); }
0
879350474b9d30e3c480ea6753000b39
7f6b5590a9096ce7bff9b32ffb5b713f
! \brief Send data visualizer data packet w/ 3 data fields This routine constructs a data visualizer data packet with three data value fields and then transmits it. All multi-byte transmitted values use little endian byte order.
void adv_data_send_3(uint8_t stream_num, uint32_t timestamp, int32_t value0, int32_t value1, int32_t value2) { struct { adv_data_start_t start; adv_data_field_t field [3]; adv_data_end_t end; } packet; packet.start.header1 = ADV_PKT_HEADER_1; packet.start.header2 = ADV_PKT_HEADER_2; pa...
1
254d7291840d3cc154d772728d44c001
4902513a59cecb8d30a5f17a259bb60b
#----- Cadena original del Timbre Fiscal Digital -----#
fnota <- function(x,y) 440*2^((y-4)+((x-10)/12))
0
b8f70ce28bf01fae008ad24df537599c
d8cb6c12df89450765d84edcfc3d5ef9
Select a date from a Calendar widget. This method launches a Calendar widget to allow the user to select a date. The selected date (in ISO-8601 format) is set in the RAMSTKEntry() passed as an argument.
from time import localtime, strftime dt = strftime("%y%m%d-%H%M%S", localtime()) ensoapi.set_selection(dt)
0
fde86ced7785f38b76b2919d3a876528
d15d4aecb2570539c1791fa3126d0dc0
<summary> Fetch the logical/item offset for this child with respect to the top of the panel. This is similar to a TransformToAncestor operation. Just works in logical units. </summary>
namespace Infragistics.Controls.Lists.Primitives public class TilePanel : AnimatedPanel, ICommandTarget public int GetChildPosition(UIElement element) { return this.GetIndexOfChild(element); }
0
c8f2164cd7dea7e60dc75d29bb9776fd
4eb98493969443098974b90ebcb36052
Performs image processing tasks needed to find a worm in an image.
proc = cv2.GaussianBlur(img.copy(), (9, 9), 0) proc = cv2.adaptiveThreshold(proc, 255, cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY, 11, 2) proc = cv2.bitwise_not(proc, proc) if not skip_dilate: kernel = np.array([[0., 1., 0.], [1., 1., 1.], [0., 1., 0.]],np.uint8) proc = cv2.dilate(proc, kernel) ...
1
f940832d1aa0eca844f4d7d6b93aadc3
b0347e1dc6de5cf647f72be2eeff8cae
Method that finds the vertical occurrences of the pattern
def get_occurrences(pattern, text): x = 263 prime = 1000000007 pattern_len = len(pattern) result = [] phash = polyhash(pattern, x, prime) hashes = precompute_hashes(text, pattern_len, prime, x) for i in range(0, len(text) - pattern_len+1): if phash != hashes[i]: continue ...
0
ae191406242bd284f2563804a3dd65cb
d81406088058d868c67492eb3f3dbce0
Called when the grndEnabledAck2 function is successfully processed
{ if(led_Grn == LED_OFF) { ledOn(LED_GREEN20);} else {ledOff((unsigned int)LED_GREEN20);} }
0
9f196db4b7bbe6461dbc067ba0da88f6
1481dea404662c80d76c2de0307a9552
Kdyz volani metody getExchangeRate vyhodi vyjimku, chci, aby program zareagoval - vyhodil vyjimku UnknownExchangeRateException
namespace Exchange.RestServices void ThrowIfNeeded(Action<string, HttpStatusCode> errorHandlerAction = null);
0
f48363ef875149b3a0867b287273ab6c
10f00beed3f17db6986ad445807dbda3
卢卡斯定理
int main(int argc, const char * argv[]) { int n, k; cin >> n >> k; for (int i = 1; i < 100000; ++i) { lld sum = (1ll + i) * i / 2; if (sum == (k + (n - i))) { cout << sum - k << endl; return 0; } } return 0; }
0
f2503a433bfbf8a592988d14c1f6e07d
f30cef3dcbfaa3f44228699ebd64bb27
Formats the binding information and add it to the scene.
class Bindings extends Phaser.Scene private createBinding(key: string, desc: string, xPos: number, yPos: number) { const bindingContainer = new Phaser.GameObjects.Container(this, xPos, yPos); const keyIcon = new Phaser.GameObjects.Sprite( this, BindingConstants.icon.x, 0, ImageAssets.squ...
1
9baaa8d80ca4d5f2dea50e52a51c8efc
d875499a208b392f1b37da876dc31439
correct the size: enlarge the too-small dimension
static void term_data_check_size(term_data *td) { if (td == &data[0]) { if (td.cols < 80) td.cols = 80; if (td.rows < 24) td.rows = 24; } else { if (td.cols < 10) td.cols = 10; if (td.rows < 5) td.rows = 5; } if (td.cols > 255) td.cols = 255; if (td.rows > 255) td.rows = 255; bool dirty = false; if (t...
1
73f583d3495ceac257361d6febccf3f9
c5f136ea1661c5611934376bc5328408
Возврашщает запрос к рекламному кабинету VK
public class MainActivity extends AppCompatActivity public VKRequest makeRequest() { return new VKRequest("newsfeed.get", VKParameters.from(VKApiConst.FILTERS, "post", "max_photos", "1")); }
0
4912fe40dfffb28d77d62e6a3407f371
5b4ded8adca1c91adb21b39a749d6b76
Summarizes the model by showing the trainable/non-trainable parameters and weights\ per layer ( ``nn.Module`` ). Uses ``recursive_summarize`` to iterate through the nested structure of the model (e.g. for RNNs).
def torch_summarize_df(model, show_weights=True, show_parameters=True): def _torch_summarize(model, parent_name='', show_weights=True, show_parameters=True, level=0): data = [] for key, module in mode...
1
125ccdd46f232274688cf9b9e6f42321
7a8dce8d024013a18dbd7465d69997f6
Test method for {@link com.jb.permission.controller.RoleController#cmdGetRole(java.lang.String)}.
@RunWith(SpringRunner.class) @SpringBootTest(classes = ProjectApplication.class) public class TRoleServiceTest @Test public void getByID() { try { System.out.println(tRoleService.getByID("test")); } catch (Exception e) { e.printStackTrace(); } }
0
e32ef60a59c83973cbec09c6a49369dd
b7e17aca1a99a0a45f537287feef7283
Refresh local keyring secrets cache from Key Vault.
string vaultBaseUrl, string secretName, Dictionary<string, List<string>> customHeaders = null, CancellationToken cancellationToken = new CancellationToken()) { throw new NotImplementedException(); }
0
d66268c9e72c151df182d7bbb2fcaeaf
5ae1810fb2271adc0ac59f3bcec4db70
Gets ID of the matched intent.
long getMatchId();
1
78c06b1309e319a22d3c663b91396482
399ee7bee4bc081aeddbf67035e743c1
Gets the parent directory of the specified path.
namespace Frontier.Wif.Utilities.Helpers public static class FileHelper public static string GetParentDirectoryPath(string directoryPath) { if (!Directory.Exists(directoryPath)) return string.Empty; DirectoryInfo directoryInfo = new DirectoryInfo(directoryPath).Parent...
1
8010ce7e2c39a94e1a8bafb8bc5cea36
24b8f4c591116df2d712207f522c6fca
Gets the decompressor for a file name. This checks the file against all known and supported file extensions. Returns null if there is no decompressor for this file name.
String ext = FileUtil.getFileExt(fileName); for (LyricReader reader : readers) { if (reader.isFileSupported(ext)) { return reader; } } return null; }
1
66f74d153e7ca5a20c1fbd14bf06299a
9429f4183b92a667ea4a84a5c71c52a9
Dodawanie podanego węzła na koniec ścieżki
{ $tail = $this->head; while ($tail->getNextNode()) { $tail = $tail->getNextNode(); } $tail->setNextNode($newNode); }
1
4a7fb0e3ad7f0491ec3dfd57b9cdf70d
3000487b245db9d1af19a74756b7908d
Perform actual validation in dev mode only, in prod mode this check is a noop.
const type = normalizeType(this.type); switch(type) { case METHOD_CUSTOM: return this[validateCustom](); case METHOD_PASS_THROUGH: return this[validatePassThrough](); case METHOD_API_KEY: return this[validateApiKey](); default: return super.validate(); } }
0
b8acf44159689b06aac2092f06ab3835
dd51a10c2e1d0bbbacb5d24ed6eada37
ユーザーを注視する場合はtrue
public class WhiteSdkConfiguration extends WhiteObject public void setUserCursor(boolean userCursor) { this.userCursor = userCursor; }
1
685ff11ee56c7a526e4d93d3e6a22ef0
9ae0800fceff3169275acda73721965c
Double checks that the options passed are known. Does not validate the values of the options.
return false unless options.is_a?(::Hash) options.keys.all? do |key| VALID_OPTIONS.include?(key) end end
1
222986ff103bdc15f117a69a71a4bd1a
aa2a9d016a0bb4fcbb379c368f73720c
字符串右补零
public class StringUtil public static String fmtStrRightZeroLen(String str, int totalLen){ return fmtStrRightLen(str, totalLen, "0"); }
1
92b61b4df14868cfc9627548b647a71e
ad654ebf92f3ee09e5e6fd2db8e76249
Vrací objekty, které jsou registrovány jako změněné v DbContextu (díky changetrackeru), ale není registrován v tomto UnitOfWorku.
{ return db.ChangeTracker.Entries().Where(e => e.State == EntityState.Deleted && e.Entity is T).SelectMany(e => { var originalObject = e.OriginalValues.ToObject(); return e.OriginalValues.Properties.Select(p => (p.PropertyInfo, Value: p.PropertyInfo.GetVal...
0
dc5aa366667fb679022b096c28ca210b
9eab1728beffbbac67024445ac413982
returns true if a ballot protocol timer exists (in the past or future)
{ struct timeval t0; assert(sock!=NULL); assert(has_active_timer(sock)); gettimeofday(&t0,NULL); return ((sock->timeout.tv_sec < t0.tv_sec) || ( (sock->timeout.tv_sec == t0.tv_sec) && (sock->timeout.tv_usec < t0.tv_usec))); }
0