query_id
string
corpus_id
string
query
string
code
string
label
int64
c26871d1e04e546a648a9a5b59be2d15
dfce43ab700b1f4bc1b1d2e5f94e605c
Check that payment module is active, to prevent users from calling this controller when payment method is inactive.
class Method extends \XLite\Model\Repo\Base\I18n implements \XLite\Model\Repo\Base\IModuleLinked public function hasActivePaymentModules() { return 0 < $this->searchCount($this->defineHasActivePaymentModulesQuery()); }
1
51c1ce16e311c1b63523e36bebc730a8
c975fab5843519983867f10b8efc1a32
stops both drive motors and waits 1/10 of a second
void stop1(void) { Servo_Control(R_M, RNEU); Servo_Control(L_M, LNEU); Servo_Control(C_M, CNEU); wait1sec(); }
0
c8c136f4da29424e8c62eb88e57f4337
2bab4c82ddcdcc7c1cf3cab02c27e77f
دالة ايجاد محيط المربع
float Square::findPerimeter() { return 4 * side; }
1
ba3c1a1bb293db75cc25774738b51588
962a256c3e8fcbc5ee329eb078ab46d6
Respuesta a la ruta /
fmt.Println("") fmt.Println("+++++++++++++++++++++++++++++++++") url := context.Query("req") body, err := Get(url) if err != nil { fmt.Println(err.Error()) context.String(200, "La API no respondio como se esperaba") fmt.Println("+++++++++++++++++++++++++++++++++") fmt.Println("") return } fmt.Println("...
1
63acf04765971d99a886267682f284ad
b64846dde08dc2cf123803765a59f7ed
获取十进制值的字符串表现形式
{ static char tmp[8]; char *p = &tmp[7]; *p = '\0'; if ( value == 0 ) *--p = '0'; else { for ( ; value; value /= 10 ) *--p = "0123456789" [ value % 10 ]; } return p; }
1
ee6dd41339dd05db72bf53188f8ec321
dcb8dcf1a682beb8f3c75a4e90d9a39d
是否已经评论(评论可见)
@SuppressWarnings({"serial", "unchecked"}) public abstract class BaseRpComment<M extends BaseRpComment<M>> extends Model<M> implements IBean public java.lang.Integer getIsComment() { return getInt("isComment"); }
1
470457451b03ef063df2eccd111e65df
76ac35b2b956f1b314fe3f0063db5dda
Uses the data from the setup step and generated key to recreate device, gets the 'method' step in the form_list.
final_form_list = [] for form_key in self.get_form_list(): form_obj = self.get_form(step=form_key, data=self.storage.get_step_data(form_key), files=self.storage.get_step_files(form_key)) if not form_obj.is_valid(): return self.rende...
0
978d7509ecd5e9a98d8aadddc71d3af3
4783ce74da30ba68e10fbccd0a8169ab
Get 第三方渠道查询进件返回数据。详情见附录-复杂类型。 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。
public class ContractSyncInfo extends AbstractModel{ public String getExternalReturnContractData() { return this.ExternalReturnContractData; }
1
89fdbfba31e443c7f763d5919a57d1dd
7c5ed50d993751ce90776a6a17790d88
intoarce numarul de noduri din graf
{ if (graph == NULL) return -1; return graph->n; }
1
e21c5eb5209ab3b9a245df51a03a604d
1a0e6870f23bccc9b7e87a3a18bc4107
Sorts the list using bubble sort algorithm in ascending order Operators overloaded by the ListElement class are used when sorting
namespace LabviewAdvancedProgrammingTechniques class List_Bool public void Sort() { _myList.Sort(); }
0
8575ba8124984e26fa6bc48dc44eb4c4
12b44f663843da4a7e3cf600a8151fb6
获取正常状态流程的默认上一个状态。
{ var design = GetWorkFlowDesign(flowId); var startNodeId = GetStartNodeId(design); var toList = GetToNodeId(design, startNodeId); if (toList.Count > 0) { return design.Flow.Steps[toList[0]].Uid; } return string....
0
701e84ac9e29a10854d3d58e3e7cbe55
9deffa664c830c675f0618d53b585332
moves the upper n disks from 'from_rod' to 'to_rod' using 'aux_rod' in a recursive way time complexity: O(2^n)
class Main(QMainWindow): def moveTower(self, num, start, temp, end): if(num == 1): self.moveOneDisk(num, start, end) else: self.moveTower(num-1, start, end, temp) self.moveOneDisk(num, start, end) self.moveTower(num-1, temp, start, end)
1
3f4b08c328857a822ba673c6fbd4cf8d
090fb58e9465a798c520b9806ff620d1
[0] -> year,month,day [1] -> hour,min,sec
if utc[-3:]=='UTC': utc=utc[:-2] elif utc[-1:]=='Z': pass else: raise Exception('Cannot handle timezone other than Z(ulu) or UTC: {}'.format(utc)) date,time = utc.split('T') return [int(v) if i<5 else float(v) for i,v in enumerate([int(d) for d in date.split('-')]+[float(t) f...
1
dbdb082d158fd21ae22123e4d23b2248
602af221164e192f9e6319ddfe9a9799
Method saves all figures to xml file using XmlWriter.
{ var codeCovarageTotal = report.Aggregate(1d, (seed, it) => seed * it.Coverage).ToString(); using (var outputFileStream = new StreamWriter(outputFilePath)) { using (XmlTextWriter writer = new XmlTextWriter(outputFileStream)) { ...
1
b769dea2091fbc256d6e8d0921005c1a
776abedf81adef923540e43fd7768649
Search for a path of moves back towards starting position
{ std::unordered_map<uint64_t, VertexState> visited; std::priority_queue<std::pair<uint64_t, VertexState>, std::vector<std::pair<uint64_t, VertexState>>, VertexComparator> queue; auto initVertex = std::make_pair(initialPosition.first, VertexState(initialPosition.second, calcHeuristics(initialPosition.first)...
1
4691c16938af105f8417c010b639375c
09fb95d0cb6bfb86318f8f1a8f983831
将用户请求传输对象映射为领域对象
Collection<Obj<?, ?>> toDomain(Collection<ObjDTO> dtos);
1
d3f6fc84b01ca23ef2df7831c5a89255
4cbb0f62620db1454b2d51655ba05752
加载所有的留言和用户
$sql = "select t_message.*, t_user.username from t_message left JOIN t_user on t_message.user_id=t_user.user_id "; return $this -> db ->query($sql)->result(); }
1
19f7ede2e85ee234e819b3b411150c5c
d464ddd97de25462579d2b9487d3f3df
Returns the value of a memory buffer at the given address formatted for the given type. on success.
mem_size = self.llw.get_memory_size(mem_type) mem_data = self.llw.get_memory_data(mem_type) if mem_size == 0: return None buf = ctypes.create_string_buffer(mem_size) ctypes.memmove(buf, mem_data, mem_size) return buf.raw
0
291d8033eedd6ebf2e2c68cedf05c338
929e237f25cb79571dd3d368be7e6e49
Funcion que sirve para ver la sentencia sql con los valores/parametros
int i=0; Object p; String values=""; if (array.size()> 1) { for (i = 0; i < array.size() - 1; i++) { p = cont.get(array.get(i)); if (p instanceof String) { p = "'" + p + "'"; } values = values...
1
6170d660b4531b89726876b2c608c621
b62a11a8572b29582792e8c976bd373f
多点触摸处理
public class SampleView extends View @Override public boolean onTouchEvent(MotionEvent event) { float[] pt = {event.getX(), event.getY()}; mInverse.mapPoints(pt); Log.e("point", event.getX() + "-----" + event.getY()); if (event.getAction() == MotionEvent.ACTION_UP) { ...
0
22832b867b3fcb3576c88e4c470b9fba
511d41733dad78574036978a393e3601
设置鼠标进入面板时字体的颜色
namespace Xr.RtManager.Control public partial class TextMenu : PanelEx void OneLevelPanelMouseEnter(object sender, EventArgs e) { PanelEx selectionPanel = (PanelEx)sender; Label label = (Label)selectionPanel.Controls[0]; if (selectionPanel.BackColor != oneLevelBgSuspensio...
1
822ed194e6f32c7cf459f4a9ac7460d8
c4150949a7102c76d7b9afa0a3753b9b
Creates an unmanaged copy of a byte array, and then returns a handle to it. Must be freed manually.
{ if (buffer == null) { throw new ArgumentNullException(nameof(buffer)); } int bufferLength = buffer.Length; IntPtr bufferPtr = Marshal.AllocHGlobal(bufferLength + 1); Marshal.Copy(buffer, 0, bufferPtr, bufferLength); Marshal.WriteByte(bufferPtr, bufferLength, 0); JsValue reference; JsE...
1
31e19a33221ab63ab44f8d077938b2de
ff0681430220110fde910ed985f8cca2
从形如 dnt.pdm.server.adminpane-0.0.1.RELEASE.jar 这种字符串里面解析出组件对象 此时,组件对象的 groupId, artifactId, Version, snapshot, release 等都应该被正确设置 <ul>名称形式: <li>dnt.pdm.server.adminpane-0.0.1.jar</li> <li>dnt.pdm.server.adminpane-0.0.1.RELEASE.jar</li> <li>dnt.pdm.server.adminpane-0.0.1.SNAPSHOT.jar</li> </ul>
@SuppressWarnings("WeakerAccess") class Generator Map<String, String> mapPom(String pom) { try { var builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); var document = builder.parse(new InputSource(new StringReader(pom))); var xpath = XPathFactory.newInstance().newXPath(); v...
0
498deea68cf2729d280a4e5c7fa9b0e6
fb41b24dec526561833b87e0eac9b79c
Funktion zur Eingabepr�fung eines Ortes.
string pattern) { throw "Veraltete Methode in Lokalitaetsverwaltung aufgerufen"; if (checkGebietsLokation(zeile)) { speichereGebietsLokation(new Gebietslokation(zeile)); } else if (checkLineaLokation(zeile)) { new Linearlokation(zeile, (Gebietslokation*) NULL); } else if (checkPunktlokation(zeile)) { } }
1
c2c2bbc5edd7e9ea280bb5efe850e31f
05dd0fcade36ea7ce094c28cb1f3d5a5
Test for intersection of time span, with some tolerance for nulls.
tr = mediatimerange(tr) return ((not self.is_empty()) and (tr.is_empty() or (self.start is None or (tr.start is not None and self.start <= tr.start)) and (self.end is None or (tr.end is not None and self.end >= tr.end)) and (not ((self.s...
1
99d2f5e2d72793a74257213657f1411f
74f0875b271d9a6c7a4d7a044ac42f5c
改变学院以及部门的相关信息
@Update("UPDATE collegeclass cc SET cc.college = #{upCollege} WHERE cc.college = #{college}") public void updateCollege(@Param(value = "college") String college,@Param(value = "upCollege") String upCollege);
0
cb1c634f6d2095e03751a066e7f77e71
82cc9a8565585e8f2f2c71598eb7ef0c
Draws how the weapon loads and where
int currentWeapon = 0; int currentAmmo = 0; int tankX; int tankY; Tank currentTank; String strAmmo; g.drawImage(weaponIndicatorBG, -4, 900, null); g.drawImage(weaponIndicatorBG, 743, 60, null); for(int i=0; i<2; i++) { if(i==0) { currentTank = T...
1
7e7bd81e67081a286711379f7e7b8f95
97d2335c5995ea980971b8af865f8d18
以ORM的方式进行查询。
public class ViewOperatorsMtDataReportVo public static Map<String, String> getORM() { return columns; }
0
7affda531263ac538c765b8f4e514163
4802d64752041d9842f26956890f855e
Remove variables that are not defined in the new task.
result = services.copy() for name, defn in result.items(): env = defn.get('env', {}) val = base.get(name, {}).get('env', {}) env.update({k: v for (k, v) in val if k not in env}) return result
0
3d01b29dbbce6bfb1b121fa4f5ca4a70
1d1bbbeea1350ae40d025b7416cbf03c
Get the user resolver callback.
class AuthManager implements AuthManagerInterface public function userResolver() { return $this->getContext('userResolver'); }
1
c6e007db23eb8ebda4c82d080fbdc66b
b0d112d621f757b2f90989d7516f6ef9
Picks object and places it in front of the main camera
public class UIManager : MonoBehaviour public void SetSelectedObject(PhysicsObject obj) { selectedObject = obj; mainCamController.SetFocalObject(obj.gameObject); mainCamController._TargetDistance = Mathf.Max(obj.transform.localScale.z * 3.0f, 1.5f + obj.transform.localScale.z); }
1
0b89d4e6f6856cb19b1b4fa762a9bd58
3ec58a205d11ff52e1d7e7c7e541b4ad
Get the framebuffer size
public class Context public Vector2i getFramebufferSize() { return framebufferSize; }
1
46375e2dcbf4f9f75a29aaa2232a5dc3
e7348e83724655224ad6eca8b33828e9
Function called when a link is created by the user.
@link = Link.new(params[:link]) @link.user = current_user if @link.save flash[:notice] = "Successfully created link." redirect_to @link else render :action => 'new' end end
1
b20ef5be4d031045a1bb5e10c8cbd338
e3df4f1bdc479099066fbc25eab8eccd
end customer 조건값을 가져온다.<br> 오더 생성을 비롯해서 end customer정보를 입력해야하는 모든 화면에서 호출된다.<br> CustomerInfo 컴포넌트에서 호출.
class InputDeliveryContentWrapper extends React.Component{ fetchCustomerBaseData(token){ console.log("fetchCustomerBaseData"); let userid = this.props.userid setTokenHeader(token) fetch(basePort + '/fetchcustomerbaseinfo/' + userid, {headers}) .then((result) => { r...
1
f33ab9347099847f21447d7d8c350a3a
ba70f49c22546b8a1c3a3b4ae4c2f519
Integrand for neff for Smith et al. nonlinear power spectrum
sigma = deltac / nu Anorm = 0.3222 a = 0.707 p = 0.3 c = 1.08 nu = deltac / sigma lnsigmainv = np.log(1. / sigma) G1 = np.exp(- np.power((lnsigmainv - 0.4), 2) / (2. * 0.6 * 0.6)) G2 = np.exp(- np.power((lnsigmainv - 0.75), 2) / (2. * 0.2 * 0.2)) f = Anorm * np.sqrt(2. * a / np...
1
522357872acfc84397b8927ce6b00cb0
96adbd2abc59b1ca3f08d11e9145dd2f
Computes the eigenvalues and corresponding eigenvectors of a given 3x3 matrix using Jacobi's method. m : The 3x3 matrix to compute the eigensystem for. eValues : An array of floats to hold the resulting eigenvalues. eVectors : An array of Vector3s to hold the resulting eigenvectors.
namespace LinAlg namespace static void eigs(const Mat3<float>& A, Vec3<float>& values, Mat3<float>& vectors) { char jobz = 'V'; char uplo = 'L'; int n = 3; int lda = 3; int lwork = (ge...
0
24d333b6bddc246b9f84bc4445836e93
8b39646fc3551aad087e0cc99b5cc391
Enable WAL.
namespace Apache.Ignite.Core.Cluster bool IsWalEnabled(string cacheName);
0
ee855628fe20f73440dac92dc19d5bb3
f78e407e0b9a91c83a2d57916a92f227
Task for individual trial. Returns whether pigeon was found.
tracker.setPosition([0,1.8,0]) tracker.setEuler([0,0,0]) FlashScreen() pigeon_root.setPosition(pos) pigeon_root.visible(True) hooting.play(loop=True) manager = vizproximity.Manager() manager.addTarget( vizproximity.Target(viz.MainView) ) sensor = vizproximity.Sensor(vizproximity.Sphere(PROXIMITY_RADIUS),pigeon...
1
82a9418f7948219136f7c41746fb0f7f
e84953e216a19457f84ad0aff676b057
Gets the potential auto scroll information.
class CategoryButton extends JCheckBox implements Autoscroll AutoscrollSupport getSupport() { if( null == support ) { support = new AutoscrollSupport( PalettePanel.getDefault() ); } return support; }
1
df90c20494c5a3dfb335df7062e79fd0
d89abf8b1fb418af5cd5861186951c20
Given a buffer allocated with malloc() or realloc(), store the buffer address in the first word of the buffer and return a pointer to the second word. This way, the memory is suitably aligned yet can still be freed with ncptl_free().
AllocMemBlock(PXMLINF pXML, int bytes) { PBYTE p; bytes = ((bytes+31) & ~31)+32; p = Mem_Alloc(0,bytes); if (!p) return NULL; ((PVOID *)p)[0] = pXML->malloc_list; pXML->malloc_list = p; return p+32; }
1
beae45c15eba8437e9c6e416309422eb
1d8aab7c066420c186f4300cbc6d1852
⦁ 11-Hacer el programa que imprima los números pares entre el 1 y el 100
{ Console.WriteLine("============================================================"); Console.WriteLine("Bienvenido al programa!"); int num1 = 0; int cont =1; Console.WriteLine("Por favor ingrese un numero entre (100) y (200)"); num1 = Conve...
0
0fd1e0929b71ce1b8f8c4ec27cb81f6d
20757284500c1ea4b8c5f9286159061a
# получить пермалинк рубрики по указанному слагу
function get_categoryid_by_slug($slag) { $cat = get_category_by_slug($slag); $cat_id = $cat->cat_ID; return $cat_id; }
0
da0af69f2c4c006f21df5705e0a993d1
bfd80fcf7181cb3404122ebbed6a9edc
Apply a named cell style to a column. Existing styles are kept, unless the chosen named cell style overrides those styles.
public void addNamedCellstyle(SNamedStyle namedStyle);
0
09ee495d6569c1ca7eb338cd46c0634f
61055a7d85a005ed7e11a6f6cccbddd7
Action for loading the login form view
namespace all_access.Controllers public class HomeController : Controller public IActionResult signin_form() { ViewData["title"] = "Login"; return View(); }
1
607687bae657dd955c9b20ddee10b313
748073bdb491e2e8a55319ca572d4219
自动控制广告分发的比例
namespace xce{namespace ad{ void DemoLoaderCache::UniFormImprRatio(FreshAdQualityMap& fresh_ad_pool){ for(FreshAdQualityMap::iterator it = fresh_ad_pool.begin(); it != fresh_ad_pool.end(); ++it) { int state = GetStateByZonePos(it->first); double test_ratio = AdDemoConfig::instance().GetStateTestImprRatio(sta...
1
48f7e161cec9dc02d265c7237c18469a
b2d08bc4e4880b33bc6b45eb119fda4c
Creates <see cref="DcMotorBase"/> instance which allows to control speed in both directions.
DC_Motor::DC_Motor(uint8_t in1, uint8_t in2) : _frontLeftIn1(in1), _frontLeftIn2(in2) { _noOfWheels = 1; _usesPWM = false; }
0
ee052d6a6b63a072ad1af744dd602b89
c1b8919b2cbd5d92472f6740ceb3e48b
@brief Attempt to open the impeachment request UI.
function GuildController:openGuildImpeachPostWindow(status) if status == true then if self.impeach_post_window == nil then self.impeach_post_window = GuildImpeachPostWindow.New() end self.impeach_post_window:open() else if self.impeach_post_window ~= nil then ...
1
55f8bdeb9b934bc1672a50649794d4af
70dc4c66e522997714ffe7274e07d065
获取本周创建新的联系人数目
@Data @Table(name = "cl_mohe_emergency_contact5_detail") public class ClMoheEmergencyContact5Detail implements Serializable public String getCallCount1week() { return callCount1week; }
0
f33c84a3c53d58c3bcf1de0b56138261
d94b4cfbe6f88f7dbb7dcab848c83bf3
通过添加时间,加载更多的歌曲数据
class NewsViewModel : BaseViewModel() fun loadMoreData() { if (loadMoreTime == 0L) { loadMoreTime = firstLoadTime } RetroFitHolder.wInstance().getNewsList("video", loadMoreTime - 60 * 10, loadMoreTime, listRequest) }
0
93b2e16611cad439eec662d5f53a5741
68a4932bc0beeb07ea71159d4dcab29a
Adds a UDP provider proxy for the configured target and source address.
namespace BoundlessProxyUi.Mitm class UdpProxy public async Task StartAsync() { UdpClient sender = new UdpClient(); var endpoint = new IPEndPoint(IPAddress.Any, LocalPort); try { void requestCallback(IAsyncResult ar) { ...
1
7216f869fa8eb7cfaf34d91b4ef0c158
3cb7db2d0ff9db3f5646afd562f7d4c9
Gets the maximum size value that will be assigned by this action. By default, the maximum size value is determined automatically from the data, faithfully representing the scale differences between data values. However, this can sometimes result in very large differences. For example, if the minimum data value is 1.0 a...
public int getMaxScale();
1
c9caa998ff28df05a0635cbababd4722
be492d65f2cbec74486cdda1988534b1
Show all cached tweets.
class ReloadTweetController extends Controller public function index() { }
0
ac3f9eb701ab41a06e04ba67eed3b498
cbfd1e8415606e88115e94281d2d34cb
刷新瓦片,该方法会删除瓦片缓存
for(int tile = 0; tile < numTilesMax; tile++) { if(mBitmapCache[tile] != null) { if(mBitmapCache[tile].getName() != null) { mBitmapCache[tile].drawInBitmap(null, null, 0, 0); } } } }
0
ab71fb305c629bdb2bf79556dfd1b370
22f5d7d87d26bd29f46ed22bad0123d7
Create a word with length of len, when the letters chooses randomly.
def get_word_of_length(str_length): return ''.join(random.choice(string.ascii_lowercase) for _ in range(str_length))
1
9b2af0cd4ae8da9156744ab05e896fc3
1b86a899aa60f858b6e77d9520d69f71
Returns the date-time of the moment when the request was received
@Entity @Table(name = "API_REQUEST") public class ApiRequest implements Serializable public Date getRequestTime() { return requestTime; }
1
98076d4140d26ec4c691fa10881689a4
0802ed91002a269bf57f3ae828635ffc
Sanitizes a filename, replacing whitespace with dashes. Removes special characters that are illegal in filenames on certain operating systems and special characters requiring special escaping to manipulate at the command line. Replaces spaces and consecutive dashes with a single dash. Trims period, dash and underscore ...
s = _unicode(s).strip() if spaceAsDash: s = s.replace(' ', '-') else: s = s.replace(' ', '_') s = _encode(_RE_UNSAFE_FILENAME_CHARS.sub('', s)) if PLATFORM == 'windows' and s.upper() in WINDOWS_RESERVED_FILENAMES: s = '_%s' % s return s
1
09d870ca4a31d5ead166a842a62263e0
ae13b925e60c2138493be22205cfd5d8
Returns whether the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ScreenType#getScale <em>Scale</em>}' attribute is set. <!-- begin-user-doc --> <!-- end-user-doc -->
boolean isSetScale();
1
a1d90cd20d63cad5991798001287b85a
330465786a529a4e36415f09eb21df92
Draws text for "QSORT"
c.print("\n\n\n\n\n"); c.setFont(new Font("Berlin Sans FB",5,40)); c.setColor(Color.green); c.drawString("Remainder Division!", 30, 60); }
0
e18e78a1a63310e98d7df6aa5b76dd3d
33855181edd56c54105f932a749d8c8a
Get an alphabetic password between min and max characters long
func GetAlphaPassword(min, max int) (string, error) { gen := GetAlphaPasswordGenerator() return gen.GeneratePassword(min, max) }
1
a2634567cb2196b5d400ddb46a532ded
bf3e97c079864acb095ae9ac1938a163
查询患者医嘱信息
@SelectProvider(method = "queryList", type = PrescriptionProvider.class) public List<Prescription> queryList(Prescription Prescription);
1
f74a038615c2e973bdb18a6c51f53121
f5773d9135dcae8040f0e773eef70261
Euclidean distance between two points in 3-space.
def euclidean_distance_3d(p, o): return round(np.linalg.norm(p - o), PRECISION_FLOAT)
1
e30e0d9c300cfbb7b85671ce26c03d91
2e30503628bcf58796491e4b3f14cff8
调用该方法时先判断本类中定义的Toast对象(静态变量)是否为null,如果不为null,就先取消本类的Toast对象,然后根据参数对它重新赋值
if (sToast != null) { sToast.cancel(); } sToast = toast; }
1
191f7bc0e9a7c90ba0ad4a4dbf921c61
d9a95473fc0198e4f940dcaf82e6d651
Get a list of smart locks for a db user
class LockAccessViewSet(viewsets.ModelViewSet): def get_queryset(self): user_id = self.kwargs['id'] non_admin_lock_accesses = LockAccess.objects.filter(user_id=user_id, is_admin=False) admin_lock_ids = LockAccess.objects.filter(user_id=user_id, is_admin=True).values_list('lock_id', flat=True) ...
1
1cf8a212f73a56894a77670ec232cdd6
552dcb3eb45d5aebe2500c16d55a60cc
Apply zero to the equations of the Dirichlet boundary conditions
void apply_boundary_condition(libMesh::EquationSystems & equation_system, const std::string & system_name, std::string boundary_condition_path) { libMesh::LinearImplicitSystem & static_system = equation_system.get_system<libMesh::LinearImplicitSystem>("sta...
0
92d708320f0733a97ab329c8360f2d09
a3fa320dd2c3ea708887ded1dc8f74e4
CombineResults returns sorted resuls in one string with "_" delimiter
var result string fn := func(p []string, v string) { result = fmt.Sprintf("%s=%s", strings.ToUpper(strings.Join(p, "_")), v) } fn([]string{"p1", "p2"}, "value") fmt.Println(result) }
0
96e2ff065307594c85a614819616a1a7
9baf16767d6a57ea196e5d4d9c7b8b74
Retrieves the mean value of the sun zenith angle.
class Sun_Angle: def zenith_angle(self): return self.current_location() - self.last_subsolar_point()
0
27406faf62bc52b645f97d0131d499ce
c03fdd12f90cd6ac186a914a4b5dcaac
Relative URL for the given match and the given player.
export class UrlRouting static getMatchupUrl(params: MatchupFilterParams) { return `/MatchupAnalyzer?${UrlRouting.getUrl({ [UrlRouting.noSuffix]: params, })}`; }
0
c9177d2400ca259993113e695a8830b5
b0602726cbea49444174b3cef49bb456
根据列名设置表中已选中行中特定列的值
namespace OfficeTools.View.Base class OTDataGridView : DataGridView public void SetSelectedRowByValue(int ColumnsIndex, string ParamValue) { if (string.IsNullOrEmpty(ParamValue)) return; foreach (DataGridViewRow RowItem in this.Rows) { object ValueObj = Ro...
0
1a329e8a44d172123ce06930af6d06af
424a9cf27e22ad3d55e31db1e6bf0e76
@brief Write ILI9341 component registers
static void ili9225_write_register(uint8_t uc_reg, ili9225_color_t us_data) { ili9225_write_cmd(uc_reg); ili9225_write_ram(us_data); }
0
9366b68a572872638734bad44a19ee00
a492b993ed3dfc7d0654458baf1f3c85
Randomizes the colors of tagged objects at the start of each scenario iteration
for _,part in pairs(workspace:WaitForChild(map):GetDescendants()) do if part.ClassName=="SpawnLocation" and #colors~=0 then local choice=math.random(1,#colors) part.TeamColor=colors[choice].TeamColor part.BrickColor=colors[choice].TeamColor table.remove(colors,choice) end end end
1
5ddfa4b71dcc19d0c3cdef81bcad77b6
b474d522be534764d3fce5b515f5eb61
Translates /foo/bar into api service go.vine.api.foo method Foo.Bar
if strings.HasPrefix(path, "golang/") { return mockgen(strings.TrimPrefix(path, "golang/"), "golang/", "") } return mockgen(path, "", "boson/") }
0
57cf6d140a53c50b525fe66216c09a7e
ce04bbec2c02b5e9caeb0a5b994f9d9b
Função de Ativação Sigmóide
class MLP(object): # Dicionário do python para armazenar o modelo da MLP def fnet(net): return (1 / (1 + np.exp(-net)))
1
e148c1c0bc1b288d463252318a7828a4
b0f11776e727bdf8da341ac292aeb817
택시요금 계산
distance_price = distance*2.70 duration_price = duration*0.50 final_price = distance_price + duration_price + drop_charge return float(final_price)
1
e177c5db66560204c2b4d9a9e269fafc
fae09257976d3ebdede20c48fe56454b
Force-stops (or pauses) all tracks.
void wavTrigger::trackPause(int trk) { trackControl(trk, TRK_PAUSE); }
0
2456118471ccc8ccabfb58929518e8af
0a90a0b5887af76ee8096511833f7f70
Fetches the file ids of coupon assignment sheets with enough recent activity that they can have a file watch created/renewed. Returns: iterable of str: File ids for assignment sheets that can have a file watch created/renewed
message_iter = filter( lambda bulk_assignment_message: bulk_assignment_message.event in RELEVANT_ASSIGNMENT_EMAIL_EVENTS, get_bulk_assignment_messages(begin=earliest_message_date, end=now_in_utc()), ) for message in message_iter: assignment_status_map.add_potential_event_date...
0
5e836bcad43844989e69ae9e2f4de50d
f76853ed33c43ad523d97897834230d6
Reformat values of the given enum keys by removing the quotation marks wrapped around the values.
class AuthHeader: def rewrite_param_values(cls, array_params): rewrite_params = list(map(lambda x: [x[0], x[1].replace('"', '')], array_params)) return rewrite_params
1
bf5be31f37602a5206ab7b5833fc2ec3
f1b587a214d511bc3572c31ed39fd628
The getter for the customer name for the customer's model.
@EditMode(editor = FieldEditor.Text, required = false) public String getCustomerName() { return customerName; }
1
f91512a56737d27d9642a55218c74034
35a033d079e1400af011f7d3e7f2852d
Inicializálja a képek skilljeit
Sprite = {} Sprite.background = love.graphics.newImage('Sprite/background.png') Sprite.playerSheet = love.graphics.newImage('Sprite/playerSheet.png') Sprite.enemySheet = love.graphics.newImage('Sprite/enemySheet.png') end
0
726eee517a52290c0c914675b3d33f01
c11e7f4ea897f32736bc44e44326abe6
Change the character buttons' caption character case.
index = 0 for i in self.characterList: buttonList[index]['text'] = i index +=1 if index == 9: break;
0
5ca3664822b5890d13b1bb6df07d8194
e47ff32b981fb49c867e0378bbc8bee3
Loads lyrics from stream.
public class RhythmOverlayInflater private static ArrayList<String> readFrom(InputStream inputStream) { final BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, Charset.defaultCharset())); ArrayList<String> readLines = new ArrayList<>(); String line; try { ...
1
0c6560ffdd0001779d7d2946929973c5
928539a2d6c9e109ab63ab95e29daf40
GET: EntityCustomer
namespace HoA.UI.Controllers public class CustomerController : Controller public async Task<IActionResult> Index() { return View(_customerService.GetAll().ToList()); }
1
e43908ec58cb19439e3845fb89f65d15
a7352c05ef0d886cab2880b8eae1e801
是否为Y, N
@SuppressWarnings(value = {"rawtypes"}) @Data public abstract class QueryParamOne<Q extends QueryParamOne, T> public boolean verifyParamIsY(String param) { return "Y".equals(param); }
1
b3b7156d9d12399ddbce4902eb4a4fa2
e73619e67c1b31fc2ffb841861d82568
Create warnings if T&RH conditions are outside allowed bounds.
self.ne = np.clip(self.ne, n_min, n_max) self.ni = np.clip(self.ni, n_min, n_max) self.nn = np.clip(self.nn, n_min, n_max) self.Te = np.clip(self.Te, T_min, T_max) self.Ti = np.clip(self.Ti, T_min, T_max)
0
c2c0bd1bdb738b2ebd4a3191d49588ae
382ca4b170cd10466e9143ec1b8e22d6
获取收藏行为数据
async getCollectData(success) { let data = { pageIndex: 1, pageSize: 10, order: 'CreateTime desc', filter: { Type: 'and', Conditions: [{ Attribute: 'OpenId', Datatype: 'nvarchar', Operatoer: 'eq', Value: this.userInfo.openId }, { Attribute: 'CollectionType...
1
889fed09099eb573db6a350ba28a3283
73ae4d6cde5211441aa9a4509c5eeca0
Compute the static part of the zero-point self-energy. This includes the Fan and DDW contribution of the Sternheimer space and the DDW contribution of the active space.
const int *pnworkers, const int *pworkerid, const int *pLa, const int *pLb, const int *pLc, const int *pLd, const int shel_atm_frg[], const int shel_ini_frg[], const double atom_x_frg[], const double atom_y_frg[], const double atom_z_frg[], const int leading_cs_pair_frg[], const double csp_schwarz_frg[], const i...
0
a69e1b53683c2ca44bc493faabb01598
79d948f2a0ac6137629da83dd2db9168
Returns details about the requested data quality metrics.
{ JsonResponseModel<DescribeQualityMetricsResponse> rsp = null; try { var strResp = this.InternalRequestSync(req, "DescribeQualityMetrics"); rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeQualityMetricsResponse>>(strResp); ...
1
3c33ebe9e4a5436e727aed6d5ab6b516
6663093f1947932fcb00a9dfb71c06d6
Returns the group named <group> owned by User <user>. If the group does not exist and <create> is False, None will be returned. If <create> is True, a new SubscriptionGroup will be created and returned. The caller may need to commit the new group.
members_username=[], group_desc=""): method = 'POST' url = self._make_url(conf.CREATE_GROUP) params = { "owner_username": owner_username, "group_name": group_name, "members_username": members_username, "group_desc": group_desc...
0
377c6d3618713bfb3f40647dfd12a73a
42c320ee441e692d3f168fead8c79203
Test case for apiV2PortfoliosList .
class ApiApiTest extends TestCase public function testApiV2AdviceEnginesModelPortfolioModelPortfoliosList() { $this->markTestIncomplete('Not implemented'); }
1
2f704033cdc27ce71f24c9a19c19630e
8c185152c64625f0de3191f0910e4c22
<pre> An ordered sequence of condition steps. A user's events must complete each step in order for the user to match the `UserSegmentSequenceGroup`. </pre> <code>repeated .google.analytics.data.v1alpha.UserSequenceStep user_sequence_steps = 3;</code>
org.w3.x2001.xmlSchema.ExplicitGroup[] getSequenceArray();
0
abb0e87606608f4379729c16bfdf5c12
b4fd9bc88ea02a3a26b0fcb4beae543b
Hide the game over modal
class WordGuessPlay extends Component closeModal() { this.setState({ showWinModal: "noModal" }) }
1
b3da3391544a2fee025e504f5ba8f500
39ff1f59bd9e1297621dae789269c408
初始化项目目录结构【数据目录、日志目录】
initFolder(resourcesRootFolder, "存放所有资源") initFolder(resourcesRootFolder, "存放所有资源") initFolder(bingImageFolder, "存放必应图片") initFolder(logcatFolder, "存放日志输出") initFolder(backupFolder, "存放备份") initFolder(sqliteFolder, "存放SqlLite数据库") initFolder(configFolder, "存放应用配置"...
1
bd7738dc0c25f32a6ffb1b9cf88939d9
f07eff6e99ffce0d81fd44c10fc0a7a7
获取群信息成功
public void onHandleUpdateGroup(String json, boolean isSuccess) { if (isSuccess) { json = ParseJson.parseUpdateGroupJson(this, json); } final String info = json; runOnUiThread(new Runnable() { @Override public void run() { groupInfo...
1
b0f2032062027678ff2c2b77f57bde3d
6b0aff7c6bc19387d7d31d61f0dc43df
金额,可带两位小数的正数
class Verify public function money($value) { $match = '/^(([1-9]\d{0,9})|0)(\.\d{1,2})?$/'; return preg_match($match, $value); }
1
00273c6448741d7ad252e3fa7f604f44
dbef753e9898469ecdac0099ad10681e
Handle request as a combination of request enum and json string Return an struct containing information of request
class ServerThread(Thread): def __request_struct(self, error_count=0): self.__logger.log('Requesting struct...', 2) self.__conn.sendall(b'REQUEST STRUCT') data = self.__recv(1024, b'REQUEST STRUCT') msg = data.decode('UTF-8').split(' ') if msg[0] == 'STRUCT': byte_tot...
1
d5551bb5a81c6d1898e3bc50363cb0a6
6072034e867379cd261da536d57ddf61
Test reading an object with one char in it.
final class CompleteTest extends TestCase public function testRead(): void { $stream = $this->getMockBuilder(Stream::class)->getMock(); $stream->expects(self::once()) ->method('setTimeout') ->with( self::identicalTo(1), self::identicalTo(900000...
0
ea714ad073b59f0ae9e90d0bd0dc8ab5
7c83e03276107052c22cc60986b5b08e
通过文件名,获取zip文件名
def get_zname(name): return name + '.zip'
1
79eb776053e3f957cee2dd7eaed571b1
2404649dc491aab25578bbea3d0106d5
GET: Strength
namespace DnDFrontEnd.Controllers public class StrengthsController : Controller public async Task<IActionResult> Index() { var applicationDbContext = _context.Strength.Include(s => s.Athletics); return View(await applicationDbContext.ToListAsync()); }
1
b726ff7ea2731f5520af0bc76486e36e
afd38f9c33a6efced25d67a7c7114615
called when the input is a ','
if cpp_like_debuginfo { output.push(','); } else { output.push_str(", "); }; }
0
a79aeceec0b3413b62525d1c797e6237
09f9263366dab9104a5d56aad5ebcc1c
Search through a range of settings by optimizing over a pair of two parameters at a time
param1Min = 1 param1Max = 62 param1Step = 1 local settingsTable = {} local allCount = 0 for param1 = param1Min, param1Max, param1Step do allCount = allCount + 1 settingsTable[allCount] = { shift = param1 } end iterateAlgorithm(settingsTable) end
0
dd09f2d2049e0ed8277cbfe4913cff9d
a542276dd6868be2cd992b3118d4eeda
Turn off an instance, but don't destroy it. It can be restarted later.
class Instances: def stop(self, id: str) -> dict: r = requests.put(self.url + '/{}/stop'.format(id), headers=self.headers) return r.json()
1