query_id
string
corpus_id
string
query
string
code
string
label
int64
05b72093b96959c69dc8186ef226fae4
27ddb19979d653e3c7c71f71cb4807f0
deleteWebhookById Delete a webhook by ID.
namespace WxTeamsSharp.Interfaces.Api Task<IResponseMessage> DeleteWebhookAsync(string webhookId);
1
4346c113af9191b51d00cb35f1fdb220
e7c26b570f51da4b0c57c4a8b8ff253e
首付比例验证
public void confrimPercent(HttpServletRequest request, HttpServletResponse response) { JSONObject resultjson = new JSONObject(); response.setContentType("application/json"); response.setCharacterEncoding("utf-8"); String p = request.getParameter("percent"); String applicationNo = request.getParameter("applic...
1
afd3757af59ca72fa9fd6cf9b0e9ed89
62fedb61c130069bc2683f36b1b311dd
Refreshes the scroll layers.
{ foreach (ScrollLayer s in scrollLayers) { s.ResetPosition(); } }
1
0ea7533595b1f2fc73f6a3abe07d6ad5
b2dacd732b153a210bc3c3e1c970c669
定义一个函数接受尺码和字样两个参数,且都有默认值
def make_shirt(size='large', text='I love Python'): print("\nThis t-shirt is size " + size + " and has the word(s): " + text + ".")
1
da26f37dc17155af6b5d7bec3ee4e57e
ae71801e82d32e4e08c18fb51351ef69
método que permite iniciar el vídeo
class VideoClient(object): #Función de instanciación def start(self): self.app.go(startWindow="login")
0
e20c80ff00f8f2222c6fff0a165ec48f
3fecbec6fadce2a2a163a536245609e2
When called, it bulkloads the tree index.
TreeCursor c = new TreeCursor(this, Transaction.BOGUS); c.autoload(false); for (c.first(); c.key() != null; ) { c.trim(); } }
0
caecdc43e73afbf5d831a4b4dcad4ab8
3618f73716359d2be66567c5a43351d0
Creates an ErrorFormatter.
class NodeJSFormatter extends BaseFormatter constructor() { super(); this.id = 'NodeJSFormatter'; }
0
17026385f77b5d0203db1d7012cc2dc8
ecf76ae80e8b038b66c71f15503a8dea
Get the result summary for the plagiarism detection for the files.
public class ParseTreeBasedEngine implements PlagiarismEngine @Override public List<String> getResultSummary(){ return resultSummary; }
1
f25dbfcbe462535bacc0562e19531b49
a18525f9751950d90eb883912ffaa310
检查修改系统设置权限,如果未打开则跳转设置页面
class SystemController extends CommonController public function modify_system(){ $id=$_SESSION['id']; $m=D('Admin'); $arr=$m->find($id); $arr=$arr['admin_type']; if ($arr==1){ $this->error('你不是超级管理员,没有限权!'); } $m=D('Config'); if (!$m->create()){ $this->err...
0
122e93cca41f69bee6dabd1ca749f84d
b5ca0960ae8b549001303a352bceca41
根据日期进行排序
public class PayRecordItemFragment extends BaseFragment implements View.OnClickListener private void sortByDateUp() { Collections.sort(dataList, new Comparator<ConsumptionRecordsDataBean>() { @Override public int compare(ConsumptionRecordsDataBean o1, ConsumptionRecordsDataBean o2) { ...
1
e6da412da14aa151430862233933d15a
bed89981720c63a10a073a9bb447c71c
Draw letter Z
{ glLineWidth(1); glColor3f(1,0,0); glBegin(GL_LINES); glVertex3d(0,0,0); glVertex3d(6,0,0); glEnd(); glBegin(GL_TRIANGLES); glVertex3f(6,-0.5,0); glVertex3f(6,0.5,0); glVertex3f(8,0,0); glEnd(); glColor3f(1,1,0); glBegin(GL_LINES); glVertex3d(0,0,0); glVertex3d(0,6,0); glEnd(); glBegin(GL_TRIANGLES...
0
c3da49deab434a5c2a862208ba0e0c7a
9807f4d4440dcb6d9763a988d64092f2
invert bit order in each bytes (crc does that before computing the real CRC!)
void inverse_substitute_bytes(byte* byte_array) { byte t; for (int i = 0; i < 16; i++){ t = byte_array[i]; byte_array[i] = inverse_substitute_byte(t); } }
0
6c3b3824d1ed929091d2ff2960388c91
c2da8753f44f30014a8d608a7ceb8437
=================================================================== Method : OutputRB1_Putn (component RingBuffer) Description : Put a number new element into the buffer. Parameters : NAME - DESCRIPTION elem - Pointer to new elements to be put into the buffer nof - number of ele...
int32_t ring_buffer_put(rbd_t rbd, const void *data) { int32_t err = 0; if ((rbd < RING_BUFFER_MAX) && (_ring_buffer_full(&_rb[rbd]) == 0)) { const size_t offset = (_rb[rbd].head & (_rb[rbd].n_elem - 1)) * _rb[rbd].s_elem; memcpy(&(_rb[rbd].buf[offset]), data, _rb[rbd].s_elem); _rb[rbd]....
0
716a673fcd27134a46382ecdf0397e8e
a728eac95903e53388082a90dfce8c7f
找回密码,从邮箱点击过来的链接
@Controller public class LoginController @RequestMapping(value = "backpassword.html",method = RequestMethod.POST) public String backPass(@RequestParam String email, HttpSession session){ User user = userService.backPassword(email); if (user != null){ session.setAttribute(Constants.PASSWORD,user.get...
1
0ff9c55f984f02753c89da3faac5ee04
01f2962df6698c4d4fdca478998c7079
Runs when Show All is pressed, populates listbox with all customers
namespace Display public partial class CustomerEditView : Form private void PopulateDataGridViewDefault() { dataGridView.Rows.Clear(); CustomerBusiness customerBusiness = new CustomerBusiness(); var customersList = customerBusiness.GetAllCustomers(); DataPopul...
0
85b64c3ee6ca965f4d2f2e321884d196
2db7ab16406367e0b264776d3143b499
Bouton semaine dernière
{ M_SemainePlanning laSemaine = ObtenirLaSemaineSelectionnee(); laSemaine.DateSemaineDebut = laSemaine.DateSemaineDebut.AddDays(-7); Calendrier.SelectedDate = laSemaine.DateSemaineDebut; }
1
a628828cedc825ae4ad473f8c4e8a73f
5207ac59d1986a548dc54f3143959945
Metodo que calcula el total de horas por Unidad Organizacional
function calcularTotalHoras() { $id = $("[name = 'tipohoras_s']").children("option:selected").val(); if ($id != 7) { $("#horas_s").val(''); $("#val_s").val(''); $("#presupuesto_s").val(''); $horaInicio = $("#hora_inicio_s").val(); $horaFin = $("#hora_fin_s").val(); $fechaInicio = $("#inicio_...
0
f8ca3edd3538a70805d37090cc8c1d26
095ed63d91904735642ba9a0773fc8e3
獲得圖片的Base64編碼
{ if (img == null) return String.Empty; Byte[] data = ImageToBytes(img); return Convert.ToBase64String(data); }
1
1e18de731525a7f892cf6334fe07dc83
4a993ec21c81a653f158f205dd32f69a
启动一个update协程,并且可以指定间隔时间,停止条件
return GlobalScope.launch(Dispatchers.IO) { var index = 0 delay(delay) while (isActive) { interval(index++) delay(period) } } }
1
83fea12ef20d380dc94ddf7511117a9b
8d27e8df948e1ded7f03c911b8f707d4
Given a serial number, find the Teensy device that is running the bootloader.
handle = None for usb_cls, subcls, protocol in [ (adb_device.CLASS, adb_device.SUBCLASS, adb_device.PROTOCOL), (fastboot_device.CLASS, fastboot_device.SUBCLASS, fastboot_device.PROTOCOL) ]: try: handle = local_usb.LibUsbHandle.open( serial_number=cls.serial...
0
52df7eb131049e6c8b2fe7aad5f68409
d4c54e5059c8558c1a752c404ebaafd2
Return a python list where each item in the list is a tuple (index,value) containing the index of the list position and the value at that position, in the same order as the referenced list model.
class SelectionTestHelper(object): def index(self, row, column): return self.item_model.create_index(row, column, self.item_model)
0
15bdd49074a269502aae5e3511f62a66
b2857cd7f968128cb65ef0a260d4dd2a
将哈夫曼树结点按照weight从大到小的顺序插入线性表
int i; for (i = 0; i < 256; i++) { htNode[i].weight = weight[i]; htNode[i].parent = -1; htNode[i].lchild = -1; htNode[i].rchild = -1; } while (i < 511) { htNode[i].weight = -1; htNode[i].parent = -2; htNode[i].lchild = -1; htNode[i].rchild = -1; i++; } int last = 256; int minmum1Position; int ...
0
b96ef1225a5e03d34f8de9591a044b76
6989b5327f622279c03ca424118d333c
Specify from within an instantiation routine that the current routine is dependent on some other tag, which may or may not have already been specified.
dvMarkConstProg(int index) { Foam rhs = dvDefs[index]->foamDef.rhs; if (foamTag(rhs) == FOAM_Prog) dvMarkProgUsage(index, rhs); }
0
f5b933a01a7230d5fce7ec45da60de61
a72565175c3fc205a83cb9d2bb209239
Gets an owned book from the user's collection of owned books
public class EditBookActivity extends AppCompatActivity implements ImageFragment.OnFragmentInteractionListener, ProfileFragment.OnFragmentInteractionListener{ public void getBookId(final CollectionReference usersCollectionRef) { usersCollectionRef .document(book.getOwner()) ...
1
a6b3724a8c31dba023a500d7efb1d57e
486c3317f9b1581543939c8e9ab9f605
replace newlines with invisible character (to save newlines in textareas for example)
class Fari_Textile private static function _newlines($text) { return str_replace('<elmo>', "\n", $text); }
0
b34f2d49bd11c42b04d734c0ce7dffbf
6a03d7a145c2ae0fbdd8c6bad9ae2148
基于输出值得绝对值之和计算覆盖
def cal_coverage(df): rst = df > -105 rst = rst.sum(axis=1) > 0 cov = rst.sum() / rst.shape[0] return cov
0
3e300b3e20274603be3a8f2609e37576
ad896ff9798e55135b31e7256e6eebb1
Gets the number of ideas by their status
fun getStatusIdeasCount(allIdeas: List<IdeaObject>, statusToLookFor:IdeaStatus):Int{ var count = 0 for(idea in allIdeas) if(idea.getStatus() == statusToLookFor) count++ return count }
1
2ed72b04132f8dde2f3f827bca2d4cb6
70fc00ec0abde227b290c2a2fef88af2
Prints error information to users
function printError( req, status, err ) { console.log('An issue has occured See error --->', status, err) }
0
cd4683836e5a44ac1aac43397221c793
b7cf26a5d0c8a0ec08dcbc4443cc8930
Compute sun's mean anomaly for given J2000 epoch days and fraction.
function sunMeanLongitude(jme) { const m_factors = [ 280.4664567, 360007.6982779, 0.03032028, 1 / 49931, -1 / 15300, -1 / 2000000 ]; return limit_degrees( m_factors .map((factor, idx) => factor * jme ** idx) .reduce((acc, cur) => acc + cur, 0) ); }
0
fe3a446929cb73082b1564cb263e3895
5eacbd3214d1a028bc8b468a7f39d2f9
Returns recursively retireved document values with their matching collections.
class DictionaryAPILoader: class Doc: class Node: def __get_values(self, node): processor = node.get("processor") if processor: return getattr(self, processor)(node) values = {} for child in node: value =...
1
d159f718feed7a050dfe0783e0d506c3
485d5ad1ed9473fae993d874d236e282
同步限制用药信息
{ var dataResult = new List<MedicalLimitDrugEntity>(); using (var redisdb = _redisDbContext.GetRedisIntance()) { dataResult = redisdb.Get<List<MedicalLimitDrugEntity>>(SystemManageConst.KNOWLEDGE_MEDICALLIMITEDRUG); if (dataResult == null) ...
1
996962113f7ad2e4bbcdb619890e68fb
e47f86559b7c77c327008b32a49190be
自定义函数将字符串转化为int32输出
func ToInt32(portStr string) int32 { port, _ := strconv.ParseInt(portStr, 10, 32) return int32(port) }
1
384729ef5e4fd01e5771bcbb73e9b12e
6df5d243395ea47a5364e171b8fe560b
日本語教育語彙表を読込み、語彙の難易度の列を数値に変換する
def load_pn_dict(): dic = {} with codecs.open('data/pn_ja.dic', 'r', 'utf-8') as f: lines = f.readlines() for line in lines: columns = line.split(':') dic[columns[0]] = float(columns[3]) return dic
1
94f09be62b9cac9d151c00e77e10592e
5dc75df778bfb544edc0b1291260d8cb
この画面に遷移してきたときに呼び出されるメソッド
namespace MetroCsStudyDraw public sealed partial class MainPage : Page protected override void OnNavigatedTo(NavigationEventArgs e) { }
1
7810c8d6a98b0955b37b5287ade8e00b
d80f7beef355839bad931d601ddfdc83
Reports all the instructions accepted by the vehicle
class mechanism(object): def report(self): print("DIRECTION "+str(self.direction)) print("FSRTHRESHOLD "+str(self.fsrThreshold)) print("FSR0 "+str(self.fsr[0])) print("FSR1 "+str(self.fsr[1])) print("FSR2 "+str(self.fsr[2])) print("FSR3 "+str(self.fsr[3])) print("...
0
3d0d8ec878eb1e9f25cdfba14342672c
392bb3252b1d17967cc04e4f63a7e829
Test of getIdUsuario method, of class Usuario.
class SGPATestCase(TestCase): def test_eliminar_usuario(self):
0
9af682414315f9a5ba642a85215e400d
0b4f71c557c5fab06f368b548aa75010
See if adding one more message would mean we're still below safe threshold
export class FlowControlledPublisher wouldExceed(message: PubsubMessage): boolean { return this.flowControl.wouldExceed(calculateMessageSize(message), 1); }
1
281d6f5e898ca470eb4de5f809db3f46
6738a93971045a63ce547fb0d00ae4cb
get the number of tests that was blocked within this suite document
class TestResults: def num_ignored(self): return self._test_stats.ignored
0
1a1842e76391c39e9bc92b7025678399
1d5e07c62d4d186f49d9d17406e05d22
Основная функция вычисляющая площадь объединения прямоугольников.
namespace Rectangles public static class RectanglesTask public static int IntersectionSquare(Rectangle r1, Rectangle r2) { Func<int, int, int, int, bool> segmentIntersect = (a, b, x, y) => (b >= x) && (y >= a); Func<int, int, int, int, int> segmentDifference = (a, b, x, y) => Math.Min(Math.Min(b - x, y - a), M...
0
ba7e76016457f572689136819efa36f6
63915466a8705fd94de1c6a0a3683bcd
ダンジョンのクリアを記録する
namespace GodaiQuest public partial class FormEdit : Form private void btnSave_Click(object sender, EventArgs e) { saveDungeon(); MessageBox.Show("ダンジョンを保存しました"); }
0
d312d183295e14fcf411d4815d6aa1b1
69a65d248b743276d6e90081032645fa
İşletme için eklenen bir plan bilgisi düzenler.
namespace VxTel.WebAPI.Controllers [Route("api/plan")] [ApiController] public class PlanController : Controller [HttpPut("{id:guid}")] public async Task<IActionResult> Update(Guid id, [FromBody] PlanViewModel planViewModel) => Ok(await _planApplication.Update(id, planViewModel));
1
5af1fd1f93ebfee05baf3356e82b3588
b2febe824c12bf8d1c55edaa07afb6b7
ATB管理
class Crontab extends CI_Controller function ata() { $data['list'] = $this->crontab_m->get_ata(); $data['controller']=$this; $this->load->view('crontab/ata_v', $data); }
0
60fcdf31dfb115c0f3b7cc0ec626b433
8f2ae29691616b4862298fb2a88958ae
Moves an arrow from its old position to a new.
move_completed = False self.target.set_size(2) n_steps = int(self.screen_refresh_rate / 2) step_pos_x = np.linspace(int(old_position[0]), int(new_position[0]), n_steps) step_pos_y = np.linspace(int(old_position[1]), int(new_position[1]), n_steps) if tick >= len(step_pos_x...
1
875f6ac9351f485968b8e860d2a8371a
8e1a96c372d416d3b6533d4f7abcd930
Converts a config path to a file path
namespace WPFPrototype.Commons.Downloads public static class DownloadHelper public static string GetFilePathFromConfigPath(string configPath) { if (string.IsNullOrEmpty(configPath)) throw new ArgumentException("configPath can not be null or empty."); if (!configPath.EndsWith(".config...
1
8a61b3de4b4c8f80bc217445bb1c9975
36bb71e89db03370359d58847a4d5697
destructorul care va distruge vectorul alocat dinamic
bag::~bag() { if(p!=NULL) delete [] p; }
1
463db2cc3af555047f2cf0880fa53308
309d1123fbe77c8c7fd5267132bd58f8
Get a translation key for an enum value.
{ int intVal; if (!int.TryParse(val, out intVal)) return string.Empty; var keyValus = GetEnumToDictionary(typeof (T)); return keyValus.ContainsKey(intVal) ? keyValus[intVal] : string.Empty; }
1
379937a3f42f9d62c4552dbde401d25c
2417a578efa29d317d27c626d7290f7c
Returns the value of the '<em><b>Max Request Count</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Max Request Count</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
EAttribute getNumberRequest_MaxValues();
0
0b1b5d6e521871e37a56192f40cc70b3
bea5c537f2b3048819b737259ca3ff30
给定一些元素, 返回在当前可视区域的元素的索引列表, 前后顺序不变
export default class VirtualScroller getShownItemIndexes() { if (this.bypass) { return { firstShownItemIndex: 0, lastShownItemIndex: this.getItemsCount() - 1 } } const { top, height } = getOffset(this.getContainerNode()) if (this.top === undefined) { this.watchContainerElementTopCoordinate() ...
1
694634e98db26be2f8ffc1e8efb60894
b80bec117e8a00ac904c3c40be940926
満足度の設定。
def set_satisfy(): mongo_collection.update({'url': user['url']}, {'$set': {'satisfy': satisfy.get()}})
1
02c9352ed6bb0a2d4b0a5bbb48afcf48
2cefed7abf4cc6b24d18b2ceed0bc0b3
检查标签 checked 状态
setCheckedTag (state, name) { state.checkedTag = name sessionStorage.setItem('checkedTag', name) }
0
15c4fdb52b2d9e74990c75d3e7df0a5b
5ec09bb3d275fcd60c7487d46bff0a0b
LHS == RHS
boolean aRhs ) { return ( aLhs == aRhs ); }
1
44d7afc3d5f6d2d32b66b782110eed99
d3e1221ebf25b16fe65adfef41bba82b
Возвращает экземпляр класса прав системных пользователей
{ if (null !== $this->userAuth) { return $this->userAuth; } if ($this->isNewRecord) { $this->userAuth[0] = new static::$authClass(); $this->userAuth[0]->authSystem = 'default'; $this->userAuth[0]->canChangeLogin = $...
1
3cd76d56f283348e7962de75b80fd2e6
21c17c8a099e9491f49400c321c5c292
Generate a select statement from the columns that actually exist in the database table. This method is intended to be used when exporting to a GTFS and eventually generates the select all with each individual field and applicable transformations listed out.
public class Table public String generateSelectAllExistingFieldsSql(Connection connection, String namespace) throws SQLException { PreparedStatement statement = connection.prepareStatement( "SELECT column_name FROM information_schema.columns WHERE table_schema = ? AND table_name = ?" ); ...
1
cfcbe25e8674127808d201caa3d2b5f6
23ff31f0390741eefc416622663a51ca
Determines whether the specified character is a space character.
namespace UglyToad.PdfPig.Core public static class ReadHelper public static bool IsSpace(int c) { return c == ' '; }
1
44f6673375ca2b447bf2f3fbb6c720de
ee282351f8bb0c55a29be20eadb0ceb2
获取起运及时率
class Cg1stocksheetModel extends MC_Model function cg_punctuality($checkMonth='',$CompanyId='',$week='', $BuyerId='') { $condition = ''; if ($checkMonth != '') { $condition.= " AND DATE_FORMAT(M.rkDate,'%Y-%m')='$checkMonth' "; } if ($CompanyId != '') { $condition.= " AND M.CompanyId='$CompanyId' "; ...
1
325fb53c3873128737e9067587ea1374
01cb9355232a673996d9db9d31eec1dc
Set the operation callback.
public function setCallback(callable $cb);
1
9a191553d1857ff8d4d392e1ad5e3246
bf48137ad255c8c8f4a0f56d2215b0a6
Metoda vrací souřadnici Y polohy monstra
public class Monster extends Circle public int getY(){ return (int) this.getCenterY(); }
1
6cec549194c4cd0ddb0c7027c0819b5d
26c60899f197609f958d680a0b05370a
Returns the `NotImplemented` object.
class NotYetImplementedError(Exception): def __init__(self, func): super(NotYetImplementedError, self).__init__() self.func = func
0
b70ad38e10c9ea7f82088a031033a7a7
bd7d0d4eeca3fb951c85e48f1824240f
读取service yaml文件
def read_yaml(file_path): file_path = get_project_path() + file_path with open(file_path, "r", encoding='utf-8') as f: content = yaml.load(f, Loader=yaml.FullLoader) return content
1
ad42ed2051699220ee0c5e27ff825b55
bcee51fadc1bfbd5b2bec6909f5c902c
是否是UP宝可梦
function FancyGachaGroupModel:GetUpIcon() return self.data.detail.upIcon == 1 end
1
d4aa4b5cdbb3d19173e9007592ea45e4
c7a94b300f7540eac3a0ab2b738902f4
This simple function returns the computed wrist center in the format desired by the IK_debug.py script
thetas = [0.0, 0.0, 0.0, 0.0, 0.0, 0.0] l01 = 0.152 l02 = 0.120 l03 = 0.244 l04 = 0.093 l05 = 0.213 l06 = 0.083 l07 = 0.083 l08 = 0.082 l09 = 0.0535 l10 = 0.059 xgrip = xWgrip + (148 / 1000.0) ygrip = yWgrip - (148 / 1000.0) zgrip = zWgrip - 0.01 yaw_Wgrip ...
0
0c49631e56e21a9f7af62edbe997bf4b
d53343a415bed98216d081d160dc4c1d
导出多分辨率icon
Bitmap bitmap = null; List<String> dealedPics = new ArrayList<>(); for (String icon : icons) { if (!"-1".equals(icon)) { long size = 0; try { size = FileUtil.getFileSize(new File(icon)); if (size > 500 * 1024) { ...
0
9725547a0d4b149ca9772ab36ee8d8c0
c8b15254bf7c5b11811af6bd36e18ef3
Removes the specified player from the match
{ Clients.Remove(name); PlayersNames.Remove(name); if (Match != null) { Match.PlayersDeck.Remove(name); if (Match.Turn == name) { Match.Turn = PlayersNames.IndexOf(name) + 1 >= PlayersNames.Count ? PlayersNam...
1
efd45a44d7a6d8c1b837b8420cb5ada3
1aae18465ad3ecab1c0a7457071a9ddd
Returns the meta object for the containment reference '{@link nqc.AcquireStatement#getBody <em>Body</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getBodyCommand();
1
33505ac89a554b194275ffa66250e949
ea816b96bfe3ce63bfc04a46d91e489d
Visit a parse tree produced by Java9_v2Parser#requiresModifier.
T visitClassModifier(@NotNull JavaParser.ClassModifierContext ctx);
0
a2af2d40eae061131f644308f28dff56
94b999c49acde83ca987083c2f3b9e7a
returns monthly salary + commission
class Employee1(object): def annualSalary1(self): return f'Total: {self.pay.getTotal() + self.bonus}'
0
0eb1056d3358e2a34e1506a4a2328d46
3e868674498d690cf6fa22d3e0e5d275
Может ли пользователь встать в лидеры
admin_users = self.sales + \ [self.creator] + self.replace_sales return user.is_leader() or user.is_admin() or user.is_media_leader() or user in admin_users
0
f3f46eed9c0d523cca711a48e1ae7e2e
66f772646f9424dd31ed13e0ac64d995
Sets the name of the block that should execute next.
public void setNext(String link);
1
5fed3e4cdadc21e7eaff3bbb92e9b075
ad2f2be16e485e3cd33882ec2e8003c9
! \brief Check if DHCP has configured our interface \deprecated Applications should use NutDhcpStatus().
dhcp_client_is_dhcp_in_progress ( void * dhcp_client_handle ) { dhcp_client_mgr_info * info; if ( NULL == dhcp_client_handle ) { ERR("dhcp_client_is_dhcp_in_progress called with NULL handle", 0, 0, 0); ASSERT(0); return FALSE; } if ( FALSE == dhcpi_client_mgr_info_verify(dhcp_client_handle, TRUE...
0
722287bba4847f0bb25c53eacfa5511e
6d7d545e03cae2be391e7af3176a059a
Show file open dialog with the file browser open by default
namespace Corvinus.WPF.Common.Dialogs public sealed class FileDialogRenderer : IFileDialogRenderer public string OpenFile(string title, string defaultExtension, string defaultFilterName) { return this.OpenFileInternal(title, defaultExtension, ...
0
30a38beb3cf01f59f556236f7f707fde
7f6dad78d62c1081967b2ef5e838ec67
Function to check if the number is a happy number or not
def isHappyNumber(n): if(n == 1): return True visited = set() visited.add(n) while True: n = get_digit_sqr_sum(n) if(n == 1): return True else: if(n in visited): return False else: visited.add(n)
1
1926359aa101b482e51ad1a25dd48070
68e5d3ec3e25f82d5e7a118fa5550973
@brief Commit the current mode to flash for use after a power cycle.
{ if (settings_need_commit) { rtc_set_register(0x18, 0); while (pin_is_low(nDISP_SS)) {} pin_low(nRTC_SS); spi_out(0x99); spi_out(current_settings.byte); spi_out(current_settings.byte ^ 0xFF); pin_high(nRTC_SS); settings_need_commit = 0; } }
1
38672244bbb69b33365c38d4f84f4710
de8956a41d659fec073055f66d72ff2f
Show the individual email and hide other views
document.querySelector('#emails-view').style.display = 'none'; document.querySelector('#compose-view').style.display = 'none'; document.querySelector('#read-email').style.display = 'block'; mailbox==='sent' ? document.querySelector('#buttons').style.display = 'none' : document.querySelector('#buttons').style.di...
1
d48723a0601359a1af8eac93a599a9ed
d23fa8fbd59e12345c643b5bcb6b631e
Gets whether or not to apply self-similarity to the volume of the germ notes. For example, if true, a germ with a middle note accent would generate a middle section louder than the surrounding sections, with the middle note of that section still louder. notes
public boolean getPreEmphasis();
0
4455dc9511b7dbc4115ac08fdca3d0c1
5801f8d35d5ebb73d0e9069ace63ddae
Fetch app info before component mounts in order to ensure that checks for enabled modules result use the correct config data.
class EnhancedAppBar extends React.Component componentDidMount() { requestScanInstalledApps(); }
0
854cc09a46fde7805a127ef391495842
ce2dbf4a1793d83a6e14a1698cffe408
Print AST enum type specifier.
public class CPPPrinter extends Visitor public void visitEnumerationTypeDefinition(GNode n) { printer.p("enum "); if (null != n.get(0)) { printer.p(n.getNode(0)).p(' '); } if (null != n.get(1)) { printer.p(n.getString(1)).p(' '); } printer.pln('{').incr().p(n.getNode(2)).decr().indent().p('}')...
1
edf108866b8e21d823bd3e39a42760ea
a58aae5c80200645adc92fcaffd79ea0
Create a db connection URL that can be used in `new Sequelize(db)`
def get_db_url(username, hostname, password, db_name): return f'mysql+pymysql://{username}:{password}@{hostname}/{db_name}'
1
4d8c01177e65dda8fa359e7f82374bd8
7e87b0a8da2c94dbda094716b2fbfdcf
単独テーブルかどうか確認
int is_alone_cent(t_list *begin) { if (my_strcmp(begin->data, tab_unit_val[3]) != 0) return (0); if (begin->next == 0) return (1); if (is_unitval_variable(begin->next->data) > 0) return (1); return (0); }
1
11eb5042b69a631b91e6e6b404776cdd
4c1b564cb611c843a4ee2a9a6df85eca
Load transaction metadata from file containing transaction body.
where H: FnMut(model::ClientId, model::Transaction) -> Result<()>, { let mut rdr = csv::ReaderBuilder::new() .trim(csv::Trim::All) .from_path(filepath)?; for result in rdr.deserialize() { let io_transaction: IOTransaction = result?; let client = io_transaction.client; ...
1
7a0f64b5f7849c228c7fc2b546fece8b
a408ce7c6de2bdcb3239c156d30cbc6b
сохраняем в файл пути к открытым файлам. путь к отображаемому файлу записывается последним
namespace Курсовая_работа public partial class Form1 : Form void FileSave(string pathInSave, string pathOutSave) { FileInputSave(pathInSave); FileOutputSave(pathOutSave); }
0
4e7febb7b6e9a77a58ade298b80dc819
1ac9eedeb700090bd22f9d519bac1ac1
计算PK所处阶段
int openDay = Integer.parseInt(pri.getOpenDay()); int redeemBegin = Integer.parseInt(pri.getRedeemBegin()); int redeemEnd = Integer.parseInt(pri.getRedeemEnd()); int currentDate = Integer.parseInt(CalendarUtil.formatDatetime(new Date(), CalendarUtil.DATEFORMAT_YYYYMMDD)); if(openDay<currentDate){ return St...
1
e973c9952065ef574f2af135db05ff47
9e682932e4c612a4bb9d021ad06f4eb9
新增游船数据
{ Connection conn = null; Statement stmt = null; int lines = 0; try { Class.forName(driverName); conn = DriverManager.getConnection(dbURL, userName, userPwd ); stmt = conn.createStatement(); lines =stmt.executeUpdate("INSERT INTO [test2...
1
9b81240bbf215c8955c0937584376a01
174c70a1e797105c97bc40539159e44e
模拟点击鼠标事件,实现特欧皇弹幕特效
function BattleScene:PlayMouseEffect() local uiLua = self.uiEventCtrl uiLua.super.PlayMouseEffect(uiLua) end
0
c7ab208e2058f2cc0d94184c79f10d0b
ca8dde8cc205a8a422ab2d366fdbdc0c
判断循环队列是不是空的,如果为空,返回1,如果不空,返回0
{ if(PQ->size <= 0) { return 1; } else { return 0; } }
1
f2bf57da6c76ef22d2e605d5c9f5b3bd
604fcec65b801ae285d05de41aaa44fe
Загружает лучший результат из настроек
{ DarkMagician.BestTime = PlayerPrefs.GetInt("BestTime", 0); if (DarkMagician.BestTime == 0) bestTimeText.text = "????"; else bestTimeText.text = DarkMagician.TimeString(DarkMagician.BestTime); }
1
85b0e0710f42baf781f9411eb1a6e3b0
acc83ec5900c199f17b03650ecdcc3b4
Finishes the asynchronous execution of the ListResourceProfileDetections operation.
namespace Amazon.Macie2 GetResourceProfileResponse EndGetResourceProfile(IAsyncResult asyncResult);
0
e23e4864f8f4262be1118933db546924
4e758597084d3a66f7a8d2ef795dfc25
takes in a batch of experiences and returns numpy arrays for each field
states_mb = np.array([each[0][0] for each in batch]) actions_mb = np.array([each[0][1] for each in batch]) rewards_mb = np.array([each[0][2] for each in batch]) next_states_mb = np.array([each[0][3] for each in batch]) dones_mb = np.array([each[0][4] for each in batch]) return states_mb, actions...
1
206e68860f48bbb0209d9e8e8450399d
45c914b71b6461b0e6c9ec84f892757e
Function to count the number of likes for the instance object
class Restaurant(models.Model): def total_likes(self): return self.likes.count()
1
6a86507385ebc110b2e97be0aebf6311
a8243bc506ca4906321b8955a6888f33
Change the color of the object to specified color
public class GameObject public void setColor(int x, int y, int z){ objColor = new Color(x, y, z); }
1
e55d626e542c14072f819a8eb74dc0ff
9954fd3d19f1565c477aebe67c941bff
返回一个正方体
{ Mesh mesh = new Mesh(); mesh.vertices = new Vector3[] { new Vector3(-width/2f, 0, -height/2f) * scale, new Vector3(width/2f , 0, -height/2f) * scale, new Vector3(-width/2f, 0, height/2f) * scale, new Vector3(width/2f, 0, h...
0
b224e67f19c45f31622957a943112c7d
be1f9caefe1c802ce5fef7f3baee519e
Load bibliography data from HTML into efficient and easy-to-use Javascript structures
{ $database = file_get_contents('var/publications.bib'); $entries = explode('@', $database); $data = array(); foreach ($entries as $entry) { $pos1 = strpos($entry, '{'); $pos2 = strpos($entry, ','); if ($pos1 === false || $pos2 === false) { continue; } ...
0
7f26752e793be427eb654451d5ebc6bf
40c79ecc7cd68c1da19093995f324edd
Repraesentiert ein beliebiges Mitglied der Hochschule.
self.name = name self.alter = alter self.position = position self.adresse = adresse self.email = email print 'Person %s initialisiert' % self.name
1
2080a62781187dba782d9de06b010094
751e44cac83296d268cba79bb0cee019
Reduced to two dimensions by LDA
def LDA(data: np.ndarray, labels: np.ndarray) -> tuple[np.ndarray, np.ndarray, np.ndarray]: assert data.shape[0] == len(labels), "Each data point (= row of the data matrix) must have an associated label" assert len(np.unique(labels)) >= 2, "At least two classes are required" nFeatures = data.shape[1] wi...
1
0ac1ccd9fd56c0584c87e3bc42259bfd
ab38111e798c47ff6f9109009fb8b202
返回地址addr处存储的T类型的值
{ var converter = Memory.ConvertToTypeDictionary[typeof(T)]; if (converter == null) return null; var buffer = (typeof(T) == typeof(string)) ? new byte[1024] : new byte[Marshal.SizeOf(typeof(T))]; Memory.Peek(p, lpAddress, buffer); return converter.Invo...
1
713cba03e1b3abb6ee0a867de4c0a5e1
e00860a39b05c332d81d4c08347c932a
The current problem tableau.
def get_subproblem_table(max_cap, n, subproblems): table = PrettyTable() temp = ["j,x"] for i in range(max_cap+1): temp.append(str(i)) table.field_names = temp for t in temp: table.align[t] = "r" for i in range(n): row = [n-i] for j in range(max_cap+1): cell = str(subproblems[i][0][j]) + "\n" cell +...
1
50f518d889bee564124151cf23b0c183
89333b20f8ed2b7d31fb2f7929ed309d
这个服务器的作用是,当我点击用户界面的每个业务超链接的时候,请求会发送到此服务器,每个不同的链接带着不同的参数 服务器获取参数,给不同的参数做不同的业务,返回一个Attribute,页面那边根据获取到的这个Attribute,来在中间的部分 显示不同的页面
@WebServlet(name = "ServletDemo1") public class ServletDemo1 extends HttpServlet protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { ServletContext application = this.getServletContext(); application.setAttribute("name","tom"); }
0
fd551e741ed9cb83a0b3a47afe5e6f7e
6c0794be8a031547196123701958e4ec
This method controls if there are two different stations entered.
namespace SRB_Rail_Timetable public partial class MainPage : ContentPage bool Validate() { var placeholder = new TranslateExtension { Text = "ClickTo" }.ProvideValue() as string; if (fromLabel.Text == placeholder || toLabel.Text == placeholder) { var translat...
1
3015325c2760915176019e492c006488
8bab0c539c0c0555b265020b27e3b7fa
Modifies the set to contain only elements that are present in the set and in the specified <paramref name="other"/> collection.
{ CommonExceptions.CheckArgumentNull(other, nameof(other)); Contract.EndContractBlock(); if (count == 0) { UnionWith(other); } else if (ReferenceEquals(this, other)) { Clear(); } else { var otherSet = other as CharSet; if (otherSet == null || ignoreCase != otherSet.i...
0
142fb2dcbc362f55539b0f4cccca08e8
f01065f12c1e8dd6221ce274bb26fa9a
Implementation of the hypotenuse function that avoids under- and overflow issues with the naive implementation.
def hypotenuse(l1, l2): return (l1**2 + l2**2)**.5
0
87966fd50bbd4064974bb28caddbcfdc
ad804718cc3fc4210291ec9451edbbb5
Get current reference time value (seconds since epoch)
unsigned long get_sys_reference_time() { return timeGetTime(); }
0