query_id
string
corpus_id
string
query
string
code
string
label
int64
0f65ecdd1b9259fb45a0c4d7e7f0d1cb
545647169fb08ada447840da749b8e43
Load nav search.
function succulents_qodef_get_search() { succulents_qodef_load_search_template(); }
0
4cda5e36f7d82413a2bc9a61cc29d49a
de8c96d90107ef7947b3967a8db8d2a4
Returns all the items a given user evaluated and their ratings. Used mainly by all the metrics calculation
class Recommendation: def _get_item_list_rated_by(self, user_name: str) -> List[str]: ratings = self._get_ratings_for_one_user(user_name) idx = np.where(ratings != self.missing_value)[0] return np.array(self._item_list)[idx].tolist()
0
ed21f7dd0cefa1fcf8d7f1cb8be28174
617f1da90abffca2af4148e1832d1f6b
发送微信客服消息图文
@Controller @Namespace("/wx") @ParentPackage("p2p-default") @InterceptorRefs(@InterceptorRef("wechatStack")) public class WeChatAction extends BaseAction{ @Action(value = "sendCustomNewsMsg",results={@Result(name="success",type="redirect",location="/wx/getCustomTextMsg.html")}) public String sendCustomNewsMsg() throws...
1
75e3136f3d652b3f3569c5cb441cf044
56044db569180852b1f49ae118e24085
rolls a set of 7 stats, dropping the lowest. Each stat is rolled as 4d6 dropping the lowest but adding ones.
{ register int i, tot; int dice[18]; do { tot = 0; for (i = 0; i < 18; i++) { dice[i] = randint (3 + i % 3); tot += dice[i]; } } while (tot <= 42 || tot >= 54); for (i = 0; i < 6; i++) py.stats.max_stat[i] = 5 + dice[3*i] + dice[3*i+1] + dice[3*i+2]; }
0
5e796bbf8d32f107aed830bbdf6b84fa
dd4345d817a7a2f03a34cba59bc5d202
Pone las materias disponibles en el Selector
Clases selected = this.getSelected(); if (selected != null && materiasController.getSelected() == null) { materiasController.setSelected(selected.getMaterias()); } }
0
d925215fb5b7167e83f9969fb38429a0
457afa190130d2c9d738c3363b2b2449
Scrolling event handler for edits that scrolls the markdown preview as the edit scrolls, keeping the two in sync
$('#edit_block').off('keyup'); if (enabled) { var timer = false; $('#edit_block').on('keyup', function() { if (timer !== false) clearTimeout(timer); var self = this; timer = setTimeout(function() { var md = $(self).val(); $('#preview_block').html(marked(md)); }, 500); }); } }
0
de5412062221c5b7f8e6433d8840eed4
7471cb089fad2d5655ed566e41bcfd15
Spawns a single fruit at a random location on the BOARD. Only spawns fruit in a free spot. Finds a random x and y position on the BOARD, and draws a 2 = a fruit
stop = False while not stop: ranX = random.randint(1, self.width-2) ranY = random.randint(1, self.height-2) if self.board[ranY][ranX] == 0 and [ranX, ranY] not in self.snake: self.board[ranY][ranX] = 2 stop = True self.s...
1
c2e6e8fefbfc3834e8bda981c9827309
20826c506f03ad87bc0fa0fd63b068b9
Aquest mètode verifica si una beguda és destil·lada o no.
bool isPeur();
0
31b0f138954646691c013095e2e21e7d
c49644225b674eaf8d599d60f3afef84
Load alignment score matrix for alignment measure methods like Needleman-Wunsch.
def _init_matrices_nw(aln1, aln2, gap_open_penalty, gap_extend_penalty): shape = (len(aln2)+1, len(aln1)+1) score_matrix = np.zeros(shape) traceback_matrix = np.zeros(shape, dtype=np.int) traceback_matrix += _traceback_encoding['uninitialized'] traceback_matrix[0, 0] = _traceback_encoding['alignment...
1
e5d6a3e445d9be23f29ddd042073f243
5b3ffe9be16bfc973a93e2fe50dcee6f
Returns a mapping containing service statistics.
public class ReferenceTreeMetaModel extends OnDemandServerPush implements Closeable public Map<String, Long> getAllowedServiceStatistics() { long CRITICAL_UNSCHEDULED_COUNTER = 0; long CRITICAL_SCHEDULED_COUNTER = 0; long WARNING_COUNTER = 0; long UNKNOWN_COUNTER = 0; long PENDING_COUNTER = 0; long OK_COUNT...
1
1483da190013871b2d5a84fc8a84974c
80dbc74548509991958d5e5deae3d2ff
作用:月份的写法转化,英文式转换成阿拉伯数字式 传入英文的月份简写
function Month(month) { switch (month) { case "一月": month = "1"; break case "二月": month = "2"; break case "三月": month = "3"; break case "四月": month = "4"; break case "五月": month = "5"; break case "六月": month = "6"; break case "七月": month = "7"; break case "八月": month = "8"; brea...
1
1af7773a051c5de74a8a0dda1c522ea3
31eab6674e65bdcd045d0703184edbed
设置SPO_Allocation窗体关闭时候,实例为空
namespace WpfSkyline.BLL public partial class SPO : Window void newspoAllocationForm_Closed(object sender, EventArgs e) { spoAllocationForm = null; }
1
74d470be531ddd34ac4c6d3182d6da86
7585e5975a3e6dc531af9154fabc40b3
Handle request for checklist section message from worker.
event_type = request.values['Event.1.EventType'] assignment_id = request.values['Event.1.AssignmentId'] q.enqueue(worker_function, event_type, assignment_id, None) return Response( dumps({"status": "success"}), status=200, mimetype='application/json')
0
418f5b956a98ffacb6756d7b0bcf65af
3b66594fc86cc0a5a38ea9da0b2f7885
Handle resizing the InputField after a client resize event so that the splits dont get too big.
public void onResize(final TResizeEvent event) { if (event.getType() == TResizeEvent.Type.WIDGET) { TResizeEvent editSize = new TResizeEvent(event.getBackend(), TResizeEvent.Type.WIDGET, event.getWidth() - 2, event.getHeight() - 2); editField.onResize(...
1
b275453f81de73ad95641850d677dc9e
ba24a6d9d1441868a31acae72ae7fc3d
Returns the game's namespace from the <code>NamespacedKey</code> (not linked due to class import - compatibility) class, or <code>null</code> if an error occurred/not supported (server versions 1.11 and older).
Request.GetNamespaceRequest request, UnityAction<AsyncResult<Result.GetNamespaceResult>> callback ) { var task = new GetNamespaceTask(request, callback); return Gs2WebSocketSession.Execute(task); }
0
87fa884c6cf97e3c388a6949245cf593
89b474285a8815a7464190b3440279f2
Provides a formatted version of the reference [1,2,3] => "1.2.3" override this in your model if you want to format the references differently
namespace Jolt.Net public abstract class BasePathReference : IPathReference public string GetCanonicalForm() => $"{GetToken()}{_pathIndex}";
0
adba5390cb870a527049b6fd85616655
675059efa406767efbb0ea92182b6136
Returns the static Vocabulary ID set for this term. If you want the actual Vocabulary object, use getVocabulary instead.
$vocabulary = $this->vocabulary(); $vid = $vocabulary->vid; static $cache; if (!is_numeric($vid)) { $vid = TermVocabulary::model()->getIdByMName($vid); } if (!isset($cache[$vid])) { $res = $this->findAllByAttributes(array('vid' => $vid)); $cache[$vid] = Utils::arrayColumns($res, null, 'tid'); } ...
0
e0a2109468d3337953ce6bfe9f6798e2
5211cce0e4c96758de2f1fc39a9b1eeb
Does nothing, exists to ensure compatibility
function DoNothing() end
1
98caa335861df83890781b22352b70b4
37ee005ff6297a0262fe6c16a8956d9c
A tiled, rectangular setting on which a little universe takes life.
self.width = width self.height = height self.data = [[EMPTY]*width for x in range(height)] self.generation = 0
1
d1e12cd7a496d11fbcf0eaf20b0b584d
884200ef5267732117dcbaf475768904
轻点图片区域隐藏顶部栏、底部栏
let bottomBar = document.getElementById("bottomBar"); let spacingDiv = document.getElementById("spacingDiv"); if (document.hasFocus()) { bottomBar.classList.add("slide"); spacingDiv.classList.add("slide"); } else { bottomBar.classList.remove("slide"); spacingDiv.classList.remove("slide"); } ...
0
b65786600ce59d2d402d9d702d108985
ef4512f493233a92fb6d0627cad1f53c
Enables the tab with the given ID.
namespace DumbPrograms.ChromeDevTools public class DevToolsClient public Task<string> ActivateTab(string id) => HttpClient.GetStringAsync($"activate/{Uri.EscapeUriString(id)}");
1
b9965ccc50fe841b5426e16625b54fa0
40969dfa823aa74882170d3c5787002f
calculate the mean obliquity of the ecliptic (in degrees)
def obliquity_of_the_ecliptic(epoch=REFERENCE_EPOCH): a = 23.0 + 26 / 60.0 + 21.406 / 3600.0 b = -46.836769 / 3600.0 c = -0.0001831 / 3600.0 d = 0.00200340 / 3600.0 e = -0.576e-6 / 3600.0 f = -0.0434e-6 / 3600.0 t = (epoch - REFERENCE_EPOCH).days / 36525.0 return a + b * t + c * t ** 2 +...
1
7178c01942a1535b50c057d6f1d72da4
4ab7602c2daad91860d9d8e79457b0f0
批量未签到接口
interface QYService @FormUrlEncoded @Headers("Domain-Name:${Api.APP_DOMAIN_KEY_6}") @POST("attendance/sign") fun sign( @Field("cuid") cuid: Int ): Observable<BaseEntity<Sign>>
0
98c58d513077ffc2b55b3b547ffae6ca
f2a56af6830a7dd87898ce97c0344db0
Searches the nodes with lower path costs in the search graph first.
def uniformCostSearch(problem): return graphSearch(problem, PriorityFrontier())
1
e336a273f48419b7cb98eb1aa938d3fe
f15e57a6e2a00b04ab114217c228f745
Description: Randomly selectes the given number of items from the given file. Input: File with items and number of items to select. Output: Subset of items in file. Precondition: File must follow the proper format.
sample = [] with open(filename,'r') as f: for i,line in enumerate(f): if i < NSAMPLE: sample.append(line) else: k = random.randint(0,i) if k < NSAMPLE: sample[k] = line return sample
1
a11c7f8c26d9e1d9246917b730949c92
1f0174f3b28406eb69d81331e93cc5f7
Стандартизация изображений
proc_img = (img - np.min(img))/(np.max(img)-np.min(img)) if debug: print('standardize') plot_img(proc_img) return proc_img
1
b0bc20dc763b4301326cbe4c4ec011a0
944c79fbdfbee4289d30338831a52342
读取并保存第offset页的数据
def main(offset): json = get_page(offset) for item in get_image(json): print(item) save_image(item)
1
ab8cd33acd18c61f22f9b4e510ee52f9
74f40eaa0e9de8b7493da4bc9442fb02
在托盘中显示,并隐藏主窗体
namespace daily.UI public partial class FrmMainThread : Form private void ShowMainForm(FrmMain frmMain) { if (frmMain.WindowState == FormWindowState.Minimized || frmMain.WindowState == FormWindowState.Maximized) { frmMain.WindowState = FormWindowState.Normal; ...
0
72edc51840807b24cb62a9a3b061d39b
577aaead7230cb2c23230bd95e15afcb
积分规则分页
namespace InkeServer.Service IPaginationResult<IntegralAdjustPageResult> GetIntegralAdjustPage(IntegralAdjustPageRequest param);
1
af084243605e6aae28448a5097551404
182291d0558528ef6fcbda71787bdbd8
Replaces hypen character found in the string with underscore
func toUnderscores(str string) string { return strings.ReplaceAll(str, "-", "_") }
1
cfb165a1ab6bb16f5bcbcce879670356
f6223087782af7207fa1f28375afc25a
Отсеять задачи, оставить только для выбранного проекта, если проект не выбран, то вернёт все задачи
{ $filters = $request->getSession()->get('filters'); $issues = array(); if (empty($selected)) { $issues = $this->searchIssues($filters); } else { foreach ($this->issues[$filters['project']] as $issue) { if (in_array($issue['issue']->getId(), $s...
0
20be7c478d2d56a7edb07c514bfbb13a
546354e9c54c704f12634d563653a687
Draw a triangle using the shader pair created in onSurfaceCreated()
glBegin(GL_TRIANGLES); glColor3f(0.0f, 1.0f, 0.0f); glVertex2f(-0.2f, 0.0f); glColor3f(0.0f, 1.0f, 0.0f); glVertex2f(0.2f, 0.0f); glColor3f(0.0f, 1.0f, 1.0f); glVertex2f(0.0f, 4.0f); glEnd(); }
0
55386f9e432891d0b7b4baac1a6ae50a
69fc60213e0452725d5d201fb649ec62
Tests {@link LinkedList#removeLast()}.
System.out.print(ANSI_BLUE + "Test of addLast(E element)" + ANSI_RESET); System.out.println(ANSI_YELLOW + " LinkedList" + ANSI_RESET); addRandomValuesToLists(testList, standardList, 20); displayLists(); for (int i = 0; i < 20; i++) { int randomIndex = random.nextInt(1...
0
dbebb4af583aa11a2d5c25f54ddf2c61
699a614e4e6520a821811a5c6f23a115
Method used to get a restriction by its id
class EditRestrictArea{ getRestrictEntity(restrictId){ let resentity=undefined; for(let i=0;i<this.entities.values.length;i++){ if(this.entities.values[i].properties.index._value===restrictId){ resentity=this.entities.values[i]; break; } } ...
1
6f81f61107ff1118274316c842be83b9
d5a2411c2d241a92c99a96e89340fe7f
ritorna la lista degli oggetti in vendita del venditore attualmente loggato come tale
public class MyAccountController extends PageController{ public ArrayList<Item> getCurrentSellingItems(){ return this.currentSellingItems; }
1
a236a44db1f4d6f12dadb9ba7714b513
b7a421130343c1e194be8b74fde39570
Возвращает статус дружбы для конкретного пользователя
class JSON_API_BuddypressRead_Controller public function friends_get_friendship_status() { $this->init('friends'); $oReturn = new stdClass(); if ($this->username === false || !username_exists($this->username)) { return $this->error('friends', 0); } if ($this->friendna...
1
4ad0c1dcc9ed039b8b71dd75b2f78b65
c2a62f23db023004d56b14bb4b9d53c5
사용자 별 맞춤 추천 영화 API 테스트 코드
class MovieTest extends GraphQLTestCase public function testMySeekMovies() { SeekMovie::factory(5)->create([ 'user_id' => $this->user->id, ]); $query = file_get_contents(__DIR__ . '/Movie/mySeekMoviesQuery.graphql'); $headers = $this->getRandomUserHeaders($this->user); ...
1
20c99f07978ec8c546a5791e7befba30
5fce0c80c99ec2c5d14e942b3791599f
Renders the credit and BackButton sprite
{ base.Render(); IGraphicsDeviceService graphicsService = (IGraphicsDeviceService)game.Services.GetService(typeof(IGraphicsDeviceService)); GraphicsDevice device = graphicsService.GraphicsDevice; SpriteBatch.Begin(SpriteSortMode.Deferred, BlendState.Opaque); ...
0
c923999bc6b5c031316b75a23f3e3c27
e1a86c8ef378c4738018217d2ab857b9
Метод, выводящий список доступного для заказа кофе
{ $coffees = DB::table('coffee') ->select('coffee.*','group.name AS nameg','category.name AS namecate') ->leftJoin('category', 'coffee.type', '=', 'category.id') ->leftJoin('group', 'group.id', '=', 'coffee.code') ->where('coffee.is_active','=',1) ...
1
331c503585332a9449889ffa75fc3990
ff8f459045a57e0cdcd06f0d46f1f2bb
批次設定教師角色
const db = await dbManager.db(); const configsCollection = db.collection("configs"); await configsCollection.updateOne({ _id: guildId }, { $addToSet: { teacherRoles: roleId } }); }
0
aaec84a71c28817390b6cb7c221ee9aa
598011187e2e1edf6b6cb6e0e9939428
Resets the preview panel video source
function onReset (e) { e.preventDefault() e.stopPropagation() URL.revokeObjectURL(inputVideoURL) URL.revokeObjectURL(outputVideoURL) outputVideo.src = '' outputVideo.controls = false inputVideo.src = '' mediaRecorderSetup() }
1
4987b0c7981622ba0446bff9942e6cf0
2671d224f269e4b772a46f150f8302b0
inject head includes into controller.
class UserController extends Controller public function includes() : array { return ['roles']; }
0
50355ae90b9ca57f9d0b84432dfb7908
abb8ca9c4da1ec9ccf4f6228d5e11cd9
Call timePassed() on all sprites.
for (int i = 0; i < this.spriteList.size(); i++) { Sprite call = (Sprite) this.spriteList.get(i); call.timePassed(); } }
1
b4fb700556d6cd9e775d55be3233dd91
d4d0bf08fc65a51cbed0b51b83bf4e92
Consulta de formato de impresión. 1. Primero dá prioridad a la configuración realizada en la ventana de formatos, filtrando por compañia y organización. 2. Si no encuentra un formato específico para la organización, obtiene uno asignado para la compañia sin filtrar por organización. 3. Finalmente, si tampoco hay result...
MPrintFormat pf = null; String sql = " SELECT AD_PrintFormat_ID "+ " FROM ( "+ " (SELECT Order_Printformat_ID AS AD_PrintFormat_ID "+ " FROM AD_PrintForm "+ " WHERE AD_Client_ID = ? AND AD_Org_ID = ?) "+ " UNION "+ " (SELECT Order_Printformat_ID AS AD_PrintFormat_ID "+ " FROM AD_PrintForm "...
1
f04a4146288717fe9f5f21013b19286b
e06c8aad6a38e6b6f9d6b0ca3f716375
Creates and returns the streams proxy associated with this process.
{ IWfProcessDescriptor result = null; if (this.Descriptor.IsMainStream == false) result = this.Process.MainStream; return result; }
0
bfd637ab781ca12aacf1b7a6c8306a91
a17602da075ffd20b9d33b67a0ba82e2
Adds or updates a special flow in br-int to mirror (duplicate and redirect to 'out_port_id') all ingress broadcast/multicast traffic, associated with a VLAN, to possibly multiple tap service instances.
fm_virtualNetwork *vn) { fm_status status; fm10000_switch * switchExt; fm10000_virtualNetwork *vnExt; fm_int aclRule; fm_aclCondition aclCond; fm_aclValue aclValue; fm_aclActionExt ac...
1
83ddcaed271a3e317115e0217a735db3
8ab92947f8bf158083ea4645b7f72687
only counts proper divisors
int amount_of_divisors(int x){ if(x==1)return 1; vector<int>v=fast_fact(x); int ret=1, curr=2; for(int i=1; i<v.size(); i++){ if(v[i]==v[i-1])curr++; else{ ret*=curr; curr=2; } } return ret*curr; }
0
e2d0b61306b46172913ec6107f563ae2
19f9f43dd145af5f594b704055ebe3b4
获取库存中最后一辆车的开拍时间
local content = download("http://beijing.bidchance.com/tsp_110000_0_02_0_1.html",{}) local tmp = findOneHtml("#lie tbody:eq(0) tr:eq(0) td:eq(3)",content) if tmp==nil and string.match(tmp,"(%d+)")==nil then timeSleep(60) return getLastPublishTime() else return com.parseDate(tmp,"yyyyMMdd") end end
1
c25ea23e081c48197dda1336fe229696
1623b889861d62872d5f1e94070b3880
获取商家银行卡id
public class UserInfoConfig public String getBankId() { return bankId; }
1
7bba654b69042f1af2185c1aa7f5809d
b86809064fa70c6596f8d8d7e34db65c
returns JSON of all files matching inputted attributes
self.files = util.get_files(self._src, '.json'); values = []; for item in self.files: if item.find(_match) == -1 or item.find(_filter) != -1: continue; try: f = open(item, 'r'); data_string = f.read(); f.close(); decoded = json.loads(data_string); except Exception, e: util.log("Er...
1
2604a0dc39bc829151e298accb56cb90
5731a582d725602f6788c8d8955cb54f
获取二维数组中已勾选/没勾选了某元素,并返回二维数组
function isCheckedJson(){ var markJson = {}; var mark = false; var arr = []; var obj = $("#table_con table tbody tr"); var th_check = $("#table_con table thead tr th:first input").prop("checked"); if(th_check){ mark = true; obj.each(function(i){ arr.push(i); }); }else{ obj.each(function(i){ if($(th...
0
b9cdaadd63df5fca2a7c866535cf6aee
23bfbae34737815aea8ecc8847eed90d
소셜 로그인 가입 여부 확인
class SocialLogin extends Model public function getSocialParams($provider) { $userFromSocial = session()->get('userFromSocial'); $existNick = User::where('nick', $userFromSocial->nickname)->first(); $message = [ 'password' => '개인정보보호를 위해 비밀번호를 설정해주세요. 회원정보수정 시에도 사용됩니다.', ...
1
3b90e5993fdf460717e73d5e7ddc742d
1f190505f0a4ea0bd236543cccf8bc62
Create a CustomUser instance that requires authentication via shibboleth.
shib_user.displayname = shib_attrs["fullname"] shib_user.email = shib_attrs["mail"] shib_user.shibboleth_attributes = shib_attrs db.commit()
0
0a510e9cb3bdaf280d4b2ff1df00428f
7402819d5caa6f0ba664dc70a8e4d74b
This method runs the given method.<br> In case given method finished running within timeoutInMs limit it returns Either which left value is the result of the method that ran.<br> In case given method did not finish running within timeoutInMs limit it returns Either which right value is false. <br>
V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException;
0
4e5f20fa60cec101a804f077bf028b07
ba07982e891f11953280b9fd3c7a1408
Sets the value of a given option in this option table.
class RTable extends JTable public function setOption($key, $val) { $this->_options[$key] = $val; return $this; }
1
937db1765c72b7d158c1bc14925d1a2f
6d725ebe9e10912e068f02be2ea885e2
Constructor: Este es el constructor de la clase empleado.
class Empleados : public Personas Empleados(string sNom, string sApe,string sDepto,float fSueldo) :Personas(sNom,sApe) { sDepartamento = sDepto; fSueldoDiario = fSueldo; }
1
3b25b18e45763b0f2ac766a53c31a3cb
8d86bbe23a3a0fc4cb21c0dc4d82e6a4
Tests delete with multi level sub query.
public class StatementTest @SuppressWarnings({ "rawtypes", "unchecked" }) @Test public void testDelete() { Object result = null; List resultList = null; result = statement.execute(ndb, "delete:root->parent->child->name:jim !! [sex, age]"); result = statement.execute((Map<String, Object>) result, "select:root-...
1
99d4960def3461bdae28a02657cabcd5
ead44a59d7c62026f75c4c8135e0afc0
slot włączający lub wyłączający dostęp do elementów zmiany rozmiaru
void LDrawWgt::setResizable(bool bResizable) { m_pFilter->setResizable(bResizable); setAttribute(Qt::WA_Hover); }
1
3dcef5f5d173f24d0206e9bdf9f993cb
bc6d4b17e5003af693d4affce05192e6
Gets available congestion control algorithms
class Algorithm public function getAvailable() { return array( 8 => 'crc32b', 16 => 'fnv1a64', 32 => 'ripemd128', 40 => 'tiger160,4', 48 => 'tiger192,4', 56 => 'haval224,5', 64 => 'ripemd256', 80 => 'ripemd320', ...
0
4825587e5548055eb21b7c451f14a6a7
79b6ac7746d2307b2a25abcbdcf939f3
Handle data path when a load request finishes.
class ArcRequestSource extends RequestSource onIdLoad_(event) { this.loadCount_--; var request = (event.target); var response = (request.getResponse()); dispose(request); this.importer.startImport(response); if (this.loadCount_ === 0) { this.setLoading(false); } }
1
a759fc6edb2495d3226e2d5167eb561b
2172fb806acb0c617d2ca8e6efad5c30
Calculate each type of mobility cost.
if row[jtype2] == 1 or row[jtype4] == 1 and row[jtype5] != 2: row[a_target] = row[freeflow] + (penalties[avg][rtype] / 2) row[m_target] = row[freeflow] + (penalties[midd][rtype] / 2) row[r_target] = row[freeflow] + (penalties[rush][rtype] / 2) return row
1
f5a0ee298ce6f5424919c15035e87c3b
f05021a22ab34c0708eb16ebad243254
根据parentId删除gas_device_resource表数据
@Service @Import({ ShellmerchantDataSourceConfig.class }) public class ShellmerchantTestBase public void cleanGasMerchantGoodsByPartnerId(String partnerId) { if (StringUtils.isBlank(partnerId)){ partnerId = "test_partnerId"; } GasMerchantGoodsDOExample exam = new GasMerchantGoodsDO...
0
f06b0b5f28afe0f889b025daab1607d2
295be009b4eab59f0235b9c5f979baa6
通过流程id获取借款申请数据
export class RedApplyService getApplyDataById(applyid): Observable<any> { return this.http.post(getApplyDataUrl + applyid, null, this.options); }
1
cc75f783eeafcce13b7d39d76cd0bd57
e588585ac7a9557880ad2b501283adec
显示公海客户
@GET("appPublicsea/getCustomerInfoById") rx.Observable<PublicSeaListBean> getPublicseaCustomerInfoById( @Query("UserName") String UserName, @Query("UserId") int UserId, @Query("token") String token, @Query("ClubId") int ClubId, @Query("CustomerId") String ...
1
fb202c765fe15bc0e7edcf4f97015587
6bfba6591784749398fcf97e5c743e79
双边快速排序,给数组分边-数据会根据startIndex为基准值,给数据分边,并且返回基准值的坐标
public class QuickSort private static int partitionBilateral(int[] arr, int startIndex, int endIndex) { int pivot = arr[startIndex]; int left = startIndex; int right = endIndex; while (left != right) { while (left < right && arr[right] > pivot) { right--; ...
1
d06ea2da32b723da3bb5b6143587be72
08df202875702837eb16c81b775c7969
获取dialog的Behavior 并设置 Peek高度
public abstract class BottomSheetPicker protected void initDialog() { int dialogHeight = getHeight(); ViewDataBinding binding = getBinding(); if (binding != null) { View contentView = binding.getRoot(); mBottomSheetDialog = new BottomSheetDialog(mContext); mBo...
1
2ef34aaab2c61e08047302b6c0ceb33c
9593365f8062a066cf090de276a4f396
Return a list of the (symmetric key) encryption algorithms the server supports, when receiving stuff from the client.
public function getSupportedAlgs();
1
41f6d06a66139c99cb935b95f83a8b15
47d0f5be00562ad1fce57284a8269b77
Tests the input for non-unique line/assay naming prior to attempting to insert it into the database, then captures errors if any duplicate names would be created during database I/O. Testing for inconsistency first should be efficient in may error cases, where it prevents unnecessary database I/O for line/assay creatio...
public void testUniqueNames() { System.out.println("In Test 1"); try { String lineb = inb.readLine(); if (lineb.startsWith("SUBMITNAME")) { outb.println("Chandan"); } lineb = inb.readLine(); System.out.println(lineb); assertTrue(firstpartyready && lineb....
0
a299a7bf61f392698f23ce9cd7a4b85c
af8334984ffc83cf1f6a67963a5c71ca
Only users associated with the trip can view the trip.
class TripsController extends Controller public function __construct() { $this->middleware('auth', ['except' => ['index']]); }
0
9f39246299a5004d89665f451f84d802
1890d72dd81071a2ff5e0042b332c3e9
separate into input and output
def splitIO(db, output_name): df = pd.DataFrame(db) y = df[[output_name]].as_matrix() del df[output_name] x = df.as_matrix() return np.asfarray(x),np.asfarray(y)
1
109d950a4662d3a460d71eb8a8e3ed6f
595abefc69012728cb28ff5a20ca8c27
! @brief Executa a funcao de inicializacao dos pinos relativos ao GPIO e de acordo com o botao apertado, controla a cor dos leds piscantes conforme ou a frequencia em que piscam proporcional ao intervalo ds tempo que o botao ficou apertado.
short pta12, pta5; uint8_t cores_estaticas[] = {1,0,0,1,1,1,1,1,0,0,1,1,1,0,1,0,0,0}; uint8_t *cores_dinamica; int indice = 5; float freq_estaticas[] = {0.5, 1.0, 2.0, 10.0, 30.0, 60.0}; float *freq_dinamica; int nivel = 0; int time; inicGPIO(); cores_dinamica = (uint8_t *)mallo...
1
cdf1a694238b0a64b20cd05f25df4031
c9fed3caf1935c599f7323f8b19408d9
Create a red black tree struct using the specified compare routine. Allocates and returns the initialized (empty) tree.
AVL *avl_create_tree(int (*fcmp)(void *info, const void *key1, const void *key2), void *info) { AVL *tree; tree = xmalloc(sizeof(AVL)); tree->pool = dmp_create_pool(); tree->root = NULL; tree->fcmp = fcmp; tree->info = info; tree->size = 0; tree->height = 0; ...
0
622acc268d894dcb30c4cdaaf17a1f1e
1b555f05308726fd9c7af267c5ecf522
Remove ASCII control characters Removes all ASCII control characters except horizontal tabs, line feeds, and carriage returns, as all others can cause problems in XML
namespace SolrNet.Commands public class AddCommand<T> : ISolrCommand public string RemoveControlCharacters(string xml) { return Regex.Replace(xml, "&\\#x(0?[0-8BCEF]|1[0-9A-F]|FFF[E-F]);", ""); }
0
98a7001b6b4b9e3a56448afe17720d23
a3eef032180c06dc6f14017e84318cab
反射获取父类非公开数据
public Object getField(@NonNull String fieldName) { try { if (getClass().getSuperclass() == null) return null; Field field = getClass().getSuperclass().getDeclaredField(fieldName); field.setAccessible(true); return field.get(this); } catch (Exception e...
1
f7304cd62f67a236c316bab1d8e1136b
c61040f16a340fd443c2cde1c7ef2046
Setup the VNC VRDE module.
static void vrs_service_init(void) { uint32_t err_code; ble_vrs_init_t vrs_init; memset(&vrs_init, 0, sizeof(vrs_init)); vrs_init.evt_handler = NULL; vrs_init.support_notification = true; vrs_init.p_report_ref = NULL; vrs_init.initial_vibration = 0; vrs_init.bl_rd_sec ...
0
e699c5dfefc44c80885b725cf43388ea
56827d8f640dd51a9417ddf261676523
Clears all of the information from the screen.
namespace BRB_Console_File_Manager public static class ConsoleFileManagerFunctions public static void ClearInfoArea() { ClearRowOnScreen(1); }
0
62e82df92a7a45e60cba673fa6d4babf
10b2da22a064e3f07087ae255caa2ef3
Permission check for getting a single item.
class WCC_REST_Customer_Controller extends WC_REST_Customers_Controller public function get_item_permissions_check( $request ) { return is_user_logged_in(); }
1
005a428032e3b782ae37a3864ac402ee
b5d922dc319db6c967d266639d092713
Testar Konstruktorn i triangel som tar tre emot tre double värden som argument
namespace Geometry public static class Planimetry private static bool checkTriagle(double oneS, double twoS, double threeS) { return (oneS < twoS + threeS) && (twoS < oneS + threeS) && (threeS < oneS + twoS) ? true : false; }
0
a877e5a3515f113ed21f9113bed3fde6
b3ae767db355f35f59cdfbc38ab727cb
Gets the "RaceId" element
int getRace();
0
a2254d4ca267856179c7475458f95c8d
5bf0b629884f665930e700364d3d7e87
Streams SX Camera's current footage.
while not self.stop.is_set(): self.frame = self.cam.get_frame() self.track_module() try: self.stream_queue.put_nowait(self.frame) except Full: pass
1
664709d5aa01f3e4c5e1dc6a3a7fbdc9
54fbbc10ac8f9d13253f5ac9c4022a3b
Test if isSyntacticallyCorrect() is implemented correctly
class NanoHttpStatusTest extends TestCase public function testIsThereAnySyntaxError() { $object = new NanoHttpStatus(); $this->assertTrue($object instanceof NanoHttpStatus); }
0
dc527144135301c88b3219c4da406ce8
39177072f0615644ba7f33cdec3bc2ce
System.Void UnityEngine.Events.UnityAction`1<UnityEngine.SceneManagement.Scene>::Invoke(T0)
{ il2cpp_codegen_raise_execution_engine_exception_if_method_is_not_found((RuntimeMethod*)(__this->get_method_3())); RuntimeObject * result = NULL; DelegateU5BU5D_t1703627840* delegatesToInvoke = __this->get_delegates_11(); if (delegatesToInvoke != NULL) { il2cpp_array_size_t length = delegatesToInvoke->max_lengt...
0
24bcd6004ced697a44a245490790197f
cf0f7366034d93c3509a3de0e09f3243
Is raw transaction valid and decodable?
try { const tx = SolTransaction.from(Buffer.from(rawTransaction, 'base64')); tx.serialize({ requireAllSignatures: false }); return true; } catch (e) { return false; } }
1
d0a0c11d262ad15c564817c954122077
81ad5233fc919a57a5cbb118d037bafd
query_mdms outputs "MDM-ID <System/MDM-Id> SDC ID <SDC-Id> INSTALLATION ID <Installation-Id> IPs [0]-x.x.x.x [1]-x.x.x.x" for a MDM with ID: <MDM-Id>
def qprintd(argv1) return nil unless argv1 return argv1.unpack('M').first end
0
55f771d42b561dc7ae4ff2e7a4e4cf36
878b519de51b49a81709695ecf9d9fd3
テンプレートに登録されているものを全てツイート
begin tweetArr = [tweetArr] unless tweetArr.kind_of?(Array) disp_tweets = tweetArr.flatten.sort_by{|tw| tw.id}.uniq{|tw| tw.id} if self.remove_retweets? then regular_tweets = disp_tweets.select{|tw| tw.kind.regular_tweet?} retweets = disp_tweets.select{|tw| tw.retweeted...
0
54288a26afe063f08420bb16df2f0142
c29079517de7fc67accab484fb4ec484
Small icon for system notification.
class CryptoTrackerSensor(CryptoTrackerEntity, SensorEntity): def icon(self): return ICON
0
752f2cf9ed3dc27ce5322038a100bd07
caebff49e2bda5fe9dbd2b92715a17cb
remove all RX filters from port
TrexStatelessPort::remove_rx_filters(void) { verify_state(PORT_STATE_STREAMS, "remove_rx_filters"); for (auto entry : m_stream_table) { CFlowStatRuleMgr::instance()->stop_stream(entry.second); } }
1
daf67f3675a2dc0fec847bc18b7d0b19
51c200fdbcfd53e414af630a2ae1058e
添加Hook在Jvm关闭时优雅的关闭线程池
Runtime.getRuntime().addShutdownHook(new Thread(() -> { try { System.out.println("app will exit."); Thread.sleep(1_000L); notifyAndRelease(); } catch (InterruptedException e) { e.printStackTrace(); } })); int i = 0; while (true) { try { Thread.sleep(1_000L); System.out.printl...
0
e7163560d6eb8e149768df0cb6ebf3af
8d5086abc0d9023498c0f9afc46f6c38
查找特定股票的cache_urls数据
def get_stock_list(stock_list, stock_url): html = get_html(stock_url) soup = BeautifulSoup(html, 'html.parser') a = soup.find_all('a') for i in a: try: href = i.attrs['href'] stock_list.append(re.findall(r'[s][zh]\d{6}', href)[0]) except: continue
0
03a062fa9cbd9c051be94be8faafc435
9510583cd39e58137a37cae8a060b4f7
切换账号登出
function SwitchUserAccount(userData) QManagerPlatform:setIsSwitchAccount(true,userData) local MoreMainLayer = require("app.GUI.setting.MoreMainLayer"):new() MoreMainLayer:onMenuLogout() end
1
29ed25c2c493d8d5927e77cc4592df6a
34353235b8f55545a249fc337da8e8c1
获取收藏奖励
local _url = "getAllRecovery?" XTHDHttp:requestAsyncInGameWithParams({ modules = _url, params = {type = data.type}, successCallback = function(data) if tonumber(data.result) == 0 then local show = {} if data.property and #data.property > 0 then for i=1,#data.property do local pro_data = s...
1
fd57cae70c97f10d9cf4cabc4453940b
f05bd965de4fc44ded33e8af693b0e16
숙소번호에 해당하는 예약 수를 조회
public class ReservationDAO public int getReservationCount(int client_no) { return (Integer)sqlsession.selectOne("Reservation.getReservationCount", client_no); }
0
4c185a6ea082c81eea0e089489eb054d
b1db000ae1ba43e9c432902072943d76
Surrounds the specified action expression with extension methods following a certain convention.
{ var builder = new FluentMethodBuilder(methodName, this.DefineMethod); this.actions.Add(() => builder.Define()); return builder; }
0
6b659bee54ec24e0443171344b17cd8a
9f0a2e96a2476d4572f08ad24c7184c5
Test resetting a negative count.
class DatingReportsModelTest extends AbstractWebPageTestCase public function testCountIsResetOnResetDelta() { $this->createEmptyReport(); $this->getReportObject(array( 'rating' => 1, ))->updateStat(); $report = $this->getReport(); $this->assertEquals(1, $report['count...
0
b587485271ab595c6d80a4c7fe215113
accf6a28d18dd7e3d7b15b30e999df1b
检查icPort是否在指定范围
{ oport = -1; if(string.IsNullOrEmpty(iport)) { return false; } const int MINPORT = 501; const int MAXPORT = 65535; if(int.TryParse(iport,out oport) && oport>= MINPORT && oport <= MAXPORT) { ...
1
efe76cac1de939bf2bdc170c107c2992
c3459793da7c3c3115e1efff8d2b929c
This routine inserts message in the current domain message list. It is inserted in ascending order.
void add_to_RU_list (Runicast_msg runicast_msg){ if(list_length(runicast_list)>MAX_MSG_ENTRY-1){ memb_free(&runicast_list_memb, list_chop(runicast_list)); } Ru_msg_list *runicast_entry; runicast_entry = memb_alloc(&runicast_list_memb); if(runicast_entry == NULL){ printf("[BUF FULL] c...
0
5a9d26cd7331e1153af17bb9bdd01755
5c8c8250d2426df2260c775a8a77f74b
Returns the number of "ticks" the encoder1 has turned
signed long encCount(int chan) { if (chan == 1) { unsigned char IR; signed long a, b, c, d, e; ENCODER_SS_1 = LOW; IR = 0b01100000; a = spiTransceive(IR); b = spiTransceive(0x00); c = spiTransceive(0x00); d = spiTransceive(0x00); e = spiTransceive(0x00); ENCODER_SS_1 = HIGH; return (b << 24) | (c...
1
f65dc0b6a98704836d5c64a7c0e76db3
ccc5af3667cd1c75f4810bbcf2cc2a4f
function to plot outliers for numerical columns with seaborn-library
def remove_numerical_outliers(df): for col in df: if np.issubdtype(df[col].dtype, np.number): q1 = float(df[[col]].quantile(.25)) q3 = float(df[[col]].quantile(.75)) iqr = q3 - q1 df = df[~(df[col] > (q3 + 1.5 * iqr)) & ~(df[col] < (q1 - 1.5 * iqr))] retur...
0
d4f41d2a37a8280f271b4edda93e1e44
10ae76f58cf6f537f2f4b9a6c4de60a5
发送叫分
if (this.clickFlag) return; this.clickFlag = true; this.gameSocket.send(LDCMDConfig.LD_SEND_CALL_LANDLORD, { bLandScore: -1 }); }
1
72fb540aba281a7d1e61cc527b6372ce
e869f033f06a102e84fcda8ab8cf9ec3
Updates Sensor Information
public class MapSensorDialogFragment extends DialogFragment void updateSensorInfo() { if (getView() == null) { return; } ((TextView) getView().findViewById(R.id.id)).setText(String.valueOf(mSensorData.getSensor_ID())); ((ImageView) getView().findViewById(R.id.sensor_type_icon...
1