query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
b9055e815710bb9ff10726792c8f4732 | df9fdf67909324978ea0ed8c6a87ac6e | This instruction can be used from within a finally block to resume the exception
handling process. It is the only valid way of leaving a finally block. | void resumeNext(CALL_DATA ¶ms)
{
if (params.params != 0)
{
throw CError(_T("ResumeNext() requires zero parameters."));
}
params.prg->resumeFromErrorHandler();
} | 1 |
147f26289ce88d5cfc4c87a58dbda374 | 6b8641fd7980dcd2cf1318539859f178 | 切割含有“-”的条形码,获得具体的条形码和数量 | arr.sort();
var brr = [];
var sum = 1;
var crr = [];
var drr = [];
var list = [];
var oldlist = [];
for(var i = 0;i<arr.length;i++){
if(arr[i].indexOf('-')>0){
var crr = arr[i].split("-");
brr.push({barcode:crr[0],count:Number(crr[1])});
... | 1 |
7923be051bb06c80fd05c127a3dd429b | 022cfe3b1d4cde4bbc080ca8c5be37c5 | 同步更新化验单结果,已经有结果的则不更新 | {
bool result = false;
if (item == null || item.CheckID <= 0)
{
return false;
}
string CurSQL = string.Format(@"update X_CheckRecord set
ProID={0},CheckResult1='{1}' where CheckID={2} select 1",
item.ProID,item.... | 0 |
c06bc3cd652209d1d8dadeb6466c8571 | 146ed630b2194de280ea481a0220483e | Возвращает переписку двух пользователей | EntityManager entityManager = JpaConfig.getEntityManagerFactory().createEntityManager();
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
CriteriaQuery<Message> query = criteriaBuilder.createQuery(Message.class);
Root<Message> root = query.from(Message.class);
query.select(root)
.grou... | 1 |
3c314d6aae7bc3bc1599c56af795291f | 96af094e1005bee50b0e74ecf27927fb | Returns a DataFrame from the .csv file at which the URL provided as a parameter points, properly parsing it. Meant to be invoked by get_<resource_name> functions. | class Manager:
def __run_parsexml(self , xml_url):
parsexml = ParseXML(xml_url)
parsexml.run()
return parsexml.get_parsed_xml_df() | 0 |
e0c744bb8f205cc18b1ff8fac67613d2 | 1d5ed9ac2a1bc58acc0dbc6191c54cdc | 事件:鼠标进入步时间输入框时,切换焦点;
注意:用MouseEnter事件,而非MouseHover事件;这样才会无延时响应 | namespace NCM
public partial class FrequencyRangeDisplay : Form
private void FormFDM_MouseEnter(object sender, EventArgs e)
{
this.Focus();
} | 1 |
1b34d9c92d10e8c5874df027f745e10b | 14244d00c2f32365f7048bc0dfb48630 | Stops page execution gracefully, meaning any currently-running code will continue, but further controllers or
middleware will not be executed. | public function die(): void; | 0 |
e5be96f2fea8c559b5be12b7ea88aeba | 802ced63921ac4384100d95af3cc40bd | Retrieve the total number of completed runs. | Integer getLastRunCompletionCount(); | 1 |
313efa05ce8897804818187c08a6ef57 | f49f15af263ebfb7ba2dc781159cbf45 | Get the aiming animation for hip fire aiming | public func GetProneAimingAnimation()
{
return this.prone_anim_aim;
} | 0 |
2519b6dd0e05792c46a7d0061c176d74 | 1e4c177c7b159252b15ccb5a8d37001c | Called when start sending a stream. | void StreamingWidget::streamStart() {
Q_ASSERT(!isStarted);
isStarted = true;
} | 1 |
f04b1f046688bd4a9941b6b25522d77e | a06135337a89b445606960b79a8846f1 | Replace the info transforms with the supplied source transforms. | public class StandardGlyphVector extends GlyphVector
public void setGlyphTransforms(AffineTransform[] srcTransforms) {
setGlyphTransforms(srcTransforms, 0, 0, glyphs.length);
} | 1 |
ad3023794d0703c58029b3a365f656b5 | 71dabe7e8544c6e660a1279b1d9ee084 | Test updating an meal that does not exist | def test_edit_food_item_not_existing(client):
with app.app_context():
admin_token = admin_token_creator()
response = client.put(
'/api/v2/menu/100', data=json.dumps(mock_up_food[4]),
content_type='application/json',
headers={'Authorization': 'Bearer ' + admin_toke... | 1 |
19558448d18ba2f6e7be3738b2080d7f | b8225e46f8dfb85505e33b05dbb8bb02 | 删除进货界面某一类所有的商品,以便刷新新的类型 | def alldelete_goods(goods):
driver.find_element_by_xpath('//*[@id="searchbox"]').send_keys(goods)
driver.find_element_by_xpath('//*[@id="btnSearch"]').click()
time.sleep(2)
driver.find_element_by_xpath('//*[@id="table"]/thead/tr/th[1]/div[1]/input').click()
driver.find_element_by_xpath('//*[@id="... | 1 |
34206be9474506c62d46afaca6d14d63 | bb782e4a57feda0de8fc3d9bff848043 | 模糊查询企业信息 | class CompanyController extends CommonController
public function queryCompanyList(){
try {
$this->ajax_check_session();
$where['name'] = ['LIKE',"%".$_POST['name']."%"];
$company_data = (new CompanyModel())->getCompanyDataBywhere($where);
if(empty($company_data))... | 1 |
78e4a9adc9f68a48028d5f4ae9d35fa3 | 7142389091fa775b3552303028e7c764 | Creates a new active-facility relation | namespace FactWeb.Repository
public class FacilitySiteRepository : BaseRepository<FacilitySite>, IFacilitySiteRepository
public bool AddRelation(int siteId, int facilityId, string currentUser)
{
FacilitySite facilitySite = new FacilitySite();
facilitySite.SiteId = siteId;
... | 1 |
8480cdb4aba2e0da6841165c2b18b279 | a9bc8461d2ca38feb5d88c0546374f94 | 回放对象是否有完全权限 | public boolean hasFullAuthory(); | 1 |
e0f1a2a742510882534a0a9a7fa9f0df | fc1c351ad4ad208c93c2776ce02a77d5 | 通过公司ID查询相关集服人员 | public String queryMember(int companyid) {
String list = reportDao.queryMember(companyid);
return list;
} | 1 |
ce31759a35b7d1f9757d41b4ac427f9c | 230be137f6e7fe8bb4f717291d1af6d1 | Asynchronous version of ExecuteQueryFirst.
Executes DB query and returns first row of a result. | namespace FluentSQL.Core
public sealed class FluentSqlBuilder : IFluentSql, IFluentSqlSelectStatement, IFluentSqlSelectDistinctStatement, IFluentSqlSelectTopStatement, IFluentSqlSelectFromStatement, IFluentSqlSelectFromWithNoLockStatement, IFluentSqlSelectWhereStatement, IFluentSqlSelectOrderByStatement, IFluentSql... | 1 |
e1adc70c26e0f60c4dd15b8273a689ce | d1e34d22010180a7846aa8caa70e693b | Remove the top-most thing. | class ContextMenu extends Control
pop() {
const keys = Object.keys(this.Internal.items);
this.Html.removeMenuEntry(keys[keys.length - 1]);
} | 1 |
74c4a26a0373f8101bc431703cd8d4fa | 1aec14f90372188cddaeb0373f1a01e4 | Returns fourth row of matrix. | out[0] = mat[12];
out[1] = mat[13];
out[2] = mat[14];
return out;
} | 0 |
cbc7b6bd4fb6f92eea98e27cb40a0f50 | 0020edbcc8d8f862df6c44ef9bb5832f | Compute the MDL of this clustering according to [RAB2009, eq. 4] | _, w, _ = np.linalg.svd(C)[::-1]
w = np.abs(w[p:])
n = C.shape[0]
MDL = - m * (n-p) * np.log(gmean(w) / np.mean(w)) + 0.5*p*(2*n-p)*np.log(m)
return MDL | 1 |
f6e730f54cafccbce6542b02e5c99340 | ea2781797e378f4e171506da1fb030fb | Returns the meta object for the attribute '{@link de.hub.emfcompress.SettingDelta#getFeatureID <em>Feature ID</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EAttribute getServiceFeature_Id(); | 0 |
0bcadd4e4fb305009eb51aa27b7ec2ba | 6b9e535938c9cd6b8d6b07a4bd874e73 | Funkcja do algorytmu a* | namespace Tucil3Code
class AStar
public static List<string> AStarAlgorithm(Node start, Node goal)
{
List<Node> toCalculate = new List<Node>();
List<Node> calculated = new List<Node>();
List<string> result = new List<string>();
Node first = new Node(start);
... | 1 |
267c9a7f1c680deaef49d8e02962f8d6 | 687cca490f9c959e7ec0395a78856be2 | Récupère l'id des groupes temporaire ayant postulé sur un projet donné | namespace AngularJS_CS.Models
HashSet<int> GetIdsDestinataires(QuestionViewModel m); | 0 |
a42b1bf1fea8384069c5f3784494ded7 | cfcca4b5dd4959c6695ee673e434ceaa | 函数每调用一次INDEX加1一次 | function addIndex() {
if (currentIndex < video.length - 1) {
currentIndex++
} else {
currentIndex = 0
}
} | 1 |
707e7878aa51660e98d18d0efab86b28 | 65970ad9a0809006974de84b78e9271e | Add query flag value. | void addQueryField(); | 0 |
45a3e91f8408114d9003330283994032 | 1297043ad9890f9c06a6c106e879fb88 | 查询个人某月中运动的天数list | public class MeasureSpo2InfoUtils
public List<MeasureSpo2Info> queryToDayLastDateList(String user_id, ArrayList<String> week_list) {
List<MeasureSpo2Info> health_list = new ArrayList<>();
for (int i = 0; i < week_list.size(); i++) {
MeasureSpo2Info mMeasureSpo2Info = MyQueryToDate(user_id, w... | 0 |
747ad45ce81ad25a4a3f09cfedbd6e23 | 5581aa3b4505e6490742e2f3ff576c2c | Finds all occurances of course codes in the given text. | class Course:
def find_clos(self, search: str) -> List[Clo]:
matching = [clo for clo in self.clos if clo.matches(search)]
return matching | 0 |
5ceb70a0582ee72b1a3dea0518562206 | 057159726dcc23e6e6dc7635a85aefd6 | If path is not given, the object will not be persisted.
This allows code to transparently deal with both persisted and
non-persisted objects, since the persist method will just end up
doing nothing. | export class JsonFilePersister<T> implements ILoader<T>, ISaver<T>, IConfigurable
public constructor(path?: string) {
this._path = path;
} | 1 |
2fe047a0233ee9264f5fd6196d5fcd1a | ba4a4be839ce8a512ae4b5d87f9f76b0 | Allows derived API's to handle custom/dynamic URL's where the strMethod does not
map directly to a function in the target API. Insted this method can be overriden to
parse the incoming URL and route to a different/generic method handler, adding parameter
values if necessary. E.g. get/myasset could be rerouted to get/... | public function customAPICall($method, $params = []); | 1 |
4cf4dc0600f6032571094b875684a4f2 | 695b78d8b436b05cb4b3ef402ebaab47 | This hook allows you to easily detect when an element is visible on the screen as well as specify
how much of the element should be visible before being considered on screen. Perfect for lazy
loading images or triggering animations when the user has scrolled down to a particular section. | threshold = threshold || 0;
mode = mode || 'visible';
var rect = elm.getBoundingClientRect();
var viewHeight = Math.max(document.documentElement.clientHeight, window.innerHeight);
var above = rect.bottom - threshold < 0;
var below = rect.top - viewHeight + threshold >= 0;
return mode === 'above' ? above :... | 1 |
f82bfda2a1a3587ec9f2f7dd8ef7e55f | 46ffc3908b6dcb4c7c23c0dd7e7b6bb9 | control kinect dock widget | self.connected_value.setText(str(settings.globalDict['connection']))
self.IP_value.setText(str(settings.globalDict['ip']))
M = settings.controller.getMotors()
if(M!= None):
self.top_left_dial.setValue(M["M2"])
self.top_right_dial.setValue(M["M4"])
self... | 0 |
12718362bbc39c171f6b613e44bc4dcb | dc795f299f858e208f14b6ebccdc2ee9 | Gets a base select with joins. | {
$foreign = $metadata->getAdapter()->getConstraints('foreign');
$columnMap = $metadata->getAdapter()->getColumnMap();
$dataSources = $metadata->getAdapter()->getTargets();
$from = array_shift($dataSources);
$select = $this->sql->select();
$select->from(array('t0' => ... | 1 |
13002b325a554272e276ae18ef611226 | 022cda42e2783daf0775941305f22770 | Reads a wav file and splits channels into two numpy arrays. | def read_wav(name):
return wavfile.read(name) | 0 |
3f448a5abf59f25831823082c20c0c26 | 36557e4e2852d0f353ade306f35c3169 | Skapar databasen om den inte redan finns | def createDB(initial):
dbExists = os.path.exists(DBFILENAME)
with sqlite3.connect(DBFILENAME) as conn:
if not dbExists:
print('Initiiere DB')
conn.executescript(DBSCHEMA)
initialFill(initial)
else:
print('DB existiert')
return | 1 |
b1f7479b9ff984f95374441c9fba8426 | 3bea31fc4d19c366c8fd3cfcd936fa0a | Permet de calculer le nombre de point disponible dynamiquement | int a = (int) (c.pointDispo() - ((int) forceSpinner.getValue()) - ((int) dexteriteSpinner.getValue()) -
((int) concentrationSpinner.getValue()) - ((int) intelligenceSpinner.getValue()));
return a;
} | 1 |
a9a280f800b0f8fd86a76cc3da626c68 | 6c508e82cd32b3b63186e8ce97add53e | 获取 微信消息日志记录路径 | String filePath = fileSystemPath.getFileSystemUrlRoot() + "/" + weichat;
return filePath;
} | 1 |
6d0fa41a952aee795c9c12b6d25a23db | 0a127059d330cf7ec0fc39353841c98b | Restores values after orientation changes | class NXRefine:
def restore_orientation_matrix(self):
self.Umat = self.init_p | 1 |
cd11023bc1467c74bb6e089e7c1c8760 | dd2061ab292b16b9beb328c436e2f3e5 | 上移一个配置字段 | class AdmconfigController extends Controller
public function actionUp($id='')
{
if (Yii::$app->user->identity->username <> 'admin') throw new HttpException(403);
if ($id == "") throw new HttpException(400);
$prev_id = Config::find()
->where('id < '.$id)
->ord... | 1 |
2a40bec7a35815030edc0f6b747a64f9 | 56b8975f3cab10305b463d8ed138221f | Find the C Challenge URL. | def challenge():
return request.args.get('challenge') | 0 |
0ce51303e7b10aab5acea35e80569647 | 02784aa63cd73407983d8b5beb06643e | checks if func1 can override func2 | if (!str_equal(func1->name, func2->name)
|| (func1->paramList == NULL && func2->paramList != NULL)
|| (func1->paramList != NULL && func2->paramList == NULL)) {
return false;
}
if (func1->paramList != NULL)
return is_equal_paramlist(func1->paramList, func2->paramList);
re... | 1 |
417c575ae24b787d4deef40e52b5a924 | 389dddf6710709c3bf2dede938ef5fc0 | Get a collection of all integrations in this guild. | request_info = self.to_get_request_information(
request_configuration
)
from ...models.o_data_errors.o_data_error import ODataError
error_mapping: Dict[str, ParsableFactory] = {
"4XX": ODataError,
"5XX": ODataError,
}
if not self.reques... | 1 |
ef4726efc820e3020a789f546588e54c | ad8a8e20ee17c028c23eda02fa0f492d | Publish new tracer location to Pushlet framework. | class Holotrace(Tracer):
def push(self):
LOG.debug(f"{self} pushes {len(self.traces):d} traces.")
if self.traces:
df = self.frame(self.idxs, self.traces, offset=self.offset)
self.offset += len(self.traces) * self.skip
self.traces = []
self.buffer.send(df)
... | 0 |
e15d0b49e98005c9d4433852b50e914d | 0903d97c0560d326c1d9947e36618c4b | The diskette interrupt service routine. Mark the Seek Status to say
the interrupt has occurred and terminate the interrupt. | static uint8_t _diskette_reset(struct callregs *regs)
{
return _set_diskette_status(INT13_STATUS_NO_ERROR);
} | 0 |
2e314491083a10a6e42512e2c8fd9e7f | fefb39d94244234662d1f938f93a6edb | 上传导师照片 | {
$photo = trim(I('post.photo'));
$courseId = trim(I('post.courseId'));
if ($photo) {
$img = base64_decode($photo);
$baseUrl = './Uploads/CoachApp';
if (!file_exists($baseUrl)) {
@mkdir($baseUrl);
@chmod($baseUrl, 0777);
... | 1 |
76ee84640aeeaa53c0faf5e04d4c71aa | 3a528abd9fa50ac4fe2686588568eeb0 | Starts the flap animation. | angle = findAngleFromObject(latch);
if (!clockwise)
angle += Mathf.PI * 0.5f;
else
angle -= Mathf.PI * 0.5f;
angle = normalizeAngle(angle);
velocity.x = Mathf.Cos(angle);
velocity.y = Mathf.Sin(angle);
velocity = velocity.normalized * speed * 0.02f;
latch = null;
radius = float.MaxValue;
stage... | 0 |
1a68e0ba8ed590cb56b0cb700f003c65 | 731f8251fd9acffde1175acf6ad3fca2 | Assert not valid if parties are ommited. | TEST_UTILS.register_user(client, 'admin')
login_res = TEST_UTILS.login_user(client, 'admin')
headers = {
'Authorization': 'Bearer {0}'.format(login_res.get_json()['data'][0]['auth_token'])
}
response = client.post('api/v1/parties', headers=headers)
json_data = response.get_json()
ass... | 1 |
9d77d088351e51d009ca9e47781444fa | 86de8e6b72ffaec5ce7ece64ee65bf15 | NUP点向上した生徒を対象に印刷を行う関数
各教科ごとにNUP点向上した生徒を印刷を行う | {
IPrintKensaNippoBLOutput output = new PrintKensaNippoBLOutput();
Microsoft.Office.Interop.Excel.Application application = null;
Worksheet outputSheet = null;
try
{
application = book.Application;
application.DisplayAle... | 0 |
79b7ff7833977da98f4b1158b5efee00 | 77402df0816ed00ba2a2fb2f652b9a11 | Add Certification content to the certification | public class ScrapeItem
public void addCertification(final String cert) {
certs.add(cert);
} | 1 |
13f590cb02df359e7b8fd01dd0f946e0 | d2c7ec57395e972f0e449dc379250fc6 | Este método devuelve el correo de la unal | class Estudiantes extends \solicitudMonitoria\EstudianteBundle\Entity\Estudiantes implements \Doctrine\ORM\Proxy\Proxy
public function getCorreo()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getCorreo', array());
return parent::getCorreo();
} | 1 |
b70d3b75a034b3238f8e309072dd82ba | 12f7c10c6f0de35d7b128dd2b691ea10 | Rotate a range, subset of pages in a PDF document Rotate a range of specific pages in a PDF document by a multiple of 90 degrees | {
Filter filter = Filter.e_all;
PDFNetException.REX(PDFNetPINVOKE.TRN_PageSetAddRange(mp_imp, range_start, range_end, filter));
} | 0 |
3c432282c635648d612c77741d1e1cbf | 7a02740f0fa30e2d2411b2121cb16336 | Extract all images with width and height more than 200px | return db.query(dbo, "SELECT Name, Path FROM dbfs WHERE " \
"(LOWER(Name) Like '%.jpg' OR LOWER(Name) Like '%.png' OR LOWER(Name) Like '%.gif') " \
"AND Path Like '/report%' ORDER BY Path, Name") | 0 |
58e54a26e3cb2ffb10180372b01a98c8 | 2a0ac7d93ca17cbdaa95c75cb5591798 | Set the type of the sensor value such as lux or Seconds. | void PerceptionNeuronSensorData::setDataType(DataTypeEnum dataTypeEnum)
{
this->dataType = dataTypeEnum;
} | 1 |
a9e9b04bc09f7c1c63946fdc0c11e205 | 74d4cbed2b0200c7a5ce6fa3b4465fa9 | \brief This API gets the SoC specific EDMA3 info | {
unsigned int intState = 0u;
volatile EDMA3_CCRL_Regs *ptrEdmaccRegs = NULL;
volatile EDMA3_CCRL_ShadowRegs *ptrEdmaShadowRegs = NULL;
unsigned int phyCtrllerInstId;
unsigned int regionId;
const EDMA3_RM_InstanceInitConfig *rmInstInitConfig = pRMInstance->initParam.rmInstInit... | 0 |
7b2e8850e1960870db3a0af84915da56 | 1b38195b950643cd744f34bdb32cd72b | Checks the Content-Type header for url encoded types. | if request.content_type == "application/json":
return True
exceptions = CONTENT_TYPE_SPECIAL_CASES.get(request.content_type)
if exceptions:
for text in exceptions:
if text in request.path:
return True
return False | 0 |
c7464fae8bf985b322739c2a3dea1d30 | cdd6d53b167b8735edf10522f03c2853 | Compute the expected size of the file. | if self.blob.uncompressed_size:
return self.blob.uncompressed_size
return (self.layer_info.compressed_size or 0) * estimate_multiplier | 1 |
89529a1ed7259a53af28654fe4a5f43c | aa30f917abf58c02089516e162e3447b | 数列aと整数Aを与えると、aからいくつか取って合計Aにするパターンが何通りあるかを返す関数 | unsigned long long cur_count = 0;
for (int i = 0; i < n; ++i) {
if (((b >> i) & 1) == 1) {
if (i != 0) {
cur_count += ((1 << i) - (a >> (n - i)) - 1);
}
if ((i != 0) && (((a >> (n - i - 1)) & 1) == 0)) {
cur_count += ((reverse_num((a >> (n - i)), i) < (b & ((1 << i) - 1))) ? 1 ... | 0 |
07ee10a55d11995c2601b0d488c81656 | 9676566a7d1b6986b725fbae6ab1c2bc | r"""actual_parameter_list : actual_parameter
| actual_parameter_list parameter_delimiter actual_parameter | if len(p) == 2:
p[0] = ast.ParamList([p[1]])
else:
p[1].params.append(p[3])
p[0] = p[1] | 1 |
478204697b9483d594210b44d3985a67 | d3fe7cfa7a405aa2ec7bc36596519639 | Configures the SNS write configuration. | Action<SqsWriteConfigurationBuilder> configure)
{
if (configure == null)
{
throw new ArgumentNullException(nameof(configure));
}
var builder = new SqsWriteConfigurationBuilder();
configure(builder);
ConfigureWrites = builder.Configure;
retu... | 0 |
a1b5a928bcb06ebcb3181794c8ff21d2 | 495f14596e7c0d9c9a95ef29d83d0e23 | Create an instance of {@link SaveReservaResponse } | @XmlRegistry
public class ObjectFactory
public SalvaFormaPagamentoResponse createSalvaFormaPagamentoResponse() {
return new SalvaFormaPagamentoResponse();
} | 0 |
dcedbb69bd3815cedf1fbc3145a8b7c8 | 7f61448ad6da3ef0f9cb03f40c5be655 | ### Read ### | cases like (1) | 0 |
e30f27323fdb98dd92f3f98fb517928c | 38fd7cf4c3071475830efad2c9df5f0b | 读取jar中的模板 | public class ClassPathResourceReader
public static String readJarFile(String path) {
String content;
try {
ClassPathResource resource = new ClassPathResource(path);
BufferedReader reader = new BufferedReader(new InputStreamReader(resource.getInputStream()));
content =... | 1 |
6be53e9c265b29c0409ee481a7049fe4 | 1950f97c1750e2278cd21e9e2f78a287 | Gets datetime formated based on logged in users preference | class Commonfacade
public static function getUserDateFormat($userId){
$dateFormat = '';
$userPref = \app\models\Userpreferences::find()->select(['DateFormatId'])->where(['UserId'=>$userId])->one();
if(!empty($userPref->DateFormatId)){
$dateFormat = $userPref->dateFormat->Value;
... | 1 |
3642deb2bf129dba2618e3ef128503e3 | 066cc7b20ee99b475ab0855ee73db1fe | Performs scrapping and updates details of article objects | r = requests.get(link)
soup = BeautifulSoup(r.text.encode('utf8'))
date_published = soup.findAll('span', {'itemprop':'datePublished'})[0].text.encode('utf8')
article_name = soup.findAll('h2')[0].text.encode('utf8')
article_content = soup.findAll('div',{"class":"article-content"})[1].text.encode('utf8')
retu... | 1 |
ecc75166f578155a78bf2804f3e7564e | c16ffe8848896bc7bd1e7a2330451ed6 | Get all defined prototype names. | const QStringList FSMDefinitionBase::getDefinitionNames( void )
{
return getPrototypes().keys();
} | 1 |
3712651601c89ee5a003a0a0a0bdc8ea | f71de6a7e546564b2a170d3591ab2416 | Test division of double numbers. | public void testDiv() {
Complex c1 = new Complex(0, 1);
Complex c2 = new Complex(2, 2);
Complex c3 = new Complex(-4, 0);
assertEquals("(0.25 + 0.25i)", c1.div(c2).toString());
assertEquals("(0.0 + 4.0i)", c3.div(c1).toString());
} | 0 |
6b091e3dd91027edc9b9d8bb2239e0c7 | aa343bec802869b65acb6dbca85bab15 | Get Containers By TO | vm.samplesByContainer = [];
var delegate = service.getContainerByTo({ tOId: vm.getSampleResultsCriteria.TOId, fgBatchId: vm.getSampleResultsCriteria.BatchId });
delegate.$promise.then(function (result) {
vm.conatinersByTO = result.Data;
if (vm.conatine... | 1 |
e47c38ae8748209437e4d49ebe68e9f0 | e0472ab78e7045aa20b6b49d17d7c267 | Constructor for Bullet. Intializes the point of where the bullet
starts, equal to whatever point the ship is at. | Bullet::Bullet(const Eigen::Vector2f& pos, const Eigen::Vector2f& vel) : GameObject(10, pos, vel, BULLET)
{
} | 1 |
164508555758ea6e7ed9c905feaa953e | 2d90cbba1702c49c1bfaca7f052c17c9 | Inputs temperature in Celsius, pressure in mb,
and mixing ratio in kg/kg, outputs relative
humidity as a percent. | def mr_to_rh( mr, p, t) :
return mr * 100. / satmix(p, t) | 1 |
c56172a422d6eb887c193ce4543c4c48 | cd16a154c153929551fb81587c7efd63 | Test that the distance from a distribution to itself is zero. | class TestEnergyDistance:
def test_same_distribution(self):
assert_equal(stats.energy_distance([1, 2, 3], [2, 1, 3]), 0)
assert_equal(
stats.energy_distance([1, 1, 1, 4], [4, 1], [1, 1, 1, 1], [1, 3]),
0) | 1 |
c19463f8d46eef9b6b6cb6d0ce7f3732 | 06745db6dc17797dde0dc90dd9f6e690 | Report that this Cartan type is not irreducible. | class ComponentCrystal(UniqueRepresentation, Parent):
def _repr_(self):
return "The component crystal of type {0!s}".format(self._cartan_type) | 0 |
1b5ddc552744200504d63dfd9c894e64 | ad1a29f5bda9dff059a8fd5edec97b7f | The underline position value of the font face in font design units. Underline position is the position of
underline relative to the English baseline. The value is usually made negative in order to place the underline
below the baseline. | public class Font extends PropObject implements XMLArchiver.Archivable
public double getUnderlineOffset() { return _fontFile.getUnderlineOffset() * _size; } | 1 |
da3223e79799e61c3fe4a86d84ab8a85 | 59ad9646b07a80b931a0a27124e2b3ee | Начальная инициализация портфеля | {
currencyFund.Add(new Money(1, "R", "Рубль"));
currencyFund.Add(new Money(70, "D", "Доллар"));
currencyFund.Add(new Money(50, "E", "Евро"));
} | 1 |
487c2d168c2dad3e92c3ba89662c154a | 393db79a879ad679550fe9789c9e4cc1 | Builds the CF CLI command for deployment | parser = argparse.ArgumentParser(description="Create or update existing " + "CloudFormation stack")
parser.add_argument("stack_name", help="Name of the stack to create or " + "update")
parser.add_argument("yaml_template", help="Yaml template to pre-process " + "and use for creation")
parser.add_argument... | 0 |
c16d80847c4b3c07673f344da874b395 | a628c9ab40e4c000f02faeb3b7989160 | try to grab pointer, we may have to wait for another process to ungrab | class Seat(PtrHasData):
def pointer_has_grab(self):
lib.wlr_seat_pointer_has_grab(self._ptr) | 0 |
ad7464967e9fa03fcaa91a40d69010c6 | 1457646d22c31b15cfb1225720d46058 | Define o estado do botão se ele vai ficar ativo ou inativo, e o texto do mesmo | class GameButton extends JToggleButton
public void setState() {
if (this.isSelected() || !this.isEnabled()) {
this.setForeground(color);
this.setText(text);
this.setToolTipText(this.toString());
} else {
this.setForeground(Color.black);
this.se... | 1 |
3c57d9c83565b514a029f2e42cd2eba0 | 695039308f6e0adb5a86e070153a20dc | Retrieve Java options, adjusting memory for available cores. | if 'NSLOTS' in os.environ:
ncores = int(os.environ['NSLOTS'])
else:
ncores = multiprocessing.cpu_count()
ncores = ncores - JAVA_RES_CORES
if ncores <= 0:
return 1
return ncores | 0 |
c1ce59c0d67b84c2244c51fa946fdc49 | 9c2c528ff3919c44761cb5a2187aef96 | Use first line of file docstring as description if it exists. | docstring = type(self).__doc__
if not docstring:
return None
return " ".join(textwrap.dedent(docstring).split("\n")).strip(" ") | 0 |
ed9a7aa48e676e765558dc3225488554 | 3a3d28805a9f8489b9acc3f3e6580cf3 | Get the number of entries in the folder | int count_entries(DIR* dir){
int counter = 0;
struct dirent* drnt;
while((drnt = readdir(dir)) != NULL){
counter++;
}
rewinddir(dir);
return counter;
} | 1 |
d6050e2d992a924e03e03589d65f7621 | 9cc3b0469558cdbc324ef31c2a6820ef | if attribute value exists, assign a color; otherwise assign white | void SetColorAttribute(XMLNode& node, const std::string& attributeName, const RGBAchars& value, const RGBAchars& defaultValue ){
if (value == defaultValue) return;
std::string colorString = std::to_string(value.r) + "," + std::to_string(value.g) + "," + std::to_string(value.b) + "," + std::to_string(value.a);
node.a... | 0 |
8b74f8a60e0e171bc5e5a1b5c2cd188d | 829c82f3f3747b9f676fbe734c914c77 | Exit to upper command level
Eg:
BQI.res.partner> exit
BQI> ... | class App_cmd(Cmd):
def do_up(self, a):
trigger('on_exit', ['up']) | 0 |
12fa2f560e3a1148e0544f046e094751 | fa3758687abaf942ef74690fb742d341 | アンケートクエリ単一・複数選択形式の登録 (setter tbl_questionnaire_query_choices) | data, _status_code, _headers = get_survey_question_choices_with_http_info(id, qid, opts)
return data
end | 0 |
4055314f5dccb4dd0ab6b7ffd2999dfb | e6927a85d4aa52a4530e92cf67034318 | Test case to verify the "diag-dump subinterface basic" information with
different number of sub-interfaces | class TestIntfutil(TestCase):
def test_subintf_status_verbose(self):
result = self.runner.invoke(show.cli.commands["subinterfaces"].commands["status"], ["--verbose"])
print(result.output, file=sys.stderr)
expected_output = "Command: intfutil -c status -i subport"
self.assertEqual(result.... | 0 |
7e9df33fc55cc47f3cbc7af3f87a1fc4 | cf671f2e39c388df1e2d14e0a663173d | 根据厂站id与点号获取ems中信号信息 | EmsYcDO getEmsYc(String stationId, String point); | 1 |
8a3b18ccba1c798003e6765f8a88fbd6 | a72524ccec4c8a981110181e29a30c45 | Call a function exported by a package | class HandleImport(Transformation):
def visit_FunctionDef(self, func):
self.module.call_function(self.registry, func.name)
return func | 1 |
561e7c094abc957cee9d6702cbad36d1 | 92a8c84db751219da2e11dfb3fc5fae2 | Get last date of current month | namespace Labo.Common.Utils
public static class DateTimeUtils
public static DateTime GetLastDayOfMonth(DateTime currentDate)
{
return GetFirstDayOfMonth(currentDate.AddMonths(1)).AddDays(-1).Date;
} | 1 |
6746d820bdce222a1995fb6a2a43f326 | 772c477f989dd1a3fde91017277a8b77 | Counting milliseconds | ISR(TIMER0_COMPA_vect)
{
ms++;
} | 1 |
114875aa8d535bf8679ffbb539c5dda1 | 0742375b45df66751a3e2bad1ee2a6e4 | View All RulesConditions | namespace ControlCentre.Controllers
public class UpsertRuleController : Controller
[HttpGet]
public ActionResult Index()
{
return View("ruleview");
} | 0 |
9991c3f26b741e185dd1d8b2b3ac5d11 | 6dec51e720b91822af82a4d3b443597a | 查询不存在这个环节的用户,并且得到用户角色的信息 | {
$stmt_select = $this->db->prepare("select id,sid,uid,role,status from stage_user where uid=:uid and sid =:sid and status<2");
$array = array(
':sid' => $sid,
':uid' => $uid,
);
$stmt_select->execute($array);
$result = $stmt_select->fetch(PDO::FETCH_A... | 0 |
a8f926164c0161f2bc0f08a8a008a946 | 2fef2ce99320f1ad0441bbcdf60c27f0 | # Manually reset the dropout keep percentage (the percentage of nodes to keep) | dropk=function(pp,k,droplow)
{
pp=pp[!is.na(pp)]
n=length(pp)
pp=sort(pp)
if (k==0) ppk=pp
if (droplow==1 & k>0)
{
ppk=(pp[(1+k):n])
ppmin=min(pp[k],k/... | 0 |
ba673171484406e7b0a3b96dfaa77f3a | a44384a8c87f216e77a746efe150e089 | Return the name of the schema for the table that is used to verify that connections
in the pool are still valid. | public class PSDatabasePool
public String getDefaultSchema()
{
return getDefaultConnectionDetail().getOrigin();
} | 0 |
eba0f9aefe10bdf47f32c11d28a6ad9e | fa4857a0e6846f2dc69dcfbf08ebbbe5 | test whether it can create a html unordered list | class JayFlavoredMarkdownTest
def test_that_it_should_get_ordered_list_below_unordered_list
assert_equal JayFlavoredMarkdownToPlainTextConverter.new("* aaa\n+ aaa").content, "* aaa\n(1) aaa"
end | 0 |
c28b97738aad81bcf77a39ea30ec4392 | e4a426b8ef42d831df682a7678358e34 | query if the position is in the transposition table | final SQLiteDatabase db = getReadableDatabase();
final Cursor cursor = db.rawQuery("SELECT EXISTS (SELECT * FROM \'" + table + "\' WHERE position = \'" + position + "\') as success", null);
cursor.moveToFirst();
if (cursor.getInt(0) == 1) {
cursor.close();
return ... | 1 |
9fcc43ddbaca1238e5ca7c4fb4e22c26 | af7bea28ef620a5f2ac5422f98881467 | This functions reads from the database and loads everything into the program.
First it makes a connection to the database, and then it reads all the courses and students into arraylists. | public class Database
boolean initialize(String coursesFilePath) throws FileNotFoundException {
File coursesFile = new File(coursesFilePath);
Scanner coursesFileScanner = new Scanner(coursesFile);
String currLine = "";
Short currCourseNum;
String currCourseName;
String kdamCoursesList;
int currMaxCapacity... | 0 |
965c469cfe32e3542b2f6eaf01bc54a0 | 0f4a91c6bdadd440d0b09de5dda8ad25 | writePost에서 선택한 고양이를 DB에 저장 | {
int food_id=0;
final EditText editTitle = (EditText) findViewById(R.id.title);
final Spinner spinner = (Spinner) findViewById(R.id.spinner1);
final EditText editMemo = (EditText) findViewById(R.id.grade);
String title = editTitle.getText().toString();
String spinner... | 0 |
9fdab8ab10898f8c83d88b26e1de94fe | 41b9460ef431f2edc5d751d23c7ad534 | clear last document id from checkout session | class KlarnaOrderController extends KlarnaOrderController_parent
protected function resetKlarnaCheckoutSession()
{
KlarnaCheckoutClient::resetInstance();
Registry::getSession()->deleteVariable('klarna_checkout_order_id');
} | 1 |
564026839a9147faa39f3fc0730a6122 | 04a8c925cb12880700e2312a4b682d02 | Set the netCDF sample dimension name. | class SampleAttribute(Base):
def sample_desc(self, sample_desc):
self.logger.debug("In 'sample_desc' setter.")
self._sample_desc = sample_desc | 0 |
c053d6bb5d37783d9c3740c6551e72c7 | 3e5f95b841b0741e002cac4d5cb6c755 | Funktion für Abrufen der letzten KdNr | if(isset($this->Klient)){
try{
return $this->GetKlient()->GetKorNrB();
}catch(ENotSet $e){
return '';
}
}else{
return '';
}
} | 0 |
9a93d2e52c823d0b21588ed64aacea2a | 5c9aa31edfaed6ee64769894dd81bcb0 | 宿泊設備情報チェックボックスの設定を行う。 | public class MapDetailSettingActivity extends AppCompatActivity
private void setCheckBox() {
if (mHotPepperDetailOption.getPrivate_room() != 0) {
mChkPrivate_room.setChecked(true);
}
if (mHotPepperDetailOption.getHorigotatsu() != 0) {
mChkHorigotatsu.setChecked(true);
... | 1 |
90398217bd99c528fbec47de0291454d | c5b4b96d174a960bed4f6d7667ed4d43 | compute the velocities in Cartesian coordinates
a good upgrade might be returning velocities in native observation space? | r = np.sqrt(x*x + y*y)
t = np.arctan2(y, x)
sint = np.sin(t)
cost = np.cos(t)
vr = vx*cost + vy*sint
vt = -vx*sint + vy*cost
return r, t, vr, vt | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.