query_id
string
corpus_id
string
query
string
code
string
label
int64
ee44f489783a9eae7f260fa540301f2a
7ed04bf7f60c842bca1053663619683c
Устанавливает название обслуживающего предприятия
@Alias("api.SeminarFacilityForm") public class SeminarFacilityForm public void setProviderName(String providerName){ this.providerName = providerName; }
1
ffffcb5d74d3cd959938b168679724d3
343eeb8f0fb2393c8735378bd0319893
This adds a property descriptor for the Import Column Name Shift On Sunday feature. <!-- begin-user-doc --> <!-- end-user-doc -->
String getImportColumnNameShiftOnSaturday();
0
dde3bb8b1ffa764fdf94be509fbf5289
c37afb9941f88f08338334cd366ef6c0
Tests if error is raised when an incorrect column family is given
with self.assertRaisesRegexp(Exception, "column ERR was not found"): self.context.daaltk.models.dimreduction.pca.train(self.frame, ["ERR", "X2", "X3", "X4", "X5", "X6", "X7", "X8", "X9", "X10"], k=10)
1
fa1036d126bf444a70b340200e8fe33e
bfb4d2677584da5d438eaffc6d367fb1
初始化计时器启动刷新网络状态的函数
namespace ZHD.Cloud.SL.UI.Views.Project public partial class StationList : PageBase private void timerInit() { GetStatus(); if (myTimer == null) myTimer = new DispatcherTimer(); myTimer.Interval = new TimeSpan(0, 0, 10); myTimer.Tick += (s, e) => {...
1
fb1205061b772de0433145c4709a5a8f
9bd92feca39b090c4a464eb3c40e136a
Inverts the u coordinate on some graphics architectures.
namespace Illuminator public static partial class Functions public static ILEmitterFunc Conv_U1(ILEmitterFunc func1) => (in ILEmitter il) => il.Conv_U1(func1);
0
2e14b08c10b603ce120ba9fc61a70071
c4444885ca3b055e242e963383530458
将列名转换为字段名
String converterFieldName(String columnName);
1
27450a4a087f04aae5d4aa8fcca4e697
13d859794d7b2b2b57fe5fa60beed02e
Gets the section Enabled from the CMS Settings table.
class Webdawe_Vero_Helper_Config extends Mage_Core_Helper_Abstract public function getEnabled($store = null) { return $this->getConfiguration(self::XML_PATH_VERO_GENERAL_ENABLED, $store); }
0
5353bdde3190861b49f332dbd1d862c6
f47c251d3fb7c1d1b3580945253045b5
Extract course long name from response (e.g. DATA STRC IMPL&ANLS)
try: course_code = value.split()[-1] except IndexError: course_code = value return course_code
0
976a336d7d16c7d14df2e4feacfef409
3b135eb7c53725a58e027027725980c1
enable/disable build log
get logEnabled() { return bLog; }
0
a4b6edad8567a72bcdc1b74648097d8b
6f4b6d991e0725f6b428ed4003d1119b
<------------------------- Función que descarga Manual de Usuario ------------------------->
namespace SSI.ContractManagement.Web.Areas.Common.Controllers [Authorize] public class AccountController : BaseController public ActionResult DownloadUserManual() { string userManualDocumentpath = Server.MapPath(GlobalConfigVariable.UserManualFilePath); string fileName = new File...
1
90163921be94c8d282c74aef50614519
51fb98ca6ce4a314c4e78528bf745351
возвращает полный путь к папке
class Siteuser_Model extends Core_Entity public function getDirPath() { return CMS_FOLDER . $this->getDirHref(); }
1
87e7349f97b83ce0c503c6bc0e1e6820
9c9c6929b8f5191e43df7498d9d1ae4b
@brief Interrupt No.034 IRQ handler
void IRQ084_Handler(void) { CMP_3_IrqHandler(); }
0
f42090a599f03a46a3c0af4f753bf3bc
5ce6a67df631bb3e271d190bf3175251
Corrobora la nacionalidad de todos los jugadores existentes
public abstract class EuropeanTournament extends Competition{ public abstract void checkRefereeNationality();
0
77e7f8956ac3a01acd04e2129b243a38
f872a0974eb33589793b753517620e01
salva os registros encontrados no arquivo CSV
var fileName fetch(`/geraExcelComRegistros?dados=${JSON.stringify(dataCtrl.getData())}`) .then(response => { if(!response.ok){ throw new Error('something went wrong') } fileName = response.headers.get('fileName') response.blob() ...
0
b2e38db53d114c7aef353b6bae46b6ee
87684b26a892290911fea261e4220c20
为TextView设置错误提示
public class RippleButton extends FrameLayout implements View.OnClickListener public RippleButton setErrorText(String mErrorText) { mTvError.setText(mErrorText); return this; }
1
582eded8e8dc88eca439c996ee1a841b
7365225bc84875475b17f17082268784
登陆回报
class TurntableController extends WapController public function get_Return( $info) { $fund=New Fund(); $re=$this->win->where('id',$info)->first(); if($re->TurnTable->type==2) { $fund->where('user_id',$re->user_id)->first(); $fund->available_integral=CommonCont...
0
859cea8fed33de088d414b61621a030b
191022b2f8c03c0d87e43aca70cb91e9
Configure the specified checkbox to control whether the password is visible or masked in the specified password field.
uint labelCols, uint formCols, ValidRule rule, Action<PasswordControl> callback = null) { var metadata = (this._html as HtmlHelper<T>).Resolve(expression); var control = new PasswordControl(this._screen, metadata).Valid(rule); callback?.Invoke(control); ...
0
d292a9544e35ef66037dd4415ad4d75a
935b9564639b77338060b7bd9cb196d0
Fills the page with a representation for every ad.
function renderAds() { $('#content').html(''); arrayAds.map(ad => { var adHTML = "<div class='Content__box'>" + "<div class='Box__info'>" + ad.text + "</div>" + "<div class='Box__name'>" + ad.contactName + "</div>" + "<div class='Bo...
1
8f30ab9a508d9fb6c4c683021d73816e
61df76c43d646404c4cc344cb1f6e628
A signal emitted whenever the ui is collapsed or expanded.
get collapseChanged(): ISignal<TableOfContents.IModel<H>, H | null> { return this._collapseChanged; }
1
f0c83db03789f7b30721331cdb2ac77a
ba4c7f85003dc3ea4847c679428e24b6
Start the service and make sure we know it's started so tearDown can shut it down.
class ControlAMPServiceTests(ControlTestCase): def test_start_service(self): service = build_control_amp_service(self) initial = service.endpoint_service.running service.startService() control_factory = service.endpoint_service.factory.wrappedFactory protocol = control_factory.bu...
1
3b019bc5f73da9aa77f85b8df9642bfe
f6041fc986c864e4ac0f995de1c86388
Calls the optimal sizing function depending on whether it has a child or not.
min_num = avg - 2 * std_deviation min_num = 0 if min_num < 0 else min_num max_num = avg + 2 * std_deviation child_section_size = (max_num - min_num) / child_section_num return self.__optimize_section_size(child_section_size)
0
4c9e57a6464da861ebac5f2570916c4b
75c6b9a6398114d20ee70f3a683997c2
Manhattan distance of two vectors, an instance vector and a centroid vector
class ManhattanDistance: def __call__(self, samples, new_sample): distance = np.sum(np.abs(samples - new_sample), axis=-1) return distance
1
2af5e66d752530932bd217fe63582c22
e011f8d956eebc2baae4fdb1196ba878
Add telephone number to vCard RFC 2426 p. 13 Valid `$types`s: `home` - telephone number associated with a residence `msg` - telephone number has voice messaging support `work` - telephone number associated with a place of work `pref` - preferred-use telephone number `voice` - voice telephone number `fax` - facsimile te...
global $wpdb; foreach($data as $val) { $tel['hresume_vcard_idhresume_vcard'] = $this->id_vcard; $type[] = '%d'; if(isset($val['value'])) { $tel['tel'] = $val['value']; $type[] = '%s'; } if(isset($val['type'][0])) { $tel['type'] = $val['type'][0]; $type[] = '%s'; } $wpdb->insert( $this->db['tel'], ...
1
2a87ed230fae1f7b81aefe453ff82c6c
1962ac65d2d06a175e2f687e4c62bfd5
清除 sorted set 中过期的数据
sort.Slice(s, func(i, j int) bool { if s[i].expiresAt.IsZero() { return false } if s[j].expiresAt.IsZero() { return true } return s[i].expiresAt.Before(s[j].expiresAt) }) return s }
0
2a5c7f2fbf7bb4bca11c2a02c0a8ed00
32670e2272aca75b40ef585588946d1e
Jeigu nenurodomas veiksmas, peradresuojama į prisijungimo puslapį.
class AuthenticationController extends Controller public function actionIndex() { try { \Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.controllers'); $this->redirect(array('authentication/login')); } catch(\Exception $e) { \Yii::log('Error in '.__METHOD__.'():'.$e->getMessage(), \CLogger::LEVEL_ERRO...
1
088cc5a788ade894fda33311b2a03400
6beaf51cc4a5cdda84badb511a8dcd9a
Recieves a valid guess, increments turn, and returns count
class Game def increment_guess_count @current_guess_count += 1 end
0
9eaa1fdcff632516ea9e73a616e7db12
1b98512ca93a2e280030d896bb784e29
Функция проводит проверку на ошибки формы входа
class module_register extends rMyModule{ public function hasFieldsErrors($d) { if(empty($d['login'])) return 'EMPTY_LOGIN'; if(!preg_match(LOGIN_PREG, $d['login'])) return 'WRONG_LOGIN'; if(empty($d['pass']) || empty($d['pass2'])) return 'EMPTY_PASSWORD'; if($d['pass'] != $d['pass2']) return 'PASSWORDS_NOT_MAT...
0
59b4d723dc2294cce6e4554ad2ac9894
c49935a2bad92a7cfeaa496d86cd4e66
Test the property 'AudioChannelsPerTrack'
class Test_SimpleSound(unittest.TestCase): def testChannels(self): self.assertEquals(self.simple.getChannels(), 1, 'Num of Channels is %s != 1' % self.simple.getChannels())
0
a042e25f578d8ca353e7c97e4da4fdd9
cdfa00e42f917dc0e9310f5e1d844316
Method that manages the update order via webhook.
class StripeActions(Actions): # Set your secret key. Remember to switch to your live secret key in production. # See your keys here: https://dashboard.stripe.com/apikeys def update_webhook(self, context, webhook_payload): stripe.api_key = context['headers']['api_key'] webhook_entity = StripeWebh...
0
99949eb7e4e416cf11df564c8554221e
9f2fd002facf54f15dae6f5e826438a8
Create an instance of {@link ThreeDimDosimetrySlide2Workflow }
TypePlanificationOperation3D createTypePlanificationOperation3D();
0
fd332639b3a567bd662ef8f6ae9377d9
8a130809ee55223128e75b39ad0fb005
修改密保问题
@ResponseBody @ApiOperation("修改当前登录用户密保") @ApiImplicitParams({ @ApiImplicitParam(name = "SECURITY_QUESTION", value = "密保问题", required = true), @ApiImplicitParam(name = "SECURITY_ANSWER", value = "密保答案", required = true), }) @Limit(name = "限制访问次数", key = "updateUserSecurity", ...
1
58a454abefeb02850afdef5773e423ef
4eb419ac7f5657011e617e49d75cf509
Assign the identity name.
self.__identities = copy.deepcopy(identities) self.identityChanged() for network in self.__networks.values(): if network.getIdentityName() not in self.__identities: network.setIdentityName(IrcIdentity.DefaultIdentityName)
1
b9330b8ab82b1c3502523fc3056a304e
80200d593cc550b89c3db2a6094b2cb4
Displays the current user's items
class ItemsController extends Controller public function index() { $items = Items::byUserId($_SESSION['userId'])->get(); return $items; }
1
1f489b710f6255d75c3593bf6df87ce3
95d0f2ab23b885db63d2545b1612d17d
根据试卷状态查询试卷信息
public class PaperService extends BaseService{ @SuppressWarnings({ "rawtypes", "unchecked" }) public Map queryPapers(HttpServletRequest request, OtsPapersInfoDTO dto, PagesDTO pd) throws Exception { StringBuffer sb = new StringBuffer(); sb.append(" select info.paper_info_id, info.paper_info_state, info.paper_info_...
1
46248816ec2391fe661c6e332f234eaf
595c99399a28755d1024693606e997f3
Reallocates a chunk. We can save on a new allocation if the new requested size still fits in the chunk.
class MirandaDbxMmap(object): def realloc_space(self, offset, old_size, new_size): if old_size >= new_size: if old_size > new_size: self.header.slackSpace += (new_size-old_size) self.write(self.header, offset=0) return offset self.header.slackSpace += old_size return reserve_space(new_size)
1
4fe57f2a040ad483cb7dacda6d6aeeed
1b4baa83b9264fe1b5e3e70331baf463
Transforms both the state and result of this computation with the given transform function.
default <R> Task<R> transformWith(final String desc, final Function1<Try<T>, Task<R>> func) { ArgumentUtil.requireNotNull(func, "function"); final Task<T> that = this; Task<R> transformWithTask = async(desc, context -> { final SettablePromise<R> result = Promises.settable(); final Task<R> transf...
1
b35b0cb5e0fdc2d769093891d8f50980
125f931f4bb7f9f1acba99f5c4776bab
https://gist.github.com/ialhashim/0a2554076a6cf32831ca
function copyTextToClipboard(text) { var textArea = document.createElement('textarea'); textArea.style.position = 'fixed'; textArea.style.top = 0; textArea.style.left = 0; textArea.style.width = '2em'; textArea.style.height = '2em'; textArea.style.padding = 0; textArea.style.border = 'no...
1
703af55f823ba55c92507127aa17a13b
ab940ec9059e3acfda9d845dde7f188a
형태소/품사 쌍에서 형태소만 가져오기
class SearchSpider(scrapy.Spider): def get_tokens(kkma, content): tokens = [] node = kkma.pos(content) for (taeso, pumsa) in node: if pumsa in ('NNG', 'NNP'): tokens.append(taeso) return tokens
1
22bf53571d61645c1fdcfb1ad5dc0a89
22cb09e3002496c4ed679f7d6e4aa5b7
Get hci handle Returns: int: hci handle
class ChatClient(object): def getHandle(self): return self._handle
0
03c51587019ebb4936a0bbebee1a4890
f26e0000c3db954f346818c3bbf67c5d
Sets the number of carbons for each chain, as in the order provided. Note that no check is done to enforce that this number of chains makes sense with the header. TODO: check this.
public void setCounts(double[] _counts);
1
9a43184aa238d8955dcb92c84f2ebc85
ff348b60e975cbb8e1f79ce4f8bd25ae
Sets expected coverage level.
final List<Coverage> expected = Arrays.asList(expectedUncovered.trim().split("\n")).stream() .map(o -> new Coverage(o.split(":"))).collect(Collectors.toList()); final Set<Coverage> expectedZero = expected.stream().filter(Coverage::isZero).collect(Collectors.toSet()); final Set<Coverage> actualZeroCoverage = r...
0
5c5350e89a302fcfcad16404be6d0aff
84a0840bbced058805c871eec7b0d8ce
BroadcastChatMsg
{ Validator.ValidateString(clientID, "clientID"); Validator.ValidateString(clientSecret, "clientSecret"); Validator.ValidateString(ownerID, "ownerID"); Validator.ValidateString(channelID, "channelID"); Validator.ValidateVariable(data, "data"); ...
1
7df507bb56249e969704d6344859b82e
db7a2688a4c435c1b9edb49d4822d880
euler tour
findTour(); Euler euler = new Euler(this.graph, startVertex); eulerTour = euler.findEulerTour(); return eulerTour; }
1
1c9f6e50d09ae91a928889e258e2951d
9492a70499755c67829a7b9f84875fba
设置是否自动删除新消息
class Broker public function setAutoDelete($autodelete) { $this->autodelete = $autodelete; }
1
85665ce93566cfb0d79dfcd2f08407a9
ffa185cd08832a7d5b3faa9227a1fd1a
系统评论数据插入并返回该评论数据
class Comment extends BaseService public static function addComment($data = array()) { $comment = mComment::create($data); return $comment; }
1
3407d6376118200f4ce06dae7f058321
2c7e3b79d8b04de208f5c7dc69523640
Get the list of projects from the DB for particular user and send a message to registered observers.
export class LeaderboardsOverviewComponent implements OnInit getProjects(): void { this.waiting = true; this.projectService.listProjectsForUser(UserService.getLoggedInUser().userId) .then(response => { this.projects = []; response.body.forEach(project => { this.projects.pus...
0
5662be279c3995ddae903943855582c4
0fc55e8667de0e77fc8c2263244e597e
반응속도들의 평균을 화면에 출력하기 위한 함수
self.res.clear() for x in self.arr: self.res.append(round((x - self.x_min) / (self.x_max - self.x_min), 4))
0
a06144317fa377dd4e17cc68cbd04221
12f0c874dc9e2979ebfc6f9faf927a5f
Get the speed of the birds along the flight path
public class BirdAI : MonoBehaviour public float getSpeed(){ return speed; }
1
c473fa1fd84d9b97c1ee9d1ea3743d09
cd44429c27b41523a8913ee6009c92a7
Adds the specified {@link HttpStatusClass}es for a {@link RetryRule} which will retry if the class of the response status is one of the specified {@link HttpStatusClass}es.
namespace AppfailReporting IAppfailConfigurationBuilder WithHttpStatusCodes(params HttpStatusCode[] httpStatusCode);
0
68fa688e30c6a64ca3267ab338236077
462fc199fec5ed24d900ce947c8d707b
生成模块的管理菜单
function Include_Admin_Addmodsubmenu() { global $zbp; echo MakeSubMenu($GLOBALS['lang']['msg']['new_module'], $zbp->cmdurl . '?act=ModuleEdt', 'm-left', null, null, null, 'icon-subtract'); echo MakeSubMenu($GLOBALS['lang']['msg']['module_navbar'], $zbp->cmdurl . '?act=ModuleEdt&amp;filename=navbar'); ec...
1
c75f67b924a380c34d8287e60e554f1d
5b15a78fb863929350f670de01e50f30
Funcion para crear log usuarios borrados
from mgrUser import MgrUser if g.user is None: return redirect(url_for('login')) else: MgrUser().borrar(nombre) flash('Se ha borrado correctamente') return redirect(url_for('listEdit'))
0
1f72840ab37340b9c74eb20059b26dee
f4c93b49f4e4a110733d29f619f6ec1c
Muestra los asistentes del evento especificado.
{ $user = Auth()->user()->id; $event = Event::where('id', $id)->first(); if ($event->owner == $user || $event->doorman == $user || Admin::where('user_id', $user)->first()) { $attendants = Attendant::where('event_id', $id)->get(); return view('host.show', compact('even...
1
2a47617bc09055db48c12b0f72fe7630
851c982834a4d60e2b75c98914406708
a function to set a specific monsters turn to be completed
{ charSelect[i].setEnabled(false); player[charTrack] = new Monster(i); charTrack++; if(charTrack == numPlayers) { frame1.remove(buttonPanel); frame1.add(turnPanel, BorderLayout.SOUTH); frame1.revalidate(); frame1.repaint(); } }
0
30b59073c9cd2214365473255adcc327
a154cb8913bfd3db95dbb9f3f9913047
update dictionary and sparse representations after sparse coding
class NMFBase(): def update_h(self): pass
0
00e8285210ed40ef02ead0d3d912f126
00d74ddca9b7974feaad9dd2cb707ee4
Return samples array modified to duplicate under-represented class' samples
random_state = check_random_state(self.random_state) for class_sample, num_samples in self.ratio_.items(): X_resampled = np.concatenate([X, self.cgan_.generate_samples(num_samples, class_sample, random_state)], axis=0) y_resampled = np.concatenate([y, [class_sample] * num_samples...
1
596a9303350e3dc7a2cc50c842b13fae
3f2fab281b898d9b72db23497dc7a32a
他人修改群头像
class GroupWsTask public function changeGroupAvatar(array $groupInfo) { if (empty($groupInfo)) return false; if (!strstr($groupInfo['avatar'], 'composite_avatar')) return false; $message = []; $message['id'] = generate_rand_id(); $message['status'] = GroupChatHistory::GROUP_C...
1
529339249bcd8e61fd7a20f139cf3f2d
85acebdcdf0fcd1c06240e0c4b29f12b
能否使用药水
class Item public static function useDrug($item) { $user_role_id = Session::get('user.account.user_role_id'); $row = DB::query() ->select([ 'ur.*', ]) ->from('user_role AS ur') ->where('ur.id', '=', $user_role_id) ->get() ...
1
404afbaef22eb242fdf96ee2ca1142c0
95f8f788b0970ba21fdba4c3e1514898
Sets the raw mode of this receiver. Further data received will be sent to rawDataReceived rather than lineReceived.
self._debug = debug self._primare_talker = primare_talker self.setRawMode() self._rawBuffer = bytearray()
1
ac28405227f5a89caa3849befbdbd20f
5c8eb751aa5b6fa0d0eb560ebd7e2caa
Returns array of strings which represents the keys that can be used for response parameters on this transaction
{ return [ static::TRANSACTION_FIELD_TRANSACTIONAL, static::TRANSACTION_FIELD_EXIT_ON_FAILURE, static::TRANSACTION_COLLECTION, static::FIELD_PAYER, static::FIELD_PAYEE, static::FIELD_AMOUNT, static::FIELD_IS_PAYER_AMOUNT, ...
1
9f886f1312ad2386599a547b5f290b70
141224aff3d6049d437683e3c51050a5
Move the leg tip progressively until it reach the target leg tip position when not switching leg
{ double arcLeangthLP = getStandardizedArcLeangth(radiusCircleDistance, MathLibrary.changeScale(motors[MotorId.LP_ZK].angle, motors[MotorId.LP_ZK].minAngle, motors[MotorId.LP_ZK].maxAngle, 0, 90), getLegLeangthFromUpView(motors[MotorId.LP_Z]), -widthOfBase / 2, heightOfBase / 2); double ...
1
55282c84f682585a80a7f4cbe087660a
c33b59ed468daa2faeb843f21a0adf1f
Adds a Basic authentication to your web application pipeline.
namespace ServerlessWorkflow.Sdk.Services.FluentBuilders IWorkflowBuilder AddBearerAuthentication(string name, Action<IBearerAuthenticationBuilder> configurationAction);
0
b1f85b2edd124a84ddd61c7399b69ece
779774b67c6b37a32a2f4dcb20c684cd
Match ->
fn main() { struct Foo { x: (u32, u32), y: u32 } let foo = Foo { x: (1, 2), y: 3 }; let Foo { x: (a, b), y } = foo; println!("a = {}, b = {}, y = {} ", a, b, y); let Foo { y: i, x: j } = foo; println!("i = {:?}, j = {:?}", i, j); let Foo { y, .. } = foo; println!("y = {}", y); let p...
1
93520099d3d38a221fcdad514c234d26
11cebe780ca7c699a949c42e7996bcec
修改Board的状态
public boolean modBoard(Board_Dto dto);
1
db69ff102d35bf7cb9be176942932497
4b627eb539607e6b95f616c865252586
Event.wait(self, timeout=None) Block until the internal flag is true. If the internal flag is true on entry, return immediately. Otherwise, block until another thread (greenlet) calls :meth:`set` to set the flag to true, or until the optional timeout occurs. When the *timeout* argument is present and not ``None``, it s...
assert getcurrent() is self.parent, "only possible from the MAIN greenlet" if self.dead: return True waiter = Waiter(self) if timeout is not None: timeout = self.loop.timer(timeout, ref=False) timeout.start(waiter.switch, None) try: ...
1
4941f3fdc211422be0aa2308a2ea960d
68bbfb41c7ec4e388c10719d95bdab55
Returns message that the answer was incorrect.
public void answerIncorrect();
0
6595dcdd3b03edb5dc4d23fa1be4ec8f
12dab523c6cfcb7d55e8d0e88a0321c5
Implements __index metamethod for an embedded object reference. Parameters on lua stack:
BBObject** data = (BBObject**)lua_touserdata(state, idx); if ( data == NULL ) return &bbNullObject; return *data; }
1
4927dd016be32d0456be7f9f5a0717fe
fa038ef441a46071cfcd42a322b17def
Converts a lean class document to a DTO
public class PluginDocMapper public PluginDoc toDto(QavPluginDoc qavPluginDoc) { PluginDoc result = new PluginDoc(); result.setName(qavPluginDoc.name()); result.setDescription(qavPluginDoc.description()); return result; }
1
eb7afec76e6554a597cabdd64753bca4
f520650df169d096051d5d509a1b3550
Combine any UTF16 surrogates into a single string
_STD wstring make_string() { _STD wstring mystring; unsigned long ch = 0; for (; ch < 0xd800; ++ch) { mystring.push_back(static_cast<wchar_t>(ch)); } for (; ch < 0xdc00; ++ch) { mystring.push_back(static_cast<wchar_t>(ch)); mystring.push_back(static_cast<wchar_t>(ch + 0x400...
0
00deeaad0be272803ee6cc8f7356aa28
62e3953a2da3ffe8aea97a0a8930bcb8
1.5x expectedNumEntries gives very low probability of decoding failure
func TestDecodeErrorsV5(t *testing.T) { t.Parallel() net := newHandshakeTest() defer net.close() net.nodeA.expectDecodeErr(t, errTooShort, []byte{}) }
0
e70c7aa035ded83650a68cc6806eb2c7
2063a7b559d74b3cbb5b646d4f8ad7c5
应用简介部分的点击事件
when(v!!.id){ R.id.ll_start ->{ L.d("${clickAppInfo!!.apkPackageName}") val start_localIntent = this.packageManager.getLaunchIntentForPackage(clickAppInfo!!.apkPackageName) this.startActivity(start_localIntent) popupWindowDissmiss() ...
0
500149cc8208fab77829b336809aea76
6eefbec6e6808070fc7b90176d6ff012
Выдаёт рекомендацию на основе информации о похожих пользователях и предполагаемых оценках
def getRecommendedItems(prefs, itemMatch, user): userRatings = prefs[user] scores = {} totalSim = {} for (item, rating) in userRatings.items(): for (similarity, item2) in itemMatch[item]: if item2 in userRatings: continue scores.setdefault(item2, 0) scores[ite...
0
52b0a24a0e2d32fd29b8b59498987f8e
bc6d77c3a6664290f467a637229e16a6
Export target template for selected template Ids.
{ var req = TemplateGroups.createViews(externalId, version, items, GetContext(token)); return await RunAsync(req).ConfigureAwait(false); }
0
0d0e1f95582ca6085b0b78a4f4c17a11
651a34fe897a1578bb0356942bdbecc1
Returns true if MediaRule instances are equal
{ if (other == null) return false; return true && ( this.Enabled == other.Enabled || this.Enabled != null && this.Enabled.Equals(other.Enabled) ) && ( ...
1
326cfbcc771a85f8107e5bf049d16994
5a1918cda06cfebb80088d4e5ba8b63b
geographic (bilinear) interpolation between the CCSM input grid and the NCEP grid
import numpy as np alatdim = alat.shape[0] alondim = alon.shape[0] adimmean = (alatdim + alondim)/2.0 blatdim = blat.shape[0] blondim = blon.shape[0] bdimmean = (blatdim + blondim)/2.0 if adimmean < bdimmean: if len(b.shape) > 2: btime = b.shape[0] newb = np.zeros([btime, alatdim, alondim]) for i in ...
1
1cff29c4bc43b408979a2a9260f15370
609ab8f92c827751b80776cd68b004a8
Server listens and waits for messages from clients.
{ try { tcpListener = new TcpListener(IPAddress.Parse("127.0.0.1"), 8052); tcpListener.Start(); Debug.Log("Server is listening"); Byte[] bytes = new Byte[1024]; while (true) { using (connectedTcpClient = tcpListener.AcceptTcpClient()) { using (NetworkStream stream = connectedTc...
1
f5aadc233a54dc18da3ab01bbd4680c9
e6ee0a47c64463a0aa5396a755cb656b
设置可拖拽组件列表菜单
var json = []; $(".drag-part>.drag:visible").each(function(){ json.push({"id":$(this).attr("id")}); }) json.join(","); var b = JSON.stringify(json); $.ajax({ type:"POST", data:b, dataType:"jsonp", jsonp:"callback", url:portalurl+"portalInterface_setElementMenuInfo.do?type=1&userId="+userId+"&js...
1
0ba546c2f604f286beed4aed819e2037
eac6d6fd10a655048e697c7565cc56af
<p> Convierte el objeto participanteen un json</p>
@ProviderType public class ParticipationImpl extends ParticipationBaseImpl @Override public JSONObject toJSON(ThemeDisplay themeDisplay) throws PortalException { JSONObject jsonParticipation = JSONFactoryUtil.createJSONObject(); JSONArray jsonPlacitPlaces = JSONFactoryUtil.createJSONArray(); SimpleDateFormat dat...
1
8c9ea49909476894be3da92d08994e84
b38a9d933163bc6cb3885746d6531cea
Gets the horse's name.
public class SavedHorse implements Cloneable public String getAppearance() { return appearance; }
0
01d3c7ac653cd8265148c8d8cbef55aa
dfb0cdd2d75a956d07f20d201fe6385d
判断是否为堂兄弟节点, 根结点不同但是深度一样
var pa1 = element.parentNode, pa2 = siblingNode.parentNode; if (pa1 === pa2) { return true; } return false; }
0
13a190b70f655400159850e431ba3942
3a41672ed40a2884683bb8af30b598a1
Ouvre un formulaire pour la gestion des plats
namespace MSPR3 public partial class AccueilForm : Form private void bt_GF_Click(object sender, EventArgs e) { Forms.GF.Menu.MenuForm GF = new Forms.GF.Menu.MenuForm(); GF.ShowDialog(); }
0
62053bff5b8caf02800c62450bb864cd
6d922e8b11194054c94eefe9def54857
Get the current file history.
public FileHistory getFileHistory(Param param);
1
5294fdc8f74bd202b72b2e9a131550dc
d62c5f03f866709c6d407ff816d32b03
Решаем
class DualSimplexSolver(Solver): def solve(self): self.initial_variables_quantity = len(self.matrix[0]) if not self._normalize_conditions(): raise SolvingError("В заданих умовах обмеження змінних містять строгі знаки нерівностей або знак рівності - дані вхідні дані некоректні для виконання обчислень") self._ma...
1
3c77f5024fdf8310fb08bc7c676688e0
1a847b25c820bce798db3a93d4b55d4c
Updates min hash by min hash identifier.
export class BloomTdigestCommander min(key: string): CommandData { return { command: 'TDIGEST.MIN', args: [key] } }
0
40eb6aebf15df40264475dfdab238a1f
7e688dea4d70149b4453eb3192fa4ebb
Multivariate normal (Gauss) probability density function (pdf). Definition
sigma: float = None) -> ndarray: mu, sigma = self._check_sufficient_statistics(mu, sigma) if isinstance(x, ndarray): if len(x.shape) == 1: return _dist.normal.pdfv(mu, sigma, x) if x.shape[0] == 1: return _dist.normal.pdfv(mu, sigma, x[...
1
1e5d8555f4a28b8188ec4774ac3df371
a2d4a771b66300661ca7b588af835538
Serial port USART1 formatted printing with an automatic new line
{ #if 0 char buff[512] = ""; int chars; va_list ap; uchar err; if (0 == g_debug) { return 0; } #ifdef USE_LINUX pthread_mutex_lock(&UPRINT); #else OSMutexPend(UPRINT, 0, &err); #endif va_start(ap, format); chars = vsprintf(buff, format, ap); va_end(ap); if...
0
415357cabb88332527a0ac8ffc950df7
2240a99694c722f20f7d8f6ab0b2892c
Setter method - Trailer ISO Code 639
public class X_Z_GenAstoVtaDetMPGeo extends PO implements I_Z_GenAstoVtaDetMPGeo, I_Persistent public void setISO_Code (String ISO_Code) { set_ValueNoCheck (COLUMNNAME_ISO_Code, ISO_Code); }
1
1e0027bf2c66156e30c6cc79e740e001
88b86c420ae59c68f46a39d6a1bbd9a3
已促销数量的设定
namespace V5.Portal.Backstage.Controllers.Promote public partial class PromoteController [HttpPost] public JsonResult ModifyMeetAmount( PromoteMeetAmountModel promoteMeetAmountModel, PromoteMeetAmountScopeModel meetAmountScopeModel, string[] removeRuleId, List...
1
e4314c9e1837f0130391dc8909f158c8
508e3ed7e646d004fd3b075c05817732
A function that writes to invalid address.
PRIVATE void test_tlb_write_inval(void) { vaddr_t vaddr; paddr_t paddr; vaddr = TRUNCATE(VADDR(UBASE_VIRT) + PAGE_SIZE, PAGE_SIZE); paddr = TRUNCATE(PADDR(UBASE_PHYS) + PAGE_SIZE, PAGE_SIZE); #if (TEST_TLB_VERBOSE) kprintf("tlb_write() vaddr = %x, paddr = %x", vaddr, paddr); #endif KASSERT(tlb_w...
1
eacb4c2da94bce40694cbb9ccbbc9b5d
9296790cd0e0ca8c6454f79db758d620
계정에맞는대출상품가져오기
List<CcsLoan> loanlist = new ArrayList<CcsLoan>(); try{ QCcsLoan qCcsLoan = QCcsLoan.ccsLoan; Iterable<CcsLoan> loans = rCcsLoan.findAll(qCcsLoan.acctNbr.eq(acctNbr) .and( qCcsLoan.acctType.eq(acctType))); if(loans!=null){ for(CcsLoan ccsLoan: loans){ loanlist.add(ccsLoan); } } } ...
1
27814d2800ac45796376498bd42f76ac
b848f0369a84d8c40247b42f1a117603
try to get the 'best' location selected from all providers
Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_COARSE); criteria.setAltitudeRequired(false); criteria.setBearingRequired(false); criteria.setCostAllowed(true); criteria.setPowerRequirement(Criteria.POWER_LOW); return locationManager.get...
1
26768af3a85f77e99b8848202806be5a
354718e00c51e4e094ea2d61ab1036f6
Находит конец команды по символу '=' и возвращает позицию следующего символа
while (index < line.length() && line.charAt(index) != ';') { index++; } return index; }
0
ea4328217e982ed95842d09f20017830
71c35fe561f7bf585cd0017d1b7570d6
打印菜单名称的方法 (包含子菜单和子菜单项)
@Service public class MenuServiceImpl implements MenuService public String transMenuName(Menu menu) { StringBuffer sb = new StringBuffer(); sb.append(menu.getMenuName()); if (false) { sb.append("<font color=\"#888\">&nbsp;&nbsp;&nbsp;" + menu.getMenuName() + "</font>"); } ...
0
6899cc264006c73a6add94e89ad5f5d9
9af59bbddf8f9f7c4f1b26a08faf4b9c
Finds the frame pose from the coordinates of the identified chess pattern, calculating the extrinsic and projection matrices
public class ObjectFollowerActivity extends Activity implements View.OnTouchListener private static DeviceExtrinsics setupExtrinsics(Tango tango) { TangoCoordinateFramePair framePair = new TangoCoordinateFramePair(); framePair.baseFrame = TangoPoseData.COORDINATE_FRAME_IMU; framePair.targetFrame...
0
37f47d434aead32a1e923d6cd0b41918
8c8b5c2c739c736eee0e57ea0e0e2a87
Performs the matrix-vector operation y := alpha*A*x + beta*y, where alpha and beta are scalars, x, and y are n element vectors and A is an n by n hermitian matrix, supplied in packed form.
Array<cplx, 1> &y, cplx alpha, cplx beta) { int MM = y.extent(0); int N = A.extent(0); int lda = A.extent(1); int ku = (lda - 1) / 2; int kl = ku; int xStride = x.stride(0); int yStride = y.stride(0); BLAS_NAME(zgbmv)( CblasColMajor, CblasNoTrans, MM, N, kl, ...
0
21ae2062fb49eb746b982a4a12a70a8f
ced609a5d43d5ead126ff53eeeec6356
Clears members failed login count (intended to be used only by administrator)
class Logrus_auth extends Logrus_base public function clear_fail_count($email) { $member = $this->logrus_member->get($email); if ($member) { $this->load->model('logrus/failed_logins'); $this->failed_logins->delete_by(array('member_id' => $member->id)); } }
1
c9602a61e5d9b5d7086988c3f76ef4e6
7b4c20cbf5d24cef53a022c70eb68497
Set the maximum number of pedestrians to be spawned.
public class ScenarioGenerator public int getPedestrianCountMax() { return pedestrianCountMax; }
0
c864e5dcd3e74921389b443ddf168802
68c24e031037fe121a53838ec8c796a6
Displays a form to edit an existing permission interface group.
{ return View::make('admin.permissions.form') ->with('title', "Edit Permission: {$permission->display_name}") ->with('action', ['admin.permissions.update', $permission->id]) ->with('method', 'put') ->with('roles', Role::optionsList()) ->with('permi...
1
d4b81abd1c562475c6ef52e9d0472cee
739099a860206d856b27e829be4350b1
Gets details about Projections stored in DataBase
class Projections: def printProjections(self): print("Projections :") for i in range(len(self.projections)): print(str(self.projections[i].__name__), str(self.params[i]))
0
6e339e2c476452f2837ed4f3cb1b09e4
ffb69500cebfad5ff6ec61b291c1bfa3
Finds the minimum spanning tree using Prim's algorithm
void Graph::mstPrim() const { int source = 1; const int NR_EDGES = size-1; int weightCounter = 0; int dist[size + 1]; int path[size + 1]; bool done[size + 1]; Edge edges[NR_EDGES]; for(int i = 1; i <= size; i++) { dist[i] = INFINITY; path[i] = 0; done[i] = fal...
1
ad6d181f4b800ab18e6d196b6306b6d6
36359bcb7a387dc0dd447c4f7831a5a9
Проверка, меньше ли эта строка передаваемой русской
class Str extends Type public function lt($s) { $sRaw = !$this->isNativeString($s) ? $s->getRaw() : $s; return \strcmp($this->getRaw(), $sRaw) < 0 ? true : false; }
1