query_id
string
corpus_id
string
query
string
code
string
label
int64
de4c9747fa1b201c165c8ec05f3a8c2e
ac40af20f3e6f01cff44bff8d34190f2
TResult System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2<UnityEngine.Vector3,Mapbox.VectorTile.Geometry.InteralClipperLib.InternalClipper/IntPoint>::System.Collections.Generic.IEnumerator<TResult>.get_Current()
Il2CppObject * U3CCreateSelectManyIteratorU3Ec__Iterator12_2_System_Collections_Generic_IEnumeratorU3CTResultU3E_get_Current_m2602589465_gshared (U3CCreateSelectManyIteratorU3Ec__Iterator12_2_t288472136 * __this, const MethodInfo* method) { { Il2CppObject * L_0 = (Il2CppObject *)__this->get_U24current_7(); return ...
0
df9a92a9bd5ab0c5038931103c55ec44
572903e4337a8ee1735983100d9dc962
For you to complete...
def find_valid_ordering(class_graph): return "Implement Me!"
1
e924422bf787f7e1198ec68342909222
ac3aa9a1c21e45e807f0a835fff31fec
该定位数据是否是重复数据<p> 检测车牌号和GPS时间
{ using (Entities db = new Entities()) { qw_carhistorypositions qumodel = new qw_carhistorypositions(); qumodel = db.qw_carhistorypositions.Where(a => a.carid == CarId && a.positiontime == PositionTime).FirstOrDefault(); if (qumodel != null...
1
537f99f7ae304da760550525cb9cff50
48679fa37a48f1ab2409d5ffc70d0ac5
通过反射一次性将表进行映射 FluentAPI
namespace Colinapp.Data.EF public class MySqlDbContext : DbContext, IDisposable protected override void OnModelCreating(ModelBuilder modelBuilder) { Assembly assembly = Assembly.Load(new AssemblyName("ColinApp.Application.Mapping")); var typesToRegister = assembly.GetTypes() ...
1
e86009dfd1730d74bf587b89acfceccf
0ded2d5eba7c35a2a620fda9ed145ab8
将记录插入数据库的车辆离开表
void CDspDataProcess::OutPutVtsMatch(RECORD_PLATE_DSP_MATCH &record_plate, RECORD_PLATE_DSP_MATCH &foundRecord, RECORD_PLATE& plate) { CarInfo carnums; char text[10] = "123456789"; if(foundRecord.dspRecord.chText[0] != 'L') { memset(text, 0, 10); memcpy(text, foundRecord.dspRecord.chText, 7); memcpy(carnu...
0
1daf51f5d1953d96dc4f6931da233d65
ff4ededd702640de163bfffe28c77a6a
Retrieves the results of the editing session. It returns a array of Strings containing the current values of the edit fields.
$fields = array_keys(unserialize($FIELDS)); $post_values = SessionHelper::sessionExists('POST') ? array_values(SessionHelper::sessionRead('POST')) : null; $ind = 0; foreach ($fields as $key=>$val){ $fields['{'.strtoupper($val).'}'] = SessionHelper::sessionExists('POST') ? $po...
1
87a2c006bbc28fc6cdc5316bcf571204
8353e5b2aa15b41f8e88e0a1fd868a9e
Get all Archivables for a certain guild, when no ID ist specified, all entries are returned.
public class DatabaseManager public List<Map<String, Object>> getReactRolesByGuildID(String gID) { return dbObj.searchDB("*","ReactRoles","guild_id == '" + gID+"'","",9999,"",""); }
0
dc740ffa209cf02139ae2f66b0e2d24d
8a5598f0516a8aac76ec20cb2fae22cd
Removes comments by post id.
class CommentModel extends AbstractModel public function deleteByPostId(int $postId) { $statement = $this->getDatabaseConnection()->prepare($this->getDeletePostByIdQuery()); $statement->bindValue(':post_id', $postId, \PDO::PARAM_INT); $statement->execute(); }
1
2c32704407756bcc490afe0404272014
37d7ce780f4990598892ac359d4b46a1
userがshopをフォローする
{ $user_id = $this->user()->id; $fav = Follow::updateOrCreate([ 'user_id'=>$user_id, 'shop_id'=>$id, ]); return $this->response->item($fav, new ShopFollowTransformer()); }
1
596dfd302477d52ab0364b1b24aa86f1
663db2d72d999b985b5390608e0c9dc5
Removes the node matching the specified information from the current hashtable. Returns a pointer to the removed element if successfull or NULL otherwise.
int key = item->key; int hashIndex = hashCode(key); if(hashArray[hashIndex]->key == key) { struct DataItem* temp = hashArray[hashIndex]; hashArray[hashIndex] = NULL; return temp; } return NULL; }
1
86d4f8eadec372b53e5554459d360176
3843ddbd4f31a794c6890b7d0253b22c
The Decorator delegates all work to the wrapped component. 装饰器将所有工作委托给包装的组件。
public class Decorator extends Component @Override public void operation() { component.operation(); }
1
1424f54fff031621150db90810d0c085
f8bfd38ca61b5e69dc3edf112a6e26e9
Permet de gérer les champs quer l'api va retourner. Par défaut elle retournera tous les champs.
class SearchImages extends Search public function Fields(array $fields) { $this->requestDetails["fields"] = $fields; return $this; }
1
8769d6757664bc92516f7326d9c77e1c
6e40fbf884a809a4c53e5961b089ff87
Entry point to the example
def main(): ex = Example() ex.run()
1
514072889ce4ba3e64134363049dfe39
f28f30554adbccbd47eabfd3a527ae6d
Apply OpCodes associated with switching a case on ICU. This involves tearing down existing case and than building up a new case.
impl<'tf> ToyForth<'tf> fn builtin_case(&mut self) -> Result<(), ForthError> { self.check_compiling()?; self.add_instr(Instr::Branch(2)); let exit_xt = self.add_instr(Instr::Branch(0)); self.cpush_case(exit_xt); Ok(()) }
0
f3dd54e69cca9814e1b56d35b835abf0
7ba220506204686b40393b77569c70b3
بررسی شماره ها واصلاح خودکار اشتباهات احتمالی
def check(array): coulmn = [[],[],[],[],[],[],[],[],[]] for c1 in range(9): for c2 in range(9): coulmn[c1].append(array[c2][c1]) for i in range(...
1
f359045cc1340f9712c45adc50512b1a
015ae443d996f6d996cb3a353e1eb9dc
u"""ライフ1/2判定。
for i in [0,1]: for j in range(0, len(base[i])): if base[i][j].life > 0: if base[i][j].kind < 6: score[i] += base[i][j].life * basic.BASE_SCORE else: score[i] += base[i][j].life * basic.HERO_SCORE if turn >= basic.TURN_MAX: return 0 for i in [0,1]: over = True for j in base[i...
0
27fd63a3d1e29d9d10db713691e2c753
f4bdb8866b7730d7e5b37f17b88f0dda
The ARN of the IAM role to be assumed by Firehose for calling the Amazon ES Configuration API and for indexing documents. The IAM role must have permission for `DescribeElasticsearchDomain`, `DescribeElasticsearchDomains`, and `DescribeElasticsearchDomainConfig`. The pattern needs to be `arn:.*`.
class TopicRuleFirehoseArgs: def role_arn(self) -> pulumi.Input[str]: return pulumi.get(self, "role_arn")
1
897ab90619412e7bafa3573d2a642ea7
a1e2dbe1028c7dbb51513a042964611d
Getter method for property <tt>columnType</tt>.
public class SQLColumnTypeContext public Class getColumnClassType() { return columnClassType; }
0
d2059673bd6e46fe5fccbd6538608e02
501bc495a6e4b09d1965e83c6c915ad6
Ajax API to request a doctor instance including its assocations to other entities.
{ if (!$doctor->id) return response()->json([], 404); try { return response()->json($doctor->toArray()); } catch (\Exception $e) { return response()->json(['error' => $e->getMessage()], 500); } }
0
5ad415917b3be8e7ee709ffb72922f6f
54bee7ce859683884109bda1dccb7449
Remove removes all occurrences of a substring from within the source string.
if (source == null) { return null; } if (source.Length == 0) { return source; } if (chars == null || chars.Length == 0) { return source; } while (chars.Contains(source[0])) { source = source.Remove(0, 1); } return source; }
0
1a79ce8300cd72ab4d5d0f5c62215ccb
7dd7a32adf44e92275aff18f9f3ba52a
往cookie.json文件中写入cookie
class BasePage: def write_cookie_for_json(self,path='cookie.json'): try: cookies = self._driver.get_cookies() with open(path,'w',encoding='utf-8')as f: json.dump(cookies,f) except Exception as e: print('cookies 写入JSON失败,请检查路径...') raise e
1
2142dbdc162a4c73b0a3046455d63c20
641d7c2281f642031dd5c8ebd8828ca1
启动命令行工具
{ cmd = new Process(); cmd.StartInfo.FileName = "CMD.exe"; cmd.StartInfo.Arguments = ""; cmd.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; cmd.StartInfo.CreateNoWindow = true; cmd.StartInfo.UseShellExecute = false; cmd.Star...
1
68eea0be547b8c20d272c38ac94ad6f9
71d2dcb44ca9d7cf4c914b9241d8a568
Read text from filter control and select entries that match.
public partial class CMSWebParts_Membership_Users_UsersFilter_files_UsersFilterControl : CMSAbstractBaseFilterControl protected void btnSelect_Click(object sender, EventArgs e) { WhereCondition = GenerateWhereCondition(txtValue.Text); ViewState["FilterCondition"] = txtValue.Text; RaiseOnFilt...
1
98bdbd7d06f6601b2ec1800c40f9d238
a1e6ead618816c363094c4c689cc88a4
添加档口信息
@Service public class ShopServiceImpl implements ShopService public void addshopdalei(TShopdalei tshopdalei) { shopDao.addshopdalei(tshopdalei); }
1
a61aeda04be264492ef824036eff01cf
64fd8ceb66541bdcc0ba2b8b449245d8
Creates flask routes outside of Dash application. Mainly used to provided a route to download all data.
def flask(): urls = get_urls() return render_template('index.html', urls=urls)
0
d592da2feec850380b5a626a7cf3b4ab
593a181ae9cbf7a99f27346ce2b2c4fe
Asks the user to allow access to account information. Don't catch users denial. Handle this at the calling method.
@SuppressWarnings("BooleanMethodIsAlwaysInverted") public abstract class UserSystem abstract protected void messageAccessOption();
0
5855e6ce8cf41c2475955bef9cb0873e
71b29ee434e4c9e01363a052416589e3
Clean the data being passed from the save of a columns layout.
if 'columns' in self['layout']: ckeys = tuple(self['layout']['columns'].keys()) for key in ckeys: value = int(key) if value > self.max_col: del self['layout']['columns'][key] if 'rows' in self['layout']: rkeys = tupl...
1
f1aad361deaa9c888380d1e91cb3f7a6
5f282dfe56df4252381ff9887253a135
Pour changer d'utilisateur
def change_user( client, username, message ) new_username = message.split(' ')[1] if new_username == username client.puts "Cet utilisateur existe déjà. Veuillez choisir un pseudonyme inexistant." else @connections_clients[client] = new_username client.puts "Félicitations, votre nouveau ps...
1
7958ac386a8b240a16d3b03fbd037b56
a1c7e2ec1d843800ec5c1c6f2db135a2
<p>sml340svConditionText5 を取得します。
public class Sml340Form extends Sml330Form public String getSml340svConditionText5() { return sml340svConditionText5__; }
1
2abc2b9e910d67e66bf0f5d7f9456731
c96f077022ea92231c2f51ead4e5f087
closes connection to mailserver
class sms2{ function close_conn(){ if($this->usenet_handle) fclose ($this->usenet_handle); }
0
e16485fb9a50034309fb59c6cab834f7
f711f630470dd519c750bb266bd0c1f5
返回前n天的日期 格式yyyymmdd
rs := make([]string, 0) nTime := time.Now() if format == "" { format = "20060102" } if isMulti { j := -1 for i := 0; i < n; i++ { yesTime := nTime.AddDate(0, 0, j) j-- logDay := yesTime.Format(format) rs = append(rs, logDay) } } else { yesTime := nTime.AddDate(0, 0, -1*n) logDay := yesTime...
1
790842b8534e5ab0b65b1a830c32a579
2638a236a4b83364c1e944258882772e
Set the margin that should appear at the right of the PDF document.
public class HexPDF extends PDDocument public void setRightMargin(float rightMargin) { this.rightMargin = rightMargin; setDimensions(); }
1
0ee553b36b668b9cf5abbbe5b63b3a6e
277d81510f6f11c039cd711dcda192f0
Retorna o caminho absoluto para um caminho relativo
def obtenerPathAbsoluto(pathRelativo): pathAbsolutoScript = os.path.dirname(__file__) pathAbsoluto = os.path.join(pathAbsolutoScript, pathRelativo) return pathAbsoluto
1
33fe87d2407f5ad6e1923c3a6fa85618
7d50d5395d1934bcd2342e3cf339b0e5
Reads all the npi number and npi org data fields from the NPPES file which was downloaded during the build process.
csv::Reader foo; string path = root_path + set_name + "_nfp.csv"; foo.read(path); while(foo.busy()) { if (foo.ready()) { auto row = foo.next_row(); Polygon nfp; vector<double> convex_status,bounds; TOOLS::load1DV...
0
09569bed2c9cb571a3b5ee04fc1e0e93
388de09858f49fc1ab685d27fb73a8ba
Lists available benchmarks.
def benchmarks_list() -> Iterable[Benchmark]: return BENCHMARKS
1
605dceb41f165b3979db2311ee6d725a
7fb699ed903cb08af0dc60a992ce69fe
Get the last run number
class TaskTracker public function LastRun() { $ConfigKey = $this->TaskConfigKey('LastRun'); return C($ConfigKey, self::EPOCH); }
1
08d0eb37312dd820924b9b40f20a4745
7ff84a88dfa616ec13dab74fc0526f63
从队列中取出并删除任务,在必要时阻塞
class TaskDispatch(object): def pop(self, queue): queue_task_id_dict = self._hgetall_task_id(queue) from random import choice handled_queue = [k for k, v in queue_task_id_dict.items() if _s(v) != self.PAUSE] task_id_choice = choice(handled_queue) if handled_queue else None if not...
0
b86a63c13d2dc46a4d29e4d361eb11f2
183f66e2ec18b9e5bb7a10589c342eae
Setter for title agency
class TransAgency: def set_company_name(self,company_name): self.company_name = company_name
0
60eae2bb3e9749993b4f7485eb222df1
e123a98b16e6e5755d13996151df25f7
Sets value for ComAdobeGraniteBundlesHcImplDavExBundleHealthCheckProperties.HcTags property.
@Fluent public final class MyWorkbookInner extends MyWorkbookResource public List<String> tagsPropertiesTags() { return this.innerProperties() == null ? null : this.innerProperties().tags(); }
0
051ca7f931f85227475637246b7c39d2
49dd1ec5f0900e7c2fc55cd4c3ca37fc
Generates a fingerprint based on a hash of the server id and base url to have some faith of uniqueness across real instances of JIRA. Server ID alone is insufficient since it could be the same in, say, both a test and production instance of JIRA if data was cloned.
{ return getClass().getName() + "-" + userName + "-" + serverProtocol + "-" + serverName + "-" + Integer.toString(serverPort) + "-" + serverUsername + "-" + serverPassword + "-" + authenticationServicePath + "-" + memberServicePath + "-" + ((serverHTTPSKeystore==null)?"":serverHTTPSKey...
0
57bee03ffb0d1e8ea4b8493e1d57e1d5
cbfca1f3bb3e1a4e2d40f2bb5ecd90a0
Apply the function to the elements within the given lists at corresponding indexes until one of the lists runs out.
export class List<T> public zip<U, TOut>( list: List<U>, result: (first: T, second: U) => TOut ): List<TOut> { return list.count() < this.count() ? list.select((x, y) => result(this.elementAt(y), x)) : this.select((x, y) => result(x, list.eleme...
1
d84f9067701f594eeafcdc47a1d5ce47
af6558266915b7a755aa3d129342d89b
将一个已经就绪的坐席设置为未就绪的状态 这个接口并不会重新分配坐席的现在的服务中的访客给其它坐席
Response setOutOfService(Request request);
1
f7a460c6249d446ae50852a9fd483a29
70a0c1187c8a2c0500890e3acc603b25
通过pat构建_dp O(M)
s = 0 m = len(pat) n = len(text) bpos = [0] * (m + 1) shift = [0] * (m + 1) preprocess_strong_suffix(shift, bpos, pat, m) preprocess_case2(shift, bpos, pat, m) while s <= n - m: j = m - 1 while j >= 0 and pat[j] == text[s + j]: j -= 1 if j < 0:...
0
47ed11ca2df87d3ff5325b4c73c384e4
ed3c4c2d08824006021b17878d49201a
Return document related SPDX tag-values
switch (license) { case 'None': return ""; break; case 'Apache-2.0': return "https://spdx.org/licenses/Apache-2.0.html" break; case 'GPL': return "https://spdx.org/licenses/GPL-3.0-or-later.html" break; case 'MIT': return "https://spdx.org/licenses/MIT.html" ...
1
fa40c444038c8a172c6a522bb08767a8
7c265f89caabb8073448cf7ca84108de
Write the weighted hypergraph in hMETIS format
class Polyhedron_base(Element): def write_cdd_Hrepresentation(self, filename): with open(filename, 'w') as f: f.write(self.cdd_Hrepresentation())
0
c2a9b4fc65b67b6d5d9c19c9d46889d5
49c0b4039f3f2b2f2cabd4bfb35ad5e8
初始化左右扩展装饰器,将其附着在控件外围
var nw = $("<div>", { class: "ui-rotatable-handle" }); var ne = nw.clone(); var se = nw.clone(); $('.box').resizable({ }); $('.box').rotatable({ }); $('.box div.ui-rotatable-handle').addClass("ui-rotatable-handle-sw"); nw.addCla...
0
cad2f2525345bbf02bd466ef02087e66
4122ac21d34d79808040ca8bf4c339c6
Returns a mocked rectangle.
final Bitmap bm = Bitmap.createBitmap(40, 40, Bitmap.Config.RGB_565); final Canvas c = new Canvas(bm); c.drawColor(Color.WHITE); final Paint p = new Paint(); p.setColor(Color.LTGRAY); c.drawRect(0, 0, 20, 20, p); c.drawRect(20, 20, 40, 40, p); return bm; ...
1
a9576690f800ea0e6396146caf480a83
572e385160c40371ff6c6fd7d3482013
Hämtar vilket språk denna specifika kompetens är på.
public String getCompetenceName();
0
704051731f1c99befaa5adb5e2b630ec
ac77d94f4e431dff946bc7ffe4462b27
POST: Comissions/Create
namespace MedicalDistributionSystem.Controllers public class CommissionController : Controller [HttpPost] public ActionResult Create(Commission commission) { ApiResult<Commission> result = new ApiResult<Commission>(); using (var db = new MDDbContext()) { ...
1
f4466011f21d40934045754d668c14ea
5e5c888b2e5bf2b7199ae06661a9c27d
将对象分别传入到两个线程里面
public class MultiThreadShareData public static void example1() { ShareData data = new ShareData(); new Thread(new IncrementRunnable(data)).start(); new Thread(new DecrementRunnable(data)).start(); }
1
9c6c21109ba2a07a17b1af3ccc9d1915
f750622adbca6052f01f97ff531176c6
转换分类名
function getCategoriesName($string = '') { $name = (isJson($string)) ? json_decode($string, true) : $string; if (is_array($name)) $name = implode($name, ','); return $name; }
1
5196b3f242d34a4a0ef6ba998e81efc1
212b92ba2079731240638e3b39d63c1a
Konstruktor dialogoveho okna pre vyplnenie parametrov pripojenia na robota
QDialog(parent), ui(new Ui::Dial_finder) { p_asm = asmm; p_thor = thor; for(int i=0; i<NB_CHAN; i++) { m_frontend[i] = *fe; fe++; } ui->setupUi(this); cnfg(); on_pushButton_Clear_clicked(); for(int i=0; i<NB_ASM; i++) { ock[i]->setToolTip(QString("Connection Status Asm %1").arg(i)); fli[i]->setToolTip...
1
91120ddc3c86f6a95c4c33e3d67b925c
319eefa4a5055504df53c878e4799afd
判断当前node是否已经入队
public class Code07_Dijkstra public static class NodeHeap{ private boolean inHeap(Node node){ return isEntered(node) && heapIndexMap.get(node) != -1; }
1
da6bf391058c195476e724cf8db3b924
24079979ce7781c39e8ed023fdcb56d3
Search for all maximal cliques in a NetworkX graph.
node_ids = [node.id for node in nodes] cliques = [] stack = [] nd = None disc_num = len(node_ids) search_node = (set(), set(node_ids), set(), nd, disc_num) stack.append(search_node) while len(stack): (c_compsub, c_candidates, c_not, c_nd, c_disc_num) = stack.pop() if not ...
1
584d16b8da135726614c9824c01ba120
d5197315adfb638bc298a4dc48888679
download the RVTD static GTFS file from their server
var url = "https://hamptontennis.org.uk/jcJSON.asp?id=2"; $.getJSON(url,function(data){ downloadDAT({ data: data, filename: "LegislativeData.dat" }); }); }
0
278bd6a336914124e10910ba4b4e34bc
dd0f3f9d1b5f86d49c0e4df4e4e9986b
Get the path of the reddit-get config. Returns: The path to the config file in use for reddit-get
def get_cfg_path(): return __cfg_path
1
a828e602f551334de99a9f662821c694
4719bcccbb13c0fafc65c21349ee3202
弹出栈中所有Activity,保留指定的Activity
public class ActManager public void pop(Class<?> cls) { for (Activity activity : mActivityStack) { if (activity.getClass().equals(cls)) { pop(activity); } } }
0
7bf04fbaf58c3069ab504c9b2ca7c8f5
9dd001f65f1f674d6d9ed1423f1e745d
Get the complete IRI
class IRI public function getPath() { return $this->path; }
0
4934e2d70d2c1c3a6b2a27bc8d7f5a29
5c162fce81947497917f792f4758b9e4
根据接收器的地址找到对应缓存
{ uint16 i; unican_buffer* free_buffer; free_buffer = NULL; if (state.is_online == UNICAN_ENABLED) { for (i=0; i < UNICAN_RX_BUFFERS_COUNT; i++) if (unican_rx_buffers[i].node != NULL) { if (unican_rx_buffers[i].node->value->unican_address_from == address_from) return &(unican...
1
feeb2c39213e2e81e33aa43a6dd6f581
e93d53f2443a7ece978ad05d1ba118cd
Remove backgrounds that have gone off-screen.
updateBackgroundEls(deltaTime, speed) { this.updateBackgroundEl( deltaTime, this.backgroundEls, BackgroundEl.config.MAX_BG_ELS, this.addBackgroundEl.bind(this), this.cloudFrequency); this.backgroundEls = this.backgroundEls.filter((obj) => !obj.remove); }
1
44cb810563542b3b3cda1940ebdefd88
fcbb51685aa4d825922eeb8d87c1b8d8
returns a list of directory names for the specified directory.
{ try { return Directory.GetDirectories(directoryPath); } catch (IOException ex) { throw ex; } }
1
0a0c593eb87099cae0ee22727825c698
5eca9d520e1e5704fb184db37660370f
获取标记发货所需的相关订单参数
$deliveryObj = app::get('ome')->model('delivery'); $orderObj = app::get('ome')->model('orders'); $markShowMethod = app::get('ome')->getConf('ome.order.mark'); $deliveryInfo = $deliveryObj->dump(array('delivery_bn'=>$delivery_bn), '*', array('delivery_order' => array('*'))); forea...
1
50277f9f30d3a01c1f6e0d50b68b5076
e481147770a451dcbe6d2509075bb7a7
Sets a Property Value in a thread context
public void SetPropertyValue(string propName, string propNamespace, string value, bool promote) { this.SetProperty<string>(propName, propNamespace, value, promote); }
0
b415f3324594abadeb266a257d15d9f4
e6db6c7a25c6fd45e0fb1ff7c8bf5433
Returns the icebreaker entry where uuid = &#63; and groupId = &#63; or returns <code>null</code> if it could not be found. Uses the finder cache.
public IcebreakerEntry findByUUID_G(String uuid, long groupId) throws NoSuchIcebreakerEntryException { IcebreakerEntry icebreakerEntry = fetchByUUID_G(uuid, groupId); if (icebreakerEntry == null) { StringBundler sb = new StringBundler(6); sb.append(_NO_SUCH_ENTITY_WITH_KEY); sb.append("uuid="); sb.ap...
0
ff1733b6890f7a9a5215371c920effb1
6148790b10454939933210d149f057e3
A flag to indicate that this entry has point symmetry
bool CommonAnalysis::IsAxisymmetric(void) { return np==AXI_SYM || np==AXISYMMETRIC_MPM; }
0
a8b1dbe0607ef32e4ad8c68ff46fa788
282d95d4b6f8b0205d126932348b13b9
0 means no reads
int CMD_read(int argc, char ** argv){ if(argc != 2){ UARTprintf(EUSCI_A0_BASE, "Incorrect number of arguments\n"); return -1; } if(atoi(argv[1]) == 1){ src = fopen(daq1, "r"); }else if(atoi(argv[1]) == 2){ src = fopen(daq2, "r"); }else if(atoi(argv[1]) == 3){ ...
0
b526a349a94a361fb56871c044f925fe
8f2ee550f297ddacabe79803880b4b3b
Evita que um usuário seja removido e continue logado
class User def active_for_authentication? super && !self.convidado? && self.ativo end
0
20ace3cb707cc621caf0057a5080def9
c1916bb687b28b4e1f8bb5101dc732c1
Lists all cScheduleTime models.
class ScheduleTimeController extends cController public function actionView($id) { return $this->render('view', [ 'model' => $this->findModel($id), ]); }
0
9acb6b915f1f7391d6fe0bd68c06c3bf
97d98137ed354b5881ba7095ea3c85d0
adapted from http://infopotato.com/blog/index/binary_search
int index = (minindex + maxindex) / 2; int cmp = strcmp(needle, haystack[index]); if (cmp == 0) return index; else if (cmp < 0) return (minindex >= index ? -1 : binsearch (needle, haystack, minindex, index-1)); else return (maxindex <= index ? -1 : binsearch (needle, haystack, index+1, maxind...
1
49506312e8f37e6b0505900e8b5699c7
dc04a045b6ccd3ba3e9a889e1b66df5e
获取行业的树型结构(全部数据)
class IndustryBusiness extends Business public function getIndustryTree($pid) { $output = array(); $list = $this->getIndustryList($pid); if($list){ foreach ($list as $k1 => $p) { $p['next']=$res=$this->getIndustryTree($p['ID']); $output[$k1]=$p; } } unset($list); return $output; }
1
3ff7ef1ddda2ec801b22e1a8dddbf23f
b20bb8a8926c1426b927b6c73c971774
Returns maximum sum in a subarray of size k.
int main() { int A[] = { 1, 2, -1, -3, -6, 4 }; int n = sizeof(A) / sizeof(A[0]); int k = 2; cout << maxProductSubarrayOfSizeK(A, n, k); return 0; }
0
082e65daf6a9d0e193af4704c42e23df
aac8c8bf4f028fdcd3c79833b9300114
Read database and store into key,value list
public class DBHelper extends SQLiteOpenHelper public HashMap dbRead() { SQLiteDatabase db; Cursor cursor; HashMap map = new HashMap(); db = this.getReadableDatabase(); cursor = db.rawQuery("select * from dictionary", null); for (int i = 0; cursor.moveToNext(); i++) { ...
1
2fcb041dc75fa54fc21889319fc0e95d
f8dc5c2cb316693997cb7714d4276141
Read an EEGLAB digitization file.
with open(fname, 'rb') as f: dat = f.read() a = np.frombuffer(dat, dtype=np.uint8).reshape(-1, 5) timesync = (a[:, 0] & 0x08) > 0 a = a[~timesync] intensity = (a[:, 0] & 0x20) > 0 a = a[~intensity] t = (((((a[:, 0] & 0x3).astype(np.uint32) << 7) | a[:, 1]) << 7) | a[:, 2]).cumsum(dty...
0
1b8e10585b789f54b8a7ba2ffaf7b578
661ce8435781f6fc4546ed9eda940107
Полный метод для генерации "магического" кода подтверждения по мобильному телефону.
{ $existsCodes = Activations::where('phone', $phone) ->where('completed', 0) ->get(); if (count($existsCodes) !== 0) { foreach ($existsCodes as $oActivation) { $oActivation->delete(); } } $oCodeService = new Code(); ...
1
6af7d50dd64960b11f772218f61de7e3
78ec1087a445633d1fb3734c81c7ad71
改变类型限制配置
Configuration config = getConfigPrivatedHead(typeBase.getPrivated()); Type type = config.getType(typeBase.getAppName()); type.setActive(String.valueOf(false)); type.setAllow(String.valueOf(false)); if(typeData == null ){ type.setDescription(typeBase.getAppDesc()); ...
1
50c2b73e4149b9a2e178b57ae8d7a941
3ef273297af3b86f10769961d67ec0d3
Kilépést kezelő gomb függvénye
{ BevetelFrm bevetelezes = new BevetelFrm(); if (bevetelezes.ShowDialog() == DialogResult.OK) { button39.Enabled = false; button39.Visible = false; } }
0
72c0320405778f501756b4df1f1a4386
1b3564cb1770910bb0b8f2e87337eb2f
判断一个Comment是否为IE的条件注释
if (!IdeVersion.isIde2019OrNewer) { return null } val element = psiFile.findElementAt(offset) return (element as? PsiComment)?.takeIf { it.owner != null } }
0
64e2b8a20f41d1b0c906aae991a1354a
56f0113934710736dc0f041ec7502f19
获取积分消费开关
const configData = await super.controller.common.getSystemConfig('rechargeSwitch'); return parseInt(configData.rechargeSwitch) === 1 ? true : false; }
0
bf5aca5f4dadf58c171a3f77afe5e691
18cfc5a0d42762133b7b5c108e90a36b
直接使程序崩溃 后续代码不执行
fn main() { panic!("Crash and Burn"); }
1
5d994978ef55ed1196ce63a351580aaa
de7f5b71d2ecc47c8d7989bf93adcef6
页面广告 - 支付宝同步通知页面
void alipayOrderNotice(HttpServletResponse response, HttpServletRequest request);
1
97a9087354a670b0f1b6e990b604bbe0
c1172aaaa19a299970819dcb6def9a87
获取照射剂量5(Gy)
public class Fangliaoxinxi extends BaseEntity public String getBingzaoshumu5() { return bingzaoshumu5; }
1
5768a83ea56b0a7246180b2cd2cdf0cd
f4d49c71f7d67dd58bfdb0606c683b14
完全背包,装满的排列数
public class Bag public void bag(int i, int cw, int[] item, int n, int w){ if (cw == w || i == n){ if (cw > maxW){ maxW = cw; } return; } bag(i + 1, cw, item, n, w); if (cw + item[i] <= w){ bag(i + 1, cw + item[i], item, n, ...
0
320de1801c5d9d60d3efcbf8d5c875fb
ff165f51b2031358aabffcb6ea93c05c
Closes the value file corresponding to the given GPIO.
class _GPIOPin: def __exit__(self, type, value, traceback): with open(_GPIO_DIR + "unexport", "w") as f: f.write(str(self._num))
0
2d3493165b149345b92bbff3bb225206
1921812215740f15bb7de109fb69bcb5
Returns value of 'slot' property
get slotName(): CanUndef<string> { return this.field.get('slotNameStore'); }
0
a1a2dec83ac0b83dba03cb9ad3f51171
e5f6dc3d32281ba13acf9cde0f3dad59
设置toolBar的PaddingHeight
public class SetToolBar public static void setToolBar(Toolbar mToolbar , Context context) { int statusBar = StatusBarHeight.getStaticBarHeight(context); mToolbar.setPadding(0, statusBar, 0, 20); }
1
692e38e4545446e0a3ab36361dea6799
b0da17aad0c2dbef7f1d1e2d337a4481
Возвращает объект коткретного жанра.
class Record public function getGenre() { return $this->genre; }
0
be78219c5a40f0e6f463e65d2181f798
eda58f69440d40d14f3a2cdc0617d1c4
Check that preexisting folders and files in the destination folder do not see their permissions modified.
sticky_parent = pjoin(self.dir, 'dir') path = pjoin(sticky_parent, 'dir') os.mkdir(sticky_parent) os.chmod(sticky_parent, 0o2755) pre_sticky_parent = os.stat(sticky_parent) assert osutils.ensure_dirs(path, mode=0o700) post_sticky_parent = os.stat(sticky_parent) ...
1
59f3c63539d7741df108e6d4c1175b6e
9e5f8bc167eb11b6a83b92f865183427
Setup all compiler/linker flags with are shared over all targets using the clang compiler for the "debug" configuration
class WindowsSettings: def getDebugCxxFlags(self): return [ '/RTC1', '/RTCc', '/MDd', '/Od', ]
0
31d959e3895f2de8d5cc5f405844210d
72fbda8667047c5a72fff37354bba271
Getter for <code>WETRN.V_OFFR_ALL_WITH_BEST_COST.OPSCP_SKU_OFFR_STRGTH_PCT</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VOffrAllWithBestCostRecord extends TableRecordImpl<VOffrAllWithBestCostRecord> public void setOPrflOffrStrgthPct(BigDecimal value)...
0
653dbdc1f457a8b1bcaf02f575ef8202
5c48124258d267a8681bce4a22b3b84a
Get the list of application agents that must be loaded into the login scenario's combo.
public class PublicEnvironmentConnection public Set<String> getAgents() { return e.getAgents(); }
1
c80d55f3f86a2d065a58b248577b8bc1
b3c8246ee5f49596d4fe824def48b343
byte数据转换为开关状态
val list = ArrayList<Int>() for (i in 0 until len) { list.add(Integer.parseInt(data, 16) shr i and 1) } return list }
1
927aa0234f326e175e9ad347bd8c85b1
39f1f775b553b1f94db18ab11bc7fb57
取染色体长度
public class Chromosome public long getChromosomeLength() { return chromosomeLength; }
1
5bd21bb2fbc054cb7ec17db115f26ece
5d806d3f5cc597065180d3f8aba7c41e
Close the slot
class View public function endSlot(): void { static::last($this->componentStack); $currentSlot = \array_pop( $this->slotStack[$this->currentComponent()] ); $this->slots[$this->currentComponent()] [$currentSlot] = \trim(\ob_get_clean()); }
1
21b673ba5f7b663d32c3568a86748d33
aeaed1821a384b8c5b0700ba9bb074c1
字符串转日期(只有小时和分钟)
if(str!=null) { Date date = new Date(Long.valueOf(str)); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm"); return format.format(date); } return ""; }
0
6dadf961920297228fc6496f80166190
a81345f49bd54e1e3af23bfb8b0a13f6
if the property exists but is commented, uncomment it so it can be found
matches = @code.scan(/;+\s*\\*/) if matches.size > 0 comment_variable_list(@code) elsif @code.gsub(/\n/, ' ') =~ /^([^\{]+\,)/ commented_code = comment_list(@code, "") commented_code.sub!(/^\s*/,@indent); select_first_field("#{commented_code}") else super ...
0
d8fd0ba6d06b73a90e51c98a1e185a6e
8ee0e41e42c41b7aad742ed4cda96bb0
! \brief MeasurementData::saveSelection saves current selection in \a filename.
void ImageProcessing::fileCurrentItemSelectionChanged(QListWidgetItem *current, QListWidgetItem *previous) { promptSaveLabelData(); }
0
1f48dc081c59ee4793b43ba21757b9d4
b08681a5cd88a9dcd2abaf96cb7c9d21
Display a listing of the files customers.
class CustomerController extends Controller public function index(Request $request) { }
0
0b98be84200255e8aff7e54aa53fe39e
a9a7cafa1bf4fc85baf40bfbf8850b41
初始化容器,包括签字面板的高宽,以及添加签字面板的事件监听
mTakePictureContainer = findViewById(R.id.take_picture_container); mCropContainer = findViewById(R.id.crop_container); mConfirmResultContainer = findViewById(R.id.confirm_result_container); mCameraView.getCameraControl().setPermissionCallback(permissionCallback); initParams(); ...
0
0c82315b81d4c8e899316edcc13f92a1
0002ed37dc08383c3a5b58e29483468d
body of the command is a list of command tuples
class TcInterface( superClass, Callback ): def FillCmdsFromList (self, cmdlist): self.__itemList = [] for cmd in cmdlist: if cmd[0] != '.': self.__itemList.append (BuildTC(cmd));
1
9d25b714eda8c65b35335e26cee59262
661673c7e1fb31bbd1943951e9604d02
Get a list of tags with the number of related posts.
class Tag extends ActiveRecordModel public function findWithCount($limit) { $query = <<<EOD SELECT id as tag, name, description, ((SELECT count(*) FROM ThreadTag WHERE tagId = tag)) as numberOfThreads FROM Tag ORDER BY numberOfThreads DESC LIMIT $limit; EOD; $this->db->connect(); $res = $thi...
1