query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
036e481c2afefc4943c73e7594cb705a | ee971c94994006a32e6074e67f35960b | 数据准备,还支持并行 | def prepare_data(args, in_dataset, out_dataset, offset=0, max_sentence_count=1000000):
file_list = sorted(filter(lambda x: x.endswith(in_dataset + '.xz'),
os.listdir(args.in_folder)))
out_folder = os.path.join(args.out_folder, out_dataset)
if not os.path.exists(out_folder):
... | 0 |
a6d8ce5ec6ad7bfa09dd1ebf0eb46a7c | 38b35b3030ad4879a9c0021d900a984c | fonction qui demande nb cases qui vont etre remplies | {
int nb_cases;
int nb_mines;
nb_cases = number_cases(nb_rows, nb_columns);
nb_mines = floor(nb_cases / 10);
return (nb_mines);
} | 0 |
669e382c908d9f127e3439b0612b78fc | 83844167368c8116717024351cd08f0d | Starts up the game as a client. | {
ViewerManager.Instance.AllocateViewers(1, GameManager.Instance.GameGameData.ViewerPrefab);
GameManager.Instance.InitViewer();
GameUIManager.Instance.InitializePlayerUI(GameManager.Instance.Viewer.UICamera);
GameUIManager.Instance.GamePlayerUI.HUD.SetScore(0);
... | 1 |
8643a657ce53525fece1e8684d92ebd4 | 11dc848d9981b0bc1352366080b03f69 | Rückt Position um ein Element weiter, sofern dieses existiert.
weiter gerückt werden kann. | public class IteratorElement implements Iterator
public Object getNext() throws ExceptionNoSuchElement {
if (!hasNext()) {
throw new ExceptionNoSuchElement("Exception: No next element!")
}
Position currentPosition = nextPosition;
if (currentPosition == list.last()) {
nextPosition = null;
} else {
nex... | 1 |
ef1596e4e04d74c33b4677b00b372084 | bd7437f469721a947b9ceda0ae0f8c4d | 获取对应的redis model name | {
if ($this->option('model')) {
return $this->option('model');
}
return 'App\\' . str_replace('Transformer', '', $name);
} | 0 |
f3b801d1f674b4e046d5b713a64e5a57 | d8f24eafcd3476ea845c7793e23003b7 | Function that returns the first object whose <idKey> === <idValue> | function getObjFromArray(array, key, value){
for(let i in array){
let elem = array[i]
if (elem[key] == value) {
return elem
}
}
} | 1 |
d3e1e8a0c52a54f01c24cd424320ef4f | b41f152b166eef4c0e15f2a9ae2da250 | Valida si el producto tiene registrados atributos en la Tabla ProductosxAtributos o NO | abstract class Tblproductos implements ActiveRecordInterface
public function hasOnlyDefaultValues()
{
return true;
} | 0 |
5d0edd02046a93fbee7fc7e1857f7a9c | 55a79d79de990c556ee5c1cfa6a7ebc1 | helper method to render a-to-z navigation for faceting | class AjaxCheckboxWidget extends LinksWidget
public function build(FacetInterface $facet) {
$build = parent::build($facet);
$config = $this->getConfiguration();
$ranges = $config['numeric_value'];
$items = array_map(function (Result $result) use ($facet) {
if (empty($result->getUrl())) {
r... | 0 |
2007e9c4df9f118375d0a1910ff084b1 | f348b810e2e17250ae9de3468c330408 | when the object is enabled, we want to let the Custom Events component know that we want to access an event and use it. | public class GameTutorialController : MonoBehaviour
void OnEnable() {
exampleEvent.onOpen += OpenExampleEvent;
exampleEvent.onClose += CloseExampleEvent;
exampleEvent.onFinish += FinishExampleEvent;
exampleBattleEvent.onOpen += OpenExampleBattleEvent;
exampleBattleEvent.onFinish += FinishExampleBattleEvent;
... | 1 |
5ce41f2438e006d7770c23356638c2e7 | f915b4db7f6dac65b85a59b3bb7fbcb1 | Gets the city by area code. | namespace Laser.Orchard.NwazetIntegration.Services
TerritoryPart GetCity(int internalId); | 0 |
35d1043eb20be793e68a96f7a4deb99a | 660d24418ca3434b38cfcfc865c6166c | Method to get compiled source code for the test. | public class Javac extends MatchingTask
public String getSource() {
return source;
} | 0 |
e8fb7ffd02a54c224595445cb2c80477 | 8d83ea41f971e9c10397a6c5297b813e | 按照序号排序,序号为1的是大奖。 | function DataSevenKing:sortActPrize( _tData )
if _tData and #_tData > 0 then
for k, v in pairs(_tData) do
if v and v.b then
sortGoodsList(v.b)
end
end
end
end | 0 |
9529b1b2f525a7d81224af8d883da650 | 8483762b3b151bcc7fb4c249ce761b9e | This gets the longer course name on SIS | $title = '';
if (isset($this->row['SCBCRSE_TITLE']) && strlen($this->row['SCBCRSE_TITLE']))
$title .= $this->row['SCBCRSE_TITLE']."\n";
if (isset($this->row['SSBSECT_CRSE_TITLE']) && strlen($this->row['SSBSECT_CRSE_TITLE']))
$title .= $this->row['SSBSECT_CRSE_TITLE'];
$title = trim($titl... | 1 |
aa1b36665ef5466ac5b30c0b5d8e0229 | a47a0a6896e6946c82be1b2fecec26c3 | Returns the meta object for the attribute '{@link org.abchip.mimo.biz.model.product.inventory.Lot#getCreationDate <em>Creation Date</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getGroup_CreationDate(); | 0 |
f7722c47c0b802eaad687ab0a8888df7 | f896edcc0d1b0e762e9606ce796441cc | 탈출 장비 기능 구현, 실제로는 탈출 장비 관련 각종 로직이 구현됨, 여기서는 Strategy pattern 연동 결과에 문제가 없는지(=결과값이 같은지) 확인 | public class Strategy3 extends StrategyDraft
@Override
public void strategy(Player attacker, Party enemy) {
Random random = new Random();
this.target = enemy.getMembers().get(
random.nextInt(enemy.getMembers().size()));
if (attacker.getEnemyPartyInformation().getStrategy() instanceof Strategy2) {
attacker... | 0 |
c99d316deca5ebe93061ff6bbd123b7e | 008f38ddfcfaed76d33926baa2ac6aa5 | Dividing the binary numbers into groups depending upon the number of 1s in them | def splitList(listOfNum, bp):
temp_dict = {}
for i in listOfNum:
stems = i // bp
leaves = i % bp
if stems not in temp_dict:
temp_dict[stems] = []
temp_dict[stems].append(leaves)
return temp_dict | 0 |
5fa99e6dbaa0741655a6877ef293b9d9 | 1b15e4dd0568411a110f1cb5ff0f61fe | Pomoznicza metoda zmieniająca tytuł panelu opcji w zależności od zaznaczenia | var $this = $(me);
if($this.hasClass('off')){
$this.removeClass('off').text("Select as Panel");
}else{
$this.addClass('off').text("Deelect as Panel");
}
} | 1 |
ae81b79f31c8db556595d74b664180ba | 7c12cc343f4bc2634dfad3cedcf57257 | function for sending thank you message - gets/ adds single donation and prints thank you | def write_donor(name):
with open(name.replace(" ", "") + "_thank_you.txt", 'w') as f_out:
f_out.write(gen_letter(name)) | 0 |
84e4836532e0504b5b9a174741493d70 | d0d12f56220b1566de2a1ecce9649839 | Retrieves an internationalized string and insert text into | var textKey = node.nodeValue.replace(LOCALIZED_TEXT_REGEXP, '$1').trim();
if (!configs.lang[textKey]) return;
nextElementSibling(node).innerHTML = configs.lang[textKey][langCode];
} | 1 |
21ffcf1cff5a75c0b1d6f6551210743a | 16387a74f9eb4473c24d080ba35b459f | Checks if given data block describes FAT structure | MDS data;
lseek(fileDesc,sizeof(superblock) + nodeId * sizeof(MDS),SEEK_SET);
read(fileDesc,&data,sizeof(MDS));
return data.type == TYPE_DIRECTORY && data.size == 2*(sizeof(unsigned int) + MAX_FILENAME_SIZE*sizeof(char));
} | 0 |
1feb29735aab985bf465b1ddf8c70ab6 | df836983826502287b0e62894b70c449 | Statementの子供を設定するとき、
子供の内容からStatementの構成情報を作成 | initial_line = [l for l in children if l.type == 'initial']
assert len(initial_line) == 1
initial_line = initial_line[0]
self.children = children
self.statement = initial_line.statement
try:
self.label = initial_line.label
except AttributeError:
... | 1 |
96ba5374f6d2def4d6de4cfac178c284 | b3ac0844c6d1ec9e6a300005a3fa00eb | Check that templates contain the right variables. | def _check_missing_vars(env, tpl_file, config):
tpl_str = tpl_file.read()
ast = env.parse(tpl_str)
required_properties = jinja2.meta.find_undeclared_variables(ast)
missing_properties = required_properties - config.keys() - set(dir(builtins))
if len(missing_properties) > 0:
print('Required pr... | 1 |
da21a215525b651f55f6e992088d3cd7 | f7e3a7baa004fd0fdb5ccfd2dd5cdac9 | 设置文字绘制工具目录
<p>
1. 引擎使用该目录的 TextPainter 和 font_list.json 进行文字绘制
</p> | public class MainModel
void setTextDrawer(TextDrawer textDrawer) { this.textDrawer = textDrawer; } | 0 |
19a9a67e57642e1c7228ea67e00b98aa | 44f038df807fadc85e2cf37a48328158 | Run when keybindings are changed | if player_num == 1:
new_key = self.p1_binding
else:
new_key = self.p2_binding
if self.key_is_from_numpad(new_key):
self.key_text.change_text(self.format_numpad_key(new_key))
else:
self.key_text.change_text(new_key) | 1 |
a1989a5d8ceaa374501c2d946ecc389a | a0d811a023455f2e42694bcd3285ef83 | 计算路径的速度,此方法在接收到这条路径时调用 | public class MoveTrace
public void calculatePathSpeed(long now) {
receiveTimestamp = now;
long t = destineTimestamp - clientGameTimestamp;
if (t <= 0) {
pathSpeed = 9999;
} else {
pathSpeed = (int) (totalLength * 1000 / t);
}
} | 1 |
9df27df827a3d72b4a4b12e60fff45b2 | 4d56b3a5e77415f560fcdff3e74b9a19 | Saves configuration overwriting all previous settings | namespace ICZeroBotSlack.Logic.Controllers
public class ConfigController
public void Save()
{
config.Save(Configurator.FileType.Ini);
LoadConfig();
} | 1 |
619d46b26e33083352c050e6c1e82708 | cc8cdac9f1ee8b454ec492ba4965dd77 | 打开url然后保存结果 | tkinter.messagebox.showinfo(title='Hi', message='已经开始下载,耐性等待请勿重复点击')
url=input_url.get()
if input_cookies_address.get()=='':
cookies_address=''
else:
cookies_address="-c "+input_cookies_address.get()
save_address=input_save_address.get()
cmd = f'you {cookies_address} -o {save_a... | 1 |
63a0c7801a9f17ab0ed4f9e968cf1240 | 18d7dd61fe05d8d187c484c9f42d4349 | Attempts to retrieve the static resource mapped to from the given weather code. Some
resources will differ depending on whether it is night or day. | {
weatherEvent = weatherEvent.ToLower();
var imageURL = "";
if (weatherEvent == "astronomical low tide")
{
imageURL = "../images/icons/astronimcal-low-tide.png";
}
else if (weatherEvent == "avalanche")
{
... | 0 |
791e3e354e12389975badd3e56f48017 | 4bd1461174ebdd5fc0eb1927438aecf1 | Delete a topic permission | public class SNSController
public void deleteTopic( String id, Boolean isPrivate, String authkey ) {
ensureConnection();
com.topicplaces.android.SNSController.Topics.TopicDeleter tdel = new TopicDeleter( ENDPOINT );
tdel.execute(id, isPrivate, authkey);
} | 0 |
6f456a721f2a6b24f6b50b2974723351 | f3427fc34da388c844e1e37dfa605c06 | Find a recommended date slot for the event | let startTime = this.mStartDate.clone();
let endTime = this.mEndDate.clone();
startTime.isDate = false;
endTime.isDate = false;
let allDay = this.mStartDate.isDate;
let step_in_minutes = Math.floor((60 * this.zoomFactor) / 100);
if (allDay) {
step_in_minutes = 60 * 24;
... | 1 |
21a026ecaccea816623863669133184d | 64ca792edfbe43dcd342ed3b5384635f | Click handler for the bottom nav component User history | class GameViewModel(
private val gameManager: IGameManager
) :
ViewModelBase()
fun onClickHistory() {
nextPage.postValue(R.id.action_GameFragment_to_HistoryFragment)
} | 1 |
6e65bf3e0a10387880f7917e332968cb | 23e5e53e16153b0516467d3626b58a4b | Loads a notification event from XML. | parent::load($xml);
$this->setTime($xml->time);
$this->setDate($xml->date);
$this->setDatabase($xml->database);
$this->data = (string) $xml->data;
$this->rich = $xml->data->attributes()->rich;
$this->header = (string) $xml->header;
$this->footer = (string)... | 1 |
f25a993667b7a88761be439086b08b94 | e669ce913092bfb7c9225198b023ade4 | Check whether the path provided appears to be a test case | def mocked_is_testcase(path):
testcase_regex = re.compile(r'idCOLON\d{6},.+')
return (os.path.isfile(path) and
bool(re.match(testcase_regex, os.path.basename(path)))) | 1 |
13369a0b3a406f1fea53e334fb14dd8e | ca32c1d0f2190f84a37d96275caf0b67 | Tests new consumer creates with autocomplete key and secret | {
$authId = key($this->keys);
$authSecret = reset($this->keys);
$timestamp = 1432075982;
$headers = [
'Content-Type' => 'text/plain',
'X-Authorization-Timestamp' => $timestamp,
'Authorization' => 'acquia-http-hmac realm="Pipet service",'
... | 0 |
165e7a5245888ce8d00d3752839fec5f | 83ffe28e6f7a9670cd53333b7ec2da6d | @brief Compares the first n bytes of str1 and str 2.
Time Complexity: O(n). | char *aa;
char *bb;
int ret;
aa = strdup(a);
if(aa == NULL){
Syslog(LOG_ERR, "strdup");
Syslog(LOG_ERR, "token.c:StrNCmp():strdup(%s)=NULL\n", a);
return(strncmp(a, b, n));
}
CharSmall(aa);
bb = strdup(b);
if(bb == NULL){
Syslog(LOG_ERR, "strdup");
Syslog(LOG_ERR, "token.c:StrNCmp(... | 1 |
df67cea8c140aa5ad4d6718eff4a4188 | 77564e9d155ad2636f07ef45e4921e38 | 根据shopId查找店铺导航栏 | $data = [];
if(!$data){
$data = $this->field("catId,parentId,catName,shopId")->where(["shopId"=>$shopId,"parentId"=>0,"isShow"=>1 ,"dataFlag"=>1])->order("catSort asc")->select();
if(count($data)>0){
$ids = array();
foreach ($data as $v){
$ids[] = $v['catId'];
}
$crs = $this->field("catId... | 1 |
9fae8b2b8f0f4f991c13ffb1720c1c06 | 63a07af772ebef60dd636c281cbe6c0e | Sets the raw token | class Token
public function setToken($token)
{
$this->token = $token;
return $this;
} | 1 |
6217ac14dc8e5d17bb619c2097e84922 | 960c87b5a347d921e0fa0b1ac9aa20b1 | Add a character at the given position in string. | if (at < 0 || at > row->size) at = row->size;
row->chars = realloc(row->chars, row->size + 2);
memmove(&row->chars[at + 1], &row->chars[at], row->size - at + 1);
row->size++;
row->chars[at] = c;
editorUpdateRow(row);
E.dirty++;
} | 1 |
fc2b19674960400b45faa80c0e93dfe1 | 461a606bf4aa25aeab4a10c3e7e68691 | only turn if currently moving | public class Move : MonoBehaviour
void Update () {
if(selector.isTalking){
return;
}
if (Input.GetMouseButtonUp(0)){
Screen.lockCursor = true;
Screen.showCursor = false;
}
if (Input.GetKey(KeyCode.Escape)){
Screen.showCursor = true;
}
Vector3 nextPosition = transform.position;
if (Input.GetA... | 0 |
95b04601d9e45065fa7430d79cbccb67 | dc07709b9f38e713df585b9ef576de5b | Set (active) VBL using NI-DCPower driver (inactive disabled) | void wm8731SetActive(wolfson_init_params *pio, uint16 active)
{
wm8731WriteReg(pio, WM8731_ACTIVE_REG, active ? 1 : 0);
} | 0 |
722d69da6c86142a97d62a31d17cf43d | 27b9b4291b40f72cb7e3396352d96cdd | Function to onboard the user on to the application. | char username[20];
char response_message[BUFFER_SIZE],send_message[BUFFER_SIZE];
bool availablity=false;
char password[20];
printf("Enter username : ");
scanf("%s",username );
snprintf(send_message, sizeof(send_message), "%s,%s", "1",username);
sendMessage(sockfd,send_message);
recei... | 1 |
db1151b152f122c5e2cab62a43d3b0e6 | ef0e1267fcb4beca539aab8d570c10c9 | Returns the value of the '<em><b>Agreement Item Seq Id</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Agreement Item Seq Id</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc -->
annotation="mimo-ent-slot key='true'"
annotation="mimo-ent... | EAttribute getOrderRequirementCommitment_OrderItemSeqId(); | 0 |
66029075cd35dbac43569aae57512cfe | 74381495451dcf64a4c8272e5d1e6b4b | Given a pointer, return its root variable, if it doesn't alias | function getRoot(ptr: ShadowTreePtr | null): ShadowTree | null {
if (ptr && ptr.length > 0)
return ptr[0]
return null
} | 1 |
2a0ffeef77c9cbab792b6d1ca7fc5b37 | ab5fd20fd58178a01b807b60eab8c90f | zeigt, ob es sich um den linken Aufzug handelt | def left_line():
if GPIO.input(lineLeft)==0:
return True
else:
return False | 0 |
f85e42078499b488c4326135ac316988 | 1454216d4a0213b7ab00d5c06e0a94c2 | Returns how many points the player will receive if he/she successfully
completes the next goal. This is reset to 1 if the player fails to do so.
Returns -1 if the game is not currently being played. | public class PointedPlayer extends KeyedPlayer
public int getPoints()
{
return points;
} | 0 |
8dbf2c4da4a9502ad9dfb4b6d19cf0ef | 527945e550f538d69bb25d101ebd0f75 | llena el diccionario que relaciona el número del mes con su equivalente a texto en español | return {
"01" : "January",
"02" : "February",
"03" : "March",
"04" : "April",
"05" : "May",
"06" : "June",
"07" : "July",
"08" : "August",
"09" : "September",
"10" : "October",
"11" : "November",
"12" : "December",
} [numMonth] | 0 |
d7a5db824bd74113814655ea4a973278 | c53a5feb31b45e27084e0761b274e22f | 判断表达式是否为表达式树中参数的成员 | var ce = operand as ConstantExpression;
if (ce != null)
return new MemberOrValue { Value = ce.Value, HasValue = true };
var me = operand as MemberExpression;
if (me != null && GetRootParameterExpression(me) == parameter)
return new MemberOr... | 1 |
1b9b2c9b5a77838b36aff0c96d3729d4 | 5e224d8d3e848e49485cc3affe8a40af | Method that checks whether an ASN.1 signature has CAdES-XL1 format. | public final class SignatureFormatDetectorXades implements ISignatureFormatDetector
private static boolean isXAdESLTALevel(Element signatureElement) {
return isXAdESA(signatureElement);
} | 0 |
ffdbae8b56acc30e233ba6e98634774b | 01ec18d631c0c92a11fd0e17a3d729b7 | Set if the text is centered,
(same as `centered` argument in `__init__` method). | class TextBox(Form):
def set_centered(self, value: bool):
self._centered = value | 1 |
681cabdf02f7fa2386e4c26c92e22613 | d6195f7773642a5b1a717208922e4726 | Calculate and consolidate reciprocal values, returning resultant dataframe. | summable_columns):
base_features_list = [key_column]
df_profile = df1[base_features_list].drop_duplicates()
exclude_list = [key_column, 'month', 'ChurnPeriod', 'Timestamp',
'Group']
df_final = reduce(lambda left,
... | 1 |
575c0bffeeaf198ec63d16920f20d337 | f786f2c47d7a682fb24329b0e027574e | 判断产生式右部是否全属于nullable | non_terminals.each { |nterm| nterm.nullable = false }
nullable_sets = [direct_nullable]
filtered_rules = rules.reject do |prod|
prod.lhs.nullable? || prod.rhs.find do |symb|
symb.kind_of?(Terminal)
end
end
(1...non_terminals.size).each do |i|
... | 1 |
4f4cf7e9292029bf91d6a01696fc0bfc | f7e7be70b879c32b9714fed6149bdd37 | 获取所有视图字段集合 | namespace Plugn.CodeGenerate.Data
List<SOColumn> GetViewColumnList(SOView view); | 1 |
a1b514cce9e2bd0379b95f337b097ab3 | d6ae357de4d5672da0138acc84ed3d14 | Returns the audio player. | public class BirdActivity extends AbstractDownloadableMediaActivity implements
TabContentFactory, OnClickListener
public MediaPlayer getMediaPlayer() {
return this.mediaPlayer;
} | 1 |
ba6588f2ca1bfad8f58fc6159a3bcae3 | e63ddc6c26ff89845576e33a70a20b7d | 查询所有线路并分页显示 | public class LongLineAction extends ActionSupport implements ModelDriven<LongLine>
public String findAll() throws Exception {
DetachedCriteria criteria = DetachedCriteria.forClass(LongLine.class);
criteria.addOrder(Order.desc("startTime"));
if (longLine.getLineStart() != null) {
criteria.add(Restrictions.like(... | 1 |
edb55ab2b776c0afc51122e66513705b | 58b651a6828351c87acf29b6eba5aa5b | Returns whether the vertices v and w are adjacent.
Input: Vertex, Vertex; Output: boolean | {
if (v1 < g->num_vertices && v2 < g->num_vertices)
return (matrix_get(g->t, v1, v2) && matrix_get(g->t, v2, v1));
return 0;
} | 1 |
b6b41ef28e816499e5df4e7bb458c6ab | 3d8ba662a8432860fb095b9f84e7c265 | Builds and returns list of ProductListData from Products | class ProductListDataSource @Inject constructor(
private var productListService: ProductListService
) : ProductListRepository
override fun getProductList(): Single<ArrayList<ProductListResponseItem>> {
return productListService.productListService()
} | 0 |
038172eb4b9eb9acfcd23e3b886173df | e6a560084de75deb2f1cf79824c2c52a | Restituisce l'azione di visualizzazione del manuale utente. | public abstract class AbstractVisualizationController extends AbstractController
implements ActionListener
abstract public String helpAction(); | 1 |
e88e088eeff36828db92e0512116a632 | bbfe76d75de9f290ce077bfa28d0073c | 영화장르를 파일에서 불러옴 | String genreList = "";
int lineNum = Integer.parseInt(inFile.nextLine());
for (int i=0; i<lineNum+1; i++) {
String s = inFile.nextLine();
genreList += s + "\n";
}
return genreList;
} | 1 |
1980206a6d911738f11841613a7b968f | dcad0c2e75067b6e6f93cc93d8b9cbb2 | Returns true if current Flight Gate is settled or not | export default class GateClass
isClocked() {
return this.isClocked;
} | 0 |
bfaef7ba6c0abe103684a8b4145086a0 | 72d46b39ebf06ffd02ded459825b84c2 | POST: Pokemon/Create | @pokemon = Pokemon.new(pokemon_params)
if @pokemon.save
render json: {Message: 'Le pokemon suivant a été crée',data: @pokemon},status: :ok
else
render json: {Message: 'La création du pokemon ne peut aboutir', data: @pokemon.errors},status: :unprocessable_entity
end
end | 1 |
2ef5cd535188cef7ecdb15e1a6208dd7 | af9a22a466bb25da6af68f83385eaf90 | 将多维矩阵转换为一维列表 | class Puzzle_Matrix():
def straight_list(self):
l = []
for i in self.matrix:
l.extend(i)
return l | 1 |
4f3a6292060799c007ad0b57cba1c056 | 087a6d0ef478cc522bdf214e9b031925 | Default endoint for Custom Authorization Server | @Slf4j
@Configuration
@EnableAuthorizationServer
public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdapter
@Override
public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception {
endpoints
.authenticationManager(authenticationManager)
... | 1 |
d0a0a782a3546e2e222b5bda50f38d39 | 196555c4242c9be903d37491cb842d49 | 为cube追加经验 | addExperience(num){
let totol = parseInt(this.heroExperience.getChildByName("bar").width);
totol += parseInt(num);
if(totol < this.heroExperience.getComponent(cc.ProgressBar).totalLength){
this.heroExperience.getChildByName("bar").width = totol;
}else{
this.addGra... | 1 |
6cf87a900d92a5e26e509a967514eea8 | 78349523c8ea125bfc867bc9779fbbc3 | Get the maximum sample delay supported | public int getMaximumDelay(); | 1 |
f8e8f51baf8e38d59de861bb04e02e55 | d95fc785fa2bceb2048ddf4cdcb37614 | Gets a list of type practice groups based on the specified context. | IEnumerable<string>? allowTypes = null,
IEnumerable<string>? allowGroups = null,
IEnumerable<int>? allowMembers = null); | 0 |
cdddabc6dc8e6084e2380dfa152e3f3a | 9d4848a1f7251c5cde9376743e0b9ccd | Attempt to find SUBL by TID field | function ResolveTidSubsts(tid) return L.lvl.tsub[tid] or tid end | 1 |
c25f98162100d1802ec096ecc122420c | c11340972954698823f14ecd163ce3de | Regresa TabPane donde se encuentran los archivos abiertos | public class JNotepadPPGUI extends JFrame implements INotepadListener
public JTabbedPane getTabbedPane() {
return tabPane;
} | 1 |
10a239c7884a0b56d2663939815369f7 | 63f53e85a44cf613caa1c4bcec322028 | -------------------------------------------------------------------------
Generates code whenever a value is selected in the query tab's
property value list.
------------------------------------------------------------------------- | {
wxString valueText = MakeValueText( property );
textCtrl->SetValue( valueText );
} | 0 |
2ce44d54cfc0bbbf0618cfa6e78d90df | 6463d839460ea1535ccad7ee27f1f215 | Este metodo sirve para llenar una lista de datos obtenidos de la base de
datos | listaP = list()
for i,row in enumerate(data):
listaP.append(Producto(row[0],row[1],row[
2],row[3],row[4],row[5],row[6],row[7]))
return listaP | 1 |
7a3c17fc126f7d36695a45647c664029 | 89edb5de332e7975fd7dabd519001090 | Fonction qui retourne le nom de l'étape d'indice i | const char * TableIdentificateurs::getNom ( const unsigned int indice)
{
if(indice > 0 || indice < map.size())
return map.find(indice)->second;
else return NULL;
} | 1 |
05ef9a1d58306ff39a81635622a6539c | 19ac5f8ae58512033d8c935218d0cefc | 关于组合价值的情景分析 | def combined_hypothesis():
fig, ax = plt.subplots()
ax.set_title("Combined hypothesis")
ax.hold(True)
ax.set_xlim(0, 6)
ax.set_ylim(0, 6)
ax.scatter(x_plus, y_plus, color='blue', marker='^', s=100);
ax.scatter(x_minus, y_minus, color='red', marker='v', s=100);
ax.axvline(x=2, ymin=0, yma... | 0 |
697d06d2247e65fe0a66177ad97fd08c | e5c015f3f00156e323239b815243b26f | загружает календарный план из базы данных | date = self.calendarWidget.selectedDate()
date = date.toString('dd.MM.yyyy')
if self.last_date != date:
self.listWidget.clear()
self.d = dict()
con = sqlite3.connect('data/' + self.data_base + '.db')
cursor = con.cursor()
tables = [i[1]... | 1 |
49c4130160ae9d78cd585c949aae7e5f | 7505d9dd27e4fff0d0f65d724a7e779c | Sets extension Javascript for the session | class Low_variables_ext
function activate_extension()
{
$this->EE->db->insert('exp_extensions',
array(
'class' => ucfirst(get_class($this)),
'method' => 'sessions_end',
'hook' => 'sessions_end',
'settings' => serialize($this->default_settings),
'priority' => 2,
'version' => $this... | 0 |
954d49ec11343b84add30f51ca268fab | 9916ef2d761ed1440b9b41478a9b6a81 | 打开取消模态框 | modalCancel () {
let that = this;
that.setData({
modalShow: false
})
app.globalData.modalShow = false;
} | 0 |
96d4070d72f3d83ed2e98ec523c08994 | fbc6457514b8a60eddbc8e1fc3686cfe | Restore Reward configuration. | {
TextAsset configData = Resources.Load(ANTURA_REWARDS_CONFIG_PATH) as TextAsset;
string configString = configData.text;
config = JsonUtility.FromJson<RewardConfig>(configString);
} | 1 |
9c74365c42389081bdb7a7e97ec3f6d9 | 3cd0cedcb8317f930e757c11d2b82e31 | rotates argument nested list by 90 degrees right | def turnRight(matrix):
newMatrix=[]
for column in range(len(matrix[0])):
newRow = []
for row in range(len(matrix)-1, -1, -1):
newRow.append(matrix[row][column])
newMatrix.append(newRow)
return newMatrix | 1 |
899b5a447c19b6ab002e65105f4588f0 | 717784a562bba2f43d6723e8e904be5d | Handles exceptions on methods whose args.ReturnType is ServiceResult.
<para>If there is no handler to handle the exception, the program continues its default flow.</para> | public class UnhandledExceptionOperationResult : OperationResult
public override Task ExecuteAsync(ApiOperationContext context)
{
var executor = context.ServiceProvider.GetRequiredService<IOperationResultExecutor<UnhandledExceptionOperationResult>>();
return executor.ExecuteAsync(context, this);
... | 0 |
4b55aa3130106c4c6f0fdfc60660347f | c7bb757928702fd988ed0237933f26fe | 如果true,将把你的布局外面<B>加一层含有标题的布局</B>,并作为Activity的contentView. | View viewFinal = contentView;
int resId = onCreateTitleViewResId();
if (resId != 0) {
View titleView = getLayoutInflater().inflate(resId, findViewById(android.R.id.content), false);
LinearLayout linAll = new LinearLayout(this);
linAll.setOrientation(LinearLayo... | 1 |
57d39d5cd63167e4bc1ac90d69b25127 | dd9527e13abe6c6cf38398a717f84336 | квадратурная формула Гаусса | double g_func(double f(int x), int a){
double result = f(a)*f(a);
return result;
} | 0 |
38215524d187d74815cdcdfb6259ab75 | 111e8b47dd170c18090b3799473abfd6 | Get the order for a history object then convert that to a TradeLink order | public abstract class Timesheets extends PSBasePage implements IExternalPage, PageAttachListener
Order getOrder(PSObject obj) {
if (null == obj) return null;
if (obj instanceof Checkpoint) {
Checkpoint checkpoint = (Checkpoint) obj;
Tollgate parent = checkpoint.getTollgate();
... | 0 |
7a6cde1ae02794fb3e8411b12171b701 | e7638c715d5fe2af6b3e25adb4245c49 | 将cmdline开头的脚本文件名路径里所有的/改成\;在Windows下,仅为运行需要这种处理的
工具的类所使用;在其它平台上,这么做也没有坏处(如Unix下的os.system)。 | def escapeCMD(filename):
return "\\ ".join(filename.split()) | 0 |
96f1bcccc79267f0677332261f3c7dde | cc991bb688701781b6d95929d0816ade | Coloca o valor do coeficiente fiscal do contribuinte indivídual. | if(coeficienteFiscal < 0) throw new ValoresInvalidosException(Float.toString(coeficienteFiscal));
else this.coeficienteFiscal = coeficienteFiscal;
} | 1 |
67b7d878f592fa7345391180852f868b | 818ffe389a979439f8411a3578d33379 | Returns attributes that are true. | class DataFrameSelector (BaseEstimator, TransformerMixin) :
def transform(self, X) :
return X[self.attr_names].values | 0 |
43da663e73210091349114bf302158b9 | ef35a2f62684d44fc0fd82750ee4f12a | Verifica se uma nova mensagem com o mesmo número (DDD + Celular) de uma mensagem já validada possui um tempo de envio menor | Date now_date = new Date();
Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("Europe/Lisbon"));
cal.setTime(now_date);
int current_day = cal.get(Calendar.DAY_OF_MONTH);
int current_month = (cal.get(Calendar.MONTH)) + 1;
int current_year = cal.get(Calendar.YEAR);
... | 0 |
915c4c08619d8619223cbf757d132147 | ce0dd472ed1f7496ff2bad59a4020466 | 根据会员编号查询默认收货地址 | function getAddressByMemberId(param) {
return get('/crm/shop/address/v1/default', param);
} | 1 |
2243749c1092a79fe5f935dd015ff840 | 0452f2e6c2f2dcfd3d482caf97fd9c36 | Check all errors are recorded in detailed file | {
CTestLoggerService loggerService;
loggerService.SetFileFlags(LoggingFlags_Errors);
auto fileName = fs::current_path() / L"Log";
if (exists(fileName))
{
remove(fileName);
}
loggerService.SetFilePath(fileName);
... | 1 |
b7ee32eb2c04617b96a24b3e07bb4f1c | 7f42645bb84f9af03667455f75a63b2c | Message to show when service implementation does not provide a valid IQueryProvider. | namespace Microsoft.OData.Service
internal static class Strings
internal static string HttpContextServiceHost_QueryParameterMustBeSpecifiedOnce(object p0)
{
return Microsoft.OData.Service.TextRes.GetString(Microsoft.OData.Service.TextRes.HttpContextServiceHost_QueryParameterMustBeSpecifiedOnce, ... | 0 |
4085be6369fa55c99af984481db41055 | d5b84acd467f476c4dcfe77e6a958efc | Allows a grace period for token validation
Applies on either side of the "not before" and "expires" claims. | require(notBefore <= notAfter && notBefore == -1L == (notAfter == -1L)) {
"invalid interval: $notBefore..$notAfter"
}
this.notBefore = notBefore
this.notAfter = notAfter
} | 0 |
9c9a00cfd176806b69d322af7d590fcc | 2a4c4b16fd01e14a7cce3b5daeeae41e | Function to extract Crypto list from the coinmarketcap | array = []
doc = Nokogiri::HTML(open("https://coinmarketcap.com/all/views/all/"))
doc.css(".currency-name-container").each do |names|
array << names.text
end
return array
end | 1 |
00a1e381c165a6d2d8066578260bc0d5 | 2850ed768100516253a31c05cd9aa710 | 重新汇总删除已有汇总记录(根据汇总批次号CSBatchNo) | namespace PL
public partial class StrsRemedyProdLLGDetCheckerSmry
public void SummaryDeleteExit()
{
} | 0 |
6a9fce36367228d7af194c0e0b1e4f97 | 979acfa0e2e07f5a1f25ea10c3536e62 | 비동기식 라우팅 테이블을 반복적으로 필터링하고 사용자 역할 사용 권한과 일치하는 라우팅 테이블 반환 | function filterAsyncRoutes(routes, serverRoutes, roles) {
const res = []
routes.forEach(route => {
let tmp = { ...route }
if (serverRoutes) {
serverRoutes.forEach(serverRoute => {
tmp = changeRoles(tmp, serverRoute, roles)
})
}
if (hasPermission(roles, tmp)) {
if (tmp.child... | 1 |
56a35ca065ce14ae07f12258440a67e8 | 64dcc424c8692b9c19714589b5d07db1 | This function is a large copy/paste from django in order to construct
correct through tables for `ManyToManyField` relationships. | def get_many2many_text(title, field):
def inner(self, obj=None, is_header=None, *args, **kwargs):
if is_header:
return title
queryset = getattr(obj, field).all()
text_list = [str(row) for row in queryset]
return '/'.join(text_list)
return inner | 1 |
3b01cd039f9bf0a38bb55882adcedb86 | 151dd2e453747c9af73bef8221092eb8 | DateTimeToClarionDateTime | {
return new DateTime(value.Year, value.Month, day, value.Hour, value.Minute, value.Second, value.Millisecond);
} | 0 |
4fc59762f4295a197e46c9ecc42c595a | f25fe20bab94265f20a812d69d1f0fee | Attempt to extract the operation name and use it to set the Sentry
transaction name. | internal class ExceptionHandlerFeatureProcessor : ISentryEventExceptionProcessor
public void Process(Exception exception, SentryEvent sentryEvent)
{
ApplyTransactionName(sentryEvent, _originalMethod);
ApplyRouteTags(sentryEvent);
} | 1 |
54774d8020a4ffee59943686d2a82fd8 | fc32c29119e38bab403696a8d649506f | Quit the current game and load the landing scene of the Build | public class GameManager : MonoBehaviour
public void QuitGame () {
SceneManager.LoadScene("Credits");
} | 0 |
9aeb92f458d9f2539c7b88769c803be8 | 59b34da279500df0dc6a407de929ffda | Mutator to assign the staff category of the staff | class User implements AdvancedUserInterface, \Serializable
public function setCategory($category)
{
$this->category = $category;
return $this;
} | 1 |
97e9a530b67ed8cd7babf6258e1ebbdf | 071c2340d6ef5679398a8e926299c7df | Returns the previous connected segment or null if the specified (global) segment
index is the first in a non-closed linestring. | class PfdConnectionSegment(object):
def GetPrevious(self):
return self._node.GetPrevious() | 0 |
6e5532c97fd6f2266242191712ca50d2 | a18d960082dfd2e5ac96456e271716c1 | Enter a parse tree produced by Java8Parser#packageName. | public class JjQueryBaseListener implements JjQueryListener
@Override public void exitPackageName(JjQueryParser.PackageNameContext ctx) { } | 0 |
338730bc061a68e6437524eea6ac553c | 679b81beae4e2a0bd8def1bc548351b8 | Method to check whether the UploadAllInThisDirectory command can be executed. | namespace Microsoft.TeamFoundation.Migration.Shell.View
public class ViewEventLogsCommand : ViewModelCommand<ShellController, ConfigurationModel>
public override bool CanExecute(object parameter)
{
return true;
} | 0 |
a4d0eae2ff6f25939ce16a40d1985a03 | def9bfe2f9e214894e4e81ac0af138f5 | Mutation operator. Contructs a random subtree of the
passed depth and inserts it at a random node, replacing
the original contents at and below the node. | {
unsigned num_internals = tree->GetNInternals();
PHYCAS_ASSERT(num_internals > 0);
unsigned i = rng->SampleUInt(num_internals - 1);
TreeNode * nd = tree->GetFirstPreorder();
for (; nd != NULL; nd = nd->GetNextPreorder())
{
bool is_tip = nd->IsTip();
bool is_subroot = (is... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.