query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
698851235c208c4d675e5e58fff7c2cc | b0114739df037a5e851bd2aa44d06386 | Endpoint to return the current exchange_rate. | class MockJSONData(MockAPIHelper):
def current(self, **kwargs):
return [self.exchange_rate(datetime.today())] | 1 |
1ff577589fb2499ccb9d23ed4500c79d | 7a87ee35b510d39908bf9ae564e5baf0 | 用于子类接收登录成功广播通知 | public class TopicBasePresenter extends BaseFragmentPresenter<List<Topic>>
private void registerLoginSuccessBroadcast() {
IntentFilter filter = new IntentFilter();
filter.addAction(Constants.ACTION_LOGIN_SUCCESS);
mContext.registerReceiver(mLoginReceiver, filter);
} | 1 |
193757c0f275986bb0cb8ea1b23d9d09 | 3de35fff8c48dd28702b7e03a80f5961 | Constructor function that defines needed data structures | {
m_problem_size=IND_SIZE;
m_consensus_ranking=new int[m_problem_size];
m_sample_size=SEL_SIZE;
m_samples= new int*[m_sample_size];
m_frequency_matrix= new int*[m_problem_size];
for (int i=0;i<m_problem_size;i++)
m_frequency_matrix[i]=new int[m_problem_size];
m_psi_parameters= new fl... | 1 |
8fcd8fbaaf8a8111311fb4fd75fb5179 | b4e8e96114abe91e7247889d0e091f2e | Parse diagram and calculate board dimensions | export class BenchmarkApi extends runtime.BaseAPI
async calculateDiagramData(requestParameters: CalculateDiagramDataRequest): Promise<DiagramResponse> {
const response = await this.calculateDiagramDataRaw(requestParameters);
return await response.value();
} | 0 |
9444e1fca7cf165aaf199ce6191eb1e6 | fddbe3fd28e5418e61c7ec8c71c1d98c | 删除第一个数组元素 | if(size <= 0){
System.out.println("空了");
return;
}
array[--size] = 0;
} | 0 |
a5cb69e659b8f78429b4d7535e850519 | af21d4e6653ec72a8f0a724308a4975d | Raise an Exception with message 'area() is not implemented | class BaseGeometry():
def area(self):
raise Exception("area() is not implemented") | 1 |
1e390a46e14791c25e003083674a7308 | 933ba18bd2092c2ff37bab85b7ad2d51 | Перезапускает таймер обновления | namespace Domain.Device.MiddleWares4InData.Invokes
public class MiddlewareInvokeService<TIn> : IDisposable
private void RestartTimer()
{
_timerInvoke.Stop();
_timerInvoke.Interval = _option.Time;
_timerInvoke.Start();
} | 1 |
78af5fb3214e07016539b5f4c126748b | 3961942191f4a2b741d7adc75bf59f47 | Prevent Saturday and Sunday from being selected. | function EventsController($scope, $state, $window, $timeout, evt, SignalsService, Authentication, NgMap)
function disabled(data) {
var date = data.date,
mode = data.mode;
return mode === 'day' && (date.getDay() === 0 || date.getDay() === 6);
} | 1 |
ddf01861faa47701b90f2e0cfe7c23ed | 21c69e1a5d6f381c1fa78c15ecbe9095 | Filtra los formatos según los permisos del usuario ingresado. | public class AsignarRadicadoController extends GenericController<Window>
private boolean isValidoTipoArchivo(String formato) {
if (permitidosArchivos != null && permitidosArchivos.size() > 0) {
for (FormatosPermitidosArchivo FormatosPermitidosArchivo : permitidosArchivos) {
if (FormatosPermit... | 1 |
c43dd898ce6b8a49a1083aa181450671 | f75a736f648620345b4234d59a42d8f0 | Symfony controller action for editing a CampaignChain Activity in a
pop-up window. | class CampagneController extends Controller
public function newAction()
{
return parent::newAction();
} | 0 |
e765113dc35b1b1e6139b36628977cb7 | c8ca7998ecc89d03760c70e228dc249e | use to get athlete Id from Strava API | {
$matches=explode('/',$youtubeURL);
if (count($matches) >3)
{
$userid = $matches[4];
$pair=explode('?',$userid);
return $pair[0];
}
return '';
} | 0 |
0a371ada9f86caa39c2df1edc9a64e2c | 39959f664946eb8902b7b28ce0821384 | 指定された期間の文言を返却する | class LipsumGenerator
public static function getWords($amount = 5, $start = true) {
return nl2br(static::sendRequest('words', intval($amount), $start === true));
} | 0 |
3ae96041ce599fc4635e51270c25a854 | 180b3f75b1c9db15f19548cecb245262 | Validate difference between attributes. | {
foreach ($attribute_names as $attribute_name) {
if ($schema_one->attribute($attribute_name) !== $schema_two->attribute($attribute_name)) {
if ($attribute_name === AvroSchema::FULLNAME_ATTR) {
foreach ($schema_two->getAliases() as $alias) {
... | 1 |
3e0927fb440787946db5d18fef9832d2 | 931b095386153830cd9da18ea50df35d | 根据data_list中的key_word字段,在索引中删除数据 | public class BozhuIndex
public void deleteIndexData(UserAllParamsDomain bozhu) {
try {
writer.deleteDocuments(new Term("username", bozhu.getUsername()));
writer.commit();
} catch (IOException e) {
logger.info("User: " + bozhu.getUsername() + "'s indexed data deleted error.");
}
} | 0 |
04b0ac8f6727c9366c73feded9943ee4 | ce6110d7919b889356b5363dcfb07d9b | Inicializa lo necesario para el 'MessagesViewer' | Composite container = new Composite(parent, SWT.NONE);
container.setLayout(new FillLayout());
tableViewer = new TableViewer(container, SWT.FULL_SELECTION
| SWT.MULTI | SWT.BORDER) {
public void remove(Object[] elements) {
int oldIndex = -1;
Table table = tableViewer.getTable();
int[] selectionI... | 1 |
cd396e475234cfda73cb5c1971f8e96a | 075ad889142bbc2d578f565eb017f4da | 根据订单号返回用户vip卡可退金额 | public class UserAction extends GameStrutsAction
public String payback() {
Map<String, Object> result = new HashMap<String, Object>();
try {
String makeid = getRequest().getParameter("makeid");
String[] idArr = makeid.split("_");
int num = 0;
if (idArr.len... | 1 |
29d91b95285468fbb409b192fcd39929 | 736bf12ba9c1f415e42282c1c1e3a05b | Método que permite obtener todos los registros de forma de enseñanza a fin de cargarlos en el formulario | {
$data = Matricula::where("visible", true)->get();
$compilado = array();
foreach($data as $item) {
$xrow = array(
"id" => $item->id,
"persona" => Persona::find($item->persona_id),
"carrera" => Carrera::find($item->carrera_id),
... | 1 |
52ba2b64c1256421769294f5e07f01b3 | 5b14c13e1a9649da7f058bf0d3e2b6af | 获取指定账户与所有角色的关系
说明:
1.返回的是账户与数据库中所有角色的关系(包括不存在的)
2.如果存在的关系则有详细的信息(如id,createTime);反之则没有 | namespace X3Platform.Membership.IDAL
IList<IAccountRoleRelationInfo> FindAllRelationByAccountId(string accountId); | 1 |
7411beecc8ccad2027ac7efe34edcd02 | 346595678ddd8aa5de0f9c4ca7bec150 | Remove any visible call notification | function hideNotification() {
clearTimeout($("#notification").data("timeToShow"));
$("#notification").find("div").slideUp(function() {
$("#notification").empty();
});
} | 1 |
05561c6085cc0a99b96d5db4804f953c | 1f2e3e7c702a5e49adc1315e90628edd | UART Receive ISR | voiduart_rxIsr(void)
{
} | 1 |
c219960ec907f1ff9c257e4889881a3c | 9a9b34f28036c6c253a7f79d15bc71dd | 文件名fileNameStr加后缀suffix | namespace WindowsFormsApplication1
public partial class Form1 : Form
string AddSuffix(string filename, string suffix)
{
string fDir = Path.GetDirectoryName(filename);
string fName = Path.GetFileNameWithoutExtension(filename);
string fExt = Path.GetExtension(filename);
... | 1 |
1c69d74d318ffebd23b321d1b59a50d0 | ff9789e84d56203961d146c7dcb1845a | # RPK: reads per kilobase of sequence range. | read_bp <- function(bp_file, seqinfo) {
bps <- read.table(bp_file, sep="\t", header=T,
blank.lines.skip=T, strip.white=T)
if(ncol(bps) > 7)
bps <- bps[,1:7]
if(ncol(bps)==5)
names(bps)=c('BP_name', 'chr', 'start', 'end', 'size')
if(ncol(bps)==7)
names(bps)=c('BP_name', 'chr', 'start', 'end', 'si... | 0 |
a228cb0f5986352859ac96eb29f9b27f | 43d2c72182fc1c882e59dba7b35ce33a | 租赁平台:箱子进出仓库 | PreparedStatement pstmt = null;
try {
pstmt=conn.prepareStatement("SELECT ISNULL(ITM_QTY,0) FROM CTN_MAIN WHERE CTN_BACO=? AND CTN_TYPE=11");
pstmt.setString(1, fromBoxBaco);
ResultSet rs = pstmt.executeQuery();
if(rs.next())
{
if(rs.getBigDecimal(1).compareTo(moveValue)<0)
{
throw new ... | 1 |
5cd624a2a3877545f17907aa311e3cec | 1d59fa27fd0f2f139ceaf18f41b83408 | 方法一:转化为字符串,判断是否与反序的时候相等(最简单) | public class Solution
public String solve (String str) {
if(str == null || str.length() == 0 || str.length() == 1){
return str;
}
char[] arr = str.toCharArray();
for(int i = 0 ; i < arr.length/2; i++){
char tmp = arr[i];
arr[i] = arr[arr.length - 1 - i... | 0 |
357af0e843754ed05985c9da841f76f8 | 1101791302207c2a1fca81935acbdb99 | # RELATORIO ASSINATURAS REALIZADAS | $params = array();
$view = $this->getPath()."/View/Relatorios/RegistroOperacoesView.php";
echo ($this->gen_redirect_and_form($view, $params));
} | 0 |
9700ed1f2ed1ef8bae168b3111238c96 | 8aec87fd240f19955c4b8ed27b31bc27 | 如果按键符合规定好的快捷键要求 返回对应的其内容 | {
if (hotkey.contains(event->key()))
{
ShortCut *sc = hotkey.value(event->key());
if (sc->keyName().isEmpty())
{
QTableWidget::keyPressEvent(event);
return;
}
switch (sc->actionType())
{
case ShortCut::CopyToClipBoard: {
... | 1 |
81130c6b04341805cf8cdf2ffae5b915 | 8a4f7cbdb8dab02d1e8e2f42419168a5 | To proper case and trim. | class Diffinder
def to_word(word)
return word.downcase.strip
end | 0 |
5876bc2c2161803815535a0ed09e6cc2 | dab358dddaaf58a637ceee16d3face9a | <p>
Creates a policy with the specified attributes for the specified load
balancer.
</p>
<p>
Policies are settings that are saved for your load balancer and that can
be applied to the front-end listener or the back-end application server,
depending on the policy type.
</p>
CreateLoadBalancerPolicy operation returned by... | java.util.concurrent.Future<ModifyLoadBalancerAttributesResult> modifyLoadBalancerAttributesAsync(
ModifyLoadBalancerAttributesRequest modifyLoadBalancerAttributesRequest); | 0 |
b10c4794c6707c8fae1a4e61324bb4a4 | 95034815c1335d0cc4a237208a2b78b3 | Get a listing of all filesystems in this pool. | class PoolService(CRUDService):
async def get_disks(self, oid):
pool = await self.query([('id', '=', oid)], {'get': True})
if not pool['is_decrypted']:
yield
async for i in await self.middleware.call('zfs.pool.get_disks', pool['name']):
yield i | 0 |
de4c9747fa1b201c165c8ec05f3a8c2e | b1b842ef7fbf0e040495e0484641fe4e | TResult System.Linq.Enumerable/<CreateSelectIterator>c__Iterator10`2<UnityEngine.Vector3,Mapbox.VectorTile.Geometry.InteralClipperLib.InternalClipper/IntPoint>::System.Collections.Generic.IEnumerator<TResult>.get_Current() | Il2CppObject * U3CCreateSelectIteratorU3Ec__Iterator10_2_System_Collections_Generic_IEnumeratorU3CTResultU3E_get_Current_m3192384683_gshared (U3CCreateSelectIteratorU3Ec__Iterator10_2_t3519027926 * __this, const MethodInfo* method)
{
{
Il2CppObject * L_0 = (Il2CppObject *)__this->get_U24current_5();
return L_0;
}... | 1 |
df9a92a9bd5ab0c5038931103c55ec44 | d61e4171014ee9c63f21a2ba9af68994 | For you to complete... | def prob1():
raise NotImplementedError("Problem 1 Incomplete") | 1 |
e924422bf787f7e1198ec68342909222 | 218842793552b7a9b2f35dd6cec44669 | 该定位数据是否是重复数据<p>
检测车牌号和GPS时间 | public Boolean isRepeat(Map<String, Object> params); | 1 |
537f99f7ae304da760550525cb9cff50 | d6c0ee2f7cf23f9839a748ace25e6cca | 通过反射一次性将表进行映射 FluentAPI | {
base.OnModelCreating(builder);
AssemblyName[] assemblyNames = Assembly.GetEntryAssembly().GetReferencedAssemblies()
.Where(p => p.Name.EndsWith("Module")).ToArray();
List<Assembly> assemblyList = assemblyNames.Select(Assembly.Load).ToList();
var ... | 1 |
e86009dfd1730d74bf587b89acfceccf | 1db938ebf1a5159f11fb90a32d0678fd | 将记录插入数据库的车辆离开表 | {
string id = line.Id;
string comingtime = line.Comingtime.ToLocalTime().ToString("yyyyMMdd HH:mm:ss");
string trunk = line.Number.ToString();
string sql = "insert into t_comingrecord(id,comingtime,trunk,islink) values('" + id + "','" + comingtime + "','" + trunk ... | 0 |
1daf51f5d1953d96dc4f6931da233d65 | cca380997cdee8684a4f51b785093c36 | Retrieves the results of the editing session.
It returns a array of Strings containing the
current values of the edit fields. | public abstract class Formulary extends View{
private String[] getOutput(){
String[] values = new String[fields.length];
for (int i = 0; i < fields.length; i++) {
values[i] = fields[i].getField().getText();
}
return values;
} | 1 |
87a2c006bbc28fc6cdc5316bcf571204 | 8134d46210323abb5a36307a69666328 | Get all Archivables for a certain guild,
when no ID ist specified, all entries are returned. | if value is not None:
return db6.find_one({"guild_id": guild.id})[value]
else:
return db6.find_one({"guild_id": guild.id}) | 0 |
dc740ffa209cf02139ae2f66b0e2d24d | 5258ad6179f7c9d0a078410bd5a58918 | Removes comments by post id. | {
string sql = string.Format("DELETE FROM `{0}comments` WHERE `{0}comments`.`{1}_id`={2};", Helper.Prefix, isPostId ? "post" : "com", id);
return Helper.Query(sql);
} | 1 |
7f14fa2e957c779e50842d905e43039a | efe5c78f77b856afed8c8991ef91060f | 提交资产报废管理申请单详情 | @Controller
@RequestMapping(value = "${adminPath}/financing/submitMaterial")
public class SubmitMaterialController extends BaseController
@RequestMapping(value = "submitView")
@Token(save = true)
public String submitView(String financingInformationId, HttpServletRequest request, HttpServletResponse response, Mo... | 0 |
596dfd302477d52ab0364b1b24aa86f1 | b57471cfcf4d1e095cf609ad8ac113db | Removes the node matching the specified information from the current
hashtable.
Returns a pointer to the removed element if successfull or NULL otherwise. | HTable::remove(HTableKey* key)
{
HTableElem* rv = NULL;
if (key == NULL)
{
return rv;
}
pthread_mutex_lock(&mutex);
rv = lockedRemove(key);
pthread_mutex_unlock(&mutex);
return rv;
} | 1 |
86d4f8eadec372b53e5554459d360176 | 6b173c9d6c64a861cc334e57dcd36d5c | The Decorator delegates all work to the wrapped component.
装饰器将所有工作委托给包装的组件。 | namespace Decorator.Conceptual
abstract class Decorator : Component
public override string Operation()
{
if (this._component != null)
{
return this._component.Operation();
}
else
{
return string.Empty;
}
... | 1 |
1424f54fff031621150db90810d0c085 | 7f880a03fe90e2b38b672e81d472302b | Permet de gérer les champs quer l'api va retourner. Par défaut elle retournera tous les champs. | class APIFeatures{
limitFields(){
if(this.queryString.fields){
const projectedFields = this.queryString.fields.split(',').join(' ');
this.query = this.query.select(projectedFields);
}else{
this.query = this.query.select('-__v');
}
return this;
... | 1 |
8769d6757664bc92516f7326d9c77e1c | bfd8953c3eadc04408d02fd232c69d55 | Entry point to the example | public class MainVerticle extends AbstractVerticle
public static void main(String[] args) {
Runner.runExample(MainVerticle.class);
} | 1 |
514072889ce4ba3e64134363049dfe39 | d0f099e8873e2d2ca04efea938756370 | Apply OpCodes associated with switching a case on ICU.
This involves tearing down existing case and than building up a new case. | export class FontOperators
public case_toggle(): void {
return PythonInterop.callVoid(this.interop, `${this.accessor}.case_toggle`, {})
} | 0 |
f3dd54e69cca9814e1b56d35b835abf0 | 02792987a3821ea57b2d321061f06032 | بررسی شماره ها واصلاح خودکار اشتباهات احتمالی | {
bool bNumber_Check[Bingo_Number_Max] = {};
for(int i = 0; i < Bingo_Arr; i++)
{
iAi_Bingo[i] = rand() % Bingo_Number_Max + 1;
while(bNumber_Check[iAi_Bingo[i] - 1] == true)
iAi_Bingo[i] = rand() % Bingo_Number_Max + 1;
bNumber_Check[iAi_Bingo[i] - 1]++;
}
} | 1 |
f359045cc1340f9712c45adc50512b1a | b67a0f58af73af3fe2c5a4b267b0684a | u"""ライフ1/2判定。 | class Creature(__unit.Unit):
def is_quarter(self):
return self.__life <= self.__max_life >> 2 | 0 |
27fd63a3d1e29d9d10db713691e2c753 | 900704723967bd4b9372156f180f25fa | The ARN of the IAM role to be assumed by Firehose for calling the Amazon ES Configuration API and for indexing documents. The IAM role must have permission for `DescribeElasticsearchDomain`, `DescribeElasticsearchDomains`, and `DescribeElasticsearchDomainConfig`. The pattern needs to be `arn:.*`. | result = self._values.get("role_arn")
assert result is not None, "Required property 'role_arn' is missing"
return typing.cast(builtins.str, result) | 1 |
897ab90619412e7bafa3573d2a642ea7 | e1807e292b3e6a08ec0ab91a1d032cc4 | Getter method for property <tt>columnType</tt>. | public class DataColumn implements Serializable, Comparable<DataColumn>
public int getColumnType() {
return columnType;
} | 1 |
d2059673bd6e46fe5fccbd6538608e02 | 71e92507f08cc1834778f997fc7a142e | Ajax API to request a doctor instance including its assocations
to other entities. | class APIClientController extends APIController
public function doctor($id)
{
$doctor = Doctor::find($id);
if (empty($doctor)) {
abort(404);
} else {
return view('doctors.details', compact('doctor'));
}
} | 0 |
5ad415917b3be8e7ee709ffb72922f6f | 8c753d462f9e7869930320276519b4e0 | Remove removes all occurrences of a substring from within the source string. | func Replace(s, old, new string, n int) string | 0 |
1a79ce8300cd72ab4d5d0f5c62215ccb | ef0620ba38c79e9759962fdc6440c08f | 往cookie.json文件中写入cookie | def write_cookie(data,cookie_key):
data1 = read_json("/Config/cookie.json")
data1[cookie_key] = data
write_value(data1) | 1 |
2142dbdc162a4c73b0a3046455d63c20 | 352421e292145e52b6e5f88a2e280216 | 启动命令行工具 | namespace DevNoteCmdPlayer
public partial class frmDevNoteCmd : Form, IArmPlayer, IFrmDevNoteCmd
private void toolStripButtonRunCMD_Click(object sender, EventArgs e)
{
MyConsoleControl.StartProcess("cmd", null);
} | 1 |
68eea0be547b8c20d272c38ac94ad6f9 | 415f1036a1403fc4745f830a89dd6f4f | Read text from filter control and select entries that match. | class PrefsViewer(wx.Panel):
def on_filter_txt(self, e = None):
self.update_list(self.filtered_prefs(self.filter_txt.Value)) | 1 |
98bdbd7d06f6601b2ec1800c40f9d238 | 20c70fc1b8d0af61f410a10d610a931d | 添加档口信息 | {
$id = '';
$window = Db::name('window');
$id = $this -> request -> post('id');
if($is_add === false) {
if(Common::check_id($window,$id) === true) {
$data['id'] = $id;
} else {
return Common::check_id($window,$id);
... | 1 |
a61aeda04be264492ef824036eff01cf | 7140c592a431e819e561d63576f39c13 | Creates flask routes outside of Dash application. Mainly used to provided a route to
download all data. | self.server = Flask(__name__)
@self.server.route('/')
def index():
return self.get_index()
@self.server.route('/update', methods=['POST'])
def update_figure():
body = request.get_json()
report = self.get_report_from_body(body)
self.... | 0 |
d592da2feec850380b5a626a7cf3b4ab | 6224de62f51e3d85c65870e5a7fb96e5 | Asks the user to allow access to account information.
Don't catch users denial. Handle this at the calling method. | class Application
static RequestUserAuthorization() {} | 1 |
5855e6ce8cf41c2475955bef9cb0873e | b7e8ea3a8a45076b2da2f81c81b3dadb | Clean the data being passed from the save of a columns layout. | class DataClean:
def __init__(self, path_data, path_layout):
self.data, self.layout = self.master_clean(path_data, path_layout) | 1 |
f1aad361deaa9c888380d1e91cb3f7a6 | 4cb8fbba6566102cab2c52d1e4d983c6 | Pour changer d'utilisateur | class userController extends Controller
public function switch_user() {
if(!$this->auth->isAdmin()) throw new HTTPException(403);
$sql = "SELECT * FROM t_user where username = ?";
$res = $this->database->getOne($sql,array($this->request->getParam('username')));
if(isset($res['id'])) {
... | 1 |
d5ba4cee4fa5a34ec7a783dc904b4ff3 | c5319e10534246e650b17b9254dbc404 | # makes a boxplot from the hourly data using Tmean_C | baseflow_boxplot <- function(hyd,carea,k=NULL,title=NULL, DTrng=NULL){
if (!"BF.med" %in% colnames(hyd)){hyd <- baseflow_range(hyd,carea,k)}
hyd$mnt <- format(hyd$Date, "%b")
hyd$mnt <- as.factor(hyd$mnt)
unit <- 'm?/s'
if(!is.null(carea)){
hyd$BF.med <- hyd$BF.med * 2592/carea
unit <- 'mm'
}
hy... | 0 |
2abc2b9e910d67e66bf0f5d7f9456731 | 25fc8485dd907ba9450feeb223eb9a0d | closes connection to mailserver | class Mail(object):
def close(self):
self.server.quit()
self.server.close() | 1 |
e16485fb9a50034309fb59c6cab834f7 | 36d32fd4736ec7d194ef3264f61f4f61 | 返回前n天的日期 格式yyyymmdd | public class LogUtil
public static String getStringDateShortNDayBefore(int n) {
Date currentTime = new Date();
long onedaytTime = 24*60*60*1000;
currentTime.setTime(currentTime.getTime() - onedaytTime*n );
SimpleDateFormat formatter = new SimpleDateFormat("yyyyMMdd");
String date... | 1 |
790842b8534e5ab0b65b1a830c32a579 | e7d610597b1220c64d5da7ec079fd219 | Set the margin that should appear at the right of the PDF document. | class FigSize(object):
def set_margin_right( self, margin_right ):
self.margin_right = margin_right | 1 |
0ee553b36b668b9cf5abbbe5b63b3a6e | 3bb2f5c576d3ca258472c67dd40be3fc | Retorna o caminho absoluto para um caminho relativo | function absPath( $rel_path)
{
$path = realpath( '.');
$stack = explode(DIRECTORY_SEPARATOR, $path);
foreach( explode( '/',$rel_path) as $dir)
{
if ( $dir == '.') {
continue;
}
if ( $dir == '..')
{
array_pop( $stack);
}
else
... | 1 |
33fe87d2407f5ad6e1923c3a6fa85618 | 19996d36f7d8e05ccf25034885b4047e | Reads all the npi number and npi org data fields from the NPPES file which was downloaded
during the build process. | class Mississippi extends ExclusionList
private function parseNPI($src)
{
return trim($src) ? array_map('trim', str_getcsv($src)) : null;
} | 0 |
09569bed2c9cb571a3b5ee04fc1e0e93 | 56f07e717dda0d2eec72ee220c01c3f3 | Lists available benchmarks. | def ls():
for benchmark in helper.load_benchmarks():
print ' ', benchmark.name | 1 |
5b325a41d727b20a0705e18165fdc1c7 | 67f85054180563442bdd6fd99cf3016d | which will be constrained by
<li>QBE constraints which have been set for this table,
<li>QBE constraints of related data tables determined by the given
relation set and
<li>the conditions of the related table aliases, if existing.
<p>
Note that the number of records retrieved from data source is limited to
the current ... | public class AgoBusinessObjectEvent extends EventObject implements TableDataStoreUser
public void tableDataStoreQuery(String queryString, String orderby) throws
AgoSecurityException,
AgoTransientSystemException,
AgoUnrecoverableSystemException
{
} | 0 |
08d0eb37312dd820924b9b40f20a4745 | 742eb1034be65114edee898d0ecbfac8 | 从队列中取出并删除任务,在必要时阻塞 | static TASK_S* _Queue_Pull(QUEUE_S* pstQueue)
{
assert(NULL != pstQueue);
TASK_S* pstTask = NULL;
pthread_mutex_lock(&pstQueue->stLock);
pstTask = pstQueue->pstHead;
if (1 == pstQueue->iLen)
{
pstQueue->pstHead = NULL;
pstQueue->pstTail = NULL;
pstQueue->iLen = 0;
... | 0 |
b86a63c13d2dc46a4d29e4d361eb11f2 | 00515a5cfec8e5b975d58c78a9d9aefc | Setter for title agency | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"agencyName",
"agencyAddress",
"agencyPhone",
"products",
"categories",
"customers",
"orders"
})
@XmlRootElement(name = "agency")
public class Agency
public void setAgencyName(String value) {
this.agencyName = va... | 1 |
60eae2bb3e9749993b4f7485eb222df1 | 48c56605e461aeeb201025733a8755f1 | Sets value for ComAdobeGraniteBundlesHcImplDavExBundleHealthCheckProperties.HcTags property. | namespace SALSA.HMI
public class Contr_valve_hor : RSI_ValveActuator
private void SetTags(string value)
{
this.SetValue(TagsPropertyKey, value);
} | 0 |
051ca7f931f85227475637246b7c39d2 | cb86d7a8458b8de6d141116411ab04ed | Generates a fingerprint based on a hash of the server id and base url to have some faith of uniqueness
across real instances of JIRA. Server ID alone is insufficient since it could be the same in, say, both a test
and production instance of JIRA if data was cloned. | {
$session = ServerRequestHelper::getSession($this->request);
$sessionFingerprint = \json_encode($session);
$url = ServerRequestHelper::getUrl($this->request);
return md5($sessionFingerprint.$url);
} | 0 |
57bee03ffb0d1e8ea4b8493e1d57e1d5 | 1eac0bd83d925f9564bced01e0e5e656 | Apply the function to the elements within the given lists at corresponding
indexes until one of the lists runs out. | this IList<T0> xs0, IList<T1> xs1, IList<T2> xs2, Func<T0, T1, T2, Tr> item0_item1_item2_fun)
{
var len = Fun.Min(xs0.Count, xs1.Count, xs2.Count);
var result = new Tr[len];
for (var i = 0; i < len; i++)
result[i] = item0_item1_item2_fun(xs0[i]... | 1 |
d84f9067701f594eeafcdc47a1d5ce47 | e3bca94dad1db236706d12ec6fbfbc96 | 将一个已经就绪的坐席设置为未就绪的状态
这个接口并不会重新分配坐席的现在的服务中的访客给其它坐席 | namespace Genesys.Workspace
public class VoiceApi
public void SetAgentNotReady()
{
this.SetAgentNotReady(null, null, null, null);
} | 1 |
f7a460c6249d446ae50852a9fd483a29 | acc96bd2d838bbda5352e5120096a9da | 通过pat构建_dp O(M) | if (pat.length() == 0) {
return 1;
}
if (str.length() == 0 || pat.length() > str.length()) {
return 0;
}
vector<vector<int>> dp(str.length() + 1, vector<int>(pat.length() + 1));
for (int i = 0; i <= str.length(); i++) {
dp[i][0] = 1;
}
for (int strIndex = 1; strIndex <=... | 0 |
8e3d3e256b719f125bd37c523c4224c3 | b3514c5cd19988e059370f3b94f46e8b | Calculate table page size | public class DtTableHeader implements StructConverter
public int getPageSize() {
return page_size;
} | 0 |
fa40c444038c8a172c6a522bb08767a8 | 176477a13ac212f32ee7e8c856f6dac3 | Write the weighted hypergraph in hMETIS format | symbols = sortSymbols(e)
filename = e.filename
lg = '#Nodes\n\n'
n = 0
for s in symbols:
truth = s.truth
strokes = s.strokes
for stroke in strokes:
lg += 'N, ' + str(n) + ', ' + str(truth) + ", 1.0\n"
n += 1
lg += '\n\n#Edges\n\n'
n = 0
for... | 1 |
c2a9b4fc65b67b6d5d9c19c9d46889d5 | 67945416491970b34056ee36df4fcbac | 初始化左右扩展装饰器,将其附着在控件外围 | var objs = $(".layout-expand-west");
var obj = null;
if (objs.length == 1) {
obj = $(objs[0]);
if (obj != null && obj.length == 1) {
$(obj).mouseover(function() {
$(obj).click();
});
}
}
} | 0 |
cad2f2525345bbf02bd466ef02087e66 | c292c75f1b29fc8d1d302a9eb5742fa3 | Returns a mocked rectangle. | {
return $this->createLineString([
new Point(0, 0),
new Point(1, 0),
new Point(0, 1),
new Point(1, 1),
new Point(0, 0),
]);
} | 1 |
a9576690f800ea0e6396146caf480a83 | e0ee7557c2d431fd0ab0961f577f508d | Hämtar vilket språk denna specifika kompetens är på. | @Entity
public class Competence_Localized implements Serializable, CompetenceDTO
@Override
public String getCompetenceName(){
return competenceName;
} | 0 |
704051731f1c99befaa5adb5e2b630ec | e9207e9d9475a41ba5746f453e8f5a82 | POST: Comissions/Create | [Authorize(Roles = "admin")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(string[] sportman, [Bind("Id, Name, RegionId")] Comission comission)
{
if (ModelState.IsValid)
{
if (sportman.Length != 0)
{
... | 1 |
f4466011f21d40934045754d668c14ea | c67b1d07045961ae3461c40dbc80177a | 将对象分别传入到两个线程里面 | public class Deadlock
public static void main(String[] args) {
DeadLockObject deadLockObject =new DeadLockObject(new Object(),new Object());
Thread1 thread1=new Thread1(deadLockObject);
Thread2 thread2=new Thread2(deadLockObject);
thread1.start();
thread2.start();
} | 1 |
82d2970574126ea6ef16259243db7bee | fff904b5f30b7809ec51f8643ef78443 | 是否是表格 | if tbl == nil then
return false
else
return type(tbl) == __String
end
end | 0 |
d0e6af5360bd663af88e906c820452b1 | 5a2c0cd7db52f743729ab35830e52c28 | Read and write RNA. | class MessengerRNA (GRNElement):
def __init__ (self, parent, sequence):
GRNElement.__init__(self, parent)
self.sequence = sequence | 0 |
c5fadcdd4950a63119bffef75b25fa48 | d1db30b88957dc2cc51331a30af54da9 | 返回一个url流或者False | print('%s' %(threading.current_thread().name),end='')
try:
r=requests.get(url,timeout=2)
r.raise_for_status()
print('%s:True' %(url))
return True
except:
print('%s:False' %(url))
return False | 0 |
6474bc1c4de45a78485ae80855dc5a18 | b3df6b05433cf485c6aafdc9a6d70028 | Function to delete hazard Details. | {
try
{
objProfessionalDetailsDAL.DeleteProfessionalDetails(objDeleteProfessionalDetails);
}
catch (RaveHRException ex)
{
throw ex;
}
catch (Exception ex)
{
throw new R... | 0 |
584d16b8da135726614c9824c01ba120 | c360eff2c9922d8aae1c2b33e6a41ce9 | download the RVTD static GTFS file from their server | def fortney_download():
fortney_data = os.path.join(get_env_variables()['fortgrid_dir'], 'fortney_grid.db')
return send_file(fortney_data, attachment_filename='fortney_grid.db', as_attachment=True) | 0 |
df09ac3866606dffaa4d8554c929d60c | c0b3faf732dd8536d84967ef73fec56c | 2.实例化my_question : 通过exam_id获取question数组,然后逐个实例化 | function getQuestionDoc() {
var len = 2,
qds = [],
k = 0,
qdl = [];
for(var i = 0; i < len; i++) {
qdl = getQuestionDocList();
k = Mock.mock('@integer(0,3)');
qds.push({
"_id": Mock.mock('@string(32)'),
"title": i % 2 == 0 ? '传输设备(多选题)' : '传输设备(单选题)',
"question": qdl,
"questiontext... | 0 |
a828e602f551334de99a9f662821c694 | 39e284f5fce2d40aa77b55921af1e7f9 | 弹出栈中所有Activity,保留指定的Activity | public class ActivityManager
public static void popClass(Class<? extends Activity> cls) {
Stack<Activity> newStack = new Stack<Activity>();
for (Activity a : stack) {
if (a.getClass().equals(cls)) {
if (!a.isFinishing()) {
a.finish();
}
} else {
newStack.push(a);
}
}
stack = newStack;
... | 0 |
7bf04fbaf58c3069ab504c9b2ca7c8f5 | 04f2892ee261064a58411671a92d4d1f | Get the complete IRI | String getIri(); | 1 |
4934e2d70d2c1c3a6b2a27bc8d7f5a29 | 9d6a9b2df5eb2c8f2566589bec3d82a4 | 根据接收器的地址找到对应缓存 | int8_t addr_register(asuwave_rxu_t *asuwave_rxu)
{
for (int i = 0; i < MAX_ADDR_NUM; i++)
{
if (list_addr[i].dataNum == 0
|| list_addr[i].addr == asuwave_rxu->body.addr)
{
list_addr[i].dataNum = asuwave_rxu->body.dataNum;
list_addr[i].addr = asuwave_rxu->body.addr;
return i;
}
... | 1 |
feeb2c39213e2e81e33aa43a6dd6f581 | d2bd53b8018cda386e10fd1ef444af4e | Remove backgrounds that have gone off-screen. | public class BackgroundManager : MonoBehaviour
private void CullBackgrounds() {
Vector3 offscreen = Camera.main.ScreenToWorldPoint(new Vector3(-1000.0f, 0, 0));
bool isDone = false;
while (!isDone && mBackgrounds.Count > 1) {
BackgroundControl first = mBackgrounds[0];
if ... | 1 |
44cb810563542b3b3cda1940ebdefd88 | bf8f7e5b3eb5ae8c068711ffc46d87a4 | returns a list of directory names for the
specified directory. | {
var dirStrings = Directory.GetDirectories(dir, glob, SearchOption.TopDirectoryOnly);
return dirStrings.Select(Path.GetFileName).ToArray();
} | 1 |
0a0c593eb87099cae0ee22727825c698 | 5235c68bfc9fa22628a3988ee61a00eb | 获取标记发货所需的相关订单参数 | this.updateParams = {};
this.findCondition = {};
this.findCondition.sid = order.sid || 1;
this.findCondition.order_no = order.order_no;
this.updateParams.is_receipt = 1;
this.updateParams.order_status = 3;
this.updateParams.express_company = order.express_company;
this.updateParams.express_no = order.ex... | 1 |
50277f9f30d3a01c1f6e0d50b68b5076 | e7ae32087d433a9b5721ee739b9a2882 | Sets a Property Value in a thread context | namespace HalfedgeDS
public class BaseKernel : IDisposable
public void SetProperty<T>(VPropH<T> ph, int vh, T p) where T : new()
{
m_vprops.GetProperty(ph)[vh] = p;
} | 0 |
b415f3324594abadeb266a257d15d9f4 | c80418f773b3cf4b7c03116beeffd671 | Returns the icebreaker entry where uuid = ? and groupId = ? or returns <code>null</code> if it could not be found. Uses the finder cache. | @Component(service = IcebreakerEntryPersistence.class)
public class IcebreakerEntryPersistenceImpl
extends BasePersistenceImpl<IcebreakerEntry>
implements IcebreakerEntryPersistence
@Override
public IcebreakerEntry fetchByPrimaryKey(long icebreakerEntryId) {
return fetchByPrimaryKey((Serializable)icebreakerEntryId... | 0 |
ff1733b6890f7a9a5215371c920effb1 | b29bcf0f82166cf8256de0de2d97fa7e | A flag to indicate that this entry has point symmetry | class GPGFile(object):
def symmetric(self):
return self._symmetric | 0 |
a8b1dbe0607ef32e4ad8c68ff46fa788 | 58363e67cc6abc357981adfcd5017f01 | 0 means no reads | int hdfsFileUsesDirectRead(hdfsFile file)
{
return 0;
} | 1 |
b526a349a94a361fb56871c044f925fe | fb57d516e275d34a52720204612eb28f | Evita que um usuário seja removido e continue logado | {
$admin = DB::table('roles')->first();
if($user->hasRole($admin->name)) {
Session::flash('error', 'Impossível remover um usuário com perfil '.$admin->name.'.');
return redirect()->route('users.index');
}
$aluno = $user->aluno;
if($aluno) {
... | 0 |
20ace3cb707cc621caf0057a5080def9 | b9ef10d10849477239389f503c3e9f47 | Lists all cScheduleTime models. | {
$allModels = RestClient::query('GET', $this->resource);
for ($i = 0; $i < count($allModels); $i++) {
$allModels[$i]->schedule_by_day_of_week = $this->convertSchByDayOfWeek($allModels[$i]->schedule_by_day_of_week);
}
$dataProvider = new ArrayDataProvider([
'a... | 1 |
9acb6b915f1f7391d6fe0bd68c06c3bf | 4cdb31e4df1e1b6b54c7257689a4ed2e | adapted from http://infopotato.com/blog/index/binary_search | var mid = Math.floor((aHigh - aLow) / 2) + aLow;
var cmp = aCompare(aNeedle, aHaystack[mid], true);
if (cmp === 0) {
return mid;
}
else if (cmp > 0) {
if (aHigh - mid > 1) {
return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias);
}
if (aBias == exports.LEAST_UPPER_BOUND)... | 1 |
49506312e8f37e6b0505900e8b5699c7 | 2699f1667fb578df551e1200289c1261 | 获取行业的树型结构(全部数据) | public class EstimateDao
public List getIndustryTree(String pid, int loadAll, int year,int ctype) {
List list = new ArrayList();
Session s = null;
try{
s = HibernateUtil.getSession();
s.beginTransaction();
StringBuffer sql = new StringBuffer("select distinct id,name,pid,isleaf,remark from(select * from(... | 1 |
3ff7ef1ddda2ec801b22e1a8dddbf23f | f8a12daf81e3394bbb73a0c849c6827d | Returns maximum sum in
a subarray of size k. | int main()
{
int arr[] = {2, 5, -1, 7, -3, -1, -2} ;
int n = sizeof(arr)/sizeof(arr[0]);
int k = 3;
cout << SumOfKsubArray(arr, n, k) ;
return 0;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.