query_id
string
corpus_id
string
query
string
code
string
label
int64
baf056ba75cbd9706676138e974d0322
c456addba6d8d52958fb1357750c8cbf
@brief Method that returns this process cpu usage percentage cpu usage by this process. Code based on https://stackoverflow.com/questions/63166/how-to-determine-cpu-and-memory-consumption-from-inside-a-process
string line; string element; vector<string> value; long count = 0; std::ifstream filestream(kProcDirectory + std::to_string(pid) + kStatFilename); if (filestream.is_open()){ while (std::getline(filestream, line)){ std::istringstream linestream(line); while (linestr...
1
57e3cbd2694b43e750bd17444066929d
30e09c1e6eda07ceed9632c1c59d36af
Copies the queue elements to an Array, starting at the specified array index
{ if (array == null) { throw new ArgumentNullException("array"); } RunUnderLock(() => { this.list.CopyTo(index, array, arrayIndex, count); }); }
1
56b103e1c6efda258cf974e87f0874cf
b90b7ccca5213e050e1155f6e616887b
Returns the sample names for samples represented by the results objects.
class CellrangerMulti: def sample_names(self): return sorted(list(self._samples.keys()))
1
62bf8d2be6bc06fda9b9e3e9b34251fb
9601b96f9b4ee4518a8507bfed030a4e
Rellena el directorio la primera vez que se lanza una llamada al servidor
namespace TQEnjineZ.Clases.Wrappers.Parameters class ParameterLoader private void initPath() { if (!Directory.Exists(path)) Directory.CreateDirectory(path); }
1
1f42b150fb7a77e67029ebccad9cb522
0e902217a2f909e34137b8cda4ec1e71
Sublattice labels corresponding to the factorized sublattice indices.
class Lattice(object): def sublattice_labels(self): return self._sublattice_labels
1
8a3e3248ba3c2cc50d0465b1d1460d56
57451c30643b38d5de1c1f1bce28f795
Compute the warping envelope.
std::vector<int> new_envelope; for (int i = 0 ; i < (int)envelope.size() ; ++i) { int v = envelope[i]; for (int x = max(0, i - width/2) ; x < min((int)envelope.size(), i + width / 2) ; ++x) { v = upper ? min(v, envelope[x]) : max(v, envelope[x]); } new_envelope.push_back(v); } return new_envelope; }
1
67ce7516377806c260ea1fd2c3bdf518
48dd9c685004edfb9bc60fdd0da07949
Returns the market values for all players in the database
BigDecimal getMarketValue();
0
e3784e345afc6f20f97d130730ffa4b9
fd715849ee65eda160f5f7fe9432e7ab
表空间详情页面跳转
@RequestMapping("shuju/meta/tablemanager/") @Controller @SessionAttributes("curuser") public class tablemanager @RequestMapping("showpage_adduptable") public String showpage_adduptable(@RequestParam("objid_")String objid_) { return "shuju/meta/tablemanager/showpage_adduptable"; }
0
2dac2a95fb85e8e95fba4d3cb90bbc0d
6cfa59efd530d57374e49fb7449a8f8f
Returns the day as 0 based integer (0-6, sunday-saturday)
class RTC(): def getDay(self): return bcdToInt(self._read(self._REG_DAY))
0
6ded4d7774c44830b331aa45575d8e75
47f10ab08d7e1f63d8cf762ba0545306
获取下走动画
function down () { clearInterval($('.page3_figure')[0].timer); bgChange ($('.page3_figure'),5,400,function () { $('.page3_figure').css({ background: 'url(img/down2.png) '+(-46.875+9.375*$('.page3_figure')[0].page)+'rem 1rem no-repeat transparent', backgroundSize: '600% 400%' }) },function () { down...
1
173957c98c677a119827518efdc6cec8
9fa8f1666224029619f45006f6839742
Send Google Friends Request
function send_friend_req(id) { jQuery('#imgs_load').show(); $.ajax({ url: "http://gautambook.isprasoft.com/userprofile/add_friends", async: false, type: "POST", data: "users_id="+id, dataType: "html", success: function(data) { jQuery('#request_sent').html(data); jQuery('#img...
0
c38dfb9ad3b5cc09011b1a8be1b1d966
4c954a1b65091f5680c4fcd17c5e082a
Change File Quantity
{ $store_id = getValue('store_id', 'int', 'POST', 0); $product_id = getValue('product_id', 'int', 'POST', 0); $quantity = 0; $db_query = new db_query('SELECT pro_quantity FROM product_quantity WHERE store_id =' . $store_id...
0
c4e79d9da4c0451d698ff39cb9efc3e3
46ffadd453c1301ab3b0b96bccf4384c
generate globally unique name for a zz module
if len(modules) == 1: return modules[0] h = hashlib.sha1() h.update(','.join(modules).encode()) return h.hexdigest()[:20]
1
7e6e83a096fd8a2c029d66512cf3f425
15ba7e24f389310ab18a3b4b9c290ae2
Metodo que permite eliminar archivos autenticandose en el dominio
{ if(Auth::user()->tipoUsuario == 3){ try{ $ficha = Ficha::find($id); $ficha->delete(); return redirect()->route('fichas.index')->with('status', 'Ficha eliminada'); } catch(\Illuminate\Database\QueryException $e){ ...
0
d52f82493e7c68726b16b95e5adfa318
cd9777cfab291b21de959feec4c1bb8d
Whether to use mean feature coefficients for vector transformation.
class UnmaskingStrategy(Strategy, metaclass=ABCMeta): def use_mean_coefs(self, use_mean_coefs: bool): self._use_mean_coefs = use_mean_coefs
1
f4c122371a7469cf76cf581204fd5260
856fa5fc4f441e16d1014378850f9672
获取borrCustId
public class FileLoanTransferModel extends CbhbBaseModel{ public String getBorrCustId() { return borrCustId; }
1
d7de4ec7790382151ff094fc7d163a72
2ded2fe17206f54e2626214191f07043
returns a URL safe, unique slug. - delete all non-ALLOW_CHARS characters. - if the shotcut already exists in existing_slugs -> add a sequential number Note: Not only used for making page slugs unique with getUniqueSlug(), also used in: -PyLucid.defaulttags.lucidTag.lucidTagNode._add_unique_div() -PyLucid.middlewares.he...
class SlugMixin: def _build_slug(self, name=None, uuid=None): if not isinstance(name, str): name = self.name if self.name else "" if not isinstance(uuid, str): uuid = self.uuid.hex if self.uuid else "" base_slug = self._slug_append(name) slug = base_slug i...
0
42617c4d4ad5df4ea68b9f60d578a84c
6730eda3ad26d7a4d684f5fd10de6fb4
Returns HTML to display comments on attempt.
global $OUTPUT, $USER, $DB; static $tiiconnection; $config = $this->plagiarism_turnitin_admin_config(); $output = ''; $cm = get_coursemodule_from_id('', $cmid); $moduletiienabled = $this->get_config_settings('mod_'.$cm->modname); if (empty($moduletiienabled)) { ...
0
f29581dbc78f0822c99adccf2fdffdb4
dbc1c3a7411f5d6b7d73f8c22252d996
Not implemented. Should use SecurityService directly.
final class NoSecurity extends SecurityManager public Object getSecurityContext() { return super.getSecurityContext(); }
0
bc18aea600cddc8b0dfc68ee8fad97e9
4737ffd81721c117a02abe70a9d2a3d8
Basic SSML validation
namespace CreateAR.EnkluPlayer.Speech public class TextToSpeechSynthesizer : ISpeechSynthesizer private bool IsSsml(string text) { return Regex.IsMatch(text, @"<speak.*>.*<\/\s?speak>"); }
1
a197a7e1e1a5c4d944112c20b1b572d3
f2c952e9f9bd81c5aba2affb2837c3b7
Get file transfer encoding for attachments.
class HttpServerFileUpload(core.streams.ReadStream): def content_transfer_encoding(self): return self.java_obj.contentTransferEncoding()
1
5bb9f75eb2856ae74944aab3db595a2e
a9430320d943a3219b9930da88a1ff83
It registers the callbacks which are only required in a multisite setup and when viewing the network dashboard
$plugin_name = wpcd_plugin; if ( is_plugin_active_for_network( $plugin_name ) ) { $blog_id = $new_site->blog_id; switch_to_blog( $blog_id ); self::wpcd_scan_notification_schedule_events(); restore_current_blog(); } }
0
0e1bebb786832e10966889dd1348cd77
9853ca732d3a1db47d6a21d857625332
Tests for One Pair by checking if there exists a match between 2 cards and no other matches in the cards.
namespace SBMethod internal class Poker : TrumpDeck private bool OnePair( IEnumerable<TrumpCard> cards ) { var ob = this.SortCard(cards: cards, row: true).ToList(); return ob[0].Row == ob[1].Row && ob[1].Row != ob[2].Row ...
1
cdeee1293eac5f1c0c890391f8bcfce9
647f1b1a99520f950aa99f1b9231d0e5
Возвращает клавиатуру из указанных рядов кнопок.
class Game{ private function constructKeyRow(array $row):string { $html = "<div class='keyrow'>"; foreach ($row as $letter){ if(in_array($letter , array_map('strtolower', $this->phrase->getSelected())) && in_array($letter, array_map("strtolower", str_split($this->phrase->getCurrentPhrase...
1
8c2064875c7442d75f7cdf682fe86598
8b5e6c5155201f2dcd2d7199bc58b9e2
Set current arrays folder option value.
{ if ('' !== ($folderChoiceErrorMessage = self::validateFolderForChoiceConstraintsFromSetFolder($folder))) { throw new InvalidArgumentException($folderChoiceErrorMessage, __LINE__); } if (is_null($folder) || (is_array($folder) && empty($folder))) { unset($this->Folder...
1
e4bdc91f2b2a300d391c57717b5f2f19
0f6aa83e7f1a9ce7a3d25fc3e6081608
aumenta la velocita' di tutti i palloncini in modo uniforme
void aggiorna_angoli(int value){ angolo_mercurio += SPAZIO/RIVOLUZIONE_MERCURIO; angolo_venere += SPAZIO/RIVOLUZIONE_VENERE; angolo_terra += SPAZIO/RIVOLUZIONE_TERRA; angolo_marte += SPAZIO/RIVOLUZIONE_MARTE; angolo_giove += SPAZIO/RIVOLUZIONE_GIOVE; angolo_saturno += SPAZIO/RIVOLUZIONE_SATURNO;...
0
70072318260cd94f89447c6686845116
298ccdcaadb450e94cb5db22bf07020b
{@inheritDoc} <p> The comparison is based on comparing the line segments' endpoints. Two line segments are considered geometrically equal even if they are defined with opposite direction. </p>
public class Segment implements Comparable<Segment> public int compareTo(Segment other) { return orderByLength.compare(this, other); }
0
2964d31abdc865d13582a4631c607953
57648b9bd12e63b351c49fced7cf2795
@brief queries an object in the object dictionary by SDO and returns its value.
class MultiStoreSvc: public extends3<Service, IDataProviderSvc, IDataManagerSvc, IPartitionControl> virtual STATUS retrieveObject(CSTR& parent, CSTR& path, OBJECT*& pObj ) { return _CALL(m_current.dataPro...
0
ec35e0af8ea121eed0b17b0bf555be57
38dce8b31498c33496ec91868c392988
管理员中心-活动审核
global $_GPC,$_W; $sql = 'select * from ' .tablename('activities').' where status=1'; $list = pdo_fetchall($sql); include $this->template('manage/display'); }
0
ed444cd9e2b86e688d0be42b68ac6313
af4a8dd74883221fcf724341da5cb8f7
sends a midi stop and 'all notes off' message
function stopChord (chord) { for (i = 0; i < chord.length; i++) { var noteOff = new NoteOff(); noteOff.pitch = chord[i]; noteOff.send(); } }
0
29d4385f25654d072e35849aae079d56
7efaab5479aea54feaf74ce7b399a7ca
班级关闭
function _goToClosedClass() { $state.go('app.classmanage.closedclass', {}); }
0
22efe72bdb57b1aa564d3fc7b25410da
8f961f24f513246e6900cf7899569036
Accepts a new connection from a remote client, and returns a tuple containing that new connection wrapped with a server-side SSL channel, and the address of the remote client.
newsock, addr = socket.accept(self) return (SSLSocket(newsock, keyfile=self.keyfile, certfile=self.certfile, server_side=True, cert_reqs=self.cert_reqs, ssl_version=self.ssl_...
1
30c6e43f2977f12b8c521e71cbb8e2a9
125f931f4bb7f9f1acba99f5c4776bab
https://stackoverflow.com/a/54531546
function copyTextToClipboard(text) { var textArea = document.createElement('textarea'); textArea.style.position = 'fixed'; textArea.style.top = 0; textArea.style.left = 0; textArea.style.width = '2em'; textArea.style.height = '2em'; textArea.style.padding = 0; textArea.style.border = 'no...
1
c856b227ea0e8b7b43f48c85f5c71bff
6c3933a0598c833bc62b8ac26237d00c
GET: api/Dealer
public GetDealerResult GetDealer(GetDealerParameter dealerParameter) { try { GetDealerResult res = null; string _orgname = string.Empty; #if DEBUG _orgname = ORGANIZATION_NAME_LEADMANAGEMENT; #else var org = HttpCont...
1
c30f872e9d7b64b3712f8c14e4417078
b505d4f2ff32570ba1ce1b429038dc51
获取 如果交易类型是撤销或者退款时,该字段填写对应支付的那笔支付流水
class WechatRefundResult extends WechatResult public function getRefundChannel() { return $this->getValue('refund_channel'); }
0
5f47fd6ce12120fb4ddd8959bb3c8848
0d463b93fb0df0a5496f3de0ca84400e
Behavior:
class RingEnv(gym.Env): def compute_reward(self, action): return 0
0
4df1829e63ba7f324b2d20d70222bec2
3f1f63f25f05616d5a975ff10461d926
get_user() returns user associated with a request
cookies = "; ".join(["{}={}".format(k, v) for k, v in self.testapp.cookies.items()]) request = webapp2.Request.blank('/', headers=[('Cookie', cookies)]) request.app = self.app a = auth.Auth(request=request) return a.get_user_by_session()
1
f00295ab7f88635ba1359313cb8c49cd
6ce57da4fba2945dcc13aee76ac69f7f
Formats a PlayerStatistics object's fields and turns it into a string. Used when printing player's statistical information
def _format_stats(raw_stats, player_name): obj = { "name": player_name, "year": raw_stats[0], "team": raw_stats[1].strip(), "GP": raw_stats[2], "GS": raw_stats[3], "G/W": None, "MPG": raw_stats[4], "FGA/G": raw_stats[5], "FGM/G": raw_stats[6], ...
0
789b6f1dcd1fb6e050bcbbca2c527748
a7f034ff1c5d4bef70d381ec6bb3cbf7
Template method to provide the implementation for flushing any buffered audio data.
class _StreamAbsorber: def flush(): pass
0
748d8a85fcbb790e984fedc3d35d99fe
19203be1389ebdb904892920bbc5cb98
exposes the given function to the lua environment
int LuaManager::register_function(lua_CFunction func, std::string name) { lua_register(L, name.c_str(), func); return 0; }
1
621204405687be95cdf34dddbfb3021c
98d0034f6fc8e59447f58066f9b691b8
@brief デプステスト比較関数の取得
static bool test_dis() { return true; }
0
d52fceb75fea271eb7f0e50bf16ac5a0
f472101e620c15b1869b0d2e2986b142
隐藏打赏
void hideCollectCandy();
0
07e4c44819f162017beeddbb53c637d2
396af8a85aaf66f90c1f57df6e26c596
删除一条总线路信息
class Manage extends CI_Controller function del_line($line_id){ $line_id = intval($line_id); $this->bm->del_line($line_id); $this->bm->del_station_by_line_id($line_id); $this->bm->del_route_by_line_id($line_id); $this->bm->del_ticket_price_by_line_id($line_id); echo "ok";...
1
1c659a1e9d298dfcb9729ba7ecfd0081
dc2497a210e25e59eaa4200d00c2b149
! Routine to cleanup what was initialized by jlabgefOpenDefaultWindows()
{ int indx; for(indx=0;((devOut && devOut->windowList)&&(indx<devOut->layerCount));indx++){ devOut->windowList[indx].enflag = false; devOut->windowList[indx].index = 0; devOut->windowList[indx].stream = EGL_NO_STREAM_KHR; devOut->windowList[indx].surface = EGL_NO_SURFACE; } ...
1
a2ee5a6967231a20b1fc45885c13e8e0
a2e45b8507ce37a15c145bfd67e85f34
Gets the unique name relative to the ingredient type, for differentiating it in JEI
public class NF_TileEntityNetherForge extends TileEntity implements IInventory, ISidedInventory public String getInvName() { return "container.furnace"; }
0
4adc8bba347f4a670eac31a66c22a208
a7f4b327e4827c6bc1c5f09ba6405ada
Display a listing of the Arearec.
class AreasController extends Controller public function index() { return view('areas.index'); }
0
334919be29f974c6d682ea4f26f8b200
d6eda35d208d2303afe42b4fe17f5ac7
当前通话统计回调。 该回调在通话中每两秒触发一次。
public class InCallVideoCallCallback extends VideoCall.Callback @Override public void onCallDataUsageChanged(long dataUsage) { Log.d(this, "onCallDataUsageChanged: dataUsage = " + dataUsage); InCallVideoCallCallbackNotifier.getInstance().callDataUsageChanged(dataUsage); }
0
b19257bbba5412ff0fbcdff0ae9bf18d
21f0fe04dce4314acf585ee59b50b69e
Hook called when the layer is added to another one
class Layer(Drawable): def on_add_to_screen(self): pass
1
cb576866807cee287b5aa4029b3b6db4
ecedfb240f69953c417cc3005a42aefe
@brief Show usage information for the sys_cfg_pwk_cipher command $return N/A
void cmdline_print_cfg(void) { }
0
0c02e508334f3c4fbb4e5c0f9a4ef4ba
ed8d7b93fa24f3b1b5fc91cb9e597711
Get a new L{ObjectAPI} instance.
class IObjectEntry(Interface): def factory():
0
9fff928d5ef24c483f7d35911f11ca9e
e31069a221c10563533ce48fd57b8c59
删除数据后转发到列表页面
@Controller("roleAction") @Scope("prototype") public class RoleAction extends SupportAction<Role>{ public String exec_delete(){ return "list"; }
1
8fa994a35156dbc5a2373e5e47128e59
71a583cdec72c8a82fbd8dc6967f5e66
Returns the position of the center of the screen.
{ return new Vector2(_viewport.Width / 2, _viewport.Height / 2); }
1
687d1f4c3ecbd79abadb1bc5180e1885
a1a4be699d729c016f91706c0420cad1
#check that sizes of chunks add up
class TestUtilsMisc(TestCase): def check_same_size(self, chunked): expected_size = len(chunked[0]) self.assertTrue(all([len(chunk) == expected_size for chunk in chunked]))
0
3bb0836cbf9c59cb7e213ae4aef14a8c
e54df265e923430a7cbb70fefef0ecbc
Joins path fragments into a key using the object-store specific path separator.
export class PathUtil private static _join(pathStart: string, pathEnd: string): string { if (pathStart.endsWith(PathUtil.Separator)) { return (pathStart + pathEnd).replace( PathUtil.Separator + PathUtil.Separator, PathUtil.Separator, ) } if (pathEnd.startsWith(PathUtil.Separator)...
1
fe7a44b15b4dad09e04c79afad5faf71
05b9b29eb50c53e28fb33ef68ec0a448
Verify that return value is -1, errno set to EINVAL, mbchar not written
void wmempcpy10(void) { wchar_t a[4] = {0}; wmempcpy(0, a, 1); }
0
8e4c5ffd3ef48d26c69835d9dce8f4f7
60caf149fb900bf42f51da0f255173ff
Reprint the current view.
class Database: def print(self, end="\n\n", file=None): self.__view.value.print(end, file)
1
65f48152bac7cb07fc82f8925c177137
d7cb001a7579cf2d82d6582b62c21800
Sets the next textures.
namespace Engine.BuiltIn.PostProcess public class CombinePs : IBuiltInShader<EnginePixelShader> public void SetTextures(EngineShaderResourceView texture1, EngineShaderResourceView texture2) { this.texture1 = texture1; this.texture2 = texture2; }
1
e5c9ab75cc31085849bcbb160f09edce
787ddbc80ad6d925420eae60184b9567
Add Data Menu
{ UCCrud uCCrud = new UCCrud(); uCCrud.loadCRUD(new CtrlItems()); uCCrud.ctrlCRUD.frmEdit.btnSaveAdd.Visible = false; uCCrud.ctrlCRUD.createEditor(); uCCrud.ctrlCRUD.frmEdit.ActiveControl = uCCrud.ctrlCRUD.frmEdit.tableLayoutPanel1.Controls[1]; ...
1
94be9f165e2573a7d8ef291b0774eed2
b2b26da3c395320b54d0aedd95b48f9a
AuthenticationProvider generator test
ctx := NewContext(nil) defer ctx.Close() service := newTestServiceAccount() jwt, err := service.NewFirebaseAuthTokenGenerator("TestUserId").AddClaim("email", "example@example.com").AddHeader("kid", service.GetPrivateKeyId()).Generate() assert.Nil(t, err) assert.NotEqual(t, jwt, "") validToken, err := service.New...
1
c34c1e02a6c01e27a89bc01b5e81640b
ca2aff4d92b8ed6676ed6d7d58b9da6a
Disable sprinting mode for the given unit.
void ATAM_CWCharacter::SprintOff() { isRunning = false; GetCharacterMovement()->MaxWalkSpeed = WalkSpeed; }
1
16d14563537d8fe928d453dbeaba9eb2
cdeb2b9dad16b6563d05a01f41294a30
Check if the device is a router
short type = eth.getEtherType(); return type == Ethernet.TYPE_LLDP || type == Ethernet.TYPE_BSN || type == -30398 || type == -31011; }
0
f6d874e094c2e773aed5f084dc3d7575
bdc3d74bb484a5238ffe12ee20c79c3f
Define qual método de mutação será usado
class ItMethods{ static void mutateTransIT(IT *it){ it->op = rnd.random(0,7); }
1
61ee08a86224f1e790e625411a5f5d2e
c530ca66c391c63ab8e77a15227dc0da
Adds signal strength and time to history.
t = time() self.highlight_signal_off() if not self.is_recording: return self.signals.append((self.time_press, t))
0
9117ddd5e979b9ab7d5c4ffa99e895af
3f4941f6f6f0c242cb003f538065e8c0
调用后端的单向好友检测函数#
def is_friend(u_id,u_id2): if request.method == 'POST': friend = Friend.query.filter_by(u_id = u_id, u_id2 = u_id2).first() result = [] p = {} if friend is None: p['status'] = 'not_friend' else: p['status'] = 'is_friend' result.append(p) return(json.dumps(result,ensure_ascii=False))
1
8c9af4748b294b019dc5a4f5d16f59d6
f463199dc831cbf29495e54742709933
Sends genome to simulator
{ unsigned int i, j; int tag = 1; spu_mfcdma64(&sArg, mfc_ea2h(argp), mfc_ea2l(argp), sizeof(speParams), tag, MFC_GET_CMD); spu_writech(MFC_WrTagMask, 1 << tag); spu_mfcstat(MFC_TAG_UPDATE_ALL); int myRank = (int)envp; spu_mfcdma64(in_spe, mfc_ea2h(sArg.ea_in), mfc_ea2l(sArg....
0
32b26b6aaa19f3417241cb9e760e5240
ea98850e33a621922e1694568f76c519
审核拒绝删除待审核的应答码
String srcRspCode= ""; String destRspCode =""; String srcRspCodeL =""; String destRspCodeL = ""; String srcId =""; String destId =""; String reserve1 = ""; if(this.checkOperator()) return "提交人与审核人不能是同一个人"; else{ TblRspCodeMapPK key=new TblRspCodeMapPK(); key.setDestId(getDestId()); key.set...
0
117f1e97830f3ae694cdcd0eadf319c8
652311c470df86b62be77c678bc8c9e2
Este método retorna el camino de soluciones, compuesto por los indices de los nodos ordenados por el orden de visita.
if indices_to_visit is None: indices_to_visit = list(range(len(self.matrix))) if self.home_index not in indices_to_visit: indices_to_visit.append(self.home_index) indices_to_visit.sort() data = self._create_data_model(indices_to_visit) manager = RoutingInd...
1
aba4bbfba79a0740210792566e3d5420
090ecd774371f0cbf75143a76b2335a3
Removes bonded Bluetooth devices after ending the session.
val pairedDevices: Set<BluetoothDevice> = BluetoothAdapter.getDefaultAdapter().bondedDevices if (pairedDevices.isNotEmpty() && isConnected) { for (device in pairedDevices) { val macAddress = device.address bluetoothService?.disconnect(macAddress) ...
0
a341954c8f612fd01cb0f801550d2b3c
533870ee88290c0fa26ba958d717dc4a
Función para copiar y remover contenedor descripción de recompensa y ubicarlo debajo de contenerdor de info comercio (Tablet-PC)
var cln = document.getElementById("rewInfo").cloneNode(true); var insB = document.getElementById("eX"); var parent = insB.parentNode; parent.insertBefore(cln,insB); var p = document.getElementById("secDiv"); var c = document.getElementById("rewInfo"); p.removeChild(c); }
1
b6af63d97a24d3a3fa2d6617f8931cc7
b10f557155b011fb5e4d25941cf53baa
获取点击的新闻Id
function checkNewsIsClicked(id){ var isClicked = false; if(localStorage){ var tempIdsStr = localStorage.getItem(allClickedNewsId); if(tempIdsStr){ var tempIdsArr = tempIdsStr.split(";"); for(var i=0;i<tempIdsArr.length;i++){ if(tempIdsArr[i] == id){ ...
0
a6eaf71095b1e845b08bf8c7511fd22f
80e0cab8c0581e62f72622c547f37401
Performs pointer difference arithmetic on the expression tree and returns the result
Node *new_sub(Node *lhs, Node *rhs_num_node) { if (lhs->var && lhs->var->ty->kind == TY_PTR) { Node *mul_node = calloc(1, sizeof(Node)); mul_node->kind = ND_MUL; mul_node->lhs = rhs_num_node; Node *ptr_size_node = calloc(1, sizeof(Node)); ptr_size_node->kind = ND_NUM; ptr_size_node->num = lhs-...
1
75cd0b7df5db8df0e5aa92a507e4c92f
aa183ab995a8aed52b454b269f550977
stop all sdk process on idc
LogUtils.d(TAG, "stopSDK"); String reqTime = new SimpleDateFormat(format).format(new Date()); CallManager callManager = CallManager.getInstance(); if (callManager != null) { callManager.tupUninit(); String RespTime = new SimpleDateFormat(format).format(new Date()); Log4Android.getInstance().logInterf...
1
4c1256db0af762b61cc63a6f8b59319a
634208bd35e90392a11ac617982f233c
校验工作流变量名是否冲突
List<Element> workflowList = XMLDocUtil.selectNodes(templateDoc, "//workflow"); for ( Element workflow : workflowList ) { String nodeName = workflow.elementText("name"); if(nodeName.equals(name)) { throw new BusinessException("工作流名称已存在!请更换名称!"); } } Document importDoc = XMLD...
0
96a8e70781947a9017955f1e4290a380
ffd6cbf34e2ee1fecedf4a0f839a7274
Unit test for Hand.hitMe
class TestHandAndStatus(Base): def test_hand(self): returnResult = object() class IMethod(formless.TypedInterface): def foo(): pass foo = formless.autocallable(foo) @implementer(IMethod) class Method(object): def foo(self): return retur...
0
b495361b11c88195bd07034eed59b205
e86f51faed01081a561cff4b437abae8
アフィン変換による画像の幾何学的歪みの除去
def deskew(img): m = cv.moments(img) if abs(m['mu02']) < 1e-2: return img.copy() skew = m['mu11'] / m['mu02'] M = np.float32([[1, skew, -0.5 * SZ * skew], [0, 1, 0]]) img = cv.warpAffine(img, M, (SZ, SZ), flags=cv.WARP_INVERSE_MAP | cv.INTER_LINEAR) return img
1
985d221b01b1447b3e07498d3f1986e4
fd527ee67fef474d100d2be54fb7359a
指定布局文件、{@code DrawerLayout} 视图 id、{@code Toolbar} 视图 id 并进行布局填充。
public class NavigationDrawerFragment extends Fragment public void setUp(int fragmentId, DrawerLayout drawerLayout) { mFragmentContainerView = getActivity().findViewById(fragmentId); mDrawerLayout = drawerLayout; mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); ...
0
ef71c1c591575093fdb2d2b3c428c36d
04edea5dbd60cdd231e27c2dcec6c37a
Récupère les catégories de composant disponible pour une spécification
public class SpecificationDao public static ArrayList getListeSpec () { ArrayList<TM_ComposantType> ar = ComposantTypeDao.getListeCatCompo(); ArrayList lst = new ArrayList(); try { Connection con = ConnexionBase.get(); Statement stmt = con.createStatement(); R...
1
2e13ae80e76e4ce41726b43ac9a410f0
694d5b303cd38174a751c1ebdebdb3dc
Flush and close file stream
SError IOManager::CloseStream( std::ofstream& ofstrm ) const { ofstrm.flush(); ofstrm.close(); return E_SUCCESS; }
1
5a2bf14090dd35d338d4a9dfec653dc0
0d4c5b3ed1393282ca1317c696bcd123
此键存在的个数,可用于判断此键是否已经存在等;
public class MyLinkedList private int keyCount(int key){ int count=0; Node cur = this.head; while(cur!=null){ if(cur.data==key){ count++; } cur=cur.next; } return count; }
1
9a49c3cfc2f74344105b7081883e9455
c9bec2fe33cca2cd40684d771983d848
DefaultSettingをロードする
namespace ACT.MPTimer public partial class ConfigPanel : UserControl private void LoadSettings() { this.VisualSetting.BarColor = Settings.Default.ProgressBarColor; this.VisualSetting.BarOutlineColor = Settings.Default.ProgressBarOutlineColor; this.VisualSetting.TextFont ...
1
1c63176f474d6739ac6bb94a1e656d9d
e8d734c0e3cace8346afedaf8214b8ac
Inject the configuration manager.
class TransferCommandController extends CommandController public function injectConfigurationManager(ConfigurationManagerInterface $configurationManager) { $this->configurationManager = $configurationManager; }
1
8e6ba6a0fa700ed095770f96746ae2aa
9e4a277da38c9561e1fc330a0de89dcd
获取当前sim卡运营商imsi号
TelephonyManager mTelephonyMgr = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String imsi = mTelephonyMgr.getSubscriberId(); if (TextUtils.isEmpty(imsi)) { imsi = "000000000000000"; } return imsi; }
1
5dc7e4e2f8130f85bfa15cc02ab7298f
e41a11bf615dc2bfe592616a2a4933cb
We only trace Lua functions
void lj_trace_ins(jit_State *J, const BCIns *pc) { J->pc = pc; J->fn = curr_func(J->L); J->pt = isluafunc(J->fn) ? funcproto(J->fn) : NULL; while (lj_vm_cpcall(J->L, NULL, (void *)J, trace_state) != 0) J->state = LJ_TRACE_ERR; }
1
0e4ea672d65ac08b734672552ee8c637
8bec296948e46baef04b954f9a7dcf19
只有这里返回true,springmvc才会调用handleReturnValue方法。
@Slf4j @ControllerAdvice public class ResponseResultHandler implements ResponseBodyAdvice<Object> @Override public boolean supports(MethodParameter methodParameter, Class<? extends HttpMessageConverter<?>> aClass) { log.info("ResponseResultHandler "); ServletRequestAttributes sra = (ServletRequestAttributes) ...
1
86e4d4b9b3f01db8f6b52f73ea34370a
b0c55bc8a1a9da095787d709ae2c004c
Return routes in the BGP rib for each node/VRF
class NapalmPlugin(object): def get_bgp_neighbors(self): with self._connect() as device: return device.get_bgp_neighbors()
0
3c0ff057a8f19919e6e036dc45336f5b
3885f5030ff8190d7ab35b68b7ff9517
Convert credit cards to credit card DTOs
@SuppressWarnings({ "PMD.TooManyFields", "PMD.CyclomaticComplexity" }) @Entity @Table(name = OrderPaymentImpl.TABLE_NAME) @DataCache(enabled = false) @FetchGroups({ @FetchGroup(name = FetchGroupConstants.ORDER_INDEX, attributes = { @FetchAttribute(name = "currencyCode") }), @FetchGroup(name = FetchGroupConstants...
1
3a0f635cb2d30448d36debab300bdfd7
ba6d7e6c4b8a8ed7a0c808fb350a7ee1
serve list of tournaments and process new tournament creation requests
final Map<String, String> args = getArgs(exchange); try { String table = tournament.getTable(args.get("tournament")); exchange.getResponseHeaders().add("Access-Control-Allow-Origin", "*"); exchange.getResponseHeaders().add("Content-Type", "text/plain; charset=utf-8");...
0
fb364b682d863901dc074b03ad5aedd4
4ccc1937151211cda9e13cbd1b147a89
Get the old color.
int getOldColor();
1
4f5a85e0ce2c9237b6aa5d78ec51a38e
6c9a87edc567603f1be8ea7751f5d31a
生成用户token 会删除已经存在的,并且从新生成
class User extends Authenticatable public static function generateNewToken($id) { $User = User::find($id); $User->tokens()->delete(); return $User->createToken('user')->accessToken; }
1
1a33ab713299de7dc1e503426e2c2fb5
3ac43f9b94c2216a832b3f3099f7552c
Deletes a Serverless VPC Access connector. Returns NOT_FOUND if the resource does not exist. <p>Sample code: <pre>{@code This snippet has been automatically generated and should be regarded as a code template only. It will require modifications to work: https://cloud.google.com/java/docs/setup#configure_endpoints_for_t...
namespace Google.Cloud.VpcAccess.V1 public abstract partial class VpcAccessServiceClient public virtual stt::Task<lro::Operation<wkt::Empty, OperationMetadata>> DeleteConnectorAsync(ConnectorName name, st::CancellationToken cancellationToken) => DeleteConnectorAsync(name, gaxgrpc::CallSettings.FromCance...
1
8310c5e5b6c33c14208b5b2a66204749
aadf2039d4f175b3b03b36d716b13b1b
Signals a semaphore from a task.
{ BaseType_t yield = false; uErrorCode_t errorCode = U_ERROR_COMMON_INVALID_PARAMETER; if (semaphoreHandle != NULL) { errorCode = U_ERROR_COMMON_PLATFORM; if (xSemaphoreGiveFromISR((uPortSemaphoreHandle_t) semaphoreHandle, &yield) == pdTRUE) { er...
0
a347af15aacd3932bd9b020439bc057c
8404f096a9cc665d183392782119288f
Function to process InfluxDB metics into Graphite format
str_timestamp = _convert_timestamp(timestamp) data = [{ 'measurement': metric, 'time': str_timestamp, 'fields': { 'value': value }, 'tags': { 'environment': environment } }] for tag in (tags or []): data[0]['tags'].update(ta...
0
d304eac5583a2efbc3f49ad9ec1136d1
f5f7c721c7ed5126ca02f83cd7387d02
Predictive mean and full co-variance at the locations X_pred.
pred_mean = np.matmul(filt.mean, F.T) pred_cov = dotdot(F, filt.cov, F.T) + covX return MeanAndCov(mean=pred_mean, cov=pred_cov)
1
98af5f652942f0bf3f16495224947446
4e1db8ace2c405f992ac49146413358c
从缓存中获取用户的access_key
const cache = get(options.cacheKey, storage) if (cache) { this.access = cache } }
1
6dfd2a6c3561e74dc6fa23a30272d3d2
8ae52ea7daca1abbb76cadc5f5c3daf9
Devuelve la posición del muro
class Maze: # class labyrinthe def get_mc_pos(self): return self.data.index("M")
0
e8590f0eea352ee23d98099d5e0b2bdd
15818668db2a99b3f330c6274bcd83fb
Creates a given guild bound command. This method is a coroutine.
class Client: async def fetch_guild_command(self, guild_id: int, command_id: int) -> APIApplicationCommand: return await self._connection.fetch_guild_command(guild_id, command_id)
0
1b527da34618e7f77714f6b5d550e71c
dd996837417cd82ee96b26c08fdb6eb3
Close a specific WebSocket instance using the Guid provided on creation
fn close( &mut self, ctx: &mut ws::WebsocketContext<WebsocketGateway>){}
0
a2400371cf0299b45f08ed8bbe2aa21b
1475e13c61634aeb2f97c8898285275f
獲取血量信息
this.ownPlayers.forEach(element => { this.playHpTotal += element.basicattr.GetCurrentValue(EStatistic.STATISTIC_LIFE); }); this.enemyPlayers.forEach(element => { this.enemyHpTotal += element.basicattr.GetCurrentValue(EStatistic.STATISTIC_LIFE); }); let fig...
1
e14483fcf0bd710b0f6b10ec85d7edca
af61e74eef6b713e0f76014f2909823d
Remove the leading JSON vulnerability prefix
decrypted = decrypted.replace(decrypted.split("}")[decrypted.split("}").length - 1], ""); decrypted = decrypted.replace(/[\r\n]/g, ""); decrypted = decrypted.replace(/\ufeff/g, ""); if (!decrypted.replace(" ", "")) decrypted = "{}"; return JSON.parse(decrypted); }
0
eb9ba3cd811addeac15a901b9e2a917c
f103bc530c45fdf6a7c0b1b891c39f4d
添加柜子区域
function addCabinetArea(userInfo) { const data = { area: userInfo.name, num: userInfo.num } return request({ url: '/v1/gym/cabinet_bracelets', method: 'POST', data }) }
1