query_id
string
corpus_id
string
query
string
code
string
label
int64
ab410c176353d70e5bff206e17ba1a00
65e10a2dc8267411915f0a73a95aa6e6
判断当前view对象是否被选择
public class GLRectView extends GLView public boolean isSelected() { return isSelected; }
1
16124b7da28509e5902bec6188e97b39
06c642810efc1fd5f9a208382b7e8547
奖励任务 tab切换
local this = self; if ( this:GetID() == 1 ) then _G["WebDKP_FiltersFrame"]:Show(); _G["WebDKP_AwardDKP_Frame"]:Hide(); _G["WebDKP_AwardItem_Frame"]:Hide(); _G["WebDKP_Standby_Frame"]:Hide(); elseif ( this:GetID() == 2 ) then _G["WebDKP_FiltersFrame"]:Hide(); _G["WebDKP_AwardDKP_Frame"]:Show(); _G["WebD...
1
696c0fe7548bfacb9484a0ad0282c33d
14ee77b687645d1c4e57babe6078347e
Load all of the clans.
class Clans(commands.Cog): async def resetClans(self, ctx): clans = {} data_handler.dump(clans, "clans") await ctx.send("Clans reset.")
0
b6ead2e4e57d0b69370f18b772bb2f5c
f48c15159f26b7519c3a233fa4f6aae5
expression : IDENTIFIER DOT IDENTIFIER
if len(p) == 2: p[0] = p[1] elif len(p) == 4: p[0] = DotExpr(p[1], p[3]) elif len(p) == 5: if p[2] == '.': p[0] = CallExpr(DotExpr(p[1], p[3]), [p[1]] + p[4]) else: p[0] = BracketExpr(p[1], p[3])
1
d9e69ed646b96680bfa77603a80b4429
3005177450c2180d5fe01c4b69a79608
Code common to both loading screen types.
{ if ((CurrentScreenState == ScreenState.Active) && ScreenManager.GetScreens().Length == 1) { otherScreensAreGone = true; } if (loadingIsSlow) { SpriteBatch spriteBatch = ScreenManager.SpriteBatch; Sprite...
1
23af9284b06b14cbb22e87c3be27d3e7
250af17844ed65bbd3f6dd0ef5e43b6a
导出excel表
$xlsTitle = iconv('utf-8', 'gb2312', $expTitle); $fileName = $_SESSION['account'].date($expTitle.'Y-m-d'); $cellNum = count($expCellName); $dataNum = count($expTableData); vendor("PHPExcel"); $objPHPExcel = new \PHPExcel(); $cellName = array('A','B','C','D','E','...
1
e67aabe092a12bedc67127b0f32900a8
fe5e447d2857b5d4388cdba63c534f12
Return True if obj is iterable with a well-defined len()
if hasattr(obj,"__iter__"): return True try: len(obj) except: return False return True
1
9d6daca8130f8071e2d6ad2599d1c2b2
5b5864d84464b9628c304c5445a0ed78
获取溢出伤害
local baseMiss = self._heroBaseData.miss local missBuffAdd = self._buffMgr:getCachedAffectValue(enums.BuffAffectType.AddMiss) return baseMiss + missBuffAdd + self._attrAdd.MISS end
0
9dff2a8be51eb672f518c7def4fe67b4
c29e450bb50ed6efde311dac93365522
Executes individual action on approval of the workflow status and returns the result
class tx_ptgsashop_workflowStatus public function returnApprovalActionMethodResult($orderObj) { $return = true; if ($this->approveActionMethod == 1) { $return = $this->returnExternalMethodCallResult($this->configClassName, self::METHOD_NAME_APPROVE_ACTION, $orderObj); } retu...
1
155b8bf5ffaefa8e310e5c08d940ca77
5416a852172e67bd3a59a9812465cf86
works fine - outputs True if any character is lowercase. Checks all characters.
def hasLower(inputStr): return any(char.islower() for char in inputStr)
1
45ff75633b2d3fe47574327e1dfb9fda
1bba3446117fd2414afd495e859be75b
# Modify the length vector to account for double/flam notes
if(vec == "FB"){ vec = "RB" } if(vec == 'block.bubble'){ vec = 'bubble.block' } if(vec %in% c('CB', 'DB', 'FS', 'SS')){ vec = 'DB' } if(vec %in% c('DE', 'DT', 'NT')){ vec = 'DL' } if(vec %in% c('ILB', 'LB', 'MLB', 'OLB')){ vec = 'LB' } return(vec) }
0
30621a806626e134833dcd554954ad33
98caee417779c3dc746e78d2448f45e4
Constructs an instance with optionally prefilled datasource
{ $this->db = $db ? : AbstractDatabaseAdapter::getInstance(); $this->pk = $pk ? : $alias . '.' . $pk; $this->tables = new DataSet; if ($alias && $table) { $this->addTable($alias, $table); } $this->prepare(); $this->initialise(); }
1
314a2861a24f873e3dd91e89281a3ba9
6378b1c65afe506f0447db592fc8ba89
Creates and returns a dictionary mapping names to custom objects.
path = "Playlists" os.makedirs(path, exist_ok=True) customPlaylists = {} playlistFiles = os.listdir(path) for playlistFile in playlistFiles: with open(os.path.join(path, playlistFile), encoding="utf-8") as f: playlist = json.load(f) ...
1
6376a3869bfcbb7f9f7ded1138c30f73
cda642ad29dbee99d97c711c4db09b63
Unique character check in O(n) time and O(n) space.
bool isUniqueChars(char* str) { int checker = 0; while(*str != '\0') { int val = *str - 'a'; if((checker & (1 << val))) return false; checker |= 1 << val; str++; } return true; }
0
ffc9504321db36c43e38a4d6adbbe8ed
fc08bf2e9c1be7963941c4c1a4c489f2
Удаление элемента из списка по заданому номеру
void DelItem(List* list,int n) { if(0<n&&n<=10) { if(IsListEmpty(list)) { list->last -=1; n =n-1; switch(list->datatype) { case 1:for(int i =n;i<list->last;i++) { list->Data[i].i = list->Data[i+1].i; } break; case 2: for(int i =n;i<list->last;i++) { list-...
1
2d74bb7d76401047ce0ca1be9d4ab786
8d7a7e6e13a8e1f4c1a33853269fdbe2
Respond to the user changing the student in the dropdown.
{ ListViewItem item = sender as ListViewItem; CurrentStudent.ID = item.Tag.ToString(); }
0
4d0925b71c931c5829789a53e0da4136
8346df3f0ceabb373c66408993c828e8
根据分组id查询所有已分组商品的id
List<GroupProductCommunity>getProductAllCommunityId(Long productId);
0
6e71945450ffe897c7d1743ee25981f3
02c5bed5958f577fd289ff8cc6dae854
Create a SMTP API token. Create a SMTP API token.
class Client extends \Jane\OpenApiRuntime\Client\Psr7HttplugClient public function postTokens(\Stripe\Api\Model\V1TokensPostBody $payload, string $fetch = self::FETCH_OBJECT) { return $this->executePsr7Endpoint(new \Stripe\Api\Endpoint\PostTokens($payload), $fetch); }
0
1db902eda0f0cb03ce74b2c481fc0800
766740dd2a2f93a75de06e7da273b115
Returns True if the current user is part of the leaders groups, False otherwise.
class BullyLeaderElection: def is_leader(self):
0
b18364ec2d71feb5a32836cff165d950
664d8ca780aa127caaa1c2aa120ecadc
Permet de définir si le jeu se situe dans un phase d'action
public class Player public void setGaming(boolean mode) { gaming = mode; }
1
d0e6b4fa7805246b9dd9a61181e0a928
4a8d6308d5a2898e15dc9f376b8a2578
根据微信openID和订单ID查询一个订单.
class OrderForm extends CFormModel{ public function getOrder($openId,$orderNum){ return Order::model()->find('order_num=:order_num and wx_open_id=:wx_open_id', array(':order_num'=>$orderNum,':wx_open_id'=>$openId)); }
1
c2ca13df4703f9d124a1538c67d0ad35
2d054be854aecead9a7440bf71835705
Given a period in days, convert to seconds.
def days_to_seconds(days_from_now: int) -> int: return days_from_now * 24 * 60 * 60
1
0f68736ef0e81c475e638ec7ba9602cd
9357d6f39401caaba0b1ba330ec5400f
@brief Send absolute volume information to remote device. This is a blocking API. Non-Zero Value - Failure
{ uint_16 wIndex; AUDIO_CONTROL_INTERFACE_STRUCT_PTR if_ptr; USB_STATUS status=USBERR_ERROR; if_ptr = (AUDIO_CONTROL_INTERFACE_STRUCT_PTR)com_ptr->CLASS_PTR->class_intf_handle; wIndex=(uint_16)(((if_ptr->fu_desc->bUnitID)<<8)|(if_ptr->AUDIO_G.IFNUM)); status=check_valid_fu(if_ptr->fu_des...
1
a77ce50c42ffb541c54eb79bd0c5c139
3e8d4ed9d95dabdca5169d176ddfc336
建立檔案並寫入文字內容
namespace DemoRealChart class txtrw public void Write() { FileStream fs = new FileStream("E:\\ak.txt", FileMode.Create); byte[] data = System.Text.Encoding.Default.GetBytes("Hello World!"); fs.Write(data, 0, data.Length); fs.Flush(); fs.Close(); ...
1
8990644f3291f94c1265a72e0b03a7ed
2124c12da238342896d802d3221f6649
%加入其他节点,用于更新%
class KNearestNodesUtil(object): def __update_node(self, other_node): if self.node_id == other_node.node_id: return with self.lock: for i in range(len(self.list)): node, _ = self.list[i] if other_node == node: break ...
1
abcd8676c8290d8f563dceb8f7b9c5ce
b5827818670b68a2fb91031937d4ffd4
Adds a booking for the given guest in the given room on the given date. If the room is not available, throw a suitable Exception.
class BookingRepository extends ServiceEntityRepository public function book($userId, $roomId, $bookDate, $days): int { $conn = $this->getEntityManager()->getConnection(); $sql = 'SELECT `r`.`id` `id`, `o`.`status` `os`, `o`.`in_date` `check_date`, `o`.`days` `bookDays`, `b`....
1
f198d2fb34aca92284822640cf155ec0
ec2e1849969a5a6d4d4745727c61f062
Timer que ejecuta el proceso de Envío de facturas a SIE.
namespace MSeniorSII public partial class formFacturasEmitidasNifOtro : Form private void formMain_Load(object sender, EventArgs e) { EnviarLoteFacturasEmitidas(); }
0
538b59e5aeacf53ba43ce2b52bcc626a
a6c65ca4932139d510111029deb0301f
Given the wmata api key, returns the headers need for wmata REST request
class Problem: def get_headers(self) -> Dict: api_key = os.environ['ICFP2021_API_KEY'] return {"Authorization": "Bearer " + api_key}
0
8d7f74b564988c3953266d7eb2e2bdb4
456f70301e0138226575040af48e8e62
Text plugin should be publicly invisible after moving below inline comment
class DrupalImageCaption extends PluginBase implements CKEditorPluginInterface, CKEditorPluginContextualInterface, CKEditorPluginCssInterface, ContainerFactoryPluginInterface public function isInternal() { return FALSE; }
0
41880fcb2a8eb844c8fe83d7d98913a0
505483df87816c73cbb3a3f4a3ae4c01
道路的最大负载量,即车位的总数,长乘以宽
impl LightGrid fn max_size(&self) -> i32 { self.width * self.height }
1
36c442aa20e84486d891a2f066cd6047
de0698e05de2bb7552d27d531070bdb7
Reads a <em>text file</em> and generates the <em>store assortment based</em> on the data in it
String filePath; boolean isValidPath; BufferedReader myFile = null; do { filePath = JOptionPane.showInputDialog("Enter a valid file path."); isValidPath = true; try { myFile = new BufferedReader(new FileReader(filePath)); } catch (FileNotFoundException fnfe) { isValidPath = false; } } w...
1
9a4e2dca382bd1726b5fa86a3095fa99
00bcfad2c14c793bcc8379e58f17b8eb
Returns whether the application config is in a cached state or not
class Application extends Container implements ApplicationContract, HttpKernelInterface public function configurationIsCached() { return file_exists($this->getCachedConfigPath()); }
1
57b72b625ee5dd25fd1c622f267cb0c5
fcc93011210ac5437b2549dfa14fc2b6
The name of the alias. attribute: :attribute:: true
@NotNull @Attribute("alias") GenericAttributeValue<String> getAlias();
1
a8f84d940f9a1e83fbe7d8972fd18e88
3f81b8aa5a3eb9403b37dfd208c90e56
resets the tensorflow graph to enable training another autoencoder
def reset_graph(): if("sess" in globals() and sess): sess.close() tf.reset_default_graph()
1
932daf96219c0b1f6cc8b9c770bc7360
5d973083625c41819bab8b5e9f6f8154
u"Called during shutdown to give the shutdown action an opportunity to cancel the shutdown process.
void CSisInstaller::NotifyShuttingDown() { Cancel(); }
1
ef43f8d39be059c38a03ff3e4cfefc88
354966932854a2bfe8a5aa923b02695a
Used to have the player move based on the camera direction
public class playerController : MonoBehaviour void Movement() { float x = Input.GetAxisRaw("Horizontal"); float z = Input.GetAxisRaw("Vertical"); Vector3 direction = new Vector3(x, 0, z).normalized; float cameraDirection = cam.transform.localEulerAngles.y; direction = Quater...
1
ab830afc01de3beaf958efe167cbdb14
663ed122d88bbeff39bf5f7b381ee41d
老师添加课程的视图函数
def add_course(): form = AddCourseForm() if form.validate_on_submit(): avatar = form.course_avatar.data image_name = image_store(avatar.read()) courses = Course.query.filter( Course.course_adr == form.course_adr.data).all() for course in courses: if course...
1
27b8c0cd1a9deaeb0903585e66878eae
52df4862b4ca14df6ef92442603fd14b
returns paginated stories in json format
@users = User.all if params[:filter] params[:filter].delete(:user_id) if params[:filter][:user_id] == "" params[:filter].delete(:state) if params[:filter][:state] == "" @stories = Story.filter(params[:filter]) else @stories = Story.all end respond_to do |format| ...
0
e35862916f5336fcf1b5394015bc3fc5
da48a639b9b536bada8b3b327bc992a2
Copies new users from Firebase to Postgres.
export class MigrationTwo extends BaseMigration async migrate() { var frodo = new FbUser(null, "Frodo", "Baggins", "images/frodo.png"); var gandalf = new FbUser(null, "Gandalf", "The Grey", "images/gandalf.jpg"); var aragorn = new FbUser(null, "Aragorn", "Son of Arathorn", "images/aragorn.png");...
0
bb1f5a38fca67086397e07ce92880a98
dc6065de1f4369c815a578c05383c5dd
Called for each run in a line after {@link #commitRunInfo}.
public class RunsListener implements IRunEventListener, IRunListenerControler @Override public void runJudged(IRun arg0, boolean arg1) { updateRun(arg0); }
1
274bd041c2a5a8abe287b1206be2b097
977660ac62dd5c1b903cd730b71aee51
Set the minimum Pathload Communication message version acceptable. The Messages below this level will be silently dropped.
if(msgPort < 1025) throw new IllegalArgumentException(); this.messagePort = msgPort; }
0
ca5cd953d0e5fc65db8c9011b5a34ad9
170f9efc7c51d62cfd1c11ffa676f7f5
绑定客户单位联系人
String link1, String link2, String linkrelation1, String linkrelation2, String linkmobile1, String linkmobile2, String idNo1, String idNo2, String unitName1, String unitName2, String unitPhone1, String unitPhone2){ User users = (User) request.getSession().getAttribute...
1
85da2af64b781f1d0b441a7d7042c062
bdd164e76e9878fa87da679fbdef240c
Joins 'related' attachments - used to decorate HTML body but invisible to the recipient in his agent's Attachments list.
function display_attachments($pop, $attachmentParts) { global $conf; echo '<div class="mailData">'; foreach ($attachmentParts as $attachmentPart) { $partStructure = $attachmentPart->getPartStructure(); if ($partStructure->getInternetMediaType()->isPlainText() && $conf->display_text_attach) ...
0
9af7352943244f94949291ecf1ea355f
1295d51f04532cc9126510f73f46216b
Returns or sets the render mesh minimum edge length parameter of the active document. For more information on render meshes, see the Document Properties: Mesh topic in the Rhino help file.
class Canvas(ElementSelection): def edgelength(self: S, edgelength: float) -> S: return self.attrs(edgelength=edgelength)
1
6566d11c4c3aa139e1f89c612f4922a1
8016b72b3846a8be8406e2aa3ef3f677
initalise le generateur aleatoire.
void init_rand () { int seed = time(NULL); init_genrand(seed); }
1
b2420007dbd0b9e8c203a6462f502cd8
badd3deaf7a20cbac6bcfacce8b7c664
千分格式化
function thousandNumber(arg = 0, decimalsNum = 2) { arg = arg ? arg : 0; let str = (+`${toFixed(arg, decimalsNum)}`).toFixed(decimalsNum); const DIGIT_PATTERN = /(^|\s)\d+(?=\.?\d*($|\s))/g; const MILLI_PATTERN = /(?=(?!\b)(\d{3})+$)/g; str = str.replace(DIGIT_PATTERN, m => m.replace(MILLI_PATTERN, ',')); r...
1
2ae4c22acb0de3f2098c92abcaa52b5b
dbd12adc7c237c9dff767ddc23119d67
是否开启单个执行单元的超时功能(有时是一个group设置个超时,而不具备关心单个job的超时) <p>注意,如果开启了单个执行单元的超时检测,将使线程池数量多出一倍</p>
boolean hasExecutionTimeout();
1
489390ea0664056705d1b4b918f89734
c9db448d41eb703b4803577c3435480f
社員コードリストから個人IDリストを取得する。<br> 社員の履歴が存在しない場合は、MosP処理情報にエラーメッセージを設定する。<br>
String getEmployeeCodes(String personalIds, Date targetDate) throws MospException;
0
d480e6056764a8e941d86b362b4fd963
4bbcbd4dea27df8dba86e18a781a7092
删除当前页面的新消息提示,在每次进入页面的时候调用
{ $.post("ajax/message/getNewMessage.do",{},function(data) { var newMessageNum = data.length; if(0 != newMessageNum) { $(".messageNum").html("("+newMessageNum+")"); newMessageRemind.show(); } }); }
0
51c31579feb0e81a6172ecb05421555d
8b1850c94f88e657c7988c54f4e69e3b
Returns the namespace URI that is mapped to the specified prefix in this library or null if the prefix is not mapped to a namespace.
if (pPrefix == null) { throw new IllegalArgumentException("Namespace prefix must not be null"); } if (cachedURI != null) { if (cachedPrefix.equals(pPrefix)) { return cachedURI; } if (prefixList != null) { for (int i = prefixList.size(); i > 0;...
1
882405a19963cc69d639e8c5a78ca9f8
abe8ed48fb0d905af1262a7e54e44355
GET-MEMORY-PROFILE-OF-ITEM-LISP-SIDE
Object get_memory_profile_of_item_lisp_side(frame) Object frame; { Object profile_object; x_note_fn_call(165,67); clear_items_encountered_in_memory_walk(Items_encountered_in_memory_walk); profile_object = make_transient_item(Qmemory_profile); walk_for_memory_recursion(frame,profile_object); ...
1
12af83391b966eedc3978bc4ec6285af
e695c052c658aad5f9e5e422b2a308c7
Show the end of game text object
end_message = games.Message(value="Game over", size=90, color=color.red, x=games.screen.width/2, y=games.screen.height/2, lifetime=4...
1
54e1d3e4eefdbf59ea3fcf84e2384f71
80232b0506e92c4d09885757e6f68db7
Description: Activate multiple executors (processes, threads, etc) to run target task(s).
def main(): targets = ( p_sumo_proxy, p_www, p_controller, ) procs = [multiprocessing.Process(target=target) for target in targets] map(operator.methodcaller('start'), procs) while True: for i, proc in enumerate(procs): if not pro...
1
4057771ada9e74f28ed5e76bd76afea8
9f3ada060de144d29ec5478200f3d548
Método que devuelve el listado de operaciones permitidas asociadas al usuario.
public List getOpcionesConsultaHiperConsultaByUsuario(final String codigoUsuario);
1
9b7310c5d217fe0e88006f923e3479e7
774a23c0a8d1fdef2226385d39c49a6d
Method for hard difficulty AI piece choosing
function computerMoveHard(){ var nextMove, cellId; if ((moveCounter < 2)&&(cells[4] == 0)){ nextMove = freeCells.indexOf(4); } else if (moveCounter < 3) { do { nextMove = Math.floor(Math.random()*5)*2; } while(cells[nextMove] != 0); nextMove = free...
1
96b4eb902e1fdb53865394a28aea9cf7
3eb86f013ed45e415a2e923dfbd820f3
Ensure retrieving the feature flag returns false as expected.
def test_feature_unknown(unleash_client): responses.add(responses.POST, URL + REGISTER_URL, json={}, status=202) responses.add(responses.GET, URL + FEATURES_URL, json=json.loads(MOCK_JSON), status=200) responses.add(responses.POST, URL + METRICS_URL, json={}, status=202) unleash_client.initialize_client...
1
096c6cefc5a5aa0401c1259e30aa5e63
ff46cda2f48dfe49418e684a78289d09
找出异常用户的原因
class CompanyInfo(CreditInfo): def abnormal_execute(self, **kwargs): key_list = ['xuhao', 'reason', 'date_occurred', 'reason_out', 'date_out', 'authority'] c_type = { '个体工商户': 'indBusExcepUrl', '农民专业合作社': 'argBusExcepUrl', '农民专业合作社分支机构': 'argBr...
1
0801dbf1ca50967946628fdc95de1be9
8575a75bbe0078e3fd483efdc90dae85
ワークフロー情報マップから勤怠申請情報リストを取得する。<br> 対象機能コードが指定されている場合は、対象機能コードのワークフローのみを抽出する。<br>
List<WorkflowDtoInterface> findForCondition(String personalId, Date fromDate, Date toDate, Set<String> functionCodeSet, Set<String> workflowStateSet) throws MospException;
1
d5a6e72ef7b88a2cf02f5bb4ada82b02
efe5ab078696be5a1704e3de10b96da9
Set some tags for this quiz slot. This function uses tag ids to find tags.
if(t == NULL) q->tags = NULL; else { char * tags = malloc(sizeof(char) * (strlen(t)+4)); strcpy(tags, t); q->tags = tags; } }
0
881111e9f5e533d768009c00893f3709
a4ada255f594266f920bab1a26519eda
sum surrounding squares
public class LifeGame : MonoBehaviour private int SumAround(int w, int h) { int sum = 0; int up = (h + 1) * RefWidth; int ce = h * RefWidth; int bo = (h - 1) * RefWidth; sum += BoolToInt(RefCells[up + (w - 1)]); sum += BoolToInt(RefCells[up + w]); sum += BoolT...
1
030e5b8f5a6aab0d603f1a9582f616a4
1b6ce33a18fa8ef9139fd2e7c54c4094
通过上级ID和当前组织机构的名称,查询分院信息
public class AccreditControlDAOImpl extends SqlMapClientDaoSupport implements IAccreditControlDAO{ @Override public AccreditOrgInfo selectAccreditOrgByOrgNames(String nowDate, String OrgNames) { AccreditOrgInfo aoi=new AccreditOrgInfo(); String orgId=(String)getSqlMapClientTemplate().queryForObject("cums.accred...
0
7dc62b75e171803debaab9af8dfd6bd0
6d344cb440ec4cd03f3678238909cb65
@brief findAnagrams: finds all rearrangements of of the letters of a given phrase using words in a provided dictionary.
time_t timeBegin = time(0); Dictionary dict; if (!dict.load()) return -1; dict.findEmordnilaps(); Sample sample(dict); if (!sample.spellcheck()) return -1; sample.findAnagrams(); cout << "\nTotal run time (secs): " << difftime(time(0), timeBegin) << endl; return 0; }
1
61c5bf9d2a12a52d23a2882360895714
4aae8e8e86714228bc30235dadddcb07
Matter density parameter at a given redshift.
class Cosmology(metaclass=ABCMeta): def rho_de_z(self, z): pass
0
fba1af3ed82c66cccdb25a62e47f69f1
99339c0d1a70c8faac539c2944084742
Returns start and end year for given year range string
def checkXMLyears(hfstart_year, hfstop_year, rstart_year, rstop_year): start_year = rstart_year stop_year = rstop_year return (start_year, stop_year)
0
10050ed9f65db577d11d3fc93296a15a
5a3a67cabf84ff249ad690182d53f55f
Calls a series of functions in an attempt to detemine the transaction type. If a true value is returned then the transaction type has been set and the function without performing further tests.
class GatewayProxy implements \JambageCom\Transactor\Domain\GatewayInterface public function transactionValidate ($level = 1) { $result = $this->getGatewayObj()->transactionValidate($level); return $result; }
0
23fa1977bf6892ff73a9f9cab3cda1fa
69e9423eacb967a7c491592eda9edeb0
POST /medics
@medicine = Medicine.new(medicine_params) if @medicine.save render json: @medicine, status: :created, location: @medicine else render json: @medicine.errors, status: :unprocessable_entity end end
0
51b35a8ee34798a132c54cb6059a8d49
936092419fb9217d63a1550d70a0072a
Get a 16 bit word, Intel byte order
static signed short php_ifd_get16s(void *value, int motorola_intel) { return (signed short)php_ifd_get16u(value, motorola_intel); }
0
92fd06c002d935f35f51916bd815982c
5d37957dd1c9f968fa8f037212400340
Expecting failure when region is invalid
class FirstRegionForTagTestCase(TestCase): def test_with_invalid_owner(self): self.assertEqual(first_region_for(None), None)
0
845a64ba6d81cff69ca0a43dd20cf199
77022455b81552b0a252fcad67c5e2f4
Переводим коды символов в сами символы
$cyr_chars = array ( '\u0430' => 'а', '\u0410' => 'А', '\u0431' => 'б', '\u0411' => 'Б', '\u0432' => 'в', '\u0412' => 'В', '\u0433' => 'г', '\u0413' => 'Г', '\u0434' => 'д', '\u0414' => 'Д', '\u0435' => 'е', '\u0415' => 'Е', '\u0451' => 'ё', '\u0401' => 'Ё', '\u0436' => 'ж', ...
1
b067f450ca3ad332e017e72d1b7705d7
1071fda6e1f0df9176fba12057e80072
清除当前localstorage里缓存
class LocalStorage clearAll(){ wx.clearStorageSync(); }
1
2a47bb35c0e798b42858919d81ef64ce
c1a57716789bea6024816c2d36d1e877
Load the HandRanks.DAT file and map it into the HR array
{ ranges = new List<Range>(); string path = Environment.CurrentDirectory + "\\" + "ranges-caucasus.csv"; using (StreamReader reader = new StreamReader(path)) { string range, cp, abbrev, joker, bingo, freq, backup, fp, amp; range = c...
0
259385a6f64b80065b34ca86be83dd59
1b07499996a0d5927e1999d4ceb9ed1e
Check to see if ControlSetId property is set
namespace Amazon.AuditManager.Model public partial class Notification internal bool IsSetControlSetId() { return this._controlSetId != null; }
1
9126610ae3d953bb9ebc0969053e253a
16ee5d6f21a8d9012d9cc71f0f78e602
Returns a function that pushes TRUE to the bool stack if the second item on the stack is greater than the first item.
class Functions: def _gt(self, stack): a, b = stack.pop2() stack.push(b > a)
1
46335c6ff09d729a435796188ad31d34
4db8d36cca12f29d8269964049e8c1a6
Не разбан
class DeleteExpiredBanWorkerTest extends AbstractApplicationEnvironmentTestCase public function testDontUnbanBan() { $ModerationBanForTest = new ModerationBanForTest(); $ModerationBanForTest->clean(); $User = UserFactory::createUserById(self::TEST_USER_ID); $User->loadProfile(); ...
1
ae0395e015ab19d9767fd1e08c0f7f75
8a3f609d8142d839ff3b636cbf2a928f
! \brief enable DAC concurrent software trigger \retval none
void Timer_DAC_DisableTrigger(void) { #if (!Timer_DAC_UDB_CONTROL_REG_REMOVED ) Timer_DAC_CONTROL &= ((uint8)(~Timer_DAC_CTRL_TRIG_EN)); #endif }
0
c181fe5da13f844f161f39084376b882
4a12064a4e2426ba2ab64659613d299e
放行一筆外資轉貸分行收息還款/到期資料
public String approveTfRemit(String serno,HashMap param) throws ComponentException;
1
e7f32535896409ae4e32da02bc1da175
6887262e86b924847efdd1b66bee1d7f
================= Draw Slime =================
for i in range(len(robot.slime_x)): robot.window.drawPoint(robot.slime_x[i], robot.slime_y[i], 'red') if worldname == 'bigEmptyWorld' and sys.exc_info() == (None, None, None): code = checkoff.generate_code(globals()) if isinstance(code, bytes): code = code.decode() pr...
1
819d42027a534f7ec2bdcddb0ae39cfe
39b6091c6c00c668176ba5556530597f
Show Postcode Lookup Page.
{ $rowsPerPage = Config::get( 'constants.PaginationRowsPerPage' ); $RegionPostCodesArr = DB::table( $this->DBTables['Shipping'].' as S' ) ->join( $this->DBTables['Regions'].' as R', 'S.region_id', '=', 'R.id' ) ->where('R.id','=',$id) ->select( 'S.*','R.stateid','...
1
e1a5d1aac4325244bc0c3c583ba9fd34
34d26e560e8deaf55334b15d2a9fdafb
Clears the "last range" cache
this.rangeXLo_ = 0; this.rangeXHi_ = 0; this.rangeSetX_ = false; this.rangeYLo_ = 0; this.rangeYHi_ = 0; this.rangeSetY_ = false; }
1
82dfc2d9bd7f9777751ba88516718844
9171648e8f1c59282ed3fbcb77e75424
Sets the small image ID of this file attachment.
public void setLargeImageId(long largeImageId);
0
10a68ed7e380c857e04f01d336c365ff
7281c2add2e425c1d3e6935067eedb3c
The maximum HP (including buffs/de-buffs).
public class CharacterStatistics public long getHpMaxUnmodified() { return hpMaxUnmodified; }
0
28df951d58032de23669bf6814320e4d
7569be5314ee6e4e5140cac444405223
Retrieve default group id of given attribute set
class ProductAttribute extends EavAttribute private function getDefaultGroupId($attributeSet = null) : int { $attributeSetId = $this->resolveAttributeSetId($attributeSet); $attributeSet = $this->attributeSetRepository->get($attributeSetId); return (int) $attributeSet->getDefaultGroupId(); ...
1
f67c2f753ec0c3621c920941430b24b0
b0d65ddc00f29bb470a416d5081fab97
! @brief Stop OPP service. to send message TCU_OPP_SVR_SHUTDOWN_REQ to stack to stop opp service After send shutdown command, the oppProfileHandler will receive an TCU_OPP_SVR_SHUTDOWN_RESP message.
void reqOppAbort(void) { stack_msg msg; createStackMsg(TSB_OPP, TCU_OPP_SVR_PUSH_ABORT_REQ, &msg); sendStackMessage(&msg); }
0
289b1dddd7ebf33e3c2298f07e703f0f
cf7b7c317724fbf691d7b3bf8e2bbfb5
Returns nearest neighbour indices: up/down/left/right.
class SSNN: def __bf_neighbours(self, X, Y): dists = cdist(X, Y) indeces = np.argmin(dists, axis=1) return indeces
0
dfca504ef1a78c715c90984b3f6eb531
1bb21cc2de89e9c67fcd3685499a90ef
点击音量图标,弹出调节音量的控件
public class StandardVideoPlayer extends VideoPlayer @Override protected void showVolumeDialog(float deltaY, int volumePercent) { if (mVolumeDialog == null) { View localView = LayoutInflater.from(getActivityContext()).inflate(getVolumeLayoutId(), null); if (localView.findViewById(ge...
1
21cda343cc84865d0ad4e80f0a4e238c
a8108e7afd9c6ea87be3f3b3f2c79c48
Move this Warrior and update it across all clients.
if (parseInt(player.playerId) === parseInt(this.selfId)) { const clientAheadBy = player.moveIdx - data.moveIdx; while (player.pendingMoves.length > clientAheadBy) { player.pendingMoves.shift(); } this.updatePosWithRemainingMoves(data, player); } else { player.updatePos(data...
1
3d11fc52becc5857a24685a8e7a72d50
193c4c7b096933dc947b7f881d4fc9fc
after以後のデータを取得します(afterは含まない)。
class EloquentLog extends Model public function getModelAfterAttribute() { return $this->details['after'] ?? null; }
0
8ac134426ed57fab9429e6a8e51a6d29
5e34f6a92a7beb702b76c07c81d0fa6e
洗练背包装备
let cacheBagBestEquips = []; let smeltEquips: EquipThing[] = []; let bagEquips: EquipThing[] = <EquipThing[]>this.getGoodsListByType(GOODS_TYPE.MASTER_EQUIP); if (!bagEquips) return smeltEquips; let notRonglianEquip = {}; let compareEquip: EquipThing; ...
1
a41c72355571cf4ba6776b5e3b5115a3
7ef3189acb4ebbcdddf40dd0249b18f4
Элементы инфоблока данного раздела
{ $HL_BLOCK_OBJ = $this->getObjHlblock(); $SELECT = [ "ID", "UF_NAME", "UF_CODE", "UF_SECTION", "UF_POST", "UF_CONTENT", "UF_BASE_POST", "UF_FILE", "UF_DATE_CREATE", "UF_STATUS", ...
1
bcac9189010201d02c8eb7b09340b006
055da76308644dec5fa665b7d745508e
Calculates the variation of information.
num_class = len(data) num_cluster = len(data[0]) class_counts = get_all_class_counts(data) cluster_counts = get_all_cluster_counts(data) N = get_all_counts(class_counts) Hc = 0.0 for j in range(0, num_class): c = class_counts[j] Hc -= (c / N) * log(c / N, 2) Hw = 0.0 ...
1
de468be2c2d9a52f32492e1d8eaa7f68
77cb2fc10097f396d3c245119e59840d
Converts the forum smiley codes to discord emojis
class Search public static function createSmileys($content) { $content = str_replace(":)", '<i class="fa fa-smile-o" aria-hidden="true"></i>', $content); $content = str_replace(":|", '<i class="fa fa-meh-o" aria-hidden="true"></i>', $content); $content = str_replace(":(", '<i class="fa fa-fr...
0
8dba5338840d8fe5e8c6e441a4877e2e
6eee542b52d57e578ed718d1f13d998f
Assign a record to a department
class ApiCall extends HttpRequest public function assignRecord($profileId, $userId, $pageId, $recordId) { $url = "https://" . $this->resolver->server . ".iformbuilder.com/exzact/api/v60/profiles/" . $profileId . "/users/" . $userId . "/record_assignments"; $params = ['page_...
0
ed9d1266fbca97af6d5cf92f57025bec
16480c31ecd11532753343e96c1d0c50
Авторизует пользователя с гостевыми правами
Msf.Client.Auth.LogInAsGuest((info, error) => { if (info == null) Logs.Error(error); }); }
1
ea209617d0061f64add133f4e93e01a9
d4e1a58b55a90fdacd1cef50d48c22a6
Set sid of the user's session. The sid should be a 32-char md5 hash of a random number.
abstract class CuxSession extends CuxBaseObject implements \SessionHandlerInterface, \SessionIdInterface public function create_sid(): string { if ($this->debug){ $this->log('create_sid'); } return md5(openssl_random_pseudo_bytes(32)); }
1
18d2a8718a0a0d94aa0bb8ddf905bf71
35f87496f6e1918e1eae84245bb6b393
Private slot to handle a change of the shell history style.
history = self.__shell.getHistory(None) index = self.__shell.getHistoryIndex() self.historyList.clear() self.historyList.addItems(history) if index < 0 or index >= len(history): self.historyList.setCurrentRow( self.historyList.count() - 1, QItemSelecti...
0
9e0b249c0468b3f3608798fdec954e67
6b22b85a87fc5f0847a49f20760cf5f4
Cette fonction verifie si il y a 4 pions alignés, ce qui ferait gagner un des deux joueurs et terminerai la partie.
{ int total = 0; for(int col = colonneJouee; col < MAX_COLUMN && grid[col][ligneJouee] == (int)p && total < 4; col++) total++; if(colonneJouee != 0 && total < 4) for(int col = colonneJouee - 1; col >= 0 && grid[col][ligneJouee] == (int)p && total < 4; col--) total++; if(total >= 4) return true; total = 0;...
1
47356ce6fb4b151314bde54079999b02
510f2df2d0c5321501569f61246921d0
判断是否为空,包括空对象,空数组,空字符串,null,undefined
isEmpty(str) { return Object.prototype.toString.call(str) === "[object Null]" || Object.prototype.toString.call(str) === "[object Undefined]" || str === ""; }
0
14de52a24471e01fc0b0359e201dc364
d7afc8e5a1fd93523a6c5ccd13aff4c8
输出Workflow所要求的JSON格式内容
{ string sql = ""; string json = "{\"Aths\":"; if (FK_Node == 0) sql = "SELECT fadb.*,wn.Name NodeName FROM Sys_FrmAttachmentDB fadb INNER JOIN WF_Node wn ON wn.NodeID = fadb.NodeID WHERE fadb.FK_FrmAttachment IN (SELECT MyPK FROM Sys_FrmAttachment WHERE " + ...
1
763161654481ad97fcb03ca32262b015
99f1ab28fc913ee4e65b8a29c9aacb2d
将十进制字符串转换成十六进制字符串输出,如果已有一位,前面加0
public class StringUtil public static final String decTohexString(String dec) { BigInteger bg=new BigInteger(dec,10); return bg.toString(16); }
0
6995253930fdf00afdfdcdb6ca3cfecf
32193dbe295fde37afe2d05608b24f5c
Updates the connector brush set (line thickness and style for all different modes) input: none output: none
self.scene.grScene.updateMode(self.grid_mode_options.currentText()) for eachBlock in self.scene.blocks: if not (eachBlock.block_type == "CONNECTOR" or eachBlock.block_type == "Connector"): eachBlock.grBlock.updateMode(self.grid_mode_options.currentText())
0