query_id
string
corpus_id
string
query
string
code
string
label
int64
9868bbcc811dd69d04c2a461af942aea
fbc271bf947f7ab217818ba8eb9d06b7
通过函数名查找其在function_name中的id,并用bool返回其是否找到
int getfunc(char *func_name){ int i = 0; int found = 0; int out = -1; int a,b; while (i < func_table_top && !found){ if (strlen(func_table[i].func_id) == strlen(func_name)) found = (strncmp(func_table[i].func_id, func_name, strlen(func_name)) == 0); ++i; } if (found){ ...
0
26a90d3b40908b8b1bb89e1bdaa999e4
ba8204c4eb530793e8d711b6c2965b5e
Get the category row id parameter name.
public class SkierRowRecord implements IRecord @Override public int getParameter() { return skierId; }
0
c155d3ca260f46894044d9eda594582f
65c667e61b45ad463a5c0fe13b35048a
将proto数据写成对应名称模块,内容为解析proto数据返回builder对象
class PPM: def build_pb(self): parser = argparse.ArgumentParser( prog='ppm build_pb', description='编译pb文件', epilog='子命令build_pb可以用来编译.proto文件对应语言' ) parser.add_argument("-n", "--name", type=str, help="待编译的文件名") parser.add_argument("-d", "--dir", type=s...
0
fa8ac8bb346df555eaaeedc2c0722145
57cb309b2bcc227b81d5cffcb4227ce5
Get a blacklisted profile object.
{ global $app; if(!$this->checkPerm($session_id, 'mail_spamfilter_blacklist_get')) { $this->server->fault('permission_denied', 'You do not have the permissions to access this function.'); return false; } $app->uses('remoting_lib'); $app->remoting_lib->loadFormDef('../mail/form/spamfilter_blacklist.tfor...
1
84980196aa6a7af4d1570635e781b5d1
9151f024b857dccaa865115f49db7cff
在指定库中执行setNX命令并设置过期秒数
@Component @Configurable public class RedisUtils public Boolean setNX(final String key, Object value, long expireSeconds) { return setNX(RedisConstant.RedisDBType.REDIS_CONSTANTS_DB, key, value, expireSeconds); }
1
e0240bd8637addc28dfb55126ef8ae50
0dcc2997304b8599e22476f55be02ab2
[获取配置文件双层嵌套的key的value,针对value为BOOL的key] eg:{"key1":{"key2":true}} reply = fetch_key_key_value_str("key1", "key2") reply : true
if str(type(DICT)) != "<type 'dict'>": return DEFAULT key_top = string.splitfields(VKEYS, '.')[0] if not DICT.has_key(key_top): return DEFAULT key_bottom = '' key_index = string.find(VKEYS, '.') if key_index != -1: key_bottom = VKEYS[key_index+1:] if key_bottom == '':...
1
5f2e3ec098a20933e6b39c29ff17a2cb
5bcbbdca194a437310043ca08ee4c3ad
라즈베리파이를 종료시킨다.
namespace 끄투온라인_서버리스트 public partial class Form1 : Form private void button1_Click(object sender, EventArgs e) { Application.Exit(); Application.ExitThread(); Environment.Exit(0); }
0
56f4383481dccbcc83a1a8bbfbe497d6
57cc80e47742eeb0c4bd3a3ebeb9f9b6
构造查询退款结果的接口参数
if (result.size() > 0) { for (int i = 0; i < result.size(); i++) { Map<String, String> row = result.get(i); RefundResultInfoSchema schema = new RefundResultInfoSchema(); schema.setid(CommonUtil.getUUID()); String paySn = row.get("OrdId"); if (StringUtil.isNotEmpty(paySn)) { schema.setPaySn...
0
06c8c9f57b57f26be72621fe717ce4de
5b5b48dd02af61d1ae15389cd774e6ff
外发检定消息[可设置是否刷新数据及消息类型]
String content = ""; String dataExchangeId = "DJXX" + Long.toString(Calendar.getInstance().getTimeInMillis()); Interface iface2 = CommTest.getIface("DJXXCX", dataExchangeId, content); GlobalInfo globalInfo = iface2.getGlobalInfo(); globalInfo.setRequestCode("192.168.101.18:9998"); iface2.setGlobalInfo(globa...
0
72b569282a5593ad806f8e5a06e3801d
8d7cf4ec0d3050ca33015dfad2c33458
<p> Failure test for <code>setXMIWriter(XMIWriter writer)</code>. </p> <p> writer is null, IllegalArgumentException is expected. </p>
@SuppressWarnings("javadoc") public class GeoPackageTileStoreTest @Test(expected = IllegalArgumentException.class) public void geoPackageWriterIllegalArgumentException2() throws TileStoreException, SQLException, MimeTypeParseException { final File testFile = this.getRandomFile(8); try(final Geo...
0
ff5a441a0c48326754876d54696cf12d
5bc13bd757889c63be41c9439f0b1a33
从源字串中以指定字串头截取后半部分字串
namespace LT.Component.Utility public class Strings public static string GetSubString(string p_SrcString, int p_Length, string p_TailString) { return GetSubString(p_SrcString, 0, p_Length, p_TailString); }
0
767d825099e9676617f388587cd88885
c02f0a0d8c17a27081c1afad31e136ac
Find the earliest event to be scheduled
var nextEvent; for (var i = 0; i < occurrenceArray.length; i++) { var dateNow = new Date(); if (occurrenceArray[i].startDate > dateNow) { nextEvent = occurrenceArray[i]; break; } } return nextEvent; }
1
13c788bbc26918f030e84413b11ab775
4f626d1476a60034a0347425e0b888d7
This function finds the array of intervals without overlapping intervals
overlap = [] def is_subset(i1, i2): if i1[0] > i2[0] and i1[1] < i2[1]: return True else: return False for i in range(1, len(clst_list)): j = i - 1 o = [] if clst_list[i][0][1] != clst_list[j][0][1]: continue else: ...
0
120cfce9a2fa6847e43de93a206a573e
257d36d421c0ae11db5be61dabdf0467
Delete refund reason by ID.
namespace Himall.Application public class RefundApplication public static void DeleteRefundReason(long id) { _iRefundService.DeleteRefundReason(id); }
1
de4d1f6b04c2c143b413e2d8affdbbe0
55801e76b1829f0fe7b3b637567f38ea
Iterate inventory items.
class WareHouse: def __iter__(self): return (el for el in self.__rests.items())
1
98154fe27c401802657f08746e10da84
1ac28bda46ad05b6cead41206e0f716a
converts SomeStringLikeThis to some_string_like_this
pub fn ucamel_to_lsnake(txt:&str) -> String { let mut buf:String = String::new(); for c in txt.chars() { if buf.len() == 0 { for c2 in c.to_lowercase() { buf.push(c2); } } else if c.is_uppercase() { buf.push('_'); for c2 in c.to_lowercase() { buf.push(c2); } ...
1
7e6c1f301dbdb05b938180b1d9b2d24e
f925b3b29ba204d06c6fe764cca53c8b
Get already instantiated object.
class Dependency public static function &getObject($id) { if(!isset(self::$instanceArray[$id])) { self::$instanceArray[$id] = new self($id); } return self::$instanceArray[$id]; }
1
875a0749645e865d2ed27762aa154e77
78c9b4952aaf8fee02bec22133e4963b
计算TF/IDF归一化值的分母
{ double logtf = weights_logtf(tf, df, corpsize, docsize, docterms, vocsize); double idf = weights_idf(tf, df, corpsize, docsize, docterms, vocsize); return logtf * idf; }
0
9f1e8a20bf5b9ab5631b8e6a5fdabf53
88d485f0f23ef8272c2ff7fada80569b
重写paintEvent
void MainWindow::paintEvent(QPaintEvent *event) { QMainWindow::paintEvent(event); }
1
1558062c88cb21cce1ac3507373fc005
74b70bef01da8fab5522266fdb860fe4
Return the age in Saturn years
class Ui_MainWindow(QWidget): def luna(self, dat): return str(round((((QDate(2016, 10, 1).daysTo(dat)+1.7) % 29.53059 ) - ( 29.53059 / 16)) / ( 29.53059 / 8) ))
0
9501d90da5f4bc3f96a405a1de96a774
d28006b31867cf4ad363027021f656b7
exchange 2 random cols in keysquare
public class MainActivity extends AppCompatActivity private char[] mutateSudoku(char[] sudoku) { char[][] parts = new char[(int)Math.sqrt(FIELDSIZE)][FIELDSIZE*(int)Math.sqrt(FIELDSIZE)]; for (int i = 0; i < Math.sqrt(FIELDSIZE); ++i) { for (int j = 0; j < FIELDSIZE*(int)Math.sqrt(FIELDSIZE)...
0
ed9d509cc4aae19723a80f01cf07b18f
8739c41e2679dd89e4c199e228173acb
The core *oauth_signature* generating logic.
class HmacSha1Signature(Signature): def sign(self, consumer_secret: str, method: str, url: str, oauth_token_secret: str = None, **params) -> str: url, params = str(yarl.URL(url).with_query(sorted(params.items()))).split('?', 1) method = method.upper() signature = b"&".join(map(self._escape, (m...
1
dc8328c1a6d14b161209618867168e69
2efb678c3e7434fcafcb5a9c92f1fd37
Groupの所属人数データ更新
await this.knex.transaction(async (trx) => { const currentMemberCount = await trx("group_members").count("id as Total").where({ "groupid": groupId }).forUpdate('group_members', 'groups'); await trx('groups').update({ "membercount": currentMemberCount[0]["Total"] }).where({ "id": groupId ...
1
891ab3d64a1f61925ad67aebf84796d2
817efe749b000318fcb2f70b10f34a82
获取城市实时交通拥堵指数数据
String result = ""; BufferedReader in = null; try { String urlNameString = "http://api.lib360.net/open/pm2.5.json?city=" + cityName; URL realUrl = new URL(urlNameString); URLConnection connection = realUrl.openConnection(); connection.setRequestPro...
0
fe920492d68da425acff7d313eabd40d
51c450c59fe8d41395de19fa550f668c
Test that Twitter's API credentials are available in environment
class TestCredentials(unittest.TestCase): def test_environment(self): fn = os.path.basename(self.auth.creds_subdir) self.assertEqual(fn, os.environ['TWITTER'])
1
b0523cba9f5fb0a3c7e4fa9c73c053c8
7f3257ba841b0798ad5773b0bb02aa05
Determines whether this instance supports custom triggers (meaning user can add more triggers)
public abstract class BaseAction : MonoBehaviour public virtual bool IsSupportCustomTriggers() { return true; }
1
74ccc268d9aa54cbb0570bdd248e34ee
938f392d5601bf169e3fdaae8d8edca9
根据证件种类与号码 ,进行人员比对,复用
crewCheck({ commit }, data) { console.log('查验', data) return new Promise((resolve, reject) => { crewCheckApiCertificates(data).then( res => { if (res.data.length != 0) { resolve(res.data); ...
1
fbac77fc597683cedb85c47513f1f1cb
79da2cb556a993cf6cb2a45c28dc780e
Inicializa los campos de búsqueda
HistoricoPeatones.TipoDocumento.AdvancedSearch.SearchValue = HistoricoPeatones.GetAdvancedSearch("x_TipoDocumento"); HistoricoPeatones.Documento.AdvancedSearch.SearchValue = HistoricoPeatones.GetAdvancedSearch("x_Documento"); HistoricoPeatones.Nombre.AdvancedSearch.SearchValue = HistoricoPeatones.GetAdvancedSearc...
1
713085869a2dae9586cd54e641be7842
02bc223ae6c071e6d9e6ab0f76cd171a
Returns a collection of key value pairs representing settings used by Orchestrator web client.
namespace UiPathEJC.Service.Rest.Api ResponseDictionaryDto SettingsGetWebSettings ();
1
348eb9cf03febbd667774edf7fb5ecf4
541e90fdc76ea3105ee7534753bf7344
State Attributes: non-creatable, non-modifiable Possible values: <ul> <li> "initial" - Initializing, <li> "queued" - Queued, <li> "running" - Running, <li> "waiting" - Waiting For Another Job, <li> "pausing" - Entering Paused State, <li> "paused" - Paused, <li> "quitting" ...
@XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) public class JobInstance public State getState() { return state; }
1
05b659da474c578bce988c3c82feccf6
0221479508b735cd0fa26482ed3d61bd
Determines whether a range is contained by a specified multirange.
containsRange(sourceRange, targetRange) { return ranger.contains(sourceRange.min, targetRange.min, targetRange.max) && ranger.contains(sourceRange.max, targetRange.min, targetRange.max); }
0
64101d512fc8d002fa98a53c6e09e28b
647fb52303ebb8959b96b8302a28bc1b
Check integer division which is now a method call rather than the symbol "\".
class ArrayNumericExpression(ArrayExpression): def __truediv__(self, other): return self._bin_op_numeric("/", other, self._div_ret_type_f)
0
83495979c7a623559e83d50711a11fd4
ea2caf79b081ef75d20e0fa275ff7c1d
initialise weights for parameters, using their square root to push them out to 1
class TrainerDual: def weights_init3(self, m): if isinstance(m, torch.nn.Linear): m.weight.data.copy_(torch.diag(torch.ones(self.params.g_input_size)))
0
db2846de513ded8b3a1f570aa4d34d0f
1dd242348a410ded54aed87b4301a53c
Send Notification on Rotation Pkg Status Changed from Comp to NC
namespace CoreWeb.ClinicalRotation.Views public class RequirementItemDataPanelPresenter : Presenter<IRequirementItemDataPanel> public void SendNotificationOnRotationPkgStatusChangedFromCompToNC(Dictionary<String, Object> data) { Int32 tenantID = Convert.ToInt32(data.GetValue("tenantID")); ...
1
7e00bc3625892564b88b669ac7cee5b6
b6f12d6d1c61f6668a07371cceebc2fd
Конверсия UDP пакета DT контроллера Удаляет нулевые байты используемые контроллером после кажого символа и в конце строки
{ int8_t i=0,j=0,k=0,n,numberOfint16; char data[rDataDim]; n = rDataDim-1; numberOfint16 = (rDataDim-2)/5; while(rData[i]!='T') { i++; if(i>n) return HAL_ERROR; } while(rData[j]!='\n') { j++; if(j>n) return HAL_ERROR; } while(i<rDataDim) { data[k] = rData[i]; i++; k++; } while(j>-1...
0
975ae6acd27b3bedf3073b4ad469b468
755c138b9361d4bfbf167ae6c12b251a
根据流程定义的ID来返回流程图片的流
@Transactional public class ElecJBPMService public InputStream showProcessImage(String id) { RepositoryService repositoryService = processEngine.getRepositoryService(); ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionId(id) .uniqueResult(); String deploy...
1
80fe29313feb309b854941f7b5d88162
3d56ad46c0b4b66511d4d301a68303a5
Successfully update a node as a normal user
for user in [self.user2, self.user3]: with self.login(username=user.username): self.get( "fiction_outlines:arcnode_update", outline=self.o1.pk, arc=self.arc1.pk, arcnode=self.node_to_test.pk, ...
0
22140049de6c234ef3783189de3de690
bf84dbca1c6b52a4a5e00a6832debf88
update the cell's row and column span.
if nodememo is None: nodememo = set() if id(self) in nodememo: return nodememo.add(id(self)) for ded in self.deds: for sub in ded.ants: sub.adjust_spans(flen, fwlen, nodememo) try: self.i, self.j = flen - self.j, fle...
1
5697a9ff51be315e99f00c6239e2f478
f5c0d9af1f715e71a7d68233f4110b18
构造黑猫的函数
turtle.penup() turtle.goto(x, y) turtle.pendown() turtle.setheading(-30) turtle.begin_fill() a = 0.4 for i in range(120): if 0 <= i < 30 or 60 <= i < 90: a = a + 0.08 turtle.left(3) turtle.forward(a) else: a = a - 0....
0
425b63ce336899204e90645003a3fcee
721ed429614ded23fdb62b8fa66ff382
Attempts a "best guess" at the direction of the minecart. If the minecart is moving, it will return the correct direction, but if it's stopped, it will use the value stored in memory.
public class MMMinecart public CompassDirection getPreviousDirectionOfMotion() { return previousFacingDir; }
0
ea9053fe491c50202e1984b62e329f3c
f33e5cbeb5b65149a3d224f8c2f1a583
以日为周期进行校验
namespace KFrame bool KFDate::CheckLoopWeek( const KFTimeData* time_data, KFDate& last_date, KFDate& now_date ) { auto time_distance = now_date.GetTime() - last_date.GetTime(); if ( time_distance >= KFTimeEnum::OneWeekSecond ) { return true; } auto check_minute = ...
0
6b7f79cf3af5c17a0c10969bb812e07f
141ee8eb574e36eb18682a8dff8a76e5
Methode permettant de gérer l'appel ajax en fonction des différents choix de filtres
class FeedSyndicateAJAX public function ajax_controller() { $this->feed = filter_input(INPUT_POST, "feed"); $this->security(); $type = filter_input(INPUT_POST, "type"); $this->$type(); }
1
d61074c5bc11026a81e7d02cb9c7c933
fda1e1cd01f10a32dc941600e5a2de5d
Raw method for converting Observed (observer specific) -> Galactic coordinates
def convert_to_gal(ra, dec): coord = c.SkyCoord(ra, dec, frame=c.ICRS) gcoord = coord.galactic lon = gcoord.l.to(u.deg).value lat = gcoord.b.to(u.deg).value lon[lon > 180] -= 360.0 return lon, lat
1
105e7d65b1500ebfd00a94d2a7127f52
2d7339e19c4ad3cab7e7cb03b794d015
@brief Respond to the 'execute' request of OneNET OneNet LwM2M basic function,respond to the execute request of OneNET On error, return an error code.
const enum Enum_CommandCode CommandCode, const enum Enum_AnswerCode AnswerCode) { uint8 MonitorIdHigh8 = 0; uint8 MonitorIdLow8 = 0; uint8 MonitorContent = 0; uint8 p_RecDataBuff[64]; uint8 i = 0; uint8 report_flag = 0; switch (CommandCode) { case HOST_SET_SLAVE_NEED_ANSWER: if (EXECUTE_SUCCESS == Answ...
0
f9ee34940fce289d54fccce82a07df50
63bdd9d41b641147223c3dc0766b31fe
Print every Even character
public class EvenThread private static void printEvenNumbers() { for (int i=1;i<=10;i++) { if (i%2 == 0) { System.out.print(i + " "); } } }
0
aaaa7b2986721786d919614538f4ff57
82d2aa225bcc9f68c02f866582cceb75
添加获取游戏服务器ping值监听
Method startListenPing = P2PClient.class.getMethod("startListenPing"); pingListenChannel = new MultiProcess("UDPServerListener",this,startListenPing,null); pingListenChannel.setLoop(); pingListenChannel.start(); }
1
d1913a15432bb55536f4c4d97de07043
e2a29eb26b42203e1b54b3996cc237a9
Specifies whether an element with a printRepeatedValues attribute set to true should be redisplayed for every new page or column that is not an overflow from a previous page or column.
public abstract class XBasePageSheet extends FXmlObject implements XControlFace public Boolean getDispPrint(){ return _dispPrint; }
0
f4942c993f37faf6f8748a59b47c6464
4b986fc142ee1803e4e36fac61c75980
AAutomatedShootingEntity.setAI() Replaces the current ai with a new one
if ai != 0 ai.restart @event.add_new_achievement_event(ai.achievement.id) if @event end end
0
4e35c95ae158c8956fbf0834e98ea47b
aa4b7e914cd85dfd97341b4358b5ecfe
Launch the order generation of active agreements.
class SoapAgreement: def index(self, account_number: int) -> None: self._builder.add("fun", "o_mdb_api_map_main") self._builder.add("dogid", {"is": account_number})
0
37207511c6908bde63092f1ef967a9d4
e185d8e5479ef90ff6ea6f61df3fe854
Seuraa jotakin peliobjektia Y- eli pystysuunnassa.
public partial class LegendOfPallo : PhysicsGame private void PaineaaltoOsuuPeliolioon(IPhysicsObject olio, Vector shokki) { Peliolio p = olio as Peliolio; if (p == null) { return; } p.OtaOsumaa(5); }
0
47c7a10299ff6f9709f1af4eb7ecadbf
995a7686dbf07c2bd9416eed40f4a2bb
Returns the current User's PeerId
export class Network implements Interface async getHostID(): Promise<PeerId> { return this.client.getHostID() }
1
d638f8a5a2b9d2a28a54c2e73300764c
57401fd32c6b0b235c0d4b3439d3cb25
Can we parse input, create an optimiser instance, and run the tasks?
class TestWaterTutorial(ForceBalanceTestCase): def runTest(self): self.logger.debug("\nSetting input file to 'very_simple.in'\n") input_file='very_simple.in' self.logger.debug("Parsing inputs...\n") options, tgt_opts = parse_inputs(input_file) self.logger.debug("options:\n%s\n\nt...
1
61533857b4543fedbaba6bb641582af7
8283fef32015918b5486d71c41fd58e0
判断目标地址和参考地址的距离是否在误差范围内
s = self._getDistance(p_address_dict_a['纬度'], p_address_dict_a['经度'], p_address_dict_b['纬度'], p_address_dict_b['经度']) real_distance = s * 1000 rst = real_distance <= 200 return rst, real_distance
1
efd8b0a1aa23ff4fdfeeceb5f368b429
fdc32e7959dddb5f7645832257beea61
Try to discover and decode the wireserver endpoint in the specified dhcp leases path.
class DefaultOSUtil(object): def get_endpoint_from_leases_path(pathglob): endpoint = None HEADER_LEASE = "lease" HEADER_OPTION_245 = "option unknown-245" HEADER_EXPIRE = "expire" FOOTER_LEASE = "}" FORMAT_DATETIME = "%Y/%m/%d %H:%M:%S" option_245_re = re.compile( ...
1
c2ba73e09120cffe7be76f780ad47bcf
8d8d95b8f469956ee2f4b4b28e4687a3
GET: api/DetallePedido
namespace WebApiGestionAlmacenCam.Controllers.Procesos.Movil [EnableCors("*", "*", "*")] public class TblFacPedidosDetController : ApiController public IQueryable<Tbl_Fac_Pedidos_Det> GetTbl_Fac_Pedidos_Det() { return db.Tbl_Fac_Pedidos_Det; }
1
66c2e2d2431456700e366b104e39877a
f68847d98127a1dad48a202bb9ad1771
Edita la informacion de un estudiante de la base de datos
{ $estudiante_id = $this->session_data['usuario_id']; if($this->acceso(132)&&$this->privado($estudiante_id)){ $usuario_id = $this->session_data['usuario_id']; if($estudiante_id == $usuario_id){ $data['estudiante'] = $this->Estudiante_model->get_esteestudiante($est...
1
b0d3b09d598b4cc36c79274276d2614a
3a4a50629a3b331614c078b273840080
默认当前时间的时间选择器
function TimePicker(options) { this.options = options || {}; this.hour = ['00', '01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23']; this.minute = ['00', '30']; this.week = ['日', '一', '二', '三', '四', '五'...
0
d6b7cd0f5947bb9322dc303659f5d50b
98bfccec8a2221478f780d6192b84b65
7) Найти сумму всех четных и сумму всех нечетных элементов массива
namespace SimpleTasks class Tasks public void Task7() { int[] mass = { 5, 1, 6, 43, 3, 7, 34 }; int result = 0; for (int i = 0; i < mass.Length; i++) { if (i % 2 != 0 || i == 0) { result += mass[i]; ...
0
7aad3a5f30ad480f62c765f9ff17489e
caf0f5134d7c7cf8c8157e70c347902c
Recherche du minimal adjacent
int min = i; for ( int j = i; j < a.length; j++ ) { if ( a[j].distOrigine() <= a[min].distOrigine() ) min = j; } return min; }
0
af8634a015a3b9c82921950b136f07af
8987892415efa5176d7599e571ff6089
function to calculate accuracy of our kNN model.
global list correct=0 for i in range(len(list)): if(list[i][2]==classifier[i]): correct=correct+1 print("Total samples ",len(list)) print("Percentage of correct classification ",(correct/len(list)*100))
1
970fa5d1248562daa96d3ed0069bc8c7
dc3a55a0defa3f2aef8467cdc2e1e5eb
Delete a tag for a replenishmentPlan. (asynchronously) Deletes an existing replenishmentPlan tag using the specified data.
namespace Infoplus.Api public partial class FulfillmentPlanApi : IFulfillmentPlanApi public async System.Threading.Tasks.Task DeleteFulfillmentPlanTagAsync (int? fulfillmentPlanId, string fulfillmentPlanTag) { await DeleteFulfillmentPlanTagAsyncWithHttpInfo(fulfillmentPlanId, fulfillmentPlanTag...
1
0e8fbf14289dd3774b9a7ed3691b5faf
b0855dc247096eda13de81eede43d5fd
FindLabel returns a label matching given key
if labelKey == "" { return labels } newLabels := map[string]string{} for key, value := range labels { newLabels[key] = value } delete(newLabels, labelKey) return newLabels }
0
953ee01c89edd99eb6ceb9d98f490416
93d7a770c2784e1c02f480d170fd6a05
! Constructs a QFSFileEngine.
: mSLEngineObject ( NULL ) , mSLEngineEngine ( NULL ) , mLogFile ( NULL ) { }
0
ef6110b0e08fd98637e6e1a89042e1e8
19b4698f64c8cf90e379770a8ecb110a
UnsafeFirst returns the first substring of the length n. The behaviour of this function is not defined when asking for a substring longer than the input string.
if len(s) == 0 || length <= 0 { return "" } if length >= len(s) { return s } return s[0:length] }
1
e04a095d4e202cf378770d43647f13f6
56c04c2e39b8145c4d2db76b6367e2cb
Создает бомбу с передачей собственных координат и с заданным направлением удара
namespace Miner Bullet RangeAttack(ShootDirection direction, int damage);
0
6244b6d15a421d960f5242b842286a58
64de7e37cd6c860e7759754286b7efd3
Find all using directive<br/> And try to load the namespace as assembly<br/> 寻找源代码中的所有using指令<br/> 并尝试加载命名空间对应的程序集<br/>
namespace CSharpParser.ProjectModel public sealed class CompilationUnit: ICompilationErrorHandler private void ResolveUsingDirectives(SourceFile file, NamespaceFragment nsFragment) { if (file == null) throw new ArgumentNullException("file"); ITypeDeclarationScope scope = file.NamespaceScope(nsFragment...
1
09dfea15473e90d82cc585bdfc8e5902
3584038639d94942d63ef0d7c4667fc2
初始化一级菜单选中的ID
const that = this; if (id > 0) { that.basicDatabase.basicOptionThreeId = id - 1; } if (id === 870) { that.basicDatabase.basicOptionThreeId = 3 } if (id) { that.basicDatabase.basicDatabaseValue.threeId = that.basicDatabase.basicOption[2]...
0
1728a217e15bbbc10478301f5daadf06
e733c0e5f88f7155fe5d4959bc0bb77b
Get task category system default association counts.
export class WorkbenchWidgetApi getAssociativeTypes(taskGraphUri: string, itemUri: string) { return this._dataSourcesWithTaskAndItemUri( "getAssociativeTypes", taskGraphUri, itemUri ); }
0
1aacca5412de2e6f1ed83bb93b0efe74
c6a080ff357aad33cc30045f7da568a9
Keydown event for dropdown list municipality
{ if (e.KeyCode.Equals(Keys.Down) && lbNom.SelectedIndex + 1 < lbNom.Items.Count) lbNom.SetSelected(lbNom.SelectedIndex + 1, true); if (e.KeyCode.Equals(Keys.Up) && lbNom.SelectedIndex - 1 >= 0) lbNom.SetSelected(lbNom.SelectedIndex - 1, true); ...
1
c1801d26fadb0b1cd408dbbc2436cfb9
24f4394eebec9b9b77f91edbfbacd7b6
This example pings a destination.
server_address = "83.170.85.222" result = os.system("ping -c 1 {}".format(server_address)) assert result == 0
1
8e875e6c23f34264e8f0a9d4dde08162
005ec0cd7695b6d263aa15a0848c82c8
重试同步任务,部分可恢复报错情况下,可通过该接口重试同步任务,可通过查询同步任务信息接口DescribeSyncJobs,获取操作后状态。
public class IefClient public RetryBatchJobResponse retryBatchJob(RetryBatchJobRequest request) { return hcClient.syncInvokeHttp(request, IefMeta.retryBatchJob); }
1
1aee10315f8ba20612d666f4c22eccd5
2ac7b98f0d4b4d86ec4c33d24a79b0f5
Matches social security in the following format xxx-xx-xxxx where x is a number
def grab_ssn(string) return string.match(/\d\d\d-\d\d-\d\d\d\d/).to_s end
1
0825e8e40f29b51c9d392680d9c26569
fa9520ca0e8974d6645b2f07604a19c2
Returns the value of the '<em><b>Receipts</b></em>' reference list. The list contents are of type {@link CIM.IEC61968.PaymentMetering.Receipt}. It is bidirectional and its opposite is '{@link CIM.IEC61968.PaymentMetering.Receipt#getCashierShift <em>Cashier Shift</em>}'. <!-- begin-user-doc --> <p> If the meaning of the...
public double getTotalReceipts();
0
50ebfd2924c5703513620a0bd7ec6701
a20b3349d226d9abd0a92b6894a7b779
解析保存的资源数据
let scene = _loadSceneNames[_loadIndex]; let loadContent: any = e.data.response; if (!_isReleased) { if (e.data.type != "js" && e.data.type != "css") { res[scene][_currentConfig[_loadIndex][0].id] = loadContent; if (_currentConfig[_loadIndex][0].id == ...
1
e85390c94e18e51d6da5aff727b3a185
7c27cff95848b03651eb7dc732e24add
Initializes DataPoint List Control.
super().__init__(parent, root_frame) self.identifier = 'datapoints' self.styling_name = 'Data Points' self.styling_icon = wx.Bitmap('resources/toolbar/dataset.bmp') self._gbs_main = wx.GridBagSizer(0, 0) self._gbs_main.SetFlexibleDirection(wx.BOTH) self._gbs_main....
1
63fc14832a8f31348e9ee9f1ca553c8a
5a37c69d28e0a970ca1eb72d9e92bbef
結束模型,這裡會自動管理數據庫連接
namespace data_picker.form public partial class frm_main : Form private void frm_main_FormClosed(object sender, FormClosedEventArgs e) { data_picker.db.db_busniess_helper.end_connect(); }
1
c72921c9780bb3f057494437259d384e
99b140d3dff90d639fe2a17fb3ab6a65
Copy to another Probe instance. Note: device_channel_indices is not copied and electrode_ids is not copied
class MainWidget(QMainWindow): def copy(self, hub, device, **kwargs): dest_object = self.replicator_main.new_device(device=device[1], port=device[0], hub=hub, hub_coordinates=device[2], source_mdsums=self.source_object.source_mdsums) progress_callback = kwargs.get('progress_callback') ...
1
6892d644306360a0f386ae782498f7e0
e6196f5f8b207d2bd1c397133e35e2e9
Saves the finalized merged dataframe to specified or default output file.
mtr_paytax, mtr_inctax): if output_dump: outdf = self.dump_output(dump_varset, mtr_inctax, mtr_paytax) column_order = sorted(outdf.columns) else: outdf = self.minimal_output() column_order = outdf.columns assert len(outdf....
1
40b23c2d6b66e879edcedcd7ae402fee
0779f3586bc8ea18f1a24bdbb0c65bc7
Get all animation groups
namespace SpriterDotNet public abstract class Animator<TSprite, TSound> public IEnumerable<string> GetAnimations() { return Animations.Keys; }
1
5d5939d689da52b2f0454ad8aee70a1a
1b8ac5a48164735a6f5e4c0227928d7d
Replace commas with points
function remplacePoint(element) { element.value = element.value.replace(/./g, ','); }
0
0119bdd63eb147dc5b74f7fe02d29d17
a05b861c9e9e380aaa31cf0ee7c31de3
Load the update form with the selected incident details and set the displayed view on the update incident view
fetch(incidentURLs.incidents + '/' + this.props.id) .then((response) => response.json()) .then((responseJson) => { this.formatData(responseJson); }).catch((err) => { console.error(err); }); }
1
3e54999d38b15e7561e4cb297ea44cb8
8434641a9dc4f5e0fdc7de168f9f5c43
Creates a new Commodity model. If creation is successful, the browser will be redirected to the 'view' page.
class CommodityController extends Controller public function create() { if (auth()->user()->hasPermission('add_commodities') === false) { return redirect('/home')->with('danger', 'You don\'t have permissions'); } return view('commodity.create', compact('roles')); }
0
d283d5ef45be8a4a536cd62f1e27959e
d26014ce781306ce4a05fb0bfb569e03
Saves Final information for course date
{ QFile disciplinesFile(path); QString courseDisciplinesLine; try { CheckIfOpenFile(disciplinesFile, path); } catch (exception &ex) { QMessageBox::critical(window,"IT Private school: File error",ex.what()); return; } disciplinesFile.close(); disciplinesFile.op...
1
51b066e019af84dd718ca82eb12e8d2c
223bee96ade7366166e47789b03f5fa2
その式の終わりまで読み飛ばします。<br/> カンマでも式の終わりと判断することに注意しなければなりません。
public class VarStatementParser implements IStatementParser public static int skipExpression(char[] script, int begin, int end) throws ExpException { int idx = begin; while (idx < end) { char ch = script[idx]; if (ch == '{' || ch == '(' || ch == '[') idx = Express...
1
fe8b0f85b960f6ae1112d14558a35c38
9537ae535dc98710ec53182cfc1f2ae4
For unpickling a pickled report.
s = None with open(os.path.join(rptfile), 'r') as f: s = json.load(f) return dict_to_report(s)
0
c9a91dade45516b676b29234af7e8475
5f6943c65596aecb82d94ff9521e4952
检测是否包含图片
function checkHtmlImg(htmlStr) { var reg = /<img[^>]+>/g; var testvalue=reg.test(htmlStr); return testvalue; }
1
32cf9a3b5ffd78fc031c6a789d08660f
2536e6d5bb3934630454d258300b5b32
Generate a MySQL Alter Table syntax for the given Schema comparison
class InformixPlatform extends AbstractPlatform public function getAlterTableSQL(TableDiff $diff) { $sql = array(); $columnSql = array(); $queryParts = array(); foreach ( $diff->addedColumns as $column ) { if ( $this->onSchemaAlterTableAddColumn($column, $diff, $columnSql...
0
62f8a8e20d03835fb846c1e03058cccb
83e2149c7b938de7a8db32ae97452901
嵌入式
{ uint8_t state = 0; int a, b; bsp_int_init(); bsp_imx6u_clk_init(); bsp_clk_enable(); bsp_delay_init(); bsp_led_init(); bsp_beep_init(); bsp_exit_int_init(); bsp_uart_init(); while (1) { printf("输入两个整数,使用空格隔开:"); scanf("%d %d", &a, &b); ...
1
a5668805bf1b17c9c71143e073803c05
5b33d2540d6415945b8959d68f6a7bf1
Test case for getMeasurements Get measurements for this user.
export class MeasurementService getMeasurementsByUser(userId: number) { let header = new HttpHeaders() .set('userId', `${userId}`); return this.http.get<Measurement[]>( `${environment.apiUrl}/Measurements/?${MyLib.getTokenString()}`, {headers: header}); }
1
11f82c6130ec92a5077b36687e8ed8f2
a52f3e5efa099b952f91d9b6e5bfebb9
Generates a configuration defined in the supplied HOCON (Human-Optimized Config Object Notation) string.
hash = if yaml = YAML.load_file(path) yaml.to_hash else {} end configuration_class.new(hash).tap do |config| config.path = path end end
0
afa9a80dfe93cfbf14efdf128d0f3300
5aa8adb088e36a063a5cfb953f05d89d
This will re-init the cached schedulers on the next usage, which can be useful in testing.
interface Dispatcher<in ACTION : Action> fun resetSchedulerProvider() { schedulerProvider = createDefaultSchedulerProvider() }
1
44f156813f88fcd382a9045734eea00a
8069e36c9b7da42b279fc62ab1fe807e
вычленяем из байтов доменное имя
func ParseDomainName(domain string) ([]byte,error) { var ( err error buffer bytes.Buffer segments []string = strings.Split(domain, ".") ) for _, seg := range segments { err=binary.Write(&buffer, binary.BigEndian, byte(len(seg))) err=binary.Write(&buffer, binary.BigEndian, []byte(seg)) } err=binary.Writ...
0
ee8809d7e315d552c0cb9f969eae0d8f
76ad72567165cff037d0d483446a5c0d
Releaes the baton and removes its file.
class FACTFinder_Core_Model_Export_Semaphore public function release() { @unlink($this->getLockFileName()); }
1
caa3a3b96d7ca716c48b7cb05ca8d95a
e26323b288731036fdeff2da2ceb2b0e
Funkcija koja zahteva od korisnika da unese broj indexa studenta a zatim ispisuje informacije o tom studentu ili poruku u slucaju da nema studenta sa zadatim indexom.
bool foundStudent = false; int indexToEdit = 0; string command; for (int i = 0; i < students.size(); i++) { if (students[i].usfId == usfId) { foundStudent = true; indexToEdit = i; } } if (foundStudent == false) { cout << endl; cout << "ERROR: student you wish to edit was not found.\n"; } else { ...
0
05afc706f08afcda7b496d0f2e4f07ed
3ce5ea34fe5b1c1ebe5c3e3f2bb81900
Sets the KPI Id <p>
@XmlRootElement(name = "IncentivePlanList") @XmlAccessorType(XmlAccessType.FIELD) public class IncentivePlanList public void setIpId(String ipId) { this.ipId = ipId; }
0
6e7d1c447a4300052520f5c812fe1a53
28df0583c7f04d425bbdc797574395a5
@brief Device mode state callback. Registers a callback routine that is notified when the device mode changes.
void callback_devicestatusset_delayed(void *data) { if (data != NULL) { int *device_id = data; if (s_callback_devicestatusset != NULL) s_callback_devicestatusset(*device_id); free(data); } }
0
a8804daad54f75a2492b1e9cd6215ddc
87edcfa0f26ea6474c79022b55139183
从target数组中随机去一个,并删除,将此值作为target值传给对象
function randomOrder(targetArray) { var arrayLength = targetArray.length; var tempArray1 = new Array(); for (var i = 0; i < arrayLength; i++) { tempArray1[i] = i } var tempArray2 = new Array(); for (var i = 0; i < arrayLength; i++) { tempArray2[i] ...
0
24e8f2ba6d75187328c876061e9c7dfb
61d695463fca8cae440bcfe7207d4288
根据groupId获取GroupUser对象
public List<GroupUser> getGroupUserByGroupId(String groupId);
1
bdb28104df3e6c98e8d088b9a8c2e3f6
1aab6a6bc33cca9236656e551d21ff39
Deletes all the reminders in the db
namespace Orleans.SqlUtils internal class RelationalOrleansQueries internal Task DeleteReminderRowsAsync(string serviceId) { return ExecuteAsync(dbStoredQueries.DeleteReminderRowsKey, command => new DbStoredQueries.Columns(command) {ServiceId = serviceId}); }
1
8e7fab0f2c30d04a113c479d395e06b8
7168b184444ec7a561cbda110ace7ea3
Calls the API to log the user out and returns the user to the login page
export class SessionService logoutUser(): Observable<any> { return this.http.post(this.LOGOUT_URL, null, getHeaders()); }
1