query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
856428cc8c09d05b72550cc7bb684d04 | 80dcadb39426edfe9287bac62bb5d6ae | Make sure error is raised if two potentials have same label | class TestDualDashGraph(unittest.TestCase):
# pylint: disable=protected-access, too-many-public-methods
def test_differnet_graphs_error(self):
self.assertRaises(ValueError, DualDashGraph, graph_one=self.mst_graph3, graph_two=self.almst_graph4) | 0 |
7c482d5c5b80c37b4241c30022b0317e | 8257093910439f5dc70fafc7db424c14 | Reads a token from disk. | class Vehicle(object):
# Represents a Ford vehicle, with methods for status and issuing commands
def readToken(self):
with open(self.token_location) as token_file:
return json.load(token_file) | 1 |
2d46eb884b0f8125a68726f06ee3befd | 95cbd2297f4ed7ebaa6802d697ce8d4c | 预览连词成句 | namespace HeraDMS.Layouts.HeraDMSSite.Pages.AddWaterImage
public partial class AddWaterImage : BasePage
private void WordPreview()
{
if (!String.IsNullOrEmpty(tbWord.Text.Trim()))
{
string family = ddlFamily.SelectedItem.Text;
string size = ddlSize.Sel... | 0 |
9ebdd9d8cee113224131a373c02d0136 | c3623260efb052a412c170c015801485 | 转换modbus对应的数据类型 | {
try
{
switch (dataType)
{
case ModbusDataType.Bool:
return BllResultFactory<byte[]>.Sucess(reverseBytesTransform.TransByte(Convert.ToBoolean(value)));
case ModbusDataType.Short:
... | 1 |
949f7884d16ba1180eafb15bcecf815f | a940582e8f65f095debf5705598bf6bf | 图片缩放中间件 | let searchStr = '?imageslim'
let replaceStr = `?imageView2/1/w/${width * 2}/h/${(height || width) * 2}`
if (!picUrl) {
return ''
} else if (picUrl.indexOf(searchStr) === -1) {
return picUrl + replaceStr
} else {
return picUrl.replace(searchStr, replaceStr)
}
} | 1 |
b441179b6cdfacd5102f03eda0886266 | da1061a3309c38256b86c07f0fd126b4 | 清空遍历所有textarea文本 | function clear () {
var tag_list = ($('#message').val().match(/#[a-zA-Z0-9]+/g, '#')!=null)? $('#message').val().match(/#[a-zA-Z0-9]+/g, '#'): [];
var str = tag_list.join(' ');
$('#message').val(' '+str).focus();
$('#message')[0].selectionStart = 0;
$('#message')[0].selectionEnd = 0;
resizeMessageTextarea(... | 0 |
ac1b6c15baa91c855d5a0c215101c107 | b0ecf0285a2f30c08924bd21d4cdf31d | Uses the new privacy budget API where clients specify aggregation budget and partition selection budget separately. | scope: Optional[pulumi.Input[str]] = None,
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetBudgetResult]:
... | 0 |
e87325330fb4f8b3d412bab95525222b | 72dcebdcdb004e1aefce234b51f1b7de | 清除右边和左边所有空格 | {
var end = false;
var ch;
while(!end)
{
if (str.length == 0) break;
ch = str.charAt(0);
if (ch == ' ')
{
str = str.substring(1,str.length);
}
else
{
end = true;
}
}
end = false;
while(!end)
{
if (str.length == 0)
{
break;
}
ch = str.charAt(str.length-1);
if (ch == ' ')
{
... | 1 |
044295e76b794e74a1a61be0cfbfaf40 | a0cfae24a87022f0c0e4762bc5215944 | Реализация булевого оператор ИЛИ | namespace Assets.Scripts
class LogicController
public static bool Conjunction(bool a, bool b)
{
return a & b;
} | 0 |
83ddea7d153e829c545ec4b46367cc33 | 044deb5d1ded5a2c61fa3fb7e467334e | Gets the data object for an AfterPay capture request. | class CaptureRequest extends SoapAbstractRequest
public function getData()
{
$this->validate('transactionReference');
$data = parent::getData();
$data['paymentOrderKey'] = $this->getTransactionReference();
return $data;
} | 1 |
eb90cc2e7eb6c839520f6b16ba68d2d6 | f64ca8c23bf8f7e70651058dc90a8228 | Sets the values of multiple bits, starting at the specified index. | {
for (int i = 0; i < length; i++)
this[startIndex + i] = (b[i / 8] & (1 << i % 8)) == 1;
} | 1 |
d8921d01490d3c433742db732e7cfb44 | 02117af335791e3fc242ed5d42d7a373 | Square wave oscillator. | float32_t sig, saw_1, saw_2;
float32_t transition_table_index;
square->phase_1 += square->phase_step;
sig = ((((float32_t) square->phase_1 / 2147483648.0f) + 1.f) * .5f) - .5f;
transition_table_index = sig * (5000.f / square->freq);
if (transition_table_index > .5f) transition_table_index = .5f;
if (transition_... | 1 |
e1ea67f4229af378b8bfd5183d2a4564 | 6e62619bd08835d50c02dedbf80a229f | Удаляет заявку на покупку книги | namespace Trainee.Catalogue.Abstraction
void DeleteBook(int id); | 0 |
d8b36d88d6c174ddbebfd313b1c8c09e | 9219e81a4cbbe18741055c3260ace8f1 | For a given value and sqaure, clear all instances of that value in that square | void clearBit(u64 &bitBoard, int sq){
bitBoard &= clearMask[sq];
} | 0 |
6db2099aafc395667d934ce404a8b37f | 5062520afdfef48e5ecc6eddb4a95cf9 | 查询coupon_copy表所有数据 | public class CouponDaoService
public List<Coupon> getAllCoupons(){
CouponDao dao =openReadableDb().getCouponDao();
return dao.queryBuilder().list();
} | 0 |
9a8543a0c10237e3e9a695d5693047f0 | d3f60fa7fab5c1781ea05732c33d3745 | Script to make a contour plot of a dataset from an HDF5 files of several
scans combined. | clims=None,num_levels=41):
plt.figure()
plt.suptitle(hdf_file_name)
hdf_file = h5py.File(file_path + hdf_file_name,'r')
mask = np.isfinite(hdf_file[x_variable])
triang = tri.Triangulation(hdf_file[x_variable][mask],
hdf_file[y_variable][mask])... | 1 |
112dd06ca6f7eed812128acd4378f470 | ea623e6c643d098130af6010c7923ab8 | Is the session allowed to create SubjectivePredicativeComplement instances? | boolean allowCreateSubjectivePredicativeComplement( CFSecurityAuthorization Authorization ); | 1 |
194684bbe6cb55b8a5e62231615e73df | 0610f7f99231d1d8b223767fc9f5fe56 | تبدیل تاریخ میلادی به شمسی
با قالبی مانند 1395/10/21 | {
try
{
return PersianDateTime.MiladiToShamsi(Utility.ToString(miladiDate));
}
catch (Exception ex)
{
throw new BaseException(ex.Message, String.Format("Utility.ToPersianDate({0})", miladiDate), ex);
}
... | 1 |
b06a03d058f5ade6b4cae582d282c4c2 | caacaac52ce38d48a32af63166b94f25 | randomly rotate all cubes | for (let i = 0; i < cubeArr.length; i++) {
cubeArr[i].mesh.rotation.x += 0.015;
cubeArr[i].mesh.rotation.y += 0.015;
}
} | 0 |
b2fe2e7ee5e43339cd901da78e697da5 | 1fd37e36044fc2efd710a50a51cd766d | weight stanzas by number of lines | ind=argmax([abs(a[2]) for a in st])
if st[ind][2]<0:
for i in range(len(st)): st[i][2]*=-1
return st | 0 |
2cb8cd27d2a5cf5a9c3a9e30581af41d | 85ebb38197515b95578e39cc36d782d2 | Message for why the product is disabled. | $class = 'notice notice-error is-dismissible';
$buy_kallyas_url = 'https://themeforest.net/item/kallyas-responsive-multipurpose-wordpress-theme/4091658';
$buy_link = sprintf( '<a class="button button button-primary" href="%1$s" target="_blank">%2$s</a>', $buy_kallyas_url, __( 'Get Kallyas theme from here', 'zn_be... | 1 |
7b6d0a0de5d86f4e2081df69ef00b79b | 8c8acf3add9ec431e5118c2529c958c2 | Compute the number of bytes that would be needed to encode a {@code fixed64} field. | namespace Google.Protobuf
public sealed partial class CodedOutputStream
public static int ComputeSFixed64Size(long value)
{
return LittleEndian64Size;
} | 1 |
6695a1f41f7da5c29fa5af3ff9249fe8 | 5e32134037cf3ed66090d84a2927add1 | Get the plotting order of each technology as specified in the
viz_technologies db table. | {
$this->authorize('index', Technology::class);
return Technology::orderByRaw('LOWER(name) ASC')
->orderByRAW('LOWER(version) DESC')
->get();
} | 0 |
227697418a397267e4f5d81ea22b95d2 | b7102c9bd93a789b131881fbdbea4cbf | Hide x-axis gridlines. | public void hideAxes(); | 0 |
326753dc4144c133d824a959032b4ef1 | ff102d56e80e7406990a958a2d3d6ed4 | Method to add ospf_redistribute to the vrouters. | public class CXDriveService extends CXPtnDirveService implements CXDriveServiceI
public void createAndUpdateOSPFRedistributeObject(OperationObject operationObject, CXActionObject cXActionObject) {
CXNEObject cXNEObject = cXActionObject.getCxNeObject();
CXDriveUtilObject cXDriveUtilObject = new CXDriveUtilObject();
... | 1 |
02a61ef4c37d72841ec8063fb80ce452 | d643538399c72180eaeabee06bafbbd8 | Set new company for this person.
Setting this for non-existing company shouldn't be possible. | if self.parent is not None:
if self.parent.company != self.company:
error = 'Cannot assign parent department outside current company "{0}".'
raise IntegrityError(error.format(self.company))
return super().save(*args, **kwargs) | 0 |
dbf7b0f3ae79472382f9aa1367e7fa08 | d77aad098b39c03b23bf7e4cc849e385 | Check if the file is valid. 403 for unreadable, 404 for not found | def check_valid_file(path, uuid):
try:
get_header(path)
return True
except (IOError, ValueError):
handle_deleted_file(uuid)
return False | 0 |
e76a8cfcfe926d787115426bf3f9a79f | e120b30a6920b083f574c996c573614c | recursively gather up the nested arrays into sets | {
$result = new \ArrayIterator();
$this->flatten($result, $set);
return $result;
} | 1 |
9498a7965ded65d94d394368dfb09789 | 399f2b547c45fdd9024b0431de5cdab5 | login controller is singleton | LoginController.parent.constructor.apply(this,
[$scope, I18nService]);
var vm = this;
vm.initController = function(directErrors) {
LoginController.parent.initController.apply(this, arguments);
FormValidatorService.assignServe... | 0 |
3b6504a8bbb88f19810a057065d61b26 | aa420a76dbba0e45f6520ac0714b24de | list or watch objects of kind HorizontalPodAutoscaler | export class AutoscalingV2Api extends runtime.BaseAPI
async readAutoscalingV2NamespacedHorizontalPodAutoscaler(
requestParameters: ReadAutoscalingV2NamespacedHorizontalPodAutoscalerRequest,
initOverrides?: RequestInit,
): Promise<IoK8sApiAutoscalingV2HorizontalPodAutoscaler> {
const response = await this.... | 0 |
b91417f37819325d605d677d8d5943dc | 2ba08c44d8276f1e7694fe3339826624 | Extract the right parser and the corresponding
options table, for (pre|in|suff)fix operators.
Options include prec, assoc, transformers. | def get_fix_parser(parser=None):
if parser is None:
parser = argparse.ArgumentParser(description=FixTool.__doc__)
elif hasattr(parser, 'add_parser'):
parser = parser.add_parser(
'fix',
description=FixTool.__doc__,
help=_summary_line(FixTool.__doc__))
parse... | 0 |
170cc16cb8f3aa8e00c26cf2c608be7a | c1731a3f6b40b08edc3df28409a6a1a5 | Vrátí základní fieldset pro detail jazyku na základě číselníku | class PluralVariants extends FormElementBase
protected function getTranslationElement(LanguageInterface $translation_language, $source_config, $translation_config) {
$plurals = $this->getNumberOfPlurals($translation_language->getId());
$values = explode(PoItem::DELIMITER, $translation_config);
$element = [
... | 1 |
bc393a8de623b3f100ff6d8ad5b21b35 | 4348e0abf8bac6c48c857aec3dd113a2 | 注销滚轮事件方法 | function initMouseRollerEvent() {
mouse.delRoller = 0;
function scroll(e) {
e = e || window.event;
e.wheelDelta = e.wheelDelta || e.detail;
mouse.delRoller += e.wheelDelta / 10;
}
if (document.addEventListener) {
document.addEventListener("DOMMouseScroll", scroll);
}... | 0 |
741727ffcb280f61776a47387a9bcd0c | 57d84f317c1f59c69e8d27ac5141aba3 | Filter bookings by specific date | public Set<BookingDTO> findByBookingsInDate(LocalDate localDate) throws BookingNotFoundException {
List<Booking> bookingList = bookingRepository.findByTour_TourDate(localDate).orElseThrow(
() -> new BookingNotFoundException(NO_BOOKING_FOUND)
);
Set<Booking> bookingSet=new Has... | 1 |
5a6dbc8d626109d4ba5690df91c6b1ec | 9d6ba057f1b55f35665908361774c161 | Sets up the button text on static and non-static image caption shortcodes. | parent::__construct( $manager, $name, $args );
$this->l10n = wp_parse_args(
$this->l10n,
array(
'upload' => esc_html__( 'Add image', 'butterbean' ),
'set' => esc_html__( 'Set as image', 'butterbean' ),
'choose' => esc_html__( 'Choose image', 'butterbean' ),
... | 1 |
000332a7d17b07b8fa6259f224b750b7 | 79465ce3a5eff7dfd0d10e74a74194e2 | gets the best trading option for a card | winning_pos = board.leader_pos
winning_card = board.cards_played[0]
if board.cards_played[0].suit == 'null':
board.cards_played[0] = b.card('nine', 'clubs')
board.cards_played[0].set_trump(board.trump_suit)
for i in range(1, len(board.cards_played)):
c = board.cards_played[i]
if not c.istrump and c.suit != ... | 0 |
7a12c96c0d98d955331771d57a43360e | 8802b8862864eafc99031e9f0d63bd51 | Verifica los RUC del importador y del despachante Retorna la denominacion de cada uno | public class PagoAduaneroTributoActionDefault extends TechFormAction implements PagoAduaneroTributoAction
@Override
public Event verificar(RequestContext context) {
PagoAduaneroTributoCommand command = (PagoAduaneroTributoCommand) getFormObject(context);
VerificarPagoAduaneroTributoRequest request = this.crearRequ... | 1 |
fb736e452e8baf4b61e477d0757c2e8b | ac03ad10c950f4415d7c9fd19d761a8e | Detaches all children of this SOAPElement.
This method is useful for rolling back the construction of partially completed SOAPHeaders and SOAPBodys in
preparation for sending a fault when an error condition is detected.
It is also useful for recycling portions of a document within a SOAP message. | namespace DigitalPlatform.Marc
public class ChildNodeList : MarcNodeList
internal void clearAndDetach()
{
foreach (MarcNode node in this)
{
node.Parent = null;
}
base.clear();
} | 0 |
8679ff1932e5b176b7935835f8a6e383 | 2d8f9d1dd27bfb35e6d204e595c75f1c | Runs the fitting process and returns all found parameter values. | {
var parameterSets = CartesianProduct(m_parameters);
var parameterIndexToResult = new ConcurrentDictionary<int, OptimizerResult>();
if (!m_runParallel)
{
for (int index = 0; index < parameterSets.Length; index++)
{
... | 1 |
0b1786574a60d9bcc5120067e9573256 | 636cd4ced16278af77a0f6d3376bff25 | Metodo para mostrar la ruta entr 2 puntos del mapa | {
try
{
string path = db.configuracion_inicial.Where(x => x.id == 2).First().val_configuracion;
return path;
}
catch { return ""; }
} | 0 |
c10868b3abe0975b9f129b86a22ab33b | 142e0a8c908f3fcd970dd91a9ca4e658 | Get an accessor for this configurations armaments.
Iterator of the configurations secondary weapons. | Map<String, StringProperty> weapons = new LinkedHashMap<>();
weapons.put("Primary:", primary);
weapons.put("Secondary:", secondary);
weapons.put("Tertiary:", tertiary);
return weapons;
} | 0 |
8520835e347f5a845b04ace781b9b9b6 | 9093a77e6756b61641e25e925c30f9f9 | Revert a normalised value to inital scale | namespace BrightWire.Models.DataTable
public class DataTableNormalisation
public class Column
public object ReverseNormalise(double val)
{
var ret = val * Divide + Subtract;
return _Convert(ret);
} | 1 |
a6caec68da0de01267cb9a3540543136 | 8e290f35bf7e2f1f8cbc37ecce1e7079 | warp | def warp(img):
img_size = (img.shape[1], img.shape[0])
src = np.float32([[240,720],
[575,460],
[715,460],
[1150,720]])
dst = np.float32([[240,720],
[240,0],
[1150,0],
[1150,720]])
M = cv2.getP... | 1 |
88df4abb8e8c4e2c701a3ae3d697e42a | 1edcb1fe2a713c14f0584f6a1410e920 | calcula o determinante de uma matriz n=2 | double det;
if(n==1)
{
det=(*(*(A+0)+0));
}
else if(n==2)
{
det=*(*(A+0)+0)**(*(A+1)+1)-*(*(A+1)+0)**(*(A+0)+1);
}
else if(n==3)
{
det=*(*(A+0)+0)*(*(*(A+1)+1)**(*(A+2)+2)-*(*(A+1)+2)**(*(A+2)+1))
-*(*(A+0)+1)*(*(*(A+1)+0)**(*(A+2)+2)-*(*(A+1)+2)**(*(A+2)+0))
+*(*(A+0)+2)*(... | 1 |
88b0f312c3890825683dfb7d2c92c964 | 58a1bfe3959c7f879d2dfe1a17e98fa8 | 查询训练服务详情 | let res=yield call(getTrainDetail,payload)
if(callback && typeof callback === 'function'){
callback(res)
}
} | 1 |
cf5db1ff1db68f9bcb01225a8cd45bf6 | 6134441ef96a538706be9ac208f00ca7 | PARAMETER 1: std::list<Instruction::Instruction*> insts - New body to replace itself with. | {
char *ptrorg, *ptr2, *ptrins;
char zeilstring[8];
char nextins;
int cpybytes, proglen;
int i, inslen, szeilnum, searchnum;
ptrorg= ptr;
memccpy(&zeilstring[0], instxt, ' ', 7);
szeilnum= atoi(&zeilstring[0]);
prog_delzeil(szeilnum, ptr);
zeilstring[0]= '\n';
ptrins= ptr;
nextins= 0;
w... | 0 |
c2a55db910f13818459bf8662363a75d | bfcbff61928590ce7587e874d077903f | 店铺高级数据->获取自动更新token数据 | $appid = APPID;
$gamehallCfg = otable::gamehallCfg();
$query = "SELECT * FROM $gamehallCfg WHERE cfgname = 'CrontabPub' AND appid = $appid LIMIT 1";
$list = odb::ghConfig()->getOne($query, MYSQL_ASSOC);
$shopgoodAutoPubCfg = json_decode($list['cfg'], TRUE);
foreach ((array)$shopgoodAutoPub... | 0 |
f7b73223a984c0f741e87f47aded0bae | dec5efb03d5a643927ebc0126b7733f6 | returns whether this effect is a damaging effect | bool Goodie::isDamageable()
{
return true;
} | 0 |
174ca3d4010b852bb1b95a31d1957d66 | 7817c97f26bb39654f921d6803c878a9 | adds the client program number to the array of program numbers | {
int numb_value;
numb_value = (int)clnt - 9;
if (numb_value != 0) {
pgnumb_setNumb (numb_value);
}
} | 0 |
a76dd111bb0a9e7a1b0ec2006baf7800 | 6f09c192870a908d37a202ab30bfe7ca | Check whether or not this rabbit is to give birth at this step.
New births will be made into free adjacent locations. | {
List<Project.Location> surroundings = getField().adjacentLocations(getLocation());
for (Project.Location location : surroundings) {
Project.Cell possiblePartner = (Project.Cell) getField().getObjectAt(location);
if (possiblePartner != null && possiblePartner.getClass() == t... | 0 |
ec8da2a06763d6839a1aa5571035dd02 | fede52b5bbbce6049fceb379c3077305 | Adds a `build` target to a builder test harness for the browser builder with the base options
used by the browser builder tests. | if _get_test_by_name(tests, 'webkit_layout_tests') is not None:
return None
if not add_blink_tests:
return None
swarm = builder_name in LAYOUT_TESTS_SWARMING_BUILDERS
return 'add_swarmed' if swarm else 'add_local' | 0 |
17f84415999fc3a15f7e95802e655cf3 | 9aa4f5f8c11128fdc51dc8577bb01a14 | Sets the nien han su dung giay dang kiem of this qlvt cap phep phuong tien van tai. | public void setYKienLanhDaoDuyet(String yKienLanhDaoDuyet); | 0 |
6cb4236bfc5bd83644d5539d33ec0b79 | 8700a6e788994f2e9a7f8eaace4b72ca | Moves a card to this empty stack | {
for ( unsigned int y = card.y; y < board[card.x].size(); y++ )
board[ card.x ][ y ]->shape.setPosition( absoluteCardPosition( card.x, y ) );
resizeStack( card.x );
} | 0 |
f681aa1b48e7275f825cbd7a2f8837b4 | 1f231d09291a096f21ed776ed77ca01d | RandStringRunes returns a random latin string of the given length | func RandStringRunes(n int) string {
b := make([]rune, n)
for i := range b {
b[i] = letterRunes[rand.Intn(len(letterRunes))]
}
return string(b)
} | 1 |
726654533d5586faf7e5c7c9957d246b | d824e40aa10faf9115050ebb1ffa11b6 | Enter a parse tree produced by the {@code DivideExpression}
labeled alternative in {@link SParser#expression}. | void enterDivideExpression(@NotNull SParser.DivideExpressionContext ctx); | 1 |
1e78477ca7d06c4142188a0979fca387 | f3ce3d668672a80de33ea45f1aed4928 | Convert to lowerCamelCase. | public String toLowerCamel() {
return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.LOWER_CAMEL, name());
} | 1 |
c738ec53dc0e7c43b262ce6e53d3f3ff | b5276ddaa57e311c66d61bffbdcd83a0 | 对字符串数组进行提炼,只保留需要的内容 | public class CleanStrategies
public static String exchangeInfo(String src, String tar, int[] index) {
String[] srcs = src.split("\t");
String[] tars = tar.split("\t");
String res = "";
int count = 0;
for (int i = 0; i < tars.length; i++) {
if (i < index.length && i ==... | 1 |
6d8a7c8cdb4ac9447681a072a99d9193 | 945a59815809b60ae82124a065cdcbf6 | Check whether player can hold any more items when item activates
or hits player. | {
{
int count;
ITEM_DATA *pItemData;
ActorType actor;
CString result;
BOOL answer;
HOOK_PARAMETERS hookParameters;
SCRIPT_CONTEXT scriptContext;
pChar->GetContext(&actor);
pItemData = itemData.GetItem(pItem->itemID);
scriptContext.SetCharacterContext(pChar);
scriptContext.... | 0 |
a72b93d294e34cacce73863dac00c59f | 4e794d631fdbc226a5cd4768bd89a0e7 | 特殊转换:
将支持.entries接口的对象(如Set/Map)转换为普通对象。 | function entriesToObject<T extends ObjectWithEntries>(object: T) {
return Object.fromEntries(object.entries());
} | 1 |
e3d341968adbc14f2c5b599c1e8aa586 | 8aa022fc9ca52a2a1efb45caaa9113fb | 그래프페이지(graph.html)에서 갈 수 있는 카테고리 페이지에 동그라미를 그리고 myFunction을 동그라미에 연결한다. | function drawGraph() {
} | 0 |
e3ec31e40ff3fc810b8644762250660c | 42d99c140310a2de6aab9f40de2542a3 | Set DB FieldNames which needs no transformation of data before storing it in DB | abstract class abstractdbdriver
private function SetFields($field_names)
{
} | 1 |
6d2df1ae0ebac17253ba164fe685be4e | 1a0f9ab4a38bac804fd554ed969190ee | Request for or preempt the resource in case of need with the given priority in parallel without delaying the current stream of data.
The less priority is higher. The priority must be specified as the Expr instance. | class Connection
def receive_priority(frame)
if dependency = @dependencies[frame.stream_id]
dependency.receive_priority(frame)
elsif idle_stream_id?(frame.stream_id)
Dependency.create(self, frame.stream_id, frame.unpack)
end
end | 0 |
4d12b987d784186ea013332db766cc6f | 75c70b0c04ea432885d9e7340e3d60eb | 创建做法和做法之间的关联 | class Design extends Model
static associate(models) {
Design.belongsTo(models.Orders, {foreignKey: 'orderId'})
} | 0 |
bd649a4b05115efcac26f6163b67bf8c | 12b2139b33a0cbd20389c6ad3d610ebb | 开子进程启动服务 | export class Command
async startCommand() {
this.work = fork(join(__dirname, './work'), [], { stdio: 'inherit' })
this.workPid = this.work.pid
this.work.on('message', data => {
if (data && data.error) {
Logger.error(
`[kever|error]: service startup failed. reason: ${data.message} `
... | 1 |
d0afd9b3ee431b54354c7b2e1c98f668 | 8ec282a46efdf526fca736f5d110972c | Return dictionary linking regionids to anatomical locations. | dictRef={}
dictRef["Pelvis"]={"TF" : {'sequence':"YZX", 'labels': ["RASI","LASI","SACR","midASIS"]} }
dictRef["Left Thigh"]={"TF" : {'sequence':"ZXiY", 'labels': ["LKNE","LHJC","LTHI","LKNE"]} }
dictRef["Right Thigh"]={"TF" : {'sequence':"ZXY", 'labels': ["RKNE","RHJC","RTHI","RKNE... | 1 |
0000aed67a7fa31f6bb00414f27eae8b | c41a0c456423d5254848e795ebf7ef86 | Test if can add multiple use statements. | class TestLiveAddons(object):
def test_multus(self):
validate_multus() | 0 |
cf4ab68445df35c846b5eff571282377 | 4bfbf648dbc46b3c36c3c754b2c17923 | Send updated list to tracking server. | LOGGER.info("+++ Service entry +++");
ioTRepository.saveData(CsvProcessor.processTrackingDevicesFile(ioTRequestDTO.getFilepath()));
LOGGER.info("+++ IoT list updated +++");
return IoTResponseDTO.builder().description(Messages.HTTP_200_DATA_REFRESHED).build();
} | 0 |
eef8bda59668e70b54c47279a8b6c8d8 | 06d1b91c02812fcf0810f405335bc0c8 | 서버에 셋팅된 파라미터를 보낸다. | bool Client::Post() {
std::string baseUrl = "https://";
baseUrl += serverAddr_;
baseUrl += ":";
baseUrl += std::to_string(serverPort_);
std::string param;
for (auto it = params_.begin(); it != params_.end(); ++it) {
if (it != params_.begin()) {
param += "&";
}
param += it->first;
param... | 1 |
acf2be288e934c5e082ffec550138115 | 3d8b105555ce706881a043a366a8ff9f | Sum is a simple helper function that sums a slice of integers | sum := 0
for i := range numbers {
sum += numbers[i]
}
return sum
} | 1 |
27a3e3d5d8ddc7c87f086a8bdec7c15b | 7d5d4577e4b3eefb5820e58ec5a2b132 | Not much tested - I decided against doing overlapping line plots this way.
The input arguments are two variables (cdms2 MVs, normally TransientVariables), with whatever
compatibility is needed for this function to work. New axes are computed which can be used for
both variables. These axes are returned as a list of t... | class basic_plot_variable():
def varoptions(*args,**kwargs):
return None | 0 |
d2ae34d9a47301df0f0baf9619b855b8 | c10c6987f2c10367224990fca94489c6 | 全アニメーション名を設定 | public class Animation_Manager : MonoBehaviour
void setup_animation_names() {
animation_names = new Dictionary<string, bool>();
RuntimeAnimatorController animator_controller =
(RuntimeAnimatorController)animator.runtimeAnimatorController;
foreach (AnimationClip clip in
animator_controller.animationClips) ... | 1 |
38b7272ecadb49397191b333625e47d3 | 3ddef3464e1d671fd4ba42dbfb160048 | Initializes a dtFabric-based data format Registry plugin. | void registerDataPlugin(DataPlugin datp); | 0 |
f55a6c0c540468cdf01878fbf5bde642 | b82141752fda99a52f415e78ffea77c9 | 矩形变圆动画 | class PostButton @JvmOverloads constructor(
context: Context,
attrs: AttributeSet? = null,
defStyleAttr: Int = 0
) : View(context, attrs, defStyleAttr)
private fun round2CircleAnim() {
mRoundToCircleAnim = ValueAnimator.ofInt(0, mDefaultTwoCircleDistance)
mRoundToCircleAnim!!.duration = mDur... | 1 |
91a5bfdac8e5ef18c8375bd96585a15e | bb7633dfddaf20767f97adfe41b43e97 | JsonArray转DiaryList | String diaryDate;
String diaryTitle;
String diaryContent;
boolean notifyCheck;
boolean notifySwitch;
String photoOne;
String photoTwo;
String photoThree;
String photoFour;
int notifyID;
String notifyDate;
String notifyTime;
... | 0 |
d77645930a20833c10fd6a2c643ea063 | 37f719abd5030f3a54f69f16365054c3 | @brief a getter method to retrive all command line arguments not releative to an option | const StringArray& CommandLineParser::getRemainingArgs() const {
return this->remainingArgs;
} | 1 |
51430a92a48e436f6d07e3f9d4c900be | cccdb1416923bea7bafbabca2313f79b | Obtém todos os identificadores usados para blocos SELECT. | class Jeops_RuleBase_RecursosKB
extends jeops.AbstractRuleBase
private String[] getDeclaredIdentifiers_tabela() {
return identifiers_tabela;
} | 0 |
9c1451680a23a49b6f34892551ea1827 | c68caaf1467990cc21dbe7be90569320 | Se llama cuando se quiere pasar a la siguiente escena. | public class PasarNivel : MonoBehaviour
void CambiarNivel()
{
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex + 1);
} | 1 |
eb22490875d598324321b0608f9f52be | 9670276c91977c111206e8a21962f852 | Gets an {@link net.jforum.dao.CategoryDAO} instance. | CatalogDAO getCatalogDAO(AbstractConnection connection); | 0 |
3f32c576f90e7d46ea393c841df17443 | 68339020b7315abe7c40f248abb13da0 | 批量删除回收站中测试任务数据(不可恢复) | class recyclebinModel extends model
public function deleteTesttasks($objectIDs)
{
$tasks = $this->getTestTasks($objectIDs);
if(empty($tasks)) return ;
foreach ($tasks as $taskID => $task)
{
if(!empty($task->actions))
{
$this->dao->delete()->from(TABLE_HISTORY)->where('action')->in(array_keys($task->a... | 1 |
e0f4175c5f5c2fd1e8c90264e23e390d | 33b3a96a53838fb16dfc9ef8ea61ab51 | Family name. In the U.S., the last name of an Person. This can be used along with givenName instead of the name property. | class PersonType extends ThingType
public function setFamilyName(Property\FamilyNameProperty $familyName) {
$this->familyName = $familyName;
return $this;
} | 1 |
154135989e52dcaf52b1abf0f2dfea93 | 4f151f54b1be3073c962332df52d44fb | Sets Fm+ drive capability on PB9 enable bit | namespace target namespace syscfg namespace reg class CFGR2
__attribute__((always_inline)) unsigned long setI2C_PB8_FMP(unsigned long value) volatile {
raw = (raw & ~(0x1 << 10)) | ((value << 10) & (0x1 << 10));
} | 0 |
057e831bcd60ec703e56dba4f88029f8 | ef1a28f7d96cc70b38e5496f6c2ce052 | Initialize the connections of all clusters | logger.info('Initializing connectors')
channel_amqp_list = self.odb.get_channel_amqp_list(self.cluster_id)
if channel_amqp_list:
for item in channel_amqp_list:
amqp_channel_start_connector(self.repo_location, item.id, item.def_id)
else:
logger.info... | 1 |
80560ebc0c7340153fca9f6913af53b8 | f8ba484d349f3682a61b01d6343b9f59 | format from:
self._var = var
to:
dict['var'] = self._var | class CorPlot(TH2D):
def _str_to_map(self,var_name):
if not isinstance(var_name,str):
return var_name
def the_map(fill_buffer):
return getattr(fill_buffer,var_name)
return the_map | 0 |
b1bf70a89c3f428814236d3c6102d17e | 85d87cb0119fde8544f638fa8fc682a8 | Test to see if both time and value are imported correctly | self.setUpReloader()
self.importHello()
self.addMissingTimeStamps()
expected_timestamps = self.buildExpectedTimeStamps(['__init__',
'hello'])
self.touch(self.buildFilename('hello'))
self.importHelloAgain()
... | 1 |
1dfc70becb655dd5779339a8464c9415 | 05a6ee4f9abd7c900fe63411d158d804 | 캘리포니아 주택 데이터 세트로부터 입력 특징을 준비한다. | (dx, dy), (tx, ty) = tf.keras.datasets.mnist.load_data()
dx = pandas.DataFrame(dx.reshape([60000, 28*28]), columns=[str(n) for n in range(28*28)])
dy = pandas.Series(dy.astype('int32'))
tx = pandas.DataFrame(tx.reshape([10000, 28*28]), columns=[str(n) for n in range(28*28)])
ty = pandas.Series(ty.as... | 0 |
9718a5bf52c616ef04b40e030dc7eb41 | fe6dc2aa9cb19657fb86219eea1a479e | Sets the value of the '{@link be.ordina.sco.projects.dow.demurrop.LPPossibleDockTripJetty#getDurationHandling <em>Duration Handling</em>}' attribute.
<!-- begin-user-doc -->
<!-- end-user-doc --> | @javax.annotation.Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.5.0"
},
comments = "This class is generated by jOOQ"
)
@java.lang.SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class GptGuideServiceRecord extends org.jooq.impl.UpdatableRecordImpl<dshumsky.jooq.generated.tables.records.... | 0 |
e3856180836da39bc3a84b8f2b3f3eeb | 8841b9731744731e5ab27af77f2fcd9d | Method which takes input file for string parsing and option to decide how to do it | useParser(args);
try{
if (inputFile != null) {
ParsedStatement AST = DocumentParser.parse(inputFile);
if(displayDoctree){
System.out.println(AST);
}
FormulaParser fp = new FormulaParser(outputFile);
... | 1 |
9b8b4477ed369577708ab1e51a7a854c | 2b1ac96ccefd71cf5787161ea8488943 | An RPN command has come in from the remote end for this SAP
This is either:
1) A negotiation command or
2) A request for our local port parameters | if self.incoming:
command_line = self.incoming.pop(0)
response = None
command = [c.strip() for c in command_line.split(',')]
if command[0] == '$0':
response = ['$0']
elif command[0] == '$1':
response = ['$1']
... | 0 |
8b7a1e886b41c25ea39388cd99d1e3b4 | 7fe064e55be7065d725d87ebee97ba14 | Allows for the service managers to set whether this service is currently running | public class MessageQueue
public void setRunning(boolean running) {
this.running = running;
} | 1 |
609d0f2da644b87e8af7b68c450bbfc3 | a265e71795bfb02760a9f9cf202008b1 | TCL filter for accelerator pedal. | static void filter(unsigned char *buffer, unsigned long len)
{
static unsigned char buf[SOUND_BUFFER_LEN];
int t;
unsigned long i;
if (len > SOUND_BUFFER_LEN || len == 0)
return;
memcpy(buf, buffer, len);
for (i = 0; i < len; i++) {
t = (i == 0)?(buf[0] - flt_prv):(buf[i] - buf[i - 1]);
if (t)
flt_b = (d... | 0 |
28936b5fc5db7487af32b44e029278f7 | d9a85b1830e85e1d3bd29b5c886de9d6 | Returns the value of the '<em><b>Period Start Time Point</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Period Start Time Point</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | public abstract Date getStartPeriod(); | 1 |
a2be1bb3e48427eeed62a5c8754131c6 | 3f028ea0df49d42e66bb1f6552526ae5 | 是否是软连接 | class File():
def islink(self):
return os.path.islink(self.fullpath) | 1 |
a3fd2d9664f8152eb7d163601bbdd3fa | c6d23db934591906d2a60a09772d8316 | Creates a form to edit a SifdaTipoRecursoDependencia entity. | {
$id = $this->getAdminRequestId();
$this->setBreadCrumb($id ? ['id' => $id] : []);
$tipoNorma = $this->getSubject();
$lengthConstraint = new Assert\Length([
'max' => 40,
'maxMessage' => $this->trans('default.errors.lengthExceeded', ['%number%' => 40], ... | 0 |
c066cd4a82fdb2c4e7e86084f4fbfb40 | c20f3b54f8c82dbb28c691b1543568d2 | letterL | def morseL():
print ('L = .-..')
dot()
dash()
dot()
dot() | 1 |
489ac84e375db1de817d5af7a3fa56c4 | 6726314263719bbd35b59e3d56cca357 | スタックが空かどうかを確認 | {
if (stk->size == 0)
return 1;
else
return 0;
} | 1 |
54731a51b32e9ef2672feee8e87693c6 | 8216d0a3324759c19a36f41cf195acdd | 对指定目录或文件搜索关键字,如果指定替换关键字则执行替换,并把搜索或替换的结果放入JSONArray对象。 | public class IDE
private static boolean searchXwl(String text, String path, Pattern pattern,
JSONArray rows) {
JSONObject xwl = new JSONObject(text);
return scanXwl(xwl, path, pattern, rows, "");
} | 0 |
006c6bcd6ee94901eb9f4fb33f495410 | 57e475d319ed352842e006cd19616c4d | Returns index of the coordinate with minimum value. | class BaseQueryCompiler(ClassLogger, abc.ABC):
def idxmin(self, **kwargs):
return DataFrameDefault.register(pandas.DataFrame.idxmin)(self, **kwargs) | 1 |
97df5b9f204a78d47dacb3e728e08536 | 2c451f00d03710fe4aef4805a4a0c919 | returns string in format '('item1','item2',...,'itemN')' | {
StringBuilder res = new StringBuilder();
int i = 0;
foreach (object o in list)
{
if (i != 0)
res.Append(',');
res.Append(o.ToString());
i++;
}
return "(" + res + ")";
... | 1 |
c7433b4a234d9f3788a70a91e85c18a5 | 1ecd7d4e04586b91be46bf057b5c4271 | Plot multiple power spectra on the same plot. | ax = check_ax(ax)
for power_spectrum in power_spectra:
plot_spectrum(freqs, power_spectrum, log_freqs, log_powers, ax=ax, **kwargs) | 1 |
908464b024323366f363684dfe2ac191 | f10ce367480865c5c481626e925abc61 | cron表达式:Seconds Minutes Hours DayofMonth Month DayofWeek [Year]
每10分钟扫描一次,超时没有付费的订单则作废,并且释放锁定的库存 | @Component
public class OrderTimeOutCancelTask
@Scheduled(cron = "0 0/10 * ? * ?")
private void cancelTimeOutOrder(){
Integer count = portalOrderService.cancelTimeOutOrder();
log.info("取消订单,并根据sku编号释放锁定库存,取消订单数量:{}",count);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.