query_id
string
corpus_id
string
query
string
code
string
label
int64
8ebe8f2e9d3e2a3c9e8fbd648fe52278
1659719d63d0e3b71090dca9621e0843
添加fragment到堆栈
fun add(fragment: Fragment): FragmentHelper { if (!mStack.contains(fragment)) { mStack.add(fragment) } if (!fragment.isAdded) { fragmentManager.beginTransaction().add(containerResId, fragment) .setMaxLifecycle(fragment, Lifecycle.State.STARTED) ...
1
f368f0a4e94ff03813e706e64c7541f2
c3c36ce7feaa4fb4dfac6a35da131761
Удаление изображения из галереи. Если запрос осуществляется через Ajax, то возвращается сообщение об успехе, иначе - перенаправление на список изображений.
class PhotoController extends Controller public function actionDelete($id) { if (!$this->isAjax) { return $this->onlyAjax(); } Yii::$app->response->format = Response::FORMAT_JSON; $id = (int)$id; $photo = $this->findPhoto($id); $this->checkIsMy($photo->alb...
1
28bb31fd71c78e6de7dccdedbcb14f74
95f6263fe9aeae181d71416b49375ece
计算到指定日期时的年龄
long millis = dateStrToMillis(birthdayStr); long currentMillis = System.currentTimeMillis(); return (currentMillis - millis) / 1000 / 60 / 60 / 24 / 365; }
1
80ddb4f7702f26cc3a02c926cfe52518
5c043442182b6980c05d820af8856269
Fonction permettant d'ajouter en BDD un lien entre l'id de la catégorie et l'id de l'activité.
try { return $this->repository->linkCategoryWithArticle($articleID, $categoryID); } catch (ModelNotFoundException $e) { return $e->getMessage(); } }
1
7dabebc6bb092948072047761ef1e755
0996a87e894ffb585ea39c9f7e220fdc
Get total number of terms, counting their frequencies too. Notice: This is not the same as len(vocabulary)
class Vocabulary(object): def size(self) -> int: return len(self._forward)
0
25aa4990d5075d92a34b2aa22897e842
c14082c85bf74bb0f22348bfad8cba7a
------------------------- 引数:ファイル名 用途:SEを再生する -------------------------
public class SEPlayer public void playSE() throws IOException { int size = -1; System.out.println("再生開始"); while (true) { size = ais.read(data); if (size == -1) { break; } se.write(data, 0, size); } }
0
e94177cd2cac569d8ee3a4d299548d7b
4ef80c808212b4b24d0c3ea2cd6bd948
转换 CMYK为RGB
namespace komb std::vector<cv::Mat1b> rgb2Cmyk(const cv::Mat3b& img) { std::vector<cv::Mat1b> ret; for (int i = 0; i < 4; ++i) { ret.push_back(cv::Mat(img.size(), CV_8UC1)); } std::vector<cv::Mat> rgb; cv::split(img, rgb); for (int i = 0; i < img.rows; ++i) { for (int j =...
0
1e2adad7da1a7117d8a6c07c4b3b7dee
1191033270ca0b8cc6a6bca02b4d739a
Create a matrix that rotate around Y axis.
namespace OpenGL public static Matrix4 CreateRotationY(float Angle) { float cos = (float)Math.Cos(Angle); float sin = (float)Math.Sin(Angle); return new Matrix4(new Vector4(cos, 0.0f, -sin, 0.0f), Vector4.UnitY, new Vector4(sin, 0.0f, cos, 0.0f), Vector4.UnitW); }
1
23723a6808b94089f853ec281846f0ba
99fe835dc3f5f3c63b161a2eef476c60
查询课程时间(一个老师的一门课程可能由多个上课时间)
List<TraexaCourseTime> selectByCourseId(String courseId);
1
f73130fca900c9368666a28e04ec6a51
0d4a2a58fd838178202ab4b7e0116a07
获得node节点高度
{ if(node != NULL) { return node->hgt; } return -1; }
1
f19ad68da947b925b1c4a6fa6f61cbba
24f627a749f10dab2b5206a6dd7516e4
Make sure the charm does nothing without configuration.
mock_integration(self.opp, MockModule("comp", setup=lambda opp, config: False)) assert not setup.setup_component(self.opp, "comp", {}) assert "comp" not in self.opp.config.components
1
e2ed7642273592eaf3ea13409b39edc9
98be5baf422434165fd54694d3cfab34
Occurs when the combo box's index gets changes. Updates the answer in the question view.
{ RadioButton radioBtn = sender as RadioButton; if (radioBtn == null) return; iUserAnswer = rdlOptions.IndexOf(radioBtn) + 1; isChecked = true; }
0
dbd32b8284f12fd81656be2792248285
31cebd549ff897a2296f6505ed8949d2
Пролонгация запроса покупателем (создание записи в таблице)
class Purchase_model extends CI_Model public function add_purchase($buy) { $this->db->insert('purchase', $buy); $this->db->query('UPDATE cards SET cards.count_purchase=cards.count_purchase+1 WHERE cards_id='.$buy['card_id']); }
1
a723c7ee263861363902afc580751356
486a74821413ef788642cb0ad5becaa9
given a list of 0/1 bits, constructs a bytearray
bitArray = BitArray() for databyte in bytearraydata: bitByte = BitArray('uint:8={value}'.format(value=databyte)) bitArray.append(bitByte) return bitArray
0
c2fdf98507487fc4d1aebc31e5b85d1c
307b53232b7cbebb18264273f72b65fe
cell type specific pseudobulk
def plot_spectrum_bulk(ntp, species, pic_info): fig, ax = plt.subplots(figsize=[7, 5]) colors = ['b', 'g', 'r', 'c', 'm', 'y'] ax.set_color_cycle(colors) dtp = int(pic_info.dt_particles) + 1 i = 0 for ct in range(2, 8): plot_spectrum(ct, species, pic_info, ax, False, False) tname...
0
4081e1c9adf59a08ce9f7ee945e5fa39
b22575f14ee9708f052aea7ac0144c2d
Remove a pattern for the ban list.
class PatternHandler(object): def remove_pattern(self, raw_id): i = self._get_index_for_id(raw_id) self.patterns.pop(i)
1
1100799ce80af65afcadc4700b0542c9
272a0936f6cd75011f3ad14efba87b62
Only write on processor zero
FILE *file; char filename[20]; sprintf(filename, "rank%02d_%06d.txt", my_rank, 0); file = fopen(filename, "w"); int i, j; int local_n = n/comm_sz; if(file == NULL) { printf("ERROR: Output file not found. Terminating...\n"); exit(1); } else { fprintf(file, "%lf\n"...
0
e0bb6399ad996cb95bc41b3639680215
16737bd3590fcc58b20ae8832511c029
Metodo para mostrar en ComboBox Todos los Fabricantes
{ try { pe_VendedorModel.pb_ObtenerVendedores(ref ps_VendedorModel, "%"); mcbVendedor.DataSource = ps_VendedorModel; mcbVendedor.DisplayMember = "venChrNombre"; mcbVendedor.ValueMember = "venIntCodigo"; } ...
0
0362b6529fe3b292240ad5af3b0eb74f
44fba4832f969148082c49e95808ec23
This method was generated by MyBatis Generator. This method returns the value of the database column t_cpy_back_pay_record.id
@Alias("billChghistory") @Table(name = "tp_acct_bill_chghistory") public class BillChghistory public Integer getId() { return id; }
0
f587d171b38c3eeec58c6564b72902bd
a79e290d993191839d55bded4f745bcf
simple Euclidean distance calculation in 2D
def euclidean_distance(y1,x1,y2,x2): return math.sqrt( ((x1-x2)*(x1-x2)) + ((y1-y2)*(y1-y2)) )
1
9be7dfb7d5e859670b37255d77aec62c
784b3cf975e6a630540e5dff2ec47e91
保存grid中已经修改的数据
dgrid = string2Jquery(dgrid); if(currentrow.index !== null){ dgrid.datagrid('endEdit', currentrow.index); } var rowlist = []; for(var x in updatedRows){ var row = dgrid.datagrid('getData').rows[x]; rowlist.push(row); } console.log(rowlist); var resultlist = []; ...
1
64fcb945fdbed695bd78369c6825b3a0
b336f4f5f7995e0b7407be2b563e4888
Defines all possible connections between the local_input and local_output neurons (fully interconnected). TODO: A more optimal approach may be to do this outside of the loop for each genome in the population, since this step is the same for all.
namespace NeuralNetworkLib public class MultilayerPerceptron : NeuralNetwork public void Connect() { if (_hidden.Count == 0) foreach (var n in _output) n.AddParents(_input); else { foreach (var n in _hidden[0]) n.AddParents(_input); for (int i = 1; i < _hidden.Count; i++) foreach ...
1
413ab55894c9297e67c7c7df34ff1c73
d6cda440ada07096a1d0a95a2b4d662f
Test that the internal position pointer is initially zero.
class AutomatonTest extends TestCase public function testInitialPosition() { $this->assertSame(0, $this->automaton->getPosition()); }
1
311c87647f02658db8611062d876be92
e45c5f0407ede2fee03c2aa8fcd4be06
Get CR detail
{ $sort = $request->sort['sort']; $crs = $this->crRepo->getAll($sort); return CrResource::collection($crs); }
0
7df5a30361d5dd9f64548f754bfbb392
b07d981d3bce41e818da63c0a28d2a52
Remove all handled logs.
public final class LogManager public void removeAllHandles() { synchronized (this) { this.handles.clear(); } }
1
0620335578b2ec0faad75184f51258ba
56dffde8ddee837c275c009d87f70f54
Here comes your code for training and evaluation of the log linear model with word embeddings representation.
def train(): pass
0
b3ef550fb9ea052f628d9244876db294
e70f7f70774e32cdf57d1792d4cc1f9f
ajax校验宅配商品库存
class Wxz_wzbModuleSite extends WeModuleSite function check_stock($cart_goods) { $info_arr = array('msg' => ''); global $_W, $_GPC; foreach ($cart_goods AS $key => $val) { $sql = "SELECT g.goods_name, g.goods_number, c.product_id ". ...
1
d4e66d589faf1ba76e2dfc0d14f46550
9f38a5bdfb138ae26a2c7b19762779cf
@brief 设置key的过期时间,与expire不同的是,时间以毫秒为单位 1 设置成功 0 设置失败(key不存在或者不允许设置过期时间)
{ if (!impl) throw std::runtime_error("RedisClient::pexpire Error!"); return impl->pexpire(key, milliseconds); }
1
ff0c1b3d0512b3df03dc50b79eb94f06
500654f4f1ed6bfd8d2ad516986eb24f
This method is responsible for filling the board with mines in random coordinates. In addition, for each generated mine, the calculateAdyNumbers method is executed to generate the values of the numbers adjacent to the mine.
for (int r = 0; r < 10; r++) { Arrays.fill(board[r], ' '); } Random generator = new Random(); HashSet<Integer> bombs = new HashSet<>(numBomb); int position; int row = board.length; int col = board[0].length; for (int count=0; count<numBomb; cou...
1
416bd6afc4c352fdeaf84ef4d643469d
42894ff896021e6fc4131b888fec3243
单个匹配 常量,或者只有一个枚举
CNode* CMatcher::single(const string& pattern, int& pos, int stop) { char token = pattern[pos++]; if (token == '?') { return new CNode_Any(reached); } else if (token == ' ' || token == '\t') { while (pos < stop && pattern[pos] <= ' ') ++pos; if (pos < stop && pattern[pos] == '=') ...
1
414c0821cbc0755eaac9411a0746b598
bcb92edc648fc20b68ca94e80b163fd6
返回指示两个程序集名称是否相同的值。该比较基于简单的程序集名称。
namespace Script public sealed class AssemblyLoader : IEquatable<AssemblyLoader> public bool Equals(AssemblyLoader other) { return (this._assemblyFileInformation.FilePath == other._assemblyFileInformation.FilePath); }
0
d70cc1f65f4dd64c560470e381f48db6
518645cf6b37b25b4b33536a201c7d20
Returns all nodes this operation depends on
Collection<TaskNode<?>> getDependants();
0
179931970ab2e920dab57b819470fc0a
8cab13403a0c09677d7e53f53adbcbc5
Đếm tổng số bộ hồ sơ
public int getNumberofProfiles() { int num = (int) studentRepository.count(); num += (int) employerRepository.count(); num += (int) administratorRepository.count(); return num; }
1
b1f78352cc33e964f427584b1cde1767
109f320b310486c2fc4dc1cbaf0c7347
Runs the Checks for Profile Update
{ $I = $this; $profilePage = new ProfilePage($I); $profilePage->checkProfileButton(); }
0
14834a46ace32ba858c7376f1d50da6e
73a50c30d92d4b3ef1474a037e263f5a
Find the index of the next token of a certain type in a particular parentheses group
for (let i = start; i < this.tokens.length; i++) { if (this.tokens[i].type === type) { return i; } } return -1; }
0
26a94f2c9e47e336c67397b85ad7a24d
1dca87db29c64752338971043559918f
ゲーム終了コルーチン開始
namespace Kurisu.Module.Pve public class PveGame public void Terminate() { Pause(); if (onGameEnd != null) { onGameEnd(); } }
0
9b94a4cfc7728810b44330a7c8d92157
556b12a88ccb357cfb96a1d8ac096681
Gets pending claims.
class Status extends ActiveRecord public function getClaims() { return $this->hasMany(Claim::class, ['status_id' => 'id']); }
0
649188cb3243c9b1e5d10382be0ffef9
cc9f5b201975b435f04d9965a507c7c6
Create a dummy LaunchConfiguration
class EC2Generator: def create_launch_configuration(self, asg_args): self.launch_configuration = self.add_resource(LaunchConfiguration( "LaunchConfiguration", UserData=Base64(Join('', [ "#!/bin/bash\n", "cfn-signal -e 0", " --resource Au...
1
6bca3b6b8f8ba1ca1274f6f4ec621ea4
1963041e03b9c23ee692043681695cb5
Inputs pressure in mb and temperature in degrees Celsius, outputs saturation mixing ratio in kg/kg.
def saturation_mixing_ratio(pressure, temp, epsilon=EPSILON): sat_vap_press = sat_vap_press_tetens_kelvin(temp) return water_vapor_mixing_ratio(sat_vap_press, pressure, epsilon=epsilon)
1
af942e9779b4d1c96aeccb62c542b70a
be8eb1d631bfb26f820f6532b13d19dc
电池测试对比获取二级列表
public ResultInfo queryThirdLevelData(@RequestBody BatteryDataTrackingAssessmentConditions param) { logger.debug("queryThirdLevelData begin params [{}],", param); try { Date startTime =TimeConvertor.stringTime2Date("2020-02-03 19:29:31","yyyy-MM-dd HH:mm:ss"); Date endTime =TimeConvertor.stringTime2Date("202...
0
bb25471c489f1133b57bcc3a7c5fbe1b
1daebee150a95c5bb370cdb7c7bb4d72
BUSCA EM PROFUNDIDADE NO GRAFO (DFS)
public class Grafo public Grafo buscaProfundidade(int verticeInicial, String salvaArestasRetorno) { boolean[] marcados = new boolean[matrizPesos.length]; boolean todosMarcados = false; salvaArestasRetorno = ""; Grafo floresta = new Grafo(matrizPesos.length - 1); for (int i = 1; i...
1
2e13a82e91a08ecb4d23817ff980f4f6
d2a47bff7235bf8d865e27068e2a4689
判断目标对象是否既不为null,又不为空,满足则为true, 否则为false 用于判断的对象
public class ValidatorAssist public static boolean notEmpty(Object obj) { if (obj instanceof String) { return notEmpty((String) obj); } else if (obj instanceof Collection) { return notEmpty((Collection) obj); } else if (obj instanceof Map) { return notEmpty((Map) obj); } else if (obj instanceof String[...
1
693e20dbc7eb91cf8be4c6be5d430514
a52c8b65ef31ede68403178e972cb8d0
cierra ventana con los comandos de teclado
scene.addEventFilter(KeyEvent.KEY_PRESSED, evt -> { if (evt.getCode().equals(KeyCode.ESCAPE) && messagePlaceHolder.getChildren().contains(helpWindow)) { closeHelpWindow(); } else if(evt.getCode().equals(KeyCode.ESCAPE) && messagePlaceHolder.getChildren().size() > 0) { ...
1
429fbaf4823855e9ed80fbe460a9c589
e3d61a10382038ef8c8720358607bdaa
Muestra los resultados del reporte en diferentes formatos
lexicos = "Lexicos detectados" resultado = ResultadoHeader.objects.get(id=resultado_id) context = { 'header':resultado, } tipo_ver = { "Guiada":ResultadoBusqGuiadaGeneral, "General":ResultadoBusqGeneral, "Inteligente":ResultadoBusqInteligen...
1
3ef9e2096d1827181d740ba46e24eff1
316528d2983f7beb196613b911b1b7e3
Changes picking state to assigned.
{ if (this.IsPicking) { this.IsPicking = false; } if (this.SelectedColor != null) { this.AddColorToRecentColorsIfMissing(this.SelectedColor.Value); } }
0
c5be01e781aa33bab58c745b2c54614d
38cd8c980b5930835294b66292841b23
Dispatches related groups pages. URLs take the form of Group view related groups: relatedgroups/owner/<group_guid> Group manage related groups: relatedgroups/edit/<group_guid>
{ $url = $req->url; if (preg_match('#^\/([a-zA-Z][a-zA-Z0-9\-\_]{2,19})(?:\/([a-zA-Z][a-zA-Z0-9\-\_\.]+)(\/.*)?)?$#', $url, $ms)) { if (!isset($ms[2])) { $dir = GIT_REPO . $ms[1]; if (is_dir($dir)) { $req->url = '/group/' . ...
0
4ce93df32c2d888ad477f5fcbc92106a
1601e6a3258b8976f73b9840d93ff0bf
Returns sparse feature matrix with added feature Feature_to_add can also be a list of features
def add_feature(X, *args): for arg in args: X = np.c_[X,arg] return X
0
e433148aeed702e7f762193d5e6fc20d
ed98415dd67c29de56e1793d337987aa
Returns the radius of a bounding sphere that completely encloses a cube with sides of the specified length
namespace BEPUphysics.CollisionShapes.ConvexShapes public class BoxShape : ConvexShape public override float ComputeMaximumRadius() { return (float)Math.Sqrt(halfWidth * halfWidth + halfHeight * halfHeight + halfLength * halfLength); }
1
6c780b9c76205b2cc3814e31668544c0
c74c426e629bfbf84551ade2c9b766cf
cria um objeto de Foo (chamada do construtor é implícita)
class A function foo() function __construct() { new Foo(); }
1
d801f1480194f3b2773177f433b89cd4
a37dfa6eacc6c749cd20e2ec4a5abaef
Определение числового АйДи парент элемента
{ $parent_id_res = -1; $page_id = ($page_id==-1)?0:$page_id; $level = $level-1; if ($level>=1 && isset($info_about_catalog['structure']['by_levels'][$level])) { foreach ($info_about_catalog['structure']['by_levels'][$level] as $elemId=>$elemInfo) { if (isset($elemInfo['uriField']) && !empty($elemIn...
1
21133fef30b1040c80ae70f3ced9b10f
6306ff5697d63703baa18d3406fa8b0d
Method to sort the current schedule by various fields. Fields will be "Name", "Date", "Rating" and "Risk".
void sortFilteredAppointmentList(String sortBy);
1
9de11e5d759b96e8febfa0e6912f1d26
51cff0cb27aaca4795ec03df9612457e
replace multiple assigned ships for a single ship in a fleet list with a single assignment
def ns(shiplist, parcellist): randomchoice = random.randint(0, len(shiplist) - 1) ship = shiplist[randomchoice] spacecraft = Spacecraft(ship.name, ship.nation, ship.payload, ship.volume, ship.mass, ship.basecost, ship.ftw) fleet = [spacecraft] ...
0
0e3668393adfee275bf5126ffe5e25b4
096633ef48a529b346907d7a935605b5
如果有前驱,使用前驱的输出
if (prev[t] != -1 && t != s) { print(prev, s, prev[t]); } System.out.print(t + " "); }
1
91f7789176616e29eb0a7b28b46c3c13
6dc67353b109450951fba68fbe5b37a6
https://matplotlib.org/gallery/specialty_plots/hinton_demo.html
import matplotlib.pyplot as plt v_spacing = (top - bottom) / float(max(layer_sizes)) h_spacing = (right - left) / float(len(layer_sizes) - 1) for n, layer_size in enumerate(layer_sizes): layer_top = v_spacing * (layer_size - 1) / 2. + (top + bottom) / 2. for m in xrange(layer_size): ...
1
77520c4ac19e6facc32ad0283e55d4e4
f72d4802cf744be2b972ff1a35d07a6e
현재 입력 블록 상태면 어떤 처리도 하지 않는다
public class Block : MonoBehaviour void OnDrag(Vector2 delta) { if (isFinished) { return; } CheckPosition(BlockManager.Instance.Difficulty); int count = UICamera.touchCount; int id = UICamera.currentTouchID; if (count == 1) { if...
1
ae091b41d734ca48e0330f80df785056
d410f14c6d5aa5a2612c2e4d3320fd22
获取数组最大最小值及下标
public class Fcm public static double[] getExtreNum(double[] a) { double minmax[] = new double[2]; double minValue = a[0]; double maxValue = a[1]; for (int i = 1; i < a.length; i++) { if (a[i] < minValue) minValue = a[i]; if (a[i] > maxValue) ...
0
04b6b83e6c71fb433a6464f8d75b0f5f
460264787484d04fc805ec880228afff
如果用户信息里面没有头则给个头像
if(empty($userid)){ return false; } $map = array( 'status' => array('egt',0), 'userid' => $userid, ); $user = \app\home\model\WechatUser::where($map)->find(); if(empty($user['header']) && empty($user['avatar'])){ $header = "/home/images/default_avatar.png"; }e...
1
104cbd8b595059d0e0eed4e15bb0999f
d44983b25f2c539f7c206481e0f33b28
toggles whether the graph panel is shown
if self.is_hidden: self.graph.show() self.hide_button.setText("Hide") self.is_hidden = False else: self.graph.hide() self.hide_button.setText("Show") self.is_hidden = True
1
66cfc52eecfd11e9b4b04da92ce0452e
3ebd03ba63d551db4debaee3bf065ab5
得到每类角色所能访问的url地址
@Service public class MyAuthorityService public LinkedHashMap<String, List<String>> getAllUrlRoleMapper(){ LinkedHashMap<String, List<String>> linkedHashMap=new LinkedHashMap<>(); List<UrlRole> list = authorityRepository.findAllUrlRoleMapper(); for (UrlRole u:list) { String urlKey=u....
0
aaaeab3041e155a84970105698a4f186
d0d9e730c4be8b51c064437a479749b0
Show in a message all waiting tasks and their related details.
void showWaitMessage(String title, String message);
0
41f40edd2d4d38ff9f8ebb9c087dabea
c80bc44d4ad0932c6cc8fec9dc9824a6
Converte uma string raw sql para SqlAlchemy TextClause
if isinstance(self.raw_fields, str): self.raw_fields = self.raw_fields.split(',') for x in self.raw_fields: self.fields.append(expressions.AliasExpression(x).result()) if len(self.fields) == 0: self.fields.append('*') for x in self.raw_tables: ...
0
b14e85ecc00e32fbd22fb34ad8eaed59
c96a422feda2eef555cec531ddc46b7d
设置用药天数(持续用药的合计天数,计量单位为d)
public abstract class BaseOpdOralMedicinePathology implements Serializable public void setAlcoholDailyProduct (java.lang.Integer alcoholDailyProduct) { this.alcoholDailyProduct = alcoholDailyProduct; }
0
8ea12e56b5bcb46a20c4442c1c93e257
0871737746e7b10c331ee11bd37e9d78
Here we decide how many evts will be processed
public class MergeEventsDriver extends Driver public void setNumberOfEvents(int nEvts) { this.nEvts = nEvts; }
1
8fe97226c3587bd70853568a73231551
cd9d5edcb74213d5692376c7eadacf9a
Success URL simply returns the user to the quest.
class RespondFeedbackViewAjax(RespondFeedbackMixin, SingleFeedbackMixin, UpdateView): def get_success_url(self): return None
0
321b3a485d58d2f78888962a03d7cdd6
997e742d14dcef6e7fa9b5dcabd0de54
将混合转化为搜索拼音字符 INPUT '杭州frank1湖滨银泰in77' OUTPUT 'hzfrank1hbytin77
{ StringBuilder rtnSb = new StringBuilder(""); char[] charary = str.ToCharArray(); string[][] _Allhz = GetAllhz(); for (int i = 0; i < charary.Length; i++) { var ch = charary[i]; if (IsCharChinese(ch)) { ...
1
aaaef068464142d8837efeca0c54e2b8
32e59bfe2bfe9b48efc51104763c0c1f
Переводит число в строковом формате в список
def enlista(num): return list(map(int, str(num)))
1
353c0052d678ded2031c32b1568dccd5
77486cc64c9fe3d8fdaeb3523b62a266
This function will create a simple table frame of the image
title=None,colheader=None, rowheader=None): if outfile != None: saveout = sys.stdout fsock = open(outfile, 'w') sys.stdout = fsock if title!=None: print '<h1>%s</h1>' %title print '<table id="mytable" align=center cellspacin...
1
2a55819738ac550dec64afdecc28fb48
b28a8fd404cd529029ef973626162fa2
Grayscale Cross Morphological Gradient
{ unsafe { CvMat GLP = new CvMat(img.Height, img.Width, MatrixType.F32C1); double[,] gxx = new double[img.Height, img.Width]; for (int y = 0; y < img.Height; y++) { for (int x = 1; x < (img.Width - 1); x++) { int xm = x - 1; int xp = x + 1; gxx[y,x] = (double)(img[y,...
0
e3a236d43785890da7976a529916f5c2
76ab43770ad572dda206c9781681770a
Converte a imagem para jpg se ela não for jpg
class ImageCapsule extends FileCapsule public function convertToJpeg() { $fileType = 'png'; $target = sprintf( '%s/%s.%s', $this->getTarget(), $this->getName(), $fileType ); $image = $this->createImageFrom($this->getFilePath()); ...
0
e9c773d202a7c8d39c6c0216e89de845
20aedaa65d0d279fcf2d93f81d23c84a
Register our button in the editor.
namespace com.rmc.projects.scientific_calculator.components [CustomEditor(typeof(ButtonDataComponent))] public class ButtonDataComponentEditor : EditorWithExposedProperties override public void OnEnable() { base.OnEnable(); }
0
c4e56675cd5cb7c3867171b155e7402a
3f00fa862f3a9a8f24bc78000d421797
Routes allowed when site is within renewal period.
class _File extends \IPS\nexus\Invoice\Item\Purchase public static function canRenewUntil( \IPS\nexus\Purchase $purchase, $admin ) { if( $admin ) { return TRUE; } return static::canBeRenewed( $purchase ); }
0
53e9cb1f31672c43184409b3346a7ea0
43496af79373a9189dbeffe153fee9ed
解析哆啦宝回调请求的数据
public class FindPwdActivity extends Activity implements View.OnClickListener private void analysisData(String s) { try { JSONObject jsonObject = new JSONObject(s); String message = jsonObject.optString("message"); int statusCode = jsonObject.optInt("statusCode"); ...
1
0674da95d1349e408380b53245cf4b21
d8553206aeb255974a31e87e5c3d5e45
对分类字段做哑变量处理
df = df.copy() df = pd.concat([df, pd.get_dummies(df[var], prefix=var, drop_first=True) ], axis=1) df.drop(var, axis=1, inplace=True) return df
1
5186467a226dfa034109b5d3593a6696
90a9c8460ba58e5f404d5bb542fb2464
8. được gọi khi người dùng click đặt bom
public class Region implements ActionListener{ public void actionPerformed(ActionEvent evt) { isBombActive = true; blastMutableObjects(); }
1
ee1e0317b574aa4f3491d323f89b25d8
290d92ca8906085a852302ac2a2c167f
Create an ASEM method and add it to an existing ASEM class. The method will save and synchronize the ASEM model, too. The name of the method, The ASEM component the method shall be added to. Test case class. Needed for accessing synchronization method.
class Method(TestObject): def get_test_case(self): case = self.class_(self.method_name) case.fullname = self.fullname return case
0
b9560a27022f8f6c5de43ade20b0462d
63f2f9cb34027b0ee97ebabe928d31b2
Makes the source tree world-readable.
class UncrustifyCheck(ICiBuildPlugin): def _remove_tree(self, dir_path: str, ignore_errors: bool = False) -> None: def _remove_readonly(func, path, _): os.chmod(path, os.stat.S_IWRITE) func(path)
0
92074a7c42e96eacbe8658d30b0b9ba6
22ce464a461619d4318fa10065561418
将字典按key排序
def sort_dic(dic): return {k: v for k, v in sorted(dic.items(), key=lambda item: item[1])}
0
c8f04133fcd7e4365f4c100a8b717efd
25799a8977ef71f8d38ebcbdee992075
バインダーを削除します。 削除後、ログインユーザーがアクセス可能なバインダーの一覧を返却します。
{ $em = $this->getContainer()->get('doctrine.orm.entity_manager'); $emShare = $this->getContainer()->get('doctrine.orm.share_entity_manager'); $client = $this->createClient(); $vendor = $em->find('BBDurianBundle:OauthVendor', 2); $openid = '123456'; $binding = new Oa...
1
dc787b50fff247fa5e3b81b265837d72
d9c7d8597bc32368da808153e703de44
캡션상태가 on(true)일 때만 text를 보여 준다.
let display = this.state.showText ? this.props.text : ' '; return ( <Text>{display}</Text> ); }
1
6a500d1b475b3f18cb4b556d522845b7
3db3255f1c4c76d2969980ccb56439d8
从namesrv删除topic
try: for name_one in names: result=mongoOps.db().login.remove({'name':name_one}) self.write({'status':1,'msg':'删除成功'}) except Exception , e: self.write({'status':0,'msg':'删除失败,失败原因为:'+str(e)}) self.finish()
0
b0acdcd0d8f7929b52422dd6293f388f
496230c6cce6c7b03a4b6a3a7a01a0bc
SSH access method of an agent pool.
class AgentPoolSecurityProfileArgs: def ssh_access(self) -> Optional[pulumi.Input[Union[str, 'AgentPoolSSHAccess']]]: return pulumi.get(self, "ssh_access")
1
5fe9e1fa0933e1bd56cbd36cb9d964ce
79e1dc42f843dd7ae74e286ebbe43bff
Checks if any virtual button is down.
BOOL MOUSE::AnyButtonDown() CONST { return AnyButtonState.ButtonDown; }
1
2b4a7efc0edf6e0d459311117ed3f698
3548780fe556366eb102bc19660d7449
Returns the list of categories ordered alphabetically
class Application_Model_Categories extends Zend_Db_Table_Abstract public function getCategories() { return $this->select()->order('name ASC')->query(); }
1
ae366d5e7fe13ed78d1b86531e1617c6
79521e79dac792721d9d82a06e42adc8
返回yyyy-mm-dd hh:mm:ss
public final class DataTypeUtils public static String formatDate_yyyy_mm_dd_hh_mm_ss(Date date){ return new SimpleDateFormat(DATETIME_FORMAT,Locale.getDefault()).format(date); }
1
65cc7a23390e71b181cce29f26e7c8dc
c301a03b3ffafa26b309f517a1e3a7fe
Given a set of xinputs, get the terms of the fitting polynomial.
M, N = X.shape P = X[:, 0:1] for i in range(2, self.degree+1): P = np.hstack(( P, (np.power(X[:, 0:1], i)).reshape(M, 1) )) P = np.hstack(( P, X[:, 1:2] )) X = P return np.dot(X, self....
1
f66573251c440c9f801d9b4687f7a84e
75880cb990b11acb11bb77f68be2f396
Internal getter for all token properties. Has a check for undefined claims to make getter calls always valid.
abstract class JWT public function __get(string $claim) { return $this->getClaim($claim); }
0
97424fc6c76576d81c19640d4ca5f1c9
7f8c215424838f08f73d83aef30142be
查询个人单场篮球统计数据
@Repository public class ShuangSeBallService public Map<String, Object> queryShuangSeBall(ShuangSeBall ball) { return comnDao.get(PREFIX, "queryShuangSeBall", ball); }
0
764f53e0f95127b7f4d5701db05197c9
b1d6bf3da441f886b7824efbaee8a16e
This endpoint creates a new purchase order. https://developers.onupkeep.com/#purchase-orders
public procurementPurchaseordersPost (params: { purchaseOrder: PurchaseOrder; }, extraQueryParams?: any, extraFetchParams?: any ) : Promise<PurchaseOrder> { const localVarPath = this.basePath + '/procurement/purchaseorders'; let queryParameters: any = assign({}, extraQueryParams); let headerParams: any = assi...
1
25c4b5a0204ed93632245d988d4c945c
7ca3bd0c576a21ac118426dc0f4c3d75
Returns the id of the wmo table in the database.
public function getWmo() : string;
0
3f1060ab37b571a353cda870e8c4990d
d34f2ca5bc896717e601f7250d377669
Returns the product path (where the product is in)
class Product(Folder, PermissionManager): def Destination(self): return self
0
b79216fe81d80c4dab071276d239578b
b6837a4ae13a2254bf4201fa51980b95
使用済みマーカーを回収し再利用出来る状態にします.
namespace MazeSolver void ResetMarker();
1
7125a6c3fd18eb880b66e96c86ffbfb6
86559fc15249c33daf0dee4d3833e36f
根据业务ID更新状态
logger.info("更新业务单据状态开始"); System.out.println("更新业务单据开始"); ResultRet resultRet = new ResultRet(); resultRet.setResult(true); logger.info("更新业务单据状态结束"); System.out.println("更新业务单据状态结束"); return resultRet; }
0
c8b3e7369c0d2865328fdb0721074530
4172ebca33031bfe2ff43ac4ad15b91c
根据考核日期、公司ID统计日志数量
Long findCountByDateIdAndCounterAndReportTypeAndResult(Integer dateId, String counter, String repayDate, String reportType, String result);
0
8ae3bd6697c589b61d58458b484a07e1
291b171bd66c71fb9d0acacc04ecb829
We currently disable support for CopyToTexture on Mac, because this is used for single buffered Tiles. The single buffered nature of this requires a call to glFlush, as described in platformCopyToTexture. This call blocks the GPU for about 40ms, which makes smooth animations impossible.
namespace angle TEST_P(CopyTextureTest, CopyToMipmap) { if (!checkExtensions()) { return; } ANGLE_SKIP_TEST_IF(getClientMajorVersion() < 3 && !extensionEnabled("GL_OES_fbo_render_mipmap")); ANGLE_SKIP_TEST_IF(IsOSX() && IsIntel()); GLColor pixels[] = {GLColor::red,...
0
fe3b40966b2b8b2b429a66cf012c993d
29a1b48788cfe2023b28e18e2283c6bf
} Upload avatar cho user có id là user_id cập nhật ảnh, gửi lên ảnh dạng base64, server tự decode lại trả về đường dẫn ảnh trong trường image nếu thành công, trả về rỗng nếu lỗi
export class UserService async avatarUpload (file): Promise<string>{ return upload(file); }
0
f11608e6574a2d001e701b06b0bb961a
5a1028e5d4aba7e5b60076643d9db0dc
Notifies selected <see cref="IEditingStrategy"/> when user wants to start working on the current course.
namespace Innoactive.CreatorEditor [InitializeOnLoad] internal static class GlobalEditorHandler internal static void CurrentCourseModified() { strategy.HandleCurrentCourseModified(); }
0
f7b992ab6378e62d85e315aa73f590a5
9f62eacac73682d120a41f99af9bf2c9
写入服务端微信token的config
var file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, 'twitter.config'); if (file == null) { file = Ti.Filesystem.createFile(Ti.Filesystem.applicationDataDirectory, 'twitter.config'); } var config = { access_token: cfg.access_token, access_token_secret: cfg.access_token_secret }; ...
0
2cc0c3581781c2ed42292047d2d0fc07
4a4f758b2cf48546f2316775db561633
Tagastab arvuti lõpputulemuse.
class Bezeroa public String lortunan() { return nan; }
0
8a4ce7674db1131add5e1090dd754016
7391916052bdc85c660cc3e6454c4351
Array representation of this entity.
class EntityResource extends JsonResource public function toArray($request) { return [ 'id' => $this->id, 'project_id' => $this->project_id, 'project_name' => $this->project->name, 'definition_id' => $this->definition_id, 'definition_namespace' => ...
1
c1921d0f9e83ad912192965b585553ae
ad3316925250ff5ce570ad9998d06a11
Write a tile to the cache
mn = "fetch_single_tile:" @log.msgdebug(@lt+mn + "(#{x},#{y},#{z})") begin if ( @locker.check_and_wait(x,y,z)) @locker.release_lock(x,y,z) return end i = get_tempfile() bbox = x_y_z_to_map_x_y(x,y,z) url = sprintf(@cfg["source_url"], @x_size , @y_size, bbox["x_...
1