query_id
string
corpus_id
string
query
string
code
string
label
int64
274ca3b7353de5a829097921f74a684d
48be6a7b77c828cb6bf516b3db0f5de0
Kill the player by changing game state to PLAYER_DEAD and changing the player icon
public class Portal : MonoBehaviour public void PlayerDead() { mState = GameState.GAMEOVER; }
0
2b5e1fd6d70ea7e416bac11761bca94a
e70a303de9bedb5215db04f561d74af4
Returns an array containing the IP addresses that have been blacklisted.
public function getBlacklistedPaths();
0
58be4a0e0e322bcc1c85ee3df2effef1
bf6873b633b1fba700b6da7d89d63fc2
POST: Departamentos/Create
[ValidateAntiForgeryToken] public async Task<IActionResult> Create(DepartmentDetailsDto collection) { await _mendelCoreServices.CreateDepartment(collection); return RedirectToAction(nameof(Index)); }
1
ad1637bb2b9a4295da1d6bb3904de778
63cecccf8f5ba23e82cb8f9353c2ef00
メニューパネルの表示非表示を切り替える
{ if (panelMainMenu.transform.gameObject.activeSelf) { panelMainMenu.transform.gameObject.SetActive(false); } else if (panelSetting.transform.gameObject.activeSelf) { panelSetting.transform.gameObject.SetActive(false); } else { ...
1
ecebaa3fcb8ae9ec6bff669d57f2bdb6
e88ca09b1bdf8aa6644eaab3b6da5aad
Déplace la fenêtre vers la droite
void scrolling_droit (SDL_Surface *screen , Objet *map) { if (map->pos.x<=mapw-1368) map->pos.x+=20 ; SDL_BlitSurface(map->img,&(map->pos),screen, NULL); }
1
5007f3ad436f36b2599b46624e2638b1
0039f4ebeaf2f2241a58788a73db87bc
Create a new wrapper.
func New(option *Option) *Wrapper { w := &Wrapper{ mcodePrefix: option.Prefix, pool: sync.Pool{ New: func() interface{} { return new(Response) }, }, } return w }
1
269b62f36ce2f3c2502c7ad1640a9eb1
d392ce12482979f2b37e8aceefd2a383
学習データのカテゴリーの文書数をUP
words = self.to_words(doc) for word in words: self.word_count_up(word, category) self.category_count_up(category)
1
77a12331bce0066323c2dd525c63b4a5
68f3ac0e6d9855bb9a52d57e56b7e120
Test whether the iterator is working properly.
def _test_permutation_iterator_3(): PI=MyPermutationIterator(6,num_fixed=0) assert len(PI.list())==265 for x in PI: pass return
1
512bda1e45e444901a43c23813ed17d3
4ef5dd507b9dd26ad90e677a6d095e9a
获取Request中指定的参数值,并以整数数组的形式返回
namespace Weeho.Infrastructure.Extensions public static class HttpRequestExtensions public static int[] GetFormIntValues(this HttpRequest request, string name) { var values = request.GetFormString(name); List<int> result = new List<int>(); var array = values.Split(','); ...
1
f32c4a5fdaf53968fe6547bc77f1c954
6e4ceca7779a9060e8b603e5f521cdc7
Gets the value of the abstract property.
WebElement getAbstractCheckbox();
0
3eaec22b38f4bcab23657c799078e2f7
ab4ab45ef9f1e159365c4542799553b3
Executes the action with a stopwatch, optionally logging the elapsed time at <see cref="LogLevel.Info"/> level.
LoggingContext parentLoggingContext, Action<Guid> startAction, Action endAction) { Contract.RequiresNotNull(parentLoggingContext); Contract.RequiresNotNull(startAction); Contract.RequiresNotNull(endAction); return Start( ...
0
1364ff5d6408f24f4e5ef707b9d2303d
7ab2003ddd1935b7009af486f205bff6
预加载fastText模型
class FtModel: # Fasttext 文本分类模型 训练、预测 def load_model(self, ft_model_output): return fasttext.load_model(ft_model_output)
1
e17e7b0ed8690ae3978c3d39378bc5e3
b885d86fd19945f9ab28afb50bd1d10c
Getter for <code>carbondb.lecturer_room.end_datetime</code>.
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name="ReservationRequest", namespace="useraccesspoint.autobahn.geant.net", propOrder={ "startPort", "endPort", "startTime", "endTime", "priority", "description", "capacity", "userInclude", "userExclude", "mtu", "maxDelay", "resiliency", "bidirectional", "proce...
0
43640900eef98183dc5d89c85fde0367
7705c82dde0a80bc5bc9293a49f9404b
utility function to compare to opencv images
const bool areCvMatEqual(const cv::Mat& a, const cv::Mat& b) { if ((a.at<uchar>(0,0) == b.at<uchar>(0,0)) && (a.at<uchar>(1,0) == b.at<uchar>(1,0)) && (a.at<uchar>(2,0) == b.at<uchar>(2,0)) && (a.at<uchar>(0,1) == b.at<uchar>(0,1)) && (a.at<uchar>(1,1) == b.at<uchar>(1,1)) && (a.at<uchar...
1
d67823e15d2ea7bdc1b8f9c7613ebc04
8d93372ff2acc766b306595e4ff6f02b
Returns how many of a limited there are
public class Partish public int getCount( int which ) { return flatCount[which]; }
1
2033943183dae965d88efeb14f5f6a72
833efa86a12dfbaf33c6e96b32327527
Sets the maturity date of this debt.
@PublicSPI @BeanDefinition public class ManageableTrade extends DirectBean implements MutableUniqueIdentifiable public void setPremiumDate(LocalDate premiumDate) { this._premiumDate = premiumDate; }
0
b1d0d289b4498be84ba23ce387861f0e
16cf5666d0fc63f4761895982cd90387
Returns the ScoreHud plugin for whatever reason an addon would like to use it.
public class ArchesporeAdventureMain extends JavaPlugin public static ScoreboardMenuController getScoreboardController() { return scoreboardController; }
0
d49a43d52feabc75400cf017210f8ec1
501f0af1bfc00a77f2a4c5f5cbe3fe74
Sets the index to use to start returning table names. This is related to the :py:meth:`ListTablesResult.get_last_returned_index` from a previous request and can be used to page table names. If not set, the list starts at index 0.
class ListDataJobRequest: def offset(self): return self._offset
0
206a54a32e0ad16492a16d1466498106
4c02827ca8a976ddc62fab14d11398c0
Appends and returns a new empty value (as xml) as the last "author" element
public class DocumentDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements uk.gov.nationalarchives.pronom.DocumentDocument public static class DocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements uk.gov.nationalarchives.pronom.DocumentDocument.Documen...
1
4636ebff0793e36cd5206d1668444641
e9f73d8a081611fa81cadba8bf4d2cfd
Get all the airports from the Simulation and then display in the GUI airport list
{ lstClients.Items.Clear(); lstAvions.Items.Clear(); if (lstAeroports.SelectedIndex != -1) { List<String> ListeObjets = CModele.GetModele().getAvions(lstAeroports.Items[lstAeroports.SelectedIndex].ToString()); foreach (string avion ...
0
96f0e798cc1c2b752072ff2975abd2de
d0edaff6bd5e40e492348dd6dae9c0b6
Get review data
{ $page = (int)$request->get('page', \Constant::MIN_PAGE); $limit = (int)$request->get('limit', \Constant::MIN_LIMiT); $orderBy = $request->get('orderBy', null); $order = $request->get('order', \Constant::ORDER_BY_DESC); $search = $request->get('search'); $model = $th...
1
2e3dfec584bf93b9982c4676502daf20
c0f8bc8bd3092d902a894fb5ae58f882
creates tracks to be played from a list of audio buffers
let drumTrack = new Track(); drumTrack.setProperty("playbackChannel",9); drumTrack.setProperty("instrument",0); drumTrack.setProperty("name","DRUM TRACK"); drumTrack.autoAccompany.aaType = AutoAccompanySettings.AA_NOCHANGE; this.addTrack(drumTrack); let bassTrack ...
0
414e339c0789b062460a5c5da059e9b9
3320c41a57b031c3105143665a15e3eb
获取分布点所在的街道信息
@Controller @RequestMapping("/merchants") public class MerchantsController extends IBaseController{ @ResponseBody @RequestMapping(value="/streetInfos") public Map<String,Object> getStreetInfos(@RequestParam Integer cid){ List<TbStreetInfo> streetInfos = tbStreetInfoService.getStreetInfos(cid); Map<St...
1
799fc788c5e7540b521268b1825e83d3
de96daf0b9980a80398adfe3cf61d6fa
使用指定查询语句进行查询,并返回最多前 count 个结果
namespace HomeRoom List<Result> find(string query, int count = 10);
1
7fc04b9ac761d30625c390214964bca6
b6513723573a82aedf11559c3f52839e
title: Incremental load test basic description: | Test incremental load and core pool functionality pass_criteria: - cores after start and load should be in active state and cache in running state - cores after adding to core pool are in inactive state and cache in incomplete state
def test_load_cache_with_mounted_core(): with TestRun.step("Prepare cache and core devices. Start CAS."): cache_dev = TestRun.disks['cache'] cache_dev.create_partitions([Size(1, Unit.GibiByte)]) cache_part = cache_dev.partitions[0] core_dev = TestRun.disks['core'] core_dev.cr...
0
9ab8c2ea97d7dc74e87dfdcb8284448c
95010ce07067cc78e4ef54cdf4f42be8
コンボボックスのアイテムをDBから取得
item_master_list = await eel.item_master_list()(); item_code_list = item_master_list[0]; item_name_list = item_master_list[1]; makeTable(item_master_list, "table"); let syohin_code_input = document.getElementById("syohin_code_input"); document.createElement("option"); for (let i = 0; i < ite...
1
86eaa5af93bfec07b631faa8c0419fc0
a57353b42af079a245e47ef3cf70aa92
接收客戶端數據的線程
{ try { SckSs[SckCIndex] = SckSs[0].Accept(); int Scki = SckCIndex; SckSWaitAccept(); long IntAcceptData; byte[] clientData = new byte[RDataLen]; while (true) { ...
1
1e9556619499a4328adbaa977d6be88e
272f8965820e5374dc65ddf4a8ad15e6
180 degree turn
class Robot: def turn_180(self): self.angle -= 180
1
8330b1eba7e2f6293a1f0348f06c5b83
7ea8953416e1faae1f358d2d856434a3
Method to generate instance id for installed products (product instances)
class OpenServices public function generateInstanceID($uid,$significantInterval = 86400) { return $this->generateTempAESToken($uid, self::KEY_INSTANCE_ID,$significantInterval); }
1
3b42a5f2abbe8ab7867c8299de1e7c13
7ca97fdd331d16d6ee7496ac0a773693
Sends the time to the target fragment. Probably crimefragment although others could be used.
FragmentManager manager = getFragmentManager(); TimePickerFragment timePicker = TimePickerFragment.newInstance(mCrime.getDate()); timePicker.setTargetFragment(CrimeFragment.this, REQUEST_TIME); timePicker.show(manager, DIALOG_TIME); }
1
f5553df49407b179cbce7cf2e85a974a
9b9d207ad461b4398e031420ad353142
Sends data elements from nodes in the current compute group to another compute group according to a hash-based partitioner. A stateful eager intermediate operation. Suitable for MapReduce-style shuffling of data.
def all_to_all(tensors, group=dist.group.WORLD): return _AlltoAll.apply(group, *tensors)
0
85508aa06af6db0bf494c9d4e83ce3a4
2906a8e5bf95b4486da4e50a1d74fb4d
Returns the reporting data for this server. Just delegates to the wrapped state object.
class BuyReportStore extends EventEmitter getAllData() { return _reportDataState; }
1
820d5c0595f592e6d693df1f8c005d36
488f02580a12e4f298400473b43310d9
# Varianza ponderada
GD<-function(X){ wgd<-(unlist(lapply(X,length))/unlist(lapply(X,var)) ) wgd<-wgd/sum( wgd) sum(wgd*unlist(lapply(X,mean))) }
0
693ed99c96c34bb5420989e70d3ced6a
3ab0f9281ae285373a75961ba6de9b8b
Servicio que permite obtener los datos iniciales para el submodulo de Consecutivos de correspondencia solicitados para el anio actual
function loadView() { var srv1 = comc.requestLiteList('HCONLTTIPO', $scope.cntx); var srv2 = comc.requestLiteList('ANUALIDAD', $scope.cntx); var srv3 = comc.requestLiteList('MES', $scope.cntx); var srv4 = comc.request('cate/list', $scope.cntx); var srv5 = comc.request('conc/full', $scope.cntx); $q.all([srv...
0
243a75db509b5d007098c613a9d6450c
a4b671c71923305612ff621055185748
Tests others don't have delete permission
request, view = self.delete_permissions_request_and_view() force_authenticate(request, user=self.pa_operators[0]) response = view(request, pk=1) self.assertEqual(response.status_code, 204)
0
46911da1475b96fd700fdd5e1c00ed5b
6331da028e61419c3a473ee6af105df6
[START maps_webgl_overlay_simple_on_add]
setupOverlay() { var self = this; this.$.arcTosOverlayWebview.addEventListener( 'contentload', function() { self.overlayLoading_ = false; }); }
0
a1204350e33c09dceeb8b9bd2ef538a6
47f5a2e9cf1c4b764ae3875ffb4207fa
Aggregates by time.
public IResult aggregateByTimeUnit(ArrayList<MeasurementRecord> inputMeasurements, String aggFunction, String description);
1
ab56577e0b8d14349e10a9b2f82b9086
dfa4a3d7ed2e336eda5046e40026bcfb
Reads channel input and processes requests
class Agent(object): def handle_channel(self, input_channel, message_preprocessor=None): controller = self._create_controller(message_preprocessor) controller.handle_channel(input_channel)
1
fee5b770087424b24287bb254385a739
54f2adc0467fb1f4cedaa8c526f91573
Sulla base dello stato del progetto e dell'utente connesso abilita la modifica dei dati di un progetto
public void enableProjectEditing(ProjectAccess userAccessLevel) { if (userAccessLevel.hasAccess(ProjectAccess.OWNER_ACCESS)) { projectOwnersTextBox.setEnabled(true); deleteApplicationSection.setVisible(true); publicPanel.setVisible(true); } if (userAccessLevel.hasAccess(ProjectAccess.EDI...
1
88a28bd393fddeeda7fbd8ffde1c37ed
b2754a267b7b32f3dba5d8b01b6f889b
Called when list of predefined log text filters has been changed.
debug(u"tcui.PreferencesDialog: OnLogfileTextChange") if config.logfile != self.logfile_box.GetValue(): config.logfile = self.logfile_box.GetValue() debug(u"tcui.PreferencesDialog: OnLogfileTextChange - Text changed in logfile path entry box, new text: %s" % unicode(config.logfil...
0
9458784a1fdfc4c74fe43198a0df2cd1
624e9e2db3536dfa20dab40aeb8a70d8
根据实名认证主键查询单条实名认证信息
public class RealName extends Model<RealName> public RealName getRealNameById(Integer realNameId) { String sql = "SELECT id, real_name, idcard FROM t_user_realname WHERE id = ?"; return RealName.dao.findFirst(sql, realNameId); }
1
e5100395eb67592eb7cf6dade933a601
45211805332331ecdd72614b164eb7ef
This function should return T's bean property that is queriable in snaked_case form. It will be used by indexRecords to make query. By default queriable is readable.
abstract class BaseModel extends Model //implements IRecordable abstract public function searchableAs(): string;
1
6581b76ce67627e1f7e7f08d8233dffe
ddd0aed70d2d870e33d2060d94ba32b1
Replaces the current event by its successor, if any exists, and returns it.
public abstract Event nextEvent();
1
d1e78b271a888fc412968db70f2ee811
2e7143df31502b7f3ebee2966a48815f
Retourne le chemin vers le fichier template désigné en entrée. Si le fichier n'existe pas dans le template courant, on retourne le chemin vers le fichier par défaut.
class ViewHandler private function findTemplateFile($template) { $templateFolderPathArray = [ 'core' => dirname(__DIR__) . '/../../' . $this::TEMPLATES_FOLDER, 'app' => dirname($_SERVER['SCRIPT_FILENAME']) . '/../' . $this::TEMPLATES_FOLDER, ]; $templateFilePath = nul...
1
d9ce733f6788e50eeb5c80a188d6b2b1
3b3a0224c09aec083418c94030d25f2b
Test if files can be found by their mimetype
class TestUIController(BaseTestCase): def test_binaries(self, path, mime_type): headers = { 'Accept': mime_type, } response = self.client.open( path, method='GET', headers=headers) self.assert200(response)
1
faa52b768959ed310e8c44243f17cdc0
8f1dd0f37af27b2cc8651a53efda6ed5
Parses calendar dates exception info from TransXChange VehicleJourney element
def get_calendar_dates_exceptions(vehicle_journey_element): j = vehicle_journey_element try: non_operative_days = j.OperatingProfile.BankHolidayOperation.DaysOfNonOperation.get_elements() weekdays = [] for elem in non_operative_days: weekdays.append(elem._name) if len...
1
f2afb47abed12ac7479f57dfcbceb5ba
648f61504d6665b85d399a1ee2a22d62
Set the date envoi.
{ if(isset($date)) { $this->date = $date ; return true ; } else { return 'Champ Date Vide.<br />' ; } }
1
b6d57fbf6a80df4e754b177c75ba9a0c
79446176eb7f5dbe52faf9b337899765
# Get the most popular item in a set of data
mode_set <- function(y) unique(y)[which.max(tabulate(match(y, unique(y))))]
1
bedafbecb24f6d980d39240fc7dea33f
dcf5e2b7e6c2b70dd9e5fc003a0536c9
Returns a reference to the module. Returns an error message if it fails.
int request_module(const char * module_name) { return 0; }
0
8b724b4c4be2207b3cb3ef67ca96c650
8dfa0bc35c201a4c68b4556001362f88
Get the application's kernel implementation.
class Kernel public function getApp() { return $this->app; }
0
b2cc0c41113b93feab68cbbb7c391c3b
95e07f92f0b497bf26fbff477fac1abc
Makes dependency features from the given tags
class TagDependency implements ICacheDependency public function __construct() { $this->_tags = func_get_args(); }
1
51c04210840fa18727dbe81c34d191e8
ea7ea1007c0a7008b59acf54242386b3
Provides Activity from its Identifier
class ActivityResource extends MultiViewResource public function get($request) { $response = new Response($request); $ID = $this->parameters[0]; $this->view = $this->get_view($request); $this->model->setLocation($request->uri); try{ $this->model->load($ID); }catch (Exception $e) { $response->cod...
1
bd143bf0dc86d4c15f5f19e926c55d5a
9aefbc1d9a8b0a3a561e361ca3070aa8
Validate that an IP address is within an acceptable range.
class ValidatorContext(object): def validate_iprange(self, field, msg = None): value = self._parse_value(field) return is_ipv4(value) or is_subnet(value) or is_ipsegment(value)
0
1b8c806330c421de94eb461c8dfcfa9a
09a471d3e7a3c3bacdfab4da11f8f2e4
Get list of detailed episodes information for a given season.
class TVDB: def get_series_episodes(self, id: int, season_type: str = "default") -> dict: url = self.url.series_episodes_url(id, season_type) return self.request.make_request(url)
1
5f8eefd908ee29c33e984b0f54148381
cfef2fd3319542423c28bbf13067f540
Constrcutor for register model
class Registration_model extends CI_Model{ function __construct() { parent::__construct(); }
1
9c91c52197bfda329b2ece01dbf764d2
4ec9c6444a1c90b692c39fd2311684fb
Broadcasts a change in the outermost menu when opened or closed.
namespace Microsoft.Phone.Controls [TemplateVisualState(GroupName = VisibilityGroupName, Name = OpenVisibilityStateName)] [TemplateVisualState(GroupName = VisibilityGroupName, Name = OpenReversedVisibilityStateName)] [TemplateVisualState(GroupName = VisibilityGroupName, Name = ClosedVisibilityStateName)] ...
0
2d67feaf9fc8b4a3c90ec840c6f7815d
380b0b0a38da10b64df47e7b0ef1e1c6
This method clears the email id text field
function clearEmail() { document.getElementById("emailMsg").innerHTML = ""; }
0
ccabb965b620cc448bd6733505cf84c2
46d39804161df91419a32d96c982ea09
How much data will be processed at once, in case no chunksize has been provided.
{ if (is_null($this->chunk_size)) { $this->chunk_size = 0; } return $this->chunk_size; }
1
b5178779b87f5849e1a6695f7e906997
bf4d08aed55f52b8737d3cdf54e334b5
Computes the quadratic equation (ax^2+bx+c=0) in a numerically stable manner.
def quad(a,b,c): d=b*b-4*a*c return (-b - np.sqrt(d))/(2*a)
0
6a935cb4a604e7a540495fee0cd1c5f6
937b7557105293b14ef8d11956beea39
返回在线数
class data extends admin public function online() { if (file_exists(ROOT_PATH.'../online_data.php')){ include_once(ROOT_PATH.'../online_data.php'); }else { $total_online_num = 0; } echo $total_online_num ? $total_online_num : '-'; exit; }
1
d9b962155f0e3794d14ad4618e11651b
282ff19322b4a41ba8f13dfd903dc8a9
Sets Dark Mode for Plotly Plots.
function setDarkMode(value) { if (value) { $('#body-content').attr('class', 'darkMode'); } else { $('#body-content').removeAttr('class', 'darkMode'); } }
0
c80527df08871b80ed475f51ddf579db
e38a13a816e546772219c6c918b54d47
Creates a rotation value to reach the target (axis1, axis2, axis3) orientation as a rotated XYZ system (axis1, axis2 and axis3 are normalized during this operation) and stores it in the target quaternion
vec3 axis = { rotation.x, rotation.y, rotation.z }; vec3 p = vec3_project ( axis, direction ); *out_twist = quat_normalize( { p.x, p.y, p.z, rotation.w } ); *out_swing = rotation * quat{-out_twist->x, -out_twist->y, -out_twist->z, out_twist->w}; }
0
3801095310a7ac945c97cf661bf1f9c3
f47744fdd28eb1ecec4e07c5ded92224
для rmq
int rmq(int l, int r) { return min(sparse[log2[r-l+1]][l], sparse[log2[r-l+1]][r - (1<<log2[r-l+1]) + 1]); }
1
ef58a9a495e4bccd169f0ac3bd308419
032387764808ea7f16180ceb126908bb
Ermittelt die ID des zu steurnden Characters
public static class DBMng public static int CharacterChosen(){ return PlayerPrefs.GetInt("IdBodyChosen"); }
1
917a8e0dd32a24e112efa6b43aa69abb
3105470ce54fd46d7bcd4169f335187e
Queries a single GMB location
@Service @Profile("!graphy") public class LocationServiceImpl implements LocationService @Override public Optional<LocationDTO> findOne(String id) { log.debug("Request to get Location : {}", id); return locationRepository.findById(id) .map(locationMapper::toDto); }
0
5cd037171ffde8b7837a43710e274754
bbef0d8586a6405c23675581e3fd587f
checks whether the trigger index needs to be decremented
impl MTEvent pub(crate) fn decr_if1(&mut self) -> bool { unsafe { minimult_ex_decr_if1(&mut self.ex_cnt) > 0 } }
1
ff119dd92ca34fc7d078ab9c7275c386
44f418926fcb45aace684ed74f8aa998
Test provider registration
default void performRegisterProviderTest(final Consumer<IRegisterProvider> test) { final IRegisterProvider provider = getTestRegisterProvider(); assertNotNull(provider); test.accept(provider); }
1
b85563348e29157359ad237992450b6f
9e6b567e0b737966899e97a28605aea8
Makes factory unable to produce anything until the time sent is finished, and specifies what resource to produce
[Serializable] public class CombatUnitManagerMetaData : PersistantMetaData public bool ProduceCombatUnit(CombatUnitType unitType, int produceAmount, int duration, Dictionary<ResourceType, float> resourceCost) { if(producingUnit) { return false; } PlayerResourceStorageMetaData data = PlayerResourceStorageMet...
1
01940984ecd131fd19cec180fc28a239
27d48d9a614f5f638df93d4f3479acaf
Lists all Master .
namespace LystenApi.Controllers [Authorize] public class MasterController : Controller public ActionResult Index() { return View(); }
0
9647471da69cb1f59588700c15f9c5f1
90ab28bdad169abe02192a2d6e6f7729
Handles the TextChanged event of the ComplainantPhoneTextBox control.
{ if (txtTelephone.Text != string.Empty) { string tel = txtTelephone.Text; } }
0
c5643e4162a131bce52e286c4721257a
7925cd4f2f8e4508470b47ea4aa72144
Get the number of octaves in the fractal
class FractalClass(object): def octaves(self) -> int: return self._octaves
1
ea520711f1891dc34a91d54f5207a945
3db5ab87028ab35c0f44420188890cb3
Returns the meta object for the reference '{@link ma.ensias.bpmn.DataAssociation#getFrom <em>From</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EList<Relationship> getFromrelation();
0
589206a66024fbe67ea439ffe39ebbd3
a1f98203c84c2786a690fc97bf5e9358
given the label of a node, returns the index of the position in the array where is stored
class Graph(object): def get_index(self, label): nVert = len(self.Vertices) for i in range(nVert): if (label == (self.Vertices[i]).get_label()): return i return -1
1
437fd12f201e60ff5bb549e498aa07bc
6a4a9d29df279529f28bacb7dbc20def
*****************************************************************************80 R8VEC_SFT_TEST tests R8VEC_SFTB and R8VEC_SFTF. Licensing: This code is distributed under the GNU LGPL license. Modified: 24 July 2017 Author: John Burkardt
{ int i; int n = 36; int seed; complex <double> *x; complex <double> *x2; complex <double> *y; cout << "\n"; cout << "C8VEC_SFT_TEST\n"; cout << " C8VEC_SFTF computes the forward slow Fourier transform.\n"; cout << " C8VEC_SFTB computes the backward slow Fourier transform.\n"; cout << "\n"; co...
0
8cd2ebb30a077f9b67e3f9e77f2c82ae
f4d6d53f74c3e4db6d8efcf8ec9b1d1c
Returns a grid which has a glider that will wrap around
def get_pattern(_pattern: str, _world_size: tuple) -> list: def create_gliders() -> list: _w, _h = _world_size[0] - 1, _world_size[1] - 1 return [ (1, 3), (2, 3), (3, 3), (2, 1), (3, 2), (1, _w - 3), (2, _w - 3), (3, _w - 3), (2, _w - 1), (3, _w - 2), (_h - 1, 3), (...
0
c4aee97b39883fbf375617f4ba8cefe7
5acfc34b9604f20c6e4addd7389fcbc6
inits hdc1000, reads temperature value and displays raw and calculated temp data
void hdc1000Main(void) { uint16_t data16; double ddata; hdc1000_t* hdc; Log_Debug("Open HDC\n"); hdc = hdc1000_open(i2cFd, HDC1000_I2C_ADDR, -1); data16 = hdc1000_get_dev_id(hdc); Log_Debug("Device ID: 0x%04x\n", data16); data16 = hdc1000_get_mf_id(hdc); Log_Debug("Manufacturer ID: 0...
1
c706f30fbd5a2322d92125c9770c9252
af441529a965be1fb42be18e86f0eadd
Uses pre-built artifacts and assigns build_graph and artifacts_folder
class BuildProgram: def produce_artifacts(self):
0
c559a9836d313036f240c1f0d86f50c6
ffaa40cad8d51b131b7534e2fdeb9548
根据物流单号获取退货单明细,包括产品对应的货位及库存
public List<DlvReturnDetailModel> returnDetailList(Map<String, Object> paramMap) throws Exception;
1
78f433ad08726ce6ca2cfe5180e8ff6d
3932856a2fa20872242b9387588d9e47
Fetches value of the Granted-Service-Unit AVP (AVP Code 431);
{ XPN ret = null; try { IType t = this.GetField(42, rep); ret = (XPN)t; } catch (System.Exception ex) { HapiLogFactory.GetHapiLog(GetType()).Error("Unexpected problem obtaining field value. This is a bug.", ex); throw new System.Exception("An unexpected error ocurred", ex); } return re...
0
c966d2cb597a5c6c764949647bde5f29
38f0ce2c02ef81b7e0adf95d311359ff
Move right-up in a grid
class TwentyFortyEight(Frame): def right(self, events): self.matrix=merge(self.matrix,"right") self.update_grid_cells() self.new_tile() pass
0
802483838dadb4f8ee62f45af302ca4b
1c59688a41e1a5990517fb7820296732
Gets the ID of the site that BP should use for taxonomy term storage. Defaults to the root blog ID.
function bp_blogs_root_slug() { echo bp_get_blogs_root_slug(); }
0
51507ed05cb2c9b0283ff5a4e7fd8fe3
99dbf1a93673bea3ffeefcacd48edf4e
Request a list of auction matching criteria
{ if ($request->ajax()) { $auctions = Auction::search($request->all(), [ 'adPlacement.media', 'user.buyer', ]); $auctions->each(function($auction) { $auction->append([ 'is_winner', 'payment_is_valid', 'payment_is_pending', 'is_ready_for_publication', 'is_ready_for_transf...
1
14dd3e702d926a94e7b7b4f798918971
0b685d55fdb25580065b275f6c01e8d5
Computes the total points the player obtained during the game.
public class PlayerStatistics public int getPoints() { return ( (int)(SimulationSettings.getCustom().PointsForFoodMultiplier * CollectedFood) + (SimulationSettings.getCustom().PointsForFruits * CollectedFruits) + (SimulationSettings.getCustom().PointsForBug * KilledBugs) + ...
1
41fe12285198c54ba2ee956a56df205c
d89d58e9ad00c35ecc1062b8d9ba966e
将频道模板中的辅助表导入发布系统中,返回修改了的表名对照 在导入辅助表的同时检查发布系统辅助表并替换对应表
{ $BASE_PATH = $_SERVER['DOCUMENT_ROOT']; $theme = D('ChannelTheme')->where('id=' . $themeId)->find(); $themePath = $BASE_PATH . $theme['file_path']; $moduleType = $theme['module_type']; $channelModuleTypePath = $templatePath . DIRECTORY_SEPARATOR . $moduleType; if (!...
0
d0d82666b606c35bee8cc61846936333
1014c901446758fb266369a3e88f44df
공지 사항 글 추가 후 페이지 이동
public String moveWriteNotice(@ModelAttribute MemberVO mvo, Model model){ List<MemberVO> mList = null; mList = boardService.selectWrite(mvo); model.addAttribute("mList", mList); return "board/insertNotice"; }
0
dc6e16ebdd893128b57ce60ecd884609
95e765d72f854a260e9f234dbbc3deac
添加保存文件的功能
function add_file() { var str = '<span style="width:100%;"><INPUT type="file" NAME="File" run="server" style ="width :397px"> <input type="image" name="1" value="删除" src="../images/delete.gif" alt="删除" style= "margin-bottom:-4px;" onclick="this.parentNode.removeNode(true);return false;"></span>'; document.getE...
0
9e2a4f73860be37695edbbe4b516a318
84ad1c89f4b7f2f3a67cf74ff3b4703b
点击批量指派页面第row_num个记帐员
class BatchOperatePage(object): def click_batch_operate_edit_consultant_list(self, row_num): Action.click(BatchOperateElement.batch_operate_edit_consultant_list(self.driver, row_num))
1
052698ae4acf4f56ffaa277a7c3a6af9
716b5f1c7c1e54bf9efcb415e92b4fe3
Sets how much the map walls should be affected by the lighting effect (0..1)
class LineRenderer set lightmapScaleOffset(value) {}
1
451b63e99ed3dc1e81556342cabcb73e
148c3ed53ff4eaf8e25b516410b1dfb9
Method renderHead allows to use specific css in this page. IHeaderResponse
public class UploadProgressBar extends Panel @Override public void renderHead(final IHeaderResponse response) { super.renderHead(response); CoreLibrariesContributor.contributeAjax(getApplication(), response); response.render(JavaScriptHeaderItem.forReference(JS)); ResourceReference css = getCss(); if (css !...
1
70e3fac19d80d13d1a6efda126f41b97
33308b2488defe5e8364cb306e74f96d
toArray returns a plain old array.
function toArray(): void { Rx.Observable.of("a", "b", "c") .toArray() .subscribe(...callbacks); }
1
4a5f4496cab67ce4e1a0864385c3a9dc
81fc593ecdec5fb5832ad02843f45f19
Percentage relative to the width of the parent container.
class PdfPTable implements Element public function getWidthPercentage() { return $widthPercentage; }
1
2963195d12dcca80c41f865e529aa6be
75031b2c0a796fd04c9aa720951e260f
Computes double well test function without noise term.
class _QuadraticPlusSinProblemND(_InterpolationProblem): def test_function(self, x): return tf.reduce_sum( tf.square(x - 0.5) + 0.25 * x + 1 * tf.sin(x * 15), 2, keepdims=True )
0
f4e0ab9320aa5b8c831f6485faf2ba24
f5e005c5f754b997e2649d0285acb053
@brief Interrupt Sub-Routine which handles target receive data in Interrupt mode. for the specified I3C.
{ int32_t tmp; I2C_S_SETUP_Type *txrx_setup; uint32_t status; tmp = I2C_getNum(I2Cx); txrx_setup = (I2C_S_SETUP_Type *)&i2cdat[tmp].txrx_setup_slave; status = I2Cx->ST; switch(status){ case 0x15: case 0x45: if ((txrx_setup->rx_count < txrx_setup->rx_length) && (txrx_setup->rx_data != NULL)) { ...
1
7ae65e62283dce5075b7089f4eb77ed8
0e05e09826eed76b3b122e6ba3427621
Compile a "JSON object" statement into SQL.
class JsonExpressionBuilder implements ExpressionBuilderInterface public function build(ExpressionInterface $expression, array &$params = []) { $value = $expression->getValue(); if ($value instanceof Query) { list ($sql, $params) = $this->queryBuilder->build($value, $params); ...
1
8d0c11813669114427463c024baa9dbd
1235a207da870d1ee206888039d85a87
Copies all values of the current module iteration into the new building values
namespace Brickwork public class BrickLogic private void CopyModuleValuesIntoBuilding(int[,] sourceArray, int[,] destinationArray, int currentHeight, int currentWidth) { for (var v = 0; v < MODULE_HEIGHT; v++) { for (var s = 0; s < MODULE_WIDTH; s++) {...
1
9e66d5792e13c89993e5903cf9e63bf8
ae4e183af3a2d7398c36ec73924941d3
测试函数传递指针的情况
void usePtrFunB(PtrFunB p, int n) { p(n); }
1
8a09f5bf5746315c455f1ca008518d95
76721759def01721653000a6019b656a
Loads an X.509 certificate from the specified file. The certificate file must be in PEM/Base64 format and start with "BEGIN CERTIFICATE" and end with "END CERTIFICATE" line. the loaded certificate.
def load_certificate_from_file(filename, dbdir=None): with open(filename, mode='rb') as f: return load_pem_x509_certificate(f.read())
1
228fcefa7ae6eb9c72594cc01a14fe9a
48c6d33ef39379c516e5493c5cdfa75c
Used to set the neutral rating icon.
{ if (nv?.Length == 4) { nudTameAdd.NeutralNumber = (decimal)nv[0]; nudTameMult.NeutralNumber = (decimal)nv[1]; nudDomLevel.NeutralNumber = (decimal)nv[2]; nudWildLevel.NeutralNumber = (decimal)nv[3]; } ...
0
14eddde218f8c7d84deaeedc65233832
667f3120b544bc29135ae34e557813ac
Destroy the UDEV singleton
void pcan_device_node_destroy(struct pcandev *dev) { #ifdef UDEV_SUPPORT device_destroy(pcan_drv.class, MKDEV(pcan_drv.nMajor, dev->nMinor)); #endif }
0
c0e896fecf99ab3af149a2ce055a6412
b95603ba7478e94bcaa8a9416f55f97c
wraps all vision methods, calls them all together
class Top_Down_Vision_Module(ccm.ProductionSystem): def vision_update(self): self.parent.top_down_vision.check_self_location() self.parent.top_down_vision.line_of_sight_constructor() self.parent.top_down_vision.update_top_down_vision() self.parent.top_down_vision.check_goal()
1