query_id
string
corpus_id
string
query
string
code
string
label
int64
9df6755a44f06954c5ae547eac4b7c3f
deb68e2be55e4aca254bc1b974cb6209
Main function to apply Machine Learning Pipeline: 1) Extract data from SQLite db 2) Train ML model on training set 3) Estimate model performance on test set 4) Save trained model as .pkl file
def main(): pipe = Pipeline([ ("impute", Imputer(strategy="mean", missing_values=np.nan)) ]) train = pd.read_csv("train.csv") test = pd.read_csv("test.csv") x_train = pipe.fit_transform(train.drop('class', axis=1)) x_test = pipe.transform(test.drop('class', axis=1)) y_train = train['...
0
c79be0ec4189e4d4c1f9f16c1c1dc5c8
ded4f82ab41a00197bab5e0370489af6
Starts a master server identified by a host and port. Does nothing if the server was already running.
class BFA_ThreadedMasterTCPServer: def startup(self): self.server_thread.start() log("Master server running.")
0
2c11e6db73490db939de089669b4f28d
860f429b26c5d5a3dd29af9e770f3acd
Returns the value of the '<em><b>ESuper Class</b></em>' reference. <!-- begin-user-doc --> <p> If the meaning of the '<em>ESuper Class</em>' reference isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
XClass getSuperclass();
1
0a3f709c7732220b243fd545718745e1
3d9b43c02805b7cdf02024f29cb130a5
Gets the length from the parsed token.
public class TextHandlerSharedAttribute public int getTokenLength() { return token.length(); }
1
5488dc961da774fda1d257294da13a0d
f6263952a0da5bcb5cd6ece8111f9a2d
移除页面并返回移除的所有导航记录
namespace MASACore.Core.Services.Interfaces void NavigateAndRemoveAll(Type pageViewModelType, Object parameter = null);
0
7c03264b8bc4a125e5312d9463b3d4d7
b16fa0c4559127b4467e77bb8210aa23
Test the model on dev set. Inputs: - devel_set = numpy array. - devel_lab = numpy array. - params = dict. Trained parameters. No Outputs.
output_loss =0 total_loss = 0 yhat = np.zeros([config.epoch_seq_len, len(gen.data_index)]) num_batch_per_epoch = np.floor(len(gen.data_index) / (config.batch_size)).astype(np.uint32) test_step = 1 while test_step < num_batch_per_epoch: ...
0
fdfbb296aeb19ef5053b80c25e7a42bc
37a92fcd09f08793dc5baff3d09e6b22
Reads all records from xml file.
{ XmlReader reader = SetupXmlReadStream(sourceLocation); List<Object> readObjects = ReadObjectXml(reader); CloseXmlReadStream(reader); return readObjects; }
1
afca405f3ddb260f6bd98cecaf3b5c9b
ed75cfb99cf6ce26a5754b21fb5acf52
将JSON返回值解析为好友ID和好友对象对应Map
if (jsonData == null) { return new ArrayList<>(); } return (List<Object>)jsonData.get("friends"); }
0
e9a3e934c088c40ecce22b9d87839416
5ba702eeaafd0731f0c7c9ff4e68724b
Executes the specified asyncronous action thread safe.
ToAsync<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>( this Action<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> sync, bool runAsync = true, TaskCreationOptions options = TaskCreationOptions.RunContinuationsAsynchronously, CancellationToken t...
1
18ba08bf218b4341412ddb953c171ae0
95d2990d9e52889a508f914e39ef76eb
Check if the given world has any configured groups.
public boolean hasGroup();
1
7c3d8e6af1b3c3c539feb9a34affb8af
cc36d652d145edd041726044f803b3e5
New Create a new instance of Echo
func New(cfg ...CfgOption) *echo.Echo { e := echo.New() e.HideBanner = true opts := &cfgOptions{e: e} for _, c := range cfg { c(opts) } opts.apply() e.Validator = NewCustomValidator() e.HTTPErrorHandler = CustomHTTPErrorHandler return e }
1
93a19a0a03eda211a5e3767fdf644f46
4d4637669cd29ef009b9d9cf012e2e64
魔法值消耗,攻击时执行
if is_mp_skill then return end self.mp = self.mp + self.mp_step if self.mp > self.mp_max then self.mp = self.mp_max end end
0
ed13a39f4dbffdbbad7e43030180ab6a
91cc0a34087697245cca839c12c7d12a
Description: Given bounds of raster and shapefile, returns True if their bounds intersect.
def in_image(location, image_file: str): lat, lon = location[0], location[1] image_file = image_file.replace("'", "") target_position = project_on_image(lat, lon, image_file) lat_bounds = (target_position[0] > 0) * (target_position[0] < 4000) lon_bounds = (target_position[1] > 0) * (target_position[...
0
bb302729969966b5749a7a92b35a53ab
5a93b441e5ac4470b78f4f04d2ea14a0
<p> Focuses the view of the map on Maple Ridge </p>
if (null != googleMap) { LatLng centralParis = new LatLng(48.864716, 2.349014); googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(centralParis, 12)); } }
0
ddcab89f0069075f930dd8a94626630c
ec4a600600f974ea7b598b02bba8edb5
Returns whether the value of the '{@link org.bimserver.models.ifc2x3.IfcOpticalMaterialProperties#getVisibleReflectanceBack <em>Visible Reflectance Back</em>}' attribute is set. <!-- begin-user-doc --> <!-- end-user-doc -->
public class MaterialState implements State public boolean hasSpecularBack() { return _specularBackSet; }
0
d101cee583ba33b60b91da01a68fa901
665765230a6a539ef96beabd8d70ade0
Tests access to System Control Block Registers
s := NewSystem() s.Mem[0x200] = 0x60 s.Mem[0x201] = 0xA1 s.Mem[0x202] = 0x1A s.Mem[0x203] = 0x10 s.Mem[0xC00] = 0x61 s.Mem[0xC01] = 0xFF s.Mem[0xA10] = 0x50 s.Mem[0xA11] = 0x10 s.Mem[0xA12] = 0x41 s.Mem[0xA13] = 0x00 s.Mem[0xA14] = 0x1C s.executeOpcode() if s.V[0] != 0xA1 { t.Errorf("expect V0 A1, got V...
0
412b0e077c7dc611feafed0f19b9a2cd
457e7f40912372b8204f5dddef6bc717
Test the normal functionality of build() function of the `TaskBuilder`.
class TestTaskGraphAPI(unittest.TestCase): def test_build(self): self.tgraph.build() points_node = self.tgraph['points_task'] distance_node = self.tgraph['distance_by_df'] onode_info = { 'to_node': distance_node, 'to_port': 'points_df_in', 'from_port':...
1
b4f799b08dae967e8737c83c5b8b3f06
43b88130a4260a9cb8bdf8e72ec4aac6
Reads water stats from an NBT object.
{ super.readFromNBT(var1); this.ConSides = var1.getByte("cons") & 255; this.Metadata = var1.getByte("md") & 255; this.CenterPost = (short)(var1.getShort("post") & 255); }
0
cdc19e585e997e1faa3eb0cb16cbae4d
dba7d9766b4ea58f19dde7d22a5741fc
Sets the look-and-feel object that renders this component.
public class GUI public static void setLookandFeel(String laf, JFrame frame) { try { UIManager.setLookAndFeel(laf); } catch (UnsupportedLookAndFeelException e) { throw new RuntimeException(e); } catch (ClassNotFoundException e) { throw new RuntimeException(e);...
1
3383fcb3a1ae52b7fdea4cbc0a2ce0ac
510808c3f52ed24f7280eec34d17cd20
move the whole balloon up by looping through each part in parts the balloon moves up based on the speed generated
void Bubbles::update(){ _position.y += _yVelocity; _position.x += _xVelocity; _bubble.setPosition(_position); return; }
0
199f0b9243314e9609284c94f34f4510
5de3c8ff224036bd0d3868c8e8159d88
(Stolen forward from rails 3.1, BUT has slight differences??)
def process_with_query(action, query_string="", parameters = nil, session = nil, flash = nil, http_method = 'GET') %w(@routes @controller @request @response).each do |iv_name| if !(instance_variable_names.include?(iv_name) || instance_variable_names.include?(iv_name.to_sym)) || instance_variable_get(iv_na...
1
ec9e2ace1d1362648f4ead8a4eef40c9
644b0b6bdb45105042629f738ff5b7e1
查询需要再次爬取的链接的数量
class DiagnoserApt(object): def countUncrawlUrlsBySpidername(self,spiderName): whereJson={'status':{'$gte':900}} uncrawlNum=mongoApt.countByWhere(self.urlDbnamekey,self.urlCollectionsMap[spiderName], whereJson=whereJson) return uncrawlNum
1
296b8dbe2b3edbaba7cff19f941fb240
e88d0b78f2e63956483e1edc255e7dc2
Removes a connection from database manager.
@RequestMapping("/removeConnection") public Result removeConnection(@RequestBody DbConnection connection);
1
0d7432aebd2084cb17b30719725c485d
b023d7754a7914584a495b31baafbf24
\brief Nastaveni typu nove hry a herniho typu Zahodi stary herni typ a vytvori novy podle pozadavku
{ if(current_game) { delete current_game; } QList<PlayerHumanCPU> *players = new QList<PlayerHumanCPU>(); QAction *act = choose_mode_act->checkedAction(); if(act == player_player_act) { white_human_cpu = HUMAN_PLAYER; black_human_cpu = HUMAN_PLAYER; players->a...
1
4622ede818fbbe95250875c431a5002d
babafc1b31651d805ff471a2adec2c86
在构造函数中,初始化指向业务逻辑的成员变量
class WeappLogic public function __construct() { }
0
19aaac99a285082da3b3504b3fa30f5c
b0cef9ea8ef0cd5f2ae44f55299d518a
曾用过的地址
public class AppContext extends Application public void setRecentAddress(String recentAddress) { PreferenceHelper.write(this, SPConstants.SP_FILE_NAME, SPConstants.KEY_RECENT_ADDRESS, recentAddress); }
1
4d634a041899fe8dd59b7461b4a815a5
ba3e7552004ff35032cbb8b8d760a26f
Load model from .onnx file in /Assets/... and create model instance
namespace ImageClassifierAppUWP public sealed partial class MainPage : Page private async Task loadModel() { StorageFile modelFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri($"ms-appx:///Assets/classifier.onnx")); modelGen = await classifierModel.CreateFromStreamAsync...
1
7d30437b145e3e6ead657f352306d81b
12215fd3487bee1a093acdfef1379f2a
Sets the designated parameter to the given boolean.
namespace HT.Framework public sealed partial class Main : MonoBehaviour public void SetBooleanParameter(string parameterName, bool value) { MainParameter mainParameter = GetParameter(parameterName); if (mainParameter != null) { mainParameter.BooleanValue =...
1
0908f8e1200bf934e76f3232909b53a5
bc7912172fcfd96feee358e98509dfbc
获取中心提示时间
public class SpUtil public static String getNoticeTime(Context context) { return context.getSharedPreferences("mNoticeTime", 0).getString("mNoticeTime", ""); }
1
818033ca75971ec0d449491f33cae032
95fd1f674bcd5838808fe176bee58154
Met à jour tous les champs de l'UI
namespace IHM public partial class MainWindow : Window private void updateInfoPanel() { StepLabel.Content = "Tours restants : " + _game.getSteps(); Units1Label.Content = "Unitées restantes : " + _game.getPlayer1().getNation().getUnitsNumber(); Units2Label.Content = "Unitées resta...
1
e147e976e84a47f785401ce8bdd31b5f
0bc82d8b32811a7d294693ab467aa97a
Delete key-value pair with minimum key rooted at n
if (n == 0) throw new NoSuchElementException("Cannot delete on empty priority queue"); int min = pq[1]; swap(1, n--); heapifyDown(1); assert min == pq[n+1]; qp[min] = -1; keys[min] = null; return min; }
1
cd072d0c70cf0941393b944b91c6a231
ecddb00fc97cf00f477fab89e921a614
Returns the JNDI name of the data source that will be used to obtain the connection.
public String getDataSource();
1
6369c950ecf8fb76b9ec3a1eaca1dada
0e18d2375b9984cc1653315b3e96a0b8
Permet de récupérer les cellules contenant des soldats
$req = "SELECT * from batiment WHERE idHexa IN (SELECT hexa.idHexa FROM hexa WHERE hexa.IdJoueur IN (".$joueurs->getIdsStr()."))"; return DbHandler::collFromQuery($req, 'Batiment', 'BatimentCollection'); }
0
bcc23e166b430619173d09841230da5b
8219a329c9672766963d0a5a07be62be
Remove a collector from the exporting process
class NodeDataCollector(private val reporter: NodeDataReporter) : DataCollector, StartListener, EndListener, ExportListener override fun unregister() { Notifier.removeStartListener(this) Notifier.removeEndListener(this) BGPNotifier.removeExportListener(this) }
1
e00c281efda1f7dcad5c55e42c241173
13194d49ead29933353d2081606fbcf5
改变截图窗口
void ScreenWidget::BeginScreenShot() { m_screen = QPixmap::grabWindow(QApplication::desktop()->winId()); show(); }
0
3e91e69a14e181a89248ed2383fc48ed
70251fbd627c0c7fd2f88ec360f1b6b4
moves the arm motor according to the joystick
void moveArm() { bool feedBtn = joy1Btn(3); if (feedBtn && !feedBtnWasPressed) feedbackActive = !feedbackActive; feedBtnWasPressed = feedBtn; int userArmPower = expoJoystick(joystick.joy1_y1); userArmPower /= 2; if (userArmPower < 0) userArmPower /= 3; int actualArmPower = 0;...
1
a49ca7f27e51e51d2869d34dd2755b74
3ecad49b536b69c6de681eaa8c40e9f8
按条件查询ExamStudent记录数量
namespace Tellyes.BLL public partial class ExamStationClass public int? SearchExamStationClassCount(Dictionary<string, object> conditionDictionary) { return new DAL.ExamStationClass().SelectModelObjectCountByCondition(conditionDictionary); }
0
aaee445e936ec1ecc3dc6fded151bf66
80a8262d49fd9e5bbe79d9a904fc0ca9
Tests that rule does not apply after unregistered aspect is added.
public class AspectBeanFactoryImpl extends AdvisorBeanFactoryImpl public void registerAspectAdvisor(String beanName, AspectAdvisor advisor) throws BeansException { Object instance = super.getBean(INSTANCE_PREFIX + beanName); if (instance instanceof UnSharedInstance) { UnSharedInstance unShar...
0
34a16cbc6c720ad44edea20bd62fba94
456ce0de8268fbd7c87da6a03551327d
Based on RFC 2131 Sec. 4.4.5, this defaults to (0.5 * duration_of_lease).
class SecretBackend(pulumi.CustomResource): def default_lease_ttl_seconds(self) -> pulumi.Output[int]: return pulumi.get(self, "default_lease_ttl_seconds")
0
5db8b30d7701934e604c0c3c15e87ee0
3fe7d2361fa2a87b8edb898542f2fee7
Configures type variables of this property.
bool applyOnChildChanges = false) { this.type = type; this.internalType = internalType; this.getter = getter; this.setter = setter; this.applyOnChildChanges = applyOnChildChanges; }
1
43bfab174a7e18939325fbfde41f89dc
c82f4b486506796689915c33566117b1
Остановить игру, очистить игровое поле
shutdown() { game.sounds.stage_music('none'); this.playfield.shutdown(); }
1
9a58e71cc83a69e15ec51705285bafd4
2d0f9725457fdc1008bed70bf421ac8a
画像の取得 カンマ区切りで保存されている画像のファイル名を配列に変換して取得する
function GetImageArr(images){ let imageArray = images.split(', '); return imageArray; }
1
0fe54ca5a65718f2d98ec7433e35f9dc
b0d8dc409ed2189c220344a61af8ec93
Return the relation alias name.
class EntityJoinModel extends DataModel public function getAlias(): string { return $this->_alias; }
1
33d350056ae49694e736e02c5bc99131
8445875cc87b248d8cd35594fd748956
Displays a form to edit an existing Laboratoire entity.
{ $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('PassportTreeviewBundle:Factory')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Factory entity.'); } $editForm = $this->createEditForm($entity); ret...
0
6c215ee554cd693570aba2046760f984
191332e36ac7f2be204610859d596925
This view should return a list of all the items for the currently authenticated user.
class ListHandler(webapp2.RequestHandler): def get(self): session = get_current_session() if not session.has_key('user_name'): self.redirect('/login') return view_item = GetListViewItem(session['user_name']) template_value = {'user_name':session['user_name'], 'vie...
1
49c2a6f34ea116c1385795a4c8153919
8d59498a2e73f87142a6abd4fc634cba
generates a 1 digit number
def genNum(): num = random.randint(0,9) num = str(num) return num
1
45583f9d3b4652341f8724781f745487
03e9d40de511fed11dfa9a9c67d77216
Mark the video as unplayed.
export class PlaystateApi extends runtime.BaseAPI async markUnplayedItem(requestParameters: MarkUnplayedItemRequest): Promise<UserItemDataDto> { const response = await this.markUnplayedItemRaw(requestParameters); return await response.value(); }
1
ae11326d4deb414733689fa36601aef8
b31cc0843afb44bd8d3919cd1f578d35
## convert cartesian to polar
get_polar_coordinates <- function(x, y, origin = c(0, 0)) { x_r <- x - origin[1] y_r <- y - origin[2] r <- sqrt(x_r^2 + y_r^2) th <- atan2(y = y_r, x = x_r) return(data.frame(r = r, th = th)) }
1
4d95ef7cbab1f83c10f936511dd01e6c
d0fa5c9d5c8ba2ea93f6e6d916d9e482
(with prefix, to be clear)
void SparqlParser::addPrefix(const string& key, const string& value, ParsedQuery* query) { SparqlPrefix p{key.substr(0, key.size() - 1), value}; query->_prefixes.emplace_back(p); }
1
68c065d06dff74dd73b53ba867e09e22
2b8ad5a2c3f49d052c6f2ca3296abe57
Запрос пользователя для выбора файла шаблона
auto f = []() { char filename[1024]; FILE *f = popen("zenity --file-selection", "r"); fgets(filename, 1024, f); return filename; }; std::thread file_system(f); file_system.detach(); }
1
b8bab214cefc9fbd8df257e4a45b05c0
40d9df603b55f45e72c044ad1525f686
for instance: font-name -> fontName
function unCamelCase(str) { str = str.replace(/([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g, "$1 $2"); str = str.toLowerCase(); return str; }
0
754d81256cbb1a9d8a44234ee91eb12c
a533a8af42a397f76663fad01141873c
Get Above50MillionFailOverChannel value
public function getM56() { return $this->m56; }
0
dde3c924bfebb74e7f91630152275a1c
af8875d52a708a442d10d9a0c6a24703
获取按钮状态Selector样式
function buttonBsStyle({name, standard, hover}) { const btnBaseName = `&.${name}`; return { [btnBaseName]: { ...standard, borderRadius: "2px", borderWidth: "1px", borderStyle: "solid" }, [`${btnBaseName}:hover`]: getHoverStyle(hover), ...
1
c80c80ddd88c305c89f0bf07cfc7e61e
c247f59581ad50b6b7f45fc1e54b8e4a
Этот метод расчитывает случайную длину свободного пробега фотона
class BrownianMotion: def find_free_path(self): return 2 * self.D * math.sqrt((2 * self.k * self.temp)/self.m) * 100
0
52cb30535066a6034326369202a81a1e
11bc7b96997fac895d0226de6852cba8
Este reporte contiene el resumen por cada cuenta de tipo mayor
namespace NewAge.Negocio public class ModuloFacturacion : ModuloBase public List<DTO_FacturacionTotales> Report_CuentasXCobrar(string Tercero, int Moneda, string Cuenta, DateTime fecha) { #region Variables DTO_FacturacionTotales dtoTotalesReturn = new DTO_FacturacionTotales(); ...
1
97d858bfc61f72b55acccefbf8a80f7b
723b8af8f9a8a870b479aca30bc8d01e
Write a function to generate the generalized abbreviations of a word. Note: The order of the output does not matter.
public class GeneralizedAbbreviation public List<String> generateAbbreviations(String word) { if (word == null) return Collections.emptyList(); List<String> result = new ArrayList<>(); backtrack(word, 0, 0, new StringBuilder(), result); return result; }
1
3eed8d72e23f9b5e0018c1b57629f927
4d3b301fecd7b7993a5ead64c8ae240c
Returns a formatted string for given money value in secondary currency.
initCurrency(); if (money <= 0.0) { money = 0.0; } return String.format("%s%2.2f", sCode, money * sCurrencyPrice); }
1
f25e426a73aa7708a344f7d73f1f0f7c
fb240116acf66c462ab8b984f03474e5
Тест получения сообщения действия по сущности (случай с удалением)
class MessageServiceTest extends BaseClass public function testDeleteMessage(): void { $response = $this->getMessageService()->delete('wrongId', 'conversationId'); $this->assertInstanceOf('Aosmak\Laravel\Layer\Sdk\Models\Response', $response); $this->assertTrue($response->isSuccessful()); ...
1
5fb66e65072b5dc2ab2c7c2a0ef193f5
b175a9f6e26f8c055f51ab99bde9a26d
Converts operands from their string representation to their numerical representation, resolving label names along the way.
try: int(label) return int(label) except: if label in symbolTable: if symbolTable[label] == '': return 0 else: return int(symbolTable[label]) else: return 0
1
6d620dc0d6d7cdcd424dc42c43ec6cab
d461ad09176bcb23b4a72987e794a097
Returns the pattern with the given object ID.
namespace SIL.FieldWorks.Common.RootSites public abstract class BaseFragmentProvider<TFragmentProvider> : IChildControlNavigation where TFragmentProvider : BaseFragmentProvider<TFragmentProvider> public abstract object GetPatternProvider(int patternId);
0
a2bfc4242e604117bb0004ed4b24ff9e
b5c302b577ce838ab5082612f2d475b3
更新安装上报临时表状态
namespace CSPN.BLL public class WellInfoService : IWellInfoService public int UpdateReportInfo_Pending(ReportInfo reportInfo) { return reportnumdal.UpdateReportInfo_Pending(reportInfo); }
1
1708ab3b16059e1343edef5cde2f5cca
ea8ac48b5f321895acf76c90fda1cbbb
根据集合name获取mongoose的model
let path = `${process.cwd()}/models/${name}` let model = require(path).create({ db: this[DB_INSTANCE] }) return model }
1
bfc4cd3a3eb305989f4db378edb40926
7a0245184cc02e34d4c0574c50662505
Show text field instead of password field so that user can see the password uncensored.
class Login(QDialog): def slot_show_password(self): self.ui.l_password.setEchoMode(QLineEdit.Normal)
1
77616d537c3835e7f295de9ee9b12619
5a36d484877fc5e9ab22694e2e175229
==================================================================== new timeout value This function is called to modify the inactivity timeout for the TCP socket. =======================================================================
{ assert( socket != NULL ); socket->m_timeout = millisec; }
1
f835e17b2fb8ed253a174fb9b6291c50
57954c1a498b547344c08c21e77185b0
检查上传的文件名字是否存在
{ SqlParameter[] param = new SqlParameter[] { new SqlParameter("@filename",FileName) }; SqlDataReader reader= DBHelper.ExecuteReader("CheckFileName",param,CommandType.StoredProcedure); if (reader.Read()) { return true; ...
1
43eab7b21c8aaa868f618acc2b55d3aa
dc007d00eb8a2e955e96ed7b09bfc4be
Adds the tabs to the page before it renders
abstract class BD_Base_Page public function render_help_tab( $help_tabs, $screen ) { if ( $this->screen == $screen ) { $help_tabs = $this->add_help_tab( $help_tabs ); } return $help_tabs; }
1
3bf9fa4d4859e706864d102fa13b0424
f5d0b1a2912454444901bc3a4850ae2c
Writes the device configuration into a string (ends it with newline)
class WriteDeviceSerializer(object): def to_str(self): return pformat(self.to_dict())
0
1cdbefa3725f439a0f730d46eec4ccc8
c989ac8a9462eca740477990f787fd98
GET: asset_location
namespace Inventory_MVC.Controllers public class LocationController : Controller public ActionResult Index() { ApplicationHelper.CheckLogin(); return View(); }
0
ebf0e5c3a74591ac437a9e981ef1aef2
9db60bc226a763e63d5905450049e5dd
Find the intersections between a rectangle and a line segment.
{ TIntersectHit2Df hit; return LineSegment(line.Position, line.Direction, segment.Start, segment.End, out hit); }
0
691f38255ef24f79e564d66ef7dd84c9
0365f2fd9abdaaf8ad346a71cb8a93f5
El sonido se reproduce en la coordenada que contenga el script.
namespace Frm_TorneoPRO public partial class Frm_Home : Form public void SonidoAmbiente() { sonidoEntradaCarga = new SoundPlayer($"{Environment.CurrentDirectory}\\csSound.wav"); sonidoEntradaCarga.PlayLooping(); }
0
55a0fb5c0516c6f747e7fa95608fa221
9bb4210b41b84418659d9d2a204dfed5
Get the company name of the game.
if(game != null){ return game.getGameName(); }else{ return ""; } }
0
24b3ac57f4f78d715174c2524121ea3b
f229864aba8c7ad24dc1e7da73863553
The id of the newly created draft share invite.
class InvitationRecord(BaseExchangeRecord): def invitation_id(self) -> str: return self._id
1
467af23f298581bc88db0a7fd425abe0
a0c9df187919048f56aa7519722517bc
Clear all focused UI elements.
namespace Pearson.PSCK1.WindowsStore public sealed partial class OptionsSettingsFlyoutView : SettingsFlyout, IMvxView void OptionsSettingsFlyoutView_Unloaded(object sender, RoutedEventArgs e) { var originalFocusedElement = FocusManager.GetFocusedElement(); var focusedElement = origin...
0
7379c3567185e020229986ff4ef0f25f
dddc9615cdb90e3157dfb83a1cef3034
#Log2 transform data prior to plotting.
B2M <- function(x) { x[x == 0] <- min(x[x != 0]) x[x == 1] <- max(x[x != 1]) log(x/(1 - x)) }
0
97e3392a771d8f15171aaf9705663d80
c92eb9a218c8d9ddac76eeeafc07e2d3
show the statistics fragment.
public class MainActivity extends FragmentActivity implements View.OnClickListener, ActivityCompat.OnRequestPermissionsResultCallback public void refleshStatistics(){ if(settingFragment != null) { settingFragment.refleshStatistics(); } }
0
bdd439b3e8f0e949a210df30694a51e6
b7809eaa376666ad7fab79a2abdf7605
返回字段prodId 产品型号ID
namespace POS.Service class GetSaleTmp01 public string ReturnProdID(int index) { try { return dataSet.Tables[0].Rows[index]["PROD_ID"].ToString(); } catch { return ""; } }
1
9f4f5567312adbb3df39326fd3345915
71fe96a5d591378a58fdda5d28f8bbb2
Check if the small bounding box is in the big bounding box. The condition is determined by the intersection area over the area of the small bounding box. This method is used to determine whether ROI is in a tile or not.
for roi in exclude_rois: if np.min(cdist(sl, roi, 'sqeuclidean')) < tol: return False return True
0
9a9f51a5823a3b105f76aa87ff310e35
56c7ac48ccf7c00dd31d7578c12c6205
Initializes the data source and populates the DataGridView control.
{ DataTable dtbData = DataService.GetData(); bindingSourceMain.DataSource = dtbData; dgvMain.DataSource = bindingSourceMain; if (dgvMain.Rows.Count > 0) { FormControlOption.Instance.EnableOrDisableCtrls(tableLayoutPanel2, true); ...
1
b330db55117ac0fef727bd524f2fcbf0
74c9be9202eca74de7e9815ba3779f49
刷新加载数据回调的方法
abstract class BaseFragment<D : ViewDataBinding,V : EastViewModel<*>> : Fragment() open protected fun refreshLoad(){ Log.d(TAG,"refreshLoad==>") }
1
63134bf05af4f75fec318e399b7eb9ad
95b330b7a705651b3809e765db7d5db6
recursively get the largest UI extents
namespace CubeX namespace Core public static class XExtensionUnityBoundsInt public static Single GetMaxExtents(this BoundsInt @this) { if (@this.max.x >= @this.max.y && @this.max.x >= @this.max.z) { return @this.max.x; } else { if (@this.max.y >= @this.max.x && @this.max.y >= @this.m...
0
1274236d2af66307dde528755a2b1ebb
808e129770be02aea90804fba912b934
Injects values from GUI objects to bound DTOs.<br/>
if (data instanceof CMBaseBaseValue) { CMBaseBaseValue dto = (CMBaseBaseValue) data; CMDetailPanelModel model = panel.getModel(); if (dto instanceof CMBaseValue) { CMBaseValue value = (CMBaseValue) dto; DateTimeSettings initialContactDateTime =...
1
721b320443f104eaa6f14a1a11cc2632
b4b480c52a21f25e42b0be79246ee501
将给定的img转换成html字符画
{ $info = self::getImageInfo($image); if ($info !== false) { $type = empty($type) ? $info['type'] : $type; unset($info); $createFun = 'ImageCreateFrom' . ($type == 'jpg' ? 'jpeg' : $type); $im = $createFun($image); $dx = image...
1
3b1381cc0a35fca82b7878904e94ca55
1211e45c9323c7c1af7bd42d07507bb0
Display students in alphabetical order ------------------------------------
class Student extends OLE function getAllStudents() { $i=1; $qry="select * from student order by student_id DESC "; $result=mysql_query($qry); while($row=mysql_fetch_array($result)) { echo "<tr><td> </td><td>".$i++." </td> <td>".$row['student_id']." </td> <td><a href='student.php?action=view&id=...
0
c497490893015d3fa4c3f91603c9fa6e
9db48f64b12e5428768266875cacb885
Add anchor to url if provided in GET parameters.
{ $newParams = static::getParamsAsArray($urlToStealFrom); if (!$newParams) { return $urlToAddTo; } return static::appendParamsToUrl($urlToAddTo, $newParams); }
0
b2b2753e9ae3dfc17399f69387acbf92
da751bcd56b1b1b4cfe6bbf91665308d
读取后台数据,将临时表单中的数据转换为json数组
function FormBackDataListHandle(data, fields) { var key_temp = []; var data_list = []; for(var i in data) { var loc = i.lastIndexOf('_'); if(loc != -1) { var key = i.substr(0, loc+1); var last = i.substr(loc+1); for(var f in fields) ...
1
c441ba00722161db6abd3bf74651275e
8171034442f5ba3ad76e8c138957c633
生成SELECT_FROM_MODEL类型控件HTML
namespace Qx.Tools.Web.Controller public static class PageHelper public static HtmlString GetSelectHtml(string name, DbContext db, string tableName, string nameSpace, int textIndex = 1, int valueIndex = 0, string contitions = "", string className = "form-control") { return ...
1
f044b6a9c74d566a504000e8cdc4423a
3f5a3d04ff5bda2daf147804372b52ab
Run a new node instance
class NodeCMD(Cmd): def do_init(self, args=None): self.node = Node(debug=True)
1
d66be9e97a966c9ba48a8d0aaaf44a99
22f86d1c7182d68f9bfc528fe6685ed8
Gets the value of the room property. <p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the room property. <p> For example, to add a new ite...
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "oMessageDel", propOrder = { "messageid", "reservationnumer", "roomnumber" }) public class OMessageDel public JAXBElement<String> getROOMNUMBER() { return roomnumber; }
0
ceabf33e68ea99ab67b4fcfa2840a499
74cf34e3a20860a1a703fa17cb1b4cdc
cosine-weighted latitude
def cosine_weight(ds): lat = ds.latitude lon = ds.longitude wt = xr.DataArray( np.ones((lat.size, lon.size)), coords=[lat, lon], dims=['latitude', 'longitude']) wt = wt * np.cos(np.radians(lat)) return wt / wt.sum()
1
d8ffc5c469701908351ec592a93e5f2d
af47223769027ae75474bdb4cd93cc74
解析powerpoint2003,只能获取纯文本
public class ReadFileUtils public static String readWord2007(String path) throws Exception { File file = new File(path); if (file.length() == 0) { return ""; } OPCPackage oPCPackage = POIXMLDocument.openPackage(path); XWPFDocument xwpf = new XWPFDocument(oPCPackage); POIXMLTextExtractor ex = new XWPFWord...
0
2d686550340fb77acf864fd1674110ad
d764c9cde831fde65332584640465890
Convert flow to a dictionary.
class FlowAction(object): def from_dict(dict_content): pass
0
bb287531e71dc667641ce40128955b1b
796ef211744bde9a6a48ff1d3303046c
描述:查询当前资源尚未拥有的操作
List<ResourceUIPo> getNotResourceOpsByRole(String agencyCode, String roleID) throws Exception;
1
bc777dcd0e969d4d2fc1317a2184aeaa
95ddd8c7a6d2399a107b1f405c95b86e
重写抽象类Pet的抽象方法make_voice
public class Dog extends Animal @Override public void voice(){ System.out.println("------------------ dog"); }
0
220de6ec5a804a22457e95f053490a7c
7b6e4962f1536dda07d499715e494ae7
Returns whether a template exists within the classification matrix
public partial class IndicesNamespacedClient : NamespacedClientProxy public virtual ExistsTemplateResponse ExistsTemplate(ExistsTemplateRequest request) { request.BeforeRequest(); return DoRequest<ExistsTemplateRequest, ExistsTemplateResponse, ExistsTemplateRequestParameters>(request); }
1
d107bfcee291fc8ebdcbd30a4e6c2f8b
174fef63bbe0dadce01d61320fa136c5
@brief Solicita el nombre del struct en el que se está trabajando actualmente.
class Attribute(object): def struct_name(self): if self._struct_name is None: result = self.attr_name else: result = self._struct_name return result
1
815015ec5980fbe21fe842c2c2289fb4
24b4807e07dc79e167baf2665c5e3fd7
Return discover data for *event*.
{ $setRoot = $visitor->getRoot() === null; $data = array( 'type' => $this->namingStrategy->classToType(get_class($container->getEvent())), 'data' => $visitor->getNavigator()->accept($container->getEvent(), null, $context) ); if ($setRoot) { $visito...
1
1b09a7a6f7538ae0f9ab2f0091c3b324
698fdc49e40367fdc46ed530cd756b1d
获取当前已添加人员表
namespace OAManager public class PersonInfoManager : BaseManager public DataTable GetDataTable() { return Dal.From<PersonInfo>().ToDataTable(); }
1
f554aa51c9b891c35ac5733d5ca7053c
6b6e728ef8cbc0af16ec179d2285a95a
creates and returns an array of letters as strings, starting with "a"
function getAlphabet() { var alphabet = 'ABCDEFGHI'; return alphabet; }
0
f24f3d901d7d589dd83bf93bea568a36
1c5a70e3138c2c776a33013519e4619d
Handles the Click event of the SaveNewBTN control.
namespace Search public partial class SearchControl : UserControl private void SaveNew_Click(object sender, EventArgs e) { SaveNewTemplate(); }
1
cf7c4cab0df7f559b3a00af8676259bb
c280a6b69102ce6b6138c0c96b8c0219
群发消息上传图文消息内的图片获取URL【订阅号与服务号认证后均可用】
@Service @Slf4j public class WeChatMediaServiceImpl implements WeChatMediaService @Override public String uploadNews(String appId, String appSecret, String param) { String access_token = weChatAccessTokenService.getAccessToken(appId, appSecret); String url = appConfig.getWECHAT_UPLOAD_NEWS_URL().rep...
0