query_id
string
corpus_id
string
query
string
code
string
label
int64
bcbcbb60e55f81665bb5625a7a49b7db
6993a70c66b03b469da9a996faa74241
check if server connection is working (for online/offline switching)
function checkServer(){ _GET(API_SERVER_URL) .then(res => { isServerOnline = res.status == '200'; }); }
1
684e255eb50e609b47179539df8742aa
c748ee39b1204b8ee9a919192576e1c5
获取推荐的搭配列表[置顶的搭配] page 页码
if(!empty($id3)){ $sorts = 'ssid'; $sid = $id3; }elseif(!empty($id2)){ $sorts = 'msid'; $sid = $id2; }elseif(!empty($id1)){ $sorts = 'bsid'; $sid = $id1; }else{ $sorts = ''; $sid = ''; } $setarr = array(); if(!empty($order)){ $setarr[$order] = $order; } ...
1
bdf72a57f54ed18618cb0cf2b9d861c7
5450ca67786fb9e6b603ee785b9acb77
この関数はラスタのサイズの参照値を返します。
EXPORT_C TSize & CSystemParameters::SourceSize() { return iSourceSize; }
1
48d891af9a0f27fc20ab01bca50784f7
8b9cf4ad705e140897ed05141ac70081
Returns a new object of class '<em>Entity Sync</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
public IEntity newEntity(String entityName) throws java.rmi.RemoteException;
0
48dabf19207b11dc549476cabb22b843
07d9450650c7a3a8fec69dcc64309858
マンハッタン距離を計算する関数
def manxeten(term1, term2): term1 = sum(term1.values()) term2 = sum(term2.values()) manx_term = abs(term1 - term2) return manx_term
0
f5c8ca8322f1450e596c2626b58db682
e93245a94f12203761eaf6a7d2aed484
get all datastores that DFM knows about
{ var options = new InvokeOptions(); options.RequestMarshaller = ListDatastoresRequestMarshaller.Instance; options.ResponseUnmarshaller = ListDatastoresResponseUnmarshaller.Instance; return InvokeAsync<ListDatastoresResponse>(request, options, cancellationToken); ...
1
0463d431c7e2fa30a557cd02a474a132
f5c56f1959783cf51f83029655ce5f9e
添加ocr值对应基础数据关系
function addRelatedData(data) { return request({ url: `/api/v1/cmdb/resource/add-related-data`, method: 'post', data }) }
1
3039880a25025469eaa2da5336de276b
86fbda399b65a63dc84fcec9e2669d75
! ヘルプIDテーブルを取得する
$aHelpTemlIds = CmsCategory::where('template', '=', 'help')->get(['id'])->toArray(); foreach ($aHelpTemlIds as $aId) { $aIds[] = $aId['id']; } return $aIds; }
1
adaa91f0b17cf0b69e2200a562da5b92
622979f62ac92eefda52ddc9c1acaa4f
getDBInstance It will return DBInstance if exist. else create new. It helps to maintain single instance of DB.
func GetDBInstance() *Db { if instance == nil { instance = &Db{} } return instance }
1
2b701022ae3114ef19e708fc4dd4d52a
af551cde9ea90c45f0bf0dc17e04f002
Оброблена подія KeyDown, щоб визначити тип символу, введеного в елемент управління.
namespace IntermediateCSharp.Lesson09 public partial class EditorWindow : Form private void EditorText_KeyUpDown(object sender, KeyEventArgs e) { this.OnChangeAction(); }
0
37a681d7b61f63cb3c91c685c0f02860
268b05f07ae41c3a3254469ce8f8ca16
Función auxiliar que agrega los valores ingresados en el edittext de observaciones.
namespace GUILayer.Formularios.Boveda public partial class frmRevisionCierreSucursales : Form private void txtObservacionesCarga_Leave(object sender, EventArgs e) { this.guardarCarga(); }
0
760861a4435324cee4017e4cd293bea4
255f51f7edf39dcb38bc0409a31d4f45
Dato il nome di un personaggio presente nella partita corrente, ritorna la sua posizione all'interno dell'arraylist
for(int i = 0; i < names.length; i++){ if(names[i].equals(name)) return i; } return -1; }
1
f8e83261319cad0f763b282d90370bec
b6ebdc26df9b48062d6bfacc5e57d566
Sets max active jobs.
public class GenericObjectPool extends BaseObjectPool implements ObjectPool public synchronized void setMaxActive(int maxActive) { _maxActive = maxActive; notifyAll(); }
1
61d24ba77843ba62b6f9f40aac7895e5
d8fe28e702b24352313534e6e35f88e3
Update some label with the converted value of the content of the clicked cell in other unit
{ currentCursorPixelLabel->setText( QString( "(%1,%2)=%3" ).arg( pos.x() ).arg( pos.y() ).arg( value ) ); }
0
0247d9019e34d6f186411c4eb0a7084c
87e1d8b4ffe0fccd307ca3e78cc344eb
Set up specific macro opening tags.
MacroBuilder &Builder) const override { Builder.defineMacro("__HAIKU__"); Builder.defineMacro("__ELF__"); DefineStd(Builder, "unix", Opts); }
1
274dc48724187da3d26dbe7b3cfc76c3
8cad0fb7adcc93d0af56bbeb923054ec
Remove o conjunto de dados de treinamento e aplica a classificação calculada no conjunto de dados de teste. Exibe os dados bem e mal classificados.
if (decisionTree == null) { error("Please run training phase before classification"); } for (int ex = 1; ex < testData.length; ex++) { int classNumber = classifyExample2(ex, testData, decisionTree); System.out.println(strings[attributes - 1][classNumber]); ...
0
c8a656870e2bd5260ee9826ebd7d8404
2726323ff6ceedbb83eedf43c0d18b77
Number of consecutive wet days in 'period' (default: monthly)
class RetentionConfigArgs: def period(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "period")
0
c984ee873b0c61db40cd2f25e13f8746
7e6568202584eecec5e5d377209d2d30
レベル初期化
public class BattleMgr : Singleton<BattleMgr> public void _init() { if (Genlevel.Count > 0) return; int levelId = 0; List<List<List<LevelData>>> levelData = JsonMgr.GetSingleton().GetLevelData(); for (int idx = 0; idx < levelData.Count; idx++) { Genlevel.Add(new L...
1
64200fc029f0a0dac567e4a8b5785ee6
e377c6f875beda8d6578eb113430a111
Nanosecond-resolution flag.
impl MxcsrRegisterValue pub fn precision_flag(self) -> bool { self.bit_set(5) }
0
7eb39b926dab07566145600d93aeb42f
4db78401e3e5a70cd9596342700e08f9
adds cluster analysis results to display window
@AcceptTypes( { DSAlignmentResultSet.class }) public class BlastViewComponent implements VisualPlugin private void displayResults(String s) { blastResult.removeAll(); blastResult.add(getBlastListPanel()); singleAlignmentArea.setText(s); blastViewPanel.revalidate(); singleAlignmentArea.setCaretPosition(0); }
0
b167012d5c7b53089ab84c858f7339b8
41a4f5849f595c8c52c561a09e8cff4f
returns transfer account number
class CashFakeTransferEntry public function getAt() { return $this->at; }
0
56f28340c06da2b8abf462be507aa904
b3eb21ee5b043e79204fd5415c696975
Возвращает массив родительских связей.
class Board implements BoardInterface public function getParents() { $parents = array(); $this->loadParent($this, $parents); return $parents; }
1
384203a9d7d83714b27a144e7a70ef39
d5052c06958b31524923b8d2635640a7
帶入字串和要找的字並計算出現次數
namespace ComicSuggestionApp public partial class MainWindow : Window private static int CountString(string target, string keyword) { return (target.Length - target.Replace(keyword, "").Length) / keyword.Length; }
1
ea248cd8cc7862b34c88064c5e4b779b
f9426906c465545757ba1ca6083b6c30
Sayfa boyunun tez yazım kurallarına göre A4 olması gerekmektedir. Bunun kontrolünün sağlanması için kullanılmaktadır.
{ sheet.PageSetup.IsPercentScale = false; sheet.PageSetup.FitToPagesWide = 1; sheet.PageSetup.LeftMargin = 0.5; sheet.PageSetup.RightMargin = 0.5; sheet.PageSetup.TopMargin = 0.5; sheet.PageSetup.BottomMargin = 0.5; sheet.PageS...
0
5707ebfed3848079b170dcc4227d6830
bbbfbf6a1f2ae37de41e3dedaff938eb
get a nested list of the members of a group with a given DN
def get_group_users(user_dn): users_list = [] try: c = Connection(server, auto_bind=AUTO_BIND_NO_TLS, read_only=True, check_names=True, user="qytang\\"+username, password=password) c.search(search_base=user_dn, search_filter='(|(objectCategory=group)(objectCategory=user))', ...
1
6057da11fd3daa281de45270fd60d979
abac9a2b597f917f0ca080e1a1d07347
Only check name for now.
impl<T: BufRead> XmlState<T> fn found_name(&self, expected: &[u8], actual: &[u8]) -> bool { return expected == b"" || actual == expected; }
1
3d279bfde49848e60880b54d39e8e2d8
dbd37a84d541368b947fd39715f984a7
Factory for random OTP key generator
$key = ''; $keys = array_merge(range(0, 9), range('a', 'z')); for ($i = 0; $i < $length; $i++) { $key .= $keys[array_rand($keys)]; } return $key; }
1
0dc7c342810ae2c4202ff2eba2d2bcb9
77496458eb077684156e68f61973e269
重置每周会员活跃值
void resetWeeklyQuotas();
1
048299b3052f9344f414f965ac234d02
846092a09545c181f41b620b7de2e469
输入框语言国际化
if (CommonParas.SysParas.ifChinese) return; MyLocales Locales = CommonParas.SysParas.sysLocales; sTableUserAuthoritysTitle = Locales.getString("JInFrameUserManage", "JInFrameUserManage.sTableUserAuthoritysTitle").split(","); sTableSubAuthoritysTitleAdd = Locales.getString("JInFrameUser...
1
9cc25f399107b13279575c5381e2c4b9
77024f88465887a807b5eb20c4aca054
将地图的配置以XML的方式导出
bool CeleX5CfgMgr::saveCeleX5XML(std::map<std::string, std::vector<CeleX5::CfgInfo>>& mapCfgInfo) { XmlReader xml; return xml.saveXML(mapCfgInfo); }
1
c9f685f244bcf939d607f1fbc3352ce8
d4875d645f06638ba7939b64c656545a
Returns the number of requests made to this mock web connection.
public class GridHttpRouterImpl implements GridHttpRouter, GridHttpRouterMBean @Override public long getRequestsCount() { return jettyHnd != null ? jettyHnd.getRequestsCount() : 0; }
1
79f03658246d8d2c8c6a1a076a0f54cc
08227ec2516cf2afebbb49e9e186635e
Gets the computed HTTP message response bindings for an operation or structure with an error trait.
throws JsonProcessingException { Map<String, String> result = new HashMap<String, String>(); Map<String, Response> responses = operation.getResponses(); Map<String, Object> returnMap = new HashMap<String, Object>(); Map<String, String> codeMap = new HashMap<String, String>(); for (String code : ...
1
19ff86a5a5c714dc1b524eaafe09a1e2
2a57d7cfae7b97aa3554b5333427a518
sets whehter or not the pet is a cat.
public class Pet{ public void setTypePet(String typePet) { this.typePet = typePet; }
0
f728f64db8d18ccdddf79460d8e3b8d8
2b09592dc00cdd3bcd9cbaab2c5275c1
Sets up views for controlling audio volume.
Slider volumeSlider = new Slider(); volumeSlider.setMin(0); volumeSlider.setMax(100); volumeSlider.setValue(DEFAULT_START_VOLUME); volumeSlider.setShowTickLabels(true); volumeSlider.setShowTickMarks(true); volumeSlider.setMajorTickUnit(DEFAULT_HALFWAY_VOLUME); volumeSlider.setMinorTickCount(DEFAULT_VOLU...
1
3f60e4b7ede527b7a959b269a3a7dcf4
1293a1fb7c7f132a443d1526308896b4
アイテムの種類に応じてコマンドを取得する
List<ItemCommand> equipped = new ArrayList<>(); if (p.getBuildStrategy() != null && p.getBuildStrategy().getCount() > 0) { equipped.add(new ItemCommand("tentkit", p.getBuildStrategy().getCount())); } if (p.getFoodStore().getCount() > 0) { equipped.add(new ItemComm...
1
d7c257f9cb56362f6aa8d4c8a58c2cee
f851b26acc506244e95a6dd1e923a3ee
Read encrypt text file and return it in bytes
def read_file(file: str) -> bytes: with open(file) as fin: return bytes(fin.read(), "utf-8")
0
12a44dfc0175a5900ecc530a5281217e
93d159eac59d213724354ae25833ee03
Setter for the rapid descend phase flag
void Letter::setRush() { mbRush = true; }
1
41f7f9cbbde498efcc78abc4f39f659a
003c30824765a5ee26674e495a33a4be
tries and find "goals", "negative thoughts, or "end the conversation" in the lower cased message
if "name" in userInput: key = "what's your name?" elif "date" in userInput: key = "what is today's date?" elif "how are" in userInput: key = "how are you?" elif "bot" in userInput: key = "are you a robot?" elif "pronouns" in userInput: key = "what are your pro...
0
827793de4c450f781b7a4da95294033e
1385dc42401702421fe6bba9cee35bbb
Get the monoisotopic mass of the peak.
public class CometScoredScan implements IScoredScan, IAddable<IScoredScan>, IMeasuredSpectrum @Override public double getPrecursorMass() { return getRaw().getPrecursorMass(); }
0
050b887b35c053f13add7e4a26c8617e
b4c17d142e6496b26d1adb3996d14904
This method was generated by MyBatis Generator. This method returns the value of the database column PDSCI.RES_DOCTOR.ROTATION_FLOW
public class SchArrangeDoctor extends MybatisObject public String getRotationFlow() { return rotationFlow; }
1
899c3ac07de26427fd15b31c8bb3f79e
47339f22e5115b9a7a859a54f9f7e521
Stores given data in a new row of the specified database table.
public abstract class DataModelImpl public abstract void insertItem(String dbName, String tableName, String rowID, String columnName, String value) throws Exception;
1
d1443bd9fa3a96dd5be8bc8175184418
84d7d3b6e0c885a57df7074703f7a61e
Returns array of TestCaseDelegate objects.
$tests['TrustedCallbackInterface_object'] = [[new TrustedMethods(), 'unTrustedCallback'], TrustedInterface::class]; $tests['TrustedCallbackInterface_static_string'] = ['\Drupal\Tests\Core\Security\TrustedMethods::unTrustedCallback', TrustedInterface::class]; $tests['TrustedCallbackInterface_static_array'] =...
0
d6f3bde91f199629e9eb408f3f6ef06e
30c66ceaa1bec440888cb8be83a04d53
Zjištění počtu typů pokojů
int countPortTypes();
0
be8d04f84b46f0bc1f8a6c96dcc542e4
3ad5d2b94b84e606b9232f1ce7bbce70
是否有机器人
{ if (self::isRobot()) { return true; } else { return false; } }
1
bf20bd237294282f84991387d1505fb0
378abca020f68a5a7e439546386bfde4
移除门店限购白名单
{ $z = $this->whitelistRepository->deletewhitelist($request->get('w_id')); return $z ? ['code'=>1] : ['code'=>0]; }
1
bbb2677818c652ae26fff88d4dc5fab5
7a9779d48cc6adb30838bcb7ff932491
创建一个空的带头节点的单链表
pLinkedList Create_LinkedList() { pLinkedList pHead=(pLinkedList)malloc(sizeof(LNode)); if(pHead==NULL) { printf("malloc error\n"); return NULL; } pHead->next=NULL; return pHead; }
1
854ed0d6427fe16935ac624a1513d508
6b0e64c2f2df9d2f8e8545b000e25621
Displays a single HamishaMzee model.
class MermaController extends Controller public function show($id) { }
0
5062857584fd855b300b76dc092a3354
66700f0fe06accf261bbe5e7236e6479
Función para recuperar los idiomas del usuario
function FEXGetPARAM_Idiomas ($client, $token, $sign, $CUIT) { $params->Auth->Token = $token; $params->Auth->Sign = $sign; $params->Auth->Cuit = $CUIT; $results=$client->FEXGetPARAM_Idiomas($params); CheckErrors($results, 'FEXGetPARAM_Idiomas', $client); $X=$results->FEXGetPARAM_IdiomasResult->FEXResultGet;...
1
4a5dd41d6f0b64477c35bc6ef88b8b41
6d5be7f65697e9cab585ff35d5fd39e3
Actual wire call for <see cref="CloudServicesListAll" /> method.
namespace Telecom.ApplicationServices.AppServices.Interface Dictionary<int, ICloud9Communication> GetCloud9CommunicationList(int timeOutInMilliseconds = 30000);
0
9d3a45ac9106b11da7beb166b5f2bf85
24a843b256c0bc03dcf55a345ba91d97
填充为空的区间数据
var aa = new Array(nleft + prf.length + nright); if (isNaN(nleft) == true) { for (var i = 0; i < nleft + prf.length + nright; i++) { aa[i] = Number.NaN; } } else { for (var i = 0; i < nleft; i++) { aa[i] = Number.NaN; } for (var i = 0; i < prf.length; i++) { aa[nleft + i] = prf[i]; } for (va...
1
3aebd0b35fe94552c04cd3883c53624d
3884cab99a9f8bf95758f835f081b49b
Counts the vertices in graph of a particular class.
{ if (graphArea.LogicCore.Graph == null) return 0; int cout = 0; foreach (DataVertex vtx in graphArea.LogicCore.Graph.Vertices) if (vtx.TypeOfVertex == Type) cout++; return cout; }
1
7536ba01e63ea101e729d0812921a1c7
49a63a0aa87f3d01cabc44dbc0e9d8d4
Get the column name for display in the UI. This removes any quotes for aesthetic reasons. Use {@link #getSymbolName()} for retrieving the fully validated column name.
public class ColumnInfo public String getDisplayName() { final String unescapedColumnName = SchemaUtil.getUnEscapedFullColumnName(columnName); int index = unescapedColumnName.indexOf(QueryConstants.NAME_SEPARATOR); if (index < 0) { return unescapedColumnName; } return u...
1
2846ced1444db64fcb23247289b2008a
5e0ea0ddf9f53157332dcd4e4234a3ed
获取tagName下所有匹配attrFilter的 text list
namespace EasyHttp.Tool public static class TagHelper public static List<T> GetTagListByAttr<T>(this string html, string attrName, string attrValue) where T : TagBase, new() { List<TagAttr> attrList = new List<TagAttr>(); attrList.Add(new TagAttr() { Name = attrName, Value = attrValu...
0
6321bd8235fe5b3c8c26d57418fdd8ce
c96260f783ed6bb879917709a3179e2e
Seed creates a new time based seed
func NewSeedInt64Time() int64 { return time.Now().UnixNano() }
1
2b483fa2fc8f43a41ff2a450289b1491
3e9e9bef2f9c6c7412d927ae73dbff0d
Returns the proper script depending upon the debug/release mode.
$html = ''; if ( $this->isDebug() ) { if ( $_type == 'head' ) { $html .= PHP_EOL; $html .= '<!-- styles debug mode | '.__CLASS__.' -->'.PHP_EOL; foreach ( $this->getConfig( 'cssFiles' ) as $k => $v ) { $file = $this->_getFile( $this->getConfig( 'cssFolder' ).'/'.$v ); if ( $file ) $...
1
d1d24be919e3ae1ddb76160563b11d72
45f3dbf96791454774f240f9dac4036f
Ensure that the view is at least as tall as it is wide
public class HudView extends JPanel @Override protected void paintComponent(Graphics g) { super.paintComponent(g); setPreferredSize(new Dimension((getParent().getWidth() - getParent().getHeight()) / 2, getParent().getHeight())); invalidate(); }
0
67132d7c444175e163d3055a3148ee44
bccd1ca16d5fded72f82f148ef92b55f
Updates the respective gameGraphLines
efficacy = graphInfo.treatments[updateNum]; displayData = graphInfo.displayData[updateNum]; int prevUpdate = (updateNum - 1 < 0) ? 0 : (updateNum - 1); float prevEfficacy = graphInfo.treatments[prevUpdate]; if (!xAxis || !yAxis) { xAxis = GameObject.Find("XAxis").game...
1
99e8395cebf675dafa8c556f07deebac
14ce213f291e81d8c8ce072b1a6b4ecd
Check whether the given file is JSON-encoded. The function checks only if the filename ends with the ``json`` suffix.
def is_geojson(f): try: json_type = next(ijson.items(f, 'type')) return json_type in ['Feature', 'FeatureCollection'] except (ijson.common.JSONError, StopIteration): return False
0
f804d1930d24bcd0a451e7fb645161b6
b0b6f7dd116ae9b67db301ab863304b7
Add an header, appending to already existing headers.
if not self.headers.get(key): self.headers[key] = value elif isinstance(self.headers[key], list): self.headers[key].append(value) else: self.headers[key] = [self.headers[key], value] return
1
b2a38addd7ef1ac85f8094636adda81e
ce571e65f1355be1622e8691735bfc4b
Get the singleton instance of the Trace API
get TRACE() { return 'trace' }
0
457f5855f9ab4de00e0eb97e0084b5f8
0a7370d25d3c775ae2efcc88f5a65d26
@brief shell显示值
{ var passwd=document.getElementById('passwd1').value; var expr = "bash ./shell/showopen.sh "+passwd; exec(expr,function(error,stdout,stderr){ a=document.getElementById("start1"); a.innerHTML=stdout; if(error!==null){ console.log('exec error:'+error) } }); }
1
78a00ae3f3886fa296ee6964a063eac7
88feedb9e51196c75c1f203eb9dc0115
Set paper orientation as desired.
if (orient.equalsIgnoreCase("portrait")){ p.setSize(W = 612, H = 792); p.setImageableArea(36, 36, W-36 ,H-36); pgFormat.setPaper(p); reconfigurePage(); }else { if (orient.equalsIgnoreCase("landscape")){ ...
1
f6e1db88d497ed22c28b02fd71c38cb1
9fdd56cf44ea4803737386f176675590
Obtener las invitaciones sin confirmar por el id de la empresa
export default class Client async getOrganizationInvitations( organizationId: string, queryParams?: string ) { return entities.OrganizationInvitation.getList(organizationId, queryParams); }
1
39d8e354eeb55fc1f0f8b0215c0c426a
69833d3983e5cea5a5bf912b21ccfc66
Should be able to match uses keys as regular expressions.
pat = compile_matchers(['hello.py']).pop() assert pat('hello.py') assert not pat('hello-py') assert not pat('subdir/hello.py') pat = compile_matchers(['hello.*']).pop() assert pat('hello.py') assert pat('hello.rst') pat = compile_matchers(['*.py']).pop() assert pat('hello.py') as...
1
d4774ff3e64bc77733177142288bc927
3354d9f1b41a0c72a7cae0c1260da8e5
Should the minimum length be serialized.
boolean isSetMinLength();
0
a20f1a6fd5daa4566a7eac80f9af0d29
593106edc70f9e9451dc190cc0d5e154
Code to convert hex to binary
std::string hex_to_bin(std::string p) { std::string ap = ""; int l = p.length(); for (int i = 0; i < l; i++) { std::string st = ""; if (p[i] >= '0' && p[i] <= '9') { int te = int(p[i]) - 48; while (te > 0) { st += char(te % 2 + 48); te...
1
906749721d72711a08cd917025a6b068
51bd277e584648ec3d22c8d592d5dbf5
This method handles the Tool Strip Menu About event handler
namespace Assignment5.Views public partial class OrderForm : Form private void AboutToolStripMenuItem_Click(object sender, EventArgs e) { Program.Forms[FormNames.ABOUT_FORM].ShowDialog(); }
1
480631884595827891f588b36a54b0c8
6a27e345ae97a2b05d55d9ab28f0a272
complex multiplication
complex rmul(float a, complex z) { return cmplx(a * z.x, a * z.y); }
0
d66b972e66d05e79877b2d4d93ace5de
ac30ad6c676642aad107c8403f398cb6
If the pickup object touches the player and the player's hp is less than 3...
public class GreaterHealthPickup : MonoBehaviour void Update() { if (timer <= 0 && hasPickedup) { canDestroy = true; } else { timer -= Time.deltaTime; } if (!hasDestroyed && canDestroy) { hasDestroyed = true; ...
0
20c05263dddec398b8f72bfb88db6c84
0eb0ff302143fd6cc81a91253553e53d
Retrieves the active file entry.
{ String entry = this.dao.get(PreferencesConstant.ACTIVE_FILE, ""); IFile aFile = null; try { aFile = new PreferredFile(entry); } catch (IOException e) { } return aFile; }
1
df8a0200b26bdae6ff6a3bd1553c5559
cfeee86c7cfda0e02e4e1dc15d0ae80a
根据工厂编号获取存储位置列表
namespace MMClient.ContractManage.OutlineAgreement public partial class AgreementContractForm : DockContent private void cbxFactory_SelectedIndexChanged(object sender, EventArgs e) { string factory = this.cbxFactory.Text; if (!factory.Equals("")) { List<st...
1
4a216bb4697d8d0e990f0df3c71fc958
84a1f8aec8e79c1c26a5a6175e3b1e64
Bins each column of a dataframe into bins determined by the training data. Then creates new features one-hot encoding these bins.
bin_equal_width = KBinsDiscretizer(n_bins=binningNum, encode='ordinal', strategy='uniform').fit( X_train[colList]) X_train_width = bin_equal_width.transform(X_train[colList]) colList_new = [col + '_EqualWidth' for col in colList] X_train_width_df = pd.DataFrame(X_train_width,...
0
27b85ac3d2b1d9a03c6c18266143dc20
1b1d7d08198b0ef690eabe13d35f772d
Populates the JList with choices.
listModel.removeAllElements(); jList1.clearSelection(); display.setText(""); Object[] object = stkNames.toArray(); if (object.length > 0) { for (int n = 0; n < object.length; n++) { listModel.add(n, object[n].toString()); } j...
1
6b4d490bea12c49c9e2af6a81da6f2be
9241b2144569b98ffc49ffb65b044021
recupera uma lista de seguradoras estado cidade
{ $validation = Validator::make($request->all(), [ 'state' => 'nullable|string|min:2', ]); if ($validation->fails()) { return response()->json($validation->messages(), 400); } try { $uf = $request->get('state'); $cities = City:...
0
4b5be2ca5cf3b49e18430a0eefb96b58
d5b5cba9d2b209f36c4da18e41d373c8
Get most recently used files
{ SortedList<string, SortedList<string, string>> ret = ContentFilters.Spilt(MostRecentlyUsedFile.ConvertToSortedList(MostRecentlyUsedFile.GetAll())); return ret; }
1
1dc69be6a61d453c29472aa43a35acfa
09650e829f2a6c811a606db92bf3be8d
Calls :method:`EventLoop.add_idle` on current event loop.
class ImapBackend: async def idle_done(self): return await self._call('idle_done')
0
8244a09f8d49af06023e238e6f8009b2
e5b5b800db7e16b2c094f9c70f115025
Set post types to not show
class CreateCustomPostType function hidden() { $this->set('show_ui', false); $this->set('show_in_nav_menus', false); return $this; }
1
53425beef7f21c3310dfcd0653266ab2
cc598f1b9448f9fe390f57480c71f039
calculates minimal class of centroid pixel
cluster_number = 0 distance_min = compute_distance(color_pixel,means[0]) for i in range (1, len(means)): current_distance = compute_distance (color_pixel,means[i]) if current_distance < distance_min: cluster_number = i distance_min = current_distance return cluste...
1
38fd4885e138ea02dca3ac77590e8baa
89a5410733e280e737ac87f585cae247
Loads INI data from a string
{ System.IO.StreamReader objReader = new System.IO.StreamReader(sINIPath); string str_line = null; string[] split = null; while (objReader.Peek() != -1) { str_line = objReader.ReadLine(); if (str_line.Contains("=")) ...
0
8edb942b38da740697b568a78f9072cb
01cc84cf19a6e332e209324f823c8497
Deactivate an activated income
class FinanceController extends \BaseController public function destroy($id) { $user = Income::find($id); $user->delete(); return Redirect::back(); }
0
97376a681a1aabf83127a37733631a24
8c35af7f1138903a6341d1be416c5276
Gets and displays Licensee's condition.
debug_print("print_license"); unsigned long long start, end, line; FILE * fp; char buffer[0x100]; switch(license_part) { case LICENSE_WARRANTEE: start = LICENSE_WARRANTEE_START; end = LICENSE_WARRANTEE_END; break; case LICENSE_CONDITIONS: start = LICENSE_CONDITIONS_START; end = LICENSE_CONDITIONS_END; ...
1
c2c2419d00534ea74f47bff1baf00a5d
9799a80c37735892f491cba344db4396
測試指定的程式是否存在,如果存在,回傳完整程式路徑 範例:
if path == None: path = os.getenv('PATH', '').split(':') for directory in path: filename = pathConcat(directory, program) if os.path.isfile(filename): return filename return None
1
bef7e4c2f61fc8689d2e1ba23ad633c8
81003978a1fbfc8d96968ec2606fd6f7
Enable INT1 interrupt
void ext_int_init() { MCUCR = _BV(ISC11) | _BV(ISC10); GIMSK |= _BV(INT1); }
1
763cc60918799537d94152295e11955b
0c657d2bc804a38211be9b28b1e49625
Set Client Contact
class Subscription public function setContact($contact) { $this->contact = $contact; return $this; }
1
2242b2535154c5a90629117eaab748da
41edfee68032d49556098bb9c9860d98
Returns the title of the class with it's order number.
class ItemInOrder extends Object{ public function getTitle(){ return $this->AR->title; }
0
072b950f5a81ef86da775fd56ca9d8b9
ec7544751f09bae143c37e5a9da0ff7b
Creates a standard 52 card deck, with no Jokers.
let mut cards:Vec<Card> = Vec::with_capacity(52); for suit in [Suit::Spades, Suit::Hearts, Suit::Diamonds, Suit::Clubs].iter() { for value in [ Value::Two, Value::Three, Value::Four, Value::Five, Value::Six, Value::Seven, Value::Eight, Value::Nine, Value::Ten, Value::Jack, Value::Queen, Value::Ki...
1
9b8d3915d984effe83b122b431eff623
8fbf8a0f9efb8907c520b8421c40c503
Read a file line by line and write them into a list.
class SearchEngine: def read_file(self, infile): lines = [] with open(infile) as input_file: for line in input_file: lines.append(line) return lines
1
26d709415c796ffc34264bd0c2520b31
bc9766be67296d84a69b31e77abe26ff
Returns the syscall number.
int sys_ni_syscall() { return -38; }
0
e15735cc3e433260777f4219d0a30a87
066d7dfa2f9b8c8c20f0485332583d6c
根据tab_id获取官网特卖列表
{ $data = self::setWhere($where, 'A')->field('A.*,T.content,S.name as subject_name') ->join('__SPECIAL_CONTENT__ T', 'T.special_id=A.id')->join('__SPECIAL_SUBJECT__ S', 'S.id=A.subject_id') ->page((int)$where['page'], (int)$where['limit'])->select(); $data = count($data) ? $d...
0
e911575f707ada3b806694ea94846589
13db1c095caca4ec911bb1ba1cbdc4e6
Sets the actual output current value of the calibration point.
{ if (_func == null) { throw new YoctoApiProxyException("No QuadratureDecoder connected"); } if (newval == _CurrentValue_INVALID) { return YAPI.SUCCESS; } return _func.set_currentValue(newval); }
1
928d4426aae693be2c975d2070d73642
4413ef8d01b3b02daf5df62131a58df4
Return the cost & usage data.
total_cost_times, total_cost = self._get_summary_data_by_ts() field_week = datetools.get_week() week_start_ts = datetools.get_week_start_ts() week_end_ts = datetools.get_week_end_ts() week_cost_times, week_total_cost = self._get_summary_data_by_ts(week_start_ts, week_end_ts) ...
1
9f9b7bc452ec609578c7067b56171e7d
3f15dab68099a46f923c4d01013f276e
Helper method to create the fake request and instantiate the view.
class TestPersonViewUnitTests: def view_obj(self, rf): request = rf.get("/person/1/") view = PersonView() view.setup(request=request) return view
1
44ffa1605cab49ae1ad14f17671ab768
85b51381006e08b364ab2711d6066621
check default course is deployed
class mod_feedback_structure public function check_course_is_mapped() { global $DB; if ($this->feedback->course != SITEID) { return true; } if ($DB->get_records('feedback_sitecourse_map', array('feedbackid' => $this->feedback->id))) { $params = array('feedbackid' ...
0
e38a05720dcd8a8822130d3af713c886
0de9e7023f713beb4f5b52678cb1fe04
Defer a test failure to a later stage, or set ``excinfo`` of ``outcome``, depending on ``marker_name``. This function should only be called for test items that have failed -- the end result of calling this function for *any* ``item`` / ``outcome`` is that the test will fail. .. warning:: **This is a "private" function...
try: del e_tb if e_ty is not None or e_val is not None: self.mark_failed_exc(e_val, e_ty) finally: self.end()
0
ff7ef05224771e707c98a78252c1dca9
f436cddb492e3948f8528e3676e2300a
Realiza leitura da configuração de carga do modelo
{ var doc = new XmlDocument(); doc.Load(CurrentConfig.ArquivoConfigGeral); var listConfiguracoes = doc.GetElementsByTagName("Configuracoes"); foreach(XmlNode nodeConfiguracoes in listConfiguracoes) { var elementConfiguracoes = (XmlEleme...
0
e7749eb73b3ec6ace68953203f107917
9b0f15e3ee857ce1baec798d7d5b9603
Get superscript
function fEditorFormatSuperscript() { this.getEditor().edit("superscript"); return true; }
0
1b3ea28b846b427f0596b0e27c88206c
f81fcff29764244dc1fc757c5a0ab0a8
ランダムに他の手へ投げる
{ Debug.Log("ランダム"); if (!isMyTurn) { return; } int cardID = Random.Range(0, 27); GameManager.instance.RandomEffect(cardID, strength, damageCal); }
0
00118116f07339bddd2be7b9b161013a
91a0010a07f24845b0245c74286a9363
Delete the committed part of the trajectory and its decendants from the tree and update the kd-tree
AABB old_aabb; const AABB& new_aabb = updated_obj->getAABB(); for (int i = 0; i < 3; ++i) { const auto it = obj_interval_maps[i].find(updated_obj); interval_trees[i]->deleteNode(it->second); old_aabb.min_[i] = it->second->low; old_aabb.max_[i] = it->second->high; it->second->low = new_aabb.min...
0
3dd241f63fcd1edbc93706d23c12b61a
bc4e812169959a01de3fef1df8945ba6
Crea un TopCanciones
public class Customizador private List<ObjetoOrdenado> generarCancionesOrdenadas() { List<ObjetoOrdenado> cancionesOrdenadas=new LinkedList<ObjetoOrdenado>(); Dao dao=new Dao(); List<GeneroCancion> vectoresCanciones = dao.executeSelectOneCriterion(GeneroCancion.class, null); for(GeneroCa...
0
1b49e45cb1bdd88145e695cac02ba10d
d7a67de32a9ba041fd5992ce9e2ddaca
post方法根据不动产号获取房间号
namespace TSOfficeSystem_New.Areas.Dormitory.Controllers public class HostelCleanController : BaseController [HttpPost] public ActionResult RoomNo(string community, string building, string roomno) { t_Dormitory dormi = _Dormitory.GetTariffbyRoomNo(community, building, roomno); ...
0