query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
2e01ed742eaedc1894348590a0f69424 | bd4b35dc9834219186f5e6a8a22494bc | Returns the details of the particular AWS account
Returns the details of the particular AWS account | class aws_cloud_account(BaseAwsCloudAccount):
def get(cls, aws_cloud_account_id: str = '') -> Union[Dict, List[Dict]]:
pass | 1 |
744003718454e9c0d060efbec07b77eb | bdb7002bde5a951eebe53adfa4c29c2d | Map的value值降序排序 | public class sortTool
public static List sortByValue(Map map){
List<Map.Entry<Integer, Double>> list=new ArrayList<Map.Entry<Integer,Double>>(map.entrySet());
Collections.sort(list, new Comparator<Map.Entry<Integer, Double>>(){
@Override
public int compare(Entry<Integer, Double> arg0,
Entry<Integer, Doub... | 1 |
0422a93b4e0460d03647df5cc4e01a54 | b8fd300164c3abe4f6dfb801282564c3 | INPUT:
list of tuples containing input, output directories
OUTPUT:
list of tuples containing input, output file names | file_list = []
for directory in directory_list:
for (_, _, filenames) in os.walk(directory[0]):
for file_id in filenames:
mp3_file = (directory[0] + "/" + file_id)
wav_file = (directory[1] + "/" + file_id[:-3] + "wav")
file_list.append((mp3_fil... | 1 |
95bf4b53b3b6239d0f66601fffd95dca | 600a0281de7489d3fb8ddce9026fd0ba | Returns the status of the original variables.
Returns a list of integers with length equal to the number of
variables in the original problem. Each entry of this list
is an attribute of Cplex.presolve.col_status. | SCIP_LPI* lpi
)
{
assert(lpi != NULL);
assert(lpi->cpxlp != NULL);
assert(lpi->cpxenv != NULL);
return (lpi->solstat != -1);
} | 0 |
bbb3460b12ad36148012ff463deb4642 | 2fb322eb058d7db82674df09837c41c8 | Test of containsIterative method, of class BinarySearchTree. | {
QNTree<char> TREE(3, 8);
TREE.SetRootValue('A');
QNTree<char>::QNTreeIterator itRootNode = TREE.GetIterator(0, EQTreeTraversalOrder::E_DepthFirstPreOrder);
QNTree<char>::QNTreeIterator itParentNode1 = TREE.AddChild(itRootNode, 'B');
QNTree<char>::QNTreeIterator itParentNode2 = TREE.AddChild(itRoot... | 0 |
4291bf1753b1cea6bd23e88ad9d60610 | dce18624dcd1f2b0a0d9cbe0863cc160 | Mark indicated room with a map color. | if (!isValidLocation(row, col))
throw new NotValidRoomLocationException();
colorIdealGrid[row][col] = color;
} | 1 |
7f585d12c1754d1441e4c1f8539bb5c2 | 093d53631187333ea9a4b37e8b0d51e4 | Polling mode SPI master testing code. | {
DDPCONbits.JTAGEN = 0;
PLIB_PORTS_DirectionOutputSet(PORTS_ID_0, PORT_CHANNEL_A, (PORTS_DATA_MASK)0x00FF);
PLIB_PORTS_Clear(PORTS_ID_0, PORT_CHANNEL_A, (PORTS_DATA_MASK)0x00FF);
PLIB_SPI_CommunicationWidthSelect(SPI_ID_1, SPI_COMMUNICATION_WIDTH_8BITS);
PLIB_SPI_BaudRateSet(SPI_ID_1, PB_FREQUENCY ... | 1 |
edf6a829518e1900ecfae1d35f1f3e1d | 2a4537d966a6b137f0341bd060f51b9e | next | n
Skip this hunk, go to the next one. | class CommandLoop(cmd.Cmd):
def do_next(self, line):
self.coll.skip()
self.show_current_hunk() | 1 |
104dc49d146940d20a3a69cd6368d4e1 | 58916691b641cf375b1326b289202014 | 講師マスタ検索条件の設定。<br>
<br>
講師マスタ検索条件の設定。<br>
<br> | public class StudentMstListLogic
private ConditionMapper setConditions(StuMPoiOwnTDto dto) throws NaiException {
ConditionMapper conditions = new ConditionMapper();
if (!StringUtils.equals(NaikaraTalkConstants.CHOICE_ALL_ZERO, dto.getCustomerKbn())) {
conditions.addCondition(STUDENT_MST_TABL... | 0 |
db875807597aa1e99d207787758dce3e | 28ddac6e1c0ff00c880fc06e0e113fd2 | 根据墓园ID获取墓区 | public List<String> getCampgroundId(int parkId); | 0 |
a57b607dafb454987642df9e6297c2b4 | 4035bbae391a2b349f0f3cb1e9639fdf | Toggles whether a specific field allows a preceding zero. | impl TestState
fn with_null_for_zero(mut self) -> Self {
self.null_for_zero = true;
self
} | 0 |
d2830c53d5032e55f15ddf0324ead488 | 302f81808ee1a39aca1e80cc55f845ec | Get historyValidInterception | $comp = new CommandComponent("comp1","Component for unit testing.");
$exp = array();
$hist = $comp->getValidParamHistory();
$this->assertEquals($exp,$hist);
$p1 = "thing";
$exp = array($p1);
UnitTestSupport::invokeFunction(
$comp,"saveLastParam",array(... | 0 |
515938a5db26170ba015bd3ad3c34eab | 29974f529e685867f6e7f76a52c3ea17 | Convert a sparse matrix from triplet to column format. | public static extern int umfpack_di_triplet_to_col
(
int n_row, int n_col, int nz,
int[] Ti, int[] Tj, double[] Tx,
int[] Ap, int[] Ai, double[] Ax,
int[] Map
); | 1 |
f2d87ebe2cb00a421a543dabad1301d0 | f1f0a2576e4651258229694c42dea8f6 | Ham tinh tich cac phan tu trong danh sach | {
int value = 1;
vector.ForEach(x => value *= x);
return value;
} | 1 |
644615832ae967451d8b850f04f8bf50 | 36bb8c3c605172ee36aae82308dcf105 | 根据用户ID获取默认的角色. | namespace BLL.User
public class User
private int GetRole(int userId)
{
List<int> roles = relationMapper.FindByUser(userId);
return roles.Count > 0 ? roles[0] : default(int);
} | 1 |
d85d5cfe6ef721168197ac99f329dec8 | 4080775b39b592049ab571d6628aef6e | Applies changes and returns to previous scene. | public class OptionsController : MonoBehaviour
public void GoBack()
{
SaveOptionsToCurrentData();
loadScene("MainMenu");
} | 1 |
fa470c7650590feab4112d1cf2d95115 | a0d0e269f4ed75dc8722897020ebe7fb | 跳转到 productGroup 或者 toPic | let type = e.currentTarget.dataset.type
if (type === 'VIDEO') {
wx.navigateTo({
url: '/pages/shop/video/detail/detail?productionId=' + e.currentTarget.dataset.id,
})
} else {
wx.navigateTo({
url: '/pages/shop/image/detail/detail?productionId=' + e.currentTarget.dataset.id,
... | 0 |
bf2d23839cb29067285961b4e4ffd779 | e92797957860ec2d21c8a20ef13219a5 | Determine the "plural" index given a plural form and a number. | static int DeterminePluralForm(int64 count, int plural_form)
{
uint64 n = abs(count);
switch (plural_form) {
default:
NOT_REACHED();
case 0:
return n != 1 ? 1 : 0;
case 1:
return 0;
case 2:
return n > 1 ? 1 : 0;
case 3:
return n % 10 == 1 && n % 100 != 11 ? 0 : n != 0 ? 1 : 2;
case 4:
re... | 1 |
fb630de920bdd8c6924e4251967dca87 | 27241b59268db2394a7585420f6409b8 | this function generates drbg with the possibility of adding noise as additional input to the drbg function. | import random
sample = 12800
x = np.arange(sample)
pre_noise = np.asarray(random.sample(range(0,100000),sample))
noise=[]
for i in range(len(pre_noise)):
noise.append(np.random.choice([0.000007,-0.000007])*pre_noise[i])
return noise | 0 |
f93b5efadde3c8b5e2169ae6c7a436ef | f1f217e1698c0c6de4f0ab48b8b588b2 | delete the top-level datadictionary created by some tests in this suite | class ComplexDictSchemaTestCase(unittest.TestCase):
def tearDown(self): | 0 |
9cc06a8f1bc7c57dedc51ee5a90dcafc | 6ca7c753069bc03cd4866031c84b1b05 | Test that unknown insert modes are ignored. | with fits.open(self.data("tb.fits")) as hdul:
hdul.insert(0, hdul[1])
info = [
(0, "PRIMARY", 1, "PrimaryHDU", 4, (), "", ""),
(1, "", 1, "BinTableHDU", 24, "2R x 4C", "[1J, 3A, 1E, 1L]", ""),
(2, "", 1, "ImageHDU", 12, (), "", ""),
... | 0 |
e9345a4e9f33353ad7850c70ef1b88d2 | d86c8c676ef5722f215d7ce1a60cdf06 | Calculate the expanded offset based on the width of the content. | {
return x * render_priv->frame_content_width / render_priv->par_scale_x / render_priv->track->PlayResX +
render_priv->settings.left_margin;
} | 1 |
debd5d7b62b38694289c30b6e00da72f | 17aa2ce77205a74e8a84dfd9d0ae8a1f | ask server to send a specific saved bill details and change lables values to the new choosen bill values | const { toGenerateBill, details } = this.props;
localStorage.setItem('appointBillDetails', JSON.stringify({
appointId: details && details.appointId,
customerId: details && details.id,
patientName: details && details.patientName,
time: details && details.time,
doctorName: details &&... | 0 |
c2e962b3892e63108fc5c6162dcde0c6 | 8bde83788fc58b3766007a7122d53cfe | 不允许出现特殊../ | $tmpname = strtolower($filename);
$arr = array('http://');
$ifcheck && array_push($arr, '..');
if(str_replace($arr, '', $tmpname) != $tmpname) {
E('_ERROR_FORBIDDEN_');
return false;
}
return $filename;
} | 1 |
4ceb7caf301f4c95f09477e05dfc107e | 55a155831f1fa4093ef4b6bc5aa93c8b | This method builds Uri for requested movie sorting using API key, | public class NetworkUtility
public static String getUrlForLatestMovies() {
Uri builtUri = Uri.parse(MAIN_URL_DISCOVER).buildUpon().appendQueryParameter(SORT_KEY, SORT_LATEST)
.appendQueryParameter(API_KEY_PARAM, API_KEY).build();
return builtUri.toString();
} | 1 |
34f96c74204a6272168b9f271aaa34dc | b7e3b01e2cd7d64ad315b833db80523d | Pure function. Returns true if charCode
passed in maps to a lower case alphabetical
key, false otherwise.
getCharCode function | class Hangman
checkIfLetter(keyCode) {
return keyCode >= 65 && keyCode <= 90;
} | 0 |
8bd686230f6c646898dc13fea411a068 | 33ff9139da1f00dc1a762973e9e456b9 | This method gets the ingredient index in the list of ingredients. | public class RecipeIngredientsTab extends AppCompatActivity class IngredientsAdapterMenu extends BaseAdapter
@Override
public long getItemId(int i) {
return i;
} | 0 |
c12f14300fa896a6190d7fef068bd67f | 6e1e21e8754e02d7e5edb2b15991a85c | \brief Get a union aggregate type. | UdmSerializeArchive& archive,
UdmDataType_t& datatype,
std::string& name)
{
char len = 0;
archive >> datatype;
archive >> len;
if (len > 0) {
archive.read(name, len);
}
return archive;
} | 0 |
04b8a6666c9cf7dd9ff13d4e0a4bb638 | f0ee92328bbf642ff30748346958f947 | Get the amount of recalculations which have been done in the past run. | public abstract class Solver implements Runnable
public long getCount() {
return count;
} | 1 |
cfdcacf4bfd727050af2b3239aea2b2d | 331bcf02a4a802b51cb1f3087b71f535 | 根据platPartnerId查询points_log表数据 | @Service
@Import({
UserDataSourceConfig.class
})
public class UserTestBase extends AutoTestBase{
public List<AccountFreezeLogDO> findAccountFreezeLogByPlatPartnerId(String platPartnerId) {
AccountFreezeLogDOExample exam = new AccountFreezeLogDOExample();
exam.createCriteria().andPlatPartnerIdEqualTo(platPar... | 0 |
145a7fed920663f200bda6bfbb037965 | 525d385f3cf889e595ebf1970e0bb547 | 消耗缓存数据 | public class ScanAssistantActivity extends Activity
private void SaveDataC(byte[] cachedata) {
cacheB = cachedata;
} | 0 |
7c35b52d28bc16f277d4b218fbb86266 | 901295d2c7661148a52977d43de16004 | Gets the attribute value for Attribute23, using the alias name Attribute23 | public class TgCusOrderHeadersAllEOImpl extends OAEntityImpl
public String getAttribute2()
{
return (String)getAttributeInternal(ATTRIBUTE2);
} | 0 |
08ca6a8cd81309e31d2834336c43e15b | 447361b6072af0a1ba20598c3f17446d | ========================================
Map view
manages the list of tiles
======================================== | Map::Map()
{
spriteList.push_back(blit3D->MakeSprite(0, 0, 16, 16, "Media\\tile1.png"));
spriteList.push_back(blit3D->MakeSprite(0, 0, 16, 16, "Media\\tile2.png"));
spriteList.push_back(blit3D->MakeSprite(0, 0, 16, 16, "Media\\tile3.png"));
spriteList.push_back(blit3D->MakeSprite(0, 0, 16, 16, "Media\\tile4.png"));... | 1 |
72ba838516c1f0e0f9f7ae99ba9a689f | 58e8de69b40037c4c52d6e0984db0808 | Verificacion de proceso si cabe en segmento. | {
int espacioLibrePCB=0;
int espacioLibreShMem=0;
int iPosicionPCBProcComparte;
int i;
if( shmid >= CANTMAXSHM ) {
return -1;
}
if (memoriasCompartidas[shmid].declarada==FALSE)
{
return -1;
}
while (espacioLibreShMem < CANTMAXPROCSHM &&
memoriasCompartida... | 1 |
6dbf2201f2a4c160b30af83aa0a0a1ef | 6c1eae3f7eee52b3054082a1090e6d14 | Return the index for each query item | class Iterator(datastore_query.ResultsIterator):
def GetIndexList(self):
tuple_index_list = super(Iterator, self).index_list()
return [index for index, state in tuple_index_list] | 1 |
4f0b8a8f23ebbc56b89c761d93b12c01 | bb234b961e93548d41217d757b6ef9c1 | Atualiza uma Clínica existente | public Hospital update(Hospital hospital, Long id) {
Optional<Hospital> optional = repository.findById(id);
if(optional.isPresent()){
Hospital db = optional.get();
db.setNome(hospital.getNome());
db.setCnpj(hospital.getCnpj());
db.setEndereco(hospital.... | 1 |
3994b9a9ff63d626b48b8429acb2bd7c | 4d1005ca87b1c5df2abd3fed25d3f4ea | output principal | class Stock extends MY_Controller
public function index() {
$this->output->enable_profiler(FALSE);
$this->load->view('principal_view');
} | 1 |
cb3d9fb677bfd508214721c298f45fe1 | 7515eb8a9027e76ccf3f6fe497ab4b88 | metodo que setea la lista de enmigos a seguir | public class DrawingSurface extends JPanel
public void setEnemiesList(ArrayList<Enemy> enemiesList) {
this.enemiesList = enemiesList;
} | 1 |
addfe73839ef829a108bd1cbfa1a7f51 | c4413632c18581500ec2ed10503428e5 | Initialize raycast line that gets drawn | {
int groundLayer = LayerMask.GetMask("Player", "PlayerFollower", "Ignore Raycast");
RaycastHit2D groundHit = Physics2D.Raycast(transform.position, -transform.up, 500.0f, ~groundLayer);
endPos = groundHit.point;
razerHit.transform.position = endPos;
lineRen.SetPosition(0, sta... | 1 |
43b0905654e700b959d3c48539f4abcd | b463aa549f01bface93179fbc8516f53 | ListHandlerKeys returns list of registered handler keys | func GetAll() interface{} { return viper.AllKeys() } | 0 |
edff5c53e825dc64b41e04755c567b94 | f4ea3abf6ad000d5cdd700fe08c8fd51 | 保留4位小数,四舍五入 | public class Utils
public static double get4DotDouble(double value) {
return ((int) (value * 10000) ) / 10000.0000;
} | 0 |
1feb5344ae3bb18e6935224170333ae6 | 184c70f3a6b2f8591736f7ebae61d6e9 | Set the UI values based on the image loaded | {
if (ImageTarget.GetComponent<DefaultTrackableEventHandler>().isFound == true)
{
GetComponent<RawImage>().texture = known;
GetComponent<Button>().enabled = true;
transform.Find("RawImage").GetComponent<RawImage>().enabled = true;
transform.Find("Text"... | 1 |
7860ae6c85d4b9405bc9159e4c60e742 | 50ffd11dbbdba37da81103b1f0ab6bf7 | 随机分出20%验证集 | def trainVStest(data):
random.shuffle(data)
train_data=data[0:int(len(data)*0.7),:]
test_data=data[int(len(data)*0.7):,:]
return train_data,test_data | 0 |
b55af370515b16db6bf3f52ebf0c298f | 9801ee904968046eba43495e09d934fe | Updates a repo under a user by checking the last update time in github | function updateRepo(userDir, user, repo, tree, callback) {
console.log(' Updating repo : %s/%s', user, repo);
var command = util.format(UPDATE_COMMAND, tree);
var repoDir = path.resolve(userDir, repo);
exec(command, { cwd: repoDir }, function(err, stdout, stderr) {
if(err) {
return callback(err);
... | 0 |
d2be1c342539fa02e758434879f8deca | abb0e3b6d13c92a4e0e4f670003b1ba4 | 时间转换为yyyyMMddHHmmss格式的字符串 | public class TimeTool
public static String format(Date date, String yyyyMMddHHmmss) {
SimpleDateFormat sdf = new SimpleDateFormat(yyyyMMddHHmmss);
return sdf.format(date);
} | 1 |
066b9c453779bd5231147f0f4516c309 | afd0c69fbc81f145ce9b5c40b56e4e3b | per-update feature:
Insert 1.0 if the cookie update content includes a javascript/JSON object.
Else -1.0. Will also check inside base64 encoded strings. | class CookieFeatureProcessor:
def feature_levenshtein_dist(self, prev_update: Dict[str, Any], curr_update: Dict[str, Any]) -> None:
lev_metric = lev_distance(prev_update["value"], curr_update["value"])
self._insert_sparse_entry(lev_metric) | 0 |
d7bea8d62b554c63e0a2eba184217ec4 | f5b92c75901691021018f9e3c7229bf4 | 根据品类获取对应的优惠券列表 | List<Coupon> coupons = getAllCustomerCoupons(id);
try {
coupons.removeIf(coupon -> !coupon.getCategory().equals(category));
if (!coupons.isEmpty()) {
return coupons;
}else {throw new SystemException(ErrorMessage.NO_COUPONS_OF_CATEGORY);}
}catch... | 1 |
d1393aafcc257973115f36403c341425 | 5b23958bee81db8c6bfb2ee44f0e0e69 | 点击表情Item时触发的事件 | public class ChatActivity extends BaseActivity implements FaceGridFragment.OnFaceiconClickedListener,
FaceGridFragment.OnBackspaceClickedListener, OnScrollListener
@Override
public void onFaceiconClick(Faceicon faceicon) {
FaceFragment.input(mEditor, faceicon);
} | 1 |
ceb62697d9b40840646e015d7d9e892a | 73802dd071796f10c3c8cc47e03ccb02 | Dispersion quantity with mask applied. | if mask is None:
temp = flux[None, :] - fluxmod
_e = fluxerr
else:
_m = ~mask.astype(bool)
temp = flux[_m]
temp = temp[None, :] - fluxmod[:, _m]
_e = fluxerr[_m]
for j in range(len(_e)):
if _e[j] > 0:
temp[:,j] /= _e[j]
return (temp ** ... | 1 |
ed94d4dc612cddede0b462399beb34e2 | 584cae3b9017ccfa571fba96341118d1 | Creates an instance of the holds page controller. | this.container = container;
this.card = cardInstance;
this.api = api;
} | 0 |
f382538f9874bdc5a4034150766de6ed | 9c7c041b335c7c89087f53bc04cf0b40 | ==============================set================================= | void database::setaccess(access Acc)
{
acc = Acc;
return;
} | 1 |
57191fe1be1d3a0815e9e4c963b43916 | dc9a46a5a968657689379c5da2ede5d7 | 根据车牌号获取车辆ID | void queryCarbyId(int carNumber); | 1 |
45da086a6ed05c0fad451f4aedad0d05 | 7f91646183fd6059f13a2770fd323a23 | For partially populated beans returns the properties that are loaded on the bean.
<p>
Accessing another property will cause lazy loading to occur.
</p> | public ListProperty<T> listProperty(); | 0 |
3133aa4a6a87dfe4e39e70b3a90d7e33 | 8ad3f2658b74aafdc4bdac57d9bba399 | Omnibus function for creating a derived dataframe
to feed into regression. | df_dict = {'ds': ds, 'cap': 1., 'floor': 0.}
for name in m.extra_regressors:
df_dict[name] = 0.
df = pd.DataFrame(df_dict)
df = m.setup_dataframe(df)
return df | 1 |
2a77c20d3d6dd87dcfac6f491aec0108 | 24f8d421099c0b3fec6460f9c5cd3228 | PreviewTextInput handler for the Quantity textbox | {
char c = Convert.ToChar(e.Text);
if (char.IsNumber(c) || !TextboxValue.Text.Equals(string.Empty))
{
double num = 0.0;
if (double.TryParse(string.Format(TextboxValue.Text + e.Text), out num))
e.Handled = false;
... | 1 |
21c98f76f3ee01b545ad55f8b00e8859 | f000d35177da637e000f9bd4b6481ea9 | Returns the minimum time, formatted according to ISO8601 | function controller($scope, $timeout, $filter, $interval)
function getMinTime() {
var minTime = $scope.minTime;
var maxTime = $scope.maxTime;
var minDuration = $scope.config.minDuration;
var maxDuration = $scope.config.maxDuration;
var pastTimeDisabled = $scope.config.pastTimeDisabled;
... | 0 |
8bbe235316a59ec10ea302a8088d63fa | 29ccd27c64fddebe8ea4da270808fe27 | 重置商户登录密码 | MerchantResult<VendorAccountDto> resetPwd(VendorAccountDto vendorAccountDto); | 1 |
92f93329b3953d622980cd9aedffc97b | f991d9f866f3a4e91ca9cf63ea463c01 | A row of the tree was clicked. Show the test results. | export class JsTree extends LitElement
_onClickRow(event, data) {
event.stopPropagation()
this._activeElement = data
if (data.children) {
if (data.expanded) {
data.expanded = false
if (data.ulClasses.includes('subtree-active')) {
data.ulClasses.splice(data.ulClasses.indexOf('... | 0 |
6ff85adb532ba2d2051ab7fcbbb04348 | e165dde5ae7b11f4781907c5cbf051c6 | Returns the authorization server's well-known OpenID Connect metadata discovery URL for the given [issuerId].
E.g. `http://localhost:8080/some-issuer/.well-known/openid-configuration`.
See also [OpenID Provider metadata](https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderMetadata). | {
string encryptedSessionKey = EncryptionManager.EncryptString(HttpContext.Current.User.ToIndigoPrincipal().IndigoIdentity.SessionKey,
SecurityParameters.USE_HASHING_FOR_ENCRYPTION,
... | 0 |
c2447cb7140d72f4666aa71c3ca10bb0 | 19f39645ce252ef50169963ff6515ad7 | 根据科室代码查询数量 | int countByCode(String code); | 1 |
2194e086ae35bb0139512f41b33b26a5 | 66625edd9844a0cac453e04b9715e6af | 블로그 본문을 탐색하며 이미지가 존재하는지 체크 | def crawl_image(link):
browser.get(link)
time.sleep(3)
try:
num_str = browser.find_element_by_css_selector("#activities > div.op-content-cards.style-cards.op-style-cards > p")
except selenium.common.exceptions.NoSuchElementException:
return
num = re.search(r"\d+",num_str.text).group(... | 1 |
345c591f866ac1e0132ca9f9f4ab4ed0 | 5954476acea6213a10375d6281be398d | Set the volume for the user’s current playback device.
Requires** the [SpotifyScope.USER_MODIFY_PLAYBACK_STATE] scope
[Api Reference](https://developer.spotify.com/documentation/web-api/reference/player/set-volume-for-users-playback/) | class Client:
async def player_volume(self, volume, device=None):
await self.http.player_volume(volume, self._get_id(device)) | 1 |
65128c04f920e00fefaffb7a54d31686 | 581c77748135ec1f9457716ba5702b78 | Returns the meta object for class '{@link org.xtext.example.blog.blog.Page <em>Page</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getPage(); | 1 |
4b353e6a21a006d02b30469bb32df3c2 | 7e77e1300154c43b02caf7fde78e75e9 | Creates an Example object from a row of a standard ExampleSet DataFrame | data = parse_c45(data_name)
num_data = len(data)
if(num_data == 0):
print ("empty dataset")
return None
return ExampleSet(data) | 0 |
5ca40904a3bd96ba95bfb72a472df265 | 742c0d554c6ee02ca4fa2c303d051cd2 | \brief Init tasks previously located in matrix_init_quantum | {
(void)firstTime;
rt_InitInfAndNaN(sizeof(real_T));
(void) memset((void *)q_3d_crane_cal_M, 0,
sizeof(RT_MODEL_q_3d_crane_cal));
{
int_T *mdlTsMap = q_3d_crane_cal_M->Timing.sampleTimeTaskIDArray;
mdlTsMap[0] = 0;
mdlTsMap[1] = 1;
q_3d_crane_cal_M->Timing.sampleTimeTaskIDPtr = (... | 0 |
5d9152fac471e39b007f5a7b5023f537 | 155a0b5b9256e5022bc1f119f7a6acbf | Hide/show output option checkboxes for detector type. | function toggleOption(option, state) {
$('[data-schemapath*="root.grabberV4L2.'+option+'"]').toggle(state);
if (state) (
$('[data-schemapath*="root.grabberV4L2.'+option+'"]').addClass('col-md-12'),
$('label[for="root_grabberV4L2_'+option+'"]').css('left','10px'),
$('[id="root_grabber... | 1 |
c255a96727a3a882710d97c6c87a005b | 1afb7c932dee8085bcc4d52fe275c752 | SPELLS AND SKILLS. This area defines which spells are assigned to which
classes, and the minimum level the character must be to use the spell or
skill. | {
if (i >= lines.length)
{
return i;
}
String aString = lines[i];
while (aString.startsWith("SPELL:"))
{
aString = aString.substring(6);
StringTokenizer aTok = new StringTokenizer(aString, ":", false);
i++;
aString = lines[i];
String name = aTok.nextToken();
Spell aSpell = Globals.getS... | 1 |
9a101300c0b9b4d008ebbdd882e44b45 | 0fd20b0534ee0df81ab77bbe2404e437 | Строка X состоит из нескольких предложений, каждое из которых кончается точкой, восклицательным или
вопросительным знаком. Определить количество предложений в строке X. | {
string sText = "Шла Саша по шоссе и сосала сушку";
string[] arWords =
sText.Split(new[] { ' ', ',' },
StringSplitOptions.RemoveEmptyEntries);
int iCount = 0;
foreach (string sWord in arWords) {
int iValue = h_GetValueOfVowelsCount(sWord);
if (iValue == 3) {
... | 0 |
3e2f88e6caec4627c73d8754a352ac30 | 52221e6066737b9d500670855cbf59a3 | Cria um dicionario de resultados no formato
{
"XXX(YY) : [
(G1, CL1, BT1),
(G2, CL2, BT2),
...
]
"XXX(YY) : [
...
]
...
}
Onde XXX(YY) eh o id do nodo ex: PHY[12] e GN, CLN, BTN sao os valores para grau, closeness
e betweenness calculados para cada vez que esse residuo aparece na familia | {
ArrayList<ResultTable> resultados = new ArrayList<ResultTable>();
ResultTable currentresult;
for (int i=0; i <= 23; i++) {
ArrayList<AbstractLog> logs = dao.listaHora(conn, ""+i+"");
currentresult = new ResultTable(""+i+"h", +logs.size());
resultados.add(currentresult);
}
return resultados;
} | 0 |
75f901ef799b13c9926d2bd4dbc76ac9 | 63ec8817d2abe2dd5354d83bb7a8ea84 | 获取smsEnabled属性的值。 | @Slf4j
public class SmsAccount extends BaseModel
public Boolean getAccountEnabled() {
return accountEnabled;
} | 0 |
58fc2f33e6c6afa3ae235a2c65669610 | 26ccedfe480cc825ba570fe01564dfa9 | Pull processor status | $status = $this->getProvider()->get('PM\Settings\Gearman\Status');
$this->_runOperation('control');
$this->getExecutor()
->add(function() {
usleep(50 * 1000);
})
->add('get', $status);
} | 1 |
95e998451a519f523bc3801861ff6931 | eaea59142b893e10e6a2e2cef85849c1 | 前向传播,使用MSE | self.layer1.W.grad = np.zeros_like(self.layer1.W.grad)
self.layer3.W.grad = np.zeros_like(self.layer3.W.grad)
self.layer1.B.grad = np.zeros_like(self.layer1.B.grad)
self.layer3.B.grad = np.zeros_like(self.layer3.B.grad)
out1 = self.layer1.forward(X)
out2 = self.layer2.for... | 0 |
e88d40252f3e15dc5ff0f239fc07faca | b287fe5debeaf700ccc793117be9f387 | Calculate the reduced temperature. | if ('C_p' in kwargs) and ('V' in kwargs) and ('T' in kwargs):
T_0 = kwargs['T'] + ((kwargs['V']**2) / (2 * kwargs['C_p']))
elif ('Ma' in kwargs) and ('gamma_var' in kwargs) and ('T' in kwargs):
T_0 = kwargs['T'] * (1 + (((kwargs['gamma_var'] - 1) / 2) * \
(kwargs['Ma']**2)))
else:
... | 1 |
efc50c9ea975ffacb524b60e1cf79e89 | fae8973ad59c2da506bcbd53ec41e70f | homogeneous transformation representing a rotation of theta about the z-axis | {
Scalar rotation[] = {
cos(theta), -sin(theta),
sin(theta), cos(theta),
};
Matrix rv = matrix_new_from_array(2, 2, rotation);
return rv;
} | 0 |
303dc45b107df350c98bc0027d6dfbdd | 7d7105c9c928a938b40e39c65c5eaeb1 | Create a Game object that stores and evolves generations base on the Game of Life | GameOfLife::GameOfLife() {
} | 0 |
c94c84c726f475a93b2b1262d0c23026 | 6a0ce0d21e5b2ee13fd0c4fdb7219ca1 | Called when drag has left this CellLayout or has been completed (successfully or not) | {
_updateLayout();
if (m_cellsUsed.Count > 0)
{
for (int i = 0; i < m_cellsUsed.Count; i++)
{
TableViewCell cell = m_cellsUsed[i];
m_cellsFreed.Add(cell);
cell.reset();
cell.node.SetActive(false);
... | 0 |
328215717c8b3d618053baea368daa35 | f8d0f7f6ff29f6a88de3d02e071e8705 | Carregar todos os conjuntos utilizados por uma empresa | {
using (var db = new PlataformaContext())
{
var lQuery = (from _Modulo_Empresa in db.Modulo_Empresa
join _Modulo in db.Modulo on _Modulo_Empresa.id_modulo equals _Modulo.id
join _Pessoa_Empresa in db.Pessoa ... | 1 |
d9bfb795a84831808296fada80013230 | 9a43dc27251da6a32b8ca05ad32e989c | Gets whether the etablissement already has the picto auditif. | class Contact
public function isRespoEtablissement() {
return $this->respoEtablissement;
} | 0 |
daea1aff90735bfdc442d1bbbd498367 | bb16545d68e12bcd826b564dd771be6c | Fetches lists of stories filtered by a creator id. (asynchronously)
Fetches lists of comic stories by a specific creator with optional filters. See notes on individual parameters below. | mCreatorService.getCreatorsForEventId(
eventId,
String.valueOf(getTimestamp()),
getApiKey(),
getHashSignature(),
queryParams.getFirstName(),
queryParams.getMiddleName(),
queryParams.getLastName(),
... | 0 |
73ca9b3123370da5eeaad1f085759479 | d72911a2bb8cc71f332e16bde2612acb | 上限値を超えた加算値は上限を引いて上限までの範囲内に収めて返す | value += addNum;
if (value > maxNum) {
value -= maxNum;
}
return value;
} | 1 |
58ffa0a5531b76355ffbc9a6d6286b6c | 9743f47dd78f07793af31eca85574e2b | function to create maze 2 | void create(int x,int y)
{
int c[4][2]={0,1,1,0,0,-1,-1,0};
int i,j,t;
for(i=0;i<4;i++)
{
j=rand()%4;
t=c[i][0];c[i][0]=c[j][0];c[j][0]=t;
t=c[i][1];c[i][1]=c[j][1];c[j][1]=t;
}
map[x][y]=Road;
for(i=0;i<4;i++)
{
if(map[x+2*c[i][0]][y+2*c[i][1]]==Wall)
{
map[x+c[i][0]][y+c[i][1]]=Road;
create(... | 1 |
4dd697f9f22ff8cf8ffa2492c417f356 | 2e0ff0ac362c40b204330e10a8b8333a | This will increment the time depending on which buttons are being pressed | {
if (button == BUTTON_UP)
{
if (sCurrentTime.hour == 23)
sCurrentTime.hour = 0;
else
sCurrentTime.hour++;
}
else if (button == BUTTON_DOWN)
{
if (sCurrentTime.hour == 0)
sCurrentTime.hour = 23;
else
sCurrentTime.hour--;
}
} | 1 |
ffaf05c40ddc2c7a566714c0b880f691 | 4fc0f324eb507d0651c67beda3be11f1 | Set satellite-specific parameters. | N_ast: int = elts.shape[0]
elts['H'] = np.full(fill_value=H, shape=N_ast, dtype=dtype)
elts['sigma_mag'] = np.full(fill_value=sigma_mag, shape=N_ast, dtype=dtype) | 1 |
f0f110095aab3a8e305eb4410d6b5387 | d4126a10b10b9fad2e488d2ea3053866 | Gets the player behavior attached to the player | namespace Engine.AI.Behavior
IAnimationBehavior getAnimationBehavior(); | 0 |
09327d18daececb1ac9934a6dcb654fa | e6579b323fea7dae2e999c27b531acb2 | Get manual domain list from admin and expolode it to array. | class Domain
public static function getCctldDomains()
{
if(self::$cctld_domains) {
return self::$cctld_domains;
}
$cctld_domains = file_get_contents(dirname(__DIR__) . '/deps/cctld.txt');
$cctld_domains = explode(self::getSeparator(), $cctld_domains);
self::$cctld... | 0 |
c41e08888ab2c0a8eaf2f4288efec266 | d2994a91f30f56611db7ef6e49ad40de | 获取审核记录数 | int auditCount(Map<String, Object> params); | 1 |
12e81fa0c402be4297624067ddd34add | 3cc5e3a865ce910ae014f443c6c3eaab | Remove the old visual queue contents
Can't just display.remove() the visualQueue because a reference is needed for the display group on level1
Use a while loop becuase numChildren will be 1 smaller after each element removed | function scrapOld() {
while (pixelCanvas.firstChild)
pixelCanvas.removeChild(pixelCanvas.firstChild);
} | 1 |
d5821a01b919cfe19c1560586db6cee3 | d9259f527f0323b81edb8c5caeeef8c8 | Hàm xử lý nhấn click yes trên dialog xóa
Created by BQLINH (20/5/2019) | public class Files_UI : MonoBehaviour
public void MessageManager_OnRemoveYesClick( object[] args ) {
int index = int.Parse( args[0].ToString() );
CustomTemplateType type = (CustomTemplateType) args[2];
message_manager.GetComponent<Canvas>().enabled = false;
if ( script_files.isFile( index ) && type == Custo... | 1 |
982dd9fd24c1a5205fe2ca737be75280 | 6d0964a13d2c297bfe9b05727f3639ad | Mark a returned item as received. | class PostOffice:
## Database file.
def accept_item(self, id):
temp = self.db[self.name]
temp[id - 1]["accepted"] = 1
self.db[self.name] = temp | 1 |
4d78ede9c3d164366d92b17552bf7283 | ff5e96712a728247ca8a7dc8bf227d96 | Air-Tapのリリース時のコールバック処理 | for (int i = 0; i < inputEventListener.Count; i++) {
ExecuteEvents.Execute<IInputEvent> (
target: inputEventListener [i],
eventData: null,
functor: (reciever, eventData) => {
reciever.OnRelease (stockTapObject as object);
});
}
stockTapObject = null;
} | 1 |
4655628581ef0731f129514727b35436 | 63041ba401c2d758f61e36be8bea4191 | Returns :code:`True` if any value in a column passes a truth test. The
truth test may be omitted when testing :class:`.Boolean` data. | class Functions(WindowFunctions):
def any(val, alias=None, **kwargs):
return Function("any", val, alias=alias, **kwargs) | 1 |
a3f19992b2ae7cc160a1aaf5c3686bbb | 9d1a30526dc87b44b23ff53340d94403 | run reactor in a thread. | {
xTaskHandle task;
xTaskCreate (reactor_run, "reactor", 2048, NULL, 1, &task);
} | 1 |
4d545f792ac579fe60a6cdc9c21abda6 | 15a878cef0dfc324e36eca57e5b5b75c | Shows an interactive plot with two movable cutplanes through a 3d volume | ip = ImplicitPlane()
cut = Cutter(cut_function=ip.plane)
self.filters = [ip, cut] | 0 |
f447add8a7cb0428e643452f94dc22f0 | 3064af53455578692b71bd1c8447146a | Name : ResetPictureInfoStatus
Description : Reset status fields of a PictureInfo element.
Parameters :
Assumptions :
Limitations :
Returns : | const STVID_Picture_t PictureType, STVID_PictureParams_t * const Params_p)
{
ST_ErrorCode_t ErrorCode = ST_NO_ERROR;
STVID_PictureInfos_t PictureInfos;
if (Params_p == NULL)
{
return(ST_ERROR_BAD_PARAMETER);
}
ErrorCode = STVID_GetPictureInfos(VideoHandle, PictureType... | 0 |
8129f0451059748828b78190cace6110 | ebb6c9587eaa3ad98b7f7ffbcefcd62b | Updates the shared preferences to indicate the change log have been viewed. | class WorkManagerActivity : AppCompatActivity(),
SharedPreferences.OnSharedPreferenceChangeListener
override fun onSharedPreferenceChanged(p0: SharedPreferences?, p1: String?) {
updateView()
} | 0 |
c4ffc8c2668dfcf6d71209caee3249e1 | 7345c9a26cf8afa39b78ebc67ccd3cd6 | 取得受測人員列表 | var rows = null;
jq.ajaxSettings.async = false;
var params = jq('#assessForm').serialize();
jq.ajax( {
url : programName + '/assess/performance!queryUsers.action',
type : 'post',
data : params,
dataType : 'json',
success : function(data) {
rows = data;
}
});
return rows;
} | 1 |
bd46b9a7d3471076b4b6384e7ff7a2a1 | ebface5f9afde9f9c96034668a9a2542 | 禁用activity-alias组件 | val componentName = ComponentName(context, className)
if (isComponentDisabled(context, componentName)) return
context.packageManager.setComponentEnabledSetting(
componentName,
PackageManager.COMPONENT_ENABLED_STATE_DISABLED,
PackageManager.DONT_KILL_APP
... | 1 |
fbfa1bd71dfb3a04317fe2a741e5d771 | de81064ec14b471cc9d7e38f0802df80 | Pointers to functions have to emitted in a special way because of C
syntax. | static void emit_create_function(lily_emit_state *emit, lily_sym *func_sym,
lily_storage *target)
{
lily_u16_write_4(emit->code, o_create_function, 0, func_sym->reg_spot,
target->reg_spot);
emit->function_block->make_closure = 1;
} | 0 |
d8be44775b22a253031c24cdc8f1da98 | 66756072dd1631585eebd9a0b387d2c0 | Adds a rail to left and right. | let main = createRectPath(length, RailPart.WIDTH)
let detector = createRectPath(length, RailPart.WIDTH + RailPart.MARGIN)
super(main, detector, hasFeederSocket);
this.length = length;
let anchor = this.getAnchorFromType(anchorType);
this.move(point, anchor);
this.rotate(angle, anchor);
} | 0 |
a5ff3a44972fdcc8f52a00c97069714c | 232988d540c80b7fe482cc03777594d8 | Performs a mirror along the Y-Axis | namespace Lab2_Paint
public class Effects
public void MirrorY()
{
form.TempDraw.RotateFlip(RotateFlipType.RotateNoneFlipY);
form.Snapshot = form.TempDraw;
form.drawPanel.Invalidate();
form.drawPanel.Refresh();
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.