query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
5e2b7dcc4885bd4e27a5b273a1693c78 | 67e7ca2cdd87f3219feb699153509223 | 增加一条专项联系缓存数据,如果存在则修改,如果不存在则增加 | {
int result = ndal.IsExitsLogCache(ctype, issue);
if (result > 0) return -1000;
IList<T_CooperConfig> list = DataTableToList.ModelConvertHelper<T_CooperConfig>.ConvertToModel(cdal.GetCooperConfig(ctype, issue));
if (list.Count > 0) {
T_CooperConfi... | 0 |
e207262d949433ec818ab1a35e83c861 | a391dcf59bc9a42e87434d493e5cf768 | function that loads dead screens when character dies | namespace RogueLike
static class GameOver
public static void LoadScreen()
{
exitButton = null;
player = Level.player;
player.isAttacking = false;
timeTillfade = 0;
gameOverFade = 0;
player.SetPlayerPosition(new Vector2(Constants.windowW... | 1 |
8b4201787a809332f728d65a5fcabad9 | 798d1a76a6e4431ffea0a7e6b69aea9f | Given a screen descriptor, a buffer, and coordinates, this function draws the glyph corresponding
to the given character on the buffer.
wonkiness is because I'm trying to avoid multiplication. | int offset;
volatile char * character_buffer = (char *) 0xC9000000;
offset = (y << 7) + x;
while (*(text_ptr)) {
*(character_buffer+offset) = *(text_ptr);
++text_ptr;
++offset;
}
} | 0 |
722ae623198f06defe9b3631f995d25d | 06c9ac7a59f939f21d66266ce2f99fda | Returns the wind sped in Knots. | class Weather
def wind_kph
@wind_kph ||= @data["windKPH"].to_f
end | 0 |
67a06e42005dd25bf1d8b003398e6b08 | c3eeb68ea49f8deb9208960659d71fcd | Verifies that the candidate is a local minimum | if ((abs(xm1 - xm) <= comparisonTollerance)
|| (f.value(xm1) <= comparisonTollerance && f.value(xm1) >= -comparisonTollerance)) {
return true;
} else {
return false;
}
} | 0 |
8d630fc5315babf7a05afecc2fc2465d | e951211ced1ee3fc5197e0487c957bef | Piilottaa tuplausvalintapainikkeet | lopetusPainike = new JButton("Lopeta");
lopetusPainike.addActionListener(this);
uusipeliPainike = new JButton("Uusi peli");
uusipeliPainike.addActionListener(this);
} | 0 |
2b612c80f35ef1af2ec72f64aa46d289 | 09d737e5ebeeda413dc3a7ab8625e360 | Grab the last message on the service. | {
if (this.messageQueue.IsEmpty)
{
return null;
}
var messages = this.messageQueue.ToArray();
return messages[messages.Length - 1];
} | 1 |
a3039a0148594fd324db928f67493839 | 7219ec8054c6ec6f85063bbf9db42a00 | Gets the value of member variable contactFax | class Contact extends \Frontend\AppBundle\Entity\Contact implements \Doctrine\ORM\Proxy\Proxy
public function getFax()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getFax', array());
return parent::getFax();
} | 0 |
fd0715da73daaae71a99ca18f817a2a4 | 31c31288272f57e6e49a2f44265c7f01 | zero-inflated negative binomial log-likelihood function | class GenericZeroInflated(CountModel):
def loglikeobs(self, params):
params_infl = params[:self.k_inflate]
params_main = params[self.k_inflate:]
y = self.endog
w = self.model_infl.predict(params_infl)
w = np.clip(w, np.finfo(float).eps, 1 - np.finfo(float).eps)
llf_main =... | 1 |
8d7b341b7cfd01ef009e591b2c898bc3 | 2c3212ea282dff292115d8f2efa2a64b | WebStoreの取得要求 | void Layer_GoogleIAB::OpenStore()
{
Work_Status = OpenStore_0;
} | 0 |
7347691fc9490e1146535ceea88326ce | 1c3b4582a0b5f4c73776a5eacbe2e30a | Test to verify that a valid API method name with special characters
generates a MethodNameInspection error. | class SmogDaoTest extends AbstractDaoTestCase
public function testImproperApiMethod()
{
$this->testedDao->fetchImproperDataName();
} | 0 |
288d1d9bd62c36f0693e85c8de51f127 | 629b1d888544d2b3a0585f18e0b45794 | Перезагружает данные модели, вставляя результаты поиска новой локации | export class HomePage
public searchAgain() {
this.plt.ready().then(() => {
this.newResultsReady = false;
this.newResults = [];
this.loadGeolocation().then(
res => {
if (res.error === null) {
this.offline = false;
this.getClosestTenLocations(res, true);
... | 1 |
65fe8a8cf82f75ff9e801ef555c673a3 | aec654a67587241f732b8189e2a0d69b | NewAlibabaWdkTradeOrderSuccessCreateRequest 初始化AlibabaWdkTradeOrderSuccessCreateAPIRequest对象 | func NewAlibabaSeakingTaskReportRequest() *AlibabaSeakingTaskReportAPIRequest {
return &AlibabaSeakingTaskReportAPIRequest{
Params: model.NewParams(),
}
} | 0 |
65983b1170e39aa082f1500ba96d6677 | 6ddd2a8853a3bca62d841aecdd4997a9 | Force a load from streams so we don't lock the files on disk. This way we can test
shadow copying without leaving a mess behind. | for idx, fd in enumerate(self._files):
if fd:
continue
with self._locks[idx]:
self._files[idx] = self.file_wrapper.open(
self._paths[idx])
self._open = True | 0 |
98896b17bae5b6cf219ed862782dba43 | 46c238ae877a3cd520f651b36bb62278 | When shutting down the flask server, make sure any subprocesses are also terminated. See issue #2408. | func = request.environ.get('werkzeug.server.shutdown')
if func is None:
raise RuntimeError('Not running with the Werkzeug Server')
func() | 0 |
0854123750b7fbc3742242e03a24b839 | 64511d018bf78d3667abfbce7dc4a0ee | Constructs an instance of the DataTable class. | class DataTableConfiguration
public function __construct(array $config)
{
$this->config = $config;
} | 0 |
19110e25970678d4f19d38a1361643e9 | cb82cab6a3a8452b1515277b5206e14b | Gets a string containing the location's full address in one line | class Locations extends BaseLocations
public function getAddressString()
{
$street1 = $this->getStreet1();
$city = $this->getCity();
$state = $this->getState();
$postal = $this->getPostalCode();
return Locations::createAddressString($street1, $city, $state, $postal);
} | 1 |
bb89cea0964517a5c955a8fecc82a02f | 66c7e813d73ba5ba7fd884c10735411c | 检查某流水号消费是否已被兑换成积分 | {
$where['order_number'] = $out_trade_no;
$where['user_id'] = $user_id;
$where['game_id'] = $game_id;
$is = M('spend','tab_')->where($where)->find();
if($is)
{
return $is;
}else
{
return false;
}
} | 1 |
f5a5d012692b07a8457b780efa17a98b | 148ec9fb0d035e1c38d236760edd9cb9 | Retrouver le login de quelqu'un qui cherche a se loger
Reconnaitre aussi ceux qui donnent leur nom ou email au lieu du login | UserDto findUserByLogin(String pseudo); | 0 |
66233b15a515d0c39fa6af732c6bb326 | 4d6b4ddf56feb6b323fefd91e4b7336a | CONSTRUCTION OF THE FICHERA CORNER FROM A CUBE - SUBDIVIDING ITS - AND DELETING A RIGHT TOP CUBE SON | std::array<std::array<char,9>,6> temp;
temp = cube;
cube[1][6] = temp[4][8];
cube[1][7] = temp[4][5];
cube[1][8] = temp[4][2];
cube[2][0] = temp[1][6];
cube[2][3] = temp[1][7];
cube[2][6] = temp[1][8];
cube[3][0] = temp[2][6];
cube[3][1] = temp[2][3];
cube[3][2] = temp[2][0];... | 0 |
18496de72b95692d4b532bb803fa1a6b | c8f7a2aa6d880de807cfc02cb5d33cc7 | This function loads a model that helps us extract
the synonyms into the words of the question.
This is to better retrieve! | import gensim, logging
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
model = gensim.models.Word2Vec.load_word2vec_format(model_file,binary=True)
return model | 1 |
d0c792b06d4deaad25b9a0be99d03623 | d4b147f8505f8c33901fb2a138856995 | 父进程创建通道,这里其实是创建一个客户端并尝试连接服务器(子进程) | int n;
int fd[2];
pid_t pid;
char line[MAXLINE];
if (pipe(fd) < 0) {
err_sys("pipe error");
}
if ( (pid = fork()) < 0) {
err_sys("fork error");
} else if (pid > 0) {
close(fd[0]);
printf("父进程发送数据...\n");
write(fd[1], "hello world\n", ... | 0 |
1e3b49618a16927567dbe7606af91c27 | 8b1c2d3f5012962b99556b3f63719298 | Set the growth direction of the widgets layout. | class RadioButtons(
QBaseValueWidget,
protocols.CategoricalWidgetProtocol,
protocols.SupportsOrientation,
):
def _mgui_set_orientation(self, value: str) -> None:
new_layout = QtW.QHBoxLayout() if value == "horizontal" else QtW.QVBoxLayout()
for btn in self._btn_group.buttons():
n... | 1 |
c02be684265b46a854822f4431b18d6d | 9d4dcab186a2779d7512b24e7519a7cb | Returns the meta object for the container reference '{@link umlClass.Property#getDatatype <em>Datatype</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EEnum getDatatype(); | 1 |
fe39c583c7195e73d6362ecd62833687 | dd662f23191e31ad297789e9d14f9b7c | Creates an instance of IssueDetails. | export default class IssuePrioritiesApi
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
} | 0 |
f3469a4bbd1ed33bd970fe485107ef8d | d582f0362eb3caa65f9dcd40ed606213 | Creates immutable dictionary instance with given keys and values. | class Dictionary(NativeValue, _NativeContainerMixin, MutableMapping):
def __init__(self, value, parent_descr):
value = value if value is not None else dict()
value = self._ensure_mapping_string_keys(value)
super().__init__(value, parent_descr) | 0 |
387ae58e6aa40aeeac6c2e1c325805f1 | 9ee9d03c2a194e2756a587cac383eb7b | Hiển thị các kiểu hợp đồng được định nghĩa | $this->isAuthorize();
$userID = $this->request->session()->get('userID');
$allAgmtTypes = Agmt_type::where('userID','=',$userID)->orderBy('id','DESC')->paginate(10);
return view('agreement.type.index', compact('allAgmtTypes'));
} | 1 |
7ba30baf90521cb125adbcb986ad822a | 23dea9907a75c5d59f8dc9239d013dc4 | Encode an integer as a fixed of 32bits with sign. | def encode_int32(value):
return value.to_bytes(4, BYTEORDER, signed=True) | 1 |
12d8136640a624b055b77eb51b9528df | e88859788586b2d9b14bb7a3eeb4ecce | Simulates unfocusing an element. | if (!this.get('canFixElement')) return;
const element = this.get('fixedElementRef');
element.style.left = '-9999px';
element.style.maxHeight = 'none';
element.style.position = '';
const component = this.get('componentRef');
$(component).blur();
this.removeScrollListeners();
} | 1 |
689f304f3bddda018fc9e4c7471e62b4 | 5fff5a438d22944c4307d73584914374 | Activates an int3 patch | IDT::set(33, (type_address) asm_int33, 1 << 3, 0x8e);
IDT::set(44, (type_address) asm_int44, 1 << 3, 0x8e);
ASM::out8(0x21, 0b11111001);
ASM::out8(0xa1, 0b11101111);
} | 1 |
750b5d2264f9de40cc354c8da527fb8d | fb3248073713c357f64f124353f42bd6 | Deletes an existing contrast type object | {
switch (x->index)
{
case 0:
Delete_V42bis(x->v42bis);
OSCL_DEFAULT_FREE(x->v42bis);
break;
default:
ErrorMessage("Delete_CompressionType: Illegal CHOICE index");
}
} | 0 |
f2e9816bf823486d8453c4eca4c130a9 | 89529506d804bdf02334af0926dc789f | 만약 player가 검은돌이라면, 인공지능은 1이 연속된 것이 있는지 확인해야 합니다. | def check() :
for i in range(square-2) :
for j in range(square-2) :
if j < square :
board[i,j,1] = 0
if board[i-1,j-1,0] == 1 :
board[i,j,1] = board[i,j,1] + 1
if board[i-1,j,0] == 1 :
board[i,j,1] = board[i,... | 0 |
dc23a9a229290dcae5cbb88d7a184637 | 52a38c71043e7784c99fc13e43c85dbb | Function that handles the initial placing of all the regular apples | class Board:
def place_new_apple(self):
field = []
for row in range(self._rows):
for column in range(self._columns):
if self._board[row][column] == 0:
field.append((row, column))
apples = 1
while apples > 0:
location = random.c... | 0 |
e11a9c457b61b2207c35a249ccf81c42 | af8bdc42cb7a5ece37121e0af872be7a | Best按钮被touch,切换bestMode | function ChooseModePanelTest:clickHardBtn()
self.hardMode = MapConstants.DIFFICULTY_MODE_HARD
self.easySelected:setVisible(false)
self.hardSelected:setVisible(true)
end | 0 |
09e12b4dc7ed758ba35738c3ba087902 | 63eb2b9c5ea76294e619c52eec414213 | Save an identifier. | {
if (!$this->getIsUniqueIdentifier($object)) {
Mage::throwException(Mage::helper('ctas')->__('Identifier already exists.'));
}
if (!$this->isValidIdentifier($object)) {
Mage::throwException(Mage::helper('ctas')->__('The Identifier contains capital letters or disallow... | 1 |
319b0a454ce8ca094a717fb655897ec8 | ee22f47c328e45256ee220e85dcd259e | Reads an comment segment. | {
TimedComment ans = null;
string line = this.reader.ReadLine();
if (line != null)
{
DateTime timestamp = DateTime.ParseExact(line.Substring(0, 27), this.timestampFormat, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal);
... | 1 |
6f4850c5cf2acb819ab8c4f721d062c9 | d56a76a459f39572e7a7071d6a7b468b | returns list of available weapons from character inventory | {
string list = "";
List<I_Item> values = null;
Inventory.TryGetValue(name, out values);
int count = 1;
list += "Weapons: \n";
foreach(IWeapon weapon in values)
{
list += count + ") " + weapon.ToString();
... | 1 |
6af97fddaf429924b7f93abf11423ffe | d5e9513b252b0e6cdea698533271f317 | Returns number of volumes | class IndexRecord implements RecordInterface
public function getVolumes()
{
return null;
} | 0 |
a6f98ff7772b8db0023f3511a9bd5a48 | 934f9cb274e4486839236dd238950787 | Ustawia informację o drodze na południe. | public function setSouth($south); | 1 |
f768e56e52c8025d6ecfb5bbeb780a39 | bf42f92cdf221871700a6ec918e3fcf1 | Return the total number of albums for the search query - regardless of the interval requested at creation.
If this value is larger than the interval specified at creation of the search object, more search results
are available. To fetch these, create a new search object with a new interval. | get numberOfSearchResults()
{
return null;
} | 0 |
84a657d5b051e0d3cebeabb77b4dba2b | 9db37c1d189241d20c47b70e3e0dcb6d | Create command pool to avoid unnecessary allocations during rendering | void VKRadialBlur::createCommandBuffers()
{
mDrawCmdBuffers.resize(mSwapChain.mImageCount);
VkCommandBufferAllocateInfo cmdBufAllocateInfo =
InitCommandBufferAllocateInfo(
cmdPool,
VK_COMMAND_BUFFER_LEVEL_PRIMARY,
static_cast<uint32_t>(mDrawCmdBuffers.size()));
VK_CHECK_RESULT(vkAllocateCommandB... | 0 |
806bcf6e1db6cf755e9e9b222744a835 | f8d5493c65e498a53f52cda2f2938afb | Function to update the header and to close a browse control file | {
if (mmiDataPtr->ncFileValid == true)
{
if(linkDataPtr->formToSys.OpMode == MEM || linkDataPtr->formToSys.OpMode == HOME)
{
strcpy(cncDataPtr->linkData.mmiToSys.ncFileName,mmiDataPtr->ncFileName );
cncDataPtr->linkData.mmiToSys.ncFileValid = true;
mmiDataPtr->ncFileValid = false;
}
else if (linkD... | 0 |
387386c6e0181493e28cdbcd563fb4e5 | 5638a8fc16d10a2eaed6d2b30b643388 | The first array represents the rows in the table,
the second one the columns | class funcs
public static function init_table_rows($cols_titles, $rows_titles)
{
array_unshift($cols_titles, current($rows_titles));
$table_rows = array();
$i = 1;
foreach ($rows_titles as $rows_title)
{
$j = 1;
foreach ($cols_titles as $cols_title)
{
if ($i == 1 && $j == 1)
{
$tabl... | 1 |
7fd6854d11f057f679f5d873b0011dc7 | 0457422a70c8c47584292d3b008b41c8 | Free GPU/CPU resources associated with specified light | public class LightLayer implements Drawable
public void removeLight(int id) {
this.lightsVertexArrays.remove(id);
} | 1 |
4717978c62e3333efa1dcb9ba7e6823c | da59d7c48ac17aa16fea6814033ced9f | This test verifies that the validate method returns false if the
constraint does not validate. | {
$constraint = new NotIn();
$constraint->ignoreCase = false;
$constraint->reservedValues[] = mb_strtoupper(self::VALUE_LOWER);
$context = $this->getMockBuilder(ExecutionContext::class)-> disableOriginalConstructor()->getMock();
$context->expects(static::never())->method('add... | 0 |
931cdf235f960127ecfa87238a969507 | d1340af78a73deb0e670c8d2f6185325 | Verifica si el pixel esta dentro del area requerida para el petalo | public class ConquerWorld
private boolean estaEnElRangoCircle(int posX, int posY, int area){
boolean flag = true;
int medida = calcularMedidasCircle(area);
if(posX+medida>ancho || posY+medida>alto || posX<0 || posY<0){
flag = false;
}
return flag;
} | 0 |
c9f726d71d41b4239e748de96187f74e | 13a5f85f06010586cba700cb205c2845 | 交互式添加标注 | const marker_id = Object.keys(marker_group._layers).length + 1
const marker = L.marker([lat, long], {
icon: IniDivIcon(marker_id),
draggable: true,
})
console.log(lat, long,"marker_id",marker_id)
marker_group.addLayer(marker)
marker.on("drag", function (e) {
IconOnMove(... | 1 |
7bfd8381b142bfce71742f20fae15ee6 | eecc9abf23dcaf7e5351e096845980bd | Test the method to tell if an obj is a standalone function | if inspect.isclass(object):
return False
if not inspect.isfunction(object):
return False
return True | 1 |
8fa85723d3436c123b49c53a8aadfdaf | a22164e2d31ccf321117231c974a1309 | Rebuilds all language caches (including global phrase cache). | function reload_all_translations()
{
global $CONFIG;
static $LANG_RELOAD_ALL_RUN;
if ($LANG_RELOAD_ALL_RUN) return null;
foreach ($CONFIG->language_paths as $path => $dummy)
register_translations($path, true);
$LANG_RELOAD_ALL_RUN = true;
} | 1 |
8875565307d2fec5f7ee28a2b617f1df | 77298840f666c86cd26b01490bcfd23f | Returns the number of mutations shared between the two
genotypes.
genotypes. | first = set((x.chrom, x.pos, x.ref, x.alt) for x in first if x.chrom != 'X')
second = set((x.chrom, x.pos, x.ref, x.alt) for x in second if x.chrom != 'X')
intersect = len(first & second)
union = len(first | second)
return intersect, intersect / union | 1 |
030ac93f8938e1aa38c4aa5e426e8ce5 | 583d2fa3ce25a9237b5db1285e4d70a0 | we aren't displaying route information | protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getSupportActionBar().hide();
setContentView(R.layout.activity_route_detail);
getIntentData();
init(savedInstanceState);
} | 0 |
7ead4b8c3fe00b0d653a894cfd2fd036 | 396529973008a99c5e3fbb3d2e301024 | Loads the direct children only.
It is used for fast initial loading where we don't require
changes handling. | namespace Rafy.Domain
public abstract partial class Entity : IDirtyAware, IDomainComponent
public LoadedChildrenEnumerator GetLoadedChildren()
{
return new LoadedChildrenEnumerator(this);
} | 0 |
e1caf65ecd53cb059500eb06fb317a83 | f56d0b5f937726eedcc33c32c1494bed | 영업점 발주요청 페이지 | {
$bParamResult = $this->initParam();
if ($bParamResult) {
libScript::historyBack(__('정확한 파람이 아닙니다.'));
}
$this->setGlobalValue();
$this->searchItemParam();
$this->oMarket = libMarketFactory::create($this, $this->aSearch);
$this->getOmMallList();
... | 1 |
c52a239b6200c0b179375b6be05716ec | c90c4e2133f9317d8e7699631df4f7b8 | https://stackoverflow.com/a/39637749/937377 | function stringToColor(str: string) {
let hash = 0;
for (let i = 0; i < str.length; i++) {
hash = str.charCodeAt(i) + ((hash << 5) - hash);
}
let color = '#';
for (let i = 0; i < 3; i++) {
const value = (hash >> (i * 8)) & 0xFF;
color += ('00' + value.toString(16)).substr(-2);
}
return color;
... | 1 |
a6c53c9a67f7af92b09382b616da037a | 0615c858120db5e13c2bc767bbc789d0 | This adds a property descriptor for the Faculty feature.
<!-- begin-user-doc -->
<!-- end-user-doc --> | itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_People_special_population_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_People_special_population_feature", "_UI_... | 0 |
6cddaf70586952a1c484106e6a3b0137 | b80794d273e6c61df4f4617a5609ea76 | Will inject the advice code for the different join-points based on sorted join-points | class AdviceFilter extends AbstractFilter
protected function findAdvicePointcutExpressions(FunctionDefinition $functionDefinition)
{
$pointcutExpressions = new PointcutExpressionList();
foreach ($this->aspectRegister as $aspect) {
foreach ($aspect->advices as $advice) {
f... | 0 |
d3b14533ec518ea5c0f2a90a7870a406 | 6d679adc8b08300fdb145e4667a64cb8 | Function
Synopsis [Levelizes the network.]
Description [This procedure connects the nodes into linked lists
according to their levels. It returns the number of levels. The nodes
in the levelized network can be traversed using iterators
Ntk_NetworkForEachNodeByLevel.]
SideEffects []
SeeAlso [] | int alloc_and_load_timing_graph_levels(void)
{
t_linked_int* free_list_head, *nodes_at_level_head;
int inode, num_at_level, iedge, to_node, num_out_edges, num_sinks,
num_levels, i;
edge_t* tedge;
int* tnode_fanin_left;
tnode_fanin_left = alloc_and_load_tnode_fanin_and_check_edges(&num_sinks)... | 1 |
0e9a67aa4cba2d7e3e8dda2a1aa0bea5 | 3062e87224ec7b3d95361ebe140723dd | Update dictionary after entry key has been changed.
After the caller modifies the key of an entry, they need to call
this function so that the dictionary can update itself accordingly. | with LockedArea(self._lock):
items, old_items = self._load_dict_object_()
cache_item = items.get(key)
if not cache_item:
cache_item = old_items.get(key, None)
if cache_item:
cache_item.last_reset_time = time.time()
c... | 0 |
e3838ca5ad139cef723ea164fa3708d0 | 4b6b664700f223631569c81df68d3be2 | Generate random color palette | function generatePalette() {
for ( var i = 0; i < 256; i++ ) {
palette[ i ] = { r: roffset, g: goffset, b: boffset};
if ( i < 85 ) {
roffset += 3;
} else if ( i < 170 ) {
goffset += 3;
} else if ( i < 256 ) {
boffset += 3;
}
}
} | 0 |
388ca90c92276cbc1eb82678baf05415 | bccb911dff5359bccde17efba26ecf89 | 直線をax+by+c=0で表すときのc | double LinearEquation::getC() {
return c;
} | 1 |
c65c2f153da54135de0ee725a931fbac | a851aed0b0edcd76cfd0f8f0580c8c1c | 设置用户下载速度 | namespace PowershellMonitor.UserControls
public partial class PowerShellStation : UserControl, IEquatable<PowerShellStation>
public void SetDownloadSpeed(int downloadSpeed)
{
if (this.DownloadSpeed == downloadSpeed) return;
this.DownloadSpeed = downloadSpeed;
textDownload... | 1 |
b8ad8822c097c24b66a61adbb30dc7b6 | 6d8f7367bb8be72469b2ba4ee237affd | initialize the SQLAlchemy Engine to communicate with
the RV database. | from dbsetup import engine
assert engine, "Please setup the database before attempting to use the engine"
return engine | 0 |
be4a45bfa6fe8d3d7e5a9332151d91a2 | 65ffcf5de7c3df46025a5f705a1325fd | Возвращает данные для обработчика для указанных пути и метода запроса.
Если обработчик не определён, возвращает null. | {
$handler = null;
$endpoint = $this->getEndpointIndex($request);
if ($endpoint) {
$handler = $this->handlers[$request->getMethod()][$endpoint];
$this->addRequestParamsFromRoute($endpoint, $request);
}
return $handler;
} | 1 |
d240f0305d430fc0ad230938a928b3a4 | 250434650dc1c2c3033b776028769e8b | 设置是否使用协议提额极速到账,用来接收checkbox的状态 。
0:页面上出现了checkbox,但未被买家选中,表示不走极速到账交易,走支付宝担保交易
1:页面上出现了checkbox,且被买家选中,表示走提额极速到账
参数示例:<pre></pre>
此参数必填 | class LC_Mdl_PG_MULPAY
function isEnableAu() {
if ($this->getUserSettings('use_au')) {
return true;
}
return false;
} | 0 |
300988b4ab03a29e57199e7a6015d2e8 | f23b52935335980882509760578be649 | Loads the events into event drop down list and map. | {
UpdateUIElements.PopulateAllEventViewControls(
EventView_ListView, EV_EventID_TextBox, EV_DateStart_DatePicker,
EV_DateEnd_DatePicker, EV_EventType_ComboBox, EV_State_ComboBox,
EV_Severity_ComboBox,EV_Keywords_ListBox, Bottom_StatusBar);
} | 0 |
4c2327a13a03cfdd525e77c2ef910c84 | e762d0c6bfdb2e149626e5cd7ca9ce93 | Вызывает форму для удаления группы | if request.is_ajax() and request.method == 'GET':
waypoint_group = get_object_or_404(WaypointGroup, pk=id_waypoint_group)
form = DeleteWaypointGroupForm(initial={'id_waypoint_group': waypoint_group.pk})
context = {
'group': waypoint_group,
'delete_form': form
... | 1 |
2df38481942812d7654a3d0cca24a49a | 140bf8f656c2791455fbef1b5124aab6 | 图片暂停旋转 | class Library extends Init
public function __ImagesRotate(){
$aid = (int) @$_POST['aid'];
$list = @$_POST['list'];
$angle = @$_POST['angle'] == 'right' ? 90 : 270;
if (!is_array($list)) return [];
$list = array_values($list);
foreach ($list as $k => $v) $list[$k] = (int) $v;
$list = implode(',', $list)... | 0 |
1bcac9fd30d216a393a017ed562d08c7 | 74fdaac3cbc9f2f85cc49fc82cdbcf78 | Seconds remaining after hours and minutes in the current interval, for the format h:m:s. | "%d:%02d:%02d",
remainingSeconds / 3600,
(remainingSeconds % 3600) / 60,
remainingSeconds % 60
) | 1 |
9392d8e0243572b196ecc987bebc2fb1 | 91dd4e688b30b19e1622578eb35b4aea | Returns a negative integer, zero, or a positive integer
as the first argument is less than, equal to, or greater than the second. | function cmp(a: any, b: any): number {
return a<b? -1:(a>b? 1:0);
} | 1 |
c83021c20da816a43fa2532f439baa26 | 6e5b625f90431a72f6a6daafc9638f4f | Handles a freezer when freezer mode is activated, including checking when to
freeze and when to leave freezer mode | {
if (temperatureValueInside >= requestedFridgeTemperature + 1)
{
turnCoolerOn(true);
turnFanOn(true);
}
else if (temperatureValueInside <= requestedFridgeTemperature - 1)
{
turnCoolerOn(false);
turnFanOn(false);
}
} | 0 |
648ed52ba78052189196480dcbfd8a5c | baf9e432ec171592f55b7d89269e9cbb | Shopgate sends the credit card expiry year with 4 positions. This functions trims the year to just the last 2
digits. The month gets a leading zero in case the length of the string for month is just 1. | fun getCardExpiryYear() = edit_text_expiry_date.text.toString().split("/")[1] | 0 |
4a8e5f758ab94c27bcf2b38b5e2456aa | 83a1a18d4985a10c5965297ca4035804 | Handles the ``wx.EVT_LEFT_UP`` for L{BaseLineCtrl}. | class PlotPanelDirector:
def leftButtonUp(self, evt, x, y):
if self.leftButtonPoint is None:
return
view = self.view
axes, xdata, ydata = find_axes(view, x, y)
x0, y0 = self.leftButtonPoint
self.leftButtonPoint = None
view.rubberband.clear()
if x0 == x... | 0 |
eb7c4917f9a048a6c802fe6ff7156a89 | c5ffc340f4df398d4154e9a2380c767e | Returns the amount of columns, depending on the current text size | {
Range roundedRange = Precision.GetRoundedRange(DrawingRange);
return WidthScale.WidthByColumn ? 3 : (int) Math.Truncate(roundedRange.Length/WidthScale.Value) + 1;
} | 1 |
71e26ffad2343ac29cbf21c54d59b00b | 57f0e3c2cd398a337c58b47896a30529 | JIS第二水準、NEC特殊文字、NEC選定IBM拡張文字、IBM拡張文字の範囲内でデコード可能か判定する | namespace ClassLibrary
public class StringUtility
private static bool IsUntilJISKanjiLevel2(byte[] targetBytes)
{
if (targetBytes.Length != 8) return false;
int row = targetBytes[3] - 0x20;
int cell = targetBytes[4] - 0x20;
switch (row)
{
... | 1 |
c86a7a77c2e386a722d319b587e23826 | 1d88724f67864aecd9c1226a9a6d765f | Train the model in online fashion.
The model is trained with the data provided in the data argument.
As example the data could come from a generator linked to standard in
for live monitoring of the splitting.
All compounds from data are only optimized once. After online
training, batch training could be used for furthe... | def train_online(x_train,label,redo=False):
global detor
detor.train(x_train,label,4,5,redo) | 1 |
034c127c027c89974a0e3bdc61122aeb | 58c1d323a09fc8c43729ded60f5a7a10 | Gets the bid warning label. | BaseElement el = getControl(assetName);
Page.scrollToElement(el);
return new Label(el.getLocator() + warningLocator);
} | 1 |
89603a7abde8a3d61faa28de97f0c265 | 6ace7fe83f511c1604d47c752be3d266 | Register all of the methods for the Array type | {
Register( 1, &pkgpByte::Create );
Register( 2, &pkgpInt::Create );
Register( 3, &pkgpBool::Create );
Register( 4, &pkgpFloat::Create );
Register( 5, &pkgpObject::Create );
Register( 6, &pkgpName::Create );
Register( 7, &pkgpString::Create );
Register( 8, &pkgpClass::Create );
Regis... | 0 |
c8ea9b4ab405b6dd5cc420abc19f9841 | 1927c37f5f02d8536ea7a094379915d3 | Maps the bean property name of a property to its serialized
property name. The default implementation just returns the bean property name. | public abstract class AbstractHeaderMapper<T> implements RequestReplyHeaderMapper<T>, BeanClassLoaderAware
protected String createTargetPropertyName(String propertyName, boolean fromMessageHeaders) {
return propertyName;
} | 1 |
fafb761dd62113ea5babae0252a3ee11 | e75fe9d22940497489de33f4afe3e391 | Metoda akcji wyświetlająca szczegóły zamówienia z historii | class DefaultController extends Controller
public function ordersDetailsAction() {
$em = $this->getDoctrine()->getManager();
$auth = new Auth($em);
$user = $auth->auth();
return $this->render('DietBundle:Default:orders_details.html.twig', array('user' => $user));
} | 0 |
7870d5971b83d38fb63db2ebadc5f5f5 | 58bce822e141aed0e14f206a1e3892f9 | 初始化串 destStr的转移函数 | void createHashTab(){
dest["M"] = "001";
dest["D"] = "010";
dest["MD"] = "011";
dest["A"] = "100";
dest["AM"] = "101";
dest["AD"] = "110";
dest["AMD"] = "111";
comp["0"] = "0101010";
comp["1"] = "0111111";
comp["-1"] = "0111010";
comp["D"] = "000... | 0 |
e25d0d26398c85f1138bca437d7bd5b9 | a336e633d821f5e09f81cddc55a151bc | Return the total number of records. May trigger an HTTP request. | class Paginator
def count
load_page(1) if @num_records.nil?
@num_records
end | 1 |
7e2139e8abc5dcd5f42cb6088bde7ac2 | 07845e4d942c2fc3b467cf54113806c8 | 获取售后类型下拉列表 | this.advService.typeSelect().subscribe(response => {
if(response != null && JSON.stringify(response) != "{}"){
if(response.code == "200"){
this.typeSelect = response.data;
}
}
});
} | 1 |
e6b796e3dee09c0dba1e6a04335ad8b1 | 4868a0b2a224d9c84d3d39aad4e5eb5f | 实现新商品类别页面的表单存储 | if request.method == "POST":
type_name = request.POST.get('type_name')
type_description = request.POST.get('type_description')
type_img = request.FILES.get('type_img')
models.Goods_type.objects.create(
type_name = type_name,
type_description = type_description... | 1 |
cef8b9e6424f013d833c4d21803610e9 | 88511efbf0974735c3f32921a729abee | Obtains the set of recursively all children of a class. | $result = array();
$lClass = strtolower($class);
if (array_key_exists($lClass, $this->children)) {
$this->descendants[$lClass] = array();
foreach ($this->children[$lClass] as $class) {
$this->descendants[$lClass] = array_merge(
$this->descendants[$lClass],
array($class),
$this->coalesceDe... | 1 |
8e9f0b5a2b15ed61345a85c7d2f11d63 | a732def326a4d716bbbd3e72d23ce5f1 | 如果非微信环境不获取code | if (!isInWeChat() && process.env.NODE_ENV != "development") {
const prefix = location.origin + process.env.PUBLIC_PATH + '#/' + "not-wechat";
window.location.href = prefix;
}
const code = getUrlQuery("code");
const token = myStorage.get(WECHAT_TOKEN);
if (isEmpty(code) && location.pa... | 1 |
6c4daa9063ff2326537df7f62d25f1f2 | 53d1a6bd42a499cfac81eb668c1743d1 | Get the download bandwidth limit. | public class LibTorrent
public native int getUploadRateLimit(); | 0 |
55ec32aa0bc5f32ea11c01e46a8bc84d | bb360f6a7615d5ffc0560fa946a03edd | Output the players' information to the file | for (int i = 0; i < playerNumber; ++i) {
fprintf(fileOut[i], "end\n");
fflush(fileOut[i]);
}
} | 0 |
63aac8788f65079df21b8151e9a1093f | 4642e1a956d7236a54cecea63731f838 | 全てのシートからデータ取得 | class MySpreadsheet extends Model
public function getSheets($xlsObject){
$datas = [];
for ($i = 0; $i < $xlsObject->getSheetCount(); $i++) {
$xlsObject->setActiveSheetIndex($i);
$xlsSheet = $xlsObject->getActiveSheet();
$sheetTitle = $xlsSheet->getTitle();
... | 1 |
4821733f3e4a12839b95a92a5c67c77c | 3bd88c8638fd7f6db4f665b16e0a9822 | The function delivers the acoustic frequency. The frequency can be a beep
(200/200) or a gong (800/200). | public abstract void beep(); | 0 |
cbca981f037df6e0fc1d02f0ab52c0ca | 7d5021a9173df38a814deef9d19c0332 | Creates a MailSettings model, populated with post data. | class sendByMail extends Mailable
public function __construct($post)
{
$this->post = $post;
} | 0 |
d0ce2e1e586b7daca5a4433f045d07fc | 8cb52d1845ca04d791ca680a8ec61d0d | bigram平滑 | def findBigramsSmooth(lines, uniC):
pairsOfWords = {}
startsWith = {}
startsWith["\phi"] = 1
for w in lines:
startsWith["\phi"] += 1
if(("\phi " + w[0]) not in pairsOfWords):
pairsOfWords["\phi " + w[0]] = 1
else:
pairsOfWords["\phi " + w[0]] += 1
for i in range(0, len(w) - 1):
if(w[i] not in star... | 1 |
d74c628d4f53ca6448ff1c3e51c3e2f5 | 37e7ef654ad0c01924f6e9761e33e701 | prints the level order traversal of the Symbol Table | public class Interpreter
public void displaySCT(SCTNode root) {
System.out.println(root);
for (SCTNode n : root.getChildren()) {
displaySCT(n);
}
} | 0 |
1849409c205e09ffb44e18d070b0f795 | 6080ea9f0dbd8b7ad17e2582051b253a | Matches an [Iterable] if any element is matched by [elementMatcher]. | infix fun <T> Iterable<T>.anyIn(other: Iterable<T>): Boolean = this.any { it in other } | 0 |
a687f010bd778aa6e7b9331bbb9aaccb | 6bcf924ee0d8d1820bbed61e7ef7c4fc | Get 云点播媒资文件 Id,当 SourceType 取值 VOD 或者缺省的时候必填。 | public class ProcessMediaByProcedureRequest extends AbstractModel{
public String getFileId() {
return this.FileId;
} | 1 |
387035701a54905bd9b94d3372e8a5a6 | b9a8a5f3e6b6beeb5dc782221327a0b7 | Finds closest visible traffic light, if one exists, and determines its
location and color
returns:
int: index of waypoint closes to the upcoming stop line for a traffic light (-1 if none exists)
int: ID of traffic light color (specified in styx_msgs/TrafficLight) | light_present = False
light_wp=-1
closest_wp=-1
state=TrafficLight.UNKNOWN
min_dist=np.finfo(np.float32).max
if(self.pose):
car_position_index = self.get_closest_waypoint(self.pose)
for i,stop_position in enumerate(self.stop_line_positions):
... | 1 |
7cd0efbb00e29f74a0b27d2618b2834c | 65237bf35bd714351cd568137cbb9fe3 | 추천 친구 검색(국적이 다르고 지역이 같은 멤버 중 검색 키워드와 같은 멤버 출력) | class BuddyModel extends CI_Model
public function getSearchRecommendList($argValue)
{
$loginMemberNum = (int)$argValue['m_idx'];
$loginMemberNation = strip_tags($argValue['m_nationally']);
$loginMemberRegion = strip_tags($argValue['m_region']);
$searchRecommend = strip_tags($argValue... | 1 |
68acec82400a279e6308aae19399f768 | ce967ff660a7d67b0446607d656c3559 | Metoda sa spusti pri drag and drop.
Riesi situaciu tak ze najde prvy subor ktory je mozne otvorit a otvori ho. | {
int index = dgFiles.SelectedIndex;
if (index != -1 && index < FoundFiles.Count)
{
try
{
String ChoosedFile = FoundFiles[index].Location;
Process.Start(ChoosedFile);
}
cat... | 0 |
2196a8d077ac473ce62ebd3e5b4fcd19 | 52ec1ed00539c5db3a23c1791b04e516 | Получить статус состояния бита "передатчик включён" USART2 | namespace target namespace rcc namespace reg class APB1RSTR
__attribute__((always_inline)) unsigned long getUSART2RST() volatile {
return (raw & (0x1 << 17)) >> 17;
} | 0 |
04c8c9cb245791115d2e831cf7cf45f8 | cfe0ef4ea71692c5c2e14bea8f9ae2c0 | 以太网信息 | public class SetHelper
public String getEthernetInfo() {
return baseGetRequest(OperType.ethernet_info);
} | 1 |
0133f264eb8c3b00c5ce2cab3631262f | 5b2edccf2ad95cfa6eae863c92e8b8cd | Returns the unicode representation of the Product. | class ProductIdentifier(object):
def __repr__(self):
return self.to_str() | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.