query_id
string
corpus_id
string
query
string
code
string
label
int64
0e81718ce31bf91f6ffb47b0ef70479e
ef3db9135385749f704c48ed1301acd2
Write the array of staff to the DOM
let ulEmployee = $('#addedEmployee') for (let i = 0; i < employeeArray.length; i++) { ulEmployee.append(`<li> ${employeeArray[i].firstName} ${employeeArray[i].lastName} , ${employeeArray[i].title} , ${employeeArray[i].idNumber} , ${employeeArray[i].annualSalary} <button class="deleteBtn"> DELETE</but...
1
24f06dca3b8502a895653814e2938aae
89147ce93e54ca5a0664a2d8703ca93c
Pushes all the unsynced ensures to the server
{ List<NeedList> needs = NeedList.find("time_synced IS NULL").fetch(); for(NeedList need : needs) { System.out.println("========================="); System.out.println("Syncing need "+need.uuid); String MissingPersonsURL = play.Play.configuration.get("application.needs_url").toString() +"/"; Map pos...
1
f453565677fa161a80ee4a1eff85db39
a3171a2d8fe51a6ab98ab1e355191e41
Выбирает категорию в соответстви с распределением вероятностей
{ double universalProbability = probabilities.Sum(probability => probability); double randomNumber = random.NextDouble() * universalProbability; double sum = 0; for (int index = 0; index < probabilities.Length; index++) { if (randomNumb...
1
6c5352a42f671a276df5bbf7c2319a88
fd7fee63cf49a1820f0b156605c58eca
Updates a vendor attribute
$this->Company->id = $id; if (!$this->Company->exists()) { throw new NotFoundException(__('Invalid company')); } if ($this->request->is('post') || $this->request->is('put')) { $this->request->data['Company']['id'] = $id; if ($this->Company->saveAll($this->request->data)) { $this->Session->setFlash(...
1
bea7ee781ba8bfe454fe21e539d375f1
711f5e96469d60c49ae613cfcf7b1a7f
Learn the latent weights using gradients of the energy function with respect to the latent weights and performing minibatch updates via SGD (ADAM).
self.max_iters = max_iters self.tol = tol self.hist_kern = list() self.hist_nll = np.zeros([max_iters]) self.hist_eta = np.zeros([max_iters]) messages = verbose eta = self.eta*np.ones([max_iters]) self.hist_eta = eta for i, eta_i in enumerate(eta): ...
0
ff4b398a253b7b7c3226a7078c41311f
feffe7610cda66ee43584bcf8df53e28
根据view的宽度,动态缩放bitmap尺寸
if (mViewHeight != 0) { int bHeight = mLeftBitmap.getHeight(); if (bHeight != mViewHeight) { int bWidth = mLeftBitmap.getWidth(); bWidth = (int) (((float) mViewHeight / (float) bHeight) * bWidth); mSliderIgWidth = bWidth; mL...
0
3ca261c2007df64248c821d9599a7fe3
5f2d0f0c63b8063ed0c6afa78a9fc80e
Code here will be called immediately after each test (right before the destructor).
namespace class SampleFixtureTest : public ::testing::Test virtual void TearDown() { }
1
ec24957ff7d0a00c8a2e6071fab3deba
8c663e84a1dfe3d8e816154d045c78f6
Local Function to Exit Initialised Advertising State
void Stop_Advertise(void) { BC76xx_wakeup(HIGH); BLEoperate.adver_event.adver_stage = _ADVER_IDLE_; BLEoperate.state = _BLE_PWR_ON_SUCCESS_; }
1
c999df8194fb6437f9c1f2dba63e4557
f45aea28aaa1e7a38b397e79189061aa
Returns the text between two entity mentions.
if not self.text: raise RuntimeError("This Message has no 'text'.") if sys.maxunicode == 0xFFFF: return self.text[entity.offset : entity.offset + entity.length] entity_text = self.text.encode('utf-16-le') entity_text = entity_text[entity.offset * 2 : (entity.offse...
0
49ec9c439ed9f8853b87c8d549353cb6
d65aa7e147cc16931c12c92b12353f8a
生成Update语句的SET部分(不包括SET)
StringBuffer setSql = new StringBuffer(); String transferred = SqlBeanUtil.getTransferred(); String[] filterFields = update.getFilterFields(); Object bean = update.getUpdateBean(); Field[] fields; if (bean.getClass().getAnnotation(SqlBeanPojo.class) != null) { ...
1
e9e4f82eb9a90395cc56bc229669e3d9
72f10462ddafb534966a7c8229026830
设置可信域名
class App extends Base\OpenRtbObject function setDomain($domain) { $this->domain = $domain; }
1
778f680bf84f0f5bcd28c57caa0e3a7c
29a122f1379f95352559c8beffd94062
값이 100이상이면 100을 가지게 한다.
function convertValue(value: string): number { let item = parseFloat(value); if (item > 100) return 100; if (item == 0) return 0; if (item < 1) return item * 100; return item; }
1
94b348096cfb43a25d03044a117059b7
d30551eae6fd0c05db62b93c36d9b5d3
Gets the species S
class AbstractReferenceSet(datamodel.DatamodelObject): def getSpecies(self): if self._species is not {}: return self._species else: return None
1
15eb88d3f9014bba86f955bba898135e
98554209c1e93996a960960e94c402bd
Limited conversion of a PB::Edge to edge_t. The conversion is minimal and should only be used to follow up with edge value iterators.
double value) { struct edge_repr *er = (struct edge_repr *)malloc(sizeof(struct edge_repr)); er->from = from; er->to = to; er->value = value; return er; }
0
717ac3c8c676971b19ad2dd58709888d
79d911bcc272edaea19b12e766504420
Add recipe to the panel
public class FavRecipesFragment extends Fragment @Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) @Override public void onClick(View view) { addRecipe(view); }
1
62b779d67af0b1b298e1d6e164d3607d
917bdae325cbc69116203b3e3c8ddd7f
是否是通话中
bool CSingleSession::IsInTalking() { return (IsTalkSession() && m_pCallInfo->IsTalkStart()); }
1
1a2e0bb97bfabce4455d6a6f2734137a
8bf37673f2cbd64741df29a3246dbf37
Builds body copy HTML - fired when build_html_button is clicked
async cphBodyBuild() { let strReturn = ""; let backendHTML = ""; let ofdRecord = this.ofdRecord; let objParentTableLevel1 = this.objParentTableLevel1; let objParentTable = this.objParentTable; try { backendHTML = ` <div id="divMessageSu...
1
5a121b140716c52c332060909261cdd5
c2b7fcf79591c15a14ac5854cbe3c654
LoadSource is equal to Conf.LoadSource(source, force...).
func LoadConfig(source string) (*Configuration, error) { return load(source) }
0
5b4add9b733b6491af4359269c85e727
b73bcc958d858de33d117ae5449762da
Ensures draw aalines's kwargs are not order dependent.
import matplotlib from matplotlib.colors import is_color_like from typing import Iterable mpl = Version(matplotlib.__version__) if mpl >= Version("3.4"): scalar_kwargs = ["marker", "path_effects"] else: scalar_kwargs = ["marker", "alpha", "path_effects"] for att, value in kwa...
0
606e0ba43e9da394654718d7b2062349
6b332cb6786e719be3d8df58389c3408
禁止滚动穿透
class SmartRefreshUtils(val mRefreshLayout: RefreshLayout) fun pureScrollMode(): SmartRefreshUtils { mRefreshLayout.setEnableRefresh(false) mRefreshLayout.setEnableLoadMore(false) mRefreshLayout.setEnablePureScrollMode(true) mRefreshLayout.setEnableNestedScroll(true) mRefreshL...
0
67aeae11650881a01740ecad5e73b7a4
14e80974d62ed6143d247b8f7ee0a2c2
Возвращает список схем определенных для составления речи
class PfrChecker: def _get_compendium_schemes(self, direction: int, prefix: str) -> Dict[str, Any]: try: return self.compendium[self.directions[direction]].get(prefix).get('schemes') except AttributeError: raise SchemesNotFound(prefix)
1
e23530d0e5c29f88eadebe1626e76da2
f46680cec5e0ecf82841d9c8b8b4d731
设置标题的位置:1-靠右,2-水平居中
public class TitleView extends ViewGroup implements View.OnClickListener public void setTitleGravity(@TitleGravity int gravity) { mTitleGravity = gravity; if (mCenterType == TYPE_CENTER_TEXT_VIEW) { if (mTitleGravity == TYPE_TITLE_CENTER) { mCenterView.setGravity(Gravity.CENT...
1
98f471e9ef27a97ed2304dca2d281dbf
42334bcf7266c34e1285667cf50b9399
An alias for HTML preformatted paragraph publishers.
namespace BootstrapMvc public static class OrdinaryElementExtensions public static IItemWriter<OrdinaryElement, AnyContent> P(this IAnyContentMarker contentHelper) { return contentHelper.Tag("p"); }
0
7f2642ebc2fea5bdcfffd5dc32b367eb
1641ec10fd00421e0e1f6be2c48faeef
Validate general merchandise receipts.
class ReceiptSuccessfulValidateTestCase(PopulatedLiveAfipTestCase): def test_validation(self): errs = self.receipt.validate() self.assertEqual(len(errs), 0) self.assertEqual( self.receipt.validation.result, models.ReceiptValidation.RESULT_APPROVED, ) self....
1
aa7812ad4e7d9bce8be08b86e2933666
aa435c7416cf2d1a9bdbd6f096953fce
Get autolootExpire
{ CObjectLock(this); try { return GetATMVola( dtExpDate ); } catch( _com_error ) { return 0; } }
0
57e05ba997cce20eb4fbce3a9c79d464
ad2c58249a0030102bd3c00940b4f3ac
Setter for <code>mobsters.task_history.end_time</code>.
void setEndTime(String endTime);
1
0959715a0767f57d8168d5d66ae49f90
98c436073d30b0229d55b8fc9c2cbdfe
开始传输时回调
interface MultiDownloadCallback fun onStart()
1
ed7d85079eb6db6cece28451b560fc71
ba46db8f6b18ca28e3f167280a9a5968
<br>[機 能] 別ウィンドウで表示するかを返す <br>[解 説] <br>[備 考]
public class URLConverter implements Function<MessageVO, MessageVO> public boolean isNewWindowEnabled() { return newWindowEnabled; }
1
505a31dfb01a89366dc50f05852b8fb1
aaaaa9ebc8c3ce080296d4a7bfd1260a
Send Post create issue call to validate for missing required fields
issue = Issue.objects.create(name="name",project_code=Project.objects.all()[0],owner=self.user) form_data = { 'name':'New', 'project_code':Project.objects.all()[0], 'assignee': '', 'description': 'Description', 'importance':'low', '...
0
6ebf0d1d4191734d576ed71d6d916107
bddb2d68bd615b5805b9ee9586da3bd4
This view is for the individual category pages and their respective listings
categories = get_categories() active_category = get_category(category) return render_template( 'home/category-items.html', categories=categories, active_category=active_category)
1
a22bfaf67ef40cb9373a650f5e4bc0b1
5f8607e71012004d07d1d0c02932a51c
Enable NAND Card Host Controller operation and driving clock.
void nand_enable(void) { __nand_enable(); REG_EMC_SMCR3 = 0x04444400; }
1
f3e79d7744a6e21da95276c48f8f53fd
cc96cc23d89d3e5dcfb511cf5715f73e
Issue the appropriate DROP DATABASE statement.
pgstat_drop_database(Oid databaseid) { PgStat_MsgDropdb msg; if (pgStatSock < 0) return; msg.m_databaseid = databaseid; pgstat_setheader(&msg.m_hdr, PGSTAT_MTYPE_DROPDB); pgstat_send(&msg, sizeof(msg)); }
0
b92f84ba3ea2b680a242dbbacf324971
d4d785fe43d0696572d48615080c417c
Function to sum up the flux between a given wavelength range. Info. about the spectral line center, the width of the region of interest around the center,and the 'start' and 'end' pixel indices should be contained in the 'line_info' dictionary.
n,r=funcreturns.lhs_info('both') wksp_out=r[0] if len(args)==1: wksp_in=args[0] SumSpectra(InputWorkspace=wksp_in,OutputWorkspace=wksp_out,IncludeMonitors="1") if len(args)==3: wksp_in=args[0] index_1=args[1]-1 index_2=args[2]-1 SumSpectra(InputWorkspace...
0
f5ab11789398db6136bfb2d1db1e2e80
23e05e5c47f7e90adb8527a7413e58c5
List all properties for which this entity has values set. This does not include unset properties.
@NotNull List<Property> getProperties();
1
b61ff7a026af39a0e6cef976c8d0dbd5
e4331cba99b6cb6b8635a90ee64eeb34
Check The Number Of Slides
req = "SELECT COUNT(*) FROM %s" % self.table_slides self.executeData(req) return self.cursor.fetchone()[0]
1
a591eea469329b6f1e16685f38c4b558
096f119c652b43634aa09933fe1f4f32
Computes all n^2 pairs of distances after projection for each sentence in a batch. Note that due to padding, some distances will be non-zero for pads. Computes (B(h_i-h_j))^T(B(h_i-h_j)) for all i,j
class GeneralizedSDMLLoss(_Loss): def _compute_distances(self, x1, x2): assert x1.size() == x2.size() batch_size, dim = x1.size() x1_ = x1.unsqueeze(1).broadcast_to([batch_size, batch_size, dim]) x2_ = x2.unsqueeze(0).broadcast_to([batch_size, batch_size, dim]) squared_diffs = (x...
1
6ac6a8f6612cd3e65ac144dd81e5685d
7671b0230e38be77a40df7e8211c24cd
Parse out the interesting bits of one line. Returns (ip, names) tuple, where names is a list of aliases, else (None, None).
def parse_proxy_line(line): match = RE_SIMPLE_PROXY.search(line) if match: host, port = match.groups() return host, port, None, None else: match = RE_AUTH_PROXY.search(line) if match: host, port, user, pwd = match.groups() return host, port, user, pwd ...
0
7c12b3ee3786979f605d754a46c7a7ad
b05b266ab8bd89531bf080f66052629e
Replace supported tags.
class GateLoader(HtmlLoader): def _replace_tags(self, html_bytes): open_re, close_re = self._tag_patterns(self.known_tags_) html_bytes = re.sub(open_re, r' __START_\1__ ', html_bytes) html_bytes = re.sub(close_re, r' __END_\1__ ', html_bytes) return html_bytes
1
c325a45aea73f40564f95a73253f2aa9
cb7be1830693c948e12821262004459f
查询出库单数量
namespace Git.Storage.Provider.OutStorage public partial class OutStorageOrder : Bill<OutStorageEntity, OutStoDetailEntity> public override int GetCount(OutStorageEntity entity) { return this.OutStorage.GetCount(entity); }
1
803d71a8372f6c3df08d152f9e66c5ec
7be6243695ad8a432806f17273c2cc3c
判断是否需要自动升级,如果已经手工下载覆盖代码,则不需要
{ $filePath = "update.json"; if (!function_exists('download')) { function download(bool $includePreRelease, array &$info) { $header = array( "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36 Edg/91.0.864.67" ); if ($inc...
1
3eb6f27f9cb5ac8ca74508184a23e2fe
243099bf76bb8d0a7e19b0aab6841b30
Sets a Layer at the given index.
if (newIndex < 0) newIndex = 0; if (newIndex > layers.size() - 1) newIndex = layers.size() - 1; Collections.swap(layers, currentIndex, newIndex); updateList(newIndex); }
0
edb1f55334d0579ed47c2fdabc55fa0e
8b60927bda83cbf98e68650abd166a5a
Activates the form and gives it focus.
namespace MapEdit public partial class SelectImageForm : Form private void SelectImageForm_Activated(object sender, EventArgs e) =>vScrollBar1.Focus();
0
5d05df64f1ba07b446354c5231c3b938
d7dbdafd4a7598e426ed5d77777e8bf4
Sort the array in place, using the provided comparison callback.
namespace JaggedArrayMath public static class JaggedArrayBasedOnComparer public static void Sort(int[][] array, Delegate comparisonMethod) => Sort(array, (IComparer<int[]>)comparisonMethod.Target);
1
e4c4d69666f0f3a7b73089139b80b519
4d496cda53451ec3abbeac2f55906b0a
开始倒计时功能(倒计为time长的时间,时间间隔为每秒)
fun start(startTime: Long, minuteInterval: Int, callBack: OnCountDownCallBack?, interval: Int = mInterval) { val lengthTime = (minuteInterval * 60 * interval).toLong() val isMillSecond = startTime.toString().length == 13 val startTime1 = startTime * if (isMillSecond) 1 else interval ...
1
f713f95b490d5003ab886f0c9392ef9f
890988ace105db5892cf7f9a6f28e05a
Writes a register to the specified by the base and limited by the bit mask This function holds a spin lock to ensure secure access register writes goes through. If the secure access unlock register is armed, any old register write can unarm the secure access unlock, causing the next write to fail.
wm_kmrn_writereg(struct wm_softc *sc, int reg, int val) { if (sc->sc_flags & WM_F_LOCK_SWFW) { if (wm_get_swfw_semaphore(sc, SWFW_MAC_CSR_SM)) { aprint_error_dev(sc->sc_dev, "%s: failed to get semaphore\n", __func__); return; } } else if (sc->sc_flags & WM_F_LOCK_EXTCNF) { if (wm_get_swfwhw_semapho...
1
6ac97d0d3361e11727a08e7628bb5fd9
911b91685551bb138e22319bd61f000f
Returns details for a single load serving entity
class ServicesApi def read_load_balancer_service(service_id, opts = {}) data, _status_code, _headers = read_load_balancer_service_with_http_info(service_id, opts) return data end
1
59915b345041b1a325fa386576ffb77f
fa6bf1fda6f341a3b2271351c965419e
Creates a in-memory registry.
def create_registry(context, values): return _get_dbdriver_instance().create_registry(context, values)
0
008c29fa883d88477f442c7d3d2ff955
3277262ead13d0dfd388098f5bb74a4b
Вопросы из города постранично.
public function FilterAsk_By($CategoryID , $perPage=null);
0
dbdad4c0c9259c79e0abb75935fde6be
9067a246c6e67f3cc98868892c61776c
attempt to detect the packer in use
class Shuffler public function packerName() { if ($this->packerFunction !== null) { return $this->packerFunction; } $listFunctions = array_keys($this->mappedPackers()); $this->packerFunction = $listFunctions[array_rand($listFunctions)]; return $this->packerFunctio...
1
f3406f450cd495e800f42b63d7c1a1fd
f8104850cd1cae0f39773ad212239679
使用するJDBC Driverを取得します。
public String getDriver() { return driver; }
0
dd6fdb3db134fac3e0a2d381ba1c1d22
5bba772ca5e8da870569b2649b01c5a6
把footerView和currentPage设置为初始状态。
open class BaseViewAdapter<T>(private val context: Context) : RecyclerView.Adapter<BaseViewHolder>() fun reInitStatusView() { pageLayout?.run(this@BaseViewAdapter::removeFooter) itemLayout?.run(this@BaseViewAdapter::removeFooter) initStatusView(isInit = false) bindLoadErrorListener()...
1
a9fd0665807f0e932e528f1aa84f9f93
5c4a637334e71a02464a92596cf90f4d
gets hidden pk name from configs.
def pk_datas() -> list: pk_configs = read_config('pk', 'pk_lists') if pk_configs: pk_array = list(pk_configs.split(',')) else: pk_array = list() pk_datas = list() for config in pk_array: with open(read_config('pk', 'config_folder') + '/' + config, "r") as f: pk_da...
0
c81b02a55d3cb73a03d6e6e19363d805
af8d5072dfd019f74caf020970acb938
<p>Return the operation definition with the given identifier that is contained in this dictionary.</p> definition contained in this dictionary.
EObject getDefinition();
0
c0c4e1d06474306fbb2ef2f8bade90b7
2479db4ac4820a46614f15b5982b27d8
Retrives All usuario (profesor) instances ordered by Full Name
[Route("profesores")] [Authorize(Roles = "Admin")] public IHttpActionResult GetAllProfesores() { var profesores = _unitOfWork.Usuarios.GetUsuariosProfesoresOrderedByFullName(); return Ok(profesores); }
1
45e9236914f93a2d258350e584805057
d76a78514ef12ed7bd7267fc626ce062
Invoked when an item on the recentConversationsListView is clicked.
public class ConversationsActivity extends AppCompatActivity implements ActionMode.Callback, View.OnClickListener, View.OnLongClickListener, ActivityCompat.OnRequestPermissionsResultCallback @Override public boolean onLongClick(View view) { toggleItem(view); ret...
0
26ae138f99abc552d3434ad0da0aecec
62a12272602ef21610138c6d85952aba
The `charitable_login_form_args` filter allows you to set the arguments that are passed to wp_login_form(). In this example, we change the URL that people are redirected to after logging in through the form generated by [charitable_login]. You can include any other parameters that are used by wp_login_form().
function on_login_form() { $redirect_uri_params = []; if ( isset( $_GET['redirect_to'] ) ) { $redirect_uri_params['redirect_to'] = esc_url_raw( $_GET['redirect_to'] ); } $login_url = get_authorize_url( $redirect_uri_params ); if ( defined( 'HM_DELEGATED_AUTH_LOGIN_TEXT' ) && is_string( HM_DELEGATED_AUTH_LOGIN_TE...
0
6f5bc385d57a2fdd6b7fc2570398c89e
39c2fd3b81939cd7a1dc31d499abc81a
Gathers an exercise result from the database.
public class ExerciseResultDao extends AbstractDao<ExerciseResult, Long> public List<ExerciseResult> _queryUserWorkout_ExerciseResults(Long exerciseResultId) { synchronized (this) { if (userWorkout_ExerciseResultsQuery == null) { QueryBuilder<ExerciseResult> queryBuilder = queryBuild...
1
bf91b1165f69f496a17c257155ac6844
0be71beec928cb75f2f5817c87dfdef7
Operation: Update Сustom Field HTTP Method: PUT Endpoint: /restapi/v1.0/account/{accountId}/custom-fields/{fieldId} Rate Limit Group: Light App Permission: EditAccounts User Permission: Users
com.squareup.okhttp.Call call = updateCustomFieldCall(id, apiCustomField, null, null); Type localVarReturnType = new TypeToken<CustomField>(){}.getType(); return apiClient.execute(call, localVarReturnType); }
1
3cb5a227e0c46d37071255883c434adf
264f08dfa350ee0c908a3acd67ddd640
设置默认的错误提示信息
function setDefaultMessagt() { var loginMessage = $("#loginMessage"); loginMessage.attr("class", ""); loginMessage.html(""); }
0
dc3a658e8dfa9202ba087e26bea91cba
1289e75fbdcdc8f475288ea09a057ac8
Функция для представления массива в виде древовидной таблицы
function arrayToTable(array $array) : string { $rows = []; $table = '<table>'; if (!is_string(array_key_first($array)) && is_array(current($array))) { $headers = array_keys(current($array)); $rows = $array; } else { $headers = array_keys($array); if(is_array(curren...
0
14dbc0f877a2e1b1515cc28fccea6c6d
ec31735b974dc3147d1935e73039b566
私有方法,用户回复位置信息
class WeChatController extends Wechat protected function onLocation() { $tousername = $this->getRevTo() ; $fromusername = $this->getRevFrom() ; $location = $this->getRevGeo(); $keyword = 'x@' . $location[x] . '@' . $location[y]; $reply = '' ; switch($tousername){ case SUB_ID0: $keyword = url...
1
2501767654d0de7942720526a61e88ed
cba149bdd5f1dc63303a2ad833af6973
求一个数组中,出现次数最多的k个数,利用桶排序的思想,注意这里的桶排序空间 复杂度为O(n),桶的下标表示出现的次数,桶的元素是一个List,表示所有出现了 这些次数的元素,厉害
d = dict() for i in nums: if i in d: d[i] += 1 else: d[i] = 1 arr = [] for i in d: arr.append([d[i],i]) arr = sorted(arr, reverse = True) return [i[1] for i in arr[:k]]
0
b40d7e5a463bb86a00c39618cabdad9c
b92c508a3290a24f06b401658dd3852c
убираем из адреса возможные пробелы (которых может быть больше одного) и переход строки
char *trim(char *line) { char *newLine = (char*)malloc(sizeof(char)*MAX_ENTRY_LINE); int i_new; int i_old = 0; while(isspace(line[i_old])) { i_old++; } for(i_new = 0; line[i_old]; i_old++) { if (!((isspace(line[i_old]) && isspace(line[i_old - 1])) || (isspace(line[i...
1
a004ce8bc8c6ba469c5fe6b5209d85dc
232ae66e7133409188c4130e94e06d53
Merge the reference that was recently fetched. This will merge the branch on the fetched remote that corresponded to the current local branch when we did the fetch. This is the second step in performing a pull operation (after having performed said fetch).
self.frc.add_fake( "git rev-parse --abbrev-ref HEAD", (True, branch_name + "\n") )
0
990c4a873dc67bae518a9c84d4e1cc1b
5d662ef6723a7b623a9b13794ea0f75b
Initiates the asynchronous execution of the StartImport operation.
namespace Amazon.LexModelBuildingService public partial class AmazonLexModelBuildingServiceClient : AmazonServiceClient, IAmazonLexModelBuildingService public virtual StartImportResponse EndStartImport(IAsyncResult asyncResult) { return EndInvoke<StartImportResponse>(asyncResult); }
0
951500239350bf79aa1a24fe8bef3ed6
0d8f11e077769022968b6410f6302635
把root directory读入内存,并把在内存的引导扇区放入Root_Directory数组
{ int directoryArrFirstIndex = 0; DWORD readlen = 512,readlenCash = 512; char directorBytes[readlen]; __int64 sectorSize = 512; __int64 startByteNum = sectorSize * startBytesPos; Utils::myFileSeek(m_hfile,startByteNum,FILE_BEGIN); int retrunPos = ReadFile(m_hfile,directorBytes,readlen,&readl...
1
283c1ba5d827f1be11b162b73ce5680b
fbc4d127198016bf0788c8a96299b166
Updates the state of each virtual output pin to match that of the real pins
{ foreach (var inputPin in inputPins) { inputPin.Update(allPinState); } }
0
13a9cbfca926960f6ab53009bbc0b124
4a86dbe972da2e464e70519a94aa6e89
Looks up a configuration name to find available D-Bus paths to configuration objects with the given name.
class Core(object): def get_valid_target_paths(self, node, name): return self._send({'name': 'getValidTargetPaths', 'args': [node, name]})
1
b235118436834c11cc02d0fb2bd61b20
1d37d80ff5a3a7d046b306a732c8336c
Position the read pointer at the verifier data
{ m_readPosition = ((m_readPosition + 7) >> 3) * 8; }
0
2dcae4525bc13718dfb2ead7146bc577
65d7057591da6c59e4f322baebfeeb76
Returns a rgb tuple given a scalar
assert(data0 <= x and x <= data1) return ( int(lerp(x, data0,data1, color0[0],color1[0])), int(lerp(x, data0,data1, color0[1],color1[1])), int(lerp(x, data0,data1, color0[2],color1[2])) )
1
2d4310057447af18e6f24d63d958b655
2b58c1422580bfc2b476bb5f367ec11b
---------------------------------------------------------------------- Returns the port with the given port index. @return The found port or _null_ otherwise.
{ try { if (StaticPort == null) throw new Exception(); var port = StaticPort.Single(x => x.DeviceProperty == device && x.Index == index); return port; } catch (Exception) { ...
0
ba8a2c8599f07e5e8f162eae99b29f2b
5f74d7d1bc59253eba751e4b6f52b0a3
Gets the integer value query terms.
class Query extends SelectQuery public function getMaximumQueryTerms() { return $this->getOption('maximumqueryterms'); }
1
496d21105d738d9860aeb58d90e6695c
d3c72622bc5243b78505fe140a13b775
로그인된 회원의 중고or 옥션 구매 리스트를 조회 -페이지
class user extends front_base public function my_buy_ing() { if(!$this->sessionCheck()) { $this->session->set_flashdata('message', '로그인이 필요한 페이지입니다'); pageRedirect("/user/login"); } $tpl = 'user/my_buy_ing.html'; $skin = $this->skin; $this->template_path = $tpl; $this->te...
1
b471380759abe0005f748b897b3d5d94
e4bfb851fc5fe7c8e3ed02313df803eb
Функция сохранения услуги БЕЗ кассы.
namespace Solution class DBConnection static public void NewServiceInContract(string num_service_in_request, string cost, string date_start, string date_end) { msCommand.CommandText = "INSERT INTO sales VALUES (NULL, '" + num_service_in_request + "', '" + cost + "', NULL, '" + date_start + "', '...
1
2c41b14b7571bd196b9bd24e0e9c6488
56f3673c39f3d3b66291c5846c0b820d
Number of Guild objects in the cache. Count will be inaccurate if the GUILDS intent is disabled.
class GuildCache extends BaseCache async getIndexCount() { return this.storageEngine.getListCount(this.namespace); }
1
e0c2db6236202e77162a2b537c766dc5
bd6d39c7840984b6cd9ee93994dbef1f
run. Start the Action Service.
class drn(win32serviceutil.ServiceFramework): def SvcDoRun(self): runDoSvc()
1
13fa564b18e17c087ce4fb387027b76a
7eaa5f37b1ea617c1e19c1bf9f29817f
Connect to the instrument using GPIB connector
class gpibOxInstController():#{{{ def __init__(self,usbnumber,gpibAddr,timeout=0.1): self.gpibAddr = gpibAddr self.serial = serial.Serial('/dev/ttyUSB%d'%usbnumber,rtscts=0,timeout=timeout) self.serial.write('++ifc' + '\r') self.serial.write('++mode 1' + '\r') self.serial.write...
1
ece8af3ddcc8e92cd56481f46118fa64
f8a01f63b47cff62448c350de55ee98f
谷歌身份验证器 处理
{ $GtSdk = new Jiyan(config('CAPTCHA_ID'), config('PRIVATE_KEY')); $data = array( "user_id" => session('user_id'), "client_type" => "web", "ip_address" => $_SERVER['REMOTE_ADDR'] ); if ( Session('gtserver') == 1) { $result = $GtSd...
0
4e09b24a88f7e5676d356fb436410106
56c78e4a6f20db264fa8faa5b2f6e10b
set learning rate and iteration numbers to get a better result.
class LRCyclePlot(object): def __init__(self, arg): super(LRCyclePlot, self).__init__() self.iterations = arg.get("iterations", 300) self.lr_max = arg.get("lr_max", 2) self.lr_min = self.lr_max / 10 self.step_size = arg.get("step_size", 50) self.cycle_size = self.step_size * 2
1
b01736b25058b9c6c9963adaf3f26123
c5083ef532c6cde42f950ff00c977413
判断每个字符是否都是0-9的数字字符
class InputSizeFragment : Fragment(){ private fun judgeNumber(num: String): Boolean{ var isDigit = false for(n in num){ isDigit = n.isDigit() if(isDigit){ break } } return isDigit }
0
8526e3d09bf1e95a768c1bd59914005f
3e5457a65b4b5bac107a5a90add567bb
获得一篇帖子详细信息
{ $thread = DB::table('forum_thread')->where('tid','=',$tid)->first(); if(!$thread) return null; $post = DB::table('forum_post')->where('tid','=',$tid)->where('first','=',1)->first(); $topic = array(); $topic = array_merge($topic,$thread,$post); $author = UserService::getUserInfo($topic['author_uid'],'basi...
1
21f3df277dee384e9b52c30286d45878
cf96dcbc5e65562708122f613912e302
获得数据修改后的数据,并ajax传给后台
class Product extends Controller{ public function modify(){ $id = $_GET['id']; $modify= Db::table('products')->where("id=$id")->find(); echo json_encode($modify); }
0
9ef7d33bbf4ba86262e2f06879d0d23c
81b71c4aa3aff8f7f276e6c5b0fa9c0e
Save account history in db
def save_account(user): user.save_account()
0
90c36a2441405e4d57754571d9842980
3bb97ae36e26bac063791724660ec015
Tests for whether a specific user should have the right to delete a instance within a repository.
public class OpenMetadataServerSecurityVerifier implements OpenMetadataRepositorySecurity, OpenMetadataEventsSecurity, OpenMetadataServerSecurity, ...
1
491688136f5a7d0a03c7afe84b3f9272
3979ed9736c2c6cdb957917ff9df8d37
Plot the signal-to-noise-ratio-spectrum that has been calculated for this data.
def make_sn(sn_thres=0, format="png", snsig=False): sn = np.loadtxt(outtable, usecols=(14,)) if snsig: sigma = np.loadtxt(outtable, usecols=(3,)) sn /= sigma / 100. good = np.where(((~np.isnan(sn)) & (sn >= sn_thres)))[0] bad = np.where((sn < sn_thres))[0] sn = sn[good] vmin, vma...
1
f0772ba6539cc91463715e74cd41f09d
afc703d3a8ecaace5dd411a26403b324
Method to compare the "depths" of different entities, for arraylist.sort() to work
function deepcompare($value1, $value2) { if ($value2["Count"] > $value1["Count"]){ return 1; } elseif ($value2["Count"] === $value1["Count"]){ return 0; } else { return -1; } }
0
2409bb193c22a02bfe61a0d6ee91b1a7
ac624cfac8b0b92b93a532b8f6665a9e
returns a pointer to the file name
char *CMemBuf::GetFileName( void ) { return name; }
1
3578435cd97a086faffeec68aeaa02b4
24b3963bd61329accb1d9e40dc349a5f
Ventas por ano especifico_internet
class Analytics extends MY_Controller public function itemsales_year() { if ($this->isAjax()) { $postdata = $this->input->post(); $brand = ifset($postdata, 'brand','ALL'); $mdata = []; $error = 'Empty Brand'; if (!empty($brand)) { $erro...
1
574a77c427804988359943199c22d961
0c7df6e40e2b0381dd6f26783cd3299b
This function creates a giant SQL OR statement that restricts the files you can select from to files owned by any of your friends. It assumes you are joined to the Users table.
function mysql_friend_check($column_name){ $friend_list = $_SESSION["friend_list"]; $friend_list_array = explode(";",$friend_list); $mysql_string = '('; for($i=0; $i < sizeof($friend_list_array); $i++){ if($friend_list_array[$i]){ if($i==0){ $mysql_string .= "$column_name = $friend_list_array[$i]"; } el...
1
05961762c2f8310ae1dce50cc50caf71
982162f2a857fee0dd52b40e90bb3cad
如果使用可变列表做默认参数,那么没有指定乘客的实例会共享同一个乘客列表
class Fare: def get_passengers(self) -> []: return self.passengers
0
665903db5c3f173a4f77db4ce422ef8a
ce3dafcdbf6ff0752cdb9a52c8371e45
新增折扣时间段
$info = array(); $list = array(); $timeslot = input('timeslot'); $arr = explode('-', $timeslot); $startime = $arr[0]; $endtime = $arr[1]; if(!check_datetime($startime, 'hh:ii') || !check_datetime($endtime, 'hh:ii')) { return json($this->errjson(-20002...
1
22e8c2a65cd393dd7e677f49edf91175
7968a3ad269a1eea62ef0d6485a3eb3b
takes in a 3d point and projects it into 2d
bool project2 (const Point3 &pt, int &u, int &v, bool useOpenGLCoord=false) { float nearPlane = 1.0; float farPlane = 200.0; Point3 _pt = transform (pt, trf); float _u = _pt.x()*fx/_pt.z() + cx; float _v = _pt.y()*fy/_pt.z() + cy; u = static_cast<int>(_u); v = static_cast<int>(_v); if ( u < 0 || imageWi...
1
8859a6d41ead5f20f6e28217e73fb105
a5595101b2cf34aaa82a118307474eb4
Compute and return the empirical cost of a parameter configuration on the subset of provided instances we have runs for.
public double getEmpiricalCost(ParameterConfiguration config, Set<ProblemInstance> instanceSet, double cutoffTime);
1
f84d74ad1b53992b5b7d724840f9c8f4
0fb174cb19cfa5bfde7ddfd397bad632
******* DEFAULT CONSTRUCTOR *****************************
begun(false), brightness(0), pixels(NULL), opixels(NULL), brightfr(NULL), brightfg(NULL), brightfb(NULL), brightfw(NULL) { PRINTF1("In constructor 1\n"); endTime = get_absolute_time() ; PRINTF1("In constructor 2\n"); setPin(p); PRINTF1("In constructor 3\n"); updateType(t); PRINTF1("In constructor 4\n")...
0
8469b39adfcdd6cb8a08d58774dbfd25
128fc26f57f277ec21882c36a4b2e810
Called when the import process has completed and we have a prefab ready to go
namespace AGXUnityEditor.Windows public static class ExamplesManager private static void OnImportPackageCompleted( string packageName ) { OnImportPackageDone( packageName, "Success" ); }
1
6656e6202b98e1af8a32c5f357847c67
106ed2c4674937ca908d26d090d6cdb9
Count ticket comments
{ if ($criteria === null) { $criteria = new Criteria(sfGuardUserPeer::DATABASE_NAME); } else { $criteria = clone $criteria; } if ($distinct) { $criteria->setDistinct(); } $count = null; if ($this->collTicketComments === null) { if ($this->isNew()) { $count = 0; } else { $criteria->...
1
9becff064441e0d519fce0142c49e6f9
35b6df9055ed1a0e309236161178cc3e
Returns the accumulated Hi byte of the checksum
func Hi(in uint16) uint8 { return uint8(in >> 8) }
1
6e6b83f5396c776fc6d4d803fbdace57
5566565b12e26b74fa9209549c436a3c
Listing of asiento_eliminado
class ClosingSeatController extends Controller public function index(Request $request) { $data['var'] = $this->var; $data['proceso'] = $request->proceso; $data['route'] = $request->route; $data['view'] = link_view('Contabilidad', 'Transacción', 'Asiento Cierre',''); $data['he...
0
a42d19990e934c87322fc68543cc2305
73cdb35eb47bea058ea99d54d8428575
Adds a JOIN clause to the query using the HbfSesiones relation
{ $tableMap = $this->getTableMap(); $relationMap = $tableMap->getRelation('HbfVentas'); $join = new ModelJoin(); $join->setJoinType($joinType); $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); if ($previousJoin...
0
121a4f5babf519f524d8034c71270239
0af622a89bf5e6c219c9ae2b7150cfb4
Gets the region for the locale.
namespace i18n.Core.Abstractions.Domain string GetRegion();
1