query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
df3f02134c7df47507b6f0faf4020bb8 | ff4ec92f594c66edd875c6edfcac9932 | 添加包厢信息 | public int addRoominfo(Roominfo roominfo) {
int result = roominfoDao.insertRoominfo(roominfo);
return result;
} | 1 |
9fef9f54ecb06fdcc228b8a3c3b6619e | 3e6b8d2b535261e1742fd468658f51bd | 通过文件路径反序列化获取类
返回存储文件中的所有对象集合 | public class Serializor
public static <clazz> clazz deSerialize(String filepath,Class<?> clazz) throws IOException, ClassNotFoundException {
byte[] bs=FileOperation.readFile(filepath);
clazz object=deSerialize(bs, clazz);
return object;
} | 0 |
9530d512e245c28d5e500f8531c74392 | badc2cc6a21f65d4df78658def04eb29 | 譜面詳細データの格納 | {
EditorGUILayout.BeginVertical();
{
EditorGUILayout.LabelField("拍子情報");
EditorGUILayout.BeginVertical(GUI.skin.box);
{
EditorGUILayout.BeginHorizontal();
{
... | 0 |
bc30481edaf3c4b309187307564bd35d | 0b90304b2416f5ea36361d0a523c968c | 删除id为1的用户数据 | public class MyTest
@Test
public void deleteUser(){
mapper.deleteUser(19);
session.commit();
session.close();
} | 0 |
3582f9d1e68ca38a7651c619feea35f8 | 20d63e12e072cb77c0ed468a280c1949 | It uses the default error message for "Bad Request". | function badRequest(message) {
this.error(message, 400);
} | 0 |
5d502a439ac19127a457a6436a0b6137 | ba34d5bb307130134e33bf25e45bf5d3 | Validates the clock path. Checks whether the source clock of the clock path
is enabled.
CY_PRA_STATUS_SUCCESS For the valid input configuration.
CY_PRA_STATUS_INVALID_PARAM For the invalid parameter. | {
int Status = XST_SUCCESS;
Xil_AssertNonvoid(InstancePtr != NULL);
return (Status);
} | 0 |
986bc801db99e4b6aae45179a3fbc5aa | afd9c784c61617f77390334060f63404 | アニメーションクリップを追加します。 (レイヤー0 へ追加されます) | {
if (nowClip != null)
{
beforeClip = nowClip;
nowClipPlayable = AnimationClipPlayable.Create(playableGraph, nowClip);
mixer = AnimationMixerPlayable.Create(playableGraph, 2, true);
mixer.ConnectInput(0, nowClipPlayable, 0);
mixer.SetInputW... | 1 |
4171c1d0f3817edd996679f64a155de6 | 7dec32416af1d517a5ce237c59bd7bcb | whenever the file input element changes, parse the file the user selected | file_upload(fileInput: any){
function openfile(evt) {
var files = fileInput.target.files;
fileData = new Blob([files[0]]);
var promise = new Promise(getBuffer);
promise.then(function(data) {
output.innerHTML = data.toString();
console.log(data);
... | 1 |
174889a73961ff96ca169c445a76a621 | e777b49fe154316f32ba2619c019f7d2 | This method was generated by MyBatis Generator. This method returns the
value of the database column TRSDEAL_PROMISSORY_FX.BANK_AMOUNT | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CustomerData", propOrder = {
"customerDirectDebitTermCd",
"customerRechargeLabourRate",
"customerSpvStExposure",
"customerSalesPhone",
"statusRef",
"type",
"customerSpvLtExposure",
"customerAddedDate",
"customerStatusCd",
"cu... | 0 |
9cb9c26a0c3f1a53f2513f6b69cf2a21 | 06ddc445ffec5bfedc3134421033f111 | Creates new patterns according to given parameters | {
if (Pattern::min2Theta==0)
Pattern::min2Theta=0;
if (Pattern::max2Theta==0)
Pattern::max2Theta=175;
if (Pattern::nInt==0)
Pattern::nInt=1000;
if (Pattern::lambda==0){
Pattern::lambda=new double[1];
Pattern::lambda[0]=1.54056;
}
if (Pattern::intStep==0)
Pattern::intStep=(Pattern::max2Theta-Pattern::m... | 1 |
01b42dcb283d1484f605d73b36c0b2ae | 767a7698b04e73809e63ec9793d1c98b | Scope a query to only include enabled rooms. | {
$this->getDbCriteria()
->mergeWith(
['condition' => 'enabled = 1']
);
return $this;
} | 1 |
e5659882001f1e9cb0702840d1f80a7c | 87fcca77c5ec14171c9a26204843afef | Delete a <see cref="StockItem" /> by <paramref name="id" />. | namespace Acumatica.DefaultEndpoint.Api
public partial class NonStockItemApi : INonStockItemApi
public ApiResponse<Object> NonStockItemDeleteByIdWithHttpInfo (Guid? id)
{
if (id == null)
throw new ApiException(400, "Missing required parameter 'id' when calling NonStockItemApi->No... | 0 |
7574a03f8eae0075545d7708df29a52a | 4e830fd194a83b8123d31e3c8dd1375b | The MSP ID of the member that created the transaction | int MM_Txn::GetId() const
{
return m_iTxnId;
} | 0 |
0821d88fb1ccc31d57b2f5662400ad49 | 60beb08af3f6678a6f26b278a991bd25 | Called when the player presses the 'Back' button on the register UI. Switches back to the Login UI | public class StartMenuController : MonoBehaviour
public void OnCancelClick()
{
registerPanelTween.PlayReverse();
StartCoroutine(HidePanel(registerPanelTween.gameObject));
loginPanelTween.gameObject.SetActive(true);
loginPanelTween.PlayForward();
} | 1 |
3520f34706339e837efbf9475012461c | e3a39e51ba887846046be70d43966b4f | 写入最后登录ip 登录时间 | class cls_user{
public function login_write_record($config = array()){
global $uid,$realip,$timestamp;
$config['log_ip'] = empty($config['log_ip'])?tClient::get_ip(1):$config['log_ip'];
$config['log_place'] = tClient::convert_ip($realip);
$config['dateline'] = $timestamp;
M("login_record")->set_data($confi... | 1 |
bc3efaea816958d3149dfdb58a875013 | 09b1d337355a92979e62867ffbc51fdb | Проверяет, дублируется ли телефонный номер в списке | $phones = $person->getPhoneNumbers();
if ( !count( $phones ) )
return true;
foreach ( $phones as $phone ) {
$cur_num = preg_replace('/[^0-9]/', '', $phone->getNumber());
if ( $cur_num == $phone_number )
return false;
}
return true;
} | 1 |
6e1214daf3a6839e65c485832a226722 | cc3d5babb54709bdc378f69540c172f1 | Gets the user's liked movies. | {
Like[] likesByUser = likesCache.Where(x => x.AccountId == user.Id).ToArray();
List<Film> filmsNotLikedByUser = new List<Film>(filmsCache);
foreach (var item in likesByUser)
filmsNotLikedByUser.Remove(filmsCache.FirstOrDefault(x => x.Id == item.FilmId));
... | 0 |
1a79d28ce001a8b73b9e52ad70351903 | 16df55e2ae303102f04a38a4a26f23dc | 한글자를 점자 코드로 쪼개서 리턴함. | runeUserInput := []rune(userInput)
var result [][]string
ptnKorean := regexp.MustCompile(`[가-힣]`)
for _, char := range runeUserInput {
if !ptnKorean.MatchString(string(char)) {
result = append(result, []string{string(char)})
continue
}
choIdx := (char - BASECODE) / 21 / 28
jungIdx := ((char - BASECODE... | 1 |
a7cfbd0e1b3c74793982918d40b65649 | 6c155f27705cce0da088ee2535410017 | Get faq statuses as option array | {
$result = array();
foreach ($this->getFaqStatuses() as $k => $v) {
$result[] = array('value' => $k, 'label' => $v);
}
return $result;
} | 1 |
0bfba5a5aabca9cf623a12af51bd77fa | b457621b6b9991f67ea697e056b64b0b | Handles the Click event of the tsiPhotomatixCommandline control. | namespace Matmaxx.Butchr.UserInterface
public partial class SelectorForm : Form
private void tsiPhotomatixCommandline_Click(object sender, EventArgs e)
{
string helpURL = Path.Combine(System.Windows.Forms.Application.StartupPath,Settings.Default.PhotomatixCommandlineOptionsURL);
System.Diagnostics.Pro... | 1 |
d2722861d9781144dc77e089c49d08e5 | a50266828f471b0c495ea05171c07ce3 | 定义一个方法 把一个字符串转换为int类型输出 | @SuppressLint("SimpleDateFormat")
public class DateFormatUtil
public static int stringChangeInt(String str) {
return Integer.parseInt(str);
} | 1 |
935f3a5c331ff1c2c1e8e6805be34daf | 176b234ed6f6b7d628952b325577f9d2 | 根据查询条件过滤zabbixAgents | List<Auth> filter(Auth auth); | 0 |
8e11bff85c37fd0ee7e88b2bcb18e852 | 7b9412389c00da8798d5543028f38d04 | Function for mapping integers representing CIGAR operations to their single-character abbreviations | def parse_cigar(cigar_str):
ops = 'MDISHNP'
descr = []
op_pat = re.compile(r'(\d+[MDISH])')
descr = [ ( comp[-1], int(comp[0:-1]) ) for comp in op_pat.split(cigar_str)
if len(comp) > 0]
return descr | 0 |
d36990f15e8bf9b186fbfbe27125b003 | 783ffe1093919363c29a4457257eba74 | 满足条件时,将 requests 写入磁盘 | class Scheduler(object):
def add_request(self, request):
if self.request_seen(request):
logger.info('被过滤请求: {}'.format(request.url))
self.filter_request_num += 1
return
self.queue.put(request)
self.total_request_num += 1 | 0 |
bf3fce10f0f76cb2dbbe082cb14fae08 | 0c832b2782ead1ea9d55e71265d00131 | Renders value for console output. | class ConsoleLogger extends AbstractLogger
function inspectValue ($val, $alt = null)
{
return $this->write ($this->getRenderedInspection ($val, $alt))->write (' ');
} | 1 |
40002a14a04c25974eb790ffb1f80119 | 97ca1de86d2ba1acc73a9bfe1dc1400e | Create a unique ID for the client using UUID. | class Client(db.Model):
def generate_client_id(cls):
hashids = Hashids(salt=Client.HASH_SALT)
return hashids.encode(uuid.uuid1().int>>64) | 1 |
52174c6417c165b02a181092ec96ebff | 7db3949898b80a65e1d0acb24266f9e2 | Fonction qui dessine un entier (ici score ou temps) sur le coté de l'écran | void afficher_score(score *s,SDL_Surface *ecran,int valeur_score)
{
SDL_Color black={0,0,0};
char texte[20];
strcpy(texte,"Score :");
char number[20];
sprintf(number, "%d ", s->valeur_score);
s->texte1= TTF_RenderText_Blended(s->police,texte,black);
s->number1= TTF_RenderText_Blended(s->police,number,black);
SDL_... | 1 |
52f80205f1e219c74aee56d8586f9943 | 20c7224eb55d4e3592f0693ae32d5819 | for text that flows right to left (Hebrew, arabic, or whatever you want) | if platform.system() == "Darwin":
return text
else:
reshaped_text = arabic_reshaper.reshape(text)
bidi_text = get_display(reshaped_text)
return bidi_text | 1 |
82ac1ad5fbc9d8281ddbbef44fb8ed1e | 1a647468ad2fe3084525a55adb3297c8 | Record ID of the health data record this file is attached to. | abstract class PMF_Attachment_Abstract
public function getRecordId()
{
return $this->recordId;
} | 1 |
eb2f8d7f7ece3927b8e58c3199518ddc | 7cec4582dde94aa395cd2d66111505d9 | For CompleteTotalAmount TextBox Click Event | {
try
{
this.GetInterestAndPenaltyDetails();
this.CalculateFieldsTotalValue(sender);
this.PayComboBox.Focus();
}
catch (SoapException ex)
{
ExceptionManager.ManageException(ex, ExceptionMa... | 0 |
986d36939ea9a5091b48aed5f3cd87c1 | 55f6d9a79b8ed0b08bd7b10cf1012f6d | 创建有圆点样式的tab | public class CircleIndicator extends View
private void createTabItems() {
mTabItems.clear();
if (mViewPager.getAdapter() == null) {
return;
}
for (int i = 0; i < mViewPager.getAdapter().getCount(); i++) {
OvalShape circle = new OvalShape();
ShapeDrawable drawable = new ShapeDrawable(circle);
ShapeHo... | 1 |
5b565a0cc7c27bb00e7d7a3933f5ba40 | 20b13a91c7d4683d4fb6e6a80f4e9eea | Правило за енергийна стойност на продукта <= зададеното от поребителя:
Премахваме рецептите, които съдържат продукти с по-голяма енергийна стойност от зададената от потребителя: | list_low_ns, lower_ns = self.__find_list_low_ns(cat, name_selected_prod)
substitute, lower_ns, lower_na = self.__compare_additives(list_low_ns, lower_ns)
my_prod_healthier = self.__test_if_healthier(name_selected_prod, lower_ns, lower_na)
if my_prod_healthier[0]:
return True,... | 0 |
fdae7604a37c7f12b69bb4d1944701a0 | a0fed376c954c9f275c0e54ef42b76a9 | Create the configurations that are used by the InstallByShutdown extension if missing. | class ConfigInstaller implements ConfigInstallerInterface
public function installDefaultConfig($type, $name) {
$extension_path = $this->extensionPathResolver->getPath($type, $name);
if (is_dir($extension_path . '/' . InstallStorage::CONFIG_SCHEMA_DIRECTORY) || $type == 'theme') {
$this->typedConfig->clear... | 1 |
29b51a821b9c020978e8fba3c967dbea | e08b3ce683f4a819be776dff0d9337b4 | Appends a byte array to the body of the HTTP response. | namespace Stumps
public class BasicHttpResponse : IStumpsHttpResponse
public virtual void AppendToBody(byte[] buffer)
{
if (buffer == null)
{
return;
}
var newBodyLength = _bodyBuffer.Length + buffer.Length;
var newBuffer = new byte... | 1 |
06aa0635959b84fe38422c87dc05dc8c | b764916c4cc434a69bce0c77c5947aad | Function to calculate the maximum root-to-leaf sum in a binary tree | class Leet124(object):
def max_path_sum(self, root):
max_sum = []
self.subroutine(root, max_sum)
return max(max_sum) | 0 |
26530c0aacb2dd9129b5e77754119c86 | b3ced50918b6b40faccb0ef104f73535 | ! \brief Manage the left speed
This function manage the left motor speed by changing the MOTOR1
phases. The changing phases frequency (=> speed) is controlled by
the timer5.
positive value to go forward and negative to go backward. | void _pwm_out_left_moto(void)
{
push_val_left = car_speed;
if(pwm_val_left <= push_val_left)
{
LEFT_FRONT_PWM = HIGH_V;
LEFT_BACK_PWM = HIGH_V;
}
else
{
LEFT_FRONT_PWM = LOW_V;
LEFT_BACK_PWM = LOW_V;
}
if(pwm_val_left >= MAX_PWM_WAVELENGTH)
{
pwm_val_left = 0;
}
} | 0 |
cef12fae096a112d5949b11efaf57f4e | 96abddd7a595bcbf2a27d69413caf08c | Return files list on current working directory. | final class File implements Api
public function ls(string $arg): Command
{
return new Command(__METHOD__, get_defined_vars());
} | 0 |
7f4d44d24a7cfab73adb2965ca7bd94e | 22936715d70e6c6bfa053c51a8b26a6a | 获取ComposerAutoloaderInit类名称 | protected static function getName() {
return 'auth';
} | 0 |
969757a6ea4c88ad9c0a9db2a76be191 | cc1938adf85b76f009ac9cb4b3b681b2 | Fetches facebook video info | {
$graph = $this->request->createRequest('https://graph.facebook.com/fql');
$graph->url->setParameter('q', 'SELECT comments_fbid FROM link_stat WHERE url = "'.$this->request->url->getUrl().'"');
if ($graph->isValid() && ($info = $graph->getJsonContent()) && isset($info['data'][0]['comments_f... | 0 |
b0d9426f55c716bd0540d65a397ec876 | d05c9e9dc6448fa6d745466202ce7c3a | 回收损毁的防御工事 | namespace Common.PixelTerrain [RequireComponent(typeof(PixelChunkPool))]
public class PixelTerrain : SingletonMonoBehaviour<PixelTerrain>
public void ReduceDurability(Vector2 point, int excavation) {
XYIndex index = PointToIndex(point);
var chunk = GetChunk(index);
int x, y;
PointToPixelIndex(point.x, poi... | 0 |
4cdff534b6dd9f2dfd18622f1bcc207c | f2e04fbedda946a308dc074789d421db | expr : NAME LPAREN exprlist RPAREN | class FormulaParser:
def p_expression_name(self, t):
t[0] = Symbol(t[1]) | 0 |
5a009b4f3992eb08e263812f7619672d | cf98e614569f4de01e3cb5c94065a35f | 活动报名人员清单下载 | function exportActivityApply(query) {
return request({
url: '/marketing/activityApply/exportXls',
method: 'post',
params: query,
responseType: 'blob'
})
} | 1 |
94c387e8ca57d5a46a4529048b3bd833 | 4ae534ad7b1cc9ff6fed02f67effc396 | Check if a page has any answers associated with it | public function hasAnswers(); | 1 |
104d1f2ac8c2eebe9ddd68edf328a406 | 91523178509649bdcb9217288f748536 | 从相册选择识别 | public class MyLocalPrivacy extends BaseActivity @Override
protected void initEvents()
@Override
public void onClick(View v) {
whichImage = "frameNumber";
PictureSelector.create(MyLocalPrivacy.this)
.openGallery(PictureMimeType.ofImage())
... | 1 |
5331b596f4893b7c3d6d723da56ba4ba | 8c57d9e96c0cb6966a3b9fda17b8ba3a | Elimina registro de tarea profesionales. | {
try {
$tarea->delete();
return response()->json(['tarea' => $tarea]);
} catch (\Throwable $th) {
return response()->json(['error' => $th, 'message' => self::MESSAGE]);
}
} | 1 |
23d516deac504fa3a0f44195ba969091 | b3dc7d7c717f368dce324f7bff8917ad | Resets the app code (changes from predefined custom app code to standard MarketSim). | def codeconfig_reset():
new_click(reset)
new_click(reset_yes_button) | 1 |
ec204ab1fdeb7619ecdedbd2985104cb | 70c6a5d300f15fe1fd11aafac46d6d5c | Sets the name of the record field to use as the lookup key. | abstract class BaseController
public function setKeyField($keyField) {
$this->model->setKeyField($keyField);
return $this;
} | 1 |
4f38334263290dd4e992865fa8fbb8e2 | ef79a43ee3a84559469fb445ef2afe02 | The bit length of the subnet assigned to the LocalRouter. This must be in the range [`8`-`29`]. | class NetworkRange(Base):
def BBit(self):
return self._get_attribute('bBit') | 0 |
c4448eac17842685416f5de65ba338c2 | 3ddfc3a64ab6b08dbdfc4d58374faa95 | Respects FlightTask interface, where
NAN-setpoints are of no interest and
do not require control. | class SAOfwif(MC.DeviceReadThread):
def ctrl_set(self, **kwargs):
pass | 0 |
6d02fe2ab45554204d914601c337efd0 | 1a1f25d8838b8305e095fdeff2ae82ee | Получает список матчей и автоматически присоединяется к одному из возможных | class ServerController extends Controller
public function actionGetallmatches()
{
header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
$request = json_decode(file_get_contents("php://input"));
$matches = Yii... | 0 |
8c67f8ea14d101ec6fdb5f1657b44ccd | 7729380763e7839aecfdabf68f7f476a | 베팅을 시작한다. | public playStartBet(){
SoundManager.PlayStartBet();
this.startBetAnim.visible = true;
this.startBetAnim.play(0,false);
} | 1 |
faa30197d95e2fba287d211d95308b8e | ffa8c47b4c3dbbfcd0bd7491fb9ab5ca | Agrega taxonomia a imagenes para armar albumes | {
$model = $this->getModel();
$modeldata = new Data();
$modeldataid_album = $id_album;
$modeldatamime_types = isset($mime_types) ? $mime_types : 'NULL';
$model->save(false);
} | 0 |
59616272028ac89593278bcf53452383 | 589a1665c5f3495e77c28455ad3119d2 | 从模型数组转换为 api 数据数组(静态方法) | abstract class CQueryModel
abstract public function convertModelQueryToNative(array &$data); | 0 |
0ace4e0ff2175601716017c530af5b4c | 3dc0d382092e2bbea746d8ada019bb5b | A function that returns the url for an ohlcv request | class Yahoo(AssetValueProvider):
def get_url(self, symbol):
return "https://query1.finance.yahoo.com/v8/finance/chart/{0}".format(symbol) | 1 |
350ac8d1d9685b30f1eaeb6bdbee8b81 | f0eb42228f9c6b98157e9bc233874182 | [deutsch]
<p>Liefert das koptische Jahr. </p> | java.lang.Integer getYear() throws java.rmi.RemoteException; | 0 |
c2e30d40920989578c638f0a31dbdce2 | c5e846fdf24bab48f5942f395ea2438d | 保存上传产品店铺和站点的默认配置 | namespace BriefShop.Core
bool SaveUploadConfig(UploadConfig configInfo); | 1 |
9aa2b95de158e8390c1873fabcd192a0 | f5cf59ce8587e8bafacd2fa9c5884568 | 射影変換を行う関数 | void VertexShader(Point& v)
{
int f = SCREEN_HEIGHT;
R = mat3(cos(yaw), 0, sin(yaw), 0, 1, 0, -sin(yaw), 0, cos(yaw));
vec3 pPrim = (v.pos - cameraPos) *R;
v.screenpos.x = (f * pPrim.x / pPrim.z) + SCREEN_WIDTH / 2;
v.screenpos.y = (f * pPrim.y / pPrim.z) + SCREEN_HEIGHT / 2;
} | 1 |
07fa30044e2f48b3d879bc1697fef0a8 | 7edd83c39d276ece5315ea8e29a72da1 | MSH | namespace transFormat
class P_ORU_R01_25
private void parseMSH(NHapi.Model.V25.Message.ORU_R01 mORU_R01)
{
Console.WriteLine("MSH-1\t" + mORU_R01.MSH.FieldSeparator.ToString());
Console.WriteLine("MSH-2\t" + mORU_R01.MSH.EncodingCharacters.ToString());
Console.WriteLine("... | 1 |
ce6eecc90888e4ece193ee63530ecbee | d3ab01c6088c5e66ca639be1bfa3290a | 显示提示信息的函数,txt是内容,t是显示时间 | msgto = "我:" +time.strftime("%Y-%m-%d %H:%M:%S",time.localtime()) + '\n'
b=str(msgto).split(":",1)
c = text_msg.get('0.0', END)
text_msglist.insert(END,msgto)
text_msglist.insert(END, c)
text_msg.delete('0.0', END)
b.append(c) | 0 |
d7092b42dfeb92d2f06abbff75a46360 | 8a70b366de2afbd960e2e42db5359973 | Allows the commercial settings to be set. | class Lease extends AbstractDocumentHolder
public function setCommercial($commercial = null)
{
if (!is_null($commercial) && !is_bool($commercial)) {
throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($commercial)), __LINE__);
}
... | 1 |
2d198d1d5659d7e881f1020d01c36468 | 0e35562321f2dc0da0eebe27b517f924 | Метод для форматирования даты из unix timestamp в формат mysql | class HelpFunctions
public static function dateToMysql($date, $format = 'd.m.Y')
{
$curDate = DateTime::createFromFormat($format, $date);
return $curDate->format('Y-m-d');
} | 0 |
43cc082fcbedeb6c747f2d3082e07179 | 00f0536716f83b3997bfde37a6192835 | 进行用户登录、注销等操作 | class UserOperation(object):
def __init__(self):
pass | 0 |
bc3e92d4b24de05950a7702fc4459c64 | b0d5fe8f73f7117199798015b4c761cc | Read a piece of message from the shell. | class Bot:
def read(self):
return self.s.recv(1024) | 0 |
99916fe35db444f2d8a3bb6c195a92c0 | e0b7db18511dc02bb76c093afd046e34 | Simple call of "fn:trace" function with integer value. . | void CallWithInt(int32_t arg) {
} | 0 |
5fd11449f2dafb4c11b62d586d55459f | dd21afad2c8b514e2da9f52095657c05 | Zwraca implementacje funkcjonalności podglądu zaszyfrowanych danych (dostarcza dane do wyświetlenia w GUI). | def get_cipher(backend, stream):
raise NotImplementedError | 0 |
fa3c4f590e08dd272255b63f0c30b075 | 54c2ce25257448a98c9229e4d0fda8db | Run RPCA on data | ar_name = ar.get_filename().split()[-1]
if args.bandpass:
patient = calibrate_bandpass(ar)
else:
patient = ar.clone()
patient.pscrunch()
patient.remove_baseline()
patient.dedisperse()
data = patient.get_data()[:, 0, :, :]
if np.count_nonzero(data) == 0:
pr... | 0 |
7785f139f3c6dd7fba2a80e1c2dfb952 | 45d2f0bcf3df3d8a3f380375708c3ebf | Teleport player back and reward | {
StartCoroutine(StartPreLootScreenVisualEvent(50));
yield return new WaitUntil(() => PreLootScreenEventFinished() == true);
CharacterRoster.Instance.RewardAllCharactersXP(50);
DefenderManager.Instance.ClearSelectedDefender();
SpellInfoBox.Instance.HideInfoBox();
Worl... | 0 |
c959e69e0d4c0918a23e648a90143cf4 | 3f21f6128b6aa99c556dcc66ff2419e9 | Sets whether to show the active records only.
if true only the active records are shown | {
$criteria = new CDbCriteria();
$criteria->compare('isActive', $isActive ? 1 : 0);
$this->getDbCriteria()->mergeWith($criteria);
return $this;
} | 1 |
3cb974a078733dd59b2d29c076e0f23e | 154c90ca0f8ffb35b48c9f6d2996faa9 | Plays the next music of the playlist | public class ControlFacade
public void playNextMusic() {
this.musicControl.nextMusic();
} | 1 |
b1f2aadf52f8ab27c2af27c0d9c90b4c | a5d9ae563aac1a8cfefe4019284d7289 | Método para listar estufas. | {
$pagina = ($request->get('page')!=null)?$request->get('page'):1;
$pagina--;
$pagina *= 10;
$estado = $request->get('estado');
$estantes = Estante::buscar($estado);
$activos = Estante::where('estado',true)->count();
$inactivos = Estante::where('estado',false)->count();
... | 0 |
55ab6346223c5dd8d4ef601f56e817c8 | bfdc5ae2298f6ed93e69e1cfc04d9d14 | Verifica se eh equilatero # | def esEquilatero(lado1, lado2, lado3):
if lado1 == lado2 == lado3:
return True | 1 |
4c9fca39808f8fa68d8666dfbf794fb1 | 12faa926dffcbc2e4dcbcfbc83370a22 | Sets the modified time of this office supply application. | public void setModifiedDate(Date modifiedDate); | 1 |
0706d39ad8beaf7091aa9ed93345bdfc | 6fbfaf222b308e9e298cb078cc706033 | Annualized standard deviation | sdDF = pd.DataFrame()
for asset in dfDict:
sdDF[asset] = dfDict[asset]["Returns"]
return sdDF.std()*np.sqrt(252) | 1 |
bbf72baabcb63755791ae1d8fd8dc8df | a2eb101bda55431803b2b80c3132a088 | Gets the minimum required PHP version for this plugin. | public function getMinimalPhpVersion(); | 1 |
dcf5e9968f5af31ade06b5bbf2a91416 | 71a46857ad60c4ab340a57f5cbc837ad | fonctions à nombre de paramètres <strong>nommés</strong> non fixés | def fonction_bidon(*_, **__):
return None | 1 |
10f30a7d0cfcab19c83c9e5ac4870294 | 4847c8910c237242c554f68b7d14879f | 扫描某一个IP的某一个端口 | public class Scanner
public static void scan(String ip, int port){
poolExecutor.execute(new ScanJob(new ScanObject(ip,port),ScanEngine.TCP_FULL_CONNECT_SCAN));
} | 1 |
3e83880821123e8441161f83bf76b6db | 02fc1652a4e1d2acde6cdb128a5f42dd | 修改最大投票数 | function setvotecannum(){
$votecannum=isset($_POST['votecannum'])?intval($_POST['votecannum']):0;
if($votecannum==0){
$resultdata=array('code'=>-2,'message'=>'每个人可投票数大于0');
echo json_encode($resultdata);
return;
}
$wall_config_m=new M('wall_config');
$data=array('votecannum'=>$votecannum);
$result=$wall_con... | 1 |
18caab0d7ac3266dffd19eb1b8cd7582 | b76a06b49f3fb7a99ef714a15d63224a | This method will be used get the Interim Tests based on the Logged In
User. | public static partial class DataProvider
public static List<TestTaken> getTestsTaken(int userId_in, out string error_out)
{
List<TestTaken> allTests = new List<TestTaken>();
TestTaken test = new TestTaken();
SqlDataReader reader = default(SqlDataReader);
error_out = successString;
... | 1 |
df2b840bb9767be3744889546d721a65 | 91a57cd1284d922fa1cf448c1ce27da2 | 向下滑动时相关效果
页面滑动未超过200px时,页面向上滑动元导航慢慢消失,新导航逐渐显示,页面向下滑动,原导航逐渐显示,新导航消失。滑动页面滚动超过200px时新导航固定顶部。 | onPageScroll(options){
const scrollTop=options.scrollTop;
const flagShow = scrollTop >= 800;
if (flagShow!=this.data.isShow){
this.setData({
isShow: flagShow
})
}
const flagTab = scrollTop >= this.data.tapScrollTop;
if (flagTab != this.data.isTapFixed){
this.setData({
... | 0 |
8c0a6acfe761496fabbbd5cecfe0a2c9 | 135b511bb4d7f593a685986139564e1d | Resolve selection as string to list of indicies.
Selections are expected to have pandas.DataFrame.query-compatible
syntax, e.g., ``` "event_no % 5 > 0" ``` Selections may also specify a
fixed number of events to randomly sample, e.g., ``` "10000 random
events ~ event_no % 5 > 0" "20% random events ~ event_no % 5 > 0" `... | def parse_array_index(opt_indexes: Optional[Union[int, str]]) -> Union[int, slice]:
if opt_indexes is None:
return slice(None, None)
if isinstance(opt_indexes, str):
if not re.match(r'^\d-\d$', opt_indexes):
raise FireError("Select range must contain numbers divided by dash, for exam... | 0 |
3365fe50cd1fa102ebc82b9f6ec26af6 | 14cc8bf8dae36c0e0dfdc3f69b4d5fe2 | Event handler which activates when the toggle is being left clicked in order to toggle it 'On' or 'Off'. | function onToggleButtonClick()
if toggle then
methodToggle.Text = "Disabled"
else
methodToggle.Text = "Enabled"
end
toggleSpyMethod()
end | 1 |
541a6a9d7c2359197c4c1bde6379d9fc | 625ca9c2499f5fe0957849c2017547e7 | the terminal in raw mode is resumed; our function is to restore the terminal
to raw mode. | static void disableRawMode() {
tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
} | 0 |
542dc0fd0b913a789cea3d6f2098ce58 | 30a30276e5812e5bee100b058adedf66 | Creates a new validator to check if the e-mail address is available. | namespace Coders.Web.Extensions
public static class ValidatorExtension
public static IRuleBuilderOptions<T, string> UserUniqueEmailAddress<T>(this IRuleBuilder<T, string> builder)
{
if (builder == null)
{
throw new ArgumentNullException("builder");
}
return builder.SetValidator(new UserUniqueEmailAdd... | 1 |
19add6d8bf947288734126cc3afb3624 | 3a8fb4beea825bd3f50b978e0306b110 | Do two usernames map to the same SID? | {
return !(
($tenantA->first_name === $tenantB->first_name && $tenantA->last_name === $tenantB->last_name) ||
($tenantA->first_name === $tenantB->last_name && $tenantA->last_name === $tenantB->first_name)
);
} | 0 |
fa1a1296dad567190a76cb3b1b739732 | ec9a5801b5e7c1bde35bf750097c5223 | 根据zid获取信息 | class App_Model_Goods_MysqlPublicGoodsStorage extends Libs_Mvc_Model_BaseModel{
public function findGoodsByYzid($yzid) {
$where[] = array('name' => 'g_yz_itemid', 'oper' => '=', 'value' => $yzid);
$where[] = array('name' => $this->_shopId, 'oper' => '=', 'value' => $this->sid);
return $thi... | 0 |
d1da4ceffa6c12a943fa767764ca4c5d | 4bed113191d020a243b50ccb94f8f6a5 | 根据flag获取不同申请下需要显示的设备 | function getCheckedDevice(dxtree) {
if(dxtree.getAllChecked()!="0.1")
checkedDevice = $.map(dxtree.getAllChecked().split(","), function(itemId) {
var sceneId = dxtree.getUserData(itemId, "sceneId");
var deviceId = dxtree.getUserData(itemId, "deviceId");
var deviceName = dxtree.getUserData(itemId, "d... | 0 |
f99846cbb495f28e1cd81e2d152f0367 | 9c25a418b699f322408f5e25896d7f8b | Maximizes this instance. | namespace TerraFX.UI
void Maximize(); | 1 |
f95af025347951e265645006bad92e3c | 5fc7745aabaef74dc7e37904f88ce6ea | Sums even numbers | def sum_even_values(*nums):
return sum(i for i in nums if i % 2 == 0) | 1 |
64dad6227db32241e4117336700fd1ff | 4d7ff9b4f65102f62c4041e99abb065b | Returns the global property name for the given element type using the information provided. | namespace XmlSchemaClassGenerator
public class NamingProvider
: INamingProvider
public virtual string PropertyNameFromElement(string typeModelName, string elementName)
{
return typeModelName.ToTitleCase(_namingScheme) + elementName.ToTitleCase(_namingScheme);
} | 1 |
ac86d285f5bc9047a655ece0626300b9 | 6ebd5f532fba81a05a7cbfb544018ce3 | fills in stop and route info for the primary test stop | stop_data = get_stops(stops_payload, stops_url, stops_req_fields)
stop_data = get_full_stop_info(stop_data, routes_payload, routes_url)
return stop_data | 1 |
e231055ad01a6a86a3660d5b50c52f9d | 157f0db40a2eaf9d8f53a99fa4ea2689 | Переименовать кнопку | function ecs.rename(mainPath)
local name = fs.name(mainPath)
path = fs.path(mainPath)
local inputs = ecs.universalWindow("auto", "auto", 30, ecs.windowColors.background, true, {"EmptyLine"}, {"CenterText", 0x262626, "Переименовать"}, {"EmptyLine"}, {"Input", 0x262626, 0x880000, name}, {"EmptyLine"}, {"Button", {0xbb... | 0 |
69cf09e8f0b96e76abd00e8a204233c9 | 2384d5c473146cc48ce673080a51290c | elimina un grupo de la lista de grupos del usuario | class User extends LBTObjectBL
public function deleteGroup($idgroup, $user) {
$this->persistence->user = $user;
$this->persistence->deleteGroup($idgroup);
} | 1 |
ef277f0e5494b0d4daea259784b97429 | d045ee6c9b0b097dc43dcc269b656061 | Returns the address as a 64-bit integer. | namespace System
public long ToInt64()
{
return (long)ptr;
} | 1 |
b10dafd60570207c0f738ae2c5c3e95d | 87d75c0dddc2c348f4cc2d034e323345 | Constructor del servicio de actuacion | {
$this->actuacion = $actuacion;
$this->actuacionTipoEstado = $actuacionTipoEstado;
$this->actuacionDocumento = $actuacionDocumento;
} | 0 |
3d92fa8c66244f583cf458d2afc56edf | c52baa358f831781b3a3f313f0132780 | @brief Configure PLLSAI. | {
RCC_OscInitTypeDef RCC_OscInitStruct;
RCC_ClkInitTypeDef RCC_ClkInitStruct;
RCC_PeriphCLKInitTypeDef PeriphClkInit;
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_MSI;
RCC_OscInitStruct.MSIState = RCC_MSI_ON;
RCC_OscInitStruct.MSICalibrationValue = 0;
RCC_OscInitStruct.MSIClockRange = RCC_MSIRANG... | 1 |
132643c9e5729dae712b0ff0f5741b99 | 0c5763b086d846255673cba3dc54fca4 | Extract the last token of each padded sequence, given its length | class lstm_model(nn.Module):
def last_output(batc_size, out):
lengths = [len_seq for i in range(batch_size)]
idx = (torch.LongTensor(lengths) - 1).view(-1, 1)
idx = idx.expand(len(lengths), out.size(2))
time_dimension = 1
idx = idx.unsqueeze(time_dimension)
if out.is_cud... | 1 |
9464bf267106f27adf008c2c248f5a01 | 452ea3d9d0450b8b0227d474376157c5 | Return whether this Node has a builder or not.
In Boolean tests, this turns out to be a *lot* more efficient
than simply examining the builder attribute directly ("if
node.builder: ..."). When the builder attribute is examined
directly, it ends up calling __getattr__ for both the __len__
and __nonzero__ attributes on i... | class Node(object):
def __nonzero__(self):
return bool(self.children) | 0 |
3520717783e90ef88018a4fd7348e913 | 015da8048e43470d839fba9f903c9a93 | Faces a turtle northwards | turtle.fd(50)
turtle.rt(60)
turtle.fd(50)
turtle.rt(60)
turtle.fd(50)
turtle.rt(60)
turtle.fd(50)
turtle.rt(60)
turtle.fd(50)
turtle.rt(60)
turtle.fd(50)
turtle.rt(60) | 0 |
be9e2790d80917eec44bec845d829fe1 | 8ec523f1448d793516f3433412e3c408 | 查询一个目录是否可以被改变权限 | public class FileSelectActivity extends FragmentActivity
private boolean isDirCanUsed(File file){
return file.exists() && file.canRead() && file.canWrite();
} | 0 |
e48fec9346f518cb98bbc23e6d085b38 | 609582b0186c48b31e341e0cd6364bf9 | volume saving utility for masked volumes | def affinitize_mask(msk, dst=(1,1,1), dtype='float32'):
msk = check_volume(msk)
ret = np.zeros((3,) + msk.shape, dtype=dtype)
(dz,dy,dx) = dst
assert dz and abs(dz) < msk.shape[-3]
if dz > 0:
ret[2,dz:,:,:] = (msk[dz:,:,:]>0) | (msk[:-dz,:,:]>0)
else:
dz = abs(dz)
ret[2,:... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.