query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
85e46746c8f589c5952389fc3745ac8e | 035c8b4b3c13245669fbd2cf625d16fd | アプリケーションユーザ通貨検索条件構築
アプリケーションユーザ通貨を更新する際のWhere条件の連想配列を構築します。<br> | $search_cond = array();
$search_cond['phrases'] = $this->af->get('phrases');
$search_cond['phrase_connection'] = $this->af->get('phrase_connection');
$search_cond['connection'] = $this->af->get('connection');
$search_cond['relation'] = $this->af->get('relation');
$search_cond['web_display_type'] = $this->af... | 0 |
d5300f6e8c79cbac2ee2027ceb6863db | ccffbdf1101e9b54fa64000e5247e5a3 | Change slashes to dashes to make quantile filenames valid.
Note that there is a slight chance of name collision here. | class SequencingProcess(Process):
def _folder_scrub_name(x):
x = re.sub(r"\s+", '_', x)
x = re.sub('[^0-9a-zA-Z-_]+', '-', x)
return x | 0 |
28edb4313bafea7aa6ec63ee8063836b | fcc9040be5c49cfd5a33e5f6345b8699 | Prints all arrays of representatives in all states | public class Test implements ActionListener
public void printReachableMarkings()
{
int[] printArray;
for (int i = 0; i< reachableMarkings.size(); i++)
{
printArray = reachableMarkings.get(i).clone();
System.out.println("M" + i + ": " +Arrays.toString(printArray));
}
} | 1 |
c333ecbf0f3577f067e12f4b786e30ff | 0c6aa20e086d77947dcbc006efa310db | registers a row within a mib table | {
Mig_Obj_t * pMaj;
unsigned key;
if( Mig_Regular(p0)->Id > Mig_Regular(p1)->Id )
pMaj = p0, p0 = p1, p1 = pMaj;
if( Mig_Regular(p1)->Id > Mig_Regular(p2)->Id )
pMaj = p1, p1 = p2, p2 = pMaj;
if( Mig_Regular(p0)->Id > Mig_Regular(p1)->Id )
pMaj = p0, p0 = p1, p1 = pMaj;
a... | 1 |
2ceba1bf63662989e5d662f1aaa1032c | 519f53faefff6a5de6865fb4e12e262a | Delete a webhook Delete a webhook on the UltraCart account. | class WebhooksApi
def webhooks_id_delete(id, opts = {})
webhooks_id_delete_with_http_info(id, opts)
end | 1 |
52be5a766211a24ee283e81d543646b4 | e56e5acc102db83a33276cc9122cccdf | Called when a PhotoPath is changed for an entry. | {
if (!this.Entries.ContainsKey(e.UUID))
{
return;
}
Entry entry = this.Entries[e.UUID];
entry.PhotoPath = null;
if (this.SelectedEntry == entry)
{
this.UpdatePhotoUIs();
if (this.... | 0 |
86b9afe48ee9abe44eb25bc214ac1263 | 74bfb7e7cef4e4198f2d26e1de352875 | Returns count of postcodes selected but not yet active | {
return Session.Query<StaffEstablishedPostUserLinks>().Where(x => x.StaffEstablishedPost.Id == SEPId && x.User.IsActive == true && !x.User.IsPregnant.HasValue && !x.IsDismissal && x.IsUsed).ToList().Count;
} | 0 |
5e3bdd28206163712f60a5f1c368b3b0 | cb68e980cdad8b4665d2954aa6852b61 | 获取高频彩主页数据 | async getHomeData({commit}){
const result=await reqHomeData()
commit(RECEIVE_HOMEDATA,{kingKongList:result.data})
} | 1 |
8e8580ad9456f4450a2ca18a67b537ac | 3e92bcc93d3d0153f35c82f8e44be3ea | Create new pcapng writer handle | @SingleInstanceIn(VpnScope::class)
class GoBackend @Inject constructor(
private val context: Context,
private val appTrackerDetector: AppTrackerDetector,
pixels: Lazy<NetworkProtectionPixels>,
)
external fun wgPcap(filename: String?, recordSize: Int, fileSize: Int) | 0 |
b78bcfadee955da67e19543478d3944f | 01f330eb7049077774b0f1f0f3e625b5 | 获取灰度发布列表 | async getProduceRequireGray(data = {}) {
const res = await api.produceRequireGray(data)
const dataInfo = res.data || []
console.log(dataInfo)
this.$set(this.popOptions.content._tableForm, 'dataSource', dataInfo)
} | 1 |
15e0a8413462300bafaad4979b6fc9df | 23a2e4474bd35c30e1f81a4484c0e003 | 字符串大于或等于比较。 | namespace Bing.Datas.Sql.Queries
public abstract class SqlQueryBase:ISqlQuery
public ISqlQuery GreaterEqual(string column, object value)
{
Builder.GreaterEqual(column, value);
return this;
} | 1 |
a84c2d2e510212476d51ab29d4d06a46 | a23872ac89554a34f2d7bef609a37a7e | Map the old status to the current
https://github.com/nabeelio/phpvms_v2/blob/master/core/app.config.php#L450 | {
switch ($ipnPaymentStatus) {
case 'Created':
case 'Completed':
return self::PAYMENTSTATUS_COMPLETED;
case 'Denied':
return self::PAYMENTSTATUS_DENIED;
case 'Expired':
return self::PAYMENTSTATUS_EXPIRED;
... | 1 |
7b6d48656cb0d16536006000a3287c35 | 6b57af062db7a8181ae8d693616bfad2 | return a dict mapping token positions to nodes | class FwData(tnet.dataprep.TNetData):
def get_pos_dict(self):
return super().get_pos_dict() | 1 |
763e984530b4783300121ca3bb333e2f | b60c9435fd7c27e9e78ba9c418a2da2a | 获取对象的所有属性成员及值 | namespace Bizland.Utilities
public class StringHelper
public static string GetValueProperties<T>(T obj) where T : class
{
StringBuilder sb = new StringBuilder();
PropertyInfo[] pros = obj.GetType().GetProperties();
sb.AppendLine($"BEGIN:{obj.GetType().Name.ToUpper()}");
... | 1 |
78624d7761f5a7c0e3b5e8694b11d438 | 6865dfb368e069e7ca82041003a22d76 | Draws the element at the given position. | class UIElement:
def draw(self, win, y, x) -> (int, int):
win.move(y, x)
return (1, 1) | 1 |
5baec5897910845b4ac55bb71d48119e | ffacacd783307b7a23f7c13cfb44d1b5 | Check custom codes are ignored correctly. | from pytest_flake8 import Ignorer
ignores = ["E203", "b/?.py E204 W205", "z.py ALL", "*.py E300"]
ign = Ignorer(ignores)
assert ign(tmpdir.join("a/b/x.py")) == "E203 E204 W205 E300".split()
assert ign(tmpdir.join("a/y.py")) == "E203 E300".split()
assert ign(tmpdir.join("a... | 1 |
48ffc7c40abf48f9a7e9e72176da7425 | 2c045c1716a8de8d64cf39a02dd70bb4 | Returns an immutable reference to the Map of custom metadata key-value pairs. | if (customParams == null) {
return Collections.emptyMap();
}
return Collections.unmodifiableMap(customParams);
} | 1 |
3fa82c994bbd8cd332740fa25129a0aa | 57b19187b47d213d66738b399ad7607a | (Re)load Terminal frame. | class Frame(wx.Frame):
def __init__(self, *args, **kwargs):
wx.Frame.__init__(self, None, *args, **kwargs)
terminal = Terminal(self, console=Console(), windowtoclose=self)
terminal.SetFocus()
sizer = wx.BoxSizer()
sizer.Add(terminal, 1, wx.EXPAND)
... | 0 |
ac9aa10882169c63de93553d90d49ccd | 008edcc084bc20e235a3ba0b42a11726 | kiem tra 2 sinh vien co cung lop hay khong | {
using (SQL_QLHSDataContext db = new SQL_QLHSDataContext())
{
int siSo = db.QUATRINHHOCs.Where(a => a.MALOP == maLop && a.MAHK == maHocKy).Count();
return siSo;
}
} | 0 |
fee5d9a65f73175270d4503da01a958e | f4e0e5dbbd6ca8249925825d32ba43be | Generates a NodeGraph from a skeletonized voxelgrid, by traversing neighboring
voxels and creating nodes connected by edges to maintain the topology of the voxelgrid. | public class GravityFrameController
private void GenerateGravityFrameFromSplines(MazeFrame mazeFrame, MazeFrameSplines mazeFrameSplines, float junctionDist, float planeWidth)
{
int nodeCount = 0;
foreach (MazeFrameSplines.SplineSegment splineSeg in mazeFrameSplines.SplineSegments)
{ nodeCoun... | 0 |
4bc4d1cd6a156fa4939f81d751621047 | 10f0ba1964a8e6e035314707ab3ebea7 | 获取库存商品数量,如果没有库存返回0 | class InstockController extends BaseController
public function getStockNum($wgid){
$m = M("stock");
$data = $m->field("num1")->where("wgid = $wgid")->order("ktime asc")->find();
if($data){
return $data['num1'];
}else{
return 0;
}
} | 1 |
8e1dd820de36c3c57b4c2c5f00a93e10 | 79a1dd38ae186afd3bba6116c043e0f7 | 通过过去的天数获取员工考勤记录 | var begin, end int
begin = tools.GetFirstYMD(dt)
now := time.Now()
if tools.GetYM(dt) == tools.GetYM(now) {
end = tools.GetYMD(now)
} else {
end = tools.GetEndYMD(dt)
}
page.PageSize = 100000000
page.PageIndex = 1
o := mongo.NewOrm()
q := o.Find(new(AttendanceRecord)).Filter("company_id", mongo.Equal, qw.... | 1 |
8d0e8752e572e7c0e448f6271863d285 | 338cf2f9685811a6c46532e2f08586a2 | Returns the determinants of a batched 3-D matrix | def det3x3(M):
pos_terms = [
(0, 1, 2),
(2, 0, 1),
(1, 2, 0)
]
neg_terms = [
(2, 1, 0),
(1, 0, 2),
(0, 2, 1)
]
pos_terms = _tf.add_n([M[:, 0, i] * M[:, 1, j] * M[:, 2, k]
for i, j, k in pos_terms])
neg_terms = _tf.add_n([M[:, 0, i] * M[:, 1... | 1 |
ead7d085ebd34c97683d1a10f28e2a79 | 258a282bffa683c60259648859cc22a0 | Skips numSamples samples. If the decoded file is in stereo the left and right channel samples are counted as 2 samples. | public abstract class Decoder implements Disposable
public abstract int skipSamples (int numSamples); | 1 |
f85080d87b17f3275b0f12e7982b791f | e0737faf7ce5dae7880f1cac74fee0b2 | 扩展顺序表的空间大小,增量是LISTINCREMENT | if (!list || typesize_<1)
return 0;
int ii=0,jj=0;
list->typesize=typesize_;
list->reserved=(reserve<=0 ? 0 : 1);
while (list->reserved<MAX(reserve,0) && (ii++)<32)
list->reserved*=2;
list->count=0;
list->sorted=0;
list->cmp=0;
list->arr=0;
if (list->reserved>0) {
list->arr=(void *)mallo... | 0 |
8322948e04a1c67d8920c6aefb0fefbb | 57882bc2ca5c0c9942703a563cee2bc4 | 获取最新编辑的post | function getCurrentPost(return_null) {
if (checkLimitWork() === false) return false;
var winTop = $(this).scrollTop();
var $posts = $('table.tborder');
var top = $.grep($posts, (item) => {
return $(item).position().top <= winTop;
}).pop();
if (top && top.id.startsWith('post_')) {
... | 0 |
9da73eb199fd2149d7fa9460c63c2e17 | 7bcd0ab4d1f10f8e2b28b93e525154e6 | 获取文件中的图片信息(带重试) | getImagesInfo(imgArr = []) {
let _getImageInfo = (imgArr, result, i, resolve, reject) => {
this.getImageInfo(imgArr[i]).then(res => {
result.push(res)
if (result.length == imgArr.length) {
resolve(result)
} else {
_getImageInfo(imgArr, result, i + 1, resolve, reject... | 0 |
92540cdd37ff3722e3e8a03798231bd5 | 7ff9c6c1f44d4dcbd1555cbd22c2908a | đếm khóa học | namespace BL
public class LessonsBL
public static int countLesson(int id)
{
using (LoveToLerningEntities db = new LoveToLerningEntities())
{
var d = db.Lessons.ToList().Where(x => x.CodeTeacher == id).Count();
return d;
}
} | 0 |
58d4f16f59a58bd7522777eb2bc2d85a | 735ff4e33c242a4b3b0690a80706888f | Anfrage weiterleiten (HTTP 302) | class HTTPConnector{
public function redirect($url){
Header("HTTP 302 Found");
Header("Location: ".$url);
die();
} | 1 |
1ecfc397f20354e26c9d8193649208a6 | 1ea4dac02a9325eee73f1d8349b3d010 | 获取要创建的群信息
包括群名和群简介 | public class CreateQunUI
public Qun getQunToCreate() {
Qun qun = new Qun();
qun.setQunName(getNameField().getText());
qun.setQunDescription(getDescriptionTextArea().getText());
return qun;
} | 1 |
2729f4c5b0087edd65b7cf724a349ad1 | 23780f3dd00cd485e1bec887b53307db | Indicates oxygen level with a color bar | void onOXY(OxyData oxy); | 0 |
849012f2ff3af3692177ef72bdc0ef2c | c4020d0774314763c881524a8ed0b58b | 堆的向下调整(大顶堆)
时间复杂度:O(log(n)) | public class PriorityQueue
private void downAdjust() {
int parentIndex = 0;
int childIndex = 1;
int temp = arr[parentIndex];
while (childIndex < size) {
if (childIndex + 1 < size && arr[childIndex] < arr[childIndex + 1]) {
childIndex++;
}
... | 1 |
18a91f0962a31e2d50208406c8fe6c66 | 678a6df0f81686ca8b51baef0586a885 | レベルキャップ変化完了時 に実行されるGS2-Scriptを設定 | class UpdateGameRequest(Gs2BasicRequest):
def with_authentication_done_trigger_script(self, authentication_done_trigger_script):
self.set_authentication_done_trigger_script(authentication_done_trigger_script)
return self | 0 |
bc62ff60d6989c1948d1861a68135317 | 2fdd0fe7c89b79f6906f179256cc9db1 | List stacks. Similar to the ``docker stack ls`` command. | if 'constraints' in request.args:
constraints = json.loads(request.args['constraints'])
return docker.query_stacks(constraints)
else:
return docker.query_stacks() | 1 |
04bc67f44998c4697577cd335be5ecd4 | 712e165aa26a9e022d6bf70fc9c66b97 | 计算62进制,支持最大的无符号长整型 | public class StringUtil
public static String convert10_62(int inputNum) {
int count = 0;
int num = 0;
int resultNum = 0;
String result = "";
while (true) {
if (inputNum >= num) {
count++;
num = (int) (Math.pow(62, count));
} else {
for (int i = 1; i <= count; i++) {
int a = (int) (in... | 0 |
46163dc39d23f0b80dcf2830e5eca02b | 76b19b6d0bdf48756e2574fe5ce45105 | selector可能没有传入 | export default class SelectableList extends React.PureComponent{
constructor(props){
super(props);
this.state={
selectedItems:this.props.selectedItems?[...this.props.selectedItems]:[]
}
} | 1 |
520b38d571d7e2fcf6f3f68b44014df5 | e838102596430f86a2bc55806ef2e737 | Escape HTML and Echo content | if ( $return ) {
ob_start();
}
eval("?>$code<?php");
if ( $return ) {
$content = ob_get_contents();
ob_clean();
return $content;
}
} | 0 |
065f051a5490d8c22d23cc815155321f | 7341d899fd9bc76a2955c1bd17b275e1 | Piirtää pohjakartan ja siihen parametrina saadun reitin. | public class PeliRuudukko extends JPanel
public void paint(Graphics g) {
int x2 = leveys * ruutu;
int y2 = korkeus * ruutu;
super.paint(g);
for (int y = 0; y <= korkeus; y++) {
g.drawLine(0, y * ruutu, x2, y * ruutu);
}
for (int x = 0; x <= leveys; x++) {
... | 0 |
04dacb49253963577fdd4ec234f8ae55 | a6d67868e3e36482f636bd0207533920 | Returns the number of all cuboids. | class Cuboid: # noqa: D101
def on_count(self) -> int:
on_vol = self.volume()
off_vol = sum(cuboid.on_count() for cuboid in self.off_cuboids)
return on_vol - off_vol | 0 |
eb4f4b9dc662e8420f1e0350d6a093f7 | 33b96944b4c8af45aea3830939c572df | 通过年份获取成绩 | public List<ScoreCustome> getScoreByYearTerm(@Param("year")String year,
@Param("upOrDownYear")Integer upOrDownYear) throws Exception; | 1 |
e856fda0b88252b6ea616b37df035f5e | 97ae4309c71a3dc0713780d577d47e86 | função que recebe um arrayList de Strings,
que contem os valores dos atributos do objeto,
transforma esse arraylist em uma string e
salva essa string como uma linha no arquivo especificado | try{
String file = ".//data//FonteEnergiaG"+fileName+".txt";
File fc = new File(file);
if(!fc.exists()){
fc.createNewFile();
}
PrintWriter pw = new PrintWriter(fc);
String tipo = "Tipo:" + this.tipo;
String energiaProduzida = "EnergiaPr... | 0 |
bc71485916330b027948a1bce8dd3f6e | 44d6dac343dae87c2f4d5a6c142ddb29 | Retrieves a Cosmos DB Container from the <see cref="_containers"/> collection by container name.
If the container name is not specified, the default container is retrieved. | {
return this.MakeServiceCall<IContainer>("GetContainerByContainerNameAndOrgName", "GetContainerByContainerNameAndOrgName",
client => client.GetContainerByContainerNameAndOrgName(containerName, organizationName, FillDiagnosticTraces(iCallerContext)));
} | 0 |
e73c8c0dd4c247cad336a1003ea9b3bc | 5de5e4c442b69af53dd066b2ae83648f | 测试用例,当余票不足时应该报错 | self.web1.find_element_by_xpath('/html/body/div[2]/div/div[2]/div[1]/ul[3]/li[1]').click()
time.sleep(2)
self.web1.switch_to.frame(2)
self.web1.find_element_by_css_selector('#subject').click()
self.web1.find_element_by_xpath('/html/body/form/ol/li/table[1]/tbody/tr[2]/td[6]/input... | 0 |
03873d8826f85b63bdd547416f6dcf44 | 421ef6dbb34bb528a52c81fe38ad4792 | ! Incompressible Navier-Stokes initial velocity coefficient | rho = np.sqrt(u*u + v*v)
wZero = (rho == 0.0)
try:
if wZero:
return 0.0, 0.0, -1.0
except ValueError:
pass
theta = 2*np.arctan(rho/2)
stheta = np.sin(theta)
with np.errstate(invalid='ignore'):
alpha = u/rho*stheta
beta = v/rho*stheta
gamma = -n... | 0 |
cbedcc99a5b18c430603f5d8c78e05c0 | 480de4b6f2c4f5888eb5ae995fc0205c | Verifica se o livro já foi finalizado pelo usuário | {
bool status = false;
string[] data = File.ReadAllLines(AppDomain.CurrentDomain.BaseDirectory + @"\Listing.txt");
foreach (string log in data)
{
string[] temp = log.Split('\t');
if (temp[0].Equals(ID.ToString()))
{... | 1 |
410202ec0df3187acb9846997b8ebce8 | f88d59e53d386cae832a7fe53f6d3fa1 | Sets the margin definitions on left and right pages. | void set_pcl5_margins(PCL5Context *pcl5_ctxt, Bool job_start)
{
PageCtrlInfo *page_info;
const PageCtrlInfo *default_page_info;
uint32 default_right_margin_width ;
int32 left_margin_position, right_margin_position ;
page_info = get_page_ctrl_info(pcl5_ctxt) ;
HQASSERT(page_info != NULL, "page_info is NULL")... | 1 |
44e5464cc479762e39f6aac7b87a93d3 | d9a445c252a7c19a30c2bce9831b1e6f | Maps OpenSSH key types to OQS IDs | {
switch (rgf_id)
{
case SSH_RSA_PKCS1_SHA1:
return SSH_RSA_PKCS1_SHA1_NO_HASH;
case SSH_RSA_PKCS1_MD5:
return SSH_RSA_PKCS1_MD5_NO_HASH;
case SSH_RSA_PKCS1_MD2:
return SSH_RSA_PKCS1_MD2_NO_HASH;
case SSH_RSA_PSS_SHA1:
return SSH_RSA_PSS_SHA1_NO_HASH;
case SSH_RSA_PSS_... | 0 |
06893a62f91008f059614b18982e38ef | db605ad1aca26d7e959158f98e992350 | function that checks for row wins | function rowCheckForWin() {
for (var i=0; i<3; i++){
var checkedRow = board[i];
if (checkedRow[0].className==checkedRow[1].className
&& checkedRow[1].className==checkedRow[2].className){
for (var j = 0; j<3; j++) {
if (checkedRow[j].className != 'blank'){
... | 1 |
1c19148b8f9c1fee7b2bb38cfbb5320a | 368b36df1de099d352998a40f5beb1cc | Set false for all modified properties. | class ResponseProperties
setUnchanged(unchanged){
this._unchanged = unchanged === true;
return this;
} | 0 |
9f1e9502282a0a3f6f94a47a240a555b | 86b029ccb7607a428ee5d058b05b2226 | Apply the price to all coverages | {
if (!_insuredCoversPremiums.Any())
return;
var insuredCoverTaxes = _policyVersion.RetrieveInsuredCoverTaxes();
var insuredCoverCommissions = _policyVersion.RetrieveInsuredCoverCommissions();
var insuredCoverReinsurances = _policyVersion.RetrieveI... | 0 |
04e2fe7fa350c43ca08ebabc5255806c | dcf493c181ad646e7c37f96b04931e33 | @brief :function converts the Internet host address cp from IPv4
numbers-and-dots notation into binary data in network byte order. | inet_pton4 (const char *src, const char *end, unsigned char *dst)
{
int saw_digit, octets, ch;
unsigned char tmp[NS_INADDRSZ], *tp;
saw_digit = 0;
octets = 0;
*(tp = tmp) = 0;
while (src < end)
{
ch = *src++;
if (ch >= '0' && ch <= '9')
{
unsigned int new = *tp * 10 + (ch -... | 1 |
b4e004f5f4f2ba76fd5e926fcc491d63 | ce2314b16aef1e07aa48e65eef9ea7f5 | Checks if the player has seen the stats info | {
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs("SeenIt"));
}
} | 0 |
da2a9e63a24e073a04c425fc0d2f0e8a | f93997e312342956bda3d45bf88829c6 | Update or insert objects into the dynamic collection. | public function addOrUpdateObjects($objects = [], $options = []); | 1 |
f14d364a9cc29737dd10581bf3bf9dc7 | d5c730c52b5e3a4dc53b98436cd30517 | Returns lemma representing word forms that <u>might</u> be present
in WordNet. For example, if "geese" is passed to this method along
with a parameter that indicates that noun forms should be returned
it will return the base form of "goose".
WordNet morphological processing</a>
Format of WordNet database files ("Except... | def lemma_from_key(key):
return wordnet.lemma_from_key(key) | 1 |
15bb8c479f3807bf38e2100fce166195 | 107fdf3b9754b672f38900ab2f9a2d1a | 限速功能 | class AppServiceProvider extends ServiceProvider
protected function initRateLimiter()
{
RateLimiter::for('uploads', function (Request $request) {
return $request->user()
? Limit::perMinute(self::DEFAULT_LIMIT)
: Limit::perMinute(self::MIN_LIMIT);
});
... | 1 |
5f06c6c31b4cdf3790b5af9b314bb752 | 49d2ea3ba4c2733016a9efd2c0b9072d | loops through fields between "a" and "b" and returns false if one is occupied | function overlaps(a1,a2,b1,b2)
if a1<b2 and a2>b1 then
if a1>b1 then
return true, b2-a1
else
return true, a2-b1
end
end
return false
end | 0 |
99c070010235f34f1754d495c697d9e0 | ae32f4963551fde6c3847a1667b130e6 | Verify if the name is valid and if the list exist or not
1-Exist, 2-No Exist, 3-Error or Invalid name | i = 0
list_val = listbox.get(0, tk.END)
while i < len(list_val):
if list_val[i] == name:
return True, i
i += 1
return False, -1 | 0 |
5def6df89473395b8e17989a4ed73949 | 4e092a20a9bbeab32e255aa6d8dcd134 | Construct a user-agent string for our web API requests. | class Yikes_Inc_Easy_Mailchimp_API
protected function get_user_agent() {
global $wp_version;
$user_agent = 'WordPress/' . $wp_version . '; Yikes Easy Mailchimp Extender; ' . get_bloginfo( 'url' );
$user_agent = apply_filters( 'yikesinc_eme_api_user_agent', $user_agent );
return $user_agent;
} | 1 |
2e3f5743f431016743c7aa1fda8affd7 | 5f35c1813c794bbe1bda29e0c2853a67 | chatroomId를 위한 랜덤값을 생성하는 함수 | public class DatabaseManager implements DatabaseControl
String random2() {
long num = (long) Math.floor(Math.random() * 11);
while (num < 6 || num > 10) {
num = (long) Math.floor(Math.random() * 11);
}
long a = (long) Math.pow(10, (num - 1));
long random6 = (long)... | 1 |
c0dc8de7ed29be06b68363a20300bddc | f35bd3cf864640a4b8220dd34b67288e | Gets the user name (FB api call) and then puts it into the DB, means it is their first time | String fname = user.get("firstName").toString();
String lname = user.get("lastName").toString();
String name = user.get("fullName").toString();
String email = user.getEmail();
SessionHelper.login(context, new User(fname, lname, name, email), isFacebook, false);
} | 0 |
ea9fbecf2627d369c600fae0d963b921 | b623ebf106bba21bf0548c6daec55bb5 | remove any image in that cell and remove the bonus type it had stored. | public class ImageCell extends ImageView
implements DragSource, DropTarget
public void onDrop (DragSource source, int num) {
Log.d (DragActivity.LOG_NAME, "ImageCell.onDrop: " + mCellNumber + " source: " + source);
mEmpty = false;
int bg = mEmpty ? R.color.cell_empty : R.color.cell_filled;
setBackg... | 0 |
3655f32f90ed1ee3ba8fcd0dcff5414f | cc9371650d07f84780336618327a9cb7 | creates a querier for price REST endpoints | const from = Array.isArray(fromCurrency)
? fromCurrency.join(',')
: fromCurrency;
const to = Array.isArray(toCurrency) ? toCurrency.join(',') : toCurrency;
return `${apiUrls.price}?fsyms=${from}&tsyms=${to}`;
} | 1 |
c14d8791ca20a7239cd9e7e262956596 | 2a43d42153b0f4ea9767a4f356b2b712 | 角色字段列表 | {
return [
'id' => Yii::t('app', '自增id'),
'pid' => Yii::t('app', '角色id'),
'sOrginName' => Yii::t('app', '机构名称'),
'dCreatTime' => Yii::t('app', '创建时间'),
];
} | 1 |
fb471423c986a3f88ffa873e1f6ef964 | 2ecd884c58e9bc4a1737636e11b7834c | 命令コードから命令の名前を返す | CMDS getCommandCode(const char *cmd)
{
if (strncmp(cmd, "help", 4) == 0) return HELP;
if (strncmp(cmd, "set", 3) == 0) return SET;
if (strncmp(cmd, "fill", 4) == 0) return FILL;
if (strncmp(cmd, "exit", 4) == 0) return EXIT;
return UNDEF;
} | 0 |
6fc32189daf7151d4e37bb7c33574b2b | f1b64244b30f28a4b87bacb6996491a6 | Disables the enemy and plays the death animation | public class BaseEnemy : MonoBehaviour
private void Die()
{
m_Collider.isTrigger = true;
m_Rigidbody.isKinematic = true;
gameObject.layer = LayerMask.GetMask("Default");
m_HealthBarCanvas.enabled = false;
m_Animator.SetTrigger(BASE_ENEMY_DEATH_ANIM_TRIGGER);
} | 1 |
73a123cf32b27ec21f94afed316b58ba | 5fb4d8d089dc3a86944545d19ca59833 | Find the fastest (least elapsed time) path to the goal in bridge problem | time = os.times()[0]
totalTime = timebound + time
if(initial_state.height == initial_state.width):
weight = (initial_state.height * initial_state.width)-initial_state.width
elif(initial_state.height < initial_state.width):
weight = initial_state.width-1
elif(initial_state.height > in... | 0 |
9c5ca1c39206d48cbcb3f4ae16de1327 | ed70811a9b98667fd57e1e63ef69eaf7 | 设置xpath对应节点的值 | Element ele = (Element) setting.selectSingleNode(path);
if (null != ele) {
ele.setText(elementValue);
}
} | 1 |
84ec207d419ad561c4bc85d095fa03d5 | b2e6370a63e6980b5804d35f843d485d | Set this as unavailable to prevent cloning | public class Listings
public void setUnavailable()
{
this.available = false;
} | 1 |
c7cca3a5364e5604d5e168e3d827f232 | ba3e821b1c60de86ef646952faf43969 | Save the currently selected article. | class UserBusinessPublicationArticleSubmissionView(object):
def POST(self):
submission_id = cherrypy.request.json['submission_id']
selected_article = session.query(UserArticleSubmission).filter(
UserArticleSubmission.id == submission_id
).first()
selected_article.datetime_sel... | 1 |
7a0313b7c948a187cdf09f1f6a82fbcd | 0ed0deecbc26d764df17c63fa93e9fa7 | Returns the meta object for class '{@link edytorModel.Argument <em>Argument</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getArgument(); | 1 |
ae675f291903fa42f63b696e42ee85a8 | 3323a88bdf472b6da1dc752fc9bc7f7f | 结束并保存输出到缓存 | public function capEnd( )
{
$this->_is_cap_end = true;
$this['contents'] = ob_get_clean();
} | 1 |
35b0ed74d8128e9f93201fef820a2b8a | 4d697b68297b1bcdbec02543be4bee6a | Returns the value of the <code>form</code> property. | public class AttributeElement extends AnnotatedBase implements INamed, IReference
public int getForm() {
return m_formChoice.getForm();
} | 1 |
98e1ca3552696a9c71953de9f8249d8b | 638fe561c722cf61e416b268b3e7c43b | 对注册页面中的用户名和手机号进行校验 | function checkRegister () {
var $nk = $('#nickname').val().trim();
var $up = $('#userphone').val().trim();
if (!$nk) {
$('#err-tips').text('昵称不能为空~').css('visibility', 'inherit')
return false
}
if (!$up) {
$('#err-tips').text('手机号码不能为空~').css('visibility', 'inherit')
return false
}
if ($up... | 1 |
a6d05c9fbc262f5db52ab732eb9dc4fe | 7fae1c3ae5e087fea50ab26ac4847ddc | 从Manifest文件中获取Permission数组 | public class PermissionManager
public static String[] getPermission() {
String[] permissionArray = new String[mPermissionList.size()];
mPermissionList.toArray(permissionArray);
return permissionArray;
} | 0 |
b10c01375f431c1d46d7843631569831 | 3169c687bbbf736056720e9777cf2cc6 | 得到起始点或者结束点 | class Image_Pass:
def getStart(self,config):
if config:
return self.image_locs[0]
else:
return self.image_locs[len(self.image_locs)-1] | 1 |
397c2a92f9b2d6b07c47e628c7c1459c | b62ac9d783bca87d78f12b97b2d1901f | アイテムの全情報を作成 | public class InventoryPanelController : MonoBehaviour
void CreateAllItem()
{
List<InventoryItem> itemList = _inventoryPanelModel.GetJsonList("InventoryJsonData");
for (int i = 0; i < itemList.Count; i++)
{
GameObject.Instantiate<GameObject>(_inventoryPanelView.ItemPrefab, slotLis... | 1 |
f60e95dd19bd3c50efeaecdca65afceb | 64009c787e9990d875a0482ac6a815d5 | 指定したグリフインデックスの配列の順序の合字が存在するかを返します。 | {
if (indices == null)
return false;
TileType source = TileType.Unknown, destination;
foreach (int index in indices)
{
destination = Tile.Get(index).type;
switch (destination)
{
ca... | 0 |
dfb4a582b170df082f6899bf305e75ab | 1d35b55ba2c539e75059454c5ebe10fb | Only adds a rule to the ruleset if no rule with the same name for the
same language was added before, so that the existent rule
configuration won't be overridden.
the new rule to add | class Grammar:
def _add_rule(self, name: str, parser: Parser, doc: str = "") -> None:
parser.set_name(names.Name.from_lower(name))
parser.set_grammar(self)
parser.is_root = True
with diagnostic_context(parser.location):
check_source_language(
name not in self.... | 1 |
89c826c0610bbc5254a227b124df7621 | 0b7e468eb115b457ce4deea1d23266aa | Seta a razao social. | public class Registro1500
public void setSER(String SER) {
this.SER = SER;
} | 0 |
76d872f930aadcde82571c403fc20b3b | d87903f86988c272ad0b9c4b4a78a684 | Returns the numeric result code from processing the file.
This can be used in conjunction with the flag constants to
determine full information about the processing result. | public function getResultCode(); | 1 |
86b5b61e167fb2e106bc941cd284da1f | 80b89499ac5792c629162b4a3466f27e | タスクキューのキューの変数名を出力 | class Queue
public function toString() {
$retStr = " ";
foreach ( $this->dataStore as $value ) {
$retStr .= $value->name . "\n";
}
return $retStr;
} | 0 |
bde2a458c18d06fa22f00f91270d79c8 | a70ea0f542f3be246187db21fcbcfc9a | Mengirimkan true jika l1 sama dengan l2 yaitu jika nEff l1 = l2 dan semua elemennya sama | namespace utils
bool areEqual(const NodeSPtr& l1, const NodeSPtr& l2)
{
auto n1 = l1;
auto n2 = l2;
while (n1 && n2)
{
if (n1->data != n2->data)
{
return false;
}
n1 = n1->next;
n2 = n2->next;
}
if (n1 || n2)
{
return false;
}
... | 1 |
f12c173cdaf7efed31153610c9f4434e | 2d44438dbcd43d3088184b5c2a5cfaf9 | Se encargar de invocar el registro y actualizacion de empresas | class EmpresasController extends Controller
public function guardar(Request $request)
{
if($request->ajax()){
if(can2('crear_empresa')){
DB::beginTransaction();
$empresa = Empresa::where('EMP_Nit_Empresa', $request->EMP_Nit_Empresa)
->orWhere('... | 1 |
3ab560f24785a83e25809b347b801c9d | 507257e9a21591acd1f15178cdbb278d | retorna se a página contém tag no follow | namespace Teste
class FormPOST
private bool Advance(ParseHTML parse, String tag, int count)
{
int ch;
while ((ch = parse.Read()) != -1)
{
if (ch == 0)
{
if (String.Compare(parse.Tag.Name, tag, true) == 0)
... | 0 |
fec46a381b0e7240d5ae6bae6377a532 | 8851cf07ad7afed55b8dfb9737f229a3 | 根据过车消息获取停车场信息 | export class AuditDetailComponent implements OnInit
private getParkVerify() {
this.auditDetailService.getParkVerify(this.params['name']).subscribe((data: any) => {
if ('2000' === data.code) {
this.park = data.data;
this.req.state = String(this.park.state);
this.req.remark = this.park.r... | 1 |
c42e3ff7b0cde240a8351e3e7ee6fd32 | bb9de5ed3d587f4187fc29f46f67192a | Clean up the FAB faulty permissions. | public class RobotDashboard extends Subsystem
public void manageFaults() {
ByteBuffer status = ByteBuffer.allocateDirect(4);
status.order(ByteOrder.LITTLE_ENDIAN);
PDPJNI.clearPDPStickyFaults(status.asIntBuffer());
status.rewind();
byte[] res = new byte[4];
status.get(res);
if (res[0] + res[1] + res[2] + ... | 0 |
c6a53e01e2df13d027910af8574ae39f | f613bb36feea44d633dd6f773394ca3a | 删除最后一个行李 | void lastPassenger(); | 0 |
3dd62d34e33a7dafd3f831d1f492a043 | abeb8714bf79bedf6439d612508d0b76 | 正在拍卖中的商品 | {
$map['status'] = 1;
$count = M('PaimaiGoods')->where($map)->count();
$pageSize = 20;
$pages = ceil($count / $pageSize);
for ($i = 1; $i <= $pages; $i++) {
$start = ($i - 1) * $pageSize;
$list = M('PaimaiGoods')->where($map)->fie... | 1 |
2217fc4b928d85a166dd59d9ffb9b621 | 248fee358f434eb5bd04dd4cf2b324dc | Returns index of first missing TN from any TN size | {
boolean[] check = new boolean[size];
for(int itr=0; itr<size; ++itr){
if(arr[itr]>=1 && arr[itr]<=size){
check[arr[itr]-1] = true;
}
}
for(int itr=0; itr<size; ++itr){
if(!check[itr]){
return itr+1;
}
... | 1 |
3b1e60f644205811e5f2a81f49538a78 | 499cb2c4ab780f8d1887a48fcbc1209f | # Haversine formula | haversineDist <- function(lon1, lat1, lon2, lat2, rad = 6371) {
lon1 <- lon1 * pi / 180
lon2 <- lon2 * pi / 180
lat1 <- lat1 * pi / 180
lat2 <- lat2 * pi / 180
t1 <- sin((lat2 - lat1)/2)^2
t2 <- cos(lat1) * cos(lat2)
t3 <- sin((lon2 - lon1)/2)^2
t <- t1 + t2 * t3
frac <- 2 * asin(sqrt(t))
dist <- frac *... | 1 |
066cb72d2601133a26d974ad879f3da0 | eaebe7966cf0ad25e38e7990357d119e | Check whether an enemy can be stomped by the player. | function stunTheEnemy(hb, npc){
if(!npc.aggro){
player.punchSFX.play();
npc.isStunned = true;
}
} | 0 |
77869ee07d2c6a463afcb0566f76ad79 | 56ecc731762b5170034896e32ab763a2 | Get most intensive peak. | class RandSFSP(SpectrumAnalyzer):
def get_peak(self):
self.auto_ref_lvl()
return self.peak_power() | 1 |
c1a00e0a0fcb407d5b1e000add4998eb | c55c4aa5b9ca5cb8d396a38546a67e4b | 转换orderStatus为中文描述 | function unixOrderStatus(status_code) {
switch (status_code) {
case 'NEW':
return '新订单'
case 'INTODB_ERROR':
return '入库失败'
case 'CONFIRM':
return '已确认'
case 'PAID_OFF':
return '已付款'
case 'SHIPPED':
return '已发货'
case 'ROG':
return '已收货'
case 'COMPLETE':
... | 1 |
87074547e10912e6dec564a354f4147f | b98ad4b0d0d0b4c89c190c5b82689155 | sends user input to watson and blocks the input node to prevent flooding | if (inputElement) {
inputElement.value = '...';
inputElement.setAttribute('readonly', true);
inputElement.classList.add('disabled');
}
chatbot.lexruntime.postText(params, function (err, data) {
if (err) {
callback.error('Error: ' + err.message + ' (see console for details)')
}
if (d... | 1 |
6a2a780b5ae83c7bcfb7f579f853dbad | bd649410ee4f86facc8b3813f028b0e1 | Method called when the File Path Input's state changed. | [Handler(typeof(FilePicker.IHandler))]
public class FilePicker : Control
void OnFilePathChanged(FilePicker widget, EventArgs e); | 1 |
f2336a2bf6a9f98e64a65e3607f83b26 | bbdb4a6dae6d7a21670b0e8f2d58c559 | Load templates from an in-memory tree, where a path
in fs format resolves to a node path. | DefaultMutableTreeNode root = new DefaultMutableTreeNode(ROOT_NAME);
DefaultMutableTreeNode currentNode = root;
for (String d : loadFile("paths.data")) {
for (String node : d.split("/")) {
currentNode = getOrAddChild(currentNode, node);
}
curre... | 1 |
8422a6bea755c44299462b9c8772ea45 | a35b8714437a0a392350172a1663d8e5 | Sets the count of invitations which are known and declined by their receivers (i.e. the invitation has been declined after opening the invitation e-mail). | public class EventDataManager
public Long getDeclinedKnownInvitationsCount() {
return declinedKnownInvitationsCount;
} | 0 |
afe2d98e3a6f9beda3642530516e3506 | 00195c1710dbb8bac27c527011660e1c | Gets the setting that controls whether or not the external IP should be fetched | export class ISOGenerationFormComponent implements OnInit
public get useDHCP(): boolean {
return this.form.controls.useDHCP.value;
} | 1 |
2cfb571e8ebbaa21c0310a7b91573fe6 | c786f4fcd025fd71ffd789a31fb51df9 | Handle the 'confirmaction' action. | {
$token = $this->params()->fromRoute('token');
if (!($token) || !($this->handler->isValidToken($token))
) {
$this->flashMessenger()
->addWarningMessage(
$this->__(
'This confirmation key is invalid or has expired.'
... | 1 |
a1a87bda08ded607a1c2d79ca6d2f86c | 282c3f35575b04cca6e4053b9c36e6df | Updates the mock device. | class TeslaMock:
def mock_update(self, *args, **kwargs):
return self.controller_update() | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.