query_id
string
corpus_id
string
query
string
code
string
label
int64
8834db7d367db0d1e6e16d4d2c7cfaea
04157a13422761840172e1809a36da7e
Altera os dados de uma Assinatura, quaisquer parâmetros não informados não serão alterados.
{ StringBuilder sql = new StringBuilder(); sql.Append("UPDATE tAssinaturaBancoIngressoCredito SET ClienteID = @001, Utilizado = '@002' "); sql.Append("WHERE ID = @ID"); sql.Replace("@ID", this.Control.ID.ToString()); sql.Replace("@001", this.ClienteID....
0
f60df7d5f51f0a9f9dc8e4830eafac32
f0bff1f440b834f89b8760bd03f67af1
去除特定html标签
public class DLInfoSynchronous private String removeHtmlTag(String content) { Pattern p = Pattern.compile("<([a-zA-Z]+)[^<>]*>(.*?)</\\1>"); Matcher m = p.matcher(content); if (m.find()) { content = content.replaceAll("<([a-zA-Z]+)[^<>]*>(.*?)</\\1>", "$2"); content = removeHtmlTag(content); } return ...
1
62cba6ce80a285fa338846ccf4b74c40
b84fa30bb2ec8109d95786ba4d78c633
User-based Collaborative Filtering
def content_based(): global G_TAGS, G_INGREDIENTS for user in userscol.User.find(): gooditems = list(set(user['favorites'] + user.getHighlyRatedItems())) if len(gooditems) == 0: continue uservectortag = [0] * len(G_TAGS) useringredient = {} for recipeid in gooditems: ...
0
2b00452a8abcc5a31de79a7d908b5b52
336ad51b58cdb20ce9e96896d13fd96f
Retrieves the next available permission number
namespace ShadowrunTools.Characters int Next();
0
f05c87ff064aacdb56b23c0c68278623
511e4ad64860394d482ed05c3b1cf829
秒数からmm:ss形式の文字列に変更
function toMMSS(totalSeconds) { return (stylize(parseInt(totalSeconds / 60)) + ":" + stylize(totalSeconds % 60)); }
1
6a2beb1fa23d3870127ec549ee58dbb5
b7010db68532b7dea78ff27f3578bfca
metoda služi za dohvaćanje adrese mjesta preko latitude i longitude.
public final class LocationUtils public static Address getAddress(double latitude, double longitude) { Geocoder geocoder = new Geocoder(Utils.getContext(), Locale.getDefault()); try { List<Address> addresses = geocoder.getFromLocation(latitude, longitude, 1); if (addresses.size()...
1
b0b42dd8d7c3047561985ec60649325f
fe969b999305b9729ef98afdf0049d59
SELECT 句にウィンドウ関数を追加します。
{ if( ::IsWindow( m_CodeList ) ) { CString strFunc = GetCurrentFunction( false ); if( !strFunc.IsEmpty() ) { LVFINDINFO lvfi = {0}; lvfi.psz = strFunc; lvfi.flags = LVFI_STRING | LVFI_PARTIAL; int iItem = m_CodeList.FindItem( &lvfi ); if( -1 != iItem ) { m_CodeList.SetItemState( iItem, LVI...
0
712482748a9f7897aab6e9aecbc8357b
6bb79114569bb9daba8a7fc8826c4eb8
Re-direct our output to standard error, we need to ignore standard out to hide some nasty print statements from pygame
class AutoPlay(Blackjack): def enablePrint(self): sys.stdout = sys.__stdout__
0
d9672008e6fe2c259e46e5a3cb9eb396
32b94043284304a3b52c3e3ed376bd7a
Judge whether the Plain Price textfield is invalid
boolean valid = true; if (!tf.getText().matches(validString)) { valid = false; } return valid; }
1
06f99234367c248dc68323fee231d4c4
19b7cf4543d437df661af6c68211dc39
签到线程函数
try { Connection conn = Oracle_Connect.getInstance().getConn(); signTime = SignDao.doSign(userIdForSign, conn); } catch (Exception e1) { e1.printStackTrace(); } JOptionPane.showMessageDialog(null, "成功签到!签到的时间为:" + signTime , "提示", JOptionPane.INFORMATION_MESSAGE); FrameSignIn.frameSi...
0
d1f47cecad3fc336d5a3ff494f955e02
22b2db2b9ded0e21b51317b2822cf051
Gets the degree of a <see cref="VirtualTree&lt;T&gt;"/> (number of children).
where T : class, ITreeNode<T> { if (treeNode == null) { throw new ArgumentNullException(nameof(treeNode)); } int count = 0; T parent = (T)treeNode; while (parent.Parent != null) { coun...
0
d336b909a30cee33378e50dc8cdd6a20
b8c110206dc8e2e84473303c81fe29cc
同意假期申请
public void approvalHoliday(Map<String, Object> param);
1
d23152349612e64effe219b0b279405b
4ee53a3e7745033ba4966dd6f0147402
Devolve o custo da viagem.
public double getCusto(double peso, double distancia, double tempo);
1
62396c170e0330ea5bb1f73f2fe0dd20
0942b8edd57a08d3023f05962282fda3
Finds the required product data through the provided cheerio `$` object.
page_type = soup.find("meta", property="og:type") if page_type is not None and page_type.get("content") == "og:product": product_name = re.search( "productName\":\"([^\"]+)", soup.get_text()) product_title = re.search( "pageTitle\":\"([^\"]+)", sou...
0
bf50edbef358c348a65616a07e1f2d1a
0a0951abea7d0dcf24c0b424ed614c13
Subclass should compile and send appropriate highlights data showing flow traffic (bytes on links).
public abstract class TrafficMonitorBase extends AbstractTopoMonitor protected abstract void sendAllFlowTraffic();
1
6ce5fcce6f2dff5a546f18dafc392d83
37e4c821728d70041119e25c0717aeb0
Creates an immutable copy of a {@link AbstractProduct} value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
IProduct produce();
0
8d24e017be6b4ec312379206146426dd
aeda2f88166aeb92689deada02ba1bd6
调整蓝色指示物的数量
namespace Model public class PlayerPackageDataProxy : PlayerPackageData public void DecreaseLittleBlueNum(int decreaseNum) { if (base.LittleBlueBottleNum - Mathf.Abs(decreaseNum) >= 0) { base.LittleBlueBottleNum -= Mathf.Abs(decreaseNum); } }
1
ce22d5b55cbc0256baddeb15e5bb80ac
8267f78443930db5e422c2e98050513f
Get the value of EmailUserId.
public class NotificationRecipients public final String getUserId() { return userId; }
0
ddfaa62dbfec3235374e1b7131dfcbcc
97cde06a0a3af9daba0d87840ab6a48a
设置字段Remark1的值,该字段的<br> 字段名称 :备用字段1<br> 数据类型 :varchar(30)<br> 是否主键 :false<br> 是否必填 :false<br>
@Table(name = "`t_craft_knit_method_line`") public class TCraftKnitMethodLine implements Serializable public void setRemark1(String remark1) { this.remark1 = remark1 == null ? null : remark1.trim(); }
1
78ad91959021aa31add30f1a64851250
78ea2a01327f27f195303a4988a0c88a
Set the value of the DEVPHY999_ID column.
public abstract class AbstractMapDeviceTable implements Serializable public void setDevphy999Id(java.lang.String devphy999Id) { this.devphy999Id = devphy999Id; }
1
f343c23305a03949feb0a206c4f5a383
416532cb38c2996938258ce501742fb8
Creates ticket with new key for removing participants or proactive to rotate encryption key.
$new_ticket = self::createNewGeneric($department, $contents, $subject); $new_ticket->setCreator(self::CREATOR_AUTO, $creator_full_name, $creator_email); return $new_ticket; }
0
6514b46e64099408636d27b6a93dd281
a149bc038201f8659249c7a0b1ea1807
Sanity check for the direction, make sure the direction won't turbulent too much
{ if(canPushDirection == false){ yield return new WaitForSeconds(directionCoolDownTime); canPushDirection = true; } }
0
689d509c8c4441d995d9cdd882c6c0e5
abe6be0a4ec6bcd1d149b737e17b8555
Get all archived request list in the admin
void getArchivedRequests();
1
2c6a152597d023705bd9fde9e56818c9
ff5b9fdbb9a854d184f17fe05aac755c
Statements are either functionname(3,3) a, b = functionname(3,3) Maybe in the future: a = 33 + 4 * sin(x);
ASSERT_PARSE_GOOD(parseStatementToString("void func() {}"), "(function 'func' (type 'void') (block))"); ASSERT_PARSE_GOOD(parseStatementToString("int func() { return 123; }"), "(function 'func' (type 'int') (block (return (literal int 123))))"); ASSERT_PARSE_GOOD(parseStatementToString("int? func() { return null;...
0
4dd6f914dc8e0cc4271257384616a9d6
f9b57a52bd368585a7b81cd6df39c358
Returns a dictionary with object position information
class Tracked: # This object tracks a single object that has been detected in a video frame. # We use this primarily to match objects seen between frames and included in here # is a function for kalman filter to smooth the x and y values as well as a # function for prediction where the next bounding box...
0
8d794037ad9c4952e07249663250ab0b
900011471eafa7a1d91fc80cbb661174
创建飞盘飞出的函数
var width=window.innerWidth; var height=window.innerHeight; console.log(width,height); var size=parseInt(Math.random()*30+5); var left=parseInt(Math.random()*(width-5)); var interval=parseInt(Math.random()*(7000)+4000); var img=$("<img src='images/snow.png'/>").css('position','absolute').css...
0
528cd8d6332e29cee113306fc0032276
f10344eed3e971b7742fcbddd0d91911
定义receive回调函数
void receiver_callback(void *response){ PRINTF("---ret: respcode %d\n", ((coap_packet_t*)response)->code); }
1
b4885e287464228dd8a993a83fd37d50
457ba645244a222ca9bed926fee6be8d
根据协议编号,取客户下的所有内部转贴现台账信息
namespace DrectSoft.Service public static class DS_SqlService public static DataTable GetRecordsByNoofinpatInTran(int noofinpat) { try { if (noofinpat < 0) { return new DataTable(); } string sqlStr = ...
0
adc553b3193ee5fadb59a90dcd0ca480
5a8d4d86e2dda5d5f9e14e250ae8d1b1
Creates a generator which will create a sequence of doubles starting with 0, incrementing by 1.
val nums: Sequence<Int> = generateSequence(1) { it + 1 } println(nums.take(10).toList()) }
0
7f19d064806c7a7bcbeba942a1463f03
3f4c188b03e0f2ab9698a80c664d6495
Replaces the leading coefficient in a polynomial by a given number.
{ for (int i = 0; i < coefficients.Count; i++) { coefficients[i] = coefficients[i].MultiplyInt(number); } NormPolynom(); }
0
c80810a95e86ff4e6da4592af062bd1a
ad11e57a93a3c4fccc8f4ae6d65bf606
获取在更新日期之后的客户数据
class admin_base_model extends Dbmodel public function getClient_update($where) { return $this->getOne($where, 'client_update'); }
0
d111267806cc74eb3c77ce85ea56fbf7
10f0a29c7aaa14e72d86afb27c4ebde7
Animación del fondo de pantalla al iniciar
e_btAudio.animEsconder(10); e_btLike.animEsconder(20); e_btJugar.animEsconder(0); e_logo.addTween({alpha: 0.0}, "linear", 50, function() { this.visible = false; e_logoConfig.attr({visible: true}).addTween({alpha: 1.0}, "linear", 50); }); Crafty.e("DelayFrame").delay(function() { e_btTutorial.animMo...
1
4232eb46c86f8774e3d1949bdb59fed4
e27188d069bb2febc3fd3f027f432d8f
Test EngineeringNotationSuffix pseudo-type.
match_tokens![b"TST 1V;TST 1 V;TST 'STRING' V" => Ok(Token::ProgramMnemonic(b"TST")), Ok(Token::ProgramHeaderSeparator), Ok(Token::DecimalNumericSuffixProgramData(b"1", b"V")), Ok(Token::ProgramMessageUnitSeparator), Ok(Token::ProgramMnemonic(b"TST")), Ok(Token::Progr...
1
1200c7d6bdb83e2d92f9d6c6a2358855
6ed09c3e7562260d64a64762aed51649
Enables dual-stack endpoint for Amazon S3 endpoint.
class AWSIntegrationRequires(Endpoint): def enable_acm_fullaccess(self): self._request({"enable-acm-fullaccess": True})
0
168e49aca59786957bbae07d6ea09c79
0c9f308b6eaa2e1d4bfff1b21c2acfcc
设计一个递归算法,删除不带头结点的单链表L中所有值为x的结点
{ LNode *p = L->next, *r = L, *q; while (p != NULL) { if (p->data != x) { r->next = p; r = p; p = p->next; } else { q = p; p = p->next; free(q); } } r->next = NULL; }
0
b6dfdd54760e8676b2b063870db222fc
89956aef4f08af61f7f5270233a817eb
Update the time slider according to the current movie time.
try: offset = self.mplayer.GetTimePos() except: return secs_played = int(offset) self.playbackSlider.SetValue(secs_played) self.trackCounter.SetLabel(str(datetime.timedelta(seconds=secs_played)))
1
85e4e10ec2864ebea2ed0c3c52a3ff53
3a2e68c687a5b4dc65bc87c73bb5e1d5
Determine if a message should be sent to the user. Checks the session to see whether a message with the same `key` was sent `within` the period.
return unless @conversation.contact_last_seen_at return unless last_outgoing_message&.created_at @conversation.contact_last_seen_at > last_outgoing_message&.created_at end
0
458df2a70b9787465995400f4d8b593f
ae27d62768e9dc17e16aeafef8a68dce
Returns all commits that are not merges.
public class GitFileHistory private ArrayList<RevCommit> getMergeCommits() { ArrayList<RevCommit> merges = new ArrayList<RevCommit>(); for (FileRevision fileRev : fileRevisions) { if(fileRev.getRevCommit().getParentCount() > 1) { merges.add(fileRev.getRevCommit()); ...
0
6fe75fd1dd2bee5e9a050de59644529f
5ad9fc691ac5c7961d9e9d2172a74853
获取队友账号
@JvmStatic fun getFriendAccounts(): List<String> { return NIMClient.getService(FriendService::class.java).friendAccounts }
1
2a976e0e2ad4f6606ecbd67b7b73f46c
e1079b807992c6bac8c21505d59a2df4
Overrides the basic implementation, to automatically center the label in the pane.
public class SymbolPicker extends CompositeDialogBox implements SelectionHandler<String> public void center() { symbolPalette.setSelectedSymbol(null); super.center(); }
0
f5a724b7e438b7744f06c27fe7fcb7d2
a1a63d440c5666a29c66c855f37d38ba
@brief Get all the entries with a specific destination.
{ struct bt_mesh_route_entry *entry1 = NULL; k_sem_take(&invalid_list_sem, K_FOREVER); SYS_SLIST_FOR_EACH_CONTAINER(&invalid_list, entry1, node){ if ((entry1->destination_address >= destination_address) && (entry1->destination_address < (destination_address + destination_number_of_elements))&& (source...
0
f65ea4278de33c4e3fb1f4b0c8cbc2ce
33a0363b96e965a51e67cb0e52a50278
Gets the talent's IQ level.
namespace NWN.FinalFantasy.Core.NWScript public partial class NWScript public static AILevel GetAILevel(uint oTarget = Core.NWScript.NWScript.OBJECT_INVALID) { Internal.NativeFunctions.StackPushObject(oTarget); Internal.NativeFunctions.CallBuiltIn(712); return (AILevel)In...
0
224c5a4127314f6df4d30febf4e0591b
77524fe8a6207546bf7986f800bcf1cc
Performs simple time-interval based polling.
namespace OctopusNotify void StartPolling(double interval);
1
2b9d1cc22c11533b178b0d4eaa43dc40
814e0f599d85320cb50afb6b83f37b92
Remove the unpickleable sbi-related members from this algorithm instance
class ActionableClassificationAlgorithm: def _remove_temp_vars(self): del self.m del self.action_values del self.attr_names del self.max_col_vals del self.min_col_vals del self.negatives del self.positives del self.output_file del self.run_af_alg ...
1
c2e1522f999095d18443c55a29871cf6
7e8dda70073ad817c88993c0813942cd
Decorator for parsing validation schema only once
def decorator(func): key = name or func.__name__ ROW_VALIDATORS[key] = func return func return decorator
1
6d36c8d8f03eb01903ce4e944bdd485c
bb309026455e353a9a8d91a8be22f971
Convert specific humidity [kg/kg] to mixing ratio [kg/kg]
def mr_to_rh_ice( mr, p, t) : return mr * 100. / satmixice(p, t)
0
d51a8229377057b10d1b7360184f6dc6
b68616fe64cbd619c4bebf151736af31
Get info about usual Java instance and class Methods as well as Constructors.
public class MethodInfoTest @Test public void testGetConstructorInfo() { try (ScanResult scanResult = new ClassGraph().acceptPackages(MethodInfoTest.class.getPackage().getName()) .enableMethodInfo().scan()) { assertThat(scanResult.getClassInfo(MethodInfoTest.class.getName()).getC...
1
256bbabe117789a2fef5e320d3b30f9b
3d84ce7f3081ad399925a6f1f5a0fdf4
{{{ initialize the specified friso config entry with default value.
void FrissConfig::Defaults() { m_iVersion = 6; RefreshRate = 3 * 120; RefreshAdvances = false; Lang = "enDE"; m_iIndex = 0; m_iAnz = 1; BPath path; if (find_directory(B_USER_SETTINGS_DIRECTORY, &path) == B_OK) { Feedlist = path.Path(); Feedlist << "/fRiSS/feeds.opml"; } else Feedlist = "/boot/hom...
1
7517ff7bc3d75f82fd32c7d2e7eefbc4
aec6ec5d34a1ce7d8855e23ab83e2e07
Carries out the command inputted by the user on the command prompt.
void executeCommand(Scanner scan);
1
bb40c17352f5a57164b48708c496168c
34dc3be481030863b2282b2c7d8922f1
创建 指定的clazz的默认实现类的实例,使用指定的Factory构造,如果没有任何一个实现类指定了{@link RouterService#defaultImpl()}, 则会判断 指定的clazz的实现类是否只有一个,如果只有一个则会使用该实现类构造 如果发现有多个 指定的clazz的实现类,则会抛出异常
public class FactoryManager public static Instance createClassFactoryManager(Class baseClass, String initConfig) { if (!Instance.class.isAssignableFrom(baseClass)) { String id = globalInstance.createInstanceId(getConfig(initConfig, null), ClassGenerator.getClassName(baseClass)); Object instance = instan...
0
a0ed7d490ff7a0563c8fabd6e1f7c07d
872a685118b4c25316f20c3eb07c598d
파일의 마지막 10줄을 복사하는 함수
def get_last_lines(f, num=10): size = 1000 try: f.seek(-size, 2) except IOError: f.seek(0) return f.readlines()[-num:] data = f.read() lines = data.splitlines() n = len(lines) while n < num: size *= int(math.ceil(num / n)) try: f.seek(-size, 2) except IOError: f.seek(0) return f.readlines(...
1
4010d10abb2af4ede002c397c3747a63
e4f8dbd63b36195462ddacf47163ba94
Kill all windows.
Am_Define_Method(Am_Object_Method, void, done_all, (Am_Object )) { for (Am_All_Inspector_Windows.Start(); !Am_All_Inspector_Windows.Last(); Am_All_Inspector_Windows.Next()) kill_window_proc(Am_All_Inspector_Windows.Get()); }
1
1263227ae4a9f590c9c6fa355a1d939d
18c6fa5447c88092e026d2e59d9367f5
Gets the next branches of the plot line.
{ var branches = Devices.SelectMany(e => e.GetBranchMetadata()).ToArray(); return GetVoltageBranches(branches).Concat(GetCurrentBranches(branches)); }
0
b94af30a11bccdf70e19561c83404c4b
658ac09aabb3de2594130b1cbfa5f09d
Verifies that two objects are equivalent after converting them both to sorted JSON. <p> Properties, maps, and collections are all sorted on both objects before comparison.
public static <E, A> void assertEqualsIgnoringOrder(String message, List<? extends Map<String, E>> expected, List<? extends Map<String, A>> actual) { List<Map<String, E>> e = (List<Map<String, E>>...
0
b234248501a7aed96e4b5b05feed6775
9d68b1bf29ef5e1ec79a1428e860e310
<p> Description:将业务范围实体转换成业务类型用于新增业务类型<br /> </p>
public void updateBizType(List<Long> biz, Long kamid) throws Exception { String hql = "from TKamBizMap map where map.id.TKam.kamid=" + kamid; List<TKamBizMap> bizmap = getEntityManager().queryForListByHql(hql); if (bizmap.size() > 0) { getEntityManager().delete(bizmap); } for (int j = 0; j < biz.size(); j...
1
17dadd4ee6ed4d01ca433997d6fb4d5b
a17c10183e3e0d05fa687a3d2e4cb7be
Retorna las categorias seleccionadas para la tienda.
class TiendaController extends Controller public function GetIdCategories() { $categories = CategoriaProductos::where("empresas_id", $this->StoreId())->get(); $arrCategories = array(); foreach ($categories as $category) { $arrCategories[] = $category->id; } return $arrCategories; }
1
c7d6e7c3570376b4639b7c35a11859bc
daca724d10acebd6175ec6d9823208d2
imprime en pantalla un mensaje
public class Vista public void mostrarMensaje(String msj) { System.out.println(msj); }
1
5600f3171cc1ac3df5538fe18c471a2b
d9e02a4787b3aea47290c1161d130912
Return "prenom" and "nom" for one user "id" passed as a parameter.
function full_name_from_id ($user_id) { $user_id = sanitize($user_id); return first_name_from_id($user_id).' '.last_name_from_id($user_id); }
1
7e8b9f5cab4a8fe24fad9fe4b7452702
7f61448ad6da3ef0f9cb03f40c5be655
C6
cases like (1)
0
e8b6664400e1876e4091bba25b45a656
4448a7cfcd4433da35702f8383a688b9
Este backspace es solo en el video, no cambia nada del buffer.
inline static void terminal_backspace (microrl_t * pThis) { pThis->print ("\033[D \033[D"); }
1
620c022d98732fd6125edb89418e97f3
b4fa0d873fb5c91b3d8fcdc74d8df7fa
Disables the import hook and restores the default import system behavior. This effectively breaks pluginbase but can be useful for testing purposes.
f = _enable_delta_import_mode(f) f = _disable_delta_updates_check(f) f = _disable_delta_removes_check(f) f = _disable_delta_adds_check(f) return f
0
7be645e3052558e84038c2bcb279ac73
1d184c676b3c1c81f7d2b7420a412d15
Loads the value of the preference and assigns it to the slider.
public class SoundControl : MonoBehaviour private void Load() { volumeSlider.value = PlayerPrefs.GetFloat("musicVolume"); }
1
0919528bbd7ff09b041dfa8ce23e324a
c659cae095aec5d22c9a661c651ca8cc
生成微信分享用的链接
ResponseResult<Object> generateLink(ShareDO share);
1
25764c597126505c78ff8585ad02d5be
2a583bbdb7dc168c63a130c366feafbb
Forward search, check destination is reachable from source Store all reachable states and check fix point At step t, find all reachable states after t time units Fix point: rechable(0, t) == rechable(0, t + 1) (S x Tick x Trans*)* [ REFS: '', DEREFS:]
if (transitions == null) { transitions = new LinkedList<>(); } Set<Map<T, Integer>> result = new HashSet<>(); Queue<Map<T, Integer>> queue = new LinkedList<>(); Map<T, Integer> first_state = new HashMap<>(); try { fireSecurity.acquire(); ...
1
234f51c8fee9b9a67f115ee1338219ff
0a34c570b657c278d41018f749493c92
Sets the old item order.
abstract class OrderAbstract extends \XLite\Model\Base\SurchargeOwner public function setOldShippingStatus($shippingStatus) { $this->oldShippingStatus = $shippingStatus; }
0
be7a09ce7fbdd2c08b34e77ed1eca9a6
4eb2c98483f849361e531585bd48ec21
Sums the arguments in quadrature
( const Ostap::Math::ValueWithError& a , const Ostap::Math::ValueWithError& b , const double c ) { return sum ( a , b , c ) ; }
0
0089d06a3a47bae176395342f6469df5
c4a423b9d2e88a52e031b347bfa1e0e4
添加交通工具标准
if (request ()->isGet ()){ return $this->fetch (); }else if(request ()->isPost ()){ $data = input('post.'); $this->validateCheck('Vehicle',$data); Db::startTrans (); try{ VehicleModel::infoAdd ($data,[ 'title...
1
2c4af1a33b425ed528d3244fc9cc887b
f7fd8b6481286c6fe3bf95f60bb6179e
Set the read preference.
class EMongoClient extends CApplicationComponent public function setReadPreference($pref, $options = array()) { return $this->getConnection()->setReadPreference($pref, $options); }
1
122cb3ef1eff50ca70ba557b798cd3d0
ca29aa437a61a4646e3e6cb4bf66c61e
Get product stocks from Stitchlabs ERP.
{ if (empty($secret) || empty($productRef)) { throw new Exception("Secret or productRef Missing."); } $productRef=(!is_array($productRef))?array($productRef):$productRef; $url = $this->hostURL . "/connect/stock"; $bearer = $this->generateAccessTokens(true, true); ...
1
51eab189742d5617d96db7c5bdb3c1eb
25d0d463cce7f42486dedea5970ba868
Finds all of the tweening functions and their types and adds them to the tween function select
function setupQueueFunctionOptions() { generateAvailableQueueables(); }
0
b5d5d28b5972a3595fddbade9914d0d1
fd1364c527f8f79d809e43438631212d
Returns the default paint style for the whole control.
{ foreach (var k in _defaultPaintingFlags.Keys) { SetStyle(k, _defaultPaintingFlags[k]); } }
0
d5c901dabb022bba7d1be9fdb7995c93
dcb1f22f3a87d0df9f1626e74ee15417
如果位置不发生改变,不触发更新数据事件
if (cx === this.mCX && cy === this.mCY) return; this.mCX = cx; this.mCY = cy; const pos = this.getLevel().GSCoord2Laya(cx, cy); this.setPosition(pos); this.mView.event(EActorEvent[EActorEvent.coordChanged], [ this, ...
1
79c3d3459a3d35dd5e3a81a870dd2b40
c148e021379fa81db90bd6fe5587db7c
!This function is called in order to show the dock widget in its floating status. No show() or update() !is needed in its body. !It can be reimplemented to build custom-styled dock widgets.
class CustomApp(QObject, ActionManager, ParameterManager): def setup_docks(self): raise NotImplementedError
0
65478c82ad7a0a3f05bbf8e7953efe30
d30e4bc728cfd526fe89c0d025bcf33c
Busca los tiempos en que los canales de dos canciones hicieron match.
void find_gs() { int i, len, j, lim, p, l, k; for(i=0;i<n;i++){ for(len=1;len<=P[i].len_m;len++){ lim=P[i].len_m-len+1; for(j=0;j<lim;j++){ for(p=0,l=j;p<len;p++, l++) match[p]=P[i].musica[l]; match[p]='\0'; prekmp(match,len); for(k=0;k<n;k++){ if(k!=i){ if(kmp(P[k].musica,P[k]...
0
c0615d3d1c0351fe7cb195b8f7f693d8
b9ab40068125900ade808426e12d09d0
游戏暂停,隐藏剧情界面
namespace AppRpg public class SceneGameMain : DemoGame.IScene public bool Pause() { AppLyout.GetInstance().ClearSpriteAll(); return true; }
1
6fc9f7d0bd146e2e44614938f59ef12f
a3daf00c12ee0a8ab87c47a2dbb10c0b
统计昨天发帖总数
namespace BLL public class PostsManager public int GetTodayPostNum() { return iposts.GetTodayPostNum(); }
0
ffcc0c2991927f439bbfc40e010ab325
785dfcdeb2dd15e682cead1fa82d009a
Get the $_SERVER['REQUEST_URI'] value.
class Server public static function requestUri() { return self::getServerValue('REQUEST_URI'); }
1
035ccfa310ae7e45623c55edcf0a7e6e
aaa6c03b4d7623ae8d48d2b9afd034b5
function to send a background process to foreground
bgjobL *temp = bgjobs; int status; while(temp!=NULL){ if(temp->jobid == atoi(cmd->argv[1])) { kill(-temp->pid,SIGCONT); fgpid = temp->pid; commandT* cmd_new; cmd_new = temp->cmd; delFromBg(temp->pid,cmd); waitpid(temp->pid,&status,WUNTRACED); if(WTERMSIG(status) =...
1
0633d368fdaad9b1e35ef37e6ed5d351
8b8440507ec08c681acc04f29a1e276a
読み取り専用の設定
class Memory: def refer(self): #読み取り専用のviewを取得する def immutable_view(X): view = X.view() view.setflags(write=False) return view
1
24305dc4b1c453e9939b3ed64acfb053
34e7b54756b829e887960443ba98d181
A worker function to be launched in a separate process. Takes jobs from job_q -. When the job is done, the result is placed into result_q. Runs until job_q is empty.
thread_data *tdata = (struct thread_data*)data; while (processed<1000) { job_t job; if (job_queue_pop(tdata->q, &job)) { job.fcn(job.data); delete (job_data*)job.data; atomic_fetch_add(&processed,1); } } return 0; }
0
8387ee670e05c5660de88043e9a8b384
41367aaa3737deb17bf152bfdb209637
Force closing the storage for player without displaying result (example when quitting the game)
public class ViewContext extends VirtualView public void closeNow() { player.closeInventory(); }
1
e2211d9a49e1c4a599f7a36d16d5d365
4fdf69aa7785b4b88cbf34aeb22557cf
Notifies connection manager that pairing has finished.
void onPairing();
1
e42651428cbf330d40cea8ab12b6b603
e6bbb540c89a5c7de43dd22fcf12d980
textarea에 keypress될 때마다 실행될 함수
val = e.innerHTML; var my_num = document.getElementById("input_num"); my_num.value += e.innerHTML + " "; console.log(my_num.value); repeat = !repeat; }
0
d0801998f28be43caba9c80a2ba3e3fa
038d1657dd82663ff4ef874b8d9345b2
Displays the fragment containing the reviews for a movie.
public class DetailActivity extends AppCompatActivity public void showReviewsTab() { mReviewsFrgm = new MovieReviewsFragment(); Bundle extras = new Bundle(); extras.putParcelable(Constants.KEY_MOVIE, mMovie); mReviewsFrgm.setArguments(extras); showFragment(mReviewsFrgm, REVIEWSFR...
1
062d72613fc33f85c693554a1c03398f
e84c5507a4345dbec4e513a2dbb93cc2
Set player active in the scene and ready to get player input.
void active(AbstractPlayer player) throws NewActionException;
1
f8108a04d0e67862bba88170be24ae49
bfaf20951a1f9b8e74f8ea35b213e4f2
Gets a value from standard quantization table.
val = ~val; short t = ((val & QUANT_MASK) << 3) + BIAS; t <<= ((unsigned)val & SEG_MASK) >> SEG_SHIFT; return ((val & SIGN_BIT) ? (BIAS - t) : (t - BIAS)); }
0
d046c14b2a3d0b4cf7a81a52694d3660
9bc3b03896d2c027ec1db97625306f44
指定のメンバーID、シフト種別ID, シフト時間帯、曜日に属するシフトを選択
def viewshift_func(request, year, month): if not ShiftBaseModel.objects.filter(year=year, month=month): d = { 'error': "シフトが作成されていません。" } d.update(prevnextmonth_dic(year, month)) return render(request, 'viewshift.html', d) if request.method == "POST": return r...
0
0b141f0455883cb0f1793c2d1a943857
5e0778e5182ac59888bc900e130970c7
Returns a reference to this instances achievement system library.
IOnlineAchievementsPtr FOnlineSubsystemSteam::GetAchievementsInterface() const { return AchievementsInterface; }
1
5e6af7057a012443856278d8ebe76396
39903b133da8854522555e9a2dd284a0
低速反转的方法
class Picar: def backwards(self,yanshi): GPIO.output(self.l298nPin1,GPIO.HIGH) GPIO.output(self.l298nPin2,GPIO.LOW) GPIO.output(self.l298nPin3,GPIO.HIGH) GPIO.output(self.l298nPin4,GPIO.LOW) self.speedGoverning() self.ywzq(yanshi)
1
0c92db70dd0eb4822c0cba9473c67fa2
74fe5b6f32706ceb92e78577badea6f6
按年获取积分
class SCAUZF protected function getYearScore($year = "") { $score = &load_class('score'); if($score->yearScoreExistInDB($this->studentID, $year)) { $result = $score->getYearScoreFromDB($this->studentID, $year); $this->returnResult = $result; }else { $result = $this->getRequest($this->accessUrl . "x...
1
4ff02c2dc0e38c30a77126f3521faf32
3f4aa6aa260766cb8f77d7e78d12c4d2
Handles the Click event of the enregistrerSousToolStripMenuItem control.
public class CircuitEditorMainView extends JFrame public void sauvegarderSous() { int resultat = sauvegarder.showSaveDialog(null); if (resultat == JFileChooser.APPROVE_OPTION) { File cheminFichier = sauvegarder.getSelectedFile(); path = cheminFichier.getAbsolutePath(); controller.sauvegarder(path); } }
1
4dc9c22478c0a30d82dc01da9fef6ff5
f5733db7fa0137a30c25609a0313cf53
POST /tax/voucher_types
@tax_regime = TaxRegime.new(params[:tax_regime]) respond_to do |format| if @tax_regime.save format.html { redirect_to @tax_regime, notice: 'Tax regime was successfully created.' } format.json { render json: @tax_regime, status: :created, location: @tax_regime } else format.ht...
0
5848a4f2f6e157e26cd4ce58e98e3267
ddd5672520786b1f99ceb05c6b20a3e1
저장된 위치를 콘솔 화면의 너비로 나눈 나머지로 X 좌표를 구할 수 있으며, 화면 너비로 나누면 Y좌표를 구할 수 있음
*piX = gs_stConsoleManager.iCurrentPrintOffset % CONSOLE_WIDTH; *piY = gs_stConsoleManager.iCurrentPrintOffset / CONSOLE_WIDTH; }
1
4176a83e6efa4fa051e53b18d1b9b39e
7dacc9643d814c563a9cfd894726e5a1
@brief 函数打印给定时间内任务的CPU使用情况
{ rt_uint8_t major, minor; while (1) { cpu_usage_get(&major, &minor); rt_kprintf("cpu usage: %d.%d%\n", major, minor); rt_thread_delay(50); } }
0
e12a6f6754f7c28f7238fcdf0573d5c5
305738cc6ed77ef9b77c55a6afac604d
set system mode. where mode is one of [Off, Heat, Cool, Auto]
class EvoController(EvoClimateDevice): def set_operation_mode(self, operation_mode): self._set_operation_mode(HA_STATE_TO_TCS.get(operation_mode))
1
e752def6d3f53a3add5cd9abd1637502
11f3e9152b2a1b0ebe13931fe9ae2d8c
method to cancel linking account
@ManagedBean(name = "tcart") @ViewScoped public class TaskCart extends BaseTask public void cancelMemberLinking() { showMemberDetails = false; getRc().update(UI_MAIN); }
1
e35caa3c76750721c3e326abcc650cab
0a84575af3bb126366f550a76f3fd576
Find rating by user and movie
func GetRatingbyID(ID, MovieID int) int { rating := 0 stmt := "select rating from rating_review where user_id = $1 AND movie_id = $2" err := Dbhandler.db.QueryRow(stmt, ID, MovieID).Scan(&rating) if err != nil { return 0 } return rating }
1
5eb36140636b62a8a7c59e499a907187
bf6b47ddbf40b146ddda145448616da0
Single forward step for RNN
class LSTM: def forward_step(self, x, h_prev, c_prev): z = np.row_stack((h_prev, x)) f = self.sigmoid(np.dot(self.params["Wf"], z) + self.params["bf"]) i = self.sigmoid(np.dot(self.params["Wi"], z) + self.params["bi"]) c_bar = np.tanh(np.dot(self.params["Wc"], z) + self.params["bc"]) ...
0
ee852fe6387bfda3a6357fe794621992
55349b49ba798afabb2d833496a41653
Applies new cookie values for every cookie in the 'Cookie' header (if there is a new value from the previous responses)
public class XmlUtilities public String applyUserParametersInCookieHeader( String cookiesToModify ) { StringBuffer newCookiesString = new StringBuffer(cookiesToModify.length()); Matcher cookieMatcher = HeaderMatcher.COOKIE_VALUE_PATTERN.matcher(cookiesToModify); while (cookieMatcher.find()) { ...
1
2cf0205e693ea3985002179687b52374
05660ad668defa06d2a1a228302a9c85
add block to end of list
class BlockChain(object): def append(self, data): if self.tail is None: self.tail = Block(data, None) else: self.tail = Block(data, self.tail)
1