query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
648e65f3538776d50e0688d78f76042b | bf68f8ee569f292de2cc1312ab2ebc84 | Method that randomly initialize the state of robot agent and surrounding envs (including target obj.) | class RandomAgent(TeacherPolicy):
def __init__(self, env):
self.env = env | 0 |
b6c89dfd7a8d7ce9c305b55d7861b2e2 | b28a07fbec60c1ac9118e3b3f5f99ae7 | Asal sayı testi | int asal(int x) {
size_t i;
for(i = 2; i < x; i++) {
if(!(x % i)) return 0;
else ;
}
return 1;
} | 1 |
c43b05e27b929229ab51783c9371a462 | 204e8f7827b11d2c8d00734605641965 | 2种可能:单姓、复姓 | export class ChsNameOptimizer extends SubSModuleOptimizer
isFamilyName(w: string)
{
return w in FAMILY_NAME_1 || w in FAMILY_NAME_2
} | 1 |
4e39e3e62ca753234826053301324d80 | df70e9d3a192ca8453a29151ad62d3a6 | Creation et edition de classe | class ClasseController extends Controller
public function create()
{
$niveaux = niveau::all();
$classes = Classe::all();
return view('admin.classe.create',compact('classes','niveaux'));
} | 1 |
756e02a356a0530c87f06ac3ba31fb4a | e9d81b45a4a14e34e94a21f2881738e1 | challenge1:Your age in days | datelist = []
for line in a:
date = line.get("DOB")
datelist.append(date)
daylist = []
for x in datelist:
x = x.split("/")
daylist.append(x[1])
daylist = sorted(daylist)
print(daylist)
mycount = Counter(daylist)
almost = mycount.most_common(1)[0][0]
return int(almost) | 0 |
03f855439582328f28964816a434ff80 | 8955aa5aafaff9c2ee65df3b2a81999b | 是否存在社交服 | if __WIN32 then
end
local snsMap = UserManager:getInstance().profile.snsMap
for k,v in pairs(snsMap) do
if v.snsPlatform == PlatformAuthDetail[PlatformAuthEnum.kMI].name then
if PlatformConfig:isPlatform(PlatformNameEnum.kMiTalk) then
return true
end
end
end
return false
end | 1 |
51cc53761f11ef3da0e7dab21fc04225 | 36b74ccb4250c38abbc1185cb7006e0b | Raises the IsSelectedPropertyChangedEvent. | namespace Infragistics.AutomationPeers
public class XamSliderThumbAutomationPeer<T> : FrameworkElementAutomationPeer, IValueProvider, ISelectionItemProvider
internal void RaiseIsSelectedPropertyChangedEvent(bool oldValue, bool newValue)
{
if (oldValue != newValue && ListenerExists(AutomationEven... | 1 |
694754da5d25feafad611d9ff88a3098 | ce62fa733fec30a942b02c5e59fcefd4 | Updates a `WorkweekConfig`.
See the corresponding object definition for field details. | class WeekDayAccessor(BasicAccessor):
def update_week_day(self, uid, **kwargs):
return super(WeekDayAccessor, self)._update_record(uid, **kwargs) | 0 |
33f868e9743ec0edf7aa1a2ee98a6f23 | 2728c415b8135368db4eeda5efc69bf8 | Sprawdzenie adresu IP na karcie sieciowej | {
int a;
int b;
int c;
int d;
sscanf(address, "%d.%d.%d.%d", &a, &b, &c, &d);
if(a >= 0 && a <= 255)
{
if(b >= 0 && b <= 255)
{
if(c >= 0 && c <= 255)
{
if(d >= 0 && d <= 255)
return true;
}
}
}
return false;
} | 1 |
16bd4400f314fd0696656a7fabc4b224 | 28e74c8cac943edb30eab7cdad0f7d0a | Gets the value of the <link linkend="gdbus-property-org-bluez-Device1.Blocked">"Blocked"</link> D-Bus property.
Since this D-Bus property is both readable and writable, it is meaningful to use this function on both the client- and service-side. | bool IsBlocked(); | 1 |
c2295681847ce560a67bc695024c6689 | e9efe1d2e48cb87045f2250b5924e142 | Преобразование в полутоновое | let tmp = this.celsius.toString()
tmp = tmp.replaceAll(',', '.');
let res = tmp * 1.8 + 32
return this.clearOutString(res)
} | 0 |
09517d5280faca4bd5a814ed76dd7972 | bdde271c77628e768f5847550ec5b9fb | 判断名字 | var name = document.getElementById('name').value;
if (name == '') {
document.getElementById('name').value = '请您输入名字';
}
if (!/^[\w]*$/.test(name)) {
document.getElementById('nameInfo').innerHTML = '<images src="images/err.png"/><font color="red" size="3">请输入名字!</font>';
flag = fa... | 1 |
5c3fc5741ede5c9227ed541dae1bcf65 | ab70d318737180698d1fc597454ae578 | Load must fail on a NULL database reference | class TestLoadDB:
def test_bad_load(self):
faulty_db_path = Path(__file__).parent / "test_dbs" / "faulty_db.json"
with pytest.raises(jsonschema.exceptions.ValidationError):
type(self).load_db(faulty_db_path) | 0 |
3427f8b59c3cc60184cedf06b9c6b91f | 98ccd770e314c90287cea8d563d418be | Ensure that all possible plainbox statuses are mapped to
one of the possible ALLOWED_STATUS permitted by checkbox
legacy infrastructure. | class XMLExporterStatusMappingTests(TestCaseWithParameters):
def test_status_mapping(self):
pb_outcome = self.parameters.checkbox_status
self.assertIn(pb_outcome, XMLSessionStateExporter._STATUS_MAP)
mapped_status = XMLSessionStateExporter._STATUS_MAP[pb_outcome]
self.assertIn(mapped_sta... | 1 |
2a83876d6600dd2e23d6bbc9ab07aa2c | 737eb8b6acffebd4be68729ca5359476 | Creates the action description to set protected. | namespace LibDatabaseCodeMaker.Database.SqlStatement
public partial class DeleteStatement
public class CPlusPlusLanguage : Language
public override string GetProtectedString()
{
return "protected";
} | 0 |
f0a09c39ac72915a842ede3e92e01f03 | de3f4c181014d622869f4fb689d0cd96 | Return the solution(optimum) size | class AbstractPermutationObjectiveFunction:
def getSize(self):
return -1 | 0 |
fbd1fa7a056c20077838bcf998f50c8f | cbad320b597b62e0d9ff770c7675559c | Finds the answer to a mathematics problem from a string. | parsed_ce = _ce_parser.parse(expression, _ce_token.tokenize(expression, options), options)
mtx = _model.build_matrix(parsed_ce)
pfx_list = []
for ce_item in parsed_ce.get_left_items():
pfx_list.append(ce_item.get_origin_prefix())
for ce_item in parsed_ce.get_right_items():
pfx_list.a... | 1 |
ba42132108504e05edbe538e4b5976ea | fef37b45055aa07de2b18d0a8a25cc6c | 将用户输入的值保存至Byte[]数组中 | namespace BFM.Common.DeviceAsset.Socket
public class SocketModula : ISocketCommDevice
public byte[] GetSendValueBeforeRead(string sendValue)
{
byte[] data = Encoding.Default.GetBytes(sendValue);
return data;
} | 1 |
1e0016df3ca5189f53576eaf552b768b | 1e0441b724362bb87c1727544500c15b | Method to create a beacon dictionary with the values that will be used on the Neighbor Beaconing process | return_dict = dict()
return_dict['sw'] = float(param.get('bandwidth')) * 1000
return_dict['obs'] = float(param.get('b1Freq'))
return_dict['car'] = float(param.get('lowestFrequency')) + (return_dict['sw'] / 2)
return_dict['label'] = param['rxChannel']
return return_dict | 1 |
a2dbb187502e5acdbfff4cd666af3a0f | c9a15c204db6a7cc5290aa1454ac278b | Discover and return all executables offered by this provider | function provides()
{
return [];
} | 0 |
3beec1da9f3c02b690c6db2e50f998b0 | e3b7bb23fc6e207c053a9ce7e77902af | Build a prompt by assembling fragments from loaded plugins that
implement 'make_prompt.'
This function demonstrates how to iterate over all loaded plugins. | class Builder(object):
def prompts(self):
pass | 0 |
5d7270dde7e2178a956a1d82dcebc7fa | 3df474401cc98715f3b829951b4eba21 | Are all the elements of the collection the same type of geometry | abstract class Dataset implements ArrayAccess, IteratorAggregate, Countable
public function homogeneous() : bool
{
return count($this->uniqueTypes()) === 1;
} | 1 |
7b974a9130857b72eff62e5f18e9b91a | d74fd9eb3e6b82befdb3da28866f8878 | 获取特定主机的组名称 | class EditHost(flask.views.MethodView):
def get_hostgroups(self, hostname):
result = common.get_all_groups_for_host(hostname)
groups = [ item["groupname"] for item in result]
return groups | 1 |
d635fc564843dc332dc8c2c033acb12c | 32115dd0df58bf8355775c861d3b89cf | 第1引数で指定されたフォルダ内のファイルを第2引数の条件で削除します。 | @JvmStatic
fun deleteFilesInDirWithFilter(dir: File?, filter: FileFilter): Boolean {
if (dir == null) return false
if (!dir.exists()) return true
if (!dir.isDirectory) return false
val files = dir.listFiles()
if (files != null && files.size != 0) {
for (file in fi... | 1 |
9248c89e5ae290a506b6d357c4fe72f4 | e393915b8e4cd1809555b97aa6a3e279 | apply the plugin corresponding to the value specified as run argument | def perform_action(args):
if args.create:
actions.CreatePlugin(args.create, args.package_version).run()
print('Plugin is created')
elif args.build:
actions.make_builder(args.build).run()
print('Plugin is built')
elif args.check:
ValidatorManager(args.check).get_valida... | 0 |
c6c375ee53ad9782517108e5f977f8a6 | 80e29ad7cda0c94ae7ba9b335ad01c5f | Stop Character movement | [RequireComponent(typeof(CharacterMotor))]
public class EnemyCharacterController : MonoBehaviour
private void Update()
{
motor.MoveCharacter(Vector3.zero);
} | 1 |
bc2330ed3a3efb511b6eda6f7798bb8d | 4a8ca5cf3ff698c4a7b2d958c30ceacb | ========================================*\
功能 : 释放内存池堆空间
参数 : (输入)堆空间指针
(输入)堆空间位置
返回 : 空
\*======================================== | void FreePool (void* Buffer)
{
gBootServices->FreePool (Buffer);
} | 1 |
84b102daa9982ed404e4576ba8a1a4a1 | 78174b05811091dabae9ebd8f085ca6d | Salva a imagem com o nome, local e tipo de arquivo definido pelo usuario | class ImageReponsitory
public function save(UploadedFile $file)
{
$filename = $this->generateRandomString(32);
$originalName = $file->getClientOriginalName();
$pos = strrpos($originalName, '.');
$extensition = substr($originalName, $pos);
$filename .= $extensition;
return $fil... | 0 |
c307e34ece5aebb1f633c9bb26c1c676 | 01125726825184f175d2739bb01c764e | Method that returns a list of all logs from Kegging process | public List<String> getLogs(); | 1 |
81a058c821e0d08fe83d5007c4dde61b | 2482d7295e7c230164284992c1f9d37b | Returns true if the current token is a digit (consisting of numbers only); otherwise, returns false. | (
char nextCh,
const std::string curText
)
{
return isdigit( nextCh ) != 0 ? true : false;
} | 0 |
d93ee64b7eb15c4bf7d55d1efd4f0024 | a76b81f8f86ee80090f31afe7e7ca503 | • Module for sending responses to the client. | function vscaux.send_response(cmd, rseq, body)
seq = seq + 1
local res = {
seq = seq,
type = "response",
success = true,
request_seq = rseq,
command = cmd,
body = body,
}
vscaux.send(res)
end | 1 |
35f64efef60ada31e17580cb1cbfda0d | 51e7bdd34352dbf8cd32b54e43733d00 | 6. Write a Python program to find the first appearance of the substring
'not' and 'poor' from a given string, if 'not' follows the 'poor',
replace the whole 'not'...'poor' substring with 'good'.
Return the resulting string. Sample String : 'The lyrics is not that poor!'
'The lyrics is poor!' Expected Result : 'The ... | line = re.sub(r"won't", "will not", line)
line = re.sub(r"can\'t", "can not", line)
line = re.sub(r"n\'t", " not", line)
line = re.sub(r"\'re", " are", line)
line = re.sub(r"\'s", " is", line)
line = re.sub(r"\'d", " would", line)
line = re.sub(r"\'ll", " will", line)
line = re.sub(r"\'t", " not", line)
line =... | 0 |
17be3a4e8c1480ff180b2f859565138c | ce9049214cf200e222179e0c15bd165c | Returns a list of regex patterns for recognized domain names | $result = [
'localhost' => ['localhost'],
'.com' => ['example.com'],
'IP address' => ['127.0.0.1', true],
'2 letter tld' => ['google.ca']
];
return $result;
} | 0 |
ddf249b49f1becef0ee81e5c32ec236a | c379b69222d89f9e43d0bc9ea07b9913 | Get the date at which the news item expires. | class News extends Item
public function getDate(): ?\DateTimeInterface
{
return $this->date;
} | 0 |
9a5fe7f3c22906213a2423cb835b8132 | b4f406a54020a4551755c98fb1cebbfa | Ensure we can search for a specific generic reference by
providing its DBRef. | public class CustomerTest
@Test
public void testGetReference(){
Customer customer = entityManager.getReference(Customer.class, 100);
System.out.println(customer.getClass().getName());
System.out.println("========================================================");
System.out.println(customer);
} | 1 |
cfed881b4c09a6d1a7eea4a88ab8b4c0 | 1b3b70c62011c2637a3c6ea1cb8c000c | @brief: 梯形公式数值积分算法 | Float eps = 1e-6f, int depth = 6) {
int count = 0;
std::function<Float(Float, Float, Float, Float, Float, Float, Float, Float, int)>
integrate = [&](Float a, Float b, Float c, Float fa, Float fb, Float fc, Float I,
Float eps, int depth) {
Float d... | 0 |
3d7743becd34fa01637f355249395eaf | a968112b230ce91596529d1eff94f3b0 | Делает кнопку "Сохранить" доступной | function enableButton(element){
element.removeAttr("disabled");
} | 1 |
87a73dfe4c2bc45e247399d63950dce7 | d661720e1df58e5cf6072031588f9f48 | Cập nhật lại các liên kết sự kiện giữa view và viewmodel | void ViewModel::connectActions() {
connect(&m_mainView, &MainView::NotifyLoadInst, this, &ViewModel::onNotifyLoadInst);
connect(this, &ViewModel::NotifyLoadInstError, &m_mainView, &MainView::onNotifyLoadInstError);
connect(&m_mainView, &MainView::NotifyStep, this, &ViewModel::onNotifyStep);
connect(&m_m... | 1 |
28d7830a8de26f95a5627aa0a0500298 | bce92c45b512f1cd7dc73cdb60d09065 | 获取Grid新增和编辑过的脏数据 | function getgriddata() {
griddatanew = [];
griddata = [];
$("#modifynum").html("");
loadpage();
$.post('/WebService.asmx/GetGridDatas', {
NewTime: GetUITime().format("yyyy-MM-dd hh:mm:ss"),
model: model,
ybsx: ybsx,
savetype: savetype,
username: forecasterName... | 0 |
9d871cee418e079a54a5a29b572e0f53 | 8721590ffb14944e5d9c54c231d66a3b | Create a new command executor instance. | public function __construct(array $commands = []); | 1 |
bc642597d3638671267f4266e872b6b9 | 01264b5318aeb669127d9a6039468155 | Unmarshal - Unmarshals YAML action. | job := new(Job)
if err = json.Unmarshal(value, &job); err != nil {
return
}
res = job
return
} | 0 |
fce99d605e7da8e941d5466b03b4c913 | 7b39481c16951f737bb8c41a196c5f81 | Recursively builds the `_Prerequisite` type given a `ParseTree` from the `tokenizeByOperator`
function. | if type(ast) != tuple:
raise ValueError()
if len(ast) == 1:
return cls.from_character(ast[0])
else:
operation = ast[0]
if operation == 'concat':
return cls.from_ast(ast[1]).concat(cls.from_ast(ast[2]))
elif operation == ... | 1 |
a828b81705f1aa4bfaebd02e6c8604e4 | 98ea3ce928a3d3bc0ae642969e5b7d0b | @brief set flag to trigger shutdown of server | class BUNDYServer:
def _trigger_shutdown(self):
self.__shutdown = True | 1 |
e1fd916dd22a988a954e8f1066d9e655 | ec87e5876e7d5f74a5c73cbb68c2444e | Update the table storage to contain the result of the specified build. | {
if (BuildUpdated != null)
{
BuildUpdated (m_underlyingBuildsProvider, args);
}
} | 0 |
9c28d32df234037773be184dbdafc274 | 7f61448ad6da3ef0f9cb03f40c5be655 | matches | cases like (1) | 0 |
6abe7e46ed58edf23fb51334166ed28c | cb96cea21db40c0e4756d2674a4ebb04 | Adds initial bias based on creator preference | PendingResult initializeBias(); | 0 |
82e2a8cdebcb9ae277f72a92ab4db38e | c784fe2eb969ca4163563c044122fd80 | 获取下载位置(刚开始下载的情况)的起始指针和结束指针,并存放到数组中 | class ThunderManager private constructor()
private fun createDownloadIndex(
selectIndex: Int,
torrentInfo: TorrentInfo,
videoFileInfoList: List<TorrentFileInfo>
): Pair<BtIndexSet, BtIndexSet> {
val selectFileIndex = videoFileInfoList[selectIndex].mFileIndex
val selectIndexSe... | 0 |
5d347a1b256928eb9cd3433e386509a7 | 439571ce93dffa61147d7f74693185a8 | 方法描述:查找所有的职工号,用于批量密码初始化 | @Service("employeeService")
public class EmployeeServiceImpl implements IEmployeeService
@Override
public List<String> findAllEmpno() {
return employeeMapper.findAllEmpno();
} | 1 |
e96fe39848e53ca4a4f07e0a68074433 | 1ce9c7cbedd0164e4f6c619593b1ae3b | This is the function that gets the number of years of a membership subscription | now = datetime.datetime.today()
enroll_date = datetime.datetime.strptime(self.enroll_date, "%Y-%m-%d")
diff = now - enroll_date
length_in_year = round(diff.days/AbstractStudent.DAYS_IN_YEAR,2)
return length_in_year | 1 |
e6dde048147568030e48ec76836bf928 | 9856c47cb7183483803188709d26d80d | Index page, showing all posts | def index(request):
post = BlogPost.objects.order_by('date_added')
context = {'index': post}
return render(request, 'Blogs/index.html', context) | 1 |
215fb1e4d7e9b640bf9868873ab6415c | 8550acdffcf489247fb1e682658205ab | exponential smoothing of soil moisture | n = self.eddyext
a = math.exp(n) / (n * EnergyBal.vonk * self.ustar)
b = math.exp(-n * EnergyBal.soilroughlen / self.treehgt)
c = math.exp(-n * (self.z0 + self.d) / self.treehgt)
return a * (b - c) | 0 |
cfe18af0f8a8458d97736031a628e663 | 095ad58a289e7601cdc971077d2a34f7 | Signalデリゲート型の変数xを宣言するとともに、
Redメソッドへの参照を格納したデリゲートオブジェクトを生成して、
変数xに代入している | class DelegateNote
static void Main()
{
SayPointer sayPointer = new SayPointer(Hello);
sayPointer();
sayPointer.Invoke();
} | 0 |
eac4df47fe6da6f5c01d9c7c32938620 | b1b5b2b64e49663973b787f77643847e | Sets handler binding file information. | stock void ConfigSetConfigHandle(int iConfig, ArrayList iFile)
{
gConfigData[iConfig].Handler = iFile;
} | 1 |
4ff0188804d6c9e1edbc68addee813a8 | ccb05dda81f06947a9e1aaed1d94b9db | Sets in __object the obj with key <obj class name>.id | class ObjectHit
public function setIdObject($id)
{
$this->id_object = $id;
return $this;
} | 0 |
3f9b328376954c59a0a8854bd049cca5 | a3d4f2a021d7194f0427c9f4656487aa | Retrieve the checked option values | class ConfigureSwitchingDialog(GUIObject):
def checked_options(self):
ret = [row[0] for row in self._switchingOptsSort if row[1] and row[0]]
return ret | 1 |
d98b0cca19ccd1b3397914931be8915e | 95586d2b25c37adb9c92b12ed24172ba | Calculate the transform vector form screen-space to view-space | {
ZFXMatrix *pView = NULL, *pProj = NULL;
ZFXMatrix mInvView;
ZFXVector vcS;
DWORD dwWidth, dwHeight;
if (m_Mode == EMD_TWOD)
{
dwWidth = m_dwWidth;
dwHeight = m_dwHeight;
pView = &m_mView2D;
}
else
{
dwWidth = m_VP[m_nStage].Width;
dwHeight = m_VP[m_nStage].Height;
pView = &m_mView3D;
if (m_Mod... | 1 |
c4020cb8ed66996e0c76175b5c2eed02 | 73d5fc56777e358962d76dad792044b3 | [0,x)でのクエリがk以上の最小のx | int query(int k) {
if(cnt-1 < k) return -1;
Node *left, *mid, *right, *o;
k = cnt-k+1;
split(ss.root, k, left, right);
ss.root = merge(left, right);
return left->v;
} | 0 |
64f4c498e5c01c9e3def3291b4e2df06 | 131284914e200b0023e5fedc30a23dd0 | Covert between different raw CDF times. | times *= self.time_factor
p['mass ratio'] = np.log(p['mass ratio'])
return times, p | 0 |
020935cd96f0107ccb5f209ea721025c | 960efd0314e6916c2d1863a66349a9d2 | 输入金额是否大于最小投资金额 | @Service
public class OrderService extends CommonService<Order>{
public Map<String,Object> checkMinOrder(Order order) throws Exception {
Map<String,Object> map=null;
order=this.getOne(order);
Product product=new Product();
product.setId(order.getProductID());
product = productService.getList(product).get(0);
... | 0 |
961715f4d34aaad404fdf24496b3d8cc | 7f0c8eeb3f321717ec32530171ba48b1 | 从hbase表中获取图片相关详情信息 | public ThreeDImage find(String key) {
Result rs = mHbaseOperationImpl.queryByRowKey("cloud_threeD", key);
return mBeanMapping.threeDImageMapping(rs, key);
} | 1 |
68c5b0f7dd0c0a17360f48a04df0c206 | 324e371efada69c5ca6e706ef3b0282c | 释放有序集合对象的值,根据底层编码不同释放操作不同 | public class SaveSwitchedPlayerListServerRequest extends GameToGameServerRequest
@Override
protected void toRelease(DataPool pool)
{
super.toRelease(pool);
if(this.datas!=null)
{
if(!this.datas.isEmpty())
{
long datasKFreeValue=this.datas.getFreeValue();
long[] datasKKeys=this.datas.getKeys();
... | 0 |
c3676eea7a90246e3209257e6bd3148b | fbde819606486b5b859b9e3012b07e6e | extract 13 MFCCs from the given signal with frame size = 512 samples, frame step = 256 samples | def open_file_mfc(filename):
mfcc_file = open(filename,"rb")
data_bytes = mfcc_file.read()
(frame_num,frame_cyc,mfcc_bytes,feakind) = struct.unpack(">iihh",data_bytes[:12])
mfcc = []
frame_start = 12
for i in range(frame_num):
mfcc.append(list(struct.unpack(">"+'f'*39,data_bytes[frame_st... | 0 |
c654c4849bffec59cea6aa0d03d41048 | bf25528eeadd52aca43268fc291c127a | 根据孕妇档案号获取孕妇随访记录。 | public class ObstetricsInitDAO
public List<ObstetricsInitBean> getObstetricsInitByMID(long patientMID) throws DBException
{
try (Connection conn = factory.getConnection();
PreparedStatement ps = conn.prepareStatement("SELECT * FROM obstetricsInitRecords WHERE patientMID = ?"))
{
ps.setLong(1, patientMID);
... | 1 |
a5b4ffbcf918de05c4aa52a9f346fe4b | 3453bbe4f12b784497dfc9146c27bb63 | Sets the rating option for text comparisons | public class MainActivity extends Activity
public static void setCriticsText() {
String critScore = getRating.critics;
String myRatingStr = getRating.getRatingString(Integer.valueOf(critScore));
if (myRatingStr == "bad") {
ratingMessage.setText(badString);
ratingsImg.setBackground... | 1 |
e88ee3a9d9e1e14a01074b466c08b49f | 3f661689084b07e9f5ccbe5b32671bef | Display the map on the console window | void Map::showMap() {
cv::imshow("Robot Map", m);
cv::waitKey(1);
} | 0 |
e8e2ce561d882e7d5b12f26fd9cd1ba0 | 4db4e361a9a2dd6950d2dae37259b9e0 | Create an account status Create an account status record for an account. | req: CreateAccountRequest,
cb?: (error: string, rep: CreateAccountResponse) => void
): Promise<CreateAccountResponse> {
return this.request("CreateAccount", req, cb)
} | 0 |
25afddd4560da9c6158a93ab57c66f9e | 126db5b5b8b6ed6fbdb1319874c6509f | Returns the convention mapping for the properties of this object. The returned mapping object can be used to
manage the mapping for individual properties. | DocumentConventions getConventions(); | 1 |
6143e8ff481264c1a264e769932d09c7 | fe1495077de6bab8eaf91d06fb5e2826 | Construct a class for a component that is observable. | def makeObservable( klass, attribs, msg, prefix = 'Observable', observer_type = RecursiveAttributeObservable ):
name = '%s%s' % (prefix, klass.__name__)
new_observable_klass = type( name, (observer_type, klass), {} )
def __init__(self, *args, **keys):
observer_type.__init__(self)
klass.__ini... | 1 |
3c46a0780e743b92ad881d1a4f8bac05 | cf14e6ba016b7ad98576fbbfbf1e1026 | Sets package status. | class Package extends \Phalcon\Mvc\Model
public function setStatus($status)
{
$this->status = (int) $status;
return $this;
} | 1 |
b20f4cccf715d674ed932cc4b51ac405 | 57c2543f42b8707c1a6f1949556ad0b6 | Expects a RestProxy that it will use to communicate with the server for
authentication. | public class HttpClientBuilder
public HttpClientBuilder withProxyAuthentication(PasswordAuthentication auth) {
return withProxyAuthentication(auth, null);
} | 0 |
d74b42d58bd56c1887acf4ab295860df | a50d03e90c7e40395368e3b7004e9ace | Updates the maximum value of the slider. | namespace Avalonia.Controlz.Controls
public class SliderEx : RangeBaseEx
protected virtual void OnMaximizeValue()
{
this.SetValue(ValueProperty, this.Maximum);
} | 0 |
184b5e3e00c1e73f27938f6d3987ec0f | 9dd2970d3701976f9661ef5c396f1d58 | returns the complex conjugate MPS | from sage.combinat.words.word import Word
w = []
conj = self.conjugate()
for row in conj:
w += list(reversed(row))
return Word(w) | 0 |
bd7151070d873056c420a8623f9fb119 | d4343f3ff2b01a0cbfd54230211d3190 | Compact database file. Free more space compared to <see cref="ShrinkDatabase"/>, but require re-create database file.
Note, that file should exist at the moment when service try to open returned connection or run-time exception will be thrown. | namespace Svnhost.Data
public static class JetAccess
public static string CompactMDB(string mdbFilePath)
{
return CompactMDB(mdbFilePath, null);
} | 1 |
181c11d05a36f28eb043c185ec8a2fc7 | d38edbec2a01844720098369f306418b | Кнопка изменения информации об источнике. | namespace MMTEvaluationSystem
public partial class InformationContent : UserControl
private void btnEdit_Click(object sender, RoutedEventArgs e)
{
stackPanelRoot.Children.RemoveAt(3);
stackPanelRoot.Children.Insert(3, InformationEdit);
((Button)sender).Visibil... | 1 |
1618ed7081fae9284953528959fef14b | 48821654a3de1c97c6c1f7c9ec807766 | Gets activationsRemoteTrackingComputer | class GetCharactersCharacterIdStatsModule implements ModelInterface, ArrayAccess
public function getActivationsTrackingComputer()
{
return $this->container['activationsTrackingComputer'];
} | 0 |
217cd017e9356fa61ed4a1baba63b4e8 | 8d43b7cbdad15d04286c74c36fc85121 | Logout and remove session token | class Auth(object):
def logout(self):
if ('auth_token' in session) and (session['auth_token'] is not None):
token = session['auth_token']
auth_token = self.token_cls.query.filter_by(token=token).first()
self.db.session.delete(auth_token)
self.db.session.commit()
... | 1 |
ddfc95817c9d1888df08a1485f0fb033 | f8e13afdda3ce795ca1e1bb0d00d771e | 获得今天是否处理了的反馈信息的总数 | @SuppressWarnings({ "rawtypes", "unchecked" })
@Repository("receiptManageDAO")
public class ReceiptManageDAO extends AbstractPosDAO
public Integer getMyFeedBackTaskCount(String user) {
return (Integer) queryForObject("QUERY_MY_FEEDBACK_TASK_COUNT", user);
} | 1 |
6e00ebe38c616fe83e463a284bc85445 | 442c104a51f79554f81051f9b759973a | 根据marks中存在的字符分割字符串,分割字符串 | {
List<String> list = new ArrayList<String>();
StringTokenizer st = new StringTokenizer(str, mark);
while (st.hasMoreElements())
{
String token = st.nextToken();
list.add(token);
}
return list;
} | 1 |
e11a7bc4985475043c8248f97e7dec4a | 5b4cd63dac69ff46f52d9d6967361c08 | 连接所有的Tracker | {
QTcpSocket *tcpSocket = nullptr;
QListIterator<QTcpSocket *> tcpIterator(tcpSocketList);
if (metaInfo == nullptr || metaInfo->announceList().isEmpty())
return;
if (tcpSocketList.isEmpty()) {
foreach (QString host, metaInfo->announceList()) {
if (!host.startsWith("http://"... | 1 |
49f59d0fbe2a7bebd9aa24f75f709013 | cffd02811359ee5d51654e04f52f214a | A method to get a carOwner by using its ID | {
using (SqlConnection con = new SqlConnection(conString))
{
try
{
TaxiOwner taxiOwner = new TaxiOwner();
using (SqlCommand cmd = new SqlCommand("spGetTaxiOwnerById", con))
{
... | 0 |
28132128e9ce05e0b1686eec472c0a37 | 280a9c248116a8d3b812a6e55f2fb213 | upon initialization of equation the sets are generated | StatusCode EqSolverGenAlg::initialize() {
MsgStream log(msgSvc(), name());
log << MSG::INFO << "==> Initialise" << endmsg;
StatusCode sc;
sc = toolSvc()->retrieveTool("EqSolver", m_publicTool );
if( sc.isFailure() )
{
log << MSG::ERROR<< "Error retrieving the public tool" << endmsg;
}
sc = too... | 0 |
94561a89723f2e685bb3f7b87de82873 | 19c2f0af87beb30d55d6af14ad0ca529 | include TLB version in the interop name | pub fn tlbi_vae2is_tlbi_vae2isnxs() {
unsafe {
llvm_asm!("tlbi vae2is");
}
} | 0 |
9b28146a64778dfcafaabe78efae5b9e | 9e42533a6cf2774eaf1e4d775358effc | 精品帖子查询 | public Map<String, Object> getItemsJuTbk(@RequestBody QueryParameterDTO queryParameterDTO) {
Map<String, Object> result = new HashMap<String, Object>();
result = taoKeAPIService.getItemsJuTbk(queryParameterDTO);
System.out.println(result);
return result;
} | 0 |
c35b6addcf43460dd9ff8dcecd2e25dd | 23d4d63bb94984386f19e64982037523 | Método para guardar a la entidad FuentesFinanciamientos | public void saveEstudios(Estudios entity) throws Exception; | 0 |
50267c13224e878eb300ea2aec0c2c4a | 68cf9a1fbaeb468ccf65fec4bb1939b1 | Gets the "CategoryType" attribute | public class MoissPIVORowImpl extends OAViewRowImpl
public String getAttributeCategory() {
return (String) getAttributeInternal(ATTRIBUTECATEGORY);
} | 0 |
2cf861fe189aafacf3c38b943019af3a | dc37e2ecc25d8f6e2acc974cf2e33966 | @brief Converts a response header in network-endian to host-endian | Header Server::hostize(Header msg)
{
msg.size = ntohl(msg.size);
return msg;
} | 1 |
4ec17109a2cd99c25fde089546c41673 | aaf61030a7f8d7a34aa55eec03c633db | <para>Checks the status of an invite sending process handle.</para>
<para>This API call may be repeated if it returns MLResult_Pending for a request handle.</para> | ret_ad, args = jitter.func_args_stdcall(["InfHandle", "EnumerationIndex", "ReturnBuffer", "ReturnBufferSize", "RequiredSize"])
raise RuntimeError('API not implemented')
jitter.func_ret_stdcall(ret_ad, ret_value) | 0 |
e8c864b37d208a15b1a9550d252d625f | 11438b2175ad9c7492ffaf7bbc01e4b0 | 批量增加Tab控件 | public abstract class BaseScrollTabActivity extends BaseActivity
public void addTabItems(Map<String, Tab> data) {
mData = data;
for (String key : data.keySet()) {
View view = View.inflate(mContext, R.layout.tab_base_home_layout, null);
ImageView icon = (ImageView) view.findViewById(R.id.tab_home_iv);
Text... | 1 |
e77561421281172bc5ef295a51838f47 | e83fbb44df1c7e2b26c49cb11bde78ff | Setter for post_count | public function setCountPosts($value); | 1 |
7b3c1cd782cd9f6ef7bf4f65bd5dae90 | d64b743aab977ae996b2ec8008d9e31b | Returns true if we have a valid (i.e. non-null) input. | public class Sorter implements Serializable, PostProcessable{
public boolean hasInput() {
return inputs.size() > 0;
} | 0 |
72b7456428db7ae0dbea63ca06938d3c | 50f2f885aa31498855c20daced574a0e | Function to recover an amount of shield. | {
if (invulnerable)
return;
if (amount < 0)
{
Debug.LogError("Negative numbers not allowed");
return;
}
if (!godMode) {
currentShield -= amount;
if (currentShield <= 0)
{
currentShield ... | 0 |
d178369e157535dbbe538326c6a3956c | ee902020505a209ef0a29c21d8d1404a | 统计今天登陆用户的数量 | @Repository("statisticsDayDao")
public class StatisticsDayDaoImpl extends GenericDaoImpl implements StatisticsDayDao
public int getTodayLoginNum(Date date) {
return this.selectOne("StatisticsDayMapper.statistics_loginNumToday", date);
} | 1 |
fff28c1d1b806b678e16ce3d24dd4d88 | d7f9fc156e2795fa64bc8777818e426c | $Procedure VDOTG ( Vector dot product, general dimension ) | doublereal ddot_(
integer *n,
doublereal *dx,
integer *incx,
doublereal *dy,
integer *incy
)
{
integer i__1;
doublereal ret_val;
static integer i, m;
static doublereal dtemp;
static integer ix, iy, mp1;
--dy;
--dx;
ret_val = 0.;
dtemp = 0.;
if (*n <= ... | 1 |
2f611715219fdca67d057536731364a1 | b83d60aabde0aff7ecc93bcf196fcba6 | 绑定session到linekey上 | public class SessionLine
public Object hasSession(){
clear_noSessionId();
SessionData.Builder sessionBuilder = SessionData.newBuilder();
sessionBuilder.setSessionId(sessionId);
String id = UUID.randomUUID().toString().replace("-", "");
sessionBuilder.setId(id);
sessionBuilder.setType("hasSession");
Sessio... | 1 |
632dc22b47ba2609fe9247f633343004 | a6c7849984cf8e690e35dd467468412e | Set the appropriate scale for this menu item. | {
String zoomFactorPercent = "" + (int)(_zoomFactor * 100);
for (int i=0; i<_menuItems.size(); i++)
{
JMenuItem currentItem = _menuItems.get(i);
if (zoomFactorPercent.equals(currentItem.getActionCommand()))
currentItem.setEn... | 0 |
f887f64077d9e2d918d7ddf26d1574d9 | d084e1bad8cacaca49831f6173aab106 | 当前行高亮 | namespace Micube.SmartMES.QualityAnalysis
public partial class ChemicalRegistration : SmartConditionManualBaseForm
private void View_RowStyle(object sender, RowStyleEventArgs e)
{
GridView view = sender as GridView;
if (e.RowHandle == view.FocusedRowHandle)
{
... | 1 |
e03cc1322c62852cfc1c1216ec4fc979 | 294aa4d54ee03cad33d5022990d97b56 | Clear ATL, CTL, & TSB chart values | {
unsigned int value, value2 = 0;
switch(priv->kind) {
case controller_sh_ata6:
value = 0x0a820c97;
value2 = 0x00033031;
break;
case controller_un_ata6:
case controller_k2_ata6:
value = 0x08618a92;
value2 = 0x00002921;
break;
case controller_kl_ata4:
value = 0x0008438c;
break;
case c... | 0 |
fe05620177737abe6757522c36560ae9 | aa9b5a1e6da263c9f8cdddc3edbd99d8 | 获取商品的订单 | class Product extends \yii\db\ActiveRecord
public function getOrders()
{
return $this->hasMany(Order::className(), ['id' => 'order_id'])->viaTable('{{%products_in_order}}', ['product_id' => 'id']);
} | 1 |
2e54ef89681e4085b86a9ccfef5bc358 | 0bd13ed589082dabdccaa7c23bf15840 | Добавить отдел в коллекцию | namespace OrganizationGUI.Classes
public class Organization
public void addDepartament(Department dep)
{
departments.Add(dep);
} | 1 |
b9878e6912d80aa864721b1be658dda7 | b867c2637fbdb07cea3e2329e40072b9 | 在编译, 以及调试的时候,经常会有说你的某个文件...但是对于用户来说, 没有必要知道在服务器中的具体路径 | function devtoolModuleFilenameTemplate(info) {
if (info.resourcePath.match(/\.(vue|css)$/) && info.allLoaders) {
return `webpack:///${info.resourcePath}?${info.hash}`
} else {
let here = info.resourcePath.startsWith('./') ? '' : './'
return `sources://${here}${info.resourcePath}`
}
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.