query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
ef958dca131b858c3c2a59f286f1c37e | dbe1c10eaaa7f1af78225e3c578d2afe | Re-validate the data points for segment implementation. | class GpArray:
def validateExpansionSegs(self):
dbids = []
content = []
expansion_seg_count = 0
if len(self.expansionSegmentPairs) == 0:
raise Exception('No expansion segments defined')
expect_all_segments_to_have_mirror = self.segmentPairs[0].mirrorDB is not None
... | 1 |
d3f4fbee8b609a13013596cf6bfb7e80 | 3e687eac6082229948063cbadcac16c4 | Sets the message of the day to a new value.
Syntax: /motd_set (new message of the day) | class RFC1459Support(BasicClient):
async def on_raw_372(self, message):
self.motd += message.params[1] + '\n' | 0 |
87bbe7e3758b22d84586ab60c4546038 | 6bca3f48fca998c6310ee3666bcb9cca | 不使用判断求绝对值 | int ABS(int n)
{
return n < 0 ? -n : n;
} | 0 |
3f155215334fd585412d168f9488a464 | 79ab9466edc238aa9c2d980df8394116 | Hromadná archivace/dearchivace úkolů | namespace MS.Taskit
public class TaskManager
public void ArchiveTask(int taskId){
var task = TryGetTask(taskId);
if(task != null){
task.Archive();
}else{
this.InternalSetTaskStatus(taskId,TaskStatus.Archived);
}
} | 0 |
130b89a6c2ded805fd5a789b75c5a939 | 09ced87a80da875f7fbabde15b194de6 | REQUIRE COMPONENT to be on SPECIFIED COMPONENT'S GAME OBJECT:
Require the specified Component type to exist on the specified source Component's GameObject. | namespace MiniEcs.Core
public class EcsFilter : IEquatable<EcsFilter>
public EcsFilter AllOf<TC0, TC1>()
where TC0 : class, IEcsComponent, new()
where TC1 : class, IEcsComponent, new()
{
return AllOf(EcsComponentType<TC0>.Index, EcsComponentType<TC1>.Index);
} | 0 |
be9487c6864e8e1eb8da1f91a545592d | ecd395c071c324871f29b77fc7cd796e | Update user profile to add registrations table and miscellaneous (future) preferences. | class RS_Person
public static function add_registration( $user_id, $registration_id ) {
$registration = new RS_Registration( $registration_id );
$person = new WP_User( $user_id );
$registration->set_user_id( $person->ID );
$registration->save();
$custom_fields = RS_Custom_Field::get_all( array( 'reg_only... | 1 |
923c125a2dd52088f795da52edeb1c9a | 2210737ce91e48f6ceda8cbfca189c97 | Insert or Update a new Affiliation | namespace Biz.Interfaces
void InsertOrUpdate(Association association); | 1 |
6aababd36ccdde61823c5bf4ae37f31e | 40e2ab14dfd4bf8f922527a0ae16512a | Gets the compatibilityMode property value. Controls what compatibility setting is used for specific sites or domains. The possible values are: default, internetExplorer8Enterprise, internetExplorer7Enterprise, internetExplorer11, internetExplorer10, internetExplorer9, internetExplorer8, internetExplorer7, internetExplo... | @XmlAccessorType(XmlAccessType.FIELD)
//@XmlType(name = "", propOrder = {
// "configuration"
//})
@XmlRootElement(name = "MetaDataObject", namespace = "http://v8.1c.ru/8.3/MDClasses")
//@XmlRootElement(name = "ConfigurationObject" )
public class ConfigurationObject @XmlAccessorType(XmlAccessType.FIELD)
@Xml... | 0 |
3ae0e5628fd092a13f46e15150e400c2 | 074ddba48e392f74624ff3c5c7c8e4ee | Returns the meta object for class '{@link org.openhealthtools.mdht.uml.cda.phcr.flu.InfluenzaPHCRSocialHistorySection <em>Influenza PHCR Social History Section</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getInfluenzaSignsAndSymptomsObservation(); | 0 |
0e1680015d3e02c9716f0091bd82fbbb | b058404c285260e7bc21d2badd2bf43a | afficher tous les devoirs | namespace form_Notes
public partial class Form1 : Form
private void AjouterLignesDevoirs(Dictionary<int, cls_Devoir>.ValueCollection pDevoirs)
{
foreach (cls_Devoir l_Devoir in pDevoirs)
{
DataGridViewRow row_Devoir = new DataGridViewRow();
DataGridVie... | 1 |
8296efbafc35fb25e4105035dbaa5e00 | cc816efbc0c4d6e1e1f23e321d529f8b | gets an array of cupcake objects | def get_all_cupcakes():
cupcakes = [cupcake.serialize() for cupcake in Cupcake.query.all()]
return jsonify(cupcakes=cupcakes) | 1 |
54012c68a211c5120b0fda422290aa26 | 1b57a97d69357044ad843b0f953a7ca7 | 随机位置已存在物体时扫描屏幕空位 | public class MapCreation2 : MonoBehaviour
private Vector3 CreateRandomPosition()
{
while (true)
{
int posX = Random.Range(-550, 550);
int posZ = Random.Range(-550, 550);
if ((posX < -100 || posX > 100) && (posZ < -100 || posZ > 100))
{
... | 0 |
9f401caade62eddc5a1edf455afafc2b | 5cfce3b8c74fe6b5b9b06c569c57087e | This method will construct the card for share feedback bot menu. | TextObject textObject = new TextObject();
textObject.text = shareText;
return textObject;
} | 0 |
caf56610298908664c1255823c4a6dd4 | 9fa01bf4e80e5d35e0198491fef08bda | 更新变量池的值,先更新子模板的变量,找不到后再更新变量池的变量
因此重复变量将仅影响本次子模板的值,不会影响全局 | try {
const { status, data } = await axios.patch('/api/variable/update/?id=' + id, variable);
if (200 == status) {
context.commit('updateVariableInCurrentScriptInState', data);
return true;
}
return false;
} catch (err) {
... | 0 |
e0e134df020aaa39ea78d2ca91a6e83a | b107180e1ad738138e21a294bce80bd0 | kill the web server | {
if (_webServerProcess != null && !_webServerProcess.HasExited)
{
_webServerProcess.Kill();
}
if (_webServerTask != null)
{
_webServerTask.Wait();
}
} | 1 |
8689c2208986712418178997d82946db | a323285fd5ac098bc5c19ee7025cef5d | Adapted from https://stackoverflow.com/a/30990617 | print("Dumping stack traces for all threads in PID {}".format(os.getpid()))
id_to_name = dict([(th.ident, th.name) for th in threading.enumerate()])
code = []
for thread_id, stack in sys._current_frames().items():
code.append("\n# Thread: {}({})"
.format(id_to_name.get(thread... | 1 |
e11521ce0945b54355d67d770dc3a93a | 7b2b0ba98a633ba4237186607da1f735 | Create a new pipeline with all attached channel handlers. | public class ChannelPipelineFactoryImpl implements ChannelPipelineFactory
@Override
public ChannelPipeline getPipeline() throws Exception {
ChannelPipeline pipeline = Channels.pipeline();
for(ChannelHandlerProvider provider: handlers) {
pipeline.addLast(provider.getHandlerName(), provider.getHandler());
}
r... | 1 |
09eb5ce68f32b568d284ba68cf2bb4e7 | 30efddbbaf0f640e015677634079ac8c | Возвращает ссылку на ИД языка в БД | @Entity
@Table(name = "book_languages", schema = "KunderaExamples@hbaseTest")
@IndexCollection(columns = { @Index(name = "languageId"), @Index(name = "language") })
public class Languages
public String getLanguageId()
{
return languageId;
} | 1 |
cbf98c05ed2776c8aca1b5fe7c39b143 | 8bd3d80dede700729cf507369af177e7 | 高度を受信データから取り出す | public class Main_menu_scr : MonoBehaviour
public void setheight()
{
Global.height = (int)height_slide.value;
h_txt.text = "Height: " + Global.height;
} | 0 |
059c9b664f3a9467eee0223773870f2b | 2d33730841bc24c649b289e43906083a | 取得 subtitle 的数组的方法 | public class SubtitleController
public SubtitleTrack[] getTracks() {
SubtitleTrack[] tracks = new SubtitleTrack[mTracks.size()];
mTracks.toArray(tracks);
return tracks;
} | 1 |
5018315ad4066c769800fc54d338a3f9 | 56c49f3295d60e7b5a8f33832e8f5f7b | 对接收到的包进行处理,将其行结束符转化成本机的行结束符 | for (int i = 0; i < messageLength; i++) {
if (charBuffer[i] == '\r') {
cout << "\\r";
} else if (charBuffer[i] == '\n') { ... | 0 |
5531e28678fa36db536220303d7e39c9 | 1cf573ee5048c73fb8552611df4d9254 | create a smaller event data csv file that will be used to insert
data into the Apache Cassandra tables | if eventdb.empty == True:
print('DataFrame is empty. Check that event ' + str(ffname) + \
' exists. Will not write to Hypoinverse file.\n')
return
print('Writing event data to Hypoinverse file: '+ \
str(eventdb['evid'].iloc[0]))
wsp = ' '
yr = wsp*4
mdhm = w... | 0 |
eb9e2b3db870e05ea343fa6d2032244b | 4a6e8a64fee52674cb66b192bf7bb12f | Function to undo the validation | class MultivalidatableBehavior extends ModelBehavior
function restoreValidation(&$model) {
$model->validate = $this->__oldRules[$model->name];
} | 1 |
3016ff63520c134e1dad975b9017018e | 71a4be268916ac3580a7a4969c9cf68d | hide all dropdowns that are still open;
or allow them to be shown again | function showAllDropDownSections() {
$('.hs-toggler a:first-child').not('.open').each(function () {
$(this).click();
});
HSShowAllCSections();
} | 0 |
71ad89aafa6f943ca8adf724fb57ec4e | 178b87483cfd8e5e6823973fa70d3d29 | 查询当前线程是否保持此锁。 | public class HwddReentrantLock implements Lock abstract static class HwddQueuedSynchronize extends AbstractQueuedSynchronizer
@Override
protected boolean isHeldExclusively() {
return Thread.currentThread() == getExclusiveOwnerThread();
} | 1 |
9492d20f8b414e461a300ae120671dfa | 8fe8be4bf9ee32f0201301c6da1fe8d6 | 通过反射机制设置移动网络 | public class NetworkUtil
private static boolean setMobileEnableOnTelephony(Context context, boolean enable) {
boolean success = false;
try {
TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
Class telManager = telephonyMan... | 1 |
3863be9979eb5a2ef0366eb4d2cf47ec | 39f00d7dd51b4d887d6063f26aab8bbc | 通过学生名查看学生答题情况,兼容以后的免费课有权限表 | public List<StudentAnswer> findByClassAndByLenName(@Param("teaClass") String teaClass, @Param("teaCourse")String teaCourse) throws Exception {
List<StudentAnswer> byClassAndByLenName = scoreMapper.findByClassAndByLenName(teaClass, teaCourse);
System.out.println(byClassAndByLenName.size());
f... | 0 |
c2d30d9100a7691efd1d074118ba7d2d | 1f9295aa4ed276553ef99781887048c8 | Gets the conferenceId property value. The conference id of the online meeting. | class Conference
public function getCnfId()
{
return $this->cnfId;
} | 1 |
76729c483d0d274df0231ffa0b24d53e | fb65a745d44b8e46f40b7383a1b66543 | Get 子目录列表
注意:此字段可能返回 null,表示取不到有效值。
注意:此字段可能返回 null,表示取不到有效值。 | class ShowDirectoryTreeResponse(SdkResponse):
def sub_directories(self, sub_directories):
self._sub_directories = sub_directories | 0 |
b23b406994d4fbac5bc1812829bc8935 | 397cbabcf3f4c891379cbd463ac8087b | カメラ行列(右手系)を設定する。 | namespace lib3ds.Net
public static partial class LIB3DS
public static void lib3ds_matrix_camera(float[,] matrix, float[] pos, float[] tgt, float roll)
{
float[,] M=new float[4, 4];
float[] x=new float[3], y=new float[3], z=new float[3];
lib3ds_vector_sub(y, tgt, pos);
lib3ds_vector_normalize(y);
if(y[... | 1 |
9cfea19ac908493dda2ecb63d9ea8828 | 4d4cdec344e70160dbdea1582080c52b | Логирование при сохранении сервиса | {
parent::finishSave($options);
DB::listen(function ($sql) {
foreach ($sql->bindings as $i => $binding) {
if ($binding instanceof \DateTime) {
$sql->bindings[$i] = $binding->format('\'Y-m-d H:i:s\'');
} else {
if (is... | 1 |
363eaa34b934ca6673913d7df9a4d51b | f7d139a80280384c10222390ebedee0a | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% %
% %
% %
... | ZH_FUNC( ZH_GETSTDOUT )
{
zh_retnint( ( ZH_NHANDLE ) s_hFilenoStdout );
} | 1 |
5303f81406a588061dedc29a73145a8c | 794fe24c51c1cc0b2d2124e8511f7fa9 | Set extracted OS. | {
if (!$this->os) {
$this->os = strtoupper(substr($this->uname, 0, 3));
}
return $this->os;
} | 1 |
555c8607edaaaa2829fc19aead51a956 | 40bb93dd13c316ad6e2d2a97c9e9172c | 复制邮箱地址 | export class AddFriend extends Widget
public copyAddr() {
copyToClipboard(this.props.address);
popNew('app-components1-message-message',{ content:this.language.tips[0] });
} | 1 |
2d62c8e604bc12393bab027abfd1d137 | d361b4dfe6c422427646e9aef098aa74 | Draw all the white pieces in the List. | for(int i = 0; i < mWhiteArray.size(); i++){
Point whiteP = mWhiteArray.get(i);
canvas.drawBitmap(mWhiteChess,
(whiteP.x + (1 - mRadio) / 2) * mLineHeight,
(whiteP.y + (1 - mRadio) / 2) * mLineHeight,
null);
}
fo... | 1 |
cc21733f390e846cdeb48a748d8e8751 | bd4e2f2ab9009d496447f169469a5b44 | plots set of light curves after each given function
meant to see affects of functions on each target's light curve/aperture
:fout: output folder
:save_fig: save figure to pdf as apposed to showing the plots
:funcs: list of functions that take in target
:kwargs: optional arguments for list of functions, unique for each ... | figs_list = []
for source_index, s in enumerate(Solver.calc_sources):
calc_source = Solver.calc_sources[source_index]
real_source = Solver.real_sources[source_index]
my_title = s.name
my_observations = calc_source.obs_times
source_params = np.array(calc_source.s_old)
... | 0 |
b5f907abb27800eaf3cd53c43f25771f | f07185e43470fca228c1b1545e0c2b39 | Take in a hex string and convert it to a list of bytes. (This should effectively "undo" the question 3.) | class SoftBasic:
def HexStringToBytes( hex ):
return bytes.fromhex(hex) | 1 |
b7b3d0faec7dc92eb912cf1514e5a7bc | 1f68d932c7e444b756c51c8fda0f5bea | Test Scheduled Task on lot without an alert_date does not create an activity | class PlannerTaskSchedulingTester(unittest.TestCase):
def test_scheduled_task_without_date_raises_exception(self):
self.planner.dayfile = StringIO(self.daytemplate_noscheduledate)
self.assertRaises(
BlockedTaskNotScheduledError, self.planner.schedule_tasks
) | 1 |
b59eabcfdced43d793c7b8f9b466073e | 8d9c024895514d562a1cd5b1f5f282d2 | Получает список уникальных идентификаторов категорий для конкретного списка внешних идентификаторов продуктов. | class Order_Model_ProductMapper extends STLib_Model_ModelMapper
public function getCategoryIdsOf($productId)
{
return $this->getFieldListFromDependentTable(
$productId,
'Order_Model_DbTable_ProductCategoriesAssoc',
'Product',
'category_id'
);
} | 1 |
73f5722c2429f4c5254988d3b5201828 | f8bd78953b6d1b2e0467907ef7d8dd1b | 上传json数据保存评论页面 | public class OrderCommentActivity extends BaseActivity
private void commitCommentInfo() {
try
{
JSONObject json = new JSONObject();
json.put("productScore","4");
json.put("userIp", MyTools.getLocalIpAddress(this));
json.put("memberEmail","meco@qq.com");
... | 1 |
0ea63d7e1cea0a2fce99bbffa20335bb | 9b5a6c42ba897f5fa82dde481ad9ac87 | QUANTIDADE DE BANNERS POR PÁGINA DA AREA DO TOPO NO CARROSSEL | var tamPag = 0;
if (tam <= 100)
tamPag = 20;
else if (tam <= 1000 && tam > 100)
tamPag = Math.floor(tam / 3);
else if (tam <= 10000 && tam > 1000)
tamPag = Math.floor(tam / 10);
else if (tam <= 100000 && tam > 10000)
tamPag = Math.f... | 1 |
19449aec7a441a5b099b76e0709b5d68 | d1adb2d6441263a53c030e33f519c564 | 通过clinicNo获取clinic | var requestParam = getRequestParam();
requestParam.commandinfo.openid = $("#open_id").val();
var url = vge.webcontext + '/clinic/queryClinicInfo.do';
vge.ajxpost(url, JSON.stringify(requestParam), 100000, function (data) {
try {
var jo = JSON.parse(data);
if (jo.result.co... | 0 |
31c274e5bbf59cd6f3c8b2bbd7abe1aa | 51ea3630bfd11c478f229b23e9d1450b | Return bytes occupied by clip | class Const :
#file extensions
def N_CLIP(self) :
return 8 | 0 |
9d89824b96a5edb0518999eb69341f27 | ef943afb9de5cfefc1f9cc93a008d371 | Set window maximized state | class IITBrowserWindow
def maximized(value)
@ole.Maximized = value
nil
end | 1 |
b323ace0060d2e6901c021855b8ad885 | 27d58a397372c20eb2f6ff8820a4168f | Helper function that removes unnecessary information from lines in TED Corpus | def clean_line ( s ):
s = s[3:-3].replace("', '","+").replace("']\", \"['"," ").replace("'","").replace("{SUPANN}","")
return s | 1 |
d05e4494227e0c5d046901dfa6683f98 | 424b4ed70065a1dfe32d1a308fdd365b | 设置需要下架的产品id。多个产品ID用英文分号隔开。
参数示例:<pre>109827;109828</pre>
此参数必填 | class AlibabaDistributorFastConsignParam
public function setProductId( $productId) {
$this->sdkStdResult["productId"] = $productId;
} | 0 |
fa5439bf84a316d1bd525db7bd61a283 | f9a43d17312f285de72d93f9e5e7bcae | Change "Posts" objects to "News". | function revcon_change_post_object() {
global $wp_post_types;
$labels = &$wp_post_types['post']->labels;
$labels->name = 'News';
$labels->singular_name = 'News';
$labels->add_new = 'Add News';
$labels->add_new_item = 'Add News';
$labels->edit_item = 'Edit News';
$labels->new_item = 'News';
$labels->view_item =... | 1 |
58092211da01783fb429da9981df6f69 | 5bb4634edfffa82ea2db47c6768631ec | 根据热敏单号列表查询表thermal_tracking_number_print_record,得到该热敏运单号列表中每个运单的最近的一条打印历史记录信息 | public List<PrintTMSPackNumberListDto> GetPrintTMSPackNumberList(Guid sysId, Guid warehouseSysId)
{
_crudRepository.ChangeDB(warehouseSysId);
return _crudRepository.GetPrintTMSPackNumberList(sysId);
} | 0 |
2c5c45e7ce196cf1dddddbaf7c8295cf | f3c9b5ccb5ff5507e66408752e48774d | log in and sign up options | class SwitchScreen(ScreenManager):
#Switch Screen is the main screen manager of the application
def loginC(self):
self.l = LoginScreen()
self.l.set()
self.add_widget(self.l)
self.current = 'login'
self.s = SignUpScreen()
self.s.set()
self.add_widget(self.s)
... | 1 |
d50b43af008cd96a8665b7772a80737b | e4df468507ce16d8805460d68f794c6f | 根据相册名加载图片 | public class VideoEditActivity extends BaseActivity implements FFmpegUtil.MediaInfoListener,
IMediaPlayer.OnInfoListener, FilterFragment.OnFilterSelectListener, View.OnClickListener, DecalFragment.OnDecalSelectedListener,
MusicFragment.OnMusicSelectedListener, OnItemClickListener, OnTabSelectListener,
... | 0 |
04ae7ca97a91f3dd059cf4047ed4fd96 | 52be87bf28729a2881f504b2ce884e19 | Convert tool list to Tool object | class ToolSection( object ):
def __init__( self, elem):
self.name = elem.get("name")
self.id = elem.get("id")
self.tools = [] | 0 |
25709e527c13cfff84aad798e0417714 | 34b8fe9aa2c66b10f20d1896fa5a88f0 | Applys changes and closes the form | namespace EVEMon.SettingsUI
public partial class SettingsForm : EVEMonForm
private void btnOk_Click(object sender, EventArgs e)
{
ApplyToSettings();
Close();
} | 1 |
e4c9aae7d5d3700d812ec603befa49da | ef38dbb1213bfdff74ca3c5a6a690463 | ファイル(XD形式)を保存する。 | public class XmlSaveModule : ISaveModule
public void Save()
{
if (m_SaveXE.IsNull()) return;
using (XmlWriter xw = XmlWriter.Create(Application.persistentDataPath + PathConst.Save,
new XmlWriterSettings() { Encoding = Encoding.UTF8, Indent = true }))
... | 0 |
ae4c15ef465df53a5d7693463f0780e0 | 50997feff11fb37efcc79bb8f8daaf9f | Класс для составления дерева ключевых слов(бора). | class Words(Base):
def __init__(self):
Base.__init__(self)
self.results = list()
self.combined_results = list()
self.meta_data = None | 0 |
0edd8620e89fc7f0ca224b355ecf4108 | bc4bcc6be985ac2960e62b0032133d0c | Set window position and size | self.setGeometry((Ws - Wa) / 2, (Hs - Ha) / 2, Wa, Ha)
self.setWindowTitle('Climate Change')
self.setWindowIcon(QtGui.QIcon('icon-water.png'))
self.show() | 1 |
e1ef1d311fb2b95f868dbd624f4992ec | 6645c9ce5808e066ee2e9e4a6d8ddf27 | Возвращает фильтр по агентам для запроса | scanner_id = 1
limit = 50
offset = 0
pages = None
query = self._parse_filters(filters,
self._api.filters.agents_filters(), rtype='colon')
if 'scanner_id' in kw:
scanner_id = self._check('scanner_id', kw['scanner_id'], int)
if 'offset' in kw... | 1 |
dd6dc68d939fa0e9591373805fd67104 | c5ceae9d201535648c783476badfdd64 | metodo que cadastra lojas na aplicacao | class LojasController
def incluir
@loja = Loja.new
end | 0 |
5592886b0fcfae249c2eda73261283d2 | 7dea0b2551cb42b12b8cf552014f653f | Returns the value of field modificado_por | class bitacoraUsuario implements JsonSerializable{
public function getColumnaModificada()
{
return $this->columnaModificada;
} | 0 |
bf6a36fe4a4d60334e8b596d444a95f2 | d9525c7df1c0839a55d8856c853398e4 | 获取我的页面的找回支付密码页面的title | class SNB_My_page(Snb_My_Page_UI):
def get_my_modify_payment_password_title_Loc_page(self):
return self.get_my_modify_payment_password_title_Loc().text | 1 |
ac405f2754eef8476ef2e18c0a4542cf | 7a40974175ee9e37f32f174e2eda48c4 | 原始图片提取经纬度信息 | @RequiresPermission(value = Manifest.permission.ACCESS_MEDIA_LOCATION)
@RequiresApi(Build.VERSION_CODES.Q)
fun getMediaLocation(uri: Uri, block: (latLong: FloatArray) -> Unit) {
val photoUri = MediaStore.setRequireOriginal(uri)
FileOperator.getContext().contentResolver.openInputStream(photoUri)?... | 1 |
04afb050cbff344b3afd5453250367e5 | f36387d561f1841d6f296c672521f51b | Updates user profile without image | user = request.user
found_user = self.get_user(username)
if found_user is None:
return Response(status=status.HTTP_404_NOT_FOUND)
elif found_user.username != user.username:
return Response(status=status.HTTP_400_BAD_REQUEST)
else:
serialize... | 1 |
921925a464fe21dcdc4a7523b1a6b3ed | e5cc1a8495bcaf6e44b057436005df73 | Attach a click event to a legend item. | class Chart extends \Kendo\UI\Widget
public function noteClick($value) {
if (is_string($value)) {
$value = new \Kendo\JavaScriptFunction($value);
}
return $this->setProperty('noteClick', $value);
} | 0 |
8cb10944d49f36b029993f5bbec864ae | 4569942f1a70aaae3007e857319d05cc | 根据token获取access_token | public class SignNonTimeUtil
public static String getAccess_token(String appid, String appsecret) {
String token_url = "https://api.weixin.qq.com/cgi-bin/token?" +
"grant_type=client_credential&appid=APPID&secret=APPSECRET";
String requestUrl = token_url.replace("APPID", appid).replace("... | 0 |
be2586a68d86028964ef5be7a618bff8 | 55db52788706cef826aec301b01c7dfa | 获取上一次发送时间 | {
int last_index = index - 1;
double last_timeSend = 0;
if (last_index > -1 && last_index < msgList.Count)
{
MessageObject last_msg = msgList[last_index];
last_timeSend = last_msg.timeSend;
}
return last_t... | 1 |
4d3b970c39b5cd06668d356ff5247904 | 8d070d1a5b9b828294c1ec96e39a3f9c | Function: PrintPlayerDetails
Outputs the players details to the console | System.out.print(players[position].getUsername() + ",");
System.out.print(players[position].getFamilyName() + ",");
System.out.print(players[position].getGivenName() + ",");
System.out.print(players[position].getNumberGamesPlayed() + " games,");
System.out.print(players[position].getNumberGamesWon() + " wi... | 1 |
3d07b12cf9c20b1d5c99aef5ad798044 | 1e7756f824fb8f4710a028012d667549 | 根据分支获取所有的commit | {
set_time_limit(0);
$id = $this->input->post('id');
$branch = $this->input->post('branch');
$repos = array();
if (file_exists(APPPATH.'cache/repos.cache.php')) {
$repos = file_get_contents(APPPATH.'cache/repos.cache.php');
$repos = unserialize($repos);
... | 1 |
48fe0c214d59bf01349014bd2ffa0599 | 61b058ac2b12b88d6336b1273bc52421 | r"""Semi-Orthogonal Matrix Initialization Scheme for Deep Models
Paper: Exact solutions to the nonlinear dynamics of learning in deep linear neural networks
Authors: Saxe, A. et al.
Year: 2013 | def ortho_init(scale=1.0):
def _ortho_init(shape, *_, **_kwargs):
shape = tuple(shape)
if len(shape) == 2:
flat_shape = shape
elif len(shape) == 4:
flat_shape = (np.prod(shape[:-1]), shape[-1])
else:
raise NotImplementedError
gaussian_noise =... | 1 |
c54dbadae554a3e88cc0081e296f93b7 | d657f34f272d29bcb1eb516960b46d3d | Read the target output current. | class CPX400DPDriver(SCPI):
def read_current_limit(self):
function_string = 'I' + self.output + '?'
value_string = self.scpi_comm(function_string)
try:
value = float(value_string.replace('I' + self.output, ''))
except ValueError:
value = -999999
return val... | 1 |
6148de4eca1998959dc198b4368913eb | 974303f9815ce29fb02328c212694e3f | Sets the state of the RW | void setReadWrite ( boolean readWrite ); | 1 |
8963d48cc82dd34e5f4e606c9157c363 | d201bbbd7e6693311381349213c453c8 | Content Assistant: Analyse content. | class PW_Comment
function _analyseContent($uid, $content) {
$array = array();
if ($refer = $this->_analyseRefer($uid,$content)) {
$array['refer'] = $refer;
}
return $array;
} | 1 |
77d13b7e97853103feb7ab39d14ce7ca | 24b368a171bedf1f51eb0a13609e257e | Method to attempt to implement Hungarian Algorithm | namespace Hungarian_Method
public partial class Form1 : Form
private void SubmitButton_Click(object sender, EventArgs e)
{
if (!ValidateFields())
{
return;
}
HungarianAlgorithm();
} | 1 |
d2579d9d4148c40e73aa075115bc5607 | b3419744033b4bcab320f50d6e3635ec | Undo any global changes that the Agent may have made | namespace Microsoft.Practices.RecipeFramework.Extensions.Actions.VisualStudio
[ServiceDependency(typeof(IDictionaryService))]
public class BaseGlobalsEntryAction : ConfigurableAction
public override void Undo()
{
this.OnUndo();
} | 1 |
5147eb7d5f1d6703356bf3826b3c7aac | b3efc6e24468972f5133402e1a5775ac | Strip subwords of context and optionally the location indicator | def char_indices_to_word_indices(s, e, context):
tokens = word_tokenize(context)
sub = context[s:e]
offset = len(word_tokenize(context[:s]))
start = offset
end = offset + len(word_tokenize(sub))
assert start < len(word_tokenize(context)), (context, s, e)
if end > len(word_tokenize(context)):... | 0 |
06b1fc6494fc1bf660f7b5d80fefbe65 | 6d50d53484897545fa59a264c6706296 | Called when the Celery worker thread is ready to do work.
This is to avoid race conditions since everything is in one python process. | class GrpcService(Application):
def on_start_worker(app): | 0 |
949a2960bbd34f1ce1bf937963030b97 | 7e676fb06fdb53e8e7cd2f511af26395 | 根据获取的卡卷信息,显示卡卷图像 | switch (label) {
case 0: ui->card0Label->setPixmap(cardHolder.at(index));
break;
case 1: ui->card1Label->setPixmap(cardHolder.at(index));
break;
case 2: ui->card2Label->setPixmap(cardHolder.at(index));
break;
case 3: ui->card3Label->set... | 1 |
3418da413c506b876a08212813b686c5 | 24e2af1ef67489a48d4c5371492140b5 | Load the cached events. | local function ReadMapEvents()
if MemoryCacheStillValid() then
return _CachedMapEvents
end
return memory.ReadAllMapEvents()
end | 1 |
8e347cff8b95f7694197d26336959823 | ca2cbfd64166c13a81223174fde0054a | Gets the list of occurrences for the word | {
int pos = 0;
List<int> lstCount = new List<int>();
bool enableBreak = false;
if (extractionType == ExtractionType.FirstOccurance)
enableBreak = true;
while ((pos < sentence.Length) && (pos = sentence.IndexOf(word, pos)) > -1)
... | 1 |
7381c91c637c06a8ef38b38bc089c597 | 356a3aac4dadcf0d518af1f59bb94dad | Convenience method for a 0-parameter named query.
Added to facilitate implementation of named queries in generated
JPA controllers. | public <E> CompletionStage<INamedQuery<E>>
getNamedQuery(
AbstractUnitOfWork context,
Class<E> type,
String queryName)
{
return context.doGetNamedQuery( type,queryName );
} | 0 |
62925ca0acf52b82248ae8101fad8321 | c41f1be6dba8e6b7a95f147a60f21573 | The set:leading function returns the nodes in the node set passed as the
first argument that precede, in document order, the first node in the node
set passed as the second argument. If the first node in the second node
set is not contained in the first node set, then an empty node set is
returned. If the second node s... | namespace DigitalPlatform.Marc
public class MarcQuery
public static void insertBefore(
MarcNodeList source_nodes,
MarcNodeList target_nodes)
{
if (source_nodes.count == 0)
return;
if (target_nodes.count == 0)
return;
... | 0 |
b14e75aaa0db3415c19e3e14ea8b8542 | 456c7abe36aecd3c585946fb412e7a0f | get unsigned 16-bits integer (little-endian) | function _instance:u16be(offset)
return bit.lshift(self[offset], 8) + self[offset + 1]
end | 0 |
a0dcb1ad2b5899fe33ef18b4c59db236 | c6b71bb35c3ab7ca3d386b2b82d7dd3a | 设置车漆属性##################### | $("#car-light").html("");
$("#car-light").append('<i class="fa fa-circle ' + returnColor(data.light.brakelightleftactive) + '"></i><span title="brakelightleftactive">左侧刹车灯</span>' +
'<i class="fa fa-circle ' + returnColor(data.light.telltalefrontfoglight) + '"></i> <span title="telltalefrontfoglight">前雾... | 0 |
9b74e790708971a323d85412c58707f9 | 33eb7d157ab44eeb967cafdf4d665e1a | Peak-based frequency estimation with sub-grid accuracy
maximizer -- peak frequency on grid
P -- logarithmic periodogram, i.e power spectrum
grid -- local frequency grid in the vicinity of the periodogram peak
psi_hat -- frequency, i.e. sub-grid peak position | sf = mod.sf
eps0 = mod.eps0
ehkl = mod.ehkl
tdat = mod.tdat
phis = mod.phis; psis = mod.psis
nphi = mod.nphi; npsi = mod.npsi
sin2psi_=[]
for i in xrange(len(psis)):
sin2psi_.append(np.sign(psis) * sin(psis)**2)
spc = np.linspace(np.min(sin2psi_),np.max(sin2psi_),ntot)
... | 0 |
f12dbf6a8c791ae1b15731c846baaf1c | f166370b262767e94aca006f83a3cef7 | Evaluates the need to wrap a method for overriding
and returns the appropriate version.
If `value` is null, returns the `baseValue`.
If `value` doesn't call `this.base`, returns `value`.
Otherwise, returns a wrapped method that calls `value`,
and modifies its `valueOf()` and `toString()` methods
to return the unwrapped... | class TaskDef<ResultT> implements ITaskDef<ResultT>
private wrapTask(input: any) {
if (typeof(input.run) === "function") {
return input;
}
else {
return new WrappedValue(input);
}
} | 0 |
0513c81aec6423527c165983ec5fb46d | 5118dd233eb2f9a7535e51b6054c498e | CDisplaySL::InvertRange(cp, cch)
Invert a given range on screen (for selection)
TRUE if success | void
gui_mch_invert_rectangle(
int r,
int c,
int nr,
int nc)
{
RECT rc;
rc.left = FILL_X(c);
rc.top = FILL_Y(r);
rc.right = rc.left + nc * gui.char_width;
rc.bottom = rc.top + nr * gui.char_height;
InvertRect(s_hdc, &rc);
} | 0 |
6426de5555ff14969d184ef86f1b658a | 90eff6d254ffd53716e76aa971c6bd27 | Create or update a SUMO cron deployment | {
Camunda.OpenApi.Client.Client.ApiResponse<DeploymentWithDefinitionsDto> localVarResponse = await CreateDeploymentWithHttpInfoAsync(tenantId, deploymentSource, deployChangedOnly, enableDuplicateFiltering, deploymentName, data, cancellationToken).ConfigureAwait(false);
return localVarRes... | 0 |
67283c4702e37e670f6154709ff1f837 | 7fe6e837a9dfb415722d9cee7a902ca7 | Create a new instance from an array for a root filter. | public static function fromArray(array $data = array()); | 1 |
58d50ffbef8fc2a051cb22fac3a2177c | a4d34e39991d063fde981cf964e76c26 | Risolve un questo oggetto Campi.
<p/>
Dopo la risoluzione tutti gli elementi fanno riferimento
a oggetti Campo e non piu' nomi di campo.<br>
I Campi vengono recuperati dal modulo fornito. | public final class ContatoreModello extends ModelloAlgos implements Contatore
@Override protected boolean eliminaCampiSuperflui() {
return true;
} | 0 |
cc0ae6b72813f1bbeb4cde343aa16371 | 982503ce27f9da679a1b48f6f79c0694 | @brief Get FEC Setting for forced Speeds. Will be rewritten in FEC_control | uint32_t nFSDI)
{
uint32_t nFSD;
switch(nFSDI)
{
case 0:
nFSD = 16;
break;
case 1:
nFSD = 24;
break;
case 2:
nFSD = 32;
break;
case 3:
nFSD = 40;
break;
case 4:
nFSD = 48;
brea... | 1 |
f02505055f58ca48ef15551978e5ea81 | 07f03edfcb1d3682b831bb1a4405f862 | 五星通选显示界面 | class Fast extends Home
public function index(){
$number = getNumberCache('fast');
$stage= key($number);
$numbers =$number[$stage];
$number_arr = explode(',',$numbers['number']);
$ssc = setFastStageTime($stage);
return view('',[
'stage'=>$stage,
... | 0 |
75351479b028e5bc4e137a55d7e6fb26 | f5a7beb2a2de022cc11395c1976e5746 | 如果啟用了MonoBehaviour,則每幀調用Update。 | public class MonsterCtrl : MonoBehaviour
void Update () {
} | 1 |
b701e1567fe65fbdf31045d4dff8cbd2 | ee4de8a86e79815d0b65b6ac3d89f566 | attenuates signal aberrations in phase contrast image using FFT bandpass filters | def chop_freqs(band):
fourier = ftp.fft(band,axis=0)
freq_bins = ftp.fftfreq(sp.shape(band)[0],d=1.0/fps)
lower_index = sp.argmin(abs(freq_bins-lower))
upper_index =sp.argmin(abs(freq_bins-upper))
fourier[2:]*=30
fourier[2:lower_index]*=0
fourier[upper_index:-upper_index]*=0
if lower_index != 0:
fou... | 1 |
eb165d89e359b402bd727cfe366185f7 | 2e3650960ecd012cb0e662ee4f10f493 | Called when a member leaves the election. | public class Gradient3 extends SingleValueHolder implements CDProtocol
public void youAreOutOfElectionGroup() {
electedLeader = null;
electionGroup.clear();
} | 1 |
98dfe6a32f652271f1d87f533a965617 | 54d1c4e3c74519f1f2a7e3078d4fab1b | Calculate the distance between two EpPoints | {
double ret=0.0;
Point3Dd v(ep);
v -= sp;
Point3Dd s(this);
s -= sp;
double num = v.scalarProduct(s);
if (num < 0){
ret = distance2(sp);
}
else{
double den = v.scalarProduct(v);
if ( num > den){
ret = distance2(ep);
}
else{
ret = (den*(s.scalarProduct(s)) - num*num)/den;
}
}
return ret;
} | 0 |
c3262390440c40f73cd1aed66ea7a568 | 1c814a2e1ea7dd0138b792a3840846ab | this function is to show the 10*10 array as a matrix | void showElements(int a[][arraySize])
{int i=0;
int j=0;
cout<<"\n__________________________________________________\n\n";
for(i=0; i<arraySize; i++)
{
for(j=0; j<arraySize; j++)
{cout<<a[i][j]<<'\t';
}
cout<<endl;
}
cout<<"\n\n";
} | 1 |
d3f7a869d86a44b0e8035f00fbdc4152 | bbcd0decb65a08a46700c2598b34d61c | Get all the root message parts for a specific message set. | roots = filter(lambda tag: tag.get('$parent') == '#', tags.values())
roots_msg = []
for root in roots:
roots_msg.append(get_tagmsg(root['$name']))
return roots_msg | 1 |
979fb0e0e21c48bc0652881c91007029 | 76e84a9d0213c65d9e25fb3a35727383 | helper function to update the text of all color buttons | {
for(int i = 0; i < codeTextures.Length; i++)
{
codeTextures[i].UpdateColor(Color.clear);
}
} | 0 |
84820ab72f20c4a1fb9f136e753d5fe9 | ccc0e7440b1018c22dd0914e6d6372de | 获取子弹图片的宽度 | public class Bullet
public void initBullet() {
fireID = this.dto.getFireID();
BULLET_W = Img.BULLET[fireID].getWidth(null);
BULLET_H = Img.BULLET[fireID].getHeight(null);
} | 1 |
7c6126814d27bde6fbd6399cb89bc0e2 | 4dd7fba48622661fa7d24cfcf9ceef1c | Record a registration. | def register_for(usn, company_id):
r = Registrations(usn=usn, company_id=company_id)
db.session.add(r)
db.session.commit() | 1 |
9661d324baeeeba4eefb00f9e170e8f7 | 39c9d2bc72549f42413da6c0795e217b | A megadott gameObjecthez tartozó képet adja vissza | public class HackingPuzzleManager : MonoBehaviour
private Tile FindTileFromGameObject(GameObject a_gameObject)
{
for (int i = 0; i < tiles.GetLength(0); i++)
{
for (int j = 0; j < tiles.GetLength(1); j++)
{
if(tiles[i, j].GameObject == a_gameObject)
... | 0 |
2cf722e0bb20c340b62c5928f3c9105f | e64096df0a7b86cb9fa53bd1e305a153 | 转换对象到Element对象 | public void toEPLElement(StringWriter writer); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.