query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
35c4436c58343357bb3811df8ba4062d | ef79dabc03acfac84a70c1ffea9b0d9f | Removes an item from the list.
`item` item to remove from the list. | const foundAt = this.find(item);
if (foundAt > -1) {
this.dataStore.splice(foundAt, 1);
this.listSize--;
return true;
}
return false;
} | 1 |
b3df9f0e277ba0bd5ad15a00f81d7146 | 90e90f23569db0990ef0fcd1941efe8a | Gets the HTTP request configuration that ensures the followed redirections are in scan's
scope. | {
return new ImmutableApplicationDependencyInjectionConfiguration( useRequestScopes: this.UseRequestScopes, useHttpApplicationScopes: this.UseHttpApplicationScopes );
} | 0 |
c816d7de931cb796147720693e2829a2 | ffe44dc710c8bb351aea8a9c0ff479ff | Get the fraction-of-a-second of this date. | class Zend_Date extends Zend_Date_DateObject
public function getMilliSecond()
{
return $this->_fractional;
} | 1 |
41ca1d56e8f4aeeed38f0158368ffcdf | 048fdbdba43328c23be18e08baa3db1d | Handle IO params marked with > or < | func resolve(current string, delimiter rune) lexer.TokenType {
if _, err := strconv.Atoi(current); err == nil && (delimiter == '<' || delimiter == '>') {
return IO_NUMBER
} else {
return TOKEN
}
} | 1 |
0e4d1132cd516cb273d54b68887764fd | 56ab03e2eec8b3e0d3b4a0278870adb2 | process things, and if we encounter an error, ensure that
we fail all outstanding requests | mca_failring(mca_ring_t *ringp, uint16_t errno)
{
for (;;) {
mca_request_t *reqp;
mutex_enter(&ringp->mr_lock);
reqp = (mca_request_t *)mca_dequeue(&ringp->mr_runq);
if (reqp == NULL) {
ringp->mr_timeout = 0;
mutex_exit(&ringp->mr_lock);
break;
}
reqp->mr_flags &= ~MRF_ONDEVICE;
mutex_exit(&ring... | 1 |
32f09253f8f5bba412ebcac799f58eed | be3fc50804b745e1ccda6d6a344bd93e | Calculates the number of steps and the other calculations related to them | if not hasattr(self,"stepsize"):
self.stepsize = {}
if not hasattr(self,"number_of_steps"):
self.number_of_steps = {}
if self.isRZ():
self.xmin = -1.*self.coordinates["r"].max()
self.ymin = -1.*self.coordinates["r"].max()
else:
self.xmin = self.coordinates["x"].min()
... | 1 |
ba5afa15c1b89ce9c429eecc2f243555 | 0e694bbdd95d6eb08f83c8121f8f2c4d | returns true, if the user has bought the item | boolean hasBoughtItem(Item item); | 1 |
2f8b31ac8edd5646d9b484b30d0eb1d6 | 340a1a51f05c4dc8e06dd321a0417247 | Show the last page of the report. | namespace AllegisGroup.ACT.Web.UI.Report
public partial class Reporting : Page
protected void btnSupplierUsersLast_Click(object sender, EventArgs e)
{
this.rdSupplierUsers.CurrentPageIndex = this.rdSupplierUsers.PageCount - 1;
this.BindSupplierUsers();
} | 1 |
0b03e732e575a950be01403ee189183f | 6cab1189fa476dbbbc0178702329ebba | 当鼠标移出按钮时,切换图片 | namespace Timer
public partial class Mainmenu : Form
private void pictureBox3_MouseLeave(object sender, EventArgs e)
{
pictureBox3.BackgroundImage = imageList1.Images[2];
} | 1 |
3499ef97caa6f50fbba1c8b91fd93fb0 | 56ec05cddb105414f3b8546e62db95fd | Ensure that ``default`` and ``factory`` calls to ``FParameter`` produce
expected ``default`` ivar result (or raise). | factory = self.test_construct()
instance = factory()
assert factory
assert instance | 0 |
bffcd8389dcb4270370bc878418109cb | c282caa1367210c4d3918b0ef56a2a3e | This adds a property descriptor for the Ignore feature.
<!-- begin-user-doc -->
<!-- end-user-doc --> | itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_AggregateDefinition_ignoreInvalidCorrelationKeys_feature"),
getStrin... | 1 |
9db29f336e1ee06f76df2ab308aec9ea | 726f49b1faa1d309cef350444786a14c | Connects to server at `address`:`port`.
Connects to a TCP server listening at `address`:`port` that implements
the protocol described in the file "Generic TCP I:O Protocol.md"
@arg address IP or address to connect to.
@arg port port to connect to.
@throw RuntimeError if connection was successiful but protocol isn't
sup... | mIsConnected(false)
{
memset( &mSockAddr, 0, sizeof(mSockAddr) );
u_long addr;
addr = inet_addr( pIPName );
if ( addr == INADDR_NONE )
{
struct hostent *pHostent;
if NOT( pHostent = gethostbyname( pIPName ) )
{
DASSTHROW( 0, ("Invalid address") );
}
addr = *(long *)pHostent->h_addr;
}
memcpy( &mS... | 1 |
f9cdd0dfc0a0409176b0575336c6a3d2 | f6b0904243c6b17ea9f029c6be20f420 | Метод, проверяющий, достигла ли снежинка точки назначения | if self.y < 138 and self.x < 20:
self.goal = True
self.alive = False
self.v = 0
self.xv = self.v * math.cos(self.r)
self.yv = self.v * math.sin(self.r)
return True
return False | 1 |
12d8fe2f69641aaac3015f2094c238fa | ac0183d2c434aa17607899c04e5ec9d6 | u"""测试点击打开豪华礼盒,播放获得动画 | try:
self.driver.find_element_by_accessibility_id("我的音乐").click()
sleep(sleepTime)
TouchAction(self.driver).tap(x=1108, y=902).perform()
while True:
matchString = "运动"
el = self.driver.find_element_by_android_uiautomator("new UiScro... | 0 |
0da2587d96ae8d4c64ba3d66416214ea | 9472765c7d7840b447382090e2e39ae5 | Permite relizar una busqueda de un Nodo cuyo id sea el pasado por parametro. No Realiza consultas en la BD | namespace Abstracciones
void SearchNode(int value); | 1 |
e89ef761ce84fe53b85e02c5dce2652e | cd1dfa0eef4a6774db39c1b4b5980fe9 | Function to generate Base64 hash from strings | try:
bytesString = text.encode(encoding="utf-8")
encodestr = base64.b64encode(bytesString)
return encodestr.decode()
except:
return '' | 1 |
492e64f40a422044ce3dce732f1aa5e2 | c02aa4a8b0fe1f2fc273cc8d3c5edfa4 | Returns a list of addresses for the given postal id. | public List<Address> getAddressListByPostalCode(String postalCode); | 1 |
d6308c8b672c7060e4f7690c63e70164 | ded628cfad2f752865864e6980a31679 | 查询房间是否有人员信息 | public boolean hasRoom(String openId) {
if(openId != null && openId != ""){
Integer count = roomMapper.hasRoom(openId);
if(count != 0){
return true;
}else {
return false;
}
}else {
throw new JcException("open... | 1 |
374c21a0837e37dcf26a026d1969fb84 | e1e0b95d26a90726c52429aebe91df4e | Returns first argument of the current command | class Parser:
def arg1(self):
if self.command_type != 'C_RETURN':
if self.command_type == 'C_ARITHMETIC':
return self.command
return self.parts[1] | 1 |
dea551d753564bcb2f4662ebd923bd82 | beef003d27a8dd8506392ec92ade729a | Checks if an argument is not an array | class TypeModule extends AbstractModule
public function isNotAnArray()
{
$this->failIf(is_array($this->data[0]));
} | 1 |
f98048abc8028e3483409cb26cbd58a7 | 3bda76f074af010ff1a997726c1aaa44 | Populate object from a CDM | {
if (objectData != null)
{
IObjectFactory of = session.ObjectFactory;
if (objectData.Properties != null)
{
Properties = new List<IPropertyData>();
propertiesById = new Dictionary<string, IPropertyDat... | 1 |
5689d20b63a488abd253f1008e3089a7 | b2dd89cd82a3f0f1f26f3ed04f1cd0c5 | Get pixel information (type, samples per pixel, etc) | MetaInfo['SizeC'] = np.int(jmd.getPixelsSizeC(IMAGEID).getValue().floatValue())
MetaInfo['SizeT'] = np.int(jmd.getPixelsSizeT(IMAGEID).getValue().floatValue())
MetaInfo['SizeZ'] = np.int(jmd.getPixelsSizeZ(IMAGEID).getValue().floatValue())
MetaInfo['SizeX'] = np.int(jmd.getPixelsSizeX(IMAGEID).getValue(... | 0 |
dcf102b399edc2e91fbee1f739a2f75e | 1fea65b94e745c39cb743fb771a5ad9d | Calculates the trigonometric sine of the object. | class PhysicalQuantity:
def sin(self):
if self.unit.isAngle():
return N.sin(self.value * \
self.unit.conversionFactorTo(_unit_table['rad']))
else:
raise TypeError('Argument of sin must be an angle') | 1 |
7f5087b087c19a93d751e144dd3b19d8 | 6db004f6fa841ad865731b0aa3f02ddd | Returns the time needed to read all response bytes, including connect time and server busy time. | export class GopherTimingInfo
public get recievingDuratrionMillis() : number {
return this.readCompleteMillis - this.readStartMillis;
} | 0 |
8ceda6d19daa3fbf079d8dfca5a4d86a | 23c42700799fd12ac65ae53f331376fb | Update transactions' settlement status and settlement dates | public List<InstructionInfo> updateSettlementDate(List<InstructionInfo> tradeData); | 1 |
612cbd897c47393ec996fa020c43683e | c5bb7820138be0c041878c01a5c0d278 | px 转为 sp | public class DimenisionUtil
public static int pxToSp(Context context, float px){
final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
return (int) (px / fontScale + 0.5f);
} | 1 |
3081043cd67a84cf79c7e051dbda34c4 | de8387c5657dd7ec7cb06c84cfba7c50 | 是否踢出后来登录的,默认是false | {
$strNeedKick = $needKick ? 'true' : 'false';
$this->args['needkick'] = $strNeedKick;
return $this;
} | 1 |
6d18f52f47bfe48e18437a1f6caba6f3 | 943855ff806b3f03714b66d63bd787e0 | 添加VB | unsigned int VAO::AddVBO(int size,int offset)
{
VBO* tmpVBO = new VBO(size,offset);
VBOs.push_back(tmpVBO);
return tmpVBO->VBOID;
} | 1 |
75c7cb2a728771bd97c7f64bff837238 | e952e190012803f02673ac577c1447a6 | Mark a model as embedded to avoid creating multiple indexes if the model is
only ever used embedded within other models. | class RelationalDocument extends EMongoDocument
public function setIsEmbed($value) {
$this->_embed = $value;
} | 1 |
dd766652e40e167e7ea6a7a9222c0167 | f7272b7a6ecb280e5d521291b9cb837a | Exponential Search Implementation | int i = 0;
while(true) {
if(i == n)
return -1;
if(arr[i] == key) {
return i;
}
i++;
}
} | 0 |
5cfe493dac5afccd65ba9f6513584049 | efb763a2da55c12aa3aae893347f33c2 | Removes all of the whitespace-only text decendants of a DOM node. | def strip_whitespace(xml_tree):
return apply_xslt_transform(xml_tree, STRIP_WHITESPACE_XSLT_PATH) | 1 |
2cefbd56496f3f7280336a3b30dc9657 | b682b7a93b90ccaaa825cbab8f44ffab | Transform the access for all protected/package-private entities to public. | public class FieldInfo implements IImportProcessor
public FieldInfo setPublic() {
modifier.setPublic();
return this;
} | 0 |
4429b6f43fafb921e9f90b24c24fda67 | 48d7f5127ffb106f5b172d85e683e780 | InvalidInvocationError destructor. | FunctionInvocationUnary::~FunctionInvocationUnary(void)
{
} | 0 |
505fc03ac829523a1d145b3a12b06f3d | 3908df24e14c283f9747dfff51be2e7a | POST: api/Bid | namespace swami2021.Controllers
[Route("api/[controller]")]
[ApiController]
public class WagerController : ControllerBase
[EnableCors("OpenPolicy")]
[HttpPost]
public void Post([FromBody] string value)
{
} | 0 |
40e05f2dd88ef6babd269346f779def6 | ec349b2bbc42c77ff57c812e5eace0c5 | Check if the compiler prefixes _ (underscore) to global C symbols
See: https://en.wikipedia.org/wiki/Name_mangling#C | {
if (!symbol->isFunction())
{
return false;
}
const auto &name = symbol->getName();
return startsWith(name, "__go_") || startsWith(name, "__cgo_");
} | 0 |
a9e782d04c85496187286828a5d15f7c | 8682775580d10223287b5a99f78b78cd | Execute page2Preview | $this->layout = 'default';
$previewPageData = $this->readPreviewCache($fileName);
$id = intval($previewPageData[$this->modelClass]['id']);
$page = $this->WildPage->findById($id);
if (empty($page)) {
exit("Page with id $id does not exist!");
}
if (is_array($prev... | 0 |
1d3e45fe6dac3c4ab2c73de13a5ae581 | e76cea191033d0383f6e9c3d419ffe1a | Getter for <code>blocklyprop.sec_user_role.id_user</code>. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.4"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class RoleUserRecord extends UpdatableRecordImpl<RoleUserRecord> implements Record3<Integer, Integer, Integer>, IRo... | 1 |
6233b5461dc7c42465a37fd35ac99469 | 151289662e0c72d7d8f15cb96bc3a888 | Deletes a specific range of sections. | {
this.Repository.RemoveRange(range);
var count = await Repository.SaveAsync();
return count > 0;
} | 1 |
10a02b41a532d52d860ebc2ab4e07b44 | c04835dd706a5a9cf824a82405538707 | 该方法创建answer.dat二进制文件,并将数组中的内容以对象形式写入到文件中保存;
提示:使用对象序列化机制 | try {
FileOutputStream fos = new FileOutputStream(filePath);
ObjectOutputStream oos = new ObjectOutputStream(fos);
oos.writeObject(data);
oos.close();
}catch (IOException e) {
e.printStackTrace();
}
} | 1 |
c87be1c4bb54503d79d014f4d7ede8ab | 2646c57f490dedd5338dcb0bcddcf366 | Gets all the root modules | namespace Micser.Engine.Infrastructure.Services
IEnumerable<ModuleDto> GetAll(); | 1 |
f6f5716907e5ec4c2ebca1baef1acfea | 6ae149eba266ceb61683e3e300b34525 | Release all of the chunk pointers. | static void _scs_clear_chunks( STREAM_CHUNK_STORE *scs )
{
int i;
scs->read = 0;
scs->write = 0;
for(i = 0; i < scs->max; i++ ) {
scs->c[i].valid = CHUNK_FREE;
}
} | 0 |
2d39bc309ac865fa33b0a1bffed8f41b | f1fe41c6ff4ff692cbeca7bf85d5b59d | 评论是否可以发图片 | {
$post = self::findOne($postId);
if (!$post || $post->status == 0 || $post->comment_status == 0) {
return false;
}
return true;
} | 0 |
7f2cce304fb2f760731ca62c3a6f5af0 | 0bcaf7efdbde7d14e919928cfa82b84f | 在onCreate方法前面提前设置Factory2,这样就不会加载AppCompatDelegate中的onCreateView方法 | LayoutInflater.Factory2 factory2 = null;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
factory2 = ReflectionUtils.on(inflater).get("mPrivateFactory");
}
LayoutInflater.Factory2 privateFactory = new CompatPrivateFactory(factory2);
Class<?>[] paramTypes = ... | 1 |
9652ef66fcafc173ff7df99126a17764 | 7b8886ad1bfb3cd779114b2935ece7e5 | 批量 删除白名单用户 | @Controller
@RequestMapping(value="/whiteListMagage")
public class WhiteListManageController extends BaseController{
@RequestMapping(value="/delWhiteInfoList")
public ModelAndView delWhiteInfoList(String[] ids){
if(ids==null || !(ids.length>0)){
return ajaxDoneError("请选择删除信息");
}
int a = -1;
try {
a = ... | 1 |
6d46a72ff7613dcc3134f4da5ab0930f | 163dc008e394ecdb4e8dcebd006cbbcf | Turns the firing mode to on. That is, deltas that are/have been
registered will be fired. | class Gun:
def fire2_start(self):
self.shooting_mode = True | 1 |
0b81075d39d81d9faec34e9bb0075444 | a18b291f87fc5b4913267d3570e408d3 | random number within a range, bell curve distribution | double rnd(double dbLow, double dbUpper)
{
double dbTemp = rand() / ((double)RAND_MAX + 1.0);
return dbLow + dbTemp*(dbUpper - dbLow);
} | 0 |
d5606575edc36000340dd340d62f7509 | ee1e01d11c7bba6ba047eec55f81c533 | Sets the uniform using the top-left 3x3 submatrix of the provided 4x4 matrix. | const glm::mat3& matrix3x3, bool transposed) const
{
glUniformMatrix3fv(GetUniformID(uniform), 1, transposed, &matrix3x3[0][0]);
} | 0 |
f9e25024b84787894dfef1f05d955136 | 9987ce7d7617f43ff9c48a4a484e6c91 | Например, для строки «aaaaaabbbbbaccccddeeeee» результатом кодирования будет строка «a6b5a1c4d2e5». | public class RunLengthEncoding
public static String encode(String original) {
} | 1 |
fe8bfb118e104fcf6dc1e4d31ee06751 | cdcbe4672d861be2ed6a08dc26447ce9 | Used by powerups to increase our time | class Time_keeper(pygame.sprite.Sprite):
def increase_time(self):
self.__time_left += 15 | 1 |
34190ffc1826e1145a16b0a796996576 | bc5e5bcc5d30d59fab66533544f8c9fb | 刷新buff等级表 | function My:RefreshRank(rank, list)
for i,v in ipairs(rank) do
list[i]:UpData(v.rank, v.name, v.hurtNum)
self:UpFamilyRank(v.name, v.rank, v.hurtNum, v.joinCount)
end
end | 0 |
a949ce60b9313b0465935bcbb2fc8f12 | 958e0d2a91e5d22760e534465761c5d8 | check if the user is a service provider | Boolean isProvider(@Param("userId") String userId); | 1 |
5e29fea9f04681164ae8f80ae70a8b56 | f863ac972e5db5c79b074862390e8781 | テンポを取得する | namespace Solarus
int ItDecoder::get_tempo() const {
return reinterpret_cast<CSoundFile*>(modplug_file.get())->GetMusicTempo();
} | 1 |
23ee0b3921d8a7cdc3c2425d9b04ad55 | 091ac3060ecb8240d895bd559ad22c43 | Xem danh sách sản phẩm trong kho | class SanPhamKhoController extends Controller
public function index()
{
$danhsachsanphamkho = Sanphamkho::paginate(10);
return view('backend.sanphamkho.index')
->with('danhsachsanphamkho', $danhsachsanphamkho);
} | 1 |
807c88b645db68d3d28486751d2f8616 | 44b98ebfaf712ee48e6d738af1631878 | 根据规则id获得重定义与对象类型关系 | ConvertRule queryConvertRuleById(Long convertObjId,Long commodityId); | 1 |
0233a92cecf9d8bff908b992c597b3cc | 57ecc24d936de241d0886395d1db020d | Called when the "notify" event is emitted via IPC. | fn notification(&mut self, _notification: Notification) {
} | 1 |
3fa8c63aaf01252fdeed0f743f7dd6c7 | f0d862320309d88e5fd1d950e22aee99 | Exit a parse tree produced by {@link MocaSqlParser#output_dml_list_elem}. | public class TSqlParserBaseListener implements TSqlParserListener
@Override public void exitOutput_dml_list_elem(TSqlParser.Output_dml_list_elemContext ctx) { } | 1 |
aa807a9b1b46a5c70532d956f7ba8d4a | c8521b1b562349ad3fc2adde1e3c5062 | 开始播放第一个视频 | {
var url = Data.FromJson<string>();
PlayVideo( url, 0 );
} | 1 |
b19f57ecfa65dbaf805af692bc71fbac | 51a7baf1d613499f1fd8e5308796fcdb | 画训练集与交叉测试集的曲线 | def plot_learning_curve(estimator, x, y, ylim=None, cv=None, n_jobs=1,
train_sizes=np.linspace(.05, 1., 20), verbose=0, plot=True):
train_sizes, train_scores, test_scores = learning_curve(
estimator, x, y, cv=cv, n_jobs=n_jobs, train_sizes=train_sizes, verbose=verbose)
train_sco... | 1 |
6c78e78bceadf42003523e38f4a34b1b | 85024ca72f7d0943aff5372f0df57116 | Установить временную величину трат | public class Account
public void setSpendedMoney(double newSpendedMoney)
{
this.spendedMoney = newSpendedMoney;
} | 1 |
2b6b431379e2271389e27c6e07e131a7 | 86cb3e23fa23f7bc9dd695b7becbc57b | 审核后关闭掉工作流发起人的消息通知。 | {
IList<string> actors = WorkflowUtility.GetWorkflowProcessors(workflowInstanceId);
IList<string> reviewActors = Botwave.XQP.Domain.ToReview.GetReviewActors(workflowInstanceId);
if (!(actors.Contains(currentUserName) || reviewActors.Contains(currentUserName)))
{
if (... | 0 |
00a5bce2e7f987f24e52651ddab9f1d4 | 0155778b2c0c98b837c2d0c37b55d2b3 | Gets the ad break options. | {
return this._adBreakMetadata != null && this._adBreakMetadata.Count > 0;
} | 0 |
826723e5527be1d070534b00f18ca5f0 | 323468dcee7136667f21502ef613799d | flags on the 7th byte of the header | fn as_extra_flag(opcode: u32) -> bool {
(opcode & 0x0200_0000) != 0
} | 0 |
2bdbf680ff34674090aaf8f0c7441c58 | f01224c80a6d246cd1d4e744e1a29224 | Returns search product api endpoint url | class FW_ZirconProcessing_Helper_Data extends Mage_Core_Helper_Abstract{
public function getProductEndPoint($store = null){
return trim(Mage::getStoreConfig(self::COMMON_XML_PATH.'base_endpoint', $store), '/')
. '/' . trim(Mage::getStoreConfig(self::INVENTORY_XML_PATH.'product_suffix', $store),... | 1 |
39bdd102f6a4018ed2a70028f3e776eb | 4e224864758974155f8fd59b2b3b2982 | Function for Post Message on Tumblr Blog | {
FB.ui
(
{
app_id: '311830855919311',
method: 'feed',
link: window.location.href,
picture: profile_pic,
name: name1,
caption: 'FB SEARCH FROM USC CSCI571',... | 0 |
aa2cd5c2aa31bcd0f03e921cc434d6e8 | ccd3eb2ab8d072a7cec59a8ae72fe1c5 | OPTIONAL
numToAdd =int of number of items to pull from queue (if not set, will take a full page's worth or the number left in queue, whichever is greater)
partialLoad =boolean true if just filling the existing page (don't increment page counter)
pageFilled =boolean if had enough items in queue to fill the current page ... | debugPrint("loadMore")
if self.props.loadPrevious and
self.state.trail.index <= self.props.loadingBuffer and
self.props.itemList ~= self.lastLoadPrevItems then
debugPrint(" Calling loadPrevious")
self.lastLoadPrevItems = self.props.itemList
self.props.loadPrevious()
end
if self.props.loadNext and
se... | 0 |
99636158c84a12e753f1be77660f3149 | 95b0cf20df6c04a7bc0a247ff95b83f4 | Returns the result of interpreting the object as an instance of '<em>Uses Substatement</em>'.
<!-- begin-user-doc -->
This implementation returns null;
returning a non-null result will terminate the switch.
<!-- end-user-doc --> | public class TwitterModel2Switch<T> extends Switch<T>
public T caseStatement(Statement object) {
return null;
} | 1 |
d21fc6bb1246b1700fc1625eeb5551cb | e6e72fed865580139e03b729c2dd2f17 | Procesa el archivo con extensión .csv | func gProcessCSVFile(srv *calendar.Service, InputCSVfile string, uCalID string) {
fmt.Printf("\n***** Traitement du fichier CSV: [%s] *****\n", InputCSVfile)
fileIn, err := os.Open(InputCSVfile)
if err != nil {
log.Fatal(err)
}
defer fileIn.Close()
skipHeaderDone := 0
scanner := bufio.NewScanner(fileIn)
for s... | 1 |
01f98cfc7bfa37a52ef0172d8b1bf45f | 482919bdd47bfa007a179c932bff3e53 | Returns all the free type variables that appear in the type. | List<? extends TypeVariable> getTypeVariables(); | 1 |
75c81b2ed3ae2fef5809c6c635f72eb9 | 5ab9ebfdc2b7fa25d1caea41be384208 | 转为服务器时间 | function VFL.Epoch:KernelToServerTime(ktime)
return (ktime - self.kernelTime) + self.serverTime;
end | 1 |
7981edd7bb602c7b8c59e650bf79ed7a | 2670cd4d029bd707d2d4c24fa95e043b | Returns the threshold that maximizes the expected F score, a
weighted average of precision and recall for a sample of
blocked data. | f1s = []
thresholds = sorted(np.unique(y_pred))
for a in thresholds:
pred = y_pred >= a
f1s.append(f1_score(y_true, pred))
idx = np.argmax(f1s)
if idx > 0:
threshold = (thresholds[idx] + thresholds[idx-1]) / 2
else:
threshold = thresholds[idx]
return f1s[idx],... | 1 |
59f50cb7cca920502e389a592ee8c72d | 5f1cd97be0b40d12c8fb91df8b20e581 | Verify that accessing a negative sized partition results in an exception | dtype = "int8"
model = _get_model(
shape=(1, 10, 10, 1),
dtype=dtype,
size=size,
coordinate_transformation_mode="half_pixel",
rounding_method="round_prefer_ceil",
)
model = tei.make_ethosn_composite(model, "ethos-n.qnn_resize")
mod = tei.make_ethosn_partition(... | 0 |
5a44047348758e804fb09e79a1172bed | 45d50f6cbe86634a7896be599af27100 | Returns known enemy structures that are at the height of start locations. | class BalancedZergBot(ZergBotBase):
def get_checked_locations(self) -> Location:
return list(map(lambda item: item[1].location,
self.checked_enemy_start_locations.get_inactive().items())) | 0 |
0f0074a8bb93a9796e4050346e0be49e | 0409b95f70bbdee0f5c4bb1ba6c95e4c | Observable for save failure notifications. | public abstract void onSaveFailure(); | 0 |
92d2c587376149839f2c89fedd4dc7fb | ee00e460bd5bf068fa72dbee068c19d4 | Returns the Logon ID of the person who created this list | public class PublishedFilenameBuilder implements PageContainer
public String getLogonGuid() {
return getPage().getLogonGuid();
} | 1 |
f541b470f354061b0e8db1b138287b10 | 8828dc14e5235dc5d4b4b340750a7033 | 根据教师学工号,得到教师姓名 | {
string sql = "select workerNo from teacher where workerName= '" + wname + "'";
return (string)executeScalar(sql);
} | 0 |
9ad70dfadbb81f03e402ff09915706e1 | 16800c1583f71aa8a3f9f36dc9841dc5 | get content for a specific attachment for a job | class AttachmentMock(BasicResilientMock):
def attachments_contents_incident_get(self, request):
attachment_id = request.url.split("/")[-2]
data = self.test_data(self.attachments[attachment_id]["name"])
return create_response(request, status_code=200, content=data) | 1 |
359926f5bda6210da8a0d209372571ee | 0f990d5eae8a012f8b857dfbc1ff282a | Moving to a point with GCPR/Modified bug algo | def jarvisMarchSinglePass(points, point):
nextPoint = point
nextSegment = LineSegment(point, point)
prevPoint = point
prevSegment = LineSegment(point, point)
for p in points:
if (nextPoint == point or nextSegment.signedArea(p) > 0):
nextPoint = p
nextSegment.pt2 = p
... | 0 |
7fcc37bba1abd68b6b94a1e0fe46a78a | b5f4c39abcc8ca5b514d694ae862c0af | Standard processing of a new tad annotation file. | List<String> anndata = Arrays.asList(escape ? annotationLine.split("\\\\t") : annotationLine.split("\t"));
String Id = anndata.get(0);
String[] annotationdata = anndata.get(1).split(" ");
String type = annotationdata[0];
if (Id.contains(":T")) {
String word = anndata.get(2);
Limits annlimits = new Limit... | 1 |
44c45c4ec99b83d79bf31fa3125336ec | ef4122ccf392124c70bc8f03c33ffc96 | Computes a = b * c.
Assumes digits < MAX_NN_DIGITS. | {
int i1, i2;
int len1 = b1->len;
int len2 = b2->len;
int newLen = len1 + len2;
BIElem2 product;
BIElem2 carry = (BIElem2)0;
BIElem * src = b1->value;
ASSERT(b1 != b2);
ASSERT(b1->value != b2->value || !b1->value);
if (BIGINT_IsZero(b1)) {
return True;
} else if (BIGI... | 1 |
64b7f2cd85a0c5d9ac93f4904f71f78e | cddf7050810b53f1cc285b3e09728c6b | 在数据前补两字节的长度 | int length = bytearray.length;
byte[] lengthByte = new byte[4];
lengthByte = int2byte(length);
byte[] newbuffer = new byte[bytearray.length + 4];
System.arraycopy(lengthByte, 0, newbuffer, 0, 4);
System.arraycopy(bytearray, 0, newbuffer, 4, bytearray.length);
return newbuffer;
} | 0 |
03228491a60af5e689a61f9614a448dd | 5d8e789347ee184c53a335aafe4054b6 | Returns Url instance for current URL | public function currentUrl($type = self::RELATIVE_PATH); | 1 |
03b03a408ec881d403716602f08b3094 | 167cbcdbd6a8e70d0e081fdd2dabf80e | 打开本地音乐列表 | self.label_2.setText("%d首音乐" % len(self.cur_whole_music_list.musics))
self.tb_local_music.clearContents()
self.tb_local_music.setRowCount(len(self.cur_music_list.musics))
self.set_tb_local_music_layout()
for i in range(len(self.cur_music_list.musics)):
music = self.cu... | 1 |
65e68056d9c074065acb2e091b7a023e | 77399e3bd15565cc759c7bf51121c5be | get different coordinates between two states | def get_x_y(pos1, pos2):
return pos1[0] - pos2[0], pos1[1] - pos2[1] | 1 |
cca5ae24ba4857697c6ec7b673879c72 | f3e7d62aed42fac270cbd41cbfe45dc3 | 循环检测消息队列,并把消息队列信息推送到NIO信道 | public void consume() throws Exception {
Connection connection = getConnection();
Channel channel = connection.createChannel();
QueueingConsumer consumer = new QueueingConsumer(channel);
channel.basicConsume(QUEUENAME, true, consumer);
while (true) {
QueueingConsu... | 0 |
c1fda9f4d9c36eaa39125325f2c2bbc7 | 79bb05abafbef2077eb89f8ba928066e | Sets the location at which the temperature value is displayed. | if ((thermometer >= 0) && (thermometer < 3)) {
this.thermo[thermometer].setValueLocation(5000);
}
} | 1 |
aec6199c7e067cc6bea1ff4c67e9f269 | 4c9f87d8a67ea56ded4f010e54a3e162 | 将字符串中的空格替换为特定值
解法1:用辅助数组解决
测试用例:
用8000个字符测试本函数,执行15次,平均执行时间为1.5ms | class Code extends Base
private function delBlank($string, $replace = ' ')
{
$string = trim($string);
$string = preg_replace('/[sv]+/', $replace, $string);
return $string;
} | 0 |
7a467e9377c21dcfb80261c001b3c709 | 74fe0187e22705c6b0a959266348d59e | 마이페이지 하단 나의 성향 히스토리 조회 | @RestController
public class ProfilePageController
@PostMapping("selectHobbies")
public ResponseEntity<?> selectHobbies(@Param("User_id")int User_id){
Hobbies hobbies = profilePageService.selectHobbies(User_id);
return new ResponseEntity<>(hobbies, HttpStatus.OK);
} | 0 |
8a5730631f007dc4e1fbbf518019e1b5 | ef5d53936120d94bdbb453a90377812a | Fonction permettant le lancement de l'algorithme génétique. | void GeneticAlgorithm::launchAlgo() {
m_step = 0;
double display(m_display);
while((m_iterations < 0) || (m_step < m_iterations)) {
nextStep();
if((display <= 0) || (m_step == m_iterations)) {
getStatus();
display = m_display;
}
display--;
}
ge... | 1 |
186b6416685c3bb7896512a0ba667dc1 | 2353f103193950fb3d7467234ac74a60 | 从Buffer中取出相应长度的节字流,如果Buffe中的字节不够,返回null.
但是不抹除相应的空间
author : yanghq
date : 2015-12-11 11:22:41 | if (nBufferedBitsLen == 0) return new byte[0];
int bits = nBufferedBitsLen - (nCurrentReadByte * 8 + iBitsReadOffset);
int bytes = (bits + 7) / 8;
byte[] ret = new byte[bytes];
int oldCurrentReadByte = nCurrentReadByte;
int olditsReadOffset = iBitsReadOffset;
read... | 0 |
e2d62b348360fbc8e0b3ea40b8f72a84 | 5f182a96a304b7b533b532f033acfc35 | Similar to gettoken but we acquire a shared token instead of an exclusive
token. | class ServiceAuth(AuthBase):
def acquire_token(self):
pass | 0 |
d36ebf4a2cf3da9b023345b8f6e4ff66 | 81844c32501642e479ba989d601ba1d5 | 计算每一代种群中每个个体的选择概率和累积概率 | {
totalFitness = FitnessForAll();
List <double> res = new List<double>(population.Count);
res.Add(population[0].CountSurvivialChance(totalFitness));
for (int i = 1; i < population.Count; i++)
res.Add(res[i - 1] + population[i].CountSurvivialChance(... | 1 |
5ab71cdd0ce8920efda50bc21fab3b82 | 1a1c1f3992fb14b85ee7a69a54787840 | General form; sets all billing section fields on or off | function CreateSwitchingCheckbox() {
var billing = $("#id_0-add_billing");
if (billing) {
billing.parent().parent().find('input').attr("disabled", "disabled");
billing.parent().parent().find('textarea').attr("disabled", "disabled");
billing.parent().parent().find('select').attr("disabled", "disabled");
billin... | 1 |
f89cf54f712794bd0fda6cf11e54daca | ac0cd75b9045f2712def3f294c7b0510 | get ip addresses of all interfaces | from netifaces import interfaces, ifaddresses, AF_INET
ip_list = []
for interface in interfaces():
if AF_INET in ifaddresses(interface):
for link in ifaddresses(interface)[AF_INET]:
ip_list.append(link['addr'])
return ip_list | 1 |
acdaa1e13584234ed9e729bd5edff809 | 303cfbc3cef1fb482a591c56deafa2e1 | Creates a property definition for nullable DateTime types. | if (property.PropertyType == typeof(DateTime)) {
return true;
}
if (property.PropertyType == typeof(DateTime?)) {
return true;
}
return false;
} | 0 |
557aa82c95904e02f6efa964682b78fb | 7de4a14b0868bb9328806e9509325100 | Creates a new type factory. | const factory = createElement.bind(null, type);
factory.type = type;
return factory;
} | 1 |
47c4a04c2a0ec254017d28a4cc0dea18 | 93ed152d8ac59aab3d32acbbadd8cc42 | Given a form, the items on this toolstrip populate with the mdi children
with mnemonics 1-9 and More Windows menu item.
These items can then be merged into a menustrip.
Based on similar code in MenuItem.cs::PopulateMdiList(), which is unfortunately just different
enough in its working environment that we can't readily... | {
SuspendLayout();
MdiParent = FormManager.MdiParentForm;
_detachMenuItem.Visibility = BarItemVisibility.Always;
_attachMenuItem.Visibility = BarItemVisibility.Never;
Text = _textComplete;
ResumeLayout();
} | 0 |
5c710062b0157f51305c0c47db49f943 | a91098eea353920fe1c9d8270a97bff8 | Builds a SELECT ALL (*) query | namespace Braspag.FluentQueryBuilder
public class SelectBuilder
public SelectBuilder SelectCountAll()
{
return SelectCount("*");
} | 0 |
6e81e5ddcfe2212149253383911e6caa | f73b90228bedbc42c266b5d6fca58efc | Нельзя называть контакт именем операционной команды | {
if (name == string.Empty)
return false;
foreach (var s in new string[] {
"\\", "\"", "/", ":", "*", "?", "<", ">", "|", ",",
" ", "aux", "com1", "com2", "prn", "con", "nul" })
if (name.Contains(s))
retu... | 1 |
1d3209c72ceab2a26439ed46f3a72464 | 2f3f53232aecfd7128b9e6731a5ab5e9 | This function is used to insert elements
at the back/end of the list
Time Complexity : O(1) | bool ListADT::insertAtBack(int newData) {
Node* newNode = new Node(newData);
if (head == NULL) {
head = newNode;
} else {
Node* curPtr = head;
while (curPtr->next != NULL) {
curPtr = curPtr->next;
}
curPtr->next ... | 0 |
8fff07dadd1b7d074d8b866e49e328b9 | 54ff303ace8ce1706aea88aafec9194d | Valida si el el beneficiario ya tiene un apoderado ACTIVO, en este caso no le permite asignarle otro apoderado.
<para>Lugares de Uso: ApoderadoServicio.</para> | namespace mz.erp.businessrules public class tsa_Cotizacion : IDisposable
public static bool IdResponsableIsValid( string IdResponsable )
{
return true;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.