query_id
string
corpus_id
string
query
string
code
string
label
int64
57f262c203fb013b6d3f563d2c7a6e61
a70bf4011bcfcbef5cd6e505892d7389
Controls whether an item can be selected when the receiver is editing. Defaults to NO.
public class Bar extends RelativeLayout public void setItemSelectable(boolean selectable) { mItemSelectable = selectable; }
1
dc055d099cad6070a9d2566ab166d9ce
0f9acbc02a91ffbce0203cb09978b0cb
Extinction law (A_lambda/A_V) from Cardelli, Clayton, and Mathis 1989
def ism_extinction( av_mag: float, rv_red: float, wavelengths: Union[np.ndarray, List[float], float] ) -> np.ndarray: if isinstance(wavelengths, float): wavelengths = np.array([wavelengths]) elif isinstance(wavelengths, list): wavelengths = np.array(wavelengths) x_wavel = 1.0 / wavelengt...
1
6f9fe0a33e158126314b667f514c208d
f6ec9fc3ef7201582b4687a04a5b35e8
fungsi mendapatkan jumlah layer yang ada
public class NeuralNet public int getLayerAmount() { return this.sizes.length; }
1
2dfd45834c97fd3cef0b05ddd9a20b47
64dea037d8526461371799148ea0bfd6
I2C3 割り込み
void EINT3_IRQHandler(void) { if ((LPC_GPIOINT ->IO2IntStatF >> 10) & 0x1) { sw3 = 1; LPC_GPIOINT ->IO2IntClr = 1 << 10; } }
0
eaebb5419026d7131914a6b37e6b0d55
3d7dc225cbdf2c28901f801c61fcdf8b
Get barcodeUrl.
class TIG_MyParcel2014_Helper_Data extends Mage_Core_Helper_Abstract public function getBarcodeUrl($barcode, $destination = false, $lang = false, $forceNl = false) { $countryCode = null; $postcode = null; if (is_array($destination)) { if (!isset($destination['countryCode'])) {...
1
417886fbb2090ab551e1bddf29792d60
760ef14447df4b1b45ef436646c8d501
取顺序表L1和顺序表L2的并集。
List intersect(List L1, List L2){ List L = malloc(sizeof(struct Node)); L->next = NULL; Position P = L; Position P1 = L1->next; Position P2 = L2->next; while (P1!=NULL && P2!=NULL){ if (P1->Elem == P2->Elem){ Insert(P1->Elem, L, P); P = P->next; P1 = P...
0
038d64aa141c526403a173cc93ad26c5
561aa2ede2ad974ceb265526506244a1
Adds an action to the FlowTable entry.
boolean removeFromLAF) { map.put(name, action); if (removeFromLAF) { KeyStroke stroke = (KeyStroke) action .getValue(ActionBase.ACCELERATOR_KEY); if (stroke != null) { strokeList.add(stroke); } } }
1
809e39730cb2ae136efaf82c19695679
4e4425108954227a61e5ecb660fbb528
an object is determined to be possible of having persistance if it has a database, table or a primary key
@SuppressWarnings("unchecked") public class PersistentObject implements Serializable protected boolean canPersist() { return getObjectPersistence() == PersistentObject.OBJECT_CAN_PERSIST; }
0
843ad727dfd154ac776acd850e41d3bc
abb206f967cd63e9c6e9977e9c57a8da
Creates a visible post type.
register_post_type( POST_TYPE, [ 'public' => true, 'show_ui' => false, 'exclude_from_search' => true, 'can_export' => false, ] ); }
0
a45f5a87d6a32ffb317c9a02295b2c3f
45baeb512033cf22a9fdcaba2ef87212
Создание файлов монтажного плана.
class ProviderController extends Sibirix_Controller public function addPlanAction() { $upload = new Zend_File_Transfer(); $designId = 2256; $fileModel = new Sibirix_Model_Files(); $model = new Sibirix_Model_Goods; $imageFile = $upload->getFileInfo()["file"]; $fields = array( "NAME...
1
5e648e40ab017a516e14de85664cd0e9
c83f64713751ad65adbc057eef26a8ab
レコード登録数が最大数を超える場合、一番出勤時間が古く、idが一番若いレコードを削除する。
class KintaisController def kintai_correction User.all.each do |user| kintais = Kintai.where(:user_id => user.id).order("t_syukkin ASC,id ASC") cnt = kintais.count - G_MAX_USER_KINTAIS kintais.limit(cnt).destroy_all if cnt > 0 end end
1
67a814b868525d4143a43d7af50add85
7d7d771177af84e519023a69978f6708
Displays a BankCustomer's account information if the customer has been previously verified.
if(customer != null && theBank.containsValue(customer)) { System.out.println(customer.toString()); System.out.println("Account Activity:"); customer.getAccount().displayTransactionInfo(); }else { System.out.println("Bank customer is not found in the...
1
825568fd915d203f882dd21c474efb8f
c799ae99420c38cf20a4a4425e7da5ef
根据connName从连接池dbConnMap查找已建立连接并返回 如果不存在,则创建并加入连接池
DBConnectionPool pool = null; Connection con = null; pool = (DBConnectionPool) pools.get(name); con = pool.getConnection(); if (con != null) { if(this.checkConnected(con)){ System.out.println("得到连接。。。"); }else{ this.release(); this.init(); } } return con; }
0
12f738e4f05275861b700182d30927a9
30a5dcf2507cab568e632ce1f3ca6abc
加载系统推荐的点滑设置
{ if (\Yii::$app->request->isAjax) { if (\Yii::$app->request->isPost) { $form = new RecommendSettingForm(); $form->data = \Yii::$app->request->post('form'); return $this->asJson($form->save()); } else { $form = new Recom...
1
ed90e7f61ca315aea7647d11995faa3e
4dd939c7072deca72cee7ec65faa3122
define the function to transform one HHMM input into decimal hours (will be used inside the dataframe with applymap function)
def from_hhmm_to_decimal_hours(input_number): mystring = str(input_number) m = float(mystring[-2:]) if mystring[:-2] == '': h = float(0) else: h = float(mystring[:-2]) decimal_hour = float(h) + float(m)/60 return(decimal_hour)
1
4266a2888b2ec956656243df53ed89b5
a910c0770ff11065584fd1036bfe667a
vérifie si les 2 chaînes de caractères passées en paramètres sont identiques (===).
function passwordMatches($a, $b){ $res = $a === $b ? true : false; return $res; }
1
91c5515ea37a87a8c3206b2332fb10d4
6f4a7cf3fa51922e3f3ac931bc5c916e
outputs it all
def print_all(f): print f.read()
1
8cc71d48d6af6617ab58bd86a33c6294
c1955aa9b1a372afef0e328e0efa5ba6
If auto selection is set, after bean deletion was delegated to the deleter service, the next bean (the bean after the last selected) will be selected automatically
public class BindingLifecycle extends PersisterRestartBase public void testExchangeAutoDelete() throws IOException { doAutoDelete(false, 1); }
0
c92ae5363449bcf5b2d0779f7ccc31b6
7a139ff09dda1df8cf3504f1ed9f9deb
Resizing a Managed Disk
public Mono<Void> convertToManagedDisksAsync(String resourceGroupName, String vmName) { Mono<SimpleResponse<Flux<ByteBuffer>>> response = convertToManagedDisksWithResponseAsync(resourceGroupName, vmName); return client.<Void, Void>getLroResultAsync(response, client.getHttpPipeline(), Void.class, Voi...
0
6ac0589e8201015963754d5f454a7566
7eb5af713c0d12916a2ee9e3b59ad9ec
Класс холста Qt для помещения рисунка Matplotlib!
if not HAS_PYQT5: raise ImportError('PyQt5 package is required for Redux GUI.') super().__init__(parent) self.plot_layout = 'grid' self.max_plot = None self.min_width = 5.0 self.min_height = 3.0 self.share_axes = 'both' layout = QtWidgets.QVB...
1
25efdb1d5b1c0a486710824c9c53088c
8aff150b7922c5c5d3d6fda8e4979c29
Returns the string indicating the REST API version.
{ return restServiceType == RestServiceType.NetOpenXRestService ? Constants.NetOpenXRestServiceFinalVersion : Constants.TigerRestServiceFinalVersion; }
1
316959e7415afb92441ed524d76214a4
a870ae38a0e901a013d00a8e3ca9e438
apis/browser-api/tsd/lib.es6.d.ts@26615 Gets the day of the week, using local time.
date := dateObjectOf(call.runtime, call.thisObject()) if date.isNaN { return NaNValue() } return intValue(dateFromGoDay(date.Time().Local().Weekday())) }
1
36cb49435879624ecb10a2e50a253a2f
6f47d9d0cfb483d3fa684ce4287d3ca0
In order to test that jOOQ does not perform unexpected mapping of equally named fields in different tables, we currently use an explicit comparison of the fields' qualified names. Originally the implementation would just check {@link Field#equals}, but it turns out that this operator is not symmetric. If this is ever f...
public final class ASTHelper public static boolean isField(QualifiedName node, String qualifiedTypeName, String fieldName) { return instanceOf(node, qualifiedTypeName) && node.getName().getIdentifier().equals(fieldName); }
1
1b662b157c33e35caaece5626b4fa858
951156cb50a509036196d383ba49ecaf
Function that gives the incorrect letters in the guess
{ String a = ""; for (int i = 0; i < this.word.length(); i++) { if (this.correctLettersUsed.contains(this.word.substring(i, i + 1))) { a += " " + this.correctLettersUsed.get(this.correctLettersUsed.indexOf(this.word.substring(i, i + 1))) + " "; } else { a += " - "; } } return a; }
0
816b4d9c3996e3252acea4ae65d411f0
519ba3611fd035cc3ffe8f4d57dfe5b4
将DataReader数据填充到MessageInfo对象。
{ var obj = new SD_MessageInfo { ID = dr.GetInt64(0), TypeId = dr.GetString(1), Name = dr.GetString(2), PRI = dr.GetInt16(4), Status = dr.GetInt16(6), Refer = dr.GetString(7), ...
1
5249874469880b0a346b369e8a34422f
84d5f738a7725b3cbbe0cb93090d9b3f
Query exif by object key and param name
{ GCHandle hParams = GCHandle.Alloc(@params, GCHandleType.Pinned); try { _GetQueryObjectuiv(id, pname, hParams.AddrOfPinnedObject()); } finally { hParams.Free(); } }
0
39cc838ea708e0900ebbc012911828ad
4d24ee1f607271bb9ceb2dc0ec6bc961
Raises the <see cref="Changed"/> event in the <see cref="MemberCallback"/>.
{ if (TriggeredByChanged != null) { var buildEvent = CallInterceptors((i, e) => i.OnTriggeredByChanged(e)); if (!buildEvent.Canceled) { TriggeredByChanged(this, args); } } }
0
7fcd507c860e64d45e9b1f66d67d5028
3e61c073c14dd470152d1b56167d30dc
Updates this user's statistics for the most recent game played.
public class EndGameDatabaseDriver public static void updateStats(Map<String, Object> winInfo) { updateGameStats(winInfo); updatePlayerStats(winInfo); }
1
76ea9e26f327d3871611b0da3c1c8aa6
32b6979d9bb7ceb93e8e6c66661c8e9e
enqueteChoicesを取得します。
$DtbSeminarEnqueteOptionTable = ClassRegistry::init('DtbSeminarEnqueteOption'); $result = $DtbSeminarEnqueteOptionTable->find('all', [ 'conditions' => [ 'DtbSeminarEnqueteOption.seminar_id =' => $seminarId, ], 'order' => [ 'DtbSeminarEn...
1
71bfd7bd62e21542148f8fc781dac0e1
bfd2e19858aa00229089bcec71645281
Unwraps <b>self</b> and returns <b>Some</b> if <b>self</b> contains <b>Some</b>. Returns <paramref name="fallback"/> otherwise.
abstract class Option extends ScalikeTraversable abstract public function orElse(Option $b);
0
eaf555a30cea745eb8cffbc0d335180d
804c35500ae8b6be1aea59a2ff56a85a
the nodes are equal if their coordinates are equal
class Node(object): def __eq__(self, other): return self.x == other.x and self.y == other.y
1
65f3134c5b9f0864b06b3f6fbcbf0428
75fd8da7c355e2ad626b0773b22c84e0
takes strings in form of (a > b) and evaluates them
public class Evaluator private boolean ifPrecedes(String s1, String s2) { return (s1.compareTo(s2) <= 0); }
0
ef4613390c6cf893a973bfca77ace5e9
eaa188df829f2f59d63093350542fbb8
Pauses the stream, to start it call <see cref="StartTweetStreamAsync"/>.
namespace TweetinviCore.Interfaces.Streaminvi void PauseStream();
1
3fea74cf272fcd9b675bd0c85a61f635
9826f6efde0cf6981a54597463ba6b7b
taskKey 相同就认为是同一个任务
public class DownloadInfo implements Comparable<DownloadInfo> @Override public boolean equals(Object o) { if (o != null && o instanceof DownloadInfo) { DownloadInfo info = (DownloadInfo) o; return getTaskKey().equals(info.getTaskKey()); } return false; }
1
77382603c85cb47cac47042766e4427e
eb5445b8e75b2f76029b555f9c3cae65
Reorders $galleryHasMedia items based on their position.
$order = json_decode($_POST['order'], true); foreach(array_values($order) as $key => $id){ $this->Media->id = $id; $this->Media->saveField('position', $key); $order[]='updating id '.$id.' with position '.$key; } $this->set('order',$order); }
1
4ce04eded6c3def9ce1493ffa1395f20
a8d92a7da421a0f1b77747f32567f82b
Get a list of the available datatracer solvers. Returns: list: List of the names of the available datatracer solvers.
class SolverPool(metaclass=Singleton): def __init__(self): self._solver_list = ["hyperopt", "optunity", "optuna", "randomsearch", "quasirandomsearch", "gridsearch"]
0
7cae0845be03fb79155d7c5b00dd9544
e4ca9242710722c346cae4d8d18f0da0
Update the CRC and ISIZE values based to include the given data.
namespace EspTouchForCSharp.Util public class CRC8 public void update(byte[] buffer) { update(buffer, 0, buffer.Length); }
1
20b9be9ea147da4889ac29c0e14e6887
332c4432fd2e2a6254b821f75d011961
Data provider supplying a path and a boolean that indicates whether we expect this to be absolute.
return [ 'empty' => ['', []], 'single value' => ['/foo|/bar', ['/foo' => '/bar']], 'complex nested path' => [ '/foo/bar/whizz|/bar/biz/bang', ['/foo/bar/whizz' => '/bar/biz/bang'], ], 'multiple values' => [ "/foo|/bar\n/biz|/bang", ['/foo' => '/bar', '/b...
0
dfe7a0a52183f3ac755bc46ebc459b1c
268ca8132f66b19e827337dc3590ab7d
Parse user's class methods for relationships.
{ $relationships = []; $class = new ReflectionClass(get_class($this)); $entityClass = $this->getClass(); foreach ($customMethods as $methodName) { $method = $class->getMethod($methodName); if ($method->getNumberOfParameters() > 0) { $params = $...
1
37609389513b7d13989dada825b14b24
9dd2763fb04c8f83ec804fd258db7ec8
Método que retorna o número de respostas corretas
{ int score = 0; foreach(bool answer in userCorrectness) { if (answer == true) score += 1; } return score; }
1
6c2043823acbcbce862ee69bb08150d3
54cab9d73d586f478e62aad60665343a
Initializes the top level items of the RigModule.
class zRoot_Rig(object): def Build(self): self.model = xsi.ActiveSceneRoot.AddModel(None, '%s1' % self.parent.prefix) self.model.Properties('Visibility').Parameters('viewvis').Value = False self.data = self.model.AddNull('_DATA_') self.data.primary_icon.Value = 0 self.data.Properties('Visibility').Parameters(...
1
f962ad15956d23a529f056ff04d40ece
d018d8315b144016c4e7076253a036a2
Main method to handle custom logout actions
@Import(library = { "tapestry5/bootstrap/js/collapse.js", "tapestry5/bootstrap/js/dropdown.js" }, stylesheet = "tapestry5/bootstrap/css/bootstrap-theme.css") public class Layout @AuthenticationPolicy(AuthenticationPolicyType.AUTHENTICATED) Object onActionFromLogout() { userSession = null; CookiesManag...
1
1e34771e6c86cd120a1efa6250046c4d
0a0de3e2c7a1889de0fe8346e608f1da
Creates table in existing database.
public class CreateTableCommand implements DatabaseCommand @Override public DatabaseCommandResult execute() { try{ String databaseName = objects.get(DatabaseCommandArgPositions.DATABASE_NAME.getPositionIndex()).asString(); String tableName = objects.get(DatabaseCommandArgPositions.TA...
1
425dc6ae977572e3a21b80c7a89425ee
9d2c0c8c40f5988e05bbe3c6320cbb6f
remove a window of values from a stream
int len = (rp <= wp ? wp-rp : size - (rp-wp)); extract(len,leftOver); rp = wp = 0; }
0
3a544ab1a069adb2cc1ccabe3a043a59
ce60ee6cb6449b6e682020ddfac3320d
returns the current score of each set
class scoreboard(): def get_sets(self): return self.set_counter
0
0b3115ff2fcf31bdfd88a783f082252b
f7d7659e7ab89ee6687b997897c55804
Moves a questionblock up in the list of survey questions
function ipal_move_question_up($layout, $questionid) { return _ipal_move_question($layout, $questionid, -1); }
1
a62a02c3c5ac4fd3b5780f87c91e1dab
7239a54e921e250087c2db650590c912
2개의 2차원 배열의 각각의 원소를 더해서 새로운 2차원 배열에 대입하는 함수
function solution(arr1, arr2) { return arr1.map((elem, idx1) => elem.map((val, idx2) => val + arr2[idx1][idx2])); }
1
a6580852827d03af89e07f204f3f2cf9
d82bec70fc2781b39612b878b8a1ebf4
eliminar la pantalla con todos sus elementos
let oTabla = document.getElementsByTagName("table"); if (document.querySelector("#listadoJuegos") != null) document.querySelector("#listadoJuegos").remove(); if (oTabla != null) { for (let index = 0; index < oTabla.length; index++) { oTabla[index].remove(); } } le...
1
06f496ca1a16869e16ead5681002757e
2e64b45387f58b88f82c79ac81525516
Returns whether a WPT test is a crashtest. See https://web-platform-tests.org/writing-tests/crashtest.html.
return { output: test.unreached_func("unexpected output"), error: test.unreached_func("unexpected error"), } }
0
7f6fc79ed4d43628b5e17b39703b15e8
ebd534be7d9170762cbc111c8246e67a
Internal helper function for simplifying products of Pauli operators.
cls, product_state: np.ndarray, op_mats: Sequence[np.ndarray] ) -> "OperatorPolynomial": norm = np.prod(np.einsum("sj,sj->s", product_state.conj(), product_state)) assert np.isclose(norm, 1) output = OperatorPolynomial(operators.MultiBodyOperator()) num_sites, _ = product_sta...
0
58cb365043e2ddc24581772a502a29b4
9c15c756c7b4053afc46381ad49978ee
@brief 把tableWidget中的数据保存到excel中
{ QString filename = QFileDialog::getSaveFileName(ui->tableWidget,"保存路径","/","Excel 文件(*.xlsx)"); if(filename != nullptr) { int colcount = ui->tableWidget->columnCount(); int rowcount = ui->tableWidget->rowCount(); Document xlsx; Format format; format.setHorizonta...
1
13c0b2e7324dedf1270dca4fbbabb94e
d6af2a8a9f3bc9893a0525570e40d5d7
执行一个可能抛出异常的方法,检查抛出异常的异常是否匹配预期异常的泛型类型T
{ T caughtException = null; try { test(); } catch (T e) { caughtException = e; Console.WriteLine($"Caught expected error: {e}"); } catch (Exception e) { ...
1
b5a51c68cff5e3f254c334fe97a5c775
0e9cc5e703635d2c875b61b9ec2f4312
ComponentDefをセットアップします。 コンポーネント情報はコメントアノテーションで取得します。
function define(name: string, options: ComponentOptions) { }
0
097c11e9b70e5c2bbe6c4dacb7edbd60
c9387d4297ea97e9622fa8049378964e
Sets the event runner used to raise events.
public class SCXMLExecutor implements Serializable public void setEventdispatcher(final EventDispatcher eventdispatcher) { this.eventdispatcher = eventdispatcher; }
1
3a9311247ea7718c854646227683e53c
0a4c08f1a1fe756a07e5f436a8b90043
Get the iDEAL configurations table name
class Interkassa extends \CActiveRecord public function tableName() { return 'interkassa'; }
0
dac5bfa8f3f00a5ba7b6fa06c43f5338
1d57eccc604e14cf4e52e29368ec79da
Displays a dialog where the user can select a room.
public void showRoomDialog(List<RoomBean> roomList);
1
9ada31383c3a901f945cb1d546bdce25
ec46adfa8abd162b280e61cfd3a50adf
Places the ships after this control has been created. This can only be done after this control has been added so that it has reference to the Parent object
{ if (isHorizontal) { for (int i = 0; i < Game.shipLengths[currentShip]; i++) { shipSet[cellX + i, cellY] = currentShip; } } else { for (int i = 0; i < Game.shipLengths...
0
8bd0d667e4330a775381861c815e6199
f1c8f761c92324c36d6b59a8ec8d513c
Identifies the numbers in an input line and creates the numbers array
String[] digits = numInput.split("(?<=.)"); Stack<String> sample = new Stack<String>(); for (int i = 0; i < digits.length; i++) { sample.push(digits[i]); } return sample; }
0
798e3995728c803f2b6f2a6d13f45be5
4ed02f0bb738ddc6cba84a37a4481a42
if was checked -> uncheck it, else check it
namespace lafi void checkbox::widget_on_left_mouse_click(int, int) { if(checked) uncheck(); else check(); }
1
95fc4899341985b24958e88debed416a
4777f68c99564e2a2b41ca0332354770
Returns the dictionary key given the value.
def _get_key(val, dict_): for key, value in dict_.items(): if val == value: return key
1
0093c5440caabf89ab193eaff1fcef99
f291bc68e3d893202cedbe6d88c95865
Function that returns the show time string for one booking.
export class BookingConfirmComponent extends BaseClass public get when(): string { const date = dayjs(this.booking.date); const end = date.add(this.booking.duration || 60, 'm'); if (this.booking.all_day || this.booking.duration > 23 * 60) { return `${date.format('DD MMM YYYY')} - All...
1
76f11b6d89fb2037e0556af6d74c5cfb
9f57d144d21f9acf72f5f59b4fbcd538
Instance method decorator for currying transformation functions
class Decorum(object): def __get__(self, instance, owner): return functools.partial(self.call, instance)
1
154ac40897128d8f658148132f4e1786
f019d6a0a1eadd5d83043bdf0f49c795
Handle resumption token exceptions.
abstract class ResourceAbstract protected function handleException(ClientException $exception): void { if ($exception->getCode() === 400 && $exception->hasResponse() && $error_code = $this->getErrorCode($exception->getResponse())) { switch ($error_code) { ...
0
d8cf09a65009131419086d98618297ad
e2003a641dc0132edf9b982c3edb454a
hides all the inputs when start quiz is selected
function hideStartSection() { startQuizDisplay.classList.add("hide"); startQuizDisplay.classList.remove("show"); }
0
3a64a5ee0c21584bc3159676fe719fd4
b32d4ad0f87ed6751f37761ae97225bc
Returns an array of companies.
public function getCompaniesList();
1
dcc9381cad3c1810fa99e65b9c47ed9f
2405d236690e01c06623f673f7eedea0
Builds commands to copy one or more regions from a GPU memory location to an image.
GfxCmdBuffer* pCmdBuffer, const GpuMemory& srcGpuMemory, const Image& dstImage, ImageLayout dstImageLayout, uint32 regionCount, const MemoryImageCopyRegion* pRegions, bool includePadding...
1
93ed2968228dde95161ba1917d225f3d
4f87a0ecc34de8720d6cc067be2503cd
Function that analyzes a line. Special cases (ERRORS that made the job end) are treated differently as special cases.
result = line parts = line.split() if len(parts) > 1: result = 'expr {}'.format(line) elif len(line) == 4: try: int(line) result = 'enter {}'.format(line) except ValueError: pass elif len(line) ==...
0
0704bae2a0a6a15af07384ec92aba75b
0c2b664de9fec6bc92a9615013403e1e
Clamp the width to avoid overlap
public class EnemySpawner : MonoBehaviour private void SetFormationWidth(){ formationXMin = this.transform.position.x - width / 2; formationXMax = this.transform.position.x + width / 2; }
0
6f7957f098c8ab54495920327678b711
a050c1998f45136ee8a10a049dfa0ae5
A callback before the build is started to mark modules enabled.
public class ModifiedSelector extends BaseExtendSelector implements BuildListener, ResourceSelector @Override public void targetStarted(BuildEvent event) { }
0
7091058510139ca64c7dd0f3cde72f96
1f605520ba16bf149e0f607dc4b27fa1
Returns the match type of this PortalInformation.
public String getMatchTYpe();
1
2bc499ba0a7a7f95665851a419f9640d
f7c252436221a11048c7b6946485bf53
Writes chemical equation that shows the change from reactants to products.
reactants = self.mol.mapped_smiles products = ".".join(mol.mapped_smiles for mol in self._products_getter()) return reactants + ">>" + products
1
142532a8ac2302d6d358205021522f89
37582099b8ec92498eee486b78b509f9
给房间内的所有玩家广播消息 这是带手牌信息的消息
export class Room boardcastAllPlayer() { let msg = new MsgRefreshRoomPlayer() msg.data.roomId = this.id; msg.data.refreshAll = true; let playerList = new Array(); this.playerMap.forEach((player, playerId) => { let playerInfo: PlayerInfo = { id: player....
1
b15d487d09c17cd33942cfbeee09fc97
290f64e44d85d51273bb4a0444228edc
Update the field rule (and possibly the sub-rule)
{ bool bRet = true; int nMinOccurrences; int nMaxOccurrences; if (nSubfieldCount == 0) return true; nMinOccurrences = pRule->GetMinOccurrences(); nMaxOccurrences = pRule->GetMaxOccurrences(); if (nMinOccurrences == nMaxOccurrences) { if (nMinOccurrences != RANGE_NOTSPECIFIED) { if (nSubfieldCount ...
0
6efb94a8efff63f1a696562b27d40496
7366f3492af76c9425746f06c9995905
Runs before a migration starts
class MigrateHookHandler implements MigrateHookContract public function beforeAll(MigrationWorkflowCollection $workflow) { DB::beginTransaction(); }
1
b50b7ac60b33659535e1900387bd3ec4
e9faebb7e098876745639f85208c6422
Get an data block for the server. Wait for the reply.
class data_elt(base_elt): def serve_get(self, r_msg, cb, eb): r_pdu = self.serve_fetch_one() self.make_reply(r_pdu) r_msg.append(r_pdu) cb()
0
438e0758cb2c14ebc59e930720353f71
6cd03f7174cd662dbe41b8ed5454aa23
ピックアッププロジェクトに設定する関数
def session_project_create(s): print('project_create')
0
d5c2b1e2a6459fc9e86ec3a726bace75
c56587513ae57f5a02e612934fb27707
Builds the model based on BERT.
text_input = tf.keras.layers.Input(shape=(), dtype=tf.string, name='text') preprocessor = hub.KerasLayer(hparams['tfhub-bert-preprocessor'], name='preprocessing') encoder_inputs = preprocessor(text_input) encoder = hub.KerasLayer(hparams['tfhub-bert-encoder'], trainable=True, name='BERT_encoder') ou...
1
4090c43d99ead2cb07646bfcd31ae773
cafa72e99ab5c476b1d8aa53d637bdb1
Sequence is to set data line to 1 then clock line to 1 then set data line to 0, clock line to 0 then set clock line to 1 and data line to 1 ___________ ________ data line : _____/ \___________ ___________ ____________ clock line : _________/ \___
data<<=4; set_e1; delay(50); PORTD &= ((1<<3)|(1<<2)|(1<<1)|(1<<0)); PORTD |= data; set_e0; }
0
3a38c7e39547c1a13b2afc600aa05a68
4f12e0ff610b6ab43bbe35f5f5513a84
Subtracts the start offset of the stream from current position
public class MappedFileChannelInputStream extends BufferInputStream @Override public long getPosition() { return startPosition + super.getPosition(); }
0
8ae13c18a301c7fdc731d48e64f18dd1
1bc13e4e0e638314435c21fabe477711
function menambah session mahasiswa ketika login
{ $login=$this->session->userdata('login'); if($login==false)redirect(base_url('login/login')); $data['username'] = $this->session->userdata('username'); $data['nama'] = $this->session->userdata('nama'); $data['id_kategori'] = $this->session->userdata('id_kategori'); $data['id_fakultas'] = $this->session->...
0
f9e2f148203e9aa8c3542f6c25e1f8a4
7e22c5985201f5d4adf60f0b4e8a6476
\brief Connects to a migration target via TCP/IP
{ close (); strncpy ( m_Host, host, IP_SIZE - 1 ); m_Port = port; create (); return connect (); }
1
da35fa26a2f35891274c25a50ba722c5
6fa74029bd94d7d31fb8bb30f651e467
Insert or update a row in a members table
const type = member.id === -1 ? api.postMember : api.putMember return type(member.id, member) .then(entry => { if (member.id === -1) { commit('add', entry) } else { commit('update', entry) } }) .catch(error => { commit('...
1
bf3bad6d30fc08785ef6e8fd009379fb
6f6754def488a4bf395eb1c8c1899ade
Returns iterator pointing to nonexisting entry at the end of hashtable.
namespace bencoding BDictionary::const_iterator BDictionary::cend() const { return itemMap.cend(); }
1
161231a5ccbd348e2126a30222a1d0bd
cf32db635dab440b24dbad52702938af
video2pkl
src, dest = tup folder, vid_name = osp.split(dest) video_name = vid_name.split('.')[0] video_folder = osp.join(folder, video_name) output_pkl = video_folder + '.pkl' try: if osp.exists(video_folder): if not osp.exists( osp.join(video_folder, prefix.format(...
1
ccbf010f41d647e1cf296aa9308e5ae8
84ecadca653df350c699dc5479d0f805
计算打折价格
slashedPrice(price, discountPrice) { if (discountPrice) { return price } else { return } }
0
b1313734d1ce25477eeddad076fad5df
e71c4fe007cb2ec77ae135be11e1bb15
根据appId、外部订单号获取订单信息
public class PayService extends HttpUtility{ public HttpResultData getOrderInfo(String payChannel) { HttpResultData result = new HttpResultData(); String service = Constants.SERVICE_GET_APPORDER; JSONObject data = new JSONObject(); try { data.put("username", mUsername); data.put("udid", mUid); data.put...
0
3ea83237f7193b3509ab5cfdd5e71220
126fe859f581af41ef21b9c65cdd1f77
校验接口代理商的优惠权限 目前只有两项优惠参数
class UsersController extends Yaf_Controller_Abstract public function check_agent_param($post){ if ($post['addr_state'] == 0) { _pageJson(['alert' => '请选择省份!' , 'code' => 1]); } if ($post['addr_city'] == 0) { _pageJson(['alert' => '请选择城市!' , 'code' => 1]); } ...
0
214e2d2935a52977c5badfc08e4cf879
18cf9e789a5fce9e22b9b03524ef1da6
Get relay name (device name). The name of device depends on the value returned by the underlying data source, so in some cases it can be human-readable value and sometimes it can be some strange number.
String deviceName();
1
b19f8aafdf2b840c2f11f1c736b2f002
345b4bd118db93235415aadf0fa7bd24
Devuelve la llave primaria de la tabla foránea
class Url extends Model public function getForeignKey() { return 'route_id'; }
0
6e6f771d9d160e3333a144d83c714453
89bf930bef253a84d4b9741f6342db92
Enable or disable radio buttons
namespace GB_HW_Lesson8 public partial class Form1 : Form private void SetRadioButtons(bool value) { rbYes.Checked = value; rbNo.Checked = !value; }
0
7d654a4318db689556e2a2b751aa9eda
830cc08f315861c1057dbb228bc8d6da
Get 采用的模板,可取值为"istio" 或 "trace",默认为"istio"
@Table(name = "oc_kubernetes_application_instance") public class OcKubernetesApplicationInstance public String getTemplateVariable() { return templateVariable; }
0
db72b0e8314d5b2e884bdc50c9b6493b
9013212091af53acf765176caaa2af9f
Write a file to the package directory, creating subdirectories if necessary.
class _EggBuilderNoPkgInfo(object): def add_file_as(self, path, archive_name): self._fp.write(path, archive_name)
0
09b5d38f32a92cf6302ac0e176f76e4a
4a519bd762ea6727c6be2d81e0c6d307
Recursively find all children of $catId
class ModelModuleHomecards extends Model public function getCategoriesRecursive($category_id) { $category_data = array(); $categories = $this->getCategories((int)$category_id); foreach ($categories as $category) { $category_data[] = $category['category_id']; $children = $...
1
ac35f81d1267671caaa1d8253261d2b7
e767c57a0674c6d3f279982087e9d0c3
Amount of bottles in supply
public class ZombieWorld extends World public int getTotalSupply() { return totalSupply; }
0
a9388dc1bb10938665606db085f80744
e02d50a09c8d186a64ad3ab96b41e1dc
Fu->F | -F
namespace brovador.GBEmulator public class CPU void OP_1F() { var result = (byte)((registers.A >> 1) | ((registers.flagC ? 0x01 : 0x00) << 7)); registers.flagC = ((registers.A&0x01) != 0); registers.A = result; registers.flagZ = false; registers.flagH = false; registers.flagN = false; }
0
904ebb5e53d2c436c15e0a95fdbd2864
992eae57bd51984111c78601411cda68
Sets analog position. Timeout value in ms. If nonzero, function will wait for config success and report an error if it times out. If zero, no blocking or checking is performed.
namespace YoctoProxyAPI public class YStepperMotorProxy : YFunctionProxy public int set_stepPos(double newval) { if (_func == null) { throw new YoctoApiProxyException("No StepperMotor connected"); } if (newval == _StepPos_INVALID) { return ...
0
88bee5e10dcb0479f1e4615369f9feca
d04516e3cfc1124014fa1bf4654bcc1e
Display a listing of the AttachHouse.
class AttachController extends Controller public function index() { }
0
a6bef5a5242081fe537e1a649bf08ee2
c7a68b8f729cafa67ef5a8499b5919cf
根据商品的id得到其所有的图片
List<Picture> getProductPirctures(String productId);
1
a8fabc1450f29203949d66809d8a94d8
697da01e619cd9921f70cd92483ff4b9
read jpeg file into a buffer
unsigned char* ReadJpeg(const char* path, int* width, int* height) { FILE *file = fopen(path, "rb"); if (file == NULL) { return NULL; } struct jpeg_decompress_struct info; struct my_error_mgr my_err; info.err = jpeg_std_error(&my_err.pub); my_err.pub.error_exit = my_error_exit; if (setjmp(my_err.setjmp_buffer...
1
ee1f0ef9ae8352031da5114f4cc2e99c
aa23e64bbf6d96a7b1d268df4ab4f7a3
获取1-31的数组;
{ ArrayList list = new ArrayList(); list.add("01"); list.add("02"); list.add("03"); list.add("04"); list.add("05"); list.add("06"); list.add("07"); list.add("08"); list.add("09"); list.add("10"); list.add("1...
0