query_id
string
corpus_id
string
query
string
code
string
label
int64
cb6aa0dd62a29728bcb55741503f4f56
d9693a07c5a371d33e16c964dbaff3a5
Evento click del bóton que dispara la acción de agregar el insumo en el presupuesto
namespace AdministacionDeObra.Presupuestos public partial class Presupuestos : System.Web.UI.Page protected void btnCancelarInsumo_Click(object sender, EventArgs e) { popUpPresupuestos.ShowOnPageLoad = false; }
0
775e4acae19897b6fa88dd502855dccb
e4f728dcb92cb110b914d91293cc597b
Gets the value of the instanceInfo property. possible object is {@link InstanceInfo }
{ synchronized (monitor()) { check_orphaned(); org.apache.ode.bpel.pmapi.TInstanceInfo target = null; target = (org.apache.ode.bpel.pmapi.TInstanceInfo)get_store().find_element_user(INSTANCEINFO$0, 0); if (target == null) { ...
0
b1d51dd36a5e38fb66277fa83728fbdf
861c51885b727ad0e49a484b92f1d8db
=> mm
((this + 2400).HHMMtoMM - time.HHMMtoMM).MMtoHHMM } else { (this.HHMMtoMM - time.HHMMtoMM).MMtoHHMM }
0
86aeba55e602ba281dd465ff5b67cd96
ef113c0be5aade13b4be9673f5235fbf
Method to enable or disable WYSIWYG editor
{ if ($this->getEntityAttribute()) { return $this->getEntityAttribute()->getIsWysiwygEnabled(); } return false; }
0
3c7907e8007c4b73879de0cda5982c46
b11045d53a47d7116c72bbe5fe7ad438
__camelName__List reducer - Accepts arbitrary list arguments and recursively builds nested list as needed below) when dealing with a LIST action
didInvalidate: false , error: null , filter: {} , isFetching: false , items: [] , lastUpdated: null , pagination: {} }, action) { let nextAction = JSON.parse(JSON.stringify(action)); nextAction.listArgs.shift(); if(nextAction.listArgs.length > 0) { return { ...state , [nextAction.l...
1
56cbc680f2f9849f813a8b4e65b39b1b
b59eaddb9eb377164c9b9b83d98b3e69
creates formatted output for calendar property method
class CalendarCollection extends JsonResource public function toArray($request) { if($this->status == '0') { return [ "title" => $this->name, 'start' => $this->pdc." 00:00:01", 'end' => $this->pdc." 23:59:59", 'allDay' => "1", ...
1
c9e058e2ff817d55823978cb3852f426
ff621c41dc9f0ef33c3c3f787f5a5398
Get the max transferable amount for a specific cross margin currency
table = tables.ISOLATED_MARGIN_TRANSFER_TABLE conditions_list = [(table.symbol, SQLConditionEnum.equal, isolated_symbol)] selection = f"MAX({table.trfTime})" result = self.get_conditions_rows(table, ...
0
739f74c3a09ee82f279ba5f7c1da95b0
bd15fa8cb22170af8c7ab060081ca2e0
Converts molar quantities to mass quantities.
def convert_mass(m, z, mdef_in='200c', mdef_out='200m', concentration_model='diemer19', profile='nfw'): c = concentration.concentration(m, mdef_in, z, model=concentration_model, conversion_profile=profile) return mass_defs....
0
af2ccc1aca347d9fa4503137ec67196b
008bbcf4f9941e8f548b669b5619f825
Gets the teaching group select list.
namespace Erris.Areas.Examination.Controllers [LicensingAttribute(LicenseValue = LicenseValues.Examinations)] [ExaminationRight(IsSchoolAccess = true, Roles = "SchoolUser")] public class ExaminationSetupController : ErrisController [HttpPost] public string GetYearList() { return ...
0
0202226a912387705daf214007fd91c4
13f1c333510cd80942279db91c6dda9f
Avoid connecting the endpoint to itself when connecting the endpoint to the same worker it was created on. Affects protocols which send to a particular remote endpoint, for example stream.
namespace hycast class PubPeer final : public Peer::Impl bool isFromConnect() const noexcept { return false; }
0
d65fd6a75dd9786d607d4809ef1c8b1d
dc3d0e75bcc616bbed1ebb4ac54ac22f
根据本地路径得到远程FTP路径
{ string remotePathfile = @"ftp://" + Ip + Kits.GetSafedPathname(filename); return remotePathfile; }
1
f86b9175762384747eaf1d28ab6f5a7c
2259d640e327c4b4c271bec4700821ec
根据对象 mPowerItem生成查询参数集合
{ List<string> list = new List<string>(); list.Add(" 1=1 "); if (con != null) { if (!Null.IsNull(con.MessageType)) { list.Add(" MessageType = @MessageType "); } if (!Null.IsNull(co...
0
739f32bdd380a3315ed26e393a2d64e2
08fb2097b2e07c222d2bce495b57a5ad
Add view for the list of packages.
class PackagesController extends BackendBaseController public function create() { $scripts = '<script type="text/javascript" src="'.URL::asset('js/plugins/typeahead.bundle.min.js').'"></script>'; return View::make('backend.packages.create', array('user' => Sentry::getUser(), 'scripts' => $scripts))...
0
1385ebbc18fac56385f0651e7f33a13a
56437a169b9cd9138d9bcda9247a5bd6
Noen ganger ønsker programmet å hente u-dekodet signal, har derfor en egen funksjon for dette
void UpdateKnipperSignalen() { Knipper_1Hz = ((CIF_KLOK[CIF_TSEC_TELLER] % 10) > 4); }
0
b098abf4a44f54e5bbb2cb3903971195
afd0460f538841d72c21b77d3d536643
Initializes the noise map.
class Noise(object): def __init__(self): pass
0
2bb20f336d3080e5a9bb0fbebc0a033b
7315c8288a4d0597f7aa7a940f37ea65
Returns the coordinates of this square in algebraic chess notation.
public class Coordinates @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); char colChar = (char) (this.rowIndex.getZeroBased() + 'a'); stringBuilder.append(colChar) .append(this.colIndex.getOneBased()); return stringBuilder.toStri...
1
330e2fe5bc4541d372bd390d358ed445
cfdf1606b0e5355f20148fec1f9f5d44
Обновляет время оставшееся до следующего хода
namespace Othello public partial class MainWindow : Window, INotifyPropertyChanged private void UpdateTimeStrings(object sender, EventArgs e) { if (isPlaying) { if (!turnToWhite) { player2TimeS += DateTime.Now - turnStartTime; ...
0
468b26bba4c4ede06896130d2525a4dd
07c44c39be7e07b9856eae1fab7a3b7b
the key is fname/classname
key = (fname, self.genOpts.apiname) if key in dictionary: return dictionary[key] if fname in dictionary: return dictionary[fname] return None
0
d6412efd2f48b1badb2fa316087bb81e
8b4c22878c574567040d0801ce4383e9
获取所有用户订单数量信息表--分页
public class SnsUser extends RemoteClient public DataTable get_all_user_order(int u_id,int page_size,int page_index){ return callFunc("get_all_user_order",u_id,page_size,page_index).toDataTable(); }
1
4a4ae527f6fe38da3bcadfb16084f1c6
e1034d6c99e3229e4324b3b89b17585d
NHibernate용 Entity로 추가한다.
namespace NSoft.NFramework.Data.NHibernateEx public static partial class NHTool public static void InsertStateless<T>(this IEnumerable<T> entities) where T : IDataObject { if(entities.ItemExists() == false) return; InsertStateless(entities, UnitOfWork.CurrentSession); ...
1
47c7a10b759a2fb1bf0c65036e0f3bd1
ef7af1921cd51e45b1131c1eae415e39
Select image to set in displayImage and sends notification message
Intent data = new Intent(); data.putExtra(IMAGE_PATH, imagePath); setResult(RESULT_OK, data); }
0
938d725f9c604205bd25cee0d3ef4844
4b60820a511a701710bfbadf4583b55f
Executa o comando informado e retorna a primeira coluna da primeira linha
namespace MultiCalculoFramework.Dados public class BaseDAO<Model> : BaseClass protected bool ExecuteCommand(string command) { return this.ExecuteCommand(command, new SqlParameter[] { }); }
0
d3d05ee9fc291715796ea13064aff9ad
aa73841e821d098045d55cba2b2fd517
Returns the column as a sparse vector. Whether updates to the vector are written through to the backing matrix is left open to the implementation.
class SparseVector(AbstractSparseArray, LabeledVectorMixin): def to_column(self): return self.to_row().T
1
ce5dbf1d465d3404ee776dd4b4562a16
fdb1abbbbd453841a09da5f11fb7df06
computes and returns the row containing the specified LogicalPosition
final public class Location implements HasLocation, Serializable, Cloneable static public int getRow(int pCoordinate) { if(pCoordinate < 0) return -1; return pCoordinate & ROW_MASK; }
1
c38fa1cff831f7efd9e02466a5e9ed4f
6b8c7cd2c314a3ceb96553a597960d71
shifts all letters of a message by [offset] along the alphabet to the right.
def rotate(msg, offset): lister = [] for each in msg: calc = ord(each) + (offset % 26) if not each.isalpha(): lister.append(each) elif calc > ord('z'): lister.append(chr(ord('a') + (calc - ord('z') - 1))) elif calc > ord('Z') and ord(each) < ord('a'): ...
1
b48f588ea68a8c596bafb42a4457dce4
3c2f8bdfb1481ef606044be56c50a443
Tests an attribute query for the Person attribute "depiction"
public class PersonTest extends TestCase public void testDepname() { }
0
bc2a27badec119b2ef5f3086dbe871cf
1450eceba29c201e74e02a10123d0009
判断窗口当前窗口子串是不是字符串p的字母异位词 Tips:在长度一致的情况下,比较各字母的出现次数
{ for (int i = 0; i < p; i++) for (int j = p + i; j < str.size(); j += p) if (str[i] != str[j]) return false; return true; }
0
949119376c17cdec46c722a148818d27
7bdf47bd62af3cbfe057918b470258da
This is a Pyngus callback, invoked by Pyngus when the peer has requested that the connection be closed.
class IWebSocketProtocolCallback(Interface): def closing_connection(self):
1
f54f7a6552d6eb2b998307484907b98e
a11c8f119e524f5cee8cd129879af491
0 is susceptibale, 1 is infected, 2 is recovered -> initiliases a grid of susceptable nodes
void Problem::initialise_grid(double *V, const Grid& g) { for (k = g.kbeg; k = g.kend; k++) { for (j = g.jbeg; j = g.jend; j++) { for (i = g.ibeg; i = g.iend; i++) { if (g.x1[i] < 0.5) { V[rho][k][j][i] = 1.0 V[prs][k][j][i] = 1.0 ...
0
121bf5e60a164a0f72aafebd8a4279f1
15a55a2221c5cf4fff2272f21d3db905
Injects the resource locator to lookup the requested queue.
public void initialize(Bootstrap<EmailQueueServiceConfiguration> bootstrap) { bootstrap.setConfigurationSourceProvider( new SubstitutingSourceProvider( bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false))); }
0
6386879b4decdd907309cbb6bed60842
25fa1f511d325a092ef85c3858a0f9cf
This function starts the network Q.
super(QNetwork, self).__init__() self.seed = torch.manual_seed(seed) self.fc1 = nn.Linear(state_size, fc1_units) self.fc2 = nn.Linear(fc1_units, fc2_units) self.fc3 = nn.Linear(fc2_units, action_size)
0
b8b97edfc2f9d20794fa3787fe56362a
07cc910d9b511d468609ac1b830fced9
Create a directory, and add friendly error messages why it's not possible, if it's not possible.
class Doofinder_Feed_FeedController extends Mage_Core_Controller_Front_Action protected function _createDirectory($dir = null) { return Mage::helper('doofinder_feed')->mkdir($dir); }
0
b84b88e653c0a338f56c92d484ae2ea1
f8021e476fe5f33a2124594c7d2a1d87
This method returns the enum variable for the respiratory state
public String getState() { return state; }
0
c48802a6968b5bfcdf0198496794964f
c32ea6afa27b5f7cdf84eded071d53ec
zwraca wskaźnik do pierwszej komórki na liście
const AsteroidListItem* AsteroidList::begin() const { return head.getNext(); }
1
9509b483af84616ab37f060a273eafad
a571ef0f0dc41114675dfbe9c59bb101
Prediction of the molar absorption coefficient of a protein Pace et al. . Protein Sci. 1995;4:2411-23.
mo = (147.2 * (101.0 - ffmc0)) / (59.5 + ffmc0) if p > 0.5: rf = p - 0.5 if mo > 150.0: mo = ( mo + 42.5 * rf * np.exp(-100.0 / (251.0 - mo)) * (1.0 - np.exp(-6.93 / rf)) ) + (0.0015 * (mo - 150.0) ** 2) * np.sqrt( rf ...
0
267be6156230da2bac8c3c1858deb152
c2a326ab59b6d1c8d08b05d4739764e3
Gets the StorageClassificationsClient object to access its operations.
class StorageClient extends StorageClientContext constructor(url: string, options?: coreHttp.ServiceClientOptions) { super(url, options); this.service = new operations.Service(this); this.fileSystem = new operations.FileSystemOperations(this); this.path = new operations.PathOperations(this); }
0
138219559b8a00dca673d2b7092038ee
fb66f55e72956feb458726c54d429356
inicializa el MCP23008 de la placa de logica NO CONTROLO ERRORES.
void Adafruit_MCP23017::begin(void) { begin(0); }
0
93a6412bc51c5a2cfb0c7544b3c2a7d5
70d93d8ceaead4efba26c1f7110f3a0b
Test Policy get action function with numpy inputs.
env_spec = GymEnv(DummyBoxEnv()) obs_dim = env_spec.observation_space.flat_dim act_dim = env_spec.action_space.flat_dim obs = np.ones((obs_dim, ), dtype=np.float32) init_std = 2. policy = TanhGaussianMLPPolicy(env_spec=env_spec, hidd...
1
df3d6e6da95d2a9f1c7abeb25f2598cf
dcd1558b0a0a4b8e982b159237ba2d99
Retrieve data from remote GitHub URL.
$ch = curl_init(); $timeout = 5; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); curl_setopt($ch, CURLOPT_USERAGENT,'CodeForDeGithubReader'); $data = curl_exec($ch); if(!$data) { echo "\nbroken response: \n"; ...
1
5fcd8cc1daa8e7d6fb9554702a2e694f
b05588a5ee3fc4366d896c33a31273c4
计算差商表
{ DataTable difEntryInterfaceCompTable = new DataTable("DiffEntryInterfaceComp"); string[] columns = { "PdbID1", "InterfaceID1", "PdbID2", "InterfaceID2", "Qscore"}; difEntryInterfaceCompTable.Columns.Add(new DataColumn("PdbID1")); difEntryInterfaceCompTable.Colum...
0
eacb43988de4de83857d6150023dfd1b
57945f2d33cba9141c221335a58f4aef
Find a valid matching by greedily selecting among zero-cost matchings. This is a heuristic to jump-start the augmentation algorithm.
while True: self._maximal_matching() self._aug_paths() self._min_vertex_cover() if self.row_marked.sum() == self.col_saturated_size: break minval = np.min(self.matrix[self.row_marked][:, self.col_marked != ...
0
a8d034de6d62db08b2ac35834e28ef8a
570844f72e4cd65e2d52506eeb8ccdd7
返回<see cref="System.Double"/>数字的双曲正切
public static partial class DoubleExtension public static Double Tanh(this Double value) { return Math.Tanh(value); }
1
7086d5e8688eb5f71e9c71e0410a3fab
5fa6ca4e40f09f31be4cf96381246a6c
Builds local tangent space frames at the triangles
frames = np.tile(np.eye(3), [points.shape[0], 1, 1]) inv_frames = np.tile(np.eye(3), [points.shape[0], 1, 1]) for i in range(frames.shape[0]): [k, idx, _] = kd_tree.search_radius_vector_3d(points[i, :], config.CURVATURE_RADIUS) normal = np.mean(normals[idx, :], axis=0) ...
1
b9bd59f399037d3716fb5b16df2ab7ea
482ecd08d35546a9bd52d1b631c52818
Chooses next action based off of P-Greedy selection
if np.random.binomial(1, exploreRate): np.random.shuffle(nextActions) return nextActions[0] values = [] for a in nextActions: values.append((self.estimation(state,a),a)) values.sort(key=lambda x: x[0], reverse=True) return values[0][1]
1
207552c4518bc115a81c702d180e959d
aa6cbb42104fdcfd6adcc644cbea569e
指定 下拉選單選項
$("#"+selectId+" option").remove(); if(isNullOption){ $("#"+selectId).append($("<option></option>").attr("value", "").text("請選擇")); } for(var i=0; i<objList.length; i++){ var o=objList[i]; $("#"+selectId).append($("<option></option>").attr("value", o[value]).text(o[text])); } }
1
8f0b5d40c314c9cd5b77ad1b42e2ed46
b59d110e7686615cb0024fa4e4d9ddd8
从第@secno扇区,读取数据到dst
readsect(void *dst, unsigned int offset) { int i; int err; waitdisk(); out_byte(0x1F6, (offset >> 24) | 0xE0 & 0xEF); out_byte(0x1F2, 1); out_byte(0x1F3, offset); out_byte(0x1F4, offset >> 8); out_byte(0x1F5, offset >> 16); out_byte(0x1F7, 0x20); if (err = ide_polling(1)) { serial_printc('0' + err); } for...
1
a6d44de610a89262d97732239018dda4
88af42dcce34e62a741b037ab674d86a
Wrapper for ImportError
def dummy_fn(*args, **kwargs): raise ImportError('Package <%s> is required but not installed.' % package) return dummy_fn
1
875bb68e143f07da4d828effbaa7f4a6
87d237d11348cb4e8562f64405f0aa59
Positions the log window relative to the main window
{ RECT rc; RECT rcme; HWND hwndParent; int x, y, w, h, l; hwndParent = GetParent(hWnd); if(! hwndParent) hwndParent = GetDesktopWindow(); GetClientRect(hwndParent, &rc); if(pView) { l = pView->GetCurLine() - pView->GetTopLine(); l *= pView->GetFontHeight(); } else { l = 0; } GetWindowRect(hWnd, &...
1
92816a16bba6e1bf910e4c29d3b00544
5cbd6a020f8855666e179b069297a2bf
比特字符串转换为字节字符串
namespace App.Wechats.Utils internal static partial class Convertor public static byte[] ToBitBytes(this string str) { var items = Regex.Matches(str, @"([01]{8})"); byte[] bytes = new byte[items.Count]; for (int i = 0; i < items.Count; i++) bytes[i] = Conv...
1
496b743185fd22f10a5373378efe7ae8
b7a8eba2ea1af9da636689f4685084c4
获取Composer项目列表
class PackageLinkCommand extends Command protected function getRootComposer(): array { static $composer; if (! $composer) { $composerFile = base_path('composer.json'); $composerJson = $this->filesystem->get($composerFile); $composer = json_decode($composerJson, tr...
0
29d3954da8c358358f7e08b24b33a47f
2705bb0e467bdca189df889ba7d3663e
移除地图的点击事件
function removeListener(){ map.off('touchmove', callBackFn); }
0
44c405a2145973ddb0b4eab11f7a5e77
76d9c7bb755e7d7f89b44cc3ca21cae2
获取当前人未消除的纸团数量
public class HorseManager public int getClearCDYuanBaoNum(){ Q_globalBean global = ManagerPool.dataManager.q_globalContainer.getMap().get(78); return global.getQ_int_value(); }
0
385c439f7fbc98a91990531d3bcf90e5
78175dd4c69532fe13c96fa96bb39d08
Register that shutdown has begun
void registryDidShutdown();
0
e71c9fe0b8902ffd24d7a5021c65c1f0
5fd2c577e6d8fab83d103e9202c1ced4
Obtains the amount of green in the color. Ranges between 0.0 and 1.0
namespace Sandy.ColorStandard public static class RgbaColorExtensions public static double GetGreenPercent(this RgbaColor color) => RgbaColorBuilder.GetGreenPercent(color);
1
084aca35846b3b74962245be66cc8178
86c060a228b02b285242ae41826af69c
分页查询lookupType 数据
if (page == 0) { page = 1; } if (rows == 0) { rows = 20; } try { Page resultPage = loGTTYPEService.findByLoGTTYPE(loGTTYPE, page, rows); this.writeEasyUiData(resultPage); } catch (Exception e) { e.printStackTrace(); logger.error("", e); this.writeJSONMsg(e.getMessage()); } return NO...
1
0a02cbe73dc6c9cd5c93bed7bcf7d653
e25c02ea82271b9bddd6cd8e3f99dc90
Tests that an exception is thrown when given an invalid country code.
class PostalCodeValidatorTests(unittest.TestCase): def test_load_country_invalid_iso_code(self): validator = postal_code_validator.PostalCodeValidator() self.assertRaises(postal_code_validator.InvalidISO2DCountryCodeError, validator.load_country, "GBX"...
1
20f4886e09e43806493b51c0e94c9b9b
7ebc9329cf2a0528a4e7dc9da5c213f0
-------------------------------------------------------------------------------------- Play initial track after delay --------------------------------------------------------------------------------------
{ if( pooledTrackObjects.Count > 0 ) { int lastPooledTrackIdx = pooledTrackObjects.Count - 1; TrackObject objToUse = pooledTrackObjects[lastPooledTrackIdx]; pooledTrackObjects.RemoveAt( lastPooledTrackIdx ); trackInstance.SetTrackObject( objToUse ); } else { CreateNewTrackObject( trackInstance...
0
45fb9aae87bd89ef2b2a9af07fc4f665
5f8843f734f061e42bac0b3b0a16f8c3
Sends user initiated update to a document's name. Sends update to server and refreshes page contents following completion.
if (this.validator.get('inputValidate').errors) { this.errorMessage = getErrorMessage( this.validator.get('inputValidate'), this.input.inputName); return; } this.errorMessage = null; this.submitted = true; const jsonPayload = {}; jsonPayload[this.input.inputName] = this.inputValue...
1
32929288b9b8aa6daacf7c66496986e0
79137ff7654537ac98afbd715176652d
Updates the sanston settings.
{ scintilla.WhitespaceSize = Settings.EditorWhiteSpaceSize; scintilla.UseTabs = Settings.EditorUseTabs; scintilla.TabDrawMode = (TabDrawMode) Settings.EditorTabSymbol; scintilla.IndentationGuides = Settings.EditorIndentGuideOn ? IndentView.Real : IndentView.None; }
0
3efd7cba280c828066190b16934cf52d
5cd8c9f9a72c23c5f7438710000bd1df
Builds a data structure to hold the nodes which anchor the values of any `NodeStatus.FIXED_GRADIENT` nodes in the grid, i.e., those at the other ends of the `LinkStatus.FIXED`. An AssertionError will be raised if for some reason a `NodeStatus.FIXED_GRADIENT` node exists which has neither a `NodeStatus.FIXED_GRADIENT` n...
class ModelGrid( GraphFields, EventLayersMixIn, MaterialLayersMixIn, ModelGridPlotterMixIn ): def fixed_gradient_boundary_node_fixed_link(self): try: return self._fixed_gradient_boundary_node_links except AttributeError: self._create_fixed_gradient_boundary_node_links() ...
1
be601ee960ec537377236bd3cdaf541c
4e9160208d738ff7e9fb0da28e15a8d5
whether user should do intent affirm in this turn
class TurnLeftPermanentIntentHandler(AbstractRequestHandler): def can_handle(self, handler_input): return ask_utils.is_intent_name("TurnLeftPermanentIntent")(handler_input)
0
27f79f738785e0c6436f74362715508d
f4d81edee06e0ed06666151f87d1d5e7
ID指定でカテゴリにアタッチされているAISAC数を取得
{ CriAtomExAisacInfo AisacInfoBasic; IsSuccess = criAtomExCategory_GetAttachedAisacInfoById( static_cast<CriAtomExCategoryId>(CategoryId), static_cast<CriSint32>(AisacAttachedIndex), &AisacInfoBasic) != 0; if (IsSuccess) { ConvertAisacInfo(AisacInfoBasic, AisacInfo); } }
0
658b1e7ada282812ff9263ff5b869259
831cf7cc3afc6f5dc5766f9398a1f035
该方法用于检测 WCF 服务是否正常,并且用于返回服务器端时间
namespace WebSite [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [ToolboxItem(false)] public class WebService1 : WebService [WebMethod] public DateTime GetServerTime() { return DateTime.Now; }
1
5f43cce7d5d3111e4099dbcbbf2a6767
c580c370ae98778b3f14d40feb04f28f
Combines feature extractor and classification head into one model and compiles it
features = self.feature_extractor(x) features = self.flatten(features) y_classification = self.classification_head(features) if train: y_rotation = self.rotation_head(features) return y_classification, y_rotation else: return y_classifica...
0
d50427c8370742cd3b0883a8b351a249
29a5699045f22e9aee96e8e77719b904
Gets the version number of the FbxExporters plugin from the readme.
with open('pdftools/__init__.py', 'r') as f: content = f.read() version_match = _version_re.search(content) version = str(ast.literal_eval(version_match.group(1))) return version
0
fefdae6f3d4ec523c92571f51a042b43
fa4da050882df75adaec6477ef6c9694
function to validate services page text
class TestServer public static function test_if_server_working($page){ $errors = ['sorry', 'not found', 'has not been found', 'has been blocked', 'deleted', 'not available']; foreach ($errors as $error) { if (preg_match('!.' . $error . '!i', $page)) { return false; ...
1
67b8a7ea2b089370d0e642196caa0e69
aa5ab6b8e0617abbab5db8673708fa06
Sends broadcast to ask for current location from sensor service.//
Message m = new Message(); Bundle b = new Bundle(); b.putSerializable("location", location); m.setData(b); localHandler.sendMessage(m); }
0
177ff143b1bc49281944f1c07a7a61e2
ba1664c075ca99b9ea000771c0ae0f77
指定日付に表示リンクを設定
$archive_year = get_the_time( 'Y' ); $archive_month = get_the_time( 'm' ); $archive_day = get_the_time( 'd' ); echo get_day_link( $archive_year, $archive_month, $archive_day); }
1
459294feeed811729b383790f1fbf67d
97f40ecdc3fc044c6d33f74383fd17ac
the open map that has current (or most recent) focus
class Joystick getCurrentMap() { return this._keyMap }
0
79f2df944a47581b0231861a9799ec75
955a86f29de247c5066bf8eaf078f293
Returns multiple cached values, and then removes them from cache.
final class Session public static function pullMany(array $keys, array $defaults = []): array { return SessionManager::get()->pullMany($keys, $defaults); }
1
9f9c454ed43619a45bc2ed4b4a3484e4
7c0b63ce5dae7f088540ae268836dfb3
进程调度,将进程从就绪态恢复到运行态
{ int rd; int num=0; link p=ready; if(ready==NULL) return; while(p) { num++; p=p->next; } printf("*就绪进程个数为:%d",num); time_t t; srand((unsigned) time(&t)); rd=rand()%num; if(rd==1){ p=ready; ready=ready->next; ready->next=p; ...
1
5cc5c35628d7154a50677060ca41aebb
8fcb779f511d98cfa0d6f2263b8c65da
Actions to perform if this flow was entered from the startup flow.
namespace WixWPF public partial class BaseBAWindow : Window public virtual void OnStartup(WPFBootstrapperEventArgs<Wix.StartupEventArgs> args) { }
1
446bab007a5f823530d5921e133d62ac
2f1627c9190161584440118f5fe56934
From a java entity creates the associated entity into the database.
T makePersistent(T aEntity);
1
27ed6f5eeea6f72939b52e0e5c1d188f
52416f75607f84230af7f3829655ad0b
Finds and returns the submissions which have the conflicting feedback with the passed feedback
class SubmissionViewerComponent extends SubmissionsManager function get_feedback_trackers() { $condition = new EqualityCondition( new PropertyConditionVariable(SubmissionFeedback::class_name(), SubmissionFeedback::PROPERTY_SUBMISSION_ID), new StaticConditionVariable(Request::get(sel...
0
491b8230ea755097529aa62eb9437cb0
7469c783e874a32492affe209849b258
去除字符串中的空隔
function string_trimAll(str){ var strArr = str.split(' '); return strArr.join(''); }
1
8ff46aff0434d0c3ef94141839dbeac6
54f8f2f4fbdbe9cd31302a5ec777bb0d
Does a single scan for batches on any instance.
class PolyswarmAPI(object): def scan_data(self, data): return self.loop.run_until_complete(self.ps_api.scan_data(data))
0
6d3814d0c07276b31a396f392f8ec51a
485c5cd4a3a7c0d03c25587e3f65d76b
Test deleting a book that does not exist.
class BookTestCases(AuthTestCase): def test_delete_book(self): self.login() self.client.post('/api/v1/books', json=self.payload, headers=self.headers) response = self.client.delete('/api/v1/books/9780394800165', headers=self.headers) self.assertEqual(204, response.status_code)
0
bb09aeff13dbe58b96c052ecaac86dda
fa18e8c32c98e1eebdb2a3fd93282a33
Generate query to create temporary table for unregressed values.
QueryTable sourceContentTempQueryTable) { QueryTable sourceContentQueryTable = ExecueBeanManagementUtil.prepareQueryTable(EXISTING_TABLE_NAME, null, sourceContentTempQueryTable.getOwner()); return getQueryGenerationUtilService(providerType).createTableUsingExistingTableWithoutData...
0
e8c77cc1834fa0e6792f1c7cc3fc1f4d
990db2fedceb94885de1cdec31f7533e
Печатает путь по названию файла / по путю к нему
namespace StructuralPatterns.Composite public class File : FileSystemElement public override void Print(string upperPath) { Console.WriteLine($"{upperPath}/{this}"); }
1
37bf4cfff421656db4aef8c4cf469718
082798aad3fa82cffc40c3b4a0162f73
True if has "dateTime" element
namespace Amazon.SageMakerGeospatial.Model public partial class ItemSource internal bool IsSetDateTime() { return this._dateTime.HasValue; }
1
9c6e8f058de0a5abe62487a860117dde
2a5a0c9de8bf9d5684d61b05634a3bfe
Extract gait parameter measurements from the raw Zeno data.
def yield_parameters() -> Iterator[Dict[str, Any]]: tuples_stance = df_stance.itertuples(index=False) for stance_a_i, stance_b, stance_a_f in sw.generate_window(tuples_stance, n=3): sides = ''.join([stance_a_i.side, stance_b.side, stance_a_f.side]) if sides in ('LRL', 'RLR'):...
1
f746058f5510407d18d67b023f2a0afb
209740a8591043d58e9a8333d8e880c8
simple solution 首先排序,然后比较相邻两个元素,如果不等,就返回
pre = [] cur = nums while cur != pre: pre = cur.copy() for i in range(len(cur)-1): if cur[i] > cur[i+1]: cur[i], cur[i+1] = cur[i+1], cur[i] return cur
0
a1ab57219e72464b644f49241873cd2f
5abd8dc7cd5a4179973c3ae152292f0b
Function used to add together large numbers
function bigNumberAdd(a,b){ var res = ""; var carry; a = a.split(""); b = b.split(""); while(a.length || b.length || carry){ carry += a.pop() + b.pop(); res += carry % 10; carry = carry > 9; } return res; }
1
ab3f9264f6b9db37eaf7eaba9507683d
e1b07768b719298f7733f4abef059336
Funcion para poner en comillas los datos guardados en bd
class queries{ function prepararDatos($dato){ $res = $this->mysqli->real_escape_string($dato); return $res; }
0
5a77ded0febd28f3304828d9aea8627d
27df9e4ca87fdd5370af663e439f8f8a
An endpoint to start a new instance of the workflow
namespace VmosoApiClient.Api System.Threading.Tasks.Task<StartWorkflowResult> StartWorkflowAsync (StartWorkflowInput input);
1
fee9dc26eb61afc90150c6c725a89044
99b7de291d5a951e47833fc8e96cc81b
The Zone to start the instance in. It is ignored and will be computed when set `vswitch_id`.
class LoadBalancerZoneMapping(dict): def vswitch_id(self) -> str: return pulumi.get(self, "vswitch_id")
0
cc184ea9da6cbc1921caf01396dda0a2
363bad3fd108d58ecf22aaaaa94853b5
Return a SetCookie instance corresponding to the specified preferences
class SetPreferences(SeleniumCommand): #@IgnorePep8 def __init__(self, prefs=None, *args, **kwargs): super(SetPreferences, self).__init__(*args, **kwargs) self.prefs = prefs
0
9572b1cfb11302ef8c62402cc8777a25
a8fb6038b3821f12208e4fc5ee1c7bcd
Get other artists related to an artist.
def get_related_artists(): nodes, edges = spotify_api.get_related_artists(session["access_token"], session["user_id"]) return jsonify(nodes=nodes, edges=edges)
1
abaf59ba97629a5f9db7a22f675d70bb
40e793e61faa589c288e37d747070914
返回下一个工序完成或者是状态转换完成的时间
class Process: def next_time (self): return self.access[1][self.access_it]
1
d528015e95a0793146f310c2cc21f4d1
caffa8bfd3d8bfae10747a51ec52ebcc
удаление элемента по его содержимому
cell *ptr = L->head->next; cell *prev = L->head; while(ptr !=NULL){ if(ptr->element == element){ prev->next = ptr->next; }else{ prev=ptr; } ptr = ptr->next; } }
1
d15feac26ce047300ff5f89408635db3
10ef057fb5a8b894c46582fce9e87a70
первый поиск в глубину
public class Path private void deepFirstSearch(int node ){ visited[node] = true; for( int i : G.adjacentNode(node) ) if( !visited[i] ){ from[i] = node; deepFirstSearch(i); } }
1
5ad4814ceb74e9fe8639ce83d62ad429
330c5a2d9c8d85efa2948106f70ce888
Find any pairs that can be easily linked together (as they have the same value for some fairly unique property)
def makePairs(graphDict): original = [val for val in range(len(graphDict))] paired, unpaired = [], [] while len(original): for node in original: if len(graphDict[node]['edges']) == 0: unpaired.append(node) original = [element for element in original if element not...
0
50acc03cc60bd60348d783e5ac67c065
a12a5d23c87c5ebcf2c0e4c82722a360
empty the tasks queue
static void Taskqueue_clear(Taskqueue* taskqueue_p){ while(taskqueue_p->len){ free(Taskqueue_pull(taskqueue_p)); } taskqueue_p->front = NULL; taskqueue_p->end = NULL; taskqueue_p->len = 0; }
1
25220ad7f45a971ff0149c34fb54926b
3483930854dba43cf25372a10023c73a
取得Styles物理路径
function get_style_path() { global $zxsys; return site_url("style/".$zxsys->get_setting("site_style")."/"); }
0
29248e1721b33dec27f0e01fcb0753ec
99221fc38949dfb2353bf37789063939
only allow renaming if the user modified the currently selected item text (which presupposes that we do have a current item)
class ScriptTree(basetree.BaseTree, object): def _on_rename_current_item(self): self.rename_current_item()
0
47a768d62c0957a062e278ed2edb2ee4
9ddecb81d9ceb02c5cbe9847f05f6f53
Framework level channel create callback.
interface IConnectManager fun channelCreated()
1
313aebda0de9815cfed4ca90c4b069b3
22b6ffab88e11b34c3d29e8d4faa8771
更新电量的背景图片
{ if (charge_state.is_charging) { bitmap_layer_set_bitmap(s_powerIconLayer, s_batChargeIconBmp); } else { if (charge_state.charge_percent >= 90) { bitmap_layer_set_bitmap(s_powerIconLayer, s_bat100IconBmp); } else if (charge_state.charge_percent >= 70) { bitmap_layer_set_bitmap(s_powerIc...
1
f11e22d8d06aba7e608c8b8c5a93ccfa
6b713ddba32c64cbdcace7b690f7b5d7
ueberprueft ob sich zwei spieler auf dem selben laengen und breitengrad befinden, wenn ja wird eine "melodie" gespielt
function checkFlyOut(body1, body2){ if((body1 == bikegame.bike && body2 == bikegame.gameFlyOutWall) || (body1 == bikegame.gameFlyOutWall && body2 == bikegame.bike)) { restartGame(bikegame.currentLevel); } }
0
9ca2fb99101148fc1f9de9588df26c70
bff8623ee7a9db3f2dd5bb6fbcc47626
Instead of executing the command directly, the call is wrapped into an async callback. This results in a "code split": GWT will lazy-load the javascript required to show the editor. Thus, the initial page download is smaller and faster. See https://developers.google.com/web- toolkit/doc/latest/DevGuideCodeSplitting?
public class UserListPanel extends ToolPanelBase private void loadPart1Async() { GwtClientHelper.deferCommand(new ScheduledCommand() { @Override public void execute() { loadPart1Now(); } }); }
1
8f131c870ea9ee37680ad00f88e5a879
011c175317acb76d10c2f178cccc44c7
觀測誤差曲線
DATA = np.array([ [1, 2, 3, 2, 1, 2, 3, 4, 2, 3, 2, 1, 2, 3, 4, 4, 3, 2, 3, 2, 3, 2, 1], [5, 6, 5, 4, 5, 6, 7, 7, 6, 7, 7, 2, 8, 7, 6, 5, 5, 6, 7, 7, 7, 6, 5], [9, 8, 7, 8, 8, 7, 4, 6, 6, 5, 4, 3, 2, 2, 2, 3, 3, 4, 5, 5, 5, 6, 1], [3, 2, 3, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 6, 6...
1