query_id
string
corpus_id
string
query
string
code
string
label
int64
78ac159bb132d4ec1e29e8f644ec3a29
ee9b398c1a67dc5f6b5a5fc133eb74fc
添加编辑使用单位基础设置关联维护公司
@Service("unitcommonlyService") public class SimpleUnitcommonlyService extends GenericEntityService<UnitcommonlyEntity,String>implements UnitcommonlyService{ @Override @UseDataSource("write_ds") public String setCommonlyUnit(String userid,String dwbh,String option) { QueryParamEntity qEntity = ...
1
3defcc0095c884ff3e305a3d314e2b30
1b298bab6fd4c0c05752a1f1745f016d
Request an IAM token using an API key. Also updates internal managed IAM token information.
self.request_payload['cr_token'] = self.retrieve_cr_token() if self.iam_profile_id: self.request_payload['profile_id'] = self.iam_profile_id if self.iam_profile_name: self.request_payload['profile_name'] = self.iam_profile_name return super().request_token()
0
bb2560dd06b819e221bc5b1160dd0254
f4ecb761eaaaf93ad928c9be44bc241d
Initialize the ProgressRunnable. Don't forget to call ProgressRunnable.__init__(self) when you override. It is possible to pass a QProgressDialog as parameter (equivalent to call setProgressDialog() after instantiation.
widgets = ['', progressbar.Percentage(), ' ', progressbar.Bar(), ' ', progressbar.ETA()] self.bar = progressbar.ProgressBar(widgets=widgets) self.tick = 0 self.maxval = 0
0
f07fb3c955d04977ec3151f84a99352c
264565e7d5f6cec076c50ea9c74b9620
Log a formatted table. All keyword arguments are passed to :py:meth:`format_table` call which does the actual formatting.
class AzureMlLogger(LightningLoggerBase): def log_table(self, name: str, value: dict, description: str = ""): self.experiment.log_table(name, value, description)
0
c5199ef4f626ae1755662dafd4cd8343
bdd99caec6cf8455a7ad0db982f45977
Predicting the flower type for a file of records This is using docstrings for specifications.
clf = tree.DecisionTreeClassifier() clf_fit = clf.fit(train_data[0::, 1::], train_data[0::, 0]) output = clf_fit.predict(test_data[0::, 0::]) export_results(output, result_file)
0
1c04a9ebda95c2ecec4b9d5cae421d08
951880f7862997c8da835efd8d4da2a4
设置水草灯或海水灯的各种颜色通道系列
{ hslCurve1.SetLeftCurve("冷水流量Qc", null, Color.Red); hslCurve1.SetLeftCurve("热水流量Qh", null, Color.Orange); hslCurve1.SetLeftCurve("出水流量Qm", null, Color.Yellow); hslCurve1.SetLeftCurve("冷水温度Tc", null, Color.Green); hslCurve1.SetLeftCurve("热水温度Th", null,...
0
f7a4a740c5b83835f4e87956d2b94c04
ccd51ef34f638a4bc56e95099aa1807b
Select a given number of paths with the lowest cost (the best paths)
String destLabel) { reset(); Node start = lookup.get(startLabel); Node dest = lookup.get(destLabel); ArrayList<Node> tempNodes = new ArrayList<Node>(); ArrayList<Node> visited = new ArrayList<Node>(); for (int i = 0; i < nodes.size(); i++) { tempNodes.add(nodes.get(i)); if (tempNodes.get(i) == star...
0
81068ae19465f1664c5c007e28e1f06c
a93186d2006046dc95e1a37873124d05
Write data to row, col of worksheet (ws) using the style information. Again, I'm wrapping this because you'll have to do it if you create large amounts of formatted entries in your spreadsheet (else Excel, but probably not OOo will crash).
ws = wb[sheet_name] cell = '{}{}'.format(col_letter, rownum) arcpy.AddMessage("About to Make Image File from {}".format(img_file)) img_obj = Image(img_file) ws.add_image(img_obj, cell)
0
28333306a03ee5cb6d5139e8d4b9405c
feae7d7851d36c752cf46af185729082
gives an amount of cols based on the board size
class Game: def cols(self): return len(self._board[0])
1
f5e4166e32e648ee27a893480c44212c
c0e938338bb8200541776e23325cffff
Clear the graph. Executed before each test.
class BiaffineDigraphNetworkTest(tf.test.TestCase): def setUp(self): tf.reset_default_graph()
1
f348fcd3b7a7756989e42dd032eedf88
952105f32f98743210689ad57033b513
根据流程实例ID查询工作项信息
{ IDictionary<string, object> parameters = new Dictionary<string, object>(); parameters.SafeAdd("ActivityInstID", activityInstID); return repository.FindAll<WorkItem>(parameters); }
1
cf6b37e5d20938d7280889d995a7cea9
c5f1fdb22baad864a7f93eefea87934f
Function to check whether test case can be executed or not.
public class TestUtil public static boolean getRunmode(String testName, String testSuite, Xls_Reader xls){ for(int rNum = 2; rNum<=xls.getRowCount(testSuite);rNum++){ String testCaseName = xls.getCellData(testSuite, "TCID", rNum); if(testCaseName.equalsIgnoreCase(testName)){ if(xls.getCellData(testSuite, "R...
1
5a8a240eaff9ba8f2f9701df77f02e6d
c36bed791895c9179d078251be6c9ef3
Fonction qui remplit le contenu d'un e-mail avec le lien pour rénitialiser le password à l'intérieur
$link = "http://blogmvc.test/security/recoverpass/$token"; $subject = "Bonjour, $pseudo, vous avez demandé une récupération de mot de passe"; $message = "Pour récupérer votre mot de passe, veuillez vous rendre sur ce lien : <a href='$link'>Lien</a>"; mail($mail, $subject, $message); ...
1
5480b583da1a84cac0db045da631bb4f
c199f58849e0cc8bbca2c2d9382e5ba8
Start the bottle server.
run() { this._initializeServer(); this._startServer(); this._printBanner(); return Promise.resolve(); }
1
5d7f782daf54459e68e05eda27dfdac9
a2f323beb1cb3b811c7482066ab04e30
Read an array of the derived ServerProc buffer instances identified by the duplicate key TenantIdx.
CFFBPflFBPflBuff[] readBuffByTenantIdx( CFSecAuthorization Authorization, long TenantId );
1
996b3cc5493eac094c6245a9ec372f2a
6ab38724d5937329c757a41c9c1ffad9
获取某辅料当前存放的 库位 以及各库位分别存放了多少
{ string strSql = ""; strSql = " SELECT MAX(a.id) AS id,b.goods_id,MAX(a.id) AS d_id,c.materiel_id AS d_goods_id,d.name AS d_goods_name,MAX(b.wp_id) AS dept_id" + " FROM " + remote_db + "jo_bill_mostly a" + " INNER JOIN " + remote_db + "jo_bill_goods_detai...
0
3f49805e9815382ef8bceae672116bf6
bf1bdde63d40e648b4955b044a997500
testing if the backward slashes are converted to forward slashes in the windows_path attribute
with self.assertRaises(NotImplementedError): obj = pathlib.PosixPath if os.name == 'nt' else pathlib.WindowsPath obj('name')
0
121bc86e1fc3fd3db9d4587d003d34b2
2d8e101ed1c893fbd11908d9ba6f4a82
* @brief   指示灯状态控制 * @author   <wfb> * @param[in] <无> * @param[out] <无>
void ledControl(void) { u32 led_start_state = 0; u32 led_warning_state = 0; switch (m_current_mode) { case cm_readyuse: led_start_state = 0; break; case cm_error: led_warning_state = 1; break; case cm_pumping: led_start_...
1
a3dcbdcedaedb74f5e52a8a8a4f082c3
1870e58ff5f99fe8a2ed5e588465a4de
## Clear and make new directories
createDir <- function (newDir) { checkOldDir <- function (newDir) { name = basename (newDir) path = dirname (newDir) if (dir.exists (newDir) == T) { oldDir = sprintf ("%s/old-%s", path, name) if (dir.exists (oldDir) == T) { checkOldDir (oldDir) } file.rename (newDir, oldDir) } } checkOldDi...
1
49a05fd35991dda1e4902ed25a602144
d93e2fe954aa025340d1610078406efc
Calculate protein molecular weight.
class APConstants: def molecular_weight(self): return 117.49
0
923eb056e71fb56f15b50da6a8d747b2
dc7c83399f4bd379c4a84a0877d0db2c
Get reference of favorite handler
return new Favorite( this.id, this.clientId, this.catalog, this.handle, this.url, this.createdOn, this.title, this.description ); }
0
65264ee08f00c70ed0caeaf855eb51f4
6031f0d5014321eaa6db0bc803f5f12c
Renderiza clientes seleccionado y ganador
class ClientsController extends Controller public function index() { $clientes = Client::select( DB::raw("CONCAT(nombre,' ',apellido) AS name"),'rut','created_at') ->orderBy('created_at','DESC') ->pluck('name', 'rut'); $cli = $clientes; $causa = null; try{ ...
0
ad5c6be49131c5ff334c941b2e1a5a79
22e4e409d95720ac238b46daabe68b3d
删除共享标签 指定共享删除一个标签。当共享中不存在指定要删除的key时,接口调用将会返回404错误。 Please refer to HUAWEI cloud API Explorer for details.
class Client extends abstract_client_1.AbstractClient async DeleteTag(req, cb) { return this.request("DeleteTag", req, cb); }
1
761145d57358cd3c2a2e129ccd9307bc
8020c5965960af4806b909f94513d98e
Retrieve the class for field success
{ $sAlias = $this->getTableQueryAlias(); $oClass = new \stdClass(); $oClass->id = $this->getField($data,'id',$sAlias); $oClass->field = $this->getField($data,'field',$sAlias); return $oClass; }
0
74cb970314024bd6e479b7b5bd61602e
50bf20b37e39fed04c60e6cbe9325c7d
Rebase the y coordinate in the curve.
namespace ImageProcessing.IpSettings public class Curve public void Shift(double dy) { this.RaiseChangedEvent = false; RatioRect rect = this.Clip.RectangleNotSkewed; foreach(ImageProcessing.IpSettings.BfPoint bfPoint in this.bfPoints) { ImageProcessing.IpSettings.BfPoint aPoint = TransferSkewedToUnsk...
1
1c5bebf9ed718108f7ac6470ecc068c0
ef7d97c28dcc7809968884dc91a5cff6
Loops through each pixel of the PPM, inserting the red, green and blue values
for(int i = 0; i < npixels; i++){ unsigned char r = TIFFGetR(tiff[i]); unsigned char g = TIFFGetG(tiff[i]); unsigned char b = TIFFGetB(tiff[i]); ret_r[i] = r; ret_g[i] = g; ret_b[i] = b; } }
1
68354e73aee30bc0ceb507b3e7648b74
2bb58af79936658bfaeee9f7fa0cefeb
Computes the entropy in one child node.
double totalWeight = Utils.sum(parentDist); if (totalWeight==0) return 0; double leftWeight = Utils.sum(childDist[0]); double rightWeight = Utils.sum(childDist[1]); double parentGini = computeGini(parentDist, totalWeight); double leftGini = computeGini(childDist[0],leftWeight); double rightG...
0
2fee575e6e4f005de8512ef9c95f442e
874141902715ec085159653b72cea48e
Adds a number (N_PAD_SLICES) of zero-slices to both ends of the single-echo images along the z axis. This is for compatibility with the motion correction algorithm in the FSL.
_status("Padding the single-echo functional image with {} zero-slices on " "both ends along the z axis...".format(N_PAD_SLICES), args) if not args['single_echo']: msg = "ERROR: Single-echo functional image was not specified." _status(msg, args) raise NotFoundException(msg) ...
1
0e62aa54d6d9bb6c6a194d11276f2fca
4d236b8e818e48189e9d23730ef54807
群组功能(高级群)-修改群昵称
public class GroupSettingActivity extends BaseActivity implements GroupContract.GroupView<Object>, GroupShowRememberAdapter.RememberItemClick private void updateGroupNick() { UIDialogUtils.showGroupAnnounceDialog(this , Constant.GROUP_NAME, getString(R.string.group_name), groupNa...
1
006b7c2dd22d719528c59c2f37d53c58
787b7382378d1279b5805de649b3260b
Read goal from a file
with open(filename, 'r') as f: lines = f.readlines() joint_names = lines[0].rstrip().split(',') for name in joint_names: if 'left' == name[:-3]: self._l_goal.trajectory.joint_names.append(name) elif 'right' == name[:-3]: self._r...
1
bf3f58b07a36e9fed3e07b4523bd1cf6
2e33091a0bf1eee4e84951462af9b148
Calculates the standard deviation of the elements along the specified axes.
wrap_kwargs = merge_dicts(dict(name_or_index='std'), wrap_kwargs) if self.wrapper.grouper.is_grouped(group_by=group_by): return self.reduce(nb.std_reduce_nb, ddof, group_by=group_by, flatten=True, wrap_kwargs=wrap_kwargs) arr = self.to_2d_array() if arr.dtype != int and arr.d...
1
4307e1d8508d936792f7f2c14994df28
160ec184fc17a1afdca21c0e7d9c250c
exemple : "boucle 50" -> retourne "50
if(!ligne.substring(ligne.indexOf(" ", ligne.indexOf(" ")+1)+1, ligne.length()).matches("[0-9]+")) throw new WrongHeaderException(); return Integer.parseInt(ligne.substring(ligne.indexOf(" ", ligne.indexOf(" ")+1)+1, ligne.length())); }
1
a8e627e6c51dfc67e1767048a1eafde5
2e6df532cbbdcbd68ec944d060bd14f0
Converts a relative URL (/bar) to an absolute URL (http://www.foo.com/bar) Inspired from code available at http://nadeausoftware.com/node/79, Code distributed under OSI BSD (http://www.opensource.org/licenses/bsd-license.php)
class WMinify extends WMinifyAbstract protected function relativeUrlToAbsolute($rel, $base) { $base = dirname($base); $path = rtrim($base, '/') . '/' . ltrim($rel, '/'); $filename = str_replace('//', '/', $path); $parts = explode('/', $filename); $out = []; foreach ($...
0
fc3d017b07c8ee648a47e5e3c0528925
075a7598b604eed1923f5b69f06bad5b
Renders the OBST image locally using RPC.
def render(): if request.is_xhr and request.method == 'POST': filename = request.form['filename'] generate_pic(filename) return get_path('oil_' + filename) return go_home()
0
d1ac2e4b64a096be7e3881f008d77db6
7b16d9102a5d7631816c795e356c1a64
Pinta la lista de compañias en la home
{ $tblEntidads=DB::table('tbl_empresas as em') ->selectraw('nombre,direccion,telefono,nombre_contacto,correo,celular,face,insta,web,condiciones,tipo_cambio,rfc') ->get(); $tblEmpresas=$tblEntidads[0]; return view('home',compact('tblEmpresa...
0
e0561b5c0336280ca0de46ec04e9ca3a
cac031b8e82b31096af5ba0f865c76d4
猜测语言
function infer(request, callback){ var text = request.content; var xmlhttp; if (window.XMLHttpRequest){ xmlhttp=new XMLHttpRequest(); }else{ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function(){ if (xmlhttp.readyState==4 && xmlhttp.status==200){ var res = xmlhttp.r...
0
82600d8b9a66401da0a482dd2d37c221
aa23f83a8c69b08ac5b0d4e5058a2e76
<p> 通过国家id属性查找所有城市的集合 </p>
String getCitiesByCountry(String countryName) throws ServiceException;
0
255e2ce50cd3d79222a214bdb14c9437
93e21f63bf8d2944c54afc80df7583bd
Specialised pagination. It retrieves all results from the search engine in chunks, loads them in memory then paginates on the database results.
results = [] start_dt = datetime.datetime.now() entities, cursor, more = query.fetch_page(limit) while more: results.extend(entities) entities, cursor, more = query.fetch_page(limit, start_cursor=cursor) print( len(results), 'entities at', date...
1
9646652a60e6f709956a9a36c16520fb
5322bf5bf06b2bfd875030fbecfa50b3
Método para ativar e desativar usuarios se o o usuário da requisição for um Administrador. Se o usuário enviado estiver Ativo ele será desativado. Se estiver inativo será ativado.
@PreAuthorize("hasAuthority('admin')") public ResponseEntity<?> changeActiv(@RequestParam Long id, @RequestParam Integer activ){ return usersService.changeActivation(id, activ); }
1
2840a75e29fda914e1383a2af7e0424c
95aa87d44600f45cd1632ab54cd8ee66
This checks whether the installer should be called, it stops people trying to call the installer when the application is already installed
class Mage_Install_WizardController extends Mage_Install_Controller_Action protected function _checkIfInstalled() { if ($this->_getInstaller()->isApplicationInstalled()) { $this->getResponse()->setRedirect(Mage::getBaseUrl())->sendResponse(); exit; } return true; ...
1
92b36892f9bfb758a2b9e7cc629d81b9
63fca9381ae8fa83574b530bb9b7a1dd
al clic del bottone "gioca ancora" viene resettato tutto alla situazione iniziale
nomeText->setText(""); descrText->setText(""); dannoSpin->setValue(0); bfCombo->setCurrentIndex(0); costoSpin->setValue(0); tempoSpin->setValue(0); vitaSpin->setValue(0); tipodannoCombo->setCurrentIndex(0); bersagliCombo->setCurrentIndex(0); spazioSpin->setValue(0); velocitaS...
1
8aaf013f30d1e8e3c2723c5ed63c3366
a4f1e691adfba52db8330b2f65f4af08
Keeps the parameters for BIT(1). Transforms TINYINT(1) into BOOLEAN (alias) For the other type strings, performs the standard pre-processing.
def preprocess_params(params): processed = dict(params) for k, v in processed.iteritems(): if isinstance(v, bool): processed[k] = str(int(v)) return processed
0
308be410bcc208ee5102779bfbacab87
52606de06d9b90699864ca7a767a60c7
Method that logs a message, in which the message can be formatted like printf accepts.
public class CGUIConsole : MonoBehaviour public class LogHandler : ILogHandler public void LogFormat(LogType logType, UnityEngine.Object context, string format, params object[] args) { string message = string.Format(format, args); _Log(logType, message); }
1
20e94ef9b9985f9677f46aadd3affacc
e34016730fa5460d2d2826c9bdb73f17
Initialize the LEDDB query manager. It defined the main query options (the queriable tabs) and the selection options which can add query conditions to the main tables queries (and those are related to a secondary table)
class TableContentQueryModel(QtSql.QSqlQueryModel): def __init__(self, db): super(TableContentQueryModel, self).__init__()
0
fcaf1a2e6ba7c737b5ed2aa6b449a7e0
132aa6f7f84b1fff20bc6c2e1b2edcfd
special case: properties can actually have the same name as a composite type
{ if (whoIsAsking is Property && reservedName is CompositeType) { return true; } if (whoIsAsking is Parameter && reservedName is Method) { return true; } return false; }
1
ba418f28eb645dbed10d964b3ec62211
47d778a1ccdfdcd8cc2e6f6167abbccb
默认请求昨天的热力图点
def data_day(): max_id = db.session.query(func.max(Greenhouse_data_day.id)).all()[0][0] before_id = max_id - 24 time_=[] temperature=[] humidity=[] lux=[] co2=[] while before_id != max_id: before_id = before_id + 1 day_date = Greenhouse_data_day.query.filter(Greenh...
0
35221461dff3ba2f12df9b78390e8da2
8bf9733687f79e89aa89451c60e26c56
displays the appropriate icons in their slots given three random numbers
if($(".icon").attr("status")=="icon_active") { var rand=[-1,-1,-1,-1,-1]; for(var count=0;count<5;count++) { (function(j) { var temp=0; do{ temp=Math.floor(Math.random() * 5); } while(ishad(temp,rand)); ...
0
82dd4b45a2936ef05fc5180073194c8f
ca47c6b64a3d97e56c53255e0f7b7dfc
convert vector to FMOD_Vector
{ S_VECTOR3 outInit; outInit.x = x; outInit.y = y; outInit.z = z; return outInit; }
0
92dc8a86f3df1c34db73decc6e6b0ff6
351816b723f35b547718114aa4829a69
Rewind cpuset list to beginning
PBXRESULT List::Rewind(PBCallInfo *ci) { PBXRESULT pbxr = PBX_OK; m_cursor = m_list.begin(); return pbxr; }
1
b70e36e6dcb25575b4f78a8bdee9dd6e
49b82a647542a8d1c0e447d4b929683d
u"""targetのコストを消費する。
if target not in self._target2position: raise SelfException('not found target:%s' % target) for _position in self._target2position.get(target): del self._position2target[_position] del self._target2position[target] self._target_count -= 1 return self
0
f321b98b7346e694f33caa07e4a11e5b
450bb9a255cb95124d6e581e7ee7f03a
Excludes any questions that aren't published yet and excludes questions that have no answers
class ResultsView(generic.DetailView): def get_queryset(self) -> 'QuerySet[Question]': return Question.objects.filter(pub_date__lte=timezone.now())
0
0b4efba712f45d2288d021cd4754e6e3
b31f66fd93509d326ec78923bd36f073
更新lesson顺序
this.oldLessons = new ArrayList<Lesson>(schedule.getNLessons()) ; if (schedule.getNLessons() == 0) { return ; } Iterator<Lesson> iterator = schedule.iterator() ; this.oldLessons.add(iterator.next()) ; while (iterator.hasNext()) { Lesson lesson = iterator.next() ; int insertPosition = this.oldLesson...
1
9c7b02ede8f55f5dceb8f3b15864f780
07a5010a9f0c0aa65dffd88641ba2125
Returns number of rooms in hotel
int AdjacencyMatrix::getNumRooms() { return _numRooms; }
1
60eb18618f046c3368d1aac533ea98d4
f146456501eabfc8eff426d08bc6e845
Stop the worker thread and empty the queue.
self._stopswitch.set() for process in self._workers: process.join(10.0) for i_worker, process in enumerate(self._workers): if process.is_alive(): msg = f"Terminating thread {i_worker}..." self.logger.warn(msg) process.termin...
1
f82efed0c26d1323143211fb51f0e173
b44eea2dab1dce7dbdb7748d2f93f724
Get multiple samples from one category and multiple starting letters
def samples(category, start_letters='ABC'): for start_letter in start_letters: print(sample(category, start_letter))
1
d7a9c51bc10539f658979aae2f87c371
5315899a10dcd21c55a197f3ff6ce6c3
Just returns all header values.
class HeaderBag implements \IteratorAggregate, \Countable public function all() { return $this->headers; }
1
15c9db03bebc59cde539121b003f3421
bb0147741bad4ff7488a53333e547a6b
扁平数组转为嵌套数组
{ $newArray = []; foreach ($array as $key => $value) { $i = 0; foreach ($value as $key2 => $val) { if (!isset($newArray[$i])) { $newArray[$i] = []; } $newArray[$i][$key] = $val; ++$i; } } return $newArray; }
0
4ddb4b92d87973bd0fc314979deba833
67e9f59ce9d75f5a95da82712f7b6ef6
CONFIDENTIALITY
impl PacketKey pub fn confidentiality_limit(&self) -> u64 { self.suite.confidentiality_limit }
1
fb11311beeffe78cd9275d26834a7622
4d033961c072d37706ba801f34e8447d
One function to handle the incoming data. Our primary mechanism is to pass json. So, it made sense to decode the input in one spot. This code will check to see if the input is a string that starts with { and ends with } or [ and ] and will decode the json if true.
void Data::check_json(String aux){ int initial_pos, final_pos; initial_pos = aux.indexOf('{'); final_pos = aux.lastIndexOf('}'); if ((initial_pos != -1) && (final_pos != -1)){ jsonstring = aux.substring(initial_pos, final_pos+1); } else{ initial_pos = aux.indexOf('['); final_pos = aux.las...
1
2e2d7199e7441b9114b616d3f9306df2
d0e80ef93ad453efbf4a37f48f26cfea
接收朋友的共享书籍列表
{ var query = new QueryExpression { EntityType = typeof(BookInfo) }; query.Selects.Add(BookInfo_.ALL); query.Wheres.Add(BookInfo_.IsShare.TEqual(true)); query.Wheres.Add(BookInfo_.ShareUserId.TEqual(userId)); query.OrderBys.Add(BookInfo_.UpdateTime.Des...
1
058a99696451b8c65702e958104b4619
09fb0eed00476e1b068d4ffaa4510142
功能:获取session当前的状态 参数: void 返回:返回当前session状态的int值
function getStatus(){ global $jbArr; return $_SESSION['jb_dum_status']; }
1
d4df3b1423a3c4da5506d5e32c6a1b61
a7fc04178177a7375ec207e97e67a04a
验证IP是否合法,支持v4和v6
public class ValidateUtils public static boolean IP4(String value) { return match(V_IP4, value); }
0
3dcb98a39be55375c50699a82b016dd3
561d5a0dd4bbe08e00db0f7959ca5fde
## Returns a network by its position in the list.
node <- function(x)UseMethod(generic = "node", object = x)
0
eb770122c317cdfcb0ab9101efc884b8
a48f03b92cf2a3180dd330d32bb5f078
Metoda do zrezygnowania z oczekiwania na drugiego gracza
namespace ex1 class Game public bool WaitToAnotherPlayer() { while (this.playerTwo==null) { } return true; }
0
0938428911e221ebdd6ad510f3e54a46
033a3d03551449c7168f62fab6bf4102
Teste la sécurité sur les web services utilisateurs
System.out.println("auth 1"); String urlParameters = Utils.usagerNomParam+"=" + URLEncoder.encode(username, "UTF-8") + "&"+Utils.usagerPasswordParam+"=" + URLEncoder.encode(password, "UTF-8"); System.out.println("urlParam:" + urlParameters); String targetURL = Utils.serverURLNoPort + Utils.tcpPort + Utils.au...
1
6db221cc27769b72ea40898c63e47d63
ed4c48a0a51f19586994be3c9042745d
Adds newly created objects to the main vector and destroys all gameobject with destroy flag = true
{ for (int i = 0; i < heldObjects.Length; i++) { Vector3 heldSlotPos = heldObjects[i].transform.position; GameObject objectInstantiated = Instantiate(objectsDataRef.objectGameObjects_Held[0], heldSlotPos, Quaternion.identity, transform); Destroy(heldObjects[i]); ...
0
b9dd180e5c90ec19085f451b858da2f2
2fee5a99d3c820e9830ec99f1e447bcc
Migrate the model from one form to another
let formModel = this.mlModelForm.value; this.mlModel.name = formModel.name as string; this.mlModel.bigquery_dataset = formModel.bigQueryDataset as BigQueryDataset; this.mlModel.type = formModel.type as Type; this.mlModel.unique_id = formModel.uniqueId as UniqueId; this.mlModel.uses_first_party_d...
1
8d07eca053ab24f866e5b60e615dc4a6
fb72928a10e52e47898603e5ba93ec91
지도 화면을 설정하는 함수. config에 저장된 프리셋으로 mapmaker의 설정을 변경한다.
Log.v(FUNCTION, "setUpMap - Applying map settings."); googleMap.setOnMapClickListener(this); googleMap.setOnMapLongClickListener(this); googleMap.moveCamera(CameraUpdateFactory.newLatLng(COIMBRA)); googleMap.animateCamera(CameraUpdateFactory.zoomTo(10)); String compassKey...
1
52f1d8f1fe90c470a1bc2614beca643a
52488aeaaad0d76f9a43f3ec309333d2
判断源字符串中是否包含指定字符串,允许忽略大小写,注意:Linq To EF中不可用
namespace Kal.Core.Helpers public static class StringHelper public static bool Contains(string value, string contains) { return StringHelper.Contains(value, contains, StringComparison.InvariantCultureIgnoreCase); }
1
b2b6a33765d2248897004e1905abf3c1
dd2c96c227cb8270692e5bcb217d43f8
calls the edit form, with the fields of the existing rule
let inputdiv, input, i; inputdiv = document.getElementById("inputdiv"); input = inputdiv.getElementsByTagName("input"); tvRadio = document.querySelector('input[name = tv]:checked'); document.querySelector('h3').innerHTML = "Edit Rules"; if (inputArr && inputArr.length == 5) { for (i = 0; i < inputArr.le...
1
f2ce4464de4161c53e5c169e4ac8a174
05ad974fb10f6d123568a9f948641211
Return a str containing each key and value in dict d. Keys and values are separated by a colon and a space. Each key-value pair is separated by a new line.
def dictToString(d): s = ' '.join([k + ' ' + v for k, v in d.items() if v != None]) return s
0
8002ccdc0a91a3e1a41da167f5d1f10f
a862b83092808c0334ef12700b917fc8
draw the tree for account selection modal
function plotTree($arr, $indent=0, $section=false){ global $_SESSION; $output = ""; $u = $_SESSION["user_details"]; foreach($arr as $k){ if (!$section || $indent || !isset($k["user"]) || $k["user"]==$u["username"] || checkPerm($section,"Read") || checkPerm($section,"Read",$k["cid"])) { $name = $k[...
1
8b6df9b81d1f72e1117193e97dbf1652
da652731345b4e6f83fafc5edbe0e2ec
https://www.libvips.org/API/current/libvips-conversion.html#vips-grid
function getScale9Grid(value: string): Rectangle { return Scale9GridUtil.getScale9Grid(value); }
0
8bf8c9c206af4c7824c1bfcf99a1da9d
538014a67e12573e86e388d8032c4b92
Sets the part number manufacturer.
@JsonIgnoreProperties(ignoreUnknown = true) public class Products public void setPartNumber(final String partNumber) { this.partNumber = partNumber; }
0
6f598e2457634333c48e691eee90152c
ab213d8a08b5cb2dd53d2f8c4c4b3d15
Returns the number of related StudentAttendance objects.
abstract class BaseStudent extends BaseObject implements Persistent public function countStudentAttendances(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) { if ($criteria === null) { $criteria = new Criteria(StudentPeer::DATABASE_NAME); } else { $criteria = clone $criteria; } if ($...
1
dee822738e168b3c90b5c47318a7610a
f7e23f5e359bbb85a036bab884962d06
Measurements landing.
class DuplicablePositionHlCommander(PositionHlCommander): def land(self, velocity=DEFAULT): duration_s = self.__status.current_position[2] / self._velocity(velocity) self._hl_commander.land(0, duration_s) time.sleep(duration_s) self._z = 0.0 self._hl_commander.stop() self...
1
112590abac322246529a462a0db661b9
f17ac29f38af83bee1592f606c553dfa
Reads the integer (64-bit) from the specified XML attribute.
namespace SIL.FieldWorks.FDO.DomainImpl internal static class ReadWriteServices internal static int LoadInteger(XElement reader) { if (reader == null) throw new ArgumentNullException("reader"); return Int32.Parse(reader.Attribute("val").Value); }
0
ad3be0d710f0eae503df4bf8a350d7bd
1a4b0171b499e5b992cbf31004caaf35
The score for an empty plan. No coverage, no energy spent.
namespace evolutionary_inspection_plan_evaluation std::vector<double> PlanCoverageEstimator::evaluateEmptyPlan() const{ double objectiveScores[] = { 1.0, 0 }; std::vector<double> scoreVector(objectiveScores, objectiveScores + sizeof(objectiveScores) / sizeof(double)); return scoreVector; }
1
652a05c53cf81b7643dec24eb2d7f6f1
7d4df134f92ac3ba760b56fb6234ac7d
Tessellation control shader is allowed to fail to compile, shaders for all other stages should compile successfully
namespace glcts TessellationShaderErrorsTestCaseBase::_compilation_result TessellationShaderError4InputBlocks::getCompilationResult( _pipeline_stage pipeline_stage) { switch (pipeline_stage) { case PIPELINE_STAGE_TESSELLATION_CONTROL: return COMPILATION_RESULT_CAN_FAIL; default: return COMPILATION_RESULT_MUST_...
1
eef928b3ef9dab3e6f229ba8b55cfb29
e33328bab353042b5625129554e28943
Deletes all unvalidated entries
data_list = self.session.query(News).filter_by(is_valid=0) if data_list: for item in data_list: self.session.delete(item) self.session.commit() return True return False
1
6ec26fc5594778ffd7fab826b3588a4a
762be698d6bfba21fdd636fdb8977dc0
Draws the target list.
{ GUILayout.Label(Target.name, TitleStyle); GUILayout.Label("Properties", HeaderStyle); Target.Tracing = EditorGUILayout.Toggle("Tracing", Target.Tracing); EditorGUILayout.Toggle("Is Accepting Input", Target.IsAcceptingInput); if (Target.Controller != null) { GUILayout.La...
0
38eae38652557df00b94c0ba3262f65c
c94d98bb8f887aa47030b366b9c313c5
Computes checksum for bank account number.
checksum = 0 if "?" in converted_account: return str(converted_account) + " ILL" else: for i,j in zip(converted_account, range(1,10)): checksum += int(i) * j if (checksum % 11) == 0: return str(converted_account) else: return str(converted_...
1
33744214130f8d7b04a86ef15929691d
a230ffb42d079ceb8f95eb0017f54a39
Resolve the xy-components of links. Resolves values provided defined on links into the x and y directions. Returns values_along_x, values_along_y :meta landlab: info-link
class LOC(ABC): def get_xy(self): pass
0
17dd9d65a58ee77e287739f9505dea0d
a74ef017877c3f5acb9b43e7ae38a0a3
アラート管理一覧データを取得
function listAlerts(params, cb) { params.resourcePath = config.addURIParams(constants.ALERTS_BASE_PATH, params); params.method = 'GET'; params.data = params.data || {}; mbaasRequest.admin(params, cb); }
1
94357488ad9312a550a9526316ce8597
2d8aa1a71f34521535b05ab487da536f
Get a profile from its id `id`s can be found with a scheduler's `get_requirements`, when adding a profile to a scheduler, or from a game with sufficient granularity.
@Nullable Profile getById(String id);
1
48a6378625a6788540918b61614c4ce5
b69a2fd7cb810ebb46b43b40322aeb70
Like the get method, but returns the record as a raw string.
abstract class DatabaseRecord abstract public function get();
0
268dc2844f35b2b8c25490450590c175
9f4586fa7701394c774c63308ddc8879
Create an instance of {@link LkpCurrency }
@RestController @RequestMapping("/api") public class CurrancyLOVResource @RequestMapping(value = "/currancyLOVs", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) @Timed public ResponseEntity<CurrancyLOV> createCurrancyLOV(@RequestBody CurrancyLOV currancyLOV) throws URI...
0
69f6bf34f81a751ae7b82b1365009d52
bcc36d85c581bc549fd706ad0bb2db9f
項目単位フィルタのためのイベント処理を設定する。
public class MainActivity extends Activity{ private void setListener(){ nullListener = new AdapterView.OnItemClickListener(){ @Override public void onItemClick(AdapterView<?> parent, View view, int pos, long id) { } }; itemFilterListener = new AdapterView.OnItemClickListener(){ @Override public voi...
1
e665e071e1b05d2a06a713325246fd68
af79e31877fa23dff9009f4b12d6eae1
Set certificate validation callback
{ ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true; }
1
af15f791c4d370481bab1e4eab839c57
46ccfdcc74f6ddb53ffff240dcb6df4a
Находит минимальные элементы по-строчно в основной матрице - РАБОТАЕТ
var_n = len(matrix) var_min = [0 for i in range(var_n)] i = 0 while i < var_n: var_min[i] = min(matrix[i]) i = i + 1 return var_min
1
cea5efb0b654fdf36d16fca9c69530ab
a01e4f5ab617e951d02bee46fcc39113
Update enemies list for player
public class CompAI : MonoBehaviour public void UpdateEnemiesList() { enemyList.Clear (); foreach (GameObject go in StaticData.aliveList) { if (!go.Equals(this.gameObject)) { enemyList.Add (go); } } }
1
946d8a96c36da1ace0ae0cebbaffc95e
5a787bfe9c292d662158dcfb3a925c57
Get city cost of living
{ switch ($this->city) { case "Киев": return 30; case "Харьков": return 28; default :return 23; } }
1
04f2f9b6db903aa080374bcb8ce8c063
72ff02c43f7e2d6449c38809cec67e6d
王车易位
public class Rubik private void E() { int tempOne = frontFace.getFourStatus(); int tempTwo = frontFace.getFiveStatus(); int tempThree = frontFace.getSixStatus(); frontFace.setFourStatus(leftFace.getFourStatus()); frontFace.setFiveStatus(leftFace.getFiveStatus()); frontFace.setSixStatus(leftFace.getSixStatus...
0
dc96ec3edc1077d7f891054653cb43e6
0c437d1c395102248b1e35a3fa949f18
Returns the value of the '<em><b>Aire Stationnement</b></em>' containment reference list. The list contents are of type {@link mpia.schema.TypeAireStationnement}. <!-- begin-user-doc --> <p> If the meaning of the '<em>Aire Stationnement</em>' containment reference list isn't clear, there really should be more of a desc...
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TypeAttestVariantStrukturType", propOrder = { "typeAttestVariantNummer", "typeAttestVariantSiddepladserMinimum", "typeAttestVariantSiddepladserMaksimum", "typeAttestVariantEgenVaegt", "typeAttestVariantKoereklarVaegtMaksimum", "typeAt...
0
27974efaaa9a7c14905cfb962ba03d34
93415115af538f22369f33bb7707ad46
go to init session scene
public class SceneStartGameController : MonoBehaviour private void OnInitComplete() { StartCoroutine(LoadLoginScene()); }
0
9913e79af8be6c19a5106775334641f0
2cc5d528647b3dbe50ccac18c11ccbae
Get an :class:`ParallelEnv` object according to the user settings.
def env(request) -> CompilerEnv: with gym.make(request.param) as env: yield env
0
5f2c40aaba053539bbf4ef305e1a88d2
2a3be172c5aff7831d45c6e3e57c47cb
判断手机号是否已注册过
const params = new HttpParams().append('mobile', mobile); return this.http.get<{ existed: boolean }>(`${environment.apiBaseUrl}auth/search/mobile`, { headers: this.headers, params: params }); }
1
79e1cca2ff663881e6009303a04b4e34
02464998b4c944caeb5dd26cf82acc34
This method is called by the frontEndServer when there is a change in state of any other backend server. This allows the order server to reroute any requests to the server that is down.
void notifyStateChange(String str);
1
51933afd2c249a1931d75ab73343b363
4d6ea8cfed4c56e567876d9e2bd84e20
Extracting patches from the HR and LR images
height, width = hr_img.shape[:2] idx_x = np.random.randint(low=0, high=width - patch_size) idx_y = np.random.randint(low=0, high=height - patch_size) idx_x_lr, idx_y_lr = idx_x // self.downscaling, idx_y // self.downscaling patch_size_lr = patch_size // self.downscaling h...
1
d11d0ee6556d6fab4c37313252cc8df4
172e1754eff9d96455302b361692bb3e
对获取的料仓进行以id大小的排序,输入获得的乱序的料仓列表,输出排好的列表
public class CalabashTeam private void BinarySortList(){ int numSorted = 1; List<Calabash> calabashList = new LinkedList<>(); calabashList.add(calabashes.get(0)); for (int i = 1; i < 7; ++i){ Calabash temp = calabashes.get(i); int start = 0, end = numSorted - 1; ...
1