query_id
string
corpus_id
string
query
string
code
string
label
int64
66a3f22d356048502b8d825799600b73
67f62993dc4bfabc0e22fc501e071469
Asynchronously initialize a cartridge
Task InitializeAsync();
1
e4d790874800bbf4983723d295a9e059
04170a25c9d891b315b7b7c36b9d24de
Escribe la cantidad introducida en el campo en edición
void WidgetSettingsInteger::editingFinished(){ value = edtWriteValue->text().toInt(); settings->setValue(registryName_,value); emit signalEditingFinished(); }
1
50f410e79e4930011a5fd0bc62e15a22
d4b9271a144506688c855623399cba92
GET: ClasificacionesDeProductos
{ CalculadorBusiness calculadorBusiness = new CalculadorBusiness(); PruebaModel model = new PruebaModel(); model.Productos = calculadorBusiness.GetProductos(); return View(model); }
0
02b74e9058c76f0216aed4293a017e44
398c17dc75c16b04d64d7f0a9dd71041
返回可用的筛选条件,及每个条件的可选值
class UPClientDefault( private val bizId: String , private val apiUsername: String , private val apiKey: String , private var language: String , callback: Callback<UserBizInfoResponse> ) : UPClient override fun getFilterAndSortOptions(categoryId: Int): Observable<FilterAndSortOptionsResponse> { ...
1
9dceb7f5594d722b93038f6f4b8d7673
983fc4ab1658d90df3ad32e4a3dbb494
PREPARES SOUND EFFECTS AND RETURNS BOTH OF THEM
beep_filename_1 = os.path.join(SOUND_DIR, 'beep-7.wav') beep_filename_2 = os.path.join(SOUND_DIR, 'beep-8.wav') sound_1 = sound_2 = None if os.path.isfile(beep_filename_1): sound_1 = pygame.mixer.Sound(beep_filename_1) else: print("ERROR : beep_filename_1 not found") ...
1
154dcc10bf2a56a51d12fe2cf53c137b
1d9c568f6bb8ad9f9d2e879faa901dea
Apply function to relationship identifiers.
{ $result = []; foreach ($identifiers as $resourceType => $resourceIds) { foreach ($resourceIds as $resourceId) { $result[] = $fn(JsonApiUtils::compositeKey($resourceType, $resourceId)); } } return $result; }
1
4916c28b0193616921acc14feb384422
9cc4eae3da7fc6b67b82941e0eaa667f
Compose the Entry objects and populate entry_list with them.
class UrchinFS(TemplateFS): def _make_entries(self, components, path, old_entries=None): entries = [] indexed = components["indexer"].index(path) logging.debug("indexed path %s gave item paths: %s" % (path, pprint.pformat(indexed))) for item_path in indexed: from_old = False ...
1
d56ad9749624cbd980df4ae563571f82
2027f81a15ef4e8c006bd4c2cc023ced
Callback will execute upon a job launcher updated event
public class DriverJobManagement extends NotificationBroadcasterSupport implements DriverJobManagementMBean private class JobEventNotifier implements JobListener public void jobUpdated(JobNotification event) { sendNotification(event); }
1
3ea4d92dc84d0f1b74b9c4f41323f62d
5426846e70b85c3a1bb08c5510447865
From test_templates/learning.py::ObjectiveRequsiteAssignmentSession::unassign_objective_requisite_template
class LearningProxyManager(osid_managers.OsidProxyManager, LearningProfile): def get_objective_requisite_assignment_session(self, proxy): return
0
e78c1801ea5c25924c958f7d0b7d5bd1
545670dc1a3004eeae408118634fdaea
Send alert on login.
{ $user = user(); if ($user->getAttribute('logged_in_at')) { notify()->info('Info', 'Bonjour ' . $user->getAttribute('fullname') . ', dernière connexion<br/>le ' . format_date($user->getAttribute('logged_in_at'), "d/m/Y \à H:i") , 'clock-o rotateIn animated', 8000); } els...
1
65b964a9f633b96a4506f2be4d9dee60
cbc06c0343cb9e4e2088c31590ac83b7
This should be used for testing purposes only, due it changes fields that the any user should not be able to change.
public class CachedFeatureFlags public static void setFeaturesForTesting(Map<String, Boolean> features) { assert features != null; sValuesOverridden.enableOverrides(); CachedFlag.setFeaturesForTesting(features); }
1
741fb4d6fedd88d762e59fc7c0e85800
e1de6ba9a4dc2135f028c6b1bfeae3dc
GET: /Roomallocation/Create
{ var allocate = db.Allocate.Include(a => a.Room).Include(a => a.User); return View(allocate.ToList()); }
0
4348152f66e8b1eaf5451b36e8034f6d
85a02544f294dfa0c704d0209d7a55e6
要素をすべて除去したあと、 必要に応じて最小限の要素を新たに設定する。
class XMLElement implements \IteratorAggregate public function setContents ($contents) { $this->attributes->clear(); $this->elements->clear(); $this->body = null; $this->contents = $contents; $xml = new DOMDocument('1.0', 'utf-8'); try { $xml->loadXML($contents); } catch (\Throwable $e) { $message =...
1
c2829be8b86a1063077e9b5d357b23ec
18c9d66fefda52e5a09ac4c913e4c094
If the origin coordinate is none, chooses the southernmost node in the graph to be the origin
export class Graph public SetOrigin(x: number, y: number): void { this._Origin = new BasicVectors.Vector2D(x, y); if (this._RerenderOnChange) this.Render(); }
0
f0883705f9414b01086151c817434b63
ba89f1e6e7b2f627d5acd9f1a78b6298
searching for a customer by their id and printing it
{ long long num; printf("\nInsert The Id num of the person you want to search: \n\n"); fseek(stdin, 0, SEEK_END); scanf("%lld", &num); Person* p = search_id(s, num); if (!p) { printf("\nThe Id doesn't exist\n"); return; } else print_person(p); return; }
1
ef23c4c15c776ae0e50c86f0d2c5874f
40273548461ff24c85482a54e797f2ed
确保右键点击且鼠标当前位置有列表项然后跳出菜单.
{ if (e.Button == MouseButtons.Right) { this.codeListBox.SelectedIndices.Clear(); int posindex = this.codeListBox.IndexFromPoint(new Point(e.X, e.Y)); this.codeListBox.ContextMenuStrip = null; if (posindex >= 0 && posindex <...
1
71289c53ddf4db3dca829e820c16e700
aef4e64b64990a7b4f3bf798f2fb01f7
Get the defualt detectors
public class DetectorFactory public boolean isDefaultEnabled() { return defEnabled; }
0
88d7cf53abb2b067cb3a45081e55e50d
fa28bd882d0f9fd8ec6ae5ed271456b1
获得EsManager实例
public Client getEsClient();
0
2519a054742c1bc5d01fcd3dc9900fce
75010f7cdd3665fa76278844020b2c5d
Attaches input_stream (which is e.g. the output of a previous module) to this module's input at position idx. If the previous value was None and the current value is not None, it signifies a connect and the module should initialise as if it's getting a new input. This usually happens during the first network execution...
if self.isNotKilled: assert inputName in self.inputSpec if inputName in self.inputHandlers: handler = self.inputHandlers[inputName] args = [] if isinstance(handler, tuple): handler, args = handler if call...
0
42697d5d6dee111e43aff26fbf2d4ece
57796f46ec157c56eae55cdada1b3c64
Parses the SVG-root node and recurses into child nodes. Creates the frame from the SVG root node properties.
constructor(attributes: ISVGAttributes, ...addlArgs: any[]) { super(); if (!attributes) { attributes = {}; } this._style = new SVGStyle(attributes.svgStyle); this._attributes = this._setAttributes(attributes, ...addlArgs); this._createElements(this._attributes...
0
1b5f527e709ed87860ed62e076a48248
bc8711814bab40c53a420cc8b359984d
Sets the matrix to be the transpose of the given matrix
matrix.m00, matrix.m01, matrix.m02, matrix.m03, matrix.m10, matrix.m11, matrix.m12, matrix.m13, matrix.m20, matrix.m21, matrix.m22, matrix.m23, matrix.m30, matrix.m31, matrix.m32, matrix.m33);
0
6fb2444324c1eaa20088a4b16dbaa7a7
8f70724094c686424196c7b5dd0f88f7
Creates a new instance of the <see cref="GeometryStream"/> class.
namespace Perspex.Direct2D1.Media public class StreamGeometryImpl : GeometryImpl, IStreamGeometryImpl public IStreamGeometryContextImpl Open() { return new StreamGeometryContextImpl(this.path.Open()); }
0
9c820bcef6787402affb8e3683c86342
87b5da4e0a0d86d5b213a333962bf89c
This method is called when a historical data request has delivered all its bars
public class TwsService public void updateHistoricalDataEnd(int requestId) { m_historicalDataHandler.updateHistoricalDataEnd(requestId, DdeRequestType.HISTORICAL_DATA_TICK.topic()); m_oldHistoricalDataHandler.updateHistoricalDataEnd(requestId); }
1
c69bc6b5b0d2d64460609cb12b82eb62
7b5162db221e43dbea6a7f5d77e5bd13
Returns (lattice lengths, lattice angles).
class Lattice(object): def lengths_and_angles(self) -> Tuple[Tuple[float, float, float], Tuple[float, float, float]]: return self.lengths, self.angles
1
7888465ad9c0664f9bd2dee7c6d9db09
a1cf3d7c6039cee4867fff54c3c5be41
对平行语料进行pool操作
class ReconcilingEmbedder(Embedder): def pool_sequences( self, subword_embs: torch.Tensor, lslssubword_count: T.List[T.List[int]] ) -> torch.Tensor: max_subword_seq_len = max( [sum(subword_counts) for subword_counts in lslssubword_count] ) assert max_subword_seq_len <= su...
1
281d9e3c184bc222c42ef5ca9d8d32bc
f73c6631921d0217524b74a02d4beffb
# proportion of misclassified observation
incorrect.predictions = 0 for (i in 1:length(targets)) { if (targets[i] != predictions[i]) { incorrect.predictions <- (incorrect.predictions + 1) } } return(incorrect.predictions / length(targets)) }
1
efdb5d04fbd600af740aaa78142acd31
98b22a2d9b3311db9be2ea0c8b2f95b2
Gets the relative path to a type of resource.
class CompareFhirData( internal val result: CompareData.Result = CompareData.Result(), private val skippedProperties: List<String> = defaultSkippedProperties, private val dynamicProperties: List<String> = defaultDynamicProperties ) : Logging internal fun getFhirTypePath(parentTypePath: String, resource: Bas...
1
2c1673755611cae9280a42856cde1c53
2e46c4a1d5bee120841c1c6531de209c
정답 박스의 크기 위치 만들기
var box = InformationBox(tutorialCnt); document.body.appendChild(box); if(tutorialCnt == 0) { var section = document.getElementById("workspaceDiv"); var rect = section.getBoundingClientRect(); var xPos = rect.right-100; var yPos = rect.bottom/2; } else if(tutorialCnt == 1) { var section = document.getEl...
1
4feb91053fee598db8077bd59c257076
f5c40d1c209e9d469c07e4830fc08111
获取元素伤害穿透
table = [0,200,150,100,50,0,-100] result = table[$data_classes[@class_id].element_ranks[element_id]] for i in [@armor1_id, @armor2_id, @armor3_id, @armor4_id] armor = $data_armors[i] if armor != nil and armor.guard_element_set.include?(element_id) result /= 2 end end for i ...
1
919027da5996eb892267355235030c45
18430a6cfde342484766a611ceb38044
都道府県一覧画面へ遷移します.
public ModelAndView pa005002back(HttpServletRequest request, PA005Command command) { return pa005001search(request, command.getPa005001searchcommand(), null); }
0
c3249c5b8a0cdbc7d725c702522c8320
ecf9cda7828b842143fdf6b122f6c060
Zero days
func TestSleep_Zero(t *testing.T) { start := time.Unix(1, 0) clock := clock.NewFakeClockAt(start) clock.Sleep(0) }
0
8e8b69e4bee6cc40fb98addc71290fbe
0c3d49e133f7058885d5de9fd3a5f523
obtiene una lista de tokens que admite el analizador lexico
namespace Proyecto1_calc class Analizador public List<Token> getListaTokens() { return listaTokens; }
1
37fe4d84c5db7041c71b26932754c4f3
aae8c015e4810f141db61fb1465d947a
指定エリアをマスクした画像を生成します。
public class ImageUtils public static Bitmap getMaskBitMap(Bitmap image, ArrayList<RectF> locations) { Bitmap copy = image.copy(Bitmap.Config.ARGB_8888, true); for (RectF location : locations) { copy = getMaskBitMap(copy, location); } return copy; }
1
74189fbb21277675de247f4036471a3e
f354f00d0ea3c8a8cfbd67a6676f001a
判断章节是否存在小节
{ const string sql = " select count(*) FROM dbo.t_Course_Video WHERE ChapterId=@ChapterId "; var parameters = new DynamicParameters(); parameters.Add(":ChapterId", input.ChapterId, DbType.String); return Db.ExecuteScalar<int>(sql, parameters) > 0; }
1
9a4aae95048d3dcb5d64de93718561ba
0dde244da33c96b405b62dfa4c399b44
Returns the asked credentials or raises CredentialDialogReject.
class Interface: def request_credentials(self) -> Tuple[bytes, bytes]: return self.request_username(), self.request_pass()
0
eec42028bf993c579bc7edf13868b869
108ef96a65aa43bf6768dbc751822f5c
compute time averages for timeseries `vector`. `vector` must be a list/np.array of numbers, `window` is the averaging window. returns a list of numbers.
weights = self.conf.numpy.ones(int(window_size)) / float(window_size) averagedList = self.conf.numpy.convolve(data, weights, 'same') return averagedList.tolist()
1
ddd22d23703975a4db212a69ff056925
2fa8a1a337edcf5ea1f2bace776d9f19
获得用户被点赞总数接口
class LikeModel extends Model public function getUserLikeCount($uid){ $where = array( 'aid_uid' => $uid ); $count = $this->where($where)->count(); return $count; }
0
4e4c8518dd7c8a06d9d3aa62c4b642e8
4784f433ebc7083ab0f3f9862b7f2c1f
assigns self score based on how symmetric the angles are
Ak = 1 for neigh in neighbours: Ak = Ak - (abs(self.direction - neigh.direction)/math.pi) return Ak
1
ccec2f002871699991ab5fa2bf7d9d51
e2181a4e2e9f136393581fac0b1cf1ec
Returns a camelString for a given PascalString.
namespace MapHive.Core.Configuration public partial class WebClientConfiguration protected static string Camelise(string pName) { return $"{pName.Substring(0, 1).ToLower()}{pName.Substring(1)}"; }
1
89a1c22ba69e548bed67bdb440e6a4a8
8d3d6676e181cb5bf2ceab3598a94f0d
获得传入日期的前days天的日期
public class DateUtil public static String getBeforeDateStr(int days) { calendar.setTimeInMillis(System.currentTimeMillis()); int day = calendar.get(Calendar.DAY_OF_YEAR); calendar.set(Calendar.DAY_OF_YEAR, day - days); return sdf.format(calendar.getTime()); }
1
7b78832f489c462fca80968bdbc16848
4a1ccbba08b56bd643d5514c2b227d8b
| Description : 蜂鸣器 响 多少ms | Input : uint8_t ms | Output : null | Return : null
{ CLK_PeripheralClockConfig(CLK_Peripheral_TIM4, ENABLE); TIM4->PSCR = 6; TIM4->ARR = 250; TIM4->CNTR = 2; TIM4->SR1 &= ~TIM4_SR1_UIF; TIM4->CR1 |= TIM4_CR1_CEN; while(n_ms--) { while((TIM4->SR1 & TIM4_SR1_UIF) == 0) ; TIM4->SR1 &= ~TIM4_SR1_UIF; } TIM4->CR1 &= ~TIM4_CR1_CEN; }
1
c981b58540cc0c02ba85b45bf70362b2
7f3cef23b26a0f6bc1b518c35459a86a
fill 3-element vector with given values
output_vector[0] = value_1; output_vector[1] = value_2; output_vector[2] = value_3; }
1
94d8e8eefa1b325b82ef5bf7da46d1ba
107fcd313de59812eb5499365b3f440d
设置webuploader的状态
class Uploadfile public function setState($value) { $this->state = $value; return $this; }
1
288ca9d6706295f5e71a2425012e1f74
f541062df16d02043abfde36287fb578
Causes the Zune player to skip to the previous track (or start the current track over), which in turn triggers the <see cref="TrackChanged"/> event handler.
namespace SoundByte.App.Uwp.ServicesV2 void PreviousTrack();
1
059c82ed0390898474878826ea6e90b4
6fffde3f3353be20623e2f0abe3fa727
专辑图片统计
class Common extends Controller public function alubmCount(){ $album = new Album(); return $album->count('a_id'); }
0
954e2350b822a53daca53488c5cc743b
c7435f274a8a6e36f6e54b130f8577a4
This method will initiate the WebDriver and open a selenium controlled chrome session before every test
public class ServiceHooks @Before public void initializeTest(){ System.out.println("Opening browser"); System.setProperty("webdriver.gecko.driver", "/Users/tulachanashok/Documents/Udemy-Selenium-Java/cucumber-newtours/geckodriver"); driver = new FirefoxDriver(); }
0
888a0487f9e4970f5c327a1e37136c9e
749d853069e16472ffe07a1fb8c368f7
Destructor for Organism
Game::~Game() { vector<Organism *>::iterator organismIterator; vector<vector<Organism *> >::iterator boardIterator; listAnt.clear(); listDoodleBug.clear(); for (boardIterator = board.begin(); boardIterator != board.end(); boardIterator++) { for (organismIterator = (*boardIterator).begin(); organismIterato...
0
966d3d332eda3f7f41ce89fede28d322
1e4e0116b9be311bc8952acd3ebf61aa
get students who are waiting for approval from the admin
class HomeController extends Controller public function getWaitingUsers() { if(Auth::user()->hasRole('Foundation')){ $newUserRequests = User::where('status','!=', 'ACTIVE') ->where('school_id',Auth::user()->school_id) ->orde...
1
e2436df18e22089bfd6dcbf9656f09ba
0157e656b37cda90d3ae0bb898a91bee
<p>Logs entrance of passed method name with given parameters.</p>
@Aspect({ServiceA.class, ServiceB.class}) public class ServiceLogAspect public static void before(Object object, Method method, Object[] args){ System.out.println("entering " + method.getDeclaringClass().getSimpleName() + "::" + method.getName() + ", args:" + Arrays.toString(args...
1
8393ca5d692bd161420bbd0f5b824c11
bb649c77dffc29403dd12addcf81e957
Destructor flushes command queue
{ if (m_CmdQueue != nullptr) { Fence fence; fence.Initialize(true); InsertFence(&fence); fence.Sync(); fence.Finalize(); } m_CmdQueue.Release(); m_d3dFence.Release(); delete m_pCmdAllocatorPool; m_pCmdAllocatorPool = nullptr; delete m_pAdhocGpuBuffer; m_pAdhocGpuBuffer = nullptr; for (auto &ptr : m_p...
1
529c1ce6b0c33218f4dd175bb2122e4e
28afd30b86c65c7c5f47bc6e8a009bce
随机推荐附近主播
class Live_desk extends APP_Controller public function recommend_video_room() { $nowtime = time(); $page = intval($this->input->post('page', true)); $page = empty($page) ? 1 : $page; $page_size = 20; $from = ($page - 1) * $page_size; $sql_page = " LIMIT {$from},{$page_siz...
0
1d67aaa119f2a9a4e43019aeec2a10f7
6370c31e115cdb8bbb18ec138f26b663
Convert heliographic Stonyhurst to Carrington coordinates. Thompson2006 Eq. (3)
def heeq_to_stonyhurst(Xheeq, Yheeq, Zheeq): r = np.sqrt(Xheeq**2 + Yheeq**2 + Zheeq**2) lat = arctan(Zheeq / np.sqrt(Xheeq**2 + Yheeq**2)) lon_hg = arg(Xheeq, Yheeq) return lon_hg, lat, r
0
0bded14e35b66d3d5eb198b77ec1a98d
5606384a3daa0478c2282b46c4e12288
处理桌台模式变更造成的取餐单和点菜单的变更
namespace Xiuse.App.Controllers.OrderBill [RoutePrefix("api/Order")] public class OrderController : BaseResultMsg [Route("ChangeDesk")] public HttpResponseMessage PostDeskChanged(dynamic obj) { string orderId = Convert.ToString(obj.orderId); string newTableId= Convert.ToS...
1
a632737451a892d86ef2f2222ab67c00
e9eedb837438a7b651715540d63f1d9b
Saves raid comps
void idAFEntity_Base::Save( idSaveGame *savefile ) const { savefile->WriteInt( combatModelContents ); savefile->WriteClipModel( combatModel ); savefile->WriteVec3( spawnOrigin ); savefile->WriteMat3( spawnAxis ); savefile->WriteInt( nextSoundTime ); af.Save( savefile ); }
0
87f9df5d69ab0ecf17786db4aed3edf6
ff3a9ff4c8a88dfe2f350b1e0e695457
Sends a indicator service request to the server and returns the result information by invocation of the response listener
ServiceMetaData metaData = this.getRsfContext().getService(serviceName); this.doCallBackRequest(metaData, methodName, parameterTypes, parameterObjects, listener); }
1
03763b6794abd73cd4020d0fc0bfd066
2a8ae92e56621ab7d18cc3e9b71d6ab6
A memoization function based on a Redis cache.
def memoized(*args, **kwargs): key = str(args) + str(kwargs) + str(func) if key not in SumoBackend._CACHE: res = func(*args, **kwargs) SumoBackend._CACHE[key] = res else: res = SumoBackend._CACHE[key] return res return memoized
0
1b4b2a4eff794c25b888c3d400bf321c
95175cd964f43eb0d189ea2144e646a5
Retrieves the max end date for event_groups loaded by the devices associated with this sim id
{ global $objDbSelect; $dates = split(' ', $dateFrom); $dateTmp = substr($dates[1], 0, 5); if ($dateTmp != '00:00') { return null; } $lastDate = date('Y-m-d', strtotime($dates[0]) - 60); $sUserGroup = GetUserGroup($userId); $sSQL = ...
0
224610ae1550cc02b2e309abb3538316
042212abbd67e9bce8ef1fd11c95675c
Get the latest message
class RedisConnectionManager: def get_message(self): self.newest_message = self.sub.get_message() return self.newest_message
1
653f7dd0887966a87aa7c18e474e3f1d
60aa4940780bfcaf02870397285d291e
Determine whether y dimension mapping is available.
{ return MAP.find(XDI_RawAccGyrMagTemp) != MAP.end() || MAP.find(XDI_RawAcc) != MAP.end(); }
0
432d9fb8ee87de00139cbc0da0a53eb2
786aac87ff606d76383bd25736073d80
Replace loopback address with server address
namespace Bp.EndPointer public class RegisterEndpointerHostedService : IHostedService, IDisposable private string ParseServerAddress(string address) { return address .Replace("[::]", Environment.MachineName) .Replace("localhost", Environment.MachineName) .Replace("*", Environment.MachineName); }
1
9a7ae13821827d5cdb74e49fc52c9b17
0d2636f3c4a2d87ad2d6d459472d1131
Si el usuario tiene configurado un printer point lo selecciona Caso contrario intenta con el 001-001
function useDefaultPrinter() { if (qz) { qz.findPrinter(); } }
0
82ea62b692ab8c11a94c56675fc2f4e3
d0291606806237b958a75e2043e86964
Implements the ListIdentifiers, ListRecords and GetRecord OAI-PMH verbs
self.oai_response = oai_response self.sickle = sickle self.verb = self.oai_response.params.get("verb") self.element = VERBS_ELEMENTS[self.verb] self.mapper = self.sickle.class_mapping[self.verb] error = self.oai_response.xml.find( './/' + self.sickle.oai_names...
1
4ee98677c107149afbf8148ed00d105c
cc7286b706d7306f74b08f73cec63399
Changes the state of the monitor.
namespace PChecker.Actors.Logging void OnMonitorStateTransition(string monitorType, string stateName, bool isEntry, bool? isInHotState);
0
69f367b66509953aeb98aef8f6ab9efc
0841f596ffb7e98f64ebf0138c97fe45
用虛線畫矩形
export class CanvasLearnComponent line() { var canvas = this.elem.nativeElement.querySelector("#d2"); var ctx = canvas.getContext("2d"); ctx.beginPath(); ctx.moveTo(10, 15); ctx.lineTo(100, 15); ctx.closePath(); ctx.stroke(); }
0
a7e68deea66e6c6e12bec07f3e9af606
36b5372389a4d5baf70191b433639455
set up parameters and initial Green functions for the nucleon system (symmetric nuclear matter). the initial distribution is given by eq.(13) of the long write-up.
self.scale = 1000 self.L = 0.0012 self.dx = 0.000025 self.hdx = 1.2 self.rho = 1000*self.scale self.alpha = 0.0 self.nu = 0.1/self.rho self.co = 0.010
0
b0d78afcb1c08fba7d072e6691b31ee6
3b1806e4536746a563372b9b6e9c2426
Init a transaction.
class Table extends BaseDbTableResource protected function initTransaction($table_name, &$id_fields = null, $id_types = null, $require_ids = true) { $this->selectTable($table_name); return parent::initTransaction($table_name, $id_fields, $id_types, $require_ids); }
1
765fbc61f9463ac505d3fecffee0e291
6eebdc69b55631e633cf674715cee9b2
測試修改黑名單
{ $this->form_validation->set_rules('ban', '被封鎖者', 'required|numeric|max_length[8]'); if ($this->form_validation->run() === TRUE) { $set_blacklist = $this->account_model->set_blacklist(); if ($set_blacklist) { $response['status'] = true; } else { $response['status'] = false; } } else { ...
1
58a860fdb9f2db3028110a66aab9750e
f9d9fe7941753acefd599ebafcd70f56
同步用户数据库,必须为继承的子类重写,同步所有子类中打开的用户数据库 如果发生数据库错误,则抛出该异常
syncDbUser(serviceid: string) { return axios.get(`/api/dbadmin/mysqladmin/${serviceid}/?action=sync_user`); }
0
a3769243e24f4c64978bb3439a6726ac
2b28815aa79f71578fbd708d6c465ef2
Writes the RecentlyOpenedItems list to file.
namespace Deployer public partial class MainForm : Form private void SaveRecentFilelist() { for (int i = 0; i < _recentfiles.Count; i++) { RegistryHandler.SetValue("RecentFile" + i, _recentfiles[i]); } }
0
7b2ae96ac1dc3266f0bc25faee8a364d
93ea17463e3cec31aacaa99af1305f41
加入群-支付回调
$xml = file_get_contents('php://input'); $result = xmlToArray($xml); $json_d = json_encode($result); $time = time(); $pay_log= new Paylog(); $pay_log->info = $json_d; $pay_log->c_time = $time; $payfrom = "WXPAY"; if($result['return_code']==...
1
f1280b11fcb0d3c1f4165645cb3d26c7
907992542a28388ecd98f740dedbe7e4
This method allows players to change the names of their pets.
public class ProcessingGUI public void changePetNameByUser(final String oldName, final String newName) throws UserException { clinic.resetPetName(oldName, newName); }
1
813dbf25686958e6c3929bc5f7db05d8
48519621535b1d7352f9f9a5a0a4cd09
对两端点坐标编码
function encodePoint(xy) { return [ parameterInteger(xy[0]), parameterInteger(xy[1]) ]; }
1
c171b665eb4f9cd4904466a90f1fe01b
6395f9fcba2ca47a154844b87521d2e2
Lower case routine. Returns number of characters modified
int lowercase(char *s) { for( ; *s != '\0'; s++) *s = tolower(*s); if(*s == '\0') return 1; return 0; }
0
4c110e7077255a2919cc89a5e9db3614
b854ce07d86c24b181e0b70c7ca56b46
Prim's maze algorithm
function prim_maze(){ num_rows = snakeboard.height/grid_margin/2; num_cols = snakeboard.width/grid_margin/2; num_vert = num_cols * num_rows; var directions = new Array(num_rows); var visited = new Array(num_rows); for (var i = 0; i < directions.length; i++) { directions[i] = new Array(num_cols); visited[i] = ...
1
18355eaa86c91dbae316f1431090b1ce
a0a2d541b199469f187a571f3cbda03d
删除一个文件的Cmake相关内容
def remove_cmake_lists_file(folder_path): cmake_lists_file = os.path.join(folder_path, "CMakeLists.txt") os.remove(cmake_lists_file)
1
77dc7804e486fa3659705c0d3bd854a8
6100610854d6fe5b33aff56f9884a58d
拖曳排序規格卡片的規格屬性列表
$('.conr-ggbj-in1').unbind("click").on('click',function(){ var _top = $(this).offset().top; var _left = $(this).offset().left; var _index = $('.conr-ggbj-in1').index(this); var listtcDom = $(".list1-tc"); var attrMainDom = $('.tc-main'); $...
0
f3ea00ebfca3e50ed07dc332fe96ffcf
211ef650dc4a5712e6a5f476fa9d6efe
道具按钮解锁
if($use_num <=0){ $use_num = 1; } $pdetail = $this->get_data('PlayerProp')->get_player_prop_detail($player_id,$player_prop_id); if(empty($pdetail) || empty($pdetail['player_prop_id'])){ return array('error_code'=>2,'cooldown_msec'=>0); } if($pdetai...
1
a4a62e136003f4ae5e5b10dab6300058
f2ee3ef9bbfda5864fdc9499245710ca
Whether this client supports the "partial analysis" mechanism. When this is true, a module is analyzed by lint in isolation (the detectors are not allowed to query information outside of that library, such as downstream information about minSdkVersions in the consuming app module), and then the results can be reported ...
public boolean getPartialImport();
1
215c089fd46ef3b401941f67532bfa66
0b7f61f6bc4954f93d07de494dbceeac
是否是网格形式地图
class PlotView(PlotPanel): def IsGridMode(self): return self.director.IsGridMode()
1
e886358664a523f6ce73ebbf059aa457
993dd377a4218b0edef95d2d0f65c83e
Can use multiple clients.
class TestShardAwareIntegration(unittest.TestCase): def test_connect_from_multiple_clients(self): self.create_ks_and_cf() number_of_clients = 15 session_list = [self.session] + [self.cluster.connect() for _ in range(number_of_clients)] with ThreadPoolExecutor(number_of_clients) as pool: ...
1
21bc3178acaa3509c002e642a5940207
0f8f3d7f8ba0e9e888d4eb04c550ccd3
prints the options and returns the answer to the caller
for (int i = 1; i < options.length+1; i++) System.out.println(i + " : " + options[i-1]); int r = in.nextInt(); in.nextLine(); return r; }
1
63d52f72811291247e6928267a450501
b1896ad6f8ebf17bd3dd7c8be3cd28cf
Find two lines, which together with x-axis forms a container, such that the container contains the most water.
def trap_water(arr): pass
0
16eea593796cb0d8c533ddcf0082c1bd
37bf41abab61aaed8e4a48709cd9334a
add a function to be processed after interpreting all lines from a scan
def add_line_analyzer(func): LINE_ANALYZERS.append(func) def wrapper(tokens, offset=None): return func(tokens, offset=offset) return wrapper
1
a6df1e25809ce98081b3101d5a407c09
64d33760504d75ca0abe4e1e0b5774e2
Dynamically outputs the fields table for a given post type.
function rbm_cpts_do_field_table( $args = array() ) { rbm_cpts_field_helpers()->fields->do_field_table( $args['name'], $args ); }
1
ec021d319f3e5dfd5d8cd7550c3e8fbb
ec413ce585c57e5fc10d74dd7893c6a2
Personeller Tablosunu Düzenlemek İçin Kullanılır
namespace ES.Admin.UI.Controllers public class PersonelController : BaseController public ActionResult Index() { var routeArr = base.SetPage(); if (routeArr != null) return RedirectToAction(routeArr[1], routeArr[0]); return View(pm.GetPersoneller()); ...
0
e2c21af32192c96b2779eb7e8079be94
72185bc14658d1092727361c57307794
Deletes the selected items immediately
let isSelection: boolean = !!items; if (!isSelection) { items = [...copy(this.selectedItems)];} this.dialogs.confirm({ text: 'dialogs.deleteSelectedItems' }) .then(() => this.calendarService.deleteItem('F', items.map(item => item.calendarItemId)), () => { throw null;}) .t...
1
b064f65ad4ec4c12d28a783cf788d7e0
7680771b3337f4925d9274fdb192bc6b
Является ли документ неформализованным.
if document.Get('ПодТипДокумента') in ['протоколCheckXMLUFA', 'протоколCheckXML']: raise ValueError if not document.Get('@Событие') and document.Get('ПодТипДокумента') == 'ПротоколУПП': raise ValueError if send_doc.Get('СостояниеКраткое') != 0 and not document.Get('Конец'...
0
4efcfef2afcf99b3020dac715ec5019d
e8b0e7c3073c04694336aaf1f3555d5d
Invoked for every notification received. Messages can have the following structure: CREATE_TABLE:<table-name> DESTROY_TABLE:<table-name> INSERT:<table-name>:<key> UPDATE:<table-name>:<key> DELETE:<table-name>:<key> This method will split combined notifications, e.g. for bulk upserts and emit them as individual events
class AbstractAgent(PubSub.Subscriber): def process_notification(self, content, channel): pass
1
9546877c45dbd1c62e4076cd632fc52e
2bc0f50178fee656d5ecb00718fa6a24
GET: ExcersiseBelongsToCategories
public async Task<IActionResult> GetExercises() { if (!ModelState.IsValid) { return StatusCode(400); } var dto = await _manager.GetExercises(); var response = _mapper.Map<IEnumerable<ExerciseListItemResponse>>(dto); ...
0
49777f20db2d2b3fbfc6a414699334e8
023ee097b7cd9cc272e6327df41dca75
获取某个特定位点的PSI值
int PointGet(EnemyData a, double s) { int point = 0; point = log(100000.0) / log(s) * a.pt; return point; }
0
98749dcd88118e10bb34b6a0ea92588f
7e630b242c24504c3031d1897e2ea28c
dump 32-bit register pair
_u16 x = (_u16)(dw>>16); print_word(x); x = (_u16)dw; print_word(x); }
1
6011d7413f3d7d6975f0bb700b998ed4
fb49cf41e7aa3884d26d7cb74ab67a18
Getter for <code>WETRN.PYMT_TYP.PYMT_TYP</code>.
@javax.annotation.Generated( value = { "http://www.jooq.org", "jOOQ version:3.5.0" }, comments = "This class is generated by jOOQ" ) @java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class GptStartBallanceRecord extends org.jooq.impl.UpdatableRecordImpl<dshumsky.jooq.generated.tables.records...
0
92c268dda6fa6bdc6e6fe42be0c90bd4
d2350bd107fd40d7df3cff6175fa763c
Test case for fetchInboundSMSByPage Fetch inbound SMSes by page.
public void testGetSmsByRecipient() { System.out.println( "testGetSmsByRecipient" ); String originator = "+919867192752"; smsInboundStoreService.saveSms( testSms ); Collection<SmsInbound> result = smsInboundStoreService.getSmsByOriginator( originator ); for ( SmsInbound s...
0
29ecbac05565880424301f09f6d53e93
faf853b115ab94b1774818bea3c92629
セッションIDの存在をチェックしてなければ登録する
{ $id = session_id(); if ($id === "") { session_start(); } }
0
8eb9708a5ea0712eb5f167b9b712fc0b
551eb4bb9b00d06af27537f02d656b53
set circumradius of polygon sequence
class Polygon: def circumradius(self, circumradius): if circumradius <=0: raise ValueError("Circum radius must be positive") else: self._circumradius = circumradius
1
6875fa35f4f3bc1199561e57ae042bb9
41682367cb8036499b103ad4cde301e9
@brief Assert that pin control is set to OUT
void pca9555DIG_OUT_Config(u8_t pin) { IF_myASSERT(debugPARAM, pin < pca9555NUM_PINS); sPCA9555.Regs[pca9555_CFG] &= ~(1U << pin); pca9555WriteRegister(pca9555_CFG); }
0
086394bb0fd70c560f1eb9013ce4db04
37d50e43aacc051191bd926e4875ed1f
Get the credentials needed to be allowed to manage a connection to the back office.
final class Am{ public static function getCredentials(){ if(!($credentialsManager = self::call("credentials.handler"))) return null; return $credentialsManager->getCredentials(); }
1
187bc708ac830646ae82d15cf5662c44
a87465c40fc531a21a16da7305c59df8
Tries the tracking skill to detect nearby monsters
INT16 TrackScent( SOLDIERTYPE * pSoldier ) { INT32 iXDiff, iYDiff, iXIncr; INT32 iStart, iXStart, iYStart; INT32 iGridNo; INT8 bDir; INT32 iBestGridNo = NOWHERE; UINT8 ubBestDirDiff = 5, ubBestStrength = 0; UINT8 ubDirDiff, ubStrength; UINT8 ubSoughtSmell; MAP_ELEMENT * ...
1
ca9b9a5e5699f46c744035b97fe53852
c3a2bc1ff505f39dff7e5b10366c4fda
获取指定图层下所选中的features列表
{ IEnumFeature pSelected; IFeature pFeature; IArray FeatureArray = new ArrayClass(); pSelected = (IEnumFeature)pMap.FeatureSelection; pSelected.Reset(); pFeature = pSelected.Next(); FeatureArray.RemoveAll(); while (p...
1
d0aa3966e7bb15ff20979e11d60e32c0
4a64db450f5bb2cf1f5b6a1fa472645b
Method to show the failure page
namespace sample.Controllers public class UsersController : TwitterController public override ActionResult Fail() { return View(); }
1