query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
a6ee77671c057d35c0bbeec285b4e888 | c54c434d7dc25e3f93c5ea3458c70018 | Freeze all settings so they can't be altered | namespace MongoDB.Driver.GridFS
[Serializable]
public class MongoGridFSSettings : IEquatable<MongoGridFSSettings>
public MongoGridFSSettings Freeze()
{
if (!_isFrozen)
{
_frozenHashCode = GetHashCode();
_isFrozen = true;
}
r... | 1 |
693d5de95fcb76b4daf5c60c268827d2 | e402a2a9858444fa28a010ad5fd2e9d7 | Determines whether a given value is a valid scale selection. | public class SearchCriteria
public boolean hasScale() {
return values.containsKey(Criteria.SCALE);
} | 0 |
4b84dd30ebed3ad8b4826bb0318f8570 | 74aa00eaecfcd5f0d7d56eafc10a7117 | Delete tokens from where they are stored. Before this method is called,
tokens will have been revoked. This is both for cleanup and to ensure
inactive tokens are not accidentally loaded in the future. | def cleanup_tokens():
current_app.auth_db.cleanup_tokens()
return "", 204 | 1 |
e033937091102c62524f21a840dedf71 | 41c78b7fa00de83cb88b7f627536c256 | Removes all the archive contents from the database. | namespace Ticketmaster.Dsc.Interfaces.DeploymentServer
void CleanupArchives(); | 0 |
3d35be647d3b09dde5d96ac315573f53 | 0ac84dd6566b71c6534699e128c31e0b | 將答案更新到棋盤 | void Game::updatePan(int x, int y)
{
if(playerDo)
chessList[16*x+y]=1;
else
chessList[16*x+y]=-1;
playerDo=!playerDo;
} | 1 |
afe01ec6be83ce05e5f9839bd0bd50ba | d0813d25be9222e746254bc8bf19720f | Метод, автоматически вызываемый при проверке на существование недоступного свойства объекта
Используется для красивой проверки наличия автора у новости | class News extends Model
public function __isset($k)
{
switch ($k) {
case 'author':
return true;
break;
default:
return null;
}
} | 1 |
18dc82cc90102cb6d2b643f428a4fcc9 | ecd6398ac2bd6c71ce9fd891b86f0c0a | 更新配置IP端口号 | namespace WeLink.DAL
class LoginDataDeal : BaseDataDeal
public static bool setIPAndPort(string iPAddress, string portMain, string portAssist)
{
try
{
ConfigXml.updateConfigXML("ip", iPAddress);
ConfigXml.updateConfigXML("port1", portMain);
... | 1 |
1996a734005a70eacc076dd25757c890 | 800fb2cb81b24cda082310d6bf34037a | Determines whether a <see cref="String"/> contains another <see cref="String"/> using a specified <see cref="StringComparison"/> | namespace Microsoft.OpenApi.CSharpAnnotations.DocumentGeneration.Extensions
public static class StringExtensions
public static bool Contains(this string value, string substring, StringComparison stringComparison)
{
return value.IndexOf(substring, stringComparison) >= 0;
} | 1 |
e81f6de7e9a37a8f5599587ab6fb5863 | f7702ed4ad56901c5626900bead448f5 | 限定2个线程处理 | public class TestProcessData2
public static void main(String[] args) {
ExecutorService pool=Executors.newCachedThreadPool();
final SynchronousQueue synchronousQueue=new SynchronousQueue();
final Semaphore semaphore=new Semaphore(1);
for (int i = 0; i < 10; i++) {
pool.execute(new Runnable() {
@Override
... | 0 |
4cdf1db0349c909c6f3adae604516a8f | 9f0d786b8b44b9ead5b000484da7ae47 | Adds the required options to the options hash. | class InfoFormatter
def valid_options
super | [
:version
]
end | 0 |
c804dd7183bd655782ece46cb12f6417 | e32fca14c53cd096d2691869fad4eb2b | This function to set the sexes according to the phenotype of the first trait.
female <= threshold < male | predictions[pid] = 0
if sex == 'female':
predictions[pid] = 1 | 0 |
ab2d5f8fdb7220a933f774dec5cd6395 | ca00ca5fdcfe619d248d0eb728c7b1d5 | Metoden frågar spelaren vilket nummer han siktar mot
och returnerar detta nummer | public class PlayerOpponentChoose
public int getChoosen() {
return choosen;
} | 0 |
4c84412c5cfed1c0dbbc7693fa29428f | 4ff3f3c646daafa0877a3ad9caec929d | Generate a satisfaction curve which decelerates and begins with the specified slope | return new Objective( "Accelerating" ) {
public double satisfaction( final double score ) {
return SatisfactionCurve.acceleratingSatisfaction( score, minScore, maxScore, endSlope );
}
};
} | 0 |
ff66326b1c3cb6ca3a5385d537f84acc | 56357a9ad0ee0989fdb93a10dfe6ca81 | Função que inicia os campos de um vetor de HashTable | for(int i=0;i<m;i++){
ha[i].key = NULLKEY;
ha[i].count = 0;
}
n = 0;
for(int i=0;i < n1; i++){
insertHT(ha,n,m,p,keys[i]);
}
} | 1 |
dc2f35a0499f65212ebf2febb467b176 | fb2d9df5c0aaf41bbd576cb1328e0d27 | Метод открытия файла | namespace WindowsFormsApp1
public partial class Method : Form
private void открытьФайлToolStripMenuItem_Click(object sender, EventArgs e)
{
Filecs fl = new Filecs();
fl.Show();
} | 1 |
6794e5c821d736cae6624507924637d1 | ca9ef4f1350dc8cc4b00d7c102d9ac6d | skip next instrutction if key vlaue stored in Vx is not pressed | void Chip8::OP_ExA1()
{
uint8_t Vx = (opcode & 0x0F00) >> 8u;
uint8_t key = registers[Vx];
if (!input[key]) {
counter += 2;
}
} | 1 |
2d768b7fc32df2b997389599ed9f0308 | 9668fc678fa4b979fa4f8b24f10b5609 | 获取ajax POST的nickname值 | Yii::$app->response->format = Response::FORMAT_JSON;
$cookies = Yii::$app->request->cookies;
$nickname = $cookies->getValue('nickname', '');
return [
'err_code' => 0,
'data' =>[
'nickname' => $nickname
]
];
} | 0 |
9f49532b04cfdc70711e07bbe030d271 | 1256c533a1ee4683f8515ade3a9138e5 | @brief Read KSZ8851 register | uint16_t ksz8851_reg_read(uint16_t reg)
{
uint16_t regData;
uint16_t cmd;
cmd = (reg << 2) & REG_ADDR_MASK;
if (reg & 2) {
cmd |= (0xc << 10);
} else {
cmd |= (0x3 << 10);
}
cmd |= CMD_READ;
enableSpiSS();
SPI_MasterTransceiveByte( spiMaster, cmd >> 8);
SPI_MasterTransceiveByte( spiMaster, cmd & 0xff);... | 1 |
a5c62075f0d0294660ee263e25616b9b | f37e0cecde3cdb476ed394f7e52eabd8 | ------------------------------
フェードアウト / Sound Fade Out
------------------------------ | {
foreach (FadeAudioSource fas in _asFades)
fas.audioSrc.volume = fas.targetVolume;
_asFades.Clear();
FadeOutMusic(inSecs, null);
FadeOutBackground(inSecs, null);
for (int i=0; i<CHANNELS; i++)
{
if (_fx[i].isPlaying)
FadeOutSou... | 1 |
f1aadff865ee8f00c9dc8983e1df08c1 | 02240ee6990c3e23b1d73b47e819c46a | Gets all specification by specification type asynchronous. | namespace CalculateFunding.Frontend.Interfaces.ApiClient
Task<ApiResponse<IEnumerable<SpecificationSummary>>> GetSpecificationSummaries(IEnumerable<string> specificationIds); | 0 |
83315785ec64380d414189432f026f05 | be5bbe791e7475c91bd8c7b3eaa46a9c | 查询指定通知被阅读次数 | function FindReadCount(data) {
return request({
url: '/System/MessagePush/FindReadCount',
method: 'post',
data
})
} | 1 |
f4ffd7a41a063d2fc18fcbb40a7507f6 | fbf33816e8eb652e389d2d3bc21a9b6a | Pushes the current content handler into the stack
and registers the newly specified content handler so
that it can receive SAX events.
When this newly specified handler will be removed from the stack,
the leaveChild event will be fired to the parent handler
with this memento. | public class Atz_XML_SAX_DataHandler extends DefaultHandler implements Atz_XML_SAX_DataHandlerInterface
public void parseCurrentScopeWithDataHandler(Atz_XML_SAX_DataHandlerInterface currentHandler) {
pushDataHandler(currentHandler, this.PARSE_MODE_CURRENT_SCOPE);
} | 1 |
7d24b12b93f216fab88ec8f1e45d9d97 | 7c49eb20311c4a9b04beb2e03f9302bb | Gets the value of the memberId property.
possible object is
{@link String } | public class FamilyRelationDTO implements Serializable
public void setMemberId(String memberId) {
this.memberId = memberId == null ? null : memberId.trim();
} | 0 |
4876939fd55aa4cf8556cc5b4ddee00e | 16cebba72879debfa1f6713adb526bc6 | checks if the alien is alive | public class Missile implements GameObject{
public boolean isAlive() {
return this.alive;
} | 0 |
80e539bff95527e74d993ea53e547023 | 78d06251fc485f188af722f9e30f58b6 | Отметка присутствия на контр меропр | Class Acquaintance extends CI_Controller
public function setMark() {
$acquaintanceID = $this->session->userdata('acquaintanceID');
$acquaintanceMode = $this->session->userdata('acquaintanceMode');
$interlocutorID = $this->acquaintance->getInterlocutorID($acquaintanceID, $acquaintanceMode);
... | 0 |
8ecc5cef10482b889cc3ad0452379fee | 8607dd7d77170d8a061082f4cf7bcd05 | replace all duplicate spaces with a single one. | class BrowserSync extends Command
private function spaceManyToOne($string, $separator = ' ')
{
return trim(preg_replace('/[\s]+/', $separator, $string));
} | 1 |
731664d023eb4fb22863ba65da66d248 | 335c71741aaee039d1144290f9db2682 | Metoda <cBorderGuanlong_MouseLeave</c> ukrywa informacje o Dinozaurze
po wyjechaniu kursorem poza ramkę | namespace GeoanSeismicAcquisition
public partial class Form_Login : Form
private void lblMin_MouseLeave_1(object sender, EventArgs e)
{
} | 0 |
bdaac6f106e50451780fc6e26f65bf72 | 8b0bede2a337ae06d06019ad59ea7ada | Método encargado de calcular la base imponible | if (valorBaseCalculoPIS == null) {
valorBaseCalculoPIS = 0.0;
}
return valorBaseCalculoPIS;
} | 0 |
d9ade1e8d9149bfab257b11c5d805036 | e1c5540b5ba21fbc46f3f350d141845d | 住所(地先)を取得します。 | public class Fctr0001s01CorrespondenceMstEntity extends PageBaseEntity
public String getAddress() {
return address;
} | 1 |
96708aa77d85eba18ac2fdd578f7c46e | 2bb466b37c6fd6a33879320544d0cf9d | 检查所有挂单是否满足撤单条件。 | class TraderAction(Action):
def cancel_entrusts( self ):
failed = -1
while failed != 0:
try:
count = 0
cancel_list = self.get_cancel_list()
self.logger.info( "可撤单列表:{}".format(cancel_list) )
str_cancel = ""
for item in cancel_list:
if (item["code"] in self.fund_b_list) and ( item["iotype... | 1 |
71874e9ff0460721320591059d190d07 | d4a744e150cc696eeaac69d323ed39f1 | 获取检索列名称,如果没有指定,则采用第一列的名称。 | if column_name is not None and len(column_name) > 0:
return column_name
else:
return KgtkFormat.ID | 0 |
7aefbac39654ee4c24a061f861a38e62 | dcc77dc27cc41e9c44f215b8b759d377 | 가사의 감정값을 분석하는 함수 | def getSentiment(sentence):
sentAnalyzer = SentimentIntensityAnalyzer()
score = sentAnalyzer.polarity_scores(sentence)
return score | 1 |
5a7ebe36557c0c3553b2b54f07c09d1b | b1f883a41236f35b7c214b0743eeed30 | 检查系统的设置,如果一切都ok返回,如果有什么错误throw 异常 | namespace RCNet
[Serializable]
public abstract class RCNetBaseSettings
protected abstract void Check(); | 1 |
45f38afcb9e21873b7876dbc654daa25 | d8df4dd5d8d9a4edd19bd900c46f719c | Deletes the foreign key of the table "coupons", and then deletes the table
itself from the "couponsdb" database. | public class GrooponDataBaseManager
@SuppressWarnings("unused")
public static void dropTableCoupons() throws SQLException {
DBUtils.runQuery(DROP_TABLE_COUPONS);
} | 0 |
b510c7bb222f5b3281be338470228fbb | 2fba2d5aa3fdda00e016e2a19646ae87 | Implements HtmlPageLinkRendererBegin hook.
See https://www.mediawiki.org/wiki/Manual:Hooks/HtmlPageLinkRendererBegin
Handle links to other pages. | if (isset($element['#export_type'])) {
$element['#attributes']['class'][] = 'print__link--' . $element['#export_type'];
$element['#theme_wrappers']['container']['#attributes']['class'][] = 'print__wrapper--' . Html::cleanCssIdentifier($element['#export_type']);
}
return parent::preRenderLink($el... | 0 |
1c3c8398b275230d17dd5e4366736118 | 0d28562ce860f6a15e3f195e9ae186ba | ScriptCoreLib.Shared.Lambda.LambdaExtensions.ForEach | {
if (action == null)
throw new ArgumentNullException("action");
this.ForEach(action);
} | 1 |
7af9f6f55e667b7ef8b60ef059e52d5f | 6f3befcdf37b45f927658c2591d17f3f | 新增下单码奖励配置、接单码奖励配置表 | namespace BAMENG.IDAL
int AddRewardSetting(RewardsSettingModel model); | 1 |
352bfab4ea8d2d24572dd55458bb437d | 89dd77d4d2c538a193f59a7a5a35c47b | Метод возвращает количество расходов ожидающих каких либо действий | namespace Bank_Credit_Manager
public class ClientApplication : IClientApplication
public int CreditArrearage()
{
int results = 0;
SQLManager sqlManager = new SQLManager();
SqlConnection sqlConn = new SqlConnection(sqlManager.ConnectionString());
sqlConn.Open()... | 0 |
df5c39e258ea3cab6ad5bba430b20eed | 67040f22da317ef273ec10cd7996babc | mongoose 的_id 转为 string | {
foreach ($objectIdArr as $key => $objectId) {
$objectIdArr[$key]['_id'] = $objectId['_id']->__toString();
}
return $objectIdArr;
} | 1 |
f751c1abaf4cef47051eac0133c9c7ce | f22123bce0cdfac8489be5d85d405c3e | Starts the loading pixels asynchronous. | namespace Efl namespace Ui [Efl.Ui.Bg.NativeMethods]
[Efl.Eo.BindingEntity]
public class Bg : Efl.Ui.LayoutBase, Efl.IFile, Efl.Gfx.IImage, Efl.Gfx.IImageLoadController
virtual public void LoadAsyncStart() {
Efl.Gfx.IImageLoadControllerConcrete.NativeMethods.efl_gfx_image_load_controller_load_async_start_ptr.V... | 1 |
62cbde5d3096045bd652117ff839cbd3 | 6fe8596321d00bfbd633a44eb96b5a65 | Update audio circuits up to the current time. | void timing_update_timing(void)
{
if(!gui_is_active) {
suspend_timing();
resume_timing();
}
FN2A03_Rebuild_Cycle_Table();
apu_update();
} | 1 |
290c65ce4997c34c78d688e4b04bb9f1 | 87c47280afe8da8b9a4cd00e98675689 | Parses the given chat level string. | class IRC
public static function convertLevel($level)
{
if (!in_array($level, array('-', '+', '%', '@', '&', '~'))) {
return 0;
}
return str_replace(array('-', '+', '%', '@', '&', '~'), array(1, 3, 4, 5, 10, 9000), $level);
} | 1 |
8f5793329b87d578bf6f6dc9bdd1b634 | ad836646ed0411887ae94c69639dbd82 | calcola momenti M1 inerzia terreno monte | double[] M = {0, 0, 0, 0, 0};
double[] Mi;
Mi = getM1InerziaCiabatta();
for (int j = 0; j < 5; ++j) {
if (j == 1 || j == 3) {
M[j] += Mi[j];
}
}
Mi = getM1InerziaMuriAla();
for (int j = 0; j < 5; ++j) {
if (j == ... | 1 |
87b1559029f2bb6ae6dde3217d870fc3 | fb28dbee3653936512d784f912720c00 | Logs manager in and takes them to the sales portion of the website. | def login_s():
session.clear()
if request.method == "POST":
if not request.form.get("username"):
return apology("must provide username", 403)
elif not request.form.get("password"):
return apology("must provide password", 403)
rows = db.execute("SELECT * FROM users... | 1 |
4ca7636635e0b0d42e644823f73d3094 | f3f53d0838786b8a78c68c449c1fa0f2 | 將必要保存的資料載入到ControlState。 | {
if (savedState != null)
{
object[] myState = (object[])savedState;
if (myState[0] != null)
base.LoadViewState(myState[0]);
if (myState[1] != null)
((IStateManager)_controlHiStyle).LoadViewState(myS... | 1 |
bab8d7eb8295fef69c14329aa578fd7c | ed7e8d51706758baf83ba78d64d93c0d | Localized standard message associated with the warning | class LongWaitWarning extends BaseWarning
getName() {
return "LongWaitWarning";
} | 0 |
a28916fa0351e4738e1668d43c9cb986 | f69702eb9b236ae78bc02f78d55df788 | 返回当前栈内容的字符串,与LL(1)无关,为GUI提供字符串 | public class StackManager : MonoBehaviour
public string toString()
{
string stringToReturn = "";
for (int i = 0; i < getCurrentStackManager().mainStack.Count; i++)
{
stringToReturn += mainStack[i];
}
return stringToReturn;
} | 1 |
ac459a22eeec1a4d22e92a6db0d29b87 | f031cb63c17d74cbcc26e25d7bd94a3b | Set up spectroscopic pipeline environment variables. | m = request.getfixturevalue("monkeypatch")
e = {'BOSS_SPECTRO_REDUX': '/boss/spectro/redux',
'SPECTRO_REDUX': '/sdss/spectro/redux',
'RUN2D': 'v1_2_3',
'RUN1D': 'v1_2_3'}
for k in e:
m.setenv(k, e[k])
return m | 1 |
a61db7158601ad3a32011d230ab175e1 | a2fe602bced101038c0b237cf93c5a6c | 随机获取依据名言警句 | public class DbUtils
public String getRandomMotto(List<String> list)
{
Random random = new Random();
int n = list.size();
if (n == 0)
{
return MyConstants.NO_DATA;
}
int position = random.nextInt(n);
String motto = list.get(position);
if (!TextUtils.isEmpty(motto))
{
return motto;
}
return ... | 1 |
5d37b593d9340e51e27521ebea2bd641 | b478c62c5cdd58548b4e62fc75cca1b2 | 添加用户历史位置 | namespace ZGM.BLL.USERHISTORYPOSITIONSBLL
public class QWGL_USERHISTORYPOSITIONSBLL
public static void AddUserHistoryPosition(QWGL_USERHISTORYPOSITIONS model)
{
Entities db = new Entities();
db.QWGL_USERHISTORYPOSITIONS.Add(model);
db.SaveChanges();
} | 1 |
74f1f76decae80cbbeeb37d1400c5e4b | c78b0c6360e9dd0f18abe178cc705b69 | Swap target and source language | public class TranslateFragment extends Fragment
public void reverseLangs() {
String tmp = nowSelectedFromLang;
nowSelectedFromLang = nowSelectedToLang;
nowSelectedToLang = tmp;
fromLangSpinner.setSelection(adapter.getPosition(langs.get(nowSelectedFromLang)));
toLangSpinner.setSel... | 1 |
7378f9169b1bfb58c3cd097c307378aa | ec7685f3990b07da80f742caeaf2aaa8 | 解析vcf名片工具方法 | class MafengwoProcessor(BaseProcessor, BaiduSuggestion, MfwSuggestion):
def parse_vs_contents(self, entry, data):
desc = None
address = None
tel = None
traffic = None
misc = []
en_name = None
for info_entry in entry['desc']:
if info_entry['name'] == u'... | 0 |
cd39f3c3c0f8d452b8d42a2a0ba41a15 | ea224dd707d582fb8ce41dc784a81335 | Handles an incoming Ping message. Returns a Pong message using the
referenced protocol object. | class ConnectedState(BaseState):
def ping(self):
self.protocol.doPingRequest() | 0 |
4a3808432d56cfbef5fee7e85382558b | d7c4719f9fca5ff11c9a1435900453b0 | https://stackoverflow.com/a/1012089 | function getCookie(name) {
var matches = document.cookie.match(new RegExp(
"(?:^|; )" + name.replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g, '\\$1') + "=([^;]*)"
));
return matches ? decodeURIComponent(matches[1]) : undefined;
} | 1 |
f810b1bb5d575b990dbed4ec48531415 | f6f07a52c85f01a1c67ef8c128cfe65b | Generates a hash for the current query. | public static function getHashByQuery($query); | 1 |
9a816898c52559e66cb8b8ca202c249e | 2b3eb3521d5e2d27d47aa8fe394d593c | h:i:s,h-i-s,hhiiss型の時刻チェック | $form_vars = $this->check($name);
if ($form_vars['h'] && !$form_vars['s']) {
$form_vars['s']="00";
}
$form_vars = array("h"=>$form_vars['h'],"i"=>$form_vars['i'],"s"=>$form_vars['s']);
$time = join("", $form_vars);
if ($form_vars == null || empty($time)) {
... | 1 |
cabeefa2699e6d4c08422d4307dc87e3 | 6eace3e5ea404efd3029527f57e3dc72 | 设置child长按事件监听器 | public class BaseAdapter<T> extends RecyclerView.Adapter<BaseViewHolder>
public void setOnItemChildLongClickListener(OnItemChildLongClickListener listener) {
mOnItemChildLongClickListener = listener;
} | 1 |
a88b59282f5ced59a19c8059bd6bfb53 | 423fbbc08b8329f4479c9d8b1dc00aba | 单个支付宝下单 | String alipay(AlipayBean alipayBean) throws AlipayApiException; | 1 |
a4001f9bcf63115433afea8ef6a77db5 | 045cf0ff77f6e1e71b196e21fe80b7d5 | Connect to a client and wrap it into Python file object. | def get_socket_file():
s = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
s.connect(_SOCKET_FILE)
return s.makefile() | 1 |
9f50303253d82f702e6a7664b5b03632 | 5e512b3461b915d53a4d591da1dbabba | @brief Recupera il livello di rischio data l'attività
dell'attività | int CDbRoom::DangerLevel() const
{
int nDanger = 0;
if (this->bTarWasStabbed) ++nDanger;
CMonster *pMonster = this->pFirstMonster;
while (pMonster)
{
switch (pMonster->wType)
{
case M_BRAIN: case M_HALPH:
case M_ROACH: case M_REGG: case M_WWING: case M_EYE: case M_MADEYE:
case M_SPIDER: case M_WUBBA: cas... | 1 |
11b7997b4dad8d983d3ae8133691a269 | f78a8ed44d2695f2684b18edbf2917b5 | Called when the end of a branch is reached. | public class milestone_2BaseListener implements milestone_2Listener
@Override public void exitOfBranches(milestone_2Parser.OfBranchesContext ctx) { } | 1 |
cc5bcb7f1e82e506aacd0440d51154bb | a4d05f361db1c9f10752f12f93d0c192 | {NATURAL_32}.as_integer_16 | EIF_NATURAL_16 F848_7209 (EIF_REFERENCE Current, EIF_NATURAL_16 arg1)
{
GTCX
EIF_REFERENCE tr1 = NULL;
EIF_NATURAL_16 Result = ((EIF_NATURAL_16) 0);
RTLD;
RTLI(2);
RTLR(0,tr1);
RTLR(1,Current);
RTGC;
tr1 = RTLNS(848, 848, _OBJSIZ_0_0_1_0_0_0_0_0_);
*(EIF_NATURAL_16 *)tr1 = arg1;
tr1 = F847_7161(Current, tr1)... | 0 |
2817a4bc1e56f1848f8c40a1e1744ae6 | 4e7e7c9bb2f003fcee9cb32fb560ffe4 | Is post logout redirect URI valid asynchronous. | namespace SharpOAuth2.Provider.Services
bool ValidateRedirectUri(IOAuthContext context); | 0 |
37a547fa694b7d2a1d5e25bb9128d769 | 88264172d335a495fc570bba8f45f59a | Keep only enough components to represent a certain fraction of the
variance in the data. | public class PrincipalComponentsTest
extends AbstractFilterTest
public void testVariance() {
m_Filter = getFilter();
((PrincipalComponents) m_Filter).setVarianceCovered(0.8);
performTest();
} | 1 |
576eb769746ec632e41b43fcd542ae18 | 0911c3525ce7fd6d491c3c28c3d77f84 | 购买分销员 | (!isset($this->data['userId']) || empty($this->data['userId'])) && $this->apiReturn(201, '', '分销员ID非法');
(!isset($this->data['type']) || is_null($this->data['type'])) && $this->apiReturn(201, '', '分销员类型非法');
$userId = $this->data['userId'] + 0;
$type = $this->data['type'] + 0;
... | 0 |
c669e3f18ee7a6d02184e94a1d312bb6 | 40f329412b4101f4bc7e6df5edd1d757 | Muestra los items que posee el jugador en pantalla | GLfloat vx[4]; GLfloat vy[4];
TexAndVertexes * TaV = textureMap[VIDAS1];
for (int i = 0; i < 4; i++){
vx[0] = vx[3] = 20 + 3*i * 54;
vy[0] = vy[1] = 20;
vx[1] = vx[2] = 68 + 3*i * 54;
vy[2] = vy[3] = 68;
TaV->tex->dibujar(vx, vy, TaV->vertexes->x, TaV->vertexes->y, 4, 0.9);
}
std::string puntaje = SSTR("... | 0 |
bbe3533f1994d02b82a9773a1077975d | a8168cc1a9c2f984af3b301b7902211f | Invert a region of the display between a starting and ending row and column | static void
clip_invert_area(row1, col1, row2, col2)
int row1;
int col1;
int row2;
int col2;
{
if (clip_compare_pos(row1, col1, row2, col2) > 0)
{
int tmp_row, tmp_col;
tmp_row = row1;
tmp_col = col1;
row1 = row2;
col1 = col2;
row2 = tmp_row;
col2 = tmp_col;
}
if (... | 1 |
1b9608e4a3f298deba38944613a63a45 | 131ba68311064e74d77db29b9940765e | Encuentra la viaAcceso por el identificador. | for(Ninno ninno: ninnos){
if(ninno.getAcudiente().getId().equals(acudienteId))
return ninno;
}
return null;
} | 0 |
b83ef8c97a6f89180d52426ffe061510 | 29c680f05cc4619280a695de4a6c3256 | counts the number of words in a sentence | def count_words(sent):
count=0
words=word_tokenize(sent)
for word in words:
count+=1
return count | 1 |
6770feb7a6f879ceb3a7e59f2289bbee | a3038078633c80854189d95ce059373e | Returns the values λ_t | public class LeastSqLineLocator
public double[] getEigenvals()
{
return lambda;
} | 1 |
7586ae2b7bf92295d8b5a7d27b88a5be | 180e074737740038a836808f8b4016d5 | Opens a tkinter file dialog box and fills the txtTemplate entry with
the file path if a file is selected. | class MarxanConnectGUI(gui.MarxanConnectGUI):
def on_inputdat_template_file(self, event):
self.project['filepaths']['marxan_template_input'] = self.inputdat_template_file.GetPath() | 0 |
f43acf6fdab2ad7ae985f356a50e2e04 | 42cccc7c295508ae721fbfdc1d9e20a3 | 新增会议记录信息,同时添加会议记录附件信息 | @ResponseBody
public Json add(HttpServletRequest request, LiveInfo meeting, String xjhId,
String xjhAnnexId, String stratTimeStr, String endTimeStr){
try {
Json json = new Json();
String cookie_companyId = CookieUtil.getCookieInfoByKey(request, Constant.USER_ORG_ID);
String cookie_uId = CookieUtil.getC... | 1 |
eff998964547a63a315a9521a685d736 | 28dae54a92c2967bfff8144d8f4174a1 | 每页能显示的表情数 | int count = category.getStickers().size() - startIndex;
count = Math.min(count, EmoticonView.STICKER_PER_PAGE);
return count;
} | 1 |
a50e695cedd0209592c5884493a8a804 | 74ac0e77fae16ee29ef752c60dbcaf23 | Gets the project code seq. | public class Org implements Serializable
public String getOrgCodeSeq() {
return orgCodeSeq;
} | 0 |
dcc6f3d92b1a24e90bbecd9ba79174ad | b18b218061300ef0d7a163d68b1324f5 | # grab the GeneIDs known by the time hour datasets | c("naio_10_cp1700", "naio_10_cp1750", "naio_10_pyp1700",
"naio_10_pyp1750", "naio_10_cp15", "naio_10_cp16",
"naio_10_cp1610", "naio_10_cp1620", "naio_10_cp1630",
"naio_10_pyp1620", "naio_10_pyp1630", "germany_1995")
} | 0 |
2162fc6cf2d29227cadbad05fd928b38 | 240bfe4de51b642e3f43d8e64ac06215 | Provides an unpacking method for IPv4 | void unpack_ip(char* buf, uint8_t ip[4])
{
int i;
for (i = 0; i < 4; i++)
ip[i] = (uint8_t) buf[i];
} | 1 |
e8eb37f4a5a148fd7452d07ac110e1ac | 9aa80871b7f134ae8af9f5c7b0e39e23 | FilesList は folder パスの全ファイル名の文字列配列を返します | namespace KernelClass
public static class PhysicalFile
public static string[] List(string folderPath)
{
string[] str = new string[]{""};
if (FolderExists(folderPath))
str= Directory.GetFiles(folderPath);
return str;
} | 1 |
0ee0cf7c1617a4926479afce30ff5116 | ad2d73855ff4f82495e3e8d18653c8a6 | A helper function for delete to remove all contents in given Poll
including its participants. The original poll is returned as well. | @ViewScoped
@Named
public class PollResultBean implements Serializable
public void deletePoll() {
ol.deletePoll(uuid);
} | 0 |
d360d2ca5480e12076b4d8bc24552cc6 | 9f457cb8a1c5698c490bfa52de16b61f | Rotates the turtle at a certain angle | public class Turtle
public void turn(double degree) {
this.direction -= degree;
} | 1 |
98f58bc842844499f4f9d2b29d58bf80 | 05642a05895fdd004dc478bf8db710aa | 排序二叉树,增加节点 | public class BinarySortTree
public void add(Node node) {
if (root == null) {
root = node;
} else {
root.add(node);
}
} | 1 |
eb481becafc212e4b4704366dd9aea27 | e7daab33883b41975f27d70a35f3440c | Recognise identical sequences as similar | def RemoveIdentical(seqs, identicalseqsfile):
seq_d = {}
decorated_list = [(len(seq[1]), seq, seq[1].replace('-', '')) for seq in seqs]
seqs.sort()
seqs.reverse()
cleanseqs = []
for (n, (head, seq), nogapseq) in decorated_list:
if nogapseq in seq_d:
seq_d[nogapseq].append(hea... | 1 |
acced4490e1cb59fa7a4264ef8e1e1a0 | de3a7e20a8240a1383797c2f68531e6c | Returns a list containing all the on demand feature views to be handled. | class StreamingApp(BaseApp):
def all_features(self): | 0 |
1c418802b1874431a0f5efd3f4bd58f4 | 8880676f7a98e41136f1468ab65111c9 | Si la información es correcta generamos un nuevo departamento, sino devolvemos los errores | class FacultadController extends Controller
public function updateDepartamento(Request $request, $id)
{
if (!$request->has('nombre') or !$request->has('codigo') or !$request->has('facultad_id'))
return response()->json([
'message' => 'Faltan datos',
'data' => $req... | 0 |
c2c166ae2985f8ce8d05b404d8991506 | e3af44ef67cb69db2d44c3350da20340 | update the payments grid based on the combobox selection | namespace TP2
public partial class MainForm : Form
private void lstBox_Pays_SelectedValueChanged(object sender, EventArgs e)
{
fillDataGridView();
} | 1 |
a3a4dd96d9e75c42f6982e97a613ef70 | 46172264d419c994dc241495ff17000e | 按研究方向 饼图显示 | PhD_name = ['P.h.D', 'Ph.D', 'PhD', 'MD', 'M.D', 'Doctor of']
MS_name = ['M.S', 'MS', 'MBA', 'M.B.A', 'Master of']
university_name = ['University', 'College']
school = frame['school']
school_list = school.values
PhD = 0
MS = 0
university = 0
school_unknow = 0
school_other = 0
... | 0 |
f70df2beca1e4c88b9964cbd38fd82fa | ad7c5f06804fa83dce681c421622bc5b | 根据店铺编号获取店铺所在的铺位列表 | List<TableFloor> selectFloor(Integer shopId); | 1 |
4fea214d89d8c67779699b9fbec71080 | 4757cfd45b1144a82222025c32cc4175 | 背景色の設定 (黒) | class INPUT_CHECK : public MyApp::Scene //入力が正しいか確認するシーン
void init()
{
Graphics::SetBackground(Palette::White);
} | 0 |
ef865afa56e50115c976d1d8c700d58e | ea1af6b4e8aea71e8423d12265c5055e | Deletes all mappings for the specified bug. | class recyclebinModel extends model
public function deleteBugs($objectIDs)
{
$bugs = $this->getBugs($objectIDs);
if(empty($bugs)) return ;
foreach ($bugs as $bugID => $bug)
{
if(!empty($bug->actions))
{
$this->dao->delete()->from(TABLE_HISTORY)->where('action')->in(array_keys($bug->actions))->exec();... | 1 |
a5ad649fcecd80bc147c6039ca791fb7 | fd8d55accda8778c63fced83ea1cebe9 | Return the MIIM port number for a given port.
unit - Device unit number
port - Device port number
miim_port - Returns port number in MIIM
SOC_E_XXX
When dealing with ports, the MIIM has a fixed port number
assigned to a physical port. Since the user can remap
the port numbers in some devices, such as SBX dev... | u8 jr_telsa_phy_detect_ports(u8 ctrl, u8 miim_addr, vtss_board_info_t *board_info)
{
u16 data;
if (jr1_miim_rd(ctrl, miim_addr, 3, &data, board_info) == VTSS_RC_OK) {
if (((data >> 4) & 0x3F) == 0x0D) {
return 2;
}
return 4;
}
return 0;
} | 0 |
d4de56a6c71a2167506e35251826b96c | 9da3ccbf3428f6deec687b03d57dd5e4 | 判断统计日期是否存在数据,是返回1,否返回0 | namespace Plan.IndexDataDailyCheck.Dao
public class DbDao
public static bool FindDataByDate(string tableName, string indexCode, string dataDate)
{
string sql = string.Format("select count(1) as countNum from {0} where indexcode='{1}' and datadate='{2}'", tableName, indexCode, dataDate);
... | 1 |
a556ff4c075b40adef28f300467a0ba8 | 06b80eae35b01315c064cb063de1cadf | 循环生成验证码 | */class Captcha
public function createCode(){
$strlen = strlen($this->string)-1;
for ($i=0; $i < $this->codeNum; $i++) {
$this->code .= $this->string[mt_rand(0,$strlen)];
}
$_SESSION['code'] = $this->code;
$diff = $this->width/$this->codeNum;
for ($i=0... | 1 |
efeb98ce3b8cac3b660f5d6930c311e4 | 8665960bdfde61a42ad6afbc7703d933 | Event handler for the GraphResizedEvent event | {
dc.View.IsResized = false;
if (node.AllowResize)
{
NodeRoutedEventArgs newEventArgs = new NodeRoutedEventArgs(node);
newEventArgs.RoutedEvent = DiagramView.NodeResizedEvent;
RaiseEvent(newEventArgs);
DiagramVie... | 0 |
05bb8005e6f2ba008bfc0df738da5b76 | d61342ba509b5ce16e15c7c32c7f622a | If the file is foo.mathematica.h, this returns foo. | const char *dot = strrchr(file_name, '.');
if (!dot || dot == file_name)
return "";
return dot + 1;
} | 0 |
6fac28068d5e34bc4d2c667f111899b3 | dceeb55aef419b571f6d11376107c6cc | Get the slack message | function slackMessageFromLines(lines: string[]): string {
return lines.join('\n');
} | 1 |
4257913d89bddb6d264975f6326980be | 76d2f8107cede61c16c3b8de8a212880 | cap nhat trang thai game currentState sau moi luot choi | List<Boolean> statesCurrent, int posWillBePushed, boolean hasGameStarted) {
if(hasGameStarted) {
if(posWillBePushed > (WIDTH_OF_BOARD - 1))
statesCurrent.set(posWillBePushed - WIDTH_OF_BOARD, !statesCurrent.get(posWillBePushed - WIDTH_OF_BOARD));
if(posWillBePushed % WIDTH_OF_BOARD != 0)
statesCurren... | 1 |
d5afb1fe308b682f567df3a3fc890fdf | 17e2685720328b45cf454fc9b9e4da65 | 获取有效的加息券产品列表 | function getValidCouoponList() {
Ajax.get("/Order/GetValidCouponList", false, getValidCouoponListResponse);
} | 1 |
ee54bc90e4b5331ad70fa7db571572e9 | 4ef96c5fbad5f8111101a29dd05c1068 | 全选删除所有动态ARP | var checkList = $("input[name=id]");
var dataList = new Array();
for(var i=0;i<checkList.length;i++){
if(!checkList[i].checked) continue;
var tmp = new Object();
tmp.name = checkList[i].title;
tmp.id = checkList[i].value;
dataList.push(tmp);
}
SafeMessage(lan.ftp.del_all,"<a style='color:red;'>"+lan.get(... | 0 |
6a04396cf3cb7cfc9b76246296818cf6 | 1ae7ba6c877584c58b0516db8137508c | Crossover binario utilizando um ponto de corte aleatorio | vector<int> &pai2,
vector<int> &filho1,
vector<int> &filho2,
int n)
{
int ponto_de_corte_1, ponto_de_corte_2, i, j;
bool existe;
vector<int> lista_pai1, lista_pai2;
ponto_de_corte_1 = randomico(2,(n-1)/2);
ponto_de_corte_2 = ran... | 0 |
46e193b228f7fb8e40db51cb2d2db16f | 86c0df5fa03a75caba44bba8d884985a | 平台律师库详情 | JumpDetails(event) {
let details = wx.getStorageSync("login");
let uid = event.currentTarget.dataset.uid;
let josn = {
attid: uid,
uid: details.uid,
sdk: details.sdk
};
... | 1 |
212cb850e3359628478c9e223c68fece | cb3930c0cf7161339e8338c4ad43d541 | Persist the thermal camera's IP address in the application's settings. | public class MainActivity extends Activity implements TopicListener, IOIOLooperProvider
private void setIpAddress(){
EditText editText = (EditText) findViewById(R.id.ipAddress);
this.ipAddress = editText.getText().toString();
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.