query_id
string
corpus_id
string
query
string
code
string
label
int64
bf13588c701bcb7430625d746135bbc3
227e06f62c7608b1e0238cef18b5637e
Returns the Reading Histories
public function readHistory($params);
1
5907e0033df7e79a99191fc3c1bf05e7
7d984ab4ee87ac43a7b0438acf098660
Convert the splash angles to mcfost angles
mapped_angles=np.zeros((7)) mapped_angles[0]= -angles[0]+pi/4 mapped_angles[1]= -(angles[1]-pi/4)*1.2-pi/4+pi/2 mapped_angles[2]= angles[2]*1.5+pi mapped_angles[3]= angles[3] mapped_angles[4]= angles[4]*1.3 mapped_angles[5]= angles[5]*1.5+pi/3 mapped_angles[6]= angles[6]*1.5-pi+pi/2 ...
1
e5fca614032fdb851f8271c607c4f474
560e3eddb53c748726cebd09f61c99f0
鼠标覆盖时,显示按钮组
namespace StarVideoPlayer public partial class Form1 : Form private void VolumeButton_MouseHover(object sender, EventArgs e) { volumeControl.Visible = true; }
1
39378b4f0fdf132b26ffe296c7ccbb21
c06dd26e45b42422863ae1e1136e7135
Initialize any variables used in this state while it is active
state.LuzafRing = M(false, "Luzaf's Ring") state.Compensator = M(true, "Compensator") state.warned = M(false) state.CapacityMode = M(false, 'Capacity Point Mantle') state.FlurryMode = M{['description']='Flurry Mode', 'Normal', 'Hi'} state.HasteMode = M{['description']='Haste Mode', 'Hi', 'Low'} ...
1
ba1a1c951b7271b68a5a23dac68c8555
7f61448ad6da3ef0f9cb03f40c5be655
Our program's entry point
cases like (1)
0
cfd0e1a38c5243a8664286cd9101731d
b144f36953d4685bdcafc378fc3c1154
Check whether the moving player has just won by reaching the back row or by capturing all the opponent's pieces.
{ { for (int row = 0;row <= 4;row++) { for (int col = ROWS - 1;col >= 5;col--) { if (board[row][col] == 'R' && board[row + 1][col - 1] == 'R' && board[row + 2][col - 2] == 'R' && board[row + 3][col - 3] == 'R') { won(p1); return 0; } if (board[row][col] == 'Y' && board[ro...
0
bedc2e2622c37508832030f212c60c9f
a648a49f57dfcba3a0d8862745c15181
获取所有“省”和“市”的列表
namespace TygaSoft.IDAL List<Model.ProvinceCityInfo> GetList();
1
49ff02d43fe801811c07f0683e45dc25
af2fffea10c8c6cdd73b0c6e95b0a36e
\brief renvoie le nombre d'arc dans le systeme.
int Reseau::nombreSommets() const{ return m_sommets.size(); }
0
67a8dc5177596c04e7096084d3a58491
c6fa6e9cbf4e4a9316b7579ffe6c0a2d
模板列表控件单击事件
function templateDblClickRow(rowIndex, rowData) { currentTemplateid = rowData.id; changeTemplateDesignTab(rowData.chinaname + "模板编辑", rowData.templatetype); }
0
f8529db670a0c7760eb4f6fa0aff382e
0ddfa4b768ad54debf83c2cef4ce9df4
Log all Adwords Links Destinations to a sheet.
try: old_page = self.gsheet.page self.gsheet.page = "'{}'".format('reports') reports = self.gsheet.get('!A:ZZ', dim='ROWS') cnt = 0 try: while reports[cnt][0]: cnt += 1 except IndexError: ...
0
3cb1d3983f97b57432af44ac1fa88a81
1b4cdf6d949d45a6244b0b1a45f14bc3
初始化 头像选择样式
mPictureParameterStyle = new PictureParameterStyle(); mPictureParameterStyle.isChangeStatusBarFontColor = false; mPictureParameterStyle.isOpenCompletedNumStyle = false; mPictureParameterStyle.isOpenCheckNumStyle = true; mPictureParameterStyle.pictureStatusBarColor = Color.parseCo...
0
9439d1488fff23431db03c632be802a9
f3c3cdfad52acd073904e3d20c824d5a
Operation archiveStream Archive a stream.
class StreamsApiInterfaceTest extends WebTestCase public function testArchiveStream() { $client = static::createClient(); $path = '/streams/{stream_id}'; $pattern = '{streamId}'; $data = $this->genTestData('\d+'); $path = str_replace($pattern, $data, $path); $crawler ...
1
ca1a97aeb5934ed9c22ab9f2dd665c48
999752e6d61a6cfe4f8d3629d453404e
Kiểm tra chuỗi để khôi phục mật khẩu có đúng hay không
{ var strA = getSecureString(passA); var strB = getSecureString(passB); if (strA == strB) { return true; } else { return false; } }
1
6e8831d10ef668aeff0aa87b0f359ca3
f68df1e28b3926de3132391f5e553588
@brief : disable the IMU module
uint32_t IMU_deInit( void ) { uint32_t status; IMU_state = IMU_STATE_DISABLED; status = ICM20648_deInit(); return status; }
1
3f5ff97711ba67e1433165346ec174bd
ca0105d640ae379ef915184c34bd5a13
Submit code for algorithm to guess, then repeat until solved
global y, x, i,total_guesses initialize() if check_vals() == True: continue_loop = True while(continue_loop): if i < (n-1)/s: min_delta = y[1] x_counter = 0 delta_total = 0 for k_counter in range(1,k): guess_str = "" total_guesses += 1 for s_counter in range(0,s): guess_st...
1
011d8d93f6c464d6c32f44180c5976a3
57eaa793bef9fb23fe0c643c8c6b427f
CheckDestinationMaster performs multiple checks on a destination master.
SpecsError specsUserCheckParameters( SPECSSLAVE * theSlave ) { if ( NULL == theSlave ) { return InvalidParameter ; } else if ( 0 == theSlave -> pSpecsmaster ) { return InvalidParameter ; } return SpecsSuccess ; }
0
fe6a6d9cbc2d490fabf77980d09814b3
8202db0af3ae91738f23acc98f667d18
Gets the locator with the specified content id.
{ if ( ! $contentId ) { return null; } if ( ! isset( self::$_instance[$contentId] ) ) { $daContent = BeMaverick_Da_Content::getInstance(); if ( ! $daContent->isKeysExist( array( $contentId ) ) ) { self::$_instance[$contentId] = null; ...
1
16a02e3a5aea3b1fbba1af5876ab6114
1b2ed07e443c874abcc5b764cb9e2ed8
Writes the bytes from an array into the internal buffer to be later written to the base stream. If <see cref="AutoFlush"/> is <see langword="true"/>, the buffer will be flushed before returning.
namespace SixLabors.ImageSharp.IO internal class EndianBinaryWriter : IDisposable public void Write(byte[] value, int offset, int count) { this.CheckDisposed(); this.BaseStream.Write(value, offset, count); }
0
e9c84f82083827232275acfd9a56fd22
a90f399ce458899f3f63f6f32f7ae66f
Setter for maximum HTTP connection age. The units are in minutes. Value must be > 0 for objects to expire. Values <= 0 means the HTTP connections never expire.
public class HttpHeaders implements MultiValueMap<String, String>, Serializable public void setAccessControlMaxAge(long maxAge) { set(ACCESS_CONTROL_MAX_AGE, Long.toString(maxAge)); }
0
9b2ceb62fbd3965319e57859b1572d09
e13675aee62e131566659bc1ff05594c
This method creates observables for Models and Collections and binds any methods. Other values will remain untouched.
interface Presenter<V : View> fun subscribeModelEvents()
0
60441ecbdea4099847c54599f5d6e19e
e33c37aa674743b202a5ee8d9a22a58a
左ステップ
public class NejikoController : MonoBehaviour public void MoveToLeft() { if (IsStan()) return; if (controller.isGrounded && targetLane > MinLane) targetLane--; }
1
a7b82ad146844a853a14faa3e2153293
330ce3b0521a7f09e7df0e661f338263
Evaluation of a simple predicate, that uses the "xs:decimal()" function. .
public void kNumericAdd13() { final XQuery query = new XQuery( "(xs:decimal(6) + xs:integer(2)) instance of xs:decimal", ctx); try { result = new QT3Result(query.value()); } catch(final Throwable trw) { result = new QT3Result(trw); } finally { query.close(); } tes...
1
16e964ec86e5842e4dd54b080c2c95e0
db2ba231084ba995b52c514bc7492b6e
POST: api/auth/logout
namespace HackTruda.API.Controllers [Route("api/[controller]")] [ApiController] public class AuthController : ControllerBase [HttpPost("logout")] public async Task<IActionResult> Logout() { await HttpContext.SignOutAsync(); await _signInManager.SignOutAsync(); ...
1
05e3685ff6785127c86540dac5627ed9
0df74639f7ed1863d21feb39c532ffa1
Reward function for the full hover controller
{ float alpha = get_rate_roll_pid().get_filt_alpha(); float alpha_remaining = 1-alpha; return 2.0f*_motors.get_throttle_hover()*AC_ATTITUDE_RATE_RP_CONTROLLER_OUT_MAX/((alpha_remaining*alpha_remaining*alpha_remaining*alpha*get_rate_roll_pid().kD())/_dt + get_rate_roll_pid().kP()); }
0
0f75554eade359e8e16148d7e5ab1036
c4d0376288c9bc3a0ac299ea8104edc4
подготовить списки возможных значений, взяв их из соотвествующих моделей
namespace Reports.Presenters.UI.Bl.Impl public class StaffListBl : RequestBl, IStaffListBl public void LoadDictionaries(StaffTemporaryReleaseVacancyRequestModel model) { model.AbsencesTypes = StaffLongAbsencesTypesDao.LoadAll().ToList().ConvertAll(x => new IdNameDto { Id = x.Id, Name = x.Name })...
1
56c899feee6df3f174ed7cc92988e36d
64461af80308395135186c01367f0775
This method checks the vector data for duplicates
int var = 1; for(int i = 0; i < data.length; i++) { if(var == data[i]) { var++; continue; } else return false; } return true; }
0
5abe2e430eae6275305dfc1696742064
dda936635943a12ccf7c9cbeeb340985
Funcion que retorna el listado de usuarios incluidos en el proyecto
$query = 'select distinct "Proyecto"."idProyecto", "Proyecto".nombre, "Proyecto"."fechaInicio", "Proyecto"."fechaFin", "Usuario".usuario, "Proyecto".detalle from "Proyecto", "Usuario", "Actividad" where "Actividad"."idUsuario" = '.$idUsuario.' and "Usuario"."idUsuario" = "Actividad"."idUsuario" AND "Proyecto"."idProy...
0
cb1f75f340d66545a838f034f7adde5f
418385b1681a19e3ce9df47e4d93ee6f
按条件分页查询(高尔夫组团详细表)信息,模糊查询
if (limit > maxPageSize) { limit = maxPageSize; } Page<JoinModel> page = PageHelper.offsetPage(offset, limit); try { List<JoinModel> result = searchJoinAll(searchParam, simple); if (result == null || result.size() == 0) { page.setTotal(0L); } return new PageResult<JoinModel>(page); } finall...
1
42a23dcccbdd4f5eabfa2218508e056a
55e77001581dddef27a0beed251652fb
Verify that the correct number of target are filtered
def _is_filtered(config, tu_list): tu_list = _run_pipeline(config, prepoperator.ProcessType.TRAINING, tu_list) return len(tu_list) == 0
1
105d70ec3555798f91322fdbdc005718
798d0cb033f63951d442a6889819a33f
Metoda odpowiedzialna za utworzenie odpowiedniego sharedpreferences oraz wstawienie poczatkowych wartości domyślnych
public class MainActivity extends AppCompatActivity public void initSharePreferences() { editor = getSharedPreferences("LowCarbon", MODE_PRIVATE).edit(); sharedPreferences = getSharedPreferences("LowCarbon", MODE_PRIVATE); }
0
8386e09130552770be43483156ac77b1
66d1eddcc6e4d04b1cf8209235d1a393
获取他人的标签
{ $table = $this->getDbTable('User'); $user = $table->select(array('id' => $this->user_id))->current(); if (empty($user)) { return array(); } return $user->getTags(null, $this->id); }
1
a8ee654f2cb5cfdbb5dc88580146977d
a8bd800b37d5f44161a8aed0a211f161
Simply adds dummy data to the high scores to show sorting functionality
ArrayList<Pair<String, Integer>> defaultResults = new ArrayList<>(); defaultResults.add(new Pair<>("Aymen1", 50000)); defaultResults.add(new Pair<>("Aymen2", 40000)); defaultResults.add(new Pair<>("Aymen3", 30000)); defaultResults.add(new Pair<>("Aymen4", 20000)); defaultResults.add(new Pair<>("...
1
b4dc288209cfd7fb2e0db9dbd389e151
294b218c3d9c220f6bc4cd141d730064
根据科技ID和等级获取科技升级数据
class Game_UnionTech extends Game private function get_attr_by_level($player_id,$next=false,$type1,$tech_level){ $max_level = $this->get_base_by_level($tech_level,true); $res = array(); if($next){ $arrts = $this->get_next_attr($tech_level); }else{ $arrts = $this->ge...
1
4403eea8f8fb1e4ad4aeb2da25513e5e
99a2671d49b500b9e92cde9f508a516f
旋转矩形与轮廓面积比限制函数
results = [] for cont in conts: (x, y, w, h) = cv2.boundingRect(cont) a = w / float(h) if abs(ar - a) < 0.2 * ar: if abs(cv2.contourArea(cont) - area) < 0.2 * area: results.append(cont) if len(results) > 0: return results else: print(...
1
292df47e48c77ebb51265049e3a212e6
2fa20abb9a2336b78648f3ddc80fcfc4
FUNCIÓN PRINCIPAL ---->
def main(): cantNaranjas = int(input("Ingrese la cantidad de naranjas: ")) if cantNaranjas <= 0: print("No se ingresaron naranjas") elif cantNaranjas<100: print("Cantidad de cajones llenos: 0") pesoNaran = [numAzar(150,350) for i in range(cantNaranjas)] print(f"Peso de las na...
1
f18da13060fc97e50539c7c6635f9375
ab4978b0468eba76616e2cb1d4b7a6eb
Get algorithm state
namespace QuantConnect.Interfaces AlgorithmStatus GetAlgorithmStatus(string algorithmId);
1
007985cbdcbc3bfa083178f8a65542c5
99b5a608fdb87ec36b4f636576264b5c
Publishes a cmd_vel message for the kobuki.
def sendTwist(forwardVelocity, angularVelocity): global cmdPub cmdPub.publish(createTwist(forwardVelocity,angularVelocity))
1
3b16b583e67bf80ef8e1ce70fdaf5c43
7cbc27abaf4dbb539317011469a4e8ef
returns the closest enemy base to a given point
most_likely = self.hmm.get_most_likely() if most_likely[0] is 0.0: return self.enemy_base.position else: points = most_likely[1] for i in range(len(points)): points[i] = Point2D((points[i][0] + 0.5) * self.width_ratio, ((self.rows - points[i][1...
0
fceac10180d1e08a549abdc5740eb3d7
b316a1e79d55d9312aa0faae2e126cea
Save all the information necessary to the Report G
stmt.setInt(2, newReport.getReferencedRequest().getRequestID()); stmt.setNString(3, newReport.getEstimator().getUserName()); stmt.setNString(4, newReport.getlocation()); stmt.setNString(5, newReport.getChangeDescription()); stmt.setNString(6, newReport.getResultingResult());...
1
2b9bd7cea86881da3252134cdd555ec3
afd7d9f0c56061425a1b367c46467bf4
Returns the meta object for enum '{@link Cinema_ProfArq.LocalityEnum <em>Locality Enum</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EAttribute getTransformation_Loc();
0
34eeee20e924c2fa613586921906f124
d366f55e650d85e08bf2212503bb3dfc
Before each test case is called, empty out the environment
void test_env_suite_setup(void) { env_reset(); }
1
acaef9bc8c6fd151be8a23cdff933ac7
a2fcc5f316b78a4e8a0acfedd35e780c
当viewPager子界面切换后,选中某个RadioButton
public void onPageSelected(int i) { int radioButtonId = mRadioGroup.getChildAt(i).getId(); mRadioGroup.check(radioButtonId); }
1
818e12adecf63d9676ae669d07d83805
c9ea38457c2bbef3a37a516426ede498
Get the normal of the triangle defined by the given vertices. Please note that result is not normalized.
var n = [0.0, 0.0, 0.0]; for( var i = 0; i < triangle.length; i++){ var vCurrent = triangle[i]; var vNext = triangle[(i+1) % triangle.length]; n[0] = n[0] + ((vCurrent[1] - vNext[1])*(vCurrent[2] + vNext[2])); n[1] = n[1] + ((vCurrent[2] - vNext[2])*(vCurrent[0] + vNext[0])); ...
0
5c0fd2af089401b7fc9d6b9dbf935876
3b6b2b49b84ee38f16f1e8829ef12b59
Esse método carrega as demais informações nos outros controles, ao se mudar o texto da comboBox numMesa.
public class Mesa extends javax.swing.JFrame private void fillComboSelectMesa(){ ArrayList<ArrayList<String>> numList; numList = conn.retornar_query("SELECT mesa_codigo FROM t_mesas WHERE mesa_status = 0"); ArrayList<String> aux = new ArrayList(); for(ArrayList<String> s: numList){ ...
0
7103230912803aec62691451895b9920
c6b4809763920391b8e753961e55a6e2
Tests user signup with a username that already exists
response = self.client.post( SIGNUP_URL, data=json.dumps(self.test_user)) self.assertEqual(201, response.status_code) response = self.client.post( SIGNUP_URL, data=json.dumps(self.test_user)) self.assertEqual(202, response.status_code) expected = 'Username...
1
f2e952d8911ebcc59c05119a351b5b4d
2bd701bfd64cd3adfd5496074f78c8f8
写入数据(通过生成器)
class Local(URL): async def write_stream(self, gen): async with aiofiles.open(self.raw, "wb") as fh: async for chunk in gen: await fh.write(chunk)
1
66ad9a00aaa0ca846ce28d4a21624f0b
bf2420e59ecafbd911f773e0c104296a
접수문서의 결재하지 않은 다음 결재자
namespace NHH.Service.Contract public class DocumentsService : NHHService<NHHEntities>, IDocumentsService private List<int> GetCurrentApprover(int documentID) { List<int> resultList = new List<int>(); try { var result = (from d in Context.Merchant_Document...
1
53f62fc018b6191556210857cade567c
b29d44cb92c963afe0fbc175461a7f2c
Процедура сохранения адреса клиента
exec("INSERT INTO client_addr(client, type, street, house, flat) " + "SELECT" + " t.client_id," + " adr.type, adr.street, adr.house, adr.flat " + "FROM tmp_address adr " + "JOIN tmp_client t ON t.num = adr.num " + "W...
1
26b7d954def2b8eb8a364f38aa4f0614
f9356ce5d0218ed8bda9e41b55ec853a
Возвращает заголовки 404
final Map<String, String> headers = new HashMap<>(); headers.put("Connection", "close"); headers.put("Server", "HTTPProxy"); return new HTTPMessage<>( new HTTPResponseStartLine( HTTPStatusCode._404.code, HTTPStatusCode._404....
1
9363f332e4ddb89875897127056c9b56
5c4c673f5ecef95cde822049ab279eb9
枪械特殊信息(保存)
{ Gun_Data.SpecialComsumeMP = m_SpecialComsumeMP; Gun_Data.SpecialComsumeHP = m_SpecialComsumeHP; Gun_Data.SpecialDemageNums = m_SpecialDemageNums; Gun_Data.SpecialHardStraight = m_SpecialHardStraight; Gun_Data.SpecialBeatBack = m_SpecialBeatBack; Gun_Data.SpecialAtta...
1
94768e1aa928117d50d95c12cc69ad0f
031c75f44314662a139b59083b3fbd32
Set the state of the connection examiner tool. Resets the selected node when toggled.
public class EDMNodeWidget extends Widget implements StateModel.Listener, EDMMinimizeAbility protected void notifyStateChanged(ObjectState previousState, ObjectState state) { if (! previousState.isSelected() && state.isSelected()) { bringToFront(); MashupDataObject dObj = WindowManager...
0
622223c5e52a283e99bddcec457dbb8a
305321e7d160d88bac52bbb504959b0b
重写活动销毁方式,用ActivityManager来销毁
public class UnityActivity : ACoroutineActivity protected override IEnumerator DestroyActivity() { yield return null; }
0
1c368545ed1e645e3b113c398047a3f9
a2f7be76155788e573dd92ee7ca4612a
获取目标目录下所有源文件的绝对路径
internal class Publisher private void TargetPath() { cmdcontext.TargetFiles = new(); foreach (var item in cmdcontext.SrcFiles) { string rootDir = Help.PathTrim(cmdcontext.ProjectRootDir); string relPath = item.Substring(rootDir.Length + 1); if (!string.IsN...
0
b38203e9aa6a2f5fb1550a40707f73a0
c448a747fdab309cde5041488c0c739a
listを持つdictをnumpy.arrayに変換
def cast_to_nparray(lis): for k in list(lis[0].keys()): lis[0][k] = np.array(lis[0][k]) lis[1] = np.array(lis[1]) return lis
1
e8da66ec6ab89a1e69323301c4490f8f
bb260d7b20b3742c39b5dbdbfb14a343
Decrypts the supplied ciphertext using the supplied substitution key.
def decryptWithCipherletterMapping(ciphertext, letterMapping): key = ['x'] * len(LETTERS) for cipherletter in LETTERS: if len(letterMapping[cipherletter]) == 1: keyIndex = LETTERS.find(letterMapping[cipherletter][0]) key[keyIndex] = cipherletter else: cipherte...
1
6d8074f04dc8023bf82a1b6448d2caf7
1307dad521170ca502ccfd4d4f099f08
Adds a paragraph with no content.
namespace Infragistics.Documents.Word public abstract class WordDocumentWriter : IUnitOfMeasurementProvider, IDisposable, IContentWriter public void AddEmptyParagraph() { this.StartParagraph(); this.EndParagraph(); }
1
97822adf69f40b5fe906a61eb673da68
8134a9987c5d6725d8b19c93578ee24c
Sets the agent kyc approval pending.
public class DashboardDTO public void setKycApprovalPending(String kycApprovalPending) { this.kycApprovalPending = kycApprovalPending; }
1
ff6374123f76a72e0dc92f211dd64e97
0bc50173faf2f8f2d7e9ca0d341aaf49
Count book number written by author
return when (authorName) { "" -> client.rxPreparedQuery("SELECT COUNT(*) AS total_count FROM book_info") else -> client.rxPreparedQuery("SELECT COUNT(*) AS total_count FROM book_info WHERE author_name LIKE $1", Tuple.of("$authorName%")) }.map<Int> { var result = 0 ...
1
ceb61bb74da1975363eaed0815f83ce0
b1fbf4b423af57b059366ce3f03f9fb9
编辑信贷经理信息
class Task async editManager (data) { return await axios .post('/lender_order/manager_edit', data) .then(res => res); }
1
fb9a845ffc8faf36eed58bc7e1817f3b
5f6d62f7d8f9bce2db6eeba488d6695a
Takes various CORBITS outputs and sums the probabilities.
out2 = likelihood_BOIR * conditional_BOIR post = out2 / np.sum(out2) return post
0
659fcde77fcd55edaa83e793c9f30106
ca59ffff8a12b93e0e8d605532c8137d
serialize python dicts to JSON str
def to_json(python_object): if isinstance(python_object, time.struct_time): return {'__class__': 'time.asctime', '__value__': time.asctime(python_object)} if isinstance(python_object, bytes): return {'__class__': 'bytes', '__value__': list(python_obj...
0
c0612f9273c34a6310406fb421c1b370
9d36b1ae989febd3dfb82f2166515008
Devuelve el jugador que ganó la última vuelta.
public class GameController implements Serializable{ public Player getWinner() { return winner; }
1
bd64791eb1281ca66687d6223e0ddcb6
5cb9b1103b9c86bdd039110a7980ca4d
Lista os modelos por marca
{ $qtd = $request['qtd'] ?: 2; $page = $request['page'] ?: 1; $buscar = $request['buscar']; Paginator::currentPageResolver(function () use ($page){ return $page; }); if($buscar){ $marcas = Marca::where('nome','=', $buscar)->paginate($qtd); ...
0
d4713aad27367edfb3ecbb69575c37e0
c6920fb2a0d2606a0caf307c3fd458c2
Removes an item from the data source; calls [remove] in its default implementation.
namespace NGenerics.UI.DataStructures.Trees [SuppressMessage("Microsoft.Naming", "CA1710:IdentifiersShouldHaveCorrectSuffix")] [Serializable] public partial class ObservableBinarySearchTree<TKey, TValue> : BinarySearchTree<TKey, TValue> protected override bool RemoveItem(TKey key) { CheckReentrancy(); TVal...
1
e6588e5deef145659ced33810f0efb77
74076dde0f8cf5a369f39ef2cedadafa
ingresar un numero y determinar su signo si es cero, positivo o negativo.
public class Boletin6_1 public static void main(String[] args) { NumeroPositivo num1= new NumeroPositivo(); num1.numeroPositivo(); }
0
450c859fffd4990b6b60fb18a6f5e7a9
3d1cafabbbfd3ab819863172f8c5048c
Gets a predefined point by its identifier. Expects the return of a point.
if p_id.1 < 0 { return None; } let p : usize = std::convert::TryFrom::try_from(p_id.1).unwrap(); let l = p_id.0 as usize; if p_id.0 <= self.get_max_level_observed() && p < self.get_layer_nb_point(l) { return Some(self.points_by_layer.read()[l][p].clone());...
1
06b6dd2a3a467018b39cc7c216c71258
846584db182230f28929db9a20010f12
Do synchronous print to appear immediately on the console
def delayPrint(s): for c in s: sys.stdout.write(c) sys.stdout.flush() time.sleep(0.01)
0
0a7f27232a50b13c93d5270b43c3cd9e
2f6a6e35784b63c14642ce13b09fd178
This function outputs the current directory that we are in. It then passes back a pointer to that directory.
string CLI::getCurrentDirectory(){ return currentDirectory; }
0
2987c032ffcbb723e383e1b497bcde20
2bfdd32707e4d6f9c170b4b8f2261948
Retorna o time com a menor soma de ratings
return movies.reduce((prev, curr) => { if(parseInt(this.getRating(prev)) < parseInt(this.getRating(curr))){ return curr; } else { return prev; } }); }
0
ed4964d0228c7aee7bff87d1e2dbc7a8
293f99bd54bd88583aaba03c5352a6bb
Return an RGB numpy array of the current window
fig.canvas.draw ( ) w,h = fig.canvas.get_width_height() buf = numpy.fromstring ( fig.canvas.tostring_argb(), dtype=numpy.uint8 ) buf.shape = ( w, h,4 ) buf = numpy.roll ( buf, 3, axis = 2 ) return buf
1
9c229a959a05b81c27cfc111819e3ba3
4dab08f250a8bb65bc135d5b581e80f7
Retrieves a stored Object. [IOException] is thrown while deserializing.
<T extends Serializable> ObjectAndSize<T> get(final String pKeyToFetch, final Class<T> pClass) throws IOException;
1
2da52b26b355afce8343b434860cc7f0
73904ad54f07464a159edb24a2542697
下一张图
self.save() conn = sqlite3.connect(self.db) cur = conn.cursor() cur.execute('SELECT * FROM images WHERE id=?', (self.currentImage['id'] + 1,)) conn.commit() data = cur.fetchone() if data == None: self.statusBar().showMessage('当前是最后一张图片') else: ...
1
93d4a91616dcaa95ce4ca10556477e93
be62118a190b8abf34a7495c2647dd2e
Gibt das zugehörige ReviewSearch zurück
final Optional<Game> gameOpt = gameSearch.searchBy(new GameId(paramGameId)); if (!gameOpt.isPresent()) { return Optional.empty(); } final Review newReivew = new Review(ReviewId.notNumberingValue()); final Game game = gameOpt.get(); final Genre genre = genreSea...
1
be8b1057a48d2be7a0086844b1ed34e5
0aae97b7651bdc6708dcd4821be50b95
Check set and get of fill value works for bare Column
class CanBeMutatedTest extends PHPUnit_Framework_TestCase public function testFillableSetters () { $this->model->not_fillable = 'change'; }
0
b5368a69c323f4eaedcb18aa667171af
d1d84aaee8c009b773151d020b9f89ef
The main loop listens for packets from the serial port and decodes them. If a message is recognized, it is published to a MQTT topic.
self.init_serial_connection() thread_stop = 1 my_client = init_mqtt_client() try: my_client.loop_forever() except (KeyboardInterrupt, SystemExit): my_client.loop_stop() thread_stop = 0 print("Done.")
0
4d7b581e29782f78f3062126a8074698
2f2bdbbca5715c41466b0c5c9b657a64
Sign a message hash and return a 65-byte recoverable signature. This is a 64-byte compact signature with a recovery ID byte appended; and from which the public key can be immediately recovered.
function secp256k1_ecdsa_sign_recoverable($context, &$ecdsaRecoverableSignatureOut, string $msg32, string $secretKey): int {}
1
d9b987671d2a23312c99422fa0a402ce
d3b14e1f961295faac69ff3f50159c82
Clears the list of selected nodes
namespace GraphControl public partial class GraphControl public void ClearSelection() { SelectedNodesByUser.Clear(); SelectedEdgesByUser.Clear(); }
1
a3eefd158aa409107cde1973ccf3a6df
86e0c63e092c6ddd450013dce90f7f9d
Adds a visit to a user.
[ProducesResponseType(StatusCodes.Status400BadRequest)] [ProducesResponseType(StatusCodes.Status422UnprocessableEntity)] [HttpPost] public async Task<ActionResult<Visit>> Visit([FromBody] VisitModel visitModel) { try { return await _mediato...
1
2864d73615eeb80fda8e43a25e538ea4
12bcd2027eae7c37df5e5b0cbdc65e1a
Remove extra white space from within the address: extra spaces, etc.
function cleanData(records) { for (const record of records) { record.incident_address = utils.trimWhitespace(record.incident_address) } return records; }
1
640a080036f75063c88b6ec2a26c588f
3be0511dae4339e994687011f6f09e05
This function is used to allocate and add HID device.
int mtk_usb_add_hcd(struct usb_hcd *hcd, unsigned int irqnum, unsigned long irqflags) { int retval; struct usb_device *rhdev; dev_info(hcd->self.controller, "%s\n", hcd->product_desc); hcd->authorized_default = hcd->wireless? 0 : 1; set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); if ((retval = hcd_buffer_create(h...
0
78e4268008dd010622c008f744fa678c
38d4eefb8b5f00e3cbb1c39d8c823788
POST TRAITEMENT : supprimer les routes avec des zéros
result_list = [] for sous_list in route: for item in sous_list: result_list.append(item) i = 0 while i < len(result_list): if result_list[i] == -1: result_list.remove(result_list[i]) length = len(result_list) - 1 ...
0
3dcd821cdfc58a1db0b428e44813d910
718a5f3d5d7d85dfd2c5d65c2f573709
Compute the length to the start of the segment.
class Segment: # pylint: disable=R0902 def length(self): return self._length
0
0524d3079924c822b4a0a39ad2d7b8b6
3cd8f4923c7b20a9e160fdde56f2c850
Returns the meta object for the attribute '{@link org.openhealthtools.mdht.mdmi.Bag#isIsOrdered <em>Is Ordered</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
@objid ("dd7d909d-4160-412f-8538-caf775660782") boolean isIsOrdered();
0
0632f9e186094a7322d02733097498f0
ce6cef5a343462600386e7e128bc9fa1
Returns the meta object for the containment reference '{@link com.specmate.objectif.dSL.OR_Node#getSubNode <em>Sub Node</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getSubObjectPropertyOf_SubObjectProperty();
0
a6ee94745b174705747474b17585c313
3413cf309072bad20113da99a23ed65e
Move list to another board.
end_point = "lists" query = { 'key': self.key, 'token': self.token, 'name': list_name, 'idBoard': board_id } response = requests.request( "POST", self.URL + end_point, params=query ) retur...
0
9f47b2e3e684338bb22438dd59b98391
70cd95e2357a636656fa85e5d463193d
Generate a transform sequence that best describes an image using greedy search Input: feature vector of a texture Returns: the transform sequence corresponding to that texture in the range(1, max_len)
def feture_transform(): pass
0
3d5c86abdcdee61711800cfcd55eaabf
139ea2f7de9386d956873d867b76971e
Prepare the welcome notice on plugin activation. We can't hook into admin_notices at this point, so instead we set a short transient, and check that transient during the next page load.
function pmprosla_admin_notice_activation_hook() { set_transient( 'pmprosla-admin-notice', true, 5 ); }
1
a45b3b3f74d659ecbfac1433d23c1134
cc1d60fdb1a9d3ef12eb6c35367e0c71
Get all real estates as an observable sequence.
namespace RealEstateManagementLibrary.Utils.Management List<RealEstate> Load();
0
388a4f28d890a59ffee8f1e7b08d4f86
9a3b5b1a7c945ffa46880966cd3bb76f
Verify the value category. This corresponds to the main body of [§7.4.2.2 of the Publication Manifest](https://www.w3.org/TR/pub-manifest/#verify-value-category).
public class SCCatalogValueSchema extends Schema public String getVerifyType() { return VerifyType; }
0
1452066475fb7ca6979f0e675425ebde
7b450d2990c19a207dd6f4bb8541fe4b
Parse up a build string, returning a dict
black_list = ["use_goma", "goma_dir", "use_sysroot", "is_component_build"] strip_prefixes = ["is_", "pdf_enable_", "pdf_use_", "pdf_"] build_config = {} for arg in args: parts = arg.split() for p in parts: kv = [x.strip() for x in p.split("=")] if len(kv) == 2: k,v = kv if k ...
1
ed8691c2d21f7364d1bcf14e1340a8eb
f7cd0e46cee67da6197c900d7e24ecb6
PrintTag实体 到 PrintHistory实体 的信息转换
if (history == null) { return null; } else { AccountMchProcessResult result = new AccountMchProcessResult(); BeanUtil.copyProperties(history, result); result.inHistory = true; return result; } }
0
5eacddc3e273923a6a8a5e75cc6227f2
7cd1add9f42e8265eeb08ccd5440155e
Display Name: Continue Sequence Condition Default Value: 0 Value Format: decimal Available enum values: No information, 0, Sequence to follow-immediately, 1, Squence to follow-soon, 2, Sequence to follow-delayed, 3
class ContinuesNextEvent(EventFeature): def __init__(self): self._identifier = 'ContinuesNextEvent'
0
6d0986a8738220c77a2c28a11aa8c7a9
f1fd25e6a6a7e0a78e9464b7c1cf8aab
инициализация значений статуса документв
function initStatuses () { global $statuses, $idStatus, $idstatusFormated, $tabItems; $statuses = []; $idStatus = 0; $tabItems["statuses"] = 0; unset($idstatusFormated); }
1
202c355a6cdff7252e85d1cd7feeae38
982fcbcb69cd94e6ba7617dc22649eae
Validar la restriccion a todos los métodos de usuario autenticado
class UsuariosController extends AppController public function beforeFilter() { parent::beforeFilter(); $this -> Auth -> allow('logout', 'verificarAcceso', 'getNombre', 'getNombresYApellidos', 'modificarContrasena'); }
0
569d208176ea6d7dedf688fe62ec1149
b47c1798a5527bf416c0b02362c7f408
Returns true if and only if the client should render the landscape. When the landscape is not rendered, all of the following will, as a result, not be rendered:
public function should_render();
1
c77c8856afdde9c60bea86d817ce515a
ce3ff41422bb72478cac9d9514c3df5c
The total size, in bytes, of all leased messages.
int getLeasedSize();
1
ea7946c13ec4b427395c7394cda9232a
c20dc7e2fcba18ee59d4d0086f355a75
r""" Returns the initial camera transform of the fitting process.
class RAFT3D(nn.Module): def initializer(self, image1): batch_size, ch, ht, wd = image1.shape device = image1.device y0, x0 = torch.meshgrid(torch.arange(ht//8), torch.arange(wd//8)) coords0 = torch.stack([x0, y0], dim=-1).float() coords0 = coords0[None].repeat(batch_size, 1, 1, ...
1
ab736b5a25e7978cfb8d314363c0e6e4
8753bac2ad26b5a02b9c936ebd7048ee
##########compute PDF value of gaussian##############
arma::mat gmat = exp(-0.5*(x-mu)*inv(sigma)*trans(x-mu))/sqrt(std::pow(2*PI,n)*det(sigma)); double g = gmat(0,0); return g; }
1
37fa3ade79608f2004b715373cb56d92
8fc5234ed88c6901ccbcacf4e3872164
Test de vérification des CHECK automatiques en cas de délai dépassé (et possibilité de checker)
{ $delay = 2.0; $client = new Client([ 'as delay' => [ 'class' => RequestDelayBehavior::class, 'delayMin' => $delay, 'delayMax' => $delay ] ]); $ts1 = microtime(true); $request = $client->get('https://www...
0
5d56fa8e811c01739d9dd7ba7bf2a537
4c8726363507727f50a7b5d8c04a86ef
добавление элемента в ListView, значение указываем в LE_nameElement в правой части формы
{ if (index >= ui.tableWidget1->rowCount()) { ui.tableWidget1->insertRow(index); } ui.tableWidget1->setItem(index, 3, new QTableWidgetItem(element.getItemTag())); ui.tableWidget1->setItem(index, 4, new QTableWidgetItem(element.getItemLength())); ui.tableWidget1->setItem(index, 5, new QTableWidgetItem(element.ge...
0