query_id
string
corpus_id
string
query
string
code
string
label
int64
6b73248269a2f5506f884ed2c165bfeb
36b5e7693ec0027af8b6b95bc35bdd7a
Toggles the listening state of the application's socket listener.
class WebServer public set isSocketListening(value: boolean) { this._isSocketListening = value; }
0
e8835e30f6dd70f320eea2bf4864bbc1
0650013aba379182983167139e2bf7bd
returns the HMM state associated with this state
public class LexTreeLinguist implements Linguist public class LexTreeHMMState extends LexTreeState implements HMMSearchState, ScoreProvider @Override public HMMState getHMMState() { return hmmState; }
1
15bafff165948e2b6349651c389cba97
921fe782a15d49d922c705a4efa25785
Check if sending is done
boolean isSendingOver();
0
c378711cebdaba28f975f51bf365da04
924bfa4257b8a6b38ca346f060e343a6
写入DoubleList
DoubleNode node = new DoubleNode(value); if(head == null){ head = node; tail = node; }else { node.last = tail; tail.next = node; tail = node; } return node; }
1
ce7207ae4771657a6afca4732c89494c
d695cf5414b9c5bfef46903e5831f0a4
GET /consumer_categories GET /consumer_categories.json
options = jsonapi_options() @producers = @json_api_service.entities_for_index(producer_params, options) respond_to do |format| format.html { @producers } format.json { render json: ProducerSerializer.new(@producers, options).serialized_json } end end
0
c0c25c4f859240e31f9e777b16803b14
7b3da9c23e87cd41fa83b51bd4a542b4
Parsing XML to map locations on Google map
StringBuffer buffer = new StringBuffer(); InputStream ins = getResources().openRawResource(getResources().getIdentifier("takoyaki", "raw", getPackageName())); XmlPullParserFactory factory = XmlPullParserFactory.newInstance(); XmlPullParser xpp = factory.newPullParser(); xpp.setIn...
1
9446a6de50b277eb6e97d3754cb7fa26
0d876d3545c4ea71e34960a64b00f038
Helper method to add an annotation to a chain based on the annotation and chain character offsets
int charStartPos = _characterOffset + charStart; int charEndPos = _characterOffset + charEnd; createInternalMarker(charStart, _lineCount, charStart, charStartPos, charEndPos, reason, severity); }
1
c4538c5251db9eeb156b2db755afbfee
73c368c96f1d8859facde6190c7985ed
麻雀の再起処理
class Window_EagleMessage def eagle_message_reset_continue show if !self.visible if @flag_next else eagle_message_sprites_move_out eagle_reset_charas_oxy @eagle_chara_sets.clear end eagle_process_env eagle_process_temp @eagle_sprite_pop_tag.visibl...
0
68f588689dd5ae4eaf396931604cf35a
7c93f744356e8f5d03e98587578813ae
registerChecks 将健康检查处理程序注册到服务注册中心。
{ if (app == null) { throw new ArgumentNullException(nameof(app)); } if (options == null) { throw new ArgumentNullException(nameof(options)); } UseHealthChecksCore(app, path, port: null, new[] { O...
0
577e0f1ca3698bfc842295a1fe3e3f2d
8fbe70a53d6ff3f3029c1570929f9ac5
Delete the search at given index
cls.reload_settings() searches = cls.settings.get("saved_searches", []) if idx < len(searches): del searches[idx] cls.settings["saved_searches"] = searches cls.save_settings()
1
536ca19ea0967056ba089255045fd3ae
78b6a77c02f6c15898080caf7f0906cc
Genera un token de acceso para un participante de una sala de Twilio.
class Twilio public function generateChatAuthToken($identity = null, $ttl = 3600) { $token = $this->getToken($identity, $ttl); $chatGrant = new ChatGrant(); $chatGrant->setServiceSid($this->twiMLApp['sid']); $token->addGrant($chatGrant); return $token->toJWT(); }
1
3694b9d49eb55f3fa96636e398d9c3ca
db592176433c2e5948f0524eecd0abb6
Sometimes the environment state returned by the OpenAI environment does not suit to the classifier representation of data used by ACS2. If a mapping function is defined in configuration - use it.
class ApplyFunc(gym.ObservationWrapper): def __init__(self, env, func, output_observation_space): super().__init__(env) self.func = func self.observation_space = output_observation_space
1
a3ac503841ae459116abbd9da7dad3e5
6632aed9d05abaa0c3593dff3eb1895c
Don't download roles listed as dependencies.
class User extends Entity public function calculateDependencies() { $dependencies = parent::calculateDependencies(); foreach ($this->entityTypeManager->getStorage('user_role')->loadMultiple(array_keys($this->options['roles'])) as $role) { $dependencies[$role->getConfigDependencyKey()][] = $role->getConfig...
0
f5b918aa60fb6197299cdceb481fdbfe
284a4fe5303c8a7e442537809095f451
1. 一个长度为n-1的递增排序数组中的所有数字都是唯一的,并且每个数字都在范围0~n-1之内。 在范围0~n-1内的n个数字中有且只有一个数字不在该数组中,请找出这个数字。 1 <= 数组长度 <= 10000 示例: 输入: [0,1,2,3,4,5,6,7,9] 输出: 8
nums = [2, 3, 1, 0, 2, 5, 3] solution = Solution() repeatNumber = solution.findRepeatNumber(nums) print(repeatNumber)
0
741e344fabdf55b1b05518011bfaa395
40701a41fe2d1b8536579e393c5944b6
判断一个词能否通过变换一个字母变成另外一个词(题目已经规定所有词的长度相同, 这里不用判断)
class MagicDictionary: def search(self, word): return any(sum([a!=b for a,b in zip(word,s)])==1 for s in self.dic[len(word)])
1
9b6bb0dcbeb929590aba6a2d5a810cd3
b987e3954ff550e6cff38a7702757532
Reset the response counter for the next itteration
class Client(object): def _reset(self): self._count = 0 self._url_path = {} self._response = None
1
7aaafd94dd5e3286aa7a7e7e5e8ab398
46a2406e98ebbd794a481461c22d7e71
Check if CVV number is exactly 3 digits
function validateInput_cvv() { const cvvInput = document.querySelector('#cvv'); if (cvvInput.value === "") { console.log('input invalid88') document.querySelector('#cvv-field').classList.add('input-invalid') document.querySelector('#cvv-field...
1
05e38568c440bb924cb6a575fb672188
e38e094d7e31c093d10b27a28ef6c686
Get code points of specific font form db
namespace Dt.Pdf.Text public class OpenTypeFont : BaseFont public override int[] GetCodePages() { return this.OS_2Table.SupportedCodePages; }
0
5bdea381952b61dbffaacc29e9ff9cb8
f6c6f10f2c301567b56052b620ee5e51
Envía a otra pagina al cliente
class VeryPHP{ public function redirect( $pagina ) { header( 'Location: ' . $pagina ); }
1
2207c55f5f9ada7baabe428cfea24d88
672917d02e1e29916c089383e0a57e4c
detects if Git revision
function hasGit() { if (_hasGit != null) { return _hasGit; } return (_hasGit = hasENV('git --version')); }
0
0d55e91e2ac73789060ca9eeaec2985d
0c9209513ff3a1bec8296ca6a9f5bb49
根据id获取星座信息
Mascot getMascotById(int mId);
0
68063e5c517b91687ee0a7f1e4f0531c
683728729d99b2f7bac5cf1c7e0ecea3
Sets the arrival date and time of this Flight.
public class Resupply implements Serializable, Transportable public void setArrivalDate(MarsClock arrivalDate) { this.arrivalDate = (MarsClock) arrivalDate.clone(); }
1
f234ebb335a57d9dd4cefdbacee1e27e
9d3ba48cf342443ac5b8a1863ddaeb6e
Raises a ValueError on a new unsupported operation type.
class TestDeviceSupportedLogic: def test_supports_operation_exception(self, mock_device): with pytest.raises( ValueError, match="The given operation must either be a pennylane.Operation class or a string.", ): mock_device.supports_operation(3) with pytest.rais...
1
b7127bcc491c552bf26c7f836602ff11
3438b8ab7da6d21941e8a489927ad67c
Метод изменяет режим работы сокета на блокирующий.
public function setBlocking();
1
36748b3c39e3563b3b3e68161db11ac3
439da2075eb394591ea41699d8d81556
@brief Set SlowRef FBP BSMP Function Configure setpoint for all FBP power supplies in SlowRef mode
static void spibsc_4bit_setting(void) { volatile uint8_t dummy; MPC.PWPR.BYTE = 0x00; dummy = MPC.PWPR.BYTE; MPC.PWPR.BYTE = 0x40; dummy = MPC.PWPR.BYTE; MPC.P60PFS.BYTE = MPC_PFS_SPIBSC; MPC.P61PFS.BYTE = MPC_PFS_SPIBSC; MPC.P62PFS.BYTE = MPC_PFS_SPIBSC; MPC.P63PFS...
0
d3145609b2c52e6b7eb8d04ec3f0c663
f162ee7568db0e14b14ab0f0539b3b2b
Add tag manager using curl
$headerdata = array( 'X-Auth-Token: api-key ' . $GLOBALS['token'], 'Content-Type: application/json', ); $payload = array( 'tags' => array( array( 'tagId' => $tag_id, ), ), ); $payload = json_encode( $payload ); $ch = curl_init(); $url = $GLOBALS['api_url'] . '/contacts/'...
1
1014fa4d5d77413923121277113b209a
5cc08add61a2db878d1b669a29510870
移除app位置记录(新版),此方法只用于将APP从首页显示上移除
int count = location; int index = 0; for (FunItemInfo info : mAllAppItemInfos) { if (index >= count) { info.setIndex(info.getIndex() - 1); } index++; } }
0
64c0a431dc6992c0dc5696d8cfde2ed1
70d9533b8ca6ed44942db89c958c16eb
Regenerate carousel handle titles
if ( $str == '2013_bayarea' ) { return 'Maker Faire Bay Area 2013'; } elseif ( $str == '2013_newyork' ) { return 'World Maker Faire New York 2013'; } elseif ( $str == '2014_bayarea' ) { return 'Maker Faire Bay Area 2014'; } elseif ( $str == '2014_newyork' ) { return 'World Maker Faire New York 2014'; } }
0
4060f71175a8b96e7be789f40945339d
3a66d11a0fb7bceea75df89202048fa1
Sets the duration of a certain frame.
void Pawn::setFrameDuration(unsigned int frame_duration) { aniFrameDuration = frame_duration; }
1
810a090926436017212c0bc7c07c5169
e212f445a702551b464780c3fbefbbe8
Только для тестов: очищает статичные переменные
namespace ApiWebApp.Controllers [Route("api/[controller]")] [ApiController] public class BadStaticController : ControllerBase [HttpGet] [Route("clear")] public async Task GetClearAsync() { BadStaticData.Clear(); }
1
2b9b82d9cdf5d5cacee86b0b5a2aa288
e4427768f6dff51a773be38373a84dd3
隐藏地图上的NPC
function MapMgr:setMapNpcVisible(visible) local count = self.mapNpcs and #(self.mapNpcs) or 0 for i = 1, count do self.mapNpcs[i]:setVisible(visible) end end
1
68079c893ee1121a57f063042918e1e8
ad31fafbfea789f7c78585fc8f3f7141
合計(利息)を設定する 合計(利息)
public class Fpay0001s01FacRepayInterestEntity extends PageBaseEntity public void setCost(BigDecimal cost) { this.cost = cost; }
1
0fbba8316f26befc8ee2625c95b2b655
d870b66eb7995c7389ade43ac3685437
@brief insertar puntos dados dos iteradores
{ list<T> temp = l1; copy(p2, l2.end(), p1); typename list<T>::iterator iterTemp = temp.begin(); typename list<T>::iterator iter1 = l1.begin(); while(iter1 != p1) { iterTemp++; iter1++; } copy(iterTemp, temp.end(), p2); }
0
a035d20c4d254b8201e8d52ff797a104
7e9113def79ba755c668d10d2af80d34
This method is used to allow cooldown bypasses.
class TurtleParent: def other_cooldown(self, value): pass
0
6a32c0c1958745100225b30fc09c532b
c7c0a7491e0b96d30c96746bcf17f5a8
DPanicWithSpan logs on dPanic level and add the logs on the trace if span exists.
func Panic(msg string, args ...interface{}) { AppLog.Panic(msg, args...) }
0
4fd23d9322f5f59ed354eb0fb8006f58
9abdac059eedbf3b155376b52a631cb6
Test of requestProduct method, of class VendingMachineServiceImpl.
public class VendingMachineTest @Test public void testDeleteProduct() { fail("Not yet implemented"); }
0
af315008f1c5415d53174f6a2a5c72da
9319134476855abcbb2c182e3d2ebc14
특정 세션아이디가 멤버에 포함되어 있는지 여부
public class Cache private bool Contains(SessionId id) { }
1
1dd98b7a41c7ddcb9c1a3adde621aacb
180e3b1a6fd99a6f2c075e49bb5c6ed0
Obtains the vote percentage for the provided candidate. Such result can only be queried once the vote has stopped.
CandidateProgressStatus getProgressStatus(long candidateId);
0
28bd9931427d7d0c71b42d5be3226708
cead218a4ecd058b2ff8e0ca026457b4
Extract metadata from a file and update the file metadata file.
def process_metadata(event): results = _itemFromEvent(event, 'ItemMetadata', AccessType.WRITE) if not results: return file = File().load( event.info.get('file', {}).get('_id'), level=AccessType.READ, user=results['user'] ) if not file: logger.error('Could not load mod...
1
2f4e3e05bf71735166f2fb52c27117c4
be11b8a65cddfd09d00457e10f9fbc96
定时汇总
def getSummary(): xmlyUtil = XMLYUtil() klUtil = KLUtil() qtUtil = QTUtil() qtRes = {} klRes = {} xmlyRes = {} qtRes['albumCount'] = qtUtil.getAlbumCount() qtRes['audioCount'] = qtUtil.getTotalAudioCount() qtRes['categoryWithCount'] = qtUtil.getAllCategoryWithCount() xmlyRes['alb...
1
7129981261888c7a8b01e4d356057475
2a20c853e49044fa82ddfc07b16f0198
実績報告区分(<code>REPORT_FLAG</code>)のグループ順をセットします。 このメソッドのprioパラメータは無視されます。引数なしのメソッドを使用してください。
public class PCTRetResultSearchKey extends DefaultSQLSearchKey @Deprecated public void setCollectJobNoGroup(int prio) { setGroup(PCTRetResult.COLLECT_JOB_NO) ; }
0
7daa475d9a3fbe367af0d52d17bfca6a
f1ccc23991acf3924c1f55cdd0e23141
用于向MultipartBody.Builder中增加图片
checkNotNull(name, "$name must not be null!") return RequestBody.create(okhttp3.MediaType.parse("multipart/form-data; charset=utf-8"), name) }
0
cf8e34ddda07b2080cdb844f8d256f55
aad0d9c02d66c9b23cc85530735ff928
根据SKUID和当前时间查询产品正在做的活动
ServiceResult<ActSingle> getEffectiveActSingle(Integer sellerId, Integer channel, Integer productId);
0
98406b8d1d4cb5cc85be05667b67e504
add74b1a8e47860164358f3b0e080d2b
Compose results for parallel operation.
public abstract class AbstractMaster < T, V, R > protected abstract R combineResults( Iterator< Future< V > > subResults );
1
10719e2a2d0ba5fd731940be5b669f3e
d48f380655857946d053ddf47c3cc115
分页查询DetailedWords对象
Page<Question> wordMLQueryByPage(int type, Long minId, Pageable pageable);
0
b588f47e47af2f78d99c551aa5debc05
db9c3ff7477321beb33597fb2a4dd776
Setzt die Ecken dieses Dreiecks (A, B, C) neu.
if a is not b and a is not c: self._a = a if b is not a and b is not c: self._b = b if c is not a and c is not b: self._c = c
1
cfb0c236b3f028d518ea2379628d3198
fe3f0819f49c206e9c6be939b4655db1
Unlinks the given vehicle from any segment end that the vehicle is currently linked to.
if len(self.segments) > 0: if self in self.segments[0].firstPoint.lines: self.segments[0].firstPoint.lines.remove(self) for i in range(len(self.segments)): if self in self.segments[i].lastPoint.lines: self.segments[i].lastPoint.lines.remove(self) ...
1
0601dfe6575ba5e71f562494fad8e955
86a1225a797f065db10d1b7c1b0b78a0
Configures the runtime to map the entity to the specified event type.
namespace dddlib.Configuration TConfiguration ToMapToEvent<TEvent>(Action<T, TEvent> mapping, Func<TEvent, T> reverseMapping);
1
f0abcc815bd2fee0ae6bd0712e27f5ef
1b98778b160bc346710395cb19ace8d7
#Pre-cond: JSON of avgVol of buses #Post-cond: Inserts JSON of avgVOl of buses into database
if(idToInsert == '0'){ valueToInsert = parseInt(valueToInsert) + 500; } var command = "http://"+ IPAdress +"/zns.cgi?cmd=f&p=" + idToInsert + "&v=" + valueToInsert; $.ajax({ url: command, context: document.body }).done(function(){ }).fail(function(){ }); }
0
f58f79ae933e86b046dc6d55525be8a9
b087c35788ec075ccc1d191139d0c448
Adds an attachment to the topic selected by its identifier.
thread = threading.Thread(target=attachment.dialog_attachment_thread, kwargs={"base_url": base_url, "data": payload}) thread.start() return make_response("", 200)
0
2885d732308fa8b96119d261d097b2e9
9ff4690ce30f6b12c5f7efc7acc402fb
函数的嵌套:在一个函数的体内用def定义一个新的函数
def a(): print('afunction') def b(): print('bfunction') return b
1
1958c9ec9396679dc2effbd82ebc9fd1
08d9043538e3da1220a544a7a8bf5af4
Apaga al manejador de sonidos, antes de ser destruido
public class WavyEnemyMovement : MonoBehaviour private void OnDestroy() { data.DeleteStateChangedListener(PlaySound); }
1
c7f594a8832ddaec509029ee914bb936
dcdc4075e515bf6234bfb03540777bde
修改VAR.py中USERLIST配置项
def addVar8(): cl.cycleOverList('addVar8')
0
54788f5b905df15a51f41ff63f4bd841
f55f472153f2f507c379a2134ecfe37c
Returns amount of padding to be applied for a table cell.
namespace Tizen.NUI.Xaml.Forms.BaseComponents [EditorBrowsable(EditorBrowsableState.Never)] public class TableView : View [EditorBrowsable(EditorBrowsableState.Never)] public Vector2 GetCellPadding() { return tableView.GetCellPadding(); }
1
3dc6cfa7459235a9bb60c7ec77713f1b
e3706949d2235e93f1640903bc54b985
Generate code that initializes the state variables for a given instance. Unlike parameters, state variables are uniformly initialized for all instances of the same reactor.
public class CExtension implements FedTargetExtension private String generateInitializeTriggers( FederateInstance federate, MessageReporter messageReporter) { CodeBuilder code = new CodeBuilder(); var federatedReactor = FedASTUtils.findFederatedReactor(federate.instantiation.eResource()); var oldFeder...
0
930b848118656136fa4d875c265b04e3
719fe8f2ba25bd4bad937f5aa4162d9b
Returns the request handler to be used as the default route for requests which do not match any of the other defined routes.
public function setDefaultHandler(): void;
0
95cc87fadffbd7a5d5a97fc2c84ef194
d0e8ccf2015a97f182f0b14badbe8c68
保存用户登录接口成功或失败的请求次数
$data = array( 'id' => $mid, 'zn_mdate' => NOW_TIME, 'zn_trylogin_times' => $times, 'zn_trylogin_lasttime' => NOW_TIME, ); $this->save($data); }
1
43622a4bc80baf8a9ec81086a09dd6ea
16a6f92a67fedbfe2b4d06305e321a91
取得目前所有帳號,用來驗證輸入使用者是否已經建立,避免每次輸入一個字元都會透過AJAX去伺服器驗證
{ try { int intAccountID = Convert.ToInt32(Session["AccountID"]); var list = (from tbuser in myModels.B_UserTable where tbuser.AccountID == intAccountID select new { ...
0
a07f52660b751b32a46b16c7108e1a68
4c6c8c2aa9969d1503a7de89ca139109
Wait until arrived and set origin to current position
class CalibrationModeClient(socketio.ClientNamespace): def at_origin(self): self.emit("at_origin", callback=self.at_origin_callback)
0
ddbb596050e6b97c409adf94cc73743f
81a73a6999ee045bf24c709ae41407d2
#牛顿法求解一元函数极值
fixedpoint <- function(fun, x=0, tol=1e-9, max_iter=100) { x_old <- x + 1e6 iter <- 0 while((abs(x-x_old) > tol) && (iter < max_iter)) { x_old <- x x <- fun(x) iter <- iter + 1 } if (abs(x-x_old) > tol) { cat("Algorithm failed to converge\n") return(NULL) } el...
0
c08c2b778b9a0c5f4b2023871621cd2f
1952a08d7de07b73f6d6a14175d2b7b4
Visit a parse tree produced by {@link Antlr4PilarParser#locationFile}.
public class Antlr4PilarBaseListener implements Antlr4PilarListener @Override public void enterLocationFile(@NotNull Antlr4PilarParser.LocationFileContext ctx) { }
1
9c4af5cf575775527ddfce7795b1f6ba
1e089a00e3e987a9cd36f97ef36fa601
@brief Up-link port configuration for downstream UC CoS mapped traffic to CPU port None
( GT_VOID ) { GT_STATUS rc; GT_U32 byteCount; GT_U32 expectedByteCount; GT_U32 egressByteCount; GT_U32 extractBcFailsCount; CPSS_PORT_INTERFACE_MODE_ENT sendPortIfMode...
0
3fc631099424de97b8897c039c5496ed
ba28503febeb3412874bd63bb983ee95
Функция для обработки события нажатия на кнопку 2ой игры и 2ого уровня
{ Level = 4; f = true; Close(); NameGame = 2; }
0
cfd231359db64f99fd13844493cee530
61981e6b77ae70a1b96470f541c22a07
makes Mario immune to damage temporarily
{ if (iTime > 0.0f) { immunity = true; } else { immunity = false; iTime = 0.0f; } if (health <= 0.0f) { Destroy(this.gameObject); } }
1
7b2096bb7728fa54bdc9318b8ab757fc
a034868ffe0c084759599af3bc9d9998
OBTIENE IDENTIFICATIVO UNICO DE REGISTRO DE INSTITUCION RESPONSABLE
class TbFormadorOrganizacion public function getVcIdenFormador() { return $this->vc_iden_formador; }
0
9bfbfa242e44818d08d69650a343e056
5cce4cdaffa49b79be2830a784c0d640
Resets the grid to original coordinates
function resetGrid() { stopAllAnimations(); clearWalls(); myGrid.draw(); }
1
abcdaecb1bc2ad7e50e254de37a47242
7593ed29ab3b2ee15599c32e6a2369c1
Handles the console RemoteResize event.
{ ConsoleWidth = Console.Width; ConsoleHeight = Console.Height; ScrollHeight = ConsoleBack.Height; #if SystemIO ConsoleBack.ScrollToAsync(0, Console.Height-ConsoleBack.Height, false); #endif #if PCLStorage Device.StartTimer(TimeSpan.FromMilliseconds(1)...
0
af259d7a363ac993e64d946ab101cd11
ef259ac8a734e298221ed3e848268b8e
takes a source and switches the player's stream to it on the fly { }
void RealAudioSetSource(voleControlSite *site, vstr *arg0) { int hr; volevariant *argVar; volevariantList *argList = volevariantCreateList(); argVar = volevariantCreate(); volevariantSetString(argVar, arg0); volevariantAppendList(argList, argVar); hr = voleInvokeControlSite(site, 102, INVOKE_PROPERTYPUT, ...
1
ec6b15e07fa81e734ea4a07e5f2fff64
2c755ed6cb46835e48eb5248a69f368a
Affiche une ligne entre les points (x1,y1) et (x2,y2).
{ LVertexPos2D vertices[2]; vertices[0].x = (GLfloat) x1; vertices[0].y = (GLfloat) y1; vertices[1].x = (GLfloat) x2; vertices[1].y = (GLfloat) y2; glColor4f(m_Color->R, m_Color->G, m_Color->B, m_Color->A); glEnableClientState( GL_VERTEX_ARRAY ); glVertexPointer( 2, GL_FLOAT, 0, vertices...
1
a300cb2cf63a413155204df3b96647b2
d86df02dfc96feb7ddf7e9ec20513035
Returns a dictionary of intrinsic bodies.
class Ant(legacy_base.Walker): def mocap_tracking_bodies(self): return tuple(self.mjcf_model.find_all('body'))
0
699829c289c49fadb88b74d9715d7ed4
b90529ac417e0b1010100fff69e9acb6
Destination rectangle defines where the image will appear.
srcRect.x = x; srcRect.y = y; srcRect.w = width; srcRect.h = height; }
0
0fa49e71e65e5069f47139cd53f71053
44bd910c7c31cfb27747e9eca14a4bf8
Initialize Process Desciptor Table
void InitProcess() { InitTasks(); memset(&g_tss, 0 , sizeof(TSS)); g_tss.ss0 = SELECTOR_KERNEL_DS; init_descriptor(&g_gdts[4], SelToRealAddr(SELECTOR_KERNEL_DS, &g_tss), sizeof(TSS)-1, DA_386TSS); g_tss.iobase = sizeof(g_tss); P_PROCESS_READY = (void*)&g_pcbs[0]; int i=0; for(i=0;i<NM_TASKS;i++) { ...
1
f85ab0e1ff534c4efbf009f8e1823c05
fd2853eabc7bb8778f9f6eb33c218c6b
Moving Average Filter class. Calculate the moving average of the provided streams. This filter can calculated a moving average with different time windows for each fields in the stream.
self, stream: Stream, window: Union[Tuple[str, int], List[Tuple[str, int]]] ) -> None: self.stream = stream if isinstance(window, tuple): self.windows = {window[0]: window[1]} elif isinstance(window, list): self.windows = {w[0]: w[1] for w in window} e...
1
17d73cd3df1e777e24b895a4b6be3e0d
52d2c45166fddc82cb135536f78a3996
will require the admin to be logged in before any methods can be used
class AdminController extends Controller public function __construct() { return $this->middleware('auth'); }
1
28eb59f92235ef0a121fbd722c3572c3
ab58df44436496f3377e38237d291142
检验单打印
obj.put("result", "Y"); String inputStr = request.getParameter("Uvalidate"); String validateStr = SystemUtils.getSessionAttr("USER_LOGIN", RandomValidateCode.RANDOMCODEKEY, request, response).toString(); if (null == validateStr || !validateStr.equalsIgnoreCase(inputStr)) { obj.put("result", "验证码错误"); } t...
0
4e1fc928d4b9e9902900f3aeef2256e9
20dd1c1ee382486629e9d8811f262009
Symlink using relative path. Create parent folders if they don't exist. Do not overwrite existing file unless it is a symlink.
namespace SharpKit.NodeJs.fs [JsType(JsMode.Prototype, Export = false, Name = "fs")] public class Utils public object symlink(JsString srcPath, JsString dstPath, JsString type, JsAction callback) { return null; }
0
e8f3f1cdc9dc7303bfdf131057758ab4
3d8e4128e8045b1fe99d41643225b61c
Remove config category by key
config = self.load_config() if key not in config: error = "%s does not exist in the config"%(key) raise KeyError(error) del config[key] self.logger.info("%s deleted from config"%(key)) self.save_config(config)
1
f69dda6633570e8072b6b1fa9f08c193
89c53753c46d15159fef8c712a5aa3d1
Instancia uma nova aresta e retorna o ponteiro para ser inserido na lista
Vertice *vd = this->adicionaNo(id_destino); Vertice *vo = this->adicionaNo(id_origem); vo->adicionaAresta(id_destino); vd->adicionaAresta(id_origem); }
0
e83aa9ecc0e613379e3fb8c2a7146cc6
cadc27c39884569342e1378ffbff761d
Convert 2D points into a hashcloud via a threshold. Return values: hs are the the hash values of the original points. horder gives the index of the 2D points, in order of hash value. h_splits gives the range of points in horder that share each hash value.
function H2(A,B) { var d1=0, d2=0; points = []; if(A.length==0 || B.length==0) return [undefined,points]; A.forEach(function(a) { var k=Infinity; var nn; B.forEach(function(b) { if( dist2(a,b) < k ) { k = dist2(a,b); nn = b; } }); if( k >= d1 ) { d1 = k; points[0] = ...
0
2ea2c244f72f9d2bbb47632605a5f382
afc203224dc5a81566ae2b899f142bc0
获取授权码到期时间戳
const expires = new Date(); expires.setSeconds(expires.getSeconds() + this.authorizationCodeLifetime); return expires; }
1
fa42e27ab56cf2d15fc0d3320f3c9dc6
de6061f5923f28af21215530cde7802f
委外单转制造单
@RequestMapping(value = "/dealer/1555/v1/transErp", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) ResponseResult<CrmSrOfflineOrderVO> transErp (@PathVariable String orderNo);
1
b9d6ce4ef196c27407a459305f469553
534adf3ea1b833d8a15a6edf7553a50e
Add additional objects to the current database session. This is used for adding any extra created objects such as Relationships, to the current session to be committed.
class MySQLHelper(object): def add_records(self, session, objs): if isinstance(objs, list): session.add_all(objs) else: session.add(objs) session.commit()
1
084cc5b10cd5eb375df6e8db89d3b122
129d67ad154cb8d0bc8c544c2c072e0f
将一个秒数转换为 xxxx-yy-zz 格式的时间
{ int sedonds = dateTime.Hour * 3600 + dateTime.Minute * 60 + dateTime.Second; string value = string.Format("{0}{1}{2}", dateTime.ToString("yy"), dateTime.DayOfYear, sedonds); return milsec ? value + dateTime.ToString("fff") : value; }
0
f8d7d1abb668a4f3b56a04c794ea5558
a493a02d37a10cca8e5029759a8b8a2b
Disable Java 9 warnings re "An illegal reflective access operation has occurred"
@DisabledOnJre(JRE.JAVA_8) void notONJava8() { System.out.println("It will not run on Java8."); }
0
4c8a08babbaadca25815090f9c6dd0fc
d27e87cb470e13a4e673e2b9fa4ff1d5
Helper method for complex_type_to_class
class _ComplexTypeMixin(object): def __python__(cls, data): result = {} for key, value in data.iteritems(): result[key] = cls.__fields__[key].__python__(value) instance = cls(**result) return instance
1
89a9cf5eda51a1076d5e8efaed108c15
0fdeba6c5884969d19f8ffeab63a0414
根据镜像id列表获取镜像列表
@Service public class HarborServiceImpl implements HarborService @Override public ActionReturnUtil repoListById(String harborHost, Integer harborProjectId, Integer pageSize, Integer pageNo, String repoName) throws Exception { AssertUtil.notNull(harborProjectId, DictE...
0
7e99fd21a88f189532ec1aae4857bf2d
f8febbe778728ed28e01343cb28caa65
Request a proposed location for the next evaluation. This proposal is selected by maximising the chosen acquisition function.
def propose_hypers(bayes_opt_results, bayes_opt_setup): bayes_opt = BayesianOptimization(f=None, domain=bayes_opt_setup.domain(), X=bayes_opt_results.xs, Y=bayes_opt_results.ys) proposed_x = bayes_opt.suggest_next_locations() return proposed_x, bayes_opt
1
4e96fd20e7ca4b6bcbe0a78909898a6b
4564cac4b13971ecf0932a4f7d23ab18
Initialize metric Log Odds Ratio
class AUCROCDavis(RankingEvaluationMetric): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs)
0
81954287d69f7037aa71462d788ce7b1
a3626d453c492da6e9eae11340da9337
Returns the meta object for class '{@link jointPackage_UML2ER.TrgAttribute <em>Trg Attribute</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getTrama();
0
0f3e8cbc8751172ee06117f6b8359990
bac986ce76781db2ab440eb26b59f5e9
Вывод поля в публичной части со сформированным html.
class com_virtuemart extends xzlib_app private function _renderField () { $min_rows = 5 ; $returnHtml = ''; foreach ( $this->_formField as $formField ) { foreach ( $formField[ 'fields' ] as $field ) { $returnHtml .= '<div class="control-group mdl-textfield">'; switch ($field['type']){ case '...
1
10b9489d76b4e1b0549dc3b8b250a50f
6e986f8cd78ee443c79cebb21a12aef3
k zadanemu objektu vytvori jeho obalku - CUBOID
namespace RayTracerLib public class Cuboid public static Cuboid CreateCuboid(DefaultShape item) { Cuboid cluster = null; if (item is Sphere) { Sphere sph = (Sphere)item; cluster = new Cuboid(sph.Origin, sph.R * 2); } ...
1
dbd19d485cb3aeba088a04cff95052a1
cf58b3d2b8f5cd6fe0d9b8434f101a79
Grab the option and output any nag dealing with license keys.
{ $on_licensing_tab = (isset($_REQUEST['tab']) && ($_REQUEST['tab'] === 'licensing')); if ($on_licensing_tab === false) { if (!file_exists(DUPLICATOR_PRO_SSDIR_PATH."/ovr.dup")) { wp_enqueue_style('dup-pro-plugin-style-notices', DUPLICATOR_PRO_PLUGIN_URL.'assets/css/admin...
1
32fa8b373d76aca8f721e78a0b07aaaa
b4d013051c14f1e4a655c9cd8b66ca81
N day ahead prediction based on the current data. This function is a convenient wrapper of predict() and continuePredict(). If the prediction is into the future, i.e, > n, the featureDict has to contain all feature vectors for multiple days for each dynamic component. For example, assume myDLM has a component named 'sp...
_write_head() df = _get_predict(mytype,1, pd.DataFrame()) if df is not None: pass return df
0
0e6c76643fe871ed9925f44808af50a7
71062b54ed966801297f4c3eb56c2727
Get a converter from a gene field to Entrez id.
def convert_EID(genes: iter, name_EID: dict) -> set: return set(name_EID[gene] for gene in genes if gene in name_EID.keys())
1
9244d1e6ed87ca45b174624dbe2e9435
b97adf7ee05064a75f4028389a222324
Run the boarding process until the seat map stabilizes (stops changing).
class GridProcessor: def process_seats(self) -> int: occupied_seat_count = self.count_occupied_seats() while True: self.apply_rules() new_occupied_seat_count = self.count_occupied_seats() if new_occupied_seat_count == occupied_seat_count: return occupi...
1
dc7fe3d50d486669bf17d8904ee30b2b
fdf5316577c08bba6718b73a90d7704f
The string name of this route's view function.
class DecoratedView(): def get_view_name(self): return self.view_function.__name__
1
71cb95dfdcf3f60c952a2fd4202a3a09
28d6f6431fd140b2187f8c03e5069934
Returns the meta object for the containment reference list '{@link de.uni_kassel.cn.alica.TaskWrapper#getMappings <em>Mappings</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getCOREBinding_CoreMappings();
0
7c6edeba02dab388544de68f358e7e5e
5d1b99c47943a0218681419d2e0e3161
:func: 删除自媒体(明星榜)
uid = self.get_argument('uid', '') sns = self.get_argument('sns', '') topics = map(lambda x: 'SMB/' + x + '/#', sns.split(',')) for topic in topics: MongoIns().m_pull('passport', {'_id': ObjectId(uid)}, host=__conf__.CAS_DB_HOST, dbname='cas', **{'topic': topic}) self.write(dict(status=True, msg='删除成功'))
0
e4ed9ee8a7117bc9b0b0e3612e4c8c29
7723c1d62868be10019c735ea8dfc3ad
使用替换词替换原词,重新检索
public class BlackKeyword public String checkAndReplace(String artical,String replacement){ if(firstCharHash == null) { return null; } try{ int count=0,srclen=artical.length(),keywordLen=0,innerCount=0,replaceLen=replacement.length(); String index=null,keyword...
1
db769c36be5da84de61eaba197753c21
e91adb7db80994936e478885b7b04983
设置交易是否开启,1=开启交易;0=关闭交易
class transModel extends BaseModel function set_trans_type($is_set=0) { $this->trans_type=$is_set; }
1