query_id
string
corpus_id
string
query
string
code
string
label
int64
c1ea8f3fc25eab4222717be66e535b05
e36c0f427162a7cece85a4a8868514ee
Writes attributes of AllowedTokensType complex type
@SuppressWarnings("javadoc") public class XMLStreamBindings extends AbstractXMLStreamBindings public void writeAllowedValuesTypeAttributes(XMLStreamWriter writer, AllowedValues bean) throws XMLStreamException { this.writeAbstractSWETypeAttributes(writer, bean); }
0
89e6343de62e47c9ed2f4a1f13f00bdb
743d7279723125eb5cd8f74ec5d38cce
描述:卸载资源 参数:无 返回值:返回0.
def AAPIUnLoad(): return 0
1
0755b1390f29ad3e5b1b30514ff0508f
ee984dc04452e4344cc68161d5d52129
今日应付商家金额
rootState }) { return http(api.getDueAmount, { merchantId: rootState.root.storeId }) }
1
6f3c59fa1fe781514318ea2ce237e972
6a42bd58cc00c4b8f1e0ffddab6f37d8
Get raw ethereum transaction.
public class CryptoCurrencyRPC public String getRawTransaction(String txid) throws CryptoCurrencyRpcException { JsonObject jsonObj = callAPIMethod(APICalls.GET_RAW_TRANSACTION, txid); cryptoCurrencyRpcExceptionHandler.checkException(jsonObj); return jsonObj.get("result").getAsString(); }
1
2272809c840c2846e927d08f03d06960
ef1c127eb5408fc16ff61f25d2d990a9
Account Balance validation for AccountType Savings.
class SavingsAccount(Account): def check_savings(self, rate=interest_rate): savings = super(SavingsAccount, self).balance * rate super(SavingsAccount, self).json_dict["Savings"] = savings return savings
0
2715d1ed5144fcbb342c7690bb3ffea3
fe107f97dca0686a03b18f9ae5cfbf8c
1ms tick, scans input & updates current state
_input.update(dt); if (!_back) { if (_input.didReset()) { reset(); } if (_input.didExit()) { _rootnode->shutdown(); } if (_input.didPause() && !_failed && !_complete) { togglePause(); } if (!_paused) { if (!_failed && !_complete) { if (_input.didDebug()) { setDebug(!isDebug()); } if ...
1
9e2e99c12aa2a388ba520fe4aa15b99d
6d4fd5970dc95b0fb23a79d0f87e837e
Creates items for completing database table names
class Learndash_Admin_Data_Upgrades_Rename_WPProQuiz_Tables extends Learndash_Admin_Data_Upgrades protected function query_items( ) { $process_tables = array(); $this->build_tables_lists(); foreach( $this->settings['prefixes'] as $prefix_key => $prefix ) { if ( ( isset( $this->tables_lists[ $prefix ] ) ...
1
9e8f7505968a66600f9f6067069a6fc2
a6810bec23a0d055b37f1a4d724240dd
Gets the value of the acct property. possible object is {@link AccountIdentification4Choice }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LimitSearchCriteria2", propOrder = { "sysId", "bilLmtCtrPtyId", "dfltLmtTp", "curLmtTp", "acctOwnr", "acctId" }) public class LimitSearchCriteria2 public LimitSearchCriteria2 setAcctId(AccountIdentification1Choice value) { this.acctI...
0
e6bc797295a59c8347f0332f27391913
ccf3e3dd5a3afcdeef92dc1e4610293f
find the perimeter of circle, triangle, and rectangle
let perimeterOf = length + width +length + width; return perimeterOf; }
0
cd6f4e3c1581523dc7bbe96865df6bdb
ddd8846b2afc1776ea8902d5b10c40d1
Encodes the bytes in the given byte-string according to the base 32 encoding exposed by Zooko O'Whielacronx (http://philzimmermann.com/docs/human-oriented-base-32-encoding.txt). This implementation will always encode full bytes (analog to the base 32 encoding described in RFC 4648), which is one possible proceeding men...
def encode(_bytes: bytes): fill = 0 if len(_bytes) % 3 != 0: fill = (3 - len(_bytes) % 3) _bytes += b'\x00' * fill _base = b'' for i in range(0, len(_bytes), 3): binary = hex2bin(_bytes[i:i + 3].hex()) for j in range(0, len(binary), 6): _base += alpdic[bin...
0
560501bb9962f761002fb8a8124c4b84
50f70c38a24ea8a1d99e1a5de6571abc
功能:根据机种名获得机种的备注信息
namespace GreeManagementSystem.Dao class SalesOrderDao //客户订单完全操作类 public object GetRemarks(string inputType) { SQLiteConnection con = new SQLiteConnection("Data Source=SQL/Gree.db;"); con.Open(); string TypeNumberSQL = "SELECT machineTypeRemarks " + ...
1
d0ec8e96e51bb7adc3c7ef23298a8c23
454246fbfb7561bca502720b9c8a9c4d
Get the full set catalog from dynamoDB.
let resp = await dynamodb.scan(req).promise(); const results = unwrapScanOutput(resp); while (resp.LastEvaluatedKey) { req.ExclusiveStartKey = resp.LastEvaluatedKey; resp = await dynamodb.scan(req).promise(); results.push(...unwrapScanOutput(resp)); } return results; }
1
ac49fb7f5a1e1131fd6e9d50d17db8d2
ed478d7bf78a7b7178a0fb8dcafb88c6
Delete existing dataset by ID and return success.
{ try { dao.deleteDataSet(dataset.getDataSetCode()); dao.commit(); } catch (Exception ex) { dao.rollback(); return createErrorStatus(ex); } return Status.OK; }
1
a92b581c9c33c57373febd32545e5e42
e1b07c6fa8e17c9f56ceff4312201093
Gets the index of last non gap symbol.
{ if (Count > 0) { return IndexOfNonGap(0); } return -1; }
0
8c6722beb2905a1afb28479381ef7398
e79f80d4f7fe97d81f88223ebb76b963
判断微信是否登陆
class WeChatServer public function isLogin() { return $this->wechat instanceof WeChat; }
1
8884a3ac207becbd544830e63ef727a4
1bab78701453b0a8dc19ff22d59b5603
indicate DMA completed by clearing the transfer count
void DMA_Callback(dma_handle_t *handle, void *param) { g_Transfer_Done = true; }
0
6d3f2511202748400aee86ea49751602
7b1649fe380878f60e6fd9566a9be3ae
Start the JS coverage.
namespace PuppeteerSharp.PageCoverage Task StartJSCoverageAsync(CoverageStartOptions options = null);
1
83f789f792145007af1ebff3e7903d63
ca649dfe2b984dbffc8b02ca1fe0d548
使用这个函数之后,选择器切换到孩子的选择器,后续的链式操作只对孩子生效
namespace Less.Html public partial class Query : IEnumerable<Element> public Query parent() { var parent = this.Copy(); parent.Selector.ExtFilterList.Add(selected => selected.Select(i => i.parentNode).GetElements()); return parent; }
0
067596e5ccc7d507cb1614596d589573
349f9db20f4a6b8abbd58bc7230494f9
We can accept two forms of temperature: -- a numeric variable -- a list of numerics of length one --> [float(T)] -- a list of numerics of length three -->[float(t0),float(t1),int(N_t)]
if value is None: self._T_i = np.repeat(self._T_e, self._number_of_particles) return if value.size == 1: self._T_i = np.repeat(value, self._number_of_particles) elif value.size == self._number_of_particles: self._T_i = value else: ...
0
830c8a47f9858541f88b480c519e1054
22a48132e5c5e5d795b199a2322a6b77
通过博客ID获取博客评论,无分页
List<Comments> getCommentsByBlogsId(Integer blogsId);
1
1819ca103ced6e46cd3dab4fa02757e2
5491d3ba9b55bbcaaaef259d36d4aeb1
方法1 递归
if(n==1){ return 1; }else if(n>1){ return recursion(n-1)*n; }else{ throw new RuntimeException("输入了负数"); } }
1
916d8d3a78fa87fc4631e15cf42e4f96
9964f0ec5412e71f521781d809cdf821
Controls the Quit Screen
public class ButtonManager : MonoBehaviour public void ExitGame(bool Quit){ if (Quit) { Time.timeScale = 1; SceneManager.LoadScene ("Menu Screen"); } }
0
d0c8308ffc536dd9e1322e9fd2e8f1ab
0316dad91211cc07ca09f2b1133981b0
Gets all events that a single user is attending
export class EventService getUserEvents(uid:string) { return this.http.get(Path[0]+"/getuserevents?uid="+uid) .map(res => res.json()); }
1
a3f8be33c361fd3a8fe7b8accb83315d
199b22ec8aa2ac2098f84d0ec010845e
获取20位的独特Id
public class IdUtils public static String get24Id() { return get32Id().substring(0, 24); }
0
03f67546fa862bb36d13c6a1b4fc9be3
b109e9abc11a1b3ef0b654395541f2f7
非 root 登入不顯示root於列表
{ List<PEdit_Display> roots_dis = new List<PEdit_Display>(); foreach (var item in rootlist) { PEdit_Display tl = new PEdit_Display(); tl.name = item; try { tl.type = (from x in prot_treeobj where x.name == item select x.type).ElementAt(0); } catch { tl.type = ""; } ...
0
5867bc31f0046ac1fc89666fd0104c1e
3877d48c6290e4d6783f42abeb70171a
Handles the CellDoubleClick event of the AccountsGridView control.
{ var row = e.Row as LogRow; if (row != null) { if (!this.suspendRemoteSync && this.isRemoteConnection) { } else { this.offlineEditAccounts.Add(row.AccountId); ...
0
55435908aaa015d1348c8f341ed9fcc5
0258f173ed3aaaf8cf144b9524e5cc42
Gets tags for each post and displays them for the respective posts
$colors=array('F99','C9C','F96','6CC','6C9','37A7FF','A1D666','E6CC6E'); $posttags = get_the_tags(); if ($posttags) { $tagoutput = ""; foreach($posttags as $tag) { $tag_link = get_tag_link($tag->term_id); $color=$colors[dechex(rand(0,7))]; $tagoutput .= '<a class="colortags" style="background-color:#'...
1
aa9dfa9267a7f519a63abc7c4b9b23b6
b682917fd18a4a8df26951061b13f87e
Returns Home Page with Survey title and instructions.
def survey_home(): satisfaction = surveys["satisfaction"] return render_template("root.html", title = satisfaction.title, instruction = satisfaction.instructions)
1
ec85fa82ca15bcc586f07b5d917f4573
0f0739e264bdd72f0995ce6721f5b28f
根据名字获取 openGL 函数。
void_ptr_t glx::load_glx_function( char_cptr_t name ) { return (void *)glXGetProcAddress( (GLubyte const *)name) ; }
1
4da9f134e60eb9f73c54306bfd25a046
4e78945a49d0420bf3f71822b4721ce9
Returns list of available Register types
def get_supported_type(): from yggdrasil.metaschema.datatypes import get_registered_types return list(get_registered_types().keys())
1
ee35699fcc4ff339536e5594cf23ddba
c7c694c25427b8764044af31f529d18f
If type, body, file, and line attributes are the same they are equal.
return ( self.filename, self.lineno, self.charno, self.tool, self.message_id, self.message, self.message_id, ) == ( other.filename, other.lineno, other.charno, other.tool, ...
0
87b6dbee625dec66bf1c4c4bf494a36f
218b0830574a2ada33f1ee365ebc5a01
Different applications may require different classes to handle identity management. This allows the app to configure itself for its auth requirements.
public function setIdentityFactory(IdentityFactoryInterface $identityFactory);
1
9e72e6f931adf291b89c89cd04e390ac
244576140d2f2b3cc421bbab26943abc
预处理OledbCommand
namespace FYYK.DBUtility public abstract class OracleHelper1 private static void PrepareCommand(OracleCommand command, OracleConnection connection, OracleTransaction trans, CommandType cmdType, string cmdText, OracleParameter[] commandParameters) { if (connection.State != ConnectionState.Open) ...
0
c354a4764ad7e55689ae904e90076c03
6ae16679e767755135f23f3eb19d8268
处理文件中的音轨信息,整理成一个字典
def read_track(filename=PN.IFILE0): lines, status = file2lines(filename) dict_track = {} for line in lines: ifile, arrow, ffile = line.split() dict_track[ifile] = ffile return dict_track, (filename,status)
1
160130ccc20c1a1a73400a966a3037b7
6aeca4edead5b605aa9a4136b56d7260
This is a function that returns the wordCount of a specific location that is called upon.
int wordCount = 1; FILE *openFile; char c, currWord[120]; if( access( file, F_OK ) == 0 ) { openFile = fopen(file, "r"); while((c= fgetc(openFile)) != EOF){ while (fscanf(openFile, "%s", currWord) == 1) { wordCount++; } } if(wordCount == 0){ }else{ wordC...
1
8e34caf6e4efb46f59d2abaa921b5e8c
5808fea7157eafd03147ce503b855404
查询低消任务总数
class TaskService extends BaseService public static function find_blacklist_count($search) { return TaskBlacklist::find_blacklist_count($search); }
0
76ff4b72852e14d3961eeca7667bdbe2
19c3d702c1e4e96d0f33e44bc4bfc3fb
< Visitor that prints executable code.
{ var toPrint = 0; var sb = new StringBuilder(); if (node[0] is Label) { sb.Append("\t" + GenerateLabel() + ":"); toPrint++; } for (int i = toPrint; i < node.NodeChildrenCount(); i++) { ...
1
6851414dfcb1f234ed05dec17a19cebf
fbc19ae5faabba609f955a43390cbf85
display boking form for admin to add the booking request.
class Student extends MY_Controller function book_request($param1 = "", $param2 = "") { if ($this->session->userdata('student_login') != 1) { $this->session->set_userdata('last_page', current_url()); redirect(base_url(), 'refresh'); } if ($param1 == "create") ...
0
36ea454721d2eef6c0710a166fca8ba8
8385cd3d353f8685475bff8db4c2bb16
Gets the starting time of an animation.
namespace Animancer.Editor public class TimelineGUI : IDisposable public static float GetStartTime(float normalizedStartTime, float speed, float duration) { if (float.IsNaN(normalizedStartTime)) { return speed < 0 ? duration : 0; } else ...
1
7a87fb0d8683920fb2ffea655dd688ec
3d6cae5cebec3eebd8b9bcc042b4ba87
Make the agent move along the path and avoid the obstacles
public abstract class Agent : MonoBehaviour public void Move() { if (this.path == null || this.currentPathIndex >= this.path.Count || this.currentPathIndex < 0) return; Node pathNode = this.path[this.currentPathIndex]; Vector3 moveVector = new Vector3(this.transform.position.x - ...
0
23f6982fc5ac1f18e1da6cfbde954239
f008ee2bfd3b5946a23b38b664840e66
Splits this glyph using the given split token. 'splitBy' - Split token (e.g. a space or line break) 'result' (out) - The vector where the split segments are stored.
int pos1, pos2; pos2 = source.find(split); pos1 = 0; while (pos2 != string::npos) { res.push_back(source.substr(pos1, pos2 - pos1)); pos1 = pos2 + split.size(); pos2 = source.find(split, pos1); } if (pos1 != source.length()) { res.push_back(source.substr(pos1)); } }
1
c7630d22003edf5e00b8fa76cdbf97b2
a2f877a0e19acbd2959b673620c31a9d
列出和搜索客户组
{ if ($_REQUEST["c"]) { if (!$this->group_form($this->db, $_REQUEST["c"])) { return false; } } else { if (!$this->display_group_list($this->db)) { return false; } } $this->display_page(); }
1
60a9d83c25d719a4933dbeed49eca5a8
49de49dbbe2fbb644166132818dc11f8
Sobrescrita do operador "<" para que o método "sort" ordene conforme as especificações do TP;
bool Jogada_t::operator < (const Jogada_t &arg) const { return this->getAlpha() < arg.getAlpha(); }
1
d8e5037730c89759d3e553a8e8226462
ccddebcc53ce2f72da00974df6635c7a
Deletes a stream configuration between provider and consumer.
class LiveClient(AbstractClient): def DeletePullStreamConfig(self, request): try: params = request._serialize() headers = request.headers body = self.call("DeletePullStreamConfig", params, headers=headers) response = json.loads(body) model = models.Del...
1
aa4a2f1eda085bbccf22e29ca1028779
becc9817287fab6a20b602b04ee905a1
上麦操作,设置用户身份为主播
const that = this; const confereeId = store.get('main.confereeId'); const media = this.data.media || []; if (confereeId && parseInt(confereeId) === parseInt(uid)) { const _media = that.data.media; if (isMute) { that.data.client.muteLocal('audio', () => { utils.showToast({ t...
0
d89cb59c55bb4e9badba8397e4be3d89
f18317533b5b14494169b7947a151ac1
Constructor defining default values of the object
VYCH_1::VYCH_1() { x = 0.5; }
1
29c35250114d9c567490775ea25b857f
5351235e571a74a92a76a8bd9543c410
Decodes the audio binary stream using the external MP3 library into the array of audio samples, which plays through the available audio device.
AAudioStream *stream, void *userData, void *audioData, int32_t numFrames) { (void) userData; int32_t numSamples = AAudioStream_getChannelCount(stream) * numFrames; aaudio_format_t format = AAudioStream_getFormat(stream); char *pPath = (char *)userData; void *pTempBuf...
0
9da87ab723e84251158d9c954989e658
257d9bf16fe05e0d8573debe216f14e2
generic polynomial to convert georeferenced lat/lon to char's x/y
{ POINT pos; PIC_CHARS *pc=&grp->pc; int i,y; if (!pc->height) return; for (i=0; i<2; i++) { if (pc->ypos_tbl[i]) free(pc->ypos_tbl[i]); pc->ypos_tbl[i]=malloc(pc->height*sizeof(float)); } for (y=0; y<pc->height; y++) { xy2lonlat(1024,y,pc,&pos); pc->ypos_tbl[0][y]=R2D(pos.lon); p...
0
80d7dc37909ae50b9e606b102395e484
cf6063f757a1f429c26c9016887e2c6f
Returns an array where each cell is a list of remaining possible patterns.
public int[][] computePossible(Board board) { int[][] xPattern = diagonalMoves(board, this); int[][] plusPattern = straightMoves(board, this); int[][] moves = new int[xPattern.length + plusPattern.length][2]; System.arraycopy(xPattern, 0, moves, 0, xPattern.length); System.ar...
0
2a137c094d46d07ecb74646e7bec11ac
8bb2c388795ccf517267fe3655daa036
Reset toàn bộ option đã lựa chọn về mặc định
{ cblOption1.Clear(); cblOption2.Clear(); cblOption3.Clear(); cblOption4.Clear(); rblOption1.SelectedValue = 1; rblOption2.SelectedValue = 1; rblOption3.SelectedValue = 1; rblOption4.SelectedValue = 1; }
1
2bc42eda48a7e545901f9a5515c66338
8613e27875059f6d87f9e84036a944ec
Отображение всех книг
class BooksController extends Controller public function index() { $search_text = ''; $books = []; Log::info('User '.Auth::user()->doc_id.' went to /book'); return view ('book.index', compact('books', 'search_text')); }
0
bdddb9736e1bec181736999290b459fa
ee210a67b6f3e9db4c84f31d67cd1b44
根据积温计算生长周期
@Service @Transactional public class CropsGrowthPeriodService extends BaseServiceImpl<CropsGrowthPeriodParam,CropsGrowthPeriod,Integer> implements ICropsGrowthPeriodService @Override public ResultMessage findGrowthPeriodList(CropsGrowthPeriodParam cropsGrowthPeriodParam) { ResultMessage res = Result...
0
82804f71d88e0b6c131ba5b0a564a7a3
70380828b858b32c20768f2e6b30d5b7
获取系统中的密码复杂策略 功能描述: 获取系统中的密码复杂策略, 返回一端密码验证的正则表达式
public PasswordConfVO queryPasswordConf();
1
06eb104706d1b3cec983d66d4cae9a9a
f38aa95698c9b246136d376ce206d76c
Perfect forwarding
{ std::cout << "\nx = " << x << ", y = " << std::forward<decltype(y)>(y); }
1
83dc37c650f0e283cf809a4f5e3b3123
7db5264cf9c77653369365657f24bb10
Prepare related pages list Формируем список похожих страниц
{ $grid = new GridConnector($this->connection); $grid->enable_log($this->connectorLog,true); $grid->dynamic_loading(20); function before_render($item) { if ($item->get_index()%2) $color = '#E7EDEF'; else $color = '#FFFFFF'; $item->set_row_color($color); } $grid->event->attach('beforeRender...
1
eb7b0aef18f6d1b0a5986280f093e4fd
3744e694baf257ac42fc81ea451e879a
Start a refresh on the dataset by replacing a specified percentage of the images with images from the physical database.
namespace MyCaffe.basecode bool StartAutomaticRefreshSchedule(int nDsID, bool bTraining, bool bTesting, int nPeriodInMs, double dfReplacementPct);
1
41ab4eca958d8b2d0748761684c008ea
65794fcbbb9d045d1ad59300a518cc50
他のmodelと紐づいていない会社は削除できる
{ $employ = Employ::where('company_id', $id)->get()->count(); $supplier = Supplier::where('company_id', $id)->get()->count(); $client = Client::where('company_id', $id)->get()->count(); $company = Company::findOrFail($id); if ($company->company_parent_id) { sessio...
1
3c4ca93f7ca1b7635812f6247d0583f5
aeae5ddd2f2f7e4bd7a34a62fa4d81df
Test attempts exceeded
class AccessAttemptTest(TestCase): def test_login_max_with_more_attempts(self, existing_username=False): for i in range(0, FAILURE_LIMIT): response = self._login(existing_username=existing_username) self.assertIn(LOGIN_FORM_KEY, response.content) for i in range(0, random.randrang...
1
9b8b4237aeb4b211296d59edb990f82f
d3d9b5923a7a66a13f5ed9885965bd5f
devolver el conjunto de fechas de un fixture
torneo = Tournament.objects.get(name='Copa Argentina',complex=Complex.objects.get(name='Oxigeno')) fixture = Fixture.objects.create(name='Copa Argentina', date='2015-11-16', tournament=torneo) fix = Fixture.objects.filter(date='2015-11-16').distinct() self.assertTrue(fix>=0)
0
fc0b69494571e369666cd77a592f296d
3755184f1c7a3893f25d816e99d620c2
Log Provider Configuration
class Module implements ConfigProviderInterface public function getConfig() { return [ 'service_manager' => [ 'abstract_factories' => [ 'Developer\MongoLog\Factory\AbstractLoggerFactory' ] ], 'mongo_logs' => [ 'loggers' => [ ] ] ]; }
1
363c7fb6da4b18a556af9223c877b31a
f26e6e9ef3cca0c6c889f11d65541918
Process a transact2 request. The transact2 can contain many different sub-requests.
message, err := mc.ParserMessage(&msg.Data, &msg.Dataplus, msg.MsgID) if err != nil { fmt.Println(err) return } if err := message.ParserContent(); err != nil { fmt.Println(err) return } mc.ResponseWait(mc.CLASS_getTransaction, message.Body.Hash.B58String(), message.Body.Content) }
0
f577094f3ecd334e15526121f2c29d7d
109dc2761d7c788e0eb02399e6d0a237
创建的图是否支持跨可用区(AZ),默认值是false,如果设置为true,系统将会把图中的ECS建在两个可用区中。 如果创建图时,不加该参数,则会将图中的ECS都建在一个可用区中。
public class CreatePostPaidInstanceRequest extends AbstractModel{ public Boolean getMultiZoneFlag() { return this.MultiZoneFlag; }
1
6d228e8ece052a525b693ab391869d2b
4c5113cf1ed04d91383fbaabbd3a1e0e
Get dictionary of figure arguments depending on the plot type.
args = self._get_plot_args(plotno, **kwargs) if not 'ls' in args: args['ls'] = self._get_default_ls(plotno)[:-1] if not 'dashes' in args: dashes = self._get_dashes_for_ls(args['ls']) if dashes is not None: args['dashes'] = dashes if not 'color' in args: ...
1
689432c09e3b3d49df608b0e1d453a37
cbfaffd226688f86deee14cf5f31987a
Retrieves result from estimate model
if model_type == "fat_st_ted": return self._outputs["result"] else: raise ValueError("Wrong model type.")
1
9c24789cf4d307b57426d05f338f332b
fe05c922b619eaf57743a41129bfbbe3
根据店铺id和结算月查询账户本月的订单详情(订单收入明细、订单退货退款支出明细、调账明细等)
namespace BLL.gigade.Dao public class VendorAccountMonthDao : IVendorAccountMonthImplDao public List<VendorAccountDetailQuery> GetVendorAccountMonthDetailList(VendorAccountDetailQuery store, out int totalCount) { StringBuilder sql = new StringBuilder(); StringBuilder sqlfrom = new St...
1
0d467f230d45545c2ae5a466537812d8
92405d49c1a0a9fdf0aea04f3dd0ba6b
更新已分配QQ号段信息 以及 存储 已分配号段信息
@Controller @RequestMapping("/roleController") public class RoleController extends BaseController @RequestMapping(params = "updateGwqx") @ResponseBody public AjaxJson updateGwqx(String gw,String qx) throws Exception { QMap map = new QMap("gw",gw,"qx",null); AjaxJson j = new AjaxJson(); try{ this.roleService.d...
0
03c48f792e9d11bbd152cc0ba8c20bac
a03c84826528300b1a5714521af000fd
Filter music tracks with each field containing the given query.
if (mCurrentState != State.INITIALIZED) { return Collections.emptyList(); } ArrayList<MediaMetadataCompat> result = new ArrayList<>(); for (MediaMetadataCompat metaDate : mLocalMusics.values()) { if (metaDate.getString(metadataField).contains(query)) { ...
0
a5eae09c087c83eeb7a4ff021b46c151
875498018aa9ff7868e51f8e443849fa
Gibt zurück, ob der gegebene Matrizenausdruck eine Einheitsmatrix ist.
export class iMath isIdentityMatrix(matrix: number[][]): boolean { if (this.isEmpty(matrix)) { return false; } let height: number = matrix.length; let width: number = matrix[0].length; for (let h = 0; h < height; h++) { for (let w = 0; w < width; w++) { ...
1
69a5429e2c44c8767b9e4176ab1cd1b0
2398acf132c808368571ea7144a9b869
保存孕妇档案
@ResponseBody public String saveBaby(HttpServletRequest request, Baby baby, MultipartFile headPortrait) { HttpSession session = request.getSession(); if (headPortrait != null) { String fileName = FileUtil.uploadFile(request, headPortrait, "images/babyIcons"); baby.setBabyIcon(fileName); } int babyId = (...
0
eac2164d682aad75b5e4d025af16fde3
81d826f6bbbbd4e2856aca3e24584fe1
Dựa vào kết quả trả về để đưa ra thông báo
protected void onActivityResult(int requestCode, int resultCode, Intent data) { if(resultCode == RESULT_OK){ if(resultCode == REQUEST_CHOOSE_PHOTO){ try { Uri imageUri = data.getData(); InputStream is = getContentResolver().openInputStream(...
0
0f781445b90f750e6b881207c0efb29c
1b09732f4b22f2ab11108f4ff7941c11
Set P0.0 as output
void Port_Init() { P1MDOUT |= 0x01; }
0
bf05a34e1aa33f00b8613608e55a85f0
947e22529d359ff69be60c91021f8e11
Compare the retrieved properties with the validating properties supplied by the caller.
static ICalErrorCode propertiesValid(List *properties, char **validProperties, int size) { ListIterator iterator = createIterator(properties); Property *property = NULL; while ((property = nextElement(&iterator)) != NULL) { if (validateProperty(property) == OTHER_ERROR) { return OTHER_ERROR; } bool isValid ...
1
b347ed501e287af48a11b4abe3878e62
199b3cdefeff196e83072b5ec349f70c
Returns size of page table
int ptable_size(struct ptable_t *ptable) { if(ptable->isOpen) { return table_size(ptable->table); } return 0; }
1
2d49332952174ad566510aa831ece5ef
958ee5c8949952c5d378940a0a25cee0
Called by the connection if it cannot re-establish the connection. All services are deleted
static void gapProcessEncryptionFailure(gatt_client_connection_t *connection) { if(connection) { uint16 cid = connection->cid; gattClientRemoveServices(connection); gattClientRemove(cid); GattManagerDisconnectRequest(cid); } }
1
94fc964d2d84ef1b98c5b61b9ab2dca2
c923102e2e644b72c07e354b40044d93
Extract fields values from a View form. Fields beginning with is_ are casted to boolean
{ $data = $form->getData(); $values = array( 'value' => NULL, 'class' => NULL, ); if (array_key_exists('autocomplete_field', $data) && is_object($data['autocomplete_field'])) { $reflectionClass = new \ReflectionClass($data['autocomplete_field']); $values = array( 'v...
0
3bb248c6cb1c3bd31c74315d678bb730
58f47411e4df8697d06f0057a2dd747c
加载资源组,带加载完成回调
this.groupName = groupName; this.callBack = callBack; this.thisObject = thisObject; if (RES.isGroupLoaded(this.groupName)) { this.loadCallBack(); return; } RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onGroupComplete, this); ...
1
8251e0fa673c990e68a4146f0c7d09cd
29038e22b33f739a7cb691bfeea85af6
Records access to a file by changing its modification time. <p> Recording access is also a form of locking against concurrent deletion by the clearing mechanism.
@ThreadSafe abstract class ResourceKey<K> extends AtomicReference<Status> implements Linked<ResourceKey<K>> abstract void setAccessTime(long accessTimeNanos);
0
a4a4dd1f9aab3b62f9f4f0e128aff767
cc5090578407650bb3b0eaa395915c70
Checks if point is inside the rectangle (including borders)
namespace CrabGui Bool Rect::isInRect(const Point& ptPos) { return (x1 <= ptPos.x && ptPos.x < x2 && y1 <= ptPos.y && ptPos.y < y2); }
0
3a77ce4f5197152967347d4c21ba2046
8bcbab86f43efc2b5969d5e72b62f3e1
Returns the class that needs to be assigned to an element.
static ElementClass EXPORT elGetClassIndex(Element *element) { return element->getClassIndex(); }
0
a17e8b44457f0cb43db9d00f7a6bebe0
69686fe493621b7f2c01d87c78366086
获取知识点分页
const { id: chapterKnowledgeId } = data; const { schoolId, gradeId, classId, subjectId } = this; try { let { resultObject: { knowledgeSpreadList: knowledgePeriodList, knowledgeSectionList: knowledgeSectionList } } = await this.getKnowledgeSection({ sch...
0
f7150419b07059d682d30fc0a8e0f755
44283a9a383a2d4ffb654038effb820b
Initialize HTML for the plot
self.__figure = plt.figure() self.__canvas = FigureCanvas(self.__figure) self.__toolbar = NavigationToolbar(self.__canvas, self) self.__ui.plotLayout.addWidget(self.__toolbar) self.__ui.plotLayout.addWidget(self.__canvas)
0
19057f4b1659fdda2a5d111727f3ed55
0c66ec2f526b8c2184fed47135b5c1ca
Returns true if the path is in the directory.
class Hydra_FileSystem_Directory extends Hydra_FileSystem public static function isDir($path) { $realpath = realpath($path); return is_dir($realpath); }
0
19b0cfeca4567b40008442cd204a05a1
cf28dcaf41c5c4d526301f270d7dfa54
校验申请人是否重复提交了相同类型,相同内容的工单
$MisHrLeaveEmployeeModel=D('MisHrLeaveEmployee'); $MisHrLeaveEmployeeResult=$MisHrLeaveEmployeeModel->where("status=1 and employeeid=".$_POST['employeeid'])->count(); if($MisHrLeaveEmployeeResult>1){ $this->error("请不要重复提交离职申请单!"); } if($_POST['oldleavetype']){ if($_POST['oldleavetype'] == 3 || $_POST['o...
0
2e51e9de4327939c1e8060b579b4bc0a
b046f7d4f141341cd051535fa8f6c293
Test case for get_all_ancestor_types # noqa: E501
class TestAssetTypesApi(unittest.TestCase): def test_find_parent_types(self): pass
0
305585c54d3a8bc8a450ce84207bb07c
8801048ba8699b4a15291665533ed310
获取该NPC上可接的所有任务
namespace xc [wxb.Hotfix] public class TaskHelper public static bool GetNpcRelatedTasks(NpcPlayer npcPlayer, out List<Task> needDoTasks, out List<Task> needAcceptAndSubmitTasks) { uint sceneId = SceneHelp.Instance.CurSceneID; List<Task> allTask = TaskManager.Instance.AllTasks; ...
1
2dbf093cc07dede351518ae148170642
4ec540113b6c2bd99e6001af7a35f4e9
Custom argparse "type" for epsilon.
super().__init__(*args) self._parser_kwargs.update({ 'type': str, 'required': False, 'default': None }) self._parser_kwargs.update(kwargs)
0
035bd3667e09c303679f4361c955bb87
cfc38ae066abcc4e10c72ad9182f9ab9
更新缺陷类型
public void updateMaintainPlan(MaintainPlan maintainPlan,List<String> maintainTypes) throws Exception { EqCheckbox checkbox = new EqCheckbox(); checkbox.setOrderDetailGuid(maintainPlan.getMaintainPlanId()); List<EqCheckbox> list = searchList(checkbox); for (EqCheckbox eqCheckbox2 : list) { deleteInfo(eqChec...
0
fd41479be40d94067d637a2a802f8846
fd4a872100157e33f4c658a93333f354
与えたコンテンツがYouTubeのiframeの埋め込みリンクを含むかどうかを判定する
String link = findLinkInText(videoComment.getSnippet().getTextDisplay()); if(link.equals("")) return false; boolean isRedirected = isRedirected(link); return isRedirected; }
0
dd5c22ebaaee2954d20ff2ecf163d44e
7a964f64259a8d363bc6b756e0eefd76
The xml configuration generator when state is deleted
{ $config=$this->hasRequestParameter('config')?$this->getRequestParameter('config'):false; if($config) { $config=json_decode($config); $content=get_object_vars($config->content); unset($config->content); $config->content[$config->layoutItem]=$content; unset($content); $afPortalStateObj=afPortal...
0
bbc7f29e23cf86a308b82ef42410ec74
6220a6f5a61ca7a74d2190f6712d46e6
Fetch the item's "anchor" option.
class BlockContact extends \FrontendBundle\Entity\Blocks\BlockContact implements \Doctrine\ORM\Proxy\Proxy public function getAnchor() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getAnchor', []); return parent::getAnchor(); }
1
7da7b86331209e1dc4d8b5090ccdaadd
99e4bcdc82639550bd756ac62b83536f
<include file='Windows.xml' path='doc/member[@name="Windows.CreateMutexA"]/*' />
namespace Vanara.PInvoke public static partial class Kernel32 [DllImport(Lib.Kernel32, SetLastError = true, CharSet = CharSet.Auto)] [PInvokeData("WinBase.h", MSDNShortId = "ms684315")] public static extern IntPtr OpenMutex(uint dwDesiredAccess, [MarshalAs(UnmanagedType.Bool)] bool bInheritHandle, string lpName);
0
f9f04abcb53666952222060c73b7d195
2340715e52b390b2b81bd0f2a0888dbd
Добавляет запись в базу, если прокси прошел проверку и не имеет дублей в базе. Возвращает кол-во затронутых строк
public function insertIgnore(array $values): bool;
0
a779c8d14e55c823df73d179fd1a56d7
6d2a1533e99bea291b5a6d81c25517d6
compute wave frequency using dispersion relationship
def wave(freq): return constants.c/freq
0
359ab04499635e3c66e312a990f90b52
1cfe7b5220c40b4ab5029e7965f5258f
final array element contains NULL
if (is_array($array)) { $this->is_null = false; foreach($array as $key => $v) { if ($v != null) { $this->is_null = true; } } return $this->is_null; } else { return false; } }
0
b428f52e55782faa5e522850b1288286
5597a86e884fb505214907d678848a21
Test the reading and writing of 64-bit unsigned integers
a := uint8(5) b := uint16(10) c := uint32(20) d := uint64(40) buf := new(bytes.Buffer) if err := WriteUint8(buf, a); err != nil { t.Fatal(err) } if err := WriteUint16(buf, binary.LittleEndian, b); err != nil { t.Fatal(err) } if err := WriteUint32(buf, binary.LittleEndian, c); err != nil { t.Fatal(err) ...
1
49dbd232804e0156c1d2aa8f387315e8
99f0da437e03703e97e6cc85f95064ec
Tests if the current Melange application is running locally.
class Application extends Container public function isLocal() { return $this['env'] == 'local'; }
1
d0ed085d07ac856a2d6f369e334fbb81
9fb64145a44db76c2f2ff1728db2a5dd
Cleans an instance name and returns an instance or raises a ValidationError if one doesn't exist for the given name.
if not "name" in validated_data: raise serializers.ValidationError("an actor needs a name") else: try: object = self.Meta().model.objects.get( name=validated_data["name"]) except Exception as error: raise serializers...
1
a9ec8806bb4aee1d33df8d8570bc5142
85b079184e9980d37fe8f04521e26aed
whether to keep results in memory or write to disk after each timestep
def output_lammps(self, loutlammps=False): self.loutlammps = bool(loutlammps)
0
8c5cc8c4c3ab029ade85ecbe954335b7
559db1239d13b1766b2adf2670d4aede
Computes the distance between two GPS coords
def computeDistancePoints(data, pos1, pos2): row1 = data[pos1] row2 = data[pos2] phi1 = row1['lat'] * DEG_TO_RAD phi2 = row2['lat'] * DEG_TO_RAD deltaPhi = phi2 - phi1 deltaLambda = (row2['lon'] - row1['lon']) * DEG_TO_RAD a = pow( math.sin(deltaPhi / 2), 2 ) + math.cos(phi1) * math.cos(phi2...
1
114f717ef05aaf0079f8471f2d165131
1d5655ef5ea092f0c95689a369828078
Taking the input string from the text field and using the other classes in calculating the result, before displaying the answer in the text field
public class Calculator public static String calculate(String inputString) throws InvalidArgumentException { String validString = removeSpace(inputString); Operator operator = OperatorFactory.createOperator(validString); return operator.calculate(validString).toString(); }
1