query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
14110c664a6ebf54f21d49f648fb9b18 | 18fd26813195bb760b63e0c9f19511cd | Adds a file to the set. | public class Kawac extends MatchingTask
public void addFileset(FileSet set) {
filesets.addElement(set);
} | 0 |
0ea0e0973f234ac59b509604980246bb | e94dc9d33c8b2748e8aea6a20694c575 | 匹配到对应的经销商报名 | {
if (txtcjh.Text != null && this.txtcjh.Text != "")
{
DataTable temp = viewbll.getDt(txtcjh.Text.Trim());
if (temp != null && temp.Rows.Count > 0)
{
this.txtxsdh.Text = temp.Rows[0]["ddh"].ToString().Trim();
this.txtDealersName.Tex... | 1 |
d852363de7f4b12724c40ea92903d432 | e65dd46f6fbef72fa0f3382b283709e0 | Create an exception indicating that the expression is invalid and reporting the current position. | public class Parser
private SyntaxException error(String message) {
return new SyntaxException(tokenSource.getCodePosition(), message);
} | 1 |
346a3faccc3f88ce9600d7b64a5a6801 | 2ca763a41f9cbf9620268a73f7f6cb69 | Parse a string into a Decimal.
Expects strings of the form:
"[-+][digits][.][digits][eE][-+][digits]"
"[nN]a[nN]" for a NaN
"[-+]?[iI]nfinity" for positive or negative infinity | sqlite3_context *pCtx,
sqlite3_value *pIn,
int nAlt,
const unsigned char *zAlt
){
Decimal *p;
int n, i;
const unsigned char *zIn;
int iExp = 0;
p = sqlite3_malloc( sizeof(*p) );
if( p==0 ) goto new_no_mem;
p->sign = 0;
p->oom = 0;
p->isInit = 1;
p->isNull = 0;
p->nDigit = 0;
p->nFrac = 0... | 1 |
48351d77210122f2263a0e3c1e9b1490 | 97adfa84335b2540b8aaaf959c777ccf | Удаление элементов индекса по внутреннему _id | BulkRequest bulkRequest = new BulkRequest();
idList.forEach(item ->{
bulkRequest.add(new DeleteRequest(indexName, item.toString()));
});
restHighLevelClient.bulk(bulkRequest,RequestOptions.DEFAULT);
} | 1 |
edb8b4dced6776628f3d4383dcffe890 | c4ec4344d496bdb7fc1daff415fe7235 | 文章描述 | class comment extends pluginBase{
public static function description()
{
return "文章评论插件";
} | 0 |
18a749e83341599180d4fbff3f278daf | 90eee4c8db97347a5ec28ec6bc8d6f38 | Get a list of members that are not assigned to any cohort | class TestCohorts(ModuleStoreTestCase):
def test_get_cohort_with_assign(self):
course = modulestore().get_course(self.toy_course_key)
assert not cohorts.is_course_cohorted(course.id)
user = UserFactory(username="test", email="a@b.com")
config_course_cohorts(
course,
... | 0 |
e2947c5171fd63dff1e2106e6ad11fe2 | 73f2da10ac081c36502c134758b1b2ec | create a directory structure as provided. such as ``/assets/images/frontpage`` | def setup_dir(args):
def make_dir(key, value):
if isinstance(value, dict):
for key1, value1 in value.items():
make_dir(key/key1, value1)
else:
key.mkdir(parents=True)
for file in value:
(key/file).touch() | 1 |
9fecbf705cf8cd931bcc71e602001602 | ae962e921c1cfb7d0b8d0cfde64649a1 | Charges the customer by sending the appropriate charging request to the
PSP system.
The billing result object containing the details for the debit
operation.
handled and the payment result object related to it was updated,
<code>false</code> otherwise. | Context context,
Subscriber subscriber,
long amount,
long newBalance,
AdjustmentType adjustmentType,
String csrIdentifier,
Date billingDate,
String csrInput,
String extTransactionId,
long transactionMethod) throws HomeException; | 0 |
09c2a7a29ebdaf5cdead27d57a726c0b | 1c4019ac81654f369696e13a111c897d | 求最大公约数,辗转相除法 | public class _1071字符串的最大公因子
public int gcd(int a , int b){
return (a % b == 0)?b:gcd(b , a % b);
} | 1 |
51f52da4abb9b77da470985245dc2946 | 58f0891cd793153d3449610d64621b9a | Get the inverse of the the observation covariance. | def get_ivp(cov, **kargs):
ivp = 1.0 / np.diag(cov)
return ivp / ivp.sum() | 0 |
1b6e90911384d12625dc635e4ac0e812 | cdfd1fa885e6857e24e5546b2c6af032 | Returns a point in a square wave (for internal use) | {
float triangleT = ( _t % _frequency ) / _width * 2.0f;
return (1.0f - Mathf.Abs((triangleT % 2.0f) - 1.0f)) * pulseSquare( _frequency, _width, _t );
} | 0 |
b97d4b0fbba774a39e973fe1aea7d5a1 | 1e5319544e897b49cc58de901c37f197 | Gets the right lanes. | class Lanes:
def SR(self):
return self._Separated_Right | 1 |
ac614e4a498eedb3f5f7fc20b0839409 | 0263a4f7e5be8f61e34ca28131d4ff6d | Maps the vtk point id that comes from (e.g.) a vtkPointPicker back to a point index. | public class PointSelector extends JPanel
private int indexToId( int isub ) {
return tcModel_ == null
? -1
: tcModel_.getSubsets().indexToId( isub );
} | 0 |
bb560375bece93b4dd5f516c794d48a6 | 69ccb64e663b3cd8de9f07d6ff7d16a7 | Runs the task through to a finished state. | class Task
finish() {
this.scheduler.setPreviousTask(this.constructor.name);
this.state = Task.FINISHED;
this.scheduler.runNextTask();
} | 1 |
10e2c25df3da94c821b7f635b1f945b9 | 0992e0d83f06d43c14110c6d92e619a4 | Allows the Host to read clock offset of remote devices. | class YRealTimeClockProxy extends YFunctionProxy
get_disableHostSync()
{
return this.liveFunc._disableHostSync;
} | 0 |
fa0c1a24937dd52f76ca8a5c0c5a9da7 | 1f8f2d390f6ca17d417f03309fafab7b | 检查陌生联系人通话profile左上角显示手机号 | $phone = Model::factory('Rules')->getPhoneProfile($value);
if($phone >= 1){
return FALSE;
}
return TRUE;
} | 0 |
b2b734481f5ff1056bc55e3ef1277d87 | cfcf43d0493e8f7bfdb5576bdf1dcbc1 | Convenience method to create an event listener that will execute when a channel is deleted. | @DiskordDsl
public interface EventDispatcher
@DiskordDsl
public fun onMessageDelete(handler: suspend (MessageDelete) -> Unit) | 0 |
95726402a117a679542432562b88ca1a | 958ee50a1a75306df46ce461bef84138 | Gets the total number of managers in the game | public int getNumManagers(); | 1 |
13190b323cc714991e35c464aac1e3c6 | 6fae29b6abe37e550b2ac3458cba81e1 | Gets fillFormat | namespace Aspose.Cells.Cloud.SDK.Api
FillFormatResponse CellsChartAreaGetChartAreaFillFormat (string name, string sheetName, int? chartIndex, string folder = null); | 1 |
c68dc72d8c8ec6ba185639ae27e32890 | 394a2b6882ae807cde65cabd8a6e834b | Test feature: get UV index around geo-coordinates. | def test_geo_index():
backup_and_restore(
lambda context: create_indexes(lib.create_geo_index),
None,
lambda context: check_indexes(lib.check_geo_index, (0.0, 0.0)),
restore_delay=1
) | 0 |
936f0aff4d35d2ea91ea479440db5ab8 | efaf8424fb3d91c454635089dd0fd207 | 构造被下载文件的完整路径 | {
string filePath = string.Format("DownFiles\\{0}-{1}-{2}.3gp", _phoneNumber, dmInfo.Name, dmInfo.IndexName);
string fullDirectory = Directory.GetParent(filePath).FullName;
if (!Directory.Exists(fullDirectory))
{
Directory.CreateDirectory(fullDirec... | 1 |
5e8ce0c4576f83122e2737fae425daa7 | 0ff85afa11257dc7efc01ce6031bcafc | Instantiates the VGG16 architecture with Batch Normalization
# Arguments
input_tensor: Keras tensor (i.e. output of `layers.Input()`) to use as image input for the model.
input_shape: shape tuple
classes: optional number of classes to classify images
# Returns
A Keras model instance. | class VggNet(object):
def build_16(path_npy, batch_tensors, end_layer='@_@'):
return VggNet('vgg_16', path_npy, batch_tensors, end_layer) | 0 |
3d2a087445bbf5fa10ea9577227de45e | b91a7683bf70e2e90dad49245c7b1f12 | INPUT PARAMETERS
This function send a DVR table update to MIP daemon on the same host through
'sockfd'. If the size of the update is not a multiple of 4, padding is added to
the update. If an error occur, -1 is returned. | {
int exec = 1;
char ip[BO_IP_MAXLEN] = "null";
int i = 0;
char *key = NULL; char *val = NULL;
int tab_not_empty = -1;
memset(recvBuf, 0, recvBufLen);
for(i = 0; i < tr->size; i++) {
key = *(tr->key + i);
if(key != NULL) {
tab_not_empty = 1;
break;
}
}
if(tab_not_empty == 1) {
exec = bo_master_s... | 0 |
aef106fb4d933e120d9dbc1b68a33ec9 | 1062ec2c7839ff66c4d5e9ec254dd3e9 | Get the zone name from a polygon ID. | class AbstractTimezoneFinder(ABC):
# TODO document attributes in all classes
# prevent dynamic attribute assignment (-> safe memory)
def zone_name_from_poly_id(self, poly_id: int) -> str:
zone_id = self.zone_id_of(poly_id)
return self.zone_name_from_id(zone_id) | 1 |
8949e29e37060c07e1621c20ca2ce287 | 5cda1443d3484ecc1c8e660eca0577c2 | Joins the previous value and the new in the case of '+='. | class TerminalCode(object):
def __add__(self, other):
return self.value + str(other) | 0 |
8a9752d6ae6b64426c90d2226eeace60 | ad951f331b92b95153cfb5b9eb7f2fd1 | 経理情報テーブルを更新する(管理側からのHPC予約) | {
switch ($rsvType) {
default:
case 'counseling':
$set = array(
'f_salon_id' => $post['salon_id'],
'f_room_id' => $post['room_id'],
'f_room_type' => $post['room_type'],
'f_care_frame' => $post['care_frame'],
'f_parts' => $post['parts_id_str'],
'f_parts_set' => $post['... | 0 |
f47d894675aac51afe0c5706e772341d | 4a6f1ae3e91c02ff4913357fbfd68e2d | Convert a generic time string to a high precision epoch time.
SEED time format is "YYYY[/MM/DD HH:MM:SS.FFFF]", the delimiter can
be a dash [-], slash [/], colon [:], or period [.] and between the
date and time a 'T' or a space may be used. The fracttional
seconds must begin with a period [.].
The time string can be "... | if not num:
return None
stime = str(num)
try:
tups = time.strptime(stime[:stime.find('.')], '%Y%m%d%H%M%S')
ft = time.mktime(tups)
except ValueError:
logging.error('Unable to convert %s to a time' % stime)
ft = None
return ft | 0 |
942d369835e32c792ce60c1917ef3e07 | 58d14aaf4eaff80b8953305a19132733 | Plot decision tree recursively. | class DecisionTree(object):
def recursion(self, node):
if self.is_leaf(node):
values, counts = np.unique(node.data[:, -1], return_counts = True)
node.label = int(values[np.argmax(counts)])
node.kind = "Leaf"
return
self.recursion(node.right)
self.r... | 0 |
fba8b7b76135f8e53112c498d8b31b7f | 05bd2394938f09a12f42710e2b82b26a | Ищет ближайшего по росту атлета | tmp = [0,0,0]
for i in range(len(heroes)):
if heroes[i][2] > tmp[2]:
tmp = heroes[i]
return tmp | 0 |
87c7d30ece40f264d5fcf6de4d85db48 | 682ce7192a4833e6c6512e8b5a213778 | Further use of the parser will reject bulleted lists for Raises. | class ListParser extends AbstractBlockParser
public function parseBlock(Text $content, Container $target)
{
$this->parseBulletLists($content, $target);
} | 0 |
14cec77d6ad14e0cfac94410f368915d | 0e64ac925a60a79e51b5816dfbbbdecc | CLS_M_CDを取得する。 | public class SearchJoukenItem
public String getControlCD(){return controlCD;} | 0 |
7c96491b66cb69e5c52b7d5ed7cd8b99 | ff369bd078af2b934690d4439febae49 | PUT /songs/:id | album = Album.find_by(title: params["album"])
artist = Artist.find_by(name: params["artist"])
@song.update!(title: params["title"], length: params["length"], genre: params["genre"], album: album)
@song.artist = artist
@song.save!
response.set_header("Location", song_url(@song))
head :no_cont... | 1 |
ac5d354916a578b698c0abd33651ccca | a0fcda653116a5d058ff93111a2bff74 | Gets the value of the isEligibleForSuperSaverShipping property.
possible object is
{@link Boolean } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CashRefund", propOrder = {
"createdDate",
"lastModifiedDate",
"customForm",
"entity",
"vatRegNum",
"tranDate",
"tranId",
"source",
"createdFrom",
"postingPeriod",
"department",
"clazz",
"location",
"leadSource... | 0 |
bf4fc8e91f5db764228b1535aae225a2 | 6956cb33f49232b11ccbe37e397e145d | Open/Close compareDiv on click | function cfClick() {
getElemById("cf").classList.toggle("showing-state");
getElemById("cf").classList.toggle("showing");
} | 1 |
708fe9d16059ff723b3991e92ff1ffdc | f9d6127466df8a6d697b3079c562f019 | 将多个文件打压成一个压缩包 | if sys.version_info[0] == 2:
sfile = sfile.encode('utf-8')
dfile = dfile.encode('utf-8')
if sys.version_info[0] == 2: path = path.encode('utf-8');
if sfile.find(',') == -1:
if not os.path.exists(path+'/'+sfile): return public.returnMsg(False,'FILE_NOT_EXISTS')... | 1 |
0b56715ba1692c30d3b795196cddb690 | 4138a676b34a8c2d5695d17caa08f32b | 设置症状 | function GetSymptom(productId) {
jQuery.ajax({
url: window.urlConfig.multiDomain.pc() + "/product/GetSymptom?productId=" + productId,
type: "Get",
dataType: "jsonp",
jsonp: "callback",
success: function (data) {
if (data == null || data.length <= 0) {
... | 0 |
8e4254f8d447998af2303f45dd4cdc23 | ae0475b0af9ea68c613d380b4abfb5a9 | Gets the auto-update for this summary. | public boolean isAutoUpdate(); | 1 |
c665f125f8bbda6133572dcbb72252a0 | 10adde5f593e07b1bc6cdf11e92511f2 | Returns and removes an element from the top of the stack
Raises Empty exception if the stack is empty | E top() throws EmptyStackException; | 0 |
df568e406cabdda39e813b9284b30dfd | b7068342997d79038ec78e4c85b4683b | 디폴트 매개변수 예제 | namespace _6func
class Program
private static void DefaultParam(string name, int age = 23) => Console.WriteLine($"我叫{name} 我的年龄是{age}"); | 1 |
6d4615bbddbcbddd2f4b71b3abceabb2 | 799c9f2d0f99d259642263021a311c98 | 查询一级机构和二级机构 | @Service("userInfoService")
public class PubBranchUserInfoServiceImpl implements PubBranchUserInfoService
public List getFirstAndSecondLevelBranch(){
return pubUserInfoDao.getFirstAndSecondLevelBranch();
} | 1 |
43836a8c4ed38491de62a712a153019a | 97898461a5079edb47cf479b4d2e92b5 | Enables notifications for the battery level characteristic. Note: this function will raise an exception
if notifications aren't possible | class BatteryClient(object):
def disable_notifications(self):
return self._batt_characteristic.unsubscribe() | 0 |
dd8f83e89dfd842ef97b8ad2bda9185a | 2c9fef0f226052cd32b6710547ec02f3 | Wrapper for the ``topup`` command. | login = request.get("login")
base_currency = request.get("base_currency", None)
amount = int(request.get("amount", 0))
return Wallets.top_up(login, base_currency, amount) | 1 |
33edafda4a60c9b128eb8431e9903e7e | d08231acaa641eaaa36a72a818997e69 | Metodo que permite buscar datos dentro de la tabla categorias de la base de datos | {
try
{
MySqlCommand sql = new MySqlCommand();
sql.CommandText = "SELECT * FROM categoria WHERE id=?id";
sql.Parameters.AddWithValue("?id", id);
DataTable dt = ConexionBD.EjecutarConsultaSelect(sql);
foreach ... | 1 |
5d69ce6120be7ba3d53a03ecf21ad414 | 0b772008ca5f2217bf42dd1c0417ee76 | Sets the values on the diagonal. | void PrMatrix6::setDiagonal( Float d0, Float d1, Float d2,
Float d3, Float d4, Float d5 )
{
m_buff[0][0] = d0;
m_buff[1][1] = d1;
m_buff[2][2] = d2;
m_buff[3][3] = d3;
m_buff[4][4] = d4;
m_buff[5][5] = d5;
} | 1 |
3699e1619ba80dcf8b868f98aa6aecb0 | e3e7153e4ebf464f02f126473af927b0 | 新好友列表切换按钮 | namespace projectQ
public class UIFriendList : UIViewBase
private void OnButtonFriendClick(GameObject go)
{
if (this.UIState != true)
{
this.UIState = true;
this.RefreshUI(true);
}
else
{
this.Refresh... | 1 |
ec82c5f7a83a3490cebbad8ae4f3e31a | 03c8cc1dd8f930eab2d7fbfb9b90e99b | https://open-platform.theguardian.com/documentation/search | @GET("svc/search/v2/articlesearch.json?sort=newest&" + API_KEY)
Observable<Search> getSearchWithoutDates(@Query("q") String query, @Query("fq") String filterQuery); | 1 |
0d57792902b276848f9d03a64366fbcb | 7b3e8b38ad7a52d1beeb1ba0f16c7237 | 执行一条phql语句 | boolean executeHql(String hql); | 0 |
e2fd31e3976bbec259e23c5c6f999c8c | bf791105babc0294d320a179b08624c1 | Prepare specifico per l'aggiornamento del MovimentiIva delle note. | @Component
@Scope(WebApplicationContext.SCOPE_REQUEST)
@PutModelInSession(AggiornaDocumentoSpesaBaseAction.FAMILY_NAME)
public class AggiornaDocumentoSpesaNotaCreditoAction extends AggiornaDocumentoSpesaBaseAction
private void aggiornaDatiPerNote() {
model.impostaTotaliNoteQuote();
model.calcoloImporti();
} | 0 |
3ea582a130235c6089c775ed97a6c905 | 1c33daacbeab35cbc0b2adf633761839 | Returns the number of params declared in core_calendar_provide_event_action's implementation. | public function acceptedArgs() : int; | 0 |
57aa3d0e736d4baca9679102bbf55f5d | 5eaba53a47c0522c66b02189da4ce9fd | 计算相机视线向量和上向量 | export class OrbitalCamera extends Camera3D
public getUpVector(): Vec3 {
let sphereNormal: Vec3 = this.getLookVector().negate();
let localAzimuth: number = this.azimuth - (Math.PI / 2);
let bisectNormal: Vec3 = new Vec3(
Math.cos(localAzimuth) * Math.sin(this.roll),
... | 1 |
746db28021b33300940d86c984bc8f64 | acc62ff8e218429a04f1c08d9b14b210 | 获取图片的元数据:名称+大小 | $info = getimagesize($imagePath);
$data['width'] = $info[0];
$data['height'] = $info[1];
$data['mime'] = $info['mime'];
return $data;
} | 0 |
8a57644afe57f4901543d5a0fa99fe51 | b9cf250dc231f2fe265fbfe1036e3e68 | returns whether the cursor is pointing to the beginning of a line. | namespace Script
bool IsStartOfLine(); | 1 |
c44be1bbccf36e788ba9e3066a837933 | 3f559558ed26a771803eb594a6f6a2c4 | This function returns the DBF type code of the indicated field. | {
int nFieldType = Schema.TYPE_NOFOUND;
switch(nFieldIndex) {
case 0:
nFieldType = Schema.TYPE_STRING;
break;
case 1:
nFieldType = Schema.TYPE_STRING;
break;
case 2:
nFieldType = Schema.TYPE_STRING;
break;
case 3:
nFieldType = Schema.TYPE_DATE;
break;
case 4:
nFie... | 1 |
e11bf2f013b0124d0dd9d5848da18752 | 5a82c91dd47c2e907470615f73f546cd | Each resource plugin is called to log free resource information. | {
CORE_VERIFY( NPA_SUCCESS ==
( npa_remove_resource_log_by_handle(
NPA_DEFAULT_LOG_NAME,
sleep_idle_plugin_resource_stub[0].handle ) ) );
} | 0 |
3d2d2e68b47ac7d7ae29c06313f1d7be | c165e9bec4299f7241362b964d8047e1 | Método que obtiene el objeto que se insertó por última vez. | public class ArbolBinarioOrdenado<T extends Comparable<T>>
extends ArbolBinario<T>
public VerticeArbolBinario<T> getUltimoVerticeAgregado() {
return ultimoAgregado;
} | 1 |
208e5896996581f5f8768a77469a8279 | 8c20de8f1c30704c985796caeb34c95d | Возвращает массив информации с реестра полученных НН которые НЕ совпали с ЕРПН
по параметрам по одному филиалу | {
$this->disconnect();
$this->connect();
$sql="CALL getDocReestrBy_AnalizInnOutInnerJoinBranch(:m,:y,:b)";
$smtp=$this->em->getConnection()->prepare($sql);
$smtp->bindValue("m",$month);
$smtp->bindValue("y",$year);
$smtp->bindValue("b",$numBranch);
$smtp->execute();
$arrayResult=$smtp->fetchAll();
... | 1 |
5f28ba2307fabfa7aca3ed2e2dcdec68 | 20fd7d193a7d7b5c1abba0f6dea67aa3 | Tests expected return date can be current date validation. | def test_validate_new_date_skip_deadline_validation():
cog, mock_bot, tournament, _ = init_mocks()
new_date = dateparser.parse(
"1 hour",
settings={"PREFER_DATES_FROM": "future", "TIMEZONE": "+00:00", "RETURN_AS_TIMEZONE_AWARE": True},
)
new_date = new_date.replace(minute=0)
result_d... | 0 |
b101fd311ceda79c675cdb59a1ba6427 | a8b18ab8253e2e41a3d7efe7241c0d94 | return a list of all admin_ids from "admins" table | class Users(db.Model):
def get_all_admin(self):
return db.session.query(Users).filter(Users.group_id == 0).all() | 0 |
52e6aa6d9c86184f78083e4a35e04ffb | b08f6dd7b5549ec10a167658d30abb38 | Updates the wifi sleep policy. | public class DownloadMgr
private static void setWifiPolicy() {
wifi_policy = Settings.System.getInt(mCtx.getContentResolver(),
"wifi_sleep_policy", Settings.System.WIFI_SLEEP_POLICY_DEFAULT);
Settings.System.putInt(mCtx.getContentResolver(), "wifi_sleep_policy",
Settings.System.WIFI_SLEEP_POLICY_NEVER);
} | 1 |
b6db9554e4c45e1f75d1e943431a7774 | 8d5fa7d7cb00eb1a4b45ef8766ef0c36 | Subscribes to the value of the member. | namespace ReactiveProperties
public static partial class PropertySource
public static IDisposable Subscribe<T>(this IPropertySource<T> source, Action<T> observer)
{
if (source == null) throw new ArgumentNullException("source");
if (observer == null) throw new ArgumentNullException("o... | 1 |
5de7e90b68a258efd1d511a06ca1c1db | 7d35469b7ffb89acfb91020e2e7d524b | @brief Set the destination port field in the header | class AbstractPacketBuilder(ABC):
def withDestPort(self,port: int):
self._dstPort = port
return self | 1 |
40a7fc645b6401f3699950bd8f0cce03 | ca79b1a0c80410aa8a479b4895245359 | 过圆外一点的切线 | int getTangents(Point p,Circle C,Vector* v){
Vector u=C.c-p;
double dist=Length(u);
if(dist<C.r) return 0;
else if(dcmp(dist-C.r)==0){
v[0]=Rotate(u,PI/2);return 1;
}else{
double ang=asin(C.r/dist);
v[0]=Rotate(u,-ang);
v[1]=Rotate(u,+ang);
return 2;
}
} | 1 |
966401d3e83f49e08d347a8dd7ff034f | 92cadc3d05c8e3735b13c7c5bf299113 | 得到各个公司的工时数,以字典的形式输出 | namespace GuapiGraph
class ModalImpl : DataModel
public Dictionary<string, int> getPositionCountInCompany(string company)
{
DataSet data = db.QueryCmd(@"select position from jobs where company like '%" + company + "%';");
DataTable table = data.Tables[0];
Dictionary<strin... | 0 |
e2b8da1d1f783b6862b0cced1d5720f4 | e58afbfa634eb49a3164ee38c899b12c | Apply trimming to single end fastq files | cmd1 = 'cat %s' % in_fastq
cmd2 = 'fastx_trimmer -o %s -f %s -l %s' % (out_fastq,
cfg.get('filtering', 'trim_start'),
cfg.get('filtering', 'trim_end'))
p1 = Popen([cmd1], stdout=PIPE, shell=True)
p2 = Popen([cmd2], stdin=p1.stdout, ... | 1 |
9b4db6b7335df010fb351ca8a4535460 | ca9d3172d330e110cd64427d71d7b251 | Взять элемент из вершины стека | {
if (!stack) { return WRONG_INPUT; }
if (stack_empty(stack)) { return ILLEGAL_OPT; }
if (!element) { return WRONG_INPUT; }
*element = stack->top->element;
return OK;
} | 1 |
9a17d53602ac0c1044a4e5d41d8fe129 | e61dfa89e7e820dca2dd5c2aaa88d8e7 | Determines if the captured image file should be saved with a timestamp | file_path = media.get_file_path()
metadata = media.get_metadata()
date_taken = metadata['date_taken']
base_name = metadata['base_name']
year_month_day_match = re.search(
'^(\d{4})-(\d{2})-(\d{2})_(\d{2})-(\d{2})-(\d{2})',
base_name
)
if(yea... | 0 |
d78f6b5e863aa9ad88ead8220dfb3828 | 6aa830554bb4f39a1475303cce1b4141 | This method sets an error message in the label | public class CreateAccountActivity extends AppCompatActivity
implements View.OnClickListener
private void setErrorMessage(String message) {
errorLabel.setText(message != null ? message:"");
} | 1 |
6fc9b789d13afef2072bc21e37a88c2b | e57f836a924915b21294d24cf54b7387 | Gets the amount the wheel has scrolled. | {
switch (wheelState)
{
case WheelState.GRIP: return Grip;
case WheelState.DRIFT: return Drift;
case WheelState.SLICK: return Slick;
default: return 0.0f;
}
} | 0 |
5313f6a79d6b30ed46d696332fdbc084 | 09dc3c4b7fb6f6fa8205e29126db7dbf | Updates list of favorite wines. | this.favoriteList = this.ngCartService.getStoredList('favoriteList');
if (this.favoriteList.includes(id)) {
if (!add) {
this.favoriteList.splice(this.favoriteList.indexOf(id), 1);
}
} else {
if (add) {
this.favoriteList.push(id);
}
}
this.ngCartService.setFavo... | 1 |
020cce9f99821c16bdf50b38462ee557 | d8d19ec681fac42220d9f5e62c694f77 | Resets weights to random values based on a normal distribution. | class ScaledEmbedding(nn.Embedding):
def reset_parameters(self):
self.weight.data.normal_(0, 1.0 / self.embedding_dim)
if self.padding_idx is not None:
self.weight.data[self.padding_idx].fill_(0) | 1 |
77fa98b0f74a2d16b996b3545304bb68 | fcbd548106d58b736e60be242c8392ae | Belirtilen parametreyi sorgudan siler. | public function removeParameter($name, $type = ParametersEnum::DEFAULT)
{
$this->parameters()
->where('name', '=', $name)
->where('type', '=', $type)
->delete();
} | 1 |
d676cb9605aa59429ad1b40d8d542fec | efb5d083de1405d8dee6ddffb5f6c7c0 | 拉取上次交款时间 | @Entity
@Table(name = "T_SUPPLIER_SIGN_RUN")
// 默认的缓存策略.
// @Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public class SupplierSignRun extends IdEntity
@Transient
public String getLastPaymentDate() {
return lastPaymentDate;
} | 1 |
24aa9b28e832829522e8828ac8d98922 | 976040365d5cef69324048fd6fe21742 | 返回农历y年m月的天数 | namespace arklight
namespace datetime
static int MonthDays(const int y, const int m)
{
if ((lunarInfo[y - 1900] & (0x10000 >> m)) == 0)
return 29;
else
return 30;
} | 1 |
7f63c6f949b28b16507cc0583c8cbe80 | c8851763f3a444d831214d093ef4fba4 | 接收易联支付插件的广播回调 | if (obj instanceof VipCardResponseBean) {
VipCardResponseBean vcrb = (VipCardResponseBean) obj;
String retflag = vcrb.getRetflag();
String retmsg = vcrb.getRetmsg();
if ("1".equals(retflag)) {
mTvMessage.setVisibility(View.VISIBLE);
... | 0 |
21d0b20523a0bb50601f15bed98a7302 | 186deef4a882eaa9e1cc9d12be853ef0 | ROYAL FLUSH | public class Hand{
private int royalFlush(){
int target =0;
if (hand[0].rank() == 1 && hand[1].rank() == 10 && hand[2].rank() == 11 && hand[3].rank() == 12 && hand[4].rank() == 13){
for(int i =0; i<hand.length-2;i++){
if(hand[i].getSuit() == hand[i+1].getSuit()){
... | 1 |
ff4d2c8a5056696fb5ad1a3702caded9 | cda4aca09bc7486481bc570f5d724eb3 | Gets the maximum descent (the height below the baseline) for the current font/size; note that this will be <= 0.
This is recomputed when the BaseFont or font size values are changed. | public float getMaxDescent(); | 1 |
7217dbf583745507c6cda7c540542231 | 73874a54219af242a8a1f828fa8d30d5 | 得到数据表Account_group满足查询条件的记录数 | func GetGroupCount(where string) (r map[string]string, err error) {
if len(where) > 0{
sql = fmt.Sprintf("SELECT COUNT(1) AS c FROM %s WHERE %s",GROUP_TABLE,where)
}else{
sql = fmt.Sprintf("SELECT COUNT(1) AS c FROM %s",GROUP_TABLE)
}
return db.GetRow(sql)
} | 1 |
2a0a36f8ad49508a60aa17fbd1b1a122 | 149f56d553ef867978265e33cabbd053 | @brief execute script function with given parameter. | {
cef_v8value_t *p = luacef_touserdata(L, 1);
cef_v8context_t *ctx = luacef_checkudata(L, 2, __v8context__);
cef_v8value_t *o = luacef_checkudata(L, 3, __v8value__);
int c = lua_tointeger(L, 4);
cef_v8value_t *a = luacef_checkudata(L, 5, __v8value__);
cef_v8value_t *r = p->execute_function_with_context(p, ctx, o,... | 1 |
9c72debb3d0bcd51c71cd2ea5704b6fd | 7b839cba0a6c7e555b43a49edee028ac | Test when the parser is not available. | class FFProbeMetadataParserTestCase(TestCase):
def test_not_available(self, mocked_run):
mocked_run.side_effect = FileNotFoundError()
result = FFProbeMetadataParser.is_available()
self.assertFalse(result) | 1 |
39553d3238f4b7b9a3777cfeca5cf245 | 3aa7308c0ca60c154d7425123caedb02 | Disables the ability to move items up and down. | namespace Zentity.Web.UI.ToolKit
[Designer(typeof(AssociationDesigner))]
public abstract class Association : ZentityBase
protected void DisableDestinationItemsSequencing()
{
MoveUpButton.Visible = false;
MoveDownButton.Visible = false;
} | 1 |
bea95096d7435662442348f079e67bdb | 314c81dbbf1adccee6e3142a700466e8 | 设置:医疗机构代码 | public class DeAccessionDBResponseEntity
public void setInstitutionCode(String institutionCode) {
this.institutionCode = institutionCode;
} | 1 |
71321dc8005e818d90fdb07f2be19eda | 918c2df2aa28e796fef0b4a8a706df68 | retorna uma lista com a soma parcial da lista passada por parâmetros | def sums(lst):
s = 0
sums = []
for item in lst:
s += item
sums.append(s)
return sums | 1 |
b4a864ee0dfbbf39250d05cea5b98e7d | c0db6dd4c913590030f5fe051de8c92d | <b>[Bullet] BulletDamageUpgrade</b><br>
Amount of extra damage each bullet level will cause.<br>
<b>NOTE:</b> This damage is * 1000 compared to the actual arena settings. I.e. if the setting is 5, this value will be 5000. | float getDamageMultiplier(); | 0 |
89e27a3244fc40bce0912a95d7c9cef8 | cab8dbdb0ec8cea121bbbde661e32071 | Devuelve una copia del mapa con las parejas de palabras/frecuencias acumuladas | Map<Integer, List<String>> countToWorldList = new HashMap<>();
for(Map.Entry<String,Integer> e : wordToCount.entrySet()){
String word = e.getKey();
int count = e.getValue();
List<String> worldList = countToWorldList.get(count);
if(worldList == null){
... | 0 |
15ac1df27c04ea57668a30cac4f40c80 | a394c4a41a0206e051c3722e580fe6f1 | Adds the in memory OIDC provider store. | namespace Microsoft.Extensions.DependencyInjection
public static class IdentityServerBuilderOidcExtensions
public static IIdentityServerBuilder AddInMemoryOidcProviders(this IIdentityServerBuilder builder, IEnumerable<OidcProvider> providers)
{
builder.Services.AddSingleton(providers);
... | 1 |
a883e4554495c3265f05c400bc212ff7 | 9774cedfe96d906d7c3a25aeff681e36 | Gets the default input of the charge input from every game pad. | const char *config_get_default_input(void)
{
enum input_driver_enum default_driver = INPUT_DEFAULT_DRIVER;
switch (default_driver)
{
case INPUT_ANDROID:
return "android";
case INPUT_PS3:
return "ps3";
case INPUT_PSP:
#ifdef VITA
return "vita";
#else
return ... | 0 |
98903825955e252440632d2adf57384d | b0904cd1e3ffd0f53ae38713e91b7aaf | Order 테이블에서 모든 행 반환 | @Service
public class PosTableServiceImple implements PosTableService{
@Override
public List<DataMap> selectOrderList() throws Exception {
return PosTableMapper.selectOrderList();
} | 1 |
a0103a11119793548ba40738f8959bcd | b9b858fb6de8a24471ea9dce9d260892 | POS의 메뉴 추가/감소/취소 기능을 하는 클래스입니다. | Point pos1 = {12, 4};
Point pos2 = {20, 30};
pos1.movePos(-7, 10);
pos1.showPosition();
pos1.addPoint(pos2);
pos1.showPosition();
return 0;
} | 0 |
4344b99bf292a1c40172b18090caf300 | 2b09317753633f9afda234262227046b | https://stackoverflow.com/a/43690506 | async function buffer(readable: Readable) {
const chunks = [];
for await (const chunk of readable) {
chunks.push(typeof chunk === "string" ? Buffer.from(chunk) : chunk);
}
return Buffer.concat(chunks);
} | 1 |
c4092c2013ad5c9d6dc73e25c49b65bf | 52af200fe05d4d1abdb7bfd08ae9b858 | función que trae los registros de un detalle de mantenimiento | {
if (_detalle_reparos == null) _detalle_reparos = new dbMantenimiento2Biz.detalle_reparoCollection();
((IList)_detalle_reparos).Clear();
DataRow[] cr = row.GetChildRows("idusuariodetalle_reparo");
foreach( DataRow chld in cr)
{
dbMantenimiento2Biz.detalle_reparo obj = new dbMantenimiento2Biz.detal... | 1 |
f2dbd461d484a15a2db02076f8b1c135 | 877bda069fd04ea9c0251612bd9d9275 | Get processes concurrency, default 5 | class Example
static get concurrency () {
return 1
} | 0 |
cf1c358eeee6ad7753b67edf56c58d6a | 4f593a2d8f8951ddd1b42970013d13f8 | Gets the flag indicating if this editor pane supports any of the VSStd97
commands. | {
IVsMonitorSelection selectionMonitor = site.GetService(typeof(IVsMonitorSelection)) as IVsMonitorSelection;
uint cookie = 0;
int active = 0;
Guid designContext = VSConstants.UICONTEXT_DesignMode;
ErrorHandler.ThrowOnFailure(selectionMonitor.GetCmdUIC... | 0 |
cfab6bf3c8722e3bd99235799f0b8776 | b4e44628a311da8ae1a1a0f9559f36bd | Constrains the search to only the list of content IDs provided | public class RelatedContentRequest public static class Builder
public Builder forContent(String contentId) {
this.contentId = contentId;
return this;
} | 0 |
4343fcc206d1e6de2b08ebe4601cace6 | fac87860e145c45502a120c8731dbc72 | Initialize a wiki page generator. | class WikiPageGenerator(object):
def __init__(self, data_directory, template_directory):
super(WikiPageGenerator, self).__init__()
self._data_directory = data_directory
self._template_directory = template_directory | 1 |
17ae94206d5faf95f98297ffd1a93f92 | 450501b2bb457d93d2c54a5b5bd71e4a | retorna o vetor que contem as ordens de serviço | @ApiOperation(value="Retorna uma lista de ordens de serviço")
@Override
public List<OrdemServico> listarOrdensServico(){
return ordemServicoRepository.findAll();
} | 1 |
d1191fd2a4648b213c6e2272af795d8d | 8eaa08b94453f4685aad55f1459ebcd1 | Render eigenwaarde line chart | function render_bubbleActiviteit() {
var plotBubble = hgiBubble().mapping(['plezier','activiteit']).weightMapping('frequency').xDomain([0,100]).orderBubbles(true).yAxis(false).xLabel('Plezierigheid activiteit');
d3.select('#bubbleActiviteit').datum(data_plezierigheid_activiteit).call(plotBubble);
} | 0 |
eb0fb0c9543ceb9816f108e5c53afc86 | f8e2ee50d0f94f94a3b3b1e3898e205e | 父类方法 | this.name = name;
this.age = age;
this.colors = ['red', 'green']
console.log('parent')
} | 0 |
3171902dde22eb11725e8303b2473a15 | 71014c716ad0ac33b92623987827ba2c | Add the center file HTML | def center():
with open('templates/center.html', 'r') as file:
content = file.read()
return content | 0 |
685b39f33555bf81e025278518badc32 | 5c9ec96d2df933a570e31c144212e009 | Add an automation tool to the project | const tools = this.tools$.getValue();
if (!tool || !tools) {
return;
}
const oldWorkflow = tools.find((x) => x.id === tool.id);
if (oldWorkflow) {
const index = tools.indexOf(oldWorkflow);
tools[index] = tool;
} else {
tools.push(tool);
}
this.setTools(tools);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.