query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
a9eed30a32e698240c0663d38faf43b1 | 2b48dc835db39bced7967c533b31041c | 设置索引表空间的扩展信息.目前只有Oracle数据库能指定该参数 | export default class GDBCreateParam extends ObjectManager
async setIndexFileInfo(info: DBFileInfo): Promise<void> {
let methodName = "setIndexFileInfo"
let paramsTypeStr = [this.CLASS_DB_FILE_INFO];
let paramsStr = [info.ObjId];
await this.invokeByParam(methodName, paramsTypeStr, paramsStr, this.VOID);
... | 0 |
16a63f1f0d9afaec460c6505c41662bb | be7853e1e69e43274903648f06de0782 | Получить индекс ближайшей в сетке ширготы к заданной | namespace Nebukam.Cluster
public abstract class SlotCluster<V, B> : Vertex, ISlotCluster<V, B>, IRequireCleanUp
where V : Slot, ISlot, new()
where B : struct, IClusterBrain
public abstract int GetNearestVertexIndex(float3 v); | 1 |
62e73439b03e07f7a957526e305d8e08 | 91d1d70bbc838454b18076dbc9abfc0a | 鼠标左键实现平移视图功能 | try:
if Qt.Qt.LeftButton and self.m_flag:
self.move(QMouseEvent.globalPos()-self.m_Position)
QMouseEvent.accept()
except AttributeError:
pass | 1 |
82a11bb1951411e2253cc5f4eeaa84f1 | a918fbbf09f4620d65d0992cf2676848 | 量子コンピュータの回路を作成するためのクラス | learning_rate: float = 1e-3):
self.name = name
self.n_sites = n_sites
self.time_steps = len(tensors) - 1
self.n_states = 2**n_sites
self.tensors = tensors
self.optimizer = optimizers.AdamComplex(self.shape, self.dtype,
alpha=learning_ra... | 0 |
2867f838c0a884fae2d17ca91f5eec58 | 2421ed79f47451798cac152c239e6824 | Set a callback to run when this entity has been added to physics world. | void ScnPhysicsConstraintComponent::onAttach( ScnEntityWeakRef Parent )
{
World_ = getComponentAnyParentByType< ScnPhysicsWorldComponent >();
BcAssert( World_ );
if( Constraint_ != nullptr )
{
World_->addConstraint( Constraint_ );
}
Super::onAttach( Parent );
} | 0 |
32cfc8d6dd2d633b81f6994fcbfc7270 | defdb8be856c07df8fb323cf631b457d | True for .jar files or exploded directories with Bundle-SymbolicName in their manifests. | @SuppressWarnings({"checkstyle:classfanoutcomplexity", "checkstyle:classdataabstractioncoupling"})
public final class SARLRuntime
public static boolean isPackedSRE(IPath jarFile) {
try {
final IFile location = ResourcesPlugin.getWorkspace().getRoot().getFile(jarFile);
if (location != null) {
final IPath pat... | 0 |
a2c305abe66e05911b84629b54f019d3 | de56c5d53a23463324a2d723e7e1e9b4 | Updates the glyph and sends notification to the editor. | {
if (m_is_glyphs_drawn == false)
{
m_is_glyphs_drawn = true;
glyph_provider* fp = get_glyph_provider();
if (fp)
{
for (int i = 0; i < m_text_glyph_records.size(); i++)
{
text_glyph_record& rec = m_text_glyph_records[i];
rec.m_style.resolve_font(m_root_def);
font* fnt = rec.m_sty... | 0 |
6e4df27a1be173b67a7ffa365d159f3a | 528498fb75b9cdade8bbc53176927722 | Function to get application of the project based on its name
return application instance or null if not found | namespace SACS.DataAccessLayer.DataAccess
public class ServiceAppDao : GenericDao, IServiceAppDao
private ServiceApplication GetServiceApplication(string appName)
{
return this.FindAll<ServiceApplication>(sa => sa.Name.ToUpper() == appName.ToUpper()).FirstOrDefault();
} | 1 |
5901879d64f709282cae476cc8cb1b71 | 401cfb51fce386af642f9e0965855341 | Encrypting msg according to random choice | char[] msgCharArray = msg.toCharArray();
Random numRandomico = new Random();
int num = numRandomico.nextInt(msg.length());
if (msgCharArray[num] == '1') {
msgCharArray[num] = '0';
} else {
msgCharArray[num] = '1';
}
String result = "";
... | 1 |
3e02fbd30382913a4eaab49c7b8a4abd | 495107d85603ef21ed4b636e3472cbe0 | Calculates the number of years as a fraction, using period-based calculation and the given daycount convention. | namespace Highlander.CurveEngine.V5r3.Assets.Rates.Bonds
public abstract class PriceableBondAsset : PriceableBondAssetController
public override decimal[] GetYearFractions()
{
return GetYearFractionsForDates(UnAdjustedPeriodDates, CouponDayCount);
} | 1 |
56cb7626f594c17daa0c4feb8e4f0c92 | 3696705c8260b2bb55fb07d6ffc9ddf6 | Shows the TextView stating that login has failed | public void onLoginFailed(String error_message) {
Toast.makeText(getBaseContext(), error_message, Toast.LENGTH_LONG).show();
loginButton.setEnabled(true);
onRestart();
} | 0 |
73ee452a4ef58072cb715c6251329122 | 517c52c6aac13368a3c87b2613e3755a | 如果单行汉字s显示过长,在num位置增加换行符 | {
if (num <= 0)
{
return str;
}
string result = "";
int point = 0;
for (int i = 0; i < str.Length; i++)
{
if (point == num)
{
result += '\n';
... | 1 |
21fa2fe1947472ed66b37e92ca94213f | c53f2bad0fed9d15d3efa96fb1ac6240 | 查询用户的所提交的所有审核 | public List<Check> selectCheckByUserId(Integer userId) {
List<Check> checks = checkMapper.selectCheckByUserId(userId);
return checks;
} | 1 |
73a7b029e5987d0cee5293ffe2d9abcf | b5acc7571ac7e11fcc540c79418789fb | This method allows the functionality of brining an already existing form to the front of the screen
which allows it to be more interactive to the user since they requested a form that is open
so there is no point duplicating the form. | public void openForm(); | 0 |
a23fd0a3f21968e2fdd9e07d966cf47e | 50f719fa16ef5608dc5285f203e2dc95 | region Board Details screen UI related controls | public class SupervisorJobDetailsActivity extends AppActivity implements ServiceRedirection, OnMapReadyCallback
@Override
public void bindControls() {
mClientTextView = (TextView) findViewById(R.id.client_tv);
mMapLinearLayout = (LinearLayout) findViewById(R.id.map_layout);
mJobDescriptionTe... | 0 |
ab35c1081c8ab489d0f4807534b31f82 | 6f7d6a38792efbf7f2bdecc26b2636f4 | Convert a vector of doubles into a String | for(int i = 0; i < vec.length; ++i) {
vec[i] = String.format(Locale.ENGLISH, "%.7f", Double.valueOf(vec[i]));
vec[i] = vec[i] + " ";
}
String displayVector = Arrays.toString(vec);
String showVector = "";
showVector += "\t";
showVector += displayVec... | 1 |
8ea3e6cb9fd7563bac022950d59cc53a | 7f61448ad6da3ef0f9cb03f40c5be655 | **************************GET DATA**************************** | cases like (1) | 0 |
11d70d6994a0d524e955c20a1a6fdc92 | 670450c0488687f2f86c5502d672ed2c | Clears the pending layout update for this content | {
IContentValidity rowValidity = this.Row as IContentValidity;
if (rowValidity != null && rowValidity.RowLayoutIsValid)
rowValidity.RowLayoutIsValid = false;
IContentValidity tableValidity = this.Table as IContentValidity;
if (tableValidity != null... | 1 |
7dcae80dd025297636529d0ce58d968b | 5fa3fa57cef114229cd221de223d3f2b | Set term id. | class PrimaryTerm
public function setPostId( $post_id ) {
$this->post_id = absint( $post_id );
} | 0 |
94fbe272ecc4ffebf95ab2e01cc1b643 | 9479e39e914be71c0e70be3a7f6a261c | Get list of all cocktails parsed from data | namespace DrinkerAPI.Interfaces
Task<List<string>> GetCoctailGlasses(); | 0 |
20dbc72841b70f336e7631c02d2f0f09 | 0e2782162d40b00f6c7cd0e72306dd44 | Returns an unmodifiable view of the filtered list of customers. | public class ModelManager implements Model
@Override
public ObservableList<Client> getFilteredClientList() {
return filteredClients;
} | 0 |
a58b13b705664aba9d0159fe66401d2b | 1ce0ccd42cf8625be172eafae3c36762 | ajax调用:创建挂件 | class TleBarrager_Plugin implements Typecho_Plugin_Interface{
public static function activate(){
Typecho_Plugin::factory('Widget_Archive')->header = array('TleBarrager_Plugin', 'header');
return _t('插件已经激活');
} | 0 |
d1c5d1a3ae5d63a1c2f619cae4c4e0ba | ab76861935edd8e103a22aff9638604b | set new leg position in xyz coords | void SetPosition(double x, double y)
{
posture.x = x;
posture.y = y;
} | 0 |
012305a38f6aa77936004c5c5ef47131 | bf21e4abe64401f427669c630440648a | Calculate relation to proband values once object has been initialized | proband_variants = [proband_variant.entry for proband_variant
in self.case.attribute_managers[ProbandVariant].case_model.case_models]
for transcript in self.case.transcripts:
for proband_variant in proband_variants:
if proband_variant.variant == tr... | 1 |
d63c1063afc838cfa730e0b4f1256147 | efc89cced22db0249b3c555235e4e13f | Площадь шара | {
double v = M_PI * pow(r, 2) * (h/3);
return v;
} | 0 |
d08daa3550d06154f68e53f9ae6076fe | 5a4ce979f273568802321cd145fd698a | Set controls available based on field type | String fieldType=field.getFieldType();
if(fieldType.equalsIgnoreCase(ColumnModel.COLUMNTYPE_VARCHAR) || fieldType.equalsIgnoreCase(ColumnModel.COLUMNTYPE_NUMBER)){
field.setControlType(FieldPool.TEXT_INPUT);
}
else if(fieldType.equalsIgnoreCase(ColumnModel.COLUMNTYPE_DATE)){
field.setControlType(FieldPool... | 1 |
79253b39543ed22efcf4b1f77508bd28 | 1ed3b85a1cb7596d83414279aeeb0dbe | Clear Skills
[No longer a button, still used when a new character is created] | for (int i = 0; i< Skillslot.Length; i++) {
Skillslot[i] = -1;
}
} | 1 |
65f0cedc9caf56d36f40065e52816891 | 35b1204a6022e57c1b5e4c6b57ba5a86 | Handles the "bind -l" command. | class BindCommandHandler
public function handleList(Args $args, IO $io)
{
$packageNames = ArgsUtil::getPackageNames($args, $this->packages);
$bindingStates = $this->getBindingStates($args);
$printBindingState = count($bindingStates) > 1;
$printPackageName = count($packageNames) > 1;
... | 1 |
6b719a21ac1a26999dff592ef7743a69 | 1a7b8b1017e73e16983c9fe7ea28e8c5 | Standard acceptable content type. | public function httpAccept(); | 0 |
9486ca8945f92d5cb491d27321fc745a | f688683337eacfec102a37191e23ac98 | 根据基础数据进行潮流计算 | class PowerFlow:
def general_cal(self):
self.status_init()
self.generate_node_admat()
self.resort_my_admat()
self.cal_power_flow()
self.output_result('general') | 1 |
575e969bfe8d868bc90c4b751fba22e5 | f0674c91e0481e55e95d54afe89adfc6 | Replace all place-holders for the dimensions rule. | class Validator
protected function replacePlaceHolders($message, $column, $value, $constraint)
{
$message = str_replace(":column", $column, $message);
$message = str_replace(":value", $value, $message);
if (!empty($constraint) and !is_callable($constraint)) {
if (is_array($constr... | 1 |
596fc98b385df7b782c6a3f70d5b4414 | 3a66447b775eeb34e7be0b7d2b8e0af2 | A function to calculate the intersection of two rectangles. Takes base
rectangle and then updates it to include only the rectangles that intersect
with the test rectangle. If there is an intersection, the function returns
TRUE and base now contains the intersecting rectangle. If there is no
intersection, then the funct... | RECT* pstIntersection )
{
int iMaxX1;
int iMinX2;
int iMaxY1;
int iMinY2;
iMaxX1 = MAX( pstArea1->iX1, pstArea2->iX1 );
iMinX2 = MIN( pstArea1->iX2, pstArea2->iX2 );
if( iMinX2 < iMaxX1 )
{
return FALSE;
}
iMaxY1 = MAX( pstArea1->iY1, pstArea2->iY1 );
iMinY2 ... | 1 |
54e945246a54c5b058bf3adb924c92f1 | ed196e29b8402a6ac510ea0f4c766d64 | Action listener for activation button. | namespace M4
public partial class frmActivate : Form
private void cmdActivate_Click(object sender, EventArgs e)
{
Service auth = new Service();
try
{
}
catch (System.Web.Services.Protocols.SoapException se)
{
Telerik.WinControls.RadMessageBox.Show(se.Message, "Error", M... | 1 |
a528a68ab41388008ec36f5e914c432e | 7583f2aa195b45217b219304b10c4f58 | Called by the scheduler at the time a <code>Trigger</code> is first added to the scheduler, in
order to have the <code>Trigger</code> compute its first fire time, based on any associated
calendar.
<p>After this method has been called, <code>getNextFireTime()</code> should return a valid
answer.
is also the same value <... | public Date getNextFireTime(final Date now)
{
return nextFireTime == null ? null : new Date(nextFireTime.getTime());
} | 0 |
8172692a8ccff4ca45fd381ee33cc005 | 50344fc63224d184bebe468ddc1414d5 | Convert a decimal number to a sexagesimal number | public class CommonUtils
public static String convertToSexagesimal(double num) {
int du = (int) Math.floor(Math.abs(num));
double temp = getdPoint(Math.abs(num)) * 60;
int fen = (int) Math.floor(temp);
double miao = getdPoint(temp) * 60;
if (num < 0)
return "-" + du + "°" + fen + "′" + miao + "″";
retu... | 1 |
ca637806d0016a7f59bd3c1ba9ef2c2e | 4b618cfae4dd3d41df2d2303f67a54e6 | Handles the Click event of the UpDown control. | {
if (Key.Up == e.Key)
{
this.PlusSliderValue(slider);
}
else if (Key.Down == e.Key)
{
this.MinusSliderValue(slider);
}
} | 0 |
c09205012dc27dd61911e3a4b00f83c6 | e785c5300ee521b5f74f909a6dca7c9d | find a new target location, start moving there. | if self.db.aggressive:
target = self._find_target(self.location)
if target:
self.start_attacking()
return
if self.db.moves_between_rooms:
exits = [x for x in self.location.exits if x.access(self, "traverse")]
if exits:
for exit in exits:
target = self._f... | 1 |
1eb783596cfb58a773783173f95bdd15 | 460970ea0695a84d269ea67e655d8b16 | 将sedo上获取的相关交易写入我们的交易表 | {
require_once APP_MOD_PATH . 'sedo_domain.php';
$SDAsdk = new Sedo_domain();
$pCommonLib = new PublicCommonLib();
$domain = ReturnData::$info->domain;
$enameId = ReturnData::$info->enameId;
$status = ReturnData::$info->status;
$perPage = ReturnData::$info->per_page;
$perPage = $perPage ? $perPage : 0;... | 0 |
e48fff4db36e43f216cd2d8746295871 | 8d3d3b058bcdc202c7772f756a524981 | Function that instalises level two | Platform* tempPlat = new Platform("images/Final/B-3.png");
Toon* tempToon = new Protag();
Level* levelI = new Level("images/Final/level_1.png", screenHeight_, screenWidth_, "Level I");
levels_.push_back(levelI);
levels_[0]->addPlat(tempPlat);
levels_[0]->addToon(tempToon);
levels_[0]->setPla... | 0 |
8624dfd8a85bbe66f43a75ef327c46cb | 9ff8f9e9330dd516308a628a41febfc2 | Use this callback for commands that need to
be disabled if not supported (yet) | def h_disable(**kwargs):
return 0 | 1 |
e60ef725b652b0f22d3c27933177535c | ba95c75dbbfeda5abbe7b47217e331e6 | Disables the scrolling effect on touch devices.
(start code)
disableElastcScrolling();
(end) | disableScroll() {
return false;
} | 0 |
32220b2770aabb570c3d8ef98c821e1b | 321727be00c2c135d5e55e9162dec3c7 | Number of bytes per disk sector. A sector
count element, such as 'sectors-read' and
'sectors-written', may be multipled by this
value to convert to a byte count.
Omitted if excluded by 'desired-attributes'. | class DiskDetailInfo(NetAppObject):
def physical_space(self):
return self._physical_space | 0 |
8601cc60bcf4e96f33491b1f40b73de9 | a3fb8eb95240f607a8ee65c30bacf221 | 增加一条推荐饮食数据 | void addSetMealDao(SetMealDO msg) throws Exception; | 1 |
54f5416798c2f0e9822e6eea470c0038 | 847ce0a21dcaf75a01ef5b3245b06afa | Méthode pour récupérer toutes les commandes d'un utilisateur | class Buying_model extends CI_Model
function showUserBuyingCommands($id){
$this->db->order_by('id_achat', 'DESC');
$this->db->where('id_abonne', $id);
$query= $this->db->get('fiat_buyings');
return $query->result();
} | 1 |
ced5f08e5fcb8b46e74764bddd4ae8dc | ea46443786a02cc6555864640338c542 | Display a listing of the pengajar. | class PengajarController extends Controller
public function show($id)
{
$pengajars = Pengajar::find($id);
$countpesan = DB::table('pesans')->where('status', 0);
$pesans = $countpesan->count();
return view ('admin.show_pengajar', compact('pengajars', 'pesans'));
} | 0 |
515ccc93cd2d5d7ff362e2b64ffac2bc | e5fad1d4bcb3d183a0cf606072aefccd | Used recursively to traverse through the tree to find the data with
the highest value.
May also be used on a subtree. | class BinarySearchTree(BinaryTree):
def get_max(current: BinaryTreeNode):
while current.has_right():
current = current.get_right()
return current.get_data() | 0 |
a3025ffd323a5fe2400519fd8c11e59b | 954bac3c051648ebc3dfa3e508f6ce91 | 创建OrderItem数据层接口。 | $ary_orders_itmes['oi_create_time'] = date('Y-m-d H:i:s');
$return_orders_items = $this->orders_items->data($ary_orders_itmes)->add();
return $return_orders_items;
} | 1 |
2acd8c7f17e5f6ba26b4d632d0d10688 | 454fcfa74dd2af4c6878ccf3360eb892 | Gets the representation of a type when used as a C++ function return value. | r = valuetype_type(t)
if r is not None:
return r
if isinstance(t, BaseType):
if t.name == BaseTy.Tensor:
if mutable:
return 'Tensor &'
else:
return 'const Tensor &'
else:
raise AssertionError(f"base type should have ... | 1 |
3005d34c5939d2c03df42aaefed2ed5a | 797ddbe08ca28332f21b10947abca97c | 获取鼠标x,y绝对坐标 | function getMouse(ev){
let mX = getEvent(ev).clientX;
let mY = getEvent(ev).clientY;
return [mX,mY];
} | 1 |
990c4418bb0ba441d2e7dda387816c60 | 79a3b91e1ae8670bebecb3ce879b9f9c | 设置确认文案大小 | class IBottomListDialog : BaseIOSDialog<IBottomListDialog>()
fun setCancelTextSize(textSize: Float) = this.apply { bottomBtnParams.textSize = textSize } | 0 |
5368264456c9029ce3572b1d887ca02d | 20de28ea48f00af97b842233c776eb29 | Highlight some code in language 'lang' using pygments. The class name
in `cssclass` is attributed to the resultant code div. | def highlight_content(content, filename=None, config=None):
lexer = choose_lexer(content, filename=filename, config=config)
style_class = highlight_css[PYGMENTS_STYLE][0]
cssclass = 'highlight ' + style_class
formatter = formatters.HtmlFormatter(style=PYGMENTS_STYLE, cssclass=cssclass)
highlighted =... | 1 |
18270c55f7d97c1161fcca80d2395c12 | d64fe94e29f1d461e5176462a7475322 | 关闭闪烁用的定时器 | function FlickerStop() {
window.clearInterval(h);
} | 1 |
df14d9dea41e19dd903d6a6e9e14daaf | 29a380fac240a999eafc0017d51775cc | Interceptorを入れる対象のメソッド名を取得する。<p> | public class InterceptorPaternConfig
public ServiceName getInterceptorServiceName(){
return mInterceptorServiceName;
} | 0 |
fb33169d85f3427a03b2ca89144a7bde | 73452b9e54e98c7d5a6df2fafd26cee9 | Run selected changes and display what's done | class ChangesCommand extends ContainerAwareCommand
protected function execute(InputInterface $input, OutputInterface $output)
{
$checker = $this->getContainer()->get('phlexible_element.checker');
$synchronizer = $this->getContainer()->get('phlexible_element.synchronizer');
$sync = $input->ge... | 1 |
e55c191fe6805446bf5a5ffeb247b2d9 | dfc29e619f324a700c8b58fac4ffa5b1 | 封装消费记录分析的树形图数据 | public class StatisticsUtils
public static void takeTermTreeData(Aggregation aggr,String[] arr, int len, List<TreeData> nodeDataList ,int pid) {
TreeData treeData =null;
if(aggr!=null){
if(judgeDate(arr[len])){
Iterator<? extends Histogram.Bucket> fBucketIt = ((Histogram) aggr).getBuckets().iterator();
i... | 1 |
2a3d57b33da9a0896b511ed940ed0873 | 640036834732f14a52d61156edebf27b | 获取当前选中行的客户全称 | class SalesOrder(models.Model):
def get_cust(self):
return self.so_cust.name | 1 |
ef89b5e7446505706501536d5f93b5b7 | 56b56176d3e93b929078a51c93833c95 | Yields all direct (non-recursive) children of this node | if not self.can_have_children():
return
for child in self._children:
if child.isDisabled:
continue
yield child
for descendant in child.child_iterator():
yield descendant | 0 |
8803720aed3f76608d1b0c01c021b07e | 77078f631c3485240cc160af323ccc15 | Detaches all contained items from the list as if they had been removed, without actually removing
them from the underlying list. | namespace CSF.Collections.EventHandling
[Serializable]
public abstract class EventBoundCollectionWrapper<TCollection,T> : IEventBoundCollection<TCollection,T>
where T : class
where TCollection : ICollection<T>
public virtual void DetachAll()
{
foreach(T item in _wrapped)
{
this.Detac... | 1 |
03a639772f22148cfe4a2a4bfb3ec697 | 65890381a78aa71cfa7a9856324db0d1 | Initialization method, assigning the parameters for the algorithm a default value | namespace abc
namespace graph
void init_parameter()
{
fileName = "_UNDEFINED_";
interval = 2000;
dim = UNDEFINED;
numAnts = UNDEFINED;
numObjects = UNDEFINED;
numEdge = UNDEFINED;
numIter = UNDEFINED;
objectGrid = NULL;
antGrid = NULL;
objectArray = NULL;
antArray = NULL;
alpha ... | 1 |
f04183702500ef1fe1301a741fa81919 | 024ce61377358960df110f39ac03bafe | Подсчитывает количество предложений для работодателя по всем его проектам. | class WorkerReputationCount implements ReputationCountInterface
private function getCountOfProjectGetRewards(array $conditions)
{
$sqlUserIds = $this->getSqlUserIds($conditions);
$sqlStartDay = $this->getSqlStartDay($conditions, 't.modified');
$sqlFinishDay = $this->getSqlFinishDay($conditio... | 0 |
c68aa81801463a8c09b64940e6ade7f4 | d79d44fed2fec8ca9ae124c72bcb5c5b | Lance le téléchargement et le comptage des mots,
et retourne le résultat. | req = Request(URL)
try:
resp = urlopen(req)
except URLError as e:
return -1, [], {}
mimeType = resp.getheader('Content-Type')
if not mimeType.startswith('text'):
if resp.getheader('Content-Length') is not None:
return int(resp.getheader('Content-Length')), [], {}
... | 1 |
4fe80053683bf917bbc8b42b834e1e0b | cab07d4b05c18e830fb3e7bf03a22b49 | 上传文件,具有断点续传功能 | namespace Qiniu.IO
public class ResumableUploader
public async Task<HttpResult> UploadFileAsync(StorageFile localFile, string saveKey, string token, StorageFile recordFile, int maxTry, UploadProgressHandler uppHandler, UploadController uploadController, Dictionary<string, string> extraParams)
{
... | 1 |
e824beb8c55d18e038e2c1ebab067795 | b60299df0d7af72b1f419b84d3c4f726 | Request to save current state | namespace GensQt4
void EmuManager::saveState(void)
{
if (!m_rom)
return;
QString filename = getSaveStateFilename();
EmuRequest_t rq;
rq.rqType = EmuRequest_t::RQT_SAVE_STATE;
rq.saveState.filename = new QString(filename);
rq.saveState.saveSlot = m_saveSlot;
m_qEmuRequest.enqueue(rq);
if (m_paused.data)
proc... | 1 |
96975cc90e789ba2e399d1481152a1ec | d9a58b19a048afe14d2601a242e7cb5f | 批量签收组任务 | $data = array();
if (! $this->__deal_data_in_update($in, $data)) {
return false;
}
$serv = &service::factory('voa_s_oa_sign_batch');
$serv_dep = &service::factory('voa_s_oa_sign_department');
$conds['sbid'] = $data['sbid'];
$list = $serv_dep->list_by_conds($conds);
$conds_ct['department IN (?)'] = $i... | 1 |
778c9802ed94bd8bdbce33f7654920d9 | 2431c919c59bc87da61ebec9f5b257ea | Returns the Data as an Object array for use in the GUI. | namespace NPOI.HSSF.UserModel
public class HSSFObjectData : HSSFPicture
public byte[] GetObjectData()
{
return FindObjectRecord().ObjectData;
} | 0 |
a1ad30c7d1951c75e113e68282707aa0 | 53d7f9d7a86525926f56051e08a3fe51 | Gets query for [[LessonComments]]. | class Pair extends \yii\db\ActiveRecord
public function getTeacherLessons()
{
return $this->hasMany(TeacherLesson::className(), ['pair_id' => 'id']);
} | 0 |
1f67c2c63918a9f67157677760c6460e | 2c90bc6a21638e7d4cb63608e08db39b | automatically scroll to top of page every time a new component is instantiated | class NewRecipe extends Component
componentDidMount() {
console.log('Component did mount!');
window.scrollTo(0, 0);
} | 1 |
448c91ea10c74b9ee46df5bd67d66556 | 239bb440cf3a608b9772ae43911fa6a8 | Add the pocket center as sphere. | class PocketViewer:
def _add_pocket_center(self, pocket, sphere_opacity=0.7, sphere_color="blue"):
if pocket.center is None:
_logger.info(f"Pocket {pocket.name} has no pocket center.")
return None
color_rgb = colors.to_rgb(sphere_color)
center = [float(i) for i in pocket.... | 1 |
fa75ce4dc27c33ec2784bc053a98bb50 | e29d5d73f0a4f52f6ac05e7556960796 | calculates the weightings and the positions for Gauss-Legendre quadrature. | legWeights = np.zeros(sNords + 1)
pnp1s = np.zeros(sNords)
pprimes = np.zeros(sNords)
legWeights[sNords] = 1.
mus = np.polynomial.legendre.legroots(legWeights)
for i, mu in enumerate(mus):
pprimes[i] = spc.lpn(sNords, mu)[1][-1]
pnp1s[i] = spc.lpn(sNords + 1, mu)[0][-1]
weigh... | 1 |
766f8bace09823a26f5699cb54654fb0 | 8e98cc8a8e46b705675502f4f1993294 | 增加消费总额 | @Update("UPDATE company set consume=ifnull(consume,0)+#{consume} where name=#{company}")
void addConsume(@Param("company") String company, @Param("consume") Double consume); | 1 |
bb154ef6cd63c0d7ddf132a5788fd085 | d7f06a620b71549cc9ee2a2bbbac3de0 | GET: api/HotelComments | namespace TradesWebApplication.Api
public class CommentsController : ApiController
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
} | 0 |
5d23f5a9935ccc77e1597d0c1b2b3db1 | 6327a1e3d692ed62db6a07441b354b46 | calculates the ig of given ngram according to ig formula. | if len(n_gram) == 1:
numer = model[0][n_gram]
denom = sum(model[0].values()) - model[0][(START,)]
else:
numer = model[len(n_gram) - 1][n_gram] - KATZ_DISCOUNT
denom = model[len(n_gram) - 2][n_gram[:-1]]
return numer / denom | 0 |
4f9872953b3906ce79949ca33c06bcdc | fc8100340abe7846c804beeb1415d74e | Вычисление и отображение времени, прошедшего от начала поиска. | {
stopwatch.Stop();
string elapsedTime = String.Format("{0:00}:{1:00}",
stopwatch.Elapsed.Minutes, stopwatch.Elapsed.Seconds);
MainWindow.AppWindow.setScanTime(elapsedTime);
MainWindow.AppWindow.GoToResultsPage();
} | 1 |
0e16268e06d8fe4126e733d375749448 | bc679b65bab8f2aeb8ff270a9f2740d3 | create a list of pattern grouping all the pattern by category and respecting their position | patternGroups = {}
for word in self.wordList:
pattern = ""
for letter in word:
if letter in self.guessedLetters:
pattern += letter
else:
pattern += "_"
if pattern not in patternGroups:
... | 1 |
ff16990bc097aecdbff85afea726d6ce | e252b9db725f61383d2b36300caa387e | Wait for dependent scripts to finish loading | const interval = setInterval(() => {
const hasJQuery = typeof (window.$) !== "undefined";
const hasSoundManager = typeof (window.soundManager) !== "undefined";
const hasD20 = typeof (window.d20) !== "undefined";
if (!hasJQuery || !hasSoundManager || !hasD20) {
clearInterv... | 1 |
4d79cf677e6aa292514f91ff4454c0d6 | c8befc397c1ff161d1f3703b6818f104 | Returns the codepoint without doing checks, for internal VM use only. | public class CodePointCursor implements IDEBUG
public int peek () {return s.codePointAt(peekIdx());} | 1 |
b037c6d286e9709d55a40ac64b9fd0ba | a428d3691c0b6754311c819cee015da1 | 摇杆控制行走 | {
moveVector = Vector3.zero;
moveVector.x = mController.Horizontal() * speed;
moveVector.z = mController.Vertical() * speed;
if(moveVector.x !=0 || moveVector.z!=0) ch_animator.SetBool("walk",true);
else ch_animator.SetBool("walk",false);
if(Vector3.Angle(Vector3.forw... | 1 |
228e7588b23aacfec31bf59f25b9ee67 | d84073ccc53c75d5b0bd51dfdc784c19 | check if link returns 200 OK | response = @client.start { |http| http.get(@url.path) }.code
response == '200'
end | 1 |
f3a252282fa8e2222d070ac871b395fd | b17bb789fe38bda383732ec9c8af5266 | constructor. params: position to spawn at, how long between particle spawns, how many particles to spawn | export default class SpawnPoint extends Actor
constructor(game: Game, sprite: Sprite, frequency: number) {
super(game, sprite);
this.sprite = sprite;
this.frequency = frequency;
this.top = 100;
this.counter = 0;
} | 0 |
d0c2c0c1f17035821f31a6e2bfea94e4 | 454ca723dcfbdd0380c7f3a6b8d84038 | Affiche en tenant compte du ALPHA (transparence) dans la couleur.
(On utilise glBlendFunc et glEnable). | namespace vie
void Terminal::start_display() {
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
select_font(text_engine::REGULAR);
} | 1 |
a1381f12208e08ac8c9593bc3339eb46 | 96b6fbda94e05b9645c603e280ea5ef3 | Execute a lifx callback method and wait for a response. | self._host_conn.send((name, args, kwargs))
reply = self._host_conn.recv()
if isinstance(reply, Exception):
raise reply
return reply | 1 |
1c9512cb85401f29312d9ddd9a2c1d1b | 1c482f63d0b71b25230bd130df2d23e6 | https://atcoder.jp/contests/typical90/tasks/typical90_ap | input!{
n: usize,
a: [i32; n],
b: [i32; n]
};
let &min = a.iter().min().unwrap();
let &max = b.iter().max().unwrap();
let mut ans = 0;
for m in min..=max{
let mut flg = true;
for i in 0..n{
if !(a[i] <= m && m <= b[i]){
flg = fa... | 1 |
b2bdda1cd9c2561306afa895b9c0bb29 | 76cad529cea2746710dae68dc3a71b0e | Resets the lexer context object //ctx//. | namespace
void Reset(Ctx& c) {
c.ast.Reset();
c.values.clear();
c.functions.clear();
c.opstack = stack< TERM >();
} | 1 |
83a2e44bbd5b6d87d1dbbf19719d2059 | 4a962600a1e134677f006e0447524bc1 | Returns true if this tag does not requires a matching closing tag,
which is the case for certain elements such as br and img. | boolean isSelfClosing(); | 1 |
d8e8b97bcd0728b84e5cce7b8f1f5256 | 122da772c7698d124d5a3b3f4c9f8179 | setter for isHierarchical - sets True if this LAT is part of a specificity hierarchy. E.g. LAT generated by focus or evidence match is not, while LAT generated by WordNet or YAGO is. This allows e.g. WordNet specificity matcher to match between WordNet and non-hierarchical LATs, but not between WordNet and YAGO LATs ... | @JsonIgnoreProperties(ignoreUnknown = true)
public class CategoryIndexPojo
public void setSelfBuilt(boolean selfBuilt) {
this.selfBuilt = selfBuilt;
} | 0 |
365d0d38c0067c6445ccd62e662424e1 | e584b8d261baddc41393a2199d127128 | @brief Attribute Write Access
This function is called whenever the Application Framework needs to check
access permission for an attribute write. | {
gattAttribute_t* pAttr;
uint16 handle = pMsg->readReq.handle;
pAttr = GATT_FindHandle( handle, NULL );
if ( pAttr == NULL )
{
return ( ATT_ERR_INVALID_HANDLE );
}
return ( GATT_VerifyReadPermissions( connHandle, pAttr->permissions ) );
} | 0 |
6a76666e31c9e476b2444b296214bb1f | b0cf93f983448e534bd8c5b65e807958 | Perform the dq_init step on a JWST datamodel | def correct_model(input_model, mask_model):
output_model = do_dqinit(input_model, mask_model)
return output_model | 1 |
fe2716aa11a16fc79391e08627a993aa | 4cf59705f74c71f932b8742496f633b5 | развёртка главного окна | namespace dot_shop
[Serializable]
public partial class MainWindow : Window
private void ButtonFull_Click(object sender, RoutedEventArgs e)
{
if (window.WindowState == WindowState.Maximized)
window.WindowState = WindowState.Normal;
else
window.Windo... | 1 |
ca231a41b4d11fa364bf0d94d19c35c9 | aec8f647366f4eaa1eaf1e5cbf508735 | Função que retorna o maior valor, o menor valor e o valor médio de uma lista numérica recebida, utilizando o paradigma funcional | function f(arr) {
return [Math.min(...arr), Math.max(...arr), arr.length, avg(arr)]
} | 1 |
b2a0cbcaeb48a82b025f5a1ffa23fd8b | 0e6113801c4689175bbbb77dd5470f8e | Get all printers count | {
return InkServicePrinters::find()->select([
'name as value',
'name as label',
'id as id',
])->distinct()->asArray()->all();
} | 0 |
ec8a4493bd1fe692af000e0860f52edb | c716633aeaa65db5ab89d1bf3e3a60f6 | IUNI 用户中心用户登录频次按条件查询 | public Integer queryIuniUserLoginNumCount(Map<String, Object> params); | 1 |
ed467aaa21815d1c19554454876d2299 | f52ac446bdd522fc9997be9eb0cfad6f | Traverses a binary tree Post-Order (LRN) and performs a callback <see cref="Action{T}"/> on each node. | namespace at.markusegger.Lab.Library.DataStructures
public abstract class BinaryTreeNodeBase<TNode, T>
: TreeNodeBase<TNode, T>
, IBinaryTreeNodeBase<TNode, T>
where TNode : class, IBinaryTreeNodeBase<TNode, T>
public void TraversePostOrder(IList<TNode> nodesVisited)
=> TraverseP... | 0 |
67facb02b72c19d8a9f85dbc27e2d4b2 | 8ab1343f0898bfdccc677ffd2df1e6b3 | Notification that the registration status has changed. | if not isinstance(isRegistered, bool):
raise TypeError("Invalid Registered Status - should be bool.")
self._registered = isRegistered | 0 |
b0d6ce495a0689518132003204aece2b | 9b5c9afdb4722e191ca5f61bb18152ed | Lists all Comentarios models. | class CommentsController extends DefaultController
public function actionIndex()
{
$searchModel = new SearchComments();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider'... | 1 |
bc07bc827c39c6d18c23d2a3b3e83197 | dfcfda4b50374d2f37c89741965707fc | 第1引数と第2引数を掛け算し答えを返す。 | public class Memo7_1
public int kakezan(int i1, int i2) {
return i1 * i2;
} | 1 |
750da3ef3f812231833f0c98686dca45 | 8076da5d0ad791bd827a12e075cb9fad | Reads GRASP output grid files from file object and fills a number of variables
and numpy arrays with the data | d = {}
with open(grdFN) as grdf:
grdf.readline()
grdf.readline()
grdf.readline()
grdf.readline()
grdf.readline()
d["nx"] = int(grdf.readline())
d["x"] = map(float, grdf.readline().strip().split())
grdf.readline()
d["ny"] = int(grdf.rea... | 1 |
2d87a1ae755e6941dff669ff027b1a54 | 865907e2ca81cdbff86d5cff3d922361 | 根据指定playlist_id获取该列表下的视频id | class Spider(object):
def get_film_id(self, plid):
url = "http://pl.hd.sohu.com/videolist"
querystring = {"playlistid": plid, "order": "0", "cnt": "1", "withLookPoint": "1", "preVideoRule": "1",
"ssl": "0"}
retry = 5
while 1:
try:
film_ids = []
text = requests.get(url, params=quer... | 1 |
9bc7919ed4716a11e0e3780e046b9182 | 3b187cd591e278b8e8883ae885211f70 | This functions is responsible for returning the top documents in the
index. Top documents are the ones that contain terms which appear either
NOT too frequently or NOT too rarely. It returns a list of document
ids. | class TFRS(BaseModel):
def predict(self, docid, recnum):
return self.topsimilar[docid][0:recnum] | 0 |
f0c7e3edfd47a0a02c59031ee1efaf5e | bc6b2798ff9badbdeee65782295936a1 | Check to see if IsPartial property is set | class ItemScheme(MaintainableArtefact):
def is_partial(self):
return self._isPartial | 1 |
36853c5cb07391153f0ca9146935ab22 | 703d4b4e5ce7b8e8c850ea3223532fc6 | 计算两个矩形的并集。结果将是一个包含其他两个的矩形。 | export class Rectangle implements IEquatable<Rectangle>
public static union(value1: Rectangle, value2: Rectangle) {
let x = Math.min(value1.x, value2.x);
let y = Math.min(value1.y, value2.y);
return new Rectangle(x, y,
Math.max(value1.right, value2.right) - x,
... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.