query_id
string
corpus_id
string
query
string
code
string
label
int64
18d9179238aea569c14e92714d9f77e7
06e23b020809e4e615c5bf3dfc2ac7fa
double the radius to get the diameter
public class Circle extends GeometricObject public double getDiameter() { return 2 * radius; }
1
9b6c389759a991dbe0fd908726efa208
6e5bf877ce47243fc65809e2a3a4a3e6
应用设定信息到AndroidManifest.xml.
public class Main private static boolean modifyData(String path) { File file = new File(path); if (!file.exists()) { System.out.println("文件夹不存在..."); return false; } String xmlPath = path + "/AndroidManifest.xml"; try { SAXReader reader = new S...
1
272a358514046fd59d9b37b92a94fea4
e051abaf7cd80d475307903f6cf7a064
menu de seleção de nível
def menu(): global nivel print("\t\t\tANAGRAMAS: UNSCRUMBLED v3.0\n") print("As letras estão embaralhadas. Consegue desvendar as palavras?\n") print("ESCOLHA O NIVEL DE DIFICULDADE DIGITANDO O NUMERO CORRESPONDENTE: \n") print("1 - Iniciante / Soletrando") print("2 - Veterano / Nota mil no ENEM"...
1
9b8023fe1f8b1c6574ab6acb475cdcfd
17f42b5074463117517272f5ff96335a
Turns all of the lights on to full power
namespace HueSharp.Builder IModifyLightStateBuilder TurnOn();
0
525eecd81c68065be8dab8514a1ea9b4
465b097158e54e2c79854875089fbe39
Выставляет класс лейблу в зависимости от состояния чекбокса
if (this._input.checked) { this._element.classList.add(CLASS_IS_CHECKED); } else { this._element.classList.remove(CLASS_IS_CHECKED); } }
1
53384d960d63c05cec8b96df094b6ada
4d54e2242a40ad053aebb125127f7539
Cập nhật từ vựng
{ string XMLFilePath = ".\\DontTouch\\" + name + ".xml"; XDocument doc = XDocument.Load(XMLFilePath); XElement root = doc.Root; XElement item = new XElement("item"); XCData trans = new XCData(word.Trans); XCData phonetic = new X...
1
bed1e5c998468374d37eea5cf94f60b1
328139550fa58853f7cd6124368fea6c
Checks whether all dependencies of the updater exist on the server, and downloads any that don't.
if connection.offline: if not silent: self.emit('error', Exception("Can't update in offline mode.")) return False class NoUpdateException(Exception): pass from urllib import urlretrieve from urllib2 import HTTPError import tempf...
0
434a1579cd530ccd16fdb1cf1774a33e
c4b850fd5787c9bf6f2767e5bb92c4f5
change the order of the array of cuntries before saveing in the state
{ $value = $this->getValue(); var_dump($value);die; $exixting=array(); foreach ($value as $key => $val) { if($key=='__empty')continue; if(in_array(trim($val['country']),$exixting)){ unset($value[$key]); }else{ array_pu...
0
7329901595824a3e7e709d14016b944b
7a34659d2879079549464a02bfc9f498
由默认构造函数创建的线程是不能被join的:
std::thread t1(function1); try { for (int i=0; i<100; i++) std::cout << "from main: " << i << std::endl; } catch (...) { t1.join(); throw; } t1.join(); return 0; }
0
288081005dfb67e1c198025fec592aa5
8c7530e1918e084d88f03c63c3336a94
加入默认群组
Group.find({},function (err,docs) { if(err){ console.log(err); }else{ console.log('group list --default:' + '\n' + docs); ssocket.emit('group-list',docs); } }); }
0
51a8aac3395a6b17ec7acb8badba64d2
62cd6753db5808074526ad8dffed1ce5
Converts from screen space to viewport space.
function spaceToScreen(x, y) { return [(x - camera.x) * camera.scale, (y - camera.y) * camera.scale]; }
0
ac6fe8295bfaa721533a0b6defcda543
5819f056250dd94988429bc467338bda
Get BusinessUnits (VisualDTO) by idents
namespace SampleSystem.WebApiCore.Controllers.Main [Microsoft.AspNetCore.Mvc.ApiControllerAttribute()] [Microsoft.AspNetCore.Mvc.ApiVersionAttribute("1.0")] [Microsoft.AspNetCore.Mvc.RouteAttribute("api/v{version:apiVersion}/[controller]")] public partial class BusinessUnitController : Framework.Domain...
0
75131dfa92180730fa182c04d4ab8f98
6584d7b6e9376617707457b18577a7fa
Gets the z index of the GeoJsonLineString
public class KmlLayer : EventEntityBase, IJsObjectRef public Task<int> GetZIndex() { return _jsObjectRef.InvokeAsync<int>("getZIndex"); }
0
3780602f7dc73c98551ae2dc65852d44
05ed1afae91ced8ad64b2e172caadff3
Determines whether it is safe to move 'expressionBeingMoved' past 'expr'
namespace Dot42.CompilerLib.Ast.Optimizer internal class AstInlining bool IsSafeForInlineOver(AstExpression expr, AstExpression expressionBeingMoved) { switch (expr.Code) { case AstCode.Ldloc: AstVariable loadedVar = (AstVariable)expr.Operand; if (numLdloca.GetOrDefault(loadedVar) != 0) { retu...
1
76453822fa1d62fc28ae80c45cf7fbc9
0aac675388c9cfa25f9c9c163908c05f
拿到的MailList,其中发件人的名字是空。 所以要将Maillist遍历,在依次根据resource(userID)查找Name(发件人)。 为MaileList补全resourceName属性。
{ int index = 0; List<string> umail = new List<string>(); while (true) { ListViewItem res = listView1.FindItemWithText(uname, true, index, false); if (res == null && index == 0) { umail[0] = ""; ...
0
555b0dad4cc5aac7ec08d311ba41c12d
d37dc339b7c3413d9deebc32680e38ca
Sets the email1 in the contact details for a member
@Model(schemaVersion = 1) public class Member implements Serializable public void setMail1(Email mail1) { this.mail1 = mail1; }
1
f2885be9e9418399109f081557aa75ae
93234bec5927c039d926e99f2316357f
Atualiza um contrato já existente
public function updateTipoContrato(int $id, array $detalhes): ?Model;
1
b02424e8a5998915d81747f621d2edf7
5533280b59986d4c36aaf9f64f532b68
获取该blog中链接与url一致的post(不考虑协议)
class PostRepository implements RepositoryInterface{ public function byUrl($url){ return Post::where(array('url' => $url))->first(); }
1
b235ae8712668ba4af46bb24270e3e87
0d1c8ff9e37b709d8620044986993246
Set http response headers sent flag
class Context get headerSent(): boolean { return this.res.headersSent; }
0
ed13a58d263647814cfbfed274af53f4
6ed76440bbd35ed41ec308cb288b4d15
Create motorized shades that supports set position.
self.dimming_duration = None self.color = None self.color_channels = None super().__init__(**kwargs)
0
db87ca2fc3adfa88511c083d7b5ccff1
631980bfa1f6530ad1c981f3c15825b8
押注闲对
public class UcbetUtil public static void jcDan(List<UcbetMatchGroup> groups, List<UcbetMatch> matchs) { int size = 2; String matchId = ""; double odds = 100.0; UcbetMatchGroup group = new UcbetMatchGroup(); group.setNum(size); if (matchs.size() >= 2) { Set<Integer> set = new HashSet<Integer>(); fo...
0
ee18265bc5dd7d77a0ebcf75918fc6fd
6b27f2a2306e3083fb664148268a0e43
Allow children to specify error correction (e.g if content already has error correction/checksum).
public class Encoder private static void setECL(String _errorControlLevel) { errorCorrectionLevel = _errorControlLevel; }
1
ea10b2effddfc83e092a863eb154b4c5
83e942a9fc2e3dc70f3c0169dbb9c75e
Output whether the current topic in the loop belongs to the logged-in user.
function bp_the_topic_is_mine() { echo bp_get_the_topic_is_mine(); }
1
75251aefc9b596196c7fc7ef9c3fbfed
85587f69ab6442f061a047bf88a257e1
Funkcja wyszukująca miejsce najbliższe do gracza na którym można podstawić bombę i ustawiająca je jako cel dla bota
void AI::PlaceBomb() { behaviour = PLACE_BOMB; return; }
0
21a6b67e1f9b96d0a3a238206bd49171
ce3bd765a960bf700d09277caed4de8e
Создание списков новых и удаляемых владельцев task'а
$arParams['UF_OWNER_ID'] = (int)$arFields['ID']; $params = array( 'filter' => ['=UF_OWNER_ID' => (int)$arFields['ID']], 'select' => ['ID'], ); if ($arFields['IBLOCK_ID'] == self::$iblockProizvodstvo){ $params['filter']['=UF_TYPE'] = 'P'; $r...
0
575f439a2cc9b8fa3f3b74babe8c9d90
d422c4fc227b94ea313d42877523a282
Increase the move speed for the snake
def speedUp(): global speed speed+=1
1
b0c5fa7d8de8ddf954562c7a2039c510
f4f875143558ccb8e6b45b9678e1fa8c
通过id调用存储过程对调度表进行更新
db, err := getDB() if err != nil{ return err } defer db.Close() schedule := TransScheduleDto(item) result := db.Model(&Schedule{}).Where("schedule_id=?", id).Update(&schedule) if err := result.Error; err != nil { return errors.WithStack(err) } return nil }
0
7ed7360ccfd1235997b6e0194e86b8a3
0bdfe807b9be5fe4430f04273e514114
Get the last song of the list [+returns+] The last PlayListSong of #play_list_songs. nil if the list is empty
songs = self.getSongs(hidden=True, ident=ident, playlist=playlist) if len(songs) > 0: return songs[0]
0
0633b5f6a24f0d4f5232aaf77d8cd723
49394e5ae6d60b505267295be0cacd71
Define el valor por defecto del campo.
public abstract class GeneralHandler protected void setDefaultValue(M_Column aColumn, PO po, boolean newRecord) throws ModelException { Class<?> clazz = DisplayType.getClass(aColumn.getAD_Reference_ID(), false); String columnName = aColumn.getColumnName(); try { if (Integer.class == clazz && (po.get_Valu...
1
567c1378d5deb579df7a937bbed6ba55
0df54a7de2b584255a066945540b51ee
Returns the meta object for the containment reference list '{@link org.sheepy.lily.core.model.inference.LRule#getConditions <em>Conditions</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getTestCaseGraph_Conditions();
0
0b5e0d7d8ef401e90a9c170e700fcf53
3a851a3f4aa1bf44f3dd8011a1322a23
Utlility function to test the connectivity to VersionOne.
{ Boolean result = false; int repeat = 3; while (repeat > 0 && result == false) { result = TestConnect1C(); if (!result) { System.Threading.Thread.Sleep(1000); repeat++; ...
0
b05e275eb0e2bdfdb7be0554a77bbd42
260c0932951e4b929e06b7687ba11a38
调用自己的HistoryRecordView类进行展示特定deviceid的历史信息
class Device extends Common public function record($id) { return $this->fetch(); }
0
70dbab55821897d8834eead3086f5f88
712411ed807f3dd1f18e2183eeb832a4
Display the list of symbols and values to the SymbolTable Widget.
{ for (SymbolMap_t::const_iterator p = table.begin(); p != table.end(); ++p) { vout.paranoiac("key = %s, ", (p->first).c_str()); ValueType t = (p->second).type; if (t == VARIABLE) { vout.paranoiac("element_type = VARIABLE, value = %f", (p->second).value.val); } else if (t == FUNCTION) { vo...
1
73629b1489f3c81a23dd0570c7ce8fc2
51d5cd716fa1ccb61035bafa77b29532
Persist the given transient instance with the given identifier.
public void persistentSet(String id, S userSession);
1
420daca5b5ae6bde7b38f93688281328
6ac3ec35313d9e3b38b7b55652538225
激活标签页窗口
class SurgicalSimulationPage(BasePage,SurgicalSimulationPageUI): #激活窗口 def active_page(self): page = self.find(**self.page) page.SetActive() return self
1
c098183ed5c75536dfa3c047402c0a85
be0128b3515ae9b7773a4febb21d6e0e
Returns the mid y.
int Node::middle_y() { return (top_left.get_y() + bot_right.get_y()) / 2; }
1
69ee2720d91211e568679da096977cd8
052b0bb3955145462a338c49b9317138
str: Contents of the meta-description field from the HTML source Note: Read only
class MetadataGetMetadataPropertyResponse200(object): def description(self): return self._description
0
36e77045ec6d905c328c6541ab5f1f77
7488d7d307a99762a054115736da2d8c
依年份刪除applQuota
String sql = "delete from abc_finance where year='" + dto.getYearmonth() + "' and quarter='" + dto.getQuarter() + "' and not tablecode='F01' " ; dao.excute(sql); return true; }
0
8ba2d354f9b38c43f73f3e67d2ea5a77
e5105390652ad2849ddfd81c10fc7f80
month of year (1 = Jan)
class PavVars(VarDict): def month(self): return self._now.month
1
0ddd969b5100ddd49c1bb6511266d2a8
9c0299437b7cf7d36988fbf6a97d37fa
Returns a value from this using the given dimensions for resolution
namespace com.xamarin.AndroidIconics public class IconicsDrawable : Drawable public IconicsDrawable SizeRes(int dimenRes) { return SizePx(_context.Resources.GetDimensionPixelSize(dimenRes)); }
1
283f1a5da1be9cb40cd4fcdef660aa9d
f8c300eac4b9fb141f60d90eae93ab25
Удаляет оценку, выставленную одному из критериев продукта экспертом, из списка оценок продукта.
obj = class_from_id(crits_type, identifier) if obj: c = 0 for a in obj.analysis: if str(a.analysis_id) == task_id: del obj.analysis[c] c += 1 obj.save(username=analyst)
1
5b24eb31302f78927cfd8021019e4237
c269bd7431635473d9b946383fdb9afb
returns the MasterTokenWord of the Token
class Leap public static function GetMasterTokenServer() { return self::$sMasterTokenServer; }
0
d9ca27b68a22660affce32b73282968e
e6680ea8c9fb590fe6350aa3bb5573f5
Removes all entities from database.
class EntService public function deleteAll(): bool { return $this->repository->deleteAll(); }
1
31b8f7f4ed9c9119ba74127413acfcaf
ba2f3b7bfc4efbd0bf2cdf07e4ec8f77
获取17个地区的连接地址存入到urls中
class GM(object): def get_url(self): for i in range(1, 150): self.url_queue.put(self.url.format(i))
0
c47095435aeba42cb486cafff788ae13
7d15621b9d9c40c49b7f269640bf7c9d
Callback to add the admin_bootstrap_css_responsive setting field
class OmniLayoutsSettingsForm extends ConfigFormBase public function addmoreCallback(array &$form, FormStateInterface $form_state) { return $form['bgcolors']; }
0
91f85dd4db160d54757af84690bc3d4d
bb033f4365e8a228bb732ec7c6222899
Initiates the asynchronous execution of the UpdateInstance operation.
UpdateInstanceAsync(new UpdateInstanceRequest { Instance = instance, UpdateMask = updateMask, }, callSettings);
1
b9984717f77461cfbe9ddd06beb11228
aaf704721c94b2dbb8810932d6bf12dc
Convert from HHmm to HH:mm
def hhmm_convert(target_time) hour = target_time.hour min = target_time.min sprintf("%d:%02d", hour, min) end
0
881f98325551b88a50539d49f045c6cf
83ede1c61cbd8b819d8dd23378ec94f1
Thread safe increase of the webs counter
public class NetworkMonitorThread extends Thread public void incrementSharedCounter() throws Exception { if (socket != null) { try { PrintStream p = new PrintStream(socket.getOutputStream()); p.println(Main.remote_increment); } catch (IOException e) { ...
0
040fe14c4e32a98dc146b5e2a360c6f1
7645f3370de20fcdec2ed81309ed102c
inicializacia vstupov, vystupov, preruseni a casovaca
PC = 0; clockCycle = 0; diskCycle = 0; insideInterrupt = 0; jumpFlag = 0; diskON = 0; instructionsCount = 0; initFilePointers(argv); initInstructionArray(fimemin); rewind(fimemin); readDMemIn(); readIrq2In(); readDiskIn(); }
1
6e70bed507140c0f8d6c0604940e1c8f
014166959c9a512f830509d139b55ce8
Set API类型。
public class TemplateGroupAction extends AbstractModel{ public void setActionApiType(Long ActionApiType) { this.ActionApiType = ActionApiType; }
1
dfe731c6cc3f10ac70ecc8bf2fc7b0af
9cc43951ba4465b55560fabf7df6d3ac
Terminate worker or delete iframe.
window.removeEventListener('message', receiveMessage); shared.pregressStyle.backgroundSize = '0% 100%, auto, auto'; shared.buttonText.data = DEFAULT_BUTTON_TEXT; document.body.removeChild(shared.iframe); delete shared.iframe; }
1
bae28e0bdfe2c599f3cd4758d70efe3b
e3864075a97d52526c7716f18291bfe1
Model constructor. container_strongType_Model constructor.
abstract class FW_Container_Type final public function __construct() { }
0
0aa473b7ae2b5a2b209c3f0cd2fc2361
cf4501a86ab6eebd2ab94442ced10b0f
Sort quadrilateral vertices.
sort(corner.begin(), corner.end(), cornerCmp); double width = dis(corner[0].first - corner[1].first, corner[0].second - corner[1].second); double length = dis(corner[0].first - corner[2].first, corner[0].second - corner[2].second); if (corner[1].first < corner[2].first && width < length) { swap(corner[1], c...
1
5da8a563afd2d10784bd22bf603a2aa8
80baf932e7beededfa4b6778456e8730
Returns the minimum size this View can show the handle without distortion. The handle will never be smaller than this value.
int getMinHandleSize();
1
9bbc4f293968d7f4710269ff99ff1233
0eb74815c7de2e53586ecddc3073c1a5
得到白名单的状态
{ crystaleye_profile(__METHOD__, __LINE__); try { $white_list_json_file = new File(self::WHITE_LIST_JSON_FILE); $white_list_data = new File(self::WHITE_LIST_DATA); if (!$white_list_json_file->exists() || !$white_list_data->exists()) { return array(...
1
059d4c429e57549ff92c16af39979913
bccc559de1f298110c3f845b2fd3b248
Définie si un enregistrement répond ou non à l'ensemble des conditions.
public function satisfies();
1
7b229ae73248bdade6f2c434667c3983
135bb4605daf87691e39a3cfe9d1d234
Devuelve la ruta del tpl de la lista de acciones para efectuar sobre una entidad
{ if ('index' === $action) { return sprintf('/%s', $this->routesPrefix.'s'); } else if ('show' === $action) { return sprintf('/%s/%s/%s', $this->routesPrefix, $action, '{id}'); } else { return parent::getRoutePattern($action, 'entry', $entityBased); ...
1
9d4b19b61b89aa43d0a8351bd6b40083
82856666029dfe3abe263fedea9ce3a1
Returns all Invalid Entities
{ return [ self::ACTION_INVALID, self::ACTION_MISSING, self::BOOT_ORDER_INVALID, self::CORE_MEMORY_UNSUPPORTED, self::FIREWALL_INVALID, self::CORE_NUMBER_INVALID, self::HOSTNAME_INVALID, self::HOSTNAME_MISSING, ...
1
115361973aba83a4c032377285d0613c
8d13cbb465bc4a8aad47630a81f62517
Test list users the user is following
class TestCaseFollowBlock(TestCase): def test_following_list(self): self.elenore.profile.follow(self.rigby.profile) self.assertIn(self.rigby.profile, self.elenore.profile.following_list())
1
3d7855cdda51dc882ef534cc998946a5
63f744cf6bc42363e23d014a3f73f033
Find the nested types used in a message type definition.
IMetaModelCommon *pCommon, mdTypeDef td, CQuickArray<mdTypeDef> &cqaTdNesters, CQuickArray<LPCUTF8> &cqaNamespaces, CQuickArray<LPCUTF8> &cqaNames) { LPCUTF8 szName, szNamespace; DWORD dwFlags; mdTypeDef tdNester; ULONG ulNe...
1
1a8036137ffa7d1caf51f0a5ae794f85
32dfeaed144654d5261ff4743a1f91ef
Basic search in an aggregation with children selectable
request = SimpleNamespace( query_params=QueryDict(query_string="organizations=345&limit=2") ) term_organization = {"terms": {"organizations": [345]}} self.assertEqual( CoursesIndexer.build_es_query(request), ( 2, 0, ...
1
0d4e91bff73866a9c7aeee4f64b6903a
67d38e035357fd1853b5a19b3b966633
子弹打中墙
class Missile def hit_wall(wall) if get_rect.intersects?(wall.get_rect) @tg.missiles.delete self unless wall.type == 1 || wall.type == 2 @tg.walls.delete wall if wall.type == 0 if !@good && wall.type == 4 @tg.walls.delete wall @tg.my1p_num = @tg.my2p_num = 0 @...
1
8a9a1f5138e2f9f91d610f2d7dd3ee12
bd45f744b336976b83cd1aef9a389fa0
Method for decoding an affine cipher.
def affine_decrypt(cipher, key): return ''.join([ chr((( modinv(key[0], 26)*(ord(c) - ord('A') - key[1])) % 26) + ord('A')) for c in cipher ])
1
f93c462392427e5b53a7843188388f9d
4826beaab1dab40f8699c29f2d2b2b82
Return number of the agent's time steps
class ASDState(Type): def nstep(self): return len(self.timestamps)
1
f65cbc3c21f5809c445fba1874df1e15
7674b130959059a7ffdc7622cbb54cbf
method that predicts speed of spread in months based on population density
class VirusPredictor def speed_of_spread speed = 0.0 speed += 0.5 if @population_density >= 200 speed += 1 if @population_density >= 150 speed += 1.5 if @population_density >= 100 speed += 2 if @population_density >= 50 speed += 2.5 if @population_density < 49 puts " and will spread a...
1
a15f762cb4218e865f104235e6fa2ec0
15b3ca21d05b7ef245da95a73fcb91c8
Returns whether the given repository interface requires a QueryDsl specific implementation to be chosen.
public class PlatformJpaRepositoryFactory extends RepositoryFactorySupport private boolean isQueryDslExecutor(Class<?> repositoryInterface) { return QUERY_DSL_PRESENT && QueryDslPredicateExecutor.class.isAssignableFrom(repositoryInterface); }
1
307195976082a0ac39d6ba9738b769f5
32e7495c64433181c7a433ffaba5bea9
可以指定是否缓存当前的DataSet,命令名为存储过程名, 缓存Key根据存储过程名自动生成
{ if (IsBeginTransaction) { try { Cmd.CommandType = CommandType.StoredProcedure; Cmd.CommandText = procName; Cmd.Parameters.Clear(); Cmd.Parameters.AddRange(param); ...
0
e496afb01a5d5a00b1408b20aa192d3b
8ec1f5a0a8e62987f3dc5c09ec2ad99d
Once we have the target point, accelerate towards it, unless we are already on it/passed it
public class Rock : MonoBehaviour public void Update() { MoveUtil.AccelerateClampedToward2D(rigidbody_, targetPosition_, acceleration, maxAcceleration, maxVelocity, timeToReach); }
1
0b6dc646e5269907670df700e28c3332
5dad93e346bb0082a78e3df20a12c488
邮差一键全部接单(接全部收件)
@Controller public class PostmanController @GetMapping("ptoallreceive") public String postmanToAllReceive(HttpSession session){ return postmanService.postmanToAllReceive(session); }
1
c7ce5ec996e9a880b8e59a685df41fce
ded6716d87dda096fa00bae3227e1e37
Used to get the 3d index from a flat array index. This is the inverse of flat_array_idx.
namespace Utils public static class Helpers [BurstCompile] public static int MultiIndexToFlat(int x, int y, int z, int dx, int dxdy) { return x + dx * y + dxdy * z; }
0
ce309370901954b1c92c44a4bf7d59ba
34440713264e8bb7894beb7e49df6d2f
ReadMissionId gets mission real id with public id
{ Variant mis_data = (this.g_mgr.g_gameConfM as muCLientConfig).svrMisConf.get_mission_conf(misid); if (mis_data == null) return 1; int misline = mis_data["misline"]; if (misline == 1) { return 1; } ...
0
d488b1f4b86a778f8832ee8b0db858bc
8ea057d8ea304f28fb84dbeea374ea1a
Load 3' or 5' UTR sequence.
if fragment is None: return SeqIO.read(get_NL43_entire(), 'fasta') else: return SeqIO.read(get_NL43_fragmented(fragment, trim_primers=trim_primers), 'fasta')
0
64867466d2cb854e5dbf074a82c589bb
89e707e43f8e9565bcb8a12db5da8dad
Exit a parse tree produced by {@link SqlBaseParser#lateralView}.
public class sparkJavaBaseListener implements sparkJavaListener @Override public void exitLateralView(sparkJavaParser.LateralViewContext ctx) { }
1
2d01b202bab86864d3c0b89387bd6493
67cf88a0eb588359c4afc01aea4542be
查询省级季度非活跃网吧数量。
public class QueryProvinceInfo extends HaiepQuery static public int queryNumOfNonActiveNetbarsByQuarter(String date, String areaCode) { HTablePool pool = new HTablePool(configuration, 1024); HTable table = (HTable) pool.getTable(Constants.QUARTER_PROVINCE_STAT_NAME); int result = 0; Scan scan = new Scan(); sc...
1
f79073ef2f107eb4ced9d1a3ffe2f7a0
e3a83c917c26abe4d4da44c6f3aa6cca
Sets the traderGroupType of this Order. The traderGroupType field corresponds to the database column db0.piq.orders.trader_group_type.
Order setTraderGroupType(CohortType traderGroupType);
1
c8d2b64171d2a69a5975698768a79b84
89110b113976dbc074b51669678a9a5f
Charge payment using UOB EzPay
AsyncPaymentTransactionStruct $transaction, RequestDataBag $dataBag, SalesChannelContext $salesChannelContext ): RedirectResponse { parent::pay($transaction, $dataBag, $salesChannelContext); try { $returnUrl = $this->charge($transaction->getReturnUrl()); ...
0
ed146955eb5ca604a52009996a5ac2a4
790d7b87e584d83b4b626d3dab7d1620
1.判断当前容量是否超标,如果超标,调用扩容方法
public class ArrayList<E> implements List<E>{ private void ensureCapacity() { if (size >= elementData.length) { grow(); } }
1
894aa6151f45a071aae8994acf69fa64
d24caf1b071a144d7d1d733d56ac8378
Crea un nuevo objeto dentro de la tabla unidadesDeMedida.
namespace Agrobook.Api.Controllers [ApiVersion("1")] public class UnidadesMedidasController : ApiController [HttpPost, Route("unidades-medidas"), AllowAnonymous] [ProducesResponseType(typeof(UnidadeMedidaResponse), StatusCodes.Status201Created)] [ProducesDefaultResponseType] public asyn...
1
e095aab849646777e4d16fdfb9ae47dc
432566455a928c6a1a80316281764ec5
获取列表长度,若列表不存在,则返回0
namespace DME.Base.Cache.RedisCached public partial class DME_RedisClient public int ListLength(string key) { if (!CheckKey(key)) { return 0; } return redisSocket.SendExpectInt("LLEN {0}\r\n", key); }
1
027de404f5e861e070ac23f155f77af8
72542bce70cd2ddbe7e9bb0df7d466a6
Removes the last element from a string and returns it, or `None` if it is empty.
def nullable_strip(s: Optional[str]) -> Optional[str]: if s: value = s.strip() or None else: value = None return value
0
2663e29c97b45005f41ec714907b9b74
10819d9f53076ee36910bc67bdea623e
takes a string of characters returns a dictionary with letters from the ID as the key, and the number of appearences as the value
letterr = [] numm = [] infile = str(stri) CharacterCounts = {} createCharacterCounts(CharacterCounts) for line in infile: processLine(line.lower(), CharacterCounts) pairs = list(CharacterCounts.items()) items = [[x,y] for (y,x) in pairs] items.sort(reverse=True) for i in...
0
70402c8079e3be0aa337b913defd4d00
a80711c544b7c61cca5221176f8ce3d9
SetGlobalTracer sets the global tracer to t.
func OptTracer(tracer Tracer) Option { return func(r *Request) error { r.Tracer = tracer return nil } }
0
d7480fefb6995e2ef1f599f3c0c2730b
4f3ba157f1aa35c908de54954fb1929b
指定した秒数で X 軸を初期化します。
{ xdata = [...Array(maxSamplesNumber).keys()]; xdata.forEach(function(p, i) {this[i] = (this[i]*sampleTimeSec).toFixed(4);}, xdata); lastTimeStamp = +xdata[xdata.length-1]; ydata = []; ydata2 = []; ydata3 = []; chartContext = $("#chart")[0].getContext('2d'); chart = new Chart(chartContext, { type: 'line'...
1
2cc1f94453ff4ec52cc17244a18e232e
b15ce7a03cbded98b7a9e33728d14f1f
Debug routines to check the content of the structures sent across tasks
void prefetch_stream_t::periodic_check(){ prefetch_t::periodic_check(); #ifdef PREFETCHER_DEBUG this->print_structures(); #endif }
1
6e751dbf06487d9e862cd520d877ad91
052758402a2adc02fa85ff3ff1581904
パーティションマップを読む。 このメソッドは VDSを読み終わった直後に呼ばれ、パーティションマップに付随する各種情報を読みとるメソッドである。
{ foreach ($this->partitionDsn['partition']['dsn'] as $partitionIndex => $dsnInfo) { foreach (array('read', 'write') as $m) { $dsn = isset($dsnInfo[$m]) ? $dsnInfo[$m] : ''; $mainPortions = explode(':', $dsn, 2); if (count($mainPortions) != 2){ ...
1
ded78774f1ab8dd55c309a03cfcb7cf3
1dd942e68a08852e1b35a731702d362a
Texture has changed, so update the overview
if (overviewEditor == null || overviewEditor.isDisposed()) { createOverviewEditor(); } overviewEditor.setModel(getModel()); overviewEditor.loadObject(); }
0
e10e8b9e03b49cf0b90ccbb5a8ac470a
6955d4ef493fb073be1023940971f0ff
Removes the landing page and shows the app
function App() { return ( <div>This is the landing page</div> ); }
0
b235412cc4f22cc2cad4b9fac8b00edb
53ad7fcac3ad58e7bb6a373b0b8c67e3
# set vector of values to be used to rescale subgroup weights
rescale_w<-function(w){ w[which(w[]==-1)]=-0.01 w[which(w[]==-2)]=-0.02 w[which(w[]==-3)]=-0.03 w[which(w[]==-4)]=-0.04 return(w) }
1
3eca98d843d2b0ce083cd5740701923e
23f639f9afb39dd5c085d90ff46c20b4
Return an information if Dotpay payment is enabled on the shop site.
abstract class Gateway_Gateway extends Dotpay_Payment private function checkIfEnabled($object) { return (int)$object->is_available(); }
1
6ac7c1859fb7f3ec697dd49c8794b56e
c155ffdeb0b9c922b3e53a108407de77
在指定的节点上返回一个Long值.
Object result = getObject(name); if (result == null) { return null; } else if (result instanceof Number) { return ((Number) result).longValue(); } else if (result instanceof CharSequence || result instanceof Character) { String text = result.toString()...
1
a8864a491c55ede053c067eff4fefa9c
682c5f056cb4c1c07871c2e2c3b51f8b
Convert an integer (for example, taken from the configuration file) to a level
namespace Collection_Game_Tool.Services public class PrizeLevelConverter : IValueConverter public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { int ret=0; if (value is int) { ret = (int)value; ...
1
a942aaabee320c677d7d4aaddfe4e71d
7004d82838e1f51fbdc25064c2ba53ac
Encrypts a file using AES (CBC mode) with the given key. key: The encryption key - a string that must be either 16, 24 or 32 bytes long. in_filename: Name of the input file out_filename: If None, '<in_filename>.enc' will be used. chunksize: Sets the size of the chunk which the function uses to read and encrypt the file...
try: d = AES.new(self.symmetric_key, AES.MODE_CBC, self.IV) if not os.path.exists(in_filename): return False with open(in_filename, "rb") as infile: with open(out_filename, "wb") as outfile: while True: ...
0
6a053486fcdd0e6e92adee43cfaa61da
01400deb05b9468232be612b152bb74a
Defines an irregular word pair.
class FOFInflector public static function addWord($singular, $plural) { self::$_cache['pluralized'][$singular] = $plural; self::$_cache['singularized'][$plural] = $singular; }
1
793cb3720803410e1aae6a8ffbf41835
1a027e5812f041854c43558ef08a9a2e
Returns a random vector within the given sphere.
public class Chance : MonoBehaviour public static Vector3 VectorOnSphere(Vector3 origin, float radius) { return origin + (UnityEngine.Random.onUnitSphere * radius); }
1
0b4351c3daf8b29425a9d81a6f6007cd
694a713d07854f4495341bd39d3825ae
Find item class by keyword and the exclude list of item class ids that doesn't want to includes them in search results.
@Service public class DepartmentService private List<ClassCommodity> findClassCommodityByKeyword(String keyword, List<ClassCommodityKey> excludeClsCommodityKeys) { CriteriaBuilder criteriaBuilder = this.entityManager.getCriteriaBuilder(); CriteriaQuery<ClassCommodity> queryBuilder = criteriaBuilder.crea...
1
46e0f258fa0eca2d7810fb4087276787
b28cf65a434076f58f83acdd1ceb939b
Gets the max score of the practice attempt
final class Score public function getMax() { return $this->max; }
1
2f2a94548dcd016a3c1f9f9e334ceff7
cc422b8e3b53dbc62297f0c3b702cfe0
returns true if not null, false if null
function notNull(value) { if(value == null || value == "" || value == undefined){ return false; } return true; }
1
125e4c2cc57e6d3403fb3757980a21d0
179161b839b478c50ebd681772cc82ac
创建黑洞并添加到舞台 并 缓存到黑洞数组
new THREE.TextureLoader().load( './assets/imgs/hole.png', function(texture){ const geometry = new THREE.CircleBufferGeometry(2, 12); const material = new THREE.MeshBasicMaterial({color: 0xffffff,map:texture,transparent:true}); const mesh = new THREE.Mesh(geometry, material); mesh.position.set(-threeW/...
0
60c2301ab18a7ab39be032bb862a519e
9aaf1934f23950d76eebed99abeaeac6
生成0或1的随机数
function GetRandom(){ var x = Math.random(); if(x <= 0.5) return 0; else return 1; }
1
94a49ca3229528acb38716a62459c35a
2c619ae5a319cd4201db61dcfa2742ff
Removes the given SwitchWidgetEventListener from this handler.
public class ToggleSwitch extends android.widget.Switch implements IHaveProperties, IFireEvents public void removeEventHandler(String eventName) { if (eventName.equals("isonchanged")) { _isOnChangedHandlers--; if (_isOnChangedHandlers == 0) { this.setOnCheckedChangeListener(null); } } }
0