query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
d8cc716b16604a86a28c8f7aac0f077d | 22f53ee445598c94451a2cfa5cda2f9f | Recover projective points from spherical coordinates. | namespace DotSpatial.Projections.Transforms
public class LambertAzimuthalEqualArea : EllipticalTransform
protected override void SphericalInverse(double[] xy, double[] lp, int startIndex, int numPoints)
{
for (int i = startIndex; i < startIndex + numPoints; i++)
{
int... | 1 |
99f20c9850fadb119333c89b1fe4fe60 | aa1993c2ac9234cb815ec7bea7156c85 | Remove the request from a cURL multi handle. | {
foreach ($this->curlHandles as $key => $ch) {
curl_multi_remove_handle($this->curlMultiHandle, $ch);
curl_close($ch);
unset($this->curlHandles[ $key ]);
}
if (! is_null($this->curlMultiHandle)) {
curl_multi_close($this->curlMultiHandle);
... | 1 |
4440f7a033172789c8f98c332c2b16e4 | f215debb42836c52400e168bd7385f72 | 判断是否已经遇到过此怪物 | public class Character
private boolean checkMonster()
{
int n = 0 ;
for(Monster tmp : GameView.mMonster)
{
n = tmp.getHit(x , y, CommonResources.cr[0]);
if(n > 0) break;
}
if(n>0)
return true;
else
return false;
} | 0 |
716bce60030b4db803cf761498c14faf | 430b70d4fa40ec2e33a64b282b4970b3 | Creates a copy of the comment. | {
return new()
{
CommentId = command.CommentId,
Rate = command.Rate
};
} | 0 |
8b800223f5fd6567bc427457c9630e02 | 125c2dfab4f72cdc0b1bb6fe06dc8911 | Возвращает словарь соответствий название постройки - внутреннее название | {
$items = self::getAll();
$return = [];
foreach ($items['ITEMS'] as $item)
{
if ($item['CODE'])
$return[$item['CODE']] = [
'ID' => $item['ID'],
'NAME' => $item['NAME'],
'CODE' => 'WOOD',
];
}
return $return;
} | 0 |
db64e1a2b8494a532e5183d02345fb2c | 488dcc0545d54f8993dbb74c582a2b02 | Returns the JSON representation of the bank card. | {
var sb = new StringBuilder();
sb.Append("class CreditCard {\n");
sb.Append(" CcId: ").Append(CcId).Append("\n");
sb.Append(" CreditcardTypeId: ").Append(CreditcardTypeId).Append("\n");
sb.Append(" ExpDate: ").Append(ExpDate).Append("\n");
... | 0 |
7e8a03b35d9a9625f5b38313632d60c1 | 0c834f2756d20a0bbac0d388bfd11d2d | Update a point given the arguments of a command, using a pre-parsed list. | class Interpreter:
def cmd_pd(self, args: list[bytes]):
self.plotter.pen_down()
if len(args):
self.plotter.plot_polyline(to_points(to_floats(args))) | 0 |
8f33bdb6731fe960084aba6087a23f87 | 7e559b231dbb54f04919ccfa396de7ba | Non Linearity of a Boolean Function. | F = Or(ls)
at_most_one_list = []
for pair in itertools.combinations(ls,2):
at_most_one_list.append(Or(Not(pair[0]),Not(pair[1])))
return And(And(at_most_one_list),F) | 0 |
f8896ecb559f77041b198b108682a575 | 9df1cfc35ec8a63df9f357413d0cf0a2 | Compute a SMILES string from a networkx graph | def molecule_to_json_string(mol):
graph = molecule_to_nxgraph(mol)
json_dict = nxgraph_to_json(graph)
json_string = json_to_string(json_dict)
return json_string | 0 |
edcd6be48f5ffdad1b8c2498cffdff2f | 05ac007af704dc49501d522960cc628e | Test method ``copy``. | class Test_odict(BaseUnitTest): #{{{
def test_copy(self):
od = odict(self.data)
for cfunc in ('copy', '__copy__'):
new = getattr(od, cfunc)()
self.assertEqual(od, new)
self.assertNotEqual(id(od), id(new))
self.assertTrue(isinstance(new, odict)) | 1 |
61419c2c89e3a6112103f308e49fa0c0 | 1a9375311f4a9f76921f353ce6ba6b61 | 不考虑任何兼容 纯ES6 | function sumES6(...arr){
let result=0;
arr.forEach(item=>result+=item);
return result;
} | 1 |
2adf1f4559f57f42e25da89a2ec678b5 | ed5116325995190f783a31c46a14f9dd | Funkce vypočte vzdálenost bodu od jiného | namespace ShlukovaAnalyza
class Bod
public static int VypoctiVzdalenost(Bod bod1, Bod bod2)
{
if (bod1 == null || bod2 == null)
{
return -1;
}
int vzdalenost = (int)Math.Sqrt(Math.Pow(bod2.X - bod1.X, 2) + Math.Pow(bod2.Y - bod1.Y, 2));
... | 1 |
f4e9f0411e46eaaefddad5a7ce6a1c29 | 71f22e358a75817d1f8a73b7129d9a6c | 操作列的启用或禁用绑定修改状态事件 | namespace System.Windows.Controls.Data.Design
internal class DataGridMenuProvider : PrimarySelectionContextMenuProvider
private void DataGridMenuProvider_UpdateItemStatus(object sender, MenuActionEventArgs e)
{
ModelItem selectedDataGrid = e.Selection.PrimarySelection;
object dataSou... | 1 |
667eb7bf7b749f7d9aa1678c23562771 | 81f1c4b0f4c641123e933683190a950d | Input: The root node of a valid tree structure
Side effect: The tree has been written to the database
Output: The root node | public class DatabaseManager extends DatabaseAbstractBase
private Node preorderAddTreeToDB(JadeNode curJadeNode, Node parentGraphNode) {
Node curGraphNode = graphDb.createNode();
if (curJadeNode.hasAssocObject(NodeProperty.IS_INGROUP_ROOT.name) == true) {
curGraphNode.setProperty(NodeProperty.INGROUP_START_NODE_... | 1 |
46c808d3e886816f7767d10176ff35e3 | 8c3cff1fa3454ad5657e1a40c91f9072 | @brief Default constructor sets default state of light time corrections
The default state of the stellar aberration correction, swap of
observer/target and correction of light time to the surface of a target
body are set here. The current state of these conditions are set to
preserve preexisting behavior.
Initial stat... | : OrbitReal(name, "PlanetodeticLAT", obj, "Planetodetic LAT", "deg",
GmatParam::COORD_SYS, PLD_LAT, true)
{
mDepObjectName = "EarthFixed";
mParameterClassType = "Planetodetic state type";
SetRefObjectName(Gmat::COORDINATE_SYSTEM, mDepObjectName);
SetRequiresBodyFixedCS(true);
SetRequire... | 0 |
0f6bccf6bcfbf215062040df5969f164 | 921cac3648ed9e5732dc809e47b4ab2e | 绑定图片分类 | namespace SCRM.Application.ServiceManagement.Impl
public class ResFileMstrService : SCRMAppServiceBase, IResFileMstrService
private void BindCarImg(List<CarInfo> list, DataTable dt, int type)
{
var imgList = _resFileMstrRepository.GetAllList(m => m.CREATE_ORG_NO == AbpSession.ORG_NO);
... | 1 |
27475d6115bbc173a8ddb27edf94fcbd | 4bd2fb14e7d8c3a14b8a4e130a0ed2fa | метод определяет какой radiobutton выбран и вызывает соответствующий способ движения круга | def radCall():
radSel=radVar.get()
if radSel == 1: win.configure(background=colors[0])
elif radSel == 2:win.configure(background=colors[1])
elif radSel == 3: win.configure(background=colors[2]) | 0 |
fc2fa27881b39f8f907c14174f5255d8 | b7ae2a118aaea5185920e46a0469a648 | Returns the meta object for class '{@link fr.obeo.dsl.sPrototyper.TableProperty <em>Table Property</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getTableType_Property(); | 0 |
fb3c681e89f9f04c35d2a1ccca62c8d4 | 4157db0c4cfc949dac607a84e874481b | Return the unicode string representation of a hostname | class Name implements Host
public function getUnicode() : string
{
return $this->getPunnycode()->decode($this->address);
} | 1 |
bef036f1be6539921a5c5a90875a6579 | f8335f9ad2ec420476ce372cb9e70372 | 更新操作,会删除accountCache key的缓存 | def update_self(account_detail):
pickle.dump(account_detail, open('file/account_cache', 'w'))
with open('file/Account', 'r') as f:
with open('file/Account.bak', 'a+') as fb:
for line in f.readlines():
if line.split()[0] == account_detail.split()[0]:
line... | 0 |
f5a67b4f1f52c0f593686b69b78670dd | 0becf7cf84b7ca8602f9be151ce1ebef | Gets data needed for displaying a graph which shows the amount of time spend per user in total | class UserRegistrationDataFetcher extends TimePeriod
protected function getData(array $configuration = [])
{
$groupBy = $this->getGroupBy($configuration);
$queryBuilder = $this->entityManager->getConnection()->createQueryBuilder();
$tableName = $this->entityManager->getClassMetadata(UserInte... | 0 |
ccb6d01c90b4d2600a4e9228e5f6c4ee | 14d0c256477d5b97ca2bbf48fc594807 | 查询楼宇人员进出每日统计列表 | Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.putAll(map);
paramMap.put(CherryConstants.IBATIS_SQL_ID, "BINOLWRSRP99.getMemCountByDayList");
return baseServiceImpl.getList(paramMap);
} | 1 |
5c91fc565f6747d6c2beef1758cd83da | ad1e600a640fc623e406574da82f7507 | ==============================================================================
MF3D_DisposeGroup
Clean up top-level group pointers
============================================================================== | MF3D_DisposeGroup (
MF3D_FilePtr ioMetafile)
{
MF3DErr result;
MFASSERT (ioMetafile->readWrite == MF3D_MetafileRead);
result = kMF3DNoErr;
if (ioMetafile->groupState.parent != NULL)
{
result = kMF3DErrNotEnoughEndGroups;
MF3D_PopGroup (ioMetafile);
MF3D_DisposeGroup (ioMetafile);
... | 1 |
43b588de6c2ef1ac2e68f92b75cc78ff | 16ffcaa758fd1c2ddc4aa57fd67ce032 | Update the name or description for a snapshot. | {
var options = new InvokeOptions();
options.RequestMarshaller = UpdateSnapshotRequestMarshaller.Instance;
options.ResponseUnmarshaller = UpdateSnapshotResponseUnmarshaller.Instance;
return InvokeAsync<UpdateSnapshotResponse>(request, options, cancellationToken);
... | 1 |
cc0af61d7abe6aab2c0baa537dd22238 | 87c9c1f45a8a652afe7cbb27f4745203 | 生成markdown类型消息 | return &markdownMsg{
msgPublic: msgPublic{
ToUser: opts.ToUser,
ToParty: opts.ToParty,
ToTag: opts.ToTag,
AgentId: opts.AgentId,
MsgType: "markdown",
EnableDuplicateCheck: opts.EnableDuplicateCheck,
DuplicateCheckInt... | 1 |
ae79697fa94ae7658eb5c3d2071597df | 59ea15b3fa294388544404ee9b95b917 | Tests that the gradient of the log pdf is correct for a few specific | gpc = GaussianProcessClassifier(kernel=kernel).fit(X, y)
lml, lml_gradient = gpc.log_marginal_likelihood(gpc.kernel_.theta, True)
assert np.all(
(np.abs(lml_gradient) < 1e-4)
| (gpc.kernel_.theta == gpc.kernel_.bounds[:, 0])
| (gpc.kernel_.theta == gpc.kernel_.bounds[:, 1])
) | 1 |
988908b7624172c8a45323b98e3b7f43 | f41cb494a483a94358193ad1dc01602e | Linked set constructor | Set<Element>::Set()
{
head = NULL;
length = 0;
} | 1 |
ae09440de91a86227fe127dccdf925fb | 34f6f251a79324600a8aebb2fbbb88a5 | 공통객체헤더의 내용을 바이너리 형태로 반환합니다. | String headerData = "";
headerData = getMsgId() + columnSep
+ getInterfaceId() + columnSep
+ getInterfaceSubId() + columnSep
+ getHopCnt() + columnSep
+ getTraceLevel() + columnSep
+ getMsgSeq() + columnSep
+ getSndSystemName() + columnSep
+ getRcvSystemName() + columnSep
+ g... | 0 |
b7da3f5883a5c1c8eb030c2b2ba69b7c | 339a7c1ba982669df7930dcbe4b4ccff | Adds flags related to updating autoscaling. | def UpdateLabelsFlags():
remove_group = base.ArgumentGroup(mutex=True)
remove_group.AddArgument(labels_util.GetClearLabelsFlag())
remove_group.AddArgument(labels_util.GetRemoveLabelsFlag(''))
return [labels_util.GetUpdateLabelsFlag(''), remove_group] | 0 |
d0f9b18136ca855b0f6b764a366d2602 | 0156c9884a6ecffd0997ac3ca07819de | 根据角色名称模糊匹配查找角色及权限信息. | List<RoleVo> getRolesByName(RoleVo vo); | 1 |
08cc1de50e06ad8172b3bc1e3e54c01d | f036695c7e05b01c89d7dd4d7eb7fc64 | 不同条件的批量更新 | throws Throwable {
Query query = new Query();
for (String field : conditions.keySet()) {
query.addCriteria(Criteria.where(field).is(conditions.get(field)));
}
Update update = new Update();
for (String field : inputs.keySet()) {
update.set(field, inputs.get(field));
}
mongoTemplate.updateMulti(que... | 1 |
bfce01ecccd688f0fbcd971e9aec20b2 | 1e2447372e7dc97dc51dd1a1a478566f | 測試同步交易明細失敗 | {
$redis = $this->getRedis();
$em = $this->getEntityManager();
$entryQueueKey = $this->keys['entryQueue'];
$at = date('YmdHis');
$data = [
'id' => 10001,
'at' => $at,
'cash_fake_id' => 43,
'... | 1 |
c46855150f5c6f4126f3a3a95bbe37ea | 7d84a6165e6f30579043d3085adf5d0f | 取数字位 | public class BackwardNum
public int getDigital(int num) {
int count = 0, temp = num;
while (temp != 0) {
temp = temp / 10;
count++;
}
return count;
} | 1 |
00b10e770cec89e8cb6aee04e858281d | 32375154ced56061d74e16e462287e08 | 载入唯一的用户,忽略大小写 | @DI(instance = Instance.Singleton)
public class UsersDao extends GenUsersDao
public UsersEntity selectOnLowerUserKey(String userKey) {
if (StringUtils.isEmpty(userKey)) {
return null;
}
String sql = "SELECT * FROM USERS WHERE LOWER(USER_KEY) = ?;";
return executeQuerySingle(s... | 1 |
99211d70ce628e5d56e43e641f656fdb | b09b889a2930d493fe0b3336281db016 | Copia el contenido de la retornabilidad seleccionada con una
retornabilidad nueva para ser modificada o en su caso eliminada | nueva_version = Item()
nueva_version.id = it.id
nueva_version.codigo = it.codigo
nueva_version.version = it.version + 1
nueva_version.nombre = it.nombre
nueva_version.descripcion = it.descripcion
nueva_version.estado = it.estado
nueva_version.observaciones... | 1 |
8ea79fa33263572ed389fa28eab5bb2a | afb86a5cf7a36f25136c1db2ad8cd175 | Asigna las ordenes de compra asociadas a la orden de servicio logístico | public boolean reasignarOrden(int orden_id, int cliente_id); | 0 |
c835c4c44318ef2265c3575ab16c77e8 | 96e976b168d2cb040a38e94da3dae6eb | Static method for launching a new Dialog. | LDialog dialog = new LDialog();
Log.d(TAG, "create");
params.apply(dialog.lController);
return dialog;
} | 0 |
925da31bfd662073ec480eae198e7c90 | 8b8005901d8e89863b60cabc2305ffdb | returns default measuring unit settings | function wc_measurement_price_calculator_get_dimension_units() {
$settings = wc_measurement_price_calculator_get_wc_settings();
if ( $settings ) {
foreach ( $settings as $setting ) {
if ( 'woocommerce_dimension_unit' === $setting['id'] ) {
return $setting['options'];
}
}
}
return array(
__( 'mm', 'w... | 1 |
38abe59f98c9b4a33151311a153b13f4 | 64877e3b3ae0c90f91190415b97ad0d5 | Injects the item configuration | {
if (configurationItem is IProject)
{
this.AddProject(configurationItem as IProject);
}
else if (configurationItem is IQueueConfiguration)
{
this.AddQueue(configurationItem as IQueueConfiguration);
}
... | 1 |
ef0c3bb9848d3d89faff66107f07e30a | cf60680b800fbe4ee612c4544f76306a | Restarted means that a previous attempt was made to execute the task,
but it failed before deleting the task from the queue. | byte[] args = null,
string domain = null,
string taskList = null,
TimeSpan executionToStartTimeout = default,
TimeSpan scheduleToCloseTimeout = def... | 1 |
f28b43b6b9bbd92fba72b02a804481da | 68c918ad461534bd37e82bcbb818b5db | getter of n_interp | class BaseInterpolant(object) :
def __len__ ( self ) :
return len ( self.__table ) | 0 |
26434ac9b8d7805f2906124eb6b2b361 | f8e619f176e0a99bb72bc69d6ccb0712 | txtKeyword 포커스 중 Enter키 입력 시 btnKeywordSearch 이벤트 (검색 버튼 클릭 이벤트) 실행 | namespace TakeOutTXT
public partial class Form1 : Form
private void txtKeyword_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter) btnKeywordSearch_Click(this, new EventArgs());
} | 1 |
871ba8613a3dcb4cb14ec2b2134bc8db | 1f7e13ba3b4ed7a3ffa6384b60524964 | The name of the parent of the current tag. | public class ParsedReferencePoints
public String parentTagSpecName() {
return TagSpecUtils.getTagSpecName(this.parentTagSpec);
} | 1 |
3ec49e261c37037fdf136b1b075822be | 6edd6cd45c859dee461f9fc4f3fe20c7 | Copies all codeline formatting information. | namespace ArchAngel.Providers.CodeProvider.CSharp
public class CSharpFormatSettings
public void SetFrom(CSharpFormatSettings formatSettings)
{
AddBracesToSingleLineBlocks = formatSettings.AddBracesToSingleLineBlocks;
InlineSingleLineGettersAndSetters = formatSettings.InlineSingleLineGettersAndSetters;
Maint... | 1 |
57d914c597cf3937abdf4f18bf9d1498 | 72d3350cc828410499e179e6d0bbc985 | load all nyc breweries for rendering by map, list or grid later | const resData = new carto.source.SQL(`
SELECT *
FROM huyvo.nyc_restaurant_grades
`);
var initBarChart = function (newData) {
let byCuisine = newData.categories.map(d => [d.name, d.value]);
createChart(gChart, byCuisine, resData, selection);
totalView.off('dataChanged', initBarChart);
}
c... | 0 |
b8b99d7c848d8f80cdaeb6c6bb036828 | aa1bc551429a65b967fd66a2d6e8a5a7 | k개의 소수를 2부터 시작하여 오름차순으로 리스트로 만들어 내주는 함수 | def make_prime_list_Erasto(num) :
prime_list = []
candi_list = []
for i in range(2, num+1) :
candi_list.append(i)
while True :
if candi_list[0] > math.sqrt(num) :
prime_list.extend(candi_list)
break
tmp = candi_list[0]
prime_list.append(candi_list[0])
candi_list.pop(0)
i = 0
while True :
i... | 0 |
35c12e28bbea668af1c4d40d913e2392 | 4e7ed78dcd6ecc1afd066de28fbde3a6 | ## chi-square break evaluation | cutyhat = cut(yhat,breaks = quantile(yhat, probs=seq(0,1, 1/g)), include.lowest=TRUE)
obs = xtabs(cbind(1 - y, y) ~ cutyhat)
expect = xtabs(cbind(1 - yhat, yhat) ~ cutyhat)
chisq = sum((obs - expect)^2/expect)
P = 1 - pchisq(chisq, g - 2)
return(list(chisq=chisq,p.value=P))
} | 1 |
84ab44796c93f7e1328c5d7271fced5e | ce9e748ecb723f35d671a1cdad2609ab | initialisiert die farbe des steine und den Zustand, abhaengig von seinem Typ | function setupColor(that, type) {
if (type === 'state') {
that
.selectAll('.stainable')
.style('stroke', function(d) {
if (d.color) {
return d.color;
} else {
return '#000000';
}
});
that.on('mouseover.color', function() {
hoverInColor(d3.select(this).selectAll('.stain... | 1 |
04f70b6929a02161e4db1fd95ee5dc5a | 02b885f41f616fc51e56b7219876ad6c | Boolean property specifying whether ChunkedGraph chunks begin
at voxel offset or at origin. | public class AdditionalInfoFilepath
implements
AdditionalInfo
public void setIsVoxelData(final boolean isVoxelData) {
m_bIsVoxelData = isVoxelData;
} | 0 |
c1bc246c84292afdebc8b14139ae11df | 30377de89150d087fcb2a6eb9345810a | 生成RDB文件并保存到磁盘上 | FileOutputStream fos = null;
File tempFile = null;
long now = System.currentTimeMillis();
try {
tempFile = new File("temp-"+Thread.currentThread().getId() + ".rdb");
if (tempFile.exists()) {
tempFile.delete();
}
tempFile.cre... | 1 |
1db67bfc8d754aae4aa16de3c7311186 | 8471923645cb281ac72b813cae769149 | 函数名 : UART_SPARE1_Init_Config
描述 : UART_SPARE1初始化配置
输入 : bound:波特率(常用:2400、4800、9600、19200、38400、115200等)
输出 : 无
返回 : 无
说明 : 无 | void uart_init(uint32_t bound) {
UART1_Handler.Instance = USART1;
UART1_Handler.Init.BaudRate = bound;
UART1_Handler.Init.WordLength = UART_WORDLENGTH_8B;
UART1_Handler.Init.StopBits = UART_STOPBITS_1;
UART1_Handler.Init.Parity = UART_PARITY_NONE;
UART1_Hand... | 0 |
9f91ef77b2a682af593b8390a092c110 | 01dd49c448ac0da33edf6e6941f5bdab | Plot and optionally save a real-time animation of the positions of multiple particles in a system | fig = mp.figure.Figure()
mp.backends.backend_agg.FigureCanvasAgg(fig)
ax = fig.add_subplot(111, autoscale_on=False, xlim=xl, ylim=yl)
ax.grid()
list_of_lines = []
for i in E:
line, = ax.plot([], [], 'o-', lw=2)
list_of_lines.append(line)
for obs in obstacles:
line, ... | 1 |
1b926d0611cabd96c8a5ae716c258e9a | 19259c992da766491a1eb07b9208b746 | Devuelve el punto central de la habitación 1 | class Room:
def room_point(self):
return self.__point | 0 |
6185e6a9d2a3970fd7a75eaff8149cc5 | ae683b40886c7d05d510f3142c21e821 | Zobrazi sranku uzivatela s jeho aktivitami vo fore | public List<AktivnostKorisnik> getAktivnostiKorisnikaPoStranama(@RequestParam(name="velicinaStrane") int velicinaStrane, @RequestParam(name="strana") int strana, @RequestParam(name="username") String username) throws SQLException{
return dbHelper.getAktivnostiKorisnikaPoStranama(velicinaStrane, strana, username);
} | 0 |
26888ac42dab092b489549193a174fd3 | a8e34a26d9991f73cb3df4fcb41edea1 | Applies Formular/Bar Visible Fields Values to Hidden Fields Values (these ones are those actually used as "presets" for charts server's requests)
Copies Visible Fields Values to each equivalent Hidden Fields Values | function fill_hidden_fields(){
$("input[name=username]").val($("#username").val());
$("input[name=DecTokenReferenceNumber]").val($("#token-reference-number").val());
$("input[name=TokenReferenceNumber]").val($("#token-reference-number").val());
$("input[name=email]").val($("#email").val());
$("input[name=Firs... | 1 |
fd8856624d8d7db330f567495ae79120 | e8dd45b1194b3434ca72922592f52dbf | Returns the color to be used when rendering second part of ranged value indicator. | public class Colors
public RGB getSignalColor2() {
return signalColor2;
} | 1 |
47ac89047b40d6cae506388c5238364a | 6d02dce46349ea89d1298122e0e94a55 | A running salt-master fixture | def salt_minion(salt_factories, minion_id, salt_master):
factory = salt_master.get_salt_minion_daemon(minion_id)
with factory.started():
yield factory | 0 |
c41e8804500b4fa1ba737fb3cc833666 | ebb16b5a9eb89f6bd8f95f589ea1ebcf | When filterId is null BindModel disables default filter. | public isFilterActive(): boolean {
return !!this.appliedModel;
} | 0 |
c61b492a5f02b565f4e5345916a2f788 | be33d3b5fc4de4d007b36be36d68a9a6 | 水平烟道侧包墙壁温度报警拟合模型 | def q_tube(temp_lmtd,name):
with open(name, 'r') as f:
inputs = yaml.safe_load(f)
h_cold = inputs["h_cold"]
area_cold = inputs["area_cold"]
h_hot = inputs["h_hot"]
area_hot = inputs["area_hot"]
num_tubes = inputs["num_tubes"]
tube_thickness = inputs["tube_thickness"]
tube_length ... | 0 |
8b3cee2926e237181f2503550d78a9f2 | 6699b03c41583f433a3a66d77874898f | Este método retorna una condición booleana en caso de existir o no un articulo | {
PreparedStatement pstm=null;
ResultSet rs=null;
boolean existe=false;
String sql = "SELECT * FROM articulos";
try
{
pstm = conect.prepareStatement(sql);
rs = pstm.executeQuery();
while(rs.next())
{
if(cve_art ==rs.getInt(1))
{
existe= true;
}
}
} catch (SQLException ... | 1 |
7cf4a0d4a54984e8476496a8b5cb0586 | a48275d9d4500035c2f6c345d0a29134 | Getter for fuels quantity. | public class FuelTank
public double getFuel() {
return this.fuelLevel;
} | 1 |
4493cff6d8a2107ebdbe644a12cd5864 | c88c51bd78ca982673eee650e219d034 | Accumulate the total sales for the given month. | switch (type) {
case NewSapling: _monthNewSapling += quantity; break;
case NewTree: _monthNewTree += quantity; break;
case NewElderTree: _monthNewElderTree += quantity; break;
case BearMaw: _monthBearMaw += quantity; break;
case BearBorn: _year... | 0 |
19eb9941d3bd44b55245b7b0d054a33f | 2407b4bb00ce4a3d44aa07c618f3e1e1 | 获取一个重复词的所有关键词信息 | TKKeyWordResult getCorrelationKeyWord(String keywords, Integer topn); | 0 |
061d252d556fe98e79ba59a659a5041b | 6c5f28f79eb42afde7e64ca8847927a2 | <pre>
Required. The ID of the entity.
</pre>
<code>string entity_id = 1 [(.google.api.field_behavior) = REQUIRED];</code> | java.lang.Object ref = entityType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
entityType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
... | 0 |
e7a0e4438f7f46ac5da0691414b54d40 | ac3c973822e6344b7272586ad88f1629 | Arama sayfasına yönlendiren event | namespace ASGJETSAT.PL
public partial class JETSAT : Form
private void btnGeri_Click(object sender, EventArgs e)
{
textBoxHizliSat.Focus();
btnTemizle_Click(sender, e);
Sayfalar.anaSayfa.Show();
this.Hide();
} | 0 |
ccb39c2bb63491077fbdb803eb79afd7 | 513bc0fe493d7d21006834c781c184dd | Aggiorna i valori (aggiornabili) del corso di studi. | namespace UniEBoard.Service.Interfaces.ApplicationService
void UpdateCourse(CourseViewModel courseViewModel); | 1 |
f3788e287957ee106685ab933a6ee57a | dffe2f2fc09c42b6a6d4083a701f94d3 | Método que no permite guardar a menos que se haya ingresado la información correctamente. | mNombre_fantasia.setError(null);
mNombre_legal.setError(null);
mCalle.setError(null);
mNumeroCalle.setError(null);
mTelefono.setError(null);
mCiudad.setError(null);
mPais.setError(null);
String nlegal = mNombre_legal.getText().toString();
String nf... | 1 |
ee46441bf68d67142b95e5ab37caa6d3 | 2cec217264f09cad817e79e145de13ae | Calculate the grade based on the
unit test hashes that have been added
to this grade sheet. | class Grade(object):
def grade(self):
self._component_grades = self._assignment.grade_submission(
self._submission)
self._grade = self._assignment.calculate_grade(self._component_grades) | 0 |
1d738a065f615b6869027a078ce00451 | 7ca7ce8c28d149afbd04d8e79a31f871 | Get all distances that have been added | ArrayList<DistanceVO> getAllDistanceInfo(); | 1 |
9410491d9e4350510cfa8efd8eb90ff0 | 8a014d59c375779b661f534bbde07144 | Test stopping cover during angle move / tilting. | class BondCover(BondEntity, CoverEntity):
async def async_stop_cover_tilt(self, **kwargs: Any) -> None:
await self._hub.bond.action(self._device.device_id, Action.hold()) | 1 |
cea0a74a96a5f5db17578b59b118b602 | bca419c092c2512c4112debef1a9d6db | 当前是否开启签到 | if (this.signStatus) {
this.sign = '已签到'
} else {
this.sign = '签到'
}
} | 0 |
089f419a515ea8f7ab16a13c1ca73712 | 5c2435e0a5ba2d93347d394ed32141e7 | Adds valid weather observation data points to the struct. | public void addNewDatas(List<Entry> beanDatas, int lineIndex) {
if (weightedObservedPointsMap.get(lineIndex).size() == 0) {
LinkedList obs = weightedObservedPointsMap.get(lineIndex);
List<Float> floats = set.getTemperatureByIndex(lineIndex);
List<Float> timex = set.getTim... | 1 |
4bf99988908a58e202985660da9131f6 | 8d45d5fd670b15c047f1e421ef9b564a | ユーザーの登録数の推移 | register = register[["user_id", "day"]]
register = register.groupby("user_id").apply(lambda x: x.iloc[-1])
register.columns = ["user_id", "register_last_date"]
register['register_last_date_from_now'] = f_end_day - register['register_last_date']
print(register.head())
return register | 0 |
3851d129b0e946a4afe30f565dca1623 | 14787ea2842db1c9597f433b15e74e7c | Projects a vector A onto a vector B.
Returns a 2-element array output where output[0] is the projection of A onto B, and output[1] is the rejection of A onto B.
(projection_A + rejection_A = A) | public class WindStream : MonoBehaviour
Vector3[] GetProjection(Vector3 a, Vector3 b) {
Vector3 projection = Vector3.Dot(a, b) / b.sqrMagnitude * b;
Vector3 rejection = a - projection;
return new Vector3[] { projection, rejection };
} | 1 |
9010e2133396a4d1e304b6c04c08f935 | 19ec803f072ae9fce73019e3bc73968d | 汇总当天医生的订单数据 | $res_upd = null;$sum_visit_num = 0;
$dt1 = date("Y-m-d");
$hour1 = date('H');
$hour2 = $hour1-1;
$res_dt = $this->updSpeHour($hour1);
if($res_dt){
$dt1 = $res_dt['dt1'];
$hour2 = $res_dt['hour1'];
}
$this->ChuHour($dt1,$hour2);
... | 1 |
7f81d61bb6ce6ba16fa2caf9d5c703c1 | 064c93e864992e82e13f45599e58aaa2 | The query in Work Item Query Language format. Ignored if --id or --path is specified. | namespace Nuke.Azure
[PublicAPI]
[ExcludeFromCodeCoverage]
public static partial class AzureIdentityDeleteSettingsExtensions
[Pure]
public static AzureIdentityDeleteSettings SetQuery(this AzureIdentityDeleteSettings toolSettings, string query)
{
toolSettings = toolSettings.NewIns... | 1 |
417214a3ac86fc388aabdf6626943efe | 00fb9b7ba7617e974e66d8a8187e4f2c | Update crossover chance when slider changed | void Preferences::on_maxChanceOnHitSlider_valueChanged(int value)
{
if (value-1 < this->ui.minChanceOnHitSlider->value() && this->ui.minChanceOnHitSlider->value() != 0)
this->ui.minChanceOnHitSlider->setValue(value-1);
} | 0 |
e56f47d7bbdf50edb98075aaab38c003 | 0f81b2d3443709ebd4818532a001adfb | 判断该fragment是否已经被添加过 如果没有被添加 则添加 | public class PersonalCenterActivity extends BaseActivity
public void addFragment(Fragment fragment) {
if (!fragment.isAdded()) {
FragmentTransaction ft = this.getSupportFragmentManager().beginTransaction();
ft.add(R.id.main_framelayout, fragment);
ft.commit();
}
} | 1 |
dc27d7952d6dd588a4eb855a16bbc861 | b21ce2ebaf5df8fb6c096fddb8a9e630 | Startup routine for 32kHz Crystal on LFXT1 | FLCTL->BANK0_RDCTL =
(FLCTL->BANK0_RDCTL & ~FLCTL_BANK0_RDCTL_WAIT_MASK) | FLCTL_BANK0_RDCTL_WAIT_1;
FLCTL->BANK1_RDCTL =
(FLCTL->BANK0_RDCTL & ~FLCTL_BANK0_RDCTL_WAIT_MASK) | FLCTL_BANK1_RDCTL_WAIT_1;
PJ->SEL0 |= 0x0C;
PJ->SEL1 &= ~0x0C;
CS->KEY = CS_KEY_VAL;
CS->CTL2 |= CS_CTL2_HFXT_EN | CS_CTL2_HFXTFREQ... | 0 |
2f5ef6b87ccf2babecdb0b13dd759a70 | bc4dafa7ee4de984345c6594cd2dc91c | Function column_description() is a custom column method and is responsible for what is rendered in any column with a name/slug of 'description'. | if (!empty($variables['content']['description'])) {
$variables['content']['description']['#prefix'] = '';
$variables['content']['description']['#suffix'] = '';
}
} | 0 |
63b8d80c295ff9e8a8dfe285742f31d5 | e5f3f5c61b8826549bfb6e7f3417622e | 在数据库中创建一个新的队伍实体对象。 | namespace IS.Model.Repository.Team
int Create(TeamItem Team); | 1 |
95899f4bf84c33a18703dbaf52e8f1e7 | f3e2f2b5f9819f281eeffdeb783c807e | Invokes a static method from this Type. | public final class ReflectionUtils
public Object invokeStaticMethod(final boolean throwException, final Class<?> cls, final String methodName,
final Class<?> argType, final Object param) throws IllegalArgumentException {
if (reflectionDriver == null) {
throw new RuntimeException("Cannot ... | 1 |
eff624041b88299b1b0f7e4c0f23845e | f6c00fe6d95a28ff834f425b8418b565 | Train and evaluate the supplied MNIST Model. | def run_mnist(num_epochs, num_neurons, batch_size, num_workers):
neural_net = FashionMNISTNeuralNet(num_epochs, num_neurons, batch_size, num_workers)
neural_net.train()
neural_net.test() | 1 |
673a090ba5340fa016255704d41e987e | d29e1aafb26f2b15a9bbd0223447c8c6 | List linked logins
Requires auth/oauth2:managelinkedlogins capability at the user context. | class BugzillaAPIKeyLoginResource(WebAPIResource):
def get_list(self, request, *args, **kwargs):
return 200, {
'links': self.get_links(self.list_child_resources,
request=request, *args, **kwargs),
} | 0 |
3684f869d0e08653dd1f947190d9b2f9 | a854f7c3057b8dc582533f1aed232b40 | Modifica el listado de agrupaciones al dado por parámetro.<br> | public class ContenedoraCriterios
public void setAgregacion(List<CriterioAgregacion> agregacion) {
this.agregacion = agregacion;
} | 1 |
a322d74f7a289dc3dd43d23c72198cd1 | 97817500bf44fd9de95eb97d076248ee | Convert Swagger Property object to Codegen Property object | JSONObject result = new JSONObject();
final String propKey = "properties", typeKey = "type", itemKey = "items";
String type = jsonSchema.getString(typeKey);
switch (type) {
case "object":
result.put(propKey, convertProperties(jsonSchema.getJSONObject(propKey))... | 1 |
08e4332c035725a4127c546ff27445e8 | 2022c6273531036fd3282706afe7cd0f | 功能:获取字段左引用符号 | Field leftField = null;
for (Field field : data) {
if (field.isCol()) leftField = field;
}
return leftField;
} | 0 |
108d96d9315e78b497cd8b1fdb42f3ae | e7e6b36e3d58d208340da4e0fc34b206 | Network parameter Initialization Function
Arguments : None.
Returns : None.
Note : HTTP Server example does not use this function. | static uint32_t httpsrv_set_params(HTTPSRV_STRUCT *server, HTTPSRV_PARAM_STRUCT *params)
{
uint32_t l_root = 0;
uint32_t l_index = 0;
char* temp;
RTCS_ASSERT(server != NULL);
server->params.port = HTTPSRVCFG_DEF_PORT;
#if RTCSCFG_ENABLE_IP4
server->params.ipv4_address.s_addr = HTTPSRVCFG_... | 0 |
7647b5b0dd2c4c22403a85d3010c0112 | 927d7144b25259ca5d1cfabbb8232a59 | Deletes task from persistence | @Transactional
@Service
public class TaskServiceImpl implements ITaskService
@Override
public void deleteTask(final Long idTask) {
taskRepository.delete(idTask);
} | 1 |
fadb3d60160b1a838848440b88a49bbb | e6c83d12a3e1f1d6cec9f03133badaf8 | Returns the result of the last Win32 API call related to this object. | def get_last_error
Win.GetLastError()
end | 1 |
c7d0b543b6cc54db73e1dfcc4aba0b7d | 7f7fe213a52b63a1c6fab173e93bff8b | Checks to see if Right Mouse Button is held. | namespace XNABaseLibrary
public class Cursor : Sprite
public bool isRightHeld(MouseState _mouseState, MouseState _oldMouseState)
{
return (_mouseState.RightButton == ButtonState.Pressed && _oldMouseState.RightButton == ButtonState.Pressed);
} | 1 |
cae2c28ee2afe8dbf689122792711fe0 | e3841565c9eb4fa9900583c1004e4dd1 | Find a query filter (if any) for this scope | var filter = _([$location.search().filter]).flatten().compact().value()[0];
if (!_.isEmpty(filter) && (_.isEmpty($scope.subQueries))) {
$scope.subQueries = {};
$scope.subQueries[filter] = _.cloneDeep($scope.urlStrings[filter]);
$scope.selectedSchema = f... | 1 |
3e17bc0c33a7ffc6b9b7941180c02fee | 784919108f2b85b80e4a2bdf40e7fa9a | Passing producer task output as argument to consumer | {
std::vector<std::thread> threads;
threads.push_back(std::thread(produceTask));
threads.push_back(std::thread(consumeTask));
for (int i = 0; i < 2; i++)
threads.at(i).join();
} | 0 |
4f91bb308d958a64e4d2eb6af71dac96 | ddbeea9a0624ba19c02e0f21f5f7263a | Computes the standard deviation of the time series.
Returns:
float: The standard deviation of the time series. | def std_ts(timeseries, nodata=-9999):
ts = fixseries(timeseries, nodata)
return truncate(numpy.std(ts)) | 1 |
0e43996ec8a9d3ef9966e3acffc21100 | b4790722f9ba9e047ada863e3ca6a2c0 | Retorna os options do select convenio | conveniosSelecionados = new ArrayList();
AlertDialog.Builder builder = new AlertDialog.Builder(
BuscarActivity.this);
builder.setTitle("Convênio")
.setMultiChoiceItems(convenios, itemsConvenioChecked,
new DialogInterface.OnMultiChoiceClickListener() {
@Override
public void onClick(Dia... | 0 |
3977c73966398238f61f317b3e85246b | f24d5063418c10ad43b92dcbd3d72c8a | 记录不同平台打包下生成的主 mainAssetBundle 和 mainFest 信息 | {
string[] folders = new string[0];
string[] bundleNames = new string[0];
List<string> assetRelevanceBundleList = new List<string>();
foreach (var assetWithBundle in _AssetRelevanceBundle)
{
var assetName = assetWithBundle.Key;
... | 0 |
8913a5089f3cd0511bc74dfa4b916884 | eefd7d4a453d8f44e484838173b3e660 | Определяет, если ли на таблицу каскадные ссылки | global $objForm, $cronotc;
if ($cronotc->UseTokenInUrl) {
if ($objForm)
return ($cronotc->TableVar == $objForm->GetValue("t"));
if (@$_GET["t"] <> "")
return ($cronotc->TableVar == $_GET["t"]);
} else {
return TRUE;
}
} | 0 |
3625c25eb52ad9a5eec1d64c8200693a | 0194256a36d21f9fae73a58f40381344 | Tests that generators provided by modules are registered. | for cosmo in reference_models():
yield check_halomod, cosmo
for cosmo_mg in reference_models_mg():
yield check_massfunc_MG, cosmo_mg | 0 |
68c6a18a3bb4e6ee486a1caf9a7318e9 | 6178adfe5c03cd40ad875fe6afea6b02 | Clear a character at given position | def clear_entity(con, entity):
libdcod.console_put_char(con, entity.x, entity.y, ' ', libdcod.BKGND_NONE) | 1 |
4959441a3f87ea2e0543919d97f6b7ac | 068597c5d2b355dc862f099b40856914 | Sets the simulation data selection view | namespace CrypTool.Plugins.RAPPOR.ViewModel
public class RAPPORPresentationViewModel : ObservableObject
public void SetSelectedViewInteger(int selection)
{
selectedViewInteger = selection;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.