query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
5c0f4e717825d3f6655dca7ca74107e1 | baf7f1a5210c93ead36e57a9d40d32af | Gets the The number of boosters to deliver to user. | public class Player extends Rectangle{
public int getnBoost(){
return nBoost;
} | 1 |
2741e8de96dbb41a97b4b4c864e2e71b | 2f942ab65cc10927a8860b28d9b8a6fb | recuperer une sous categorie par son nom | function getTitreSousCategorie($id)
{
$bdd = getBdd();
$titrecategories = $bdd->query("SELECT libelle FROM sous_categorie WHERE id =". $id .";");
return $titrecategories;
} | 0 |
ea82a47396681f367ecad2d865d574a7 | 081b813477c6020ae2835c98d294ef72 | Returns :data:`True` if the host returned a single ping, and
:data:`False` otherwise. | class PingServer(InternalDevice):
def value(self):
with io.open(os.devnull, 'wb') as devnull:
try:
subprocess.check_call(
['ping', '-c1', self.host],
stdout=devnull, stderr=devnull)
except subprocess.CalledProcessError:
... | 1 |
2c119919c6c60a3f0add464cf445d6a5 | 22ea64a69e28901f44d526482c5fd357 | Create ContactRequest. | class Contacted extends Mailable
public function __construct(ContactRequest $request)
{
$this->request = $request;
} | 0 |
065ec849ce6e3cf6ae4eabf678661bce | f5887ef169355f7e1f91f0a634ca8f10 | converts a string to a decimal representation of the time | def Time(timestr):
time = 0
time += float(timestr[1:3])/24
time += float(timestr[4:6])/24/60
time += float(timestr[7:11])/24/60/60
return time | 1 |
c8d924233bf612fa25c2bab8e8126a5c | 326280a8f29fc8b475755d3e9177d1cb | 监控代码是否到达了某类的某一行 | source = straux.startswith(source, "@") and source:sub(2) or source
local bps = debugger.breakpoints[source]
if bps then
for _, bp in ipairs(bps) do
if bp.line == line then
if check_condition(coinfo, bp.condition) then
bp.currHitCount = bp.currHitCount... | 1 |
50739d1c7c80f122157ac5cf2885c23d | 1938852d150baed36aaa057a597355d0 | 生成文本消息格式 | textTpl = """<xml> <ToUserName><![CDATA[%s]]></ToUserName> <FromUserName><![CDATA[%s]]></FromUserName> <CreateTime>%s</CreateTime> <MsgType><![CDATA[%s]]></MsgType> <Content><![CDATA[%s]]></Content></xml>"""
out = textTpl % (FromUserName, ToUserName, CreateTime, 'text', Content)
return out | 1 |
5305c931d83dd3c29a3ee7aa2ca856e5 | 1244697d14311a31abc2da78058bc1a0 | Ejecutar un procedimiento almacenado que retorna un listado | IDataReader datos = null;
Paquete paquete = null;
try{
dbConexion.Open();
dbComando = dbConexion.CreateCommand();
dbComando.CommandType = CommandType.StoredProcedure;
cargarProcedimiento(dbComando, procedimie... | 1 |
5dcb007b9f8a9a7216c5a9cda0303984 | 31478ac23481b150c7f96af9d4a0bae4 | SiteReview constructor. | class Review
public function __construct()
{
$this->publishedAt = new \DateTime();
} | 0 |
8673127a76f7d4944d167fbce4f5013d | b696d20e646631905c128ab959c9be65 | Called once before draw().
This function is intended to initialize background color. (ex. backgroundColor = defaultColor; in UIButton)
Override and implement this function if the component has default colors. | public class SampleGraphicsView extends View
public void init() {
setBackgroundColor(Color.BLACK);
paint = new Paint();
} | 1 |
c6f9e0b5247a19dd45cc5e60b226b634 | 386ec466d7f897c018f87dbe3bf8dccf | Links to settings.xml and preference options | @SuppressLint("NewApi")
public class MainActivity extends Activity
public void showSettings(){
this.startActivity(new Intent(getBaseContext(), Preferences.class));
} | 0 |
ac131dff6c60791361493e3901647430 | 53600a38fd8e03364a0ee07f3b30aa14 | 根据设备请求类型选择跳转下载地址 | {
switch ($type) {
case 'publish':
$address = "/book/publish/page/";
break;
case 'seek':
$address = "/book/seek/page/";
break;
case 'colsearch':
$addres... | 0 |
e55b7787877a8222459d54456889accd | 6eeee6c12b06beb007276a2d8a5ae934 | convert an entire UTF-8 string into a Unicode string buffer | {
struct Buffer_char utf8buf;
size_t encoded;
char last;
INIT_BUFFER(utf8buf);
while (*uni) {
encoded = utf8EncodeOne(*uni, utf8buf.buf + utf8buf.bufused, BUFFER_SPACE(utf8buf));
if (encoded == 0) {
EXPAND_BUFFER(utf8buf);
} else {
utf8buf.bufused += e... | 0 |
43d4e67c669709f45ef79f5d91db0ac9 | eda945bf2ef2108223ec6671ca620cac | This unit test is to validate the functionality of Get Device channel Tests. | def test_new_channel_to_lineup_ipdvrtests_56(stream):
recording = None
web_service_obj = None
try:
config_info = utils.get_spec_config()
workflow = config_info[Component.WORK_FLOW][Component.WORKFLOW_NAME]
response = v2pc_api.get_workflow(workflow)
workflow_dict = json.loads(... | 0 |
58beb8ad1e4ec2a456e64623c49bb447 | 83ab7bdebe092baf3449d0706892b06e | 国土数値情報データのN03(行政区域関連)のファイル(geojson)から、
指定した都道府県、都市のデータを抜き出してファイル(geojson)に出力 | public class GeoJsonReaderNodeModel extends NodeModel
@Override
protected BufferedDataTable[] execute(final BufferedDataTable[] inData,
final ExecutionContext exec) throws Exception {
String fname=geoJsonFile.getStringValue();
File jsonFile = new File(fname);
CoordinateReferenceSystem crs... | 0 |
feaff730b603cef1ab38f7f3ccf0189f | 0884bcd033f7cdab3a9e6b1d5ca6f0f4 | Creates new slides binded to slider entity
also creates image files with different size | namespace SkillerGame.ViewModels
public class SlideCollectionViewModel : SecondLevelVM
public void CreateSlides(string imagesPath)
{
MemorySlides = new ObservableCollection<PictureViewModel>();
var models = GetModelsFrom(@imagesPath);
for (int i = 0; i < 6; i++)
... | 0 |
63d58415938e9a742fd7ca3db8f0bee0 | 38dc05dce72d62aaff17de1ed4c2d1a4 | Transforms a Factory Schema into a basic information factory object | const ctx = {
ref: desc.ref,
name: desc.name || desc.ref
};
return makeBasicObject(ctx, desc, this.prototype);
} | 1 |
3494eff488558d41d3a02c8e4a1d1fc6 | 2427dfa6167cdcee2a2d6ea439da9769 | Averigua si se ha modificado la libreta tras ser cargada. | export default class Datasource
async isModified() {
try {
return await D.isModified(this._SMDatasourceId);
} catch (e) {
console.error(e);
}
} | 1 |
65a8388f1d27a5d2abb02bfbdc32417d | 428634122cd6a2a7f0275c2537ca1e3b | 获得项目合同的所有信息 主表、预算、实际、发票 | namespace DasherStation.stock
class StockDB_temp
public DataTable correspondingContractDetailInfo(long mainId)
{
StringBuilder sqlStr = new StringBuilder();
ArrayList list = new ArrayList();
sqlStr.Append("select indent.id,indent.scId,indent.mId,");
sqlStr.App... | 0 |
02a4fd34607e1a77cbd94e2adf61f16d | f15461a4c88e8234a851d07bfc8d510b | This should be called before saving changes to a Group instance,
so that the GroupHistory entries contain all previous states, while
the Group entry contain the current state. XXX TODO: Call this
directly from Group.save() | if not self.manager.options['versioning']:
return
if not self.current_transaction_id:
self.create_transaction_log_entry(session)
self.create_association_versions(session)
self.create_transaction_changes_entries(session)
self.create_transaction_... | 1 |
e0d3898e3e56674240f0f5a4e3ba7374 | 9b95b1524f9a2b4206cf025b234218c7 | Dos departamentos son iguales cuando coinciden sus identificadores | namespace VolleyManagement.UnitTests.Services.TeamService
[ExcludeFromCodeCoverage]
internal class DivisionComparer : IComparer<Division>, IComparer, IEqualityComparer<Division>
public bool AreEqual(Division x, Division y)
{
return x.Id == y.Id &&
x.Name == y.Name &&
... | 1 |
b288f8e270b8dca0fbb0e8cb29c058d1 | 8ff11145aaf047b93bba993c563f80d8 | Checks whether the colliding object should be hurt by the DWGO. | bool CASW_Alien::ShouldGib( const CTakeDamageInfo &info )
{
return true;
} | 0 |
894772754bf73e054634fa92b19a72e5 | f1cd7cfcbc6c90a665ce6964ec61bdb1 | 获得Rbill数据集合,可以通过辅助工具Assist进行条件查询,如果没有条件则传入null | public List<RpRecBill> getRecBillList(Date begDate,Date endDate); | 0 |
b7be873cbbda62a871a9e39f097a2687 | b53fc648161bcba6289fac3dba04afae | ## Function that converts data frames into tbl_df | LIST_TO_DT <- function(XL) {
data.table(structure( unname(do.call(Map,c(c,XL)) ) , class = "data.table") )
} | 0 |
b522c2b50749ce535029b14c93ad4c45 | c14357b61933442f167119654ecb9263 | Extract interesting bits of the state out of a figure | if not img:
img = IJ.getImage()
ic = img.getCanvas()
if not ic:
return None
p = ic.getCursorLoc()
z = img.getCurrentSlice()-1
roi = img.getRoi()
flags = ic.getModifiers()
insideRoi = 32 if (roi and roi.contains(p.x,p.y)) else 0
flags = flags + insideRoi
return p.x, p.y, z, flags | 1 |
ca23f674c79803dadf722d779b0067f4 | b3d4ff6df1fa65406599a09765386e82 | Check for new messages in all chats for current user, if so, then show buble with a count of new messages | {
int c = allUsers.Count == 0 ? 0 : allUsers.Sum(x => x.CountOfNewmessages);
HaveNewMessage = c > 0;
if (HaveNewMessage)
{
TalkClient.Myself._music.Stop();
TalkClient.Myself._music.Play();
}
} | 0 |
50794fa1b3550d309a85281aae1a2653 | a39ae9892b581f3a65bf4255f4502b04 | Check a character is a high surrogate character | final public class Verifier
public static boolean isLowSurrogate(char ch) {
return (ch >= 0xDC00 && ch <= 0xDFFF);
} | 0 |
e7081286ea175fe5591c35a446f9e0e7 | d94f9ebd6938c04c9c09785048e1d54e | This function gets the user's date variable, validates it, and returns
it back to the calling function. | {
int day, month,check;
DateOfBirth date;
printf("Please enter date of birth in DD/MM/YY format: ");
scanf("%d/%d/%d", &day, &month, &date.year);
fseek(stdin, 0, SEEK_END);
check = dateChk(month, day, date.year);
while (!check)
{
printf("Invalid date! try again.\n");
scanf("%d/%d/%d", &day, &month, &date.ye... | 1 |
3c9686544fad300fd521144a522525ef | b8fc99c0e23237faa61bd36738d6518c | Sort in reverse chronological order. | class ImageList(GallerySettingsMixin, ListView):
def get_queryset(self):
return super(ImageList, self).get_queryset().order_by('-pk') | 1 |
e97207b184dee1a8952da7585aad0db9 | d09ff9bdfba9232fa0576db452018dc9 | Normalizes string, converts to lowercase, removes non-alpha chars and
converts spaces to hyphens. | value = unicodedata.normalize('NFKD', value)
value = re.sub(r'[^\w\s-]', '', value).strip().lower()
value = re.sub(r'[-\s]+', '-', value)
return value | 1 |
3f338e21c9fd7b74adec1c7291f5152e | ac88619656d7d8dcbe97ad7d3d58d379 | 获取主页图片推荐 | @RestController
@RequestMapping("/blog/recommend")
public class BlogRecommendController
@GetMapping("homepage")
public ResultSet<BlogRecommend> getHomePageRecommend() {
return blogRecommendService.getHomePageRecommend();
} | 0 |
5db293941194171db02e88c5adbf324b | 9f0a90beda9a1894304ed83f58bb8bec | This function returns the key code associated with the
specified command. | int
cmd_id_get(char ch)
{
switch (ch) {
case CMD_HOME_CHAR:
return (CMD_HOME_ID);
case CMD_REFRESH_CHAR:
return (CMD_REFRESH_ID);
case CMD_QUIT_CHAR:
return (CMD_QUIT_ID);
case CMD_BACK_CHAR:
return (CMD_BACK_ID);
case CMD_LATENCY_CHAR:
return (CMD_LAT_ID);
case CMD_ACCDST_CHAR:
return (CMD_ACCDST_ID... | 0 |
7eba14a46df863b130b830e11e506ceb | 2359c52f10e41124cb4e963ca4f8ab7e | Sets whether an organization allows corporate access. | {
var orgId = ((WhoAmIResponse) crmService.Execute(new WhoAmIRequest())).OrganizationId;
var org = crmService.Retrieve(EntityName.organization, orgId,
new ColumnSet(organization.organizationid, organization.isauditenabled));
org[organization.isauditenabled] = ... | 0 |
62861ec07405ce86a3dbfdb2c4d6c5aa | f7bd070f733998b155da8f71cd4e769a | Called when the user clicks the add build button | {
let build = {
"character": getSelectedCharacterName(),
"class": getSelectedClassName(),
"abilities": [
getSelectedAbilityName(0),
getSelectedAbilityName(1),
getSelectedAbilityName(2),
getSelectedAbilityName(3),
getSelectedAbilityN... | 1 |
2e6ce4cdcc069d0ba4bd72bf9b19a036 | af48bbe148ee3b3d71688f70eabfe1a9 | Gets the raw, unmodified, text in each tweet from tweets by users whose language is English | df = df.loc[:,['created_at','lang','user_location','text', 'tidy_tweet']]
df = df[df['lang'].str.contains('en', na = False)]
return df | 1 |
cb80d9c3d58bfb2b01e4ea0c29c4e92c | 791a5b46d79a26dc725e9ec7099965c8 | Retrieve the target of a processing-instruction. | protected Node deepExport(Node n, AbstractDocument d) {
GenericProcessingInstruction p;
p = (GenericProcessingInstruction) super.deepExport(n, d);
p.setTarget(getTarget());
return p;
} | 0 |
1349bead3976c4f7ed5cb9bc26166fbc | 6e44a35bf1f508f4808562425b5e904d | Gets the user roles allowed to have profiles of this type.
The role IDs. If empty, all roles are allowed. | {
if (!$this->hasData('available_profiles_ids')) {
$profiles = $this->_getProfiles();
if (!$this->checkUserActionPermission(BL_CustomGrid_Model_Grid_Sentry::ACTION_ACCESS_ALL_PROFILES)) {
foreach ($profiles as $key => $profile) {
if (!$profile->isA... | 0 |
7ade7a2ca7bd644c391a9285ca5396a0 | afc467b2111bb64b6eb7d6a3993cf355 | Authorization 정보를 전달하지 않았을 때 server 인증 테스트 | class FlaskrTestCase(BaseTestCase):
def testCallRestNotAuthorization(self):
self.auth_api() | 1 |
6b4eb3e651cecebf89b33dfcc1f1f4dc | 37b85c20d6fadcc66148951fbbc036f1 | ==============================================
DO THE INTEGRATION
============================================== | {
if(integrator == NULL)
{
switch(integratorType)
{
case EULER:
integrator = new EulerIntegrator(*this);
break;
case MIDPOINT:
integrator = new MidpointIntegrator(*this);
break;
case RK4:
integrator = new RungeKutta4Integrator(*this);
break;
default:
assert(false);
retu... | 1 |
daba74536daec6646f9a8d656ddd69cd | 48388ad6b873046ab6393066568b8aba | Get the source transaction identifier (if any). | public function getSourceIdentifier(): ?string; | 1 |
dce3e76666dc07311c0f1d9624b94d74 | ed414c03ce82b64d403d3b9cb347de92 | Determines whether or not this space is adjacent to the given space. | namespace AmoebaRL.Core
public class Actor : Entity, IActor, ISchedulable
public bool AdjacentTo(int tx, int ty)
{
if (Math.Abs(X - tx) + Math.Abs(Y - ty) == 1)
return true;
return false;
} | 1 |
1608ce38634d458c49348eabe5fe796d | 5c31ee9cf94e8e0e0377444d6c815533 | 根据order_id返回订单的售后服务 | {
if(!is_numeric($id) || !$id)
return false;
return $this->db->select('status,log_date')->where('aftersales_id', $id)->get('order_aftersales_log')->result_array();
} | 0 |
e7457bd7f11f193eb6f372d79a02182f | 0f13553d181ef2ef74d988d07b0c1b55 | When fireeye-nx-get-reports command returns empty response then corresponding message should be populated. | class JobAccountantTest(EmulatedUnitTestCase):
def testEmptyFWJR(self):
self.setupDBForJobFailure(jobName="T0Skim-Run2-Skim2-Jet-631",
fwjrName="EmptyJobReport.pkl")
config = self.createConfig()
accountant = JobAccountantPoller(config)
accountant.setup()... | 0 |
de6eea11990a67692784762b39ef6353 | 54817bfa11a5458727ff262b579444dc | For compatibility. Does nothing. | public class XulFragmentContainer extends AbstractXulDomContainer
@Deprecated
public void addBinding(Binding binding) {
} | 1 |
565632e6a80f4c15e17ef9cd4e182be9 | 1f5d1e05408b3f40809eb3ea1f348049 | Returns the time of creation for the specific cache entry in milliseconds.
<p>
See the description of the class Date for a discussion of slight discrepancies that
may arise between "computer time" and coordinated universal time (UTC).
entry was created and January 1, 1970 UTC. | public long getCreationTime(); | 1 |
d410573a792e9530714aa71e1a0eefa9 | 108bc2d156e9df9213a1414731c8dfd7 | Contrast Measure based on squared Laplacian according to
'Robust Automatic Focus Algorithm for Low Contrast Images
Using a New Contrast Measure'
by Xu et Al. doi:10.3390/s110908281
window: window size= window X window | def CMSL(gray_img):
ky1 = np.array(([0.0, -1.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 0.0]))
ky2 = np.array(([0.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, -1.0, 0.0]))
kx1 = np.array(([0.0, 0.0, 0.0], [-1.0, 1.0, 0.0], [0.0, 0.0, 0.0]))
kx2 = np.array(([0.0, 0.0, 0.0], [0.0, 1.0, -1.0], [0.0, 0.0,... | 0 |
79fa25e841cab3e6ac42ccb00e1cdcc6 | b18dd2a988615cfc33334847fb0fb819 | liest die farben der obenliegenden Flächen | int x = (int) GUI.kasten.getMousePosition().getX();
int y = (int) GUI.kasten.getMousePosition().getY();
farbbestimmung(x, y);
GUI.kasten.repaint();
} | 0 |
f0a58fb9ca2cc0b4dd948b2114240e1d | 862874799e9906c97a63d6e187b1550f | 返回排行榜的第一名 | def YingPing_first(request):
YingPing_first = Yingping_Star_Info.objects.filter(YingPing_Index=1)
return YingPing_first | 1 |
3eb95357acfa30942c7b5d46429f9caf | f8937e7643aed907abc9da321b18085d | 判断是否全是英文 | public class ValidateUtil
public static boolean isEnglish(String str) {
return Regular(str, STR_ENG);
} | 1 |
ae3dda7750f5e239f9f953eafe057abe | ceb825581742ce5aa89aa42865d9f8aa | 触发target上的watcher中的addDep方法,参数为dep本身 | class Watch
constructor(){
Dep.target = this;
} | 0 |
13e898c459db1dbcd0c007f3a9c90b28 | 6ead91d5e7d6f06da87f965fc6007a19 | Checks whether input is calling a built in function. | {
for (size_t i = 0; i < builtins_count; i++)
if (strcmp(name, builtins[i].name) == 0)
return true;
return false;
} | 1 |
e0280639535558d6eb7b4053e21fb581 | e3250e2b31d0c0deb5a912e0500b0e39 | Show infrastructure stack outputs. | logger.info('The following project points were specified: "{}"'
.format(config.get('project_points', None)))
logger.info('The following SAM configs are available to this run:\n{}'
.format(pprint.pformat(config.get('sam_files', None),
indent=... | 0 |
a875bc37d208783dea5e85896b3b0bdd | e57ce9fe76640b2f12d785b6bbdae020 | Check if a section is enabled or not based on the $value parameter | class Productbestseller extends \Magento\Catalog\Block\Product\ListProduct
public function getSectionStatus() {
$config = $this->getConfig();
return $config["enable"];
} | 0 |
aab16ee77fbe8b5f8a16fe550873b9ad | 6879985c681536aae8c8bfae31bcffbd | Prepares the start and drain panels | public class JDrain extends JFrame
private void prepareDrainRunPanels() {
initStartPanel();
panelStart.setVisible(true);
initTestCasePanel();
panelTestCase.setVisible(true);
} | 1 |
d4e05e73a78a98d874f9e828309662cc | 03525061168022630f1b699775954e94 | retry on server errors, not on client errors | class RandomPlayerAI extends _battlestream.BattlePlayer
receiveError(error) {
if (error.message.startsWith('[Unavailable choice]')) return;
throw error;
} | 0 |
6bee1f96f27aa3928be1973fa4b76757 | b5f07aef49e50fa47659bfdd9cd63b26 | Visit a parse tree produced by ECMAScriptParser#IdentifierExpression. | if self.hasattr_t (ctx, 'leaves'):
ctx.value = str (ctx.Identifier ())
else:
self.visitChildren (ctx) | 1 |
a2d912224b8164b482077882d36e44e9 | 6b4020f371e439985e55383306b8f936 | Reads data to populate multiple BlastQueryInfo structures. This data is
formatted in the config file as
BlastQueryInfoN.X[.Y] where N is the chunk number, X is the field of
the BlastQueryInfo structure and Y is the field of the BlastContextInfo
structure (only applicable if X has the value contextM, where M is the
cont... | {
const string kProtGi = "9930103";
const string kNuclGi = "9930102";
const Uint4 kProtLength = 448;
const Uint4 kNuclLength = 8872;
string qid_str = "gi|" + ((m_ProgramType == eBlastTypeTblastn) ?
kProtGi : kNuclGi);
CSeq_id query_i... | 0 |
6583cb244851188af96e67b2c45a0a95 | c14a137cbf14bc93cd653ed2db61028d | Flatten a multi-level Dictionary into a List of Tuples | output=()
for key in dictionary.keys():
if isinstance(dictionary[key],dict):
output=output+dict2tuple(dictionary[key])
else:
output=output+(key,dictionary[key])
return output | 1 |
dd8ec885d1dbc7b0c180f3fde37180a4 | dbb65f635f25e4a5c57a265ffd52d527 | 使用迭代的方式+逆序 | a = [1, 2, 3, 4]
for i in reversed(a):
print(i)
class Countdown:
def __init__(self, start):
self.start = start
def __iter__(self):
n = self.start
while n > 0:
yield n
n -= 1
def __reversed__(self):
... | 1 |
720e42dd77cbb500803b8c9819d7cfd6 | 30f637fa9059fbb4d9903a6f36c128f3 | Executes a named, parameterless stored procedure. | namespace VirtualObjects
public class InternalSession : ISession
public int ExecuteStoreProcedure(string storeProcedure, IEnumerable<KeyValuePair<String, Object>> args)
{
return Context.Connection.ExecuteProcedure(storeProcedure, args);
} | 0 |
8f0eb3120f1f7308ed55511678ae404c | bd49fe2a3e0f5ea6024fe7d1ba8a5e2c | 获取日期格式化的设置,如:hh:mm:ss | public class DateUtil
public static String getDatePattern() {
return YYYY_MM_DD_HH_MM_SS;
} | 0 |
0e7958967b6627ac9678445878aa298c | 13c9fd86a8ed99853df8f22437ad394b | 產生考核對象考評分數單頭 | {
if (_evaluationSort == EvaluationSort.plusesEvaluation)
{
tbkGradeTitle = new TextBlock();
tbkGradeTitle.Text = "评分表";
tbkGradeTitle.Foreground = new SolidColorBrush(Color.FromArgb(255, 0, 0, 255));
tbkGradeTitle.FontSize ... | 1 |
056c4f265beb4bf10bb0720c67e41659 | b19b92ce5e5bf1c597c353f7ac449019 | GetIPv6Properties(self: IPInterfaceProperties) -> IPv6InterfaceProperties
Provides Internet Protocol version 6 (IPv6) configuration data for this network interface.
Returns: An System.Net.NetworkInformation.IPv6InterfaceProperties object that contains IPv6 configuration
data. | class NetworkInterface(pulumi.CustomResource):
def ipv6_addresses(self) -> pulumi.Output[Optional[Sequence['outputs.NetworkInterfaceInstanceIpv6Address']]]:
return pulumi.get(self, "ipv6_addresses") | 0 |
abeb595c25e2649ab1ddcf0512e0a0d6 | cc898bd3fdd9d51d840070f364ca5070 | 格式化sql并把单引号替换成双单引号,防sql注入 | {
if (!string.IsNullOrEmpty(sql))
{
if (sql.Contains("'"))
{
sql = sql.Replace("'", "''");
}
}
return sql;
} | 1 |
9748d09d5a1941bf160c43a478ccdb21 | 2103fcf6c5dca0b5d71947564341357b | The calendar-month-day-box binding might not be ready yet, because it's XBL
and XBL is hopeless. Wait for it if necessary. | class FuroDataRepeat extends FBP(LitElement)
_FBPReady() {
super._FBPReady();
} | 0 |
7651ae846e1fe50cd2eb29e01608a778 | 28a1c10e48455f702a6363d91c68dd4e | => array of <tr>'s | class HtmlTableProcessor(ProcessorBase):
def get_players(self):
return self.content.findAll('tr') | 1 |
91397de80ebf13f8bd1c3b76c95cc577 | be8f28a632cd7babf255a33f80109065 | 选择DEM接边检查输出路径 | try:
OutputDir = QtWidgets.QFileDialog.getExistingDirectory(self.demContentTab,u"选择输出数据文件夹")
except Exception as e:
QtWidgets.QMessageBox.information(self.demContentTab, u"错误",
u"输出数据文件夹选取错误,请重试。",
... | 1 |
eb29f1a07a602f8184cc65bf7bd65746 | 8ed71a31b3d842527b420dbe392dc480 | タイムゾーンが日本であるかどうかの判定 | function stdTimezoneOffset() {
var jan = new Date(new Date().getFullYear(), 0, 1);
var jul = new Date(new Date().getFullYear(), 6, 1);
return Math.max(jan.getTimezoneOffset(), jul.getTimezoneOffset());
}
return new Date().getTimezoneOffset() < stdTimezoneOffset();
} | 0 |
9cdd02205bdbb385ffc65a0030c2253f | 6140725e6f2c7b56998108992576eaeb | Same as getClassName but appends the propertyName. | public class OwStandardFieldColumnInfo implements OwFieldColumnInfo
public String getPropertyName()
{
return m_fielddefinition.getClassName();
} | 0 |
7c2e368bc28e97657ea33c3b519de9a6 | 4828a1d363e91b0441498f0a71bcd27f | Load master info from config/master.json. | minion_conf_file = get_config().getstring('general', 'salt-minion-conf')
if not os.path.exists(minion_conf_file):
minion_conf_file = '/etc/salt/minion'
if not os.path.exists(minion_conf_file):
return ('localhost', 4506)
with open(minion_conf_file, 'r') as minion_conf:
min... | 0 |
f498ba326f3b3fd0358e13e6107eddc2 | d1081d15386f6fada2cfaea8eb4deb2d | ! Очищає стрічку -- робить її порожньою. Складність має бути О(1). | void CStrings::Clear() {
Strings.clear();
} | 0 |
ade27c9750640beb0063674489420821 | 61e9df94592fecbc7927584efb2071b0 | Reads an unsigned 64-bit value from a little-endian buffer | posh_u64_t
POSH_ReadU64FromLittle(const void* src)
{
posh_u64_t v = 0;
posh_byte_t* p = (posh_byte_t*)src;
int i;
for (i = 0; i < 8; i++)
{
v |= ((posh_u64_t)p[i]) << (i * 8);
}
return v;
} | 1 |
aa6479213830cbdc7ef269321f985210 | 4fac444c77b0d02a6b1a861fb189d620 | Returns all the subsets of this set of nodes. This is a generator. | i = 0
diff = A001511()
for _ in range(self.k):
yield self.nodes[i]
i += next(diff) | 0 |
61268c42ebede81992d339a4eb9955d7 | 9900ce15efd2e993f6e1953ab969471d | 获取 日志类型(1.系统级日志,2.业务级日志), 类型long 默认值:0 | public class Log
public void setLogType(Integer logType) {
this.logType = logType;
} | 0 |
6c2e4b0af9c06082c22c4de509e035e9 | fd296318f83c03acacbf7b4078aea0ea | 构造静态文件 | func staticHandler(w http.ResponseWriter, r *http.Request) {
fs := http.FileServer(http.Dir("webapp/build"))
fs.ServeHTTP(w, r)
} | 0 |
38cd056d609a47b567a579cb7c535d8f | 7f61448ad6da3ef0f9cb03f40c5be655 | default to visible | cases like (1) | 0 |
7956db5b761e89a57898ec93974213a8 | c61703ee9b1c26daca5bcdb9917def45 | Generate unique ID string of 16 digits hexadecimal. | def make_id():
_ID_CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
return "{:0X}{}".format(
int(time() * 1000.0), "".join(choice(_ID_CHARS) for _ in xrange(6))
) | 0 |
ee3432294db208dcdf699f4a91ca1c18 | a2d9d57def41ef461c5f07fbe2899161 | Fetch the Sprite show flag status | public class ScratchSprite
public boolean isVisible() {
return this.show;
} | 1 |
550430719ac4c3c163bf2ededa48c5df | a97fbe18990163984261965e1a2e39c9 | Get absolute frequencies | def freqs(LO = 635):
return (arange(0,8192) * 1464.84375 * Hz + (LO * MHz * 2 + 144* MHz)).to(MHz) | 1 |
8f54302ee44a11611f5ed8a29b2095af | 3f4bfb08665d17aacc6e4fc58b70a43a | Destroys the given resource at the filepath | try:
os.remove(filepath)
return True
except IOError as e:
print e
return False | 1 |
2ffc24bede7cebeb3a381af1d73fd26d | c4c22bbbe1457781f6cf5bbeb840e7c6 | update the account using the customer ID and the amount deposit. | StringBuilder customerUpdateQuery = new StringBuilder();
StringBuilder customerTransInsertQuery = new StringBuilder();
StringBuilder customerSelectQuery = new StringBuilder();
DbConnection db = new DbConnection();
double dblTotalWalAmt=dblAddWalAmt+dblCustBalWalAmt;
customerUpdateQuery.append(QueryConstants... | 1 |
d7ee38c9c16967ae0f708a6a461912a9 | 745c9a250b1a54fbb82e496437b2fd9d | Tests writing to the memory and reading the same data back. | fn test_memory_read_and_write_byte() {
let mem: &mut dyn Memory = &mut vec![];
mem.resize(32);
mem.write_byte(U256::from(0x1d), U256::from(0xab));
mem.write_byte(U256::from(0x1e), U256::from(0xcd));
mem.write_byte(U256::from(0x1f), U256::from(0xef));
assert_eq!(mem.read(U... | 1 |
1e9633497c9df865553810432d8c6af5 | 2a62f32dc32e277b46865c175c4a58a1 | Whether the receivers lock on a particular session has expired. | public boolean isLockExpired(String lockName); | 1 |
9e13cb48b870788ca41c24cb46567b56 | 61c7dc11f2e3f304fdcd266dc7465fb8 | Compute raw data size from column statistics | cvd_cal_column_descriptor_t* column_descriptor,
uint32_t num_columns,
uint32_t* ret_size
)
{
uint32_t idx;
uint32_t meta_size = 0;
uint32_t type_size;
if ( ( column_descriptor == NULL ) || ( ret_size == NULL ) )
{
return APR_EBADPARAM;
}
for ( idx = 0; idx < num_columns; ++idx )
{
type_siz... | 1 |
de196e8f71a4d3e0a73d274c65555bd7 | cc51ba66fa2d49e9ae4ffc971d512d03 | Clear the group input | namespace ApusAnimalHotel.ViewModel.FoodDetails.RegisterDetailWindow
class RegisterHeader : INotifyPropertyChanged
private void ClearGroupTitleInputName()
{
GroupTitleInputName.ClearTextIO();
} | 1 |
bb5cd8d7f2f55d4ee78ddad5443d38a3 | f709075c513bd5013315c9e62f95d707 | Convert short [-32768;32767] to float range [-1.0f;1.0f]. | public final class Fp16Conversions
public static float bf16ToFloat(short input) {
int bits = input << 16;
return Float.intBitsToFloat(bits);
} | 0 |
905ef9e5e80a5dd93c7107cfc2310306 | 824a5a5195530970ab4115a9a1a9909d | Test case for sms_templates_get
Get lists of all sms templates # noqa: E501 | {
global $client;
$smnRequest = new \SMN\Request\Sms\ListSmsTemplatesRequest();
$smnRequest->setLimit(10)
->setOffset(0)
->setSmsTemplateType(1)
->setSmsTemplateName("模板");
$response = $client->sendRequest($smnRequest);
print_r($response->isSuccess());
print_r($response->... | 1 |
37c5c85aee4db731e36a561c6454acb3 | 429bfa87047b2f43d0f6f7c437e837d4 | Looks to see if there are database associated credentils that should be associated with the
content being uploaded | namespace Toute.Relational
public class ClientDataStore : IClientDataStore
public bool HasCredentials()
{
return DbContext.LoginCredentials.Any();
} | 1 |
5df28bd43710bc3f7abca8ccec92d68c | 1165f81172a1f34008e7aeba0e8c413c | Plot std. dev. as a function of time for checking PTMD convergence. | class LpcCov(BaseCov):
def plot_std(self, display=True, **kwargs):
std = self.get_std()*100
df = std.to_frame().reset_index()
df["L"] = df["L"].astype("category")
palette = list(colors.keys())[:len(df.L.unique())]
ax = sns.lineplot(data=df, drawstyle="steps-post", x="E", y="STD",... | 0 |
76a090c9d9b63edf1cbf357122b91598 | 77235c308329d009243e065fc2ff5ece | Edits a rp_rider_user | class Riderbind extends Backend
public function edit($ids = NULL)
{
$row = $this->model->get($ids);
if (!$row)
$this->error(__('No Results were found'));
$adminIds = $this->getDataLimitAdminIds();
if (is_array($adminIds)) {
if (!in_array($row[$this->dataLimitF... | 1 |
0415201d8f5f7f87bb833070bc5afa09 | 7344dc53da54a6b60d5b096062052b5d | Returns the magnitude or distance between two points. Will always be positive. | function Magnitude(p1, p2) {
return Math.sqrt(Math.pow(p2.X - p1.X, 2) + Math.pow(p2.Y - p1.Y, 2));
} | 1 |
c3e7460c7a27b7a01f5fda13af377aa5 | 4cba397e23e94c5a077588dfc23bbb7f | Performers a HTTP request that returns XML and deserializes that XML result into object. | namespace HttpWebRequestResponse
public class HttpRequestResponse : HttpWebBase
public T DeserializeXmlResponseAsObject<T>()
{
return ConvertXMLIntoObject<T>(HttpRequestRespond);
} | 1 |
9435acdf78c8d7d89daead5e8d2ea7eb | cbef4d878044a83c44c813bf5dd86318 | handles getTopics requests from client | @WebServlet(name = "TopicController", urlPatterns = {"/topics"})
public class TopicController extends HttpServlet
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
} | 1 |
6de32c8927b673b4369010d58585be5c | 6de01bf510442d4da894bbde40b1d4cf | !
The location where an Artifact is deployed onto a Node. This is typically a 'directory' or 'memory address'. | class VirtualMachineArgs:
def extended_location(self) -> Optional[pulumi.Input['ExtendedLocationArgs']]:
return pulumi.get(self, "extended_location") | 0 |
f68840128d988a070c3c68562fa698c0 | b026d01a5fd1feadbd3b5d83abe33dcc | term order for univariate polynomials.
One thing special to univariate case is that powers are not tuples
but integers. | class MultivariatePolynomial(RingElement):
def deg(self):
monomials = self.coefs.keys()
return (max([x.deg[i] for x in monomials]) for i in range(len(monomials[0].deg))) | 0 |
5df0b0edd8f8bd9324ff47ee95a5d0cf | b1d338b6c9e5292b7b655ee7fb585986 | Lectura de bit en memoria interna
bool con el estado del bit presente en la dirección de memoria EEPROM interna, en la posición indicada | namespace uWatchtable
class uGESRTP
public Boolean read_Q_BIT(int address)
{
byte[] msg_send = new byte[56];
byte[] msg_read = new byte[512];
this.msg_base.CopyTo(msg_send, 0);
Int16 word_val = 0;
msg_send[42] = (byte)SERVICE_REQUEST.READ_SYS_MEMOR... | 1 |
d278823ab6c7d092cbe2022c67761168 | 73a4f49a8021d3b0fd6a7cea5b396055 | 現在のアイテム群を用いて文字列を置換する。 | namespace DailyReportMaker public class RoomItem
public override string ToString() =>
ToString( "{1}" ); | 0 |
baf2caf5836e6e900987c5d86ee78532 | 9908c0d1ddafb40479308d6b96af2970 | https://leetcode-cn.com/problems/maximum-difference-between-node-and-ancestor/ | let min = Number.POSITIVE_INFINITY
let prevNode: TreeNode | null = null
const traverse = (node: TreeNode): void => {
if (!node) return null;
if (node.left) traverse(node.left);
min = Math.min(min, node.val - (prevNode ? prevNode.val : Number.NEGATIVE_INFINITY))
prevNode = node
if (node.right) ... | 1 |
ed0830db4f3d7dd0e1932f889b3ed759 | bae3edadbb1644f73ba702c8c39e103b | Set the z4 aca12 code. | class DecTvaCa12
public function getz45Ca12Code(): ?string {
return $this->z45Ca12Code;
} | 0 |
40866341c4f0229a14d0ac80f505d7e7 | 63d7be7251bc9cb52b9b07ec941fa33e | Returns the map of actions composing the sequence | public class StorySequence implements XMLLoadable
public Action getAction() {
return action;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.