query_id
string
corpus_id
string
query
string
code
string
label
int64
b905ab521a6c41ae42ea384e09674ddb
a810a7bce799c39bb8fa858ab569ba52
根据博主id和文章状态查询其发布的指定偏移位置和数量的博文
public List<Bbs> findByStatus(Integer status, Integer start, Integer count);
0
170ac65170d12526ce525277fcd887f4
7dff66c5979f92bae5d3ec604e6ccdc6
Obtiene la definición de una taxonomía basado en el ID que tiene en base de datos, la transforma en el DTO que la representa y la retorna a la página que lo invocó
namespace AbaxXBRLCore.Repository TaxonomiaXbrl Obtener(long idTaxonomiaXbrl);
1
2ba561ec0f503a1d9ef6340339c58f2b
75fc938d6f0c755a6ee86b865b8c5ae2
创建一个空的contextManager
class ContextManager(object): def __init__(self): self.actual_context = None
1
7d092400c16613413ddfdda6a105ef7a
3432adeaca2a053f1fa18f3fc6d8b230
设置是否只允许纵向拖拽
public class MyItemTochHelper extends YolandaItemTouchHelper public void setDragEnable(boolean canDrag) { itemTouchHelpCallback.setDragEnable(canDrag); }
0
dedd5c24c7deb414b2dbecba8d446ee8
74b16f8ef06f2d9e4d3a8e6cb668e83e
处理字符串为null的情况和没有值显示undefined的情况;
public strictfp class p public static String nullUndefinedToSpace(String str){ str=(str==null?"":str); str=("undefined".equals(str)?"":str); return str; }
1
57172bb2323f1ae89b01999b3c34d76d
9f7d78472d4a571ff5bf0fa22aa0294a
Loads images into the slider for the selected tab ######################################################################
var sliderContent = []; var t = $$('#pl-' + s + ' option'); t.each(function(el) { sliderContent.push('<div id="' + s + '-' + el.value + '" class="slide"><img alt="" title="' + el.text + '" src=\'' + hSportImg[el.value] + '\'/></div>'); }); sliderContent.push('<div id="' + s + '-' + t[0].value + '" class="slide">...
1
982e4f6077b7ebaeefb23f45beb5550f
c39be76c3cd15a5731de68440dff577f
Convert Sorted Array to BST
struct TNode* sortedArrayToBST(int arr[], int start, int end) { if (start > end) return NULL; int mid = (start + end)/2; struct TNode *root = newNode(arr[mid]); root->left = sortedArrayToBST(arr, start, mid-1); root->right = sortedArrayToBST(arr, mid+1, end); return root; }
1
adf307ec160c81dbe018edb284be09ae
03d2a0057ee2181687050ac4dec5c294
Returns the account_id of this fund account registration.
@Entity(name = "StockCheckpoint") @Table(name="stock_checkpoint") public class StockCheckpoint extends IdentifiableEntity public Long getAccountId() { return accountId; }
1
a56208030fc5536b42cfd539f8f45ee0
e4ee49737a646f32c74ea9bc7a52f992
Displays the optional excerpt. Wraps the excerpt in a div element.
class BarristarExcerpt public static function output() { the_excerpt(); }
0
94e25c615e1a884a4855de3539c46acd
521ee873ca7c21a8b5f7798dc968bf6a
Generate days of week, starting from the provided index
$startDay = Spc::getUserPref('start_day', 'calendar'); $startDayIndex = array_search($startDay, self::$_weekDays); return self::circleArrayForeach(self::$_weekDays, $startDayIndex); }
1
989f3927165eabcbdf4621c9425d827b
173d0010b8fc04dbbdacba6864281c29
@brief 固有値問題の残差 F=A*X-lambda*X
{ Vec3 abc = verticies_[0]->Parameters(); residual_[0] = std::exp(abc(0)*x_*x_ + abc(1)*x_ + abc(2)) - y_; }
0
8d77c2d5ac4c0279bc5e556bf18c71cc
6db7a7ac1ac77bbb90766a000796683a
清除矩阵中的数据
for (let boxIndex = 0; boxIndex < 9; boxIndex++) { const boxPoints = utils.queryPointByBox(boxIndex); const box = []; boxPoints.forEach(p => { box.push(this.matrix[p.rowIndex][p.colIndex]); }); const checkBox = checkArray(box); for (let cellIndex = 0; cellIndex < 9; cellI...
0
3a67a4ce2f6b3d04e51b43902ed6793d
529c7063c6a32e22506768e6c0b75c67
Gets the score for the specified game.
@Entity public class Player public Score getScore(Game game) { return scores.stream().filter(p -> p.getGame().getId() == game.getId()).findFirst().orElse(null); }
1
01ed5640c5ef45bc2145d400891efb5c
736b56dab8896d86d8f98d7531a443b9
Returns current HtmlBuilder instance.
if (!$this->UrlBuilder) { $this->UrlBuilder = new UrlBuilder(''); } return $this->UrlBuilder; }
0
f36438ec17e2d5bac5847bffbb0ea90a
7f0bf352e111ea221cbfcc69e4af36ad
@brief To disable non-secure jtag
void sys_jtag_off(void) { Pinmux_Swdoff(); }
1
993890e5121af563ad6501966a7657b4
55d9a5aa826dc9d3aee51a7089022707
清楚行内样式,保留换行
function cleanUpStyle($str){ $str = preg_replace('/\s*mso-[^:]+:[^;"]+;?/i', "", $str); $str = preg_replace('/\s*margin(.*?)pt\s*;/i', "", $str); $str = preg_replace('/\s*margin(.*?)cm\s*;/i', "", $str); $str = preg_replace('/\s*text-indent:(.*?)\s*;/i', "", $str); $str = preg_replace('/\s*line-height:(.*?)\s*;/i'...
1
57a59aa308c078ea3e9ebe56b72d4a94
58f3feae62f5bc63461c3f440e4f2b92
Updates Range of Times in the state (Integer Index of 15 minute increment)
export default class Timeseries extends React.Component updateRange(event, value){ this.setState({rangeShort: value[0], rangeLong: value[1]}); }
1
44be184e729e95f6121daefe73df7bdf
5367dc9e22077723355ff84c9ad4e2d2
Retrieve all instances of the relevant model from the database.
def model_get_all(context, filters=None, sort_key=None, sort_dir=None): return IMPL.model_get_all( context, filters=filters, sort_key=sort_key, sort_dir=sort_dir, )
1
60dc23df0e11308b6195653f979abac5
5a178e2983283229c2ce46e7028d0258
returns the price range of the product in a string
class Mango_AjaxList_Model_Layer_Filter_Price extends Mage_Catalog_Model_Layer_Filter_Price public function getPriceRange() { return $this->getMaxPriceInt(); }
0
3be1b4ca83d2dbcd0921facbcdbd09a2
7f61448ad6da3ef0f9cb03f40c5be655
(3.7) Аналоги-заменители
cases like (1)
0
250ed9d4253ee565255dc5de0c5ed860
7db085b42e4fb02d693f831734d25f4a
Возвращает окончание файлов шаблонов и темплейтов
class Rune_Runic public function getTemplateSuffix() { return $this->_templateSuffix; }
1
c9e7df99b14c4259214c439677b9b05a
1be81a8bca768cdb59c8464aee458469
The hooks is executed after fetching the list of relation resources.
abstract class BaseBackendController extends BaseController implements BackendControllerInterface protected function prepareRelations() { return []; }
0
ce2709011b6235164b08f24753d0d111
a6ab2624dec88f97f8ac12ef07e4347f
Remove all EveryTime Events with the specified Function
namespace DPSF public class DPSF<Particle, Vertex> : DrawableGameComponent, IDPSFParticleSystem where Particle : DPSFParticle, new() where Vertex : struct, IDPSFParticleVertex #else public class DPSF<Particle, Vertex> : IDPSFParticleSystem where Particle : DPSFParticle, new() wh...
0
5b6670aac0e8f5e4cc002020d5a753af
8b5f926d0ba83c592b88f1454fe1fa10
Дан массив размера N и целые числа K и L (1 ≤ K ≤ L ≤ N). Найти сумму элементов массива с номерами от K до L включительно.
namespace FindSumInArray class FindSumInArray static void Main() { Console.Write("Enter sum S="); int s = int.Parse(Console.ReadLine()); Console.Write("Enter how many element will be in the array N="); int n = int.Parse(Console.ReadLine()); int[] ...
0
1afa39222ba9d77e1184263d555192e6
d32564e7259029cd8f12820d583ca613
Changes gender integer to more understandable string form
{ return $genderNumber == '1' ? 'male' : 'female'; }
1
3268f0d6c4a7c8c5bbac8c9f5025a284
1ede9eab3f0bd77148a391a88587ee9d
The current of the LED. The value is in units of 10mA and can only be set to 0 (0mA/off) to 20 (200mA). See the datasheet for how LED current impacts proximity measurements. The default is 200mA.
class AS726x: def indicator_led_current(self) -> int: return self._indicator_led_current
1
af881d65ac2869b1258b8b39585f504e
ca42c5de46faa6a081cabf71c7cb9d7a
simple http handler just lists what URL you hit
self.send_response(http.HTTPStatus.OK) self.send_header("Content-type", 'text/html') self.end_headers() html = boilerplate_prefix + "The URL requested was: " + self.path + boilerplate_suffix self.wfile.write(html.encode('utf-8'))
1
55aa8288b04d641611d8294d1e53c941
00398af7f27cb8673840361faf850635
Возвращает массив захваченных событийы
class event static function getEventsListFire() { return self::$aEventsListFire; }
1
2fe7bfa48c2270193346f1227dc5b184
41549c88988697b39e0908d43f64b552
Construct node representations from node attributes through deep neural network
class StructureNN(Module): def __init__(self): super(StructureNN, self).__init__()
0
7991d60a8b7dc0b79d870896c2760347
5e50760cdf2c7d344c788ae935e435de
Devuelve atributos del componente léxico en un diccionario
public class ComponentLabel public List<XMLAttribute> getAttributes(){ LinkedList<XMLAttribute> list=new LinkedList<>(); for(Map.Entry<String,XMLAttribute> entry:attributesList.entrySet()){ list.add(entry.getValue()); } return list; }
0
765459385d79e97f8a2a8f2c640ea9e1
4624ea4a9bd377c07f2b6b4baa2315b7
Returns child count of current COM object.
try: return i_accessible.accChildCount except Exception as ex: if isinstance(ex, comtypes.COMError) and getattr(ex, 'hresult') \ in (CO_E_OBJNOTCONNECTED,): return 0
1
78b86d13464de0e3646c75e17498237e
efe63afc3dee43f6daa35c69c7c388d2
true if the method starts with `on_`
class SpaceAge def respond_to_missing?(name, include_private = false) name.to_s.start_with?('on_') || super end
1
40c6438eaf053ea0a61b211032aac5f4
fc95f6e3ce89e7174e6afee94901be97
Brief blink of status LED to indicate... something.
void TerminalController::statusTask() { float val = (exp(sin(millis() / 2000.0 * PI)) - 0.36787944) * 108.0; analogWrite(STATUS_LED_PIN, val); }
0
a728815865fd8f7b23f0084a472b234e
e80e5de4659a69983a8dc069bc9676ac
Get the human readable address of this Location. This function omits parts of the address that weren't provided.
class GeoHelperLocation extends GeoHelperLatLng public function fullAddress() { return !is_null($this->full_address) ? $this->full_address : $this->toGeocodableString(); }
1
e2cd06f79f36483ff85065e280a47311
bfb7995421d0bd1460e90fe66435603b
跳转到创建的房间
public class SearchActivity extends AppCompatActivity @Override protected void onCreate(Bundle savedInstanceState) @Override public void onClick(View v) { Intent intent = new Intent(SearchActivity.this, CreateRoomActivity.class); startActivityForResult(intent, CREATOR...
1
7bc456279317f2919fa36d479c418740
e2ad99870de383fa7beb2300c3bed730
Convert from RGBM-esque storage to linear light
for i in xrange(0, len(args.colors_light)): args.colors_light[i] = (args.colors_light[i][0] / 255.0, args.colors_light[i][1] / 255.0, args.colors_light[i][2] / 255.0,) for i in xrange(0, len(args.colors_medium)): args.colors_medium[i] = (args.colors_me...
0
5730e3c5c7518d93114e55c8ab0e2eb6
b03df813fda1772673b8a8c68b2d43ed
Is the atom log-log convex?
class power(Elementwise): def is_atom_convex(self) -> bool: return _is_const(self.p) and (self.p.value <= 0 or self.p.value >= 1)
0
17e184b7f283f7ef19dd9f5e6924c6ec
d94d4d53a43a14562240ebbc9336403c
Makes directory, returns TRUE if exists or made.
public function makeDirectory(string $dirname): bool;
0
8474dffb068a6d2a40d25266a4b862a3
29acc047786ff74e2649aaaea4ae0257
分析get参数,如果有get参数中的s,就分析s参数得到模块,控制器,方法,如果没有s参数,就取默认的模块,控制器,方法
class Router private function analysis(){ $pathinfo = isset($_SERVER['PATH_INFO'])?$_SERVER['PATH_INFO']:null; $parsed = explode("/",trim($pathinfo)); array_shift($parsed); $module = !empty($parsed[0])? $parsed[0]:C("default_module"); define("__MODULE__",$module); ...
0
6d7159932a30dcee54234bb507395cbc
1116eb4f4a0913c0e9b59825e541e45b
Get updated job parameters based on the epoch_progress and cur_epoch.
class _TrainingJob(_Job): def _get_update_args(cls, estimator, profiler_rule_configs, profiler_config, resource_config): update_args = {"job_name": estimator.latest_training_job.name} update_args.update(build_dict("profiler_rule_configs", profiler_rule_configs)) update_args.update(build_dict("pr...
0
211931d30f14efde23d9dc134689ce66
f343e2e66395aa585dc6d589070f0d94
Get the timecode at the start of the fade.
public class FadeShotBoundary<T extends Image<?,T>> extends ShotBoundary<T> @Override public VideoTimecode getTimecode() { return this.getEndTimecode(); }
0
f4fcb5da5b7bcc008b88aa67cc8539d9
dd94afd3f56d2daeff1e9aa1eb3ff0e2
evConnected() Logs into the IRC uplink. inputs - Connection outputs - 1 on success or 0 on failure
data = ECPacket((codes.op['server_connect'],[])) response = self.send_and_receive_packet(data) return response[0] != codes.op['failed']
1
d958f9e0ca7ec67f76989279b1700518
251c002a8fbf5f6738b37cb474ff9bc5
通过站点和消息头获得所有要执行的功能
if (!isset(self::$_info[$webname])){ return FALSE; } $functions = self::$_info[$webname]['function']; foreach($functions as $fun){ $ret = self::$fun($url); if (!empty($ret)){ return $ret; } } return FALSE; }
0
5d09f2592da4ae93f1cca0de342a7ebe
06e2979b70db2d509651e73c34314c27
calculate the radius of the model by the dimensions of its box collider.
public class UnitController : PhysicsController protected void SetColliderRadius() { CircleCollider2D myCircleCollider = GetComponent<CircleCollider2D>(); if (myCircleCollider != null) { colliderRadius = myCircleCollider.radius; return; } colliderRadiu...
0
77cf6b432a41c495bb7f96120cb7c9ce
f6a09d16de7f4c5fbbaf0b13d5ead950
Converts rebar diameter as String to double.
try { return (Double.valueOf(value)).doubleValue(); } catch (NumberFormatException e) { throw new DataFormatException(e.getMessage()); } }
1
a8777559bd84b39c7de9debda92823ed
54fa320eb200e95d4f43e7705967940c
当前向 direction 走一格的坐标
class Snake: def get_next_step(self) -> Coord: return self.body[-1] + DIRECTIONS[self.direction]["coords"]
1
d8b4dbb2526015b38060253022c2b6c2
4c193c0bd984dd6700518b4a5a8fa532
Get the DSA identification string
class Rsa(object): def getId(self): x = self.dumpKeys() return hashlib.sha1(x[0]).hexdigest()
0
ba0c0a2aa5bc1238b8ad71df7c8d5fc4
4abf4dcdbacf10e640a4f1c6b9ed30b1
Pobieranie listy wszystkich kontrahentów
{ List<KontrAgent> kontrAgents = new List<KontrAgent>(); using (IDbConnection db = new SqlConnection(connectionString)) { kontrAgents = db.Query<KontrAgent>("SELECT * FROM KontrAgents").ToList(); } return kontrAgents; }
1
87c8718c2e12a75c844ea5f6aac591ae
1c2e8d5fd37ab7cc407abb2ae87c1a23
Add the flip screen icon to the menubar.
icon_path = ':/plugins/buffer_clip/icon.png' self.add_action( icon_path, text=self.tr(u'Buffer Clip'), callback=self.run, parent=self.iface.mainWindow()) self.first_start = True
0
c741f1f56c38af5d7628fc7e3c8edfad
f8f6ee1fa5a6965be10213c95c6dc7b3
returns commandline args as a Lua table
local result = {args = {}, input = ''} local function f(t) local keys = {} for k = 1, #t do keys[k] = true local v = t[k] if type(v) == 'table' then f(v) else table.insert(result.args, v) end end for k, v in pairs(t) do if k == '__input' then result.input = result.input .. v e...
1
387cf6cd8b247d7178c8a2bdda1edc49
b5fbd7accd4789ccd3d84d8ab36cbb40
========== Update player prices function ==========
public class Drugs : MonoBehaviour void updatePrices () { if (PlayerCharacter.playChar.hours == 12 || PlayerCharacter.playChar.hours == 0) { RandomizeProductPrices (); } }
1
8402d6ad1b2e76532298b972fb5a1001
ee083b0c930db612e287d56fa70f2a7c
This API is used to create a key pair.
def start_new_key_pair_request_with_http_info(body, custom_headers:nil) start_new_key_pair_request_async(body, custom_headers:custom_headers).value! end
1
47c309bf5459f9071918775a153ab2f8
12b2970b9f23534674f6b7f9cbeb235d
获取 npm 依赖
return new Promise((resolve) => { const {spawn} = require('child_process'); const os = require('os'); const result = []; const npm = os.platform() === 'win32' ? 'npm.cmd' : 'npm'; const fetch = spawn(npm, ['view', '--json', pkg]); fetch.stdout.on('data', (data) => result.push(data)); fetch...
1
78af7e980420828b59d19cb9efcbed63
f3f74e12931466c17f0772cb782e623e
Returns the action name associated with a particular action ID
{ switch (intval($action)) { case self::COPY : return self::ACTIONNAME_COPY; break; case self::VERSION : return self::ACTIONNAME_VERSION; break; case self::INITIALIZE : return self::ACTIONNAME...
1
4867242a7751815499a45e3d582cd73a
d9fd85160c8b4cf9532346823de3f75d
! \brief delete structure for storing coding state
static void swbs_dec_free_state_data(OPERATOR_DATA* op_data) { SWBS_DEC_OP_DATA* x_data = get_instance_data(op_data); patch_fn_shared(swbs_decode); if (x_data->codec_data != NULL) { aptXDecode_KalimbaFreeMemory((void*)x_data->codec_data[0] ,(void*)&x_data->codec_data[0], 1); pdelete(x_da...
1
100953a0d5342eb294c64572e34fb22b
c2d74a831afa7f0b070c06ec4dd17b0f
Converts the bitmaps into a board.
{ if (columns <= 0) throw new ArgumentOutOfRangeException(nameof(columns)); var rows = (Tiles.Length / columns) + (Tiles.Length % columns > 0 ? 1 : 0); var fb = new DirectBitmap(columns * 8, rows * 8); for (int i = 0; i < Tiles.Length; i++) ...
1
e6f1a2a4f21250264d3eef6e76c26749
e7a82abe7d46591d1f239c0212cde036
Upon completion of the sketch, it is cleared and no further action is done.
class SketchControl clear() { this.levels = undefined; this.layers = undefined; this.sketchLayerToEdit = undefined; this.sketchObjectToEdit = undefined; this.sketchPathToEdit = undefined; this.editing = undefined; this.sketchPathToEditPoint = undefined; this.cursor = undefined; this....
1
7b360526b916256200b5b8ab1b477d58
f3cfe8d0191d007f5d1db5927892c01a
刪除參數指定編號的資料
namespace Peacock.PEP.DataAdapter.Implement public class ParameterAdapter : IParameterAdapter public void Delete(long id) { ParameterService.Instance.Delete(id); }
1
afa2a297a42268854a6b8889d45547e3
36da4a741250286d3ddaf9929309cc23
Adjust sample sizes to be as close to the target cost as possible.
if goal_percentages is None: return df if not positive_oversampling: pass total_rows = np.empty(len(targets)) for i in range(len(targets)): condition = df[targets[i]] == 1 total_rows[i] = len(df[condition].index) // goal_percentages[i] i_min = np.argmin(total_rows) ...
1
f24a21b8e25f658f2e271bea8e939ab8
0897ae8cd627d8fc5224da4eeefff809
创建调用合约交易, 并提交到链上
args = deepcopy(args) private_key = kwargs.pop('private_key', None) if len(args) == 0: args = ({},) args[0]['from'] = private_key_to_address(private_key) gas_limit = args[0].pop('gas_limit', GAS_LIMIT_CONTRACT) gas_price = args[0].pop('gasPrice', GAS_PRICE) ...
1
d1d13de58bcad84857bbfdf6d8593749
36862b74fbe6e1a0d9dc9880dc8a5350
同じ日を検索。
public class CalendarView public static boolean sameDay(Calendar cal1, Calendar cal2){ if (cal1 == null || cal2 == null) return false; return (cal1.get(Calendar.ERA) == cal2.get(Calendar.ERA) && cal1.get(Calendar.YEAR) == cal2.get(Calendar.YEAR) && cal1.get(Calendar.DAY_OF_YEA...
1
05f6950059f9489eadf4a2becaaf34d5
c7f89aa5eb4810bbecd87238eb9aabf2
Mapea un modelo proveniente de Business a una entidad de DataAcces
namespace Aga.GestionDeArchivos.Services public static class Assembler<TEntity, TDto> where TEntity : IDomainEntity public static TDto ToDto(TEntity source) { return Mapper.Map<TEntity, TDto>(source); }
0
8f9d103da837144016bef9409389f8e1
5f4ade7b808a28b0452e7b2df97dd8db
aids in computation of the transfer matrix
numerator = Xi.sum(axis=0) denominator = np.kron(Gamma[:-1], np.ones(Gamma.shape[1])).sum(axis=0) A_ = (numerator/denominator).reshape(Gamma.shape[1], Gamma.shape[1]) return A_
1
0e80542c5f7cea5b53ba4636b0ba5701
12d384b9870b7121f0f6e2ee33e9b472
Convert 32 bit internet address to dotted text. Derived from traceport.c written by Andy Fullford (akfull@august.com).
char * intoa(u_int32_t addr) { register char *cp; register u_int byte; register int n; static char buf[sizeof(".xxx.xxx.xxx.xxx")]; NTOHL(addr); cp = &buf[sizeof buf]; *--cp = '\0'; n = 4; do { byte = addr & 0xff; *--cp = byte % 10 + '0'; byte /= 10; if (byte > 0) { *--cp = byte % 10 + '0'; byte ...
1
67123ef9c5fa47eef5fbed99e0c345c9
be8604acab84e1c68b91438da8acc1a7
check if crop is already available before creating field
class Crop def create_field(type) if @@available_crops.include?(type) return true else return false end end
1
1d6a3d9c8680641caeacbafe80206f06
44986d405ec60e32dbfd35a5c3b71d69
Check if the bit is set, if so the survival-level is completed
bool CGenerator::LevelCompleted(){ if(EnemyBOSS1) { if (EnemyBOSS1->Dead == true) { DeadTime = SDL_GetTicks(); return true; } } return false; }
0
ce8999600bbb10699b6cf9e1ba44ea31
8c8f0a9eedf33dcbf38a2a59a461dbea
合并配置 将$source的配置合并到$dest中
foreach($src as $key=>$value){ if (!isset($dest->$key)){ $dest->$key = $value; } } return $dest; }
1
d802fc9701e647716574cd73895033ee
028f95bd258c792362eba7ca362a159a
Function to get the prop bet total for the week
class Game: def get_3bvps(self) -> float: if self.get_elapsed() == 0: return math.inf else: return self.mf.bbbv * self.get_prop_complete() / self.get_elapsed()
0
493c155fdfae6efd66cd348e10687aec
e59b48257c00c6fa156ea0f4b250e162
Получение студентов которые есть у учителя
namespace Add_Type public class Parent public List<Student> GetStudents() { List<Student> liststudents = new List<Student>(); using (SampleContext db = new SampleContext()) { var students = from p in db.Parents join sp in...
0
0e1d2ca2890c8abbe10736474cc0768c
cc1239938bc45c85b48d3d3297168cb6
returns dictionary with key == isoform and value == [gene id, transcript id]
def pasa_transcript2gene(input): mRNADict = {} with open(input, "r") as transin: for line in transin: if line.startswith(">"): line = line.rstrip() line = line.replace(">", "") cols = line.split(" ") mRNAID = cols[0] ...
0
efae24cc9119ae718de672ea5acc736c
d79e3407fed575b9f760cc07dacfbb8a
Get the client messaging mode
public class RcsSettings public int getMessagingUx() { int result = 0; if (instance != null) { try { result = Integer.parseInt(readParameter(RcsSettingsData.MESSAGING_UX)); } catch(Exception e) { e.printStackTrace(); } } re...
1
96b9fbebc93f180dfd1f41306afe219c
19822751e90082bb49ed6979b038a8fa
取得给定日期为所属月份第几周,日期格式为yyyy-MM-dd 日期格式为yyyy-MM-dd
Calendar cal = parseCalendar(formatDate); int year = cal.get(Calendar.YEAR); int month = cal.get(Calendar.MONTH) + 1; int dayOfMonth = getDayOfMonth(formatDate); String monthStr = month >= 10 ? String.valueOf(month) : "0"+String.valueOf(month); String beginingOfMonth = year+""+monthStr+"01"; int da...
1
fe3935c457d124b71b419ba7eaaaa446
231e060bb63148ca2639db7cebea8273
Gets an array of DrugComponent objects which contain a foreign key that references this object. If the $criteria is not null, it is used to always fetch the results from the database. Otherwise the results are fetched from the database the first time, then cached. Next time the same method is called without $criteria, ...
abstract class BaseContentComponent extends BaseObject implements Persistent public function getContentComponentsRelatedByNextVersion($criteria = null, PropelPDO $con = null) { if ($criteria === null) { $criteria = new Criteria(ContentComponentPeer::DATABASE_NAME); } elseif ($criteria instanceof Criteria) ...
1
f9109de594b026963ff31598d1c2f876
7d0d92bb125ba63f0c819c80ba9e084e
https://www.geeksforgeeks.org/longest-subarray-consisiting-of-unique-elements-from-an-array/
int main() { int arr[] = {1, 56, 58, 57, 90, 92, 94, 93, 91, 45}; int n = sizeof(arr)/sizeof(arr[0]); cout << "Length of the longest contiguous subarray is " << findLength(arr, n)<<endl; int arr1[] = {14, 12, 11, 20}; n = sizeof(arr1)/sizeof(arr1[0]); cout << "Length of the longest con...
0
47899191abd60c489c965818152f67c7
662732c52502ab60595fb70db4330b47
u""" 获取app的pid
cmd="adb shell ps | findstr com.fcuh.consumer" stdout = exe_adb_cmd(cmd) if stdout[0].split()[0]: m = re.match(r'^u0_a(\d+)$',stdout[0].split()[0]) if m: return int(m.group(1))+10000; else: print "APP uid not exist!"
0
7f5b964ccd93f89b75ed4dae7ae4d5e5
04cc7bebdce0d63881b7a54c26786b98
This Builder implementation uses the OSGi Service registry to find matching JNDI service providers for resolving references.
public final class ComponentRegistryServiceProvider implements ServiceProvider<ComponentRegistry> @Override public void start(Properties properties, BuildContext context) { }
0
8511d4fb2fa3bee2c7038ebf555b8a34
18c35235b5f2349902665aaadf38ed23
Send stream data to a peer and wait for a response for the specified timeout duration.
ssize_t sendto_timedwait(int fd, const void * msg, size_t len, int flags, const struct sockaddr *name, int namelen, struct timespec * timeout) { char buf[STREAM_BUF_SIZE]; struct T_unitdata_req * req; struct strbuf dataptr; struct strbuf ctlptr; ssize_t ret, prio; req = (struct T_unitdata_req *)buf; req->P...
1
1ae260e64572ac9b24d1a5de241ff6e9
51b46d081d90a79a5e3cd106dc25a059
Drawing the 8 symmetric points of circle
{ setPixel(xcenter + x, ycenter + y); setPixel(xcenter + y, ycenter + x); setPixel(xcenter - y, ycenter + x); setPixel(xcenter + x, ycenter - y); setPixel(xcenter - x, ycenter - y); setPixel(xcenter - y, ycenter - x); setPixel(xcenter + y, ycenter - x); setPixel(xcenter - x, ycenter + y); }
1
888ad1c44b34ecf12613370b15c4063e
ad45c63b6e54c2d9194207ab34dc4ef2
Show all recent meals, most recent first.
class MealsController extends Controller public function index() { $meals = Meal::all(); return view('meal.index', ['meals' => $meals]); }
0
b9f8a5cd063a6b9ff1b42ad45ce7406e
8e4897136668dceddeb1c3d3650b39e7
找回密码第三步:重置密码
@Controller @RequestMapping("/reg") public class RegisteredController extends BaseController @RequestMapping(value = "/fgTwo", method = RequestMethod.POST) @ResponseBody public ResultDto fgTwo(@ModelAttribute @Validated(FgTow.class) ForgetForm form, BindingResult result, HttpSession session) throws Exception { ...
1
9cce6bda878b12fc070028216ce3a710
f467ce897917ab07ff8c215694845119
проверка на ошибочное отключение всех наборов, кнопка "англ - низ"
function checkError110( v21,v22,v23,v24,v25,v26,v28,v29,v2101,v2102,v2103,v2104,v2105,v211,v2711,v2712,v2713,v2714,v2721,v2722,v2723,v2724,v2731,v2732,v2733,v2734,v2741,v2742,v2743,v2744,v2751,v2752,v2753,v2754,v2761,v2762,v2763,v2764,v212,v31,v32,v33,v34,v35,v36,v37,v38,v39,v310,v311,v312,v41,v42,v43,v44,v45){ var...
0
fc38a2ba57d90c18f3883b6adc523666
9314aa098ccd422569e65845f9de82ca
발주신청전인 발주건을 발주완료상태로 변경
public void repealPayable(PurchaseInventoryDTO purchaseInventoryDTO);
0
58fd921c8136aab7ee4750ef06daae98
746cc604efb74c1cd483e400c064af71
Read number of bytes from input data source (file or socket). If end of data is reached it raises EndOfDataError(). Sockets might not return all requested data at once, so use an io buffer to collect all data needed in a loop.
data = '' while True: l = len(data) if l == num_bytes: return data else: read_data = file.read(self, num_bytes - l) if read_data == '': raise IOError('Could not read enough data.' ' Wanted...
1
d77a9f9eeb2403aaaf1a839ac88f4e96
9a5e7389f64c8a6b59100bb4d16274bb
Implementation of the EXPN command; server will list all persons who are members of the list.
public String[] listMembers();
1
6ecaaa230fa1264a6337b146647a55f1
f910111e54691f93bb804d58d3cc2da9
获取连接数信息
IntegerResponse getConnectionCount();
1
ddea65a78e06bd1be53b59a1c949b11d
60eba3cc237088abc373ec1b0936de57
Stop painting when user is not clicking the mouse
namespace Painter public partial class PainterForm : Form private void pnlCanvas_MouseUp(object sender, MouseEventArgs e) { shouldPaint = false; }
1
dae03c0462afb7b3b000a496316e7b37
6ee18575ecd3bfc5d15614d314558f5a
Sets the role if it's not yet set
class User public function setRole(?Role $role): void { $this->role = $role; }
0
03e09845e49fce5b5a1c3adb0ff44bbc
4e2abe666b14864e7448a2e74c5468fe
Halts execution of the XT host subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
static void syscall_halt (void) { power_off (); NOT_REACHED (); }
1
0e8307d74c28340f0f6b7508267d5c42
e433a2c6330c90fe911c15954a056d78
한 개의 문서에서 명사(noun)만 추출하는 함수
tokens = word_tokenize(sent) pos_tagged = pos_tag(tokens) return [word[0] for word in pos_tagged if word[1] == 'NN' or word[1] == 'NNS']
1
bbcd5095d639a1cdbc1ffae5662a1eea
7f79a1c0eff7d4c262fb45816f5aa637
Dada una foto que acaba de ser enviada por el método post, la guarda en un fichero físico.
var tmp_path = req.file.path; var target_path = req.file.destination + req.body.nombreImagen; return fs.readFile(tmp_path, function(err, data){ fs.writeFile(target_path, data, function (err){ return res.send('Recibido y funcionando'); }) }); }
1
4939608a282b9d85051434f8b442783b
39b82091d15ed986e91aaf559193ad96
Clear denominators in `f`, but keep the ground domain.
if not u: return dup_primitive(f, K) if dmp_zero_p(f, u): return K.zero, f cont = dmp_ground_content(f, u, K) if K.is_one(cont): return cont, f else: return cont, dmp_quo_ground(f, cont, u, K)
1
3110e4e37c4fdc93837ccd2bace9884b
b8cf4307e79cf651050c08605ed86d93
Reverts the name changes on the affected assets.
namespace GameCore public partial class AssetIndexer : ScriptableObject public void Rename(string Old, string New) { NameList[NameList.IndexOf(Old)] = New; InfoList[NameList.IndexOf(New)].AssetName = AssetUtility.GetAssetName(New); }
0
60e7e7130ea6829e5bf816bfcdfae727
489f768914d41ee909ee850a9ca38f75
Retrieve Zip archives from a web URL.
{ var tempFileNameBase = Guid.NewGuid().ToString(); var tempDownloadPath = Path.Combine(Path.GetTempPath(), tempFileNameBase + Path.GetExtension(remoteFileUrl)); DownloadFileFromWeb(remoteFileUrl, tempDownloadPath); await UnZipAsync(tempDownloadPath, localExpanded...
1
ae75d27afbe090a6881e0923d456d773
d097ff3dc0ac089ad38eed6cf7a4b803
clear 12_24 bit to use 24 hour clock
unsigned char byte0, byte1; byte0 = DS3231_GetInfo(HOURS); switch((byte0 & 96) >> 5){ case 0: case 1:byte1 = BCDToDecimal(byte0); if(byte1 == 0) { byte1 = 12; byte1 = DecimalToBCD(byte1); byte1 = byte1 | MODE_12HOUR_PM; break; ...
0
54144d585f2bd0b8f7379acd38c24f6a
7953cbd24468008a06c5e6db01c8e695
Returns an error message if redis is unavailable
def offline_error(): return colored('No available internet connection\n', 'red')
0
7417d2d49b086d6972d4eb535f23bd62
97c200e1bd22f9a1579d2e346903b66e
\brief Fonction pour générer une matrice creuse.
{ int i; srand(time(0)); for(i = 0; i < TIPO_MATRICE*TIPO_MATRICE; i++) { matrice[0][i % TIPO_MATRICE][i / TIPO_MATRICE] = rand() % 101; matrice[1][i % TIPO_MATRICE][i / TIPO_MATRICE] = 0; } }
0
c53903d2c676feb905a1714268302d64
b4842000618369c54a37b2b751c40b92
设置租赁总数
public class RebatesOrderModel public void setLeaseAmount(Integer leaseAmount) { this.leaseAmount = leaseAmount; }
1
59a53488b581a674f7bf027ee2334f1c
29490590347e30db41999c90bdb8610a
Carries out the text pre-processing for the LSTM model. Changes are done in place. INPUTS: df: Dataframe with data col_name: text column clean_col_name: Name of new column to hold the clean data
df[col] = df.loc[:, col].map(lambda x: x.lower() if isinstance(x, str) else x).\ map(lambda x: x.replace(' ','') if isinstance(x,str) else x).\ map(lambda x: x.replace(',', '') if isinstance(x,str) else x).\ map(lambda x: x.replace('.', '') if isinstance(x,str) else x)
0
5f2f3a7663728a94a36158d79ca9dc9b
89e3c8afb3487cac8d488f31019a5d1b
! \brief Get current CAD RSSI level for channel clear
{ uint32 tmp; #ifdef HAL_DEBUG MSG(MSG_SSID_QDSP6, DBG_HIGH_PRIO,"@HAL_rs_get_cur_channel Begin\n"); #endif reg_rd(rs_base_virt_addr + LPASS_RESAMPLER_STATUS, &tmp); #ifdef HAL_DEBUG MSG(MSG_SSID_QDSP6, DBG_HIGH_PRIO,"@HAL_rs_get_cur_channel End\n"); #endif return ((tmp & LPASS_RESAMPLER_STATUS__CURRENT...
0
06d3d9472735854916d1434357fef0e4
51608b2490f0a06ec3d9ff80220432d6
Get step size value from slider
public class Config protected int getSliderValue() { return sliderValue; }
0