query_id
string
corpus_id
string
query
string
code
string
label
int64
0adf75d3bc049c6228318a156a37b9ae
213b21f7b8d2247b594d6e8fb7ae9cdb
Показать блок кнопок с нажатым Caps Lock.
{ const int KEYEVENTF_EXTENDEDKEY = 0x1; const int KEYEVENTF_KEYUP = 0x2; if (onOff) { if (!Form.IsKeyLocked(Keys.CapsLock)) { User32Interop.keybd_event((byte)Keys.CapsLock, 0xAA, 0, UIntPtr.Zero); ...
0
5f73da8e4f862084acddf83d0b9d41df
856deae90663e30b3960be4c1ba27d23
获取当前系统时期yyyy-mm-dd格式表示的字符串
public String getSysdateYMD();
1
6e36d834154f3f6bdf86b9991e8954a5
b1b1c6022ac94f0ebe785dbcea369d11
Returns replica instances for all available replicated shares.
public MetaData[] getReplicas();
1
cad02bf4a293d2ec5456fcfa8f3018cb
09f4e62409f31e1a108d88d18d062b1a
Gets whether the specified message will be handled asynchronous.
public class PeerProcessor extends Processor implements GenericSender, TopicParseInterface protected boolean isAsyncResponse(String response) { return (response.contains("\"async-response-id\":") == true); }
1
f290d7b0c738e3ae424cd5aa9f793dea
f2f35c9b32ccaed85ca5b2d725eff917
Preprocesses data through: - Fills null values with median values across columns - Cleans dataframe to drop very highly correlated variables Input: a pandas dataframe Outputs: dataframe: a pandas dataframe kept_col: set of columns to be kept in dataframe
def preprocess(data_folder): train, test, df_all = read_data(data_folder) train, test, df_all = missing_value(train, test, df_all) train, test, df_all = drop_data(train, test, df_all) train, test, df_all = categorize(train, test, df_all) return train, test
0
c98c85c66d4294108e30757762528326
84263fef2bdd4398955646741c89256e
Returns `true` if the literal is assigned `false`.
if let RealTerm::C(ref cst) = * self { if let ::real_term::Cst::Bool(b) = ** cst { ! b } else { false } } else { false } }
1
bbd24be07de2870b0e2f8289e3f1a09b
b7311af656d635d412b5114cb9044357
Converts an XML formatted String to an Array of Hashes. === Example: xml = '<?xml version="1.0"?> <user> <name>Anders Törnqvist</name> </user>' => [{ 'user': { 'name': 'Anders Törnqvist' } }]
def tagAtom(xml) doc = XML::Reader.string( xml, :options => XML::Parser::Options::NOBLANKS | XML::Parser::Options::NOENT ) n = -1 parsed = [{}] while doc.read unless doc.node_type == XML::Reader::TYPE_END_ELEMENT case doc.name ...
1
bb6c0c9577c3de5f199a44f95a77b7f2
e85a161ec38e39a2e2cb71c48f5bae5f
pop function removes the top element of the stack and returns it. If the stack is empty, it raises Stack Exception
class Stack: class linkedStack: def pop(self): if(self.is_empty()): raise TypeError("Stack is empty") else: temp = self._head ans = temp._element self._head = temp._next temp = None self._size -= ...
1
c22d21a568269082515218c5dce7ddc4
9be6f3f0d37e6ec61e817957fb78531a
获取最大的龙纹等级
let levelArr = []; let level_captain = GameData.getLevelInfo(GameData.gold_captain); let level_sparklet = GameData.getLevelInfo(GameData.gold_sparklet); let level_hook = GameData.getLevelInfo(GameData.gold_hook); let level_leavened = GameData.getLevelInfo(GameData.gold_leavened);...
0
f8b0c91d5cb3f5f4a0aef6e3389e8676
bfd5353d598262f3d3d4eea04fb83ad3
通过layerName移除要素
namespace InfoEarthFrame.WebApi.Next.Controllers public class DataEditorController : BaseApiController public IHttpActionResult RemoveLayerElement([FromBody] LayerElementAttributeInputDto dto) { var flag = _serverInterfaceAppService.DeleteLayerElement(CurrentUserName,dto.LayerId, dto.ElementId...
0
4b4f203088260a26f42bb451042af709
66a466a00e6d87271430eb5c94e62c68
creating variables to represent a permutation
{ permute_array = (int *) malloc( NUM_PES * sizeof(int) ); for(int i = 0; i < NUM_PES; ++i){ permute_array[i] = i; } shuffle(permute_array, NUM_PES, sizeof(int)); }
1
ddef3883fd5974262a7aafcd209c5902
f581eeb3ced2c27993071f5a6c72c8d2
Отправляет письмо пользователю о том, что ссылка на результат загруженна
if 'sendmail' in data and data['sendmail']: if serializer.data['is_active']: message = 'активировна' else: message = 'отключена' send_mail( f'Учетная запись на портале iggnpk.ru {message}', f'Учетная запись на по...
0
e32c387230bdb93c2f28993404826539
56107ae2b19fd723f01610995f5b1ae8
校验输入的EOS数量
DialogUtil.showProgressDialog(mContext); CheckEosAccountRequest checkEosAccountRequest = new CheckEosAccountRequest(account); RetrofitManager.getInstance().mNetService.checkEosAccount(checkEosAccountRequest) .compose(RxSchedulers.<BaseResponse<CheckEosAccountResponse>>compose()) ...
0
f0d18bb80e356c1478b6d87c9bc41a51
d8589f1cf0583cdeadc5abacd09c5b61
Get the fixture request by service_id
public function findByService(int $serviceId): array;
1
f3c275d39e9678127cbc44b6562722c3
fb250c602dad40292f7dd628562be820
Find one with the least amount of time remaining
class DecaySimulation(): def findLowestRemaining(self): tempParticles = [] for p in self.particles: if p.stable != True: tempParticles.append(p) return float(min(i.timeRemaining for i in tempParticles))
1
c0f467dd00ace986d0577c32dd6ca429
af97c3834c730c8aa6e74c2308ae126c
Returns the result of interpreting the object as an instance of '<em>Anonymous trace Options 1</em>'. <!-- begin-user-doc --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
New anonType(ParsedClassType anonType);
0
a6571789c7ba4f0dda40ef1b55e921ca
6fdb473a5d08b0f94428c57dafa47469
https://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeV10
uint32_t capability_flags; int i; uchar challenge[21]; buf_t *out; fdh_t *socket_out; socket_out = &client->fdo.socket_out; if (!fdh_is_writing(socket_out)) { for (i = 0; i < 20; ++i) challenge[i] = (uchar)rand(); challenge[20] = '\x00'; capability_flags = MYSQLD_CLIE...
1
7e9352e065ffeddb1c0566a4f462f2e6
689a0fa4cd4a6f55d71d3b547e2bdf9b
Vowel
def isVowel (char) if (char=="a" || char=="e" || char=="i" || char=="o"|| char=="u") true else false end end
1
f3da03f392e94e7445ff975a54793622
ef13d43d58798c5d89e9e8e7674fb179
Handle requests to retrieve the info for a single light.
{ Http::Client *client = new Http::Client(); const Http::Message response; client->done().connect(boost::bind(&LightBulb::handleHttpState,this,_1,_2)); ss<<getId(); if (client->get(Bridge::generateURL(bridge)+"/lights/"+ss.str())) { WApplication::instance()->deferRendering(); } }
1
07a19dece28d49c57adfa9b838b6836f
3936ad85e1abfaa278d9718f86e54427
Fragment örneğini korur. Yani ekran değişimlerinde her seferinde onCreate olmaz
class SummaryFragment : Fragment() override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) }
0
8298bdfd2eca5fb7028e7b92c07602fc
1af149a564b89f7e1c381f58bbb2ca08
重新组织zTree节点结构,以便配合样式文件显示表格样式
function formatZTreeData(arr) { var zNodes = []; var flag=null; for (var i = 0; i < arr.length; i++) { var iconStyle='diy-group'; if(arr[i].pId == '0') { iconStyle = "diy-program"; }else { iconStyle = "diy-group"; } if(arr[i].pId=="0"){ flag="0"; }else{ flag="1"; } zNodes.push({id:arr...
1
6928e1f0f4861416163ca8079765204a
43efe55ca520fe86071132fcd75a7118
关闭打卡提醒
closePerformance() { this.setData({ alertperformance: true }) }
0
e17ebb0b328ac6aba0b001f193389d69
04b7f36a0ff4dcd53e3d93eca9c38550
Retrieves the messages associated with the current shopper's cart.
namespace VirtoCommerce.Client.Api ApiResponse<VirtoCommerceCartModuleWebModelShoppingCart> CartModuleGetCurrentCartWithHttpInfo (string storeId, string customerId);
0
90d156c52596182878c70df6134024b8
96be17d64ce84098c31910a9836a3fa8
双指针node1、node2分别指向两个链表,然后同时分别逐结点遍历 当node1达到链表headA末尾时,重新定位到链表headB,node2同理 当node1==node2时,即所指的结点就是第一个公共结点
if not headA or not headB: return None pA = headA pB = headB jumpA = True jumpB = True while pA != pB: if pA.next == None and jumpB: pA = headB jumpB = False ...
1
d3d84b349c371a159ccdd8c6e067cfc7
5e331f66b4237846ab509ab92906233b
Sets the selected query via simulated UI interactions.
class TestSearchView extends Search.SearchView.SearchView triggerSearch(query: string, matchCase: boolean, isRegex: boolean): void { this.search.value = query; this.matchCaseButton.setToggled(matchCase); this.regexButton.setToggled(isRegex); dispatchKeyDownEvent(this.search, {keyCode: UI.KeyboardShortcu...
1
4b83e199ca8a0272df6405d8e56226ad
dc92d951038bc43657a78ef62f39b276
Converts this Graph object to an igraph-compatible object. Requires the python-igraph library.
class Graph(object): def normalize(self): return Graph(obj=lib.graph_normalize(self._obj))
0
fa75ca123c390d390e8f7d91c3784fb6
9a9a9c5764992e11634d98e63a75045a
Returns a filtered version of the word list with words only containing 6-8 characters.
def get_word_over_six_let(incomingText): outputSet = set() incomTextList = incomingText.split(' ') incomTextList.sort(key=len ,reverse=True) for word in incomTextList: if len(word) > 6: outputSet.add(word.lower()) else: break return outputSet
0
f9435657b6046b53af654725cbc63475
e05f3db6944ae5a09aa0ba723cfa69f6
Скачать каталог.
$file = $dir.'data.xml'; if (true == $ch = curl_init()) { curl_setopt($ch, CURLOPT_URL, 'https://b2b.treolan.ru/processlogin.asp'); $fp = fopen($dir.'Page.html', "w"); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false)...
1
075e77a261454314d6ecb99aa1a5354e
0d5af25fbdd753bb3c2018235038f4d4
gets the size of volume in bytes
class Volume(object): def size(self): return self.fsize
1
8d9d64ae610dcf3d5f8a26cbce4a461a
1d81196d5a17297f1da263307ef292e8
The first connected client will be the active one and notifications will be sent only to him. After receive active connection index advertising is disabled for other clients.
new Thread( () -> { listenerActive = true; Response response; do { response = client.nextResponse(); if (response != null) { if (!(response instanceof Ping)) { ...
0
8a50f7c37f5e71398af019bd2f15f6fd
81aeb55b9b702c4a76e01bf21ce749d0
Flask 请求成功时返回的信息模板
def response_success(content=None): try: assert isinstance(content, dict) res = {"response": content} return jsonify(res) except Exception as e: return response_unexpected(e)
1
1a75d2e30c583231dab0d935d787c673
942f2db73041eca6489bfd8b4e98a9d0
配置继承自DomainTreeEntityViewBase&lt;TKey, TEntityView , TIdentityUserKey&gt;的实体视图
{ if (!EntityNoKeyTypes.Contains(entityType)) return; entityBuilder.HasNoKey(); var configure = (Activator.CreateInstance(entityType) as IPrivateEntityNotKey); entityBuilder.ToView(configure.GetName(), configure.GetSchema()); }
0
6182837707bebf182da515f2c7394039
4ad50e7e3e91914eeabb9041c4c48814
执行软件安装
class InstallCommand extends Command public function handle() { if ($this->confirm('Start install? [y|n]')) { $this->createEnvFile(); $this->createDb(); $this->loadFiles(); $this->publishConfigs(); $this->loadFilesAfterPublishConfigs(); ...
1
9a033ba62382a5564f452e347a817f71
e4ec8e420ddc05799772cc5e8047e149
Swap src and dst ip
src_IP = packet[IP].src dst_IP = packet[IP].dst src_MAC = MAC_for_IP(src_IP) dst_MAC = MAC_for_IP(dst_IP) packet[Ether].src = src_MAC packet[Ether].dst = dst_MAC packet[IP].src = src_IP packet[IP].dst = dst_IP print("src_IP : {}, dst_IP : {}".format(src_IP, dst_IP)) send(packet, ...
0
80d73c2cd2be0c042d8a70e4688d2e72
2379b24fa40526ac29caeab458cd6282
An observable list of users.
class UserData extends TatorElement getUsers() { return this._users; }
0
9d8028e5cdcc92b03e23b815bd7ef424
00fffaf7cf2c82a5d40f526d1e754012
给字符串首尾加上反引号(`)
def surround(text, quotes): return quotes + text + quotes
1
74d071cf094a97c781eefa28d83b7d49
7edc7dd351c5eb05f6f1ae136aa037f5
Are we in a web environment?
class Module(object): def is_web(self): return self._app is not None
1
6747f95ceba5fe3f0e85cb6086faa321
99a198c6a00e5a252c612a4404911d4e
初始化 [收支描述] 简述内容
{ this.cboxAccounts.Focus(); if (TypeHelper.TypeToInt32(this.cboxAccounts.SelectedValue, 0) <= 0) { this.txtDescAccounts.Foreground = Codes.ToBrush.StrToBrush("#C80000"); this.txtDescAccounts.Text = "请选择正确的收支账务账目"; this.IsVerify...
1
4ee9d3201a75db57518c752cc63dd7ea
d89933223cc686fb9c796140a6a17e60
Se ejecutará cuando cargue la página. Llama a función para crear el tablero y crea el evento para comenzar la partida cuando se pulse el botón Play y el de aumentar el nivel cuando se pulse sobre Nivel
nombre = getName(); addEventClickListener(); chronoStart(); getfallos(); getBonos(); mostrarfallos(); mostrarBonos(); addEventSubmit(); addEventClickBono(); comprobarCartas(); autoGuardarPartida(); }
0
805c46e2ce7e64826b4dfb16326cc912
b1d0665fdc81134b53419471f44dd99d
Called from the debug engine's Detach method to remove the active (bound) breakpoint instructions.
TEmitter Break() => Emit(OpCodes.Break);
0
20005aaeaa7f10774a0c4afd8667c6e6
e94154daa94b98a79d280e7190161c6f
生地仕入情報を画面に反映する
{ DB::beginTransaction(); try { $BushoCd = $request->BushoCd; $DeliveryDate = $request->DeliveryDate; $SaveList = $request['SaveList']; foreach($SaveList as $SaveItem) { $BushoCd=$SaveItem['key部署CD']; $OrderN...
0
969f7ea283c2fb5616df094693d67e81
70ba83121dbf3ebedb607b741c4471be
Restrict user from entering '-' on IC
{ if (e.KeyChar == '-') { if (textBox.TextLength > 0 || textBox.Text.Contains("-")) e.Handled = true; } else if (!(e.KeyChar == '\b' || (e.KeyChar >= '0' && e.KeyChar <= '9'))) { e.Handled = true; ...
1
55187b4a12ecc8726771eeefce5f69c3
bf21c89abb12ed122000631fa386b9d5
This method is used to prevent StackOverflow Exception during data initialization. When object is in initialization mode, the lookup mode will not trigger the OnPropertyChanged event.
{ if (this.oldDataClass == null) { this.oldDataClass = new DataClassWithValidation(); this.oldDataClass.boolProperty = this.boolProperty; this.oldDataClass.dateTimeProperty = this.dateTimeProperty; this.oldDataClass.intPrope...
0
0d9e85b8f163e4d103dedfd37250a7f4
f6ba90423f05e1432e23f195f10bb49d
Sets the index to the default production index
namespace Sound public partial class scratchWaveRaw public void GrainIndexReset() { _grainIndex = _grainIndexdefault; }
1
e9c4434d49f1a06fa6fc72994a810031
42f94226c9c4a67ec1a1d2459a6243e9
MOV.W @Rm,Rn
void MOVWS (unsigned long m, unsigned long n) { Write_Word(R[n], (unsigned short)R[m]); PC += 2; }
1
78880df83bd135e435fcc6420552f816
ce6a25962ebcf8b9f3ad6b6e003f913b
Verifies spacing around a <c>]</c> character in tuple types and expressions.
namespace StyleCop.Analyzers.Test.SpacingRules public class SA1011UnitTests : CodeFixVerifier [Fact] public async Task TestClosingSquareBracketMustBeFollowedBySpaceAsync() { const string testCode = @"using System; public class Foo { public int[]TestMethod(int[]a) { int[]i...
0
9a3cd754a53666899a48177427a42172
d86c23b41e98aef6db8647152146eeb9
Dosyadan seçenek adedi ve isimlerini okuyan fonksiyon
with open(lst) as f: files=f.readlines() files=[f.rstrip() for f in files] f_len=len(files) return files,f_len
1
baa6a9784b114c12d19858256c7c5046
c0ca418e4606435baf623147582afa2e
# Get the XML tag name of an XMLNode object
get_name(VALUE self) { xmlNodePtr node; Data_Get_Struct(self, xmlNode, node); if (node->name) { return NOKOGIRI_STR_NEW2(node->name); } return Qnil; }
1
b8fa5dba89d356c7e167198d237d25ad
c8ef0a1db9e3b2e95a31ffdafaa7a2b9
Calculate average and standard deviation for acceleration meassurements source: HowToExtractPeaks.html
if len(path) < 2: return [0, 0] spds = np.array(getSpeeds(dt=dt, ignore_z=ignore_z)) return (np.mean(spds, axis=0), np.std(spds, axis=0))
0
b059bf7292fb9e5a8467991241d8c9bd
e12086d20e0c1e7a76737e9070821eb1
Unwinding superblock updates for old filesystems. See ffs_oldfscompat_read above for details. XXX - Parts get retired eventually. Unfortunately new bits get added.
4778 readsb(int dev, struct superblock *sb) 4779 { 4780 struct buf *bp; 4781 4782 bp = bread(dev, 1); 4783 memmove(sb, bp->data, sizeof(*sb)); 4784 brelse(bp); 4785 }
0
b3c26ce787a6f81301d512cbe09d1f22
c162709191d1cba6b43adba7a8d957c3
Génération d'un tableau des ustensiles, sans doublons
class formationList _get(rows, tag){ let set = new Set(); let i; for(i = 0; i < rows.length; i++){ set.add(rows[i][tag]) } return Array.from(set).sort(); }
1
9bc0f1d44a2390234c2c06c32812d660
0d131b6c850159a8bbb4e57a0bc9acc5
Display a listing of the Exchange.
class ExchangeController extends Controller public function index(Request $request) { $query = Exchange::query(); if ($request->has('q')) { $query = $this->filterExchanges($request, $query); } return view('admin.exchanges.index', [ 'exchanges' => $query->get(), ]); }
1
f243929096d833c7b554224cba678527
b23cc29f6351bd3ecb651621cfde2e84
获取vip数据并存储到数据库中
local vip_data = agent_vip.get_vip_data() if vip_data then local id = 0 if vip_data.vip_level == 1 then id = COMMON.mission_type.VIP1 elseif vip_data.vip_level == 2 then id = COMMON.mission_type.VIP2 else id = COMMON.mission_type.VIP3 e...
0
7ed92e0c7b2e5a8fa0ebdcce3a798d83
3bee14da52c6995602813979de68f593
Remove a failed node from the network.
namespace Zensys.ZWave.Devices IDeviceInfo RemoveNodeFromNetwork();
1
2103f5e5e6c68b1b1cbc9e82894e8407
e54bd51fcef0fc0e425fc00b589feda9
Setup the odometer.
Odometer::Odometer() { }
0
9bc38b315fb46738360cd2d8320c48e9
7d9723a21373a2a63bfc1c18e114e121
Вернет все шаблоны для текущей языковой версии и текущего домена. Метод с кеширование результатов.
{ $sites = CSite::GetList($by="sort", $order="desc", Array()); while ($arSite = $sites->Fetch()) { $dbSiteRes = CSite::GetTemplateList($arSite['ID']); while($arSiteRes = $dbSiteRes->Fetch()) { $u_templates[] = $arSiteRes['TEMPLATE']; } } $u_templates[] = '.default'; $templates = array_unique($u...
0
b54bb1aa99a4b0ca3556deed0f93bf26
9ddbab8a5382fdcfe021962b8db4060f
Perform depth test on depth buffer (write new z if successful).
if (pz >= ZBuffer[px,py]) { if (IsZWritting) ZBuffer[px, py] = pz; return true; } return false; }
1
341331ed75c8ef16c1648645142d9c0b
77c74bb36bc4b087722372947819a06e
Immediately after getting or setting a value, should a locked object commit the active event's operation? (True for non-atomics, false for atomics.)
{ SCODE sc; sc = (0L == g_cObj && 0 == g_cLock) ? S_OK : S_FALSE; return ResultFromScode(sc); }
0
5bcf12c3c0ba3d1c48c298c9f5c0d4dd
482f7224228db35373ae04ef1d50ce31
Applies values and default_values to a potentially nested workflow.
for key, value in real_values.items(): default_value = default_values.get(key) if (default_value and isinstance( value, dict) and isinstance(default_value, dict)): _deep_merge(value, default_value) for key, value in default_values.items(): ...
1
25acf1e21d7204fedcbc90ee15a7a703
084cd1969dda5009d7c18a34cbc72006
Returns a uvr1611 packet from a list of bytes or an error.
buf: &'a mut Buf, limit: usize, masked: bool, ) -> Result<Option<(Frame<&'a [u8]>, usize)>, ErrorEnum> { use self::Frame::*; if buf.len() < 2 { return Ok(None); } let (size, fsize) = { match buf[1] & 0x7F { 126 => { if buf.len() < 4 { ...
0
4c006f6457e3aa0eb54e75e8a3a4028c
a2f36fa8c8ee7a9cebebc30366eaeba5
Parses the tracker output and updates own state
State $state, ContentMetadataCollector $parserOutput, bool $isPreview, ParserFunctionTracker $tracker ): void { foreach ( $state->getUsages() as $key => $count ) { $name = 'kartographer_' . preg_replace( '/^map/', '', $key ); $parserOutput->setPageProperty( $name, (string)$count ); } $tracker->addT...
0
b2b03d51e3bdeb628f1589084bd17370
7e1c2dd74f8f77d4acde25aa00cff0c3
Reads beer data from supplied csv files, initializes DB.
global _bottle_types_db, _inventory_db, _recipes_db, _venues_db, _events_db fp = open(filename, 'rb') loaded = load(fp) (_bottle_types_db, _inventory_db, _recipes_db, _venues_db, _events_db) = loaded fp.close()
0
417c8e5f5bc57a2e188549d7946deef0
9f4be85cadad171de74c9b0e211c0ed8
如果是6.0或以上,并且没有全部权限授予,就请求权限
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) { login(); return; } if (!checkPermissions(needPermissions)) { EasyPermissions.requestPermissions( this, "为了应用的正常使用,请允许以下权限。", 0, ...
1
102699ef8956aa5f79c1765483a1693c
7510e4a7cc9d1f4540404bf7b4e3d6ae
Generates the canvas of the appropriate size and attaches it to the main jFrame for the emulator.
final JFrame f = new JFrame("Custom Colour Scheme"); final JPanel customP = new JPanel(); f.add(customP); customP.setLayout(new GridLayout(13, 3)); JLabel background = new JLabel("Background"); JLabel gradedarea = new JLabel("Graded Area"); JLabel clearedarea = new JLabel("Cleared Area"); JLabel clearwa...
0
0c7cb5f1c54f1c35093b48850d25d161
3a22a84d03002366435a3a05502e245a
Validate and Store Shelf Life Related Data
{ if (!Tools.ValidateH1(tb_h1.Text, _units, out double h1)) return Tools.ValidationError(tb_h1); else { Tools.ValidationSuccess(tb_h1); H1 = h1; img_t1.Visibility = (Tools.ConvertSpecifiedUnitsToKm(H1, _units) <=...
0
65b96bdd99ad5256fefcf838165df177
71ee72eef3121fbbc969b9c3e3608a87
Evaluate a query expression.
class Client: def eval(self, query, format = None, mode = None, maxtime = None, counting = None, count = None, first = None, library = None, raw = False): assert format in ("items", "xml", "html", "xhtml", None) if mode is not None: assert format == "items" assert...
1
e70259da85acac6953f00e67ff65f0b5
caa453ebd1c5de4ff1c70eded0d48103
Unfold by using the pseudo inverse obtained by a least squares fit.
for i in xrange( B.ndim ): B_i = unfold( B, i+1 ) U, S, Vt = svd( B_i, full_matrices = False ) S -= thresh/B.ndim S[ S < 0.0 ] = 0 B = fold( U.dot( diag( S ) ).dot( Vt ), i+1, B.shape ) return B
0
c9c421d4cf6fa73e0278605aad1bac86
46bf1c036e4b20950fce1e13e7d30c9f
신문의 헤드라인을 편집하기 위해, 주어지는 문자열의 알파벳 소문자를 모두 대문자로 바꾸는 프로그램을 개발 중이다.
{ String s = "try hello world"; StringBuffer buff = new StringBuffer(); int j = 0; for(int i = 0; i < s.length(); i++) { char c = s.charAt(i); String st = Character.toString(c); if(st.equals(" ")) j = 0; if (c >=...
0
47f3ecbaa05dd41a6a735c99cb278631
ec03797223a97ae3dc24626ee38c6400
부모 게시글 ID을 가져옵니다..
String sql = "SELECT mb_id FROM write_" + table + " WHERE wr_id = ?"; try { connect(); pstmt = conn.prepareStatement(sql); pstmt.setInt(1, wr_id); rs = pstmt.executeQuery(); if(rs.next()) return rs.getString("mb_id"); } catch(Exception e) { e.printStackTrace(); } finally { try { if(pstm...
0
185155cae83c37fc074fc6f14f9ce5f8
d994c33e6e6ca3a11eb30cc9962d74cc
Gets the timeline of the user with the specified <code>userId</code>.
public List<TweetsImpl> getTimeline(Integer userID);
1
cf708d88a37ca2e17b112a8d97035473
a41832ad8d6af05e772ca2b0fc1ca8e0
计算三角形外心 返回:外接圆圆心
let a, b, c, xa, xb, xc, ya, yb, yc, c1, c2; let temx, temy, r; a = this.distanceBetweenPoints(points[0], points[1]); b = this.distanceBetweenPoints(points[0], points[2]); c = this.distanceBetweenPoints(points[2], points[1]); r = a * b * c / this.triangleArea(points) / 4;...
1
90ebae8dc0fb6f8133650b385abb0782
e9dbc54d0b9db99e828c7f7e5d939061
关闭支付通道
class Cgroup extends AdminController public function confirm() { $get = $this->request->get(); if(empty($get['pid'])) return __error('请选择通道!'); $p_id = $this->model->where(['id'=>$get['pid']])->value('p_id'); if(empty($p_id)) return __error('该通道未选着支付产品!'); $ChannelProduct = new ...
1
61ef6ff19872274ec31e21f0ca004380
7df8b26aba33d2fd405b7af41ccfa73c
When implemented restores site collection under given url from backup.
namespace WebsitePanel.Providers.HostedSolution public class HostedSharePointServer2013EntImpl : MarshalByRefObject private void DeleteSiteCollection(Runspace runspace, string url, bool deleteADAccounts) { var command = new Command("Remove-SPSite"); command.Parameters.Add("Identity",...
0
eb897d0c47c0a4fdf90eb4830ea9f85c
826ee4812412cc449a44b41ffc8eab12
Gets the Objects attached on the Player
public class PieceObject public LinkedList<GameObject> getActualObjects() { return this.actualObjects; }
0
3055dd1332b8499b94dae7686185d84b
1aca3bbbc758d92b3c3f10e0c3e80a68
Consumes and processes metadata scan requests from a pending requests queue and updates existing metadata objects based on newly scanned metadata.
ImportReport executeMetadataPull(String url);
0
325dafd3726b8cc80f346d30888a989b
c35199ca5a53b4fd19d90bb35398bca7
Verifies that a ray starting behind an absolutely positioned disc causes no contacts to be returned by the intersection detector
{ const auto r = Ray(Point(0, 0, -5), Vector(0, 0, 1)); const auto shape = GetShape<Sphere>(); auto i = Intersection(4, shape); i.prepare_computations(r); EXPECT_EQ(i.time(), 4); EXPECT_EQ(i.object(), shape); EXPECT_EQ(i.point(), Point(0, 0, -1)); EXPECT_EQ(i.eyeV(), Vector(0, 0, -1)); EXP...
0
9c86badf73089cc0dd65ee5f62d23879
e93764abd3302c75e74f61b1659783c5
This function randomly orders the list of kings. This function is only really needed in the King Deck (rather than in Deck) because in Deck, the order of cards doesn't matter, as they are randomly selected when drawn. In the King Deck, the order matters, so a shuffle function is needed.
{ int k[21] = {adventurer, gardens, embargo, village, minion, mine, cutpurse, sea_hag, tribute, smithy, duchy, council_room, feast, remodel,baron,great_hall, steward, ambassador, outpost, salvager, treasure_map}; int * k2 = malloc(sizeof(int)*10); int i = 0; int numCards = 21; int cardNumber; for(; ...
1
5dd67e5daef2c9de6ae7789e355c7b13
10e420641d342de1fbcf680cf0c18c45
decrease boss level
$this->level--; if ( $this->level < 1 ) { $this->level = 1; } }
1
ef187a43b18439c58d06ab91800e6573
e7edaafec1b28e0db60252fadbb6518f
Should return HandBrake option string when subtitle_burned is set to subtitle.
class TestSubtitleBurned(unittest.TestCase): def test_subtitleBurnedGetter_setToSubtitleBurned_returnsHandbrakeOptionString(self): self.Encoder._subtitle_burned = 1 result = self.Encoder.subtitle_burned self.assertEqual(result, '--subtitle-burned 1')
1
dd2dcc9186b32f1aded645b6aa608189
6b9cabe8149f70bbfd94d68593572dd1
01背包问题 一维数组求解
int w=weight.length; int v=value.length; int[] dp=new int[total+1]; for (int i = 1; i <=v; i++) { for (int j = total; j >0; j--) { for (int k = 1; k <= numlimit[i - 1]&&j>=weight[i - 1]*k; k++) { dp[j] = Math.max(dp[j], dp[j - weight[i -...
0
498a62c10852afa907dcfed775a23c24
b3a09082d976bba2750c825c93f48e8c
computes the Euclidean Distance of two points in n-dimensional space
def euclidDist(pair1,pair2): return ((pair1[0]-pair2[0])**2+(pair1[1]-pair2[1])**2)**0.5
0
1129cfc0a4010eeeabe10980f208a26e
6cda1082fe49e1140f14f606dabd7011
Get supported encryption algorithms.
public Set<JWEAlgorithm> supportedAlgorithms();
1
31dbbe818a10762bf47fee66a05d21ba
e200e90060f88dff95bab6222b21968d
Check if current balance covers amount to be withdrew
function haveEnoughCash(to_withdraw: number) { return to_withdraw <= calculateTotalRemainingCash(); }
1
389d0b639f02c28429923423e1a54f61
1c0d4542aee0094ee196ee4fa8f4d73e
Enable PIOD interrupt
void ppi_enable(void) { HARDWARE_LOG("ppi_enable %d \r\n", (int)reading_period); #if (defined(NRF52) && defined(PROBE_BUILD)) || defined(PPI_PERIOD) reading_period_gpiote_enable(); reading_period_ppi_enable(); #endif }
0
c7b021ae75b8870089c514d6ecfc3944
48efa2ae42a48dff7194814bf5a7ea62
Gets the resources by lesson identifier.
return await Vue.axios.get('/auth/notes/lesson', { params: { slug: lessonSlug, limit: state.limit, offset: state.lesson.notes.length } }) .then(res => { commit('SET_LES...
1
ff26f0d559071da2fe1dbabcb09e2e02
43988f1a97113deb8527168536e2454a
按stuId查找并返回索引
if (curIndex >= h->size) return -1; if (h->list[curIndex].id == stu->id && strcmp(h->list[curIndex].name, stu->name) == 0) { return curIndex; } int l_index = -1; int r_index = -1; if (curIndex * 2 + 1 < h->size) { l_index = findHeap(h, stu, curIndex * 2 + 1); } if (l_inde...
0
b382c5c78645621838742cc35b6e8981
9666ff33efb9c9c38ee0311e1f1c423a
FeedbackService constructor.
class FeedService public function __construct(EntityManagerInterface $entityManager, ContainerInterface $container) { $this->entityManager = $entityManager; $this->container = $container; }
0
1b8fdb84b79cc408a115e77882f1d0f2
ecbd7b9b9368ac7ed21d683d50a6a539
set interrupt disable flag
void AS7261::disableInterrupt() { uint8_t value = virtualReadRegister(AS726x_CONTROL_SETUP); value &= 0b10111111; virtualWriteRegister(AS726x_CONTROL_SETUP, value); }
1
770aff35e6cc15b92c1f0a1d75d965e7
916a38661dbf5adbe0945d7f553bc781
Submit a search for a given workspace. The response will contain an id to track the search. User can use the id to poll the search status and get the full search result later if the search takes long time to finish.
namespace QBittorrent.Client public partial class QBittorrentClient : IQBittorrentClient2 [ApiLevel(ApiLevel.V2, MinVersion = "2.1.1")] public Task<int> StartSearchAsync(string pattern, IEnumerable<string> plugins, string category = "all", CancellationToken token = default) { if (pattern...
1
c601391ea9adfaab6355830ac393b340
0b52d3597f9877736207773970f24300
optimal labor supply implied by first-order condition
return functions.if_then_else( total_costs_energy_supply_oil() > 0, functions.zidz(total_income_energy_supply_oil() - total_costs_energy_supply_oil(), total_costs_energy_supply_oil() + total_income_energy_supply_oil()), 0)
0
27bbbb4ec25ec6c1251efb72f7f0bb88
c894608e8cae9e020391c3eacd3a7188
return new X and Y for training n1 label will be 1 n2 label will be -1 the rests(X and Y) will be deleted
def get_x_y(data): return data.iloc[:, :len(data.columns) - 1].values, data.loc[:, 'label'].values
0
1f8520677c645bc1eb0ff93c06cac0d0
b8ad97b40ec6a97ff6ef30447d4025b0
This routine selects options so that they make sense with respect to the current data in the dendrogram. It should be called during initialization before synchEnabled()
public class RecentFilesList extends AbstractOutlinerMenu implements ActionListener, GUITreeComponent, JoeReturnCodes void setDisplayOptions (int ordering, int nameForm, int direction) { boolean change = (currentDisplayOrdering != ordering) || (currentDisplayNameForm !=nameForm) || (currentDisplayDirection !...
0
5ebcec1067906b76b9832fe91c6c5545
afbd6e9ed3d81955830ebee762f03026
Determines whether normalization is being applied .
namespace cirrus bool Configuration::get_normalize() const { return normalize; }
1
6302601b74c46b46804bf920d71b22c3
392c056f7d9a3bd2ddeb49cce7592c6d
Utility for creating a `riak.RiakBucket` instance from string params.
def fromstr(string, data=None): return _fromstr(string)
0
3b9ea765fe85becd982f66524212ea97
5a085d35d835fa2a7774667b70595cab
zajišťuje vykreslení vozíku při simulaci
namespace gsU2_Priezvisko_Meno public partial class Form1 : Form private void cbObject_SelectedIndexChanged(object sender, EventArgs e) { renderTimer.Stop(); panelVykresli.Invalidate(); renderTimer.Stop(); m_initialized = false; }
0
266c5d07425fbf0a73cef2673de4ab32
5c179ff82bb58bdfdbb9deceea6a425f
Saves the provided xml to the system info repository<br/>
class Main extends \SoapClient public function ServerSaveSystemInfoXML(ServerSaveSystemInfoXML $parameters) { return $this->__soapCall('ServerSaveSystemInfoXML', array($parameters)); }
1
017fa27f522aa8a9cd54c13df46243fd
e8f27a1b9229f0e405e9716dae012bc7
根据id集合批量删除错题信息
{ StringBuilder strSql=new StringBuilder(); strSql.Append("delete from xinhu_kqanay "); strSql.Append(" where id in ("+idlist + ") "); int rows=DbHelperMySQL.ExecuteSql(strSql.ToString()); if (rows > 0) { return true; } else { return false; } }
1
b9de3d539dc3d2a3e051b5f471b51222
802b00518e6b6920a6b39643ab8187e4
Elimina un campo por nombre en la lista de campos si existe
public void removeField(String fieldName);
1
2412b3b94b192fd6a81d4deadadf0cb8
d7bb218522fd00dc7bc9bd6e742d3d67
从数据获取切片上传信息,来更新当前信息
byte[] bytes; if (i == sliceBytesVO.getFdTotalSlices() - 1) { bytes = new byte[inputStream.available()]; } else { bytes = new byte[sliceBytesVO.getFdEachSliceSize().intValue()]; } inputStream.read(bytes); sliceBytesVO.setFdSliceIndex(i); sl...
1
3ad22f57bf19d7985bcda50e88ce6597
c1607618b59e75f99c119b8b31c4aafe
creates a random board file and writes it to the given location
srand((unsigned)time(NULL)); int i = 0; for(; i < 7; i++){ int num_connections = (rand() % 4) + 3; int new_connection; while(num_connections > 0){ new_connection = rand() % 7; if ((new_connection != i) && (connections[i][new_connection] == 0)){ num_connections--; connections[i][new_connection...
1