query_id
string
corpus_id
string
query
string
code
string
label
int64
58a9d46434b80cb634a6a9715a28f040
10fc4ef75ca6724b96789743cc96824a
@brief Description: 根据条件查询卖家信息
params = dict() params = { 'id':None, 'seller_account':None, 'korean_name':None, 'english_name':None, 'seller_status':None, 'seller_property':None, 'manager_name':None, 'manager_phone':None, 'ma...
1
4afd5dd7238b9f592af62b05a32a9cb4
ce3a4085746a237cb9cbda7dc7fb9126
Creates a .DOT graph header for given Petri Net.
StringBuilder sb = new StringBuilder(); sb.append("digraph {\n"); sb.append("\tnode [shape=record];\n"); if (root != null) root.dot(sb, 0); sb.append("}"); return sb.toString(); }
1
3764e37224ad6b2b32ace77003fed3ad
decee2275a03acfbbaae5afd50f57302
Adds keys to the bought dictionary for all symbols and sets them to 'OUT'.
self.ourchords = [] self.oursymbols = [] self.ourchords = sym_master for index, i in enumerate(self.ourchords): self.oursymbols.append(str(index + 1)) self.apply_key()
0
006422e51a6c223bdb965d4c5f709b0a
0c28616937f87d9e82a63a6a9d968825
Chiude tutte le connessioni in upload e in download
void CGt2testDlg::OnCloseAllConnections() { gt2CloseAllConnections(m_socket); }
1
3f10a5b78056dc26f3fb26cdbca55139
feed9c5886bfc283def7aca938614023
Returns a Pattern from the given string or regular expression. Recently compiled patterns are kept in cache.
Pattern pattern = PATTERN_CONTAINER.get(regex); if (pattern == null) { pattern = Pattern.compile(regex); PATTERN_CONTAINER.put(regex, pattern); } return pattern; }
1
dd3022348aeb2c3366c6a32cd0ac329b
d6d94df72438238be481e8db6fc83b16
通过章节数和漫画id 查询某章节
public class ParserApiUtil public Request searchChapter(int mangaId) { HttpUrl.Builder builder=HttpUrl.parse(baseUrl).newBuilder(); builder.addQueryParameter("mangaId",mangaId+""); builder.addPathSegments("v1/manga/getDetail"); return getUrl(builder.build()); }
0
8f80b1cb032eafec579d73a61d056d7b
b0ab5efc1e441fcc91dc0efebc647375
Displays a single Bonus model.
class BonusController extends Controller public function show($id) { $bonus = Bonus::query() ->leftjoin('users as users','users.id', '=', 'bonuses.user_id') ->leftjoin('designations','users.designation_id', '=', 'designations.id') ->orderBy('bonuses.id', 'DESC') ->where('bonuses....
1
bf656ea23f1a1247db3a5858447ac9af
5625af95327d5edcaa723b83b1456876
Returns derivative of crossentropy function given net_output and ground truth
class RNN(object): def d_loss(self, output_activation, y): return (output_activation-y)
0
13c013874426c221353edba6ed860837
13ae9782d9d5690ffe688a0acaa943ac
Add departmentManager.
@RequestMapping(method = RequestMethod.POST) @ResponseStatus(HttpStatus.NO_CONTENT) void addDepartment(@RequestBody Department department) throws SQLException, PersistenceException { departmentService.add(department); }
0
0b042188253a5ec4043982c37066ccb4
d9b960615e82a745991e196346367423
Is data being selecting by defining WHERE clauses? <code>false</code> otherwise
public class FieldDefinition public boolean isSelectOnly() { return selectOnly; }
0
a133ff111cf46de3b96058278aa85e50
cbf53c0690c0efadb162138149af1ea3
Elimina una asignacion por su id
class ModelGnCooperanteTest extends PHPUnit_Framework_TestCase public function testEliminaAsinacion($gn_cooperante, $id_asignacion) { $eliminado = $gn_cooperante->eliminarAsignacion($id_asignacion); $this->assertNotFalse($eliminado); }
1
e23affea64ce53c295699af32826001e
0295256a7976bb8b5c03b17f9d177d48
获取保存的对象,支持所有类型对象。 (主要获取集合的时候使用)
public AccountEntity getSave();
0
a41c0c030b298ddc8d4ffd037b4c80e1
e417ea3d8fdfe1369e806b057715f3bf
Update the dictionary with values specific to pending Edit Configuration request tab
class offline extends PaymentModuleBase function before_edit_configuration() { Snippet::get_to_request('offline_payment_title'); Snippet::get_to_request('offline_payment_description'); }
0
ba417258681ffab80d6453b6d008e1c5
2903133cf710e35bc95495f221f6878e
Returns the datum, which must be geodetic.
public class Proj4Factory extends GeodeticAuthorityFactory implements CRSAuthorityFactory private GeodeticDatum createDatum(final PJ pj, final Proj4Parser parser) throws FactoryException { final PrimeMeridian pm; final double greenwichLongitude = Double.parseDouble(parser.value("pm", "0")); if (...
1
8024cd1a40334100412521dd15605c45
7a0023400cbce8c29eef8b8ece4b154f
show or hide 'width' or 'radius' depending on what type is selected
namespace ExperimentBuilder public partial class TrialForm : Form private void typeComboBox_SelectedIndexChanged(object sender, EventArgs e) { if (typeComboBox.Text.ToString().Contains("File")) { selectFileButton.Enabled = true; fileLabel.Enabled = true; ...
1
1c0574d32bc4fdde2d78409b021be4a4
06af607279539acb76bab32d46f7ee8c
Returns FIO Domains owned by the FIO public key associated with the FIO SDK instance.
class IamClient extends Client public function keystoneListFederationDomains($request) { return $this->keystoneListFederationDomainsWithHttpInfo($request); }
0
ab23bcd158e75b4a199bb7de729af0b7
c1583edb48e76e62d2b1cf33cd0aae54
clones a branch to the configured working dir and sets it as current repository
{ $from = $this->getConfig()->deployment('from'); $commands = [ 'rm -fr ' . $from, 'mkdir -p ' . $from, 'cd ' . $from, 'git clone -b ' . $this->branch . ' ' . $this->repo . ' ./' ]; Console::output('Repo: (' . $this->branch . ')' . $thi...
1
d76e820720427c9d75be9a383813b848
abb24af459b9e31a4f3601e4109259f0
Средняя точка линии
{ return new PointF((firstPoint.X + secondPoint.X) / 2, (firstPoint.Y + secondPoint.Y) / 2); }
1
800926c22c249195c9b037a2f17b0e35
b094088ad5a2a9eaa3a52e01cf3909d8
Manda a llamar un WebServices con parametros y demas y regresa verdadero si se ejecuto bien y falso su fallo algo
class FacturaElectronica private function CallWSAA($CMS) { $client=new SoapClient(self::$WSDL, array( 'soap_version' => SOAP_1_2, 'location' => self::URL, 'trace' => 1, 'exceptions' => 0 )); $results=$client->loginCms(array('in0'=>$CMS)); fil...
0
134e6d395497a30053453dc97679c654
bf038cb76793659f0fdbd7ed24bf416f
Uses the dir_string to move the turtle around the world.
public double execute() { List<Variable> args = getArgs(); double newDir = getTurtle().getDirection(); for (int i = 0; i < args.size(); i += 2) { double towX = getArgs().get(i).getValue(); double towY = getArgs().get(i + 1).getValue(); newDir = calculateTurn(towX, towY); rotateTurtle(newDir); } r...
0
ace7ed196a11318aea1602d4dff294a9
fcad75d67cd61b79461b010f6c947fc3
Computes the weighted correlation between fields a and b
intersect = a * b score = 2 * intersect.sum() / (a.sum() + b.sum()) return score
0
f8f0b7e852dc44f2410a83146ab0bcd1
b394b7b02f2d77d3ab8317195fce2150
If writing the new user in the database was successful continue to main activity
firebaseAuth.createUserWithEmailAndPassword(email,pass).addOnCompleteListener(new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if (task.isSuccessful()) { databaseReference.child(Child.USERS).chil...
1
480917a4ed27e88eb551dc22afa9b892
c4129225f8f473d7239ab49cf398eabb
Get array of current registered configuration files
class ConfigService public function getFiles() { return $this->_configFiles; }
1
49c83399653f35fe082b0d39bc1cc555
14b957559a90aac20fb8e5b211782057
メニューSEQから情報を取得する
menu_list = [ [None, '', '1', 'dummyメニュー1', 'パラメータシート(ホスト/オペレーション含む)', '1', 'ホスト用', '', '', 'サービス管理', 'サービス管理(参照用)', '', None, None, '2020/02/17 17:37:52', 'T_20200217173752325034', 'システム管理者'], [None, '', '2', 'dummyメニュー2', 'パラメータシート(ホスト/オペレーション含む)', '1', 'ホスト用', '', '', '確認用', '参照用', ''...
0
72da975b1c844de17441e7665de8c941
b40d6e95cf346928d52568069f4d22f9
Look for a random location in the room that is walkable.
namespace Assets.Scripts.AI.Entity.Behaviours public class EntityWanderBehaviour : AbstractEntityBehaviour private void UpdateLocation() { var game = GameManager.Instance; if (_grid == null) { var pathComponent = GameObject.Find("World").transform.Find("Pathfinding"); ...
1
94c3daa87d8a0469896d6d62c94519c6
103a7ca4bcad2f1c0fdb59540ec814aa
Exact field-by-field comparison
if type(self) is not type(other): return NotImplemented for self_field, other_field in zip(self._iter_field_values(), other._iter_field_values()): if self_field != other_field: return False return True
1
10f53fcc9049aba3402394988fb4e855
88f31014793ebf5a64bf47a0926ccf61
Fügt mehrer Daten der Sendeschlange hinzu.
{ if (data != null) { lock (_DataLocker) { _Data.AddRange(data); } } }
1
7e5049a4c089e9cf1bc8ce7286ac8add
62ec8f3f515aee72f32d3fd757e7a8d4
Metodo encargado de realizar la conexion a la base de datos utilizado las constante o variables de entornos encargada para dicha funcion
Class Db{ private function conectar(){ switch ($this->tipo){ case 'mysql': $this->link = new mysqli($this->servidor, $this->usuario, $this->password); $this->link->select_db($this->base_datos); $this->link->query("SET NAMES 'utf8'"); break; case 'postgress': $this->link=pg_connect("host=".$thi...
1
740f46665ad314416fbf29328a49da0c
282b90a074a449b1e685329af2dbdf0e
returns the rightmost min ODD index
public class PriorityQueue<T> public int _right(int i){ return ((2*i+2)>_lastIndex?UNUSED:(2*i+2)) ; }
0
2b19cfb10580c37ccd9cf936e67b38d5
c978897256f1a0561949c60fbb84b6e1
realizar la firma sobre el documento con las transformaciones y escribir la salida.
try { TransformerFactory.newInstance().newTransformer().transform( new DOMSource(this.docXML), new StreamResult(super.toFile()) ); } catch (TransformerException ex) { Logger.getLogger(FicheroXml.class.getName()).log(Level.SEVERE...
0
f7da590864f8f19726c1eb1fcd327fa3
057d390f08494f0fd83cdf913b3aab19
입력받은 string을 동적 할당으로 저장하는 함수입니다.
{ int size = strlen(string) + 1; ptr = new char[size]; strcpy_s(ptr, size, string); }
1
55a3a38f4e481e50ca312b303139e7b7
2bc006e89f9a239808392023b430b6e4
returns the distance between two Stars
class Game getDistanceByStar(fromStar, toStar) { return this.starsDistance.get(toStar).get(fromStar) }
1
3a0fa1925dad6333cb06c3c10f87fe6e
9778b4f86c72ad2399d7448200b4a914
compute the SVD of a and store data for PCA. Use project to project the data onto a reduced set of dimensions Inputs: *a*: a numobservations x numdims array Attrs: *a* a centered unit sigma version of input a *numrows*, *numcols*: the dimensions of a *mu* : a numdims array of means of a *sigma* : a numdims array of at...
if normalized: A = normalize_columns_separately( headers,d ) else: A = d.get_data(headers) m = A.mean(axis=0) D = A-m U,S,V = np.linalg.svd( D, full_matrices=False ) evals = np.matrix( (S*S)/(A.shape[0]-1) ) evecs = V pdata = D*V.T return PCAData.PCAData( headers, pdata, evals, evecs, m )
1
5a37efd05de98dd4b109bd6d107cda34
8cb21a269768b412dc8f89859798f784
行数カウンタをひとつ下げる
class Widows implements Plugin public function onRowSkipped() { $this->count--; }
1
2408aea475a351110ce07cbf08934865
7a0530f178dee016d38da7136350e134
Remove prefixes indicating street
class StandardizeAddressService def street_address @result[:street_address].gsub(/[#.]/, "").gsub(/(\s)+/, " ") end
0
4e0b961ced306e09616923cd463abdde
8489eb6d263c621318fd955556dabffa
Does the DNS server support recursive queries?
boolean supportsEventDNS();
0
ab772192cd01126c66d4f6a64fc25a36
b038d1e316fd1ad761a1ed39d198f516
MemberVO자료를 이용하여 회원 정보를 Update하는 메서드
public void updateMember(MemberVO memberVO);
1
da7800226d18740ce7c0d8bcd987619f
de949557ed475dc70244f21fc4279e17
When called, gets the average of the absolute value of all four drivetrain shaft encoders
{ return (Math.abs(this.getLeftFrontEncoderDistance()) + Math.abs(this.getRightFrontEncoderDistance()) + Math.abs(this.getLeftRearEncoderDistance()) + Math.abs(this.getRightRearEncoderDistance())) / 4.0; }
1
499103e7fae2aa352fb0ab3a91e115ec
6a6a99261fb1de11c9f3a3b63d5fff9b
Specifies a configuration for Widevine licenses.
namespace Amazon.LicenseManager CreateLicenseConfigurationResponse CreateLicenseConfiguration(CreateLicenseConfigurationRequest request);
0
e9b4b213e08aedf4aba631fa29e9973b
2a7b96bda39eec69ff06565008397d7c
Initialise the Smear class by seeding the random number generator.
void init_genSmear_COH(void) { GENSMEAR_COH.USE = 1; NUSE_GENSMEAR++ ; GENSMEAR_COH.MAGSIGMA = 0.13 ; printf("\t Coherent MAGSMEAR SIGMA = %.3f \n", GENSMEAR_COH.MAGSIGMA ); fflush(stdout); GENSMEAR.NGEN_RANGauss = 1 ; GENSMEAR.NGEN_RANFlat = 0 ; }
0
94f625f91fb63b0da688fb97c50c84a0
25a690fe29b843aa9d90845e2362908e
Convert from special regions of United States
if (province_name == "Newfoundland and Labrador"): province_name = "NL" elif (province_name == "British Columbia"): province_name = "BC" elif (province_name == "Prince Edward Island"): province_name == "PEI" elif (province_name == "Northwest Territories"): province_name =...
0
c52dda158a8248636c54a9cd9e35c3f3
8bba5eb579bcc8e0f9d143ebeca0db89
Copy a counted string, trimming the trailing space, and turn the result into a C-style string.
static void cgm2Cstring(s, t, n) char *s; char *t; int n; { int i; for (i=0; i<n; i++, t++) { if (isprint(*t)) { *s++ = *t; } } *s = '\0'; }
0
02d6ad4fafd9b045850c1a2b1764417f
347e3ed5e5ad51803c515a9c29af6054
Starts the MongoDB service
async function start(path = PATH) { return await MongoClient.connect(PATH).then(async (val) => { mongod = val; db = val.db(); console.log(db); }).catch((err) => { console.log(err); if(mongod) mongod.close(); throw err; }); }
0
40960f46f6f25b83bbc8ebcddc37b567
2793bf7b04ef52a5da3f6fb481491f3e
## Backward selection for cox model
modselect <- function(dataset, newdata, h) { mod.lars <- lars(x=as.matrix(dataset[,-1]), y=as.matrix(dataset[,1]), type="lasso", trace=F, normalize=F, max.steps=1000) window.test <- 8 if(nrow(mod.lars$beta)<50) quante.s <- nrow(mod.lars$beta) else quante.s <- 41 dataset.mse <- rbind(as.matrix...
0
c4348e5c0bbb8398e8d7b991c2407df0
cdd34c61e00515308222999c3513bf0b
Verify that good parameter sets are accepted and handled correctly.
class TestWithParams(object): def test_invalid_param(self): nt.assert_raises(ValueError, self.herb.set_parameters, {'eta': 0.8, 'alf': 8}) nt.assert_raises(ValueError, self.carn.set_parameters, {'DeltaPhiMax': 0})
0
c3a7bea36f89d898afddf878f56301ff
d13d0a7d255ff4ecaa347241b252ba66
Executes the getAllDomains request asynchronously.
public final class GlobalDomainRegistrationsInner public Observable<ServiceResponse<Page<DomainInner>>> getAllDomainsWithServiceResponseAsync() { return getAllDomainsSinglePageAsync() .concatMap(new Func1<ServiceResponse<Page<DomainInner>>, Observable<ServiceResponse<Page<DomainInner>>>>() { ...
1
9dcbd2bbaa7ead7c5c86f11864ab16b6
1b4a9d8820f047a4150904ffa27bd8d8
Print array on different lines
void printlnArray(int *arr, int length) { for (int i = 0; i < length; i++) { cout << arr[i] << "\n"; } return; }
1
fd787e8f942285a47a6597d99fb74c2f
de8565739c9002217983e56984e06983
Display the status updates of all friends
class HomeController extends Controller private function _feed() { $statuses = Status::statusesByFriendsAndMe(); return view('feed')->with([ 'statuses' => $statuses ]); }
1
8c7906de1ba7fd07d297df7860583dd0
24cd2255e3ce185b8e2812cdbdcd29f4
Creates a new PyAtkRelation.
class RelationNode(object): def __init__(self, value=""): self.__come_from = [] self.__point_to = [] self.__value = value
0
1ce5dca5c1e60723baf34529ac7a159c
4b944ce0ac882f103e8ff75ae361570c
Setup the matplotlib widget UI elements
class TransientStepResponseMeasure(Measurement): def setup_figure(self): self.g_hw.settings.current_compliance.connect_to_widget(self.ui.current_compliance_g_doubleSpinBox) self.g_hw.settings.voltage_compliance.connect_to_widget(self.ui.voltage_compliance_g_doubleSpinBox) self.g_hw.settings.sour...
0
13716515137ea42eeb6a565af28df7b8
9598e7cb321e926c444dafd3785ad356
根据经纬度和半径查询自动站
public class AssetsActivity extends BaseActivity implements AssetsView public void queryFJZC(int meters) { LatLng latLng = LocationUtils.transferGPSToBaiduLocation(deviceLocation); if (latLng == null) { showMessages("获取当前坐标失败,请稍后再试"); return; } mAssetsDao.queryFJZ...
1
706e73b8b0f9d9f2b9dfcd0aec98f531
851fd4c8822992445e0ff7bddec1a66e
Returns the label of the search result to use in the UI.
class DefaultSearchHandler: def get_label(self, instance, request: HttpRequest) -> str: return getattr(instance, self.label_field, 'N/A')
1
5dcd9fdabbdc290e0c8cbe0c656a080c
a64b4e999cbcb4657f59e41267b62819
Merges two clusters with provided ids.
class HClust: def _merge(self, a, b): c = Node(a.id + b.id, self.working_matrix.distance(a, b) * 0.5, children=(a, b)) self._cluster_parent(a, c) self._cluster_parent(b, c) self.working_matrix.obs.remove(a) self.working_matrix.obs.remove(b) self.clusters....
1
79fcd047662b5bbd63031614f34cc8b0
638a5540b5ade25340fa481a0d87f7a2
2.1.3.获取可预约科室的预约日期
class Reserve extends Component getInstitutionDate (hcuInstitutionId) { const _this = this; let data = { cusId: this.state.cusId, custPscId: this.state.custPscId, hcuInstitutionId: hcuInstitutionId } let reserveDateUrl = "/chealth/background/cusServiceOperation/hc...
1
2ac50aeb2d6164356fcd7a24ee2bd540
4a266be549d1fc97d0d081ce63131722
指纹特征回调(开启以后有指纹数据就会回调,设备主动发送数据)
func remoteConfigCallbackForFingerPrint(dwType uint32, lpBuffer unsafe.Pointer, dwBufLen uint32, pUserData unsafe.Pointer) { fmt.Println("dwType: ", dwType) if dwType == 0 { dwStatusArr := *(*[4]byte)(lpBuffer) dwStatus := binary.LittleEndian.Uint32(dwStatusArr[:]) fmt.Println("dwStatus: ", dwStatus) fmt.Prin...
1
e610113f117657d2529ad2898fd10ddf
ff064d52ae1aaea5923c6a65a29827f7
在客户端显示消息
class ChatClient extends WSClient.Client{ private showMessage(message:string):void{ this.output.innerHTML += message + '<br>';}
1
43e49d761a4c4ee2ce6c15dd0582eacd
4400c29b06358d9b6c3bf40dfd0938f6
Unit test setup use Mail faker.
class SetEmailTest extends TestCase public function setUp() { $this->fixture = new SetEmail(); }
0
2fabc4006c1b8a0173d1b44b98319eae
361900b5fddf0b21bd01b1caecd63177
持久化行为数据
{ $behaviorModel = new BehaviorLogModel; $behaviorModel->usercode = $param['userinfo']['usercode']; $behaviorModel->username = $param['userinfo']['username']; $behaviorModel->module = $param['request']->module(); $behaviorModel->controller = $param['request']->controller(); ...
1
dad88a7e5f8752682a0d7c0ccea522f0
571c445cf74e817d6548ba8600de9716
Retorna uma array contendo o id das programações de acordo com o estágio
ListsDB db = new ListsDB_DEO(); try { return (ArrayList<String>)db.getStages(); } catch (SQLException e) { e.printStackTrace(); return null; } }
0
4ee5c2155799fcb95a98beee9064a2b6
0d6efbc022bbcf156387ecf358069d3f
generator that generates a random L array
int* res = zeroLint(); for (int i = 0; i < size; i++) res[i] = rand() % 10; return res; }
1
9e097bcb5509106b183a11fa366f361a
75c1a84b5a097e520bb0d50e28d18762
Tests that the "set" data is not altered.
public class LeaderBoardControllerTest @Test public void testSetDataChange() { setUp(); newOne.setDataChange(true); assertTrue(newOne.getDataChange()); }
0
da1b6835dec9ab7327dab27b3edd73c0
733260574f97e42eb7696765daf6b979
导出本周用户信息
namespace MailManager.Module public partial class MainModule private void ExportExcelWeekly() { try { var excelApp = new Microsoft.Office.Interop.Excel.Application(); var excelWb = excelApp.Workbooks.Add(Type.Missing); var excelWs = (Wo...
1
f148e926366d46d4a7738da31319c8f5
bf6fbc7d83cd102b69ea933c2fa0cf70
TESTCASE METHOD-2 : EDIT OR MODIFY CUSTOMER
final String ACTION = "update"; if (authorizer.IsAuthorized(user, ACTION)) { Customer foundCustomer = null; try { System.out.println("Enter Customer ID you wish to update: "); int id = 0; try { id = Integer.parseInt(myObj.nextLine()); } catch (Exception e) { e.printStackTrace(); ...
1
4f06579b04abb77b4b2dce70ea6ab9b4
052061b501c8886a177b9e16204ed091
============================================================================ Funktion StartGameMenue() Alle Eingaben bezüglich des Schwierigkeitsgrades werden von dieser Funktion abgefragt und ausgewertet. Jeweils die ein- gegebene Schwierigkeitsstufe wird zum Start des Sudokus über- geben. ============================...
int level, record, mark, points, exit, i, lastmark, game; char button, Menu[SubMenuQuant][16]; textmode (C80); level=3; record=0; mark=1; exit=0; points=0; lastmark=1; game=0; StrCopy (Menu[0], "Neues Spiel "); StrCopy (Menu[1], "Ebene:"); StrCopy (Menu[2], "Anleitung "); StrCopy (Menu[3...
0
b572914bf4addbf9aeac1ca42929af65
09069f5e0b75c6a1f3e10fc61a4047c8
Dump all information in the cluster
for cluster_id in self.cluster_map: cluster = self.cluster_map[cluster_id] print(cluster.cluster_id, cluster.center_doc_id, cluster.members)
1
fc34901c763750464cedc45e3ef3b99e
a5e759d95315e2420ffe824fd21d9525
Returns the text saved.
namespace OpenXcom std::wstring TextEdit::getText() const { return _value; }
1
4bbb491d5e82b4ebc9b53192bc9b0aea
f5b1f1b700fdbfad3b784896131972a0
Този метод ще създава инстанции. Ще работи или с интерфейси регистривани в контейнера, или с конкретен клас, ако види че го няма регистриран в контейнера.
{ if (interfaceToClass.ContainsKey(typeof(TInterface))) return (TInterface)Activator.CreateInstance(interfaceToClass[typeof(TInterface)], arguments); else return (TInterface)Activator.CreateInstance(typeof(TInterface), arguments); }
1
1a9d3bea2a8acf683ec98d7e4efbd428
8ea9859a4c782ea37fe3b3bad897e418
Looks up the features of all neighbours of an atom, for a batch of molecules.
mol: Chem.rdchem.Mol, atom_idx: int, n_features: dict, e_features: dict ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor, int]: nodes = make_nodes(mol, atom_idx, n_features) edge_index, edge_attr = make_edges_and_attr(mol, e_features) charge = np.sum([a.GetFormalCharge() for a in mol.GetAtoms()]) ...
0
0c6d48fc75f9bd7c8dd03d6232b80d2e
b79f591690c2ea55b0e9cf933ffd1c81
Generate metadata to set up addresses of VM in each network
return { "network_cards": [ { "name": "eth0", "ip": "192.168.0.{0}".format(index), "mac": create_random_mac() }, { "name": "eth1", "ip": "192.168.1.{0}".format(index), "mac": c...
1
89c005de0fc4832ad217f7b19a8f50df
f45c88c383af495d81a283ab485166ae
Reads the triangle indices from the given mesh object.
namespace Microsoft.Kinect.InteractiveKinectFusionExplorer public class CustomMesh public List<int> GetTriangleIndexes() { return this.triangleIndexes; }
1
a1b828d95f0692abeebaf5e5ac8688f9
c31e2f1e13b3fbea33b61c67d6c77ac2
Local state updates, to trigger a rerender every second for time updates.
class Task extends Component componentDidUpdate(prevProps) { if (this.props.task.started !== prevProps.task.started) { this.updateTimeValues(this.props.task); } }
0
e635cadee44061fc67f6cbe928b9412e
95f454e64d687229e08a51fdacc000da
Returns the index of the first bit that is set to {@code true} that occurs on or after the specified starting index. If no such bit exists then {@code -1} is returned. <p> To iterate over the {@code true} bits in a {@code BitSet}, use the following loop: <pre> {@code for (int i = bs.nextSetBit(0); i >= 0; i = bs.nextSe...
public class BitSet public int nextClearBit(int fromIndex) { int offset = fromIndex >> 6; long mask = 1L << fromIndex; while (offset < _length) { long h = bits[offset]; do { if ((h & mask) == 0) { return fromIndex; } ...
0
938ab807fe6c37231ccf55523f74f6ed
75c328ebd38a65d70f4cec13cf59f8ca
Chronométrage du Mode Bonus
self._tempsecoule = time.time() - self._commencer self._setTime(self._tempsecoule) self._timer = self.after(50, self._maj)
1
53a60fbe9c2e34a2e7d135ab30ce12fd
a1bf47b3fdc863bf3b79458ac39a7c3d
Version of the operator Helm chart.
class ApplicationStatusOperationStateSyncResultSourceHelm(dict): def release_name(self) -> Optional[str]: return pulumi.get(self, "release_name")
0
d154bf7a552de742f0ffa92905ca25f7
484f6193e8c74f601b11178c6b4f5289
Returns a comma-delimited list of a post's categories.
function get_categories_list($id) { if (is_int($id) && get_post(intval($id)) !== null) { $categories = ""; foreach (get_the_category($id) as $category) $categories .= "<a href='".get_category_link($category->cat_ID)."' title='".$category->name."'>".$category->name."</a>, "; return substr($categories, 0,...
1
6beebd9fa3d240351196043cdd110b94
c474a303b07604ac026fd1e15e5fa7e3
Insert result from http call into SQLite DB
db = connect_db() cur = db.cursor() j = request.json search_name = j['search_name'] app = j['app'] sid = j['sid'] result_message = j['result']['_raw'] result_host = j['result']['host'] result_source = j['result']['source'] result_sourcetype = j['result']['sourcetype'] results...
1
7e65291f9a09db9c3c603b78406783ae
afa8c3c6dda7caf7dada63b26509cd0c
调用远程录像
function startSaveLocalVideo() { var savepath=getSavePath4AjAX(); if (!savepath) { alert('请先在"设置"中设置本地录像保存路径.'); log.error("本地录像失败——没有有效的本地录像保存路径"); return false; } var playOcx = document.getElementById("realPlay" + currWinNo); if(!currCameraId) { log.error("本地录像保存错误——还没有开始播放视频?"); return false; } va...
0
7fafe7f30815f0f6ed5cb2333ccf91b3
2aa87aedda3cd6349b3b4f588d4b63ee
Creates an entry in favorite_photo reflecting the authorized user and the specified photo.
{ Dictionary<string, string> parameters = new Dictionary<string, string>(); parameters.Add("method", "flickr.favorites.add"); parameters.Add("photo_id", photoId); return await GetResponseAsync<NoResponse>(parameters); }
1
efea1a2cd8a74fcc5e912233164768f4
3c6d3351a365fa4f2c1007345856927d
获得对应已打开的UI,如果没有打开,将抛出异常
public class UiManager : Singleton<UiManager> private bool IsCanOpenCache(EnumUiType uiType, params object[] uiParams) { GameObject uiObj = null; if (_dicCacheUIs.TryGetValue(uiType, out uiObj)) { if (uiObj != null) { BaseUI baseUi = uiObj.GetComponent...
0
bc49bc4b78b38cd259f4cc64cb059ec6
32088a8188cb3c3a7fb9fe04f32816cb
将redis 中的数据同步到数据库中
void InsetRedisToDb();
1
d79d372c2d054b4d970b8d00b3bce827
0f958d5e216e17a9799bb22b0be6a4b5
Válida el estado de la red en el dispositivo
{ string deviceStatus = _snmp.Get("1.3.6.1.4.1.11.2.3.9.1.1.3.0"); if (deviceStatus.StartsWith("ready", StringComparison.OrdinalIgnoreCase)) { return true; } return false; }
1
d101d45d9662f06fb6bff73666e984e1
a1f165d6feda68c5783529ab6ef971ae
Test deleting a non existant record.
{ $id = 'ab43ca3434f324acde'; $this->modelMock->id = $id; $this->modelMock->expects($this->once()) ->method('delete') ->will($this->returnValue(false)); $this->modelMock->expects($this->once()) ->method('find') ->with($id) -...
0
a3872dd811c994ea151c6affbbf26b47
b39c2b3b6e4a17b11c78a97a8d1fb5ee
Function to save the un follow functionality . Un follow a single board
return async function (dispatch, getState) { const {token} = getState().auth const result = await api.unfollow(token, project_id) return result } }
1
e380a70eb9b1b6c5eaff30e81d5e5c1b
7d93c5a12b7fcd5aa733a89eab49b53c
已付金额的取得
namespace BLL.Order public class K_Order_Hotel public decimal GetPaid(string OrderNo) { return FormatUtils.ToDecimal(DBHelper.SqlExecuteScalar("SELECT ISNULL(SUM(B_Out),0) FROM K_Client_Bank WHERE B_ObjectNo='" + OrderNo + "'")); }
1
7469d3426939a32d99adf1be9016cbd7
61e47cd8deac2dd20d596284040b96a2
Returns loaded line manager with aspell spell checker.
{ if( fUseDictionary ) { hSpellLib = AmLoadLibrary( szSSCELib ); if( NULL != hSpellLib ) { int maxSSCEVer = 0; int minSSCEVer = 0; register int c; (FARPROC)fSSCE_Version = GetProcAddress( hSpellLib, "SSCE_Version" ); if( NULL != fSSCE_Version ) ...
0
14aee498fc4066fddf580b99ff40c7c4
1e51eab40f572a7343fe6c06b0af9497
! @brief uPD9281: set up LVDS TX set up LVDS TX parameter
{ HdmiTx_Set(0x04, g_u8TxShift, g_u8TxShift); if(EDID_NO_ERR == eStatus){ HdmiTx_Set(0x22, g_u8TxShift, g_u8TxShift); iTE_HTx_Msg(("HTx is HDMI\n")); }else{ HdmiTx_Set(0x22, g_u8TxShift, 0x00); iTE_HTx_Msg(("HTx is DVI\n")); } HdmiTx_Set(0x04, g_u8TxShift, 0x00); }
0
5a4476e5fb742f9aef8085e614367897
1096a5bc0c37e7ea05b0b2a61a18e482
Deletes the given logical switch.
namespace PluralKit.Core Task DeleteSwitch(PKSwitch sw);
1
42f4902b2b2e763bd8ec969e5217fe15
9c0841f8938b245457a8c9ab460ae92f
Ajoute des déclarations au bloc - Garantie l'unicité
class Process: def add_declaration(self, file, name, string): if file not in self.declarations: self.declarations[file] = dict() if name not in self.declarations: self.declarations[file][name] = string
1
a558703d5de2e2697a92bb62d93217a6
ff6fc9b5d4f59fccc96960f7446023e1
Here the user is asked the question repeatedly until he replies with a validAnswer, we then return the answer
{ int i = 0; do { foreach(string qString in question) Console.WriteLine(qString); string input = Console.ReadLine(); for(i = 0; i < acceptedAnswers.Length; i++) { if(acceptedAnswers[i].Answer...
1
7ddd4a643bcaa0b437c4173c25728542
7b84806c618c9c95711cabd3ba28834b
檔案目錄回到上一層
{ if (localpath.GetLength() < 4)return; int j; for (j = localpath.GetLength() - 2; j >= 0; j--) if (localpath.GetAt(j) == '\\')break; localpath = localpath.Left(j); localpath += "\\"; ::SetCurrentDirectory(localpath); File_List.DeleteAllItems(); Findfile(localpath); UpdateData(FALSE); showdir(); ::SetCurre...
1
87690b0d5791817e7c682f76ef25bd6f
0ed3c2c5741dcebf0361e52ef0802ab9
Returns existing table by name, if it does not exist creates a new table. For existing table the types must be identical to the ones used at creation
public Table table(String name, Column... columns) { MySQLTable table = new MySQLTable(name, Sets.newHashSet(columns)); try { DatabaseMetaData metaData = getConnection().getMetaData(); ResultSet set = metaData.getTables(null, null, table.getName(), new String[] {"TABLE"}); ...
1
134910b14456849c8cbbcc3a1deeda9a
8e3b9f354e05fc37a5489cf3b5f55daf
Method to set the value of field id_status
@Entity @Access(AccessType.PROPERTY) @Table(name = "StatusValues") @Cacheable @EntityListeners(StatusValueEntityListenerManager.class) @SequenceGenerator(name=StatusValue.ID_SEQ_NAME, initialValue=100, allocationSize=1) public class StatusValue extends Localized public void setId(final int id) { this._id = id; ...
0
9ad7765044b5ae9722d55670a1b03e38
9a5836e8721cc616082bf3409b6b8ace
Update slider to reflect current amount of XP.
public class WinLosePopup : MonoBehaviour private void Update() { if(Gameplay.updatePlayer!=-1 && didSetup==false) { Setup(); didSetup = true; } if(didSetup==true) { if (before.experience < after.experience) { if...
1
5ca5e8d6ddef4a0c0c8f6f80f39e9a6b
8b58583c9791c9ca3faed5c290d92511
Create a new sorter instance.
class AttributesSorter public function __construct(AttributesOrderInterface $order) { $this->setOrder($order); }
1
038d5c4a9afc94d9d13a4b88aba8214c
beadacf9281e64a752bef8f6c4e59c9f
异步致命
namespace FootStone.Infrastructure.Logging.Interface Task FatalAsync(object message);
1
b22b91ce881f8bdc981026fcd37ebd5b
72fbc3b93accdaaa6133048d4c2a23b1
Returns the repository security configuration.
public function getRepository(): SecretRepository;
0
9d05d857baa816db7a2e2ae1d515675e
43f81caa516476e738e5ac84f069bbde
! \private This method calculates the offsets in the old and new text for the longest common substring.
next_indices (size_t first_old, size_t second_old, size_t *first_new, size_t *second_new) { size_t first, second; if (first_old == -1) { *first_new = 0; *second_new = 0; return; } first = first_old; second = second_old + 1; if (second == 128) { first += 1; second = 0; } if (first...
0
44347adba8920526c049778b4e9f3718
3e1b690e28413336954edfd1975f9b6a
Determine whether the user can permanently delete the practice.
class BusinessPolicy public function forceDelete(User $user, Business $business) { return $user->id === $business->owner_id; }
1
2349d9c7a63e677c6c652f97c589b204
e3de21776a1da5275e3061384ecb4e53
Spawn some zombies in the graveyard
for ( int i = 0; i < num_zombies; i++ ) { draw_zombie( i ); } }
0
4cf80c261c393eff11bec0c3ef8c8ccd
8016acb8c08c916c1fdd2eb54ce22f4d
Tests that a type mapper is created
namespace Merchello.Tests.UnitTests.Mappers [TestFixture] [Category("Mappers")] public class MerchelloMapperTests [Test] public void Mapper_Resolves_ITransaction_To_TransactionMapper() { var expected = typeof(AppliedPaymentMapper); var resolved = MerchelloMapper.Curre...
1