query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
efbf5192a1309ccfa99ace72aaaf5ce4 | ba80ddf69bace9be84116eccd4282f9e | List of policies to encode onto generated tokens. Depending
on the auth method, this list may be supplemented by user/group/other values. | class Policy(collections.abc.MutableMapping):
def authenticated_users():
return "allAuthenticatedUsers" | 0 |
3de96c1e0e03657dfe504b28bd524d4c | d8e4cd2808dc082d925b4a4c72709692 | Admin Revoke Beta Key | key = Key.find(params[:id])
if get_user_id == key.user.id || session[:adminId]
key.destroy
end
redirect_to(:back)
end | 1 |
94578d66d761b80d00490a75cc1259d0 | b309dc96ccbbbe6ac2bf01f8d2528dc4 | format superblock header and
all the segment headers in a cache device | int
v7fs_superblock_load(struct v7fs_self *fs)
{
struct v7fs_superblock *disksb;
void *buf;
int error;
if (!(buf = scratch_read(fs, V7FS_SUPERBLOCK_SECTOR)))
return EIO;
disksb = (struct v7fs_superblock *)buf;
v7fs_superblock_endian_convert(fs, &fs->superblock, disksb);
scratch_free(fs, buf);
if ((error = v7f... | 0 |
8a8a39d02b352ed976f0bf3345ac8865 | 1fafd5d7b975b8f9d4338b35b361e42b | 获取某个集合的特定对象的特定属性 | public static <T> List<T> getProperties(Collection<?> collection, String field){
if(StringUtils.hasText(field)){
List<T> list = new ArrayList<T>(collection.size());
Iterator<?> it = collection.iterator();
while (it.hasNext()) {
Object object = it.next();
MetaObject mo = MetaObject.forObject(object, ... | 1 |
342194885a74bf717b2bbd386ca57bcb | f090ce66ea779d709f886685dde88be9 | 找到对应的AV名字 | class Video extends Base
private function ToConvertAvName(array $list)
{
$avArr = [];
$avValArr = [];
foreach ($list as $item) {
$avArr[$item['vid']] = $item['avid'];
$avValArr[] = $avArr[$item['vid']];
}
if (count($avValArr) > 0) {
$avMode... | 1 |
189ee1c834245034cf1a057544312a7d | f8d0a728c17b39b99a165a15b47c2f13 | 查找最大结点:返回tree为根结点的伸展树的最大结点。 | if(tree==null){
return null;
}
while (tree.right!=null){
tree=tree.right;
}
return tree;
} | 1 |
28f31698300f21fdc8f7eabde5eab697 | 596823ae35344fb46bc3a0208473c5b8 | The pointA and pointB indicate the two 2D points between where a line is drawn
The points on the line that intersect with any of bounding boxes of spawned enemy ships are detected | {
Collider2D[] hitEnemies = Physics2D.OverlapAreaAll(attackPoint2a.position, attackPoint2b.position, enemyLayer);
foreach (Collider2D enemy in hitEnemies)
{
enemy.GetComponent<Enemy>().takeDamage(attackDamage2);
}
SoundController.sC.Play(audioSource, SoundControl... | 1 |
b43b0746fa44d642a7ae86953312b577 | a63af700e3bd8bf394c2ab325009f08c | 修改活動資料(不含狀態) | class ActivityController extends MasterController
public function modifyActivityAction(Request $request, Application $app){
} | 1 |
d1d6d2dc888c20254adad5d872a6c5a0 | 4d377225b8ab849a5223b078f2d9ca2c | 向事件框架添加读事件,是否真正添加需要看当前使用的是什么事件模型,以及当前事件的状态 | void Epoll::addfd(epoll_event &e)
{
bool exist = false;
epoll_event event;
event.data.fd = e.data.fd;
event.events = e.events;
if(rfds.find(e.data.fd) != rfds.end())
{
event.events |= EPOLLIN;
exist = true;
}
if(wfds.find(e.data.fd) != wfds.end())
{
event.events |= EPOLLOUT;
exist = true;
}
if(exist)... | 1 |
8daf973e44deeb1a7498e0532570dad4 | a8865bc3cbd1ad531e50999c88cd41de | Hàm kiểm tra trọng số điểm 3 kiểm tra | double diemTong=0;
for(int i=0;i<hocSinh.getListDiemTongKet12().size();i++){
diemTong+=hocSinh.getListDiemTongKet12().get(i);
}
double temp=diemTong-diemsan;
if(temp>5.0){
temp=temp*0.1;
}else{
if(temp>3.0){
temp=temp*0.... | 0 |
1a3ab12d775bde01afcbf8b58c7e0f7b | 04f0c0553490f3ed5c3b8c85a4890c3d | PUT: api/Roles | public ActionResult<RoleDto> Put(int id, [FromBody] RoleDto dto)
{
try
{
_iEditRoleCommand.Execute(dto);
return NoContent();
}
catch (EntityNotFoundException e)
{
return NotFound(e.Message);
... | 1 |
f9240805b2d9990cb6d88676a6c3288b | b08290d2b340220ae411c827e13bf45b | Gets the value of the lines property.
possible object is
{@link ArrayOfCrossRateTableLineWithBidAsk } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "recOrderRequest", propOrder = {
"orderCode",
"providerNif",
"password",
"recLines"
})
public class RecOrderRequest @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"recLine"
})
publi... | 0 |
6474c98c7e84878d3ae67d160b85d8c1 | 424b46992bf820e4e04074fc510fe421 | Sets the text for an empty list with the advice to select at least one role | class ObjectListView(wx.ListCtrl):
def SetEmptyListMsg(self, msg):
self.stEmptyListMsg.SetLabel(msg) | 1 |
8daa84735ca9efd8a334f4ee21da82e1 | d50ae694496f92cefa1a56c098be7400 | Evaluate an array of predictions based on an array of labels and their given radius
True positive gets calculated by matching predictions with labels from shortest distance to longest distance.
False positive are all predictions without a label.
False negative are all label without a prediction. | def iterator():
num_pos = len(target_labels[ target_labels == 1 ])
num_neg = len(target_labels) - num_pos
i = predicted_labels.argsort()[::-1]
fp = tp = 0
last_e = -np.inf
for l, e in zip(target_labels[i], predicted_labels[i]):
if e != last_e:
... | 0 |
ed40ede0bcd99f0c0681c3bc6980574b | dff61a437be4aa300f9f9bbaffa1a8ff | @brief 设置按钮的宽度比例,最终按钮宽度将按照此比例进行设置 | class Button extends egret.DisplayObjectContainer
set btnWidth(w: number)
{
this.width = w;
this.upDate();
} | 0 |
ecdd5181a02edc651136caef868f2618 | 728d42b0209a7b0ab52b99cc155c0df1 | Read transient event data. | ret = {}
res = self.read(TRANSIENT_SRC)
ret["event_triggered"] = bool(TRANSIENT_SRC_EA & res)
ret["x"] = bool(TRANSIENT_SRC_XTRANSE & res)
ret["x_neg"] = bool(TRANSIENT_SRC_X_TRANS_POL & res)
ret["y"] = bool(TRANSIENT_SRC_YTRANSE & res)
ret["y_neg"] = bool(TRANSIE... | 1 |
59f70fdd59cf70b5670e16297d5cd63c | 66102e3e3b6344754c11b8f76785bb43 | 设置可领取耐力的条数 | function setStaminaTime( value )
_userInfo.stamina_time = value
end | 0 |
4bee649547341291a5b0a7346ecaee7d | 9a1fc6537a6ce6f7a66eac46eeed3f0c | Função para ordenar tabela | function sortTable() {
var input, filter, table, tr, td, i;
input = document.getElementById("myInput");
console.log(filter = input.value);
fillTable()
} | 0 |
48c05d6078a241258ed09ec680cb6262 | 736fc5f41304ebd3d239055d1b2dafc5 | Adds a watcher to a prop. | export class Watcher
watch<T, K extends (keyof T & string), V extends T[K]>(object: T, property: K, handler: (object: T, property: string, oldvalue: V) => void, thisObject?: any)
{
if (!Object.getOwnPropertyDescriptor(object, __watchs__))
{
Object.defineProperty(object, _... | 1 |
b54d291e41bb2cc88ab51f294a3a6d67 | eba829e91742ec4e737aefb3b0844026 | Verifica a integridade da assinatura do movimento. | namespace VoluntLib2.Tools
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.Assertion)]
public class CertificateService
public CertificateValidationState VerifySignature(Message message)
{
var senderCertificate = ExtractValidCertificate(message);
if ... | 1 |
69052cc344ec1dd51dc2a280b375a762 | 32eb3132504273f9f418f285e80218ac | ArrayToTable class definiton | var itemCap = capId;
if (arguments.length == 2) itemCap = arguments[0];
var gm = aa.appSpecificTableScript.getAppSpecificTableGroupModel(itemCap).getOutput();
var ta = gm.getTablesArray()
var tai = ta.iterator();
while (tai.hasNext())
{
var tsm = tai.next();
var tempObject = new Array();
var tempArra... | 0 |
66556ca19e027f96f336abf03d5fcc77 | 53cab36f0f10e5e4b8549b4ec5d247bd | Must return the current x position of the roller coaster. | int getCurrX(); | 1 |
2d4e71be64ec12d615f297a707c5b458 | 327eba409a11cc7b097e6d83ac16dec3 | Sets the kwargs for an url_patterns.KEY redirect. | try :
self._redirecturl = redirecturl
except Exception as e:
raise e | 0 |
22d15930b5d6ab774f1ee5fc7d153f09 | 4a096911e94d3d78603bbc5d7aab2827 | Функиця расчета даты вступления решения в силу
по дате решения и списку выходных и праздничных дней | namespace Terrasoft.Configuration.ServiceTerm
public class ServiceTermCalculator : ITermCalculator
public DateTime CalculateSolutionDate(DateTime startDate) {
if (_userConnection == null) {
throw new ArgumentException();
}
return CalculateSolutionDate(startDate, _userConnection.CurrentUser.TimeZone);
} | 0 |
9fb5f02bde871ba380d46f3ddcaeda09 | 8b994776b4852d2e62da29a630f05539 | 被授权人姓名输入框 | class PersonalRemarkActivity(base_frame_view.BaseFrameView):
def remark_username(self):
id_ = 'com.jiuyan.infashion:id/uc_remark_username'
return text_view.TextView(self.parent, id=id_) | 0 |
84f4fcb2027077b047ebcb838659ab18 | 7ebd17ddd708379a5a683bc9f1fa455a | 创建递增单向链表 | public class ListNodeUtil
public static ListNode GenIncrList(int n){
if (n == 0) return null;
ListNode root = new ListNode(1);
ListNode node = root;
for (int i = 2; i <= n; i++) {
node.next = new ListNode(i);
node = node.next;
}
return root;
} | 1 |
8c444c27ecac3a663c341a83c473cef3 | 349322d2d59e6a4d330a9c14490754a5 | LE PASAMOS UNA CASILLA Y NOS DICE SI HAY COLISIÓN | var pared = false;
for(v = 0; v < tablaParedes.length; v++){
if(posy + alto > tablaParedes[v].top && posy < tablaParedes[v].top + tablaParedes[v].height){
if(posx + largo + velx > tablaParedes[v].left && posx + largo < tablaParedes[v].left + 10){
if(tablaParedes[v].cons != 0 && tablaParedes[v].cons != 2){
... | 1 |
61b68094277c776dfdd1d0ecf0703335 | 10be499c8e06326960078e1be71641f2 | 查询某一天班表接口 | List<ClassClockQueryVo> classClockQuery(String date, Long classId); | 1 |
d5b64558607e1044b92851c0cda85915 | e8ed70d7ad4c655b584b261ee3342281 | give closest preceding keyframe
Returns:
int: preceding keyframe | class StreamPart:
#
# __init__:
# @inqueue: queue to receive input
# @outqueue: queue to send output
# @part: the part number
# @outfile: file object to write data to
# @url_fn: function to generate URLs
... | 0 |
204a706cf9deebc4c0433fec6bba7b22 | 60824af889e8d9af458ebfdc5111b213 | Wipes raw data for security reasons. Following recommendations from the <a href=
"http://docs.oracle.com/javase/6/docs/technotes/guides/security/crypto/CryptoSpec.html#PBEEx">Java
Cryptography Architecture (JCA) Reference Guide</a> | public class DatabaseLoginModule implements LoginModule
public void clean() {
username = null;
if (pwd != null) {
for (int i = 0; i < pwd.length; i++)
pwd[i]=' ';
pwd = null;
}
if (debug) {
LOG.debug(".clean() Clean Succeeded \n");
}
} | 1 |
3fed53adab85823f9deb681c2c88127b | 5afe4d984b5cea456cb6cb459811169d | Chooses one of the dependent varaibles randomly with probabilities
proportional to the total rate of each variable. | {int i, j, k, n_cands, n_cands_left, max;
int *cand;
n_cands=0;
for(i=0;i<n_vars;i++)
if(dep[i]>=(double)1.0)
n_cands++;
cand=new int[n_cands];
j=0;
for(i=0;i<n_vars;i++)
if(dep[i]>=(double)1.0)
{cand[j]=i;
j++;
}
n_cands_left=n_cands;
... | 0 |
4ca77900fc65b20a4a78cdc5f5857a90 | 3769f826104cff9b34b0b523d0a956cf | Creates, updates, or removes campaign drafts. Operation statuses are
returned.
List of thrown errors:
[AuthenticationError]()
[AuthorizationError]()
[CampaignDraftError]()
[DatabaseError]()
[FieldError]()
[HeaderError]()
[InternalError]()
[MutateError]()
[QuotaError]()
[RequestError]() | namespace Google.Ads.GoogleAds.V3.Services
public sealed partial class CampaignDraftServiceClientImpl : CampaignDraftServiceClient
public override stt::Task<gagvr::CampaignDraft> GetCampaignDraftAsync(
GetCampaignDraftRequest request,
gaxgrpc::CallSettings callSettings = null)
{
... | 0 |
e40fd373ec3b4d2c7c11b8fa440b4ab6 | b212dc6228c8ef98e683d0eeaadbee43 | MulBlank records hold multiple blank cells.
Check that we don't have any MulBlankRecords, but do have lots of BlankRecords | final class TestMissingRecordAwareHSSFListener
@Test
void testEndOfRow_bug45672() throws IOException {
readRecords("ex45672.xls");
assertEquals(1, matches(r -> r instanceof SharedFormulaRecord));
assertEquals(1, matches(r -> r instanceof LastCellOfRowDummyRecord));
} | 0 |
585783df0bc6e4a3105479fab4f01c88 | 5e0501e6afa02b3141719d0289413040 | Route that renders the page to edit an category.
This method validate that the user is logged in, and the category were created by him, to avoid
malicious behaviors in the url. | class Catalog_Controller extends Base_Controller
public function action_updateCategory($idCategory)
{
if(!Auth::user())
return Redirect::to('login');
return true;
} | 0 |
b6fc3e4c540848c81ba39d7f6bff8bee | 6685621fce0ef078cc4302fc7b0845b8 | Test an object to be deeply equal to the provided object. | function isEqual(a: Object, b: Object) {
return deepequal(a, b);
} | 1 |
4065dd487992ea2a8a2ab5be0abe61d7 | 34b224a7dbef7e08b4a0f3d5c6aed855 | only show your own posts/pages in admin land | if (strpos($_SERVER['REQUEST_URI'], '/wp-admin/edit.php') !== false) {
if (!current_user_can('manage_options')) {
$wp_query->set('author', get_current_user_id());
}
}
} | 1 |
4bf523cda52b43ef4e6d0babda0ce6be | d6bdd138c5b961fb8bf2ee178aede03c | 将data经svd分解降维后估计评分 | n=shape(dataMat)[1]
simTotal =0.0;ratSimTotal=0.0
U,Sigma,VT=la.svd(dataMat)
Sig4=mat(eye(4)*Sigma[:4])
xformedItems= dataMat.T*U[:,:4]*Sig4.I
print(U)
for j in range(n):
userRating=dataMat[user,j]
if userRating ==0 or j==item: continue
similarity =simMeas(xformedItem... | 1 |
f9d87dec40f8c67ea0c31560ebc9eaf1 | a36e07bc296f12270169b080f45fc7fd | 导出流量日志 | @Controller
@RequestMapping("/system/datatraceslog")
public class SysDataTracesLogController extends BaseController
@RequiresPermissions("system:datatraceslog:export")
@PostMapping("/export")
@ResponseBody
public AjaxResult export(SysDataTracesLog sysDataTracesLog){
sysDataTracesLog.setDeleted("0");... | 1 |
8c3e5d10e94bf9f9bdadcf799410f851 | 8686ddc557f1ec20aa3ed68d1c816039 | Extend the signup form with additional fields selected in the plugin configuration | class ApplyStep2Extended extends RegisterForm
public function form(array $form, FormStateInterface $form_state) {
$form = parent::form($form, $form_state);
if( ! $this->frontendApplicationProcess->checkApplicantAuthenticated()) {
$form['form_intro_start'] = [
'#markup' => ' <... | 0 |
1e700dc15a4804687c4298acac1258f0 | a7b79f3d30eb457bc0bcb694b5f9bff9 | 多个手指按下处理 | public class MosaicView extends View
private void singleDown(MotionEvent event) {
float x = event.getX();
float y = event.getY();
mDownX = x;
mDownY = y;
circleX = x;
circleY = y;
magnifyX = x;
magnifyY = y;
lastX = GetMaskX(x);
lastY = Get... | 0 |
1b73322b113a577266511e91f6563c25 | 1f1193ccccddb37df0c69737490517fe | Set token settings. | class CustomTokenGenerator
public function setOptions(array $options)
{
foreach ($options as $name => $value) {
$this->setOption($name, $value);
}
return $this;
} | 1 |
614577b5b252a4037a81f6fc24585c92 | fd557ff3f0fc0ee6ca6ee1d7866e2313 | 获取回调失败的结果
钉钉服务器给回调接口推送时,有可能因为各种原因推送失败(比如网络异常),此时钉钉将保留此次变更事件。用户可以通过此回调接口获取推送失败的变更事件。
请求方式:GET(HTTPS)
请求地址:https://oapi.dingtalk.com/call_back/get_call_back_failed_result?access_token=ACCESS_TOKEN | public class CallbackHandler
public static String getFailed(String token) {
return Invoke.get(ApiUrl.Callback.Get_Failed.url(), token);
} | 1 |
29882a616213cda54fa48ecdbe3c6eb3 | 11c9e3d2c6a5dbabffb2cedc20cf66e2 | Display a listing of the Entidad. | {
$this->entidadRepository->pushCriteria(new RequestCriteria($request));
$entidads = $this->entidadRepository->all();
return view('entidads.index')
->with('entidads', $entidads);
} | 1 |
96eb973cfb932c5113e33655b7b45e43 | 5d7bb7a0f0d6dcc4e331180e5d087566 | เพิ่มรายการโปรโมชั่นโดยเลือกจาก Material ที่ดึงจาก SAP
UI: https://projects.invisionapp.com/d/main#/console/17482068/362358682/preview | enter_menu(menu_stock)
driver.find_element_by_xpath('//*[@id="add_new"]').click()
time.sleep(3)
try:
driver.find_element_by_xpath('//*[@id="konwit"]').click()
except:
pass
driver.find_element_by_xpath('//*[@id="select2-supplierEntpId-container"]').click()
time.sleep(3)
... | 1 |
9620a48ef37c576614f9aee4195159f0 | 32748582e782fd0e498bad27e2c9540c | new window to show 'How to play' | void MainMenu::on_btnHowTo_clicked()
{
HowToPlay *htp = new HowToPlay;
htp->show();
hide();
} | 1 |
95f8c93a63ec1562710ee8508a9ade76 | 64c8881bf4b9b51c36b4aa456410acad | Devuelve el total de pallets recibidos, total de pallets en anden, total de pallets en pasillo y el total de pallets terminados | Integer obtenerTotalTareasRecolector(FuncionarioProcesoPerfilAreaTrabajoDTO funcionarioProcesoPerfilAreaTrabajoDTO,Collection<DetalleSeccionDTO> andenesAsignados) throws SICException; | 0 |
86238d17484e36759a64b8e3dd45c9df | 6bedc76aa4d0b47b8d576c5a97f1f667 | Generates randomized string basing on a built-in regex format | function get_rmstr(lenstr_min, lenstr_max, type) {
lenstr_min = (typeof lenstr_min !== 'undefined') ? lenstr_min : 6;
lenstr_max = (typeof lenstr_max !== 'undefined') ? lenstr_max : 6;
type = (typeof type !== 'undefined') ? type : 1;
str1 = '1234567890';
str2 = 'abcdefghijklmnopqrstuvwxyz';
str3 = 'ABCDEFGH... | 0 |
02f601bb3c2d828a8438b977ed4f91c5 | 53b830b0d662619548103c848427fcf1 | save password to Registration file for next time usage | namespace PasswordProgram
public partial class MainWindow : Window
private void SaveButton_Click(object sender, RoutedEventArgs e)
{
SaveToRegistry();
} | 0 |
72b48832d1e944cfd65a6fc41cbba6e7 | e4199ffc4afb98f080af46404fd1dfc2 | Gets the value of the deductUs35 property.
possible object is
{@link DeductUs35 } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OrdDtlQuoteQtyDataSetTypeQuoteQty", propOrder = {
"baseCurrSymbol",
"bitFlag",
"burdenMarkUp",
"calcMarkup",
"calcMarkupProfit",
"calcProfit",
"calcProfitProfit",
"calcUPCommMarkup",
"calcUPCommProfit",
"calcUnitCost",
"c... | 0 |
826bfadfb16de70c721fb6016a4443b2 | 975128105401028c320b24d37a243a4f | Gets the CheckedBorderBrush dependency property. | namespace MahApps.Metro.Controls
public static class CheckBoxHelper
[Category(AppName.MahApps)]
[AttachedPropertyBrowsableForType(typeof(CheckBox))]
public static Brush GetCheckBorderBrushChecked(DependencyObject obj)
{
return (Brush)obj.GetValue(CheckBorderBrushCheckedProperty);... | 1 |
0111351a083c06705ddf781ede236242 | 958238d6949e5bd5921f1c25b80d466c | Test of printTextDescompress method, of class Huffman. | public class HuffmanTest
@Test
public void testPrintTextDescompress() {
System.out.println("printTextDescompress");
String T = "maar";
String expResult = "1101101 1100001 1100001 1110010 ";
String result = Huffman.printTextDescompress(T);
assertEquals(expResult,result);
} | 1 |
88921d47e32df6bc0b7dfad82d599e01 | f24b995551d53f64914c518026c70cad | For all the custom dimensions we have in our request we call the respective function to combine the necessary fields.
Returns altered df with the final fields for all the custom dimensions | df['date'] = pd.to_datetime(df['visitStartTime'])
df['sess_date_dow'] = df['date'].dt.dayofweek
df['sess_date_dom'] = df['date'].dt.day
df['sess_date_hour'] = df['date'].dt.hour
for f in ['transactionRevenue', 'visits', 'hits', 'pageviews', 'bounces', 'newVisits']:
df[f] = multi_apply_func_o... | 1 |
c1f8e5afece7e60ce2575db828bb4fa9 | 566c94fcf716e5051cb6f581b1bd5fdc | reset feedback vector and detection flag | this->found = false;
this->ldir_vec = pcl::PointXYZ(NAN, NAN, NAN);
this->fdir_vec = pcl::PointXYZ(NAN, NAN, NAN);
this->r_vec = pcl::PointXYZ(NAN, NAN, NAN);
this->found = false;
this->angle = NAN;
this->distance = NAN;
this->quality = NAN;
this->frame = "";
} | 1 |
2fb8964ad4ac216e727f79bb8e64893e | 5436b91cce5c2b26e4223c1fb57a4231 | Retourne la moyenne des vitesses caculables sur le reseau | public class Stats
public static double vitesseMon(double denivPosCumule) {
double resultat = 0.0;
if (denivPosCumule < seuilM) {
resultat = monMax;
} else {
resultat = monMax - 0.25 * (denivPosCumule - seuilM);
}
return resultat;
} | 0 |
29d39e0c364f73252d150ee651ca6722 | c94b806043e46529c574dc53842bcbdb | Gets the container of {@link EventInfo} elemtents | public ComponentInfo getContainer(); | 0 |
8b7ba3dbc97c270def0fa1628feaf8af | 9473a94f81ea28b30c8415287387931f | Linear material function | return new MeshToonMaterial({
color: 0x00ff00,
reflectivity: 0.0,
shininess: 2,
});
} | 0 |
0aa3e4c4fc2be789151e2d72fb75cbc5 | 4f846b10596d43ea26cf15bc0d00792b | ++
Routine Description:
'Disable' button handler
None
Return Value:
None | {
LCID lcid = GetUserDefaultLCID();
switch (lcid)
{
case 0x0804:
case 0x0411:
case 0x0412:
case 0x0404:
EnableWindow(hWndButton, FALSE);
ShowWindow(hWndButton, SW_HIDE);
break;
}
} | 1 |
a5010a3d4aee1d1e7dd43641be67088a | 7327783601f30199ccc078c67bf1f9c2 | Retrieves the list of users that liked the photo | def getUserLikes(pictureId):
cursor = conn.cursor()
query = "SELECT U.FNAME, U.LNAME FROM USER U, LIKETABLE L WHERE U.UID = L.UID AND L.PID = '{0}'".format(pictureId)
cursor.execute(query)
return cursor.fetchall() | 1 |
3e0fbe0080557040c607b003f242c0e2 | f5da08983939a3ef8b9af64bcda11d0c | Full deterministic MI model | def mi(x, y, z=None, k=3, base=2, alpha=0):
assert len(x) == len(y), "Arrays should have same length"
assert k <= len(x) - 1, "Set k smaller than num. samples - 1"
x, y = np.asarray(x), np.asarray(y)
x, y = x.reshape(x.shape[0], -1), y.reshape(y.shape[0], -1)
x = add_noise(x)
y = add_noise(y)
... | 0 |
6ca11fadd90cb718fbc52733b9fc13b5 | 96bb9f029a257766028452b46cf820c5 | GET: Tablas | class TablasController extends Controller
public function index()
{
$tablas = Tablas::all();
return view('admin.tablasc.index',compact('tablas'));
} | 1 |
ad99c336d4abec4d817be5fe36c7c53b | ef65963dc6d8c3f8417f41b6b1f840e5 | Executes a query against a given database and returns a result handle | class Database
function Query($query) {
switch ($this->_DB) {
case 'mysql':
@mysql_query("SET NAMES 'latin1'");
$handle = mysql_query($query);
break;
}
$this->_lastHandle = $handle;
return $handle;
} | 1 |
faff7dfe8d5aa978c63154af26865bc3 | 0141648f2b4d2b9ca06e131bc0a4fdb9 | Listview Item全选 | isSelectAll = !isSelectAll;
Biz.checkItem(isSelectAll, ivCheck);
for (int i = 0; i < list.size(); i++) {
list.get(i).setIsGroupSelected(isSelectAll);
for (int j = 0; j < list.get(i).getChildren().size(); j++) {
list.get(i).getChildren().get(j).setChildSele... | 1 |
f6308a06566e5ce44a39173e25f803e1 | e67861e759b4a8d0ff45d38d774091b8 | @description: 登录如果需要二步验证码的话自动填入 | needResult = self.needIdenCode()
if not needResult == False:
print u"您需要手动输入验证码"
idenCode = self.getIdenCode(needResult)
if not idenCode == False:
print u"验证码获取成功"
print u"请在浏览器中输入您看到的验证码"
webbrowser.open_new_tab(idenCod... | 0 |
3e5704b198bdafd39269c8318fb8bfbd | 28693f0cc82ab543f78ae30a15df5452 | 转盘加速 | export class SDXLGameScene1 extends game.BaseScene
private fastGame() {
if (this.scatterIcon >= 2) {
this.fastEnd = true;
egret.clearTimeout(this.scatter4timeout);
egret.clearTimeout(this.scatter5timeout);
SoundManager.getInstance().stopEffectByName("reel_fast_spin_none_mp3");
SoundManager.getIns... | 1 |
d6c3243279eb37124be8a2e2ab092211 | 71279d847b7f9ebff60dbb9123bd035d | Return the context key from url params | public abstract class AbstractAction
extends TilesAction
implements ReservedParams
private String fromUrlKey() {
return Long.toString(Calendar.getInstance().getTime().getTime());
} | 0 |
58ed640c6c240cc3e0e2fd5576c285ad | 32f1e74145c0462739dac4d75712994c | 获取宠物等级信息 | JSONObject object = getDefaultParams();
try {
object.put(ProtocolManager.COMMAND,"petGrade");
object.put(ProtocolManager.OPTIONS,"pet");
object.put("petId",petID);
execute(object,RequestCode.REQUEST_GETPETGRADE);
} catch (JSONException e) {
... | 1 |
64cc8afc3e8a65b5ab1011820e784ca3 | e19a72b1221535ea7e4cbe8709e725da | Prefab templates shouldn't get registered in the scene | namespace CubeX
public static class XSerializatorUnity
public static Boolean IsPrefab(GameObject game_object)
{
return (game_object.scene.name == null);
} | 1 |
3c8c7bb2510d3a9f389d95159c895b87 | f15f1c19c3ea1b1277b383ebd12abc98 | Compares this vertex with another object to see if they are the same. Compares all components | namespace Ophidian.Losgap.CSG
public bool Equals(CSGVertex other) {
return Position.Equals(other.Position) && Normal.Equals(other.Normal) && TexUV.Equals(other.TexUV);
} | 1 |
0b6962bc75a5ceca90b07a8ae4e1a84f | 6a508608382597ac8fac497afcbcabf0 | 拒绝群邀请按钮的点击事件 | rippleShow(e);
setTimeout(() => {
this.props.isSolve = '已拒绝';
this.paint();
}, 500);
if (this.props.chatType === 'user') {
acceptFriend(this.props.id,false,(r:Result) => {
});
} else if (!this.props.activeToGGid) {
logge... | 1 |
debd168ef5820b47a6f4f4188d8d33bb | e7ec1826fd33e1b247c392709c567900 | Calculates geographical size of a tile at current zoom. | {
double siny = Math.Sin(lat * Math.PI / 180);
double y = Math.Log((1 + siny) / (1 - siny));
return (128 << zoom) * (1 - y / (2 * Math.PI));
} | 1 |
ccaf9a0ac9635d60965a6cacb05ebaa0 | 374f4d24748e1e7c536f8e228df6b349 | 將上次查詢的頁數恢復為1 | {
int fys = Convert.ToInt32(ht_where["PageCount"]);
if (fys < 0)
{
fys = 0;
}
ht_where["page_index"] = fys - 1;
BeginBindForUCPager();
} | 0 |
fefbdbee5102a1cb28d4a5c5f271d6da | 41ce0c60ce6a49fc0d6d7fe7bf22bf84 | Retrieve magnetic field object. | XsVector MtwSdiData::magneticField() const
{
if (empty())
return XsVector();
return m_magnetoMeter;
} | 1 |
40ff1f5996ec848ba2685d1c4b6aec1e | 8c823aba9c0d56fccaa0d694d0aa33cb | Draws the wait cursor | class MainApplication(QMainWindow, Logger.ClassLogger):
def setCursorWait(self):
self.setCursor(QCursor(Qt.ArrowCursor)) | 0 |
3aef2725a6cc4772c31da2956ac9da9c | fc5d0deb9c8e1114668501fee4bc53da | Pause Usb Service. | void USBD_HAL_Suspend(void)
{
UDPHS_DisableBIAS();
UDPHS_DisableUsbClock();
UDPHS_DisablePeripheralClock();
} | 1 |
47da549b812a7566f88d19a78e4c62ff | 547d47dc9951d483a6091df62adb2792 | 这是判断XML文件中是否包含目标标签的函数 | def is_contain_object(xml_path):
tree = ET.parse(xml_path)
return len(tree.findall('object')) | 1 |
c4d1da3f5cfe73beb47063258bc1b807 | 40a043b808d72543a7373432afb01ea5 | Sets focus parameter for product Log View | public class FunctionBusiness extends Function implements ToolConstants, TableColumns
public void page_Load(ActionEvent e) throws Exception
{
this.getViewState().setString("PRODUCTTYPE",this.request.getParameter(PRODUCTTYPE));
this.getViewState().setString("MENUTYPE",this.request.getParameter(MENUTYPE));
t... | 0 |
ad8b7bee0321f06722b23c59b8ba6f1c | 1b80f99cce3b9ffb9659d46437f86e72 | 持续看向玩家并停止当前移动 | if (playerTransform.position == Vector3.zero) return;
Vector3 currentOffset = CameraZoom.GetCurrentZoomDistance(cameraDirection, StaticDistance, startingDistance);
Vector3 desiredPosition = playerTransform.position + playerTransform.forward * lookAtPeek + currentOffset;
Vector3 currentPo... | 0 |
377d3cc686a0c462192b66266f4a97b7 | 2647f59a8dcf460bd8d50f49727b0890 | Gets partner data based on an array of partner-UIDs.
The selected data is made available in $this->query. | class CountActiveUsersPartnerTask extends CountActiveUsersTask
public function doIt() {
$jobData = $this->getJob()->getJobData();
if (empty($this->partnerIds) && isset($jobData['id'])) {
$this->partnerIds = explode(',', $jobData['id']);
}
foreach ($this->partnerIds as $partne... | 0 |
d77784cb73c59d2fcd425aa3b81bd537 | 4ea8a4672f9cdc4ac6de7de6d87cc8df | Generates rectangular mesh | void Vortexsimulation::getMesh()
{
for (int i=0; i<M_; ++i)
{
for (int j=0; j<M_; ++j)
{
xmesh_[i*M_+j] = xmin_ + j*dx_;
ymesh_[i*M_+j] = xmin_ + i*dx_;
}
}
celllist_.generateCelllist(cutoff_, dx_);
} | 1 |
4a75d22d24faf1546c42d4b0ef96ece0 | 8ffee1fdfdc656a9bb1d4fdfa9c32cf4 | This test verifies that an error is returned if a number is divided by zero | namespace Test.TestCases.Activities.Expressions
public class Divide : IDisposable
[Fact]
public void DivideByZero()
{
TestDivide<int, int, int> divide = new TestDivide<int, int, int>(12, 0) { ExpectedOutcome = Outcome.UncaughtException() };
TestRuntime.RunAndValidateAbortedEx... | 1 |
b393c607615f10c1ecf4db5c2200a1b9 | 84e6d1bbdea40f9fdea878a9ffe26d8f | Get all services that are inactive | namespace OpenEhs.Data
public class ServiceRepository : IServiceRepository
public IList<Service> GetActiveServices()
{
ICriteria criteria = Session.CreateCriteria<Service>()
.Add(Restrictions.Eq("IsActive", true));
return criteria.List<Service>();
} | 0 |
3bf91c382b9fac2d8bfa1b5b1b60695b | 7bdcf4ae69d9b270c9ce0da512985adb | Initializes a new instance of the FileStream class with the specified path, creation mode, read/write and sharing permission, buffer size, and synchronous or asynchronous state. | namespace SchwabenCode.QuickIO
public static partial class QuickIOFile
public static FileStream Create( QuickIOPathInfo pathInfo, int bufferSize )
{
return Create( pathInfo.FullNameUnc, bufferSize );
} | 0 |
1edd6a6dba1b8b9e3d8f1fd7264012f2 | 4823fe16952737ee5bd0fc6ae9483993 | Установить новое значение для описания поста | abstract class Postbox implements Type\EntityInterface, Type\ArraybleInterface
public function setDesc($desc)
{
$this->desc = $desc;
return $this;
} | 1 |
352de5fd3e4e35debf4aaa82d1ca9b8d | 2ef2bda372ad5a3efbe4b32f7c966809 | Computes the regularization penalty for the model.
Returns 0 if the model was not configured to use regularization. | eta = hparam['eta']
l2_lambda = hparam.get('l2_lambda', REGULARIZER.DEFAULT_L2_LAMBDA)
return eta * l2_lambda * w_m | 0 |
4850175c95d54c245afcdee6ac924f9d | 1a45e036c528a17f148519f1397f09ff | Clears 'helpers' list | class PB_LeagueHelpInfo extends \ProtobufMessage
public function clearHelpers()
{
return $this->clear(self::HELPERS);
} | 1 |
1564aaa603678c28a071c96cfb9a1a30 | 8422db8c038608e982b3db2aef81b26c | Sjá hvort það sé búið að skrásetja follow | def follow(person):
worked = True
try:
browser.get('https://www.instagram.com/'+str(person))
sleep(1)
followButton = browser.find_element_by_xpath('(//button)[2]')
followButton.click()
except:
worked = False
pass
return(worked) | 1 |
aa53e5409e9b9ab39aa46b47be6e0df3 | 5477692fd7bea57300e71af82ae3b752 | POST: api/AnswerTable | [ValidateAntiForgeryToken]
public IActionResult Create(AnswerGroup answerGroup)
{
if (ModelState.IsValid)
{
_context.AnswerGroup.Add(answerGroup);
_context.SaveChanges();
return RedirectToAction("Index");
}
... | 0 |
28150bb17e91a8a710e4847910d0eeac | dfba212335c8dfa4f4e60b16c1662c43 | Called by writeResultScroller(). Writes hyperlink to $url
with "title" attribute of $titleText. | void writeResult(URLStatus urlStatus) throws IOException; | 0 |
7a0e1e10b661d74861327a22f2024d8c | a19db17f6db6581dfca7f817b7b19947 | Получает и выводит в буффер поддерживаемые способы доставки клиенту | function getLogistics() {
$data = getData();
if (! empty($data->logistics)) {
$logistics = $data->logistics;
if (is_array($logistics)) {
echo '<p><select>';
foreach ($logistics as $logistic) {
global $g_logistics;
echo '<option>'.$g_logisti... | 1 |
54a86ba73af88241cf9a8e4c2eff0161 | 11f5d9a734abdde761ce20cbd7f997ce | SupportNone returns true if the file descriptor cannot support colors. | fn is_ansi_code_supported(&self) -> bool {
super::ansi_support::supports_ansi()
} | 0 |
de6a471e04f5cd463c1defe042cba807 | 02a7f879ff176b1f6dcd82cc20127292 | 根据用户账号得到角色ID | public Integer getUserRoleIdByUsername(String username); | 1 |
8dadf9d4b40a407f727dd8df972cc2de | 2b0a1da2f0530e6e5717aac8baa77f2e | Remove business location | class ShopLocationController extends Controller
public function destroy($shop_id, $id)
{
$location = Location::findOrFail($id);
$location->delete();
session()->flash('message.success', 'location removed');
return redirect()->route('shop.show', $shop_id);
} | 1 |
74b262299acaa6ffba373b27a5c9b153 | 1e7067c08ea5acb60e3a47b6f21f24c0 | 获取自己负责的课 | public class ClassController extends Controller
@Before(NeedLogin.class)
public void myClass(){
User user = (User) getSession().getAttribute("user");
if (true){
List<Course> courses = Course.dao.find("SELECT * FROM t_course WHERE IS_DELETE is NULL AND CREATOR = ? ",user.getUSERID());
... | 1 |
2a7367d2926380ec9f506d2cb2a9b930 | 1e0c2c82df611b49d11fed42611e16c9 | rotates 90 deg clockwise | RubiksCube temp = new RubiksCube(this);
faces[0].rotate90CCW();
faces[2].rotate90CW();
faces[1] = temp.getFace(4);
faces[5] = temp.getFace(1);
faces[3] = temp.getFace(5);
faces[4] = temp.getFace(3);
setFaceReferences();
setSideReferences();
} | 0 |
b5364ab08d325ed860e2cfa6e711f202 | 1e024128d2d39b0335edcdad3b484f2f | when redraw RadioGroup, must reset current scenario, so that onRadioButtonClick goes into correct case branch | namespace Microsoft.CognitiveServices.SpeechRecognition
public partial class MainWindow : Window, INotifyPropertyChanged
private void RadioButton_Click(object sender, RoutedEventArgs e)
{
ResetEverything();
} | 1 |
360caaa90287cbe93d98bfff65230088 | aef2baedf9dff25b3a75bd04c660f417 | 사운드 동적 지연 실행 코루틴. | namespace KKSFramework.Sound
[RequireComponent(typeof(AudioSource))]
public class SoundBase<T> : MonoBehaviour where T : SoundBase<T>
protected IEnumerator WaitPlaySound(int p_num, float p_delayed_time)
{
yield return new WaitForSeconds(p_delayed_time);
PlayOneShot(p_num);
... | 1 |
72d834437a0959f3cc608e4d778b7759 | 24e5ff6876efb421377901ade02e3da5 | Handler for Component -> Mesh -> Skinned Mesh Renderer. | {
if (this._material == null)
return;
this._meshFilter = this.GetComponent<MeshFilter>();
this._meshRenderer = this.GetComponent<MeshRenderer>();
this._meshRenderer.material = this._material;
} | 0 |
ff1550bf11bec1c64f6c754c8470d004 | d7c0a9132a4d80ebe9d1e4c4bc6ac9bd | ===============
CG_CalcViewValues
Sets cg.refdef view values
=============== | {
pwndSet->vstuName = GetViewName();
pwndSet->viTopP = TopPaneHeight();
GetPane(0)->GetScrollInfo(SB_VERT, &pwndSet->siT);
if (pwndSet->viTopP > 0)
GetPane(1)->GetScrollInfo(SB_VERT, &pwndSet->siB);
} | 0 |
0b8a7225cb6e5a309ee6283bd6607e03 | 0ee003aea856b4351a41905ea6e18024 | Factory function to create appropriate handler.
Supported types: message, event | def create_handler(handler_name, event, context):
return get_class_for_handler(handler_name)(event, context) | 1 |
c9c7c6e26119b91a0f20c29e532c5ea0 | f7f5fb95190fcd58e3667250ce80665c | 创建一条水平关联数据 | {
if (is_object($data)) {
$data = (array)$data;
}
$current = get_class($this->currmodel);
$target = $this->target;
$data[$this->linked_col] = $this->currmodel->{$current::incrColName()};
$model = $target::create($data);
Buffer::set(
$current::hasOneKey($target, $this->currmodel->{$current::incrColN... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.