query_id
string
corpus_id
string
query
string
code
string
label
int64
7659dd124e2fa6e8e256bf4e35746340
91cf0f1ee7296b72f635fd95fa9bc741
移動ポイント配列のサイズ変更
public class Doragon : TargetMove [ContextMenu("SetTargetPos")] protected override void SetTargetPos() { base.SetTargetPos(); posWait = new int[ targetPos.Count]; }
0
07b007e2be83130e13a3bc3d55c07382
de67c1fd69c4498eca9a9a2bbe5b8922
获取查询企业 与 对应详情超链接, 返回字典
def getComNameAndLink(item): try: comName = item.find('div', {'class': 'info-company'}).div.h3.a.get_text() comLink = item.find('div', {'class': 'info-company'}).div.h3.a.get('href') return { "comName": comName, "comLink": comLink } except BaseException: ...
1
197c30d4a87ada981818a1ac1b23544a
e08b57de5e0825e7a559eb4d599cfbb8
程序结束时释放 LogHandler 的资源,例如刷新并关闭日志文件
public class ToastLogHandler extends Handler @Override public void close() throws SecurityException { }
0
af97c9c799bb8912e220bb8922e5ebd4
16151492c2a0a6d8b6e919888792c09d
取Java虚拟机系统时间, 返回当前Date
public class GDTDate public static java.util.Date getUtilDate(){ return new java.util.Date(); }
1
c69e36c09402662dc2718bb742593282
93f0c89801e7d63cd85852d6c25925b6
Gets the visible state of component (wt_Link64)
Boolean isVisible = (Boolean) getValue(PROPERTY_ISVISIBLE); if (isVisible != null) return isVisible.booleanValue(); return false; }
1
79cb77e3785077d4f049ebc8118f0661
be023d01b87c4a5a2484b38d7dc54326
Retrieves the fields which have been added to the schema across all of the mutated rows.
public class UpdateStatement implements Statement, DeepCopyableWithTransformation<UpdateStatement, UpdateStatementBuilder>, ShallowCopyable<UpdateStatement, UpdateStatementBuilder>, Driver public List<AliasedField> getFields() { ...
0
c95c5b1c04002dd6db03f4e88fe02565
a41cc6545dd16c573af1daf776ac9cc4
根据 FullName 排序
class TeamListViewModel(application: Application) : AndroidViewModel(application) private fun sortByNames(): List<TeamsModel> { return teamsList.value?.sortedWith(compareBy(TeamsModel::fullName))!! }
1
91a724c5f9f2985e2535e6d03fd6918e
36a31f78b7b425c52f73e9d034f98e97
Check if the ewpt cache directory exists
$cache_file = Usu_Main::i()->getVar( 'cache_system_path' ) . 'cache/'; if ( false === usu5_make_writeable( $cache_file) ) { trigger_error( __CLASS__ . '::' . __FUNCTION__ . ' could not make the cache directory writeable, you will need to do this manually.<br />' . $cache_file, E_USER_WARNING ); ...
0
3aa4ce3310036ed0588187a233b3f69f
a6f2964032355d5efba80b49c8e9bf3f
Implement ARM ROR Rotate Right instruction
{ u32 offset; u8 val1 = ReadOperand8(inst, inst->Main.Argument1, &offset); u8 val2 = (u8) inst->Main.Inst.Immediat; Rol8(val1, val2); WriteOperand8(inst, inst->Main.Argument1, offset, val1); }
0
6dd8f9e4526a09e8ada67ea153694d95
4f31bb91f35b3f8df08839383fa96173
Get the NextChangeID from the DB
$str = "SELECT MAX(pc.createdAt) FROM DevBieresNantesParcoursBundle:ParcoursChangement pc"; return $this->getEntityManager() ->createQuery($str) ->getSingleScalarResult(); }
0
ebb69870a819376a3d64b0c1143636a8
d1e9ac33f2921d114293e6059357ff36
Get the dpad X-value.
class Joystick: def dpadLeft(self): return int(self.reading[55:56])
1
eaf6070f3a0f16479e3406b6cb76c811
b74ac3fd529fa5981f55936fdc3b5969
TestFixture for extension settings WebUI testing (commands config edition).
function SettingsCommandsExtensionSettingsWebUITest() {}
1
5fdb48297f9ac7def5c5a5a5787d23fc
c0da3627a6d089c38d5a0249a376a299
Verficar si el Nodo es Hoja
int es_hoja(lista_arbol *nodo){ if (!(nodo->IZQ) && !(nodo->DER)) return TRUE; return FALSE; }
1
df5bdf6c2b584d2fcfbbc70191c84c34
5740fdc3b923908ac98cf6e9c10d4df1
Wypłata dla grającego strategią 1 przeciw grającemu strategią 2.
if (sila != atakujacy->GetSila()) { if (sila > atakujacy->GetSila()) ObroncaWygral(atakujacy,dir); else AtakujacyWygral(atakujacy, dir); } else AtakujacyWygral(atakujacy, dir); }
0
125dfb274456b2d4136e7bd44d20c2bc
2b44b5d67e658a63b654b1dd01e17233
该API用于获取指定项目下所有集群的详细信息。 Please refer to HUAWEI cloud API Explorer for details.
ShowClusterDetailsRequest request) { return new AsyncInvoker<ShowClusterDetailsRequest, ShowClusterDetailsResponse>(request, MrsMeta.showClusterDetails, hcClient); }
0
cb9b61daff2ee30095ffdca0ff80ad19
647fef2baffb7dcffbbde80b2e7d6b17
Converts values to adjacency matrix
adj = np.zeros((N, N), dtype=int) for i in range(N): for n in range(N): if (i, n) in E: adj[i, n] = 1 adj[n, i] = 1 return adj
1
f7c934bf09dba0bb4b62b98dfd220288
7a05d988f9f6c2a604e55deda60849ce
将map集合的value字段(list集合)转成下划线的表字段
Set<Map.Entry> set = map.entrySet(); Set removeSet = new HashSet(); Map map1 = new HashMap(); for (Map.Entry entry : set) { String s = Map2JavaBeanUtil.transUnderLine2Upper(entry.getKey().toString()); if (!entry.getKey().equals(s)) { map1.put(s, en...
0
6e0c4e795cfa2d2d4a4a10b5e7e60374
e51dde52e1bbfeebb7ce44e5c0135d8f
Send message to all configured destinations
class PushClient public static function sendToAll($msg = NULL) { try { GatewayClient\Gateway::$registerAddress = PushClient::$registerAddress; GatewayClient\Gateway::sendToAll(json_encode($msg)); } catch (\Exception $e) { throw new \Exception($e->getMessage(),$e->getCode()); } }
1
0bab2babc32de5f901dcfc94861f2821
d31c2c8bbfadfb3072f26e8c7470bdb3
发布 qos0 消息
try { qos_uuid = qoSOnSwitch.createQos("10000000"); System.out.println(qos_uuid); } catch (Exception e) { logger.info(e.getMessage()); } }
0
eca5378281a6be01bb9ddb121f052d2b
293adcf7993a114e22dabd2c157681ce
Perform attack move for robot and return results
{ if (currentRobotAnimationList != null) foreach (KeyValuePair<SpriteAnimation, Move> kvp in currentRobotAnimationList) { Vector2 moveVector = Vector2.Zero; Vector2 moveDir = Vector2.Zero; string animation = ...
0
62e52847b930412b73192588c63b6836
1282f0742279bb05c33c8f2a12006a1e
Returns the screen size in inches. This is the screen's longest diagonal length between two corners.
{ if (ScreenDpi <= 0f) { throw new Exception("You must set screen DPI first."); } return (inches * ScreenDpi); }
0
ed79d8aaaef2bf3ba48a4759a27e16fc
bac65eab30573f5bfafe4a308a791339
Check to see if AcceptRanges property is set
{ if (res.GetResponseHeader("Accept-Ranges") == null) return true; var s = res.GetResponseHeader("Accept-Ranges"); return s != "none"; }
1
eca2fec52abe561fad3a97d1ec808f96
aa3f9f033d9a402215481aae9e2e932d
Funcao chamada para adicionar mais alarmes ao historico
{ bool aux = false; SqlConnection conn = new ConnectSQLServer().GetConnection(); try { using (SqlCommand command = new SqlCommand("Insert_Alarmes", conn)) { command.CommandType = CommandType.StoredProcedure; ...
1
37094610b6c372e06fb052f3a42bde78
5aec6d2cd46e373dd3b00adc5b14f423
checks if next token is punctuation (e. g. an operator)
public class DPInput implements ExampleInput, Serializable public boolean isPunctuation(int token) { if (punctuation == null) return false; return punctuation[token]; }
1
5799e5b2bbda9bcff0aba965c46b75b5
ad0f3e50bbf6cf85ffb9c06f0d391e65
打印验证信息到 MiniProfiler
namespace JBOFarmersMkt public class MvcApplication : System.Web.HttpApplication protected void Application_BeginRequest() { if (Request.IsLocal) { MiniProfiler.Start(); } }
0
da9e6a93ab341363541c39d055fd914d
c6ff2e2cfcc9d05a1841dfb6f02f9958
Converts a given instance of a class into its JSON data string representation
namespace SC.ObjectModel.IO public static class JsonIO public static string To<T>(T problemInstance) => JsonSerializer.Serialize(problemInstance, OPTIONS);
1
9cc0f66290e03efdc69073e8a9560cd7
66f52ebbbe809407bc3dec70cad1ab98
Returns the most played artists as a sequence of TopItem objects.
params = self._get_params() if limit: params["limit"] = limit doc = self._request("geo.getTopArtists", cacheable, params) return _extract_top_artists(doc, self)
1
931e1236fbfee1e7908d809d71e4860c
0406698a3cb052afb9387b7875b517ea
put item1 and item2 in same equivalence class.
class UnionFind: def union(self, item1, item2): self.__parentmap[self.find(item2)] = self.find(item1)
1
a83d9ec333b2ff7e1912ed7bba3de638
7c441ef00d921d9667b9b3f1f85410fb
Returns whether the element value is invalid per its {@code step} attribute.
public boolean isValid() { if (!super.isValid()) { return false; } final String valueAttr = getValueAttribute(); if (!valueAttr.isEmpty()) { if ("-".equals(valueAttr) || "+".equals(valueAttr)) { return false; } if (getSt...
1
6ebaccad5f4d6a8e302debcf2d96b103
09517cacdaa2de76e70a6d2a5be564fe
Configures OAuth credentials for Twitter4J using Configuration Builder class
TwitterAuthConfig authConfig = new TwitterAuthConfig(TwitterUtils.TWITTER_API_KEY, TwitterUtils.TWITTER_API_SECRET); Fabric.with(this, new TwitterCore(authConfig), new TweetComposer()); }
0
d39d76ef3c44f999af0ed06215661856
7b3b34ab7cf3402ad89f4d078f9c6c2d
Tests whether a scalar multiplication returns the correct value when the scalar is less than zero.
namespace SW2A304.NewsFilter.Test.MathUtils [TestClass] public class SparseMatrixTest [TestMethod] [TestCategory("unit")] [TestCategory("SparseMatrix.ScalarMultiplication")] public void ScalarMultiplicationTestWhenScalarGreaterThanZero() { SparseMatrix expected = new ...
0
0116365ad565e31f048b596ee9592b22
90fccb7e50813dbb064c836b0588c813
全体処理件数を追加します.
if (this.real_count != null && count != null) { this.real_count = this.real_count.add(count); } }
1
72e7f7f4cc258cb613f6bbd6f22c2f1a
dc790f0881d78ef4c6f2b0e57a3e9e83
收藏答案
class IndexController extends HomeController public function addAnswerCollect(){ if(IS_AJAX){ $aid=$_POST['aid']; $cid=$_POST['cid']; $flag=D('Collection')->addAnswerInfoToCollection($cid,$this->uid,$aid); $data['status'] = 1; $data['content'] = $flag...
1
fe029777fd0d57986eeb175cedcffa3e
11d290318f4f2871f2aa3e6e34cad966
执行并且返回xml格式的字符串
data = {'s': input_xml, 'x': 'y', 't': task} try: request = urllib.request.Request(self.server_url) params = parse.urlencode(data) response = urllib.request.urlopen(request, params.encode('UTF-8')) content = response.read().strip() content = st...
0
70dfe908ab68e829a3b032a7bdc756f2
d9966bca392719477c243df9081aa80c
Update Employee Task Details
export class ServerService updateEmployeeDetails(modelData) { var url = this.globals.apiBaseURL + '/api/updateEmployee/'; url += modelData.Employee_Id !== undefined ? modelData.Employee_Id : ""; url+="/?token="+ this.globals.getLoginUserToken() ; return this.httpClient.put( url...
0
7ddfbd5848e6fa549af984db12bafa57
3c31212bdd6bedacc4835faab7d1fd40
如果是奇数则返回true
if(i%2 == 1 || i%2==-1) return true; return false; }
1
93a97fbb38ce8ace44897bf7b1282b4a
f2f53f05362525742809cfeca2aa3c90
Sets/Gets audio channel mask of media format
int ITc_media_format_set_get_audio_channel_mask_p(void) { START_TEST; int nRet = MEDIA_FORMAT_ERROR_NONE; uint64_t nsetChMask; uint64_t ngetChMask; nRet = media_format_set_audio_mime(g_hfmt, MEDIA_FORMAT_MP3); PRINT_RESULT(MEDIA_FORMAT_ERROR_NONE, nRet, "media_format_set_audio_mime", MediaFormatGetError(nRet)); ...
1
5bf1c34957bc24395bdd3fca34279216
3d08640012148350a1eeb78ee2938dc4
When updating POSSIBLE_MATCH link to a MATCH we need to validate that a MATCH to a different golden resource doesn't exist, because a resource mustn't be a MATCH to more than one golden resource
List<DefinitionModel>> availableModels, Consumer<ErrorModel> el) { List<DefinitionModel> allModelsOfIdentity = availableModels.apply(model.getIdentity()); if (allModelsOfIdentity == null) { el.accept(new ErrorModel(ErrorType.COULD_NOT_READ, Arrays.asList(new DefinitionModel(model.getIdent...
1
edaa8702c69f2c2bc26583b5235fd6f1
cc4bf1dd96bed5977a3e790d51d9138f
Находим близжайшую аптечку
def get_closest_bad_apple(): min_apple = None min_dist = float("inf") for apple in game_state['apples']: if apple['type'] == "appleBad" and not at_home_enemy(get_apple_pos(apple)): atm_dist = get_distance(get_robot_pos(), Point(apple['position'][0:2])) if atm_dist < min_dist:...
0
7ee0b186e4fa63acb7ea1a8e70da4e5f
940be216219fb1f8cfb871609482de95
生成生产队列
connection = pika.BlockingConnection( pika.ConnectionParameters(queue.host) ) channel = connection.channel() channel.queue_declare(queue=queue.name) for i in range(0, 1000): task_instance = task.create_task() body = pickle.dumps(task_instance) channel.basic_publish(ex...
1
460e3ba06ddc0cd9b05f019c7033421f
123bb66126bda631afe10dc459b4817d
Clean up the scene as this trigger is no longer necessary
public class TriggerEnd : MonoBehaviour public void ResetScene() { promoScreen.SetActive(true); footballField.SetActive(false); football.SetActive(false); squadron.SetActive(false); gameObject.SetActive(false); }
1
b50ff8a07b9111940557638eac56abb1
4e756c9b485412dff989c2d6c2cd7753
Empty list should return an empty list.
class TestProductExceptSelf(unittest.TestCase): def test_returns_empty_list_for_empty_list(self): result = product_except_self([]) self.assertEqual(result, [])
1
3e0561c0d236259cd4bc769702e9c55f
c4807a0f5167b7151c04fc780bf6af34
Look for a string in the most recent email subject
for header in headers: if header['name'] == 'Subject': return header['value']
1
0b1adfb139f299e9ae49bb3be8c0b8b8
fee4127aab86cc1d41d7d62c1cc315b5
Ajoute à la fin de la liste une nouvelle liste
namespace ListApp [Serializable] class ListData : IEnumerable<MList> internal void AddList(MList ml) { lists.Add(ml); }
1
1191ccf3dd28f42ecdff4ec1e9d5987b
c52e12079f23a07dfbf0489d8026c580
登录淘宝首页
def login(): driver.get("https://www.taobao.com") time.sleep(3) if driver.find_element_by_link_text("亲,请登录"): driver.find_element_by_link_text("亲,请登录").click() print("请在10秒内完成扫码") time.sleep(10) driver.get( "https://detail.tmall.com/item.htm?id=617607737003&ut_sk=1.XMl41x6wReEDAI...
1
083d696ce81a02a0f5abd166c1c8ca18
fc4561f5f65cbc4f607a2b1f5a4b5842
Sets whether buffs appear on the top or bottom of the focus frame.
public class Args public void setTopActive(boolean isTopActive) { this.isTopActive = isTopActive; }
1
970ac2766b33fd874a4b19041f8dbeb1
7967b6ca569db8b4ca89d985beed5128
Verifica se il comando <c>Back</c> e' abilitato.
namespace RocketTeam.Sdk.Services.Interfaces bool OnBack();
0
47364ad80b6ae9261299955549d1197d
97bc00ef619a1e029d2ea121b3d6e17a
Performs ULD transaction saving for the specified ULD and for the specified parties
namespace Microsoft.Whitespace.Sync.Region public class FccRegionSync : IRegionSync public void ProcessULS() { this.ProcessBroadcastAuxiliaryStations(); this.ProcessPlCmrsStations(); this.ProcessLicensedLPAuxData(); this.ProcessUnLicensedLPAuxData(); }
0
7fd61ddaf0c68b1c86f65e63c7defeb7
f8242a186cbf3fc82d59afa56c8c1129
Checks that a given instance is not considered to be equal to another expected instance. Throws <see cref="FluentCheckException"/> otherwise.
T isNotEqualTo(Object expected);
1
d9aade4789010fd7b2df2f045df59954
3dee4c6d7336343bb97fe4a88b644d4e
根据部门管理员id查询部门管理员管理的所有部门
List<GxqptOrg> selectOrgWithManager(Long adminId);
1
ba9da7dc71e60d0abf69e835cfee28fd
3183cee02d98dc99f3772c56f3e6b0ca
Get 高精度后付费云盘折扣单价, 单位:元 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。
@Table(name = "tl_discount_price") @ApiModel public class DiscountPrice public BigDecimal getDiscountPrice() { return discountPrice; }
1
b566a0e05bbcbd53fad138eb7be6ac1a
e01d939f9f0adba4f604e89d7ad94ad9
Gets the population size parameter of this distribution.
public BigInteger getP();
0
879c23c142021d9210ff3c904f0f27aa
45d4a0d73bc002857c27b3bc565e5869
构建一组单一逻辑运算的查询条件,如全为And 或全为Or
List<Criterion> criterionList = new ArrayList<Criterion>(); for (PropertyFilter filter : filters) { if (!filter.hasMultiProperties()) { Criterion criterion = buildCriterion(filter.getPropertyName(), filter.getMatchValue(), filter .getMatchType()); ...
0
4861dcbe9df57654520e64fcca7e4b31
70c92e14da0f65c7b8ae9f9d24ef2291
Test some small hand picked example.
namespace Microsoft.MixedReality.Toolkit.Tests public class RiggedHandVisualizerTests : BasePlayModeTests [UnityTest] public IEnumerator TestRiggedHand() { var rightHand = new TestHand(Handedness.Right); yield return rightHand.Show(Vector3.zero); RiggedHandVisuali...
1
7306cf16a0ece6eb0313e1bfcccecc8e
214fcbbcb784ff79a2d4b590a43c73db
Get the value of dwellingId
{ if ($this->aDwellingChoice === null && ($this->dwelling_choice_id !== null)) { $this->aDwellingChoice = DwellingChoiceQuery::create()->findPk($this->dwelling_choice_id, $con); } return $this->aDwellingChoice; }
0
1d5b96c18372f7bb15e459c71b28eb28
64525dffa90601f1a6cd6e0703b6e2ff
是否应该更新选择面板的倒计时进度条。 新手和某个剧情副本的引导不需要。
{ return entity.counter % (int)MathHelper.Lerp( 40, 6, CInterpolate.amountOutQuadClamp(CCursor.instance.level, 5)) == 0; }
0
edba24b0bde0607a8c083124bcedcce7
6255c1207fe1326eabda125c70934cdd
Gets the current effective value of the AutomaticToolTipEnabled attached property.
namespace Microsoft.Phone.Applications.Common.Controls public class TiltEffect : DependencyObject public static bool GetIsTiltEnabled(DependencyObject source) { return (bool)source.GetValue(IsTiltEnabledProperty); }
0
2a451cd5e72c1d6aa9088e524b80e0eb
9c9df3b09379a769ff6692af5422ea3d
Calculating fuel economy
float f_consumption_gasoline { 8.8 }; int volume_tank { 43 }; double d_distance = volume_tank * 10 / f_consumption_gasoline; std::cout << d_distance << std::endl; }
1
6206452d100f7f513e407bbb33f94833
a373bda9273bc6599eebeb9f06a8f7ad
Retrieve the chosen dispatcher name.
namespace GrassVortex.Messages IEnumerable<string> GetDispatcherNames();
0
f19b96bad201916b1ebe8b03081c235c
ad27f60113cf09ae6d66a2a43c23c59c
Create a sending SMS message request.
namespace RingCentral public partial class SmsPath : PathSegment public Task<MessageInfo> Post(PostParameters parameters) { return Post(parameters as object); }
1
953c144c31838263cf054efe9174f998
a2f601f42bcc88baed37ad1162fefc27
重点人员>刑满释放人员新增
@Controller @RequestMapping("/basis/basicSituationOfPersonnel") public class BasicSituationOfPersonnelController @GetMapping("/jbxxlr2") public String jbxxlr2() { return "basis/basicElement/jbxxlr2"; }
0
2fd6b97621ef76f0cc7b43b6ec257cdf
5503d3375a46bee045289e3c9d5e387d
Get the ID of the last inserted author.
return tran.rxPreparedQuery( "INSERT INTO author (id, name, note, create_date, update_date) VALUES (nextVal('author_id_seq'), $1, $2, now(), now()) RETURNING id", Tuple.of(author.name, author.note)) .map<Int> { var id = 0 val ite = it.itera...
1
f46d7d771b6682ad40df2c72287a18d5
14b3ea7ef5242cd87e79a5a4644a157e
对图片进行过滤处理 +------------------
class Image implements IFilter function filter($file, &$error = '') { $tmpFile = &$file['tmp_name']; if (empty($tmpFile)) { $error = '没有找到临时文件'; return false; } $imageInfo = @getimagesize($tmpFile); if (false === $imageInfo) { $error = '获取图...
1
104396aeb4e86fe2a77805c0c5bc1413
71c63bd7bee875eb72fba4a688a04a0d
奇偶転置ソート
int main(int argc, const char * argv[]) { printf("Hello, ReorderOddEven!\n"); int a[] = {2,4,3,5,9,-2,-5,20}; int length = 8; Reorder(a, length, isDevide3); for (int i = 0; i < length; i++) { printf("%d ",a[i]); } printf("\n"); Reorder(a, length, isPositive); for (int i = 0; ...
0
83f8f02db05788db987add1af33789f2
fcc1e9c2d1b85b7eed6b0ad73bdf660e
Is the title displayed or not.
@GofGenFile public abstract class MirrorHuman extends Unit public boolean isTitleShow() { return record.<Integer>get("TitleShow") == 1; }
1
799f4537a910e16c711380a0f3710d75
36f48310c175fca7d4b9d0d34aaca9ac
将指定repository的文件转换成二维double数组
namespace WizepipesSocketServer class Net_Analyze_DB public static double[] readDataA(string path) { double[] DataA = Net_Analyze.getDataA(path); return DataA; }
0
c73152a18527c7f6fc41d0050d3a7057
feb6a498f23d2f04d2a0c99235ad0ea2
打ち消し線を設定します.
public class StyleInfo public void setLineStipple(short stipplePattern) { lineStipplePattern = stipplePattern; }
1
241f5f7dbbf0d42bab47dcd0fb82b740
58f7c7979679b74802ed9443b9400fce
Рисует флаг, используя цветные прямоугольники
FlagDetails flag = new FlagDetailsImpl(27, 1.5); BaseColor blue = new ColorImpl(new int[]{0, 91, 174, 255}); BaseColor white = new ColorImpl(new int[]{255, 255, 255, 255}); for (int i = 0; i < 9; i++) { if (i % 2 == 0) { flag.addDrawable(createRectangle(0, 2 * i, 27, 2, blue)); } els...
1
07f8ae2878fbd80d25257c40b563f491
ea5c49b146d8c931cf01e5f0237e3619
世界坐标转成视图点坐标
export class ViewFrustum public viewToWorldArray(pts: Point3d[]) { this.worldToViewMap.transform1.multiplyPoint3dArrayQuietNormalize(pts); }
0
382f4c4348abbf9269c73b73d4f8bde8
2e0afbe5223dabb95fd3d347758bc72f
Get infrequent access real storage
class StorageShowPublicModel extends Model public function getRealStorage() { $this->getSpec(); $group = implode(',',$this->storage_attr); if (!C('STORAGE_ZERO')) {$having = ' having quantity!=0';} if (isset($_POST['having_quantity_less_than']) && $_POST['having_quantity_less_than'] != '') { if(!C('STORAGE_Z...
0
9a84ccd43c52ac3019ea143ca52a7c0d
ca59ffff8a12b93e0e8d605532c8137d
Returns a Python object to be JSON stringified.
def to_json(python_object): if isinstance(python_object, time.struct_time): return {'__class__': 'time.asctime', '__value__': time.asctime(python_object)} if isinstance(python_object, bytes): return {'__class__': 'bytes', '__value__': list(python_obj...
1
adb311f79e62b77617033a2d18126e11
dd5661cab7ed9df4d839ecefa87f4573
Retrieve primary key from function kwargs
class CRUD(): def find_primary_key(self, df=pd.DataFrame): length = df.shape[0] for col in df.columns.tolist(): nunique = df[col].nunique() if nunique == length: return col
0
024a55ccc01ae2265a0227da7503c103
4817e9e5fd4e1bede46db325be997f7f
Function that executes the monte carlo simulations and evaluates the win prob for each move
identity_of_bot = board.current_player(state) root_node = MCTSNode(parent=None, parent_action=None, action_list=board.legal_actions(state)) for step in range(num_nodes): sampled_game = state node = root_node node,selected_state = traverse_nodes(node, board, sampled_game, identity_of_...
1
f1a7cd617a5d97867f9f57ad2a4ab6ea
f1c6ee15467ffff8e5e20e1bb876e0a8
通过正则获取对应的Key列表
public class TemplateReplace public static List<String> getTempKeys(String tempStr)throws Exception{ List<String> list=new ArrayList<>(); Pattern pattern = Pattern.compile("(?<=\\{)(.+?)(?=\\})"); Matcher matcher = pattern.matcher(tempStr); while(matcher.find()){ list.add(mat...
1
f465c2250caa2b2e423f96eb90f3059c
c434b6aceb93f2e2455cf5ff72bce02f
Get DM ID from Query String
function getDMRId ($mmdvmconfigs) { return getConfigItem("General", "Id", $mmdvmconfigs); }
0
d3515469a39b41223abca8743f683e2f
c068192116ab152be4f886a36f8e3afa
Winch mechanism motor control.
if (!holdPos) Robot::winchSub->disablePositionControl(); std::cout << "winch command time end: " << DriverStation::GetInstance().GetMatchTime(); }
1
db848df15d0a3896f141021f23e43d50
05e2b06307e8273f29ccf7b0ba9a0e89
根据商品PID获取已选择的关联商品
namespace BrnShop.Services public partial class Products public static List<PartProductInfo> GetRelateProductList(int pid) { return BrnShop.Data.Products.GetRelateProductList(pid); }
1
050a489de86d90ded27c40faaf812cde
52113ebbf3a2ec6db05f5233439f6675
Creates a fake complex row.
{ $fakeRow = []; foreach ($table->columns as $column) { if ($column->isPrimaryKey) { continue; } $columnPhpType = $column->phpType; $fakeRow[$column->name] = GiiantFaker::value( $columnPhpType, $column->n...
1
09a28095ec13db62f2e0f6f4d254ba23
b3039287f492db1b7fef51959a672482
Unit is on external power (does not include USB)
class Powercfg(IBackend): def _isAC(self): result = subprocess.check_output(["wmic", "path", "Win32_Battery", "Get", "BatteryStatus"], **self.args) for line in result.split("\n"): line = line.rstrip() try: if int(line) == 2: return True ...
1
f42e4b863c31ceb7dbea79c86bde5c61
d9e5115f8e9c989435fa6a120f58850b
newServer creates a SDSServer.
func New(c cache.Cache) *Server { return &Server{c} }
0
12e091061880174764074f750694f5b9
e5c1495026f01fad4c1ee71fa11fcaf9
Retrieves the fork callback.
int fork_handler_c() { return do_fork(); }
0
e0c0754c284b1163b88941a0837bd8a8
2096464db6faa977cea5705bc0d92af3
Sets the Destination Register field for this instruction.
class Setna(X86InstructionBase): def destination_operands(self): return [ ]
0
369629fe8cd3f32342c53d22a2b39f3f
138fc37d3454f58be50e8fa82f9e22a7
Pošle textovou zprávu uživateli.
void sendMessage(String text);
1
ffbb0ae4ed0c4844f2545dab09518170
67040cdee765882c36b1d9fe2253298d
Get the number of blocks in which the all channels are organized.
class Cluster: def total_blocks(self): return len(self.chunks) * self.encoding.n
1
7e8646de083fcb450a9b8b214a0a1fee
e18e7418246b59d98b526a380cd21a3c
Returns the updated permanent income levels for each agent this period.
class IndShockConsumerType(PerfForesightConsumerType): def getShocks(self): PermShkNow = np.zeros(self.AgentCount) TranShkNow = np.zeros(self.AgentCount) newborn = self.t_age == 0 for t in range(self.T_cycle): these = t == self.t_cycle N = np.sum(these) ...
1
c844320338012475a8c984b776ab32e4
cfcd6f1d1d3e539b2a002a2b6f35efd6
Returns one possible sequence (list). The selection is randomized.
class MarkovChain: def get_random_start_sequence(self): return list(self.model.aggregate([{'$match': {'start': True}}, {'$sample': {'size': 1}}]))
1
d190ce07447f19d8ab4a530127c6c946
1109b3d061df8093d36af3dcac8a12cd
Login with email and password depending on the email
public class LoginPresentador implements LoginMVP.Presentacion @Override public void doLoginWhitEmailPassword(String email, String password) { if (this.validarEmailPassword(email, password)) { mAuth.signInWithEmailAndPassword(email, password) .addOnCompleteListener(new OnComp...
1
a13799571158a8ab249103c535ebf301
e51302c91fc505cb3216d8d7431de694
校验电子发票手机号
@Controller public class BillChargeCtl extends BaseController{ @PostMapping("billChargeBatchCheckPhone") @ResponseBody public String batchCheckPhone(HttpServletRequest req){ return billChargeSer.batchCheckPhone(req); }
1
4211db72d5832921a7b6fbfe93dfaaed
1e4b88ef4e5ce789d085f83904eb236b
Save new instance of this resource.
abstract class ResourceAbstract abstract public function create(SerializerAbstract $serializer);
0
ed2f9b271b6d3acb421c4653dca8c8e1
68b1a22d54eadedd781ef64f0d5f99f4
Метод, проверяющий, состоит ли имя из строчных или заглавных латинских букв.
Pattern pattern = Pattern.compile("[a-z|A-z]+"); Matcher matcher = pattern.matcher(testString); return matcher.matches(); }
1
711d4ac42411b12c27528de70d56b7e1
60a6ee86a247f7866a9302ce6bd369b2
取消报名审核页面
@RequestMapping(value = "/{id}/refuse", method = RequestMethod.GET) public String auditRefusePage(@PathVariable Long id, Model model) throws SecurityException { super.addRecord(model, service.findRecommend(id)); return "cms/recmds/refuse"; }
1
3cdbafdf4c4e22400778f3fe808a1b3e
a17a61df6af83edb4ad9d372ce270dc5
opens the online version of the building plan.
{ Application.OpenURL(System.Environment.CurrentDirectory.Replace(@"\", "/") + "/" + RoadEditorUtility.GetBasePath() + "/RoadArchitectManual.htm"); }
0
665d869e9b41a35eda874c058d0a97fa
4cd9f88d475043b8e2fa8166cef7dcd4
Measure the number of first-person pronouns
class BiberText(object): def feature_51(self): pattern = "( (that|this|these|those)_DT)" num = len(re.findall(pattern, self.taggedText)) return 1000 * num / self.tokenNum
0
63e15b23838b8d3f09a192ecb1416a46
9e33d04eb2dad6db19472c0ceaa46031
find the focused item to determine the position of the popup menu
{ if( !IsVisible() || !GetFocus() ) return NULL; if( m_pCount->GetFocus() ) return m_pCount; if( m_pRune->GetFocus() ) return m_pRune; if( m_pLuna->GetFocus() ) return m_pLuna; if( m_pCron->GetFocus() ) return m_pCron; return NULL; }
1
16bb96f9baba9970428d0c06a748f994
7fca01cb331fc94229065e765dabb1eb
This component creates the box containing icons of the technologies I'm most familiar with.
return ( <div className="logo-wrapper"> <h1 id="logo-small">Your online<br /> <span className="hover">w</span> <span className="hover">o</span> <span className="hover">r</span> <span className="hover">k</span> <span ...
0
a6799a73921fee155099045934e3feb3
a4f3823048aa361b0aca8f2a3e1924e7
Access to the method used to create the popup menu items used in the Canvas Popup Menu.
namespace GorgonLibrary.Editor public abstract class ContentPlugIn : EditorPlugIn, IDisposable public virtual ToolStripMenuItem GetCreateMenuItem() { return null; }
1
700a55d0c3f469790b1c6031fc1c1c72
604713460f54fe3b4b9f1a3ff79955b6
Returns a vector that must vanish in order to enforce dynamics consistent with the manipulator equations for the pancake flipper. Based on the code provided in compass_gait_limit_cycle.ipynb (Assignment 5)
class InvertedPendulumEnv(gym.Env): def _C(self, state): x, theta, xdot, thetadot = state d1 = self.polemass_length * thetadot * anp.sin(theta) return anp.array([ [0, -d1], [0, 0] ])
0
89a2d5c00000308e797e1b3ea7879bad
48735067584ce59813ebe9c7964520e9
Record a win for the team
self.won += 1 self.money += amount seq = self.WLseq if seq[-1][1] > 0: seq.append( [0,0] ) seq[-1][0] += 1 self.WLseq = seq self.last_WLT = "W"
1
1203154d224597f7680c14b9a53d5ae6
84a1bb3327cf1e650968766600e4bc6d
2進数文字列をmembufへ展開する
int x; for(x=0; x<16; x+=1) if (s[x]) dispmem[x + 18] = s[x] | 0x200; else break; for( ; x<16; x+=1) dispmem[x+18] = 0x220; }
0
2daf682a9a758ca00d0eea17672efb81
acc0073928d953f7d8d57fa2176ea066
テスト3 : タイムアウト付きメッセージボックスの簡単な使い方
assert_nothing_raised do id = UI.start_timer(10, false) { UI.beep } if (id) UI.messagebox id else UI.messagebox "Failure" end end end
1