query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
cc0e76abb457d851c3311524968f8602 | dd09e1e755423eb4885232f52cc7f56b | POST: Home/AddNews | namespace Mohammad.Projects.TariqMal.Api.Controllers
[RoutePrefix("news")]
[EnableCors("*", "*", "*")]
public class NewsController : AtmApiControllerBase
[Route("")]
public async Task<IHttpActionResult> Post(NewsArgument value) => await this.OnPosting(new NewsEntity().Add, value); | 1 |
efda61328b65813efd5e815b5c952acd | 673e6b3f6994cfad77b356050a10428d | Creates a chain of jobs, each reading and writing files using the
toil.fileStores.abstractFileStore.AbstractFileStore interface. Verifies the files written are always what we
expect. | class Store(StepFactory):
def __init__(self, appname, *argv, **kwargs):
super().__init__('(StoreOnFile)', "(StoreOnFile)", *argv, **kwargs) | 0 |
e243ac57b5891825b1b8fb47bd062e76 | e84a2650c04d7efeb98e936b3d26534f | 统计输入内容中的元音字母 | def getCount(inputStr):
return len(list(x for x in inputStr if x in ('a','i','e','u','o'))) | 1 |
229282bacc45e58181fa3e8994dda4e9 | 3f88bf776a239c965167c7dcf43e6b59 | 从Mysql模型工厂中获取一个生成的模型。 | function m(string $name, array $data = [], string $conn = ''): Model
{
return Helper::buildModel($name, $data, $conn);
} | 1 |
3a3d44baee99ae6c015b7fdd72590e18 | b4b8de956b0f6981492b90e135e45cd9 | Testing the extraction of text from PDF files. | @RunWith(SpringRunner.class)
@SpringBootTest(classes = ApplicationTestConfiguration.class)
public class WeatherServiceEndpointTest
private static String extractPdfText(byte[] pdfData) throws IOException {
PDDocument pdfDocument = PDDocument.load(new ByteArrayInputStream(pdfData));
try {
return new PDFTex... | 1 |
a5df18bbc0f9cbec8e7d8952384000db | 3489b0356c1c0bf50c6a800467c281b4 | Finishes the asynchronous execution of the DeleteUserSettings operation. | namespace Amazon.WorkSpacesWeb
public partial class AmazonWorkSpacesWebClient : AmazonServiceClient, IAmazonWorkSpacesWeb
public virtual CreateUserSettingsResponse EndCreateUserSettings(IAsyncResult asyncResult)
{
return EndInvoke<CreateUserSettingsResponse>(asyncResult);
} | 0 |
88120d0a138fd9b5649ec3c590b58bb2 | 675786e2834d408a87f5ffa30f464297 | id序列转换为对应的token序列 | class Vocabulary(object):
def ids2tokens(self, ids):
output = []
for i in ids:
output.append(self.inv_vocab[i])
return output | 1 |
8887a88130c952c6aad8865e8e1a7899 | 703aab80bae2ee56a4e04d675f1b9a6f | metoda sprawdza czy możemy dokonać wypłaty | public class Credit extends Account{
public boolean canReceive(double receivingBalance){
if(receivingBalance > Math.abs(super.getCurrentBalance())) return false;
else return true;
} | 0 |
34f8745cec212ae2e9fbb272b60075cf | 77ebab77da81b33f90d91774c7bc0c66 | Removes any custom JGroups bindings. | public void removeBindings(); | 1 |
7eed106b8da93b2bb871fc0829d38e06 | 9ffd351a432ed6540e3d862f10724407 | ''' Draws the settings menu to the screen.
''' | class Pygraph:
def openSettingsWindow(self):
self.screen.fill(self.color)
settingsScreen = pygame.Rect(50, 50, self.xSize - 100, self.ySize - 100)
pygame.draw.rect(self.screen, self.BLACK, settingsScreen, 2) | 1 |
2fc14b99fbd9ee17ece532300d7bc294 | 8887508416dc331aa685c5f9c99d1fc6 | Extracts locally unique identifier fragment from the specified URI. | return Uri.parse(url)
.takeIf { supportedHosts.contains(it.host)
&& PERMALINK_SUPPORTED_PATHS.contains(it.path) }
?.encodedFragment
?.split("/", limit = 3)
?.takeIf { it.size > 2
&& it[1] == "user" }
?.let { it[2] }
... | 1 |
63b5d12e416044d19633223e429916ea | 902f4595841fda553c10db6794b6b55a | apk批量上线 | {
$apk_id = intval($_REQUEST['apk_id']);
$reason_id = intval($_REQUEST['reason_id']);
if(empty($apk_id)) $this->error("应用参数丢失,请检查!");
$notice = $_REQUEST['notice'];
$apkinfo = D("Apks")->where(array("id"=>$apk_id))->find();
$reason_info = D("Reason")->where(array("reason_id"=>$reason_id))->find();
$accou... | 0 |
d0f1207d315b6532cf6017a7d33f2b08 | 3310c53ed5ca4b53add5d110db075736 | 根据父菜单查询其下的子菜单(不递归,单级) | public List<Menu> findByParentId(Menu menu); | 1 |
c8297844f0bbdd36459cb9920d3a8d8e | e41ab7bb14e70a8fdd2d54557f3f3b45 | 입력된 line만큼 엔터를 친다. | string get_n_linefeed(int n) {
string s = "";
while(n --)
s += "\n";
return s;
} | 1 |
db8b037ee10bf35508ea28bcf8d19ff4 | f9341947bf7419da714b09f5ca7235c4 | @brief : 读取闹钟是否启用 | String sql = "select* from mClock where ManagerID = ? and mIndex = ?";
DBManager dbManager = new DBManager(getApplication());
Map<String, String> map = dbManager.queryBySQL(sql, new String[] {Manager_ID,"1"});
if (map.size()>0) {
Log.e(TAG, "闹钟状态===>:" + map.get("isOpen"));
return map.get("isOpen");
}
... | 1 |
ebdd32c20ec4b419da1a35448aa57b00 | 95435a9da75de4eb29d254c54f5741d1 | Iterates through a list of raw data of a specific type and yields a seed data spec for each object in the list | def to_generator(data):
yield data | 0 |
b93bf51452c0f9afdd6751812daf4bc5 | 3cfa126f0ffa71abb1806232eee97b46 | Get the details of requested master account | func Get_master(user string) string{
Master_info = communicator.Get_http(API_url+"/v1/kv/klevr/"+user+"/masters?raw=1", API_key_string)
if len(Master_info) == 0{
Master_info = "Not yet"
}
return Master_info
} | 1 |
96e24394f70c38c7258f0d657640c581 | 495ef1d71cd824383a737e7647d46822 | {@inheritdoc}
Link the activities to the permissions. checkAccess is called with the
$operation as defined in the routing.yml file. | $entity_bundle = $entity->getType();
switch ($operation) {
case 'view label':
case 'view':
if ($entity->isActive()) {
$view_access = AccessResult::allowedIfHasPermissions($account, [
'view active connection entities',
'view active ' . $entity_bundle . ' conn... | 1 |
e5bd620043eb9632625686ebf4c11572 | b539bac5eedc748012c2fe2326b0b835 | Returns the exploration statistics object associated with the current
GTS. | Object getAssociatedStatistics(); | 1 |
165af3c2d7eb6b35667beb6a18b380bd | c4f24a3c34a4e7eb93c825bd8b370f12 | Check if the box gets an valid EDID from the Sink (getHDMIEDIDReady() in Casablanca) | {
uint16_t DispiId;
VBoxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_INDEX, VBE_DISPI_INDEX_ID);
VBoxVideoCmnPortWriteUshort(VBE_DISPI_IOPORT_DATA, VBE_DISPI_ID_HGSMI);
DispiId = VBoxVideoCmnPortReadUshort(VBE_DISPI_IOPORT_DATA);
return (DispiId == VBE_DISPI_ID_HGSMI);
} | 0 |
43da099c3aad1645126b14d108bc60d4 | 7bdb35b1e153b96478e0c13ea66a6f4e | Squared Euclidean distance between u and v. | def _l2_dist(u, v):
return np.linalg.norm(np.array(u) - np.array(v)) | 0 |
fe6c67ba94e94112848bdac0c872d6a3 | 3cb297f6a660da2d8469a7d289641bc6 | r"""
Returns the result of the reconstruction step that takes place at each
scale before applying the iterative optimisation. | class CTNFWGaussDec(GaussDecompositionAbstract3D):
def get_scale(self, **kwargs):
return kwargs['r_s'] | 0 |
1818d46178f6df3b2952abe968c4636b | 09e0b5e5436bb7b86e39501d1f2e6386 | Returnerar receptets alla ingredienser som en sträng. | ingredients = []
for i in self.ingredients:
ingredients.append(i.getName())
return ingredients | 0 |
fc616b717ce02150c7736700a351a445 | 8eab02b734a22c294aca6c867783742f | Returns the meta object for class '{@link oepc.OrganisationUnit <em>Organisation Unit</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getUnidadOrganizacional(); | 1 |
65aa46ba1bfd5142e0fc3decd7f50489 | 9df888e2438aec632b9bd2af4b31714b | Click event handler for Dakota Double Burger Button | namespace PointOfSale public partial class Entrees : UserControl
void DoubleDraugrClick(object sender, RoutedEventArgs e) {
HideAndMoveButtons("doubleBurger");
ClickedEntree("doubleBurger");
currentOrderItem = dd;
} | 1 |
2d407294a2331ef89e69d69bece9dd66 | b6fef8d5f6609b04ad7ab3f0539b5724 | Gets the stage start date and time of the brew batch | const startAt = this.inmemory.startAt;
return startAt ? new Date(startAt) : null;
} | 1 |
fb8cbfe6df65ea2d0f67cf1dc7490484 | 3c86186c489f80d8a7b99f0fc9bc4bfb | Test SatelliteImageFiles.get_sat_image | if palette is not None:
assert isinstance(palette, str)
params = dict(paletteid=palette)
else:
palette = PaletteEnum.GREEN
params = {}
if isinstance(metaimage, MetaPNGImage):
prepared_url = metaimage.url
status, data = self.... | 0 |
bfffd550bcbf435fc4ce11fbb8721a68 | e9d2ec9dfb8f21cc787a912d4abe9eaa | the Atbash cipher is the same as the substitution cipher using a reversed alphabet | def cipher(target):
res = "".join(c if c < "a" or "z" < c else chr(219 - ord(c)) for c in target)
print(res) | 1 |
1d39bb84437696cfbdb1af4f1d4d4fbf | c17d0e469daabaed1426122408c036da | Returns the URL formatting for the webhook type | class Match implements IHasShortUrl, ICommentable
public function GetShortUrlFormat()
{
return Match::GetShortUrlFormatForType();
} | 0 |
b329ea97935f7866173cf42e4f16411b | db6b9e4a2a8f076dde36dd29f82869af | Method to reset the whole system...regiser taken from the lpc datasheet | {
struct ad9548_state *st = &ad9548_st;
struct ad9548_platform_data *pdata = &ad9548_pdata_lpc;
int32_t ret, i, ref_pwd;
int32_t ref_logic0, ref_logic1;
int32_t distr_settings, distr_en, distr_sync;
st->pdata = &ad9548_pdata_lpc;
ret = ad9548_reset();
if(ret < 0)
return ret;
ret = ad... | 1 |
799fe66cc17efb7299e85a56a63ccdbe | a759ea670541c4fcaa95a3647a5500e7 | Clamp the mouse movement to the window bounds. | {
x = Math.min(x, windowWidth - width);
y = Math.min(y, windowHeight - height);
x = Math.max(0, x);
y = Math.max(0, y);
} | 1 |
0436a36bfd0b3e04f7229f4587a37a1f | a0dd8384e47432c8accd80c41e36c525 | Instrumentation Summaries field.
Returns the Work Instrumentation Summaries. | namespace Hl7.Fhir.Specification.Source
IEnumerable<ArtifactSummary> ListSummaries(); | 0 |
df96ec0c713749190b975aae947f336d | 7f992c3b2d2ac44dfc669c620b0a8c9e | reads bz2 file line by line and yields dicts
Yields:
dict: individual posts | buffer = b''
while True:
file_bytes = self.file.read(self.read_size)
if file_bytes == EOF:
yield buffer.decode(self.encoding)
self._close()
return
buffer += self._bz2de.decompress(file_bytes)
if self.linebrea... | 0 |
49fd4f7ffb5e410171d5ac9b85f36eb0 | 357e28b033f07ef135f3b2d91a6be093 | Добавляет к текущему значению переданное в параметре число | namespace FotoApp.Controls
public partial class NumericUpDownTextBox :TextBox
private void Add(int value)
{
int currentValue;
if (int.TryParse(Text, out currentValue))
{
currentValue += value;
if (FixValue(currentValue))
... | 1 |
079b4035c17c2f8365503c129fa41932 | e1262e1922b0dbc38240cda615460dba | Запись информации о посещении пользователем страницы с просмотром изображения с камеры | class Photos
public static function record_view($user_id, $profile_id, $photo_id) {
if(!is_numeric($user_id) || !is_numeric($profile_id) || !is_numeric($photo_id)) {
return false;
}
if(!self::is_valid($profile_id, $photo_id)) {
return false;
}
if(!isset($_SESSION['photo_visit'][$profile_id][$photo_id])... | 1 |
1ea64f8f0a8bf5050c3f521b6eb296c0 | 6b92ef4994a7fb5af87c367f5827058f | CALCULA EL SUELDO PROMEDIO POR DIA | class Liquidacion(models.Model):
def salario_promedio(self):
prom1 = float(self.salario_promedio_semestre1)
prom2 = float(self.salario_promedio_semestre2)
formula = (prom1 + prom2)/2
return formula | 0 |
1c3f8345fffced3c3accb7aa0178c475 | 9a1cc56fe7259b227500d5736f94a8dd | Collect club age grade statistics, based on collected athlinks statistics (collectathlinksresults) | @Service
@Transactional(readOnly = true)
public class ConsanguinityService extends AbstractGenericService<ConsanguinityResponseObject,BreederStatistics>
@HystrixCommand(commandKey = "lofselectclubservice"
, fallbackMethod = "buildFallbackConsanguinityList"
, threadPoolKey = "getStatisticsConsanguinity... | 0 |
1d2e877999d95bb4ea43d629338f61da | fad5c4fea5579a8bc5a399dc4e46281b | his gets a collection of every employee, then calls a function to sort the collection into a collection of just copilots and returns that | function getEmployee(){
var filters = new Array();
filters[0] = new nlobjSearchFilter('salesrole', null, 'is','-2');
var columns = new nlobjSearchColumn('firstname');
var employees = nlapiSearchRecord('Employee', null, filters, columns);
var employee;
var exports = new Array();
for(var i = 0; i < employees.lengt... | 0 |
e3bc3f91f02fbb215fd785b472cbc536 | 558ca87ac864cd5ddb23ecc9b658f511 | Увеличение Ловкости | self.power += 20
if self.power > 100:
self.power = 100 | 0 |
4030c19b0fa22d9aec940ad32760f337 | 3760187cff50d99c171c197a2b78a2da | Update a saved query with the given parameters. | namespace Google.Cloud.Asset.V1
public abstract partial class AssetServiceClient
public virtual stt::Task<SavedQuery> UpdateSavedQueryAsync(SavedQuery savedQuery, wkt::FieldMask updateMask, st::CancellationToken cancellationToken) =>
UpdateSavedQueryAsync(savedQuery, updateMask, gaxgrpc::CallSettings.Fr... | 1 |
491591f27a78db3dffb1c392cd83c968 | 253df198a06cb3550a16a2ed63974ada | Average actor_loss_grad. | for a_param, a_grad in zip(self.shared_actor.parameters(), self.actor_grads):
a_param.grad = a_grad
for c_param, c_grad in zip(self.shared_critic.parameters(), self.critic_grads):
c_param.grad = c_grad
if self.global_gradient_norm != -1:
torch.nn.utils.clip_gr... | 0 |
679225d62dbf9f1de5c725c45fcdf536 | fec629ba1dcfca36fb6cfe89cad3ea45 | Before Insert, keep only last 5 rows and delete the rest | inputs = open('data/BTC-USD_in.csv', 'w+')
prev_50 = []
with open('data/BTC-USD_new.csv',newline='') as filterd_data:
reader = csv.reader(filterd_data)
for ind, (o,h,l,c,v,label) in enumerate(reader):
if ind > 50:
input_row = ""
for day in prev_50:... | 0 |
243991d5ac70a59f440171c5c03d51db | 07fab13475ef4ede271cabc8ffcede30 | 跳转到取消订单界面 | @Controller
@SessionAttributes({ "allocationOrderCash" })
@RequestMapping(value = "${adminPath}/allocation/v01/cashOrder")
public class CashOrderController extends BaseController
@RequestMapping(value = "toCancel")
public String toCancel(String allId, String taskType, Model model) {
AllAllocateInfo allocate = alloca... | 1 |
43dc0f4fa4b2de139af22ac0ac95dc5b | c6bff2cc96faa7cace20b25307b6857e | increase torpedoes | function placeTurret(pointer) {
var y = Math.floor(pointer.y);
var x = Math.floor(pointer.x);
var upgraded = false;
if(x <= 800){
if(score >= 50){
var allTurrets = turrets.getChildren();
for(var i = 0; i < allTurrets.length; i++) {
... | 0 |
0542990e5223b110b99b13fed4ba2626 | 3eaf15bbab75146d88c4f6b3ce331da2 | Defines lookaround patterns for matching before and after emoticons. | export class EmotePackage extends Package
getRegex(config: GuildConfig) {
let delim = config.data.emoji_delim.map(escapeRegExp);
return new RegExp(`(?<!<a?)${delim[0]}(\\w+)${delim[1]}(?!\\d{18}>)`);
} | 1 |
5008bede17255a6943f4a91c26625172 | c6e7c5e72c29f1b504de6487fd938ff2 | 调用Dao中方法获取所在OLT下的CM列表数量 | int selectOnuAlertListNum(Map<String, Object> map); | 0 |
181caf8a4a3b1c304d4e2b41f1ec37c1 | 1883d340ceb5ede3fbfe89d564f52252 | Integer num of the installed proc units on the system. | def Getpronum():
from os import popen
return int(popen('nproc').read()) | 1 |
52e5a48ec8b811faa7bfbcf3cfb3e466 | 921595ab42dd1bc5cbd56079e662cada | Easing equation function for an elastic (exponentially decaying sine wave) easing out/in: deceleration until halfway, then acceleration. | public partial class EasingLerps
public static float InElast(float a, float b, float t, float total = 1f) {
b -= a;
t = Clamp(t) / total;
if(t == 0) {
return a;
}
if(t == 1) {
return a + b;
}
t--;
float p = total * 0.3f;
float i = b;
float s = p / 4;
float postfix = i * (float)Pow(2, 10 * t)... | 1 |
42fc513e8cc4ad7f48962c17443a4e38 | c11a6c09dc08df5c7e15315f0c904cca | NewSparseFlowReport returns a new SparseFlowReport. | return &VRFV2SoakTest{
Inputs: inputs,
TestReporter: testreporters.VRFV2SoakTestReporter{
Reports: make(map[string]*testreporters.VRFV2SoakTestReport),
},
}
} | 0 |
a406b1ecbdf2a7bf8128d09cd8eddd17 | c2bc58295fd8e4d2919f90e5e5edd0d0 | Test case for update_notification_rule
Update Notification Rule (Partial) # noqa: E501 | class TestNotificationRuleApi(unittest.TestCase):
def test_disable_notification_rule(self):
pass | 0 |
c38aaf11025796d713613f6b009ac071 | a29d65c39ea265b560330a752171a42e | merge one line and remove consecutive white space | var string = this.replace('\n', ' ').trim()
var stringPreviousLength = string.length
while (true) {
string = string.replace(" ", " ")
if (string.length == stringPreviousLength)
break
stringPreviousLength = string.length
}
return string
} | 1 |
56dbf186a4ee4129f88cdf8709928d95 | 8628490fcb09a71cbf984019b759d34d | Creating GUI. Here you can set bounds for your buttons and labels | Container contentPane = getContentPane();
contentPane.setLayout(null);
JLabel firstValueJLabel = new JLabel();
firstValueJLabel.setBounds(16, 16, 100, 24);
firstValueJLabel.setText("First value:");
contentPane.add(firstValueJLabel);
firstValueJTextField = new JTex... | 1 |
779a888daf36989ef9f1faae12913ce6 | 96bd27d88e962c1972d78eacf4a8bd21 | Store the given fundamental object, and publish the given notifications on pubsub. | object_uuid = object.uuid
weak_object = weakref.ref(object)
self.__objects[object_uuid] = weak_object
for registered, unregistered in self.__subscriptions.get(object_uuid, list()):
if registered:
registered(object)
self.registration_event.fire(object, ... | 1 |
6e56464306017a94459a54b379082cbb | ad08264cfc942c9b2ede295c146ebd56 | Register a callback for the GLFW Mouse button event: Your callback function will be called at run time if the mouse is clicked.
The callback function receives the mouse button, button action and modifier bits.
Refer to the GLFW documentation for full details: http://www.glfw.org/docs/latest/input_guide.html#input_mouse... | void View::onMouse(void (* callback)( int, int, int, int )) {
glutMouseFunc(callback);
} | 0 |
5407c6f759643415209127a486d95ac4 | 65ee0f8ce2f1820eac51d327b7ef6fa8 | 遍历聚合树, 整合聚合结果为多行(Map), 行(Map)类似于db的列名->值 | public class QueryUtil
@SuppressWarnings("unchecked")
public static void addRowToTree(Map<Object,Object> map, List<Object> row){
Map<Object, Object> current = map;
int limit = row.size()-2;
int index = 0;
Object key = null;
while(index < limit){
key = row.get(index);
Map<Object,Obj... | 0 |
1bdceaba1166f3ff74556b1e668fcdcb | 20ba0cc4233fb780c945a9473a8e2903 | This function prints the list of the questions received according the amount | {
for (int i = 0; i <= stop; i++)
{
double Qtotal = 0;
for (int j = 0; j <= arraySize - 1; j++)
{
if (Math.floor(array[j][0]) == i)
{
Qtotal = Qtotal + array[j][1];
}
}
Sys... | 0 |
ce3672e6ccb8b01dbf9d1a00152a2348 | 197e8455efa28691a74076054a6183ba | disable the codec_i2s peripheral (in case it hasn't already been disabled) | static inline void stn8815_i2c_disable(struct stn8815_i2c_dev *dev)
{
u32 cr = stn8815_i2c_rd_reg(dev, I2C_CR);
cr &= ~I2C_CR_PE;
stn8815_i2c_wr_reg(dev, I2C_CR, cr);
} | 0 |
13c9c541ad60ad1a2b02e641dde70e67 | bf05fe06594eb544d5401acc6a3fdffd | Overrides IsTemporary flag for the current table. This call will have effect only for databases that support
temporary tables.
<para>Supported by: DB2, Oracle, PostgreSQL, Informix, SQL Server, Sybase ASE.</para> | ISqlTableBuilderColumns usageTemporary(); | 1 |
7dd6b8b22c99a0042c43d8459963dad1 | fc7603e2db6be83bb99871d3179b347e | Tests successful describe with default output format. | func TestDescribe(t *testing.T) {
assert := asrt.New(t)
for _, v := range DevTestSites {
tmpdir := testcommon.CreateTmpDir("")
cleanup := testcommon.Chdir(tmpdir)
defer testcommon.CleanupDir(tmpdir)
args := []string{"describe", v.Name}
out, err := exec.RunCommand(DdevBin, args)
assert.NoError(err)
asser... | 1 |
bf96fe094104e1636d4fa3d0c6c647ed | 5aea12b4ba6a6f9ab4d813771b6bb19c | 检测用户名和密码是否有效 | public class QQServer extends TCPServer
public boolean checkNameAndPwd(String name,String password)
{
boolean success=false;
if(userDao.checkNameAndPwd(name, password))
success=true;
return success;
} | 1 |
84d06f9c0a8bb98f46d1ef350ade6529 | a4d1808228942a093f695dfb4c42dd7a | 최근 배송지 | {
$query = DB::select('*')->from('mail_all');
$query->where_open();
$query->where('status', '=', 'on');
$query->or_where('status', '=', 'sending');
$query->where_close();
$query->order_by('regi_date','asc');
$query->limit(1);
$query->offset(0);
$arr = $query->execute()->current();
return $arr;
} | 0 |
614b3c0b29fe4bcc5277689956daafc3 | 7d5e02a73df0c2ce830d1273708d3f2e | Combine all the subtrees to get the final tree generated by the CKY parser. | int outDegree = (depth == 0 ? inDegree : (depth == 1 ? firstOutDegree : otherOutDegree));
if (depth == 0) {
final List<String> children = genChildren(outDegree);
roots.clear();
roots.addAll(children);
genSubTree(children, depth + 1);
} else if (dep... | 1 |
c25f15bd13aa15ace8faec83a32294fb | fe48e49f826c66556385c1df72ccaac9 | Constructs the led graphics based on its state and style properties | center = 50
self.widget_x = self.x + self.widget_dist + center
led_y = self.box_y + self.margin + (self.label_height * self.label_counter)
return f"""# (Byte)
object ByteClass
beginObjectProperties
major 4
minor 0
release 0
x {self.widget_x}
y {led_y}
w 17
h {self.widget_height}
controlP... | 1 |
0b34fbe3e5be3c24da53b3a9248cf309 | 74bde5505e3d585f8d4021e9f0c8dffc | Sets the last_updated of this Equipment. | void unsetLastUpdated(); | 0 |
04c444c386120b61638ebc7217ec62d1 | 339df3319ca29f8a3d922e4fa817d9ab | 设置问诊面板布局 | public class PcLivePlayActivity extends BaseActivity implements TextureView.SurfaceTextureListener,
IMediaPlayer.OnPreparedListener,
IMediaPlayer.OnVideoSizeChangedListener
private void initQaLayout(LayoutInflater inflater) {
tagIdList.add(R.id.live_portrait_info_qa);
tagRBList.add(qaTag... | 1 |
c5a0f67dbb35598899b6c3b8a22055d6 | 93f0c89801e7d63cd85852d6c25925b6 | Gets the visible state of component (wtAutoCompleteBank_Category_2) | Boolean isVisible = (Boolean) getValue(PROPERTY_ISVISIBLE);
if (isVisible != null)
return isVisible.booleanValue();
return false;
} | 1 |
70ff77c18e8864266d56633abad54aad | 85d64b3c5e2733614333b31145b4d211 | Access method that returns the value of SideC. | int getSide(); | 0 |
7cb5aad428cfbbc1aa7d761789a4a2ee | df6cc0aca28308a0facfed6a2f751905 | here we get the 4-connected neighbours | neighbours[0][0] = x-1; neighbours[0][1] = y+1;
neighbours[1][0] = x; neighbours[1][1] = y+1;
neighbours[2][0] = x+1; neighbours[2][1] = y+1;
neighbours[3][0] = x-1; neighbours[3][1] = y;
neighbours[4][0] = x+1; neighbours[4][1] = y;
neighbours[5][0] = x-1; neighbours[5][1] = y-1;
neighbours[6][0] = x; ... | 0 |
f904327bff86e27b838d422a664026d1 | fe963d3c536adabd6354cd936d475025 | Method which maps the <see cref="NotPaymentToCourtDocDetail"/> to <see cref="NotPaymenttoCourtDocDetailEntity"/>. | {
NumberOfJudgeAssignDetailHistoryEntity numberOfJudgeAssignDetailHistoryEntity = null;
try
{
if (numberOfJudgeAssignDetailHistory != null)
{
numberOfJudgeAssignDetailHistoryEntity = Mapper.Map<NumberOfJudgeAssignDetailHisto... | 0 |
cf895b2a626f950723735def55960524 | 66be48b7f744544e7ed82895038abb3b | navigate back to patient home window with the user details | public class SecretaryRemovePatientAccount extends javax.swing.JFrame
private void BtnCancelActionPerformed(java.awt.event.ActionEvent evt) {
new SecretaryHome(currentUserID).setVisible(true);
this.dispose();
} | 0 |
4dcaa58421198ee88b59fe328d1f7a6c | cad931e10bef2148fed5e52ba471a738 | 设置是否下载图片 | public class ImageLoad
public void setSave(boolean isSave) {
this.isSave = isSave;
} | 0 |
1bbc65fa2cba34e87919755396b0d4a2 | 51f8c3f5b7dfa4c4c496f5ad54bc9dd3 | 重设用户的登录密码 -- 使用配置文件中的初始登录密码 | User user = userMapper.selectByPrimaryKey(userId);
if(user != null)
{
user.setPassword(MD5Util.MD5EncodeUtf8( Const.INITIAL_PASSWORD ));
int result = userMapper.updateByPrimaryKeySelective(user);
if(result > 0)
{
return ServerRespon... | 1 |
a262bc8d875c138105fa3ba5955a4726 | aa9a83ef6f6e8fc1a65506747c7b4e8c | Merge options of application binary interface. | {
parent::setOptions($option);
foreach ($option as $name => $value) {
switch ($name) {
case 'binStubs':
$this->setBinStubs($value);
break;
case 'clean':
$this->setClean($value);
... | 1 |
fb29b56a78161c806c051e4a32c79537 | 9bc98197855a215be3736c783dd11eee | 出库时间. | @SuppressWarnings("serial")
public class InvThTransaction implements Serializable
public Date getOutTime() {
return this.outTime;
} | 1 |
a51806aee931b748e4050181c0445484 | f57e083d91a7eb0d599def9bdd0adfb0 | 获取数据库用户登陆名 | function osc_db_user() {
return getSiteInfo('s_db_user', DB_USER);
} | 1 |
30377f0955da455915193eae1640cb83 | cca29a0466f1aa3af339bd930d5e4a31 | リポジトリの作成(ないとき)と、ユーザー名/メールアドレス/自動改行変換の設定 | class SettingRepository extends Repository
public function activation($urlHome, $siteName, $adminID, $adminPass)
{
$this->save([
[
'conntentType' => 'text/plain',
'valueType' => 'text',
'label' => 'アクティベーション',
'name' => 'activate',
... | 0 |
8ca5dd5c26944fdb3ac6f36fc6f8cb3d | 6b38a133e4bf945f2a43f19ee16dd712 | 发送枚举型的端点数据 | {
if (checkPoint(array))
{
int length = (array.Length + 7) & (int.MaxValue - 3);
Stream.PrepLength(length);
byte* write = Stream.CurrentData;
*(int*)write = array.Length;
write += sizeof(int);
... | 1 |
eb94492b1950003a02bba66f31667aeb | 0b1da1a03a6126f6288849eaaa88a082 | Waits for an asynchronous call to the ModifyMonitoredItems service to complete. | {
try
{
this.UpdateAsync(startTime: startTime, expiryTime: expiryTime).Wait();
}
catch (AggregateException exception)
{
throw exception.InnerException;
}
} | 1 |
c8725c5f61840c83a07d493d88129692 | e2dfa517d5121e1d928bb2d5c4cfe291 | Establece el estado del docente para visualizar en la vista. | class DocenteController extends Controller
public function show(docente $docente, persona $persona)
{
} | 0 |
4b29310f33603d3bb8736d995b7fe6c3 | f8c0a5eac5a3738be3c598b232084a2c | 获取区局左下角的四个率(施工图批复,结算率,开工率,投产率) | def get_xhjg():
xhjg = {'zxz':[],'zd':[]}
br = mssql('s5111905')[0]
br_zd = br - mssql('s5111905')[1]
wt = mssql('s5111903')[0]
wt_zd = wt - mssql('s5111903')[1]
am = mssql('s5111903')[0]
am_zd = am - mssql('s5111903')[1]
db = mssql('s0031530')[0]
db_zd = db - mssql('s0031530')[1]
... | 0 |
e27d78057f65606c59f486e3a9fe3864 | 8aeb4a5ef9450dcada1b6f8e6ef1979e | Get named profile credentials. | impl Mfa
pub fn get_secret_by_name(&self, profile_name: &str) -> Option<Vec<u8>> {
self.config.get_secret_by_name(profile_name)
} | 1 |
9fec8ce42183fdb6ac05290a19aa9706 | a7f4215ec15cdaac899731a761ce163e | Function for notify that the training is ended | class _GeneralPLModule:
def on_train_end(self):
if self.trainer.global_rank == 0:
epoch = self.trainer.current_epoch + 1
if epoch < self.trainer.max_epochs:
print(
"Early stopping criteria reached at "
f"epoch {epoch}/{self.trainer.... | 1 |
61487244d7ac53076ac7eca5944e62dc | b9b3e3890b273caba635090b47affd16 | SkillService constructor. | class AssignSkillToUserTask extends Task
public function __construct(SkillRepository $repository)
{
$this->repository = $repository;
} | 0 |
07ecd53c52c308d19952ad0be70982ef | 7298b0e5d8f6800a98e6144cbc7cc4cf | Safe shortcodes_generator setter. | global $shortcode_tags;
foreach( $shortcode_tags as $shortcode => $function )
$this->shortcodes[$shortcode] = '['. $shortcode .']';
} | 0 |
d2ef71f93abefa014359f7faad15e5cd | 16aac780fb2989ab82bdb9634d7e3b7f | 品质问题分页查询 | public JSONObject getQualityPage(JSONObject json) throws Exception {
String respStr = HttpUtil.doPost(regionUrl + PropertiesUtil.getRegion("getQualityPage"), json.toJSONString());
return JSON.parseObject(respStr);
} | 1 |
fa2b9878e3b5b496e7ee657b5433c4f9 | de88abf79c7c7503096e607d764ec58a | Refresh session. Email and password are not needed. | namespace Supabase.Gotrue.Interfaces
Task<TSession?> RefreshSession(); | 1 |
556912f36df89f727ec87a95573fcf71 | 23eea68f595ae24c17f10af7fe3c0aa7 | #----------------------------------------------------------------#
# READ IN FREQUENCYxPOP TABLE, REMOVE POPS IN exclude
#
# Notes
# -----
# - assumes snpfile has colname 'index' which has pop names
# - the rest of the colnames are names for each locus in dataset
#-------------------------------------------------------... | readIn<-read.csv(inFileName, stringsAsFactors = FALSE)
remNA<-subset(readIn, !is.na(readIn$sum.taxonomy))
Orig <- remNA[,-1]
rownames(Orig) <- remNA[,1]
Filt<-Orig[rowSums(Orig == 0) <= (1-minPres)*length(Orig), ]
tr.Filt<-t(Filt)
if (opt$name_correct==TRUE){
oldNames<-row.names(tr.Filt)
newNames<... | 0 |
336e90c400e31ede5faf39086ab1370a | 8483268bdfc7c1b94eeb174cdd268bcb | reminds about soon account expiration | class DomainController
public static function cron_expiration_reminder() {
$domains = Domain::get_domain_expirations();
$distances = self::get_reminder_distance();
$expiring_soon = array();
foreach( $domains as $dom ) {
$m = new Moment( $dom->expiration );
$momentFromVo = $m->f... | 1 |
9b2d7062936d4f0a52673fbac5d15d14 | 86639a09b49e4f1e283d4a566edf5a61 | Get values for factor calculation for trilinear interpolation | namespace XYPlotPluginSeq public class XYPlotSeq : RegionHolder<Chart2D>
private double[] GetValues( int n, int m, double[,] zvalues )
{
var vals = new double[5];
vals[0] = zvalues[ n + 0, m + 1 ];
vals[1] = zvalues[ n + 1, m + 1 ];
vals[2] = zvalues[ n + 1, ... | 0 |
f8a8accc4ec1473303618bd1cafb25c7 | 0663be317b63cf4f2c88aa350ec57a1a | Determina el estado del boton validar | function estadoBotones(estado){
$('#Guardar').attr("disabled", estado);
$('#Cancelar').attr("disabled", estado);
$('#Eliminar').attr("disabled", estado);
} | 0 |
ccb90fbcbacab02a67d6979ff962c3eb | bd2aaa3a8f1b8add4de3137c3fa201a6 | filter that enables/disables molt option in filter | action: ActionType<typeof Actions.filterOptionActions.toggleFilterOption>) {
return options[action.payload.optionValue] ? disableFilterOption(options, action.payload) :
enableFilterOption(options, action.payload);
} | 1 |
ff91d8dd04225c5b9e275ba42c80317e | 4bb06b9628ae8f814c23c982a0290cc2 | Off-diagonal regularization (complementary regularization) | coefficient, pixel_neighbors, pixel_neighbors_size
):
pixels = len(pixel_neighbors)
regularization_matrix = np.zeros(shape=(pixels, pixels))
regularization_coefficient = coefficient ** 2.0
for i in range(pixels):
regularization_matrix[i, i] += 1e-8
for j in range(pixel_neighbors_size... | 1 |
f5ee81cbab1893f3711e052e40e0e9ee | e7150b623081c83e8816d9bbb903b4cb | # List Of Local Files In This Folder | {
tmp <- do.call( rbind
, lapply( get.files.for("libraries", subdir)
, read.one.libraryfile
)
)
tmp
} | 0 |
caeae12a7aa1def57dd7dd7abd228542 | 7fb156608f283080d57e2da04e51ad65 | Creates a form to create a Book entity. | class BookController extends AbstractController
public function new(
Request $request,
Security $security,
CoverFileUploader $coverFileUploader,
BookFileUploader $bookFileUploader
): Response
{
if (null === $security->getUser()) {
return new RedirectResponse($... | 1 |
f4220ec2193ef05ab7ed5aef3fea3fc4 | c18aa44bcbd210b88097a361ca3a93fb | The WM_MENUCHAR message is sent when a menu is active and the user presses
a key that does not correspond to any mnemonic or accelerator key.
Ignore so we don't produce an error beep. | {
if (m.Msg == 0x203) { m.Result = IntPtr.Zero; }
else base.WndProc(ref m);
} | 1 |
37cf98d5ec887c28b7160f921f9e2457 | 1257f3ef305bbcb31415b87b4e7b2684 | Test the counts -> TPM conversion for some expression data. | rc_exp = pd.read_csv(rc, sep="\t", float_precision="round_trip")
rc_exp["FEATURE_ID"] = rc_exp["FEATURE_ID"].astype("str")
tpm_exp = exp_to_df(tpm, "TPM")
rc_exp["GENE_SYMBOL"] = rc_exp["FEATURE_ID"].map(feature_dict)
input_features = rc_exp["FEATURE_ID"].tolist()
if not all(f_id in feature_dict... | 1 |
9ccf7251b9859b63c7e0bccadd308b39 | 7f12d8adec14249471fade60fdfa8c64 | The CAS client's default service URL.
This can typically be overriden in any method call. | @AutoValue
public abstract class UrlMapOptions public static class Builder
public Builder defaultService(URI defaultService) {
this.defaultService = defaultService;
return this;
} | 1 |
f754b856302dc9e5d1b6216e5b12ca43 | b9fcb9c2afb73980c2cb441b48bcc97a | Invoke the given callback on all locally declared fields in the given class. | final List<Method> methods = new ArrayList<Method>(32);
ReflectionUtils.doWithLocalMethods(clazz, new MethodCallback() {
public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException {
methods.add(method);
}
});
return methods.toArray(new Method[methods.size()]);
} | 0 |
6f7d037f51d7a7e063c44e277552e6f1 | e2ba55126203f0d7ad59b7d6af3fec68 | Устанавливает имя поля для связи с target-коллекцией | class HasManyRelationField extends BaseField
public function setTargetCollectionName($targetCollectionName)
{
$this->metadata->set('target', $targetCollectionName);
return $this;
} | 1 |
7545cfc065b0b8987b790da92a86f510 | ee6433eb53f5d8fee84d89d66a047178 | is the filter button visible | public class ClientTopTenSplitPane extends SplitPane implements Initializable
public boolean isShowFilter() {
return this.tpFilter.isVisible();
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.