query_id
string
corpus_id
string
query
string
code
string
label
int64
d3c20210d68d356a8fa3b0dbce4fe412
f2d1a56fce255f8537e9f423d8edbe45
根据regionId更新region的logicClusterId或racks
public BasicResult cloneLogicServer(final UcsRack ucsRack, String lsName, String org, String newName);
0
10fc8c2a8d58c7bbd87da686efc5f23e
5c14c8dfbd4977047284540ff63bbaed
Retornar os gêneros ordenados pela descrição
bool sort_cont (const map_generos& a, const map_generos& b) { if (a.value->getCont() == b.value->getCont()) { return a.value->getNome() < b.value->getNome(); } return a.value->getCont() > b.value->getCont(); }
0
fa5eb5f26113735131b3980cff892507
65f9db719179aa35d1a6d31e16b4d1c9
Sends a message from the framework to one of its executors. These messages are best effort; do not expect a framework message to be retransmitted in any reliable fashion.
void sendMessage(Destination destination, final String msg);
1
d6eab4a5e02a5b4e25bbf14f81cf2af4
d7ff401b4872936e53427c402373f57a
メールサーバ情報取得
$q = "select orders_email from admin_configs"; $data = mysqli_query( $dbh, $q ); return mysqli_fetch_array( $data ); }
0
c3124b12ef33f919c32665a9ee04a79a
bee266ce7f839bed07b8475c9c9d87dc
将json格式字符串转换为字典集合数组。
namespace Library public class Util public static List<Dictionary<string, object>> JsonToDictionaryList(string jsonData) { JavaScriptSerializer jss = new JavaScriptSerializer(); try { return jss.Deserialize<List<Dictionary<string, object>>>(jsonData); ...
1
aba1ce3dc6516c34bc287b4ce5aeaed3
dc77e91be0b3b5d31c17645b9f92edb7
Camera Callback Function This is called when the camera has a frame ready. buffer->data has the pixel values in the chosen encoding (I420).
void Tracker::OnCameraCaptured(Tizen::Base::ByteBuffer& capturedData, result r) { }
1
f5f8b681fd1a91b5ffca08a2432f8816
d60c865c712260c41f3d60d7e2ec435a
update the bookmarks database to either add or remove the selected item
var mov = null; for (var i = 0; i < userPreference.bookmarkAdded.length; i++) { if(userPreference.bookmarkAdded[i].id === id) { mov = userPreference.bookmarkAdded[i]; } } if(mov == null){ mov = { id: id, ...
0
e37eb7fa5e990a1d3079baf6362ffddb
e515713b75a6793afe2f9faa6ac9ce3c
Sokal and Sneath for set
int main() { SSet s1(100, 5); s1.insert(5); s1.insert(3); s1.insert(9); s1.insert(10); printf("The elements in set1 are\n"); s1.print(); int index = s1.search(3); if (index != -1) printf("\n3 is found at index %d in set1\n",index); else printf("\n3 d...
0
fcd8e55e141890af61b65cff131b73fd
dc5ad3e51ff8a490571bedda27e39780
obtem um array de produtos a partir de filtros
class PedidoProdutoController async index(req, res) { const filters = {} if (req.query.available) { filters.available = req.query.available } if (req.query.name) { filters.name = new RegExp(req.query.name, 'i') } try { const list = await PedidoProduto.findAll(filters) ret...
1
b522c0a08227e7717a789ae5e43bf2e3
9cba7dda8eacbfca09ac758ef0c5f649
get how many seats are in each train/car/cabin
class Boing(): def num_of_seats(self): rows, row_seats = self.seating_plan() return len(rows) * len(row_seats)
1
8aefb00c125fe02702271d9c47ddc5e3
41780b6a08cb53659da29b5f2251d89c
Get The face enhancement parameters.
class Flipud(meta.Augmenter): def get_parameters(self): return [self.p]
0
0e2dc3af79757c38b527a23da1c93458
502b74ddbc14de25caa601d4c8210a2c
Periodo de retorno.
class OS(models.Model): def TempoRetorno(self): try: response = (self.data_fechamento - self.data_abertura).total_seconds() / 86400 except: response = None return response
1
0982063d6e304eb8af571a800f179173
49b14565a2fe2b0e7edbb7b02dde21cf
Getter for <code>storeal.stl_footercustom_reinsurance.id_lang</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.6.0" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class StlLinksmenutopLangRecord extends TableRecordImpl<StlLinksmenutopLangRecord> implements Record5<UInteger, UInteger, UInteger, Stri...
0
1ff84c4fe728e92a48901f4bd2296c93
2296843f39a7009587fbc927b5cd042c
@brief calcule de produit matriciel de deux matrices
{ int caseActuelle = 0; int largeurMatriceA = matriceA.at(0).size(); int hauteurMatriceA = matriceA.size(); int largeurMatriceB = matriceB.at(0).size(); int hauteurMatriceB = matriceB.size(); vector<vector<unsigned long int>>matriceC(hauteurMatriceA, vector<unsigned long int>(largeurMatriceB)); int temp; for (i...
1
ec2c8e91f98dfe0a58256fc226d46bf6
fbbbd97c0f6c9577766ac830ec8dac56
设置通知栏的大图标
public class BaseBuilder public <T extends BaseBuilder> T setBigIcon(int bigIcon) { mBigIcon = bigIcon; return (T) this; }
1
a08ef739804bf7fc470ae48a3c49d33e
f51be30321d0c1a8b5af4292751cfc2b
Save all stops currently held in memory to a file.
class Scene: def export_stp(self, **kwargs): aircraft_names = self._get_aircraft(**kwargs) for aircraft_name in aircraft_names: self._airplanes[aircraft_name].export_stp(**kwargs)
0
7610c1f81640484e8d4e175259e1908c
8cd1132e8b39e19d5ecb8af8a58a6246
sets the total number of messages sent so far
public class mc : MonoBehaviour void Start () { messageCount = 0; }
0
84065957f15df52254caa8abe11d15ea
757376c596acd28093f29fa4b272f2d2
Function Name: VersionHandler Description : Processes the adslctl version command. Returns : 0 - success, non-0 - error
int count, int *eof, void *data) { int len = 0; len += gphy_ver(buf + len); *eof = 1; return len; }
0
2908c9efe7265c7386e839a39dbf730a
6a1f4e1d63d7ba2cd10b97d8c4cb401e
Convenience method for PDO view page to show percentage of samples completed for the current PDO.
public double getPercCompleted() throws Exception;
1
d4019c794d289909505db0419b12435e
aaab8097e100308078be0cb290f5f4b3
先删除上局残留的敌方角色
{ const vector<MonsterData*>tVector = BattleData->getMonsterVector(); for (int tIndex=0 ;tIndex < tVector.size(); tIndex++) { if (tVector.at(tIndex)->getBatchNumber()!=batch) continue; BaseRole* tRole = BaseRole::create(); if (tVector.at(tIndex)->getBossMonster()) if (m_BossModel)...
0
8ab850c6eac460c3b97bd54c4813f4de
a223f88738b51bf5a8e7896a470f8e6e
Driver function to regenerate the stratospheric concentration lookup tables for all of the gas records.
try: self.calc_sat_air_conc() self.calc_inh_rate_avian() self.calc_vid_avian() self.calc_inh_rate_mammal() self.calc_vid_mammal() self.calc_conc_air() self.calc_sid_avian() self.calc_sid_mammal() ...
0
07854aa9886ce49122e9d51bcd101859
99720e23ea09e5856fe3d0768bf145d7
are there any loops left on the machine?
public class WAMResolvingJavaMachine extends WAMResolvingMachine private boolean uEmpty() { return up >= TOP; }
0
d315b16948485a3e29ae9bbb7d9bcbf6
0cfa4df511d74c14820ef8794821bd92
@brief Decrypts the encrypted data. This is done using the blowfish algorithm returns -1 on error
char AES_FPE_decrypt(const uint8_t *key, const uint8_t *tweak, #if FF_X != 3 const size_t tweakLen, #endif const void *crtxt, const size_t crtxtLen, void *pntxt) { rbase_t *index = NULL; if (FPEinit(crtxt, c...
0
b74b8d2a60ec4adde34e97633b3e26cd
0925a1bb75ebd3f556eb81cce4446b9a
Basic test with three ranges that do not intersect.
self.assertIsNotBetween(1.0, 2.0, 3.0) self.assertIsNotBetween(4.0, 2.0, 3.0) self.assertIsNotBetween(-1.0, -3.0, -2.0) self.assertIsNotBetween(-4.0, -3.0, -2.0) self.assertIsNotBetween(2.0, -1.0, 1.0)
1
1830ea8dc6c93596aa09be97f2148727
62cd63cc5b6c6cd0640161586fe8e551
Gets a new RationalVector which is the negative of <em>this</em> RationalVector.
RingElement neg();
0
ac7093552ef59c76010c99a1147d67a9
9ed55fc515813aa04ee6f903142449d5
Asynchronously reads an array of 32 bit IEEE floating point numbers (multiple holding registers).
public abstract void getFloats(int memPtr, float[] dst, int dstOfs, int length);
0
0f0d7cd3aa228661d41096cc7d9c6c2c
a6b964cbb29a302dfb8d82bd3f0a817c
保存并解析油价
class oilFuture(object): def getOilFuturePrice(self): bulunte,date = self._spiderOilFuture('bulunte') wti,date = self._spiderOilFuture('wti') return pd.DataFrame({"TD_DATE":[date],"BULUNTE":[bulunte],"WTI":[wti]})
0
c8eb70c95d23b64e1624976cafa1978a
bd9d059a3d6ca901e908e18ef0649502
递归方式反转k个一组链表
public class ListProblems public static <T> ListNode<T> reverseListInKthBlock(ListNode<T> head, int k) { if (head == null) return null; if (k == 0 || k == 1) return head; ListNode<T> cur = head; ListNode<T> prevTail = null; ListNode<T> kthHead = null; ...
0
f550660371f0809fe47a45d219fc3738
47ac99a965ae5d7136a57f05cf2e56f6
Calculate the standard bottom bar position according to the screen's height The default value is 470 in 1280*720
public int getInitBottomSize();
0
fd19e0b5b04fa9be1fff1f80b74753ab
8404af6540231b3ac4b5454d4fcba384
Checks if the string is a valid 24 hour formatted time
public class WyepConnection private static boolean validateTime(String tIn){ if (tIn.length() != 8 || tIn.charAt(2) != ':' || tIn.charAt(5) != ':'){ return false; } try { int hour = Integer.parseInt(tIn.substring(0, 2)); int minute = Integer.parseInt(tIn.substring(3, 5)); int seconds = Integer.parseIn...
1
f0b19efd9ecea2b0f94ff07afc335e1b
d22615b525d98d758eb0a4fe2e8a72c8
This method returns a reference to the ReaderGroup being used by FlinkPravegaReader instance consuming events. As ReaderGroups are identified by name, we can get this reference if we know the name of the targeted ReaderGroup. This will allow us to get the StreamCuts from the reader positions working in the FlinkPravega...
java.util.List<String> getLogicalReaderNames() throws SecurityExceptionResponse, ImplementationExceptionResponse;
0
bea97253fa8fe62ae7003809c8bd8419
4b4ff616eca49aac23e62bc03eeeb906
跳转到添加视图(jsp页面)
@WebServlet("/DeptController") public class DeptController extends HttpServlet private void toAddView(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{ response.sendRedirect("/deptSys/addDept.jsp"); }
1
8b7859c3df7b663ecb3e485e786603bd
c49e1fb826913c59d0c71474a33b42b8
Deletes all rows from the ali_cron table.
{ $config = Config::getInstance(); $rows = $this->fetchAll( $this->select() ->from( array ( 'cs' => $this->info( 'name' ) ), array ( 'cron_id', 'last_id' => new Zend_Db_Expr( 'MAX( `id` )' ) ) ) ->group( 'cron_id' ) ); if ( count( $rows ) ) { $ids = a...
0
c515990206e6e5421be8391aa74f990c
0a012dcfedbc3bf6f6c3e2b4978e1f10
相交链表的简单解法,两个链表的指针一直向前走,到了终点就换条链表走, 直到相遇走了相同的长度,所以相遇之后一定是相交点
{ if (headA == null || headB == null) return null; ListNode n1 = headA; ListNode n2 = headB; while (n1 != n2) { n1 = n1 == null ? headB : n1.Next; n2 = n2 == null ? headA : n2.Next; } return n1; ...
1
48fbfdb6f2afc9b4694b345f0c753e05
1229ff311962a53945470091e9a50436
检查 rollup 构建出的文件的尺寸,将相关信息打印出来
if (!analyze) { const targetDir = api.resolve(dest || projectOptions.outputDir); const targetDirShort = path.relative(api.getCwd(), targetDir); const stats = webpackStats.toJson({ all: false, entrypoints: true, assets: true, ...
0
ed9909d54e652292abab9a8234dd3091
42ab60022e1079691a00343c4b1bc853
如果是从房号详情页跳转过来的,带着房号ID, 则需要在置业计划表中选中该房号的栋号,单元号等。
rowClick(row, event, column) { this.checkedHouseId = row.id this.curRowData = row this.residentialId = row.residentialInfoFrontId || '' this.houseTypeId = row.residentialInfoUnitId || '' this.$refs.relateHouseType.labels = [] this.$refs.relateHouseType.imgList = [] this.newHous...
1
812a79c1c7bc5ae53499cb0a6199e0ab
2945421c869e51454fbc3592d998b919
ShippingOptionController constructor.
class chooseShopController extends Controller public function __construct(chooseShopService $chooseShopService) { $this->chooseShopService = $chooseShopService; }
0
6717d7d4a305647d1356f0f1867c5395
a1a45d583152f627989b3077615fb9aa
Utility method to convert from list of tuple2 to double[]
public final class MtxUtils public static double[] list2DoubleArray(final List<Double> list) { double[] result = new double[list.size()]; int i = 0; for (Double d : list) { result[i++] = d; } return result; }
0
34f62971e293c15efe682ff317ed570d
9a1435c6ad3cf7c8f349f0197a186dce
Create a file in Alluxio fuse mount point.
String mountPoint = mountFileSystemRW(path); RootHelper.runShellCommand("touch \"" + path + "\""); if (mountPoint != null) { mountFileSystemRO(mountPoint); } }
1
9327d27ec0aee184664ac889a073d72c
180d77374201ba97b3eb2660ee8f0d33
判断手机是否有录像设备
public class CameraUtil public static boolean hasCamera(Context context) { PackageManager packageManager = context.getPackageManager(); Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); List<ResolveInfo> list = packageManager.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_...
0
73921f2b6a7e7d79b0cb1b334a1505a2
7f24780037bad6e4cfd7bac93177a4b5
Updates a guild in internal cache, if it doesn't exist, doesn't do anything.
namespace MUnique.OpenMU.Interfaces bool UpdateGuildMember(GuildMemberInfo guildMember);
0
e7bb76db2acc7192e18a9f65fc3f4651
71cb3ac899b7fc3b7287d1e474295c94
Update cached base address for the remote process
namespace WoWBot.Manager.Wow class PObject public void UpateBaseAddress(uint baseAddress) { this.BaseAddress = baseAddress; }
1
9b97c4ab3dac7e2c49e6837a3a0eeffb
8e009807af81744a98796b9aa1489068
метод управления разрешением экрана
public class TestScreenActivity extends AppCompatActivity implements View.OnClickListener public void changeScreen() { int screenNum = getResources().getConfiguration().orientation; if (screenNum == 1) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); } else { ...
1
28fa77d53d564641fd16b646e8079257
2d40ae9a7c7547a4e0b58b989abe614f
This function sets phase support feature's parameters to parameters in dictionary and displays in the window.
class GeneralPanel(wx.Panel, SCMPanel): def setProperties(self): self.text_Phase1.SetValue('1.0') self.text_Phase2.SetValue('0.0') self.text_Phase1.Enable(False) self.text_Phase2.Enable(False) self.text_NumProcess.SetValue('1')
0
7502a8151a1d04da5819b5dd1f514566
a27b8bd45383f1384ad054b732b1fe57
NewLZ4Compressor instantiates a new LZ4Compressor
namespace org::apache::lucene::codecs::compressing CompressionMode::LZ4HighCompressor::~LZ4HighCompressor() { }
0
e6d8d3fc8962d86daf50657ed6ee14f7
de769b1b9281ae26c5cf6da839cf507f
自定义页错误处理函数. 当出现页错误,主要是对标志为可写的或者COW的物理页分配新页,复制旧页的数据到新页并映射到旧页的地址空间
int page_cow_copy(struct my_pte *d_table, struct my_pte *s_table, unsigned long source_brk, unsigned int page_index) { int ret = 0; unsigned int dest_index; if (d_table[page_index].pfn == s_table[page_index].pfn) { struct phy_frame *frame; frame = get_free_frame(); if (frame == NULL) { _error("No more p...
1
bd4534bff0f10d552f718375368c0cde
bdde517e160a643ab7e25fda1c48d4bb
Get the top up history from the logged in user
class User(): def history(self): return requests.get(API_URLS["user_history"].format( self.user_id)).json()
1
4bf0d3f67d0bf6d9094d5c2ff8fae495
e6bfa5d174d2ca0d477a8d4a69afd575
Prevent the next player from taking their turn.
namespace GuiGame public partial class HareAndTortoiseForm : Form private void DisableNextPlayerButton() { nextPlayerButton.Enabled = false; }
1
041fa9541ea408ee8b92a65bdad4a5ce
4402a85f206538dca21836fb14a3796d
将时间戳转换为当地时间
timestamp = int(timestamp) time_local = time.localtime(timestamp) dt = time.strftime("%Y-%m-%d %H:%M:%S", time_local) return dt
1
fb21de19159f1da5423e244f26d47494
8ffcb2a1d1c5ea7db402822a4255d3c3
Compute the pseudo-inverse for stability via symmetric eigen-decomposition E = V D V^T therefore E^+ = V D^+ V^T
int i,j,s,info; int nPivotIndices[2*max(mp,nq)]; int size2=2*size+nu; MKL_Complex16 *temp_mat2, *work, *V_inv_distr; int *iwork; gsl_matrix_complex *temp_mat; gsl_complex temp_element; gsl_complex eps = gsl_complex_rect(epsilon, 0.); V_inv = gsl_matrix_complex_alloc(size2, size2); V_inv_distr = (MKL...
0
c66066b7680de542e26fefc1cdb5c65f
1a108e9c01fd0889594e872d40e9f728
Validates for non-conflicting roles
{ var roles = (await LoadAsync()).ToList(); if (role.Name != null && roles.Any(x => x.Id != role.Id && x.Name.Equals(role.Name, StringComparison.OrdinalIgnoreCase))) return IdentityResult.Failed(ErrorDescriber.DuplicateRoleName(role.Name)); if (role.Normalized...
1
3a927c605caa5502fd5083f0f06dbade
d92c7a396a945d2030870f4cd9078caf
Add a unit sphere to a 3D plot
center=(0, 0, 0), color='w', alpha=1.): u = np.linspace(0, 2 * pi, steps) v = np.linspace(0, pi, steps) x = radius * np.outer(cos(u), sin(v)) + center[0] y = radius * np.outer(sin(u), sin(v)) + center[1] z = radius * np.outer(np.ones(np.size(u)), cos(v)) + center[2] axes.plot_sur...
1
715740d0fc8080c94c19688327719cb1
538c59f82e3260b38ef5173807dee382
Select result of boolean operation with constant in subquery. For this case optimization is disabled.
class BooleanEntity extends BooleanOperator public function queryOpBoolean($field, $query_operator = self::EQUAL) { $this->query->condition($this->options['group'], $field, $this->value, $this->operator); }
0
8e25baafb88acf8f85f8409c567cc157
b492515897330483de49697d62e48d8e
获取在拨号界面优先显示的 信息 1=Label 2=DisplayName 3=UserName 默认为3
public class SPUtils public static String getCallShow(Context context){ return (String) SPManager.getInstance(context).getValue("callShow",""); }
0
bcd8a4f47f63a07a7c2499f883aa1e8a
2ea454cf3be72c0a0c0cd51a377541d7
fetches all actions which belong to the same rule as the given condition
class StateMachine public function getActions($objE) { $ret = []; $stateE = $this->getObjectState($objE); $transitionList = $this->getTransitionsForState($stateE->getId()); foreach($transitionList as $transitionE) { $condition = $transitionE->getCondition(); i...
0
e995ff9738efe163552eda5e72af8e69
557f8aa25a8b8102fcb3f425358fd724
接收消息, 把消息放至消息总线 Receive the message and place the message on the message bus.
protected Mono<Void> dispatch(String localId, String brokerId, TopicPayload payload) { try { ByteBuf byteBuf = TopicPayloadCodec.doEncode(payload); byte[] body = ByteBufUtil.getBytes(byteBuf); ReferenceCountUtil.safeRelease(payload); ReferenceCountUtil.safeRel...
1
46d3bc00c63bec1a8b5574f787d3eb22
cd4ac82fbe9c6e83dae97ab2755381be
Xử lý hủy phiếu bán hàng
{ $bill = Bill::find($id); DB::beginTransaction(); try { $order = Order::find($bill->order_id); $items = $order->order_items; foreach ($items as $item) { if($bill->was_paid == 0) { $book = Book::where('book_code', '=', $...
1
b552f518e3370fb1e64ce3e7752edab8
c5b6f536db8240e87023cd6c7159ed19
The identification of whether the Control Agreement is a Credit Support Document with respect to each party
Boolean getControlAgreementAsCsd();
1
4b80a8cecce8a0105d73e36e4abb7bbd
62e008c17fd97986f3f4436ab1a089d9
Email template arguments setter
$header_args = array( 'title' => \esc_html__( 'WPForms', 'wpforms-lite' ), ); if ( ! $this->plain_text ) { $header_args['header_image'] = $this->get_header_image(); } $args = array( 'header' => $header_args, 'body' => array( 'message' => $this->get_message() ), 'footer' => array(), 'style'...
1
b5806c72052aca814acaec6aefbc3b17
e88a4c9e4667cf027fd3dedfe1d0d222
Определяет, нужно ли сохранять статьи
public boolean isValid(Article article, Boolean shouldFilter) { if (shouldFilter == null || !shouldFilter) { return true; } return article.saved; }
0
8ddafed244990d7007e1d5cdf0b12790
925d03bd3e5a7e229862323aaf6edcef
==================================================================== This function switches width control to manual =======================================================================
void SetStartUpMode( void ) { g_bWidthIsInStartUp = TRUE; g_bRapidIntegration = TRUE; SwitchOffAllControlOutputs(); ResetWidthIntegration(); }
0
6610cd43d18b64904c3b1dad6cc45f88
a4c1160f4a914e6532e2f0fd9a6f71a5
This method prints the link state changes of ports on the switch
class NetworkMonitor(app_manager.RyuApp): def _port_status_handler(self, ev): msg = ev.msg reason = msg.reason port_no = msg.desc.port_no dpid = msg.datapath.id ofproto = msg.datapath.ofproto reason_dict = {ofproto.OFPPR_ADD: "added", ofproto.OFPPR_...
1
9f86189e9c74c7fc1f7ac46276ae50c8
ec4aa4438f462d37a426b1f9637d8c8e
Get the command for converting a text to EPUB.
output_path): images_path = self.project.images_path command_lines = textwrap.wrap(''' %(cp2_call)s -b -c -i %(images_path)s -o %(output_path)s \ --do-not-build --do-not-fetch --pipeline=%(cp_pipeline_file)s \ --data-file=%(csv_filepath)s -L ...
0
3fb801bf8dfec9a225f53d776e16b770
480b0b629a9129f499263de91fdd9deb
重置 兑换记录 设置为 []
function CommonActivityBaseWin:resetExchangeScroll() self._currentPage:resetScroll() end
0
71008b0c2d3d4d8ee36829ed1f134b32
9d864db5bc9c076fdb9fce7f04ab9d57
求解字符串的最长公共子序列(LCS算法)
public class TestDP public static int LCString(String str1, String str2) { int length1 = str1.length(); int length2 = str2.length(); int longest = 0; int[][] arr = new int[length1 + 1][length2 + 1]; for (int i = 1; i <= length1; i++) { for (int j = 1; j <= length2; j++) { if (str1.charAt(i - 1) == str2...
0
35ee443463f8549c02a1dddda4690f34
c27dc464c5ce95e10f5443aaaf0f96fe
Get the 'terms' content from the message.
$searchTerms = Connect_GoogleFT_SearchTerms::getSearchTerms(); foreach( $searchTerms as $term ) { $message = self::scrubMessage($message, $term); } return $message; }
0
0fc2619056e3e7b5f13cd6a470ca9263
7f61448ad6da3ef0f9cb03f40c5be655
https://stackoverflow.com/a/5365533
cases like (1)
0
1d5f5ca5706b23134dfb05945316cefa
e3e0e6dfef3eab8e5de3322087efe784
Checks if the guild has a leader.
boolean hasLeadership();
1
cc1a13d8ba8be526637c3fe7a2705e92
31aae0097b6e9ba62e00c789bb82a8c4
Hook to generate output before the variable dump
abstract class FS_Plugin public function BeforeOutput($pRender) { }
1
551a49891090316d4f9aa38aaa51b318
159f4d6e513fe303255aced0af060ffa
PERFORMING THE DEPTH FIRST TRAVERSAL OVER THE PARSE TREE
public class ParseTree public void dfs() { dfs(root, 0); }
1
16e20a891c880487610116d0bb2ea5bf
a00f3bac6aa73991b4c6a73c8dc19f40
设置保険会社(是否显示)
public class Mst0002s03Dto extends BaseDto public void setInsuranceFlg(String insuranceFlg) { this.insuranceFlg = insuranceFlg; }
1
508dae4ba50b347029bc0d2d79aab097
f4036824f15e97d987f8d8ed76b6587c
! Returns the number of items in this struct.
size_t enum_name_database::get_nr_of_items() const { return names.size(); }
1
4ee6a0b43ae6a4687a445ff75c0903e8
95bb02574373339fd79141c7b9fd7617
Returns the number of the maximum active blocks per streaming multiprocessor.
class VisHeader(object): def get_max_channels_per_block(self): self.capsule_ensure() return _vis_header_lib.max_channels_per_block(self._capsule)
0
f52c96134b9e5474a26fe41e064f916a
6e65b8c13d2720b73c3fdbcea49c7c1c
Essa funcao recebe uma lista de palavras e devolve o numero de palavras que aparecem uma unica vez
freq = dict() unicas = 0 for palavra in lista_palavras: p = palavra.lower() if p in freq: if freq[p] == 1: unicas -= 1 freq[p] += 1 else: freq[p] = 1 unicas += 1 return unicas
1
03a814b29d8b4c8ba27c8c717799e275
13f3498264c5c88be5588b7b3fffed23
将DTO转为物料-公式关联
@Table(name = "product__distributor") @Getter @Setter public class ProductDistributor public void convert(ProductDistributorDTO dto) { dto.setProductId(this.productId); dto.setDistributorId(this.distributorId); }
0
fbd2ddf3ee8c04d756a7e37af109d42f
5dbd8d486c5d356c010dd5f75c49bcf6
Get one specific dog from server.
class Dogs(Resource): def get(self, id):
1
00f01e87a81e102f4aa04b5a0af1fc96
34e4934894fe89531e035ee8ab493676
Get file name and remove extension
class FileInfo extends SplFileInfo public function getFilename() { $value = $this->getBasename(); $value = Regex::replace('/\.\w+$/i', '', $value); return $value; }
1
8cb8bbedff4ede317992e9bdf2cea2ac
4c3e6cf20ca5a4d4e1715a5af7b088b1
根据Uuid-逻辑删除对象( AliveFlag修改为0)
void deleteByInputUuid(String inputUuid);
0
4cd59c4402181691598984d6f7f28dc9
abac231a988fb24caff397c4007391b8
商品是否可以上架
@Component public class ApproveRejectGoodsState implements GoodsState @Override public Boolean canPutOnShelves(GoodsDTO goods) throws Exception { return false; }
1
f6b958627e9751f36f55fde432d2bec5
2cbef36a43d3624f7ce3a151ba7b6eae
返回方法上的注解
@Aspect public class LogAspect private Log getLogs(JoinPoint joinPoint) { MethodSignature methodSignature = (MethodSignature) joinPoint .getSignature(); return methodSignature.getMethod().getAnnotation(Log.class); }
1
75805a7b7e23ceeb2e19c247f653d38d
8abeb02003337c4a9de4721bc0f8194c
Creates a {@code String} representation of the {@code long[]} passed. The result is surrounded by brackets ({@code "[]"}), each element is converted to a {@code String} via the {@link String#valueOf(long)} and separated by {@code ", "}. If the array is {@code null}, then {@code "null"} is returned. the {@code long} arr...
public class ArrayUtils public static String toString(long[] array, String delimiter) { if (isEmpty(array)) { return ""; } if (delimiter == null) { delimiter = ""; } StringBuilder builder = new StringBuilder(); int length = array.length - 1; for (int i = 0; ; i++) { builder...
0
5263084880ee04a5e40a0395860926c1
11c8c53619332804536ca42474257686
Set the capacity of the hall
class Set extends EventbriteBase public function setCapacity($capacity) { Argument::i()->test(1, 'int'); $this->query['capacity'] = $capacity; return $this; }
1
0ac5e8026e79e207700364d3fbe5ad03
c3733b6f1c092b3592e09f24259073ee
Takes in a matrix containing voxels in suit space and the value of the parcel (output from read_suit_nii) and calculate the average for each roi
def _signed_average_brain_sal(res_conj, sals_per_session): sessions = list(sals_per_session) rois = res_conj.index latent_names = list(res_conj) output = pd.DataFrame(index=rois, columns=latent_names) for roi in rois: for latent_variable in latent_names: conj_test = res_conj.loc[...
0
5b28791a58ec6019a96cc260205d2b3a
ccbff0c2ad2af8c32955211168652910
Validate a charge.
"Accept: application/compropago", "Content-type: application/json" }) @GET("/v1/charges/{payment_id}") Call<ChargeResponse> verifyCharge(@Path("payment_id") String paymentId, @Header("Authorization") String credentials);
1
09e39cfdd379821851860a87f6d5f7f0
ebc0910d842be28f0205fc1692f97b89
Loads ra/dec corrdinates from a file.
{ Points = new Dictionary<string, Coordinates>(); FileStream fs = new FileStream(fileName, FileMode.Open); StreamReader sr = new StreamReader(fs); while (!sr.EndOfStream) { string lineStream = sr.ReadLine(); string[] del1 = new string[] {"\t"}; string[] nwSplit = lineStream.Split(del1, Stri...
0
05df4eeffddd8d90cd815d3d6bc37248
d293039bc612cc68bafde8e7f85aa0a6
Read LN Control Point's Client Characteristic Configuration success callback
{ uint8_t handle = p_param->handle; uint8_t tab_index = 0; uint16_t cccd_value = 0; bool is_ctrl_pt_valid = false; hrrcps_evt_t event; gatts_write_cfm_t cfm; tab_index = prf_find_idx_by_handle(handle, s_...
1
291fd954ce410df26b823ec138b2b790
304ef6b83739e64f8abb08d3920b0db8
Should update the screen saying you're changing direction.
public class EATreasureHuntActivity extends Emys3DActivity implements OnTouchListener, AndroidDialogProvider, OnInitListener{ private void displayChangeInstruction() { String text = getResources().getText(R.string.take_turn).toString(); emysSpeak(Emotion.NEUTRAL, text); mTreasureHuntMode = CLUE; }
0
c20bb113612a305fcd55fca009f3ef51
4801ecadae6934d0415e9c27c96fd9ec
Check if there are features over quota if the current subscription would be swapped to a new one.
for res_name, res_usage in self.system_resources_usage.items(): if res_usage >= self.instance_count * self.instance_max_usage[res_name]: return True return False
1
3c4454911ce64a7db10101e81715671e
f16d8ba6cc622d77979bebf61e36d241
Organize spike and LFP data by tetrode.
assert set(arrays) <= set(spikes_per_cluster) clusters = sorted(arrays) n_0 = [len(spikes_per_cluster[cluster]) for cluster in clusters] n_1 = [len(arrays[cluster]) for cluster in clusters] assert n_0 == n_1 spikes = np.concatenate([spikes_per_cluster[cluster] for cl...
0
841eb69ee618d4d31054dd6faf952ea0
64e01dc375c40a47c64001cc25f2ff34
Get a cached set of abbreviations.
class GHC_Conventions extends GHC_Base public function get_conventions_abbreviations() : array { if ( empty( $this->conventions_abbreviations ) ) { $transient = get_transient( 'ghc_conventions_abbreviations' ); if ( $transient ) { $this->conventions_abbreviations = $transient; } else { $this->convent...
1
cab43e006b01f170f0b1d4dbdb9abe5e
8725b8d5a04c3b68e7916e7b42b15e61
将选中的车辆注销
public abstract int selectedCarDelete(List<String> chkList);
1
f143795af0121b7995c3326000e4730e
24db0c6ca462c66cd6860e4dde203947
Initiates a {@link #shutdown()} and handover to another tradefed process on this same host. <p/> The scheduler will inform the remote tradefed process listening on that port of freed devices as they become available. otherwise
public Ice.AsyncResult begin_shutdown();
1
177287db534e5f6553f849eb062ad45d
d5cb3eafb6bee3b696c859327ff32b14
Get the current number of file that is being transferred
class Upload function getCount() { return $this->_count; }
1
9c1d75d23caa933e61c31fe641e7ca57
fcaa232113f525faf9c0123f8006a034
Internationalization for parameter and payload validation messages.
@EnableWebMvc @Configuration @ComponentScan(basePackages = "com.kpi.web") public class WebConfig extends WebMvcConfigurerAdapter @Bean public ResourceBundleMessageSource messageSource() { ResourceBundleMessageSource rb = new ResourceBundleMessageSource(); rb.setBasenames(new String[]{"messages/messages", "mes...
1
14145325593596882f4ba8fa4cb3f497
7ff2e0cf191eef0ddbe619163fb919df
HTML5 Blank navigation
function html5blank_nav() { wp_nav_menu( array( 'theme_location' => 'header-menu', 'menu' => '', 'container' => 'div', 'container_class' => 'menu-{menu slug}-container', 'container_id' => '', 'menu_class' => 'menu', 'menu_id' => '', 'echo' ...
1
2bbb3925315be1bd1674c49c4625ab10
2c3b34b5fdcbdd5c9ebb857d050a2e94
Open a markdown editor
function openEditor() { window.location.assign("/deckedit") }
0
c87e4870d7c63b6f84fff8326950eba1
5c7f5325b3bb65c8d2b93dccb8f2201c
获取流程表单(首先获取任务节点表单KEY,如果没有则取流程开始节点表单KEY)
@Service @Transactional(readOnly = true) public class FlowTaskService extends BaseService public String getFormKey(String procDefId, String taskDefKey) { String formKey = ""; if (StringUtils.isNotBlank (procDefId)) { if (StringUtils.isNotBlank (taskDefKey)) { try { ...
1
bf57aaba08477e6dba6a5c873d352352
6780b61da9fa51f63437d48df135e483
The running time in nanoseconds. <p> API name: {@code running_time_ns}
public class ResourceUsageCounter implements java.lang.AutoCloseable public long getUsrTimeNanos() { return usrTimeNanos; }
0
97f3bb95e695d606eb0a88fed75abf28
e123c872f391b937197fa0637accb5d9
构建查询:通过join中间表来查询从表
namespace SoEasy.DB.DAO abstract public class BaseDAO string GetJoinSQL(Join join) { string lFields = join.LeftShowFields; string rFields = join.RightShowFields; if (lFields != "/") { lFields = string.IsNullOrWhiteSpace(join.LeftShowFields) ? "...
1
8dddeb9458f549f079b86d8bcf940625
9ae8e4a3ef61268b58ba39ac7b013c23
Set different background image for landscape and portrait layouts
public abstract class BaseActivity extends AppCompatActivity protected void initializeBackground(LinearLayout linearLayout) { if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { linearLayout.setBackgroundResource(R.drawable.background_loginscreen_land); ...
1