query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
180a6ca648672ff9ee99e5a632b85e23 | 24f4b1baa5f2309932ae024a3183b13c | Devuelve un Set de los Paises de este Jugador | public class Clinica
public ListaPaises getListaPaises() {
return new ListaPaises();
} | 0 |
2184e9113fa4ace93282be535533d554 | dada11882e18657a5d71ad3dd77db177 | Gets the name of this Container. # noqa: E501 | try :
return self._name
except Exception as e:
raise e | 1 |
8ced89206b43dd00d03f2c772c5d9fba | 0ea4a42c94a51c2c71440a82fd0c7adb | ===========================================================================
It converts the string provided by SPREAD into a node ID
=========================================================================== | def generateNodeType(input_str):
if input_str == 'Oppose_ROMNEY, MITT':
return 1
elif input_str == 'Support_ROMNEY, MITT':
return 2
elif input_str == 'Support_OBAMA, BARACK':
return 7
elif input_str == 'Oppose_OBAMA, BARACK':
return 4
else:
return 12 | 1 |
3595442da315b9354040fb1854c5ef99 | 743a1e04df7bc7cef6f78a67679dfa67 | Adding a row to the row cache to render them later on into a uniform
table. | local function addTableRow()
rowHeight = 54
list:insertRow{
onRender = onAddTableRow,
height = rowHeight
}
end | 1 |
b0791aab6fea0518b11bd3ad415820e3 | 860ae9e4986b3acc5042dc3345ad78e7 | This adds a property descriptor for the End Index feature.
<!-- begin-user-doc -->
<!-- end-user-doc --> | itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MobaIndex_id_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_MobaIndex_id_feature", "_UI_MobaIndex_type"),
Mob... | 0 |
aa843db2fd02fc59958ee1e822cbd7f9 | b515beab7f27bf0be36c54a01a5c0aed | 获取?后面的参数 | var strAllParam: String? = null
val index = this.indexOf("?")
if (index > 0 && index < this.length) {
strAllParam = this.substring(index + 1, this.length)
}
return strAllParam
} | 1 |
8e181ed83dcd35eca0ef96a3caee0367 | 7a8bc5f276ab2a696132f3cca48085ad | Activity被系统杀死后再重建时被调用.
例如:屏幕方向改变时,Activity被销毁再重建;
当前Activity处于后台,系统资源紧张将其杀死,用户又启动该Activity.
这两种情况下onRestoreInstanceState都会被调用,在onStart之后. | protected void onRestoreInstanceState(Bundle savedInstanceState) {
try {
super.onRestoreInstanceState(savedInstanceState);
} catch (Throwable e) {
if (AfApp.get().isDebug()) {
AfExceptionHandler.handle(e, "AfActivity.onRestoreInstanceState");
}
... | 1 |
dd6ac13079f73a4e837a73dda78a86f5 | 6d9622803d68a5e7aea0d18054eba6a3 | GET: TicTacToe | namespace TicTacToe.Controllers
public class GameController : Controller
public ActionResult Index()
{
return View();
} | 1 |
5ecfe89b9fa640cb03577c6eb3c89536 | 1fceab7f91e0fee4c99b0fe760d59320 | 简单选择排序:每一趟在n-i个记录中取关键字最小的记录作为有序序列中第i个元素 | n = len(a)
for i in range(n):
min = i
for j in range(i+1,n):
if a[min]>a[j]:
min = j
a[i],a[min]=a[min],a[i] | 1 |
e1f65b1b87f432549a141fcee5cc4a92 | f062b9d255c2f248d2cdf2cc3a123acf | 直前にINSERTしたAUTOINCREMENTのIDを取得する | class Frogg_Db_Sql{
public function insertId(){
return self::$db->insertId();
} | 1 |
82e96585a288281bd43610e8d5807ad1 | 8ac93830f28254eebc39ba4f541a9e78 | Lists information about the available report types. | namespace Palmmedia.ReportGenerator.Reporting
public class MefReportBuilderFactory : IReportBuilderFactory
public ICollection<string> GetAvailableReportTypes()
{
var reportBuilders = LoadReportBuilders();
return reportBuilders.Select(r => r.ReportType).Distinct().OrderBy(r => r).ToA... | 1 |
a4df38ee9a3895522a596da40d8e47d0 | 8dae3b5bff7421df18fdba3133b798a3 | Allows customers to return their bikes to the rental shop. | func returnBikeController(w http.ResponseWriter, req *http.Request) {
var bookBikeModel models.BookBike
err := json.NewDecoder(req.Body).Decode(&bookBikeModel)
if err != nil {
w.WriteHeader(http.StatusUnauthorized)
w.Write([]byte("Error Parsing BODY! [/user/login]"))
}
if err = endBookBike(&bookBikeModel); err... | 1 |
593313bc8b569060dcd75a5815c34540 | fc26376ac1824d96487410daa4b7814f | Pops up an open file dialog. | namespace Mach.Wpf.Mvvm
bool OpenFileDialog(); | 1 |
f21b9e422fd59f72f733115ec808eb9e | 6f24e4fbad74fdc83e1bf3a0ae7d80ad | Get the contacts by filtered paramaters (called via ajax)
POST params: filter_type, contact_id, contactgroup_id, search_string | class ContactsController extends CRMController{
public function searchAction(XMLModel $appNode, Hashtable $args){
$filters = new Hashtable();
$filters->view = "search";
$filters->search = $args->string;
$this->createRegisters($appNode, $filters);
return "contacts";
} | 0 |
7655051c37a617a3ccad748c214347f7 | 78b495de5d49202124ec85f4b6159771 | 此回复所属问题 | class Comment extends Model
public function topic()
{
return $this->belongsTo(Topic::class);
} | 1 |
4ac6012fd1f02057361ec997d89e7677 | d23ce481cefec878f67ca02f48d4c161 | https://leetcode.com/problems/paint-house/ | n = len(houses)
if n == 0:
return 1
dp0, dp1 = 1, pow(2, counter[0], MOD) - 1
for i in range(1, n):
if houses[i] - houses[i - 1] == k:
dp0, dp1 = dp0 + dp1, dp0 * (pow(2, counter[i], MOD) - 1)
else:
... | 0 |
e127de32c13f8f51ed5910fcf8f1f9e5 | fde68a610a5cc1ab4af5f5b372d32a91 | Check the headers have data in them | class LoadAssetContent implements WebEventHandlerInterface
protected function isHeaderSetAndNotEmpty($header)
{
return (isset($_SERVER[$header]) && $_SERVER[$header] != '');
} | 1 |
696ea54a19501bd20d66419b47c74fc8 | f1c749b233e4e5249ff76f32e6ec0461 | Run the BAS task asynchronously. | public class TaskWrapper
public TaskWrapper run() {
return executeAsync(bizActions);
} | 1 |
c9aa8f63b5380ecc1d3f2d7151849354 | dc038b4ab3669e4d353ed45bd414823b | Gets the "Shape" element | {
return ElementName == ""
? null
: Shapes[ElementName];
} | 1 |
4a8b4515391dc3c1e33783833f8d426d | f62ed1d2a0538bac16f9ba8af0324de2 | Create a robust scaler component. | class Scaler(BaseEstimator):
def __init__(self, with_std=True):
self.with_std = with_std | 0 |
ffe33985e47f0856066aecc81e6f7438 | 04d4e258021a66f1d0a8593a1231550b | 根据用户是否关注/点赞work,更新menu | public class MainNewTabFrament extends ArrowIMBaseFragment implements NetworkCallback
public void updateWorkBeach() {
for (String key:MainNavFrag.customViewMap.keySet()){
for (String key2:MainNavFrag.customRedDot.keySet()){
if (key.equals(key2)){
BadgeView badgeView=MainNavFrag.customRedDot.get(key2);
... | 0 |
2937b61e338e0c556b4397080e148cf2 | 02ac4702b5b61e7a53e23e09f180d894 | Rebinds setting proxies to the current configuration. | system.getTsBlockKde().selectedProperty().bindBidirectional(controller.getSysconf().blockKdeDesktopAppletsProperty());
system.getTsDirectSound().selectedProperty().bindBidirectional(controller.getSysconf().directSoundOutputProperty());
system.getTsShowWarning().selectedProperty().bindBidirection... | 1 |
fc5e74c9850ce379aedfd72bb89792f8 | 23c8a474a17c9fa553d8bf2115f24542 | Get first child data collection. | {
$ChildCollectionsDataProvider = new CActiveDataProvider(
'Collections',
array(
'criteria' => array(
'condition' => 'parent_id = :parent_id',
'params' => array(':parent_id' => $id)
),
'pagination... | 0 |
fb4bde4b649a8333efcd111c48eee155 | 7c4573fb54009bc79793b996888be0e0 | Shows a list of devices issued to me. | [Route("my/devices")]
public IEnumerable<DeviceResponse> ListDevices() {
return Database.DeviceStore.GetAll(
filter: f =>
f.User.Guid == CurrentUser.Guid,
orderBy: o =>
o.OrderBy(b => b.LinkDate)
).Select(s =... | 1 |
59d87efe019fcceba25e9b6b431d917f | 5a987d08b010614150e9e22dcfa2ff8f | Filling tank with nothing. | void fillFuelTank(); | 0 |
89789d8e519f08f9570c93f07a0b30b2 | 63be6837e47c33038873dbe14fffb078 | definit le nombre d'équations et de variable du système de départ | f = open(fichierDimacs, "r")
liste_clauses = []
init = f.readline()
nbClauses = int((init.split(" ")[len(init.split(" ")) - 1]).strip())
nbVar = int(init.split(" ")[len(init.split(" ")) - 2]) ... | 1 |
5b193cc1e782df57349f9bd1ada4bccc | 285c7ff44d22ce92c3e77cd368e03460 | Disable sync. | int32_t i2c_s_sync_disable(struct i2c_s_sync_descriptor *descr)
{
ASSERT(descr);
return _i2c_s_sync_disable(&descr->device);
} | 1 |
eb71dc819299bd8fa95d9749f5196c76 | dab7834072341fb6088aee45172a06ff | 使用免费次数刷新商品列表 | function refreshCallback( ... )
if(MoonData.getNumberRef() <= 0)then
local refreshLimit = MoonData.getRefreshLimit()
local shopInfo = MoonData.getShopInfo()
local curCount = tonumber(shopInfo.gold_refresh_num)
if curCount == refreshLimit then
AnimationTip.showTip(GetLocalizeStringBy("key_10234"))
return
e... | 1 |
968fdc4afc33ed3703da2d3c823e8e9f | 01e4c4865ea1757010bd741e6277a39a | Calculate the size of each thumbnail. Based on padding, and number of
columns. | if (numColumns < 1 || numRows < 1) {
return;
}
paddingOffset = 80;
cellWidth = ((super.getWidth() - paddingOffset * 2) / numColumns);
cellHeight = ((super.getHeight() - paddingOffset * 2) / numRows);
} | 1 |
bf2283d17a33b64f73259cdde01d3034 | 520e056d5ad825f2b1eb47a13d18f79c | 显示属性的信息 | class AttributeController extends BackController
function showlist(){
$type_id = I('get.type_id');
$info = D('Attribute')->where(array('type_id'=>$type_id))->select();
$typeinfo = D('Type')->select();
$this -> assign('typeinfo',$typeinfo);
$bread = array(
'first' => ... | 1 |
3dddf5707def1519954cae327bf6eb9d | b34a857505123ee1d779e48da406cc46 | <pre>
Updates the specified
[Experiment][google.cloud.dialogflow.cx.v3beta1.Experiment].
</pre> | @javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/ads/googleads/v14/services/experiment_arm_service.proto")
@io.grpc.stub.annotations.GrpcGenerated
public final class ExperimentArmServiceGrpc public static final class ExperimentArmServiceFutureStub
extends io.grpc... | 0 |
a2fe660b6c072cbfcc81524f73889e1b | 0c622532d1e5a8164c2b855aa0160447 | 定义一个方法,根据传递的姓名创建person对象返回 | def create_person(display_name):
return Person.objects.create(display_name=display_name) | 1 |
6b39297193f1af8a92cc218e887702c8 | 94c23a73c6ee7c6ae2b16146602534d9 | 用于提取自定义标记的待翻译字符串,只匹配以下四种格式
_("...") 适用于html等
_('...') 适用于html等
'_("...")' 适用于html、js、php等
"_('...')" 适用于html、js、php等 | if not ( pattern ) then return ''; end
local langCode = GetLocale();
local s, e, content = string.find(pattern, langCode.."%:(.+)@");
if not ( content ) then return ''; end
return strtrim(content);
end | 0 |
34e98cecf9c51aca5ae4f74aedba03c6 | 5b9a6d3dead48cf02f43a556a883a601 | The maximum x value in the lookup table. | public class TreeTable<T> implements Iterable<TableEntry<T>>{
public int getXMax(){
return map.lastKey();
} | 1 |
22081c70879d16416f8d6ed0f2d4b75d | 3d4251abedcc35e02cc5725b7682af78 | A work stub for future functionality | def token_thingy():
return None | 1 |
f55149fd8978e3066ef601cf5d12fe3c | 291c4d8f400a5e4ffcf2a1ec7ad25f2a | Gets the lead adapter job log details database. | {
var db = ObjectContextFactory.Create();
return db.LeadAdapterJobLogs.SingleOrDefault(c => c.LeadAdapterJobLogID == id);
} | 1 |
c037537054cc9b73635202378a93f157 | f1be72f3e19b36411d53f421af1d3efa | borrar una nomina indicando id | {
$nomina = nomina::find($id);
$nomina->delete();
$empleado = User::find($nomina->cedula);
Flash::error("Se ha Eliminado la nomina del empleado " . $empleado->nombre . ' ' . $empleado->apellido);
return redirect()->route('nomina.index');
} | 1 |
d5f72d651dfb3c65e442a9dd5b774bdf | 1873d90920218f1dc62a0481033d1b88 | 결제 완료시 디비 저장 함수. | $objQuery =& SC_Query_Ex::getSingletonInstance();
$sqlval = $objFormParam->getHashArray();
$arrRet = $this->objUpFile->getDBFileList();
$sqlval = array_merge($sqlval, $arrRet);
$sqlval['update_date'] = 'CURRENT_TIMESTAMP';
if ($sqlval['fix'] != '1') {
$sqlval... | 1 |
9795926db5cb6f38131580a2229b078a | cdcdbd1efb7c6f33cf8328319bc6e1dc | Clean up any realms whose ref counts have dropped to zero. Note
that this does not include realms who were created but not yet
used.
Called under snap_rwsem (write) | class LoginServer(object):
def _maintain_realm_list(self):
with self.locks["realms"]:
to_remove = []
for realm in self.realms:
update_delay = time.time() - self.realms[realm]["last_update"]
if update_delay > self.REALM_MAX_UPDATE_TIME:
... | 0 |
74ac07daad6861cd77b9047931400ff5 | bc9c8050d13f6ef0a28d7734f1fff6bc | 已登录不能进入此页面 | render() {
const { isLogin, location, login, loading, err } = this.props;
if (isLogin) {
const { from = "/" } = location.state || {};
return <Redirect to={from} />
}
const { name } = this.state;
return (
<div>
<h3>LoginPage</h3>
<input onChange={... | 1 |
6841b437f3c41be6af89c8d950b17c82 | 49a6ebad65b737d562e66b048c77debb | Unsets the value of the '{@link org.bimserver.models.ifc2x3.IfcCShapeProfileDef#getCentreOfGravityInXAsString <em>Centre Of Gravity In XAs String</em>}' attribute.
<!-- begin-user-doc -->
<!-- end-user-doc --> | void unsetCentreOfGravityInX(); | 1 |
597ce743a1a0fd13ea7763ff0f531cb0 | 81d0b5003cae68068ee58ae6c5cadb81 | 玩家头上显示的帮派信息 | local guildInfo = session.party.GetPartyInfo(PARTY_GUILD)
if not guildInfo then
return nil
end
return self:GetPlainText(guildInfo.info.name)
end | 1 |
b7fd795ccd1ff496e129f0f410a054c4 | 5d874f5d7370696e22ab9b6cca8e55ec | 重构k-d树,使之平衡 | if (childrenList.size() > tree.getOrder()) {
BPlusNode<K, V> left = new BPlusNode<>(false), right = new BPlusNode<>(false);
int leftSize = (tree.getOrder() + 1) / 2 + (tree.getOrder() + 1) % 2, rightSize = (tree.getOrder() + 1) / 2;
for (int i = 0; i < leftSize; i++) {
... | 0 |
7aa576550aeccb163294f0025f6abe60 | bb5205fd075474d8163fc3cde09698a4 | 设置属性限额数值的值 | function MenuListController(dataService, commonService, $state, ksAlertService, auth)
function setValue(amount) {
commonService.setLimit(amount);
} | 1 |
129847a03b84ecd2fde4fc7014e40d66 | 04673e9e57738c4e367a534cde6b5f1c | 比较酒款名称 | class FEllow_page(StartEnd):
#进入关注界面,比较标题
def test_0505009_check_the_07_text(self):
xx = Fellow_page(self.driver)
name=xx.get_wine_link_text(7)
xx.click_wine_link_text(7)
title=xx.get_wine_page_title()
xx.back_APP()
self.assertEqual(name,title,"关注页面,比较第7款酒中文名称,失败!") | 1 |
9431b4d00a7466b42ca88173a6473d7e | 8d1274c18a68cdf1d6428a6a6a452a98 | Called when each port is being validated | namespace Northwoods.Go
void OnPortChanged(IGoPort port, int subhint, int oldI, object oldVal, RectangleF oldRect, int newI, object newVal, RectangleF newRect); | 0 |
dab787d3547af9e567fadaca69877226 | 7c851e2a5216f37411399405e668b893 | Remove Single D-U-N-S Number from a LOD Registration:
At any time after a registration is created, you may remove single D-U-N-S Number
from the registration; any existing notifications for the deleted D-U-N-S Number
will still be delivered.
https://directplus.documentation.dnb.com/openAPI.html?apiID=monRemoveSingleDun... | {
var apiVersion = @"2020-11-20";
using( NoSynchronizationContext )
{
var _match = new global::System.Text.RegularExpressions.Regex("^/subscriptions/(?<subscriptionId>[^/]+)/providers/Microsoft.ProviderHub/providerRegistrations/(?<providerNamespace>[^/]+)/noti... | 0 |
9fa03392e65f57c6870ffd9ee1a98792 | dbda9f33ca53e61ba1acbbaa29d5b690 | Initializes this Blood MiniGame playthrough. | public class DrinkingTableMiniGame : MiniGame
protected override void Start () {
base.Start();
} | 0 |
cff519044ec22c4c3d541996c6478dab | 47d7e9bfe21441e54d3ae9f88610fa1b | Test model name to context size on a valid model. | ms.set_context(mode=mode)
net = Net(2)
x = ms.Tensor(np.arange(16).reshape((1, 4, 2, 2)), dtype=ms.int32)
out = net(x)
expect_out = np.array([[[[0, 1], [2, 3]], [[8, 9], [10, 11]],
[[4, 5], [6, 7]], [[12, 13], [14, 15]]]]).astype(np.int32)
assert np.allclose(out.asnum... | 0 |
5a87436099a9ed13e14030c51198591a | 2c24f9102d36ddc987ed94553688b5b0 | SET-CURSOR-POSITION-FOR-MENU-IF-APPROPRIATE | {
extern Display* display;
Cursor cursor;
LVAL lval_fontcursor_shape;
long fontcursor_shape;
lval_fontcursor_shape = xlgafixnum();
xllastarg();
fontcursor_shape = (long) getfixnum(lval_fontcursor_shape);
if ((fontcursor_shape & 1L) != 0)
xlerror("Font-Cursor fixnum must be an even number", lval_fo... | 0 |
edfc8b4358d5e85a31c42d7db0ddda10 | 48d906bac05f2a0f4df99e4ab59c93af | Calcula las distancias características de la imágen neutra | int f[3] = {4,2,1};
int n = f[0];
GLfloat acum = img[i][j]*f[0];
if(i > 0){
if (j > 0){ acum += img[i-1][j-1]*f[2]; n+=f[2]; }
acum += img[i-1][j]*f[1]; n+=f[1];
if (j < ancho-1){ acum += img[i-1][j+1]*f[2]; n+=f[2]; }
}
if (j > 0){ acum += img[i][j-1]*f[1]; n+=f[1]; }
if (j < ancho-1){ acum += img[i][j+1... | 0 |
c51af1e5fe47511b80ba384dcca0b295 | fb23fbb9aacaf748ae372a2c5e38c355 | 首次创建地刺 | if not TheWorld:HasTag("cave") then
return
end
if TheSim:FindFirstEntityWithTag("aip_oldone_deer") ~= nil then
return
end
local rocky = TheSim:FindFirstEntityWithTag("rocky")
if rocky == nil then
return
end
local tgtPT = aipGetSecretSpawnPoint(rocky:GetPosition(), 5, 20, 5)
if tgtPT ~= nil then
aipSpaw... | 0 |
3160093d1ad26b71f93dd712d464b4a3 | 23e2b340d8ab34ee92a676409e613c2b | Получение списка тем, привязанных к покупкам, в которых пользователь является участником | {
$where = array('applicationUserPaymentId' => array($this->getApplicationUserPayment()->getApplicationUserPaymentId()));
$applicationUserPaymentItems = $this->getApplicationUserPaymentItemMapper($this->getDbSectionNameMain())->fetchAll($where);
foreach ($applicationUse... | 0 |
9847d777e3ef65533203d7738f24c2ab | 4e28f9533447deba91c2d4c4f66b2edd | Возвращает полное количество часов заданного временного отрезка. | {
if (startTime <= 0 || endTime <= 0)
throw new IllegalArgumentException("startTime or endTime <= 0");
if (equals(startTime, endTime))
return 0;
if (!before(startTime, endTime))
return -1;
return getHours(endTime - startTime);
} | 1 |
175d174b6f89af82a03cd2ac3f80ce85 | b07097a5e37c8e352d174112ca9a57b7 | Get a user's cart id | {
$db = dbConnect();
$queryGetIdCart = $db->query('SELECT id FROM carts WHERE id_user = ' . $idUser);
return $queryGetIdCart->fetch()['id'];
} | 1 |
b1b0b18f657ded6d17110b6750c9d6a6 | dbc0633fa047ac66bf140cea45396cde | En handler som tar hand om den tolkade signalen ifrån gps:en. | public void onGpsStatusChanged(int event) {
switch (event) {
case GpsStatus.GPS_EVENT_STARTED:
Log.d(TAG, "GPS_EVENT_STARTED");
break;
case GpsStatus.GPS_EVENT_STOPPED:
Log.d(TAG, "GPS_EVENT_STOPPED");
break;
case GpsStatus.GPS_EVENT_FIRST_FIX:
Log.d(TAG, "GPS_EVENT_FIRST_FIX");
br... | 1 |
053fa4fa28ab7817c84faccafd0d6368 | aa31ec3d1a115b4d4e3d53f72bdb86db | Относительное форматирование даты | class ModelLikbetDate extends Model
public function DateFormat($date, $format = '%e %b %Y')
{
setlocale(LC_TIME, getLocaleString($this->config));
$this->load->language('likbet/date');
$lang_site = $this->config->get('config_language');
$now = time();
$unix_date = strtotime($d... | 1 |
f764315ced6176de0d0c9e61a9bf1f50 | a0ac38c7371aee2e6da3c070c32463b7 | Alpha系统调用的接口传入的经纬度为字符串类型,需要修改类型后再调用adaptee的方法
重写target的方法,实现类型的转换以打到适配器的目的 | print('system Beta method send called')
print(f'the original value is: {lonlat} and the original type is {type(lonlat)}, '
'adapter splits lonlat and trans string type into float type.')
lon, lat = lonlat.split(',')
self._location(float(lon), float(lat)) | 1 |
95db272a13e3e41f04444de118996b85 | 231c8ce540b47488bc77b5c5234865c2 | Creates a clone of this OpenXml package, opened on the given stream. | {
if (isCompatible)
{
return new HSSFWorkbook(stream);
}
else
{
return new XSSFWorkbook(stream);
}
} | 0 |
9302118159ff5483acae8eee21684d90 | 9f52a8c46472129d9dc43a8a6ba8f631 | Returns the value of the '<em><b>Mip Cuts Covers</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Mip Cuts Covers</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | public class Prefs
public Boolean getCardCovers ()
{
return cardCovers;
} | 0 |
3ed21cd1a67774847123cb157b504181 | 5adb8a9b8bf9f9fea98b68339f7aa585 | Set up Bullet physics and create a physics space. | public class PhysicTown extends SimpleApplication implements ActionListener, AnimEventListener, AnalogListener
private void initPhysics() {
bulletAppState = new BulletAppState();
stateManager.attach(bulletAppState);
} | 1 |
55536f893cae2eb39cc82deacafa152f | 51cf5e7693c5f1f262e69976df6ae5b6 | Gets information about the search domains owned by this
account. Can be limited to specific domains. Shows all domains
by default. To get the number of searchable documents in a
domain, use the console or submit a `matchall` request to your
domain's search endpoint:
`q=matchall&q.parser=structured&size=0`. For more inf... | public function getDomains(ContextInterface $ctx): GetDomainsResponse; | 1 |
fae3dd1dc734db573f62fbd18534480a | ecc4be8826a0ee9aa08dea5d91b883f9 | Get the renderer result when the old and the new are the same. | {
$this->changesAreRaw = true;
return $differ->getOldNewComparison() === 0
? $this->getResultForIdenticals()
: $this->renderWorker($differ);
} | 1 |
1853411a319769f16ab64ebbdadefdf1 | 59f8d1cd1c2631f49241372d480dc2db | 控制放大、缩小比例 | function magnifyControl() {
this.defaultAnchor = BMAP_ANCHOR_BOTTOM_RIGHT;
this.defaultOffset = new BMap.Size(10, 10);
} | 0 |
e9e5a047c2f746f54815814ac9e676a5 | 5f7e0a01d5da52729db938c21c604bdc | Get the sum of the branch lengths of this node and all its descendants. | function getBranchLengths() {
let bl = this.branch_length;
return _.map(this.nodes.descendants(), node => { return bl(node)});
} | 0 |
ef574a8dedc13a33d2ae7225be1d0fa8 | ea6a7ae24c5c37113cc89c5ffc70b515 | Unsubscribes from all chip events. | namespace FoodStoryTAS
public class ScanStepsController : Singleton<ScanStepsController>
private void UnsubscribeEvents()
{
_planeManager.planesChanged -= OnPlaneAdded;
_planeManager.planesChanged -= OnPlaneUpdated;
_planeManager.planesChanged -= OnPlaneRemoved;
... | 0 |
3ffea1919c0eaa20e6cfd0a701bab08e | 7f60079e9bcbd4e3fab26b7bd662d5ff | @brief Convert temperature in Fahrenheit to Celcius. | {
double temperature_in_celcius;
temperature_in_celcius = (
(temperature_in_farenheit - conversion_diff) * conversion_mult
);
return temperature_in_celcius;
} | 1 |
1928741a1a8cbb2598556c0d7937b3d1 | 48028a443f4a4611247154fabfd68b58 | Test that the Circles can be compared with less than statement | c1 = Circle(10)
c2 = Circle(8)
assert c1 > c2
assert c1 != c2 | 0 |
e2a3e8cd3621d12d4972ce4d93671de8 | ca4eaf4580566750144728e54f74682f | [calculates the positional encoding for a transformer] | def positional_encoding(max_seq_size, embedding_dim):
angle_rads = get_angles(np.arange(max_seq_size)[:, np.newaxis], embedding_dim)
angle_rads[:, 0::2] = np.sin(angle_rads[:, 0::2])
angle_rads[:, 1::2] = np.cos(angle_rads[:, 1::2])
pos_encoding = angle_rads[np.newaxis, Ellipsis]
return tf.cast(pos_encoding, ... | 1 |
cf6111f8524066a343db68424fb3064f | 1dba7e8588829a02ffe092692081dd4a | Gets the allowedAccounts property value. Type of accounts that are allowed to share the PC. | public class SiteConfigForm extends ActionForm
public String[] getOriginalAllowEditAccounts()
{
return this.mOriginalAllowEditAccounts;
} | 0 |
a5171ab11e7faeab6e80607786a0a790 | 8cccfbee7ffbbd4e0349bbd9d17ad1a9 | Returns the header-item structure associated with the module | class ProfessorCourseController extends Controller
public function getModuleDWHeaders(Request $request, $id) {
return $this->getGenericHeaders($request, 'module_dw', 'dw_id', $id);
} | 1 |
cecce1614fa29e7d275d38cc4ba7d644 | 1ac44a0852ac7b0ced100ef4994c08a0 | 是否移动环境 | String strIsMobile = request.getParameter(SheetEnviroment.Param_IsMobile)!=null?request.getParameter(SheetEnviroment.Param_IsMobile):request.getAttribute(SheetEnviroment.Param_IsMobile) + "";
boolean result = false;
if (strIsMobile==null||strIsMobile.isEmpty()||"false".equals(strIsMobile)){
String state = requ... | 1 |
e326c095789caf2d60896fc3140691b6 | e5635244c4bef7f29b651d7b487c39ee | 根据用户名查找用户粉丝列表 | namespace WebAngular.Controllers
[ApiController]
[Route("[controller]")]
public class UserController : ControllerBase
[HttpPost("/api/user/get-fan-list")]
public ActionResult<List<InterfaceUserBaseInfo>> GetFanList([FromQuery] InterfaceIdentity identity,
[FromForm] string username)
... | 1 |
30eae0b729b2dbb2c879f6799bedc2bb | 1e01f6342ce5dd27470d9835160302b1 | Acknowledge (and cull) an item in the sequence. | public void newsAckPacket(int sequence, IPStruct destination); | 1 |
39f560fdc8e34fb680577301260359ab | dfd9c0eb6d40aa8807f4439a0e8203c3 | FUNCTION
DESCRIPTION
Before enter CB language screen, get language list
PARAMETERS
none
RETURNS
none
GLOBALS AFFECTED
none | class Site{
function show_language_list(){
global $CFG,$db_obj,$admin_smarty;
$lang_sql = "SELECT * FROM {$CFG['table']['language_type']} WHERE status = '1' ORDER BY id ASC";
$lang_res = $db_obj->sql_query($lang_sql);
$lang_num = $db_obj->sql_numrows();
if($lang_num > 0){
... | 1 |
a318d213c7d011de63c916e6d3eb2bf9 | 89357b064effb963b5ecda0b8041d21a | Add embedding layer.
Returns:
inputs: List of length num_steps, each of whose elements should be
a tensor of shape (batch_size, embed_size). | inputs,
inputs_positions=None):
assert inputs.ndim == 3, ("Number of dimensions should be 3,"
" but it is: %d" % inputs.ndim)
length = inputs.shape[1]
pos_emb_shape = (1, self.max_len, inputs.shape[-1])
if self.posemb_init is None:
pos_em... | 0 |
dbc35f928014e395eb30b946e326a515 | a0a94dc72499ba3eab76813609bdd3ff | Installs the exception handlers for uncaught errors and unhandled promise rejections. | function installGlobalUnhandledRejectionHandler() {
if (_onUnhandledRejectionHandlerInstalled === true) {
return;
}
_oldOnunhandledrejectionHandler = (window as any).onunhandledrejection;
(window as any).onunhandledrejection = traceKitWindowOnUnhandledRejection;
_onUnhandledRejectionHandlerIns... | 1 |
2fe602d22d59cb3d20ed89c699ee4cc0 | d2efa3c6c6d12963e106289d71bd6d2f | Sets if the camera is able to free-look | public class GameManager : MonoBehaviour
public void disableCammeraRotation(bool flag) {
FPSScript.shouldLookAround = !flag;
} | 1 |
36fca2e2a6996eb573b5e80e292672e2 | e8db3b7c8eab7d7bc31361272a6bdb02 | 新增缺课白名单 | @ResponseBody
public Packet addWhiteList(HttpServletRequest request) {
ProcessResult pr = new ProcessResult();
try{
pr= execOrderService.addWhiteList(request);
}catch(Exception e){
e.printStackTrace();
pr.setMessage(e.getMessage());
pr.setS... | 1 |
d573925a777bcb8f042f22c4673c3580 | 07855b1b87224ad88f0eb409ec9f93a5 | Исключение при пустом пути | class AppTest
@Test
void testPathVoid() {
String path="";
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(path),"UTF-8"));
Assert.fail();
} catch (IOException e) {}
} | 1 |
721e17f62c5b0bc8d546b0c360893bb4 | 21570b621fc26f6a3f76edf2c5a16700 | Swap axes of the list of images to be used for CNN | out = []
for im in ims:
out.append(im[:,:,::-1])
return out | 0 |
6cf240278eebd426b9766f2107545157 | 70e8f6d7aa89182c93015832eb5ddb3e | Is the curret page search page ? | class cconsanguineos_search extends cconsanguineos
function IsPageRequest() {
global $objForm;
if ($this->UseTokenInUrl) {
if ($objForm)
return ($this->TableVar == $objForm->GetValue("t"));
if (@$_GET["t"] <> "")
return ($this->TableVar == $_GET["t"]);
} else {
return TRUE;
}
} | 1 |
87ffa51acb6755497cd10820e1ea268b | 42f38614de04f6ac67e7ca9009761fbc | 根据收到的餐桌信息,生成餐桌信息表 | @Service
public class FoodtableServiceImpl implements IFoodtableService
@Override
public int insertFoodtable(Foodtable foodtable) {
foodtable.setCreateTime(DateUtils.getNowDate());
return foodtableMapper.insertFoodtable(foodtable);
} | 1 |
37298201e6352fedeb77f98267aa5615 | 50e36e3ace68c793c2fcd944169844d1 | Removes the specified <paramref name="connectionId"/> from all Chatrooms. | namespace Aura.Framework.Connectivity.Server.Chatrooms
public class ChatroomManager
public void RemoveChatroom(int chatroomId)
{
Chatrooms.Remove(chatroomId);
ServerManager.ConnectionController.SendMessage(new InitializeChatroomsComposer(Chatrooms));
} | 0 |
ea7b4f8d454098dd9afa311f7abc75c6 | b5921d968e5662c9d7d9b914b82ac367 | used to determine if pts data is available. | public class ToolFrame implements RFrame
public boolean is3PtComplete() {
return teachPoints[0] != null && teachPoints[1] != null &&
teachPoints[2] != null;
} | 1 |
2c270e48261fdd58cd82f64b17f17ae1 | 7e2da554d6b6f53d9b3cc2bfa450df2c | 龙蛋采集被打断 | function wnd_goldenEgg:afterClickSmash(useEgg, gifts, playtimes, num, flag)
self:handleEgg(useEgg)
self:updateleftSmashTimes(playtimes)
self:showDayLeftTimes()
self:showGetAllItemCost()
self:eggRecords(num)
self:suspendReward(gifts, flag)
end | 0 |
cb839bbef358e7b639b00f5d0d030193 | ff12f6c2c70ca001aca3327bb2ae1a92 | Displays content on the connection scene. | contentView.findViewById(R.id.btn_connect).setVisibility(View.VISIBLE);
TextView view = (TextView) contentView.findViewById(R.id.device_address);
view.setText(R.string.empty);
view = (TextView) contentView.findViewById(R.id.device_info);
view.setText(R.string.empty);
view = (TextView) contentView.findViewBy... | 0 |
7fb759a721460bb2904eae127f92d5fb | 813e75ffac86163f11ceb2bc4d6dafb1 | 查找给定对象的所有type为103的对象属性 | {
Arguments.Object.IsNull( referType , attrType );
List<PropertyInfo> list = new List<PropertyInfo>();
if( attrType.IsSubclassOf( typeof( Attribute ) ) == false )
{
return list;
}
PropertyInfo[] pis = referType.GetProperties( BINDINGFLAGS );
if( pis != null )
{
list.AddRange( pis.Where... | 0 |
c68bb60d10793d7131cf886622902be6 | 8e39b2c2d33edec854560c69c90e0b62 | このTweetViewModelの色設定を更新します。 | namespace HiyoDotter.View
public partial class frmTweet : Form
private void setColorSetting()
{
this.btnTweet.BackColor = ColorTranslator.FromHtml(SettingsData.sBtnTweet);
this.BackColor = ColorTranslator.FromHtml(SettingsData.sTweetListBackColor);
} | 0 |
bd9a50e55e7a272f729bdafec77cae7e | 48333b33872c8661566f49c910e4e837 | Mark the referred column as indexed or non-indexed. | class ColumnSchemaBuilder extends \yii\db\ColumnSchemaBuilder
public function getIsIndexed()
{
return $this->isIndexed;
} | 0 |
42623b6c0756d1a12ff5954a97fa0c26 | 663f4573a7eddd142fc821d5dc611ee3 | Called when any of the numeric input boxes change on the Exit Editor. | {
string text = App.PrepareInput(((TextBox)sender).Text);
bool parsed = int.TryParse(text, out int result) && result > 0;
if(parsed)
switch(((TextBox)sender).Name)
{
case "Width":
App.Window.Context.Params.Width = result; break;
case "Height":
App.Window.Context.Params.Height = ... | 1 |
c3976fc004b75c5004abe1b450def69b | f58e36bbc0cb00b113a9cc6b361bc909 | @brief Function to check hardware registers for a destructive reset, ie
ECC RAM must be re-initialized | static uint32_t read_resetting(uint32_t *csr_base) {
return (MSGDMA_RD_CSR_STATUS(csr_base) & MSGDMA_CSR_RESET_STATE_MASK) != 0;
} | 1 |
035a0293484d802e101f774fb205d8c7 | 8ff364c92491de365a3cb07440f490e4 | Tutorial: Connecting to a host and opening a shell | opening_message = [
host_spec.colorize("on grey"),
cmd.map {|i| i.sub(/^(.{50})(.{3}).*/m, '\1...') }.join(' ')
].join(' $ ')
log opening_message, :closing_status => opening_message do
shell "ssh", "-A", host_spec, cmd.map{|i| "'#{i}'" }.join(' '), :log => true
end
end | 1 |
3f0d9b0dbc72d661ab5570db33ca9734 | 0bb2411142dd78f1e3a238ff6f02beec | Retourne un lien pour afficher le nom du module, avec un lien
conduisant à sa présentation. | class Immocost extends CommonObject
function getNomUrl($htmlcontent,$id=0,$ref='',$withpicto=0)
{
global $langs;
$result='';
if(empty($ref) && $id==0){
if(isset($this->id)) {
$id=$this->id;
}else if (isset($this->rowid)){
$id=$this->rowid;
... | 1 |
9f47aa1d130359863bd87fa62c2c3594 | cb3a34227e35f792f2a8f136146c34ef | calculate the force in the y direction given dy, distance, and the overall force | public class Body
public double calcNetForceExertedByY(Body[] bodies) {
double totalForceY = 0;
for (Body b : bodies) {
if (!b.equals(this)) {
totalForceY += this.calcForceExertedByY(b);
}
}
return totalForceY;
} | 0 |
7f449cb65eeeb374c1464c8647b632f1 | ac62e16263143bffa34db14a2507996f | 安全检测方法 | class PublicAction extends BaseAction
public function main()
{
$security_info=array();
if(is_dir(ROOT_PATH."/install")){
$security_info[]="强烈建议删除安装文件夹,点击<a href='".u('Public/delete_install')."'>【删除】</a>";
}
if(APP_DEBUG==true){
$security_info[]="强烈建议您网站上线后,建议关闭 DEBUG (前台错误提示)";
}
if(count($security_... | 1 |
5da6103c6813a7152f6ddd7d875da368 | 0112c992a7b0b52d991278956937bdbd | The SetStretchBltMode function sets the bitmap stretching mode in the specified device context | ret_ad, args = jitter.func_args_stdcall(["hWnd", "hBitmap", "nWidth", "nHeight"])
raise RuntimeError('API not implemented')
jitter.func_ret_stdcall(ret_ad, ret_value) | 0 |
bab2b2141845863793620444b5c60528 | 7f2a955aec0c0f5b18f7ffab39bd723c | Add a section for viewing images to the UI | unmodImgSizer = new wxStaticBoxSizer(new wxStaticBox(mainPanel, wxID_ANY, TEXT_UNMOD_IMG), wxVERTICAL);
wxBoxSizer* unmodImgScrolledSizer = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer* unmodImgInfoSizer = new wxBoxSizer(wxHORIZONTAL);
wxBoxSizer* maxTxtLengthSizer = new wxBoxSizer(wxHORIZONTAL);
unmodI... | 1 |
8b82662ed41abb7bdc726afc310d80b1 | ea69169a28dc83bb6de692ad405838a4 | method called to set a faction entity's faction colors: | public class ProcessVariableXYGraph extends JPanel implements StratmasEventListener{
public Color[] getFactionColors() {
return factionColors;
} | 0 |
f852d1a810487aed2d2c7012b79bffb2 | 7c820fc7ae2a87e66491952096937f3e | 按数据块迭代写入 | namespace CatLib
public class MemoryStorage : IStorage
public void Write(byte[] buffer, int offset, int count, long index = 0)
{
Guard.Requires<ArgumentNullException>(buffer != null);
Guard.Requires<ArgumentOutOfRangeException>(index >= 0);
Guard.Requires<ArgumentOutOfRan... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.