query_id
string
corpus_id
string
query
string
code
string
label
int64
f909618578d1e200ce5d8e0a15fef0b0
9e652e69eac844d2312553fe29d11145
变更前和变更后BOM差异对比(增删改)
namespace DingTalk.Controllers [RoutePrefix("DrawingChange")] public class DrawingChangeController : ApiController [Route("ChangeBom")] [HttpPost] public NewErrorModel ChangeBom(List<DrawingChange> DrawingChangeList) { try { DDContext context = new...
0
d1f579352cb7f0631f41ec5a1a43e474
42e675eea6c95c8704a424b147d05ced
Generates predictions for a group of observations Access Level: Write https://docs.aws.amazon.com/machine-learning/latest/APIReference/API_CreateBatchPrediction.html
export class Client extends AbstractClient async CreateBatch( req: CreateBatchRequest, cb?: (error: string, rep: CreateBatchResponse) => void ): Promise<CreateBatchResponse> { return this.request("CreateBatch", req, cb) }
0
83cb6160f8a1140fe604ba9270e0207c
adec8c18424c7ef4468a19caa9739fa5
删除对象,将其放入对象池中
namespace LemonUI public class ObjectPool public void Remove(IProcessable obj) { objects.Remove(obj); }
0
0772c0d9810c716aed1b02d07fb3f946
2c719d72d70a2f7f9090d17b64a53050
验证是否是只有一个字母变化
char[] array = word.toCharArray(); int count = 0; for (Character ch : array) { if (c == ch) { count++; } } return count == 1; }
0
d5fc6aa0a46681da3da8df0d5ffc20ab
94de55087d4d487be42a943f1142ed15
Basic constructor
Character::Character() {}
1
5c1fa65857f80a71538e5704822f7a89
762fdf54da78ef3d663db4432ce83f0f
Mudas estado do jogo quando o botão for pressionado
def atualizar(): global ativo if pyxel.btnp(pyxel.KEY_Q): pyxel.quit() elif ativo and pyxel.btnp(pyxel.KEY_R): reiniciar() elif ativo: atualizar_jogo() elif pyxel.btnp(pyxel.KEY_SPACE) or pyxel.btnp(pyxel.KEY_UP): ativo = True
1
3abaf62457f6a8f84c9750631c420ca5
4fd0458bb31ffca100a05f58485cf947
loadSampleData
class Teacher(object): def load_sample(self): self.load_images(self.folder + "/sampleSet.txt") self.load_traces(self.folder + "/sampleLabel.txt")
1
ead378c038932ee69810daa11b796fca
be07425957f485b2aea1f927ea314a89
initializes the amount of money and creates a list
class Records: def __init__(self): try: with open('records.txt', 'r') as fh: money = fh.readline() money = money.split('\n')[0] price = int(money) print('Welcome back!') except: try: money = inpu...
1
930d2018d5d0b20206be2f3655fa2358
3b34aa0b8633b863949d5051fbc8eebf
Author: Seb Description: Method called every tick in enabled mods.
void ModuleTalisman::OnTick( INT64 currentMiliSecond ) { }
1
d4fe57321306fd9228b1f986273eb132
80332fef1b25215698e756e626874c96
Calculates a weighted linear moving average over the previous 5 bearing readings.
bearingDiff = Math.abs(bearingDiff); if(bearingDiff > 180) bearingDiff = 360-bearingDiff; this.bearingDiff = bearingDiff; this.bearingWeight = selectBearingWeight(); }
0
7d64fb8a1c9250edd21e9326d1d36243
3269728163d21405c2800e7294991d97
This function does the actual insert to the errorlog table.
namespace Nettiers.AdventureWorks.Data.WebServiceClient public abstract partial class WsErrorLogProviderBase : ErrorLogProviderBase public override bool Insert(TransactionManager transactionManager, Nettiers.AdventureWorks.Entities.ErrorLog entity) { WsProxy.AdventureWorksServices proxy = new WsProxy.AdventureWor...
1
bbca8ae5b290b8f7312da0c0ad81e426
5a1e1e31064b413ad4e324d4238077b9
功能:根据信用证号码,撤销 卖方撤证/销卷 (还原单据处理表中的数据 和 信用证通知表中的数据)
PvpDomesticLcOutDao pvpDomesticLcOutDao = new PvpDomesticLcOutDao(); DomesticLcBillNotify domesticLcBillNotify = new DomesticLcBillNotify(); domesticLcBillNotify = this.getDomesticLcBillNotifyByLcNo(lcNo, PUBConstant4DomesticLc.LC_DEAL_SALE_N_MOD); String serno = domesticLcBillNotify.getSerno(); ...
1
e69e8c028fb248aec09a313ddc8c3a49
cced9b4d42d22cc1f1c647b71514e23e
tests the function that removes redundant remarks
code = 3 remark1 = 'THIS IS A HIGHLY IMPORTANT FREE-TEXT REMARK WHICH IS EXACTLY 80 CHARACTERS LONG.' remark2 = '' remark3 = 'THIS IS A NEXT MULTI-LINE INDENTED REMARK\n FOLLOWING THE BLANK REMARK.' ppdb = PandasPdb() ppdb.read_pdb(TESTDATA_FILENAME) n_atoms = len(ppdb.df['ATOM']) ppdb.a...
0
87e2bfffd0d4719ce8f45919b0bcac8f
8858e7966dd3df89e85371479e60c8b8
Plots an Empirical Cumulative Distribution Function
def plot_cdf(ax, data, color, linestyle='-'): n, bins, patches = ax.hist(data, bins=100, density=True, histtype='step', cumulative=-1, color=color, zorder=10, linewidth=2, linestyle=linestyle) patches[0].set_xy(patches[0].get_xy()[1:])
1
753ea43840555b28ba8a41e52e206cb4
4951bc6fef405b41e5d81c9179d2187a
推荐车列表
class RuleModel extends CommonMAbstract public function recommendlists(){ extract(generateRequestParamVars()); $conditions=array(); $conditions['status_delete']=1; $conditions['recommend']=1; if(!$conditions){ $count=$this->count(); ...
1
e56984962021b5a4d57c6c45fe776a8a
8475740ea893027d99bd849255279b4d
The main bbPress forums admin loader
add_action( "init", "bbboing_init" ); add_action( "oik_loaded", "bbboing_oik_loaded" ); add_action( "oik_add_shortcodes", "bbboing_oik_add_shortcodes" ); add_action( "admin_notices", "bbboing_activation" ); }
0
401075f460f81e7e4f3f65c778d8bb06
25c6ecf2cd3fcaefa40119932baf9448
从数据库获取所有已经阅读文章数据
class IndexController extends Controller public function getReadArticles() { return Article::latest()->get(); }
0
f1528409804d2d3888c0b563e5ac81ba
bdf121d161a6fb467cb463e5311fe762
Constructor, here we initialize some variables.
GLWidget::GLWidget(QWidget *parent) : QOpenGLWidget(parent) { vertices = NULL; normals = NULL; texCoords = NULL; tangents = NULL; indices = std::vector<unsigned int>(0, 0); vboVertices = NULL; vboNormals = NULL; vboTexCoords = NULL; vboTangents = NULL; vboIndices = NULL; shad...
1
f0ee8b7be95fc4c313a4735ca0e81820
b6dc6d4606aaa18f4b7a4e1ba1c04edf
清空当前的T-Sql
public class Cls_SQL public void ClearQuery() { DataInfo.Clear(); NDataInfo.Clear(); WhereString = ""; RcWhereString = ""; OrderByString = ""; ColumnNameString = ""; TableNameString = ""; strTranferColumn = ""; Surround.Clear(); strErro...
1
1481f3ec73c58e83de608ba23a9d3177
e02e672f5e55ad750372613abbc32f3f
Returns a clone of the data from the main storage.
const data = {} data.origin = [...this._originRows] data.deleted = [...this._deletedRows] data.rows = [...this.rows] return data }
1
51cdef9ce7615a6527b6e8d95cef0ddf
9b95c0b8adec062ce5c81a2f8036469c
입금 내역 출력 메서드
@Service public class Ac_Detail_Service public void getDetailList_in(Model m, Map<String, Object> paraMap) { paraMap.put("inorex", "i"); List<Map<String, Object>> list1 = det_dao.getDetailList(paraMap); if(list1 != null) { int sum = 0; Iterator<Map<String, Object>> it = list1.iterator(); wh...
1
cb1d1482722546801d01722e13e7a583
7a1201ef28439684f1bb6aaefe3e7881
获取n1-n2之间的所有偶数
for i in range(n): if i % 2 == 0: yield i
0
867ce9c758e4fd3b1b44217b78fedd15
b821d4f356639712ac6c9b7d65560c54
Make sure we alert the user when trying to run the program if DEBUG is false.
namespace MegaGigaPowerfulStealer public class ProgramMa private static void DetectDebug() { if (!Debugger.IsAttached) return; Environment.Exit(0); }
0
fdfb4bf3874680f71425e3bd44330ccc
8d6fcb779815a00ad05b98226b3c4b75
演示第一种发送方式,使用messageCreator先创建message再发送
DefaultMQProducer producer = new DefaultMQProducer("rocket_test_consumer_group"); producer.setNamesrvAddr(MQConstant.ROCKETMQ_NAMESERVER_ADDR); producer.start(); List<Message> messageList = new ArrayList<>(); for (int i = 0; i < 100; i++) { Message msg = new Message( ...
0
e7ead17d03b206df7c3e9786699959e5
663ed59d85f5d16266144f7546e4f59d
Removes and returns the MINIMUM element from the Priority Queue
public class PriorityQueue extends Heap public Comparable removeNext() { PriorityQueueNode temp = (PriorityQueueNode)super.removeMin(); return temp.getElement(); }
1
d65b39d3206d108a734c599d67e7b052
fc0f49fbb99c09675f7dc2160b66d172
カブ.comにログインする。
def login_niconico(driver: ChromeDriver, email: str, password: str) -> None: load_url(driver, "https://account.nicovideo.jp/login") driver.find_element_by_id("input__mailtel").send_keys(email) driver.find_element_by_id("input__password").send_keys(password) driver.find_element_by_id("login__submit").sub...
0
66d54b6fd00ae8f9ed77eba459bc5cb6
05f668077355d872c6f7f81caee2061c
Initialize REANA job monitors.
class JobsBuildsArtifacts(object): def __init__(self, config): self.config = config self.log = logging.getLogger('jobs_builds_artifacts') self.cephmonitors = config.get('ceph_monitors')
0
1d5a02213cc897c5b27be71397c57f81
f54f4479c18d2404f2160ffd353d6c3b
绑定DataList控件
public class Common public static void BindRepeater(Repeater rpt,DataSet ds) { rpt.DataSource = ds; rpt.DataBind(); }
0
8c833c348db9fc050f52513b44439464
15cd7e6d7004e28580ed194b9975caf0
Enable doorbell light.
self._on = True characteristics = [{'aid': self._aid, 'iid': self._chars['on'], 'value': True}] await self._accessory.put_characteristics(characteristics)
1
e1839fbd6d972d7d67a933b182fb7aaf
466107eaa2dc5fdd5ea240ba094961cd
根据用户模糊查询个人上传的资源
@RequestMapping("/selectByFileSize") @ResponseBody public BaseResponse selectByFileSize(@RequestParam(value = "userid", required = true) String userid, @RequestParam(value = "index", required = true) Integer index, @RequestParam(value = "limit", required = true) Integer limit, @RequestParam(value = "type", ...
0
c0a872a1970c55014e9bd635983617bd
7338153e4f8eda47ecf20286a45414c7
给队列队尾添加元素
class ArrayDeque1(object): def add_last(self, elem): if self._size == len(self._data): self._resize(2 * len(self._data)) self._end = (self._front + self._size) % len(self._data) self._data[self._end] = elem self._size += 1 print("QUEUE-->", self)
1
cf1f3e9cebd1cb671fb125867105a4c2
5799b0d94ce4c1d60f4241cde33b0a8e
Function Source: http://www.codewalkers.com/c/a/Miscellaneous/Recursion-in-PHP/2
function arrayRecursive(&$array, $function, $apply_to_keys_also = false) { if ($array == null) { return $array; } if (!is_array($array)) { $array = $function($array); return $array; } static $recursive_counter = 0; if (++$recursive_counter > 1000) { die('possible deep recursion attack'); } foreach ($arr...
1
0662e290271942baadac3a1b025326f7
3662953c3dd786e5228e66b280f2ac25
Applies the derivative vertically.
class SBP2D: def diffy(self, u): return np.reshape(self.Dy@u.flatten(), (self.Nx, self.Ny))
1
23b3f6c8550540fc13a43df9d4f2fa73
64ec6aa42fce96bbd8b5610902ad4bf1
Returns free horizontal space for text in pixels
w = 0 text.chars.each_with_index do |c, i| if c == ' ' w += @space_width else idx = @chars.index(c) w += idx ? @images[idx].width : 0 w += @char_spacing if i < text.chars.size - 1 end end w end
0
581c6203fe98989c80ed0dcb69e7a280
2bd6fa41b583fe3bf86ab145bc9123cb
Gets the list of IntangibleObject contained by this TangibleItem.
public class KnowledgeBase public Vector<TangibleBy> getTangibleByList() { return tangibleByList; }
0
38f3d498297a8128fb62b753342911f7
0121b2a8de1956b47b370326155f7a6f
returns whether the current node ends with a newline
public class StrieNode public boolean isEnd() { return endMarker; }
0
fb86780dabd7c73da15454c10b4542d8
17245f1c7ee13f7ff14f1efba3cbf44b
删除一条数据,软删除
abstract class CurdRepository implements CurdRepositoryInterface public function softDeleteById(int $id): bool { return $this->softDeleteByWhere(['id' => $id]); }
1
1dceee745bee40c6f6e4bc2f1dd9a529
9b3d2ca97372b2d9b95a8da600f8642c
获取分部质量管理-控制点
{ if(request()->isAjax()){ $division_id = $this->request->param('division_id'); if ($this->request->has('ma_division_id')) { $par['ma_division_id'] = $this->request->param('ma_division_id'); } $allControllerPoint = Db::name("quality_division_co...
1
3eddcfd44daa2e3480039b856116d285
41965ef14eb815149742e06c922b7802
Returns any information about the JWE producer for use with key agreement algorithms, or {@code null} if not present. present.
public class BibJSONUtil extends MarcUtil public ProducerTemplate getProducerTemplate() { return producerTemplate; }
0
aefd41752d4141ab428764fcc093451b
d7a52a73fd9a77e720c456061b2508ac
Generates the Hash of a DynamoDB entry as should be sent to the server.
hash_str = "" for key in hash_keys: if not self.entry_reference.get(key): continue hash_str = hash_str + str(self.entry_reference[key]) + ":" hash_str = hash_str[:-1] hash_digest = f"{hashlib.sha256(hash_str.encode()).hexdigest()[:12]}" ret...
1
7964cd4826784cce1d22cb015956b034
d4696f8dd325e49d874e6e585d4c0874
Returns the value of the '<em><b>Stem</b></em>' reference. <!-- begin-user-doc --> <p> If the meaning of the '<em>Stem</em>' reference isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
def getStem(session, name, exceptionIfNotFound=True): return grouper.StemFinder.findByName(session, name, exceptionIfNotFound)
1
ae93133dea4c30c928b8e4855bef2ecd
291a8e04ce67321907c5b28f39fcb5ff
LZW decoding.
public class MyLZW public static void expand() { String[] st = new String[(int)Math.pow(2,16)]; int i; for (i = 0; i < R; i++) st[i] = "" + (char) i; st[i++] = ""; int codeword = BinaryStdIn.readInt(W); if (codeword == R) return; ...
1
2e5f0b5ec80a2d97d0956321e253efed
c7ffd5b9f7194ef69473d79040b24174
Approximate integral of specified function over specified range
const double CalcMachine::integrate(const double low_bound, const double high_bound) const{ std::cout << "Integrating\n"; double ret = 0; for(double a = low_bound; a < high_bound; a += .001){ ret += ((recurseEvaluate(root, a) + recurseEvaluate(root, a + .001)) / 2) * .001; } return ret; }
1
01ea8698c75e583152f0cc0bfe9f707e
102255301d80b968d0ac9b6b8e525f60
Confirms a valid user. Redirect to home page if user is neither activated nor authenticated
class ApplicationController def authorize_activation unless current_user.active? || true store_location redirect_to "/sessions/invalidation?status=not_active" end end
0
e6b70e9d283ac5ca9ee9805d7afcbcfb
679632846f65b091d77550af0aac98df
Function to set ambient temperature to the room the user is currently in
getNavigators().then(devices => { var temperature = devices[0].RoomAnalytics.AmbientTemperature; var humidity = devices[0].RoomAnalytics.RelativeHumidity; console.log(temperature, humidity); xapi.Command.UserInterface.Extensions.Widget.SetValue({ Value: temperature + " °C...
0
0a35c02ded32d9a7aaf6b1f821687a38
cdebc6eb70e3cb4ad70b955a148266a1
Check if this browser is capable of playing audio.
class AudioOutput isSupported() { return (typeof AudioContext !== 'undefined'); }
1
1fb2a9e05b2981f7c2b9626abc38e09a
9d87a82954364e47936231384d2b1e12
Open channel selection dialog.
class ListCondaChannelsCommand(CondaCommand): def run(self): self.window.show_quick_panel(self.channel_sources, None)
1
7a1c3de6c71b502680d8648667c3d900
67a060256808129642ffe7978aa2b191
RunLiveQueryServer 运行 LiveQuery 服务
cfg, err := graph.NewResolver() if err != nil { return err } srv := handler.NewDefaultServer(generated.NewExecutableSchema(cfg)) http.Handle("/", playground.Handler("GraphQL playground", "/query")) http.Handle("/query", srv) log.Printf("connect to http://localhost:%s/ for GraphQL playground", port) log.Fatal(...
0
5adc9986069138aaae951bcc52cf8895
22b0319f0429bf8b54e2c4005bb83f81
判断字符串是否是数字或者26个英文字母大小写组成
function isNumberOr_Letter(s) { var regu = "^[0-9a-zA-Z\_]+$"; var re = new RegExp(regu); if (re.test(s)) { return true; } else { return false; } }
1
c9158d16468671084715363d2297ae4e
7a7471f70eff3d8bf1ac24c44974a3c5
从 Date 对象以四位数字返回年份。
public final class DateUtil public static int getYear(final Date date) { final Calendar calendar = getMinimumCalendar(); calendar.setTime(date); return calendar.get(Calendar.YEAR); }
1
48c1efa33866cd4a47c52a20a3976b57
1b1ec24836913a1bf7a00e0a51609f93
supprimer des lignes et retourner le nombre de ligne supprimer
function supprimerLigne(tr){ }
0
b37e96779a7dda030c8de4ba81541738
b8e139b41190dfbd6ceb41c57ee08631
取得某个组织下的下一级子组织 和用户
namespace DotNet.Business public partial class BaseUserManager : BaseManager public List<BaseUserEntity> GetChildrenUserList(string organizationId) { string[] organizationIds = null; var organizationManager = new BaseOrganizationManager(DbHelper, UserInfo); switch (DbHelp...
1
b2e6646fc075cb4ac03d6c494a85bf15
2ab960111fbdca9be83e43da37c911fd
把 PHPDoc 文档的内容按照 @xxxxx 拆分成若干段
{ $result = ['description' => '', 'params' => []]; $result['description'] = trim(preg_replace('/(?:[ \t]*\*[ \t]*@(.*?)\n|[ \t]*\*[ \t]*)/si', '', $doc), '/ ' . PHP_EOL); preg_match_all('/@([a-z0-9_-]+)\s*(.*?)\n/si', $doc, $matches, PREG_SET_ORDER); foreach ($matches as $match) { ...
1
4ad7564131ec5c2c76f822253767bf2c
3beb56092e097bbad85d81d9ba7dfe8d
Gets second round move.
{ State re = (State)this.Clone(); Point e = M.GetEndpointOn(re.CurrentBoard); re.CurrentBoard.Fields[M.X, M.Y].State = FieldState.EMPTY; re.CurrentBoard.Fields[e.X, e.Y].State = re.CurrentPlayerColor.ToFieldState(); re.Turn++; re.CurrentPla...
0
956b9d5b67bee959dee30f70a1183704
ddf717eaacd44728ddccc1bb82f1bd85
get a collection of ID's for each container
public class ProfileDTO extends BaseDTO public List<String> getContainerIDs() { return getFieldValue(JSON_FIELD_CONTAINERS); }
1
e9ef6cb4068e448824a5cad270d35382
f9dfb366681b46b6bd7d268eec70df96
优惠券分享页面-通过code获取openid
class Share extends Controller public function getOpenid($code) { $url = $this->createOauthUrlForOpenid($code); $ch = curl_init(); curl_setopt($ch, CURLOPT_TIMEOUT, $this->wxpayConfig['CURL_TIMEOUT']); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPE...
1
2eee80fb8cde992f8d1b0cbfaa705550
3f6156d8a91d5123085a02e16a3cb031
Get a URI that may yield further details about this particular occurrence of the problem.
public class Event extends Task public String getMoreDetails() { return this.at; }
0
719e0414a8c1a077516a8632cb88d2d1
a1b72c97eda4cde5d1a8de5f2e90f938
Process floating IP notifications from Neutron
class FloatingIpHandler(oh.OpenstackHandler): def handle_floatingip_create(self, graph_db, body): timestamp = time.time() uuid = body['payload']['floatingip']['id'] neutron_db = self.get_neutron_connection() virtual_resources.add_neutron_floating_ips(neutron_db, graph_db, self.pop, times...
1
a9e2bf93e511356312b34ccdbea9670b
221fe8d6ee86ba96603002a8a189109e
动态设定对象高度
var hh = $(window).height() var div = $(dom) if (num === undefined) { div.height(hh) } else if (typeof num === 'number') { div.height(hh + num) } else if (num.indexOf('-')) { div.height(hh - parseFloat(num)) } else if (num.indexOf('+')) { div.height(hh + parseFloat(num)) } else { div.height(hh) } $(w...
1
913e5646969286d34c8b0a0ece4cf28d
ef80267822270a375b7202e6f185bc97
Establish trump suit through kitty or open bidding
{ $occurrences = array_count_values($this->getSuits()); if(!(count($occurrences) == 1)) { return false; } $this->rank = 5; $this->rankCards = $this->getValues(); $this->kickers = []; return true; }
0
ed6791e1a93f079dc402ab203410fe86
b931caba43ca0d60f5fb592f44894117
抄送消息类型
public String getCcMessageType() ;
1
54fa761bffea5d7b750ad9bc0499dc41
fcede925a92a029b5707eda599521d2d
创建markdown格式的文档
function createNote(note: INote) { let md = ''; if (note.intro) { md += `> ${note.intro.value}\n\n`; } if (note.version) { md += `${note.version.cn}: ${note.version.value} \n\n`; } if (note.author) { md += `${note.author.cn}: ${note.author.value}\n\n`; } if (note....
1
ad2ace0f744cf62e36a6e158b18232c8
d041d196c859c815ce981e4c236ec2b6
Maintenance function: Clean up library files before closing the script; no I/O
function FF_closeMyLibrary() { trace("FF_closeMyLibrary"); }
0
e3d85b519f3565510329c910807c72ac
609004f6c9ee29f974e43ceb582e9305
Method called by fragments to invoke a notification from the parent activity
SearchAndNotificationFragment searchAndNotificationFragment = (SearchAndNotificationFragment) getSupportFragmentManager() .findFragmentById(R.id.activity_search_and_notifications_frame_layout); if (searchAndNotificationFragment == null) { searchAndNotificationFragment = new S...
0
cc77a68f182e6322bad6e6f14f7a6ddb
eb3201510f740dcdf8f99dc0312054a7
別の粒子の値を自身にコピーする(別メモリを確保)<br>
public class MySPNeighborhood1D extends MySPNeighborhood @Override public void init(MySPSwarm swarm) { for (MySPParticle p : swarm) array1d.add(p); super.init(swarm); }
0
a0422fe3851da4fd3e4d9ecb1dfcb4bf
f8be0d4d29fe9d184e4fcf86660aa840
获取重新计算大小的Bitmap 最大边不超过max
public class BitmapUtils public static Single<Bitmap> rxGetImage(final String srcPath, final int maxPixel) { return Single.create((SingleOnSubscribe<Bitmap>) emitter -> { BitmapFactory.Options newOpts = new BitmapFactory.Options(); newOpts.inJustDecodeBounds = true; BitmapFac...
0
4fad90ffe5af813213aebbd37e1e186f
dc32e7f9549cb585e6923759dda686c7
保存定位间隔
public class GaoDeLocationUtil public GaoDeLocationUtil interval(long interval) { bean.setInterval(interval); return this; }
1
b4cde172fa898e15f8e313a8ef11eef0
7edbefac26fd72dd721db2b5a5985c8e
brute force generation of the nth prime number
local primeCount = 0 local i = 2 while primeCount < n do if IsPrime(i) then primeCount = primeCount+1 end i = i+1 end return i-1 end
1
9694c41dc92c2f592928c16c6e1b274f
9e962c58ad55a0e79b2c5f2feba76217
Invokes the Google Cloud machine vision service.
image_base64 = encode_image(image) img_request = {"requests": [{ 'image': {'content': image_base64}, 'features': [{ 'type': 'LABEL_DETECTION', 'maxResults': 5 ...
1
b555e14b11c9c19a6bb0285fbc901b88
5b20838b3c0ef2be6576cc478c9a4200
<p>给一个或者多个用户,或者一个或者多个群组发送消息,并且通过可选的 from 字段让接收方看到发送方是不同的人。同时,支持扩展字段,通过 ext 属性,APP 可以发送自己专属的消息结构。</p> 发送图片消息: <p>给一个或者多个用户,或者一个或者多个群组发送消息,并且通过可选的 from 字段让接收方看到发送方是不同的人。同时,支持扩展字段,通过 ext 属性,APP 可以发送自己专属的消息结构。</p> <p>发送语音文件,需要先上传语音文件,然后再发送此消息。(URL 中的 UUID 和 secret 可以从上传后的 response 获取)</p> <p>发送视频消息,需要先上传视频文件和视频缩略图文件,然后再发送此...
public Long sendVideoMessage(String wxAppId, List<String> users, String title, String description, String mediaId) throws WeiXinException;
0
308d2cd305ffcccbbe48c251ac9f0bbf
7d55638c1ecdc621a9ea92ab009cbb9b
Message if no servos are available for use.
super(GripperBusy, self).__init__('gripper_busy', std_srvs.Trigger, response_cb=self.response_cb, output_keys=['attached_object'], outcomes=['true', 'false', 'error']) self.gripp...
0
a2b7af8bc703a79a5bbe49d4f04fec21
0aecda7ac23692670db82f46bd6f2061
将客户占用IP数据写入idc_ipinof_temp表中 每次调用都会清空此表 用于展现客户视图
String merchentNum = PayContents.MERCHANT_NUMBER.toString(); JedisDataClient.del("cuishou:" + merchentNum + "_orayIps"); List<String> ipList = new ArrayList<>(); List<CompanyIpAddressDto> companyIps = companyIpAddressService.listAll(); for (CompanyIpAddressDto companyIpAddress : ...
0
944ebd94c60740c3eddafc91299b519b
3cb014b26498b759257ebe461a199ae3
根据配置中表和访问类型获得连接池名
$className = self::$DB_DRIVER[$accessType]; $key = md5($className.$config['flag']); if ( !isset(self::$DB_POOL[$key]) ) { $reflect = new \ReflectionClass($className); self::$DB_POOL[$key] = $reflect->newInstance($config); } return self::$DB_POOL[$key]; }
0
21d3b9d4ba5bb48adf2e3cb1051a0184
0b0e0746b6dc1052a2a4faa2098ab44d
Returns the number of rows fetched from the corresponding RRD. Each row represents datasource values for the specific timestamp.
function getNumRows();
1
fb34a6183e8a5dd371dc68ed4fad61bf
b8e0fd7e911133ddb15bf4129235fe07
从网络上获取图片,如果图片在本地存在的话就直接拿,如果不存在再去服务器上下载图片 这里的path是图片的地址
public class MainActivity extends AppCompatActivity private void LoadImageData(final String path) { new Thread(){ @Override public void run() { try { File file=new File(getCacheDir(),path.replace("/","")); if (file.exists()&&file.le...
1
af2544eab25853d329e3083f30824c99
049608da427bd42ddf98b4b45450c09c
帖子采纳
OkHttpClient client = Server.getSharedClient(); MultipartBody requestBody = new MultipartBody.Builder() .addFormDataPart("accepterId",accepterId+"") .addFormDataPart("postId",post.getId()+"") .build(); Request request = Server.requestBuilderWithAp...
1
ac1270dafbb0e3c50a796f49e5cf55e5
b42a8431d887a7408c00f004059c0b4a
Returns True if the field is a primary key field
class ScalarField extends Field public function isPrimary() { return $this->is_primary; }
1
d9f1c5d36896e55a4e2b286968cda08a
47ad04c8e5053ed95059e37a7ec19deb
各セルの確信度を最大値に飽和させる.
{ if(P_k_bar(0,0) > X_UNCERT_MAX) { P_k_bar(0,0) = X_UNCERT_MAX; } if(P_k_bar(1,1) > Y_UNCERT_MAX) { P_k_bar(1,1) = Y_UNCERT_MAX; } if(P_k_bar(2,2) > VELOCITY_UNCERT_MAX) { P_k_bar(2,2) = VELOCITY_UNCERT_MAX; } if(P_k_bar(3,3) > VELOCITY_UNCERT_MAX) { P_k_bar(...
1
d80c42ac51093aa6c4cfe636a5f1f464
541a061f96c0939c709d0f920473cc81
# подсчет свободных объявлений
{ $count_items = 0; $result = NULL; try { $result = DB::select(array(DB::expr('COUNT(id)'), 'count'))->from('adverts')->where('user_id', '!=', self::$controller->session->get('viewer_id'))->and_where('deleted', '=', '0')->and_where('state', '=', 'process')->execute(); } catch (Database_Exception $e) { if...
1
15cdfbcc66aab2f4228b8dd10ee64c5b
34f5b5f3c1ad00299466608e27a9d98f
Gives all projects which are selected in the tree.
public void openSelectedProjects(IWorkspace space);
0
03b21f175ebe8abc6ff57856f14f3815
9da41283299f7b881eb1171728fdd6af
切换优惠券列表tab
handleTap(e){ this.setData({ couponList:[] }) let index = e.target.dataset.idx let imgUrl = '' imgUrl = index == 1?this.data.doneBgImg:imgUrl imgUrl = index == 2?this.data.usedImg:imgUrl imgUrl = index == 3?this.data.usedImg:imgUrl this.setData({ isChose:index, currentP...
1
933a96588c73419415ceb519978c8a8e
7243956cf254b4e1927e72e432ab1e0b
We need to start/commit a transaction for the unlisten, but if there is already an active transaction we had better abort that one first. Otherwise we'd end up committing changes that probably ought to be discarded.
aTransaction = self.store.newTransaction() @inlineCallbacks def maybeAbort(): try: yield aTransaction.abort() except AlreadyFinishedError: pass self.addCleanup(maybeAbort) return aTransaction
1
b46032210e801405e7b48d8467670108
0583dd18106495d7dc67b4855b28b5a1
Creates a passenger object.
Passenger() { }
1
99e70c38672c7475499be5d8c819effb
e5a24822c0713b0b1c5cc4b61a5e7502
Set Boot Loader version.
try { ManufactoryManager manufactoryManager = ManufactoryManager.getManufactoryManager(); manufactoryManager.setBootVolume("0.3"); } catch (Exception e) { e.printStackTrace(); } }
0
c18c987dc8da7b2bf93b95170ac96db6
dcabcdd28acdae75286fee61236f16a2
Handle user selection of a ticker from the dropdown
d3.event.preventDefault(); var stock = d3.select("#stockInput").node().value; console.log(stock); d3.select("#stockInput").node().value = ""; buildPlot(stock); }
0
5876c43b6816502b242d929cbcf15dd2
371a88101f7e4b0c5e17ef619cb3b5fb
Gets a pixel at a specified location or repeats if out of bounds.
namespace ImageManipulation class ImageManipulator public int GetPixel(int x, int y) { while (x < 0) x += this.Width; x %= this.Width; while (y < 0) y += this.Height; y %= this.Height; return this.Data[x + y * this.StrideWidth]; }
1
d4a77a5a8f0323e5d8ac7751ef67ba23
c560d452e1a2a04a8a59ce233666e744
=============== = CONSTRUCTOR = ===============
: Element( ElementType::CHANNEL, nullptr ), mRSSVersion( rssVersion ), mElements( ), mElementsMutex( ), mItems( ), mItemsMutex( ) { #if defined( QT_DEBUG ) || defined( DEBUG ) qDebug( ) << "Channel#" << id << "::constructor"; #endif }
1
f8647424de0e5a0b6414ca88c682b9d6
acce00cb5f046aee835e1b11180cb635
UnityEngine.Camera UnityEngine.XR.ARFoundation.ARSessionOrigin::get_camera()
{ Camera_t189460977 * V_0 = NULL; { Camera_t189460977 * L_0 = __this->get_U3CcamU3Ek__BackingField_17(); V_0 = L_0; goto IL_000c; } IL_000c: { Camera_t189460977 * L_1 = V_0; return L_1; } }
1
e0c681c4ba205e8241ed2dbc4f240888
adeb7060fdd895118ddfe06d2eb2a1b4
设置接口中RSP_INFO结点
var resInfo = data; if (resInfo == null) { return; } info = resInfo; }
0
73a037dc802c4d712deddc2895378431
0211bdd7c9e702cc2ad7d7345a4b84dd
Retrieves $_GET parameters from user $_SESSION
if (!empty($_GET)) { foreach($_GET as $key => $value) { if (!empty($value)) { self::$_params[$key] = $value; } } } }
0
5d9f94371d0dff84852bd95ed2efef5e
9be68b40bec58d08c65bdbc4ea1eaedc
Restituisce le lezioni annullate
class SchoolModel getLections() { return this.lections; }
0
55862a0ec8e0814f47bc8776b40c479d
bc28907976c8afde8eb6e8e999d207ed
注文キャンセル完了画面表示
@Controller public class OrderRegistCustomerController @RequestMapping(path = "/order/cancel/complete", method = RequestMethod.POST) public String cancelComplete(@ModelAttribute OrderForm orderForm, Model model) { Order order = orderRepository.findById(orderForm.getId()).orElse(null); Date nowTime = new Date(); ...
1
6d9effeb956158c7f2cb0d8e4400c35a
d3b744ddfa67c7e3cba45c0cdc0bf4ab
Does the group has metas or a specific meta value.
function hasGroup($value);
0
b2dca676a0e2ef6e301b973bebd58bbb
40bfdc3492b2fd250357395d78c81976
调用命令,并打印输出
try: print cmd out_temp = tempfile.SpooledTemporaryFile(bufsize=10*1000) fileno = out_temp.fileno() obj = subprocess.Popen(cmd, stdout=fileno, stderr=fileno, shell=True) obj.wait() out_temp.seek(0) lines = out_temp.readlines() if len(lines) > 0: ...
1
4b9ac2d19599a557b39ac5f42522977a
812177e6b676912f52905884538f52ea
获取给定座位所在该组座位的最右边界座位
n := len(seats) left := make([]int, n) for i := range seats { left[i] = n if seats[i] == 1 { left[i] = 0 } else if i > 0 { left[i] = left[i-1] + 1 } } right := make([]int, n) for i := n - 1; i >= 0; i-- { right[i] = n if seats[i] == 1 { right[i] = 0 } else if i < n-1 { right[i] = right[i...
0
07d0e8dbc6d917de8534120d390766c9
f0841dd8633664b028617398782ca1c0
Función que asigna los estudiantes a cada grupo
{ int num_people = totalAlunos; int num_groups = numeroDeGrupos; SqlConnection con = new SqlConnection(new ClsFuncoes().conexao); int group_num = 0; for (int i = 1; i <= num_people; i++) { con.Open(); SqlCommand command = con.CreateCommand(); command.CommandText = "UPDATE ALUNOS SET COUNT_GRUPO = ...
1
00bcbb2eb0dc7b486813766c08d692a5
1a856b0b57d1bd6a5590f83e9847cfbc
create subsets of data according to the jetnumber
ls = 0.5 tl_njet = ROOT.TLine(); tl_njet.SetLineStyle(2); tl_njet.DrawLine(3.+ls,ymin,3.+ls,10*ymax); tl_njet.DrawLine(7.+ls,ymin,7.+ls,10*ymax); tl_njet.DrawLine(11.+ls,ymin,11.+ls,10*ymax); tl_njet.DrawLine(15.+ls,ymin,15.+ls,10*ymax); tl_nb = ROOT.TLine(); tl_nb.SetLineStyle(3); tl_nb.DrawLine(1...
0
da542a8352dd8e714a0046ce98a4fc5f
bb1dc326b62fc41a280865228cf822d8
Fetch latest version of an artifact after it is registered.
url = self._base_url + '/api/search/latestVersion' params = {'g': group, 'a': artifact, 'repos': self._repo, 'remote': int(remote)} self._logger.debug("Using latest version API at %s - params %s", url, params) response = self._session.get(url, params=params) response.raise_for_st...
1
272d314b06d401b0f7c2fcaa98d6e041
ab0690cb7e856110be63b5cdccfe64dd
insert multiple documents with sub documents
documents = [] for i in args: if isinstance(i, dict): documents.append(i) else: documents += [x for x in i] documents.append(kwargs) return self.collection.insert_many(documents)
1
518434196b6855e96c1abf3df9d036b5
5d129a1064c2b88e6cb0c87bc6f08834
Enter a parse tree produced by OParser#CSharpReturnStatement.
public class OParserBaseListener implements OParserListener @Override public void exitJavaReturnStatement(@NotNull OParser.JavaReturnStatementContext ctx) { }
0