query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
198f05465ccd4c7eb880109efae81929 | 9f0451e265455aa1673e525833be525e | Returns the number of nodes on this object, he himself included | public int numNodes(); | 1 |
543f117f479046e808d3ed95e172a99b | 8ef9c189c007df620655f58aea47570a | Check if the validation was successful
If there are no validation messages set, the validation result object is considered valid. | class ValidatorResult
public function isValid()
{
return empty($this->reasons);
} | 1 |
6b16a9f24c12f5e271884b37a28dfa16 | e33fe8862ba08e6ee2286ae4205b76fa | 页面刷新的时候从本地缓存获取用户信息数据存储到vuex | let db = vue.prototype.sub.db
let userInfo = uni.getStorageSync('userInfo')
let token = uni.getStorageSync('token')
if (userInfo) {
userInfo = JSON.parse(userInfo)
state.userInfo = userInfo
state.token = token
} else {
state.userInfo = ""
state.token = ""
}
} | 1 |
2e24e2068689a4bdaa3876354a881552 | 892df6f06aa42efe831ff94fcdc24951 | Метод построения модели для отображения подробностей проведенной или запланированной встречи. | {
var event_view = new EventView();
ViewBag.Rows = await _seatRepository.GetUniqueRows(eventId);
try
{
var events = _eventRepository.GetList().Where(p => p.Id == eventId).FirstOrDefault();
Performance performance = await _performanc... | 1 |
2483319eb43ecdabcfcae5a19880f97f | 6d4f15979e85281fe4c4a7bf54b10780 | access map info in local arrays with an offset to accommodate tiles outside the map | void populateLevelArray(){
int i;
totalBorders = 0;
for(i = 0; i < 128; i+=8){
COORD c;
c.x = i;
c.y = 0;
game_map[totalBorders] = c;
totalBorders++;
COORD d;
d.x = i;
d.y = 152;
game_map[totalBorders] = d;
totalBorders++;
}
for(i = 8; i < 152; i+=8){
... | 0 |
f9b013b58795f7fc7d86e4139da22ed3 | 7edc76ed7a648046e3bfa4ef211efa0b | Read the list of groups, if necessary. | public class GroupsUtils
protected static void initGroups() {
String groupsDef = getGroupsFromSystemProperty();
if (groupsDef == null) {
groupsDef = getGroupsFromPropertyFile();
if (groupsDef == null) {
groupsDef = Groups.ALL;
}
}
groups = Arrays.asList(groupsDef.split(","));
} | 1 |
5940d87ca28651b9cd1376b3ad8a89c6 | 19fc34b9512e1f1ce80c1cda88db9ccf | Create IR variable operand. | if isinstance(node.type, asr.Integer):
var_type = IntBaseType(String('integer'))
value = Integer(0)
elif isinstance(node.type, asr.Real):
var_type = FloatBaseType(String('real'))
value = Float(0.0)
else:
... | 1 |
28e9805a6a15a512ca8183fb280083cc | ceb24228f575edea18253eb8e565b471 | 데이터를 읽어들이고 정규화 및 셔플을 수행함. | X = np.loadtxt(open(file_Feats, 'rb'), delimiter=',', skiprows=0)
Y = np.loadtxt(open(file_Labels, 'rb'), delimiter=',', skiprows=0)
sample_num = X.shape[0]
try:
output_len = Y.shape[1]
except IndexError:
Y = Y.reshape(Y.shape[0], 1)
output_len = Y.shape[1]
min_data = np.... | 0 |
21fc185aad319cd66cfb9c6c0663a168 | f6bfcb80648ba4ea59a051dd5a53210a | Get original indices of the two buses at each end of a branch | counter = 0
maintype = None
contype1 = None
contype2 = None
if self.grid_type == "ruraloverhead1":
maintype = "NFA2X 4X70"
elif self.grid_type == "ruraloverhead2":
maintype = "NFA2X 4X70"
elif self.grid_type == "ruralcable1":
ma... | 1 |
d7f92b7984d9701595894f26db33c749 | d3ea23fa296389eec642b3c37573166b | Returns session hash based on moodle session, IP and browser info | {
static $ip = '';
if ($ip == '')
{
$ip = substr($this->_ip, 0, strrpos($this->_ip, '.'));
}
return sprintf('%08x', crc32(!empty($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] . APPLICATION_PATH . $ip . $session_id : APPLICATION_PATH . $ip . $session_i... | 1 |
d04ea6456d7ca53820e8f641551f0e9b | 159a0aa3d9b90375f38fb7198d4639bd | \brief To populate one report descriptor payload | efx_build_rx_desc(struct efx_rx_queue *rx_queue, unsigned index)
{
struct efx_rx_buffer *rx_buf;
efx_qword_t *rxd;
rxd = efx_rx_desc(rx_queue, index);
rx_buf = efx_rx_buffer(rx_queue, index);
EFX_POPULATE_QWORD_3(*rxd,
FSF_AZ_RX_KER_BUF_SIZE,
rx_buf->len -
rx_queue->efx->type->rx_buffer_pad... | 0 |
24339e46afc3b2de797a4734ab8a5fcb | a9dda78d969a4724e4b09c9af486b4e5 | Add one or more templates that this PagesType represents
#pw-group-family | class Upgrader
public function addChildTemplates( $target, $items ) {
$o = $this->getTemplate( $target, 'addChildTemplates');
$o->noChildren = 0;
$arr = $o->childTemplates;
foreach( $items as $item) {
$x = $this->getTemplate( $item, 'addChildTemplates');
$id = $x->id;
if (in_array($id, $arr) === false)... | 1 |
035b0135304ecba51e5f1fc46bcc4dfb | 78536dd2ecbbad9fe8e46af1f2ff0a49 | Crée le cache des données d'affichage de la carte | {
if(!is_dir(AASTRA_PATH_CACHE))@mkdir(AASTRA_PATH_CACHE);
$file=AASTRA_PATH_CACHE.$user.'.context';
if(is_file($file)) $array=Aastra_readINIfile($file,'#','=');
else
{
touch($file);
chmod($file,0666);
$array=array();
}
if($data!=NULL) $array[$appli]['data']=base64_encode(serialize($data));
else unset($array[$app... | 1 |
94153949b04a40696aac7c7aca181372 | 268dacbe885f739b85a0495304e23c6c | develop dictionary of TCGA_ID:vital status | triD = {}
counter = 1
for f in listdir('../flowerplot.v2/genomes/'):
if isfile(join('../flowerplot.v2/genomes',f)) and '.fa' in f and not '.gz' in f:
fo = open('../flowerplot.v2/genomes/'+f,'r')
triValue = fo.readline()[1:4]
fo.close()
triD[counter] = triValue
counter += 1
return triD | 0 |
94ecbc925ce31a9d082f8a9b2a3df3b9 | 02f053c519f5b23fa1a773ac173d71d1 | Return a task which performs a blocking flush of any in-memory index data to persistent storage,
independent of any flush of the base table.
Note that this method is only invoked outside of normal flushes: if there is no in-memory storage
for this index, and it only extracts data on flush from the base table's Memtable... | void flush(int subpartitionIndex); | 0 |
463b696109730f3b60a1a889d7aca9c9 | 01e5c48e3e917c6f835805cea93c9860 | シーンの初期化を行わずに指定したシーンに遷移する | {
root.Release();
yield return new WaitUntil(() => SceneManager.GetActiveScene().name == ConvertScene(scene));
root = scene;
scene.Initialize();
} | 0 |
90905d9588b0a0f6120dd5df74d228dc | 193a84fdbdee41ce12bbbbfad266ced1 | Generates a button with a dropdown menu. | function _adminIconDropdownButton($class, $title, $icon, $items)
{
$menu = '<div class="menu">';
foreach ($items as $item) {
$menu .= $item;
}
$menu .= '</div>';
return [
'class' => 'pointing top left dropdown ' . $class,
'title' => $title,
'icon' => $icon,
'menu' => $menu,
];
} | 1 |
01219b9b1124ec24dadbc57bcf2da4a9 | 635587d8b6c2e8b8bfdaa869baaa1d0d | RaceKeyを指定して、そのレースが行われる開催情報を、DataFrame(1×?)で返す。 | race_base_df = self.ext.get_race_before_table_base()
race_base_df = race_base_df.drop("データ区分", axis=1)
self.race_df = self._proc_race_df(race_base_df)
print("set_race_df: race_df", self.race_df.shape) | 0 |
76250e50b715bae6d71f3ede942ac22a | 5940570a9cc7514543641132ddf7d255 | 获取body参数,转换为dict,如果发生异常,抛出错误 | def get_post_params(request):
if request.body:
try:
body = request.body
if six.PY3:
body = request.body.decode()
data = json.loads(body)
except (TypeError, ValueError):
pass
else:
if isinstance(data, dict):
... | 0 |
659186a7a226125ab8482a93c54a6d2d | 873db530fe4d679b209c798793ee136f | 重置页面数据(不刷新) 需要传递指针 | public class ReponseData{
public void resetPageInfo()
{
} | 0 |
256c5e8ad320bd2c856d56fbdee404dd | 8242da53aca46aea599e0c834e1a0478 | Try to find a cover that can be used for this Edition. | class CoverManager:
def searchInstanceIdentifiers(self, instance, validIdentifiers):
for identifier in validIdentifiers:
self.logger.debug('Querying identifier {} ({})'.format(
identifier['value'],
identifier['type']
))
fetcher, fetchedID = sel... | 1 |
22296132d5909af6d6883ec2e0984bcc | a13df2a7a621b09f6f38dfce312f7230 | 获取entityId下的所有role | List<Long> getRoleByEid(Long eid); | 1 |
14ef66f618391a0197b374c7e1af4d09 | e5ae99b966994769c4c168f814ae0937 | Snippet for ListDatabasesAsync | {
SnapshotsV1Beta3Client snapshotsV1Beta3Client = await SnapshotsV1Beta3Client.CreateAsync();
ListSnapshotsRequest request = new ListSnapshotsRequest
{
ProjectId = "",
Location = "",
JobId = "",
};
ListSn... | 0 |
53bf74de2c63a211cf81c0e4367c436b | 1231236bdbc2b63c78a4310a3607964b | jokuaren menuko panela sortzen duen metodoa | {
string[] menuPanelID = e.ExtraParams["order"].Split(',');
short count = 0;
foreach (string item in menuPanelID)
{
MenuController.GetInstance().UpdateOrder(int.Parse(item), count);
count++;
}
wdSortAscending.Hide();
} | 1 |
983573fa0dcbea58eb3394405f3173f6 | 35e82efea4e954bd95b80af85bd99771 | 모든 열에 대해 정렬을 수행한다. | for (int i = 0; i < m.length; i++) {
Arrays.sort(m[i]);
}
return m;
} | 0 |
999836e644510c95a8354e9746c9c983 | 3c92b8d0bc467e87d8995006fc77d754 | if a hash is found in the DB then it is applied. | class AppliedSchemaHashes:
def set_hash(self, dbname: str, schema_hash: str):
self._hash_by_dbname[dbname] = schema_hash
cursor = self._connection.cursor()
with contextlib.closing(cursor):
cursor.execute(
UPDATE_DB_HASH_TEMPLATE,
{'dbname': dbname, 'ha... | 0 |
292d9ffce28314d2011c1400c640639e | 4f23e0fda6b29a0697d7f4a6d811efc4 | 当前页面是否为dataBinding模式 | abstract class BaseFragment<D : ViewBinding, VM : BaseViewModel> : SupportFragment()
fun isPreBinding(): Boolean {
return ::mBinding.isInitialized
} | 1 |
ebde7a6753020997f94c685d1ef1e181 | 05041f65b7db23dbd6157b3d1332c8f1 | Retrieves the resolution of the right thumbstick's vertical axis. | double GetRightThumbstickY() { return mNewReading.RightThumbstickY; } | 0 |
10607991bdd7576e6c633d05745f810d | ea313071db2634817356af24bb1baf89 | Add router groups | {
$groupParameters = [
'prefix' => $this->root,
'namespace' => $this->namespace,
'as' => 'admin.'
];
$router->group($groupParameters, function ($router) {
require app_path($this->routesFile);
... | 1 |
b95b2e647432ecf418f02d0458f51898 | 4781b47991716410d4e6d20bdd175c23 | Функция выполняет поиск элемента в сортированном массиве - возвращает ключ указанного елемента | {
int i = 0;
while (v[i] != key && i <= size)
{
i++;
}
if (v[i] == key)
{
return i;
}
else return -1;
} | 0 |
2e656654fb53ddbc8b82087f4aad30ed | 72d53ec76ab02552e33c0a5cb116255e | ajax执行不再关注标签的方法 | function unfollow() {
closeUserAtten();
showAtten();
setCookie('followSuc', '');
} | 0 |
0a98f2a7db217818980f2e8ad4350352 | 19402716db8d7556da5d7a274de46046 | 通过联联帐号找实例 | Doctor findByVoipAccount(String voip); | 1 |
05f3e07b8c7594618c16a1c5aaf76dab | e8542da3c70051e5fef27214b64d9f0e | Custom sort function comparing first two string characters | def compare(item1, item2):
item1, item2 = item1[:2], item2[:2]
if item1 != item2:
if item1 > item2:
return 1
return -1
return 0 | 1 |
1285f95d2d371568e5af3a81df535635 | 01b4df64b576a5daae355c10d245ef20 | Este metodo toma el tipo de visita seleccionada por el Responsable de Visita | public class Centros implements Initializable
@FXML
private void visitaOnClick(ActionEvent event) {
paneVisita.setDisable(false);
btnVisita.setDisable(true);
} | 0 |
59d1398affee572db3f569de305d51f4 | 4724e4f5be756c69ae6755cf431e7d50 | Checks if player has edit access in a town | public class Game{
public boolean isPlayerInTown(){
return playerInTown;
} | 0 |
d772f7f932176ce05ead966221087687 | d320c277c6b9be8da30cf53353e0cf91 | Get the artis associated with the Film | bool TIFFImageIFile::getArtist(std::string& inartist)
throw (ImageException)
{
return getTag(TIFFTAG_ARTIST, inartist);
} | 1 |
ea67bebbe4530990c0abc6ffc87e97cc | 6a11b8019654afb0af1bc6e8f280b54f | Zwraca punkt przeciwny | namespace zstar{ namespace CAD{
Point Point::operator - () const
{
return Point(-x,-y);
} | 1 |
1fe4ce514159542b9a53724558bc5df3 | 6450b5d79982ac00247ddee1e735b90d | isProperty - sees if the line looks like a property | final class SectionImpl implements ISection
public static boolean isValidProperty(@NotNull String line) {
line = line.trim();
Pattern pattern = Pattern.compile(propertySectionRegex);
Matcher matcher = pattern.matcher(line);
return matcher.find();
} | 1 |
7419d415adf12a483b6edbefefaa66d0 | 4f6da79fe292890d50a6182175f82a32 | Whether the collision was disabled or not. | export class ClothCollisionSettings
public get use_collision(): boolean {
return PythonInterop.getBoolean(this.interop, `${this.accessor}.use_collision`)
} | 1 |
e12f901d44d456e6d73d31bcca791a4f | bd27b912112ed0587a84842a0e581a94 | ROT13 Encoding | function rot13(message){
var result = "";
var temp = 0;
var tmp = 0;
console.log("Z".charCodeAt(0));
for (var i = 0; i < message.length; i++) {
temp = message.charCodeAt(i);
if (temp >= 97 && temp <= 122){
temp += 13;
if (temp > "z".charCodeAt(0)) {
tmp = temp - "... | 1 |
6d36cba6e37e6abf96c5afdd2d6398d0 | 245bab3d43c9bb7b50b3f8301b2e897c | CANNOT ADD WHEN QUES ID EXIST | export class ProductDetailsComponent implements OnInit
addQuestion() {
const data = {
question: this.questionsForm.value.que,
ans: '',
pid: this.productId,
};
if (this.questionsForm.valid) {
const questionSubscription = this.productService.createQue(data).subscribe(... | 0 |
3c872b8d877e927fac10b67e90ec149a | 14f3908d92924e6fbb33a7fd9b799ee0 | Enables controls that allow the user to select source files. | void Torque3DFrontloader::enableProjectControls()
{
ui.OpenFolderButton->setDisabled(false);
ui.GenerateSourceButton->setDisabled(false);
ui.ChangeModulesButton->setDisabled(false);
} | 1 |
ca4fcf647593f6db54ca05f343ae3876 | 3bc42cb889d0039feb3a3a9434c78406 | Ensure operation completes, regardless of any channel/connection
errors occuring.
Will retry by establishing the connection, and reapplying
the function. | def f(self, *args, **kwargs):
try:
return fn(self, *args, **kwargs)
except:
try:
self.close()
except:
pass
self.make_connection()
return fn(self, *args, **kwargs)
return f | 1 |
64d469c6abe690447e63938a81a8c5d4 | 083493f5daaa39a3206f37a82cfa96a3 | Retrieve the host reservations from the specified host reservation
file. | if type(host_list) != list:
host_list = os.path.expanduser(host_list)
return file(host_list).read().split("\n")
return host_list | 1 |
5a3d2f496d81c4f70e31fcd4aee9c33b | 055e5025771c95bbe8af10b1b7996e4a | 检查某一天是否浇过水 | class Solution
private static boolean checkDay(int[] bloomDay, int m, int k, int day) {
int count = 0;
int cur = 0;
for(int i: bloomDay)
{
if(i<=day)
{
cur++;
if (cur == k)
{
count++;
... | 0 |
a6343ee66535e990906939c2c1554cbe | 0f4e4fe5ca01ebf79e62a2622d78e614 | số lượng GV đã hd đề tài | {
$arrLop = join("','", $arrLop);
$result = $this->db->con->query("SELECT PhanLop FROM chitietkhaosatcauhoimo
WHERE MaLopHocPhan IN ('{$arrLop}') AND PhanLop = '{$noiDung}'");
$resultArr = array();
while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
$result... | 0 |
abd5a99e75759ed699b26e4dd170179d | e581fdcb4a860800b720c4190323535b | Send Email to the user after success paypal/sofort payment | {
$this->_getSession()->addSuccess(
$this->__('Thank you for registering with %s.', Mage::app()->getStore()->getFrontendName())
);
if ($this->_isVatValidationEnabled()) {
$configAddressType = Mage::helper('customer/address')->getTaxCalculationAddressType();
... | 0 |
5b1025b6b44c7ab0751452656977f90f | 03dcafb1497088077fe8646440154a1f | clears the ADC interrupt flag | {
return (ADC_CTRL0 & ADC_CTRL0_INTCLR) != ADC_CTRL0_INTCLR ? SET : RESET;
} | 0 |
519d149d902af957412b632ad85f0555 | 857260f52957d3dbb1783cb4473fc3eb | Load an update file in current instance, returning the state of operation. | {
DateTime newFileAge = ScadaUtils.GetLastWriteTime(fileName);
if (newFileAge > DateTime.MinValue && FileAge == newFileAge)
{
changed = false;
errMsg = "";
return true;
}
else if (Localization.LoadDiction... | 1 |
9052ee27950c63b4015074e669c1e23b | 0092cf4d5bf6cba2fe968713dda01391 | Retrieve duplicate items. | class DupFilter(object):
def get(self, key): | 0 |
ff99dc09527e4dc51df1bd0dc5e9bdc9 | 0e2b90689ea750b7a53a093d0c61140e | 新增院系信息 | public Ajax insertInstitutionLevel(InstitutionLevelBean institutionLevelBean) {
if (institutionService.insertInstitutionLevel(institutionLevelBean) > 0) {
return Ajax.ok("添加成功");
} else {
return Ajax.error("添加失败");
}
} | 1 |
b39ebc0103acea8cecb4e7da65ea279e | d368b343d6b026411f884054da7cf6be | Deletes the user attributes in a user pool as an administrator. Works on any user.
Access Level: Write
https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminDeleteUserAttributes.html | const { Logger, Cognito } = this;
Logger.info(`adminDeleteUser with userName: ${userName}`);
const params = {
UserPoolId: process.env.USER_POOL_ID,
Username: userName,
};
return Cognito.adminDeleteUser(params).promise();
} | 0 |
b09041f96fce8d8df9947ab3da59241a | 7973638727fdb0584d8210e39e225f1b | シンボル名を元に文字列表現された型情報を返す | {
foreach(keyInfo ki in AttrStack)
{
if (ki.getType().Equals(symbolName))
{
return ki;
}
}
return null;
} | 0 |
229f664799c9fe895bb23d9a41687f29 | fedd14d11285e8d7725a93b42a88b6f2 | 입하검수 상태 반환 | @FxTable(name = "FX_PS_STAT_CRE", comment = "성능통계생성테이블")
@FxIndex(name = "FX_PS_STAT_CRE__PK", type = INDEX_TYPE.PK, columns = { "PS_CRE_REQ_NO" })
@FxIndex(name = "FX_PS_STAT_CRE__KEY1", type = INDEX_TYPE.KEY, columns = { "PS_TBL", "PS_DATA_CD", "PS_DTM" })
@FxIndex(name = "FX_PS_STAT_CRE__FK1", type = INDEX_TYPE.FK, ... | 0 |
90258f02e098987cf31cd29d2038918c | 436f71e73c8d3d4bbfd27538c2fa6849 | get_drink_infoで取得した商品一覧の多次元配列から目当てのcolumnの値を取得 | {
$tmp = [];
foreach ($arr as $key => $val) {
$tmp[] = $val[$column];
}
return $tmp;
} | 1 |
730e9a0c9a24657ac9064a25b6d5107d | a654063b55b2e497299afbf254b30dde | Called when the test rig requests that an event be fed | class ScenarioRunner(plugin.Plugin, validation.ValidatablePluginMixin,
metaclass=abc.ABCMeta):
def send_event(self, type, value=None):
self.event_queue.append({"type": type,
"value": value}) | 1 |
b7c8524b755a658ef9cb3892c5db2624 | b15d724a02504bb37cab250e32903b26 | Perform the actual read/write operation for PyTorch-based models. | class TRTModel:
def __call__(self, model_inputs: list, timing=False):
NUMPY = False
TORCH = False
if isinstance(model_inputs[0], np.ndarray):
NUMPY = True
elif torch.is_tensor(model_inputs[0]):
TORCH = True
else:
assert False, 'Unsupported inpu... | 1 |
736696b221b8aeaa7938834226bc9284 | bc9d0bedca04e7ce4392ab73f55ea50b | Generates determining values for all buildings, evenly spaced between given min and max values.
Order is randomised, | {
Random.seed = (int)Time.timeSinceLevelLoad;
int choice = Random.Range(0, 2);
float x, y;
if(choice == 0)
{
x = spawnValues.xMin;
y = Random.Range (spawnValues.yMin, spawnValues.yMax);
}
else if(choice == 1)
{
x = Random.Range (spawnValues.xMin, spawnValues.xMax);
y = spawnValues.yMax;
... | 0 |
4916fd2ff4695e010136897312bcf3c3 | 4dafb65f61020b6a2280c197f8d5cd56 | Test that landlord has no access for retrive of roommate post | class TestApartmentByInhabitant(BaseAPITestCase):
def test_creation(self):
url = reverse('house-apartments', kwargs={'pk': self.house1.id})
response = self.cpost(url, self.inhabitant, {})
self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) | 0 |
a238c30589dddea6192f91001fa68038 | a77ac77bac0f98b4f359c96bf0b94782 | при загрузке скрывается веб браузер | namespace Stones_MediaLab
public partial class frmBrowingTab : Form
private void frmBrowingTab_Load(object sender, EventArgs e)
{
webMain.Silent = true;
SetUserPrefs();
} | 0 |
4afa462430619a9248e8fe77ec507377 | 2ac7f633dd5366ce7dff55955865958d | Take the most frequent attackers which cover the tau \in (0,1) of the cdf | m = np.arange(len(taus)) < c * taus
if np.any(m):
return np.argmin(m)
return len(taus) - 1 | 0 |
1f376e88ca051195e2df51b27334c28f | c6e66a4b468601645abb935e0caff281 | 获取单词表(EnWords)指定条件的拼写列表(排除重复项单词)
转Excel时使用 | {
if (isNaN(cur)) cur = 0;
let ret: IWord[] = [];
let s = false;
const TABLE2 = this._TABLE2;
while (cur < text.length)
{
for (let i in TABLE2)
{
let w = text.substr(cur, i as any as number);
if (w in TABLE2[i])
{
ret.push({
w: w,
c: cur,
f: TABLE2[i][w].f,
});... | 0 |
f01df5e28b4a50c2732422fd1f20dabc | 2d7d06cfcbb6225c83f0c1067771a59d | Gets the Amount of the transaction in cents. | public class BoletoTransactionData
public Long getAmountInCents() {
return AmountInCents;
} | 1 |
3e0e4238c3727a18d26f3b968d54f8c8 | 7f3aa606c7c496bf6d6c722688e5abc0 | Gets array of all "div" elements | class PAMIE:
def divsGet(self, filter=None):
return self.elementsGetList ("div", filter) | 1 |
1962a46b52a6cebd85c9f6331a408b24 | 9d442bdee4d84f44859fb5e0d5d088c6 | 根据指定的就诊信息,获取该次住院产生的检查数据列表 | namespace KMHC.SLTC.Business.Interface
BaseResponse<IList<DoctorCheckRec>> QueryDocCheckRecData(BaseRequest<DoctorCheckRecFilter> request); | 1 |
f93dbc84c351dca6ce47e74c1e80c304 | 7917322d2e5d04b37ae7a5063e817cb3 | 남은 '.' 인 곳 개수 count | cnt = 1
while j < n:
j +=1
if matrix[i][j]:
cnt += 1
else:
break
return cnt | 0 |
4dafb198931968508a7ed8811b6cd85a | 22417d019a54ceb366a75d0b501c22a2 | 合取 | public function sinter($keys){
if (is_array($keys) && isset($keys)){
foreach ($keys as $key => $value){
$arr[] = $this->prefix . $value;
}
}else{
$arr = $this->prefix . $keys;
}
return $this->connection()->sinter($arr);
} | 1 |
84896c13dc94fb472f4f2d32c9a3e065 | 35898e274f785b1315f0e537869d346b | 根据传入的URL,对图片进行加载。如果这张图片已经存在于SD卡中,则直接从SD卡中获取,否则就从网络上下载 | String key= CoderUtils.MD5UseCache(url);
Bitmap bitmap=loadImageForCacher(key,reqWidth,reqHeight);
if(bitmap!=null){
if(container!=null){
showBitmapToImageView(key,container,bitmap);
}else{
showBitmapToImageView(imageView,bitmap);
... | 1 |
642ce9810d85dec615f418c841264f01 | d0972a82caeadc2fc9cc87a203529885 | Get score and make it into a string
formatting example: 00005 | round_scores= int(round(self.game_stats.score, -1))
self.score_str = "{:,}".format(round_scores)
self.score_image = self.font.render(self.score_str, True, self.text_color, self.scoreboard_color)
self.score_image_rect = self.score_image.get_rect()
self.score_image_rect.right = s... | 0 |
5877ef9f18ff493deb0a8f6e0327be0b | 6a5a99e27c9c11684e6dc1592a24380e | Get A list of interventions based on its creator | class InterventionsController extends Controller
public function index()
{
} | 0 |
233fa2ce9b31c925f24ef726f7162614 | 7956decb81d524b2b6ab321e91f9f708 | プリペアドステートメントを実行し、PDOStatementクラスのインスタンスを取得する。 | class Database
public function prepare($statement) {
return $this->getPdo()->prepare($statement);
} | 1 |
ce6f6c2e9369fc063bc330c40411afff | 8c683260a97ffbcc0a7c9ba54963c31a | code to execute when FSM is (re)entered | public class CarStatemachine implements ICarStatemachine, IExecutionEngineSCT
private void entryAction() {
} | 1 |
6e492e5479f4e2620f650c483083b44e | 80bf7c186049fa2495c603b1a8c17dea | Returns the value of field ap_height | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ProdCharacteristic", propOrder = {
"height",
"width",
"depth",
"weight",
"nominalVolume",
"externalDiameter",
"shape",
"color",
"imprint",
"image",
"scoring"
})
public class ProdCharacteristic
extends BackboneType
pub... | 0 |
3b4b99d25facc792846f48fe64dfa71d | a5fb4ccd30df387d343f93c08862ae1e | Returns a list for `ts`. | row = []
for i, cell in enumerate(tsrow):
if cell is None:
row.append(None)
elif isinstance(cell, list) and len(cell) == 0:
row.append(None)
else:
if convert_timestamp and tsct[i] == timestamp_a:
row.... | 1 |
4fb171cc110b3f7f1f9be68383453467 | b3cad1f36ed56b8738c642b8f4a88abc | Open window for altering of destination table | namespace SahalinEnergyBoltStressCalculation.BTC_GasketTargetStress.View
public partial class Page_GasketTargetStress : Page
private void OpenWindowWithTable(object sender, RoutedEventArgs e)
{
mainWindowCalculationTwo.ShowWindowCalculationTwo();
} | 1 |
93aa26f43df8fda74012cc9f07b91127 | a9e48f966e12d3149e20db5bc77b3d91 | <para>See if this component is in the persistent level </para> | public class V1BPMComponentImplementationModel extends V1ComponentImplementationModel implements BPMComponentImplementationModel
@Override
public boolean isPersistent() {
String persistent = Strings.trimToNull(getModelAttribute(ProcessConstants.PERSISTENT));
if (persistent != null) {
ret... | 1 |
1deff3447e3541656dcb5a67eb45eac9 | a81e401e71be10b6288ce94e551df28f | Check if object has an iterator | def is_iter(obj):
return util.is_iter(obj) | 1 |
76e4150d69a13ccd57eeacd483248590 | 09e682c1cc22ec22ed1c088664280585 | Base method to print an event. | def print_event(event, file=sys.stdout):
print('event:', event.event, file=file)
print('{}(@{}) -> {}(@{})'.format(event.source.get('name'), event.source.get('screen_name'),
event.target.get('name'), event.target.get('screen_name'))
, file=file)
if 'target_object' in event.__dict__... | 1 |
027075c3b29e91fb3bb7f6c5b91b96bb | 1e486e5b61b0dea8128b19368b754243 | Destroy an ISA DMA map. | struct MODS_MEM_INFO *p_mem_info,
struct pci_dev *dev)
{
#ifdef CONFIG_PCI
int err = OK;
struct list_head *head = &p_mem_info->dma_map_list;
struct list_head *iter;
struct list_head *tmp;
list_for_each_safe(iter, tmp, head) {
struct MODS_DMA_MAP *p_dma_map;
p_dma_map = list_entry(i... | 0 |
23055fea7e9f56cc944ad91b2ac5a0e9 | 5793821ad4d7f8773d8ef7112ac2e519 | 交互式弹窗(获取棋盘规格和初始细胞数量) | ['width','height','padding','chessSize'].forEach(item=>{
if(!props[item])throw 'Chessboard require parameter '+"'"+item+"'"
})
this.width = props.width;
this.height = props.height;
this.padding = props.padding;
this.chessSize = props.chessSize;
this.co... | 0 |
2ffe44c267a64e04fdb2dd3c8816edfa | 5a783b2f157f57d6e0f287eb6b743cd5 | 過去30日の最高体重を返す | class WeightController extends Controller
public function index(GetWeightRequest $request)
{
if ($request->has('onDate')) {
return Weight::whereDate('weightDate', '=', $request->query('onDate'))->findOrFail(1);
} else {
return Weight::orderBy('weightDate', 'desc')->take(30)->get();
... | 0 |
785e95deed738ffe8376c7c95edea2c3 | 93b8e8c1b4b85af14256e642faf99458 | Поворот джойстиком на андроиде: | class B2GADB(EidetickerB2GMixin, mozb2g.DeviceADB):
def rotation(self):
return 90 | 0 |
2def26010eef65f2f7c8b17eadcf4a65 | f1b586ab735096a7630e2e278541c4eb | Obtain a dictionary of full filepaths given the input IDs | class RawDataLoader():
def _get_files_list(self):
ts_filepaths = []
conn_filepaths = []
ts_filepaths_from_dir = sorted(os.listdir(self.ts_dir))
conn_filepaths_from_dir = sorted(os.listdir(self.conn_dir))
for sub_id in self.ids:
for ts_file in ts_filepaths_from_dir:
if sub_id in ts_file... | 0 |
85e254862011ac5043c6a9e156a79abb | 3f0626b8de66d09843cb57038f74dd5a | liefert den Inhalt eines PDFDokumentes als String | namespace StratSim.View.Panels
public class DataInput : MyPanel
public static string GetPDFText(string pdfFilePath)
{
PDDocument doc = null;
try
{
doc = PDDocument.load(pdfFilePath);
PDFTextStripper stripper = new PDFTextStripper();
... | 1 |
7ca0a5a67d354bf6419efef3861876f5 | 78396ef405d37aa3bd0a9d68ae2de240 | Given a vector of same size and data type, fills DataMesh with vector.
Useful to copy DataMesh. | element = self.plot.current_frame
stream = self.streams[0]
interface = element.interface
scalar_kwargs = {'per_geom': True} if interface.multi else {}
for d in element.vdims:
scalar = element.interface.isunique(element, d, **scalar_kwargs)
dim = dimension_... | 0 |
372d9ec733bd24a8eb6686322705637d | 2815398e0878a90a34077c7855103f94 | Creates a new instance of the sol_Agencies class and populates it with data from the specified SqlDataReader. | {
businessObject.RowNumber = dataReader.GetInt64(dataReader.GetOrdinal(Extras.ExtrasFields.RowNumber.ToString()));
businessObject.ID = dataReader.GetInt32(dataReader.GetOrdinal(Extras.ExtrasFields.ID.ToString()));
businessObject.Name = dataReader.GetString(dataReader.GetOrdinal(Extras.ExtrasField... | 0 |
197ff38bf7fc6d929c80109e2dd0a5db | a33f96b9158b9e9b1d12ab4612e12864 | Синхронизация подписчиков с мейлтанком | namespace Cloud_Manager
public partial class Form1 : Form
void RunSync()
{
Microsoft.Win32.RegistryKey Cloud = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("SOFTWARE\\Mail.Ru\\Mail.Ru_Cloud");
Object cl_pt = Cloud.GetValue("folder");
Watch w = new Watch();
... | 0 |
c0eb2a6b06d4b1b9330a479175544133 | 7186f479a165f01f4e11d8c78e9008fc | This Checks the buffer for available data to avoid blocking calls | class RPCServer
processEvents() {
while (this.buffredBytes >= this.pendingBytes && this.pendingBytes != 0) {
this.onDataReady();
}
} | 1 |
f9f4cef8792c7ce6b21ec6ee10870af0 | b92bcd079c8eab8cea0b2e822814585a | 逐层上报并附加上每层在父级中的索引 | reportLock.lock();
try {
reportDatas.add(levelUpData);
} finally {
reportLock.unlock();
}
} | 0 |
19afb5c056d1f000a788ad90ca5aba93 | aa33c6f7ef1e3d05b7d930d4ac0f5715 | Return the unique events described in this BeliefsDataFrame. | list = []
for n in _events_db.keys():
list.append(_events_db[n])
return list | 0 |
87e20e65a0bb12a3edd3b4a7836044c5 | 75d4d4ebebb504b311aa8bc687cd396d | function to randomly shuffle the student list | {
int numberofStudents = advisees ->getSize();
int *output = new int[numberofStudents];
int index =0;
while(!advisees ->isEmpty())
{
output[index++] = advisees ->removeFront();
}
for(int i =0; i <numberofStudents;++i)
advisees -> insertBack(output[i]);
return output;
} | 0 |
da0083973828a9388e28294142d40870 | 99fddd0ba253fb2d1c5dcfefdcbe4fb1 | This function plots the time evolution of von Neuman entropy over a
linear time axis. | def entropies_times(times, label):
allentstimes =[]
for t in range(len(times)):
time = times[t]
psit= exact_diag_evolve(psi, time, coeffs, eigvecs, eigvals, L)
allents = []
for na in range(1, L):
rho = density_mat_half_line(psit, na, L)
Sa = entropy(rho)
allents.append(Sa)
allentstimes.append(... | 0 |
96a8166d76be702f7b84f7cb33e0fa68 | ce6aea3ef2b43b27dd4a3db362f284ff | Create an instance of {@link CustomException } | @XmlRegistry
public class ObjectFactory
public ThrowApplicationExceptionResponse createThrowApplicationExceptionResponse() {
return new ThrowApplicationExceptionResponse();
} | 0 |
99edefdd940012f74ef77ad2bd09c28d | ce282d9a04793caf1d55216578bb45ce | @brief Return the value of the parameter <tt>$dbms</tt> from config.php | class Celsus_Db_Document_Adapter_Couch extends Celsus_Db_Document_Adapter
public function getDb() {
return $this->_config['db'];
} | 0 |
5506494474ad6850fec4fa2cd960f484 | b0c269e95856f60fd903276cab2d8cd8 | ICADにモデルが残っているときのクローズ処理のメッセージボックスを実行する | namespace MySchedule
internal static class ErrorMessage
internal static void ApplicationClose()
{
MessageBox.Show("アプリケーションを終了します", "予期せぬエラーが発生しました");
Application.Exit();
} | 0 |
01d6da3b4eb022e38e1cf44e87df480a | d9bbe4926f04c9c8852c3b0bd9813bf9 | @brief 计算crc校验值 | ui32 nuCRC::calculate(const void* p_data, size_t sz)
{
ui32 ret = 0xffffffff;
partial(&ret, p_data, sz);
return ret ^ 0xffffffff;
} | 1 |
087adbaca6937b6cd56aebf4742482c4 | 01970986955bf5639c08f7e62a22fd73 | 跳转到变更历史列表 | function openHistory(comEmpId){
var centerj = window.parent;
centerj.addTabFun({
src : serverName+ "/employeeChangeController/toHistoryChange.do?comEmpId="+comEmpId,
title : "变更历史"
});
} | 1 |
2842474b878739c08ea2ade894cb2d31 | 0c053f8558407ed3308edac0eaa97fae | Generates the indexes of empty boxes. | var out = [];
var notFilled = false;
for (var c=0; c < 20; ++c) {
notFilled = false;
for (var r=0; r < 10; ++r) {
if ( !(GRID[r][c].status) )
notFilled = true;
}
if (!notFilled)
out.push(c);
}
return out;
} | 0 |
05a4b28c475895ecf92032289ee78720 | 317d796031e10122d17bddf5abadc059 | Test case for com_adobe_cq_screens_analytics_impl_screens_analytics_service_impl | class ConfigmgrApiTest extends \PHPUnit_Framework_TestCase
public function testComAdobeCqScreensImplHandlerChannelsUpdateHandler() {
} | 0 |
c2b926ee4d67e3e381bfa062c5c94bf3 | 6a02e5443b52843a1ff01fa00d8c2e1c | Sets the coordinates of the ::IND_LINE primitive that will be drawn on screen. | {
undraw();
m_x_ = x;
m_y_ = y;
draw();
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.