query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
8961fc0ba37ed61f547e86dc8cbbe5ca | 03432ebc5195495f8118e18df9cd5150 | 删除菜单(如果有子菜单则一起删除,包括中间表和菜单表) | namespace Aisino.MES.Service.SysManager.Impl
public class SysMenuService : ISysMenuService
public void DeleteSysMenu(SysMenu delMenu)
{
try
{
DeleteSubMenus(delMenu);
_unitOfWork.Save();
}
catch (RepositoryException ex)
... | 1 |
3affe54e207a3123b5eaae5c98098d99 | 11cb0d918eec6973ad8da1f2723f31e7 | overlay a gpx route on top of an OSM map using Folium
some portions of this function were adapted
from this post: https://stackoverflow.com/questions/54455657/
how-can-i-plot-a-map-using-latitude-and-longitude-data-in-python-highlight-few | overlay_json = {
"type": "GeometryCollection",
"geometries": [
{"type": "Polygon",
"coordinates": [[40.643135583312805, -111.48951530456543],
[40.636622594719725, -111.49432182312012],
[40.63310531666155, -111.4877986... | 0 |
93e5e648931b71922501cf59b5ba06e2 | 48835f7a4ed2349df66d04379b334eac | 构造函数,配置WebView | public class WebViewHelpActivity extends BaseCordovaActivity
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layoutID);
initConfig();
} | 0 |
054db9a06b09041910aead90cb723c61 | 1f75552dbca1fdebfb1cbd9ecaad180a | 查找莆田岗位培训_试题临时表信息 | public void updatePtrainQuestionstemp(PtrainQuestionstempBean ptrainQuestionstempBean); | 0 |
5cef6e68e6cf5b5dfad05318fe0904e1 | dc294c81bdcd4ada2bca65b643ff8083 | actionFn: Function which takes a state and returns the list of legal actions
alpha - learning rate
epsilon - exploration rate
gamma - discount factor
numTraining - number of training episodes, i.e. no learning after these many episodes | reward_list = []
all_eps_reward_list = []
epsilon = args.init_eps
np.random.seed(args.seed)
random.seed(args.seed)
for ix in range(args.episodes):
epsilon = max( min(args.init_eps, epsilon*args.eps_decay_rate), args.final_eps)
policy = lambda x: se... | 0 |
f81e40b4a772e6eda4d62cb85eae2e23 | 6ccdb5a3745e5ab90502fd0b968f3a38 | 输入框获取焦点时内容选中 | function begin(){
document.userinput.id.focus();
} | 0 |
18f043f7967c852c3a2caac66bdd63e9 | 42e3ebcd70c23ac371bd5523be8f67f2 | 等待终止流程警告框可见 | public class MyDialog
public static void dismissWaitPro() {
if (processDialog != null && processDialog.isShowing()) {
processDialog.dismiss();
}
} | 0 |
2f27ba3c04eef0ac77a8d7e05bec4401 | 423718a6fc0d911b1ad0ff22d8aa9d36 | tomo un cliente inhabilitado y lo habilito | class Client extends Eloquent
public function activateClient($client_id)
{
if($this->getClientStatusId($client_id) === 3)
{
$this->where('id', '=', $client_id)->update(['client_status' => 1]);
return true;
}
return false;
} | 1 |
bafe53bfc36a04363ccfacc43d5e93aa | 70f485d3be70d14aaaf830d744cfa1e9 | returns true if argument is a form control | export class FixAutocomplete implements OnInit{
private _isFormControl(element: HTMLElement):boolean{
let nodeName = element.nodeName.toLowerCase();
return this._util.arrayIncludes(["input","textarea"],nodeName);
} | 1 |
3a6dae8802c264eca026303ccf48c696 | 3f9edd00ec02a545a6160289785aa788 | Function returns number of squads in given Warzone. | int Squad::getCount() const{
return (_count);
} | 0 |
4de007d6d609dd7ea92f63a1ea5038a2 | 3ba3a37c6b6fe70262a45210113c5b7c | Checks if this is a ZWJ-emoji. | return codePoint == 0x05BE
|| codePoint == 0x05C0
|| codePoint == 0x05C3
|| (codePoint >= 0x05D0 && codePoint <= 0x05EA)
|| (codePoint >= 0x05F0 && codePoint <= 0x05F4)
|| codePoint == 0x061B
|| codePoint == 0x061F
|| (codePoint >= 0x0621 && codePoint <= 0x063... | 0 |
59e8ddb7dcbf78afff2d943e80a3a927 | dd4f04088ee6c0e12948a4257778236f | 获取道具定义 | public class Item extends Node
public ItemDefinition getDefinition() {
return definition;
} | 1 |
470683c4a6d245bfbfe1bac94dbf6d9c | 8db010cca8aaf56e18709acd7f44f929 | Define what to do after every step. | class Callback:
def _after_step(self, output_dict: Dict[str, Any]) -> None:
pass | 1 |
0ce58e1e3a6fa1db4cfc26d43c5a2be4 | a04ed61cf4dbda01b2d04536dda874c1 | 获取已审核通过的评论 | class Comment extends Model
public function scopeApproved($query)
{
return $query->where('approved', 1);
} | 1 |
38bf8b77ac3704e453ff5a7fd414a1b6 | 0e319cdf5f64d70ab592771d2c7c7aae | The health policy used by default to evaluate the health of a service type. | {
var maxPercentUnhealthyPartitionsPerService = default(int?);
var maxPercentUnhealthyReplicasPerPartition = default(int?);
var maxPercentUnhealthyServices = default(int?);
do
{
var propName = reader.ReadPropertyName();
... | 1 |
8d834e9986b507a05efa8533f949ab3c | affd9f9b05fda8f793f9c0afb87844d6 | Gets change in partition function between reactants and products | def bond_change(*args):
reactants, products = list(args)
return sum(len(mol.GetBonds()) for mol in reactants) - \
sum(len(mol.GetBonds()) for mol in products) | 0 |
69692ba54f1f5ccc1d66fe1c77374650 | e19e6fe6b60b2bdd0300b7c667aebd3e | Testing alignment of population and physical distance data. | def test_iden_align():
x = np.random.uniform(low=0, high=1000, size=100)
y = np.random.uniform(low=0, high=1000, size=100)
mag = np.random.uniform(low=5, high=15, size=100)
ones = np.ones(100)
startab = Table(data=[ones, mag, ones, x, y, ones, ones, ones, ones])
startab.write('dum_test.lis', f... | 1 |
2e022f7da1c70665f72d1c027602660b | f4d6ea19b0f253b6efbc07eb0b3d9d39 | make sure errors are not cached | super().setUp()
RequestCache.clear_all_namespaces()
clear_cached_expected_error_settings()
self.mock_request = RequestFactory().get('/test')
self.mock_exception = CustomError1('Test failure') | 1 |
f0fdaef35533eb19e2315a46c635ca2d | f1e611830ada2989648c0425d5c4501d | Edita una portada | $stmt =Conexion::conectar()->prepare("UPDATE $tabla SET img =:img WHERE id=:id");
$stmt -> bindParam(":img",$ruta,PDO::PARAM_STR);
$stmt -> bindParam(":id",$id,PDO::PARAM_STR);
if($stmt->execute()){
return "ok";
}else {
echo "\nPDO::errorInfo():\n";
print_r(Conexion::conectar()->errorInfo());
}... | 1 |
222a789f5fd064d549f3f6d68aa82d3b | 9d6176cae342a3f1bd50732c968337d1 | Add Title to DataFrame (Mr., Miss., etc) | def get_titles():
global combined
combined['Title'] = combined['Name'].map(lambda name:name.split(',')[1].split('.')[0].strip())
title_Dictionary = {
"Capt": "Officer",
"Col": "Officer",
"Major": "Officer",
"Jonkheer": "Royalty",
"Don": "Royalty",
"Sir": "Roya... | 1 |
90f6b8e9992a083b2a0c04a736e8aecb | 4ce826d19128e88e2d4599b22bacb568 | Call after device was updated. | namespace Acn.Helpers
public class SlpDeviceManager : IDisposable
protected virtual void OnDevicesUpdated()
{
if (DeviceUpdated != null)
{
DeviceUpdated(this, EventArgs.Empty);
}
} | 1 |
6534371e31166299f8b7724bb79191f4 | 54596f936e37ee8d7ae2af01685f09db | Converts "MultiPartName" to "multi-part-name". Also handles "camelCase". | $parts = explode('_', $name);
$name = strtolower(array_shift($parts));
if(count($parts) < 1) {
return $name;
}
$parts = array_map('strtolower', $parts);
$parts = array_map('ucfirst', $parts);
return $name . implode($parts);
} | 0 |
6d7a0850bddda948287694cf1cee4d2f | 4dcbd81d6d7b7885a0f008d34603e3bd | Strips leading Re or similar (from Gmail source) | class Mol_Form_Element_EmailAddress extends Zend_Form_Element_Text
protected function removeLeadingAtCharacter($value)
{
return ltrim($value, '@');
} | 0 |
aa2ba3901ecd8359129180cf62fa80bd | 6efe99684315c6c0db228504fff80175 | Save settings and sorting | if (isset($this->sortOrderId)) {
$sortOrder =& $this->sortOrderDao->getSortOrder($this->sortOrderId);
}
if (!isset($sortOrder)) {
$sortOrder = new SortOrder();
}
$sortOrder->setName($this->getData('name'), null);
$sortOrder->setType($this->getData('type'));
$sortOrder->setIsClean(false);
if ($so... | 1 |
9b5aaf5097d490a3e8ffa96e20a7b025 | 0963a21ec8a73ed175d2660613a294af | 一维数组相加(两者长度必须相等) | foreach ($array2 as $key => $value) {
$array1[$key] = self::get($array1, $key, 0) + $value;
}
return $array1;
} | 1 |
5ca44f3d9c3a6da8385e6a0ccc54a81a | c0bae2d9b0d80462129cf83f32eabd50 | Returns a string containing a player's statistics from a tr element | def get_player_stats(box_score_row):
name = box_score_row['Starters']
points = box_score_row['PTS']
rebounds = box_score_row['REB']
assists = box_score_row['AST']
return {"name": name, "points": points, "rebounds": rebounds, "assists": assists} | 0 |
ddb02d92b8e23d31548a9eccd2f08618 | 25ba02a06ccadfd55fd04422bd05758a | Posiciona o servo em 180 graus | void servo_1_rest (void)
{
servo_1(90);
} | 0 |
498c4f0da7179de12769bc5d6a7b8792 | ea3e0e46890f94fa17decc97f00ba841 | Sets the list of Principals for this user. | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Subject", propOrder = {
"readOnly",
"expirationTime",
"resultCode",
"saml",
"samlType",
"daysToPwdExp",
"domainId",
"ssoToken",
"groups",
"roles",
"userId",
"principal",
"principals"
})
public clas... | 1 |
77cf63d3002521497c419606697198d0 | 59acb3beb0134c36a2a432ec274b464c | Gets the value of the idEducationalCycles property. | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "dGraduatesKnowledge", propOrder = {
"idGraduatesKnowledge",
"idGraduate",
"idEducationalCyclesKnowledge",
"educationalCyclesKnowledgeText",
"educationalCyclesKnowledgeTextEn"
})
public class DGraduatesKnowledge
public void setIdEducationalCycles... | 0 |
f29522f0fbbffdc9ee586ac584c892c7 | 400f8f5475f1c34f02b4e3aff257e82b | Highlights October button and changes calendar days to October
when user clicks on October button | function hideMeetingCalendar(e) {
var allowedClasses = ['calendar', 'editor', 'wrapper', 'month', 'month-name',
'table', 'tr', 'td'
],
clickedDate = false,
clickedPlace
if (e.type != 'click') {
clickedPlace = e.explicitOriginalTarget
} else {
clickedDate... | 0 |
63f1eadf3bd3e6353555d2fc1f157a3d | db404b46dfcff6623b8cc305f586e6a5 | filter available districts and teachers based on user role | {
if (Session["role"] == null || (Convert.ToInt32(Session["role"])!=7 && Convert.ToInt32(Session["role"])!=1))
{
return Redirect("/");
}
int user_id = Convert.ToInt32(Session["user"]);
int role = Convert.ToInt32(Session["role"]);
... | 1 |
1f1e83a36332ef471c29e8914d6f2eff | 55bd5fe5d37199c653ee337cedd8ec0a | Update Video ComboBox เมื่อมีการเปลี่ยน Video Device | namespace webRTC_iceLink_CreateOfferAnswer_Receive
public partial class MainWindow : Window
private void UpdateSelectedVideoDevice(VideoDeviceNumberChangedArgs e)
{
this.Dispatcher.BeginInvoke(new Action(() =>
{
this.VideoDevices.SelectedIndex = e.DeviceNumber;
... | 1 |
15900d2c22939ba9040f5491fe41c55b | 47d08d41bbfdf4010bc733dd441db996 | 将用户选择的城市id和开销封装 | public class CityManagerAllActivity extends BaseTitleActivity
protected void clickCityItem(PackLocalCity cityinfo) {
Intent intent = new Intent();
intent.putExtra(ExtraName.EXTRA_SELECT_CITY, cityinfo);
setResult(RESULT_OK, intent);
finish();
} | 0 |
e1eafc518521e87b4fb6456453bf1f0b | 3b1fba14d43f7c33259700b92cc6b9e6 | Allow to hook customized admin implementation. | class Inda_Site_Tweaks
function add_hooks() {
if ( is_admin() ) {
} else {
}
add_action('h5p_alter_library_styles', array($this, 'h5pmods_custom_css'), 10, 3);
} | 0 |
37774ecbb1be56538bc2df1c2cbaff15 | 94c148f4373fc181063756cbfd5acdb0 | If patient loss the card then staff can assign new card to patient then old card number will blocked and no longer use for pratice. | def BlockCard_(curdNumbe):
client = Client('https://apizenda.eka.ru/WebApiEkaPro.asmx?WSDL')
result = client.service.BlockCard(login,password,curdNumbe)
return result | 1 |
747ca93ac89830c34d9fd8e36de36a02 | 033cb234ff5c4c0d93e23e7a7d7ed0c6 | Clicks on change Message Format link. | assert wait_on_element(driver, 7, '//button[contains(.,"Test Changes")]', 'clickable')
driver.find_element_by_xpath('//button[contains(.,"Test Changes")]').click()
assert wait_on_element(driver, 7, '//h1[contains(.,"Test Changes")]', 'clickable')
driver.find_element_by_xpath('//mat-checkbox[@ix-auto="ch... | 0 |
ededf5a6fc771573bc98e5c7ce65ec99 | cc33c0c1ba819d0b27a00c3c34230d4b | Get Xml representation of export setting collection object | namespace MDM.Interfaces.Exports
String ToXml(); | 1 |
892cd0c25e7e79cd8471e79d6e5d62ee | 1bda14ad5f8cd9cb51f60395f4287648 | Build Address Fields using FieldFactory | class AddressType extends AbstractType
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('street', TextType::class)
->add('zipCode', TextType::class)
->add('city', TextType::class)
->add(
'country',
... | 0 |
bf746f5cc03689cf6ccc56533ccf4357 | b8fef1a9c4e6978405f6314fefcf88c4 | Método para retornar el valor del centro del círculo en y | public class Circle extends DrawingObject
@Override
public double getEndY() {
return this.endY;
} | 0 |
524a914a3796b4d073e0ff8383fe5840 | fac12cc2d78ad1fee58fbdaf1bb6d0eb | Render the screen into a buffer. | public final class MHScreenManager
public void render(final Graphics2D g)
{
final BufferStrategy bufferStrategy = MHDisplayModeChooser.getBufferStrategy();
if (bufferStrategy.contentsLost())
return;
getScreen().render(g);
if (showFPS)
renderStats(g);
b... | 1 |
a17d738a50be5f915f4033d3b68be4ab | 76fe0db181dbe98107bc97a09726fb8c | Label returns the label at the given index. | namespace TradeLink.Common
public class GenericTracker<T> : GenericTrackerI
public string getlabel(int idx) { return _txt[idx]; } | 1 |
5476952cbc53f43863cf2f42e2470023 | 7418e9cdda628924ff9958231ab9430c | converts the Text category object into an object recognized by webGL renderer | return {
segment: this.segment,
sequence: this.sequence,
duration: this.duration,
timestamp: this.timestamp,
keyframe: this.keyframe,
};
} | 0 |
b4092eb8316e9635e0097c31fbd62575 | 00f0f6cf284d532697e8930dba18deaa | Construct contact full name which consist of first name, middle name and last name | class Contact extends Model
public function getFullNameAttribute()
{
$names = [];
$names[] = $this->first_name ?: '';
$names[] = $this->middle_name ?: '';
$names[] = $this->last_name ?: '';
return trim(implode(' ', array_filter($names)));
} | 1 |
7516a4e33b3a1744f61fc7ae0cdd00be | 920fa6bf03bccee3af15aaf6fef59b99 | Method to return total number of warriors | public class TechTreeAdapter extends BaseAdapter
@Override
public int getCount() {
return warships.size();
} | 0 |
471dee37fa0a8597c3d7101034dc45be | 8ea172475d3d03f04683ff9e6ac41999 | Returns the last features edited on the table. | class BlocksAdder extends BaseBlocks
public function lastEdited()
{
return $this->lastEdited;
} | 0 |
ffcfa8a9371923d5beef106555a9715e | 02a574c1395e91844721482e3eb4f443 | 在查询数据库之前,读取缓存数据,如果没有缓存数据,就执行查询,反之,直接读取缓存的数据 | Optional<T> cacheData = Optional.empty();
try {
String redisKey = buildCacheKey(REDIS_CACHE_PREFIX, key);
T data = loadDataFromRedis(redisKey);
if (data == null) {
data = loadDataFromDB();
if (data != null) {
cacheDa... | 1 |
4f7f49780c10cb0c17d965ba0f1cab8c | 6d2c7e1233bcb9baf0ccda4da2f90c7a | This function is for hydrograph visualization | def hydrograph_visualization(scenario_id=''):
return render_template('hydrograph_vis.html', scenario_id=scenario_id) | 1 |
11b508eaa12758c997090311438ba6e7 | 6af1fd4d2dff8bfc7a6e4a2a342b29e0 | Check whether task has a parent task (or is in project root) | class Task(Rescaler):
def isroot(cls):
return False | 0 |
0ab7f3ba9f4c6d12703480f0c40463a2 | f9538eee6eabffbaf203b1410f5876b7 | Forward pass through the length regulator module. | class RegistrationModel(pl.LightningModule):
def forward(self, I0: torch.Tensor, I1: torch.Tensor) -> dict:
mu, log_var = self.encoder(I0, I1)
flow = mu
transform = self.decoder.get_transform(
flow, inverse=False)
I01, _ = self.decoder.apply_transform(
transform, ... | 0 |
f2125f03dfcdd8a56d36af8874f067f0 | 75e3a5e496e86ced968233e4d81108d9 | Gets SQL statement for selecting item by primary key. | public String getSelectByPkSql(); | 1 |
744752644ffd8a95f78f43ad23286ee6 | 9177582e1d9ed936a7bb3e23d7d242dc | Get the location property: Location of the storage account. | @Fluent
public final class RestoreRequestProperties
public String storageAccountUrl() {
return this.storageAccountUrl;
} | 0 |
256dd8c99d5465fa57e18fe062900543 | 952a1e5936d293c13b0dd416377e3811 | 如果不存在v或者b,则说明该range不存在,返回true | function excludeRange(a: MatchRange, b: MatchRange) {
if (b.endPos <= a.startPos || b.startPos >= a.endPos) {
return [a];
}
if (b.startPos <= a.startPos && b.endPos >= a.endPos) {
return [];
}
const result: MatchRange[] = [];
if (a.startPos < b.startPos) {
result.push({st... | 0 |
f4b77a72c2471a790fa0077fb6b0f092 | aa183e210f3b7d39999c806e15e1beae | 发送文章,检验是否登录,只有登录过才能发送推文,否则抛出401异常 | def send_weibo():
pass | 0 |
0f40b554b820406c80aa692a893bc32d | 3d75f0c345fca8b71afa6cf458420020 | Obtains all emitted events as an Observable. | public function collect(): Observable; | 1 |
e4d7b199190ac5fc51aed1f852129ede | 5b152ea1a34065b362997b4bdec36d2f | The index of the provided primary key column in the primary key.
<p>For instance, if the table primary key is {@code PRIMARY KEY (a, b, c, d)}, then this method
will return 0 for column "a", 1 for column "b", etc...
table. | public getPkColumnIndex(): number {
return this.table.getPkColumnIndex();
} | 1 |
ddebf1fc8b10b5fe5221cde17f700e21 | 15c6efca987b180ef5ba360743f33ac7 | Method to deactivate the game object from the deactivatable game object list with the equal or lesser index number of the time. | [Serializable]
public class CountDownObjectActivationController : MonoBehaviour
public void ActivateIndexActivatableUnequalToTime()
{
int currentlyActivatableGameObjectIndex = 0;
foreach (GameObject currentlyActivatableGameObject in activatableGameObjectList)
{
if (currentlyActivatableGameObject != null && c... | 0 |
b53b0f7f315cea582e26c473e0cb2589 | e11b66314802cddd7e7d107dcff5f6dd | #Generate Inverse Normal Distribution | class Kashi
public function inverseNormCDF($p)
{
$a1 = -3.969683028665376e+01;
$a2 = 2.209460984245205e+02;
$a3 = -2.759285104469687e+02;
$a4 = 1.383577518672690e+02;
$a5 = -3.066479806614716e+01;
$a6 = 2.506628277459239e+00;
$b1 = -5.447609879822406e+01;
... | 1 |
1ad07feb1d032a22e655e3179c01066a | 7b342bc2ac698fdafe29f557c6918de5 | Generates an array containing the minimum distances from a sources to each location | sptSet = set()
distances = [sys.maxsize] * len(self.V)
distances[source] = 0
while self.V - sptSet:
u = self.pick_u(sptSet, distances)
self.update_distance_values(u, distances)
return distances | 1 |
5180f916d61bdeaf04f85667fa7077de | 4ee6275d2f893eeee28ab30b0fd1da74 | 지마켓 상품 추가 정보 | {
$aData = array(
'pm_no' => $aEavPrdInfo['prd_entity_no'],
'a_m_code' => $aEavPrdInfo['market_code'],
'a_market_id' => $aEavPrdInfo['market_user_id'],
'pm_match_code' => $aEavPrdInfo['prd_code'],
'pm_... | 1 |
83b4f561309c0d7a87c11ee7d24c0690 | 6d028335256ebf501892fefada603b16 | 玩家客户端下线,通知BS | public class coralsdk
public static void BnLogoutNotification()
{
Cocos2dxGLSurfaceView.getInstance().queueEvent(new Runnable()
{
@Override
public void run()
{
try
{
JSONObject t = new JSONObject();
t.put("action", "1003");
SendtoGame(t.toString());
}
catch (JSONException e)... | 1 |
fb2b00ea1be614f37364bcedb79ac4f3 | 3bd7a81f1df02070c74942d407eed85f | 获取超出免费保洁次数的保洁费用 | class UserCleanOrder
private function getCleanOrderPrice($bnbinfo, $clean_numbers,$orderinfo)
{
$data = [];
$data['price'] = $bnbinfo['fee_clean'];
$data['clean_numbers'] = $clean_numbers;
$data['clean_order_total'] = $data['price'] * ($data['clean_numbers']-$orderinfo['free_clean_nu... | 1 |
05b3465a489b7baae1b45408f13253e6 | 83425d6d6e835fa0309066a5d2c7ad35 | Returns the tokens remaining to the user | class CapacityLimiter:
def available_tokens(self) -> float:
raise NotImplementedError | 1 |
8fab858853fa9648c0736472a8b91050 | 73d3ff2c8dfa8d4c73ac6ed51175dad2 | 返回原图中pos位置上的数值 | def get_pos(pos):
return mib[pos[0]][pos[1]] | 1 |
d38b6ad9d2c0896f6dfcae1828a76919 | 362c637bfc9510bb42c4bf78deb6a285 | Sets value of 'serialized_request' property | class CompletePurchaseRequest extends AbstractRequest
public function setRequestData($value)
{
$this->setParameter('request_data', $value);
} | 0 |
776eff66a654e57d020d4f732bede062 | fa6e5dc33c10fb19dfd4c23d59817b6a | #' @return a vector of the shrunken variances for each feature. | co.var <- function(x) ( 100*apply(x,1,sd)/rowMeans(x) ) | 0 |
bef03d09d72a1d14123415a9bfb8a823 | 231c000976f0310bafdccd476ad24cc4 | 诚信管理,经纪机构奖惩积分规则菜单查询功能 | public ModelAndView khjcCrimScoreShenPiPage(HttpServletRequest request){
returnResourceMap(request);
String nodeid = request.getParameter("nodeid")==null?"":request.getParameter("nodeid");
request.setAttribute("nodeid", nodeid);
return new ModelAndView("khjc/khjcCrimScoreShenPiPage");
} | 0 |
ebde06c1113bf00b508432d7bf47774f | 69edbf3b52392b7a5413f1ba82335e75 | verify clearing of completed tasks for non-empty list | todolist = TodoList(self.mock_persister)
after_do_empty = "No entries to do yet."
self.assertEqual(todolist.do("1"), after_do_empty) | 0 |
db14439c1f90335527d593fbdd4ac48a | 25d8f9dd3ac75242f41db860c7955316 | Função responsável pela criação da carteira de bitcoin | def chronometer():
iniciar = (input('Pressione "enter" para iniciar e "q" para encerrar a cotação: '))
print()
while iniciar != 'q':
for tempo in range(5):
bitcoin()
ethereum()
litecoin()
print()
if tempo >= 4:
iniciar = (in... | 0 |
c751ee1e4bb4c65865d18b768ec7f7c2 | 39641821f2fc8f23c17dc83da473dafc | A simple lookup table that stores embeddings of a fixed dictionary and size.
This module is often used to store word embeddings and retrieve them using indices.
The input to the module is a list of indices, and the output is the corresponding word embeddings. | class Embeddings(nn.Module):
def __init__(self, d_model, vocab):
super(Embeddings, self).__init__()
self.lut = nn.Embedding(vocab, d_model)
self.d_model = d_model | 1 |
efdcee6587f64f812451cf249b753d38 | 22503727961a34a317c3e8d338d5c7d6 | Make the input as column vector | def MakeCol(y): return y.reshape(-1,1) | 1 |
10d29a81b7946a9b0c734554a716b589 | 1019381b64cc6068ba946f8eb58a8a05 | Gets the participant repository. | @WebService(wsdlLocation = "/WEB-INF/wsdl/SubjectManagement.wsdl", targetNamespace = "http://enterpriseservices.nci.nih.gov/SubjectManagementService", endpointInterface = "edu.duke.cabig.c3pr.webservice.subjectmanagement.SubjectManagement", portName = "SubjectManagement", serviceName = "SubjectManagementService")
publ... | 0 |
1900ff45a76e04ae273b3b1b6fd54696 | 10c361410c1e289eda62c3ce07d30988 | Proposition constructor. | class Proposition extends RuleElement
public function __construct($name, $truthValue) {
parent::__construct($name);
$this->value = $truthValue;
} | 1 |
10dd8ea33d74daa89296ef4fa647e386 | 8867f555bcd1e0fff52e6d1aaef0b332 | The element that the mouse is captured to was affected by a change in hit-test visibility.
We need to re-evaluate the element that has mouse capture since
we can't allow the mouse to remain captured by a non-hittest-visible element. | namespace Windows.UI.Xaml.Controls
public partial class ToggleSwitch
protected override void OnPointerCaptureLost(PointerRoutedEventArgs e)
{
base.OnPointerCaptureLost(e);
if (!_isDragging)
{
_isPointerOver = false;
}
UpdateVisualState();
} | 0 |
81607421ff85844fd87c8e182d961bb0 | 24a7fb09cf9650fcc069155fcca14f76 | Create an Ajax Appender pre-configured | {
var hierarchy = (Hierarchy) LogManager.GetRepository();
var memory = new MemoryAppender();
memory.ActivateOptions();
hierarchy.Root.AddAppender(memory);
hierarchy.Root.Level = Level.All;
hierarchy.Configured = true;
return mem... | 0 |
9fcf77f65d65416a4fdb64855eda7174 | e987ea608e5172be5c9a76ab21dc0a9c | Turns the graph into a adjacency matrix. | allTuples = []
for key in adjDict:
allTuples += [tuple([key] + [x for x in tpl]) for tpl in adjDict[key]]
return GraphUtil.createMatrix(allTuples, max(adjDict) + 1) | 1 |
05d1109a4d523fde649c4e76bfcc0822 | e8c271f89b7742bea8dc3025588135b5 | Converts the current value of 'JDN' Julian Day Number to a date in the
Iranian calendar. The caller should make sure that the current value of
'JDN' is set correctly. This method first converts the JDN to Gregorian
calendar and then to Iranian calendar. | class DateConverter
private fun JDNToIranian() {
JDNToGregorian()
irYear = gYear - 621
IranianCalendar()
val JDN1F = gregorianDateToJDN(gYear, 3, march)
var k = JDN - JDN1F
if (k >= 0) {
if (k <= 185) {
irMonth = 1 + k / 31
irD... | 1 |
b77936adc11414c39215ecb06d86b1f8 | 8a7e5a5ae575a16dcd8d7ab76627d92f | Metoda, která každé grafické podobě záznamu (Prase, finance) zadá stranu na které bude vykreslen | global films, main, cinemas
if event:
make_fig([main, cinemas, films], fig, diagrams.index(event.widget.get()))
canvas.draw()
canvas.get_tk_widget().pack(side=BOTTOM, fill=BOTH, expand=1) | 0 |
d95895512af85ec123d5853e51e295d7 | 1da013eb5f1780b18d55cf6f4132bc70 | 将file_path中的所有文件路径写入到txt_path中 | def Write2Txt(file_path, contents):
f = open(file_path, mode='a+', encoding='utf-8')
for i in range(len(contents)):
f.write(contents[i] + '\n')
f.close() | 0 |
e941057484e1f3bdcaaab464d05b0fbe | 6220b61f7a8b8fd280d86d98a301e9ab | Get the total amount of data currently stored in the buffer.
Returns | class ReplayBufferInterface(metaclass=ABCMeta):
def __len__(self) -> int: | 1 |
65f72a5cf55073f0d3e2804fad1f4d63 | 3bc3f05e56d46d8761d0ec6811560612 | Gets the basic information for the software, keeps only the desired fields and returns the filtered results | $filtered = [];
$whitelist = [
'nb_uniq_visitors',
'nb_visits',
'nb_users',
'nb_actions',
'max_actions',
'bounce_count',
'sum_visit_length',
'nb_visits_new',
'nb_actions_new',
'nb_uniq_visitors_new',
'nb_users_new',
... | 1 |
1e5470660094816e3f82a9a43f78cab4 | 8c48a9b94ff85701614036bd6e074a17 | # helper for get_date to extract the year and month
# from and EXIF formatted date as YYYY MM
# | yr<-strsplit(in_string,"-")[[1]][1];
if(grepl("^[0-9]{1,2}_(19[0-9][0-9]|20[0,1][0-9])",yr)){
return(strsplit(yr,'_')[[1]][2]);
}else if(!grepl("19[0-9][0-9]|20[0,1][0-9]",yr)){
return(NA)
}else{
return(yr)
}
} | 0 |
0099121bee928e90f84ca756a03a6d38 | 9b5c0d15dfc4b3181a5ff8270190444c | Define quais leds vao acender | {
switch(pNumber)
{
case 0:
NUMLEDA = 1;
NUMLEDB = 1;
NUMLEDC = 1;
NUMLEDD = 1;
NUMLEDE = 1;
NUMLEDF = 1;
break;
case 1:
NUMLEDB = 1;
NUMLEDC = 1;
break;
case 2:
NUMLEDA = 1;
NUMLEDB = 1;
NUMLEDD = 1;
NUMLEDE = 1;
... | 1 |
6dc28706129411d3fa01f8bb389f3636 | ef047d85729a8844ad7a01f9c3af84be | Este método obtiene el listado de costos de materiales del backend | @Controller
public class CostController
@RequestMapping(value = "/listCost")
public @ResponseBody JSONObject listCost() {
return costService.listCost();
} | 1 |
8da0b0327b63db07fb31beab2f86e5f2 | 873e1808fa1f1c520976fc8d8bb5812a | Se asigna la cabeza y la cola de la lista doblemente enlazada | void initialize(LinkedList xs) {
xs->actual = xs->primero;
} | 0 |
875c23305329ade2aa87ca2d72728907 | 67475b3241897047321439faff6a2d1c | Search Jobs with histogram queries | def get_tag_histogram_json():
tag_name = request.args.get('tag', "", type=str)
date = request.args.get('date', 0, type=int)
max_salaries = g.db.get_max_salaries(date, tag_name)
labels, counts = create_histogram(max_salaries, cfg.NUMBER_OF_BINS)
return jsonify(bins=labels, counts=counts) | 1 |
c758177fc60983c31aa7b0774747f237 | 8876cc968609d172e732b24c8296e024 | Shows the elements of gizmo. | {
Quaternion baseRotation = servoBase ? servoBase.rotation : Quaternion.identity;
Vector3 globalAnchor = transform.TransformPoint(anchor);
Vector3 globalAxis = transform.TransformDirection(correctedAxis);
Vector3 globalZeroDirection = baseRotation * zeroDirection;
if (!Applic... | 1 |
7734027476ab9f71fab8217182ea5da6 | e8d5094e9ea34e8047cbe7245e3b2a75 | Unblocks a user as message contact. | user = User.query.get_or_404(id)
if g.current_user == user:
return bad_request('You cannot unblock yourself.')
if not g.current_user.is_blocking(user):
return bad_request('You are not blocking this user.')
g.current_user.unblock(user)
db.session.commit()
return jsonify({
... | 1 |
6699debf4c7b054489819e022dbfc68f | bd142ddf1d7cf3122c5c4b89dba46faa | Set a date header | function setRow0(date){
const datesToShow = getDatesToShow(date)
head1.innerText = datesToShow[0].toDateString()
head2.innerText = datesToShow[1].toDateString()
head3.innerText = datesToShow[2].toDateString()
} | 1 |
540771035819a6f7c08a38fb0f05aaa1 | c27a5d2126e14d8eb1aa7f50a8c4cc21 | Get library materials for active category or last search results | class LibAdmin::LibraryCatsController
def index
@library_cats = LibraryCat.
joins("LEFT JOIN library_des USING(library_id) LEFT JOIN library_ens USING(library_id) LEFT JOIN library_cat_des ON library_cat_des.library_cat_id=library_cats.id LEFT JOIN library_cat_ens ON library_cat_ens.library_cat_id=library_cat... | 0 |
2372e8100ebaf25bec37ea35dfba58d4 | 79ff20104612e647d806cd372fc32786 | Get a list of filepaths to all DICOM images belonging to a patient ID | dicomDirname = DICOMS_DIR_BASE + dfLink["patient_id"].iloc[idx] + "/"
contourDirname = CONTOURS_DIR_BASE + dfLink["original_id"].iloc[idx] + CONTOURS_SUB_DIR
dicomFiles = glob.glob(dicomDirname + "*.dcm")
contourFiles = glob.glob(contourDirname + "*.txt")
return dicomFiles, contourFiles | 1 |
30d391f7faf7aa4f36318ae3e7db7b3c | 72a9e8e4c99e1436f4527ea3663d87b0 | Reset aplikasi | Intent resetApplicationIntent = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
if (resetApplicationIntent != null) {
resetApplicationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
}
context.startActivity(res... | 1 |
13989ca8e5746a6967dea0207da7c4bf | 5d5bf14d5e53dc4b8a184d4152c45223 | returns a weighted selection from all the basic states | class NQueens:
def selection(self, state_percs):
indices = np.arange(self.states)
return random.choices(indices, state_percs, k=1)[0] | 1 |
5a6caee25835826d23705ad53e45074b | c24a1601963b6582cdc73d073652f61e | Seleciona qual o destino da aresta de menor peso | min = sys.maxsize
for v in range(self.no):
if distancias[v] < min and visitado[v] == False:
min = distancias[v]
min_index = v
return min_index | 1 |
5615a134dc6368bf693e25e966757153 | 18305eb6d74eb2ea2a5edbb440d24a88 | Description:
Given invalid last name samples from json file should return false and pass the test. | class ExampleTest extends TestCase
public function testFirstNameInvalid()
{
$firstname = $this->getRandomString(256);
$this->tryInvalid('last_name', $firstname);
} | 0 |
e903b39cb4fbae0719515175b5ff19ef | f1d74795fb2202ef1e547749a8042016 | copied from: http://adorio-research.org/wordpress/?p=1932 | med = median(x)
mad = median(numpy.abs(x - med))
y = (x - med) / mad
y[y > cval] = cval
y[y < -cval] = -cval
a = numpy.sum(y)
b = (numpy.abs(y) <= cval).sum()
return med + mad * a / b | 1 |
08494df5b2a740ccbaf8f8f08be46794 | 9fee0ed9b4b5e2221c0ac331da9f11ef | @brief Affiche les chemins des fichiers correspondant à la combinaison de tags passée en paramètres. | {
input_img image;
error = image.acceptInput(Url.get_string(), vector<string> {tag1.get_string(), tag2.get_string(), tag3.get_string(), tag4.get_string(), tag5.get_string()});
displayError(error);
} | 0 |
9b7db9aebcb510cebf9fa681d91abcb6 | 2fe86ae2b3ae1da6c227122bbffc838b | Does gradient checking of a toy MLP on a toy dataset | n0 = 2
n1 = 2
mlp = MLP(input_dimension = n0, output_dimension = n1)
wb = np.arange(6).reshape(2,3) * 0.1
w = wb[:,:-1]
b = wb[:,-1:]
mlp.add_layer(n1, 'softmax', w)
mlp.define_loss_function('cce')
x0 = mlp.normalize_data(np.array([1.5, 2.5]))
... | 1 |
ba5169036fc8703a95947add01da8d7f | f6bf2e4e8801135411a563f507da36eb | 전화 번호 검색 함수 | for (HashMap<String, Info> ab : phonebook.values()) {
for(Entry<String, Info> f : ab.entrySet()) {
if(f.getKey().contains(num)) {
System.out.println("핸드폰번호 :" + f.getKey());
System.out.println("세부정보 :" + f.getValue());
System.out.println(addGroup(phonebook,ab));
}
}
}
} | 1 |
f676248469914861ccbb9ee4298acc0d | debdb3b5aa5d10b0c828c4f2194b20e1 | Ecuacion para hallar el angulo entre dos puntos | l1 = sqrt((p11.x - p12.x)*(p11.x - p12.x) + (p11.y - p12.y)*(p11.y - p12.y))
l2 = sqrt((p21.x - p22.x)*(p21.x - p22.x) + (p21.y - p22.y)*(p21.y - p22.y))
v1 = Point(0, 0)
v2 = Point(0, 0)
v1.x = (p12.x/l1 - p11.x/l1);
v1.y = (p12.y/l1 - p11.y/l1);
v2.x = (p22.x/l2 - p21.x/l2);
v2.y = (p2... | 0 |
dbe7a29bd2c299a2e38571e1838bc67b | 0229932c6bad3e7a93f1d2929837d148 | Define la cantidad de espacio antes del párrafo. | public class PdfPCell extends Rectangle{
public void setExtraParagraphSpace(float extraParagraphSpace) {
column.setExtraParagraphSpace(extraParagraphSpace);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.