query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
a7d4ad54d101fd6cb6e985e62c253ddf | 00685503c3c83218e4f328c9b10beadf | Convert an internal component event to a papi event code | rr_event_T rr_event
)
{
switch (rr_event)
{
case EV_RESET_SOFTWARE: return SIEV_RESET_SOFTWARE;
case EV_INPUT_MESSAGE: return SIEV_INPUT_MESSAGE;
case EV_GPRS_SUSPENDED_FOR_SI_ACQUISITION: return SIEV_GPRS_SUSPENDED;
case RR_EV_CAMPED_ON_... | 1 |
ab8a21393a3fa096afa1457053271bc9 | d6ec6712cb281b2a0a8258dfae705401 | turn on/off manage phone numbers | val switch: Switch = findViewById<Switch>(R.id.phoneNumberSwitch) as Switch
if (switch.isChecked() == true ) {
findViewById<EditText>(R.id.phoneNumberEditText).isVisible = true
} else if (switch.isChecked() == false ) {
findViewById<EditText>(R.id.phoneNumberEditText).isV... | 1 |
28320531502ec11a7bc3949857aae516 | c0f3957b751e70f9d5824f4b89ca29b1 | Ability to follow other users (only if authenticated). | class FollowsController extends Controller
public function __construct()
{
$this->middleware('auth');
} | 1 |
84b35c6acbf73d27d0a30c09e52ae59a | 2591ce599c709164b5b998b4dc514820 | Creates the workspace and initialises member variables with
the corresponding values | cclick_n_point_workspace::cclick_n_point_workspace(QString project_Folder)
{
this->project_folder = project_Folder;
this->changed = false;
this->setup_gui();
} | 1 |
fae0576f613f24e46d67534810d3556b | 6712100bba6d7e86b7c9d183d9aa2378 | ! \brief Dodaje element na koncu stosu | {
if ( IsFullStack ( Stack ) == -1 )
return -1;
( Stack->Head )++;
if ( IsStackValid ( Stack ) == -1 )
return -1;
Stack->Data[Stack->Head] = Data;
errno = 0;
return 0;
} | 1 |
3fb9974d4803f01d962402a9d963b935 | e223f905e7780ca8fda14b7cd69d4cb5 | 创建文章和专题表的关联模型 | class articleModel extends IModel
public function add($data){
$termId = $data['term_id'];
unset($data['term_id']);
$objectId = $this->insert($data);
if($objectId!==false){
if($this->insert('blog_term_relationships',array('object_id'=>$object... | 1 |
37a00c96b39b2b343af83dd1710c2de0 | fc67a4d38a5085e343219738eb53d655 | Vrací označení ticketu z GET promenne nebo NULL. | {
if ($this->aTickets === null && (($this->ticket !== "" && $this->ticket !== null)) && $doQuery) {
$this->aTickets = TicketsQuery::create()->findPk($this->ticket, $con);
}
return $this->aTickets;
} | 0 |
e4761112ff0c0dcbc5343a0fa24014da | c7ecac867380b7211ccc957f8493e217 | Process player's movement only when the player is alive | public class PlayerController : MonoBehaviour
void Update()
{
if (!alive)
{
if (!deathAnimPlayed)
{
anim.SetTrigger("Die");
StartCoroutine("Die");
}
return;
}
if (horz != 0)
{
moveRigh... | 1 |
456f3486dfb0b722a43b2eb20667b233 | 0e991d9758987e36f69ceb4b95a9c3c6 | 获取当前界面的tab类型 | class HomeFragment : MVPBaseFragment<MainContract.View,
MainContract.Presenter<MainContract.View>>(),
MainContract.View
override fun getCurrentTab(): IMainTab {
return MainTabEnum.positionOf(0)
} | 1 |
d39238a82f766d25958f740e03b12371 | 5ebb7d717967bd7c7f0036ba9abac3be | Get <message_text> value | class ContactRequest extends \DrSlump\Protobuf\Message
public function getMessageText(){
return $this->_get(2);
} | 1 |
2e793d0a8ef70a9c04b6cfd04aa1559c | 191938794bb6121c5581ef1dbf022bde | querys all triple from the defined graph and makes an transformation to the specified output format | GraphDao dao = new GraphDao();
StatementResult risultatoResult = dao.interroga(queryRiscritta.toString());
JsonArray risultati = Convertitore.convertCypherToJSON(risultatoResult);
dao.chiudiConnessione();
return risultati;
} | 1 |
5448bec3eb6bc8a9eef8b5d454477902 | a5ad71e5e206fa344a3a79e01b0d8773 | generates random numbers from minValue inclusive, to maxValue exclusive | namespace Dice
class Program
static int GetRandomNum(int minValue, int maxValue)
{
System.Security.Cryptography.RNGCryptoServiceProvider rnd = new System.Security.Cryptography.RNGCryptoServiceProvider();
byte[] randombyte = new byte[1];
rnd.GetBytes(randombyte);
... | 0 |
0c6312385eab07e7a2a68d40a2154732 | 77d6b9448e6cbaf7c033c5225ca563d6 | 获取过滤后的 POST 参数 | {
$keys = array_keys($_POST);
$post = array_map(
function ($key) {
return filter_input(INPUT_POST, $key);
},
$keys
);
return array_combine($keys, $post);
} | 1 |
dcdd51c4c5747402e85069631092eaf3 | 5c3bfa4990621a7c61460d51c85dc647 | Synchronized column width between all listviews | namespace Transport_Stream_Analyser
public partial class AnalyserMain : Form
private void SetColumnWidths( ListView list )
{
list.Columns.Add( "-" );
foreach (ColumnHeader column in list.Columns)
{
column.AutoResize( ColumnHeaderAutoResizeStyle.ColumnConte... | 0 |
c0647be505c88ab4ef8677aed589c974 | dc1b99650b0e37c4510023ecb7545a22 | Parse through the file with ElementTree and
count the number of top level element types to
understand overall structure.
Returns dictionary of (key)top level elements and (value) their count. | stats = {
'element_types': {},
'attributes': {},
'tag_keys': {},
}
for event, element in ET.iterparse(osm_file, events=("start",)):
if element.tag not in stats['element_types']:
stats['element_types'][element.tag] = 0
stats['element_types'][element.tag] +=... | 1 |
0efe7b70087cfbe22ed92c6ceba45329 | 20ff86a89d1265189baae9409bdc9463 | Callback called when there is some Python output on stderr. | class Runner(object):
def handle_stderr(self, buffer_, hide, output):
self._handle_output(
buffer_, hide, output, reader=self.read_proc_stderr
) | 1 |
473076d128c9eeb1f1019d923ebaa61b | 620ce48dc8954716d6b9adde50295646 | Realiza una búsqueda de los lugares de una comparecencia. | @Repository
public class CompetitionCustomRepository
public List<Competition> findByPeriodAndPlaceIdAndSportId(final LocalDateTime beginDate, final LocalDateTime endDate, final Long placeId, final Long sportId) {
final StringBuilder queryBuilder = new StringBuilder();
queryBuilder.append(" SELECT C.* FR... | 0 |
eaae62a4782345d1e59f0107809b55d8 | 972f827ac42423c0c8a5be346086d1de | Print sorted array on stdout | {
int i = 0;
int *sorted = srt(numbers, count, cmp);
if (!sorted)
die("Failed to sort as requested.");
for (i = 0; i < count; i++) {
printf("%d ", sorted[i]);
}
printf("\n");
free(sorted);
#if HACK_FP
unsigned char *data = (unsigned char *) cmp;
for (i = 0; i < 25; i+... | 1 |
a0bff8e56cae3ef1db4a77fad85652e6 | 0ba75e321a844a273de00f67e82cfb69 | This function is used to set an output location for text stats. If
specified, when stats are dumped they will be output to this location
as a text file file, in addition to any other stats' output locations
specified. | PyObject* setOutputFile(PyObject *self, PyObject *args) {
PyFileObject *pFile = NULL;
if (!PyArg_ParseTuple(args, "O!:setOutputFile", &PyFile_Type, &pFile)) {
return NULL;
}
if (g_Params.pOutputFileObj != NULL) {
PyFile_DecUseCount(g_Params.pOutputFileObj);
}
g_Params.pOutputFileObj = pFile;
g_Par... | 1 |
feb61b423c2bad79d96f5a5d42dfd3a1 | 157a23cbf8e6ccac46edb26aa5c34c67 | 检测链表中是否有环,使用字典 | {
bool isCycle = false;
List<int> keyList = new List<int>();
ListNode current = head;
while (current != null)
{
if (keyList.Contains(current.GetHashCode()))
{
isCycle = true;
break... | 0 |
ff1b55232f568eb45c0b541030e0705d | 2c4b0fc8b3a9988e287b42c62e5f50bb | nas ip address is added into peer address allow list. | class SelfIPPortLockdown
def add_allow_access_list
super
end | 0 |
3001777f9214c2b1afcbe0a41882935f | a0d1bfc44daaa61833959b83bed0348c | Restituisce la dynamic entity per il VHL in base al workflow e ai controlli fatti
su initiative source report detail | public class ReviewWorkflowFilVORowImpl extends OAViewRowImpl
public ReviewWorkflowEOImpl getReviewWorkflowEO() {
return (ReviewWorkflowEOImpl)getEntity(0);
} | 0 |
24b13765f39d5402b40eca28a8deb7c3 | 4954616bef4fbf8b5acd485891e6c694 | 根据教师课程ID设置班级教师表中的人数 | public abstract class BasicActivityManage
public abstract void updateTeachersForTeachClass(String[] newSlectedIdSet,
String[] oldSelectedSet, String teachclass_id)
throws PlatformException; | 0 |
7cf2c6b98bfd8a06d6e2ad377a075f39 | 63126e13dab2e7e527a4d61dbb64b9b2 | asks serialize controller to get all star maps in db.
it returns only their name. | class Checkin extends CI_Controller
public function index()
{
$slist=$this->Star_list->get_all();
$slist = json_encode($slist);
echo($slist);
} | 0 |
ed2dffab58dea1fe481e007a40a30359 | 4fe88306620df74504707744f7cc7a14 | Get the URL of template being parsed. | public class ParsedValidatorRules
public String getTemplateSpecUrl() {
return this.ampValidatorManager.getRules().getTemplateSpecUrl();
} | 1 |
16f51bddd06f78ab28ce7625eedf035b | 2f5f45dbf223d7ef28ab70a1328b27a2 | Update state depending on outcome. | export class HumanSnakePlayer extends RealTimePlayer
handleOutcome(moderator, outcome) {
if(outcome.action.engineStep) {
for (let i = 0; i < outcome.stateDelta.length; i++) {
this.drawTile(outcome.stateDelta[i], outcome.state);
}
this.scoreDisplay.innerText = ... | 1 |
15de4eb4f7254041a0c76832761cc448 | 7f8ec6d6df5cdca0d2ea979da3eac4cf | <p>
Gets information about whether additional CloudWatch metrics are enabled for the specified CloudFront
distribution.
</p>
target="_top">AWS API Documentation</a> | class ObjectLambdaAccessPointConfiguration(dict):
def cloud_watch_metrics_enabled(self) -> Optional[bool]:
return pulumi.get(self, "cloud_watch_metrics_enabled") | 1 |
3f670d7f1ee247e50f4126b8f6bbbc02 | f19e1ac1cef8d851eb1364f8b96eac28 | Тест метода получения экземпляра музыкального релиза по заданному идентификатору.
Музыкальный релиз с передаваемым идентификатором не существует | @ExtendWith(SpringExtension.class)
@SpringBootTest
@Transactional
public class TourRatingServiceIntegrationTest
@Test
public void deleteException() {
Assertions.assertThrows(NoSuchElementException.class, () -> service.delete(NOT_A_TOUR_ID, CUSTOMER_ID));
} | 0 |
1333b52691f5e8dc863607c681c6d2f6 | 515c00ddec5563436bf44d4753c2cd96 | is packet a request? | public class CrashPacket implements Serializable
public boolean isARequest() {
if (action.equalsIgnoreCase(CrashPacket.REQUEST)) {
return true;
} else {
return false;
}
} | 1 |
a0e7f8475052ca4d48eca5d33e2a17df | 691e247dac074d1995563bf4e21cc2ef | you can nest complex nodes (that are like graphs themselves) within
other nodes/graphs | def nestedmaps():
return {'body': {'declare_i': {'id': {'name': 'i', 'type': 'Identifier'},
'init': {'type': 'Literal', 'value': 2},
'type': 'VariableDeclarator'},
'kind': 'var',
... | 1 |
711555de9ee147859cb63f60c185caaf | 9fff85b2c511094c925a4ca6f514a7bd | Lặp lại bước nhập <USERNAME> và <PASSWORD> đến khi nào đăng nhập thành công hoặc ấn phím [ESC] | def loop():
global password
if not load_conf():
setdefaulttimeout(2)
logout()
setdefaulttimeout(3)
while not getAccount():
password = None
print ("%s try login fialed!\n%s" % (account, error()))
else:
print ("Login SUCCESS!")
setdefaulttimeout(TIMEOUT)
... | 0 |
1ea5840cb9dec1ab110d92d1bc9bffce | 85918ac13a216c875b76da388bd38046 | Delete a ParticleEventHandlerFactory given a certain type. | namespace Microsoft.Build.BackEnd
internal class NodePacketFactory : INodePacketFactory
public void UnregisterPacketHandler(NodePacketType packetType)
{
_packetFactories.Remove(packetType);
} | 0 |
5f110d94cc06100671f6d6c46aee4b05 | 6ba6ec804d7ea3c089b3eb23b34b61f4 | @brief 获取图层编号 | class World_Map extends World_Base
function getLayerCode()
{
if ($this->_layerCode === null) {
$this->loadMapCode();
}
return $this->_layerCode;
} | 1 |
f4a28b64d6b44ab328c4945d6a3aed50 | c514b0db1d9d91bb02d142383e64d316 | <p>smlAble を取得します。 | public class ShopDetailInfoSearchOutServiceBean
public String getAblFlg() {
return this.ablFlg;
} | 0 |
0e5fa49c8c73ccb6dc2f57d9f4518359 | 8f62425b99fc9e42092c8dadbd633ff1 | return the full path to a build file. The dependencies
themselves are relative to the root in which stitch
was started. This returns the path attached to the
buildroot, in an absolute, canonicalized form | public class Tablesaw
public String getBuildFile()
{
return (m_buildFile);
} | 0 |
6f51cf7f19415ae4e1728fcd94e82cde | 74db7040ca0d428be7f9a2529f75983e | Getter for <code>storeal.stl_footercustom_blocktitles.id_lang</code>. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.6.0"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class StlFootercustomReinsuranceRecord extends UpdatableRecordImpl<StlFootercustomReinsuranceRecord> implements Record6<Integer, UIntege... | 0 |
7830e38373169b3b07a910e86ff3f620 | 1ba89e5966163101764dd5636a9718a3 | 绑定持仓列表点击事件 | bindEvent() {
this.params.table_data._getTbody().on('click','a.title',$.proxy(this.viewClick, this));
} | 1 |
58c1d01458d434bb8184f61e48f4d88a | c7ecd50dd5da0b93e28f1ee25297d786 | Retrieve a reference schedules and various database entries and add a program to the schedules array | let activeDays = [];
let creationInfo;
let doesTrack;
let hideCompleted;
let scheduleType;
let startDate;
let {rows} = await runSQL(
userDB,
'SELECT * FROM tblSchedules WHERE ScheduleName=?;',
[scheduleName],
);
if (rows.length > 0) {
let scheduleInfo = rows.item(0);
for (let i = 0... | 0 |
45636d1e2fbf087bbd2bac267d46403d | c7c6905aa21038dbbc1a24a9e7431728 | 利用荷兰国旗问题优化的快排 | func netherlandsFlagSort(arr []int, l, r int) (int, int) {
if l == r {
return l, r
}
idx := l
less := l - 1
more := r
for {
if idx == more {
break
}
if arr[idx] == arr[r] {
idx++
} else if arr[idx] < arr[r] {
less++
swap(arr, idx, less)
idx++
} else {
more--
swap(arr, idx, more)
... | 1 |
a66529fe364be3abc2caa9a27c38d0ef | cf2f4b9e3859c57a9248c3c83fd18b36 | A classifier architecture for mnist data. | inputs = Input(shape=(28, 28, 1))
conv_1 = Conv2D(16, (3, 3), strides=(1,1), padding='SAME')(inputs)
act_1 = Activation('relu')(conv_1)
conv_2 = Conv2D(16, (3, 3), strides=(1,1), padding='SAME')(act_1)
act_2 = Activation('relu')(conv_2)
pooling_1 = MaxPooling2D(pool_size=(2, 2), strides=(2, 2), ... | 1 |
c3bf1028d999ab864cbe2b49324093b7 | 3e071a9c37759ce384cdd4a6a62afe71 | Getter sur la largeur des coffres de l'application | public class TailleComposants
public int getLargeurCoffre(){
return 180;
} | 1 |
552a85cc439875f997bba37ff63e07f3 | f092173c8dcdde0bd6b83688f51aa7ab | gets the start position for a named classification | if(nodeName === 'textEntry') {
return 300;
}
for(var category in categories) {
if(nodeName.indexOf(category, nodeName.length - category.length) !== -1) {
return categories[category];
}
}
return 0;
} | 0 |
994fd90d557a6cb49d9368f5ef99e785 | b349c90fa9b3c5641364432c8c7f5ed6 | 转换团购活动状态值 | result.format(Boolean.TRUE, "参团成功");
log.info("activityTo info = {}", activityTo.toString());
Integer activityType = activityTo.getActivityType();
if (!Objects.equals(activityType, 8)) {
result.format(Boolean.FALSE, "此活动不是拼团活动");
} else {
Integer activityS... | 0 |
cde688cfa399d59a9dbba534ef283852 | 96adbef09e4d4ef9a67dbcda0c3b844a | Convert rotation vector to quaternion. | class align(object):
def rot2quat(R):
[[Qxx, Qxy, Qxz],
[Qyx, Qyy, Qyz],
[Qzx, Qzy, Qzz]] = R
t = Qxx + Qyy + Qzz
if t >= 0:
r = math.sqrt(1+t)
s = 0.5/r
w = 0.5*r
x = (Qzy-Qyz)*s
y = (Qxz-Qzx)*s
z = (Qyx-Q... | 0 |
fa914160657401f7bd1a7896b7d50f71 | 02432011f8fbe4cc2b9e630d0ea299d9 | Render a grid of items. | abstract class ExporterView extends CGridView
public function renderItems()
{
$this->renderHeader();
$this->renderBody();
$this->renderFooter();
} | 1 |
b5c4c83c4c05380d115add72f95c6c78 | cd749ad6717a942c2588fd3a2a9b365d | Puts an UTF8 string into this byte vector. | Cursor addString(byte[] utf8); | 1 |
ff44f23b4708269fed6acbafa69e9fb6 | 7bc595824aae1c040a17525d54f24bda | Function where products are sent to ongoing | class productController extends Controller
public function productsContinue(Request $request)
{
return view('createProductContinue');
} | 0 |
2608e2fed129cea8cdadec2a62527bfa | 1d3c9d97347f5a9ae874a7e1e925a500 | 设置GridView滚动与否 | public class Lib_Widget_ViewPager extends ViewPager
public void _setScrollable(boolean isScrollable) {
this.isScrollable = isScrollable;
} | 0 |
c06db374a31014f36bfc9535205d7181 | 7b79653fbd78fb90f02b50f93e2ff077 | RESTful service to show all books | @GET
@Path("/books")
@Produces("application/json")
public StreamingOutput getAllBooksRest(); | 1 |
073b95f0c955505821a214ab5349a915 | 42db195c5b731daa893228b086cf251e | Enter a parse tree produced by {@link MiniJavaParser#expressionIdentifier}. | public class MiniJavaBaseListener implements MiniJavaListener
@Override public void enterExpressionIdent(@NotNull MiniJavaParser.ExpressionIdentContext ctx) { } | 1 |
2543c34bc4ae289f94db524cf9363388 | c654db54e5157029da5a74fc659f74bd | 取队列数目 | class RedisQueue
public function length($queue = 'default') {
$queue_name = self::getQueuename($queue);
if (isset(Yii::app()->params['config_redis_queue'][$queue_name])) {
$config = Yii::app()->params['config_redis_queue'][$queue_name];
$redis = self::getNode($queue_name, $config... | 1 |
84019288c9f2ac325d1814be458f63a0 | 2387867cc0eb6ed69345b5c65ac25c4e | Verifies that the argument is between low and high. | public class Util
public static boolean inRange(int val, int low, int high) {
return (val >= low && val <= high);
} | 1 |
0fa4e6ca7f3297a82a9ff03d1c388b91 | de232962a37e242f6bf442d6465f7f31 | Tests error handling for an undefined annotation property edge type (property graph) | @RunWith(SpringRunner.class)
@ContextConfiguration("classpath:test-context.xml")
@TestPropertySource("classpath:test.properties")
@SpringBootTest()
public class ErrorTest
@Test(expected = IllegalArgumentException.class)
public void testErroneousDataPropEdgeColor() throws IllegalArgumentException {
GraphRequestMod... | 0 |
946d1773dae3a17db8816fb1b3cb48bd | 2dfacfbbd5c85fbf607125064ff407ba | DESCRIPTION
Translate the center of mass of the molecule to the origin. | class NbodyMethods(object):
def com_to_origin(self):
self.com_move_to(-self.com_r, -self.com_v) | 1 |
f19941860c177ac76c07622c11a878d5 | f72d0090d92ca338ad6d47fbbf6935ad | Funktion zur Wiederöffnung geschlossener Punkte | namespace Favo
public partial class Form1 : Form
private void ÖffnenToolStripMenuItem1_Click(object sender, EventArgs e)
{
saved = true;
CheckSavedStatus("open");
} | 0 |
d582aac41baebd3dad1ad9707b9ccdfb | 53095b71ebb46073be0a64672d6d7a74 | 高亮中奖号码 | export class SuperEnalotto extends Digit
HighLightBetNumber(selected, result) {
const hightColor = "#e23a3a";
let red = selected.split(" + ")[0].split(" ");
let blue = selected.split(" + ")[1].split(" ");
let res = [];
res = red.map(m => {
return {
col... | 1 |
715942f235cd9610e7bb530e64161555 | 2ac4684c01d1219f0b2b8846c29ea010 | Returns the name of the renderer to use for this item | public class UIImgColumn extends UIColumnBase
@Override
public String getRendererType() {
return RENDERER_TYPE;
} | 1 |
a4ba55aae6518cf85414d1b369c9ba33 | 6815128cc8b9b4b53a3094fbcb8ad5cc | Retorna true caso o ajudante já tenha todas as informações para criar
a figura. | {
if (CamposPreenchidos())
{
return true;
}
return false;
} | 1 |
403ee0a383c384e9bb9fa8c3ee528aec | 3e05cf519db12434f9b2539e352da1c0 | 通知服务器领取邮件附件 | {
if (this.HasAttachment == false || this.m_isExtract == true) return;
DataObj data = new DataObj();
data["ret"] = (ushort)0;
data["mailId"] = this.ID;
NetMgr.Instance.Request(Commond.Request_Extract_mail, data);
} | 1 |
05028ded98bf54fd8e794c936499c61e | cc7c2411f30cd4b19d49a3ea962e25f3 | метод для ввода неотрицательного числа | {
bool OkEnter = false;
int Number = 0;
do
{
string StringOFNumber = Console.ReadLine();
OkEnter = Int32.TryParse(StringOFNumber, out Number);
if (OkEnter == false)
{
Console.Write... | 1 |
32fbcb40448bf0d9190095ed7aa4918f | bdcc1d839f1e6d0da83fe937c476589a | Maps the arguments to the function for getting Virtual IPs information. | if 'control_plane_ip_block' not in args.GetSpecifiedArgsDict():
return None
kwargs = {
'gateway': args.control_plane_ip_block.get('gateway', None),
'netmask': args.control_plane_ip_block.get('netmask', None),
'ips': [
messages.VmwareHostIp(ip=ip[0], hostname=ip[1])
... | 1 |
58a3e26b10dd096cd3a1db3d66edde71 | dfa24cb3c844e86552289697cf6c41a2 | Performs Shortest Remaining Time algorithm on a list of processes | def roundRobin(processes,timeQuantum):
requestQueue = []
scheduledProcesses = sortByArrivalTime(processes)
completedProcesses = []
clock = 0
while( len(scheduledProcesses) != 0 or len(requestQueue) != 0):
while (len(scheduledProcesses) != 0 and clock == scheduledProcesses[0].arrivalTime):
... | 0 |
569af61c6b9abe2b80e5abcc40e6a366 | 56182d00116040524617be193d5f9ff4 | возвращает матрицу с элементами текущей поделенными на число k | public class MathBox
public List <Integer> splitter(int t){
ArrayList<Integer> arr= new ArrayList<>();
for (int numberro : arrayList) {
arr.add(numberro / t);
}
return arr;
} | 0 |
de9cdaa7b46e828babf6abdf422e2fb2 | 0fe3a81082d22255becd1b2a5d2cfd92 | Gets, damages and influences targets within area of effect | public class Effects : MonoBehaviour{
public List<BaseEffect> getEffectsOnTarget() { return listEffects; } | 0 |
315c2fb1e2b76fed719d781da532ded7 | d3edf1ecabab482a96d90644b9e9a370 | returns the accumulator object, which concentrate all results from a Job. | public class CascadeThreadedQueryRunner implements CascadeQueryRunner
public Accumulator[] getResults(String qid) {
try {
return mQueryResults.get(qid).get();
} catch (InterruptedException e) {
e.printStackTrace();
return null;
} catch (ExecutionException e) {
e.printStackTrace();
return null;
}
... | 1 |
f4e5b4ee989b0ae7a2d6a8c69e7e4688 | 89ae5c037421eced4cdd21c0c19880d0 | initialize the display of the FAQ questions and answers | function Faq()
{
} | 0 |
2df35606a48febda97bca63415addb71 | 0a3ba6c3e0785615d38661de310c6250 | Dump 1- and 2-electron integrals to file. | maxInt = 0
if cls.has_exchange:
for key, group in groupby(
cls.exchange_Jdict.keys(), lambda x: (x[1], x[2])):
l = len(list(group))
if l > maxInt:
maxInt = l
with open(fname, 'w') as myfile:
myfile.write("""exchange:
{
FourSpin = FALSE;... | 0 |
5c6046ae200a4f82b9a2a75372e297ea | 9122e6579c6ceb82071ecd7db305160d | Test a logged in user can create a competency. | class core_competency_external_testcase extends externallib_advanced_testcase
public function test_create_competency_frameworks_with_manage_permissions_in_category() {
$this->setUser($this->catcreator);
$result = $this->create_competency_framework(1, false);
$this->assertGreaterThan(0, $result->... | 1 |
b7229c536c58247eb60457e6be686701 | cc745348d27ee4afcc7b7176b369ec90 | Tests some basic inputs and outputs of the relu derivative function. | if not tvm.get_global_func("runtime.DNNLJSONRuntimeCreate", True):
print("skip because DNNL codegen is not available")
return
dtype = "float32"
shape = (1, 32, 14, 14)
def gen_relu():
data0 = relay.var("data0", shape=shape, dtype=dtype)
out = relay.nn.relu(data0)
... | 0 |
28bcefa586a140213dffa8dbfca98902 | 484178b123f751ccd46fae0904ddf017 | Splits a curve using De Casteljau's algorithm. | {
ResultCurve = null;
if (Curve.Count < 2) {
return false;
}
ResultCurve = new List<Vector2> ();
for (int i = 0; i < Curve.Count; i++) {
Vector2 A1, A2, A3;
Vector2 B1, B2, B3;
if (i == 0) {
A2 = Curve [i];
A3 = Curve [i + 1];
Vector2 v23 = A3 - A2;
Vector3 nv_v3 = V... | 0 |
6cea6dc5332e58e1a3530926df3c9f8f | 331037258866aac8449504a58cf770f3 | Instantiates and returns a new instance of the :class:`Player` class with the
name *name*.
This method is called by :meth:`add_player`.
This can be used to supply a custom subclass of :class:`Player`. | class Game(dp.EventDispatcher):
def create_player(self, name):
return procgame.Player(name) | 1 |
fbe8a6f889af7e118ca408667d9051fc | 5fa25aeb3ae27cee3d9e879548e072ce | Calculate the number of milliseconds based on the specified number of
seconds.
<br/><br/>
rather than Thread.sleep (3250))
seconds. | public class TimeoutValue
public void setByMilliseconds(final int milliseconds)
{
this.seconds = milliseconds / TimeoutValue.MULTIPLIER;
int leftover = milliseconds;
if(this.seconds > 0)
{
leftover -= this.seconds * TimeoutValue.MULTIPLIER;
}
this.microsec... | 0 |
700555c7ad4e2951307b29e904685b88 | b02fc777b92c2945a0443a5fd21b81c4 | Disable "smart vertical resize" for components that can grow in height. Smart
resize means that no row can be truncated on e.g. a {@code JTable}.
chained calls to other methods (also known as "fluent API") | public class GuiPanel
extends JPanel
implements ITaskConstants, IEditable, Runnable, Comparable<GuiPanel>
public static void adjustHeight(JComponent comp, int h) {
int w = comp.getMinimumSize().width;
adjustSize(comp, new Dimension(w, h));
} | 0 |
961164d30db56b0b1088efd859a212f8 | f7eb0bca4d75efbf3c6f1cda6dbaef8e | Gets crossmatch information for the object | class AbstractAstroObject():
def get_xmatches(self):
pass | 1 |
d74b608de92de45bc1a13631521f4361 | 3f4d6e0cffa76d41cb027119eeff787d | Получает список категорий, к которым принадлежит данный товар | {
return $this->db3->getAll("SELECT * FROM s_products_categories WHERE product_id = ?i", $product_id);
} | 1 |
afce7f2bafd368243e3a37fc72d3d688 | 730d06729b5250833cd6aeb585ed7de9 | 190. 颠倒二进制位, Easy | namespace LeetCode.Com.Esay
public class No0190
public uint reverseBits(uint n)
{
uint result = 0;
for (int i = 0; i < 32; i++)
{
result = result << 1;
if ((n & 1) == 1)
{
result += 1;
... | 1 |
91593f0d7f1725a82d995585a2964bc1 | 4830a239b7b7a7a2a3aa3a6be4f3b97b | Return encoded raw data of the response. | class ExpressPurchaseResponse
extends AbstractResponse
public function getEncodedData()
{
return $this->data['encodedData'];
} | 1 |
fc4c6830cba3a9cf2b1bbde86cd144ab | 0fb174cb19cfa5bfde7ddfd397bad632 | The object constructor | begun(false), brightness(0), pixels(NULL), opixels(NULL), brightfr(NULL), brightfg(NULL), brightfb(NULL), brightfw(NULL) {
PRINTF1("In constructor 1\n");
endTime = get_absolute_time() ;
PRINTF1("In constructor 2\n");
setPin(p);
PRINTF1("In constructor 3\n");
updateType(t);
PRINTF1("In constructor 4\n")... | 1 |
f4e3f49f30076e23e5bb74ab99fdb93c | 34e6d06d07ead30cc3422ff1b41ccb7d | Gets the name of the PircBot. This is the name that will be used as as a
nick when we try to join servers. | public class BotMain
public String getNick() {
return this.nick;
} | 1 |
8cfae931f14a99a064a66220d2a68d4f | 20dbe640ab0d326808351001be1581f5 | Add all files in and below directory dir into zip archive | dir_parent = os.path.normpath(os.path.join(dir_path, os.pardir))
for current_dir, _subdirs, file_names in os.walk(dir_path):
for file_name in file_names:
file_path = os.path.normpath(os.path.join(current_dir, file_name))
zip_path = os.path.relpath(file_path, dir_parent)
zip_file.write(file_pat... | 1 |
e63e67e3b82ab872ef3bdba4340cc5db | 0069aad1030f8a423dd96ecce1f788d9 | ! This function sends the PART_INFO command to the radio and receives the answer
into @Si446xCmd union. | {
uint8_t status;
char ans1[15];
char ans2[15];
char ans3[15];
if (_version == ABZ_MODULE) return LORAWAN_VERSION_ERROR;
memset(_command,0x00,sizeof(_command));
memset(ans1,0x00,sizeof(ans1));
memset(ans2,0x00,sizeof(ans2));
memset(ans3,0x00,sizeof(ans3));
sprintf_P(_command,(char*)pgm_read_word(&(table_LoRaW... | 0 |
cd6b53eebacd449ae99a17f4a08ccebb | 5aa14ddd216603b17cd3f7b805fb4ac5 | Checks whether the <see cref="BoundingBox" /> contains the given <see cref="BoundingBox" />. | {
return BoundingBox2iUtils.ContainsPoint(this.XMin, this.XMax, p.X)
&& BoundingBox2iUtils.ContainsPoint(this.YMin, this.YMax, p.Y);
} | 0 |
2bc50c0e9008c65eac973296e415f671 | bcd57542a67f139112e4549d2024ceb6 | Returns resources for a given resource set in a specific locale | res = load_resource(ctx, dir_url, file_name, locale)
strings = {}
default_locale = res.getDefaultLocale()
for id in res.getResourceIDs():
str_id = res.resolveStringForLocale(id, default_locale)
resolved = res.resolveString(id)
strings[str_id] = resolved
if include_id:
... | 1 |
826ec9b6da9c39172c5a0248d9bab5e7 | 9d31d5c7987187f70b590fe283937314 | <p>
Creates a model package that you can use to create SageMaker models or list on Amazon Web Services Marketplace,
or a versioned model that is part of a model group. Buyers can subscribe to model packages listed on Amazon Web
Services Marketplace to create models in SageMaker.
</p>
<p>
To create a model package by sp... | ListModelPackagesResult listModelPackages(ListModelPackagesRequest listModelPackagesRequest); | 0 |
b080f3f303e2d0ecc4d1eb255d65f1b3 | 4a384951f77feb452728d694ae0effce | Handles the ValueChanged event of the CBPageType control. | {
if (this.RemoveBotsButton.Checked || this.SyncDefinitionsButton.Checked)
{
newPage = (page == "Ready") ? "Actions" : "Ready";
}
} | 0 |
d5e769d4f76af5e1f8e8a7334a85c3b6 | 0c5eb15b8ad29fb0d0f70c7606126f2e | Gets the training engines. | {
string page = null;
do
{
using (var response = await Client.EnginesApi.GetEnginesAsync(page))
{
if (!response.HttpResponse.IsSuccessStatusCode)
{
Console.WriteLine("Request faile... | 1 |
58b8858ac0a6317dc9258c069526e16d | 9f5fdb9f8372732c10d2ce148b750155 | Updates the server lists from the txt file | class Vatdata
protected function updateServers()
{
$status_text = file_get_contents(config('vatdata.url'));
$this->data_servers = $this->parseDataServers($status_text);
$this->vatsim_servers = $this->parseVatsimServers($status_text);
} | 1 |
fe5fe602bf853400ac70a200adc3a110 | f799f3b0c6ae370119cd3e1a24cd9301 | Get the vertex that maps to a room shape. | public class Bat
public Vertex getRoom()
{
return this.currentRoom;
} | 1 |
538189715d20025a2eed04e9d7c9f958 | 5e957ea998c22954a282a9112e4e5fd1 | Gets whole part of division, ceiling the result. | {
if (secondArgument.Equals(0))
throw new DivideByZeroException();
return Math.Floor(firstArgument / secondArgument);
} | 0 |
df05842c2f11fe1fe62a8e90947413eb | d405512136e1f184a7d9b6720a04abb6 | Create a `TestApp` with a database including a default user | def user_fixture(app):
with app.app_context():
datastore = app.extensions['security'].datastore
datastore.create_user(email='john.doe@test.com',
password='123456',
active=True)
datastore.commit()
return app | 1 |
0f02baff558ab812d06e1233ecb4373d | 636b9cd425b4bc702f766b5a7b7f08de | M�todo para cargar y devolver los BibTeXs de una categor�a | def get_books_datas(category):
books_urls_from_a_category = get_products_urls(category)
books_datas = []
values_list = []
for book_url in books_urls_from_a_category:
soup = generate_soup(book_url)
values_list.append(book_url)
title = cleanning_title(str(soup.title.text))
... | 0 |
bdc47657092506cfcdebe43e0389192c | 53e4bc6bf85a866a3ba3360660dddc56 | Sets Date units or day in BCD format. | public class CAN extends ObjectRoot
public void set_11BiD( String value ) {
_11BiD.setValue( value );
_11BiD.setTime( getTime() );
} | 0 |
fe0d9126aa6905e9be58d44f32276ffd | abae31ba8976e024d4a907fdb6a1af09 | Called when a fling result is received. | class MuiMain(InputEventListener, GestureListener, AppEventListener, DisplayEventListener):
def onFling(self, e1: MotionEvent, e2: MotionEvent, x, y):
return self.app.dispatchFlingEvent(e1, e2, x, y) | 1 |
dc7b4a1fb41c366b05e7615c9b6fd3a3 | 3687b12fef484201b762b4a55d3255d1 | 设置默认发消息压缩方式 | void m_producer_setCompressMsgBodyOverHowmuch(int compressMsgBodyOverHowmuch){
producer_setCompressMsgBodyOverHowmuch(compressMsgBodyOverHowmuch);
} | 1 |
32ff4db81ee3d8e1ec95c75197564fff | 8a15985f9b8760b0a5f598dacb6b7ee7 | 3. 윤년 여부를 반환하는 메소드 | public class _1185_DayofWeek
private boolean isLeapYear(int year) {
return (year % 400 == 0 || (year % 4 == 0 && year % 100 != 0));
} | 1 |
c3a98f0a7874a65a14ba94573c48ab5f | 000cb01defa583607b4720932e1ca441 | Posizione di un corpo celeste relativamente alla stella. | {
Vector3 position = thisTransform.position;
float positionSeed = Mathf.Cos((position.x + position.y + position.z + Class_StarSystem.seed) * factor);
return positionSeed;
} | 0 |
1665d792d68b30450b5727383cc97629 | 8bcdd5da033e5d77d9e610f53f593b6b | Returns e raised to the power of a specified number | IntegerExpression pow(Expression e) ; | 0 |
9ab9fd415e3913458ae9468f025b4008 | 9e8203f0db55727f3bfb031272fc1aa6 | 遍历临时目录下的文件,读取每个文件的内容,替换掉指定内容,将新内容写入 | , String replaceExp, String replaceElement) {
if (!FileUtils.checkPath(path)) {
return;
}
CharArrayWriter tempStream = new CharArrayWriter();
try(
BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(path), utf8))
... | 0 |
f32097cbb8f3e259588d9eee72e59bf9 | 26fba0ed13e3ba0f994850e1ffde30b7 | iBeacon 服务状态变化事件的回调函数 | wx.onBluetoothAdapterStateChange((res)=> {
console.log(`BLE Adapter State Changed: `, res)
success && success(res);
})
} | 0 |
db2163ced45073ceb2df76ed7456588b | bb820b3b2a3cbbcac2b2dff1c71a6b48 | Função para clicar na opção NÃO, OBRIGADO do Pop-Up | function ultimoModal() {
setTimeout(function () {
concatFunctions('modal9', '#diag9', 'name6')
}, 300)
clickFormSimples('#name6', '#enviar7')
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.