query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
064c9d3634effcc28fc0d5b1f662a6a0 | 1c5d9fbab817bcbf6d7ee9d10314e686 | Update the draggable element's value and position. | const max = this._effectiveMax;
const min = this._effectiveMin;
const prevStartValue = this.getStoredPropertyState("startValue") || 0;
const prevEndValue = this.getStoredPropertyState("endValue") || 0;
const affectedValue = this._valueAffected;
if (affectedValue === "startValue") {
... | 1 |
ce0e428126c137f9708a409ab665053d | 1f2971da9c1510627422fc9bdbc067de | add rel links for paging | pagy_headers_hash(pagy).tap do |hash|
hash['Link'] = hash['Link'].map { |rel, link| %(<#{link}>; rel="#{rel}") }.join(', ')
end
end | 1 |
fd0eafc860cbb3f65b7079e0b18e984b | 3ee73e0c4b7675947a2e270794e87c54 | Test check for existing symbols. | assert latex(symbols("xMathring")) == r"\mathring{x}"
assert latex(symbols("xCheck")) == r"\check{x}"
assert latex(symbols("xBreve")) == r"\breve{x}"
assert latex(symbols("xAcute")) == r"\acute{x}"
assert latex(symbols("xGrave")) == r"\grave{x}"
assert latex(symbols("xTilde")) == r"\tilde{x}"
... | 1 |
d1bfd8ffa3a66a9e41b844a6272f2c69 | 7aa68b98af694fd928b913f7733a8a96 | Update this range's info on selling channels. | {
uint16_t channel_end_number = 0;
uint16_t channel_start_number = 0;
sl_status_t bt_status = SL_STATUS_OK;
uint8_t buf[4] = { 0 };
get_rail_channel_range(&channel_start_number, &channel_end_number);
buf[0] = (uint8_t)(channel_start_number & 0x00FF);
buf[1] = (uint8_t)((channel_start_number >> 8) & 0x00FF... | 1 |
b1160b8396fb0524cc314c04c97ed99e | f5c80e3b701821f5156939da67b54ef5 | Заполняет матрицу нулями | namespace CellularAutomatonForm
static class CellAutomaton
public static void FillMatrix(byte[,] matrix)
{
Random rand = new Random();
for (int i = 0; i < matrix.GetLength(0); i++)
for (int j = 0; j < matrix.GetLength(1); j++)
matrix[i, j] = (byte)... | 0 |
20526d211071a43ad1c9eb0bfbe080a7 | c29d3e73c1e57cc4cec9e4f8edb5e2ea | チェックした行の削除 | {
$('#'+tableBody).find('input[name="record"]').each(function () {
if ($(this).is(":checked")) {
$(this).parents("tr").remove();
}
});
} | 1 |
e81bc9ca10faf035d204b3d2fce686c2 | 1b1c026ff4a12e5367db373439aadbbe | 计算用户最高等级,最大在线时间 | class UserCalculateHelper extends Model
public static function getUserLevelByTime($uid, $timeEnd = null)
{
if ($timeEnd === null) {
$timeEnd = time();
}
$rightMembers = @UserHelper::getCidByTime($uid, 0, $timeEnd, 1);
$rightMembers = @count($rightMembers);
$leftMe... | 0 |
9d6f1b68fbd9303bc5d46cf0f3c5ba8d | 7276ca0208fa81119661d4c63d9bfea2 | 检查该点是否被文字所包含 | public class SelectableTextHelper
private String checkPositionIncludeTips(int mTouchX, int mTouchY) {
int startOffsetTouch = TextLayoutUtil.getPreciseOffset(mTextView, mTouchX, mTouchY);
for (int i=0;i<mSentenceInfoBean.size();i++){
int startPosition=mSentenceInfoBean.get(i).getWordIndex();
... | 1 |
8e775ef43defda713d266011a76de051 | e75237616682ee82321aa929b649f5ea | Gibt die Hoehe des AVL Baums zurueck. Ein Knoten ohne Kinder hat die Hoehe 1 | public class AVLBaum
public int hoehe() {
return hoehe(wurzel);
} | 1 |
8c344cd8173ff9c6c429160900330200 | e018d54d7db15afa80863ebd25821a3d | Melihat Stock yang baru keluar sebuah outlet | $title = "outstocked Products";
$products = Purchase::where('quantity', '<=', 0)->get();
$product = Purchase::where('quantity', '<=', 0)->first();
return view('outstock',compact(
'title','products',
));
} | 0 |
41f8ffe5901c1535a6114d9597ee0ba0 | 97b621171d2bc04490f1f3f98a9e23bd | 根据brandId查询出所有返佣比例设置,如果没有配置则进行初始化 | if not (plat and brand_id):
return []
try:
data = data_traffic_dao.get_brand_rebate_list(plat, brand_id)
if data is None:
__init_brand_rabate(plat, brand_id)
data = data_traffic_dao.get_brand_rebate_list(plat, brand_id)
except:
xlog.error("", exc_info=True)
return data | 1 |
a6b49d4aa10ea584a5a544be213d87f0 | 18239ae9a1ccf216ff38dac30f32f271 | 初始化anr 监控 | class WanApp:Application()
private fun initANRWatch(){
ANRWatchDog(10000).setANRListener {
Log.e("gt","anr log:${it.printStackTrace()}")
}.start()
} | 1 |
00904cd6589cfb2d04f67a5f726d5baa | e6df31ab40121e0cd6add4143dedbf5d | Triggers the redirect pipe action | class PageRedirect extends RabbitHoleBehaviorPluginBase implements ContainerFactoryPluginInterface
public function performAction(Entity $entity, Response $current_response = NULL) {
$target = $entity->get('rh_redirect')->value;
$response_code = NULL;
$bundle_entity_type = $entity->getEntityType()->getBundle... | 1 |
054a931491205d8c27ebd436213d15ea | 7dcdcfcfebe20f5df6f0f29601125e2e | create instances of helpers after manager is created. | {
$class_name = 'Helper_' . $helper_name;
return new $class_name($this);
} | 1 |
84a16a443e865dd97a9fb075b8a0222d | d92056e3894151293546f31b0fc1585a | adiciona o volume dado ao volume atual | class Volume
void volume_up() {
vol++;
if(vol > 15) {
vol = 15;
}
} | 0 |
4c51681c6f1a88ab758285beee188ed8 | 80cee0921ef5bd26d09992f4ae4c0136 | 按开户机构查询 | public IMetaDBQuery searchInstitutionsAccount(int institutionsId); | 1 |
c7afe324a36472bd9e575e0c85825346 | 4ca11316cce94aee1d1eaa149facf378 | Checks if the value will fit into a variable with given type | namespace BrandonUtils.Standalone.Reflection [PublicAPI]
public static class ReflectionUtils
[PublicAPI]
[Pure]
[ContractAnnotation("variableType:null => stop")]
[ContractAnnotation("valueType:null => stop")]
public static bool CanHoldValueOf(this Type variableType, Type valueTyp... | 1 |
127aff4d0bdc8014d5cc345e2ed7d93a | e78b3b8715b55e9da2cf1660174b4b0c | Exclusive containment check. | class Sisyphus_C14n_Legacy_Strategy_Namespace
implements Sisyphus_C14n_Legacy_Strategy_StrategyInterface
public function isExclusive()
{
return $this->_exclusive;
} | 1 |
5110a79a59327bd338fab083df2b8d27 | a104558a30cdea33feaea89d160c7b80 | Esta funcion redirecciona a la vista donde el cliente puede identificarse | export class LoginPage implements OnInit
registrarUsuario()
{
this.router.navigate(['/alta-cliente']);
} | 0 |
f34806ed328ab3840d5879fbafffff73 | 8078cc42f44ee483d858ebdd9670e898 | Test case for deleteTranscoderTemplateConfig
Deletes the specified Trancoder Template configuration. | try:
params = request._serialize()
body = self.call("DeleteTranscodeTemplate", params)
response = json.loads(body)
if "Error" not in response["Response"]:
model = models.DeleteTranscodeTemplateResponse()
model._deserialize(response[... | 1 |
0dd59b0ec78e876dde6d476e07e4261a | 9ea9c83e1f9a8ad9b6e6bb786f85d37a | 调用BedReplService实现添加BedRepl | @RequestMapping("/schedule")
@Controller
public class ScheduleController
@RequestMapping("/saveBed")
public @ResponseBody BaseDataVo saveBed(@RequestBody ComDeptBed bed){
BaseDataVo outVo = new BaseDataVo();
service.saveBed(bed);
outVo.setCode(Constants.Success);
return outVo;
} | 0 |
1165a2d3d09d8cf7af1b6ec0157157a0 | cb9f3380c5095767b2c29a7ef810490b | Lee un vector dinámico. | float * leer(char * nombre_archivo, int *n)
{
std::ifstream entrada;
entrada.open(nombre_archivo);
if(!entrada){
std::cout << "Error: no se pudo abrir el archivo..." << std::endl;
system("pause");
return NULL;
}
entrada >> *n;
float *p, *p1;
p = (float*) malloc(sizeo... | 1 |
1472a9032881b3b6245ef7425840a4ed | daac9805a017843351f4da809ffced2c | Initializes the fields of each cell on the board as follows:
is_mine field to false
mines field to 0
visible field to false | class Cell():
# Initialize each cell with invisible cell that is NOT a bomb
def __init__(self, is_visible=False, is_mine=False):
self.is_visible = is_visible
self.is_mine = is_mine
self.value = 0 | 1 |
3986903f21195c5ab0a7c7d783e153a4 | 756be51cc5d073907c65150afbd46b94 | Changes all of the dealers cards to showing (face up). | public class GameManager : MonoBehaviour
private void revealDealersDownFacingCard()
{
Destroy(dealerCardPosition[0].transform.GetChild(0).gameObject);
dealerCards.Last.Value.isFaceUp = true;
dealerCards.Last.Value.makeCard(blankCard);
Instantiate(dealerCards.Last.Value.Face, dealerCa... | 0 |
c817102f8c9ee58ca76d8debd0740b67 | 81d6681f698ba8bb645eca3eadc47da9 | 处理持仓明细响应数据 | class CtpTdApi(TraderApi):
def OnRspQryInvestorPositionDetail(self, pInvestorPositionDetail, pRspInfo, nRequestID, bIsLast):
if not pInvestorPositionDetail:
return
posBuffer = PositionDetailBuffer(pInvestorPositionDetail, self.gatewayName)
pos = posBuffer.updateBuffer(pInvestorPositi... | 1 |
661b5e06e445e10710c7e6d6cd330abf | 7cfd22424c5d86a434a919951f4b45b7 | Returns the filter to fetch tasks based on the type sent in | def get_tasks(filter_):
if(filter_ == 'all_tasks'):
tasks = Task.objects.all()
elif(filter_ == 'completed_tasks'):
tasks = Task.objects.filter(completed=True)
elif(filter_ == 'uncompleted_tasks'):
tasks = Task.objects.filter(completed=False)
return tasks | 1 |
50b2c1a7e79a78b017267ac648e50b9b | 5ac844933cdad5f8cfe2b39dad84e859 | Check validation errors on invalid worksheets | class Spreadsheet:
def _validate(self):
try:
components_ok = False
self._validate_basic_sheets()
self._validate_general_info()
if self.ok:
self._validate_deployments_sheet()
if self.ok:
self._validate_components_sheet(... | 1 |
73a51e1092e7799d7c063d53a77c09df | bb99edc0ab3d066cb23b0d0e0367bed1 | Determines which of the possible squares has the highest carrot count, moves rabbit to that square | rows = len(m)
cols = len(m[0])
if rows % 2 == 1 and cols % 2 == 1:
row_possible = [rows // 2]
else:
row_possible = [(rows // 2) - 1, (rows // 2)]
if cols % 2 == 1:
col_possible = [(cols // 2)]
else:
col_possible = [(cols // 2) - 1, (cols // 2)]
most_carrot... | 1 |
0e5b2a3a575af7af526dc0f854fa155d | e9d19deb7bee6a996e6d84d9be0f7772 | Delete the columns with too much nan values. | sum_nans = df_all[cols][-n_rows:].isna().sum(axis=1)
index_nans = sum_nans[sum_nans > 0].index
cleaned_df = df_all.drop(index=index_nans)
return cleaned_df | 0 |
ddd4ece9a7f94dcbc319cab75ca3f81b | 47e428921db51f930b892a00f045f11d | Computes the Normalized Cross Correlation with masked images. | class NormalisedCrossCorrelation(MatchingCost):
def compute(left_image: np.ndarray, right_image: np.ndarray, max_disparity: int, filter_radius: int) -> np.ndarray:
(H,W) = left_image.shape
cost_volume = np.zeros((max_disparity,H,W))
for d in range(0, max_disparity):
for y in range(filter_radius, H - f... | 0 |
701421a78ff37277e23eae955f96628e | b190bad20fdb68c9927f5a88d71e3297 | Some tests for read-only cache construction
One with asking for read-only and one with getting read-only due to
not being able to write to the marker file. | fn test_cache() {
let content = "abc".as_bytes();
let mut mmap_directory = MmapDirectory::create_from_tempdir().unwrap();
let num_paths = 10;
let paths: Vec<PathBuf> = (0..num_paths)
.map(|i| PathBuf::from(&*format!("file_{}", i)))
.collect();
{
... | 0 |
f9f2c50df10b3c6ba25c9c40d30c1c9d | c35057e0d6318fffcd2db62119410485 | Returns team log objects | export default class SSObjectManager implements ICheckpointLoggable
public getLoggables() {
return [...this.objectDetailMap.values()];
} | 0 |
dcb2e5d1ea29b3423a3ffa19e66d7365 | 16f59262fb2827df7f086c83043054b0 | <p>Adds all URL parameter types in the list.</p> | public class HttpParams
public HttpParams addAll(List<NameValuePair> nameValuePairList){
this.nameValuePairList.addAll(nameValuePairList);
return this;
} | 1 |
e92d60c66dee2b916e0af4268766a4df | e5b59c656c51aae10fa79ca0f0115ff2 | Recursively extract media ids from elements (bloc, attribute, collection attribute, etc ...) | function findMediaUris (data: any, uris: Set<string>): void {
if (Array.isArray(data)) {
for (let i = 0; i < data.length; i++) {
findMediaUris(data[i], uris)
}
} else if (typeof data === 'object') {
for (const prop in data) {
findMediaUris(data[prop], uris)
}
} else if (typeof data ===... | 1 |
a39af58ac65e32336e6ab7afc36cea90 | fecfc08918f5d8bf258cd33a144ab5d7 | 2 Cadastro dos novos veículos. | class VeiculoController extends Controller
public function create()
{
$usuarios=$this->usuario->all();
return view('newVeiculo',compact('usuarios'));
} | 1 |
8d3a4e0688c75449b11d1a9fa6f23644 | 3d350674e7e18bd9742429d5202fc755 | Gets an Enumerable that iterates over the valid lengths of a match that are equal to or less than <paramref name="maxLength"/>.
Only inputs of these lengths need to be tested, because length not returned would never match. | where TManyGenerex : GenerexWithResultBase<T, IEnumerable<TResult>, TManyGenerex, TManyGenerexMatch>
where TManyGenerexMatch : GenerexMatch<T, IEnumerable<TResult>>
{
if (min < 0) throw new ArgumentOutOfRangeException("'min' cannot be negative.", "min");
if (max <... | 0 |
66cad50bfe4c98f759efde2ab80b8dc7 | 2439ab48268d4afc2e3660a3058169ee | 根据学生ID进行排序的比较函数 | public class Student implements Comparable<Student>
public int compareTo(Student stu) {
if (this.id > stu.getId()) {
return 1;
} else {
return -1;
}
} | 1 |
2b624fef8be32500ae9171aa073e04c5 | 4d2bc3ebe1021b4ed22402967148d7ca | This method indexes the list of files with numbers to be shown on the ui | {
$result = $haystack;
$iterator = 0;
foreach ($result as $index => $file) {
$result[$index]['number'] = $iterator;
$iterator++;
}
return $result;
} | 1 |
0147bb84acd22e1585ac3bcffaae974e | 40ae5d4e128c59fc86b7f5b0ce450b25 | The deployment mode of the broker. Available values:.
- ``SINGLE_INSTANCE``
- ``ACTIVE_STANDBY_MULTI_AZ``
- ``CLUSTER_MULTI_AZ``
:link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-amazonmq-broker.html#cfn-amazonmq-broker-deploymentmode | class GetInstanceTypeOfferingsBrokerInstanceOptionResult(dict):
def supported_deployment_modes(self) -> Sequence[str]:
return pulumi.get(self, "supported_deployment_modes") | 1 |
a7f585cf02949974736244894ba60e46 | fed4f0c45d9b2203de2f006c143987e9 | Gets the duration han text message max. | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AlcVoiceMailProfile", propOrder = {
"id",
"displayName",
"type",
"maxGreetingDuration",
"maxLiveRecordDuration",
"maxMessageDuration",
"maxSizePerMailbox",
"agingOfNewMessages",
"agingOfSavedMessages",
"accessibleV... | 0 |
d3b7d0219fc970af07f558e36526ba1b | 391604941df4288f8b4d5c41b33d7c6b | 根据clientId以及当前时间戳生成AuthorizationCode(有效期为10分钟) | String createAuthorizationCode(String clientIdStr, String scopeStr, User user); | 0 |
e0bc2536c40d052f38a500ea7b6c5565 | 6385fda398e7c9f4c8f9ea8646c15066 | Add names to deployments that are missing them. | running_actor_names = [actor["name"] for actor in list_actors()]
all_deployments_live, nonliving_deployment = True, ""
for deployment_name in names:
for actor_name in running_actor_names:
if deployment_name in actor_name:
break
else:
all_deployments_li... | 0 |
a55fcac928283bcf2f29f17a365559f5 | 9493d2947a487b1c40951df0ddef2f58 | Event listeners for creating items, searching and marking item as favorite | public class ExploreFragment extends Fragment
void createHandlers(){
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
adapter.getFilter().filter("");
... | 0 |
9ecf19922f79a1089eb383bc329d7069 | 2b9e8dbafa19d0b6d3acbd244ae8d699 | Return the number of violation suppressions in the source code of the product. | public get suppressions(): Map<string, string[]> | undefined {
return this._suppressions;
} | 0 |
ec8bc1430d2bc553d3a9b61baf0e6875 | afbfa211a850f22c5f17a3dea3675f5f | res.cmd_tuples() -> Integer
Returns the number of tuples (rows) affected by the SQL command.
If the SQL command that generated the PG::Result was not one of:
<tt>SELECT</tt>
<tt>CREATE TABLE AS</tt>
<tt>INSERT</tt>
<tt>UPDATE</tt>
<tt>DELETE</tt>
<tt>MOVE</tt>
<tt>FETCH</tt>
<tt>COPY</tt>
an +EXECUTE+ of a prepared que... | class DoAdapter
def update_sql(sql, name = nil)
result = execute(sql, name)
result.to_i
end | 0 |
12b7b17e88cf6017dfa1973ecf82e626 | c6c60e61ef9ed1dd1e95bbca3ec0bcc5 | Switches the network manager to server mode. This function sets the state
to accepting connections. | {
XFCASSERT(mRole == MP_ROLE_PARTICIPANT);
ClientStateEntry *csEntry = getClient(0);
csEntry->init(NULL, MP_CONNECTION_STATE_CONNECTED, aClientId, 0);
mClientCount = 1;
HandshakePacket handshakePacket;
mNetwork->send(aClientId, MP_DATA_RECEIVER_ID, XFCNET_GUARANTEED, &handshakePacket);
mNetw... | 0 |
607f8beba8b3b38a1c1bc62fd89a5ec8 | 8322b49afafd7077c5d49985383a83c3 | 지도 위에 표시되고 있는 마커 모두 제거 | function removeMarker() {
mapObj.clearMap();
} | 0 |
2db18f887f0f1d02fc770e311bc7a786 | b2cd62d347c5d343d59044c018121b8a | method saves or deletes images | namespace TravelListApp.ViewModels
public class TravelListItemViewModel : ValidatableModelBase
public async Task SaveImagesAsync()
{
foreach (CarouselImage ic in imageChanges)
{
if (ic.IsNew)
{
ic.TravelListItemID = this.TravelListI... | 1 |
7667f16d8a0d5957dc6ed733ae945f7c | b8e3e51f5011b2b29b171debef01432b | 查找改学员报考的科目还存不存在 | public Integer checkBeforeSubjectByRecord(String before_code, String student_code); | 1 |
fbaa87640180b2c86e1cd840fcc7e4b6 | 1314e205c08c726149a86a0493991bc4 | Ends the configuration of this types and returns the formatter instance.
This method only returns the current formatter and does not have any side effects.
It may be useful in a fluent configuration context. | namespace Fhwk.Core.Config
public class FirehawkConfig
public Firehawk EndConfiguration()
{
return config;
} | 1 |
c9faf35228138317af10afb836645508 | f7890d867f25f2db69b51b04fc4c1997 | Set send comment layout visibility | void setVoiceLayoutVisible(int visibility); | 0 |
94e68fe39494bf804a20a4f6708bfa1b | 95b4ffcdb60ce2ea933241e184ceb9fd | 获取全部的雇佣兵列表 | function PlayerDataManager:getAllSoliders()
return self.data.follower
end | 1 |
5ade9e517352c06bff4e3817d97475e5 | c72b9805b95bc5becaccb06cc74302fa | `nickname already in use` error handler | try:
Nick_name = request.GET['nick_name']
member = Member.objects.get(nick_name = Nick_name)
except Member.DoesNotExist:
content = {
"message" : "중복닉네임이 없습니다.",
"result" : {}
}
return Response(content, status=status.HTTP_200_OK)
content... | 1 |
740487f21b0d080460e60e3b071cb988 | 5c4fc94c361bedddee8a01001eac312c | 创建识别窗口 | class FaceRecognizer:
# 初始化,加载数据
def start_recognize(self):
mtcnn = MTCNN(device=self.device, keep_all=True)
resnet = InceptionResnetV1(pretrained='vggface2').eval().to(self.device)
windows_name = 'FaceRecognize'
cv2.namedWindow(windows_name)
cap = cv2.VideoCapture(0, cv2.CA... | 1 |
c7e5ca2cc57bf42b72ccb704cca56a51 | 1590a5a3e1ae1a05dff6d6aec78b576c | @brief Obtener conjunto de estados de muerte | set<State> ds;
for(auto x: this->q_) {
if (x.deadstate())
ds.insert(x);
}
return ds;
} | 1 |
1f8377f2e5734999e9af8e2d6b85a1dc | a7ac7e2931bfa49fdc107f80306d0e86 | Determine if the object is a match for "foreach" operations | public function isIterateable(); | 1 |
561211a8cfe3c7022903c650794a563d | 361c3a117be14d4b48910181b672ab64 | ===============
V_CalcRoll
=============== | {
int col, row;
int pitch_line, middle, hit, subval;
double roll, a_roll;
int line_set = LINE_SET_STRAIGHT__;
int line_set_overflow = LINE_SET_STRAIGHT_O;
int subval_overflow = 9;
double K_roll, K_pitch;
if(!pal_ntsc ) {
K_pitch = pitch_k_ntsc;
K_roll = roll_k_n... | 1 |
f1a42d971758707abfe77e6b3ba5a0e5 | 80fd683fc4fe92b738c0a68af3e125ac | > Get Latch Values from CP2112 | request_type = (DEVICE_TO_HOST | VENDOR_TYPE | DEVICE_RECIPIENT)
wValue = 0
wIndex = 0
value, = self.udev.controlRead(request_type, self.DLATCH, wValue, wIndex, 1, self.HS_DELAY)
return value | 1 |
2ad5b31db05d16abe8ac0caf99470eac | 1fd96c449d0b16d942d819368ee6aa59 | 해당 EventLog를 반환한다. Event Source가 없다면 생성한다. | namespace Infrastructure.MessageLog
public static class EventLogExtensions
IEventQuery FromSource(string sourceType); | 0 |
bb3a4f5e1472c49a8ed2ef8bd70e9e95 | 3b0940134f02506b8f87ba31aeac01d5 | 获取类名路径信息,例如:SysDict 则返回 "sys/dict/"
类 | public class ReflectUtil
public static String getClasspath(Class clazz){
String path = clazz.getName();
return path.substring(0,path.lastIndexOf("."));
} | 0 |
813bb8ca666f109e9b6b4bf81bac3d23 | 3dff3c2f1307729f3a2476adfbe52c8c | Set the disjointness of the graph. | public class LagGraphParams implements Params
public void setIndegree(int indegree) {
if (indegree > 1) {
this.indegree = indegree;
}
} | 0 |
7cef78b7152bce59c2416a415f734348 | f463e00b59e718fdb428a051e9349429 | **************************
Liste Organisme
************************** | class OrganismesController
def index
@organismes = Organisme.all
end | 1 |
0fae8d231fe8ef0e7975f358c9c74b9c | de8b93de29e4bab74ccac24fd18ba1ae | calibration function for GQH model based on Menq curves | def Calib(hdatax, Ndatax, INITx, Amgrx):
[H00, L00, Y00, latid] = INITx
hx = hdatax[5]
popgx = (Ndatax[5] - Ndatax[4])/Ndatax[4]
N0 = Ndatax[0]
nux = (1 + popgx) / (1 + hx)
nsx = (1 + popgx) * hx / (1 + hx)
N00 = H00 + L00
h00 = H00/L00
lat = latid * np.pi/180
Temp0 = - 28/(np.pi... | 1 |
e9cc0d15a7f13b67c84bbdcf360110af | 60aee07986ab1623c9afb59eda61a012 | Fetches driver data from the server | class Stats: # pylint: disable=R0904
def driver_data(self, driver_name):
return self._req(
URLs.DRIVER_STATUS % (urlencode({"searchTerms": driver_name}))
) | 1 |
19934a2d46f220e9cb7bfee22b407916 | 221cd10136e3aeab6987ad26d56a58cb | Retrieves a Windows Registry key for a path specification. | class CREGWinRegistryFile(interface.WinRegistryFile):
def GetKeyByPath(self, key_path):
key_path_upper = key_path.upper()
if key_path_upper.startswith(self._key_path_prefix_upper):
relative_key_path = key_path[self._key_path_prefix_length:]
elif key_path.startswith(definitions.KEY_PATH_SEPARATOR):
... | 1 |
7fcfde3e70b69f785031698d22f97f7e | 4a9907636d91f2746ca7754708e5af6c | Scalar division, for normalization | {
if (fScalar != 0.f)
{
*this *= (1.f / fScalar);
}
else
{
x = FLT_MAX;
y = FLT_MAX;
}
return *this;
} | 1 |
46e8e11f7e14c778f4977ef8123ae09b | 6ea4195eeae2a636775335522fa797b6 | Deactivate tooltip and remove parent | public class CraftingTooltip : MonoBehaviour
public void Deactivate()
{
tooltipPanel.SetActive(false);
} | 0 |
c2c695eb1e1c49ae7b8f95c78b2db246 | c6b1718c86e53c5748ba673f629e1506 | Test for the definition of multiple diagrams on the same document
- | class PlantumlTest(unittest.TestCase):
def test_other_fenced_code(self):
text = self.text_builder.text('```bash\nls -l\n```\n') \
.text('\nA paragraph\n\n') \
.diagram('A --> B') \
.text('\nAnother paragraph\n') \
.build()
self.assertEqual(self._stripImage... | 0 |
56d314c843a7d57aea60970737ee6e76 | fbca9709e1b85db9f5851aba0309d990 | Stores the system time when it is published. | namespace NovaAlert.Entities
[OperationContract(IsOneWay=true)]
void UpdateSystemDateTime(DateTime datetime); | 0 |
42b7d3c65789738c78490b3618ac5faf | abb962a5177250bb5f189d274d1cf64f | Updates a workout routine | namespace LiftLog.Web.Controllers.Web
[Authorize(Policy = "WorkoutAccessPolicy")]
public class WorkoutController : Controller
[HttpPost]
public async Task<IActionResult> EditWorkout(WorkoutViewModel workoutViewModel)
{
var user = await GetCurrentUserAsync();
if (!ModelSta... | 1 |
ac715f6f7e1bf07741360ae755db65c1 | 74dbab6880380f988a06be9f33a0e179 | Returns the value of the top disk. | def top_disk(disk_num, peg_num, peg_no, state):
for i in range(disk_num):
if (state[i] == peg_no):
return i | 1 |
d623a8c3463805680ccbb00f28671356 | 3dcbee80dfed0f114452f6799ea25621 | Gets if the color is dark, i.e. if the average value of the
RGB channels is <127 | {
double dWhite = ColorUtil.colorDistance (r, g, b, 1.0, 1.0, 1.0);
double dBlack = ColorUtil.colorDistance (r, g, b, 0.0, 0.0, 0.0);
return dBlack < dWhite;
} | 0 |
186b17cc3a6cfadf2f76a454f2c5a59c | 6a63443a2136ffe058902c668cc70164 | Setzt den JDialog auf visible. Dies darf erst als letztes geschehen damit die Modularität
richtig greift. | class DialogPanel extends JLayeredPane
public void showDialog(){
dialogPane.setVisible(true);
glassPane.setVisible(true);
} | 0 |
b95d7d0be579c590c61d65959efcc7e0 | 0896728950206381f0b4f2aa67fcd14d | Sets the skill of the trainer to the given value. | void Skills::set_value(const SkillType skill_name, const unsigned int value)
{
SkillPtr skill_to_set = skills[skill_name];
skill_to_set->set_value(value);
} | 1 |
7219bf12e47d779770ee7b2d5c6173ac | f221e636723a6d0db048197cd9186da7 | Retourne la dernière entrée d'une table | export class HfsqlController
public HLitDernier(filename: string) {
return this.db.querySync("select last 1 * from " + filename);
} | 1 |
32906225d1e8455a244d20ae2a63ed14 | f1156d7234a5ead4e931a3c63b39d7c1 | 用于计算两点的距离 | namespace 修图.Library
class Method
public static double 两点距(Point A, Point B)
{
return Math.Sqrt((A.X - B.X) * (A.X - B.X) + (A.Y - B.Y) * (A.Y - B.Y));
} | 1 |
46c27e87384593cd1695f1de9811db95 | 6cf406d2969328f23097202a95670e11 | Called when a list-box-item gets selected. | {
TreeNode clickedNode = null;
if (e == null)
clickedNode = selListNode;
else
clickedNode = e.Node;
if (clickedNode == null)
return;
selListNode = clickedNode;
string listID = clickedNode.Name... | 1 |
b401ee01e98ba60003883f7e9371f350 | 3bf02e6842f844e1e668ce2e4b9b19e7 | 当获取焦点的时候加载数据 | onLoad(options) {
let self = this;
setTimeout(() => {
self.setData({
focused: true
});
}, 0);
} | 0 |
f61e07aa2d87bc705f35091b1ae4f53f | 5f4e3c2697572f66e09e9e9a805fedcf | Za dano osebo vrne množico priporočil, komu naj še sledi.
Priporočila se izračunajo tako, da se vzame vse osebe, ki ji sledijo
sledene osebe, vendar še niso med sledenimi. | function VratVsechnyCiloveZemeProUtok( $id_zeme, $id_ligy ){
global $db;
$id_ligy = sqlsafe ( $id_ligy);
$id_zeme = sqlsafe ( $id_zeme);
$first_neighbours = array();
$second_neighbours = array();
$res = $db->Query("SELECT * FROM `sousede` where zeme1='". $id_zeme ."';");
while ($sousede = $db->GetFetchAsso... | 0 |
ee6702e5f04fed23b21b2e8dcba6926a | aa781edffa2e4a4ce19bd75d10b985f2 | 控制炼化及物品按钮是否置灰 | self:setFrameVisible1()
self.useBtn2.title = language.pack05
self.discardBtn2.visible = false
self.devourBtn.y = self.useBtn.y + 41
self.discardBtn.y = self.useBtn.y + 82
local lintongEnabled = mgr.ModuleMgr:CheckView(1088)
self.devourBtn.enabled = lintongEnabled
self.devourBtn2.enabled ... | 1 |
aa7e231004e755187747617a8ea6318c | 40af2778d83cb5258e96b42ae47e970f | Setter de la varible partidasPerdidas. | class Historial:
def partidas_primero(self, value):
self.__partidas_primero = value | 0 |
2c7ce8a73d646523f0b0c08d7f14bd7f | 22abcc5c7ceb78e227bb1e15cdbe3236 | Will return an error when given `text` includes non-encodable characters. | namespace terminalpp
terminalpp::string encode(std::string const &text)
{
return encode(text.c_str(), text.size());
} | 0 |
2b414032d9263f5d60e3206d1378c081 | bf3751044d0dd4a4976b99ce4a808fde | Метод нахождения в заданном массиве минимальных по стоимости проезда путей | List<int[]> shortestPath = new ArrayList<>();
int colPtr = costArray.length - 1;
while (colPtr != 0) {
int minOrigPort = 0;
int minOrigCost = Integer.MAX_VALUE;
if (colPtr < costArray.length - 1)
shortestPath.add(new int[]{colPtr, colPtr, costA... | 1 |
c64822b43ba7d1963d4d12caf4ab46a5 | 444bbb9262e38f319faa26753f140656 | Request the shared queue and attach touch handler to interrupt pin | startAddr = (utility::Data*) shmat(shmid, nullptr, 0);
if (startAddr) {
sharedQueue.setStartAddr(startAddr);
return EXIT_SUCCESS;
}else {
return EXIT_SUCCESS;
}
} | 0 |
de1d2d2c51ab856d4898ad89e824097f | d9e552086b7d0a6fbc7e17a1771d4369 | Deletes all watches for the selected user | symbols = inputs_to_set(inputSymbols)
ids = get_instruments_by_symbols(symbols, info='id')
data = []
all_watchlists = get_all_watchlists()
watchlist_id = ''
for wl in all_watchlists['results']:
if wl['display_name'] == name:
watchlist_id = wl['id']
for id in ids:
... | 0 |
bff40d2d388e53cc4fef5fb970813aac | 803e9ae3722dc39b1ee49008f3da17b1 | Remove scheme by category. | {
$category = Category::find($category_id);
foreach ($category->measures as $measure) {
$measure->references()->detach();
$measure->qualifiers()->detach();
$measure->subsidiaries()->detach();
Measure::destroy($measure->id);
}
$category-... | 1 |
536f3bfb3fe8f201f87e576b9e982eb4 | 488d0512099c17b52be28813cab321a6 | Returns the sectCode. | @Entity
@Table(name = "mfg_entityactual")
public class MfgEntityactual implements Serializable
public String getSectCode() {
return sectCode;
} | 1 |
e7dd64627fe68dbb3a16817fbef19caa | e339a59d6516d8ffea15c8545ac6d1bc | Test dispatching a static route (doesn't go through regex matching). | {
$Router = new Router();
$Router->add_route('*', array(
$this,
'hello_world_output'
));
$Router->add_route('/index/', 'RouterTest::static_hello_world_output');
$Content = $Router->call_route('/some-route/');
$this->assertEquals('Hello world!',... | 1 |
d283d00b7612b9730a6275c447da38e5 | eb7e4e369ab1beb39d03c37134d1c961 | Resets the items within the comboboxes so they stay current. | {
rebindLocations(locationComboBox);
rebindLocations(directionConnectionComboBox);
rebindLocations(startLocationComboBox);
rebindLocations(endLocationComboBox);
rebindDirections();
updateAvailableItems();
rebindListBox();
... | 1 |
f3110e2eedb0cfde6e7e2cfde2fb3fdd | 7661029b6c4aa9ae72bfa99d30d7de49 | クラスにつけた名前で要素を有効にする関数 | var elem = document.getElementById(elemName)
if(elem != null){
elem.disabled=false
}
} | 0 |
63271231e519725e43e155cdce40c0d6 | 9067e542a930ec018a202b66e7774c72 | Pretvori čas v sekunde | def cas_na_sekundy(casstr):
dt = datetime.strptime(casstr, '%H:%M:%S')
return dt.hour * 3600 + dt.minute * 60 + dt.second | 1 |
268477d071d9a2828ed8496f63325c6e | 6e4951fc40e0ae90f1984c01784eac77 | find intervals of consecutive ones in zero_one_vec
return the the corresponding coordinates at the start end end positions
of these intervals
the vector <positions> gives the coordinate corresponding to the indices | def crossing_zeros(distmap):
index = []
slope = []
for i in xrange(len(distmap)-1):
if distmap[i]*distmap[i+1] < 0:
slope.append(distmap[i+1] - distmap[i])
index.append(i + np.abs(distmap[i] / slope[-1]))
return [index, slope] | 0 |
5c93f6ef8dba7daa5c146109deb76edf | 772c4c52ea6590dcff2c53252910219c | 返回sheet表数目,为实际sheet数目 | def getshnum(newfile):
x=0
sh=getsheet(newfile)
for sheet in sh:
x+=1
return x | 1 |
e8a9c8ba8814c28ada7acb569d80269a | 8dcaf535b9603bcde6ac4f0113303323 | !
\brief Requests L1 to stop reading BCCH sys info | const gas_id_t gas_id
)
{
gprs_scell_info_t * scell_info = rr_gprs_get_scell_info(gas_id);
send_mph_read_sys_info_req(
get_remaining_si_bitmask(scell_info),
scell_info->bcch_sys_info.si_messages_on_bcch_ext,
scell_info->bcch_sys_info.single_l1_si_request_only,
gas_id
);
rr_gprs_start_sys_info_... | 0 |
248d04d3a7f0c728a76def9171ea1784 | 13ca2478ae1074b775b99487f25ceb22 | The manifest is configured so all file accesses are allowed but reported, including child processes. | class ProcKptrRestrictTest(KernelProcFileTestBase.KernelProcFileTestBase):
def get_permission_checker(self):
return target_file_utils.IsReadWrite | 0 |
09ef7a9338508fdc625d2fb9cff186bf | 3ac422d82d8993afae388a5bc3be6b2e | Takes the photo image and FaceDetector results and assembles the visualization onto the Canvas. | save_flag = (args.webcam < 0) or FORCED_SAVE
offset_ = 0.5
font = cv.FONT_HERSHEY_SIMPLEX
for i in range(0, len(final_detections)):
class_name = labels[i]
color = class_color[i].tolist()
for j in range(0, len(final_detections[i])):
p1 = int(final_dete... | 1 |
119a4064aa694d36e1bb129593912923 | 7a30e1d9dcea6b469bc21be05f0ae139 | Event handler for typing in recipient input. | boolean adjusting = ((ListSelectionEvent) event).getValueIsAdjusting();
if (!adjusting) {
Object selected = panel.getRecipientList().getSelectedValue();
if ((selected != null) && (selected instanceof RecipientListEntry)) {
panel.getRecipientDet... | 0 |
3130f013e1ad46b1c07ffa872b53b314 | 09ba27a1015c37a02598ad3a2536563b | !
\brief callback when the encoder count changes | void PheenoRobot::encoderLLCallback(const std_msgs::Int16::ConstPtr& msg)
{
encoder_values[0] = static_cast<int>(msg->data);
} | 1 |
b7e28a6377f966ca028dc32635621d20 | e33a582dfb6f1edcabd3f30cfd828215 | Console script for aio_marantz_avr. | def main(): | 0 |
df713a4ecfaa0e41223c8cb2faea1ab8 | 35a9eb8cd53cdb95b71a6501e68988e7 | Represents a constant_pool_class_info.
nameIndex - The index into the constant pool that represents the class | count := len(cfconstantPool.ConstantPool())
constants := make([]Constant, count)
cp := &ConstantPool{class, constants}
for i := 1; i < count; i++ {
cpInfo := cfconstantPool.ConstantPool()[i]
switch cpInfo.(type) {
case *classfile.ConstantIntegerInfo:
intInfo := cpInfo.(*classfile.ConstantIntegerInfo)
co... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.