query_id
string
corpus_id
string
query
string
code
string
label
int64
cfec2627e6c4bff4508d056f24722330
f4087d3d605366bc6032caa531841489
Exit action for state 'None'.
class ExampleState(EventState): def on_exit(self, userdata): pass
0
005d1e535834b7e3e627c1d3e5532777
2712d28d8a7ff8f3c4e2fc117eab9656
Pre load / Initialize prior to primary activity load. Speeds up map loading significantly.
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.map_view); app = ((App) getApplicationContext()); serviceConnection = new AppServiceConnection(this, appServiceConnectionCallback); speedUnit = app.getPreferences().getString("speed_units", "kph"); ...
0
0ddf098f8bd81e337fadfe0f73711430
18d884969799e2573ef302c679ae02f8
HunterLAB -> RGB.
lab = np.empty([*img_l.shape[0:2], 3]) lab[:, :, 0] = np.squeeze(((img_l + 1) * 50)) lab[:, :, 1:] = img_ab * 127 return color.lab2rgb(lab)
1
70f00532f891c868e3a9fe99050dd5a2
ae00c7fca237979392a19644301f382a
设置回测初始资金信息
def set_backtest(context): set_benchmark('000300.XSHG') set_option('use_real_price', True) set_slippage(PriceRelatedSlippage(0.00246)) set_order_cost(OrderCost(close_tax=0.001, open_commission=0.0003, close_commission=0.0003, min_commission=5), type='stock')
0
4c5260d2a4c3eafb14de56c249d8cfda
f20db0b5c1a046f33c52d86ac1403bfc
post方式 获取郑煤机图表初始化缓存数据
@RestController public class FabricDevController @GetMapping("/getYhInitData") @CrossOrigin public Result<?> getYhInitData() { return fabricDevService.getYhInitData(); }
0
4bcd22a6a671f67170613fbed5c663bb
f25a13bbd928ebef075e0fa6bd5520ee
apaga um jogo na tabela
{ using (SqlConnection con = new SqlConnection(stringConexao)) { string queryDelete = "delete from jogos where idJogo = @iD"; using (SqlCommand cmd = new SqlCommand(queryDelete, con)) { cmd.Parameters.AddWithValue("@ID",...
1
747643d4cddaa23b0d14173b4190e12f
49cc648d91349682483c6f88543e50d1
получение изображения информера для предварительного просмотра
"/info/{informationId}/photo.gif", "/info/{informationId}/photo.png", "/info/{informationId}/photo.JPG", "/info/{informationId}/photo.GIF", "/info/{informationId}/photo.PNG"}) public InputFile getPhoto() throws Exception { InformationBase<?, ?> information = getInformationObject(); ...
1
511dc0c5497ad5ba5f99ab51483ea6c8
4a04aa3fb203b0f7173f62ca77fe6afc
获取玩家已经完成的任务列表 iid列表
local nRoleId = _G.ConvertN(_G.GetPlayerId()); local idlist = _G.GetGameDataIdList(NScriptData.eRole, nRoleId, NRoleData.eTask); idlist = idlist or {}; return idlist; end
1
41e2aa8d2cb28fa57a5925095ab5c6d8
b92ff0cfb1bce8b5693d34657d3ad718
Returns every second element (=proportion) in a given list starting by 2
halves = [] for item in some_list: halves.append(item/2.0) return halves
0
4cc015decc4954d1a131f2af95f85a47
df9436a59f0564e2dc34d17d1e52e23f
Tar inn to noder og skriver det til filen edge.txt på rett format Setter at dette er en directed kant
public class MetisAdapter private void processEdgeFile() { BufferedReader readerGraphEdges; String lineGraphEdges; String[] partsEgde; int idNodeFrom; int idNodeTo; int partitionFrom; int partitionTo; try { readerGraphEdges = new BufferedReader(new FileReader(fileNameGraphEdges)); while((lineGraph...
0
e8499cc6e06a0c7c21088280d4e7e79a
14a88057da745c4bfd5e8e52b7aebacd
Generate a ASCII table
class HackBuilder extends Command private function ascii() { $this->info(" __ _____ ________ __ / / / / | / ____/ //_/ _________ ___ _____ / /_/ / /| |/ / / ,< / ___/ __ `__ \/ ___/ / __ / ___ / /___/ /| | / /__/ / / / / (__ ) /_/ /_/_/ |_\____/_/ |_| \_...
0
81d8894993297f9226b7c655d1310f84
f2d9c5639f8bd50fd23cf4bf2034eb03
Set model's table suffix
{ $this->endTable = $this->table; if ($this->isSplitTable) { $this->suffix = $suffix ?: Carbon::now()->format('Ym'); } $this->setSuffix($suffix); }
1
80a3cf6a3d661b2d54ea503efef14e50
c573288816723b28fff3a785d636cf7c
Return a copy of the array with the element added, without duplications.
function addUnique(arr, el) { if (arr.indexOf(el) !== -1) { return; } arr.push(el); }
0
e413a523e7155f6d78fce9b81f574b36
5785df6d4a8a0d24ed4dd962b5c33913
Update the total bytes copied.
class UnfinishedImExporterOperation int getBytesCopied() { return m_bytesCopied; }
0
ad08de3fac1f1486430938e48361f1a8
5a1317210f72d9305dc4c6b2d5142691
Włącza powtarzanie aktualnej piosenki.
namespace MP3Lib public class Winamp public void ToggleRepeat() { if(hWndWinamp != 0) { Win32API.SendMessage(hWndWinamp, WM_COMMAND, WINAMP_TOGGLE_REPEAT, 0); } }
1
89a6fbba87a3899c1984ec31865c0e99
9eeabc3d805cbcd74b0f577bc04b082b
Galerie zur Immobilie darstellen.
class GalleryPresenter extends BasePresenter public function renderGallery($category = NULL, $id = NULL) { $arrEntPicture = $this->context->pictureRepository->loadByGalleryID($id); $entGallery = $this->context->galleryRepository->loadByID($id); $this->template->title = $entGallery->Title; ...
1
f250ea045b50db40675aea2e825fa406
e2894da9efcde2c4cc5c751dc65601f2
Wrapper method for selenium_utils.get_attr_details()
def get_attr(attr_name, ele): return ele.get_attribute(attr_name)
0
588d558147c13be4bb49cca0779d10e0
c0fb0784bd733a4c0731a02f7571f5c4
Получение заголовков всех доступных полей (атрибутов) отдельной записи лога
{ var logEntityDomain = this.Container.ResolveDomain<LogEntity>(); var logEntityPropertyDomain = this.Container.ResolveDomain<LogEntityProperty>(); using (this.Container.Using(logEntityDomain, logEntityPropertyDomain)) { var loadParams = baseParams...
1
8ccc7e79c600f089b13ede6de10931f0
87ff80dc7c368947d182b9686f2e7e10
获取moment的点赞人
{ $user_id = DB::table('moments')->where('id',$momentId)->pluck('writer'); if ($user_id != null) { return $user_id[0]; } return null; }
0
5e3b0fdb7182a15c0bb010e46772d5a8
fa925c178bb3667c2a006e03b7d3ba97
验证图片数量是否已经达到最小
class CetSpider(Tools): def is_over_images_num(self): _now_images_list = list(filter(lambda x: '.png' in x, os.listdir(self._path))) return True if len(_now_images_list) > self._image_num_max else False
0
e78315171b96717b8e1169dd998477f7
9d9decb13d033818f7015800df2cac6e
Tests that two identical CastingSets evaluate as equal
public class ReferenceSetsTest extends TestCase public void testEquality() { equalityTestFor(new WeakHashSet<String>(100)); equalityTestFor(new SoftHashSet<String>(100)); }
0
69a4f2907d9446645cbcc00004bbd731
81ac0c635da9d287955d6d5ed73c5552
GET: /Legislacion/Create
{ ViewBag.nifDirector = new SelectList(bd.getListDirector(), "NIF", "nom"); ViewBag.nifAutor= new SelectList(bd.getListAutor(), "NIF", "nom"); return View(); }
1
1b4f98a59a93141a72bcfc7930292354
05d2183ea60c27294e09dfa40d1180a5
Список закладок
def bookmark(request): bookmarks = Bookmark.objects.filter(user=request.user) context={ 'title': 'Закладки', 'bookmarks': bookmarks } return render(request, 'cabinet/bookmark.html', context)
1
7896f2fb07356407c6eafc557af626fb
74f221ccdc9997b87adae7abbfbf4a18
The constructor for this class. Takes in the instance data to be parsed into models
self._articles = data['articles'] self._stopwords = data['stopwords'] self._preprocessing_obj = Preprocessing() self._clustering_obj = Clustering(connectivity_threshold) self._analysis_obj = Analysis()
1
486d403b02a51386c74d9739f4c89985
36731a04c1c70724843648a6e24ea5d7
範囲指定のクエリ(NOT)を追加します.
class ModelCaller implements \Segment\Model\SelectClauseBuilder, \Segment\Model\SearchClauseBuilder, \Segment\Model\SetClauseBuilder protected function addSearchNotRange(\Segment\Model\Column $clmn, $exclusive = TRUE, BetweenValues $values = NULL, \Segment\Model\Statement $stmt1 = NULL, \Segment\Mod...
1
7141516278981920d930e5bc894f6bd7
b5d9e6a4a035ea91f90ecd76a3494f5d
Prüft ob MinimumW_NBR oder W_POS Prüfung aktiv ist
boolean m1,m2,m3,m4,m5,m6; if(*inputSafetyIONotAusFunkeKanal1==0) m1=TRUE; else m1=FALSE; if(*inputSafetyIONotAusFunkeKanal2==0) m2=TRUE; else m2=FALSE; if(*inputSafetyIONotAusEckVorneKanal1==0) m3=TRUE; else m3=FALSE; if(*inputSafetyIONotAusEckVorneKanal2==0) m4=TRUE; else m4=FA...
0
cb155c37a01e1538cb5639e443a3ed99
cec5bcc9adffd50ffbb55217f290fe78
首页跳转登录页面
class LoginController extends BaseController public function jump() { return view('admin.index.jump'); }
0
78b77fec157c2fec67773076ece338b1
4991b65fabfa9be2e0b75fa943277ee5
Removes all specified Json Paths from the provided JToken
{ JToken source = childPath != null ? token.SelectToken(childPath) : token; if (source is JArray && !(target is IEnumerable)) return; if (source == null) return; using (JsonReader reader = source.CreateReader()) { ...
0
bfff4c513a5adcdcbace7bc8a41c1811
0955d28bd33596de0ddef6bd2a57a4cb
定时器的设置及信号的绑定
void create_timer() { struct sigevent evp; int ret = 0; memset(&evp, 0, sizeof(struct sigevent)); evp.sigev_value.sival_ptr = &timeid; evp.sigev_notify = SIGEV_SIGNAL; evp.sigev_signo = SIGUSR1; signal(SIGUSR1, task); ret = timer_create(CLOCK_REALTIME, &evp, &timeid); ...
1
99f8e437b37e9c8789f0fbf8758d4490
35ec872b239ef84d9ed87637da80ad5f
13.35 0x3C CellVoltage4() This read-word function returns the Cell 4 voltage. Protocol - Word Unit - mV
{ uint16_t l_47 = 0x397BL; l_47 &= p_14; return g_8; }
0
bccdc552876e92bf4b6b9f39aebdb28f
e586aa2d20a1e5a6275abaa020a73756
Update Gift Card Account states by cron
class Icube_GiftCard_Model_Observer extends Mage_Core_Model_Abstract public function generateGiftCardAccounts(Varien_Event_Observer $observer) { $order = $observer->getEvent()->getOrder(); $requiredStatus = Mage::getStoreConfig( Icube_GiftCard_Model_Giftcard::XML_PATH_ORDER_ITEM_STATUS, ...
0
d563e0c13ac01600cd0e72638c8b90fa
12b0efc39a778a220b4cad981dd3a05e
---------------------------------------------- FUNCTION: UpdateCharacterUI DATE: February 7th, 2019 REVISIONS: DESIGNER: Keishi Asai PROGRAMMER: Keishi Asai INTERFACE: public void UpdateCharacterUI(Status status) NOTES: Update the hpBar based on the given health value ---------------------------------------...
namespace MDB.Managers public class UIManager : MonoBehaviour public void UpdateHealthUI(int currentValue, int maxValue, HealthBar hpBar) { hpBar.SetHealth(currentValue, maxValue); }
0
b04a6f4c0c5f5da82e38cf0602391fd1
761658a10beeb580b0db788abe7056c6
Call this method when the sloeber.cfg file changed
function HUD ( viewer, renderer ) function cfgChanged ( ) { if ( caveLoaded ) caveChanged(); }
1
b4ce1bea5d796b0d1eb4e2d2314dac84
6a3d9a0f83aad4546290983815367783
处理指定文件夹,智能生成 README
class MakeReadmeCommand extends Command public function handle() { $this->service->create($this->argument('title')); $this->info("File MyREADME.md created successfully!"); }
0
ca08bec1a1d41d0c237b444dc4fd1965
aa26c74a808f754c0fc04fe7ffe2f559
获取UTF-8编码的属性值
public class HsPropertiesConfigurer extends HsReloadablePropertiesFactoryBean public static String getPropertyByUTF8(String key) { try { String value = getProperty(key); if (!StringUtils.isEmpty(value)) { return new String(value.getBytes("ISO-8859-1"), "UTF-8"); } } catch (Exception e) { } return "...
1
e17125ccc70014035c01888be810f25b
293ca7bc994c07d09bc5d3b3c7d99991
완료한 프로젝트 리스트 가져오기
class ProjectController extends Controller public function completedProjectsList(Request $request) { return $this->sendJsonResponse($this->projectService->completedProjectsList($request)); }
1
6a047c4078fbd64f8062e92614b2158f
d06daf8dd431b5153ed220f660caa2f2
Test send requests as student
force_optout_all(sender=self.__class__, user=self.student) self.client.login(username=self.instructor.username, password="test") self.send_test_email() assert len(mail.outbox) == 1 assert len(mail.outbox[0].to) == 1 assert mail.outbox[0].to[0] == self.instructor.email
0
e2756441830443f4a9ec8afac0d86ced
cda70b86bd803424bf69abef26c4d1c9
이미지 모델을 제거하는 메소드입니다.
public class EIMFaceRecognizer public void resetModel() { deleteModelFromDisk(mContext); isTrained = false; }
1
0b33a9e4c68db49f649d403854260d3f
c388c3b3f9ec24ce0781476e1b3155cf
https://stackoverflow.com/a/43130355
let negative = if num.is_sign_positive() { "" } else { "-" }; let num = num.abs(); let units = ["B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"]; if num < 1_f64 { return format!("{}{} {}", negative, num, "B"); } let delimiter = 1000_f64; let exponent = cmp::min((num.ln() / delimi...
1
91bf37f7b54571b7034dca6de2621bfa
394eaa669b6ef1914ebaa5c1ccfcfe6e
Constructor of an owned appartment.
baths='', **kwargs): super().__init__(**kwargs) self.name = name self.square_feet = square_feet self.num_bedrooms = beds self.num_baths = baths
1
74bf9fb534ecf5d474a3d5c01e98bbc7
f9f5dff9e707996bf7a73e59043e2fd4
Validate that the attribute on the given model has a non-nil value assigned
class BaseModelTestCase(TestCase): def field_should_have_non_null_default(self, field, value=None): model = self.default_model() model.full_clean() model.save() if value: self.assertEqual(getattr(model, field), value) self.assertIsNotNone(getattr(model, field))
1
6f454d06605ce3ea7e681c2bcdcacad2
52bdc6b48fbeabe9dc25ccbd526c3658
メール送信画面
$upload_dir = "tmp/"; $attaches = glob($upload_dir. '*'); foreach ($attaches as $attach) { unlink($attach); } if (isset($_FILES['up_file'])) { $this->load->model('common/FileOperationModel', 'file'); for($i = 0; $i < count($_FILES["up_file"]["name"]); $i++ ){ $this->file->upload($upload_dir, $_FI...
1
7ead71280c2e6a0852b8be082bfc64ab
14cb7824ad451ee3d707f091b56b1744
Translate and event to raw data.
return { action: event.action, first: event.first, genesis: event.genesis, hidden: event.hidden, source: event.source, sourceIds: event.sourceIds, text: event.text, title: event.title, to, toI...
1
5f2be644a89fe03d59ac228beed8398a
9f21fb4b186917bae18c4b43904257a7
Using the adc peripheral library, configure ADC1 as follows: 12-bit sample off of AN0 Use dedicated ADC RC oscillator Automatically start new conversion after previous Use Avdd and Avss as reference levels
{ CloseADC10(); #define PARAM1 ADC_FORMAT_INTG | ADC_CLK_AUTO | ADC_AUTO_SAMPLING_ON #define PARAM2 ADC_VREF_EXT_AVSS | ADC_OFFSET_CAL_DISABLE | ADC_SCAN_ON | ADC_SAMPLES_PER_INT_15 | ADC_ALT_BUF_OFF | ADC_ALT_INPUT_OFF #define PARAM3 ADC_CONV_CLK_INTERNAL_RC | ADC_SAMPLE_TIME_15 #define PARAM4 ENABLE_AN10_ANA...
0
0ab3c278b0735df9e5c34ddd87d530ae
7a6658ad29176623aa211542b2b9c844
Sets wait_for_success
class JobPreparationTask implements ArrayAccess public function setWaitForSuccess($wait_for_success) { $this->container['wait_for_success'] = $wait_for_success; return $this; }
1
87cfcc0c1e20523dd70a1ec66964b45d
da2725c71ea2c54625988432eb8d8dc2
The given attribute is loaded and converted to an OGR geometry. If force_points is True, the ogr.Geometry.Centroid method will be applied to each geometry. Then each geometry will be represented by its geometrical center. If inplace is True, the original attribute will be overwritten, else returned.
class Geometry(BaseGeometry): def centroid(self): HASARCPY, HASSHAPELY = self._check_geometry_engine() if HASARCPY and \ isinstance(self, Envelope): try: p = getattr(self.as_arcpy, 'polygon', None) return p.centroid except: ...
0
313d4742e219267dca157fc0e6652882
96a919b79cc2c4fdc002b4cb61afe496
Clears the weekly menu
def resetWeekly(): collection.update_many({}, {"$set": {"weeklyTime": 0}})
0
5a7a427fca38a198404dd619d6f17f4b
1fa66a6039d27430ce1e91f18e51340a
マイページに遷移する際、BGMの変更処理を同時に行う(戻るボタンと一緒に登録する)
public class BGMselect : MonoBehaviour void ChangeBGM() { if(SceneManager.GetActiveScene().name == "title") { AudioManager.instance.PlayBGM("title"); } if (SceneManager.GetActiveScene().name == "sceneSelect") { AudioManager.instance.PlayBGM("title"); ...
0
22c5bf2971e708cdecafc80e0cf0d4de
41d055b8741b2b66ff092077f687fe2f
Parse ast array expression containing plugins.
{ return is_array( $name ) ? $name : [$name => $expression]; }
0
592321eb05cc9d527cfb036e014199cf
48ebb920a08b53f5a46862306b71e779
@brief LOG打印所有 PD固定输出电源数据对象
char *buf) { struct usbpd *pd = dev_get_drvdata(dev); int i; ssize_t cnt = 0; for (i = 0; i < ARRAY_SIZE(pd->received_pdos); i++) { u32 pdo = pd->received_pdos[i]; if (pdo == 0) break; cnt += scnprintf(&buf[cnt], PAGE_SIZE - cnt, "PDO %d\n", i + 1); if (PD_SRC_PDO_TYPE(pdo) == PD_SRC_PDO_TYPE_FIXED) { ...
1
ae213ad5d2c61e32d556da2fd5281c10
40ffec747a6c423c6af39f667e7a834f
获得已创建的配置文件数量
public class DMonitorImpl implements DMonitor @Override public long getNumConfigs() { return configs; }
1
615e702442101441d7ea1b41c52ac254
f6995af305d181de25e5939e0a9a9eb3
解析指定人员所在部门的某个岗位下的人员(仅取该部门)
public List<RegUser> findUsersFromDepAndPos(Map<String, Object> parameter);
1
0f09d1756ed5195dd111a07e98086f36
98b84afb595f434719065544dde9149c
This function is deliberately left blank (no actions necessary)
FUNCTION_NAME ( PARAMETER_LIST ) { }
1
6025b57f9dda22f9d9a6fdee5a53e872
51dceeb18288e009e8c5d1854ba73f75
start the message handling thread
class MessageWriter public void startup() { mWriteThread.start(); }
1
a5aa2e635b37c3d6cdcd80301bc37348
0371f636d359c3ff8b3fcc688003457a
Расчет объема позиции фьючерсного контракта
{ return 1 / (1 + ((100.0 - base.GetSetPrice) / 100.0) * Term() / ContractSpec.GetDayBasis); }
0
de4398c55023599036715fb858ee500c
2296a86e342369a85b9affc39719c66f
初始化数据库信息,需要传入数据库名称和版本号
Log.i(TAG, "initDatabase dbName = " + dbName + ",version " + version + ",ThreadId = " + Thread.currentThread().getName()); synchronized (DatabaseHelper.class) { DatabaseHelper helper = null; DatabaseInfo inst = initDbList.get(dbName); if (inst == null) { ...
1
eca53c88757c82b60371a6dabf5e175c
b4418fee93bd1ff5f1638959c4f653bb
疑问句分析
class QS(object): def question_solve_main(self, origin_question): print("solving: ", origin_question) split_sentences = self.ht.cut_sentences(origin_question) print(split_sentences) for sentence in split_sentences: lemmas = self.nlp.segment(sentence) print(lemmas)...
1
4174b3c00bd0a0fb73b00b15a2e6cc54
bc393a8e8e027cdd3c341424af6294b2
Apply teseract and remove unwanted chars from the string result input: image output: string of the number in the image
roi = TryBrawler._preprocess_text_image(roi) custom_config = r"--oem 1 --psm 6 outputbase digits" reward = pytesseract.image_to_string(roi, config=custom_config) reward = sub(r"\D", "", reward) return 0 if not reward else int(reward)
1
4e3adce09bfd3379277367396eed4e71
f65e7ef3312fc27b6b25202b47d39a76
function to update the bullets shot out by the player and to produce appropriate interactions with the current level
def bullets_fly(bullets): global enemy,maze_objects,player_action for i in range(len(bullets)): bullets[i][2]+=1 length=len(bullets) for i in range(length-1,-1,-1): if bullets[i][2]==bullets[i][3]: print('bullet range maximum') bullets.pop(i) for i in range(len(bullets)): dx=directions[bullets[i][8]...
1
ef80e1af92d48ff42b73d2dbfbbbabaf
479dddb0c79adc6751ea439617670c03
获取弹出框文本信息函数
class BasePase: def alert_text(self): text = self.driver.switch_to.alert.text() log.info('获取弹窗内容为%s'%text) return text
1
f0634dce0e3131dbece1dc1a7eb4d762
33705f887ff16702f9d47e1d28df8d5f
Changes colour of window button.
if (x == 0) { changeColor(winbutton[x]); changeColor(winbutton[x + 1]); changeColor(winbutton[x + 5]); } else if (x > 0 && x < 4) { changeColor(winbutton[x]); changeColor(winbutton[x - 1]); changeColor(winbutton[x + 1]); changeColor(winbutton[x + 5]); } else if (x == 4) { change...
1
fa64dfae3f1d35c0239a07b0d67d378c
ee0adbd2002394ede7ba13b5117c2046
update a WARC metadata record from a scrapy Item
ArchiveRecordHeader headers = record.getHeader(); WARCConstants.WARCRecordType recordType = WARCConstants.WARCRecordType.valueOf((String) headers.getHeaderValue(WARCConstants.HEADER_KEY_TYPE)); ArtifactIdentifier artifactId = buildArtifactIdentifier(headers); switch (recordType) { case res...
0
12381fe697b957bafc371688b22439f4
1ac3a99a386218728cd77256cb0d6356
ありなしを1,0に変換する関数
if ( $input == 1 ) { return 1; } else { return 0; } }
1
454353151c5f0752a1b82a6a79986a39
581fbc4d6e86c8b6585d74d96e4a206f
For now, it will always return true so it will always drop an item But if we want chances, then we'd uncomment the stuff.
bool BlueDragon::DroppedItem() { return true; }
1
f49512977ab0c72a2195942615fd3a9b
c746fbc376a8e18c3a89772b348e7ee4
현재 원소 리스트에 있는 각 원소의 개수를 측정합니다. -> 마법의 위력 결정
def func_a(arr): counter = [0 for _ in range(1001)] for x in arr: counter[x] += 1 return counter
1
2612cd189537612fbae9c3777b08c991
d8ba606b5e98933aee6d75c8a9703a61
查询邮件概况 针对某域名,统计一段时间内,发信总量和收信总量
class MailStatistics extends OracleBase public static function getSendMailRecNumDetail($start_date, $end_date, $mail_from) { $mail_fromWhere = "lower(mail_from) LIKE '%@{$mail_from}'"; if (empty($mail_from)) { $mail_fromWhere = 'mail_from is null'; } $db = self::__instan...
0
da652a1db9162057f2e41c657b77901e
cb45b59c9d509c01b815c302ae361fa5
Edit Testimonial (admin)
{ $request->user()->authorizeRoles(['admin']); $locale = $request->get('locale', "EN"); $testimonials = Testimonial::where('locale', $locale)->get(); return view('admin/testimonial/items', [ 'testimonials' => $testimonials, 'locale' => $locale ]); ...
0
264911fe509a30abd537c3b255a95ed9
8a009e2eeacd58b1b5a69c47a0e10f00
检索公交站牌
stationService.search(name, function (status, result) { if (status === 'complete' && result.info === 'OK') { stationSearch_CallBack(result); } else { alert(result); } }); }
1
faf8d0295e07bf5f4d44858202e46996
8e00b1073f986dddb35e4401c2c99db1
Retourne l'ensemble des termes alternatifs de ce concept, quelque soit la langue.
public function alternative(): Collection;
1
3980ead295bfe14b3076b4a14644d90c
7885b7aa3f40c35762a236a4699791a5
Completes the accept process that was initiated with <see cref="BeginAccept"/>.
namespace Server public class ServerPeer private void acceptComplete(object _sender, SocketAsyncEventArgs _args) { processAccept(_args); }
1
aea8916ca27e20f09930facc0f5e9484
0424bb8c91f39d59f1e4881bdbb6ef63
Control para mostrar a las actividades en un select
class ControlHorariosController extends Controller public function selectTipoActividad(Request $request) { $tipoactividades = TipoActividad::all(); return ['tipoactividades' => $tipoactividades]; }
1
21145534ac1ee9f91bdf8c644bad69e7
d5bc942a2c9f77856f63aa5fb912c889
已知source不会超过5个
if len(src) < cpuCount*5 { mergeSort(src, 0, len(src)-1) return } var chunks = splitToChunks(len(src)) c := make(chan int, 10) for _, chunk := range chunks { go mergeSortChan(src, chunk.s, chunk.e, c) } for i := 0; i < len(chunks); i += 1 { <-c } s := chunks[0].s e := chunks[0].e for i := 1; i < len(...
0
26a4c6cc95c104d54234696056a76c11
beb7a41d1870129902ca7c744d4adbf4
Metodo para crear o escribir en un plano
cd = self.cleaned_data id = cd.get('id') plano_dibujado = None if id and not cd.get('plano'): p = get_object_or_404(Plano, id = id) self.cleaned_data = self.cleaned_data.copy() cd = self.cleaned_data cd['plano'] = p.plano plano_...
1
35047434fce92dbea51eabde9cd71e5b
b35ad16b27570272c8703e0da7bfefed
线段干扰
Graphics2D g = (Graphics2D) image.getGraphics(); for (int i = 0; i < INTERFERENCE_LINE_COUNT; i++) { int x = random.nextInt(WEIGHT); int y = random.nextInt(HEIGHT); int xl = random.nextInt(WEIGHT); int yl = random.nextInt(HEIGHT); g.setColor(getRandColor(160, 200)); g.drawLine(x, y, x + xl, y + yl...
1
600e1a394a47ba53e333e8491e787fe6
bbec36b69b6e5ac7f691987ee9f22d96
赎回,取出存款
namespace BetsServer [OperationContract] string Withdraw(int usercode, decimal sum);
1
f0613fb1568d9fc2a100e3d4d72b80b1
8515608ca344b9798b1f51b2e6e3acc6
To get the user entity for the given login id and institution.
namespace CityLife.BusinessLogic.Infrasturcture public class UserRepository public User GetUserByLoginId(String loginId) { return userDataService.QueryAsSingle((x) => { return from u in x where !String.IsNullOrEmpty(u.LoginID) && u.LoginID.Equals(loginI...
0
d285087859d2be82b95545d38a7e391f
dd554c97e242e8ccb2f53ad97d2ea329
删除账号下的所有额外属性
void deleteAttrs(Integer memberId);
1
ac1ea82b6f39b55875b2c048226dc49f
c9f8783cba6864e092a9ae9380e7673f
Deletes an existing BucketList model. If deletion is successful, the browser will be redirected to the 'index' page.
{ $model = $this->findModel($id); $model->delete(); if($model->image_id) { $image = Image::findOne($model->image_id); $image->delete(); } return $this->redirect(['index']); }
1
e906097ef94f98553c17a3a8bf3cfc07
1ab42a6d3f7f6f0f9271d731d0614f6c
用于计算一个圆的面积
def circle_area_test(r): return r ** 2 * math.pi
1
adfed46d5316f18cc84cbf63cb4587ac
ff12c5e6cfbfbbd658a31b81773e2c52
Convert known valid date string, to iso-formatted date.
def yyyymmdd2date(date_string): isostring = date_string[0:4] + '-' + date_string[4:6] + '-' + date_string[6:] return date.fromisoformat(isostring)
0
9372e8e42943f01b2dcd4c23dc3ee519
36bfad8601f8ca38cc8cdef0c0c27ef3
Remove Banner from all adzones it's linked to
{ $aAdZones = Admin_DA::getAdZones(array('ad_id' => $adId), true, 'zone_id'); if (!empty($aAdZones)) { $aAd = Admin_DA::getAd($adId); $aZones = Admin_DA::getZones(array('zone_id' => implode(',', array_keys($aAdZones))), true); $aPlacementZones = Admin_DA::getPlacementZones(array('placeme...
0
ad8d5ecf457b3f7914d53150f71ea1b9
27f2ad307c9df3f0b000b1227d55dddf
重置trigger类型参数的值
data.triggerType = +data.triggerType; data.shortMessageType = +data.shortMessageType; if (data.groupName === null || data.groupName === '' || data.groupName === undefined) { if (data.hasOwnProperty('groupId')) { delete data.groupId; } } if (data.triggerType === 2) { if (!da...
0
4bb71ce12a7cbe222a2858d6c560806c
5adb1fa504e8dc54d78bdd11c1eca17b
Initialize encoder/decoder for CCS inner code
silk_encoder_state *psEncC, ec_enc *psRangeEnc, opus_int FrameIndex, opus_int encode_LBRR, opus_int condCoding ...
0
f679dbf2a9ef38c10982f8f6e575246f
5a9ecd38de65bd5ee688784fdbd88611
把爬取完毕的主键放到Detail队列里
while 1: try: spider, request = job_queue.get(True, 1) log.logger.debug('-----job_queue----qsize: %s' % job_queue.qsize()) except Exception as e: if eventExit.isSet(): break continue result, next_urls = spider.parse_detail_by_ur...
0
4f861a7135c0f15903d5476606733b4e
4c5b96c7897793da8b0027b22e3ca321
Clears all include file search paths.
void Picoc::IncludeCleanup() { IncludeLibList.clear(); }
1
dffc64e030ee7f7cb8fa01bae45ac0e9
e9ea31a4f1ae9d7af8309ef1bc0c36e4
建立用户积分存储过程
{ XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(Server.MapPath("../config/scoreset.config")); Discuz.Forum.AdminForums.CreateUpdateUserCreditsProcedure(xmlDoc.SelectSingleNode("/scoreset/formula/formulacontext").InnerText, false); }
1
eb6324dc23616d914c25866ac5a9333b
70a3ae497d1391bd2de5057b114d8547
所有page事件的处理.
function pageItem() { $(document).on("click", ".first", function() { getAll(1); }); $(document).on("click", ".up", function() { getAll($up); }); $(document).on("click", ".next", function() { getAll($next); }); $(document).on("click", ".last", function() { getAll($allpages); }); $(document).on("change",...
1
db8cb97445d41db25120037948adbf09
20b7a3bed5486553e666341ea401b5fb
Set the thread guardsize attribute.
size_t thread_attr_getGuard(thread_attr *t) { if (!t) return -1; return t->guardSize; }
0
1d99b387aab148638e72ab85ff875d73
0c355e43fe31f1aceddd6ff2a16d1a74
易宝e卡通页面充值按钮函数
console.log(payAmount); console.log(payId); if(isMobile != '1'){ $(".useryz").show(); return; } var param = {payType: "14", amount: payAmount, payTypeId: payId, deviceNo: ""}; var result = rechargePay(param); onBridgeReady(result); }
1
c35dcea7ebc638aef02649e0daa235e1
fead616466346178aa244a5e1c989b2a
给日期和时间的edittext设置现在时间的文本
public class PayAblesFragment extends BaseFragment<PayAbles> implements FragmentImp private void updateLabel(View view) { ((EditText)view).setText(fmtDateAndTime .format(dateAndTime.getTime())); ((EditText)view).setError(null); }
1
a053818166110b43bad76e0f66b3f4ee
e6362676f6dc0f850455ff1f9bc37ded
читаем данные с контроллера
{ $controllerClass = sprintf("\\%s", str_ireplace('.', '\\', $controller)); if (!class_exists($controllerClass)) { ETViewException::raise(ETViewException::ERR_CONTROLLER_NOT_EXISTS); } $c = new $controllerClass(); if (!$c instanceof IDataProvider) { ET...
1
6a6ab13e50d0993aa172e1f200b385b9
caa01e7b607ed5a4ffd276f6b7d7dd04
직사각형을 그리고 안을 색칠합니다.
def square(x,y,size,color_name): up() goto(x,y) down() color(color_name) begin_fill() for n in range(4): forward(size) left(90) end_fill()
1
f96f9cf7d82bfe144b84a022dff2b65f
121ba81a497e8983b12bdf24ddee8e39
Retrieves the image properties of the item (like a file of folder).
function getImageProperties($imageIdentifier);
1
94876996db1f777ccfe0f5b14169ed6f
b86ec0fb625c7fec36c1272747cd7da2
Suppression de tous les trajets dans la BDD
@Service public class TrajetService public void delete(Integer id) { repository.deleteById(id); }
0
6b4ebed93f9691a8377a00572462c2f3
021a322b01279e1a52ad837d445f12af
When got wait window QuickItem data, we would notify WindowGrabber to set frame rate and start to combine images to generate gif file.
class GifEncoder extends AbstractVideoEncoder onGifFinished_(data) { this.output = data; this.dispatchEvent(CaptureEventType.COMPLETE); }
0
536514352d3af8fb291988dbfb08113b
8ea401550e32ddfac436f037c6784a1d
Exposes the index of the camera used
export default class VideoSourceDefault extends VideoSource async getCameraClibIndex(): Promise<number> { let methodName = "getCameraClibIndex" return await this.invoke(methodName, this.NUMBER); }
1
38815043f1d83a3ca189b22c63f52b0a
64da6f257940159d559f59ddec35acff
Get the state we transfer to
AbstractStateElement getTo();
1
851896270531a290935a720eb8693eb2
1e08d115b4a6724bdebbe89223a45c3f
Deletes the specified SharedPCConfiguration.
namespace Microsoft.SharePoint.Client public static partial class SearchExtensions public static void DeleteSearchConfiguration(this Web web, string searchConfiguration) { DeleteSearchConfigurationImplementation(web.Context, SearchObjectLevel.SPWeb, searchConfiguration); }
0
f349829f6bfbab4fe82b9632e40e61b4
2219df4c2b0e57f00736740730f4dd32
函数说明:保证金率对比按钮
namespace YssSecInformation.Sv.Form public partial class Frm_SEC_BASE_QQ_L : FrmBaseList protected void btnNewSub_Click(object sender, EventArgs e) { ButtonItem btnSub = null; if (null != sender) { try { btnSub = sender ...
0
0d4b4a53653f75d7c33ce3547df29026
50e0791dc3aa1e9b7fcc8deb15ea7278
@brief standard constructor
camera::camera() {}
1