query_id
string
corpus_id
string
query
string
code
string
label
int64
cb283f4539e52388e421ce6f20c74934
253ce6e9af28be5cf30cf5b9b7dba12d
模块下课程列表
@RequestMapping("list") public String list( Model model ) { Subject baseSubject = new Subject(); baseSubject.setSchoolId(ManageConstant.DISTRIC_SCHOOLID); baseSubject.setStatus(StatusEnum.ON.key()); List<Subject> baseSubjectList = teachModuleImpl.getSubjectList(baseSubject).getBody(); Subject customSubject ...
1
51ee4e232962dc874ae8ffac86947edc
41c58b7af6b8762ca1360e8bd8fa0dbc
when cancel button is clicked, the textarea, save and cancel button are hidden
commentinput.value = ""; if (count == 1){ cancel.style.visibility = 'hidden'; comment.style.visibility = 'hidden'; cancel.style.display = 'none'; comment.style.display = 'none'; } }
0
ed714ff0be4aba854b4fd680cf4a0911
8104cf5f74eec5291a094bddcb4e98da
更新服务器的列表信息
namespace com.game.module.login public class SelectServerMode : BaseMode<SelectServerMode> public void SetServerListInfo(string[] list) { if (list!=null&&list.Length > 0) { serverList.Clear(); for (int i = 0; i < list.Length; i++) { ...
1
3472872e4dce27c1ee7c7c5ee4d98bee
d409a5871536bc125e91a5c1f2962966
Test error raising if invalid shape for Hamiltonian model.
self.assertRaises(TypeError, sh.SpinHamiltonian,1) self.assertRaises(TypeError, sh.SpinHamiltonian,1j) self.assertRaises(TypeError, sh.SpinHamiltonian, True) self.assertRaises(TypeError, sh.SpinHamiltonian, None)
0
54e96854b4f28fc472837421bb447cd8
4fad0026b7135a21471fda454db39ea1
@brief Description : Reads the flash memory and returns the value of the parameter
uint32_t intFlashRead(uint32_t u32Addr) { }
1
a8a5be0d40e46c19dbccd95521eeb107
d351cd7758712202032b8cee3d4af102
Gets the neck position.
public Double getNeck();
1
0cc240e18534c04c77635ed3b36ed5e1
c2767e2aff59d5a440e7c6a3fbef8edc
in-reply-to = "In-Reply-To:" 1*msg-id CRLF
Address &result, bool isCRLF) { eatCFWS(scursor, send, isCRLF); if (scursor == send) { return false; } Mailbox maybeMailbox; const char *oldscursor = scursor; if (parseMailbox(scursor, send, maybeMailbox, isCRLF)) { result.displayName.clear(); result.mai...
0
7f3a2b24e911731dc9c79ca60b1de939
ebd44f3bebdf08c8d32854e0c5477f25
Gets the selected values of source shape and saves it to list.
namespace DrawerDemo public partial class fmFill : Form double[] GetPath() { double[] result = null; switch (lstShapes.SelectedIndex) { case 0: result = new double[] { 0, 0, w, 0, w, h, 0, h, 0, 0 }; break; ...
0
bcc956a0c89de5d46c1bce8b281e0163
09f853f60adbd59c43ee8719e280b91f
0-1范围,其中0为无反弹,1为完全反射。
public class GeoSceneManager extends com.earthview.world.graphic.OctreeSceneManager public void setWaveReflectFactor(double factor) { double factorParamValue = factor; setWaveReflectFactor_Real(this.nativeObject.pointer, factorParamValue); }
1
41278cf97c8c0c1890afc7cbd83d68a5
3aa55307f7d34844325179518df20e50
Interrupt Service Routine for counter-timer0 overflow
ISR(TIMER0_COMPA_vect) { O_F++; }
0
c0e07081527430e5c69155077595c5e4
b3e268cc6e4b97d7fe07d5caff28f59f
Get single/multiple group of listed published topics with filter key as index of each returned group.
public function findGroups($key, $no, $count): array;
1
0affc676c66d866e5f154327a8a3df06
3db9625c8d97f46845b9474f0bae5c43
Send start command whether or not we have GPS to RemoteControllerService in MMF apps
public class RemoteControlAct extends BaseActivity implements MainService.MessageCallBackListener private void StartRemoteControl() { webSocket.send(" {\n" + " \"body\" : \"\",\n" + " \"guid\" : \"M-182\",\n" + " \"type\" : \"STARTREMOTECONTRO...
1
2137519ed11fdddc151c2fa6e9ae9280
88ed74512fc50a5a6e486625afb608d3
检查是否有尖括号
{ if (text == null) return false; boolean ret = false; int len = text.length(); for (int i = 0; i < len; ++i) { char c = text.charAt(i); if (c == '&' || c == '<' || c == '>' || c == '"') { ret = true; break; } }...
1
254b19bff583de8f397b0e9b4afb9727
1f0b2fb609cd957abae17ea35377b189
Establece el Nombre calificado de las clases que se intent&oacute; compilar.
$competencias_clasificacion_u = strtoupper($competencias_clasificacion); if (in_array($competencias_clasificacion_u, CompetenciasModel::$_COMPETENCIAS_CLASIFICACION)) { $this->competencias_clasificacion = $competencias_clasificacion_u; } else { $this->competencias_clasifi...
0
236fa6d1d7a7127ffb64cb2cb902056d
757f2504670d3cde8a8dcb81beb95440
Obtiene el listado de maniobras activas (ordenadas por hora) de un registro de represas
{ String[] arrParams = parametrosFuncionTarea.Split(','); DataSet dsOT24 = new DataSet(); DBFunctions.RequestGlobal(dsOT24, IncludeSchema.NO, dataBaseCliente, @"select mo.pdoc_codigo, mo.mord_numeorde, DATE(mo.mord_salida) as mord_salida, do.pven_codigo, mo.m...
0
c242b540df1f6cb4e2b91f9a83828470
7055f259a45015e2e9a89a7fe808bf0a
just needs to be inserted.
int cache_insert () { return 1; }
1
c7ea44cba9cf1b3a41e1782e50554bea
a154a316ab143a2535a222a100b9b982
Sets the group_path_prefix of this OrgApacheJackrabbitOakSpiSecurityAuthenticationExternalImplDeProperties.
public void setGroupBase(String groupBase);
0
d5791bcd5831b04b55ce0bab356c1628
0a7cb582913a0577c849595bba11316f
Initializes portfolio pinterest
class Portfolio: def init(cls, api_key: str, api_secret: str) -> None: cls.api_key = api_key cls.api_secret = api_secret
0
2ed3dbfa990d8c4b84d19026918e4199
bb749716a90f5ff409eab5fc69dd439b
counting nodes of degree two
std::unordered_map < int, std::unordered_set<int> > left_par = this->R.left_partition(); std::unordered_map < int, std::unordered_set<int> > right_par = this->R.right_partition(); unsigned long long d2_l = degree_sq(left_par); unsigned long long d2_r = degree_sq(right_par); if (d2_l < d2_r) { std::swap(left_par,...
0
c228ccf55c5e54cdec7aa91da0d1208c
2f3b1cf9a32b8ba1a4b7917efc3195fd
onClick method when click on the button "Ajouter un numéro de téléphone"
function addPhoneNumber() { viewLayer.addPhoneNumberInput(); }
0
214502ce32fdeb86371ac570c6a86b27
fef41802444acd030f6f6ede56cd6951
写入bunch对象
def writebunchobj(path,bunchobj): file_obj = open(path, "wb") pickle.dump(bunchobj,file_obj) file_obj.close()
1
4ae1828a9905bb1241fc383de5b937b5
f63ef3d311cd9d0244dfec107ff8710d
Extract the sequence of primal and dual bounds.
kwnet_dual = ca.DualNetwork( self, x_anchor.view(-1, *self.input_size), norm_type={"2":"l2", "i":"l1"}[norm_type], epsilon=epsilon) box_bounds_activation = [] for layer in kwnet_dual.dual_net: if isinstance(layer, ca.dual_layers.DualReLU): ...
1
9bc574420d3aef612ad5d578be387e76
93ce02a54eb83fa7fa5673838a7aec92
Draws an X centered at (x,y). The width and height of the X are each 2 * size.
def draw_x(xpos, ypos): xcoord = int(xpos * 200) ycoord = int(ypos * 200) pygame.draw.line(surface, (0, 0, 0), (xcoord + 20, ycoord + 20), (xcoord + 180, ycoord + 180), 10) pygame.draw.line(surface, (0, 0, 0), (xcoord + 180, ycoord + 20), (xcoord + 20, ycoord + 180), 10) pygame.display.flip()
1
3f2987b94cc70cc2c3644ffa7fde8f51
cb5ffd0b578c3df2f82828b259aca6f9
Get the current reconnect count.
int getReconnectAttempts();
1
aa28a97868ff32ca47b003c012c3d1ff
00dac864723f25b1ed7fbcb5b1a7b01d
Mendapatkan daftar harga jual barang
class m_stok extends CI_Model public function produk_jual() { return $this->db->get('tb_produk'); }
0
b6cea361f8c1c5141a865330f861d125
236ed5d0b64c1bafeb977d8d47714cb0
获取已缓存但未发送的字节数
public class ByteCache public int remaining() { return count - start; }
1
817362ea590bd073d6cd0716529eea8e
251c940e60d4816e4d7fc830ecc59563
OwnerController constructor.
class PageController extends Controller function __construct() { $this->middleware('GlobalOwnership', ['except' => ['index', 'create', 'store', 'show']]); }
0
f3cf1a827c084891e7b2cd0e120d7c7b
90cf0c1efdad1f6e2c2508e3a1eca5c2
Find a image widget in this layout
public class ImageButtonPlusClickPreference extends Preference private ImageButton findImageButtonWidget(View view){ if (view instanceof ImageButton){ return (ImageButton) view; } if (view instanceof ViewGroup){ ViewGroup viewGroup = (ViewGroup) view; for (int...
1
aabd91f9d7776dc31c335b27ca31dac5
f3e01c61224f8d89b5901ad27b7e22dd
When this surface is used as the destination of a drawing operation, returns whether the drawing operation is performed in RAM or by the GPU. By default, this setting is true and all drawing operations are performed in RAM. Otherwise, when 2D acceleration is active, drawing operations are delayed and performed by the G...
namespace FX FXbool FXGLVisual::isAccelerated() const { if(!info){ fxerror("%s::isHardwareAccelerated: visual not yet initialized.\n",getClassName()); } #ifdef HAVE_GL_H #ifndef WIN32 return TRUE; #else return (((PIXELFORMATDESCRIPTOR*)info)->dwFlags&PFD_GENERIC_FORMAT)==0; #endif #else return FALSE; #endif }
1
ae055619c0648ed024f6c4f950ada199
1ef6c30d2069126d5b83afe08c5355c1
拖动进度条的过程暂停
int position = drag_sb.getProgress(); if (position != 0) { ValueAnimator animator = ValueAnimator.ofFloat(1f, 0.0f); animator.setDuration(animeTime).start(); animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override ...
0
9212026f654faf31a23d7f5a35ba5143
2ad9c7d3405ddb72f4fbd4db8a766757
Ищет слова, которые являются наиболее близкими к неправильному слову.
$shortest = -1; foreach (self::$words as $word) { $lev = levenshtein($input, $word['ask']); if ($lev == 0) { $closest = $word['ans']; $shortest = 0; break; } if ($lev <= $shortest || $shortest < 0) { ...
1
0c4bc01b8b8ee2f4e01efdadce6ecbc8
156147baf14b1a11380cbf4e95924f9b
Fired when the "Reset device" menu item is clicked.
namespace GorgonLibrary.Example public partial class MainForm : Form private void Gorgon_DeviceReset(object sender, EventArgs e) { Initialize(); }
1
fad8ae43697db89721257a80227f0fc5
1328823cc38e981e4733d22a26a8be6f
Adds Token to ignore
blacklist_token = BlackListToken(jti=token) try: blacklistdb[self.counter] = blacklist_token.toJSON() self.counter += 1 except Exception as e: response = { 'status': 'fail', 'message': 'Could not save'.format(e) } ...
1
4308e18fddfb48e41a85f7a8f5bc5b04
0e4bf5f0c19744d13ebabef78627bd1e
根据课程id查询 最终发布信息
@Service public class EduCourseServiceImpl extends ServiceImpl<EduCourseMapper, EduCourse> implements EduCourseService @Override public PublishCourseInfo getPublishCourseInfo(String courseId) { PublishCourseInfo publishCourseInfo = baseMapper.getPublishCourseInfo(courseId); return publishCourseInfo;...
1
9387c0c82d10e85272aa08ad733193c2
1913ddba657c18e24695fba2df05e332
Ensure that the user is not removing all the orders if this is the only collection on the job.
class GenerateMarketplaceLMBRewardsJob implements ShouldQueue public function middleware() { return [(new WithoutOverlapping($this->user_id))->dontRelease()]; }
0
49db69e56c75e854e4565982a3956c42
e5e90747a8c567acf3f92a31c18cab0c
WithResponseMetadataCallback sets the response metadata callback.
return Option{F: func(o *internal_server.Options, di *utils.Slice) { di.Push(fmt.Sprintf("WithMetaHandler(%T)", h)) o.MetaHandlers = append(o.MetaHandlers, h) }} }
0
638b97beb9b03a2a09bb5b18c54a1163
d551469c24f9eb404fae9f2fd12f4968
Generates the complete problem - approaches and sensitives
class SmtProblem(object): def _generate(self): self.assertions = [] if self.ch.diff_type == difference.XorDiff: if self.parent_ch is not None and self.parent_ch.outer_ch == self.ch: inner_noutputs = len(self.parent_ch.inner_ch.output_diff) non_zero_input_diff ...
1
db138a8cbb0204e1738d18e554015fb7
df2a75bed0783283441e3c9371e1ea7b
地磁気の生データを整数値で返す
namespace BluetoothGATT public sealed partial class MainPage : Page double sensorMpu9250MagConvert(Int16 data) { return 1.0 * data; }
0
3f88f7e28feb09ccaee0df5553683c65
e103f9fbea4da270bdbda850b1de4bd4
创建一个技能item
function EquipTips:createSkillItem(parent) local item = {} local skill = SkillItem.new(true,true,true,0.8) parent:addChild(skill) skill:setPosition(70, 62) local desc = createRichLabel(18,cc.c4b(0xff,0xee,0xdd,0xff),cc.p(0,1),cc.p(138, 105),4,nil,260) parent:addChild(desc) item.skill = skill...
1
5f5a5ea0e10bc2f1721e9ce432a816f4
953445618fae2ddbeaee65ccb8a81c57
# Sort a column by descending order
descorder <- function(tosort) { sorted <- sort(tosort, decreasing = TRUE) return(sorted) }
1
3c69bfb80861e50f3edb6443d604b27b
79de08e82dca386cd23f5fd24f55b139
Update a users fields except password
@PATCH("user/{id}/{private}") Call<ResponseBody> updateUser( @Path("id") int id, @Field("username") String username, @Field("user_firstName") String firstName, @Field("user_lastName") String lastName, @Field("user_email") String email, @Fie...
1
6a572f5ace7a3fc4915bbdead126cf87
c16955180c6b8893510c8fd756f46542
Stops SPI_1_CARD component.
static void SPI_1_CARD_ScbModeStop(void) { #if (SPI_1_CARD_SCB_MODE_UNCONFIG_CONST_CFG) if (SPI_1_CARD_SCB_MODE_I2C_RUNTM_CFG) { SPI_1_CARD_I2CStop(); } else if (SPI_1_CARD_SCB_MODE_EZI2C_RUNTM_CFG) { SPI_1_CARD_EzI2CStop(); } #if (!SPI_1_CARD_CY_SCBIP_V1) else if (SPI_1_CARD...
1
aac8322c98d9c7c794da10e9a1326f9f
cab71e71871df95493b106321a2d107d
This method is responsible for drawing the areas to define where the player should expect to see the cards appear on the screen
for(Player p : playerList) { int modifier; if(playerList.size() > 2) { modifier = 1; } else { modifier = 0; } if(p.getSymbol() == Symbol.CROSS) { p.start = this.calculateTopLeftArea(modifier); p.target = this.calculateBottomRightArea(modifier); } else if(p.getSymbol() == Sym...
1
d3d1e335865eaf12545d8cb38574861f
19343a451719fa6fc500945355db41d8
パーツモデルのメッシュON/OFF取得
{ SceneObject* so = GetIPtr(_self, SceneObject, IMap3DItemPtr); if(!so||!so->GetMeshPtr())return false; return so->GetMeshPtr()->GetLoop(); }
0
78b0d90ce48c538870f9e648ad41f1aa
75020c0c04eae34cfab75c098d92ef7a
请求结束 <p>不管请求成功还是失败,都会回调onEnd</p>
static CallbackExecuteListener onEnd(ExecuteEventHandler handler) { return new CallbackExecuteListener().onEnd(handler); }
1
4c6f5f0ada6739780a8c05f9bb0b6349
8c3a7cab020b397e996a9a893e99bcd4
Retrieve a GameObject by ID and modify it.
namespace Eon.System.Management public sealed class GameObjectManager : EngineModule, IUpdate public static GameObject FindGameObject(string id) { GameObject obj = (from a in objects where a.ID == id select a).FirstOrDefault(); ...
0
11bd16d5bf8eeaaccaa085ebd1ba71b6
ecde6949024b9490c21a14cc13821d39
Checks if the exporter is excluded via webform.settings. TRUE if the exporter is excluded.
class LengowCheck public static function isDisabledProduct() { return (Configuration::get('LENGOW_EXPORT_DISABLED') == true) ? false : true; }
0
106dbcb93b029ad4d790d2f35efac733
0769cb9c6bc883def5205b2d2146b10c
LDRSB rd, [rn, immed]
void _ip_LD_r_n(sm_regs e1) { sm_set_reg(e1, sm_getmemaddr8(sm_get_reg_pc())); sm_inc_reg_pc(BYTE); sm_inc_clock(2); }
0
1a96ae816934f4ced74be9dc8d676253
54d414c8a80d30b7ce3258a8cfa0ae57
Sets source debug extension.
namespace Nuke.Azure [PublicAPI] [ExcludeFromCodeCoverage] public static partial class AzureFunctionappDeploymentSourceConfigZipSettingsExtensions [Pure] public static AzureFunctionappDeploymentSourceConfigZipSettings SetDebug(this AzureFunctionappDeploymentSourceConfigZipSettings toolSettings, stri...
1
e15802205983fa66894dd0378b4d9e98
d6cdf64b7319eed38375f3a9e44a4fab
通过代理id获取代理信息
function getAgentProps(agentId){ var agentInfo = getAgentList(CONST.AGENT_TYPE_ALL); for(var i=0; i<agentInfo.length; i++){ if( agentInfo[i].agent_id == agentId ){ return agentInfo[i]; } } return null; }
1
05407e5545d7a5e101f164f76f1c8688
959a0f2d8235906d7d8e9d0c677d2102
Q値から最善の行動を返す
class QMDP(OfflineSolver): def chooseAction(self, cur_belief): q = np.dot(cur_belief, self.V_QMDP) return np.argmax(q)
1
e8eed19d5a5e194b0929200043203c87
80f55cb280f0504c70842030f338b75e
Handles the Click event of the ButtonResetPan control.
public partial class Form1 : Form private void ButtonResetPan_Click(object sender, EventArgs e) { canvasControl.Pan = new PointF(0f, 0f); }
1
42e85d621c6acf63d3dd2e5db5e1a3a6
0a44558083afb96d37572734c814403b
使Path中的bezier路径折线化返回新对象 len分割长度 长度越长bezier折线拟合程度越低 (mode为"all",则对line路径和bezier路径都执行计算; mode为"no_bezier",则都不执行计算,可以看作是将path内所有bezier路径转为了line路径; 默认只折线化bezier路径)
if not self.tag.stepAll then self:stepAll() end local pt = self:pointCollection(len, mode) local new_path = {} local the_next = pt.p_start repeat local maxn = #pt[the_next].x for i=0, maxn-1 do local p = {} p[1] = {pt[the_next].x[i], pt[the_next].y[i]} p[2] = {pt[the_next].x[i+1], pt[the_next].y[i+1]}...
1
df4f9ed2fc89c95aef9ea7bbee909482
1301ca8477c00dd349a9b7a6fc9a9440
返回输出到控制台的行数
class CExec public function rows(){ return $this->rows; }
0
61c7190a34a74fb8db02fddb969af79a
ddfe85f19be621f5ff5ce3f0b7f9e01a
判断是否自己 的评论
abstract class CommentDelegate<T> protected fun isOwnDynamic(userId: String?): Boolean{ return CMAPI.getInstance().baseInfo.userId == userId }
1
660bddddee6352f25e4043f624448dfd
98e4c579de0e5b30929736ce6f69e7ef
Attach trees t1 and t2, respectively, as the left and right subtrees of the external Position p. As a side effect, set t1 and t2 to empty. Raise TypeError if trees t1 and t2 do not match type of this tree. Raise ValueError if Position p is invalid or not external.
BTNode<Type> point = checkPosition(node); if (isInternal(point)) throw new InvalidPositionException("The node is not external"); if (tree1.size() > 0) { BTNode<Type> root_tree1 = checkPosition(tree1.root()); point.setLeft(root_tree1); root_tree1.setParent(point); } if (tree2.size() > 0) { BTNod...
1
3fd571ad6b6e49709add951980560ffc
74a4a5bf68e9d20b6a827734d7e47ddf
Query 2 – Cars from make Toyota
List<Car> withinSelectQuery();
0
d9f74efa7a4ee5174d1ce5cd6f334fb3
166c4b5e76c8406a249f9432c0359be6
активация/отключение поля даты смерти
{ if(pg_affected_rows(settings::SetVariable('birthday'.$this->year, 'status', $status))) return 1; $sql = "INSERT INTO settings (id, module, variable, value) SELECT COALESCE(MAX(id),0)+1, 'birthday{$this->year}', 'status', '{$status}' FROM settings"; if(pg_query(DBConnect(),$sql)...
0
74608b0fcc14226b51fc74d3ca8b52ff
3a9f083526ce86986e1d063cba297db5
Check for equality of Lists without word order in consideration
public class DataFormatConverter public static <T> boolean listEqualsNoOrder(List<T> l1, List<T> l2) { final Set<T> s1 = new HashSet<>(l1); final Set<T> s2 = new HashSet<>(l2); return s1.equals(s2); }
1
cc50cfa43096d35e3cc8f01c55688114
78d3ca5c9147b500a60f2d309d73f3ec
Calculates if the Owner should reveal his Hand
if (this.getHandSum() < 17) { return 1; } else { return 0; } }
0
e724e97b644d9f8ddfaf9da365413e45
edf39ae68ab082e90fd57d7e22cd0be5
open load file dialog and load a saved order
self.address_filename = filedialog.askopenfilename(initialdir="/", title="Select file", filetypes= (("CSV Files","*.csv"),)) self.loadflag1.config(text=os.path.basename(self.address_filename)) print(os.path.basename(self.address_filename))
1
4e724f77739100ea362c50a0bad8ca4d
e03e857cfc6ed43c03d97e101246f99d
Lists all cfgPais entities.
is_open, is_ro = is_open_ro('paises', request.app, request.user) if not is_open: return HttpResponseRedirect('%s%s/paises' % (request.app_root, request.app)) if request.method == 'POST': if 'New' in request.POST: return HttpResponseRedirect('%s%s/paises/0' % (request.app_root, re...
1
643799f0f374a133ae6d26b91b5b6e64
b71457d839fd6b9ddb25f1ca734a54bd
Respsonsible for rendering a read-only view of the control.
namespace TheMemorableMoments.UI.Web.Controls string Render();
1
2112fad702aef21305476c1ab2d2d796
7e6fd039f6d3760d29d44b1ea3892d79
Make a small version of the frame.
public class Big_Box extends PApplet public void draw() { background(0); if(frameCount==5) { frame.resize(W,H); frame.setLocation(PX,PY); } }
0
8b5571c818318833875055e86bd033f7
a0d95e85011a4acf53a265fbec1bef02
=========================================================================================== Returns a pointer to the data of feed-buffer and length in bytes. ===========================================================================================
void *NetworkContainer::get_task_data_buffer() { return this->task_data_buffer; }
0
b23ddc48436b608f39fa1c6b7eb93f97
3c544895272a8417ed97d5ffa5caedc0
Generate the text for the specified message type, using a single post-processing action
namespace Asc.AppModel IAction Create( Message message );
0
aca364987b1660596f69fd225c887999
c996facfc348b5a6b3cd4cb9b2b80740
-------------------------------------------------------------------------- Export Selected Items to Excel --------------------------------------------------------------------------
{ try { IsLoading = true; var itemList = ItemList.Select(item => item.Value).ToList(); _exportService.ExportToExcel(itemList, ProjectedTypes); } catch (Exception e) { _loggingService.LogIn...
1
7ad64b9c9d0da649a9cefcca1fe766f2
7a9b3f9f2c1defe1eabd4243c2cae743
test case where there are no elements in any of the final lists
l1 = [] l2 = [] l = merge_sorted_lists(l1, l2) self.assertEqual(l, [])
1
2afcc1ee69c6b37050c9ff4c0e235b66
48462b194c0d2b855baf7db2e1ecab3c
Update orientation of the visual components of pinch slider
{ if (KguiAxis == Axis.X) { rectMove.pivot = new Vector2(0, 0.5f); rectMove.anchorMin = new Vector2(0, 0.5f); rectMove.anchorMax = new Vector2(0, 0.5f); size = rectMove.sizeDelta.x; parentSize = rectMove.pare...
1
814eaa3a7796a9ec3772e7c466037568
78578affdfd93bcd52d982b1c817b0cb
语音按钮点击事件
public class MainFragment extends Fragment implements OnClickListener, OnInitListener{ public void onClick(View v) { if (v.getId() == R.id.btn_speak) { startVoiceRecognitionActivity(); } }
1
c5c18699bf4233838e5f74b007839911
8383d2caadf73e47a5eddf08f49dc488
Calculate the symmetric difference of this list and another
class FrozenList(PandasObject, list): def difference(self, other): other = set(other) temp = [x for x in self if x not in other] return type(self)(temp)
0
f8232d11d4526249efe098c713f603db
bbc8c2db1338556105972096feba2466
Checks for any Trias, Tesseras, or wins. Adds the repective counts of any of those to be announced. Uses recursion to move in any or all directions from a point and check whether it is a valid condition.
{ CheckVerticalCapture(newestPiece); CheckDiagonalRightCapture(newestPiece); CheckDiagonalLeftCapture(newestPiece); CheckHorizontalCapture(newestPiece); CheckHorizontalGroupings(newestPiece); CheckVerticalGroupings(newestPiece); ...
0
090bcf1dd7d0afcf7c5f44191456f59a
9200770d8c7927de956b7149fdc329bd
Executes a command in the root shell. Devices must be rooted to use.
public class RootShellCmd public final void exec(String cmd) { try { if (os == null) { os = Runtime.getRuntime().exec("su").getOutputStream(); } os.write(cmd.getBytes()); os.flush(); } catch (Exception e) { e.printStackTrace(); ...
1
9351097898c6a77dd70747ef1b85978b
d59489c46ae216e689ad3a335369c366
sort function for qsort: integers descending order
static int Qsort_Cmp_Wrapper(const void *i1,const void *i2) { return (*(int *)i2 < *(int *)i1); }
1
5d06418f3e0fdc426e43d06c51e66b19
2d49c00d3b73e67e599279b716cf9303
Fake set of MWS credentials
os.environ['AWS_ACCESS_KEY_ID'] = 'testing' os.environ['AWS_SECRET_ACCESS_KEY'] = 'testing' os.environ['AWS_SECURITY_TOKEN'] = 'testing' os.environ['AWS_SESSION_TOKEN'] = 'testing' os.environ['AWS_DEFAULT_REGION'] = 'us-west-2'
1
0c4111eeff3ca92c5996d42f892f6ec3
0519cc0d0a926408facebf345aa07a68
! \brief Ensure we can allocate material requests correctly.
{ static rpage_t blks[RMEM_NUM_BLOCKS]; for (unsigned long i = 1; i < RMEM_NUM_BLOCKS; i++) TEST_ASSERT((blks[i] = nanvix_rmem_alloc()) != RMEM_NULL); TEST_ASSERT(nanvix_rmem_alloc() == RMEM_NULL); for (unsigned long i = 1; i < RMEM_NUM_BLOCKS; i++) TEST_ASSERT(nanvix_rmem_free(blks[i]) == 0); }
1
f221fb49d26e40000caa85588a38e483
b21d44690bcef4c36f4bf387201c7702
Verifica se uma cotação está na fila de cálculo
{ for (int n = 0; n <= cache.Count - 1; n++) { if (cache[n].Symbol == symbol) { bool ret = cache[n].Price == price; cache[n].Price = price; return ret; } } ...
1
725c2ea9cff89e6c5bf6bced50667e9e
792937de5c5595d58f14464a2e03fad8
获取指定用户且大于等于指定成绩按照创建时间排序获取指定范围的用户考试信息
public List<ExamHistory> getUserExamHistList(@Param("array") int[] approvedType, @Param("page") Page<ExamHistory> page);
0
3810c162a60868699b68c31f35382cbd
62fe5e0c35e108ee0c87fbf239104f5c
Display unsubscribe from notifications form
{ $form = $this->createFormBuilder(['hash' => $hash, 'action' => 'unsubscribe']) ->add('hash', 'hidden') ->add('comment', 'textarea', [ 'attr' => ['style' => 'width:100%;', 'rows' => 5], 'required' => false ]) ->add('action', 'hidden') ->getForm(); $form->handleRequest($request); $from...
1
2e86c49467eb696874f1b0cfb7d80fda
7f274246e501a9b4e1e3f0d4df907f1a
Process UART output via DMA
void uart_interrupt(void) { #ifndef CONFIG_UART_RX_DMA uart_process_input(); #endif uart_process_output(); #ifndef CONFIG_UART_TX_DMA if (!should_stop) NRF51_UART_INTENSET = BIT(NRF55_UART_TXDRDY_BIT); #endif }
0
befbacbee6c4da8907abf07e9211765c
db404531fdaea51b1a6c242c3211fecd
An encoder used for linear based models (Linear/Logistic regression) as well as deep neural networks with one hot encoded values.
class LogisticRegression(Module): def __init__(self, input_size: int) ->None: super().__init__() self.encoder = MLPEncoder(input_size, output_size=1, n_layers=1, output_activation=Sigmoid())
1
8e64c2286b78665e6c8a94262c53ad72
994992cecd799329f80d422bfaec6c12
This function is used to scale the pixel values of images to the interval [0,1]
def scale(input): return (input - np.min(input)) / ((np.max(input) - np.min(input)))
1
59adbfda30629ff0d2f10b968dbb5321
40d0e1e52b7cdcbeb6d350d682fb4143
Returns tasks in initialize phase.
public function initTasks($repeatedly = null);
0
4129f1891f63c93283b62cce5789087b
7a768e1f3390c93f9f5ec539bb279aef
Returns the length of this Vector.
@NotThreadSafe final class LongVec public int len() { return len; }
1
6955d8f403a21513b5c44851e703d6b4
b586ec8ca5c4daa3467c8b41d78f247c
Sets the city of this ResponseGeocodingProperties.
{ if (empty($city)) { throw new \InvalidArgumentException('Value is empty'); } $this->city = $city; }
1
b6a55b3b168e7aa30c9c0afa95685bb7
4c63aa5933da53510e3b01472ce5974a
Gets ith "display-name" element
public String getName(int i);
0
c8979be326c2331d9276d930dedbea66
e6bab9c8c8b0e0ab63091934fb67cfbf
Maps a point in window coordinates to frame coordinates.
{ Point temp = new Point(); temp.X = (int)((xValue - xAxisMin) / (xAxisMax - xAxisMin + 1) * frameWidth); temp.Y = (int)((yValue - yAxisMin) / (yAxisMax - yAxisMin + 1) * frameHeight); temp.Y = frameHeight - temp.Y; return temp; }
1
64a47fe7b9ad90c22c64b57ad2205489
bb1f01e64470f6762585e57ab06e3d10
Returns stripped class name. Keyword Arguments: name - name being converted.
name = urllib.unquote(name) name = name[0:name.rfind('(')] name = name.replace('_',' ').replace('>','').strip() return name
1
8b2fcfba59ab6376b0999cf700531459
c62eed3c8d8402d4c466e71791f04ca5
Turn Autoseek ON or OFF Autoseek is used by the unobtrusive Upload/Download methods to automatically find the resume position.
class FileUploader extends Component public function autoUpload($autoUpload): static { $this->autoUpload = $autoUpload; return $this; }
0
530039eaea9e238350f7a3175a9c175b
1ba86d9168c72e7234e8c2bc2def5f59
This overriden method is responsible for responding to the mouse pointer hovering over the enabled components of the GUI, which are the 8 random mystery pieces for the players to pick.
public class ModGuiScreenResourcePacks extends GuiScreen public void handleMouseInput() throws IOException { if (!this.isRandomPack()) { this.packList.handleMouseInput(); } super.handleMouseInput(); }
0
16901b46d6fa0a55c578d46f402862ef
fb63583c2af3681eac1cf179dc75c2b0
given the upper line and the cinfo, calculate the vertical difference of upper boundary w.r.t. the vertical center, with respect to the width of the current char.
max_topfill(void) { int n; n = plines_nofill(curwin->w_topline); if (n >= curwin->w_height) curwin->w_topfill = 0; else { curwin->w_topfill = diff_check_fill(curwin, curwin->w_topline); if (curwin->w_topfill + n > curwin->w_height) curwin->w_topfill = curwin->w_height - n; } }
0
95c3baaa99d80dffbd75b48e76f9ff8e
6789d82fe0aeb2ea0ec2fc79130c142f
Get text from the README.rst
pwd = os.path.abspath(os.path.dirname(__name__)) readme_file = os.path.join(pwd, 'README.md') with open(readme_file, 'r') as readme: readme_txt = readme.read() return readme_txt
0
aa939a692caf5a70237d6cc09a7faa16
8c006c0cfde0143c3d886b4e0f0f9457
Sum all corresponding elements
class Bowling def sum_elements array_element array_element.inject(:+) rescue 0 end
0
bd6a1ef1bb8565c369306e3260dbba82
abec6c12284c45b776fc3755fba248be
Sets the SelectedItem property.
{ var selectionBoxItem = (Object)null; var selectionBoxItemStringFormat = ItemStringFormat; var contentControl = SelectedItem as ContentControl; if (contentControl != null) { selectionBoxItem = contentControl.Con...
0
f7b2e81cda5a6cfcc8c97011b602d689
a0c045e01cebaea0651bb67526f9e755
生成基于Cox-Ingersoll-Ross(1985)平方根扩散模型生成数据
np.random.seed(1) x_11 = np.random.randint(0, 100, (n, 1)) x_12 = np.random.randint(0, 100, (n, 1,)) x_13 = 10 + np.random.randint(0, 10, (n, 1,)) x_21 = np.random.randint(0, 100, (n, 1)) x_22 = np.random.randint(0, 100, (n, 1)) x_23 = 20 - np.random.randint(0, 10, (n, 1,)) n...
0
c37cf7c52d833cc06471031273109917
1b83261ae06623583d8e7f215bb7514d
Checks if two hits are compatible according to the configured max_slope in x. From Daniel
class graph_dfs(object): def are_compatible_in_x(self, hit_0, hit_1): hit_distance = abs(hit_1[2] - hit_0[2]) dxmax = self.__max_slopes[0] * hit_distance return abs(hit_1[0] - hit_0[0]) < dxmax
1
35adc165d5e84bf879d53bf7adacd000
87084c387ccdaf10d9c2c3321ebd0167
\fn OnStart \brief Sets up what event to listen to for level/scene switching.
public class EventManager : MonoBehaviour void Start () { if (SceneManager.GetActiveScene ().name == "Level1") { Start_0_01 (); } if (SceneManager.GetActiveScene ().name == "Level2") { Start_2_01 (); } }
0
63e21424ec00fb5e0d832278a2851703
38f8ccae4c71a4162d79fe74c0620f3f
Sets the Pause button to normal. It can be clicked again.
{ poseButton.interactable = true; animator.SetBool("PauseCancel", true); animator.SetBool("PauseShot", false); animator.updateMode = AnimatorUpdateMode.UnscaledTime; filterImage.gameObject.SetActive(false); Time.timeScale = 1; }
1
aef40220e4e21023f679bfa51910b0ca
0f057e471014a58e0eb986f218c54a60
设置产品数量功能
function setGoods(obj){ var num = parseInt( $(obj).val() ); if(num < 1 || isNaN(num)){ $(obj).val(1); } if(num > 10){ $(obj).val(10); } uadataCart(obj,$(obj).val()); }
1
436c5bc6a733b844ef101240d6b836a2
727126ab8454c55a5e0be9075238543b
validates that the value points to an executable file
def IsExecutable(path): return os.path.isfile(path) and os.access(path, os.X_OK)
1