query_id
string
corpus_id
string
query
string
code
string
label
int64
4046658e3217797ee3873a68a612f76f
8c62467023435738f3b2026eafc53f94
Sets the value of the minScore property.
class Query extends Param public function setMinScore(float $minScore): self { return $this->setParam('min_score', $minScore); }
1
3df8e2637115c4de099b746483d447ca
da9232dbccc33151256340c2f7603155
Save the store to store.ser
class Astore(MutableMapping): def dump(self, filename): with open(filename, 'wb') as f: pickle.dump(self.dicty, f)
1
d1b3e6c33ae509635af369ecfec9cedf
2d5242b86a371bff13866379f863b5e5
单击主页面漏射束发生的事件
function MainLayer:MiddleClick() if self.m_gui_acquire_sprite then self.m_gui_acquire_sprite:playByIndex(1,LOOP_NO) self.m_gui_acquire_sprite:setLuaCallBack(function(eType, pTouchArm, sEvent) if eType == TouchArmLuaStatus_AnimEnd then self.m_gui_acquire_sprite:playByIndex(0,LOOP_N...
0
5a08bea4b8797f1a4eb9f528f04fd013
0dc3846fc0e0728e53beba56777e59a4
命中率计算函数
if self.shot_count == 0: return 0 else: return self.hit_count / self.shot_count
1
30ccc94cb5da4173f92484d9fdf89460
071568c0e3ccdb90ad517dc54fb55610
Checks whether or not a six-digit string is a valid mmddyy date.
def is_yyyymmddhhmmss(value, nullable=False): if nullable and value is None: return True valid = re.match("^20[0-9]{2}[0-1][0-9][0-3][0-9][0-2][0-9][0-5][0-9][0-5][0-9]$", value) is not None return valid
0
3af84f00e89e8c7ba9190cba32a2073a
ca8449ac99457fc0bd6e3fce5bc49a8e
Responsavel em pegar os dados do Departemento e popular as caixas de textos do formulario
public class Departamentos extends javax.swing.JFrame private DepartamentoDTO preencherDepartamentoDTO() { DepartamentoDTO departamento = new DepartamentoDTO(); String codigo = jTCodigo.getText(); String descricao = jTDescricao.getText(); if (jTCodigo.getText().trim().length() == 0) { ...
0
4960d2a9d211ea0b349714be255a929a
2cab0047c6be7e777b4112492291af43
显示刷新图标
local function iconOnClickRefresh() if(m_status == STATUS_UPSTEP) then WeaponUpstep.refreshInfos(); elseif(m_status == STATUS_DEVOUR) then WeaponDevour.refreshDisplay(); end refreshDisplay(); end
0
c243ed871489db9162a6ecea9696fa7b
eb930de7c390aad53747774f74efa125
Scroll the visible layout, returns if the screen needs to be repainted.
if (!this._viewport) { return; } const renderedRange = this._viewport.getRenderedRange(); const newRange = {start: renderedRange.start, end: renderedRange.end}; const viewportSize = this._viewport.getViewportSize(); const dataLength = this._viewport.getDataLength(); let scrollOffset = ...
0
8480bb23e41a56b199cab0977934635f
ba856e4cfab89f974f6d6593417fb5bd
<description> Reset the scale of the selection. </description>
InternalUnsafeMethods.ResetSelectedScale__Args _args = new InternalUnsafeMethods.ResetSelectedScale__Args() { }; InternalUnsafeMethods.ResetSelectedScale()(ObjectPtr, _args); }
1
1168337026c1c696f7d433f9b2527d40
f4afba9b36a1eb24e59d49d986591088
Fixture to load a known PGP key into the configured keychain.
super(BDEFileWithKeyChainTest, self).setUp() self._resolver_context = context.Context() test_path = self._GetTestFilePath(['bdetogo.raw']) self._SkipIfPathNotExists(test_path) self._os_path_spec = path_spec_factory.Factory.NewPathSpec( definitions.TYPE_INDICATOR_OS, location=test_path) s...
0
b3703257972a8d8356e8182b98376ddc
e9581b677e7f0392552d89b670fdb204
test dynamic array allocation and deallocation
int main(int argc, const char *argv[]) { int i; int *ptr=(int *)malloc(9*sizeof(int)); free(ptr); int **arr = (int **)malloc (3*sizeof(int *)); for(i=0;i!=3;i++) { arr[i]=(int *)malloc(4*sizeof(int)); } for(i=0;i!=3;i++) { free(arr[i]); } free(arr); return...
1
0dcdd3f626a43a916c6e10a404d4b8c7
def13c47b83e8ce883079e598c7f2944
Binary cross entropy loss ponderee par le vecteur w (pour réduire class imbalance)
def log_loss(X, y, w): return np.log(1 + np.exp(-y * np.dot(w.T, X)))
0
fdeebdd6f7f364ea8752848ab5437c86
a148919f7b8d4d79a9e86d805ec56a71
Calculate the mean distance of the specified coord from all of the other coords using the provided distance metric.
avg_dists = [] for i, pos in enumerate(l): dists_to_others = [np.sqrt((pos[0]-other_pos[0])**2 + (pos[1]-other_pos[1])**2) for j, other_pos in enumerate(l) if i != j] avg = sum(dists_to_others)/len(dists_to_others) avg_dists.append(avg) return avg_dists
1
b06506c852a054e033be2154e91ee188
647fef66eade0d6267a18de83c56fe5b
For the projects represented in the plan, find in Jira and return other Epics assigned to this Sprint
ArraySprint = [] JIRAQuery = config['INI'].get('FeatureJQL') + ' ORDER BY "Sprint" ASC' Issues = jira.search_issues(JIRAQuery, startAt=0, maxResults=False) for issue in Issues: found = False for i in range(len(ArraySprint)): if ArraySprint[i] == st...
0
a7c5c3e66c36b021d56b99ebab51da85
b1073d4d9b9b77453ab9f4fec9fe46ae
Adds a new rule. A rule consists of a match pattern and a replacement string, or a block that returns the replacment value. The block gets the regex match object as argument.
{ if (regex == null) throw new ArgumentException("Must supply non-null Regex.", "regex"); if (replacement == null || (!(replacement is String) && !(replacement is MatchEvaluator))) throw new ArgumentException("Must supply non-null replacement (either Strin...
1
21c3952d6b0b01597bf9c410f1eac5d4
31755d4de95f57096f1ae1b4fb5a366e
\brief Enables GMII for the sliver.
( GT_U8 devNum, GT_U32 portGroup, GT_U32 phyPortNum, MV_HWS_PORT_STANDARD portMode ) { #ifndef MV_HWS_FREE_RTOS MV_HWS_PORT_INIT_PARAMS curPortParams; GT_U32 coreClk = 0, coreClkHw, data; MV_HWS_DEV_FUNC_PTRS *hwsDevFunc; hwsDevic...
0
51c23805025d957d6b7e316a7a788ca2
74eef5642814b20464403d0a494b255a
根据分组编号和任务名查找任务
List<GroupTaskEntity> getGroupTask(String groupId, String jobKey);
1
5af38264c69629b8a349f9b0e3ecddb4
d010bfdd1caa20f806d13f128eee1ff0
A list of allowed link types (asynchronously) Get a list of allowed link types that can be used for the &#39;links.linkType&#39; attribute of external organizations <table summary="Response Details" border="1"> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> Succe...
namespace Org.OpenAPITools.Api public partial class ServerAndOrganizationsApi : IServerAndOrganizationsApi public async System.Threading.Tasks.Task<JsonSuccessBase> GetLinkifiersAsync (CancellationToken cancellationToken = default(CancellationToken)) { ApiResponse<JsonSuccessBase> localVarRespo...
1
873019c8a2e1bd970223cfd9168fb3c0
82d7bfea7013b695576b52e9d7f16d8e
Obtain addresses from Google maps API.
payload = {'q': address} html = requests.get(URL, params=payload) soup = BeautifulSoup(html.content, "html.parser") if soup.find('error'): latitude = 'nan' longitude = 'nan' print('ERROR !!!') return [latitude, longitude] latitude = soup.find('lat').string longitude = soup.find('lng').string return [lati...
0
25d20cdc21f6bcc58f8edcdaff360b14
83f278adb43f0cc11b9a13f75aff0d58
subscribe to route params and fetch the product based on productId
const theProductId: number = +this.route.snapshot.paramMap.get('id'); this.productService.getProduct(theProductId).subscribe( data => { this.product = data; } ) }
1
af438ffcf27f97c838168268980e06ae
3dadbb9463797572aa5d504ac455ac6e
Returns cached global pipeline list or causes a fetch
board = self.get_object() if 'force_refresh' in self.request.GET: board.invalidate_cache('filtered_issues') board.invalidate_cache('pipelines') return Response(board.pipelines())
1
3b98831bd665b065abb177c5dc1cc446
012e2172fcc66142da789fbf5308c79c
POST: Shop/Create
namespace MyFirstWeb.Controllers public class StoreManageController : Controller [HttpPost] public ActionResult Create(FormCollection collection) { try { return RedirectToAction("Index"); } catch { return Vie...
1
eae9307a981d4386dee5f04425e16492
1d6d785f68dc54dbdee604db0f67c798
Checks visibility of the token
class PaymentToken extends AbstractModel implements PaymentTokenInterface public function getIsVisible() { return (bool) (int) $this->getData(PaymentTokenInterface::IS_VISIBLE); }
1
235a188b48f85ecedfe8ec3020e691eb
886d4d2da5727dbf7e70bf38f9a69795
Lookup a GLSL program object.
CAMLprim value caml_link_program(value prog) { CAMLparam1(prog); glLinkProgram(PROGRAM(prog)); CAMLreturn(Val_unit); }
0
b5405bd4226313773bf7434ec37bad73
c2775c19bc51239607a2a97972fd34cd
格式化字典值,字典里存储的都是queryset集合,flag表示是否有日期格式需转换
new_dict = {} for item in my_dict: if isinstance(my_dict[item], datetime): new_dict[item] = my_dict[item].strftime('%Y-%m-%d%H:%M:%S') else: new_dict[item] = str(my_dict[item]) return json.dumps(new_dict)
0
8a87471613009ac3fd2e4bccb875369f
325ef681bc76e01a1339685ed7c58a3f
update cytoscape graph based on state of checkboxes
let cyOnCallback = function(evt) : any { let node : any = evt.target; let tmp : number = node.id(); console.log("NodeID: " + tmp); return tmp; }; let layout : any = { name: 'dagre', padding: 'layoutPadding', rankDir: 'LR' }; console.log("Load state space"); ...
0
4322e98e0265af398aeb3983098af7db
48f60303bf9ef13972c51962d8a34221
This method is used to verify ingredient element list.
self.driver.get("http://localhost:5000/login") self.driver.implicitly_wait(0) self.driver.find_element_by_id( "email").send_keys('tom123d@yahoo.com') self.driver.find_element_by_id( "password").send_keys('3$l<qpY01PsWDSc9KLnV') self.driver.find_element_b...
0
c0ba6c77860a9aedb7e04e9f1ff44bfc
ccd6c67da114a938247a908853142488
获取公司及其子公司信息
List<OrgCompany> querySelfAndChilders2(String companyId);
1
628239f6887b06fe862fac95f5486d5f
d7e1df700105f343662ef262eb364656
将map中的键值对合并到节点中.
public abstract class BaseBuilder public void fillMap(Map<String, String> map, XNode node){ if(node != null){ String refid = node.getStringAttribute("refid"); if(StringUtils.isNotBlank(refid)){ refid = builderAssistant.applyCurrentNamespace(refid, false); ...
0
90ff4f55000ef94d515ba77c4d040b4f
f9b2b4fd24820fd6b6a7ab97e4be959b
Testa o método que verifica se um aluno está cadastrado no sistema, mas com um aluno inexistente.
class ControleTest extends Controle @Test void testConsultarAluno() { assertEquals(true,controle.consultarAluno(209)); assertEquals(false,controle.consultarAluno(500)); }
1
c87d4f540bb58c8ef8a3fd0c7fc453f2
130ae4c0c64df036c6f03527013a1b86
check if a uri element is a parameter, parameters are determined by being enclosed by '{}'
cmsg_proxy_token_is_url_param (const char *token) { int token_len = (token ? strlen (token) : 0); if (token && token_len > 0 && token[0] == '{' && token[token_len - 1] == '}') { return true; } return false; }
1
9412bb3695a6506624e26cfd8af250d8
27b8d8791816407d795ebe26756d390a
Set Accounted Debit. Accounted Debit Amount
public class X_T_GLJournalRegister extends PO public void setAmtAcctCr (java.math.BigDecimal AmtAcctCr) { set_Value ("AmtAcctCr", AmtAcctCr); }
0
37c237c19c93cffabeb151f5f88d6857
78698c86cd047fe64459788f4918b8c1
turn off led when closing
int led_close (struct inode * inode, struct file *file) { gpio_set_value(PAD_GPIO_E+13,1); gpio_set_value(PAD_GPIO_C+17,1); gpio_set_value(PAD_GPIO_C+8,1); gpio_set_value(PAD_GPIO_C+7,1); printk(KERN_INFO"led_close\n"); return 0; }
0
d21b190559dd428051d4b8b236399b4f
bef14db4cf294e3c9d084394b8396be1
Get selected values as array from a multi-select select
export class AppBase extends Base getMultiSelectionAsArray($dropdown: JQuery, defaultVal: any) { if ($dropdown.val() != null) { var selectedVals = $dropdown.val().toString(); return selectedVals.split(","); } else { return defaultVal; }...
1
2f9bf1aba7e4616b600bfa8b415a513d
dddad6cce48316934417bd84e7eca317
Adds your client name to the current client name string which is used as User-Agent when communicating with ecommerce.
namespace Avalara.AvaTax.RestClient public partial class AvaTaxClient public AvaTaxClient WithClientIdentifier(string appName, string appVersion, string machineName) { if (!_clientHeaders.ContainsKey(Constants.AVALARA_CLIENT_HEADER)) { _clientHeaders.Add(Constants.AVA...
0
ecd8ac1a03e719aa06bea2ab42b0abda
410edfdc05854ebbc8be317ece4a6c87
Averages a group of weather objects. Asummes it is passed weather objects of the same day Given an array of weather objects. returns a single weather object.
generateWeatherObjectsFromForecast(forecasts) { const days = []; for (const forecast of forecasts) { const weather = new WeatherObject(this.config.units); weather.date = moment(forecast.dt, "X"); weather.minTemperature = forecast.temp.min; weather.maxTemperature = forecast.temp.max; weather.weatherTy...
0
d71a1ad4207b7874545f3a65f0d64642
345852d5a209c30be1ff0aeef178e0d9
Verify omnibox popup selection.
app_name = '20_thing_I_learn_from_browser_and_web.crx' search_str = '20 Things I Learned About Browsers & the Web' app_url = 'http://www.20thingsilearned.com/' self._VerifyAppSearchCurrentWindow(app_name, search_str, app_url)
0
857cea9ebd9f1f91f9caca9b4c9f4977
f09fa8c6646637a08dde3fe0aac0c130
在这里处理服务器发过来的消息
public class TimeServerHandler extends IoHandlerAdapter{ @Override public void messageReceived(IoSession session, Object message) throws Exception { String str = message.toString(); if (str.trim().equalsIgnoreCase("quit")) { session.close(); ...
1
d4964c93ee363422135ddacae31c4388
74096b85e30ebfc46620869338979691
修改KD质量问题分析8D报告
namespace SHMECweb.Web.Administrator public partial class SecondLevel_4 : System.Web.UI.Page [WebMethod] public static string SaveAnalysis5(string t, string id, string tvalue) { try { if (t == "dxt") { if (QA_S1_4_dxtBusines...
0
95a3e5b31adb3c2a270d5c0d1764be95
84260385ecc7e9f2f58304e982a8cb1f
将字符串表达的数据转换为真实的数据<p> 枚举类型将会返回枚举元素
{ Object value = null; try { valueStr = ((valueStr != null) && (valueStr.equals("NULL"))) ? null : valueStr; switch (typeEnum) { case Fields.ENUM: value = convertAnEnum(valueStr); break; cas...
1
0d87d6b86b229f713bf30d80a01ff894
bde07e7ddc69506453ab8ab73a6990f6
根据主键只更新有值得数据
int updateByKeySelective(T record);
1
bb66d9cb17d2bdb9c3606df129167e5e
3877967c9d2f32d5a47f747c5881db4e
Get the value for an attribute for the current element. The attribute name should be local name, the name without the prevfix.
public class Element extends ParentNode public final String getAttributeValue(String localName, String namespaceURI) { Attribute attribute = getAttribute(localName, namespaceURI); if (attribute == null) return null; else return attribute.getValue(); ...
1
7310954f28b0845cee3edc83ed070179
a0104375c90c4e73cac566f46ab1385a
Выводит сообщение об остановке рендера.
namespace Nuaj.Cirrus.Utility void EndRender();
0
78ed281be90951487bb1c1af209636c8
f523a83f31248fe772a010c2a5075f65
Get 监听器协议类型,可选值:http,https,tcp,udp。
public class L7ExListener extends AbstractModel{ public void setProtocol(String Protocol) { this.Protocol = Protocol; }
0
e1a1c06c6174010de9e723573cec772e
bdcfae66feff7f29c1ceca64d747c779
Update icon with toilets status.
export class JCDStation updateIcon() { if (this.reserved) { this.marker.setIcon(window.app.map.orangeIcon); return; } if (this.selected) { this.marker.setIcon(window.app.map.greenIcon); return; } this.marker.setIcon(this.freeBikes > 0 ? window.app.map.blueIcon : window.app.map.greyIcon); }
0
8dbf4c64d188799d76fc01defcb80099
1b6f1a09a2bf15ee810cc0f4814565c2
Test that search and replace works in templates.
def _add_template_searchpath(app): app.add_template_searchpath('test_output/templates') app = make_app(_add_template_searchpath, 'test_output') assert app.template_env.get_template('hello.html').render() == 'hello'
0
c0c1e8fec988b79a421850fe4a03c096
b33bc6d5f60a8490e86ccb54b68f2690
Specifies that the property should be stored in the database in binary.
class Builder public function setBinaryData(bool $boolean): Builder { $this->isBinaryData = (boolean) $boolean; return $this; }
1
d10783fc58f3223fa81c4f26a28f466e
85fdfefe01ef361ebeb74c99530b19b7
This is used to set the membersList table with the members retrieved from the database.
void MP1Node::initMemberListTable(Member *memberNode) { memberNode->memberList.clear(); }
0
4a01e7917d6e937363843d2bba0c12bf
5907ec6d3760a862ed8295b516794636
Remove errors from login/signup form
export class LoginForm extends Form public clearFormErrors(): void { this.form.find('.errors').empty(); }
1
68e7effcee4e17107ca69b003d85f369
e80d45a347dcf405fb3bb777cfa87010
Get mask of infinite values if dtype is Float
if scale is None: scale = dtype.inf() return value + (1. - mask) * (-scale)
0
96dfb5430f3df9e85c5b5141f931ad5c
f7784cb04ca11a45eba20da14d344cf8
在处理范畴内查找符合选择器的首个元素
if (containsItsOwn && MatchesSelector(el, selector)) { return el; } while (el) { if (MatchesSelector(el, selector)) { break; } el = el.parentElement; } return el; }
1
2c617164204f34e5615250823d73b150
d8149d2c5cd4d5edf82de0bb653278a2
Gets the signed integer value that resides from the current position to the next specified number of bits and advances the cursor
namespace VTDev.Libraries.CEXEngine.Crypto.Cipher.Asymmetric.Encrypt.NTRU.Encode internal sealed class IndexGenerator public class BitString public int Pop(int NumBits) { int i = GetLeadingAsInt(NumBits); Truncate(NumBits); return i; }
0
691517b162698f87740aa5374bde4d9b
9a3988422e9fe813db3527af1e209df0
通用删除接口,为了安全性,只支持基于id的通用删除
class BaseModelService extends Component public function apiDelete($id) { if (!\Yii::$app->request->isDelete) { return [ 'status' => false, ]; } $object = $this->findOne($id); $status = $errors = false; if ($object->delete()) { ...
1
8369b1cf0386006679e254d74d586fc2
e8db03b99e66e60780213392de87338b
Should be the absolute path the root of the application. Like everything else, no trailing slash.
class Engine public function getApplicationRoot() { return $this->cleanPath($this->applicationRoot); }
1
31e126adaf23c6a8280e94ae8acae897
fa5177856b0601efa9b2b343ad6c3d45
Validation method for <see cref="ManagedEnvironmentsStoragesList" /> method. Call this like the actual call, but you will get validation events back.
namespace Microsoft.Azure.PowerShell.Cmdlets.App public partial class App internal async global::System.Threading.Tasks.Task ManagedEnvironmentsStoragesCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string environmentName, string storageName, Microsoft.Azure.PowerShell.Cmdlets.App.Models.A...
0
fd8291765ce60ce37b03c52fae89387c
7ad48042ab4fafee804ca525bf1b73b8
删除工位及该工位上的设备
@Transactional(rollbackFor = Exception.class) public int deleteSingleWorkByIds(String ids) { User user = JwtUtil.getTokenUser(ServletUtils.getRequest()); if (user == null) { throw new BusinessException(UserConstants.NOT_LOGIN); } Integer[] swIds = Convert.toIntArray(i...
1
09346738b08b02f2c4d0c86805f24f38
0954dd6483687ce18300283c1a014721
Request the TimeSeries Alpha Vantage API for a specific function and symbol.
class AlphaVantageFeed( apiKey: String? = null, val compensateTimeZone: Boolean = true, private val generateSinglePrice: Boolean = true ) : HistoricFeed fun subscribe(asset: Asset, interval: Interval = Interval.FIVE_MIN) { val symbol = asset.symbol subscriptions[symbol] = asset val r...
1
0b2f10fd85bee32a43c2771b9265bf3e
88a834238912bb5e04902cf51dbc6793
This method rotates the graph created by 180 degrees. Suitable for rotating upside-down hierarchical graphs. source: http://chianti.ucsd.edu/svn/coreplugins/tags/cyto- 2_3/ManualLayout/src/ManualLayout/rotate/RotateAction.java
Vertex start, end; Edge e, e2; Iterator<Vertex> i; Iterator<Edge> j; Iterator<Edge> k; double be = 0; boolean backedge = false; for (i = myGraph.vertices(); i.hasNext();) { start = i.next(); for (j = myGraph.incidentEdges(start); j.hasNext();) { e = j.next(); end = e.getFirstEndpoint(); ...
0
da88d700d762bbb5ea3b026c8775f174
314aa43ca22285a9c54e8d228d203db8
保存当前用户id到_Installation表中
public class DeviceInfo public void saveUserId(String userId) { SharedPreferences.Editor editor = mSpf.edit(); editor.putString("user_id", userId); editor.commit(); }
0
a8aaa360ca434239f5f6643ed3a1628b
c1ac5be3176ee7ea0ee6784ebab2d93b
上传负责人正面照片
class Work extends \think\Controller{ public function face(){ $userid = input('userid'); $matterid = input('matterid'); $photo = Db::name('sys_peopleinfo')->where('id',$userid)->value('idcardData_PhotoFileName'); $url = ROOT_PATH.'public'.$photo; $photo1 = $this->base64EncodeImag...
0
097dc766286511fc4135c353d8d66ff9
40563b427b0cfbc54d31509a435465aa
Read properties from "edu/avans/aei/ivh5/main.properties". This property is not actually used in this example class.
public class ExperimenterDefaults implements Serializable public final static Properties getProperties() { return PROPERTIES; }
0
64894a81a27722fe4119b0e511aa793e
b20b7b116275ed2654d16ca1ec5b9169
获取笛卡尔坐标
def ToCartesianC(r,o): x=r*math.cos(math.radians(o)) y=r*math.sin(math.radians(o)) return (x,y)
1
a3663df3be8694ab5a915a4955b1738e
8d91a4308f9281ca0175748eaad9b086
adds a new access key to the credential.
export class Client extends AbstractClient async UpdateAccessKey( req: UpdateAccessKeyRequest, cb?: (error: string, rep: UpdateAccessKeyResponse) => void ): Promise<UpdateAccessKeyResponse> { return this.request("UpdateAccessKey", req, cb) }
0
91e10903b28d7eb6b2e780a35aeee135
1fb76d8a5ead420280742165cd612c82
Update the complications on the element
class MedicalCondition extends MedicalEntity public function possibleComplication($value) { $this->setProperty('possibleComplication', $value); return $this; }
1
50af2703a3957acd594dbe5b3f0d48f7
a30846d2755440305de8e37267b89e19
Adds new Supplier Address to SupplierAddress collection.
{ StringBuilder sb = new StringBuilder(); bool valid = await base.Validate(entityObject); var existingObject = await GetSupplierAddressByEmailBL(entityObject.Email); if (existingObject != null && existingObject?.AddressID != entityObject.AddressID) { ...
0
e64fb1e67e8700e2177fd88c7deec31b
48ba50b94f136eddb371c4fac591e9f5
Prevents the user from clicking on individual questions to jump into the form-filling view.
export class DynamicFormControlComponent implements OnInit ngOnInit() { if (this.question.isDisabled) { this.formGroup.controls[this.question.name].disable(); } }
0
87bcdb78153ddf952a60517b622d0726
f31e6bb292a60a46bc534299e0af00e0
이진 영상에 대해 레이블링 수행
image=segment(image_s) img=image.convert('L') im2,cdf=histeq(np.array(img)) imgdeno=denoising(img) thresh = filters.threshold_otsu(np.array(im2)) binaImage=binarizing(imgdeno,thresh) return binaImage
0
41d33e2587f4922d2b36080baa4155c7
ebd8573ae645f651f1e045f1fa3769be
Setup test hardware files and build servo object.
global servo servo = ax12.Ax12() servo.__init__() print "hola" servo.setLedStatus(1, 0)
1
a69cdbd790b9b28b1bbf17ef2f70391d
408219374cda24491591e7ce537cd95b
Event fired when a row has been added.
default void onRowAdded(DataTable<T> dataTable, TableRow<T> tableRow) {}
1
11ca43b8f7d6f1ef1c00bcded45b933e
c26d02cae8b0f36797f73e8353e01f86
Chuyển đơn hàng thành trạng thái hoàn thành (Có trạng thái là 2)
DB::table('bills')->where('idBill',$id_bill)->update(['trangthai'=>4,'note'=>$request->txtnote,'update_date'=>NOW()]); $bills=DB::table('detailbill')->where('idBill',$id_bill)->get(); foreach($bills as $bill){ $book=DB::table('books')->where('idBook',$bill->idBook)->first(); ...
0
86a210328f0d32317cc7e5518e3d33b1
40fd7e42e9a72fc89bb7b4d04b791198
Changes whether or not the renderable can receive shadows.
export class BaseRender extends EventDispatcher implements ISingletonElement, IOctreeObject get castShadow(): boolean { return this._castShadow; }
0
42aa85b6d8403bc8f0e23324c13b794e
9e346464c05f9269ddd3622141e14e7a
压缩字符串并把压缩结果写入输出流
T compress(S source) throws CompressorException;
0
cc29f91d246bdca868b7531e6de922e4
93740813e45343eacd53c28d68705de0
ResNet encoder composed by layers with increasing features.
class AutoEncoder(nn.Module): def _encoder_net(self, in_channels): self.encoder_layer1 = nn.Conv2d(in_channels, 32, (3, 3), stride=1, padding=1) self.encoder_layer2 = nn.Sigmoid() self.encoder_layer3 = nn.Conv2d(32, 32, (3, 3), stride=1, padding=1) self.encoder_layer4 = nn.Sigmoid() ...
0
87d8af1929f6896ab8cf88e3e41e7616
58a3bd6bd259a20bb3e92dcd96906aa7
Does a non-negative matrix factorization on input matrix
def _matrix_factorization(data, bias, shape, order, K, steps, alpha, beta, verbose=False, random_state=None): if random_state is not None: np.random.seed(random_state) num_users, num_items = shape P = np.random.rand(num_users, K) Q = np.random.rand(num_items, K) ...
0
7e20878c1644b02702b0d1fe2c365594
a2a1656568e7406e2f181e56fb7a74a8
Checking if ASN number is within RFC limits
if (strtolower($ip) === 'unknown') { return false; } $ip = ip2long($ip); if ($ip !== false && $ip !== -1) { $ip = sprintf('%u', $ip); if ($ip >= 0 && $ip <= 50331647) { return false; } if ($ip >= 167772160 && $ip <= 184549375) { return false; } if ($ip >= 2130706432 && $ip <= 2147483647) { re...
0
6dee1aa0009fb31eda8e403ce3aadf86
b49896821af0b476c83579ad8a2ebcf5
ログイン状態であれば、自分で作成したレシピの削除機能を利用できる
def edit_recipe(request, recipe_id): user = request.user recipe = get_object_or_404(Recipe, id=recipe_id) author = recipe.author if author != user: return redirect("index") form = RecipeForm(request.POST or None, instance=recipe, files=request.FILES or None) cont...
0
2dee080cf9d0bcf757393212f6cf9923
8ce14aa7f3811261be2c29328c440d6c
Checks to see if the buffer blocks of the current floating piece of Tetromino is touching the left border or touching the right border or neither. Input Parameters: None 0 if not touching left border or right border 1 if touching the left border 2 if touching the right border
static u8 voidCheckCollisionLeft (void) { u8 local_check = 1 ; switch (global_u8CurrentShapeIndex){ case 0 : if ( (GIT_BIT (shapesPosition[(global_u8CurrentShape_Y / 10)] , ((global_u8CurrentShape_X /10)-1) )) || (GIT_BIT (shapesPosition[(global_u8CurrentShape_Y / 10)+1] ,((global_u8CurrentShape_X /10)-1) ))...
0
479e532f554e0501a3fe75031e2d4078
86ff7365b3fc9c665fe35b2c48dfc3b8
获取磁盘可用空间(单位:byte)
StatFs stat = new StatFs(SDCardPath); long blockSize = stat.getBlockSize(); long availableBlocks = stat.getAvailableBlocks(); return blockSize * availableBlocks; }
1
9eaa3ea0bfee7bebe81302b25b6e17ad
7e1b45eb0de4ebc00ac241b667dbbac8
添加或设置一个图层的时间轴
{ List<EditorControl> list = c.Root.FindControls<TimeLineViewCtrl>(); if (list.Count > 0) { TimeLineViewCtrl timeLineCtrl = (list[0] as TimeLineViewCtrl); if (timeLineCtrl != null) { Vector2 oldPos = timeLineCtrl.ScrollPos; ...
0
22fa3d668ef2e9e981f603f81f19aebf
ae5c81e9cf6d3d8443d19e4e54f3a4ca
Delete a group level JVM resource.
Response<Void> deleteByResourceGroupWithResponse( String resourceGroupName, String serviceTopologyName, Context context);
0
f34889a771edfbc91de942a0ee709ab2
e25730328b1832a7d3b48ecd791aa746
Set references to existing items.
void Network::setReference(Configuration *configuration, Information *information, PirReader *pirReader, PowerMeasurement *powerMeasurement) { this->configuration = configuration; this->information = information; this->pirReade...
1
3cc07af9d365d4a49f9d7053e7604b7e
29d5fccf338019b20a1400f242e0d5b9
###### B.power ######
calcpower<-function(n1,n2){ i<- ceiling(q*n1) fx2null<-getfx2(i,n1,n2,g0) if (alternative=="less"){ pvals<- cumsum(fx2null) } else { pvals<- rev(cumsum(rev(fx2null))) } reject<- pvals<=sig.level fx2alt<-getfx2(i,n1,n2,galt) power<- ...
1
e60ae139864435b95531eaa34b5da7cb
f37eb2ccfe5ecdd8eceefaefdcdf01c1
[readIntNums 使用制定的URL从文件中读取int序列]
namespace FocusStart public class FileReader public List<int> ReadFilesInt(ushort countLines) { var readedData = new List<int>(); for (var i = 0; i < FileNames.Count(); i++) { var reader = streamReaders[i]; string line; for (var j = 0; j < countLines; j++) { if ((line = reader.ReadLine(...
0
9f5866e35e824651dbd21eaa7b8006ff
21b285a91a97124c4420bc35a2baf1ba
To update the Hunger and Hydration bars.
{ if (hydration > 0) { hydration -= scale * .1f; } if (hunger > 0) { hunger -= scale * .05f; } if (stamina < 100) { stamina += scale * 1; } update_Txt(); }
1
0dbf44545781ed44d30f8a9ce37d68d9
865948d784369569149a7afc56e63d38
激活系统列表中的所有ReactiveSystems。
{ if (IsEnabled) { foreach (ISystem<T> system in _systems) { system.Update(state); } } }
0
e9f2dce4e44c307eaee0e24580fca040
fcb72f8d70cd9cd9bda5bf29931829f8
Returns <see langword="true"/>, if <paramref name="number"/> greather than 0. Otherwise returns <see langword="false"/>
TEmitter Cgt() => Emit(OpCodes.Cgt);
0
19ca9c25abe90c85c79a094057c0a51c
7a528e3b0ca4b73a1a024eed34acb0a5
类型<paramref name="domainObjectType"/>是否为另外一个领域类型的派生类
{ if (domainObjectType == null) { throw new ArgumentNullException(nameof(domainObjectType)); } var result = this.store[domainObjectType]; return result; }
0
d16aa5212e4a8273409c4afbef41b679
51e68b8ccd58ed5cb140ad7e9f62109e
获取所有json 数据 返回 list
public List get_jsonList();
1
d6765fcf453df5369a602b7c5898b273
e886cdbd89268a4a16545db750a3b2d8
打开支付宝,进入蚂蚁森林
function entrance_antforest() { let item = null, i = 0; while(i++ < 5) { item = text("蚂蚁森林").findOnce(); if(item != null && item.bounds().height() > 40) break; swipe(520, 500, 520, 1500, 500); sleep(500); } let res1 = click_by_name("蚂蚁森林", COMPLE, TEXT, 1000); if(...
1
d7f986c22256e6e4b2be738fb3be4e9b
5b0efb96ddc2e8e60eb4d68228161ff7
Querying data from the cluster using a distributed JOIN.
public void testQueryJoinInmemoryAggregation() { String siddhiApp = "@App:name('TestPlan7')\n" + "@source(type = 'http', receiver.url='http://localhost:8080/SweetProduction', @map(type" + " = 'json'))\n" + "define stream stockStream (symbol string, price float...
1
a41c0f95774cca671cf77e15f4282cdf
72cc8535c6adedeea6f869d0f11e0643
取得战斗 BGM
if $PokemonGlobal.nextBattleBGM return $PokemonGlobal.nextBattleBGM.clone end ret = nil if !ret map_metadata = GameData::MapMetadata.try_get($game_map.map_id) music = (map_metadata) ? map_metadata.wild_battle_BGM : nil ret = pbStringToAudioFile(music) if music && music != "" end if !ret ...
1
9589c1d044895f0b2ab0db6a623ccf86
a3f853cd3870e951c546e5b22fa4e04a
this is called AFTER initialize() to configure the device for use
public class SG_DeviceLink : MonoBehaviour protected virtual void SetupDevice() { }
1
48240d861a3cab9ce21f048bb0784825
ed2b03db31758e6575ea521e3b6e05f5
Outputs the contents of the block if the first argument is greater than the second.
inpV0 := inputs[0].Get_ui64() inpV1 := inputs[1].Get_ui64() if inpV1 > inpV0 { inpV0 = inpV1 } outputs[0].Set_ui64(inpV0) }
0
116fbd46297fd889ac1e86c4eb3188b9
f445b90b19f486f83c37e02660360bce
Resizes an Nd list of vectors or a single vector to 'length'. The vector is **not** changed in place.
impl Rms pub fn update<S>(&mut self, samples: &[S], settings: Settings) where S: Sample, fn resize_vec<T, F>(vec: &mut Vec<T>, new_len: usize, mut new_elem: F) where F: FnMut() -> T, { let len = vec.len(); if len > new_len { vec.truncate(new_len); ...
0
7899bba661098aa8605253acc25394fd
e2e35156bfbeb8b3cf3f3219998a6e47
Тест doPost.
namespace ClientProject.Test [TestClass()] public class UnitTest [TestMethod()] public void PostTest() { Mock<IClientRepository> moqClientRepository = new Mock<IClientRepository>(); ClientController clientControllerMoq = new ClientController(moqClientRepository.Object); ...
1
3bf3f4bdf79ab80ac18bc46cafff52f3
a6a024b694dd9beeb7b49c0b71b9ea78
Converted the voltage at the input of the AFE to the voltage at the HV input by examining the meter settings
namespace CommonLib public class SWIF97 [DllImport("IF97", EntryPoint = "HV2X97")] public static extern void HV2X97(double H, double V, ref double X, ref int Range);
0
cc4c1664f7ff84a73693668b8201e0e3
eba52b2bdf26326814aa3ea534e0bf0b
Récupère la liste des motifs de la bdd et la retourne
function readMotifs( $motif_id ) { global $bdd; $aMotif = []; print("motif_id:".$motif_id); if ( checkId( $motif_id ) ) { $sRequete = "SELECT * FROM motifs WHERE motif_id = $motif_id"; print("requete:".$sRequete); var_dump(PDO::FETCH_AS...
0
e84f088314c0857a315166609809e7ca
a80c5393d68e325ab3762a1345c87fb9
arc是[..., [an, bn, cn...], ...] inputStr每个字符开头能匹配到的所有音节串长度
string t; vector<int> v; for(int i=0;i<s.size(); i++){ t += s[i]; int u = -1; for(int j=1; j<=t.size(); j++){ string a = t.substr(0, t.size()-j); string b = t.substr(j); if(a==b){ u = a.size(); break; } } v.push_back(u); } return v; }
0
6ebcb50cf9b4a0f60adaa017282d5fe9
6b208dbb5c1f673c7a6b5075bd58b2dd
a与b的位或
public class BitOperator public int aplusb(int a, int b) { if (b == 0){ return a; } else { return aplusb(a ^ b, (a & b) << 1); } }
0
6119b2fd77c568ebb7278a35978bf56a
b5433085ec1d3a3a0ff55194d50bb338
returns the number of samples written
int qtractorMidiFile::writeData ( unsigned char *pData, unsigned short n ) { int nwrite = ::fwrite(pData, sizeof(unsigned char), n, m_pFile); if (nwrite > 0) m_iOffset += nwrite; return nwrite; }
1