query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
51cdbb807932a589e84ec387667c11ee | f9d1684c2bb25c1ffc99c802865a4920 | Returns the uncalibrated raw gyroscope data readouts | class L3GD20_SPI(L3GD20):
def gyro_raw(self):
buffer = self._spi_bytearray6
self.read_bytes(_L3GD20_REGISTER_OUT_X_L_X40, buffer)
return unpack("<hhh", buffer) | 1 |
127665d3de287472f6d5ddd0fdd37519 | 0a85a84aa2304a9d1972118250bda248 | Create a model with double gaussian with offset. | def d_gaussian_off(x,A1,x01,sig1,A2,x02,sig2,o):
return (A1*np.e**(-(x-x01)**2/(2.0*sig1**2))+
A2*np.e**(-(x-x02)**2/(2.0*sig2**2))+o) | 1 |
2753f151cd980775c9c792f15b8149b4 | 45ea9f1fa8021ed062ba40e512a64707 | 会员卡消费撤销 | public void updateCancel(PageData pd, String openid) throws Exception {
pd.put("CARD", pd.getString("USER_CARD"));
PageData pdCancel = cancelService.findByCode(pd);
if(pdCancel != null && pdCancel.getString("STATE").equals("1")){
pdCancel.put("CONSUME_SOURCE", pd.getString("CONSUME_SOURCE"));
pdCancel.put(... | 1 |
b92402ad8ae7998858f40b5946aa5ed8 | e0f3a444bf9d7cf545f56fa9535fdeea | Copies a boundary's positions to this shape's internal boundary list. Closes the boundary if it's not already
closed. | {
int count = vertices.Length;
if (count < 3)
{
return;
}
m_count = count + 1;
m_vertices = new Vector2[m_count];
Array.Copy(vertices, m_vertices, count);
m_vertices[count] = m_vertices[0];
m_prevVertex = m_vertices[m_count - 2];
m_nextVertex = m_vertices[1];
} | 1 |
27a7e90398dd5cb8add0ae6fa5fd008e | 8d456ce5cec509ab5411656526d2e38b | Stop nic core gracefully. | {
struct arcnet_local *lp = netdev_priv(dev);
netif_stop_queue(dev);
AINTMASK(0);
ACOMMAND(NOTXcmd);
ACOMMAND(NORXcmd);
mdelay(1);
lp->hw.close(dev);
module_put(lp->hw.owner);
return 0;
} | 1 |
094c2938f41a740f9b76dff343bafdfa | fe638f750e973732371a13cd7e55ba22 | Container som håller alla värden från roboten och uppkopplingen till den. Är också en kontroller i den mån att den
skickar kommandon och förfrågningar till roboten över uppkopplingen. | class Controller(object):
def __init__(self, interpreter=None, io=None):
if interpreter==None:
interpreter = Interpreter()
else:
self.interpreter = interpreter
if io==None:
io = IO()
else:
self.io = io
interpreter.controller=... | 1 |
a0dd2794948298cb3453c4eea00b34a9 | b91918095baa65d081902faf32054b48 | 测试add()方法 | public class TestStu
public static void testAdd() throws Exception{
Student stu=new Student();
stu.setId("102");
stu.setName("wangwu");
stu.setAge("50");
StuService.addStu(stu);
} | 1 |
c09e369402dea7b4d9f1dd5cb75fd7d2 | 6ec9e5e9bd1cc29b2960b8477df2bbd8 | Busca uma lista de eventos pelo id do componente. | def get_by_case_id(*, db_session, case_id: int) -> List[Optional[Event]]:
return db_session.query(Event).filter(Event.case_id == case_id) | 1 |
8874c138ebeaf4e459e215e37559e28e | 7a91ee440189aed05224579f9293222c | Retrieve all notifiable identities. | @Transactional
@Service
public class CodexService
public List<Identity> getNotifiableIdentities(final Date date) {
return identityDAO.findNotifiableIdentities(date);
} | 1 |
2b42206542603ba7f45067692d9d87dd | 115b1e11693593ebb1ceac7858412012 | 减少指定英雄的指定技能的当前Cd时间 | class Game_BattlerBase
def dec_cd(skill = nil, d = 1)
if skill == nil
return dec_all_cd(d)
end
return if get_cd(skill) <= 0
v = @skill_cds[skill.cd_type]
@skill_cds[skill.cd_type] = [v - d, 0].max
end | 1 |
e159e00914a8c574a6861e4b7eb40976 | 34170e956c8de3c46e22b11a89ddd2d4 | Must be called by subclasses when the shape changes to inform listeners of the change. | public abstract void hostChangesShape(); | 1 |
6dec5c3cc1cbf4a0d5d9a285abf41efb | 5670619b42ac5b5fb7f0367137ec15d5 | Allocate space for the light data and light data uniform locations | {
m_lightID = s_totalLights++;
m_ambient = glm::vec3(1.0f);
m_diffuse = glm::vec3(1.0f);
m_specular = glm::vec3(1.0f);
m_attenuationConst = 1.0f;
m_attenuationLinear = 0.0f;
m_attenuationQuad = 0.0f;
GLfloat vertices[] =
{
-1.0f, 1.0f, 0.0f,
1.0f, 1.0f, 0.0f,
1.0f, -1.0f, 0.0f,
-1.0f, -1.0f, 0.0f
};... | 0 |
014864f0d15e2501a7c71920e147f4f9 | 95079a0f690f8a4ea6c72e56668e0569 | Считать формулы из базы конфигурации | {
string str;
base.OnReadXml(reader);
if (((str = reader.Name) != null) && (str == "Formula"))
{
this.formula = (string) (Serializer.DeserializeObj(typeof(string), reader) as string);
}
} | 1 |
0ca02a7ef2e161f944e65bc333703467 | b3835cda2dba61ad0be60ce946b58baf | Use this function to let the train know that it’s on board. | class Station
def accept(train)
@trains << train
end | 1 |
8ba57c7a8823c40560f5740e95591618 | e55e3feb9b32d242a579ad647dff2a9c | Отрисовываем первый кадр,
чтобы экран не был пустым на старте | {
pbBackground.Image = Properties.Resources.bg;
g = Graphics.FromImage(pbBackground.Image);
if (!isAnimation)
g.DrawImage(ball_image, ball_rect);
for (int i = 0; i < thimbles.Length; i++)
g.DrawImage(thimble_image, thimbles[i]);
... | 1 |
e721fb5554949521aefe3c7300947668 | d2960ade71919eade10fdb31878d9cf5 | Gets input from the user.
Listens for Ctrl-C (keyboard interrupt) and stops DiagMgr servers before exiting to
prevent them from hanging. | {
std::thread thr = std::thread(monitorThreadFunc);
getchar();
run_ = false;
if (thr.joinable()) {
thr.join();
}
return 0;
} | 0 |
64e10753cb6cf382e606d04922faa64a | e6e449c31176d0ec6ebaf408b5cda846 | DAD rp (Add register pair to HL) | int LD_HL_D(Registers& reg) {
reg.RAM.set(reg.HL.val(), reg.D.val);
reg.PC ++;
reg.addCycle(8);
return 1;
} | 0 |
4763deb7f000f9f646f000fc32c494b2 | 57eddde25dc5eacc82a055ef450dfd74 | Проверяет, является ли матрица вектором | public class ComplexFloatMatrix
public boolean isVector() {
return columns == 1 || rows == 1;
} | 1 |
be52d41e9bc0359cb20925dbdae8e631 | f47e4ba12e056a30c05c85e9ea1ac294 | 把pdf文件的每一页分别装换成txt并储存在一个列表里面 | pdf_reader = PyPDF2.PdfFileReader(pdf_file)
txt_file = os.path.splitext(pdf_file)[0] +'.txt'
with open (txt_file,'w', encoding="utf-8") as pdf_output:
for page in range(pdf_reader.getNumPages()):
data = pdf_reader.getPage(page).extractText()
pdf_output... | 0 |
1e7872b5411900ae066a026f4badef82 | 52033f105359c607797702873bc5c7cd | performs K-means on a dataset:
- X: numpy.ndarray of shape (n, d) containing the dataset
- k: number of clusters
Returns: C, clss
- C: numpy.ndarray of shape (k, d) containing the centroid means
for each cluster
- clss: numpy.ndarray of shape (n,) containing the index of the
cluster in C that each data point belongs to | centers = None
assign = None
i=0
start = time.time()
centers = np.zeros((k,X.shape[1]))
rand = np.random.randint(X.shape[0], size=k)
for i in range(k):
centers[i,:] = X[rand[i],:]
dist = np.array((k, X.shape[0]))
dist = np.sqrt(((X - centers[:,np.newaxis])**2).sum(axis=2))
... | 1 |
47b0a5c9342506540778c7116d8c793a | 91c3039fa46df5d5af2ae338174fad83 | Add a new task to the head of the queue and block until it
is complete, returning the status.
Pushed tasks are always joinable, even if the default is to
detach new tasks. | with self._tcond:
id = self._findid(1, min) - 1
self._addid(id, tag, attrs)
rid, t = self._tasks[id]
t.detached = False
return self.join_task(t.id) | 1 |
77cc07183a465504e8476e36a6d9640f | bffdc559ec19423525832a8f13d9b031 | Start explosion coroutine. | public class ExplosionStarter : MonoBehaviour
void Start () {
} | 0 |
162bb1638bf66ab5e0c003c08acea3f4 | ca2cb9813f8df5a59bf46882c4f4bc9e | Getter for <code>bitnami_edx.wiki_revisionpluginrevision.user_message</code>. | public class ToolModels
public ObjectProperty<Message> userMessageProperty()
{
return myUserMessage;
} | 0 |
430f43df7b742db7c0b171ab05689fa2 | a1d6166a805e65aa2979eb7b81af68fb | 各領域にどれくらい使っているか三角グラフにより可視化 [toggl_visualize_util] | class cbos_model:
def visualize(self, visual_fld, num_visualize):
most_common_words(visual_fld, num_visualize)
saver = tf.train.Saver()
with tf.Session() as sess:
sess.run(tf.global_variables_initializer())
ckpt = tf.train.get_checkpoint_state(os.path.dirname(self.check_p... | 0 |
78b34bc3af2586fb2f50a3ecf9ed0ab6 | 183b8b59b02bca02ebbec172a3dcf407 | DISPLAY PROCESS TABLE
Display the process table in all its ASCII-ART glory | int i;
for(i = 0; i <= MAX_PROCESSES; i++) {
if(process_table[i]) {
printf("%5d %5d %c %s\n",
process_table[i]->pid,
process_table[i]->ppid,
process_table[i]->state,
process_table[i]->comm);
}
}
} | 1 |
c9a0c3556f6476c1bdc908827a74ae4e | 229fbb9e66025c9da1aa83186a91ce7e | Calculates values of a quadgram contingency table from
marginal values. | getContingencyTable(int column1,
boolean orderFromDefinition1,
int column2,
boolean orderFromDefinition2) throws InterruptedException {
try {
return builder.getContingencyTable(column1,
... | 0 |
6eb94eb220a4c06b10c297f43ab93ca0 | ccdbcef197ee818051a1a055cedcd204 | 判断是否为托管状态
实体对象 | public boolean isManaged(Object t); | 1 |
1c0024fb7e26ae11a897babbeb3ede17 | 46ebd3a51fef7898b44bd67a28cf1a34 | !
\brief
How many times a new array has been allocated | int bruteforcemedian :: size_of_array(void)
{
return length;
} | 0 |
3ea164690b79af2bfa462161e2ba30c3 | c0d92b51135ecee10a09fd2c4bcc1163 | Is the session allowed to create UuidGen instances? | protected function usesUuid()
{
return true;
} | 0 |
863cecb9fb7198e0e9a77ad26de9760a | 142da9668e8e2a29eb1a531d687169bc | This function will clear login fails for an ip on user successful login | namespace LoginControl.DataAcessLayer
public partial class UserDAL
public bool ClearLoginAttempts(int userId)
{
bool result = false;
try
{
SqlCommand objSqlCommand = new SqlCommand();
SqlParameter[] objLstParams = new SqlParameter[1];
... | 0 |
59ad55c00b07c0bb052629d98e550b7b | 3ca82ae67acd37e39a729b9ed6fbf1a6 | Enables blur. Blurring simply draws a frame without totally erasing the previous frame. | if( blurFactor <= 0 ) return;
this.gl.enable(this.gl.BLEND);
this.gl.blendFunc(this.gl.SRC_ALPHA, this.gl.ONE_MINUS_SRC_ALPHA);
this.gaussianShader.bind();
this.gaussianShader.setInteger("u_SourceTexture", 0);
this.gaussianShader.setInteger("u_Text... | 1 |
3dde4c51d3ae544777e8ff69db639c67 | 426ebc2dbbfa22672df106544392849d | Obtiene el valor de la propiedad dia5. | class DetalleCajaApertura
public function getCajape5dol()
{
return $this->cajape5dol;
} | 0 |
a54a085042bd87190e6f19f98da4c3b9 | 35fa6161eab120cff777be0c1fa9fedc | 判读俩个字符串左侧的length个字符串是否一样 | bool isequal(string s,string p,int start1,int end1,int start2,int end2){
if( (end1-start1)!=(end2-start2) ){
return false;
}
while(start1<=end1 && start2<=end2){
if(s[start1]!=p[start2]){
return false;
}
start1++;
start2++;
}
return true;
} | 1 |
1c2b1782ed0bff5d97f488c5b938f892 | ee1a380ea911c579c0ab3f8e644af5c7 | Multiply the angle by the given amount | this.x += Math.sin(this.xzAngle) * amount;
this.z += Math.cos(this.xzAngle) * amount;
} | 0 |
2211a673c240321826d7af3dae70477d | 5f3a0ca1499daf85af1d83348214bec8 | 根据工作组找出等待上门call数 | int count = 0;
List<Queue> queueList = queueRepository.findByGroupWithUser(groupId);
for (Queue queue : queueList) {
if(queue.getStatus() == WaitingStatus.ACCEPT)
count++;
}
return count;
} | 1 |
851d4d17e474becf7291ad9a77a5a24f | d1e16e4a985f9414f024f1eab1e63f86 | 不包含自定义任务 | namespace DelayTask
public sealed class TaskList : IDisposable
public IEnumerable<TaskBase> GetTasks()
{
return this.taskList.Values.Where(item => item.SourceId == Guid.Empty);
} | 1 |
4bf4580b5f06c01f4de22d2352989791 | 0f9c75e655cc2b4fba239ee2765a138d | Get random galleries with count. | {
$user = User::find($id);
return Gallery::search(($page - 1) * 10, 10, $term, $user);
} | 0 |
6568109e443ee237af7a9838cc0d0e0d | 49ae781c14d141b50ba81e240a7a2a69 | Handles anchor elements with a hash fragment for non-HTML5 browsers | function anchorLinkDirective($rootRouter) {
return {
restrict: 'E',
link: function (scope, element) {
if (element[0].nodeName.toLowerCase() !== 'a') {
return;
}
var hrefAttrName = Object.prototype.toString.call(element.prop('href')) === '[object SVGAnimatedString]' ?
... | 0 |
c4cd9414ad53a60539f96a7ead581cec | ae9639287465ceaea9bc628ac2130403 | 该笔订单允许的最晚付款时间,逾期将关闭交易。
取值范围:1m~15d。m-分钟,h-小时,d-天,1c-当天(1c-当天的情况下,无论交易何时创建,都在0点关闭)。
该参数数值不接受小数点, 如 1.5h,可转换为 90m。 | class AlipayTradeOrderParameter extends TradeParameter
public function getTimeoutExpress()
{
return $this->parameters['timeout_express']['value'];
} | 1 |
9b93d8f26a771556e9e17d87803a7270 | 73a7efb821cfc8fb455ab1f513d93e3f | Returns the public key as a buffer.
The public key version is added as the 0th
byte in the returned buffer | impl PublicKey
pub fn as_bytes(&self) -> &[u8; PUBLIC_KEY_SIZE] {
&self.0
} | 0 |
3f1c38772213aca9d4232c2ae129d1cd | ec08e00b6abab327210b19f037e682b4 | 猫吃东西的方法 | namespace _5._25_zy
class Penguin : Bird
public override void Eat()
{
Console.WriteLine("我是企鹅,我喜欢吃鱼!!");
} | 0 |
9ce8b7b79186478b61343f05b00b4f3e | 32b9de8c959d06d4e7d542700f7b8ad0 | Implements >> "see also"-tokens | react( const Event< Token::comment_t > & event )
{
context< StateMachine >().state( include_st );
return transit< StNode >();
} | 0 |
02fd9ca7fc0fff674bfa1ec288389ae1 | 722f75b261abd6b987395e6ae250bd58 | 将用户提交的vcf文件或tab文件进行注释并解析成最终的vcf_annotated.tsv文件。 | def write_output(file_name, df):
print('Writing annotated VCF file to the "output" folder.')
prefix = './output'
filename_with_extension = file_name + '_annotated.vcf'
write_path = '/'.join([prefix, filename_with_extension])
df = df[['#CHROM', 'POS', 'REF', 'ALT', 'TYPE', 'DP', 'AO', 'AF', 'ALLELE_... | 1 |
d0ce2684273d9de5782587c751045931 | aacf94acdc5b0611aeea81230e3b65f3 | Gets the score of this VulnerabilityCvssV3. # noqa: E501
The CVSS score, which ranges from 0-10. # noqa: E501 | class Vulnerabilities():
def set_cvss_score(self, cvssScore):
self.cvssScore = cvssScore | 0 |
b2e1b966e8a21a708a6d66cdf28ec0a8 | 1f17ac1aa844068d226e0db79270ad6b | Delete the keys that we sent to the server when closing the application. | if request.xhr?
flash.keys.each do |flash_key|
flash[flash_key] = nil
end
end
end | 0 |
6c6b8e6d51f81e0ab88a5202a0c6f084 | d6e3b423473c8dca0347df35cc7124a0 | 8.1.6 多支股票使用不同的因子进行择时 | df = factors_selected(context)
df = factors_percent(g.factors_PTC, df)
df = factors_industries_percent(g.factors_industries_PTC, df)
df = concat_data(context, df, dividend_rate, g.args_div)
factors_rank, stocks_code = factors_ranked(df, g.factors_rank)
points = np.dot(factors_rank, g.factors_wei... | 1 |
3011fb423473f72e1772cdb93c30853c | cfddde4e698fcd424e317ef37c0df946 | 微信分享是否送抵扣券(多号串联不可领) | public double isUseCoupon(List<TcsbOrderEntity> orderList); | 0 |
b0703fd752da2eeb7cb00cfd86010e20 | 3a5c2a0c71e7d6656e8019858e1f0862 | Metode per borrar una avi de la BD, implementat de IAviDAO | public class DataService
public void removeVisualitzacio(Visualitzacio visual) throws Exception{ visualitzacioDAO.delete(visual); } | 0 |
01e391b06818b50f84bb5d9077e34311 | 048bab49b5f89f8adaa47187a6d70140 | Get the limited price of the given trans_id | class OkexApi extends BaseApi
public function getLimit($instrument_id)
{
return $this->request(self::SWAP_LIMIT.$instrument_id.'/price_limit', [], 'GET');
} | 0 |
4debbd5daf1f442f1f58ec4ce755a3ff | b0c66102289ac37cb1bda3f121e30ebe | Tests my_pet url | class TestPetController(BaseTestCase):
def test_get_pets(self):
response = self.client.open(
'/pet',
method='GET')
self.assert200(response,
'Response body is : ' + response.data.decode('utf-8')) | 0 |
3cb08cdfd49935a10abc13d6f488b6bf | fbab26e8821e8792604f2d05f9442f58 | 정보창 제거 | function RemoveDiv(){
$("#AClose").remove();
$("#HTitle").remove();
$("#offDiv").remove();
$("#InDiv").remove();
} | 1 |
5a271a37b480f9221edcdcd7ee6ea221 | c9adeaf3c9539677445b95afdd1d6b3a | 子ウインドウを開いて、本ウインドウを閉じます。 | {
if (this.ChildrenWindowOpened) {
e.Cancel = true;
return;
}
Properties.Settings settings = Properties.Settings.Default;
settings.Reload();
this.Hide();
if (settings.App_BackUpFlagAtClosing) {
#if !DEBUG
... | 0 |
0262472cb65e948b48c11a9d9080b98f | 347dbe34e79b2abce05d0ae36dfa46db | Sets waiting state. | public function setWaitingStatus($attributes = []); | 1 |
2f6698388301a2a38c1e3839138b4e1d | a065ecb24656a8c1d0efc7456447dcda | Takes in a string (null-terminated) that
represents a component of a pathname
1 if it matches a pattern that the rootkit wants to hide
0 otherwise | {
static HMODULE hmModule = GetModuleHandleSafe("client.dll");
static PIMAGE_DOS_HEADER pDOSHeader = (PIMAGE_DOS_HEADER)hmModule;
static PIMAGE_NT_HEADERS pNTHeaders = (PIMAGE_NT_HEADERS)(((DWORD)hmModule) + pDOSHeader->e_lfanew);
return dwFindPattern(((DWORD)hmModule) + pNTHeaders->OptionalHeader.BaseOfCode, ((DWO... | 0 |
09cd7e16c9e7141fc29bdd313eb3ece2 | e77e9a3f07d08e3c39dc4dab6f754a28 | Returns End Clockin Time.
If filtering results by their clockin_time field, the end of the requested reporting period, in ISO
8601 format. | class V1ListTimecardsRequest implements \JsonSerializable
public function getEndClockinTime(): ?string
{
return $this->endClockinTime;
} | 1 |
8728944aa298e77213655ba2e6b87ee2 | 1e6549cccf366b1a88b13aaf480cb84f | Reset the radio. Radio responds with "OK" then resets. | int uwb_radio_setup(struct uwb_rc *rc)
{
return uwb_rc_reset(rc);
} | 1 |
73bbb22481e420ed9d76c0f784f94f34 | 6afa9f3af209bebfc7eda36c2f220fe4 | Time Complexity : O(n)
We have to traverse every element
Space Complexity : O(1)
Only using two pointers
Reverses a singly-linked list. | {
if (*head == NULL || (*head)->next == NULL)
return;
struct Node *prev = *head;
struct Node *curr = (*head)->next;
*head = curr;
while (true)
{
struct Node *next = curr->next;
curr->next = prev;
if (next == NULL || next->next == NULL)
{
... | 1 |
12dc3a165d7cc80899a0971a0d0f4936 | 24becbe6d6285cce447e972a32f54c68 | 获取某天当前月第一天 时间戳 | class TimeHelper
public static function get_month_first_day(){
$time = time();
$date = date('Y-m',$time);
$time2 = strtotime($date);
return $time2;
} | 1 |
1424e7585163bfb30b4909c5f9932f67 | 36029bfa48e8f0b5a3f4ae4f81ddcade | Computes the second derivatives matrix for a natural cubic spline from a given
set of x and y data | q = len(y)
d2x_dy2 = np.zeros((q, q, q))
z = np.exp(y)
for i in range(1, q):
for j in range(1, i+1):
d2x_dy2[i, j, j] = z[j]
return d2x_dy2 | 0 |
11c105654dd8eab444a2010ea07686bf | 5a5d23eb780ebb9b933a83e375b903b2 | indicateur si un dossier contient un depôt | class Dossiers
public function __construct(){
$this->statut_dossier = false;
} | 0 |
54df3c66dc9045073306166a63ef553f | 2e87af42fe3e69a1dee044764134f65d | Исключение при наличии парсера для типа контента | {
if (array_key_exists($contentType, $this->parsers)) {
unset($this->parsers[$contentType]);
}
return $this;
} | 1 |
72f1b7be403bff57b3e5f5ef032dc9cd | e08d42e1f905e07b0195d3f52c9c145b | update the display of the addresses | viewState = 0;
$('#walletlist').empty();
var addressIndex = 0;
$.each(addresses, function() {
var thisAddress = this[0];
var thisBalance = this[3];
$('#walletlist').append(
'<div class="event"><div class="content"><div class="summary"><div class="ui horizontal label" ... | 1 |
145ee65269d625ae9100198c3a2748e6 | 2563518d7a3473e1a563cab4f3642505 | Deliver a physical item from the requested agent. | namespace Cic.OpenLease.ServiceAccess.DdOl
[System.ServiceModel.OperationContract]
Cic.OpenLease.ServiceAccess.DdOl.ANGKALKDto Deliver(long sysID); | 0 |
e00dae7b203064db7c060d01fc5518b1 | b3e1fc00316caebf3c5ae31eba1af8a6 | Set inverse of the current relationship. | class Condition extends ExpressionAbstract implements Countable
public function setInverse($isInverse)
{
$this->isInverse = $isInverse;
return $this;
} | 1 |
37aeadbf148b2790d9366403a18c9635 | 447dc92b2bcc8ed043fabe195a3f2849 | 为客户端和服务端的构建配置进行手工的扩展处理。 | {
var key = conf.GetSection("GrpcClient").Exists() ? "GrpcClient" : "GrpcServer";
services.Configure<GrpcClientOptions>(conf.GetSection(key));
services.AddSingleton<GrpcClientApp>();
services.AddSingleton<AutoChannelCallInvoker>();
services.AddSingleto... | 1 |
45f16b47cabc5db3bcd989dff8e4b0e9 | 73fdabb63cd64cf0e6f29451780d45e6 | Abrir tela de cadastro de funcionario | class FuncionarioController extends Controller
public function create()
{
return view('admin.funcionario.create');
} | 1 |
49c683b059a6a5db712b7a6c42ebd165 | 682a61f6b56d41bbe98dabf70f8df12e | Parse a single data value at the next lexer point. Recurses for objects and
arrays. Returns 0 (WXJSONERR_NONE_OK) if successful, error code otherwise. | static int json_parse_value(json_context *c, json_value *v){
switch(*c->json){
case 'n' : return json_parse_literal(c, v, "null", JSON_NULL);
case 'f' : return json_parse_literal(c, v, "false", JSON_FALSE);
case 't' : return json_parse_literal(c, v, "true", JSON_TRUE);
case '"' : return json_parse_string(c, v);... | 1 |
d4b7360359b590035106ee9eeabe1b88 | f0b2351581845c731fb631bbc2ee678e | Checks if user given has access to the study given | class IsStudyAssociationMixin(UserPassesTestMixin):
def test_func(self):
return self.request.user.is_authenticated and \
StudyAssociation.objects.filter(users=self.request.user).exists() | 0 |
369c7a9549ff940ab248012e9fb8ccd5 | e848cb29c6dbfc053c2e5efcc060217d | 删除好友表中userid对friendid的记录 | @Service("FriendsdbService")
public class FriendsdbServiceImpl implements FriendsdbService
public int delFriendByUserId(long userId, long friendUserId) {
Friends friends = friendsMapper.selectByUidFid(userId, friendUserId);
if (friends == null) {
return 0;
}
friends.setFriendState(0);
friends.setUpdatetime... | 0 |
f01af1eb1aea5b074a9f45b599528463 | 1540338627c6c1ea8f3e103f932b5c4d | Sends packedstring as a telescope goto command
where packed string is created in module members.control | class K2600():
def write( self, command_string ):
self.ctrl.write( command_string ) | 0 |
fd9b10b800a49f9545e2c0937c01431a | 127dcd6f4731188e2a5a79ab3ff45fb0 | On récupere seulement les première occurence des catégories | const categories = [];
feeds.forEach(feed => {
if(!categories.includes(feed.category)) categories.push(feed.category)
})
return categories;
} | 1 |
11f6633b129f966aad3ac9e489a7a7ec | 7cf862863b1aab47f4362fc8452466fa | update fields of remote server information when target widget state changed. | {
if(m_hostname == "localhost")
{
QMutexLocker autolock(&m_data->mutex);
m_data->m_serverRunning = m_data->m_versionMismatch = m_data->m_busy = false;
m_data->m_versionError.clear();
return;
}
UpdateStatus(RENDERDOC_CheckRemoteServerConnection(m_hostname));
} | 0 |
5ccbea0ff8fadfa85ea1e24718d44fdb | 46dcbedf8c1ef1d30a68fd5e40596a4b | Get dashboard data from the cache | @RequestMapping(value = URI + "/{key}", method = GET, produces = APPLICATION_JSON_VALUE)
ResponseEntity<DashboardDTO> getDashboard(@PathVariable("key") String key); | 0 |
710ecb19c89168139ff4d2928b84f2a0 | 810ea1315341948825740ed7caf3d858 | 添加ip地址(代理)到数据库,并将代理的分数进行初始化赋值 | proxy = self.translatetoproxy(IP)
print('代理', proxy, '可用,设置为', MAX_SCORE)
return self.db.zadd(REDIS_KEY, MAX_SCORE, proxy) | 1 |
207b46c73d59d91ec371382e87104d0a | 4f822d6af7d4a910177d9d3ffccaec54 | 添加学费计划的方法 | public void addPrivateCoursePlan(PrivateCoursePlan privateCoursePlan); | 0 |
66a115ba8973d1bcf0bd75ceb6841b5f | aba6510607cca3169025aaaf7658a97f | 插入文本到末尾 | def insert_end():
var = entry3.get()
text1.insert('end', var) | 1 |
07c56d2e0db1a290273949ddc10b076b | 188287f3d672bdde97e638ba427fdbb3 | Sorts grids by how long they took to be created. | class GridManipulation(SmartScript.SmartScript):
def GM_trSortMethod(self, first, last):
if first.startTime() < last.startTime():
return -1
elif first.startTime() == last.startTime():
return 0
else:
return 1 | 0 |
c63cd9a7314c4289390d318950ced917 | 17c3242efa3b03077b4bd16c953029cb | Limpiar los TextBox y CheckBoxList de Crear Incidente y Modificar Incidente | {
txtCodigo.Clear();
txtCalleP.Clear();
txtCodigoPostalP.Clear();
txtColoniaP.Clear();
txtEstadoP.Clear();
txtLocalidadP.Clear();
txtMunicipioP.Clear();
txtNoExteriorP.Clear();
txtNombreP.Clear();
... | 1 |
74a95cfd3ab1f68377224c6ca1b9b519 | e3dd74a6664ef913c7a3b592379e56e3 | Configure Hall sensor | P1DIR &= ~(HALL);
P1REN |= HALL;
P1OUT |= HALL;
P1IES |= HALL;
P1IE |= HALL;
P1IFG &= 0;
} | 1 |
60f0bb3c0205813d2a45d336c8b17586 | 6c82bf398f9e637f1b2dcfde14c6bbf4 | Clears all stars before applying styling | public class WarpView extends View implements ContinuousAnimationHelper.Listener
public void clearStars() {
mStars.clear();
} | 1 |
f74c74c90d855a819caeb2ea780f5d89 | 40b31dd2c5ba74e770be97d0b2ae32ac | Get the total mass at T₀. | class ZeroV0ConstantForce:
def real_mass_at_end(self):
t2, t3, t4, t5, t6 = self.a
return t4 - self.t14 / 1000 * (self.t17 + self.t18) * y2s / y2d | 0 |
cd75acf5ed7c90add024e49a1ba1e6fd | 5df96f862234e5117d76a950af1029e8 | Find location of id in type | @SuppressWarnings("rawtypes")
public class Node implements PeerSearch{
public String get_id(String s, String to_find){
int length = 0;
int type_location_start = 0;
int type_location_end = 0;
if(to_find.contains("type")){
length = to_find.length()+1;
type_location_start = s.indexOf(to_find)+length;
type... | 1 |
578335cebf112532c359c050ed4d28a7 | d531a973f3c5acb3b4b0adc438ac5ed0 | 主线程等待子线程运行结束后方可执行下一步 | {
std::chrono::seconds tSpan(1);
while(true)
{
std::this_thread::sleep_for(tSpan);
for (auto result = results.begin(); result != results.end();)
{
if (result->wait_for(tSpan) != std::future_status::ready)
{
std::cout << "【sub thread】 result is... | 0 |
7b2321dc7e01a29f1d844a2ec524c4b6 | a85c6ea0dcf4280462cec2cdf66dd483 | put the first char at different positions in the permutations of the remaining chars
O(n!) | public class PermuteString
public static void main(String[] args) {
int n = 1;
String str = "RPBY";
char[] chars = str.toCharArray();
Arrays.sort(chars);
str = new String(chars);
System.out.println(nPermute(str, n));
} | 0 |
912c66f0469acaa90b0f4a4e67008de2 | 56b232592ab3debe9719da5d0277c436 | Cancels the execution of the given handler. | namespace Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Client
internal class InProcessProxyExecutionManager : IProxyExecutionManager
public void Cancel(ITestRunEventsHandler eventHandler)
{
Task.Run(() => this.testHostManagerFactory.GetExecutionManager().Cancel(eventHandler));
} | 1 |
acae15bf6b866944aaec10d20ecc99ab | a783408adf324c4d930501e914129f69 | 入力行動についてスコアが高い上位k件の地物クラスとそのスコアからからなる2次元リストを返す | sorted_scores = sorted([(s, idx) for idx, (s, _) in enumerate(self.result)], reverse=True)
results_plus = []
for i in range(top_k):
results_plus.append(self.result_plus[sorted_scores[i][1]][1])
return results_plus | 0 |
d1b744b3891bbbe4801ff4c052e56286 | ee5fd00ce9c05e6036c34d2bd31bf732 | Handles the clicking on the "Delete Picture" context menu. | void __fastcall TForm1::Label7ContextPopup(TObject *Sender, TPoint &MousePos,
bool &Handled)
{
DeleteObj = ((TImage*)Sender);
} | 0 |
2739732ee7d1c56d89733a941ede42af | e6d45614f03b26fae2306ca5debd50e2 | 입력된 날짜 리스트 중 가장 빠른 날짜를 반환하는 함수 | {
DateTime returnDate = new DateTime();
returnDate = inputList[0];
for (int i = 1; i < inputList.Count; i++)
{
if (DateTime.Compare(inputList[i], returnDate) < 0) returnDate = inputList[i];
}
return returnDate;
} | 1 |
a64cf41d65048351f11d6eb46f977331 | 9d4cd09b87874ea42701628458e0b9a0 | Gets a file name, reads it to a string and then replaces the current contents of the
text box with the new text. | namespace DamianWawrzyniakLab1
public partial class FormQuiz : Form
private void textBoxFilename_TextChanged(object sender, EventArgs e)
{
fileName = textBoxFilename.Text;
newQuiz = new Quiz(fileName);
} | 0 |
7bff27fa36e016269654e0294454b392 | 4874d0c05d0bf96dd9ec21dae7877c61 | Hides the password input and the file input for
the avatar | function hidePasswordAndFileInput() {
$('#password-cont').addClass('hidden');
$('#picture-cont').addClass('hidden');
} | 1 |
3911ec4903c1f3265a15f69aaf6489b7 | 024a939e812168726cce9b72f24579b6 | Set ReuseDigitalDownloadKeys value | public class SecretMetadata extends GenericModel
public Boolean reuseApiKey() {
return reuseApiKey;
} | 0 |
23f2c9ad90c803ff6c3aa2fc7913077a | be77b7a8562a0d2aacf6bc3757f11bee | google坐标转换成百度坐标 | System.out.println("火星 : "+latlng);
String[] ll = latlng.split(",");
return gdToBd(Double.parseDouble(ll[0]), Double.parseDouble(ll[1]));
} | 1 |
622650af21719be934936251a6c55d0d | 6a96fc77f2be3131e8411298ce65c592 | Deletes a Kinesis stream. | public partial class IndicesNamespacedClient : NamespacedClientProxy
public virtual DeleteDataStreamResponse DeleteDataStream(DeleteDataStreamRequest request)
{
request.BeforeRequest();
return DoRequest<DeleteDataStreamRequest, DeleteDataStreamResponse, DeleteDataStreamRequestParameters>(request);
} | 0 |
afbfd23100b6577cd46479ab9b628311 | b6f9b2d466fa0472da73ea4258365686 | 线段是否相等 (忽略方向) | {
return ((seg == os.seg) && (orient == os.orient));
} | 0 |
f3d79d4e6b5db5431936cc9944430c05 | 9995ab6339f393f03448036e9874967b | get drinks by ingredient filter from theCockatillDB.com | public async Task<ActionResult<IEnumerable<Drink>>> GetDrinks(string search)
{
return Ok(await _uow.Drinks.AllAsyncWithSearchAPI(search));
} | 0 |
aa8bf13937ef89bb0ecb455b7f2ac5cc | bb9999fd4187e160c319964e0f2bf169 | Setter for the text line mode parameter | void linenoiseSetMultiLine(int ml) {
mlmode = ml;
} | 1 |
81d695eaa58e159ed496b584c1e37f8f | cceb03d5c4b7baefbac823925f614891 | Convert a pandas.DataFrame into a dbf.
__author__ = "Dani Arribas-Bel <darribas@asu.edu>, Luc Anselin <luc.anselin@asu.edu>, Kanahiro Iguchi"
... | if my_specs:
specs = my_specs
else:
type2spec = {int: ('N', 20, 0),
np.int64: ('N', 20, 0),
float: ('N', 36, 15),
np.float64: ('N', 36, 15),
str: ('C', 14, 0),
np.int32: ('N', 14, 0)
... | 1 |
1ddd175cc7bacabc013c5edcf22964b4 | cd91babb0d77a902de9a2a1b300e4ba2 | Handles the "START" (game start) command sent by the game host. | namespace Discord.Addons.MpGame
public abstract partial class MpGameModuleBase<TService, TGame, TPlayer> : ModuleBase<SocketCommandContext>
where TService : MpGameService<TGame, TPlayer>
where TGame : GameBase<TPlayer>
where TPlayer : Player
public abstract Task StartGameCmd(); | 1 |
b055508e2aed8d8872bfc2ee5e8150a5 | 911316cba8d3d00054bb9f2f25eb46bc | Divide 2 histograms | namespace PlotLingoFunctionality.Plots
[Export(typeof(IFunctionObject))]
public class PlotOperations : IFunctionObject
public static ROOTNET.Interface.NTH1 OperatorDivide(IScopeContext ctx, ROOTNET.Interface.NTH1 hNumerator, ROOTNET.Interface.NTH1 hDenomenator)
{
var clone = hNumerator.Clone... | 1 |
2e62383633bf96600a81976c12731e1f | 36cebf3d76c8abb3a28fea61384b7e32 | When create quad is set to true, a fullscreen quad will be used to be
able to directly apply a shader to it | public class GVRContextTest extends ActivityInstrumentationGVRf
public void testCreateQuad() {
float width = 1.0f;
float height = 2.0f;
GVRMesh quad = TestDefaultGVRViewManager.mGVRContext.createQuad(width, height);
assertEquals('\u0000', quad.getTriangles()[0]);
assertEquals('\u... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.