query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
293569e9901d8da17a74ae8b37f9f82b | 4725d7ca36881a99fd5aff0aecd5674d | Internal add method to add to the storage arrays. | {
if (GWT.isScript())
{
jsArray.add(value);
}
else
{
javaArray.add(value);
}
} | 1 |
63ac3f32cef685ee1aca609ba610236a | eb1e55a79a2416b5e127b48224f9b3d8 | Método que permite instalar uma aplicação no telemóvel | class MainActivity : AppCompatActivity(),StartCameraListener
fun installApk(context: Context, file: File) {
val intent = Intent()
intent.action = Intent.ACTION_VIEW
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
intent.setDataAndType(Uri.fromFile(file), "application/vnd.android.package-a... | 1 |
90ba2280afbbc5fef6c1a41c5a8344c4 | 9aad73749c7eeb8cdbb560e451e1b443 | @brief - This function calculate peripheral clock speed for APB1 | uint16_t temp, AHB1Prescalar, APB1Prescalar;
uint16_t AHB1PreSclr[9] = {1, 2, 4, 6, 16, 64, 128, 256, 512};
uint16_t APB1PreSclr[5] = {1, 2, 4, 8, 16};
uint32_t sysClk;
switch ((RCC->CFGR >> 2U) & 0x3) {
case RCC_HSE: sysClk = HSE_CLK_FREQ; break;
case RCC_HSI: sysClk = HSI_CLK_FREQ; break;
case RCC_PLL: sys... | 1 |
6bf80985a0c7d09cc251f1999881b551 | 491b39c0247ce1606b64ac1289ac24f6 | Determine the class of the missing angle. | {
if(!this.isValid) { return AngleTriangle.ERROR_A; }
double difference = Math.Pow(_sides[2], 2) - (Math.Pow(_sides[0], 2) + Math.Pow(_sides[1], 2));
if (difference < 0)
{
return AngleTriangle.ACUTE_A;
}
else if(difference >... | 1 |
94e59f7d09d999cd0d99b84b84579788 | 9acfab92badd54d9746b41b6bb23ea93 | Retorna se há ou não uma imagem para esta palavra | public class Word
public boolean hasImage(){
return (mImageId != mResource);
} | 1 |
12d9891718f7e76a47874f5cd71724b4 | 6462d434f45c6cb145187c4c1776c777 | Generate a new wallet hierarchical deterministic wallet with a random mnemonic and
default derivation path.
Otherwise, an error is thrown. | def generate_hdwallet(mnemonic: str = MNEMONIC, cryptocurrency=EthereumMainnet, passphrase: Optional[str] = None) -> BIP44HDWallet:
bip44_hdwallet = BIP44HDWallet(cryptocurrency=EthereumMainnet)
bip44_hdwallet.from_mnemonic(
mnemonic=mnemonic, passphrase=passphrase
)
bip44_hdwallet.clean_derivat... | 0 |
23c509d725dcc5d54ce81a426f997e82 | ad15821e80c2e7f0e556343fdc811098 | Returns dictionary of letters(keys) with occurances(values). | def letter_count(s):
return {letter:s.count(letter) for letter in s} | 1 |
d5c603f0a013ac1c5743eca728c18cff | 9050ae65448217d33bcfd6a45fd56546 | 自定义起始点的寻路,寻路成功时把路径保存到传入的数组里 | {
int v0, v1;
v0=point_1,v1=point_2;
for (int i = 0; i < 100; i++)
{
for (int j = 0; j < 100; j++)
{
if (gra.G.arcs[i][j].type != 1)
{
assist[i][j] = 30000;
}
else
{
assist[i][j] = 1;
... | 0 |
08394822fcd8627f10f9b31420d2db47 | 68f939feabbc596541140fa48cd89957 | CSS用のデフォルトのIDを取得 | public function getHTMLID()
{
return Convert::raw2att($this->StyleID ? $this->StyleID : $this->getDefaultStyleID());
} | 1 |
afc2c503a6bf52fa313f2ef564e11b2a | 998027a7dcaf8a9ce19f4bc9fb0f5117 | 从指定url路径中读取txt文件到String中返回 | StringBuilder sb = new StringBuilder();
try {
URL url = new URL(urlStr);
BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream(),Charset.forName(charset)));
String temp = "";
while((temp=reader.readLine())!=null){
sb.append(temp);
}
} catch (MalformedURLException e) {
... | 1 |
8f57c344f2aaa7a7d809998a9253eb4f | 32dbc7560cabd30394b0384027e5419f | Builds "create retention policy" query. | {
Dictionary<string, string> urlParam = new Dictionary<string, string>();
urlParam.Add("namespace" , createRetentionRequest.Namespace.ToString());
urlParam.Add("repository" , createRetentionRequest.Repository.ToString());
string urlPath = HttpUtils.AddUrlPath("/v2... | 1 |
677e2185062d9a9a9e65880d7864b96e | 57fcc1948750c49547a08b63a9558579 | execute a new program, replacing the current process | pid_t pid = fork();
if( pid < 0){
perror("fork error");
}else if( pid == 0 ){
execle("/home/wgco/Linux_App/thread/loadprogram", "loadprogram", "I am ", "a program!", (char *)0, env_init);
perror("execle error");
exit(-1);
}
} | 1 |
d17cdcc209c189b4d11b88ae32e80820 | f28a1d1f740049a45d4a051cecf93868 | This function creates a temporary file in the guest operating system.
<ul><li>You must call VixVM_LoginInGuest(). before calling this function.
<li>The result of the call is in the property VIX_PROPERTY_JOB_RESULT_ITEM_NAME on the returning jobHandle.
</ul> | namespace Vestris.VMWareLib
public class VMWareVirtualMachine : VMWareVixHandle<IVM2>
public void CreateDirectoryInGuest(string guestPathName, int timeoutInSeconds)
{
try
{
VMWareJobCallback callback = new VMWareJobCallback();
using (VMWareJob job = ne... | 0 |
b45db186288c4f494cef29175bad0386 | 2e3d43fd2a6c34d76910faab40479a7a | 判断一个字符是否属于空格,包括回车,\t等。 | function isLineSpace(char: number) {
return char === charCode.WSP || char === charCode.TAB;
} | 0 |
266134db72711fb29331657e299b5d41 | 525c7af0d719d2f634e5aa14867bf60a | Currently not used, do not use this for any reason. | public class MySQL5LegionMemberDAO extends LegionMemberDAO
@Override
public int[] getUsedIDs()
{
return null;
} | 1 |
9ac148f30839d9acf7626b25755cba28 | d12458ea36a985c7c5ea1d606460a108 | Checks if any of the listed errors exists int he errors array | export default class Errors
any() {
for (let field in this.errors) {
if (this.errors[field]) {
return true;
}
}
} | 1 |
dc2f9881e29288a6a09fdcdbe10fb8d1 | bd4e3d3ddc9896c6e44f3b90dd44d77d | Persiste su DB i risultati dell'estrazione | @Transactional
public String saveDBData(List<PlaceDBResult> dbResults) throws IllegalArgumentException {
List<PlacesDB> results = convertObjDBs(dbResults);
entityManager.getTransaction().begin();
for(PlacesDB result : results) {
try {
entityManager.persist(result);
} catch(Exception e) {
e.printSt... | 1 |
fa6c24f1c78b62aab77baaf4ed166bff | d58e96df471c5443c1fe7e857a8c5a7a | Fixtures filename getter | {
return __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'Fixtures' . DIRECTORY_SEPARATOR;
} | 0 |
b85eb22347621825bc4860d65ef7f139 | 2f513a812ac851380e32a73a4ec4e1e9 | Creates a new CycServer instance from a string matching the format <code>host:port</code>. | public class BioServer extends AbstractBioServer
public static BioServer newServerByPort(int port) throws IOException {
return new BioServer(port, DEFAULT_BACKLOG, DEFAULT_LOCATION);
} | 0 |
7b2719db000c3276426514aa75a84cce | ef2125ae083ff21c649a0ae21e7ea422 | funcion que incrementa en uno los contestados correctos | public class ThermometerRound
public void incrementPlayerOneCorrectAnswers(){
playerOneCorrectAnswers++;
} | 1 |
29450b7999d5667b34f19b749d188fda | e51800b45dbdd13d0e9f3f3fdbfc5648 | Função para adequar e formatar as colunas e valores da TCC CONTRAC (arquivo CONTRAC.cnv) | {
$cols = [];
foreach ($lineCols as $lineCol) {
switch ($lineCol) {
case '23 - Data de':
$cols[] = '23 - Data de realização';
break;
case '24 -':
$cols[] = '24 - Tabela';
break... | 1 |
43d62445b610c8429b3da3eb11d6a824 | daa20295751482be62ca98bfc0c85639 | Handle redirect to QuickPay | class PaymentController extends Controller
public function redirectToGateway()
{
try{
return Paystack::getAuthorizationUrl()->redirectNow();
}catch(\Exception $e) {
return Redirect::back()->withMessage(['msg'=>'The paystack token has expired. Please refresh the page and try a... | 0 |
4bc6885afa66e0c56f72885f02a524b1 | ea0830dfee9500d8343a047600dab752 | Resets score,lives and bricks with a short and simple animation. | document.getElementById("game-over-div").style.display = "none";
animationId = requestAnimationFrame(update, canvas);
document.getElementById("live1").style.backgroundImage = "url(assets/frog.png)";
document.getElementById("live2").style.backgroundImage = "url(assets/frog.png)";
timer.style.width = ... | 1 |
b2e25a23b34eb04ee91a3e3a47e56924 | 4d693ac3ce81ce98360d027a8244220f | 删除元素,可删除多个,并返回索引列表 | function DeleteElements(arr) {
let eleCount = arguments.length;
for (let i = 1; i < eleCount; i++) {
let ele = arguments[i];
let index = arr.indexOf(ele);
if (index >= 0) {
arr.splice(index, 1);
}
}
} | 0 |
5c56cc06cdbfe5a7547c0d8eb1381a38 | 928caa088912dcdfd500f2ed92bf3f7a | Retrieve the existing code category and initialise the form controls | namespace RSA.NFOS.WPF.ViewModel
public class CodeTextClientViewModel : WorkspaceViewModel
private void LoadCategoryData()
{
this.ResetAddChangeFields();
this.CategoryList.Clear();
this.CodeTextClientDataGridVisibility = Visibility.Collapsed;
NFOSCodeTextDTO n... | 1 |
e180d5a23c02dde857478918f47abab0 | ab9ce6a3249a26cda6bdcf5208d44a39 | Gets mentions occurring after last_seen_id | public class TwitterClient extends OAuthBaseClient
public void getMentionsTimeline(long lastId, JsonHttpResponseHandler handler) {
String endpoint = getApiUrl("statuses/mentions_timeline.json");
if (lastId > 0) {
RequestParams params = new RequestParams();
params.put("since_id", ... | 1 |
54b380c807768ec7ef3e5d91c7d52a9f | d5a22da6543263b13ed78a5ae59aacd7 | 绘制敌人爆炸过程图片 | public class BossPlane extends EnemyPlane
private void drawExplosion(Canvas canvas) {
int y = (int) (currentFrame * object_height);
canvas.save();
canvas.clipRect(object_x, object_y, object_x + object_width,
object_y + object_height);
canvas.drawBitmap(boosPlaneBomb, obje... | 1 |
1bddffec140cfca55db388683de07ad6 | dbaa037fedf066be5a715ef26fbdcddc | A container for a one or more app.geolocator.LocationHits objects | class LocationHitsTestCase(unittest.TestCase):
def setUp(self):
self.hits = None
return | 0 |
e2422f081f3301f848fbf83eeb72e5bf | 7ffff2279f6617dc1926354ef8b4d8bb | Returns part of the shape as new shape; new points are created | (closest, i) = self.get_closest_point(p)
tmp = [closest]
tmp.extend(self._points[i + 1:])
return (Poly(self._points[0:i + 1]),
Poly(tmp)) | 1 |
b3eecf326329232906fc4a3de027c353 | 4465d026cfcf80333e66a0ad0b4c289c | 检查当前工作目录中的文件版本是否与SVN库中的一致 | namespace AssetBundleBuilder
public class SvnUpdateBuilding : ABuilding
public void checkVersionAsset()
{
var destVersionPath = BuilderPreference.VERSION_PATH + "/version.txt";
if (!File.Exists(destVersionPath))
destVersionPath = BuilderPreference.ASSET_PATH + "/versi... | 0 |
9b8754594a29e1888e525545b0978dbd | f047ebcf8fc97376080eb9e7dc4bd4c8 | 查询某日的账单数量 | Integer countAccByAccDate(Date day); | 1 |
69f4c497ce95684cfdc6ac98c4e9bd78 | 7c1c8ed9948fa7ee965fbd1cb1da74d9 | YYYYMMDD 형식의 날짜 String을 Calendar의 형식으로 변환 | public class DateAdapter
public static Calendar getCalendar(String ddmmyyyy) {
Calendar calendar = Calendar.getInstance();
StringTokenizer st = new StringTokenizer(ddmmyyyy, "/");
int date = 0;
if(st.hasMoreTokens()) date = InformationManager.checkedParseInt(st.nextToken());
if(d... | 0 |
a5047cd8d66e19693ddd0092a0bf1d7e | 4aff0973a12771916abbb4438e4b2a3d | kullanıcının tamamlamış olduğu siparişleri getirir. | namespace BorsaUygulamasi
public partial class KullaniciFormu : Form
public void SatistakiUrunleriGetir()
{
connection.Close();
connection.Open();
SqlCommand command3 = new SqlCommand("Select UserItemID as[ID NO],UserID as [KULLANICI ID NO], ItemID as [ÜRÜN ID], Item... | 0 |
d340add6f1ae32eb1c626346a49d7e75 | f86e82677f61899c230fc68afe7a79d4 | La ejecución de la prueba valida que se reciban las instancias nulas y se obtenga una excepción. | [Category("Insertar")]
public void TestExcepcionInsertarActividad()
{
lugar.Id = 0;
Assert.Catch<BaseDeDatosExcepcion>(ExcepcionInsertarActividad);
lugar.Id = idLugar;
actividad.Nombre = null;
Assert.Catch<CasteoInvalidoExcepcion>(ExcepcionInsertarActividad);
actividad = ... | 1 |
ead1c296ae019e6bffc78d715cb86747 | 98e561ccdbb8881f5f64915dc0ede68e | 显示规则详细 | function couponDetail(){
var couponId=$("#couponIdHid").val();
dialog("查看规则", "iframe:/coupon/couponRule_pageShow.action?viewType=show&couponId="+couponId,
"750px", "455px", "iframe");
} | 1 |
b6ee9eaf0b6a786340a054dd63fc223e | 3a26c1d35b2deb185c3b2ab0dacf2d9a | 通过lambda函数按第0列排序 | def sort_by_name(alist):
from operator import itemgetter
alist.sort(key= itemgetter(1))
print(alist) | 0 |
55f5794c58b673f7d1cd5a3a5e198689 | e5b135b77c65e43d3c7b99ea7926b80b | Test examples/pyomo/piecewise/step.py | solver = scip.solver()
x1 = solver.variable(upper=1)
x2 = solver.variable(upper=1)
solver += 0 <= x1*x2 <= 1
solver += 0 == x1*x2
solution = solver.maximize(objective=x1)
self.assertAlmostEqual(solution.objective, 1.0)
self.assertAlmostEqual(max(solution[x... | 0 |
d669b761dc1bd78a5267080c5eac5961 | a647476fb4a869b6e18fd036d7fb8180 | 添加他人位置 | class AboutUserController extends HomeBaseController
public function personal_addspot()
{
return $this->fetch();
} | 0 |
96687d7923df980a125aec4c25a8ae65 | 8d67a1dc01c33cba23c2ef8bf7489024 | Methode permettant d'appliquer des dégats au joueur. | public function suffer($degat) {
$this->setPv( $this->getPv() - $degat );
} | 1 |
e88128055144422178d8c7de9a44f3e2 | 16a789e60a9453ea15828ffc0d8e8461 | 返回精简版的微博记录,只包含所需的字段 | class sina_oauth_client_class extends base_client_class
function wb_data_format($data) {
$r = array ();
$r ['id'] = $data ['id'];
$r ['text'] = $data ['text'];
$r ['uid'] = $data ['user'] ['id'];
$r ['username'] = $data ['user'] ['name'];
$r ['img'] = $data ['bmiddle_pic'];
$r ['url'] = "http://api.t.sina... | 1 |
8ebafbfcb06b0e80600e8091884b4c75 | 309f787396cf78364b2ce3d4c2439181 | クイックセーブを行う | {
int scrollv[6],i;
rpgevent *ev;
wcsaveio_start(f);
wcsaveio_write_num(wclevel_get_id());
ev = wcplayer_get();
wcsaveio_write_num(ev->get_pos_x());
wcsaveio_write_num(ev->get_pos_y());
wcsaveio_write_num(ev->get_direction());
wcsaveio_write_num(wcmisc_get_money());
wcsaveio_write_num(wcmisc_get_save_count())... | 1 |
4c4a49b877c00b7ef977dda7f90f4289 | d9eddf719aff52283917534a1bc1139c | Check if surface is generated correctly for unit cube | class TestCube(object):
def test_3_1_4D_cube_init(self):
test_triangulation(4, 0) | 0 |
5db2993814e7acb18610bdc6ad46b1d7 | 859417943e1e9f6b1eec002fb7def2b9 | Returns a one-line description of the subtest, or None if no
description has been provided. | class AbstractTestSuite(object):
def GetDescription(self):
return self._description | 0 |
1eb01b88767fde8d84d35c65e6cb342d | f6165f74ffaf809b07a8d55510ad11b5 | 判断用户是否具有添加文章权限。 | def has_add_perm(user, target):
content_type = ContentType.objects.get_for_model(target)
return check_permission(user, 'add', content_type.app_label, content_type.name) | 1 |
80afc72c174d7b1c8ad6cfc68af445f9 | 40d60c1f20cbaedb1b3d846293919bd3 | LeetCode Sol | if not nums or len(nums) <= 1:
return False
ss = sum(nums)
if ss%2 != 0:
return False
m = ss//2
n = len(nums)
dp = [[False]*(m+1) for i in range(n)]
for i in range(n):
dp[i][0] = True
dp[0][nums[0]] = True
for i ... | 1 |
3c897d015ef3c9d12839ab95db175051 | b673b8cfc0f5b610f46423fe37af1e4a | 计算玩家对应VIP等级的称号等级 | function getVipLevel()
local vipLevel = _userInfo.vip or 0
return tonumber(vipLevel)
end | 0 |
9cc8ea05cf9cc501cded0ebb696b47e4 | 213b35450f8a4babe1e015fc20804b44 | IsStruct validates if an instance is struct or pointer to struct | if v == nil {
return false
}
return reflect.ValueOf(v).Kind() == reflect.Ptr
} | 0 |
96d8eb6e593ddf0390d67bdc33948e94 | 9c0aa50b948666a52060803069f9cb7a | 获取离线作业某个人的反馈内容 | Integer id=getParaToInt("id");
Work work=Work.dao.findById(id);
setAttr("work", work);
WorkFeedBack workFeedBack=WorkFeedBack.dao.findByWorkId(id,Integer.valueOf(getUserId()) );
if(workFeedBack.getInt("status")==0){
workFeedBack.dao.readWorkFeedBack(id,Integer.valueOf(getUserId()));
workFeedBack.set("re... | 1 |
7f23eed90b739718e108a2de7fc8380e | fb42b610a1eb5fb5974caef89c728198 | This method <b>getStartTime</b> returns the start time of a specific meeting. | public class Seminar implements Serializable{
public int getStartTime(){
return startTime;
} | 1 |
d188d8f996c5c29cab8f9a23c28b9a29 | d3ec4afa12b06f73b45dfd434298338b | Trains a policy and dumps it to file. | class Session:
def train_sys(self):
self.sys_agent.policy.train() | 0 |
a0842d6fe23f18c40ac937ce40412fed | 335ee97f3aded1489f45c3004bca4ab5 | Function to call variants with GATK Haplotype Caller (HC)
GATK HaplotypeCaller is used to collect vcf information from a mapping file
-L name of the circuit design in the reference fasta
-R reference fasta file, can contain circuit & host
-I input bam file that has read groups added, duplicates marked
-stand_call_conf ... | script_file = "/{}/{}/Scripts/7_{}_call_haplotype.sh".format(
db["out_dir"], args.name, args.name
)
with open(script_file, "w") as fout:
fout.write("#!/bin/bash\n")
fout.write("set -e\n")
fout.write("##-------------\n")
fout.write("##Step7: Call Haplotype\n")
... | 1 |
4b7d6b1dbb0f5c8ef4862fd5082403cb | fa2d4c37b181efc8823b444949d62838 | Sets the metadata schema ID of this metadata property. | public PropertyMetaData setId(String id); | 1 |
b78e553b0faa7b9ded91e37896eeaf9c | f743e73164c84e1b2e8fa5a3263add94 | Handles the Clicked event of the btnregistar control. | {
if (panelContenido.Controls.Count > 0 && panelContenido.Controls[0] is FormRegistro)
return;
Mostrar(FormRegistro);
} | 0 |
5a7236d1db4764c4a89ba78ba7d4c1ea | 833969999968b6d4579b26f96aea38f0 | 配置lvs函数 | {
uint32_t i;
bool b_init_flag = true;
bool b_enable_flag = false;
for (i = 0; i < LVD_CHANNEL_NUM; i++)
{
lvd_hw_get_circuit_enable((lvd_channel_t)i, &b_enable_flag);
if (true == b_enable_flag)
{
b_init_flag = false;
}
}
if (true == b_init_flag)
... | 1 |
6aaf93b0d3a9578cbee114c6d883514f | 9826063934cd8c6d4167b20ed2b8fa62 | Insert 'ready for command' information into the MOSI frame.
None.
None. | {
unsigned short i;
for(i=0; i<NCSI_MAX_CMD_PACKET_LEN; i++)
{
ch->pending_rq[i] = 0;
}
ch->pending_rq[0] = NCSI_MC_ID;
ch->pending_rq[1] = NCSI_HEADER_REV;
ch->iid++;
if (ch->iid == 0)
{
ch->iid = 0x01;
}
ch->pending_rq[3] = ch->iid;
ch->pending_rq[4] = cmd;
ch->pending_rq[5] = ch->ch_id;
ch->pending... | 1 |
fe55b2ead483a32152e71acb41133bb0 | 98ae0bc1c8ec08b516e4b6319479d6cb | Ham chuyen mot chuoi he 2 sang mot chuoi he 16 | string TConvert::StrToHex(const string & sStr){
int iLen = sStr.length();
uchar ddl,ddh;
string sOut;
for (int i=0; i<iLen; i++)
{
uchar tmp = sStr[i];
ddh = tmp / 16;
ddl = tmp % 16;
if (ddh >= 0 && ddh <=9)
ddh += 48;
else if( ddh >=10 && ddh... | 0 |
49378383b2952c9a4d3e80c86eb4299f | 88b1d60f1c1a44bb55141f73f17e3bb5 | initialization without parameters is empty | class A:
def __init__(self):
pass | 1 |
808c3c1d647fee4322e76d107a0dbeac | 4ade8f8f87d360b44999b9ac57bf4f30 | getTotalTime
Returns the duration of the currently loaded audio file. | function getDuration() {
return player.getDuration();
} | 1 |
00068b105dc5fba36a17f5197aa756dd | 69933356132fe61457db23ebae2895da | Computes the system clock accuracy. | class Saturn extends PlanetHECCOnVSOP87
get accuracy() {
return this.private.accuracy;
} | 0 |
2f509f75232ab2c9f68902cc69095c70 | 8fb0b46ae45eb702afd7215319c00ac0 | 随机选择优先级别 | {
let define = [
[35, 1.1],
[32, 1.3],
[26, 1.5],
[4, 2],
[1, 2.5],
[1, 5],
[0.83, 6],
[0.17, 51]
];
let count = define.length;
let total = 0;
for (let i = 0; i < count; ++i)
{
total += define[i][0];
}
let x = Math.random() * total;
let ret = 1;
for (let i = 0; i < count; ++i)
{
if (x < ... | 1 |
ded866bc568dd03f04189c7545206726 | 06bf7938a722c302890ecbde5dfe9b2a | Get the dict representation of the tracker's current status. | class Trial:
def status(self):
output_dict = {
"title": self.title,
"description": self.description,
"fields": []
}
for team in self.teams:
if team == "fence":
name = "The Fence"
value = ', '.join(self.teams[team]["v... | 1 |
56d0c8c18f88d8062fd377c1c83850da | d218017efc1e9a9b06d7bd76bb3887ec | Inserts the object into +self+ at the corresponding position.
(see #insert) | class Headers(collections.MutableMapping, request.Headers):
class _Header(collections.MutableSequence):
def insert(self, index, value):
self._obj._assert_open()
self._sequence.insert(index, value)
self._push() | 1 |
085649cad82127a52bc8cafb5e91c2a2 | 6a537f05efd55bc8a539dbd5c4d8320c | Metoda dodaje element do kolejki z lewej strony.
Pobiera jako argument element, który ma zostać dodany.
Niczego nie zwraca. | if (firstNode == null) {
add(newElement);
} else {
Node<T> tempFirst = firstNode;
firstNode = new Node<>(null, tempFirst, newElement);
tempFirst.prevNode = firstNode;
modifications++;
}
} | 1 |
c57f15b5f215312a844c520722722842 | 1c3e077333faadce40d312b542926454 | string if": `variable` is defined and truthy, else | function FnIf(items: Array<string | IIntrinsic>): IFnIf {
return _fnConditional(items, 'FnIf');
} | 0 |
960a53c286609e46993116362408c424 | ba9296b561ab7c444d751f2b1fbf581f | true when pt has run off the end | class Environment(object):
# Initialize class
def at_end(self, pos):
return self.dist(pos, self.end_loc) < self.ending_size | 1 |
cc8f5fcc50fad631261f77c657013b56 | eeff07e3da593f339fcdfb425dbaf8f0 | timestamp a message and pass it to the parent | void MessageFromParent(char *str)
{
textcolor(RESET, GREEN, WHITE);
printf("%s", str);
ResetTextColors();
} | 0 |
f671fe39573e1b1aadde1447a1d6a5a1 | 1f3df330fef3be494740d8aef9ea1d44 | 获取系统字体 | String osVersion = System.getProperty("os.version");
Font font;
if (isWindows()) {
if (osVersion.compareTo("6") >= 0) {
font = new Font("微软雅黑", Font.PLAIN, 12);
} else {
font = new Font("微软雅黑", Font.PLAIN, 12);
if (!"微软雅黑".e... | 1 |
b740f49b49270500f38c14431ddf0dd5 | e33df7afb7781723cf1efe97903a19bc | Displays Diagnostic Readout on left side once potential symptom is clicked | public class Controller implements DiseaseManager.Listener
public void onClickNo(ActionEvent actionEvent) {
if (!isDiagnosed) queryManager.onClickNo();
if (!isDiagnosed) displayResponse();
} | 0 |
f3b017a6293eb86937b6add7424fb758 | f6eab134716095973feb39be5d1566dc | Класс монстров ближнего боя.
Если игрок дальше их видимости, они ходят вокруг точки спавна.
Если они видят игрока, они идут к нему | super().__init__()
self.image = image
self.image1 = image.copy()
self.rect = self.image.get_rect()
self.rect1 = self.image1.get_rect()
self.rect1.y = -self.rect1.height
self.speed = speed | 0 |
11a0a8cdb361adb6b76dc1ce1606b11f | 132e62f639bc28fa083ad0af217eb39e | Данный метод выводит сообщение об успешной обработке запроса на Result Url.
Вызывается после метода checkTransaction() | $result = $responseInterpreter->getCode($storeContainer);
$this->getTransactionTable()->addNewTransactionValue($this->getWorkingOrderId(), ORDER_TRANSACTION_TYPES_PAGOFACIL_RESULT, $this->getPaymentGatewayId(), $result);
if ('OK' == $result) {
$response = $storeContainer->getConnector()->getResponse();
$th... | 0 |
ed91232bfd9733f3d4f6b2e047e55bea | 3962e0c63150b4ffe9140bd7dcb401a8 | Create new position with clamped coordinates | ret = PositionI.__new__(PositionI)
ret.x = int(x)
ret.y = int(y)
return ret | 0 |
02d733d167f37a1516ccdfbe3b49f7f5 | 7b32039003131e7d0c8074a3bccf4583 | Returns true if the frame is not empty. | final class StackStreamFactory abstract static class FrameBuffer<F>
final boolean isEmpty() {
return origin >= fence || (origin == START_POS && fence == 0);
} | 0 |
5469bb63b95b759ba9e2c0a2237dbb8b | 7d8d3c257650975fc64b9fb77a2097c6 | Setup the Permissions plugin. | def setup(bot):
bot.add_cog(perms(bot))
bot.ext_cog['cogs.perms'] = 'perms' | 1 |
da6cbc2c56dd761e5d31f20e0548518c | 17d7b9f3b91857ef5b69e226cc9be776 | 设置底部栏点击的监听回调 | public class TopBar extends RelativeLayout
public void setTopbarClickListener(TopBarClickListener listener) {
topBarClickListener = listener;
} | 0 |
3f9c3988dc90917e80975120267589fe | 75ee22d00f28b501a2e85295f89b2586 | Extracts the movement onsets and offsets for the current trial | datastore = np.zeros((0,13))
trials = np.zeros((trialids.shape[0],2))
for trialcount, trial in enumerate(trialids):
tarray = data[data[:,9] ==trial,:]
for row in tarray:
if row[1] <=3.2:
starttime = row[0]
if row[1] < 8.8:
rztime ... | 0 |
38f771ee55fee0d4f84a09bc45c0c8ee | 2c0998dca6ea18fbc7d712f4ed7b500d | !
@brief The WSMAN destructor.
Frees the memory and resources used by wsman. | {
if (_watt_fatal_error)
return;
DO_FREE (user_class.data);
DO_FREE (extra_options.data);
DO_FREE (sock);
if (request_list.data != (BYTE*)&default_request_list)
DO_FREE (request_list.data);
#if defined(USE_BSD_API)
syslog_host_name[0] = '\0';
#endif
} | 1 |
21194b0f9c5d1ba2e7ae2a4f695141ea | ffe69358656f414f735f670c208674c3 | Generates a new random <see cref="RsaJwk"/>. | {
KeyId = keyId,
Key = key,
Algorithm = algorithm,
}; | 0 |
6a91b94467f1ede32e07834633b58b28 | 3d20b60e19c0e9b495a29259c060365d | Retorna la imagen de la escala valor | if( num>=0 & num<fotos.size() )
{
if(fotos.get(num).getIconWidth()>d.getWidth()){
float v = getValor(fotos.get(num).getIconWidth(),d.width);
return Disminuir(fotos.get(num),v);
}else if(fotos.get(num).getIconHeight()>d.getHeight()){
... | 1 |
85bcc7ea0ec60a31a1571e38c1c328cd | ea6b3a9182bfbc4fb8019600fa46b511 | Show alert is logged. | {
$bag = $this->app[AlertManager::class]->getAlertBag();
PHPUnit::assertNotEmpty($bag->getAlerts(), 'The Alert Bag is empty');
} | 1 |
d7017b65f173c53bf3062ea341c1e387 | 02ed48cc2372ac874d10624522d636fc | r"""
Get the full path of the log file.
Returns:
str, the full path of log file. | def get_log_path():
return _log_path | 1 |
bdab9a22aa7f59de61bcb88190c350d6 | d1de67822906d368e354db45a2f0c559 | Draw recognized pointing lines | {
cv::line(src, cal_points[0], cal_points[1], Scalar(255,255,255));
cv::line(src, cal_points[1], cal_points[3], Scalar(255,255,255));
cv::line(src, cal_points[2], cal_points[3], Scalar(255,255,255));
cv::line(src, cal_points[2], cal_points[0], Scalar(255,255,255));
} | 1 |
e1cebd59a3142abc9e3b166a6afd8084 | c1ea38c8028d6779e0cee82b7df6e902 | Return enum symbol given string value.
Raises:
ValueError: If `string` doesn't correspond to an enum value. | str_value = str(str_value).lower()
if str_value in str_to_enum:
return str_to_enum[str_value]
else:
return default | 0 |
19d6d564c8dcbd56f3a2b12b1b97eb45 | 7e42824f45b59b47dc5dd0defc184d40 | Gets a reference to a remote observer. | namespace Mercury.Messaging.Runtime
public static class RuntimeExtensions
public static LocalRef GetRef(this RuntimeEnvironment environment, string id, string address, int port)
{
return environment.GetRef(id, new IPEndPoint(IPAddress.Parse(address), port), RuntimeEnvironment.DEFAULT_REMOTE_TIME... | 1 |
e490a822903d977fb506ef5fe397c20a | 35c3c15ec1c20b63470b4afd88395145 | Indicates that the failure was system related. This
could indicate a connection error for example. | class Status:
def failure(self):
return self._hasflag(_lib.JackFailure) | 0 |
7c5906cb7667544f18c7e7572ab5ebe1 | cc8a98d845081e669941b912ddad2868 | Get number of audio streams. | class Streamer:
def num_src_streams(self):
return torch.ops.torchaudio.ffmpeg_streamer_num_src_streams(self._s) | 1 |
9137256cadda8844a507d8d5544b5fff | c9d3d651d18f2dfe466a6328fae6474b | Write a null-terminated string to the current processing context | {
if(!s)
return false;
uint32_t len = strlen(s);
if(!write32(len))
return false;
return write((uint8_t const *)s, len);
} | 1 |
d318d8a8b7e210c2ad24b3fb5e1601f3 | bb44301b5fd7da66d245441b881a2a7e | Gets the current namespace handler. | public class ARPHandlers
public NamespaceHandler getNamespaceHandler() {
return nameHandler;
} | 1 |
49d2705b24c17a157378f27a0cdc628d | 6d18360b7d01180347c5ff93eb280e03 | receives result-call from triple-store and fills the
search-result-DataGrid | rpcService.resultFromSessionServer(new AsyncCallback<ResultSearch>() {
@Override
public void onSuccess(ResultSearch result) {
HTMLPanel html = new HTMLPanel("<div id='partialResult' class='partialContentResult'><h1>Partial Result</h1></div>");
for (GenericKnowledgeClass res: result.getResult()){
Di... | 0 |
5554d2329689bf3d11f794e5a9ab1916 | 5908df1aefbb3a2f504459f850f1ef10 | Starts the completion timer. | {
if (IsStarted)
{
return;
}
IsStarted = true;
try
{
_timer.Change(dueTime, DISABLED_TIMESPAN);
}
catch
{
}
} | 1 |
dbb0da63a7c72949261da89a5bb69850 | 06ef35d86c8739f8a1bb968cab6b93e9 | Method to sign out of GForge. | namespace Sfa.Sfs.Mock.Services
public class FederatedAuthenticationService : IAuthenticationService
public void SignOut()
{
FederatedAuthentication.WSFederationAuthenticationModule.SignOut();
} | 0 |
6fe52ac087d3c01a2dcfbe4963372c43 | 3e2dfd649e154b72ea27c22b1025badb | changes encoding on a shapefile (the only provider supporting setEncoding) | public void exportToShapefile(String shpFile,boolean add)
throws MalformedURLException, IOException, FactoryConfigurationError, SchemaException,
IllegalAttributeException, TransformException {
} | 0 |
28fbeb754815beaff69803d52d2a3816 | 8288be49e1f4a825a2dd0d916ab42756 | 테이블 스페이스 삭제 | @Repository
public class StorageDAOMybatis
public void deleteStorage(String tablespaceName) {
mybatis.delete("StorageDAO.deleteTablespace", tablespaceName);
} | 1 |
225045eee073febcda4e1d8a057eab12 | 35612406e4e320896427a709c1cc3d46 | InitializeConditions for UnitDelay: '<S30>/UnitDelay' | {
{
uint32_T tseed;
int32_T r;
int32_T t;
real_T tmp;
{
SimStruct *rts = RAstudent10_M->childSfunctions[1];
sfcnStart(rts);
if (ssGetErrorStatus(rts) != (NULL))
return;
}
tmp = floor(RAstudent10_P.UniformRandomNumber_Seed);
if (rtIsNaN(tmp) || rtIsInf(tmp)) {
... | 1 |
111ee36ad27d9241884cbd07cca29eeb | 7f61448ad6da3ef0f9cb03f40c5be655 | Meeus 25.a | cases like (1) | 0 |
2d65f8c49f63270b63365184c6d2ce42 | 67e718a1ee7c0bcef0e46e43bdcc6c6a | Will not bubble up any errors in opening devices or traversing the directory. Instead returns | public class FileSystemBrowserWindow extends JFrame
public void traversalError(String message); | 0 |
fa8a027a6bb56e64db205da1c90088f6 | ebfedc7e9b3e7e7d2aa537b108e28265 | Converts the given number of milliseconds to the corresponding timespan object. | namespace ExtensionMethods.Core
public static class DoubleExtensions
public static TimeSpan FromMilliseconds(this Double value)
{
return TimeSpan.FromMilliseconds(value);
} | 1 |
eedc6938464fd095cbd0e3db8d08f1a2 | 7f5afa62daa8f21ab39b4cb4e87df472 | Print the room allocation at Dojo to file. | class Dojo:
def print_allocations(self, file_name):
if len(self.all_rooms) > 0:
for room in self.all_rooms:
print("\n" + room.room_name.upper())
print("----------------------------------------")
names = ', '.join([p.person_name.upper() for p in room.occupants])
print(names)
if file_name is not ... | 1 |
03d3d6f68046a411ea9ea0cfe7aaf1f0 | 86f2af516be4259b033c58bbfc38fdae | Gets a list of all badges in the application | public List getBadgeList(); | 1 |
4b671d72f09989fe7977ff3e69647d2d | 7f6eac9cffc36933f4aba25b4ddf14f8 | Plot the moment as a gouraud-shaded colormap into the reversal curves. | fig, ax = plt.subplots()
im = ax.pcolormesh(bins, bins, rm, shading='nearest', cmap='binary')
fig.colorbar(im)
ax.set_xlabel('To Stress')
ax.set_ylabel('From Stress')
ax.set_title('Cycles')
ax.set_aspect('equal')
ax.grid()
plt.show() | 0 |
b26198c3b54fa62fc4ca089fd5012ef1 | 3e54285430684afa2dc4ab407e50876d | Build announce request according to BEP defined here http://www.bittorrent.org/beps/bep_0015.html | class Torrent:
def announce(self) -> str:
return self.meta_info[b"announce"].decode("utf-8") | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.