query_id
string
corpus_id
string
query
string
code
string
label
int64
21efe2d856dcc48578ad7c617306c790
2613aa8aae2d87026de0487ac0591392
Fits multiple ellipses to laser scan using clustering algorithm and fit ellipse code Does check to see if all ellipses are valid according to meta parameters for circular objects
img = cv2.medianBlur(img, 11) contours, hierarchys = cv2.findContours(img.copy(), cv2.RETR_TREE, cv2.CHAIN_APPROX_NONE) logger.info('get contours len %s' % len(contours)) if len(contours) == 0: raise NoneContoursError("contours = 0") elif len(contours) == 1: ...
0
8222ef7f4fe2038e1643f98b5f7f543f
13e2f35927da95eaf88579c64383438a
Perfil aleatório
{ $portraitsPath = 'assets/img/portraits/'; $imgs = glob($portraitsPath."*.{gif,jpg,png}", GLOB_BRACE); return config('app.url'). '/'. $imgs[mt_rand(0, count($imgs)-1)]; }
1
a1931eabe22d3da3d09c375e9f20188b
ccc6c0ef94297b7d65a289c3cd361b62
Test a hoist transformation can be succesfully created.
def test_apply(): code = ( "program test\n" " integer :: i\n" " real :: a\n" " do i=1,1\n" " a = 1.0\n" " end do\n" "end program\n") reader = FortranReader() psyir = reader.psyir_from_source(code) loop = psyir.walk(Loop)[0] assignment = ...
1
2ecf01c8c4c77d985333943ea7a6875f
f0b98c229e25607b0f1ab00c0f46f4c5
返回用户的登录名,如果未登录则显示:未登录
@RestController @RequestMapping("/login") public class LoginController @RequestMapping("/name") public Result showName() { String username = SecurityContextHolder.getContext().getAuthentication().getName(); if(username.equals("anonymousUser")) { return new Result(false,"请登录"); }e...
1
a8800114405e8cb262dfb079c050fb14
35f57b2d448d6bc645a62086291a4313
The following function finds a segment of peak to peak, normalizes and fits it to the given function.
n_points = 3 ind = peak + 1 x = time[ind - n_points:ind] y = sig[ind - n_points:ind] a, b = fit_line(x, y) n_points = 3 ind2 = peak x = time[ind2:ind2 + n_points] y = sig[ind2:ind2 + n_points] c, d = fit_line(x, y) x_new, y_new = intersection(a, b, c, d) return x_new, y_n...
0
4c6cf71a199d78df48ba5f1c38c3c726
16f3df253eba95a7a05d0ee82e84e842
Updates & Saves preferred AWS region
credPath := makePath(vaultDir, CONF_DIR, CRED) credMap := ReadConfig(credPath) key := credMap["aws_access_key_id"] sec := credMap["aws_secret_access_key"] configPath := makePath(vaultDir, CONF_DIR, CONFIG) configMap := ReadConfig(configPath) region := configMap["region"] os.Setenv("AWS_DEFAULT_REGION", region) ...
0
d623bf82dd6050627778e615b770509c
65cb86acf2d6f28ccdce7af5c245bfad
Specifies the logger to use (defaults to SLF4J).
if (logImpl != null) { this.logImpl = logImpl; LogFactory.useCustomLogging(this.logImpl); } }
1
d6269cb70eda3d95804f2d32cdda41b5
89fc38721014565398b5349118d9eeb1
Custom validator for end point URLs. Because we send Bearer tokens we must ensure SSL.
class Client protected function validateEndpoint($endpoint) { if (!preg_match("/^https/", $endpoint)) { throw new NetworkException(sprintf('Invalid endpoint "%s" does not use the HTTPS protocol.', $endpoint), -1); } return $endpoint; }
1
92bbca8ea286d74d94039d9765b82b62
67d585c76384f7aa045b659101db9bdd
Used for formatting money to read as 1K, 2.5M, etc, to save space.
public class Utils : IDisposable public static string FormatNumber(int num) { if (num >= 1000000) return (num / 1000000d).ToString("0.###") + "M"; if (num >= 1000) return (num / 1000d).ToString("0.###") + "K"; return num.ToString("#,0"); }
1
f4f4c9623a4a430746075765d2605acc
819587de78aa5ca6409dce851b57a8cd
Returns the stock's fixed dividend.
if self.stockType == 'common': return (self.lastDividend / price) elif self.stockType == 'preferred': return (self.fixedDividend * self.parValue / price)
0
2ca32f359f3d5ce39ac6e04c254a60a0
958c21c22e56fb39b0f7e0a2cdb04cab
自定义语句和存储过程的增删改--返回影响的行数
{ using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required)) { int nReturn = this.ExecuteNonQuery(type,sql); scope.Complete(); return nReturn; } }
1
fde7c9f10bab3b6fcf58ce085d3ac286
746a58691fa0df034027c5f367fcb148
获取headView个数
public int getCount() { if (viewList != null) { return viewList.size(); } return 0; }
0
6d60f2ae9f662b98f25c0ff1b3673068
76579bd388aadbc6902f1a6596a72cae
Metoda serializująca informacje komunikacyjne do pliku
public class HumanPlayer extends Player implements Runnable{ public void update(Serializable object) { try { out.writeObject(object); } catch(Exception e){System.out.println("cos sie popsulo");} }
0
945139882acb427e918863a47ab7bab6
82501a408b543b3ba56a184546bbda34
interpret as unsigned 16-bit integer, in little-endian format
class FatXSignature(object): def read_u16(self): return struct.unpack(self._endian + 'H', self.read(2))[0]
1
d428c89a1a79bc1cb5718f3abcd9f4c6
793167766aa8f6d3b3d99d7f36450fd0
批量更新栏目静态页
$ids = \Phpcmf\Service::L('input')->get_post_ids(); !$ids && $this->_json(0, dr_lang('所选栏目不存在')); foreach ($ids as $id) { $row = \Phpcmf\Service::M('Category')->init($this->init)->get($id); !$row && $this->_json(0, dr_lang('栏目数据不存在')); $row['setting'] = dr_str...
1
99cd23fce8ee34cac172e8a8019fbda6
34b0b9397d043c3fbaa8accc8a42613e
Checks if this transaction id is the same as another one.
namespace System.Data.Entity.Infrastructure public class TransactionRow public override bool Equals(object obj) { TransactionRow transactionRow = obj as TransactionRow; if (transactionRow != null) return this.Id == transactionRow.Id; return false; }
1
cd30682a912aebfb52e4c99ef36ac442
d79a120a72e52c32cfe67f6a2678dd99
制作豆浆
public class Cooker extends HouseholdAppliancesTemplate implements Publisher{ public void cookSoup(){ System.out.println(OutputsUtil.getOutput(this,"cooker","cookSoup","cookSoup")); }
0
99f73722b2651a5f289751b87b128a5e
bf9883f60696d0e8c6f39a820d77dd6c
Creates a unique payment id and returns it then.
class onlinedengi extends account public static function getPaymentId() { global $DB; return $DB->val("SELECT nextval('do_payments_id_seq')"); }
1
db4eb4c32730d16cb56c1df6384c9ad1
52503610f119b219fa61577cf0367856
打印中文
fmt.Println(`世: \xe4\xb8\x96`, `界: \xe7\x95\x8c`) fmt.Println("\u4e16\u754c") fmt.Println("\U00004e16\U0000754c") greeting := "Hey 你好" for idx, char := range greeting { fmt.Printf("%d\t%q\t%d\n", idx, char, char) } fmt.Println("Actual length :", len(greeting)) fmt.Println("Length of rune ...
1
0988617be2831a7507a8c03c1162a3ee
3f58cca883f302d00fc2a25c824117e1
计算风险程度
var possibility = $("#evaluatePossibility option:selected").attr("title"); var exposure = $("#evaluatePersondegreeofexposure option:selected").attr("title"); var consequence = $("#evaluateLossfcconsequence option:selected").attr("title"); var riskValue = possibility*exposure*consequence; riskValue = riskValue.toFi...
1
e629b36c6e5b08ced03d5564de82ee31
0e9ab53ef2f6a9c8acf9a76a3ecfcf12
设置新的模型
abstract class Base extends \canis\base\Object public function setModel($value) { $this->_model = $value; if (is_object($value) && $this->_attributes) { $this->_model->attributes = $this->_attributes; } return true; }
1
ac283f186b5d40ef8bb829227ad35179
f28f383358ca08e3cf235491c6e07a50
Get the current name from the names combobox
QString AddNewDialog::getName() { return namesComboBox->currentText(); }
1
289a7427f2f577dafa0d1967f1c50c9f
b2cfc62dfc8015a28b4bdc2d4ac4743b
Выполняет действие с БД в транзакции.
abstract class Database public function transaction(Closure $action) { $this->beginTransaction(); try { $result = call_user_func_array($action, [ $this, ]); $this->commit(); return $result; } catch (Throwable $e) { $...
1
1d6dd7393b739da9ceef84d95bbb4fb8
cd17f1ab28c1cdf0f80dd1dfd6325719
Function that searches for a website name.
for page in range(number_of_pages): domains = self.search_results.domains() self.navigation_bar.navigate_to_page(page) for domain in domains: if domain_name in domain: return True return False
1
dc4277ca375a38c49dc5952d914ab80c
7aabdc195afb535e8e0aafd1e1f4daee
<summary> 是否繳過常年會費 <summary>
namespace SAHL.Common.BusinessModel.Repositories [FactoryType(typeof(ILifeRepository))] public class LifeRepository : AbstractRepositoryBase, ILifeRepository public bool IsRegentLoan(int accountKey) { bool regentLoan = false; string query = UIStatementRepository.GetStatement("Lif...
0
9ee6c16110f180724c55f83060c43f44
bb70d92be91f11eb1d24c862975d416f
清除本地储存所有内容
function clear() { try { egret.localStorage.clear(); } catch(e) { console.log("unsupport localStorage"); } }
1
99da3a441e5e22c81e99071261883611
bf84fc26cc0bd0e7e801a2f81f3e4e5d
Get the vector space model object
class FPflsyIndex(indexes.SearchIndex, indexes.Indexable): def get_model(self): return FPflsy
0
a65da9b74d89ad6d78157fc87086279c
d2ee697e8f120876599880a2240a6637
Проверка на отсутствие блокировки пользователя
namespace STCLINE.KP50.DataBase public class DbSaverNew : DbIntervalBase private void CheckUserBlockRecords() { Ret = Utils.InitReturns(); string sel = #if PG " Select * From t_saver_s " + " Where coalesce(user_block,0) <> " + EditData.local_user + ...
1
92d31693018d2f39e1177c96413b3037
f95dc6c81b486c705301222bb3baf2ed
Given an array that represents elements of arithmetic progression in order. One element is missing in the progression, find the missing number.
Arrays.sort(a); int missing = 1; int i = 0; while ((i < a.length) && (a[i] <= missing)) { if (a[i] == missing) { missing++; } i++; } return missing; }
1
6e95fbd1c0645bdb97d4e5ef45425e4c
ec32996d7588ce433c51aeb61db2cc96
Retrieve the access token from reddit request
def extract_access_token(response: Response) -> str: return response.json()['access_token']
1
0241ff79734cc8c77f076f1148834c88
3de05d16d0b6b104a94969834378159c
This function calculates the bearing stiffness matrix numerically.
for i in range(len(self.elements)): XStartminEnd = self.elements[i].nodes[1].coord[0]-self.elements[i].nodes[0].coord[0] YStartminEnd = self.elements[i].nodes[1].coord[1]-self.elements[i].nodes[0].coord[1] ZStartminEnd = self.elements[i].nodes[1].coord[2]-self.elements[i].nod...
1
72f89ce81793b22c6970892ec55c504b
7f8f5f212c145d72e9f1d3e41d8b01d1
Sets the proc processor.
public function set($key, ProcessorInterface $proc);
1
f8e9610b25043358b8f95162556199c7
1ee49ab327d0dc5123b072b10def9f80
改进了的五元组评估分数算法
this.steps++; this.fiveGroupScore = []; for (var i = 0; i < this.fiveGroup.length; i++) { var blackCount = 0; var whiteCount = 0; for (var index = 0; index < 5; index++) { if (this.chessList[this.fiveGroup[i][index]]) { if...
1
1bfc92c15a20d05ee9a89eb020a462a0
463801efc2544f79add6e7a93dfa5b48
Incr�mente le nombre de vaisseau des plan�tes neutres
if(this.type == PlanetType.NEUTRAL && !this.sick){ nbShip++; } else { if(Math.round(Math.random()) > 0.5) { nbShip += Math.round(Math.random() * 4); } } }
1
947adf10c39bc2f9e76c2d62023fadf6
ea8f652918a7cb086b61f86884a3b030
Returns true if the platform's underlying socket library is initialized (reference count greater than zero), else false
bool CTcpServer::IsInitialized() { return m_thread != NULL; }
0
6552519ee72e4dfe39c824136cbd4423
66226d39ed78bcfc95249492d09f9ac9
Returns the requested resource's path in URL format.
class ResourceController extends Controller protected function getResourceUrl(string $slug): string { return static::URL_PREFIX . $slug; }
1
5dd247ff64ddfb6c70eda8fde38492df
4fa53d8e8c1be3347b9fd8f9e3a96422
Return sum of all nodes at desired_level of tree
def sum_of_nodes(t):
0
7495d183dea7e99977c3e0573c244dc7
10302d93a43ff584f2253cad774c4d4a
确认修改分组名模态框关闭
namespace Assets.Scripts.Hall.View.NnFriendWindow public class NnFriendWindow : YxNguiWindow public void OnCancleChangeGroupName() { ChangeGroupNamePanel.SetActive(false); }
1
a86abc230ca79ca798e7284ff3546517
fd78fec7492cf089bea08ae9b7a9319a
Create a pdf file showing how the tree classifier looks like. Only call this with a tree.DecisionTreeClassifier!
class DecisionTreeClassifier: def to_ascii(self, better_feature_names=None, class_values=None, show_details=True, out_file=None): if better_feature_names: feature_names = [better_feature_names[f] for f in self.feature_names] else: feature_names = self.feature_names lines...
0
9a3c81dd0518ed07dd33ea619d1528e5
2a50a581b6afe8b3fa55e18159870b6f
Parse the description in the README file
class Job(Utility): def parse_description(self): self.init_logging() self.prepare_command_params()
0
5ed2a1354bb7b8711648a8bcdcc0932a
2a689aa04eda773a9eaa0b9061f70c58
Remove Wedding Image
$post_id = $args['post_id']; $image_id = $args['image_id']; delete_post_meta( $post_id, wp_slash( '_pwccindieweb-twimg-' . intval( $image_id ) ) ); }
1
978d763986396d43427d31673358384a
d1876ef69ad446579cfb58433dedf063
前台网友列表
if (IS_AJAX) { $p = I("get.p", 1); $condition['isdelete'] = 0; $condition['type'] = 1; $pagesize = $this->pageSize / 2; $condition['id'] = array('neq', $this->currUser['id']); $userlist = D("Common/user")->getUserList("last_login_time DESC ...
1
c855985a155ee5e0ad073056ba203f6c
25fc24b845a3b26aeb400954d38b2f3e
Changes button text when game mode changes
const char* aBuf; if (!GameMode) { switch (m_OldGameMode) { case 1: return aBuf = "Laser"; break; case 2: return aBuf = "Everything"; break; case 3: return aBuf = "Hammer"; break; case 4: return aBuf = "Grenade"; break; case 5: return aBuf = "Ninja"; break; default: return aBuf = "zCatch"; break; ret...
1
03630aee8ea8dd5d9754f2e028f016f6
f8f7077df919f37ce52f27b64c8322fc
プロパティファイルを更新(存在しなければ作成)します。
file = prop_file lock { if ( File.exist? file ) @props = YAML.load_file file end } end
0
2c16d7e617d0cc0592bdad9017284e43
5c81edab29b77abf242c3231d66bcb52
前缀表达式转为后缀表达式且显示处理
public class StackApplication static String MinddleTurnToBack(String curString) { LLStack<Character> stack = new LLStack<>(); String result = "" ; System.out.print("中缀表达式转换为后缀表达式:"); for(int i = 0; i < curString.length(); i++) { char t = curString.charAt(i); if(is...
0
c366b44d7d4ac17a22e3bbd1b6612093
a5a4a696169482acba9626b414bbd543
This midrange logic produces pseudo-phases. They are used to select encoding tables. The thresholds were chosen by hand after looking at plots of measured compression.
const int n_bits = 3 * n_syms; const int n_tones = (1 << n_bits); float s2[n_tones]; for (int j = 0; j < n_tones; ++j) { int j1 = j & 0x07; if (n_syms == 1) { s2[j] = (float)power[code_map[j1]]; continue; } int j2 = (j >> 3) & 0x07; if (n_s...
0
817a0bb65d3f1cbd1cd2d30a386f2f3c
8b81e3c9fa388f1c6dac8dc17ce6926d
广州各区
@ResponseBody public List<Product> liu_cityqu_bar() { List<Product> list = new ArrayList<Product>(); list.add(new Product("柳南区", 17)); list.add(new Product("鱼峰区",15)); list.add(new Product("柳北区",8)); list.add(new Product("柳江区",11)); list.add(new Product("城中区", 6)); ...
0
ad86156053c2da4807261ba50e3b196e
d74a1e5160e2bcd05ac691c4f1b858b5
保存会议嘉宾
guests_id_list = [] for _guest in guests: _id = _guest.get('id', 0) _img_id = None if not _guest.get('img_id', None) else _guest.get('img_id') _name = _guest.get('name', '') _job = _guest.get('job', '') _company = _guest.get('company', '') ...
1
dad0adb4bb5b7f919bbfa15a3bfecfa1
40f8cc84236449cd714ca488bd1b3abc
Maintenance write to target RapidIO device register
u32 size) { u32 data[3]; int rc; data[0] = size; data[1] = reg; data[2] = val; rc = iba_req(info, data, NULL, NULL, iba_w_pre, NULL); }
1
b68b29bd480dd27f384473d130641e1e
e6703fa835aeb14d4591e64922ca1ba3
allow alpha-numericals, punctation and minus (all others will be replaced by underlines)
name = name.lower() out = "" for letter in name: if letter in "abcdefghijklmnopqrstuvwxyz0123456789-_": out += letter elif letter in ". ": out += "-" return out
0
b769ad31006f5615fc2b9a8e7a072565
727cb6ce7e3c582e69c2f53760fe63bb
Set to a y-axis rotation matrix.
void Matrix3T<T>::setRotateY(T radians) { identity(); mat[0][0] = (T)cos(radians); mat[0][2] = (T)-sin(radians); mat[2][0] = (T)sin(radians); mat[2][2] = (T)cos(radians); }
1
a0474d96def71abdcba3ee134112b541
7c80029417a125253cad16accc32225f
implements a backtracking algorithm to complete a Sudoku grid
global sudokuboard for y in range(9): for x in range(9): if (sudokuboard[y][x] == 0): for n in range (1,10): if (possible(y,x,n)): sudokuboard[y][x] = n solve() sudokuboard[y][x] = 0 ...
1
80b207fee00aac63fd43c2dcbb7425f3
2ded02571b2b3af2d5b8064aaa34ddba
音量を最大にする
try { Vol = manager.getStreamMaxVolume(AudioManager.STREAM_MUSIC); Log.d("MediaError","最大音量を設定しました"); }catch (IllegalArgumentException e) { Log.d("MediaError","最大値取得"); e.printStackTrace(); } }
0
2a4260f00d7a7488af61c83c96f8f6ff
c97ce5a26e12eb8c528e825142c7ce6a
Shut down an existing server on a given port.
public final class NestedZookeeperServers public void closeServer(final int port) { TestingServer nestedServer = nestedServers.get(port); if (null == nestedServer) { return; } try { nestedServer.close(); nestedServers.remove(port); } catch (fin...
1
39dbe78e2ba3bfdc41c7b94c9f5d9ae9
38a7169730d9706a960719efac2e36d2
Flushes buffered logger to file, output consists of "groups" by keys
public class SyncLogger public void dumpAll(PrintWriter pw) { }
0
d2c989b69b1d66c688d501cee161e47b
c9e3a0dd09aa7e952287316b041b22b4
# Función para el Método de la Bisección
if(a<=b && b<=c && c<=d && xmin<=a && xmax>=d){ primero= (d-xmin)/(xmax-xmin-c+d) ultimo= (xmax-a)/(xmax-xmin+b-a) indice = 0.5*(primero +1-ultimo) return(indice) }else{ cat(paste("Error: los argumentos no son correctos")) } }
0
d9afac48fd9806491ceb776c946f71f7
6cd7e2ca7c856365ab372fe7249727a8
イベントハンドラーを設定します.
public final class TweetCellAction public final static class Builder public Builder action(ActionListener<TweetCellActionEvent> event) { this.event = event; return this; }
1
85908db0a04157926733ba4353e121ec
0a2ae6b3a6b8412a77d2d6eeb5a205c5
writes the encapsulated file data to the named file and applicable file attributes
{ _session.ValidateSessionHandle(); if (fullPath == null) throw ExceptionBuilder.ArgumentNull("fullPath"); if (fullPath.Length == 0) throw ExceptionBuilder.EmptyString("fullPath"); ImaqdxSessionManager.WriteAttributesToFile(_session...
1
6fe71a7e15b08af71c7b9f945bcc6c1b
536a18fa757ebe5831839a5389e877f0
See https://w3c.github.io/pointerevents/#process-pending-pointer-capture
export function useTrackedPointer() wasMoved(evt: PointerEvent) { if (typeof process !== 'undefined' && process.env.TEST_BYPASS_TRACKED_POINTER) { return true } let newPos = eventToPosition(evt) if (lastPos.value[0] === newPos[0] && lastPos.value[1] === newPos[1]) { return false ...
0
4ec3861aa933d41c74f48da27e49cf4d
d7a8301850c66e21cb6420d5760cde16
Shift the time series until its range fits the new time point
{ DateTime t1 = toSeries.MaxDateTime; DateTime t2 = fromSeries.MaxDateTime; if (t2 <= t1 || fromSeries.TimeInterval != toSeries.TimeInterval) { Logger.WriteLine("no data to append or invalid time intervals"); return; } ...
0
4d300a350907d92b0b5a7931ed3c7df7
310750da9e8f8ee87142e39268687ec8
На основе ссылки на видеролик возвращает Титл и Описание ролика
{ string name = string.Empty; var descriptionNode = filmHtml.DocumentNode.SelectSingleNode("//div[@id = 'headerFilm']//h1"); if (descriptionNode != null) { name = HttpUtility.HtmlDecode(descriptionNode.InnerText); } return !...
0
9f6d15aa6eabe9c9f6231d13462d0114
eed5817dd9af7f229cb17101dd2d8458
Creates a new addition expression.
namespace LinqToDB.CodeModel public sealed class CodeBuilder public CodeNew New(IType type, params ICodeExpression[] parameters) => new(type, parameters, Common.Array<CodeAssignmentStatement>.Empty);
0
c55b529f2e02aa2bad2a1d6340c602d6
091344bccdb88209944a489ead5ad229
Metoda odpowiedzialna za tłumaczenie nazw typów imprez
if (in != null) { switch (in) { case "int": return "Integer"; case "string": return "String"; case "float": return "Double"; case "double": return "Double"; default: return in; } } else { return in; }...
0
903addd0b072218469127a5e28de9f97
1797139d47b72991e8e0cbc73ae6d8ee
Restores the scene object to the state as it was when this object was created. If the scene object was deleted since it will be resurrected.
namespace Server void Restore();
1
6071ed5f0ee273d7b110a5a9325ce90b
daf208889d112b8289d1ba24c9a3a354
获取可以调用的私有方法
rtn_list = [] for m in dir(cls): if m.startswith('_get'): rtn_list.append(m) elif not m.startswith('_'): rtn_list.append(m) return rtn_list
0
6581e9fe0e48a9d3e4770bec6ca9dc04
b32d1fc4bd822a4e6b43456a3fad5dbb
Gets the Native Bit Size of the machine
cmd_string = "{} LONG_BIT".format(getconf) out = subprocess.Popen( cmd_string, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT ) stdout, _ = out.communicate() return int(stdout.decode("utf-8").strip())
1
c712148df1efbc9906635a7bfdf1add9
7b9bb765548dec4c1acda9a781a97f96
Sets the digital clock and date.
DateTime now = rtc.now(); hDD.setText(padStr(now.day())); hMM.setText(padStr(now.month())); hYY.setTextAsNumber(now.year()); hHH.setText(padStr(now.hour())); hmm.setText(padStr(now.minute())); }
1
17bae14de5ccd7c71292fd1fce952cc7
e2aae9ca4753647ba7e72c37baa76c55
evaluates opponent aggression over this hand
public float getAggression();
0
8baca8ba057589f9c13d2f088467efb8
e10a2c60ee872ed22d2486abfd0534bd
验证某一期,最大奖金是否超过限额
class OverlimitPrizeGroup extends BaseModel public static function checkPlusNum($agent_id,$prize_group,$plus_num=1000){ $oQuota = self::where('top_agent_id','=',$agent_id)->where('classic_prize_group','=',$prize_group)->first(); if(!$oQuota) return false; if($plus_num > ($oQuota->limit_num - $oQ...
1
b2bca456fe558f83680bc7e3009acce6
60cf1a930be298152ee10e755132942a
fonction qui permet de jouer la note desirée grace au clavier, quelque soit le focus
const audioElement = document.querySelector(`audio[data-key='${e.keyCode}']`); const keyElement = document.querySelector(`.key[data-key='${e.keyCode}']`); if (!audioElement) return; audioElement.currentTime = 0; audioElement.play(); keyElement.classList.add('key--playing'); }
1
ab2eaa708e776cd0fca2a357d0a966be
fdfc82d1f9176c3fb005b40a3bc2c970
Prochaine addition aléatoire
int Network::newInt(std::vector<int>& deja_tires) const { std::uniform_int_distribution<> dint(0,100-1); double index1(0.0); bool isNew(false); while(!isNew){ index1 = dint(gen); isNew = true; for(size_t i(0); i < deja_tires.size(); ++i){ if(deja_tires[i] == index1) isNew = false; } deja_tires.push_ba...
1
77adaebc92d679f203208b1de6095a01
30b84f5a793215ea7c7fdd60863feafe
Function Name: I2C_EzI2CSetAddress2 Sets the secondary I2C slave address. This address is the 7-bit right-justified slave address and does not include the R/W bit. This value may be any address between 0 and 127 (0x00 to 0x7F). None
{ #if(SCB_SECONDARY_ADDRESS_ENABLE) { SCB_addrBuf1 = (uint8) address; SCB_RX_MATCH_REG = SCB_EzI2CUpdateRxMatchReg(address, (uint32) SCB_addrBuf2); } #else { uint32 matchReg; matchReg = SCB_RX_MATCH_REG; matchReg &= (uint32) ~SCB_RX_MA...
1
5f9fd8c98a3ea64e5bdbb4a03a75dabb
7c161ba952b24d6a876b9e57905961eb
根据借款标的id查询 所有投该标的信息
List<BidRecord> getBidRecordListById(Integer borrowSignId);
1
cc615c0504a476fccbd067f1a596c62c
4498cfcb96bac4f2364063e554d614fb
swap state-vector contents by swapping pointer values.
static int pswitch(bb_t *bb) { int i, j, id, i2, j2, id2, n, nh; double tmp; n = bb->bins; nh = n/2; #define PSWAP(arr) \ for (id = 0; id < (n*nh); id++) { \ i = id / n; \ i2 = (i < nh) ? (i + nh) : (i - nh); \ j = id % n; \ j2 = (j < nh) ? (j + nh) : (j - nh); \ id2 = i2*n+j2; \ tmp =...
0
7df4e4c3e4abd80f56ac12d670bca9b0
989a234e1cd4acc76d13bffd46021fb9
Returns the value of the '<em><b>Equipe Adverse</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Equipe Adverse</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
if (equipes == null) { equipes = new ArrayList<Equipe>(); } return this.equipes; }
0
a9c27cbc1fd591fbe6eddbedeaa9f415
acf60021a9480ca47943feccdbcdea65
Sets specular red color component value. If defined, must be between 0 and 255 (both included).
IColor3 setR(int r);
1
d85f6b3c8072cd2074be4e6eeffcd8a4
055e8be6e283c0daed21b997cc9935d6
Low quality 1D noise.
PF_Err NoiseSub16( refconType refcon, A_long xL, A_long yL, PF_Pixel16 *px) { PF_Err err = PF_Err_NONE; NoiseInfo * infoP = reinterpret_cast<NoiseInfo*>(refcon); A_long n = infoP->noise; A_long n1 = n - 2 * n * FsRand() / FSRAND_MAX; A_long n2 = n - 2 * n * FsRand() / FSRAND_MAX; A_long n3 = n - 2 * n * F...
0
d1df031a3c62e32613e424bb4c321225
aa9740b7a8ed0331991a29e015b0d964
内部温度,双极性
class ChipSHOUTER(DisableNewAttr): def temperature_diode(self): return self.com_api.get_temperature_diode()
0
d7e955ae8f277d9edf628bb98f6e13c9
7ae5de13b073ddc85c8c5ddb036ed0da
Set the index of the sliced image.
class CarpetFigureCreator: def setSliceIndex(self,sl_index): self.sl_index = int(sl_index)
1
b694858f0f183d45555801923049ad11
ea98af3e2e93ea28711544103c998a77
若第一个顾客给的不是5,则直接返回false
function is5small(objarr) { var arr = objarr.concat(); var returnmsg = { status: false, cardKind: null, cardSort: [], kindvalue: null }; var sum = 0; for (var i = 0; i < arr.length; i++) { if (arr[i].cardNum > 5) { return returnmsg } else { sum = parseInt(sum)+parseInt(arr[i].cardNum); } } if...
0
3cc77992700ea69ea79d5affc695e991
f8013a2777225513f1aad8812442929d
자율주행-수동조작 전환
public class ControlActivity extends BaseFragmentActivity implements OnClickListener protected void changeToManual() { LogUtils.d(TAG, "-----changeToManual-----"); ConstantUtils.ENABLE_AUTOMATIC = false; int current_mode = SPUtils.getInt(this, ConstantUtils.SP_KEY_MANAUAL...
1
c4dc1b5a464eb361a38c7d1189d00508
f537eda71be89c3610e2e58b1a7d3fce
Affiche un tensor torch 3D (deux dimension d'espace et un de couleur) sous la forme d'une image.
def torch_im_show_3d(input, label, logits, name='img', should_sigmoid=True): depth = label.size()[2] for i in range(depth): if not should_sigmoid: torch_im_show(input[:, :, i, :, :], label[:, :, i, :, :], logits[:, i, :, :], name, should_sigmoid) else: torch_im_show(input...
0
17760cd36b5379f48f0969bc66424729
750a519cd3bbd334f2ccd613a19bfdd5
Check to see if MotionGraphicsImageActivateSettings property is set
namespace Amazon.MediaConvert.Model public partial class CmafGroupSettings internal bool IsSetImageBasedTrickPlaySettings() { return this._imageBasedTrickPlaySettings != null; }
0
9fe777a32e7ad747742151e9bb39258b
94116110d2f8f4a583e195548c701d73
取消销售单完成
@Service @Transactional public class AfterSalesService private boolean finish(AfterSales afterSales) { try { approve(afterSales, AfterSalesStatus.FINISH, null); return true; } catch (StewardBusinessException e) { return false; } }
0
813aca3c061eee6b8a45784882c792a2
ae02e4ddfa37ddfa1d70942e622ca9b2
Worker routine to avoid redundant code for configuration data queries.
static void *APR_THREAD_FUNC remote_config(apr_thread_t *thd, void *data) { thread_data *th_data = (thread_data*) data; px_config *conf = th_data->conf; bool startup = true; apr_pool_t *pool; apr_status_t rv; rv = apr_pool_create(&pool, conf->pool); if (rv != APR_SUCCESS) { ap_log_er...
1
a432795e85c19a52fa7120fa0740002c
fcf309e855e08c82acaea99ed9251c8d
True if has "part-supi" element
class MagicArmorPart extends \DrSlump\Protobuf\Message public function hasPart(){ return $this->_has(2); }
0
74d35a4450c46941ba076e4a6b164a43
c51a5dd211e068d094a511b83a8babf0
Überprüft einen String, ob es sich dabei um eine Internet-Adresse handelt und liefert diese dann zurück.
{ if (ereg("^https?://.+/$", $value)) { return true; } else { return false; } }
0
26c6df169ee1e40f3137901c67ee8fdb
178787e36f8a52269ab0918878005dce
Trims two datasets to the overlapping set of dates.
indx = np.intersect1d(data_1, data_2) tag_1 = np.in1d(data_1[:,0], indx) tag_2 = np.in1d(data_2[:,0], indx) data_1 = data_1[tag_1] data_2 = data_2[tag_2] return data_1, data_2
1
3a2d712d2c131bec2a1bdd91b496bedc
48d6cdcb2b3d231ebd174731819db926
Coloca a posição x e y no título do formulário
class TabInterface(object): def __set_x(self, value): self.widget.position = (value, self.widget.position[1])
0
40c8181f58bdc0d819adcf1482610e35
b1c9f94ea238cebc84454f01e7a75b4f
Emits a "continue loop" statement.
static void emit_final_continue(lily_emit_state *emit) { lily_function_val *f = emit->top_function; WRITE_2(o_jump, emit->current_block->loop_start) }
1
a73ce14f448763f96568592aea6d28e5
996d9423617073571b71ae6827ea49bd
Recursively obtains the number of moving parts for the current instruction by checking all game objects (and child objects) in the current instruction for the <c>InstructionPieceMovement</c> script
{ TreeInstruction parent = this; TreeInstruction child = null; do { if (child != null) parent = child; child = parent.GetChildInstructions().FirstOrDefault(); } while (child != null); return parent; }
0
a2dfef7d05f602e58646d0c2eecee90b
c114e3dca4cfc892c0714701183fa80f
获取某次交班收入
Map<String,Object> map = new HashMap<>(3); map.put("missionType",missionType); map.put("today",today); map.put("subType",subMissionType); return getSqlSession().selectOne("re_account_detail.getFinalPayMoney",map); }
1
28a9bba79d08ee526a459fa4292a0a26
e679347c6c01c5899d6141de6416bb00
Check if a tenant can be created.
ObjectResultDto<TenantCheckResultDto> checkTenant(TenantCheckRequestDto requestDto);
1
2d738aec575f95b4ddca0f2388186a82
a7c1edac75216cb577269759177a6456
Grab user's current selections when waking, if necessary.
chrome.storage.local.get('currentStation', function(cfg) { if ('number' === typeof cfg['currentStation']) { selectedStations = { 'currentBand': 'FM', 'bands': { 'FM': cfg['currentStation'] } }; } else if (cfg['currentStation']) { selected...
1
ce599269ba8a147686b7cea62c907ce9
1f0a04361abf8eeed1551d02cf7b45ad
防止一秒请求多次
timer = setInterval(function () { console.log($scope.model.waitingRemains); if ($scope.model.waitingRemains > 1) { $scope.model.waitingRemains = $scope.model.waitingRemains - 1; console.log($scope.model.waitingRemains); $scope.$digest(); } else { cle...
0
a104065cfd20e07f148269d1c57e843c
58f70c80c5c9b6e0132a0056f52286a7
Removes all MapPointAdapter objects.
public class GUI extends JFrame public void removeAllPoint() { mp.removeAllPoint(); }
1
2d0a8063824a924d1bd5abff8a0bb41a
64459f98c1afdf39c898ab5439408d10
设置关闭Modal后不执行任何操作
_onModalClose (res) { this.showModal.visible = false isFn(this.onModalCloseCallback) && this.onModalCloseCallback(res) }
0
0d0ba3035bd36f5878cd8457923e0077
03a8c27689edbb891ee66239ffcc04e3
Add the given principal to the ACL, with the given permission level
void setAccess(Long principalId, PermissionLevel permissionLevel);
1
88196525d5b5e158688324221bf48838
a73a0b06bd30aaed1960f0ef658d238a
Obtiene el id de un foro a partir de un tema
if ($forumTopicId > 0) { $dataProperty = new DataProperty(); $sql = "SELECT UserId FROM " . self::tableName . " WHERE ForumTopicId=:ForumTopicId"; $dataProperty->AddField("ForumTopicId", $forumTopicId); $dbOperator = DBOperator::getInstance(); $result ...
0
04e09b859e8d51bfa916336b84790913
55cbb4cd8d8e42898fd66dfeb19030cf
Show list of all group meetings.
class MeetingsController extends Controller public function index() { $this->authorize('meetings-index'); $meetings = $this->meetingRepository->allMeetingsOrderByDateDesc(); return view('meetings.index', compact('meetings')); }
1