query_id
string
corpus_id
string
query
string
code
string
label
int64
9f536e6a6dd402dfcc69301d0a302165
7f61448ad6da3ef0f9cb03f40c5be655
Simplification in place
cases like (1)
0
216abfe15c3afc90f8dcf83a26f640eb
f0075073e5262191763cc05f6866008b
противоположная скобка
def reverse(u): tmp = '' for i in u: if i == '(': tmp += ')' else: tmp += '(' return tmp
1
657345c2db67671725b8852820ccc62b
7e000ddd1f3630f72ccc3e595ba99f63
LL rotation 新节点在root的左子树的左子树下,root为最靠下的bf为正负2的节点
{ $L = $root->left; $L_bf = $L->bf; switch ($L_bf) { case self::LH: $root->bf = $L->bf = self::EH; $this->R_Rotate($root); break; case self::RH: $L_r = $L->right; $L_r_bf = $L_r->bf; switch ($L_r_bf) { case self::LH: $root->bf = self::RH; $L->bf = self::E...
1
e3028945e418e54a93e5e3adfc8342ae
3cab5531cbe682433143d3bbfc4bbb77
Metodo responsavel por converter modelo de entrega para response dto de entrega
public class Conversor public static IngredienteDTO converteIngredienteEntityEmDTO(final IngredienteEntity ingredienteEntity) { IngredienteDTO ingredienteDTO = new IngredienteDTO(); ingredienteDTO.setCodigoIngrediente(ingredienteEntity.getCodigoIngrediente()); ingredienteDTO.setNomeIngrediente(i...
0
ec5a2ca7f4c8e9d4df70fd68023e80e6
50ca8996a05c60d2f5aff2bd34475c74
! \brief Probe at30ts75 nonvolatile configuration register
static bool hymini_ts_busy(FAR struct ads7843e_config_s *state) { up_mdelay(50); return false; }
0
973e781fc5db7cd3dee6a0df0115cb0a
306b1020017ede4817ed109606889a65
Causes a call to {@code System.out.println}.
fun <T> T.println() = this.apply { kotlin.io.println(this) }
1
d163db55fe745c09ea9a91c75499142f
b7301fd2a15aad13f5868f821c59b2ec
求当前矩形区域和指定的矩形区域重叠的矩形区域
inline BOOL kGetOverlappedRectangle( const RECT* pstArea1, const RECT* pstArea2, RECT* pstIntersection ) { int iMaxX1; int iMinX2; int iMaxY1; int iMinY2; iMaxX1 = MAX( pstArea1->iX1, pstArea2->iX1 ); iMinX2 = MIN( pstArea1->iX2, pstArea2->iX2 ); if( iMinX2 < iMaxX1 ) { ...
1
7aff11d428f30dac836be119eceeb1ef
5849aa9766c52857e3efc578ca799064
p2p接続での着呼要求を拒否
namespace NIM.Signaling public class NIMSignalingAPI public static void Reject(NIMSignalingRejectParam param, InviteDelegate cb) { int nSizeOfParam = Marshal.SizeOf(param); IntPtr param_ptr = Marshal.AllocHGlobal(nSizeOfParam); try { Marshal.St...
1
40ddac97f963626a23920380c4a47ef0
d810d105075ea1ecb0db5e7e292b1f23
Handles the CellEndEdit event of the dgvRoleSettings control.
{ TextBox textBoxRoles = GetControl<TextBox>("TextBoxRoles", PageFormView); DropDownList dropDownListRoles = GetControl<DropDownList>("DropDownListRoles", PageFormView); if (textBoxRoles.Text != "") textBoxRoles.Text += Environment.NewLine; textBox...
0
7547a24f554db5e05ac47f0e6f1dc08f
36e6bde9d1c77a590d16ecde8c133fb9
Put back into the pool only good connections
void WXDBConnectionPool_Return(WXDBConnection *conn) { conn->inUse = FALSE; }
0
079e49359e52a49581e8d93dbac19143
8df925c3f3412332863c226474b4faaf
Returns the directory (e.g. `/home/john/dev/project/src/jvmTest/kotlin`) containing the source code of the class represented by this Kotlin class or `null` if it can't be located.
String getSourceDirectory();
1
b12a7ec58ab86926ba820651b74a38b2
81ae02cc4377eed88e01d98cc2f21c8c
¨Permet de définir la Pole Position
{ QVBoxLayout * choosePositionLayout = new QVBoxLayout(); QHBoxLayout * hBoxX = new QHBoxLayout(); QLabel * labelX = new QLabel(tr("Position X : ")); labelX->setMaximumSize(100, 30); hBoxX->addWidget(labelX); _spinBoxX = new QSpinBox(); _spinBoxX->setRange(0, 9); _spinBoxX->setMaximumSiz...
1
2160ba289e6ae92e245fd1d3ad6ba675
84c8c67ae82de38fad46628e75d3b86d
Finds the initial equations by finding equality through buddies, match, etc.
class InverseSolver(RMGenerator): def findEquilibria(self): self._mblInit() self.preferenceRankings = list(self.prefPermGen([dm.preferenceRanking for dm in self.conflict.decisionMakers],self.vary)) self.nash = numpy.ones((len(self.preferenceRanking),len(self.conflict.decisionMakers))).astype('b...
0
c4a29621bf6ff5b3a8db6396fde8e532
8cf11612bfc38f64d184a64d37780cba
select one recipe by cookingId.
function requestCookingDetail(id, data, successCb, errorCb, completeCb) { request(api.API_COOKING_DETAIL.replace(':id', id), 'GET', data, successCb, errorCb, completeCb); }
1
d00c691176d5dcb67178a4412fc2988a
f7f7c4e94b5181904bb9f54a50ff8076
Returns true if ctrl (linux, win) or meta (mac) has been pressed and not the other.
public class KeyEvent extends InputEvent implements Parcelable public final boolean isCtrlPressed() { return (mMetaState & META_CTRL_ON) != 0; }
0
22d70bea7be68e911f75bb9521c6a536
b4ba5b9485fd0e3b2acc8656ac51d184
Given the desired servicePort, return the allocated nodeport
{ $row = AppInstance::where("node_id", $this->id)->orderBy("port", "desc")->first(); if ($row) { if ($row->port >= $this->maxPort) { throw new \Exception("too many instances in same node"); } return $row->port + 1; } else { retu...
0
006e1207b7eaea1cda0605a1f5be976a
8b564787cd73a39d61bee0cce6675272
Specifies that this IntervalVar must be present.
class CodeGenerator(CddlXcoder): def present_var(self): return ["uint_fast32_t %s;" % self.present_var_name()]
0
c344a8769ee87b48f718574ab59a9c19
961c50aedb66c090cabdb04bf41efed0
获得一个文件资源管理器实例。
if (fileManager == null) { fileManager = new FileManager(this); } return fileManager; }
1
95a0481b9db76fe68352bb7a0a5fa3d3
9407c5257e07f7c2d7c542fac3d276d0
Método de persistência genérico, ultiliza reflection para leitura das propriedades
public <T extends EntidadeAbstrata> T update (T t) throws CheckedValidationException;
0
969ebac64794478f1e4bd9781f2d262c
8927ed2c776367b802ff5d073439bade
处理请求的数据 表明处理由"-"隔开的数据数据,并转成DemoObj的对象
let cmd: string = ud["msg"]; let data_arr = cmd.split(" "); helper.do_test(data_arr); }
0
b13d031ed7225b428c14ba8443f459b3
cb763ff470270207a32e96312b6051d6
获取收件人姓名和电话号码,并将它们显示出来
ContentResolver cr=getContentResolver(); Uri uri= ContactsContract.CommonDataKinds.Phone.CONTENT_URI; Cursor cursor=cr.query(uri,null,null,null,null); List<String> contacts=new ArrayList<>(); while(cursor.moveToNext()){ String name=cursor.getString(cursor.getColumnInd...
1
9537489c6a02421fee7eac8f5c680f8f
547ed2ac470e418862f63b242b777642
Hooked to filter: manage_edit-shop_order_columns. Add a column to the shop orders table.
if ( !array_key_exists('plugins_menu_order', $columns ) ) { $columns['plugins_menu_order'] = 'plugins_menu_order'; } return $columns; }
0
94835d346efe97082859d777a5a18b74
3a03f92594656ec1fb341fa59111f700
Saves Current Game Data and Returns to Main Menu
public class GameState : MonoBehaviour private void backToMainMenu() { PlayerData.save(); SceneManager.LoadScene("MainMenu"); }
1
fb00bae6aaf0507b050fe944ba9185cd
750be70c71d26e82d2d26d3c9618274b
Returns the MMTF version number (from the specification).
class cygnet4k(object): def micro_Version(self): return tuple(map(ord, self._serial_io(b'\x56', 2)[0:2]))
0
a342e61ab554bd5c7903c5c96d1656dd
cc9d82c6aa3add5e2ae7789f561ac83c
\brief construct a list of available devices of a given type
{ size_t dev_count; sensor_hal_t *const dev_list = sensor_list(&dev_count); for (int index = 0; index < dev_count; ++index) { if ((dev_list[index].dev_type & type) == type) { return &dev_list [index]; } } return 0; }
0
cb1edfb952ec37d9e8ab6cc97682c4e8
f06280e8fc6f07aebd914e081ead8955
Should raise OnPropertyChanged event when Folder title is updated.
namespace MovieDataSource void ForceOnTitlePropertyChanged();
0
c964a173818def472deab1e8f4f15360
e9b562ce4be559208d243203c8ba61a7
Rendering session configuration.
{ $renderer = $this->getRenderer(); $this->attributes['data-rendermode'] = $renderer->getMode() ?? 'default'; }
0
f82d3d0da26d3987bc0f1355b89976ef
219eacbd80c7c147b7ad2fae2b6b2914
# 2. Functional Evenness
is_even <- function(x) x %% 2 == 0
1
5b48d007eb96f94c6ece4dc55fd16585
bd02c01d11688b37d74455dfef22b5d0
获取加密身份证
function GetIDNum() { if (Capture.ReadIDCard()){ return Capture.GetIDNum() } }
0
b97897d96089797db9ae4f53b1fc70b2
fe6e13a8293f7c6e0b71a53467946d37
绑定产品编辑事件
function bindEvent(){ $('#save').click(function() { updateGoods(); }); $('#back').click(function() { window.history.go(-1); }); }
1
c9ddc42c96f46e9118a55ae5f6b3bf06
c9c775206ffa049658be856ae30e5688
Tell RabbitMQ that you would like to stop consuming by sending the Basic.Cancel RPC command.
namespace HermEsb.Core.Communication.Channels.RabbitMq void HandleBasicCancel(string consumerTag);
1
110a8f2dfe316050f2074bcea4a744aa
7442e5698aff558afb4cb827e59f7b76
根据老人id获得其各房间的温度阈值
@RequestMapping(value = "/getThreshold_d",method = RequestMethod.POST) public DataGrid getThreshold_d(Integer oid){ DataGrid dg = new DataGrid(); if(oid==null){ dg.setTotal(0L); List<Threshold> th=new ArrayList(); dg.setRows(th); return dg; ...
1
5d3f30dfbe42caf673ffe73329a817cc
9c87784cb2fda39525a0a202d4db6f53
随机数组不同的值(不会改变数组)
Random r = new Random(); Integer[] result = new Integer[arr_legnth]; for(int i=0;i<arr_legnth;i++){ result[i] = r.nextInt(arr_legnth*3); } return result; }
0
d099588355450081982757cb1adc7341
4c49399890c4346d9a4f8fe742b30c62
Saves the changes applied to the <see cref="Album"/>.
namespace SmartPresenter.BO.Common.Entities public class PresentationPlaylistGroup : IPlaylist<IPlaylist<IPresentation>> public void Save() { throw new NotImplementedException(); }
0
918d06a3c6db3c6bec668e5f208886e0
7e98d43aa42e608f36ac292d202e432f
Get a list of all spells
function VFLS.GetAllSpells() return spFN; end
1
262100655f26c0f8f8d62c7f88c9d4e9
34429a84a568fabbfb75c1af52dbe632
显示动态图
class UCenterController extends HomeController{ public function dynamic(){ $user_id = session('user_auth')['uid']; I('uid') && $user_id = I('uid'); $map =array(); $map['uid'] = $user_id; $Album = M('Album'); $Thumb = M('Thumb'); $Pic = M('Pic'); $dyn_list ...
1
ea531753ba28d9746ab43986b344b310
3dc5493e11c2c324b2b7cf712d0447fe
@brief Set the start display point of lcd.
{ #if 0 LCD_WriteReg(R32, Xpos); LCD_WriteReg(R33, Ypos); #else LCD_WriteReg(R32, Ypos); LCD_WriteReg(R33, LCD_WIDTH- Xpos); #endif }
1
9ad679b76a9e07023e72a3fed5048740
cbf85c88d0d49af212c6403599694729
测试标准输入能否被设置偏移量
int main(int argc,char *argv[]) { char buf[SIZE]; if(setvbuf(stdin,buf,_IONBF,SIZE)!=0) { perror("将标准输入stdin的输入设置为无缓冲失败!\n"); return 1; } printf("将标准输入stdin的输入设置为无缓冲成功!\n"); printf("stdin类型为"); if(stdin->_flags&_IO_UNBUFFERED) { printf("无缓冲\n"); } else if(stdin->_flags&_IO_LINE_BUF) {...
0
53ed4c0739c7072ea54967c17f295032
60d2eb1730c8c3f05d0a8d21a7243b56
convert Earth Centered Inertial (ECI) to Perifocal Frame
def gravity_eci(rad, lat, lon): g_ecef = earthgrav(rad, lat, lon) g_eci = np.zeros_like(g_ecef) g_eci[0] = g_ecef[0] - (2*np.pi/86164.09164)**2*rad*np.cos(lat)**2 g_eci[1] = g_ecef[1] - (2*np.pi/86164.09164)**2*rad*np.sin(lat)*np.cos(lat) g_eci[2] = g_ecef[2] return g_eci
0
542155119eb3c4358158d3ead6cd41bd
66a50abb570a305dbb5d2a0ec839bbe4
A dict whose items can also be accessed as member variables.
class VariableMap(object): def __init__(self, **kwargs): self.__dict = {} self.__dict.update(kwargs)
1
7c7a505138732526eb5cb1d8627de2ee
1ba421e862e38bfe316eafe4256f8acf
Gets the last base.
class File public function getBase() { $splitted = $this->splitted; return array_shift($splitted); }
0
58cf5c8bdad8eb29f9c607f71bd0d667
125a50aca16e78fde2debd35a3f2c1f4
Reverse slice of integers
class Py2Codes(ExecInterpreter): def slice__3(self): tos = self.stack.pop() tos1 = self.stack.pop() self.stack[-1] = self.stack[-1][tos1:tos]
0
4271f6cc1105badfe41e3b8b0305354d
bde05891d96870f6d9771d5428294fc7
@brief Sets the local (per model) clipping on or off.
int Root::setClamping(bool clamped){ return setDistanceModel(getDistanceModel(),clamped); }
1
aae5458a4cb05817571287b04b00168e
f9206bd192867b88e16a5e5b1c8e717c
今日播放历史记录列表
class programRecordApi extends BaseFrm function show() { $condition = $this->get_condition(); $offset = $this->input['offset'] ? $this->input['offset'] : 0; $count = $this->input['count'] ? intval($this->input['count']) : 20; $data_limit = " LIMIT " . $offset . " , " . $count; $sql = "select p.*,v.sort_na...
1
1d93269a7898e9c2be1cabfbeac7b4ad
9d025df760eff49e174ca6f0f80e36ac
print some shuffled arrays to make sure they look right
for(int i =0; i<MAX; i++){ std::cout<<i+1 << " : " << array[i] << " --> " << array1[i]<<std::endl; } }
0
e8a0719bb4742066219f29abe02e8c3a
8bdf0ef188c85a78335da685bd980d04
根据指定主键获取一条数据库记录,takeheart_summary_day
{ var entity = SummaryDataRepository.Instance.Find(x => x.Id == id).FirstOrDefault(); return entity; }
1
14b4e3dbcdbbcde94fd200804cf4014c
2ef46be5c89571c2025374437a73eff2
根据父级otherIdentities 查询子集joinTo
public Collection<Map<String, Object>> findChildrenJoin(PK parentId) { JoinQO joinQO = new JoinQO(); joinQO.setWhereColumnName(getParentColumn()); joinQO.setWhereColumnValue(parentId); return super.findJoinWhere(joinQO); }
1
665a5f1dd28c4181679adf3bb1384c0d
e418058f78c921237a5a5908d3772b9f
编辑框居中显示
var doc = window.parent,content = $(obj),dom = doc.document.documentElement; var left = (parseInt(dom.offsetWidth)-content.width())/2; var top = (parseInt( doc.screen.height)-content.height())/2 + dom.scrollTop; content.css({"top":(top <0 ? 0 : top)+"px","left":(left < 0 ? 0 : left)+"px"}); }
1
b65beb52aeb2845eb3273b69ddf59ddd
6656cff272b4a16b6b8b8ef0d9c01aba
根据lab_id获取实验室基本信息
lab_info = [] sql = "select id,org,institution from main_lab" results = db.select(sql) for result in results: lab_info.append((result['id'],result['org'],result['institution'])) return lab_info
0
f582e11279e8b0ec36eb4b1c0336d490
fe6140cf84c1758109d1fc4b30050182
编辑体重
vm.$store.commit("toggleOverLay"); await apiWarp('/setWeight', data, 'post').then((res) => { let data = res.data; if (data.status == 0) { vm.$message({ type: 'success', message: data.msg }) } else { vm.$message({ type: 'error', me...
1
32091786aeb012d0ca4de83fbf73efea
444495f8fd3463c8ff160562da8ffd49
Lấy danh sách danh mục của tin tức
public async Task<IActionResult> GetListNewsHomePage(string tenantId, string languageId, int selectTop = 5) { var result = await _newsService.GetListCategoryWidthNewsAsync(tenantId, languageId ?? CultureInfo.CurrentCulture.Name, selectTop, true); return Ok(result); }
1
97fa92d7e9fb2ea561ce88d31d422c83
c08b1e50a7be276dd0f47ccd3ac436b1
No interaction, so only main effect terms are expected.
class LogitOutcomeModel(BaseOutcomeModel, BaseLogit): def coeff_summary(self): return super().coeff_summary()
0
822997b93512c1160b2379d530248fab
fc98e397ecfc5e4d615a7957294b6841
起動停止スクリプトを更新する
public class UpdateScript : MonoBehaviour void Start () { }
0
aba24b8e8f4b20eb2945b83aa6e03124
4e8912eae54fb00b00f3f399e27cffa9
Saves the current scene.
namespace UI.Windows.MainWindow.MainMenu public class MainMenuScript : MonoBehaviour, IShortcutHandler public void OnFile_SaveScene() { DebugEx.UserInteraction("MainMenuScript.OnFile_SaveScene()"); AppUtils.ShowContributeMessage(); }
0
08426e5dd47774c4cfe52af6c8f00d25
ad81478387ea678babe1711e74c7e8a5
龙与地下城游戏:左上角出发,只能向下或向右,每个值代表加血或减血,求到右下角至少剩1血量,骑士所需的初始血量.
BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String str = null; try { str = br.readLine(); int N = Integer.parseInt(str.split(" ")[0]) / 10; int m = Integer.parseInt(str.split(" ")[1]); int[] v = new int[m + 1]; ...
0
9c622cc6dd3d0f381c6cfbc1038ef6b5
942f4d6ea4f1266f006d1d8dfce8f641
EventBus constructor.
class SimpleBusUserEventBus implements UserEventBus public function __construct(MessageBus $aMessageBus) { $this->messageBus = $aMessageBus; }
1
e8f67ded6a9fbee3c215d687c6367b2c
f11d6a5414c8e7df98072ee34c42d4b4
Create schema models from an API service discovery document.
self._catalog = catalog self._pseudo_fkeys = {} self.acls = AttrDict(model_doc.get('acls', {})) self.annotations = dict(model_doc.get('annotations', {})) self.schemas = { sname: Schema(self, sname, sdoc) for sname, sdoc in model_doc.get('schemas', {}).item...
1
755d8a926ae3eeacbddbae1e3b63aa5d
12e8f3ffd19e0cd1fb829a3579c6589a
Delete a custom showcase thumbnail
namespace VimeoOpenApi.Api System.Threading.Tasks.Task<ApiResponse<Object>> DeleteShowcaseCustomThumbnailAsyncWithHttpInfo (decimal albumId, decimal thumbnailId, decimal userId);
1
e6544a366ded3d45b839d1e0d4e07a6d
6e8ceafd0b3edbbac93166e7c714197d
Create user if the login was successful
namespace HelpConsciousness.Controllers public class UserController : Controller [HttpPost] public ActionResult Create(UserVM user) { try { if (ModelState.IsValid) { userLogic.CreateUser((UserVM.Map(user))); ...
0
46d866160e03b2a980be32ddba91f4af
d26393b7709d22af7bb79260d478f70b
第1引数座標との距離が第2引数の値以内に位置するキャラクター全てを格納したリストを返す
center = self.get_center_point() x = center.x y = center.y tmp = 1 ret = [] done = False while not done: j = 0 k = v for t in range(2): for i in range(tmp): x = x + j y = y...
0
046568d24a98d936b29c551758e25a3f
9fc4a718779304daedfc20ca9166292f
Exit a parse tree produced by {@link TSqlParser#generate_new_keys}. @param ctx the parse tree
public class TSqlSyb155ParserBaseListener implements TSqlSyb155ParserListener @Override public void exitExisting_keys(TSqlSyb155Parser.Existing_keysContext ctx) { }
0
c1575249df09c0bbd4579f505f8221e8
578095afbadfbe324215ffea2be15880
Without Using Swapping:
void reverseWithoutAnything(int arr[],int n){ int i=0; while(i<n){ arr[i]=(arr[i]+arr[n])-(arr[n]=arr[i]); i++; n--; } }
1
da9cdebd6cea8b2236771b77c7d45121
c15806469729952b72f92fb9f8b6a7f3
Test unlinking of file from dataset and aborting.
self.mock_datasets.delete.return_value.execute.side_effect = \ Exception() actual = self.client.delete_dataset(self.dataset) self.assertFalse(actual) self.mock_datasets.delete.assert_called_once_with( projectId=self.project, datasetId=self.dataset) self.mo...
0
aa10469246bacefb1ea175fab214fadd
adabc573862730d4431cd231777d5997
Load file contents and check for any server-side code
class code extends objects protected function getContent($file) { $txt = APP::read($file); if (! $txt) return ""; $txt = STR::dropComments($txt); $txt = STR::dropSpaces($txt); $txt = STR::clear($txt, "\r"); return STR::replace($txt, "\#", "#"); }
0
1ee8e4f6456f9a2578f05b3767f804d9
92717a0e167b530616ce260070ef1b6a
параллельный расчет сил в момент времени t с использованием дополнительных массивов для каждого потока
#pragma omp parallel for private(i) for(i=0;i<n11;i++){dF4[i]=dF3[i]; dF3[i]=dF2[i]; dF2[i]=dF1[i];} #pragma omp parallel for private(i) for(i=0;i<n21;i++){dF24[i]=dF23[i]; dF23[i]=dF22[i]; dF22[i]=dF21[i];} #pragma omp parallel for private(i) for(i=0;i<n31;i++){dF34[i]=dF33[i]; dF33[i]=dF32[i]; dF32[i]=dF31[i];}...
1
d318e2ea5bab6b5c09028017ca59f4dc
7568f488c237118b67e9b7c97bdfc73e
Visit a parse tree produced by JavaParser#annotation.
public class JavaBaseVisitor<T> extends AbstractParseTreeVisitor<T> implements JavaVisitor<T> @Override public T visitAnnotationTypeElementDeclaration(JavaParser.AnnotationTypeElementDeclarationContext ctx) { return visitChildren(ctx); }
1
0bd506a81aeb632305cd5d160ac498cc
56c3838b906fa7a9984d4f511c2d6e8c
Copy pixels from program memory (flash) to the display
void blitpg() { memcpy(vidseg,vidbuffer,size_t(screensize)); }
0
a1ba4c24ef853190b4cdee34a22e673b
5b163737ffbadc8043144c762d0798d0
check if vertex is in vertList and return it
class Graph: def getVertex(self, key): if key in self.vertexList: return self.vertexList[key] else: return None
1
b8fa358eca8571e672a5661868730893
f0dd8350c1287103d796bddc7d74acc4
Gets a list of movies by given list of ids.
func FetchMovies(ids []MovieID) (movies []*Movie, err error) { err = db.Where("id in (?)", ids).Find(&movies).Error if err != nil { return } return }
1
ef354f97a036c537eaeaca571349a46b
b4bab02f6b5a425e682c10e2a41b9c13
Retrieve a list of check-ins at a particular spot.
public Iterable<LBSCheckin> findNearCheckins(final String pid);
0
7ea8f1b9778c29ed6e4661f7ace6491b
1543ae050b8742a221c444c048bde7b9
Function to send acknowledgements with the given acknowledgement number.
char *real_data = calloc(sizeof(char), 516); sprintf(real_data, "%2d%2d%s", 3, num_ACK, buffer); send_data(sockfd, real_data, serv_addr); return 0; free(real_data); }
1
293d310415c8269a4861a1750a9b90eb
d02177f97590058371e06bc553302298
Get dictionary for node checks.
t = node.blockCount() count = t["count"] unchecked = t["unchecked"] return {"count":count, "unchecked":unchecked}
1
dbaf0e67717e4db8c86028f2661b6ba1
2d776fd62186cebaaf241232eb51874d
将用户图片的二进制数据上传到七牛云存储平台
Configuration cfg = new Configuration(Zone.zone0()); UploadManager uploadManager = new UploadManager(cfg); String key = uploadFileName; Auth auth = Auth.create(accessKey, secretKey); String upToken = auth.uploadToken(bucket); try { Response response = uploadMa...
1
6d156479b3a6376581765bb63102d1c2
565feb9ed57e63907b474c1f0b5353d7
returns how many terms make up the current sum
let currentNumber = int; let conversion = ''; let reversedFilteredArr = fibLib.filter((obj)=>{ if (obj > currentNumber) { return false; } return true; }).reverse(); for (var i = 0; i < reversedFilteredArr.length; i++) { if (currentNumber !== 0 && currentNumber >= reversedFilteredArr[i]) ...
0
af3ae20f3319e7daa94b2187ded0e417
37d0adeab6cbbf96f58b8b3411d26a04
判断请求是否来自gateway
func RequestIsFromHdsGateway(ctx *gin.Context) bool { return requestFromHdsGateway(ctx) }
1
cc9845cfee494da7cd266ba8cb9609e1
921ac761ac51a00582e8179aacf039a6
非阻塞的TCP连接.
{ FUNCTION_TRACK(); int n = m_tcp.Accept(); if(n < 0) { LOG_ERROR("err: Accept()"); return NULL; } Connect_TCP *pNew = new Connect_TCP; if(NULL == pNew) { yCTcp(n).Close(); LOG_ERROR("创建Connect_TCP对象出错"); return NULL; } pNew->m_tcp = n...
0
48be06afd3f6139b343d5c121d4f4389
aef4c3ba8f3f25a25b6c50275205bc9e
添加列表到队列的最右方
namespace ServiceStackHelper public class ServiceStackHelper : IDisposable public static void AddItemToListRight(string list, string item) { redisCli.AddItemToList(list, item); }
1
3894cc321c052f0b2d0e516edf6857b5
a204bfaeb992ed4c890109426ec0d353
uses the callback to inform the controller a new contact was created
public void onContactAdded(String username) { new Thread() { @Override public void run() { contactFragment.setContactsMap(getContact()); contactFragment.refresh(); } }....
1
037cc5b03858c3093e2a47ab9551c554
601aa150e3c60fa499a5ed885126f049
音楽を一括取得
namespace Bootleg.API public sealed class Bootlegger public async Task<List<Music>> GetMusic() { var req = new RestRequest("/api/editing/music"); var resp = await GetAResponse<List<Music>>(req, new CancellationToken()); return resp; }
1
d1b3c85c30aea1b7b0cdab4f58b794ce
28748f08b14f1ac3581ab8eaa12071b4
counting sort(stable): time complexity: O(k + n) space complexity: O(k + n)
def counting_sort1(arr: list) -> list: freq = [0] * 100 for digit in arr: freq[digit] += 1 return freq
0
543912855ac9f905bb66df5d4c7852e6
4892b6ae1bb2eaffe3eea37392e05b5f
Iterates the all clauses to check if all of them are satisfied.
{ string result = ""; int i = 0; for (it->first(); !it->isDone(); it->next(), i++) if (it->currentItem()->evaluate()) result += ((result.empty()) ? "" : ";\n") + getClauseAnswer(parser->clauseVariables(i)); if (i == 0) result += getClauseAnswer(parser->clauseVariables(i)); ...
0
2eeee792ad45f2ff57f76244b71d9b3e
514e6e380a23defcd7f66e76416ac5c0
Returns the meta object for the reference '{@link org.abchip.mimo.biz.model.workeffort.workeffort.WorkEffortPartyAssignment#getAvailabilityStatus <em>Availability Status</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getWorkEffortPartyAssignment_AvailabilityStatus();
1
aa9d7973f9c6fe749d7f19dd49ddb224
a1e2b49128a23ccd095cfd6bf9900996
<para>Restores a minimized (iconic) window to its previous size and position; it then activates the window.</para>
namespace Vanara.PInvoke public static partial class User32_Gdi [DllImport(Lib.User32, SetLastError = true, ExactSpelling = true)] [PInvokeData("winuser.h", MSDNShortId = "arrangeiconicwindows")] public static extern uint ArrangeIconicWindows(HWND hWnd);
0
940821eb59e45554ee3e7d85c1d2564b
29663980560797d146f6a77ce111aa82
Combine and write the PL CONF MSI Controller Upper Address (RC-mode MSI receiver) register
( const CSL_PlConfRegs *baseAddr, pciePlconfMsiCtrlUpperAddressReg_t *swReg ) { uint32_t val = swReg->raw = baseAddr->MSI_ADDRESS.MSI_CTRL_UPPER_ADDRESS; pcie_getbits(val, CSL_PLCONF_MSI_CTRL_UPPER_ADDRESS_MSI_CTRL_UPPER_ADDRESS, swReg->msiCtrlUpperAddress); return pcie_RET_OK; }
1
e8ef78c399732c29db5e7881c5698717
1282eb83b31d161a832c8b466453cbdb
If a numpy obj of the name given exists, then load it and return the data, otherwise it runs call_func(), saves it to the cache dir, then returns it.
def cached_value(compute, name, typ="pkl", override=False, debug=None): debug = debug or (lambda msg: None) if not DISABLE_CACHING and not override and is_cached(name, typ): debug("Loading cached '{}'...".format(name)) try: result = load_cache(name, typ) debug("...done.") return result ...
1
e1dfc985abc2efe5f3c811e1fa83684e
95fb8e3ec543e8d4601b10855d9753bc
Group of commands related to key provisioning.
super().__init__(**kwargs) self.provisioning_state = None self.display_name = None self.description = None self.icon_url = None self.accelerator_tags = None self.state = state
0
95c4f4c1028bf6e594f92a6aeb36ba56
44f3d436260a9d3891f56735ba4cc757
Public : Returns all the campaigns found in the specified account === Parameters account_id - account who owns the campaigns === Examples => Array[BingAdsApi::Campaign]
class CampaignsApi def get_list(campaign_id, opts = {}) data, _status_code, _headers = get_list_with_http_info(campaign_id, opts) return data end
0
0e68bc77a9ffe1157d0eab36c0ec4ce5
66ee843dafcfa5d657518f55c059222d
Read/write attribute holding the referrent.
class Attribute(Entity, HasStore): def store(self): return self.parent().store()
0
0909c193029e682f301e46120004e5b0
69037ecd1ff4dd9736da5d693bb7bd45
Get the mtime cache entry for data file ``fname``.
def _GetMTime(filename): try: return os.path.getmtime(filename) except OSError as _: return None
1
16f892db3be1c808f2d9bdaf7253bf6c
92ea251b9e03545d2f3aae3eb699da72
将status cotent中的@转换成链接
Pattern pattern1 = Pattern.compile(REGEX_AT_MEMBER); Matcher matcher1 = pattern1.matcher(spannable); while (matcher1.find()) { String oldContent = matcher1.group(); String[] oldContentArray = oldContent.split(":"); String newContent = oldContentArray[oldConten...
0
15071877759cad1a34d0ed618ebd02c0
d44b1cc700967dda0e0dc443e00e36aa
Specifies whether the lease on a share is of infinite or fixed duration, only when the share is leased.
class LunArgs: def shareable(self) -> Optional[pulumi.Input[bool]]: return pulumi.get(self, "shareable")
0
a3e566bbcfe34906980fd9b0f8b284c8
cd7026cb6657fa5563d6d63a42a2ad6d
Get the serialization dictionary key for the field containing the ::attribute:`job_id` property. Returns
class NWMRequestResponse(MaaSRequestResponse): def get_data_dict_key_for_job_id(cls): return cls._data_dict_key_job_id
1
68548de21abf824d4d71168f36ac813b
c48a451ba96bdae0b72efba31a56e598
连通区域递归函数,传入中心目标像素的二维坐标(x,y)
int bFill_8(int x, int y,int fc, int bc) { int dc=getpixel(x,y); if(dc!=bc && dc!=fc) { putpixel(x,y,fc); bFill_8(x+1,y,fc,bc); bFill_8(x-1,y,fc,bc); bFill_8(x,y+1,fc,bc); bFill_8(x,y-1,fc,bc); bFill_8(x+1,y+1,fc,bc); bFill_8(x+1,y-1,fc,bc); bF...
1
14a32cb41be37718911d6a23d7e02a0b
a5b8eb82fbf7aa6e25f06672706367d5
Send an email with the analysis results.
if results == []: return sendMail( resultsToString(results) , toSubject(results) , getMailSender() , getMailRecipients() , getMailServer() , getMailTimeout())
1
c0b6a3d2b20f9e9c38c2286375703bec
9d3619ac958e43e35a2a89995085f38a
เพิ่มสถานที่จองคิวตรวจโควิด
function func_addme() { $("#ijinJoin" ).popup( "close" ); $("#btn_gabung").addClass('ui-state-disabled'); simpleAjax(URLSITUS+'api/tripaddme/', null); }
0
1dda7babea4b039a415f499045e9090f
419cdb0948802c24bc1745b19407571c
Returns output buffered content of included files.
public function getIncludedFiles();
0
38c1801d822cf2c7c485bdee510c7a90
0a9067c62367cf8eae6e9f1ed98de12e
prepare a propel result for displaying with printTable
{ $output = ''; foreach ( $result as $k => $item ) { $output .= $item->key . ': "' . $item->content . '",<br>'; } return $output; }
0
486708f746fd21eb01450eb7288fae77
18233ef8074957bc46e9729272993e46
Gets the number of reviews of an user
class Review extends Model public function count_review(string $user_uuid) { return $this ->newQuery() ->where('user_uuid', '=', $user_uuid) ->select([ 'uuid', ]) ->get(); }
0
40dabe69539f0f2bbefe79611e3b9b5f
3cd4b9aeb67a3e0c4149a2f8a33dd50e
Принимаем чистый номер в виде строки, только то, что ввел пользователь. возвращаем номер, обернутый в template
{ $phone['number'] = preg_replace('~[^0-9]+~', '', $data[0]); if ((is_numeric($phone['number'])) && (strlen($phone['number']) >= 10) && (strlen($phone['number']) <= 11) ) { if (strlen($phone['number']) == 10) { $phone['number'] = '7'...
0
9452b12cc066e9ba7af2f55d7a2a56b8
bddf96998b72d669eb8f88c4c9069924
Validation method. Verifies if FirstName/LastName/Email. Returns false in case one of them is null or empty.
{ if (String.IsNullOrWhiteSpace(CompanyName) && String.IsNullOrWhiteSpace(Surname) && String.IsNullOrWhiteSpace(Postcode)) { return false; } return true; }
0