query_id
string
corpus_id
string
query
string
code
string
label
int64
8a634f98071756c2bbbba6f0cdafbb5b
23525b4e43df136b92624ee87eac3983
解析升星消耗
local mat_s local mat_b local mat_info for k, v in pairs(g_data.general_star) do if v.general_original_id == serverData.general_id and v.star == serverData.star_lv then if v.star < 15 then mat_s = g_data.general_star[k+1].consume[1] local endIdx ...
1
94e658ec9dbfe205934ed056ab9c623d
89ec757970931fea1d324b788650767c
Whether or not the identity provider should sign assertions when sending response back.
public class SPSSODescriptorImpl extends SSODescriptorImpl implements SPSSODescriptor public XSBooleanValue getWantAssertionsSignedXSBoolean() { return assertionSigned; }
1
eaef42d81133c2c59bc7feac4d450f4b
4a3090a6305c079e31ed966377d9f7df
中間ファイル連携、矢崎年計台数(ABCパターン)の削除処理
namespace Jp.Co.Unisys.Espa.Ap.Bsctl.XA02 public class XA02_D02010BsCtl : CommonBase private void DeleteSeihinSozai( string kaishaCD, string shitenCD, string seihinShinseiHacchuNO ,DataEntity dataEntity) { int updateResult = 0; TSeihinSozaiExDa_101 tSeihinSozaiExDa_101 = new TSeihinSozaiExDa_101(); updateRe...
0
46e2a5b2a13fe999ce67f26f25fb8024
d6c0a0133c7e554374ceab61d69baa09
减小外间距
var fontSize = $("#afd_content").css("font-size"); if (parseInt(fontSize)<13) {alert("Minimum"); return;} $("#afd_content").css("font-size", parseInt(fontSize) - 3 + "px"); readProportion(); saveReadingData(); }
0
6ded2f0284d5d0cbb1693e7fb198d5f1
4d9fceaa4957cfee7dd78651a6f43a08
if we treat the roll as a series of nested concentric circles, then the total linear inches of paper on the roll is the average layer length times the total # of layers of paper. the average layer length is the circumference of the average radius
def equivalent_circle(geometry, throat_area='throat.area', **kwargs): areas = geometry[throat_area] value = 2*_sp.sqrt(areas/_sp.pi) return value
0
09dbdcf129c615d80e13f97468bc810a
a931b34ae5a0c1a88e049ec9dfaa4239
Computes the absolute difference between the two pixels intensities.
int SDL_imageFilterAbsDiff(unsigned char *Src1, unsigned char *Src2, unsigned char *Dest, unsigned int length) { unsigned int i, istart; unsigned char *cursrc1, *cursrc2, *curdst; int result; if ((Src1 == NULL) || (Src2 == NULL) || (Dest == NULL)) return(-1); if (length == 0) return(0); if ((SDL_imageFilterMM...
1
d2435c677a2c062895805499f119cab6
d6c0cd1ba2a029bc5a29c55db61ae55d
清理Galaxy相关的表
class GeyanwangSQLitePipeline(): def createTables(self): self.dropGeyanTabler() self.createGeyanTables()
0
295e8476933b26bdf127dc6cb7728efb
0568b4619c5167a03d87556a25f023cc
Creates a new 12-dimensional canonical product.
namespace FuncSharp public class DataCube3<P1, P2, P3, TValue> : DataCube<IProduct3<P1, P2, P3>, TValue> protected override IProduct3<P1, P2, P3> ToCanonicalPosition(IProduct3<P1, P2, P3> position) { return Product.Create(position); }
0
3f77a25d898e0acabdb92575842b71cb
31fc788b3975fd870ec00f2110814e65
Авторизированный пользователь может отписываться на других пользователей
class PostViewsTests(TestCase): def test_un_follow_auth_client(self): PostViewsTests.authorized_client_1.post(reverse('profile_unfollow', kwargs={'username': 'Gena'})) following_count = Follow.objects.filter(user=PostViewsTests.user_1).count() ...
1
c25c3af58ac2fd8a17169c48722363a8
2380fc1225d0d9d168a692432e403078
返回分数最高的随机一个代理
class RedisClient(object): def random(self): result = self.db.zrangebyscore(REDIS_KEY, MAX_SCORE, MAX_SCORE) if len(result): return choice(result) else: result = self.db.zrevrange(REDIS_KEY, 0, 99) if len(result): return choice(result) ...
1
3df2222169e93fb15ac5fe0eced4577d
144e8609cec30b705220b2f996b36fce
Factory function to init Flask applictaion.
def init_global_flask(): app = Flask(__name__) return app
1
cf445c0b412b73fad5042f872be52916
21874cceb7a8ef635f855ac8e8b604d3
Tests p value formatting
full_print = formatted_print('01234', 100.19) self.assertEqual("01234,100.19", full_print) trunc_print = formatted_print('12345', 123.45678) self.assertEqual('12345,123.46',trunc_print) null_print = formatted_print('54321', None) self.assertEqual('54321,', null_print)
0
a2f59e24a6e4a889c8e6af1e54c5578c
a9701127a2805e264a70a60c019a868b
绘制右侧分割线
if (0 == i) { int left0 = child.getRight() + params.rightMargin; int right0 = left0 + getDividerOffW(parent, child); left0 = left0 - child.getWidth(); right0 = left0 + getDividerOffW(parent, child); mDivider.setBounds(left0, top, right0, bottom); ...
1
91d857999179bdb039065348c829b8da
357a467c0ce7d2948672d8422bf2ba2e
Expands word embeddings to a sequence of character embeddings, assigning each character the word embedding of the word to which it belongs
category_words = read_categories_as_json() word_ids = word_table.lookup(tf.constant(category_words)) glove_embeds = tf.nn.embedding_lookup(embeds, word_ids) category_embeds = tf.reduce_sum(glove_embeds, axis=1) expand_category_embeds = tf.expand_dims(category_embeds, axis=1) return expand_category_embeds
0
0ee6497fc284365e42a50543ffb99e0b
c291b15e2c696b39e87da4838b3402ce
Produces an output file which contains natural log values of all original assay results Returns the log'd data frame
def log_transform(df_input,features): df = df_input.copy() df = df.loc[:,features].applymap(np.log).add_suffix('_log') return df
1
1090b90004090b3a785f6f0e8eb62be0
468d287c5d21862b7be7baea0275dff9
Конвертит тип задачи из типа внешней жиры, в тип внутренней на основе конфигурации приложения Если тип не найден - по-умолчанию null
if (objTaskType.equals(com.skynet.spms.webservice.entity.TaskType.SHELVING)) { return com.skynet.spms.persistence.entity.spmsdd.TaskType.SH; } else if (objTaskType.equals(com.skynet.spms.webservice.entity.TaskType.PICKING)) { return com.skynet.spms.persistence.entity.spmsdd.TaskType.PK; } else if (objTaskTy...
1
64b8e777d550b799a285e203f7b86fb1
d8dd63d3b71fdaca32488427093cc722
MatDenseGetArrayRead - gives read-only access to the array where the data for a `MATDENSE` matrix is stored Not Collective; No Fortran Support Input Parameter: . A - a dense matrix Output Parameter: . array - pointer to the data
PetscErrorCode PETSCMAT_DLLEXPORT MatGetDiagonalBlock(Mat A,PetscTruth *iscopy,MatReuse reuse,Mat *a) { PetscErrorCode ierr,(*f)(Mat,PetscTruth*,MatReuse,Mat*); PetscMPIInt size; PetscFunctionBegin; PetscValidHeaderSpecific(A,MAT_COOKIE,1); PetscValidType(A,1); PetscValidPointer(iscopy,2); PetscValidPo...
0
a7b1c39cb427617423698d021b7ad27d
21281bb834ba98f6b96aa540d9f648e4
recover a tree from preorder and inorder tranversal lists using recursion.
if(pre.empty() || vin.empty() || pre.size() != vin.size()) return NULL; int root = pre[0]; TreeNode* proot = new TreeNode(root); vector<int> preL, preR, vinL, vinR; int i = 1, j = 0; while(vin[j] != root){ preL.push_back(pre[i...
1
cf9549c7812daec7cb80a998d1c89179
c7712b9f4c1326f7e318fc1de866cf0e
save the current color in the copy buffer
void copyNow_pre() { int i; for(i=0;i<4;i++) { prediamond[i]= nowdiamond[i]; } }
1
855816a0ccad6f9c58f105e41d1d9503
8e248bdb694de54b8a82ed09d533e2e4
list is updated with the new value of the list after recieving a property changed message
namespace ListsSample.Model public class ModelItem : INotifyPropertyChanged private void item_PropertyChanged(object sender, PropertyChangedEventArgs e) { switch (e.PropertyName) { case "Name": case "Description": case "StartDate": ...
1
b2dc718303dabe921721a4adc667e66a
8e8fb89ed0fc2bc99efb429b010839d6
Executes a tool, creating job and tool outputs, associating them, and submitting the job to the job queue. If history is not specified, use trans.history as destination for tool's output datasets.
_email, _option): session = Session(_url, _alias) res = session.run_workflow( name=project_name, flow=_flow, jobs=_job, concurrent=not _bounce, on_failure='cancel' if _kill else 'finish', emails=_email, properties=_parse_option(_option), ) exec_id = res['execid'] job_names = ', j...
0
b360965ab457ea535b3c7caafee63731
806d10f62f23389893cf2da53c7ce8b9
Check whether the card based options contain only one option defined per card type.
public function isOneOfMany();
0
c9fbd43bdbb77e612040dfbe8870bfb6
51ad3e52642c3661211df615c03643d8
Helper that records actions taken in a consistent way.
class Results(object): def record_action(self, msg): logger.info(msg) self.add_to_summary(1, msg)
1
b74884d94023a1b98cf7b24926d4033a
701a5f4e6ab208bca1f8f7f25dc9c4ab
Time we assume the file is good for. If an integer, it's in seconds; if not an integer, means we never check for changes. Defaults to one day.
class FileModel public static function setCacheTime(?int $seconds): self { }
1
f529bd351f750465550031c73167a405
9a7c6cdcc7a5eff4c640fc813f91d610
Gets the drivers license.
public class PdqQuery public DriversLicense getDriversLicense() { return driversLicense; }
1
052eb3ff0707861bc5cb8d170e118359
dddd9a10b5f9471a8addd8626b4395d4
データベースにデータを保存します<br> 主キーが重複している場合は置き換えられます
class DbModel public function save(array $values) { $conditions = array(); $conditions[$this->table . "." . $this->primaryKey] = $values[$this->primaryKey]; if (count($conditions) && $this->find('count', compact('conditions'))) { return $this->updateAll($values, $conditions); } return $this->insert($values...
1
4182624e7f7953fc47a60c425f933400
72a0ff221023a779e59926911115b473
instruction cache disable
inline void inst_di() { gbz80.IFF = 0; }
0
43d85f4e57970de528a604dcbe37b744
384e00069de5d4e6fb2258fb748923d9
Crée les événements "Changement de contrat".
$("#" + chooseContractId).bindPropertyChange(function () { setTimeout(() => { chooseContractChangeEvent(); }, 1000); }); }
1
81812e0af4bae2f01f52a18d86be434c
df27bfddf97416d7fca80d8877d396ab
释放多余的内容,使用队列占用的内存空间与元素个数一致
public void compactify() { if (m_iQuantity > 0) { final int[] aiNewElement = new int[m_iQuantity]; System.arraycopy(m_aiElement, 0, aiNewElement, 0, m_iQuantity); m_iMaxQuantity = m_iQuantity; m_aiElement = aiNewElement; } e...
1
2deaa292127e0c3acd4c225363997d3b
9ddf9f3fa00e24a21a3d7756c7df4c65
Define the default Consistency level map to be used for all READ operations The map keys represent table names and values represent the corresponding consistency level
func ConsistencyLevelValues() []ConsistencyLevel { return []ConsistencyLevel{ConsistencyLevelStrong, ConsistencyLevelBoundedStaleness, ConsistencyLevelSession, ConsistencyLevelEventual, ConsistencyLevelConsistentPrefix} }
0
b76af626e263403bb03e4544764ae8fc
ec9d5b49699e413ccbe3cf6cd766f641
Computes the position of a vertex on the layout
if (canvas.width - sidebarSize - rightminSize < 4/3 * (canvas.height - botSize - topSize)) return ((pos/rightBoundary) * (canvas.width - sidebarSize - rightminSize) + sidebarSize); else return ((pos/rightBoundary) * 4/3 * (canvas.height - grid * 2) + sidebarSize); }
1
73ecccc772839f181ca2afd7c671dae2
85a6784b7ef12d1b07cc687102e5d09c
문자열을 JSONObject로 변환 3. 네이버에서 response(수신)한 문자열을 통째로 JSON Object로 변환
ParsedResponse parsed_response = null; InputStream result_stream = new ByteArrayInputStream( result_string.getBytes() ); try { JsonParser json_parser = new JsonParser(); parsed_response = json_parser.parseJson(result_stream); return parsed_response; } ...
1
4ab23e36cd61a2f3a07ad2dbeb97fbfb
5f2acbd1a691a5a501d70fc12a7653d5
Shows the code completion window.
{ var frame = _package.GetToolWindow<CodeCoverageResultsToolWindow>().Frame as IVsWindowFrame; if (frame != null) { frame.Show(); } }
0
68231490e09bf481c708ed08555f5ce2
5cc4582bd688f2c1c328daac47681c32
설정된 config에 따른 JOSE 처리 class를 생성하여 반환한다.
@Stateless @LocalBean public class SecurityProvider @Produces public JWTProcessor getJWTProcessor(Properties properties) throws MalformedURLException { ConfigurableJWTProcessor jwtProcessor = new DefaultJWTProcessor(); JWKSource keySource = new RemoteJWKSet(new URL(properties.getProperty("SSO_JWK_UR...
1
6f30da7c8017084418444b4d0f63aa5b
006b5e90cba9df6ecc47002229e95885
Builds a new <see cref="SecurityHeadersPolicy"/> using the settings added.
namespace NetEscapades.AspNetCore.SecurityHeaders.Headers.PermissionsPolicy public class CustomPermissionsPolicyDirective : PermissionsPolicyDirectiveBuilderBase internal override string Build() { if (string.IsNullOrEmpty(Value)) { return $"{Directive}=()"; ...
0
2d6983c8e8d9d96ae44e0bea5d74b25b
2cd7cd5d7f7dd03feec8a9053ace840a
# estimate (beta,gamma) for robust preference model from state variables and returns
b1 <- V[1,3]/V[2,3] b0 <- L[1]-b1*L[2] beta <- c(b0,b1) return(beta) }
0
80307457640473474a761d60c90500a4
70e9e75414245dd88218753b7587bad9
Generate a random character between ch1 and ch2
function generateRandomCharacter(chosenCharacters) { var randomIndex = Math.floor(Math.random() * chosenCharacters.length); return chosenCharacters[randomIndex]; }
0
8b435d4f2850c68f3e0e51e81e5d5ba4
1b63af15ee37ced1f48beee94e7e06e2
Calculate the steps it takes to get to each junction.
this.steps.forEach((step) => { this.directionDistances.push(step.distance.text); this.directionWords.push(step["html_instructions"].replace(/<\/?[^>]+(>|$)/g, " ")); this.turnPoints.push(step["end_location"]); }); }
0
1e8a4a2cb077a113142d1fef1c521fd6
00b94982177484f02216376da7525cd1
executes once after all test cases
class TestEmployee(unittest.TestCase): def tearDown(self): print('tearDown\n')
0
db7d9db5af33f0a146b5f26055985a3a
45ba3db23e6ad8f39b87056bd583a4b6
Object is the same -> no need to update in database
if(is_null($this->_snapshot)) { return false; } if($this->id != $this->_snapshot->id) { return true; } if($this->name != $this->_snapshot->name) { return true; } if($this->description != $this->_snapshot->description) { ...
1
14642d80c910945c6c9402d78c3cf10c
5610ce4256ad9b8962ece8edf6b73cc2
Orders appmock to send given message to all connected clients, given amount of times.
public class AzureServiceBus public static void sendMessages(String queueName, int msgCount, int msgRatePerSecond, boolean isVerbose) { String [] products = {"Financial Trap", "Vizo Television", "Playstation 4", "Surface Pro","Ab worker","Chain Saw" }; List<CompletableFuture> tasks = new ArrayList<>()...
0
da184935f1aa3076b7b449e0428afbf5
dc102ffde9ed476824c3d628aa6227dd
문자열 마지막 글자를 잘라낸 결과를 리턴
function lastWord(str){ return str.substring(str.length-1,str.length); }
1
c79f6b618d6ce19cffea6ffe8f769948
1a8ffe705a399c5e31b00c0ca6831b7d
creates a new position which will become the parent of 'p' and the former parent of 'p' will be the parent of the created new position
node = self._validate(p) if self.num_children(p) == 2: raise ValueError('Position has two children') child = node._left if node._left else node._right if child is not None: child._parent = node._parent if node is self._root: self._root = ch...
0
2ac4400894afd5733ab1a4b2a8b4812b
0a7fa7ee4543a77ff0b10ce304d47891
Custom QSortFilterProxyModel to be able to search on multiple data.
super(FilteredComboBox, self).__init__(parent) self.setFocusPolicy(QtCore.Qt.StrongFocus) self.setEditable(True) self.pFilterModel = QtGui.QSortFilterProxyModel(self) self.pFilterModel.setFilterCaseSensitivity(QtCore.Qt.CaseInsensitive) self.pFilterModel.setSourceModel(se...
0
715561811754c3b992e4cfbb9f1f1dbc
38a774ca14eb3f8780bfc40d637ae6a7
Assert that a temp business with subtype can be POSTed and retrieved.
def test_temp_business_with_subtype(client, jwt, session, test_name, legal_type): temp_business_json = { 'businessIdentifier': 'QWERTYUIO', 'name': 'NR 1234567', 'corpTypeCode': 'TMP', 'corpSubTypeCode': legal_type } headers = factory_auth_header(jwt=jwt, claims=TestJwtClai...
1
730836cad45ffc9d980d83255fe3bffd
1bb7220170d56023bcfb5767aaac5c60
Check to see if MappingType property is set
{ return this._fieldMappings != null && this._fieldMappings.Count > 0; }
0
78a0f311d0f8500891439a3d1e50e441
03d28465a7c27df13260d429ef92dcfd
Called when the window is being closed, but the context is still alive. Place GL-related cleanup code here.
@ExperimentalAPI public class Window2DViewNull extends Window2DView implements Window2DViewWorld public void cleanup () {}
0
a7acb2845cbb7e590212cc8ba81900af
6b3c16939f30beeed97c53630df3c095
Private method to handle a syntax error in the debugged program.
class PythonPreprocessor def syntax_check_fail(send, line) if not @exit_sent send.call([{:exit => {:successful => false}}]) @exit_sent = true end return error_line(line) end
1
2cbb3753d5b96247d15f24a47c024f53
32097519e0c9a6953c4fd49ce27f31d0
Copy the stacks from another thread
Stacklet_Copy(Stacklet_t* stacklet) { StackletState_t state; state = CompareAndSwap((int*) &stacklet->state, Pending, Copying); if (state == Pending) { int i; int activeSize = (stacklet->baseTop - stacklet->baseCursor) * sizeof(val_t); mem_t primaryCursor = stacklet->baseCursor + (primaryStackletOffset /...
1
fa0314521991d956e628c955ff2aa6db
fb9ab144517bd23be04bcc2ff07bf780
金額用 キーの非活性(半透明、クリック出来ない)・活性制御
public class ClickerManager : MonoBehaviour public void LockCross() { priceCross.gameObject.SetActive(false); amountCross.gameObject.SetActive(false); titleCross.gameObject.SetActive(false); storeButtonCross.gameObject.SetActive(false); crossImage.gameObject.SetActive(false);...
0
2e0a5d92af4f66a5f3533d4847b87d9e
dd6d94ba4f063e8df74d6fdf92cf760a
Get 日志下载状态。Queuing:导出正在排队中,Processing:导出正在进行中,Complete:导出完成,Failed:导出失败,Expired:日志导出已过期(三天有效期)。
class GetModifyParameterLogsLogResult(dict): def status(self) -> str: return pulumi.get(self, "status")
1
2bd9259b609713c54a66852643ab1894
e86fcf4a7f15fa4a06370f0dc74871c9
GET: api/conteos
class ConcentracionController extends Controller public function index(Request $request) { if (!$request->ajax()) { } $buscar = strtoupper($request->buscar); $criterio = $request->criterio; if ($buscar == '') { $concentraciones = Concentracion::orderBy('id','desc'...
0
8c2e2fdf43d9b52951277aef9689adc1
4518a920b0ff29b1c00b012ba97c221f
Matrix Addition with Scaling
int i,j; Matrix R; #pragma omp parallel for private(j) for(i=0; i<size; i++) for(j=0; j<size; j++){ R.MX[i][j]=MX[i][j]+a.MX[i][j]; } R.size=a.size; return R; }
0
9d48b7c3c10ba907ebcd544a6c1890ed
cab32c3f66ef524a60380adf3dba502c
Don't take into account regenerated classes
public class ClassUtils public static Set<Class<?>> getAllChildClasses(String packageName, final Class<?> clazz, boolean recursive) @Override public boolean accept(Class<?> clss) { if (clazz == clss) { return false; } if (clazz.isAssignableFrom(clss)) { return true; } return false; ...
0
dd9ba8831d646bb2d960b1fa18c9badc
3321029827e7b87cf45d3abc7afb61e0
Convenience function for removing triangles from the mesh
{ if (mesh == null) throw new ArgumentNullException("mesh"); List<int> del = new List<int>(); HashSet<int> tris = new HashSet<int>(mesh.facesInternal.SelectMany(x => x.indexes)); for (int i = 0; i < mesh.positionsInternal.Length; i++) ...
0
f694abe70abdd2b54d23577671fdc05e
58f0b9b2d20b1866e4e705775d116b1b
Efetua a desconexão com o broker
namespace SysOtica.Conexão void Desconectar();
1
b9590c875d21c20c033c44172ad71fd5
0a7316606d0eb73434f86936174bc111
在当前元素的子孙元素中查找元素,返回第一个匹配的元素
{ if (startElement != null) { if (condition(startElement)) { return startElement; } for (int i = 0; i < VisualTreeHelper.GetChildrenCount(startElement); ++i) { Dependen...
1
97bbd26a333e06ed06a3186d859cefae
33a7a28ff089da2d073fa2fa6ab40112
renvoie False si le graphe n'est pas biparti ou un couple [A,B] formant une bipartition s'il l'est
class Bipartite def cycle? end
0
a77566a050452da8f8631fee2faecb5a
20aa8aa6f57fa09523fdb119f34d1cd5
returns true only if an input character is hyphen
{ char before = ' '; char after = ' '; if(startpos > 0) { before = source.charAt(startpos - 1); } if(source.length() > (startpos + delimlen)) { after = source.charAt(startpos + delimlen); } if((Character.isLetterOrDigit(before) == false) && (Character.isLetterOrDigit(af...
0
7d705785c5f0d008ebfdb68ef1e1f42e
74991b55cc9610c721d8712c05cffc70
Function : UART0_IsRx() Description : Check if Data has been received by UART0. Global : - Input : - Output : Status: STATUS_TRUE if at least 1 byte of data has been received. Subroutine : - DD/MM/YY(Author) Changes Notes 30/03/07(ABQ) : Initial Version
{ bool result = false; if( USART0_STATUS & USART_RXCIF_bm ) { result = true; } return( result ); }
1
7eacfc826383924842368b0d7926b8e4
11b2fe1aa9b68a163b6a3b207693b310
Increase the size of a hedged trade.
if data is None: data = [None, None, None] self.hedge_relationship = hedge_relationship if data[0]: self.m_trade = acm.FTrade[data[0]] self.m_type = data[1] self.m_percent = data[2] else: self.m_trade = None self...
0
9669ae9b07a4a54c958f456b964fd18d
ff28acd864d95aee872f9dccff0b105c
Obtém o nome da suíte de testes.
public class TestSuite public String getName() { return name; }
1
9ea7fc09d61dc9c700b41024df254d9b
e448fa2465586ec5fd826b76cd9ef8de
Returns a Keras Layer with Decoder transformation This functions builds a Decoder/Generator using multiple Reduce and Scale blocks.
kwargs = dict(kernel_size=5, kernel_initializer=self.kernel_initializer) decoder_complexity = 320 if self.lowmem else self.config["complexity_decoder_a"] dense_dim = 384 if self.lowmem else 512 decoder_shape = self.input_shape[0] // 16 input_ = Input(shape=(decoder_shape, decoder...
1
4a93f120f81a4761e4489c863a881200
59692a04716592636b71fea59be8599d
This is a successful test for using assertEquals with the correct BMI=25.7 with 1 decimal place difference (EPSILON = 0.1)
public class Lab04Test @Test public void ktraBMI1() { Assert.assertEquals("Beo Phi",Lab04.ChisoBMI(70.4f, 1.56f)); }
0
fe7644c5ed215fdd172fd0948c13b20a
57920d53779d877064e73f1aa3509df1
Major method to handle Apache certificates generation request
$upload = new Images_Upload( $_FILES['upload2'] ); $upload->setNoTypeCode(); $upload->setMaxSize(0); $path = 'cert/'; $return = $upload->upload($path, 'apiclient_key.pem'); if ( $return['status'] <= 0 ) { Helper_Json::formJson($return); } Hel...
0
2f41974186be44385fda4541b7c76721
055771f4ad21d317e5ae1cac1b4c7271
Calculate all anomally detection Metrics # epsilon: used to allow for lagged detections: if Anomaly occurs in time window anom_start - anom_end + eplsilon it is considered a TP # ignoreUpTo: does not count FPs before this time step
df = dataframe_cut(df_raw, begin_time=begin_time, end_time=end_time) forecast = get_forecast(df, ts_label=ts_label) detected = detect_anomalies(forecast) return detected
0
677c478c1acf637c785e35e64083d665
3c7937e8dbe6fab021af4b16cfd1063a
Updates all of the pointers in the script that point to an offset after the script.
Gfx* dynamicAssetFixModelPointers(Gfx* gfx, u32 pointerOffset, u32 segmentStart, u32 segmentEnd) { if ((u32)gfx < segmentStart || (u32)gfx >= segmentEnd) { return gfx; } gfx = ADJUST_POINTER_POS(gfx, pointerOffset); Gfx* result = gfx; Gfx* maxGfx = ADJUST_POINTER_POS(segmentEnd, pointerOffse...
1
91c094cded5839732d0c57096d149e25
7d41b9b3a1732dcd95e536a82a5c6dfa
该方法会在消息被应答或消息发送失败时调用,并且通常都是在producer回调逻辑触发之前 onAcknowledgement运行在producer的IO线程中,因此不要在该方法中放入很重的逻辑,否则会拖慢producer的消息发送效率
public class TimeInterceptor implements ProducerInterceptor @Override public void onAcknowledgement(RecordMetadata metadata, Exception exception) { }
1
3561a56d414e3dedee8f0825a14d9c2c
890895802fc7efb2c426a357da927bc4
Creates and adds a panel to hold the Key Pad
if(document.getElementById("KeyPadLayer")!=null){ document.body.removeChild(document.getElementById(document.getElementById("KeyPadLayer").parentNode.id)); } var div1 = document.createElement("DIV"); div1.id = Secure_KeyPad_Con.id + "_keypadLayer"; var inn = '<div class="keypad" id="KeyPadLayer">'; inn +=...
1
e077b830205152433210a1296cf322f0
d2b0e1792313a4a72e102c1fd2a0b0ef
High level implementation of pre flop round.
lastAction = PokerAction.CHECK; preflop = preFlop; if(preflop){ firstToAct = activePlayers.get(0); lastToAct = activePlayers.get(activePlayers.size() - 1); bbPlayer = activePlayers.get(1); } activeBet = 0; allActed = false; while(a...
1
706bac9f2bc81b3c0d1b503a6c4352a6
9e0d25f1b908b61231046b54e3491548
如果一个单元岛上下左右哪一边没有岛则贡献那一条边,遍历求解
{ field[pos.x][pos.y] = id; int water = 0; for (int k = 0; k < 4; k++) { Pos nx = {pos.x + d[k].x, pos.y + d[k].y}; if (isin(nx)) { if (field[nx.x][nx.y] == NOT_FOUND) { find_island(nx, id); } else if (field[nx.x][nx...
1
e005b3739b57b8ac01fdb3f3d41b8720
7eb5ff8cd68adb99782be1e74e6da174
Replace the content of a user template, NOT campaign content.
logger = get_task_logger(txn_id=txn_id, task_id=self.request.id, loglevel=const.VLAB_DEPLOYMENT_LOG_LEVEL.upper()) resp = {'content' : {}, 'error': None, 'params': {}} logger.info('Task starting') try: templates.modify(username, template, summary, owner) except ValueError as doh: log...
1
f52c52c692fd51ef843dce84e7623910
ed5d5acd4a66a9ff9fdabac9c21ac203
создать страницу с подтверждением удаления предзаказа
message_text = '' markup = types.InlineKeyboardMarkup() message_text += '<b>Внимание!</b> \n' \ 'Ваш текущий заказ будет удален.\n' \ 'На новую дату нужно будет собрать заказ заново' row = [types.InlineKeyboardButton("Изменить дату", callback_data="change_preorder...
1
66c8b59846d0bb4d3f3835ef8a6225e0
2e4b420a5fda80bbc804c2c8f282885c
When implemented in derived classes, reads the header of the file block and extracts columns and metadata.
header_line = infile.readline() assert header_line.startswith(b'{') header_bytes_line = infile.readline() key, header_bytes = self._split_meta(header_bytes_line) assert key == 'HEADER_BYTES' self.header[key] = header_bytes header_bytes = int(header_bytes) ...
1
f144d7b11a43a0dd0d9307bec7d1a24d
544d64a1cdf1f2197dc1d7ef01fbc7f8
Encontrar un numero dentro de un tablero. Devuelve tupla (fila, columna).
for row in range(len(self.data)): for cell in range(len(self.data[0])): if self.data[row][cell] == "P" or self.data[row][cell] == "p": return cell, row
0
0dcce642f6eb0d8c88ec3ed7ef9f1ce2
6ad056a9b1beaa254e0700f686551c42
测试接收到扫码推事件的事件推送
make_user('test_user') make_event('Hello Event') rsp = self.send_text('er', user='test_user') obj = objectify.fromstring(rsp) self.assertIn('您确认报名参加在', rsp) self.assertEqual('er', obj.WechatlibCommand) self.assertEqual('confirm', obj.WechatlibState) contex...
0
6f3219a6ef8e5a06eb12cc85b202e84f
9851d21827e1288bba7f8af4ebb354a2
Clear any active changes in the row.
void clearRowsWithChanges();
1
d9ee287ba6e89111b200d7af90ccb685
fc0b75df917f19721f6ed4597e6aa70b
dict style access to commentors
def get_comments(github_object): try: return github_object.get_issue_comments() except AttributeError: return github_object.get_comments()
0
816cf0bf9a5409b69b6d26c1aed8b027
7b3a5b5b23e888b13d5c0ea74268f5a3
根据项目id获取项目模型列表
export default class DMMIndex extends DataModelManageBase public getModelInfoByProjectId() { if (this.pProjectId) { this.isPDatasourceLoad = true; getModelList({ project_id: this.pProjectId }) .then(res => { res.setData(this, 'pDataSource'); if (this.isInitActiveItem && this....
1
979418d5fdf5eca8610630a27f34c7d7
2a800be55ffcca09e94950c8c8340cd9
Updates an activity log
if (empty($data)){ return false; } $activityLog = new AdminActivityLog(); $activityLog->fillable(array_keys($data)); $activityLog->fill($data); $activityLog->save(); }
0
43fe865e11225a5bac30b2245766a413
6a8fcfe8345ec722992ba50150ee08c2
<p>功能描述:获取用户男女年龄段比例列表</p>
sexList = userService.queryUserSexRatioService(startDate, endDate); if (sexList != null) { result = "success"; } else { result = "fail"; } return "userSexRatio"; }
0
075df17bd92de795ff40ebe912ff280c
a8cdfe553236c3657586d3ebfaeb5488
Возвращает помещение, в котором этот скан используется
class Capture3d extends \Tracker\CaptureBundle\Entity\Capture3d implements \Doctrine\ORM\Proxy\Proxy public function getPlace() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getPlace', array()); return parent::getPlace(); }
1
e5352735071a4079e92e98593b7440c3
f0cb9270e8d2dfe50cc3d7b62dcaf87b
Creates a new node which has these 2 nodes as children.
abstract class AbstractBinaryOperator implements OperatorInterface abstract public function createNode(NodeInterface $left, NodeInterface $right, $lineNumber = -1, $flags = 0x00);
1
6a506d8ae23a00fa13441cc93a3aac23
9bba11e277a34f068fd87ecba0fe2834
根据指定键获取不允许为空的字符串
public final class PropsUtil public static String getString(Properties props, String key) { return getString(props, key, ""); }
0
000276653156f50ed488e27bc1940da3
19d718f38bbd4d5ffafb2271f0bdcdd2
Should be only one
function checkOnlyOneRule() { let workspace = getWorkspace(); let ruleBlockCounter = 0; removeNonRenderedBlocks(); for (let block in workspace.blockDB_) { if (workspace.blockDB_[block].type === "rule") { ruleBlockCounter++; } } if (ruleBlockCounter === 1) { return "OK"; } else if (rule...
1
5f6166760047bb65b034087c9c39d4c5
d619ac28a37f5c4b6fd92b7f4b4a13f9
For all non-zero edges, changes weight to be sign(trained edge) * val.
for i in range(len(self.nodes)): for j in range(i): if self.weights[i][j]: weight = np.sign(self.weights[i][j]) * val self.weights[i][j] = weight self.weights[j][i] = weight self.set_node_attributes()
1
9bd314f78976f3a62541895da3d69d5c
c6ec1b29ca19aef8e89e739d6bac8cac
Get the number of players still active (not folded) in the hand
{ int size = 0; for(int i = 0; i<drawnHand[0].length; i++) { if(drawnHand[0][i] > 0) size++; } return size; }
0
101f62ede71254645d942da7054ef338
6ec299288461f96ccd1ec5584bf68f70
add a schedule into container and execute it.
scheduling_queue.add(fn, self) if (!cycle) { cycle = timer(scheduling_queue.drain) } }
1
e6d80540e4dc41a53b6d5bceb9fea3b3
bc0837a57aefffe0b363a1bf3a63405d
Unregisters the event handler to be notified when new data from the MicroPython interface is received.
{ if ( mp_obj_is_int(handle_obj) && mp_obj_is_callable(callback_obj) ) { int nhandle = mp_obj_get_int(handle_obj); microamp_handle_t* handle = &g_microamp_state->handle[nhandle]; handle->endpoint->dataempty_event.py_fn = callback_obj; handle->endpoint->dataempty_event.py_arg = ar...
0
8ebff8a0ad8eaf3d699d306366727383
8f48860ec381befb1bd0c45e882d5e38
Pop a pointer, return null on empty
char *pop(char *line) { line++; return line; }
0
940d03b5dd12200e8d50466d71e8d54e
0d8770fcd6b80a42d5df9bfbecb22fbb
根据指定位置从栈中移除Activity
fun remove(activity: Activity) { synchronized(stack) { try { stack.remove(activity) } catch (e: Exception) { Logger.e(e) } } }
0
d96d799faf7888a4b4952a0ffa6db1f1
5bd32050cf4f86bc78b6b968efc3188d
Geeft de ingestelde kleur terug.
public Color getColor() { return color; }
1
5fbefd13e54178b068799bfacdfb0c50
886e306bb35b4bf8a46f2f25c48b20a0
Instantiate the tiles and set the restricted ones
map = new List<List<Tile>>(); for (int i = 0; i < mapSizeX; i++) { List <Tile> row = new List<Tile>(); for (int j = 0; j < mapSizeY; j++) { Tile tile = ((GameObject)Instantiate(TilePrefab, new Vector3(i - Mathf.Floor(mapSizeX/2),0, -j + Mathf.Floor(mapSizeY/2)), Quaternion.Euler(new Vector3()))).GetCompo...
1
1de22ca8fbde29f696b2fd93105e3606
e45fa801a80dfae5c66cd57dbc22f858
Обновление положения игрока в БД.
{ string sql = "update state SET state = '" + state.GameState + "', game_id = '" + state.GameId + "' where(user_id='" + state.User.Id + "')"; NpgsqlCommand comm = new NpgsqlCommand(sql, conn); conn.Open(); var result = comm.ExecuteReader(); conn.Close(...
1
0e9d75cbd4ba0bbd8a708f4512ab4789
ce9966f1f16bf7cfba884867815c7bec
构建插入指定表指定列的sql
public static AnalyzeResult buildInsertSql(TableObject structure,Map beanMap){ AnalyzeResult result=new AnalyzeResult(); StringBuilder cols=new StringBuilder(); StringBuilder params=new StringBuilder(); for(Map.Entry<String, ColumnObject> entry:structure.getColumns().entrySet()){ ColumnObject co=entry.getVa...
1
7ff3a0677d12f49c379ea32f6df17d67
5f4b45800e4514416ac310ba358a90eb
Metodo che restitusice la longitudine della città.
public class CityData implements Serializable public double getLng() { return lng; }
1
b9f9fd0751a8c8c1ed7010d1f7f56883
7fbb5e6b1e98e8ecb967a0fb48a324ba
indicates that an API call for adding a course has been initiated
public class Johnny_New_Project extends Fragment @Override public void onActivityCreated(Bundle savedInstanceState) @Override public void onClick(View v) { Intent intent = new Intent(getActivity(),Add_Course.class); startActivity(intent); Activity acti...
0
7f999d6eece1960f430d343e9374b892
4914f8dcdcdd8aab5c0cd70f03077072
Esegue le operazioni di manutenzione giornaliera
def production(): logging.basicConfig(level=logging.INFO) initialize_me() ft.set_file_logger((WORKDIR, 'acquisti.log')) ft.set_mail_logger(CONFIG[SMTP_HOST], CONFIG[EMAIL_PROCEDURA], CONFIG[EMAIL_WEBMASTER], 'Notifica errore ACQUISTI')
0
2543b7b8e3cfeb90d67aff5a58a4463c
4ab9328cac3e6acbb624ded76fbc2985
Getter for <code>NBC_STUD_INJ_HIS.INJ_BEGIN</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.8.0" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class NbcStudInjHisRecord extends TableRecordImpl<NbcStudInjHisRecord> implements Record9<Long, Long, Long, Long, L...
0
69e1872e1699c5c89416e4cdd77dcbb5
ee46bf24910c47d5019a9c2cf2d52d84
Adiciona um banco.
class BancoController extends Controller public function create() { $type = Type_bank::all(); return view('admin.banco.create', [ "type" => $type ]); }
0