query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
5c8a8008cffe8d968c3ca8bc918fbf8f | 5a9b7653dc20534a411034c5425e7a66 | Function returns the system credential type (Windows Authentication/UserPassword) | class ACSCredential extends CredentialBase
public function getCredentialType()
{
return CredentialType::ACS;
} | 0 |
0a6fd8bbcb0b528842392fd77e69de28 | 07c5caaa55f5963533f9bcdfa96e1fdc | Возвращает массив содержимого заданной строки, ограниченной номерами заданных столбцов | {
int colbeg, colend;
colbeg = excelNumbers(colbegstr);
colend = excelNumbers(colendstr);
string[] values = new string[rowend - rowbeg + 1];
values = this.readArrayVertical(rowbeg, colbeg, rowend, colend, numofSheet);
return values;
... | 0 |
dd0923ac91ac4ad3f89e37e27f56218e | bc333c37757fbbee63826961318f8e96 | At this point, the plug-in should cancel any ongoing context scans, if there are any. | namespace PCSC
public class SCardMonitor : ISCardMonitor
public void Cancel() {
lock (_sync) {
if (_monitoring && _context.IsValid()) {
_context.Cancel();
}
}
} | 1 |
0af562796bd3afc7d6ea1bf7bfd9ecbc | 83997f5c8890d9d9a6ef7b937c5fe39a | Determines whether or not two vectors are moving in the same direction | namespace Game.Mathematics.Geometry3D
public static class Utility3D
public static bool IsSameDirection(Vector3 a, Vector3 b)
{
float value = Vector3.Dot(a.normalized, b.normalized);
return Mathf.Approximately(value, 1);
} | 1 |
af47c1aa5d5117ba51f08a00b48fc2be | 476e1855a663d15299e679e5913219da | 设置当前为有铃声有震动模式 | public class AlarmReceiver extends BroadcastReceiver
private void setRingtone(NotificationCompat.Builder builder, Uri ringtoneUri) {
builder.setDefaults(NotificationCompat.DEFAULT_VIBRATE | NotificationCompat.DEFAULT_LIGHTS);
builder.setSound(ringtoneUri);
} | 1 |
88727c0cf00458b5453c996f83f823ad | 8ad7be9e94d52ef9b0304655b57bfc38 | Tests that the indexes get updated when inserting should wrap around | TEST_P(IndexBufferOffsetTest, UInt16IndexSmallUpdates)
{
GLushort indexData[] = {0, 1, 2, 1, 2, 3};
runTest(GL_UNSIGNED_SHORT, 2, indexData, UpdateType::SmallUpdate, false);
} | 0 |
db4449bb339bfb21b1a581728ed19ef2 | bd1958470c80fe9ab7915091900d95fb | 檢查推薦人是否有資格領匹配獎金 | if ($this->getIsComplete()) {
return ServiceCenterPolicyRewardRecord::find()->where([
'policy_id' => $this->primaryKey,
'member_id' => $this->member_id,
'approver_status' => ServiceCenterPolicyRewardRecord::APPROVER_STATUS_PASS,
])->exists(... | 1 |
c137de2f70b0af0d49b8349c5b27620c | 053410b7d6b7b5d97df492d4f018e101 | Метод, який перераховує з рахунку на рахунок | String destPassport, String destRequisite, double amount) {
boolean result = false;
Account src = findByRequisite(srcPassport, srcRequisite);
Account dest = findByRequisite(destPassport, destRequisite);
if (src != null && dest != null) {
if (s... | 1 |
ff0dbbe1c37d4de391e6aba3ddb72a79 | 546ff87b7e6cf26b519923a9e7fd72cc | 移除某一视图类型下,集合中的某一视图实例 | namespace IPCamera
public class ViewCollection : CollectionBase
public void Remove(View view)
{
InnerList.Remove(view);
} | 1 |
1c308480cd13aa50e65b346d0585177a | 361f7870342e85e654bdf47227284a66 | Set whether the policy will create directories
as needed, if they do not exist already. | void setAutoCreateDirectories(boolean autoCreateDirectories); | 1 |
949a260bd5e45933191eb7c017e0453a | 7f2ba4505da8e6a342e362c2dfcbd999 | Finishes the asynchronous execution of the ImportBackendStorage operation. | namespace Amazon.ServerMigrationService
ImportAppCatalogResponse EndImportAppCatalog(IAsyncResult asyncResult); | 0 |
09fd8fd3bfa900fd9cfc6386a7abf87b | a7af6837ef3deb1b2428df02e1ed2b85 | 设置 组合商品的仓库价格 | class GoodsRetailPrice extends CoreGoodsRetailPrice
public function setGoodsAmount($data)
{
$data['shop_id'] = user_info('group_id');
return $this->save($data);
} | 0 |
2c46fd1ac8ac111677f60a5463679c0b | 9b502649448faabe6a2f8f1a34df7396 | 绘制无触碰状态下Cell | class Game(object):
def draw_closed_cell(self, cell):
self.canvas.create_rectangle(cell.x * self.CELL_SIZE + 1, cell.y * self.CELL_SIZE + 1,
cell.x * self.CELL_SIZE + self.CELL_SIZE, cell.y * self.CELL_SIZE + self.CELL_SIZE,
fill=Colors.C... | 1 |
ec942e61d27bc9c159be251b4964061d | 25c1da8f7e1e2b962c1d7a48e04dca49 | Test setting and getting the user data length of a message | var mySerializer = new ndebug.Serializer();
mySerializer.setShort(294);
mySerializer.setShort(510);
mySerializer.setShort(411);
var myBuffer = mySerializer.getBuffer();
assertEquals(myBuffer.byteLength, 6);
var myUnit8Array = new Uint8Array(myBuffer);
assertEquals(38, myUnit8Array[1]);
assertEquals(25... | 0 |
70182430e0ea83680de1367ae1fddbbf | 5eab3fc6e14d1dd5bca8cfea3edbf09c | Emit int32 one's complement negation. | static int64tl int64_neg(
int64tl x)
{
int64tl ret;
ret.high32 = ~x.high32;
ret.low32 = ~x.low32 + 1;
if(ret.low32 == 0) {
ret.high32++;
}
return ret;
} | 0 |
c1fd36e793516fc15e2d001250531ef2 | 6981f0798e85fa53553af7a1b409e43f | Checks if the simulators the network created.
That means more than one client or more than one connection. | func TestNetworkSimulation(t *testing.T) {
adapter := adapters.NewSimAdapter(adapters.Services{
"test": newTestService,
})
network := NewNetwork(adapter, &NetworkConfig{
DefaultService: "test",
})
defer network.Shutdown()
nodeCount := 20
ids := make([]enode.ID, nodeCount)
for i := 0; i < nodeCount; i++ {
... | 1 |
a9b53094d1cc5b365abc103c55edda30 | 4cb7a3a94442a9e7ce6668b92faa8e84 | 保険付保形態_その他を設定する
保険付保形態_その他 | public class Ctr0005s01SupplyInfoEntity extends PageBaseEntity
public String getInsuranceMorphologyOther() {
return insuranceMorphologyOther;
} | 0 |
c628eacbb30c11c66f53b81311cd9aeb | 9ac033ffad1cbb360ec35c830c76ba4d | enable promiscuous mode and set packet handler | static int set_nic_promisc_v2(AFPacketInstance *instance)
{
struct packet_mreq mr;
memset(&mr, 0, sizeof(mr));
mr.mr_ifindex = instance->index;
mr.mr_type = PACKET_MR_PROMISC;
if (setsockopt(instance->fd, SOL_PACKET, PACKET_ADD_MEMBERSHIP, &mr, sizeof(mr)) == -1)
{
printf("%s: se... | 1 |
fce0d95f57680a9580e4f48e9d0d1fba | 2943ea71d888e23b280e27867ced8b78 | Returns the meta object for enum '{@link it.disim.univaq.ecommerce.model.ShipmentStatus <em>Shipment Status</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getShipment_Shipment_has_address(); | 0 |
39f72dc7d6147afff1568c4f6717b384 | fbf7976221c36f1fb8e702568f8f90d9 | Relays the feedback messages from the original
``panda_arm_controller/follow_joint_trajectory`` server to our to our
``panda_control_server/panda_arm/follow_joint_trajectory`` wrapper action
server. | def ctrl_sub_callback(data):
global gripper_is_on
jt = JointTrajectory()
jt.joint_names = ['shoulder_pan_joint', 'shoulder_lift_joint',
'elbow_joint', 'wrist_1_joint', 'wrist_2_joint', 'wrist_3_joint']
pt = JointTrajectoryPoint()
pt.positions = list(data.destination)
pt.positions[0] -= math.... | 0 |
869fd4a311f0230264370e32bcba404b | 3d4b740f43cff4fb74906dbb4808cbf4 | Adds a new list of neurons and automatically links them to the specified neuron | {
geneList = new List<NEATGene>();
for (int i = 0; i < numberOfInputs; i++)
{
for (int j = numberOfInputs; j < numberOfInputs + numberOfOutputs; j++)
{
AddNewGene(innovationNumber, i, j);
innovationNumber++;
}
}
... | 0 |
dd6fab1f90d4dc60114fd213fa2ef880 | 070b6f78f7312e1b66933fe5c4d54755 | Function to perform complex square root | CS_ENTRY cs_sqrt(CS_ENTRY in) {
#if !defined(__cplusplus) && defined(_MSC_VER) && !defined(__ICL) && defined(CS_COMPLEX)
return _DCOMPLEX_(sqrt(creal(in)), 0);
#else
return sqrt(in);
#endif
} | 1 |
4c4829fe266eb6376bdc5bb112cf93ff | 191aec9ac0cd1a492a049d8e7df307d1 | Step 2 of OAUth1.0 dance. Obtains url for token authorization. Real user needs to be redirected to this url for signing-in and confirmation of granting the rights. | class Stream():
def get_auth_url(self):
url = self._get_oauth_url('authorize')
self.request_token = self._get_request_token()
return self.oauth.authorization_url(url) | 1 |
c8c9ecc9573e5def6656d0bd21538d6f | d74c9fe4271c16e20c4551f29d1df9cb | 构建Get方式的Request对象 | namespace MMFrame.Net
public class HttpClient
public void CreateGetRequest(ref System.Net.HttpWebRequest request, System.Uri dstUrl, System.Net.NetworkCredential credential)
{
CreateRequestBase(ref request, dstUrl, credential);
} | 1 |
45178538a357874f32fc32121b5cfab7 | c8a936636aee494160ca82afc3fe21fd | Initializes all the base variables for a Divblox dom component | this.$el = d.querySelector(params.$el) || document.body;
this.bindUIElements(params.ui || {});
this.bindMethods(params.methods || {});
this.initEvents(params.events || {});
this.methods.initialize();
} | 1 |
c0295079e5e06749f1bd1ec3d73ccb21 | ab5db5ebe01f21f1e1f140e441c55d0c | Returns concatenation field-descriptor for given general metadata. | public class DescriptorHelper
public static String tofieldDescriptor(ClassFile file, FieldInfo field) {
return new StringBuilder(toTypeDescriptor(file)).append(".").append(field.getName()).toString();
} | 1 |
136e217b5e8dc0a2e52ca8fab7965ebb | 7c09c0e2ea5af929f948e098d3f2dea2 | Updates all userData entries in local database from remote. | interface AppDataSource
fun syncUserData(): Completable | 1 |
aa76f46cc0c310b35e8a51d9c399fc13 | 2236a8c161d4f0e5bee0fc31cf677bf0 | Defines the reach of the atack (body, air or both). | class Bullet extends PlayerBase2D implements IScriptPoolObject<Bullet>{
public get Through(): boolean { return this.through; } | 0 |
63ac0f5214923f63696c4c00212b1492 | 4fbbffe223f4684d2fa4cb9ebcf98ddc | 获取全部项目名称和id | @Transactional
@Service
public class TeamServiceImpl implements TeamService
public List<Map<String, Object>> findProjectIdAndNames() {
return projectDao.findIdAndNames();
} | 1 |
a7bf8d3ffb0fb7b09a2c1a91f0416904 | 38b496d3777c7f080a6015d86377dc1e | An api to populate the "home" screen of content, with the backing constant search term. | public @ResponseBody Set<String> getLocationNames(@RequestParam String term, HttpServletResponse response) {
return simulateSearchResult(term);
} | 0 |
7120d7e9ae024a6b9188b48593f6218f | 16d56991eaddd36bf4fc8c5969fa73b1 | Returns number of current players by app id. | int countByApplicationId(String applicationId); | 1 |
3b9262cd9bd7d55b6e29be9702ec323c | aef83d4016d14c2f738d4100c17a307b | 创建带头结点链表 | {
link * head = NULL;
link * first = (link *)malloc(sizeof(link));
first->num = 100;
first->next = NULL;
head = first;
for(int i=200;i<1000;i+=100)
{
link * node = (link *)malloc(sizeof(link));
node->num = i;
no... | 0 |
de7e4b61060b10fe2b1e997057e31027 | c322e61c8ef150c099b3ed68216aa779 | Returns the effective terms for the paired end facet. | class RBlockFacetContact:
def energies(self, *args, **kwargs) -> Any:
pass | 0 |
f602eada91e865e75dd54290f78923d3 | 1e7620154c1a31e08255ca88978357a0 | 定义安全策略, | {
$this->registerPolicies();
Gate::define('post.update', [PostPolicy::class, 'update']);
Gate::define('post.delete', [PostPolicy::class, 'delete']);
Gate::define('home.contact', function ($user) {
return $user->is_admin;
});
Gate::before(function ($user, $... | 1 |
83042112fa9586953d36c056b11726ff | 013d4fe3d0fe92d87c77f95887d1ba52 | Compliments the character by a base amount. | void CharacterBase::AdjustScore(int value) {
score += value;
} | 0 |
b6fbcb5c842324c9ee3cb937e061bb96 | 7d988fa70ba7a0e42b191347f013cc45 | 由yyyy-MM-dd格式的字符串返回日期 | public class DateUtils
public static Date getDate1(String yyyy年MM月dd日) throws ParseException
{
SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy年MM月dd日");
Date date=dateFormat.parse(yyyy年MM月dd日);
return date;
} | 0 |
50f27ce7ec177e0a7b9f91ce05814389 | cfce7382781e46001dec51137e29be8c | POST: api/notifications/sms | {
List<Notification> notifications = new List<Notification>();
Sender s = new Sender()
{
id = 1,
Name = "Instituto de Informatica"
};
Notification n1 = new Notification()
{
Title = "Notificaçã... | 0 |
1bb2af3f6bf230376f3cd59111e0df76 | b6ff2d8770edcc48d4465df82aec5371 | ASP.NET specific dependences (if ASP.NET isn't loaded then don't fail) | {
try
{
JavaScript.RequestRegistration(CommonJs.DnnPlugins);
JavaScript.RequestRegistration(CommonJs.jQueryMigrate);
BindData();
}
catch (Exception exc)
{
Exceptions.ProcessModuleLoadExce... | 0 |
5e92a53f50e9dc260f12e7124f64397a | c6fca9dfbc2b0f01b89d51510d90738f | [Internal]
Takes a given list of 2-tuples(object, probability) and extracts a
sample population of objects from the list according to the
probabilities of the represented objects and the given sample size. | def draw_random_sample(elements, probabilities, n):
return np.random.choice(a=elements, size=n, replace=True, p=probabilities).tolist() | 1 |
47e0792d3c7c70a3cd514516258ca5e5 | 5684b5dad5793ac073e9a171cb2d4bfa | Loads the language selection from the GET parameter or the language header and saves it to the cookie.
If the GET parameter doesn't exist and there is no currently saved language code, language sent from the browser
in the http-accept-language is saved.
If none of the above is specified, the default language is saved. | function validateLanguage(req) {
var lang = req.params.lang;
if (lang == undefined) {
var cookie = req.headers.cookie;
if (cookie != undefined) {
var cookies = cookie.split(';');
for (var i = 0; i < cookies.length; ++i) {
var crumbs = cookies[i].trim().spl... | 0 |
790568e440ef9100ece279838ad1cfbc | d80e2d487349aa6feb4368ea2014eafd | Create (onboard) aws cloud account
:link https://api-v2-docs.dome9.com/#cloudaccounts_post | class GoogleCloudAccount(Dome9Resource):
def create(self, body: GoogleCloudAccountPost) -> Dict:
return self._post(route=GoogleCloudAccountConsts.GOOGLE_CLOUD_ACCOUNT.value, body=body) | 0 |
9a8c4e1cfd874baa394a8271dd3feffb | a76c00d1ffc1a72e38e36aef620ea50c | Grants no reward since the player skipped the Ad or it failed to load. | public class TV : MonoBehaviour
public void NoRewardForAd(){
mainMenu.CloseWatchAdWindow();
CloseRewardWindows();
noRewardWindow.SetActive(true);
} | 1 |
520d85a6847d03c54dc21baeebaf3c79 | 9e9cfbc5e09d9a9d7132573d0856f52f | Clear the API payload | protected function clearPayload()
{
$this->payload = [];
return $this;
} | 1 |
3bd206498d064ba141d68a6915f15994 | 6549a37bb993452862556380c79bf2a6 | 次のスレッドがあるかどうかを返す | bool nexthas = false;
if(processIndex + 1 < list_Item.Count) {
Item nextItme = list_Item[processIndex + 1];
if(nextItme != null && nextItme.period == Period.DieSkill){
if(nextItme.VsMiddle == 0) {
nexthas = true;
}
}
}
return nexthas;
} | 0 |
2d302121405c614a63858e08e2ddf7f6 | 13e66d27e95d1f2cbbe24f759a0955f5 | 获取网管服务器下挂载的设备IP | data = get_network_server_hostid(request, groupids=16)
client = get_client_by_request(request)
sum = len(data)
itemid = []
for j in range(sum):
kwargs = {
"jsonrpc": "2.0",
"id": 2,
"auth": "68a7a33cf513f1a77a3d0f87b76ac8a8",
"method": "item.ge... | 0 |
4dc209c2d58f75d200a8ff907484d1bc | de6ec4603c46e01812de919db8219108 | Creates a Transportation Network object | class NCM:
def __init__(self): | 0 |
3655b143f2c5f7acb898e273b9dca4f8 | 3bb3285e4abdca190ccf8a986762db0c | SBCI – Subtract Immediate with Carry | fn SBC(cpu: &mut Cpu, bus: &Bus, instruction: &Instruction, addressing_result: &AddressingResult) -> i8 {
let fetched = addressing_result.fetch(cpu, bus) as u16 ^ 0x00FFu16;
let borrow_in = cpu.flags.C() as u16;
let temp = (cpu.a as u16) + (fetched) + borrow_in;
cpu.flags.set_C((temp > 255) as u8);
... | 0 |
04893bffd00dad5523245397f18b01fa | e1d256741cc1b34d51e50b28a90a4dcb | Return a matrix type whose element type is the given element
type.
type that has a corresponding matrix type. | public MatrixType getT( MatrixType T ); | 0 |
ce116563e702e6e6ba78bfdbd19f542c | cef952e2de3b1a164873a0171996c2e8 | Decorate a function to be run only when a lock is acquired.
The lock is requested if the guard function returns True.
The decorated function is called if the lock has been granted. | def new_function(self, *args, **kwargs):
self._lock.acquire()
try:
return func(self, *args, **kwargs)
finally:
self._lock.release()
return new_function | 0 |
6e3d2973194e44b19fa4ad5b99f3dc47 | c9998aebad0b977d709d3873a253187d | Returns the actual cumulative reward. | class PseudoArm(Arm):
def total_rewards(self) -> float:
return self.__total_rewards | 1 |
18062a9cadee431da4b3eced44d66ebb | 0b7630e2687fbbdffe8def3222982c12 | 按条件分页查询(推荐的商品)信息 | Pagenation<GoodsDO> queryGoodsDOListExceptRecommendForPage(GoodsDO query, Pagenation<GoodsDO> page); | 0 |
d16f176805bd0f487b551fcebbcb4873 | 004cefed36a668b223a667438b1b203d | Get a Carrington Framework option, load the default otherwise | function wpsw_get_option($key, $default = null)
{
$value = null;
if (function_exists('get_field')) {
$value = get_field(str_replace('.', '_', $key), 'option');
}
if (!$value) {
return wpsw_get_config($key, $default);
}
return $value;
} | 1 |
693d8146df4ef3e3e02056dcc61c6296 | 35397621bc9734e39e319ca8d14e6cfd | set this layout as the default parent | {
base.SetDefaultValues();
ContentMargin.DirectValue = new ElementMargin();
ResizeToContent.DirectValue = true;
PropagateChildLayoutChanges.DirectValue = true;
} | 0 |
c746ecca1da148ba9890b529b2695908 | 83cc9e355613097c634cf9d4c58586ab | Asserts no event from queue in a short period. | namespace Akka.TestKit
public abstract partial class TestKitBase
public void ExpectNoMsg(TimeSpan duration)
{
InternalExpectNoMsg(Dilated(duration));
} | 1 |
c7d492e3a09844cc9af7d81bfcb49329 | 9a5c1fc69fe5f2ee472a96be9ffe5020 | Converts the diffusion coefficient to hydrodynamic diameter | {
if (vl_dependent == true) {
return sqrt((molecule_diss - molecule_vibr) / (KLIB_CONST_K * T));
}
else {
return sqrt(molecule_diss / (KLIB_CONST_K * T));
}
} | 0 |
eca159415a7edad70e36ff817cf6e7ca | c7ce1fac5a9f9bec151f2250c8794b7f | SGD with nesterov momentum
Based on example from Yann D. | super().__init__(params)
self.lr = lr
self.momentum = momentum
self.nesterov = nesterov
self.vs = {} | 1 |
3684c6a5dc7ecf876ef40fa9953f325d | a25957a21f2e3ff9d2887b1b57c2546d | See ReplayBuffer.store_effect | self.action[self.idx] = action
self.reward[self.idx] = reward
self.done[self.idx] = done
self.idx = (self.idx + 1) % self.buffer_size
self.num_in_buffer = min(self.buffer_size, self.num_in_buffer + 1) | 1 |
9e7d0afa8d716f882f28f875c32698b0 | 7360953a9a54a1eaa0d2a29bcd2ec6b9 | Create a new BitPay invoice | {
try
{
$invoice = $payNow
? Stripe_Invoice::create(['customer' => $customer, 'metadata' => $metadata])->pay()
: Stripe_Invoice::create(['customer' => $customer, 'metadata' => $metadata]);
return new StripeInvoice($invoice);
}
catch(Stripe_InvalidRequestError $e)
{
throw new InputExcepti... | 0 |
995c6d375df61ca87872359007584463 | 9f968d47848996f58dc08040f519d3f5 | 返回本次连接已经执行的SQL数。 | public class JdbcExecutor
public int getPending() {
return simpleJdbc.getPending();
} | 0 |
b94599b8dddaa21a21c8e6e421f3486f | 875c87f2f58f5cade7dcd4fc19608efa | 获取随机端口(1024~65535) | namespace aaaSoft.Helpers
public static class NetHelper
public static int GetRandomPort()
{
Random rnd = new Random();
return rnd.Next(1024, 65535);
} | 1 |
2ba3e5729c3dbd589e4139b04cfda0ac | 53c34882bf17617480f68a455d0ce7fa | Получение валюты по буквенному коду | class CurrencyManager
public function getByCode($code)
{
return $this->currencyRepository->findOneBy(['code'=>$code]);
} | 1 |
3b01a424392b05788b6ba3468db69996 | aa61939811944a415a76202681f2e0df | write received data into received data richbox. needs invoke because the value is
being changed from another thread. | System.out.println("rwCallBack");
if (rwData != null && onRwListener != null)
onRwListener.getRwData(rwData);
} | 0 |
96d03eb8d4464298b862810f5b2b92d4 | fae8897f46244f4458c697fbf2b35cac | 删除key,支持数组批量删除【返回删除个数】 | namespace Bing.Caching.Redis
public class RedisClient:IRedisClient
public long KeyDelete(RedisKey[] keys, CommandFlags commandFlags = CommandFlags.None)
{
return
_database.KeyDelete(ConvertRedisKeys(keys.Select(key => AddSysCustomKey(key)).ToList()), commandFlags);
} | 1 |
609543d2dae5c9aecf38c1d45003cac1 | c06b4b7d2ed6204f6927c774242aafa3 | 根据username获取病人 | public Doctor getDoctorByUsername(String username); | 0 |
bc8467b1f5c93af2f60c40603fd6eafb | 30f1e3f062129a67799ae1f0a805d32a | Query an external service for the current value of dollar from one currency in another. | public function fetchAsk($currency1, $currency2, Logger $logger); | 1 |
51f5fd2ad96c7c554dfbd4394e7ce1a1 | 5bb8647eeebc317733f983f07e7a2267 | checks wheter the current movements are solving all limit exceedings, if any | {
for (int i = 0; i < 7; i++)
{
if (udalen[i] == true)
{
return false;
}
}
return false;
} | 0 |
4e5157b481c9ea72e8ef3066023858fa | 6a5782befcae060d91705a45db2770ea | Returns the meta object for class '{@link hu.bme.mit.vmdistribution.model.VagrantVM <em>Vagrant VM</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getVirtualMachineManager(); | 0 |
ab97f5744a284e9cd9bf9ce01fad9118 | 5c97020ac53f808638c230941c98f3c8 | переподключается к БД, если соединение активно, закрывет его и соединяется вновь | class SQLServerCore(context: Context)
fun reconnect()
{
if (connection == null)
connect(null)
} | 0 |
f1ffd8193cae90f7919dfb90f9eeb6bc | 6209d0b074410119dc91f818b0a6be1f | @brief CAN3 ESR_ERR_INT interrupt handler. | static void can_lld_err_handler(CANDriver *canp) {
uint32_t esr = canp->flexcan->ESR.R;
uint8_t rx_err_counter = (uint8_t)canp->flexcan->ECR.B.RXECNT;
uint8_t tx_err_counter = (uint8_t)canp->flexcan->ECR.B.TXECNT;
if (canp->config->flexcan_err_callback != NULL){
canp->config->flexcan_err_callback(canp,esr,rx... | 1 |
a8ccc428afdb784e96a703e2fa278e8c | 12b7d14d48890673cb0a2302558c8388 | 将所有文章中的词汇取并集汇总 | def create_vocablist(data_set):
vocab_set = set()
for document in data_set:
vocab_set = vocab_set | set(document)
return list(vocab_set) | 1 |
2b9703301d6afd27fdfae02e91e832a1 | f83c804ee1c376c16982c6e286baae2b | Добавить дефайны таблиц и полей таблиц | class Blueprint
public function add()
{
$sql = 'ALTER TABLE '.$this->table." ADD ";
foreach ($this->fields as $n) {
if ( ! Schema::fieldExists($n['field'], $this->noPreTable)) {
if ( ! empty($n['unsigned'])) {
$n['sql'] .= " unsigned ";
... | 1 |
0d19bbd8a8d9fd5abca9e2e885518ebe | 67fb730919475c7f73121efcb38590d1 | A helper function that returns sum of squared interplated values. | interpolated_values = tff.math.interpolation.linear.interpolate(
x, x_data, y_data,
optimize_for_tpu=optimize_for_tpu,
dtype=tf.float64)
return tf.reduce_sum(tf.math.square(interpolated_values)) | 1 |
3738210b02af8e377c39e19a010d051c | 83414e2ee4be9ed93edd50e94a6099c9 | 获取裁剪区域请求参数 | int clipWidth = takePhotoValue.width;
int clipHeight = takePhotoValue.height;
if (clipWidth == 0 || clipHeight == 0) {
return;
}
intent.putExtra("aspectX", clipWidth);
intent.putExtra("aspectY", clipHeight);
intent.putExtra("outputX", clipWidth);
... | 1 |
c2ec4ad1bd85df7a7c3d205d562873c0 | 146d86e8a9ee7a7e6535f5bee6734245 | Builds a dictionary of the form {sn_name: gas rich (0/1)} | class MesonNames(object):
def __init__(self):
self.build_state_table() | 0 |
5f27436c79d2dda2e005392e351bc721 | 9e6052c5191aab2c3bb4a58504e453ba | Поиск книги по названию | class Book extends ModelDB
static public function findByName($name)
{
$query = "SELECT * FROM " . self::$tablename . " WHERE name=:name;";
$conn = Connection::getConnection()->getPDO();
$conn = $conn->prepare($query);
if (!$conn->execute([':name' => $name])) {
throw new R... | 1 |
5ebd52299cc1d545c30b2fb941b3ab3f | 1f4f022a3e178a3d84ef284f6d97a1bb | @brief Set pixel color from 'packed' 32-bit RGB color | void PixelBone_Pixel::setPixelColor(uint32_t n, uint32_t c) {
if (n < num_pixels) {
uint8_t r = (uint8_t)(c >> 16);
uint8_t g = (uint8_t)(c >> 8);
uint8_t b = (uint8_t)c;
setPixelColor(n, r, g, b);
}
} | 1 |
87f70a768548f6db8df82d974e5b80e7 | 0b66a8dfc5aa626fdcef1b21b509ed93 | format a message for sending in a mail | p = os.popen("%s -t" % SENDMAIL, "w")
p.write("To: vk@mail.lns.cornell.edu\n")
p.write("From: DBS Data Discovery <cmsdbs@mail.cern.ch>\n")
p.write("Subject: DBS DD error\n")
p.write("\n")
p.write("\n"+msg+"\n\n\n")
sts = p.close()
if sts != 0:
print "mail exit status", sts | 1 |
0745fdd2122952a631718524dbc2e4f4 | 9482b81954a51f77de5be032d13a0f05 | Split 'path' into all its components. | std::string s;
std::vector<std::string> splits;
s = "";
for (size_t i = 0; i < path.length(); i++) {
if (s != "" && path[i] == '/') {
splits.push_back(s);
s = "";
} else if (path[i] != '/') {
s += path[i];
}
}
splits.push_back(s);
return splits;
} | 1 |
8c2153983a2b760f2ed80b2c9325dbd8 | 663cb81e0f1f2eddf1d7ab3279b90bcc | Print dump information (dfi operation) | PrintInfo (const DataFile *df, const DumpOptions *opts)
{
FieldId fields [DC_MaxField];
int nfield = DC_MaxField;
char abegin[64], aend[64];
const Platform *p = dt_FindPlatform (df->df_pid);
if (opts->files & LONGFILES)
{
char dir[CFG_FILEPATH_LEN];
int dirlen = strlen (df->df_fullname) -
... | 1 |
5e6bf06388698c6054747e4cb7b2fc83 | 4af210b5f968f8be0cbdf636f6404565 | CornDodgers should Implement the INotifyPropertyChanged | public void CowpokeChiliShouldImplementINotifyPropertyChanged()
{
var obj = new CowpokeChili();
Assert.IsAssignableFrom<INotifyPropertyChanged>(obj);
} | 0 |
9eafa1294d23e3d46eb75c65b46d34ce | 3cae4fe95dfe26602a9d60ae8ef272ef | Get symbol name by its ID. | class ezIBpy():
# -----------------------------------------
def tickerSymbol(self, tickerId):
try:
return self.tickerIds[tickerId]
except:
return "" | 1 |
fe092482377443013c743136b8385adf | ec51c0eef35307f4a4e58dbf9a752eb1 | 라이트박스를 보이지 않게 합니다.. | GetComponent<Image>().enabled = false;
gameObject.layer = LayerMask.NameToLayer("Ignore Raycast");
Text txt = GetComponentInChildren<Text>();
if (txt != null) { txt.enabled = false; }
} | 1 |
d17e20514a845c079b81b04701a396c4 | 213931401a2f149a1ef7e758bf0912c2 | Logs the result of a routing table change | cerrno
xos_rtg_shim_provide_rtable_upd_result (xos_async_op_handle async_op,
cerrno status)
{
xos_rtg_rlist_ctx_t* rlist;
xos_async_impl_lock_op(async_op);
rlist = async_op->rlist_handle;
XOS_RTG_CHECK_MAGIC(rlist->magic, RLIST);
if (!rlist->xos_impl){
... | 0 |
93422032234940e1c1345d463e63e053 | 4468a1c9d8866b61e9fe9f5cd58d1820 | データセットに一覧で表示するメイン画像を設定する。
PUT /api/datasets/${dataset_id}/image/primary を呼ぶ。 | logger.debug(LOG_MARKER, "AsyncDsmoqClient#setFeaturedImageToDataset start : [datasetId] = {}, [imageId] = {}",
datasetId, imageId);
requireNotNull(datasetId, "at datasetId in AsyncDsmoqClient#setFeaturedImageToDataset");
requireNotNull(imageId, "at imageId in AsyncDsmoqClient#se... | 1 |
c62f115589c8b34e8b0725e080f42c6f | 56cdece28cba151d86173cb63fff62e2 | 금액 내에서 최대로 구입 가능한 수량을 입력해줍니다. | public class Exchange
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("얼마?");
int rem = sc.nextInt();
excg(rem);
sc.close();
} | 0 |
0c2f71acc4bfefdc543399c345836f1c | deeec893b725218b9952b54d074abeff | Returns the value of the '<em><b>Trait Epais</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Trait Epais</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc -->
extendedMetaData="kind='element' name='TraitEpais'" | public abstract class Eis
public String getBehaeltnis() {
return behaeltnis;
} | 0 |
734464cf3fb46a398e0a4976b031a14e | 1ba9813e21c4e9ba6ae47d1dd05f4e94 | Immediately disables session, event, exceptions & user details tracking and clears any stored sessions, events, exceptions & user details data.
This API is useful if your app has a tracking opt-out switch, and you want to immediately
disable tracking when a user opts out. Call StartSession to enable logging again | namespace Topifish.Analytics
void StopSession(); | 1 |
893d3382ef7e9442f3c7536f6cb53052 | 3bdb5c77d0b7a02effe57107cbf5fd4b | Verifie si le joueurs est dans un vehicule ou pas | namespace GTAVRewardHook
class Utils
public static void IsPedInAnyVehicle()
{
Detail.is_ped_in_any_vehicle = Function.Call<bool>(Hash.IS_PED_IN_ANY_VEHICLE, Detail.player.Character);
} | 1 |
f74d01368340a7001db535cb141cffb2 | fd07c3d286637c22adbc9f03b9815464 | Load a partition of addresses, numbers, roads, etc. | filenames = choiceSimple("../data/16ROI/")
parcels = []
for filename in filenames:
parcels.append(np.loadtxt(filename))
return [x.astype(int) for x in parcels] | 0 |
429251673840b9ad430700a36e3ade1a | 450f9d9fbecf6506096068c387844324 | 该对象是否能够被静态化处理
对于交互组件,如按钮,输入文字等,返回false
此属性用于确认在自动进行静态化处理是是否将本目标纳入静态化 | public abstract class AbstractLazyCreationTargetSource implements TargetSource
@Override
public boolean isStatic() {
return false;
} | 1 |
b3ed2e8df0d637851596b5238704323b | a382788d237a400345801207bb213bff | googleへリダイレクト | @Controller
public class UserController
@GetMapping("/user/googleGo.do")
public String googleGo() {
return "/user/google";
} | 0 |
28bb6e4b2a4ba402871eef840bae1a43 | cbd0d1278f7cfe248e419616262794ee | Returns HTML code with link to attachment. | class Communication(Document):
def get_attach_link(self, print_format):
return frappe.get_template("templates/emails/print_link.html").render({
"url": get_url(),
"doctype": self.reference_doctype,
"name": self.reference_name,
"print_format": print_format,
"key": self.get_parent_doc().get_signature()
... | 1 |
9b3b2a5379107b8e7a7fade95450447a | 0a3a0533bf7e83f92db7ef87f6ea65a9 | @brief 索引元素节点的子元素节点 | class SessionElement(DrissionElement):
def child(self, filter_loc='', index=1, timeout=None, ele_only=True):
return super().child(index, filter_loc, timeout, ele_only=ele_only) | 1 |
626746d128848a329b005cfb9f3f4d46 | ac062db85dcaba95cefefc7dbfb9001d | Return time range covering n months starting from year, month
month 1..12
month can also be negative
2020, -1 === 2019, 12 | return {
start_date: Date.new(date.year, date.month),
end_date: Date.new(date.year, date.month, -1),
}
end | 0 |
59ae18551db66045627bd9f378377acd | 90d5fbd9d91302e164b287ff9ca7926d | Set the IPvX Table-id for the Interface | public class RouterPort extends Port<RouterPort, DtoRouterPort>
public RouterPort vifId(UUID vifId) {
principalDto.setVifId(vifId);
return this;
} | 0 |
0792c437287a5fe66c992116c1be52c6 | 53cc770d740a653e0a31bb31f99c819f | Returns a 4-byte wide, unsigned random number | {
int ret = 0;
for (int i = 0; i < 4; i++) {
ret = ret << 8 | gen.Next();
}
return ret;
} | 1 |
c1e38f3df40ed9ca1f3602314b6408e5 | 017675a10d880c6f29934181dd60f465 | Scrolls to the top of the Scrollable Area | interface CPMTSDriver
fun scrollToTop() | 1 |
09347f3378986c4ee06e32c80793afbe | d33e68d9eed2342b9aadd8ea28db8b78 | Gets the value of the clips property.
<p>
This accessor method returns a reference to the live list,
not a snapshot. Therefore any modification you make to the
returned list will be present inside the JAXB object.
This is why there is not a <CODE>set</CODE> method for the clips property.
<p>
For example, to add a new i... | @ProviderType
public class ClipUtil
public static List<Clip> findAll() {
return getPersistence().findAll();
} | 0 |
42bd3d647b3a1d310db863215157836d | 10c4874e59962cd20dcc3bb8eeaf728b | The longitude of the pericenter in degrees. | class TLEDictReader(Reader):
def longitude_of_ascending_node(self):
return float(self.line2[17:25]) * self._rad_deg | 0 |
7dbacd985fd4f67d85745eadfca11b52 | ffddd266b668e26bab9aa39b8410e413 | This test sets out to prove that the scale you use on real valued
predicates doesn't matter when it comes the probability assigned to each
outcome. Strangely, if we use (1,2) and (10,20) there's no difference. If
we use (0.1,0.2) and (10,20) there is a difference. | double p_1 = model.predict(new Bits().one());
double p_0 = model.predict(new Bits().zero());
System.out.println("p_1: " + p_1 + " p_0: " + p_0);
assertTrue(Math.abs(1.0 - (p_1 + p_0)) < eps);
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.