query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
b12a98e3e3345e682a3de13bd9819a2c | 0c2f54564aee4eff9171362497f44e24 | This function extracts the emails
from copied text. | {
Set<String> result = new HashSet<String>();
ElementIterator iterator = new ElementIterator(document);
Element element;
while((element = iterator.next()) != null)
{
AttributeSet attributes = element.getAttributes();
Object name = attribu... | 1 |
3ea9582d1264b1f57374ccdf7eab8b62 | 194a98aaa81e9fe9fb9b8af3dc7fe82d | 点击我发送通知列表的未阅人数 | @Controller
public class LoginController extends BaseController{
@RequestMapping(value = "/oanotifycount")
public void oanotifycount(HttpServletRequest request, HttpServletResponse response) throws IOException {
Map result=new HashMap<String, Object>();
String id=request.getParameter("id");
OaNotify oaNotify = n... | 1 |
7974110ae090bcd81cdff7cbc1263cda | 4ea52f7f5bb1a2ffbf7a31c456ec7d06 | to get shortest distance b/w every pair of vertices | void floydWarshall (int graph[][V],int A[][V])
{
int dist[V][V], i, j, k;
for (i = 0; i < V; i++)
for (j = 0; j < V; j++)
dist[i][j] = graph[i][j];
for (k = 0; k < V; k++)
{
for (i = 0; i < V; i++)
{
for (j = 0; j < V; j++)
{
if... | 1 |
b11ea04871d5231dbf96276398c1aae4 | 732f69b888ff362d8b464f7992d0e35a | Only allow editing GameMode BP, not native class! | namespace
bool AllowModifyGameMode()
{
const UBlueprintGeneratedClass* GameModeBPClass = Cast<UBlueprintGeneratedClass>(GetCurrentGameModeClass());
return (GameModeBPClass != NULL);
} | 1 |
63a81233aa86e833cb0b398727ba1980 | 35c318da9233aa215164885d7552e54c | retorna verdadeiro se o campo obrigatorio for preenchido | class Financeiro_Model_Banco_Crud_Table extends ZendT_Db_Table_Abstract
public function isRequired($field) {
return in_array($field, $this->_required);
} | 0 |
ed61f66e465cb89b635a32bac748c9c2 | 4519da449b45e96372893973a29e3e20 | Lance l'enregistrement des sorties HTML | public function lancerConstruction(); | 0 |
11163a8a0d0e1c9f48888f83a31e0649 | 6b82428c049a7cfb5581cf02f2372927 | Есть ли выставленный заказчиком счет | {
if (empty($order->id_address_invoice)) {
return false;
}
$address = new Address($order->id_address_invoice);
return $address instanceof Address && !empty($address->company);
} | 0 |
227759feabc8c1b0b93609a333e83463 | 2fd6bee1b358d33fc6d4a995aa2d2086 | A textual representation of the model root | public class CollectiveTree
extends CollectiveRandomizableClassifier
@Override
protected String toStringModel() {
return m_TreeModel.getString();
} | 1 |
a4ce7b723dee0cb661a0d2daa7faffb5 | 1ecaf87b59b028194405baca0adc3873 | Function to get polarity and objectivity for each entry | def compute_sentiment(tweets_df):
tweets_df["polarity"] = tweets_df["clean_tweets"].apply(lambda x: sentiment(x)[0])
tweets_df["subjectivity"] = tweets_df["clean_tweets"].apply(lambda x: sentiment(x)[1])
return tweets_df | 1 |
a0fde2c2638e0a2c949ad67815f90451 | c199582ce54e97fd77601156aaeae0cf | DD/MM/YYYY to YYYY-MM-DD 格式转换 | var tmpDate = '';
if (!Commonjs.isEmpty(oldDate) && oldDate.length == 8) {
tmpDate = oldDate.substr(0, 4) + "-" + oldDate.substr(4, 2) + "-"
+ oldDate.substr(6, 2);
return tmpDate;
} else {
return oldDate;
}
} | 0 |
29b0d7c12dc007a6eaa06c75acfc3b4b | 704126baae282f4526f92f593f01b153 | Wait before starting the test case to avoid getting operational monitoring data
of previous testcases in the result of the operational data requests made in
this test. | public void setUpBefore() throws InterruptedException {
final CountDownLatch countDownLatch = new CountDownLatch(1);
final Thread thread = new Thread(() -> {
dataStorage.deleteAllTraces();
final Trace sampleTrace = TraceTestProvider.getSampleTrace();
dataStorage.saveTraces(sampleTrace);
... | 1 |
5a83e2ab7282a306eb27cb04a3834c8b | c50e5826f46dce52913b50139c45d8ae | 在group-by, order-by中允许使用alias | String query = "SELECT one, two FROM cat c";
Sql jp = Sql.fetchSql(query );
assertEquals("c", jp.getTableAlias("cat"));
} | 0 |
da1bff754cb90c9cffaf936ebb6b4653 | 17de30045bf5ef9a43541eb782b2ca1a | 从网页源代码中解析出重定向的地址信息
只有登录成功才会有值,否则为NULL | {
string strResult = "";
try
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "HEAD";
request.AllowAutoRedirect = false;
var UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) App... | 0 |
efcedbda273e6d478ea5fbdcbbf7b2be | 358ccdb70285ac90ede43a95fc1b8028 | function to get a list of ranges to be downloaded by each thread | class DownloadLogger
long[][] getThreadBounds() {
long[][] bounds = new long[Integer.parseInt(log.get("threadCount").toString())][3];
int[] index = {0};
log.forEach((k, v) -> {
String key = k.toString();
if (key.startsWith("thread_")) {
String[] interval =... | 1 |
a422981f79fc1affdd5a9ee3e8948889 | 9a077f8859450f87a05afaba685d5aee | ! \brief increases the vertex index. | void BreakoutEngine::inc_index()
{
_index ++;
} | 1 |
b41905647dd42ceb5440885c1fffe1aa | fa4a19533d8c93e84a7151e1096a1287 | Stores information about given node in the AST of SYGUS benchmark specification. | {
this.classname = currentClass;
this.classid = nodeid;
this.variableData = vardata;
this.functionData = funcdata;
this.relationship = relation;
} | 1 |
57de7fb34c2eab0f871a76433718c842 | 4357e1d8814849d9467d495fb3053189 | Müşteri inceleme sayfasını derlemeye yarayan method | namespace MvcOnlineTicariOtomasyon.Controllers
[Authorize]
public class MüşterilerController : Controller
public ActionResult Liste()
{
var liste = db.Müşterilers.Where(x=>x.Durum==true).ToList();
return View(liste);
} | 0 |
b16c10538370fb6e13767492f46f5cb7 | 7444693ebc34339c23af871ea6c36180 | Verify Humidifier Drawer View Consumes Entire Screen on the WeMo App | poller = MiFloraPoller(self.TEST_MAC, MockBackend)
backend = self._get_backend(poller)
backend.handle_0x35_raw = bytes(
b"\xc8\x00\x00\x00\x00\x00\x00\x05\x1e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
)
self.assertAlmostEqual(20, poller.parameter_va... | 0 |
a7b249a27f12bcac1e044634fa4e3371 | b4a51112fa289b21a36c0c061d854b50 | Checks if given parameter is a perfect square or not | bool squareCheck(double n){
double res = sqrt(n/2);
return res == int(res);
} | 0 |
fde0ff189bd94f4528ca0c078ad94343 | b9adeab794210d2ddf58aed0093b1799 | Retorna uma lista com as regras existentes ordenadas por quantidade de uso
em ordem decrescente. | public List<Regra> findAllByOrderByQuantidadeUsoDesc(); | 1 |
db826e9edbfefdf9274635ff3242e01f | 6aa60e0ad5191cb8859fa4b618fab029 | Removes the rope. | export class Rope
public delete(): void {
DeleteRope(this.handle);
} | 1 |
43d703102988eb19bf958e18ad924354 | 02639b59800fdb61e874100f0dd22fab | 體積 = 質量 / 密度 | namespace JCS_D2DEngine
float32 Physics2D::volume(float density, float mass)
{
return (mass / density);
} | 1 |
dce695bb9c70cf71196be1459e1a21d1 | 8ea26684d7b6fe7dfdd52365cdaf68cc | Validates the MaxLength constraint of '<em>SAFP Ttext Type Mandatory Max10 Car</em>'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | int length = safpTtextTypeMandatoryMax70Car.length();
boolean result = length >= 1;
if (!result && diagnostics != null)
reportMinLengthViolation(Pt1_01Package.Literals.SAFP_TTEXT_TYPE_MANDATORY_MAX70_CAR, safpTtextTypeMandatoryMax70Car, length, 1, diagnostics, context);
return result;
} | 0 |
f35240b9f746041d77cf89c568160525 | 9e3f3b45e78053ca47ab2abe5a5fe13f | いいね!がついていたshortcodeを登録する。 | function shortcode_button_reg($buttons) {
array_push($buttons, 'shortcodes');
return $buttons;
} | 0 |
e527870c4c3bd397a773874f6a74c550 | 4de15430286f2e9533c663046efff8ab | @brief Release the per-context region list lock | void RM_ThreadSafeContextUnlock(RedisModuleCtx *ctx) {
UNUSED(ctx);
moduleReleaseGIL(FALSE , true );
} | 0 |
4d4d8e1f330aac35e6b1e5d323dcd70c | d2d7462b27e296a5a16033939a463191 | 从第0个位置开始查询元素o的索引位置 | public class DataPool implements IDataPool, IPoolOperate
@Override
public int indexOf(Object o) {
int index = 0;
if (o == null) {
for (NodeData x = mHeadNode; x != null; x = x.nextData) {
if (x.source == null) {
return index;
}
... | 1 |
638a37e7a2984c736e3f80c0fe6e2b34 | 63759649ec04e4e7e4d1777879d1c774 | Ensure all .nodedoc files are built. | def ensure_nodedocs_built(v=DEFAULT_V):
for markdown_path in glob(join(TOP, "doc", "api"+v, "*.markdown")):
ensure_nodedoc_built(markdown_path) | 1 |
49a186194f6b6b13fe890f66035092c0 | eff268d4cf5b05b3923365012546564f | Add a new user to the database, it either updates the existing one or it will create a new entry. | user_id = query_db("SELECT user_id FROM user WHERE username = '{}'".format(user["username"]))
if user_id:
logger.log(logging.INFO, msg="User already exists - Not creating: {}".format(user["username"]))
return user_id[0]
else:
logger.log(logging.INFO, msg="Created User: {}".format(use... | 1 |
404154f4df57ea6c2a677bff1ea699a0 | f1e1b2f642b8ab5b3a4d2d34469f0932 | Rate (/s) counter for ssltotsslv3sessions. | class ssl_stats(base_resource) :
def sslcursessionsrate(self) :
try :
return self._sslcursessionsrate
except Exception as e:
raise e | 0 |
58cdaee58663fc822fbd419798eb1eb6 | 78ebd2e725cf8fe7e01b970385dc01f6 | @brief 在内存池pool中申请大小为size的内存,
并把这段内存用0填充 | {
pool_flags PF;
pool* mem_pool;
uint32_t pool_size;
mem_block_desc* descs;
task_struct* cur_thread = get_running_thread_pcb();
if(cur_thread->pgdir_vaddr == NULL)
{
PF = PF_KERNEL;
pool_size = kernel_pool.pool_size;
mem_pool = &kernel_pool;
descs = k_block_de... | 1 |
40d0ceac7accab7eebf3212ad7e83228 | ea1dce177c288e11c2f8175b14288168 | Listener for the grid area's left button up event. | {
_disablePan = true;
await _innerGrid.TranslateTo(Width, 0, length: 200, easing: Easing.CubicOut);
await Task.Delay(200);
_disablePan = false;
RaiseLeftActionTriggered(BindingContext);
HandleTouch(0, animated: false);
} | 0 |
55e2bfbeeec68a98a25094340c023046 | d8e8f6b42672edf7fcc81dad1b0273fb | Test on-the-fly creation of the output column. | {
$row = new Row(['test_type' => new FakeTestType()]);
$row->getOptionalColumnType('test_type', stdClass::class);
} | 1 |
22f6947a77b16a8756483e4a92ca920b | 63710c6def8318a676d2c1d8d1ec78f4 | This function sets a flag to indicate end of a CapSense scan.
cy_stc_active_scan_sns_t* : pointer to active sensor details. | uint32_t widgetId,
const cy_stc_capsense_context_t * context)
{
uint32_t snsIndex;
const cy_stc_capsense_widget_config_t * ptrWdCfg = &context->ptrWdConfig[widgetId];
cy_stc_capsense_widget_context_t * ptrWdCxt = ptrWdCfg->ptrWdContext;
cy_stc_capsense_sensor_context_t * ... | 0 |
abce581821711c3f14904b99ae15f736 | 0e37035d10fff37e6753e7bf664553c3 | Returns the step from the file format name of TensorFlow checkpoints. | if name.endswith(":0"):
name = name[:-2]
reader = _load_checkpoint(checkpoint_dir)
return reader.get_tensor(name) | 0 |
88d3c42f6350c055e6ac5297d14096b0 | 7f61448ad6da3ef0f9cb03f40c5be655 | copied from https://github.com/GoogleChromeLabs/web-push-codelab/blob/master/app/scripts/main.js#L31-L44 | cases like (1) | 0 |
adc72e95107e8af67bff0bbb01bee1d4 | 3547349b24c8decebc415a7fdd645399 | Get the zookeeper connection string | namespace Orleans.TestingHost
public static class StorageTestConstants
public static string GetZooKeeperConnectionString()
{
return "127.0.0.1:2181";
} | 1 |
c6e42a72bdacf71574c9b11f73b341e8 | e464a248259c30f18cee7b70d4f11a19 | 获取中间的分页显示 | {
if (isAsc)
{
query = query.OrderBy(c => c.ID).Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList();
}
else
{
query = query.OrderByDescending(c => c.ID).Skip((pageIndex - 1) * pageSize).Take(pageSize).ToList();
... | 1 |
6bf9ab6fdfbe38cc46b114a634a54417 | 724e5dde1e892c47f0cd1a2317be0ed9 | Enable clock for PORTE and allow time for clock to start | void Switch_Init(void){
SYSCTL_RCGC2_R |= 0x00010000;
GPIO_PORTE_LOCK_R = 0x4C4F434B;
GPIO_PORTE_CR_R = 0x03;
GPIO_PORTE_AMSEL_R = 0x03;
GPIO_PORTE_PCTL_R = 0x03;
GPIO_PORTE_DIR_R = 0x00;
GPIO_PORTE_AFSEL_R = 0x03;
GPIO_PORTE_DEN_R = 0x03;
} | 1 |
e12f6d4feda2917e805f19cf8636c724 | 6f5419a360175a628f1cb32facbd734c | Adds a listener to be notified when the orientation has changed. | public class OrientationManager implements SensorEventListener
public void setOnOrientationChangedListener(OnOrientationChangedListener listener) {
mListener = listener;
} | 1 |
b8ce9435e09839040093fee488a34477 | d062fe501c6504058dd717e7c878b108 | Returns the generator momentary output. | class LantzSignalGenerator(MessageBasedDriver):
def output_enabled(self):
return int(self.query('?OUT')) | 1 |
5536c4008686d56c7b9df63dc60e6cfa | 9dbe816c47c388527593e21fd4c853d6 | Update variational parameters.
Sets new values of all variational parameters by adding given values. | class Optimizer:
def update_params(self, params):
self.params.update(params)
return self | 0 |
0383f246ef1e3f2185cec3cafeb20164 | 710b917e6d0808d2d162102623240c1e | 通过 jbpm_node 的id 获取 自定义
流程节点信息 | if(StringUtil.isEmpty(pkValue)) throw new RuntimeException("获取业务json PK 不能为空");
ProcessRun run = processRunService.getByBusinessKey(pkValue);
BpmFormDef bpmFormDef = bpmFormDefDao.getById(run.getFormDefId());
Set<Class> excludeFormat = new HashSet<Class>();
excludeFormat.add(Number.class);
BpmFormData data ... | 0 |
2062d62a710ea06cc5c78960c2bf516d | ef9ee56c8fde42e338d1a56a75448fb2 | Returns a new object of class '<em>FX Existing Model</em>'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | FXTreeView createFXTreeView(); | 0 |
50da7eda6fec51a95bf23b5ef841574d | ea72440010dfe78478b33e0318495aa4 | Closes the campaign system | {
TheCampaign.Flags or_eq CAMP_LIGHT;
TheCampaign.DisposeEventLists();
TheCampaign.FreeCampMaps();
TheCampaign.FreeSquadronData();
TheCampaign.ChillTypes();
TheCampaign.CurrentTime = 0;
} | 1 |
17231cd2796440c5fe3d6774dd6572a2 | a59d681d3df48041748eb0e6e9b2eed7 | Validazione dei campi del form di pagamento, ottenuta con Java Pattern | class LoyaltyController(private val digitalWallet : DigitalWallet)
private fun validationFieldsFormat(loyaltyValidator: Validator<StoreLoyaltyAdapter>) {
val validFrom = LocalDate.parse(loyaltyValidator.get().validFrom)
val validTo = LocalDate.parse(loyaltyValidator.get().validTo)
loyaltyValidat... | 0 |
542e85ad7a66806449fc2e0d3b49fc80 | bede7373c88503d2fbabe6426bb9c2be | 保存导入用户信息 | class MemberController extends AdminCoreController
public function save_import($data)
{
$Goods = M('member');
foreach ($data as $k=>$v){
$date['id'] = $v['A'];
$date['wxname'] = $v['B'];
$date['realname'] = $v['C'];
$date['mobile']=$v['D'];
$date['address']=$v['E'];
$date['integral... | 1 |
bd42cce73985ef85ff58cf4324dc1a55 | 84c246400b69d377e398507ebac9fec5 | 默认基于dubbo协议提供服务 | public ProtocolConfig protocol() {
ProtocolConfig protocol = new ProtocolConfig();
protocol.setName("dubbo");
protocol.setPort(20880);
protocol.setThreads(200);
return protocol;
} | 1 |
105af60084c0a7b336f0e2c18e365115 | f19c8aa20e6aa387862cb84d3cfb7120 | Find the gini index of a set of data by counting the number of assams and the number of bhuttans | numCount = {}
total = []
for i in data_set:
total.append([i[0]])
if i[attribute] in numCount.keys():
numCount[i[attribute]].append([i[0]])
else:
cache = []
cache.append([i[0]])
numCount[i[attribute]] = cache
sum_ = 0
IV = 0
... | 0 |
3187946454c13f8833dc8d32627df231 | 1a5c83c06d067319daaa9181e0a59a86 | Parsing the Output XML from SPARQL Query result using XML DOM Parser | {
XJava v_ParserXmlToJava = new XJava(i_XmlURL ,i_TreeNodeRootKey);
return v_ParserXmlToJava.parserXml();
} | 0 |
e8e63474968d93944d353fabc6f5ff67 | d7ca915415ea2aa935c4dfd6eb8b9c21 | Returns a list of running tunnels with status and metrics information | listDeviceTunnels(listDeviceTunnelsRequest?: ListDeviceTunnelsRequest) {
const options = {
method: "GET",
url: "/v5/iot/{project_id}/tunnels",
contentType: "application/json",
queryParams: {},
pathParams: {},
hea... | 0 |
6c1ee24813017306a718ff0107038312 | a5f605a6c3985d411aef41939c76b653 | A function (supporting the same basic protocol as :class:`.BSplineFunc`) which is given
in terms of a user-defined callable. | if not isinstance(other, Callable):
return NotImplemented
return Function(lambda x: self(other(x))) | 1 |
d7550348bd85ea469ee7b594e34824a2 | 4174789704312b42aeba77d907c44f34 | Encodes a <see cref="string" /> to its equivalent ROT13 representation. This function either encodes a <see cref="string" /> or decodes an already encoded <see cref="string" />.
<para>Example:"http://example.com/" is encoded to "uggc://rknzcyr.pbz/"</para> | namespace PRHawkSkf.Services
string Encode(string dataToEncode); | 0 |
09d8816dda612a3b5016f4057282402e | b30751b8d391e6bd3ed1614b2b6c0e6a | hàm thực hienj việc lấy thông tin của bác sỹ nội trú | @GET("getNurseInfo")
Call<Nurse> getNurseInfo(@Query("emp_no") String emp_no); | 0 |
a35e78982a3f14ef7a15ae454d9bbb47 | 7dc4905bb26d456529ca4b6679b58320 | Gets all products on order. | public class Order extends Entity
public List<Product> getProducts() {
return products;
} | 1 |
75acebb7a3db3260d2154d1b75a9b861 | e110995086c49f2b0e2343a3ade1581a | 获取发送协议函数名称 | var Obj1 = { Type:obj.Type, Func:obj.Func, Param : obj.Param , SN: obj.SN} ;
this.protocol.RunFunction(Obj1,(data)=> { callback(data); });
} | 0 |
580264e4c952a2a3321d6ab3ae2100f4 | f95e24b47a124549931bd9d50c1248a6 | 获取最新的token,如果本地存在并且没有过期,则使用本地的,否则请求新的token | class hzjx_common(Base):
def getToken(self, force_update=False):
Appid = self.wx_conf["appid"]
old_token = self.sql.finder_single(
fulltext_mode=[True], line=["Timeout", "Token"], table="wx", keyword_line=["Appid"], keyword=[Appid])[0]
nowtime = int(time.time())
if int(old_to... | 1 |
f5b52c2672521f29ca014880c2a4577c | 2cbd529efbc9fc4c0d186618cf8cda03 | このオブジェクトのCSVパラメータを、指定されたCSVパラメータにコピーする。 | CsvParameters params = new CsvParameters();
params.setDelimiterChar(getDelimiterChar());
params.setQuoteChar(getQuoteChar());
params.setQuoteEscapeEnabled(isAllowEscapeByChar());
params.setAllowMultiLineField(isAllowMultiline());
params.setUseHeaderLine(getUseHeaderLine());
params.setAutoDetectDataType(ge... | 0 |
3d78f5e9131a547f7d4b725e26dd339a | 37f0aa9817f0f2024285760937fbd71c | Get the nursery based on the sector Id | class BoxStoreUtil()
@JvmStatic
fun getNursery(NURSERYNUMBER: String): List<Nursery> {
val builder = nurseryBox!!.query()
builder.equal(Nursery_.NURSERYNUMBER, NURSERYNUMBER)
return builder.build().find()
} | 0 |
63923d3164636764f8a2dc49721c1147 | d71c3b4c8e128634bc9218e5a4077983 | 获取诗的分页查询 | @RequestMapping(value = "/getPoetryBy",method = RequestMethod.GET)
public CommonResult getPoetryBy(String name,String author)
{
return poetryService.getPoetryBy(name,author);
} | 0 |
6a14783cd1697565aca9f051c1173bc1 | 8bd47c17f00b329e4a86b19df67d0bcd | This function creates a virtual Saint | snow_person_2 = Snow_person("black")
snow_person_2.goto(180,-200)
t.fillcolor("white")
t.begin_fill()
snow_person_2.draw(4)
t.end_fill()
t.pensize(2)
snowgirl = Snowgirl("black")
snowgirl.goto(229,139)
snowgirl.draw(100)
snowgirl.goto(165,120)
snowgirl.draw_eyes(5, 2)
... | 0 |
fd08d093b50805d6125f0028d9d0abfd | f6692350a28a2fb1d1f670d0ef58ef32 | Test to remove a user from a project by updating the
project_user_pivot table. | class ProjectUsersController extends \BaseController
public function destroy($project_id, $user_id)
{
if( ! $this->has_access($project_id, 'delete') ) return Response::json([], 401);
DB::beginTransaction();
try{
UserProject::where('project_id', '=', $project_id)
->where('user_id', ... | 1 |
f965a08a991808a7db78aaf3d17b36a9 | b6f64d0ebb0d4c5286542df5fd552059 | Creates a new Sorteo entity. | class SorteoController extends Controller
public function index()
{
return view('sorteo.sorteoGrupo');
} | 0 |
880a3e0f558b1939229bb59ba8f46ba1 | b58e7b8be1288c6c0c5c879318a693c1 | Given a dict of xy coords and vals, groups diagonal values together | h_vals = {}
j_vals = {}
for key, value in dictH.items():
if key[0] == key[1]:
h_vals[key[0]] = value
else:
j_vals[key] = value
return [h_vals, j_vals] | 0 |
64ce18aca4a8038c241957530176ec67 | 086e0c5740f0a5899cb13afc5de6af0a | #DESCRIPTION: Scrape the previous day's game data and compile in a master file. For use with Chron job to automatically pull the previous day's results | match_links <- s_tree %>%
html_nodes(".result-con ") %>%
html_node(".a-reset") %>%
html_attr("href")
for (k in match_links) {
k <- paste0("https://www.hltv.org",k)
s <- rvest::html_session(k)
if (status_code(s) == 500) {next}
s_tree <- xml2::read_html(s)
date <- s_tree %>%
html_node('.date') %>%
h... | 1 |
6a98025fc595ff2580bf907a608f295b | 7ea6a888a74b9ab9b8fd6b890d7c8bec | Eval the right hand side node. | {
#ifdef DEBUG_EVALUATE
Rmatrix rmat = leftNode->MatrixEvaluate();
MessageInterface::ShowMessage
("Inverse::MatrixEvaluate() left node =\n%s\n", rmat.ToString(12).c_str());
try
{
Rmatrix result = rmat.Inverse();
MessageInterface::ShowMessage
("Inverse::MatrixEvaluate() returnin... | 0 |
24a0a52cd9a404db765b922316045d1c | 47ca8a95d44e9f1cb8b4c570296abc94 | allows special messages to be sent for the three special cases of craps, though it's unclear
what should count as "boxcars" for dice with more/less than 6 faces. | def any_craps(vai_apostar, valor_da_aposta, soma):
if vai_apostar:
if soma in [2, 3, 12]:
return valor_da_aposta * 7
else:
return -valor_da_aposta
return valor_da_aposta | 0 |
5a9e888ae0a5c383dbf9bfd18e8eacda | bc740c951568a67120b24992937153ec | 餐桌类型统计 | @Controller
@RequestMapping(value = "${adminPath}/statistics/countStatistics/")
public class StatisticsNumberController extends BaseController
@ResponseBody
@RequestMapping(value = "getCountbyplaceType")
public Map<String, Object> getCountbyplaceType(){
List<EchartType> reslist = ccmBasePlaceService.... | 1 |
36ba0a993334c6faf2ce664ec4c7fa2d | 7c647d809615b2c1ed8a591d7a47b905 | 전달된 idTable에 근거하여 주문한 테이블에서 Bill를 삽입 | {
DataTable data = DataProvider.Instance.ExcuteQuerry("SELECT * FROM Bill WHERE idTable = "+ id + "AND status = 0");
if (data.Rows.Count > 0)
{
Bill bill = new Bill(data.Rows[0]);
return bill.ID;
}
return -1;
... | 0 |
f2bc692b3ceab4065aa592c15ab39df0 | 93031f9165519132c6f9a08cfaecda09 | Delete Chars | {
int l = GetLength();
if (!l)
return 0;
LETHE_ASSERT(ch >= 0 && ch <= 127);
CloneData();
LETHE_ASSERT(data);
char *c = data->data;
int res = 0;
for (int i=0; i<l; i++)
{
if (c[i] == ch)
{
for (int j=i; j+1<l; j++)
c[j] = c[j+1];
l--;
i--;
res++;
}
}
c[data->length = l] = 0;
ContChan... | 1 |
45623b6cf52bd81b655c362b1cd29fa8 | c89b7dadc19b9d98d536636adec0d662 | Pretty-print CSV file to stdout. | def print_csv(csv):
print '\n'.join([','.join([cell for cell in row]) for row in csv]) | 1 |
6f594c6dae5f7e96bc296be51d1f2b4c | 01debe6121d9634825cc3ceebb3f9baf | Sets the schema of the database function. | {
if (configure is null)
{
throw new ArgumentNullException(nameof(configure));
}
_schema = _ => new SchemaTypeReference(new Schema(configure));
return this;
} | 1 |
8a637cc05013b08618bf68d418ff1aba | 99b0068f2a1651a56c1282f5cd8866ef | Queries a plasma exit by its ID. | public ExitClosure findByPrimaryKey(ExitClosurePk pk) throws ExitClosureDaoException; | 1 |
33c2bc4c823b4b9338f1d7c953bcb30b | f7c5c0218105236393b3bf2782c56987 | Returns average position of nearby boids | local_velocity_x = 0
local_velocity_y = 0
for boid in local_boids:
local_velocity_x += boid.x_velocity
local_velocity_y += boid.y_velocity
return Vector(local_velocity_x, local_velocity_y).normalized() | 0 |
71407cd28280cfab5a40ed65d8ad4e9d | 4d795a8d45ed7b1117af1ce2b85f922b | Exit the application when user double clicks on the back button. | function keyEventHandler(event) {
if (event.keyName === "back") {
try {
tizen.application.getCurrentApplication().exit();
} catch (ignore) {}
}
} | 0 |
497ff30fdce3845396d0fe35138072d6 | b8b3bc733e69bf814534686b21f6cb9a | 从点云得到强度图 | void depth_point_compute(float fx, float fy, float cx, float cy,
Mat &depth, string &limg_filename) {
PointCloud<PointXYZRGB>::Ptr cloud(new PointCloud<PointXYZRGB>);
Mat limg = imread(limg_filename, -1);
vector<string> res = split(limg_filename, "/.");
cout << "test " << res[3] << ... | 0 |
8877ecb84bf36303b3db25b5e95c5e7a | ddd4777647ebde1d8fb4953bc1b25e1f | Parses the extension part of the PFM file. | def parse_extension(data, offset):
tmp_ext_type = degrease_type_code(data, offset)
fp_ext_ = tmp_ext_type
offset += 2
ext_len = int.from_bytes(data[offset:offset+2],'big')
offset += 2
tmp_ext_value = data[offset:offset+ext_len]
if tmp_ext_type in ext_data_extract_:
tmp_ext_value = de... | 1 |
a5ba10bfe14b31429020e9b33509098d | 92568219d84cb5ce5c79e2601317ed59 | A setter method to set a company's industry trend data. | class YahooSummary:
def industry_trend(self, value):
self._industry_trend.value = value | 1 |
855d4a339ccfe76a4845762246aa6acb | dc9a3a6d7a903437b97e9ef2ed97284d | 异步校验 | class Validator
async validateKey(key, value, rulesOfKey, output) {
for (const rule of rulesOfKey) {
const AsyncFns = [];
for (const rulename in rule) {
if (rulename === 'message') {
continue;
}
const isFunction = typeof... | 1 |
7dfe8ed53331cc2da4c599f3195e58db | 15d94c8207ec671935f1baa01122e0fa | Finishes the asynchronous execution of the UpdateMediaInsightsPipelineStatus operation. | namespace Amazon.ChimeSDKMediaPipelines
CreateMediaLiveConnectorPipelineResponse EndCreateMediaLiveConnectorPipeline(IAsyncResult asyncResult); | 0 |
e7ac6cf9c0347188dfe5e0b5b6e0da6b | 153616c72ecb2bece793c94cf4bc2708 | Clears fail log for the specified import. | @Stateless
public class DebtorsAllocationImportFailLogBean extends EMCEntityBean implements DebtorsAllocationImportFailLogLocal
public boolean importFailLogLine(DebtorsAllocationImport allocationImport, DebtorsAllocationImportFailLog failLog, EMCUserData userData) throws EMCEntityBeanException {
List<String> da... | 0 |
7fc8caa13dccd40e928c1f3a3156c1d0 | 3a314d6d3e96c10ab41209577b9ca85a | Whether lint should include the source lines in the output where errors occurred
(true by default) | @Beta
public class LintCliFlags
public void setShowSourceLines(boolean showLines) {
mShowLines = showLines;
} | 1 |
9f22800c025c4984acc9d0f6f781bcd6 | fe2cfc756202c9a12041b6f69bc28d3c | Get a slot by index | if (t == NULL)
return NULL;
assert (i < t->nSlots);
return t->table[i];
} | 1 |
b6b74091ad6c8eda568899d8828049f2 | 377e33383c4857c738eca78e9ca614ae | 사용자는 권한이 없는 임시 개발글을 변경하거나 삭제할 수 없습니다. | user = create_user()
self.client.force_authenticate(user=user)
response = self.client.delete(reverse(
'postRUD', kwargs={'pk': self.post_list[1].pk}))
self.assertEqual(response.status_code, 403) | 1 |
f93ac59a74ede1fda9f756b3589a4f46 | dc11f6a4cefb204c93408e9fe80aa6e1 | 对于某个时间序列用训练好的线段聚类模型测试 | namespace MGroup.MachineLearning
void Test(double[,] X, double[] Y); | 0 |
ff2941cc74cd1a6de380f3ba943b5e37 | ca2560ffa43980f67ab9e83d5b3873d6 | Returns a <see cref="RedirectToActionResult"/> for the specified action name. | this IShouldReturnTestBuilder<TActionResult> shouldReturnTestBuilder,
string actionName,
string controllerName,
string fragment)
=> shouldReturnTestBuilder
.Redirect(result => result
.ToAction(actionName)
... | 1 |
c380265d18aea6da5243e4619237929f | deab2d746e6dd4db068f531e613777e0 | 判断是否大屏 | public class GameActivity extends Activity implements View.OnClickListener{
private boolean isTablet() {
return (this.getResources().getConfiguration().screenLayout
& Configuration.SCREENLAYOUT_SIZE_MASK)
>= Configuration.SCREENLAYOUT_SIZE_LARGE;
} | 1 |
10147e0ee4283093d48eda2189294b28 | f95c15b6b00a8f506dd53819334ee770 | ===============================================================================
在列表尾部插入对象
要插入的对象 插入成功则返回true | function insert(obj:Object, idx:Integer):Boolean {
} | 0 |
45eaf67ae9435081424e78b95294cd42 | 82d62569fb013ded10c9c0bb89ec9b8e | function that receives a string and determines which room type index the connection corresponds to in the room_type array | i = 0
while i < len(rooms):
if name == rooms[i][0]:
rmNum = i
i += 1
return rmNum | 0 |
026c4bad94f95effe28ae871ae956a3e | 45b13b2f232343f5a514601195080a93 | @brief Pone ad inattivo lo stato dell' utente ed elimina quest'ultimo da tutti i gruppi
a cui è iscritto
era creatore | namespace lm.Comol.Modules.Standard.WebConferencing.Presentation
public class WbEditPresenter : lm.Comol.Core.DomainModel.Common.DomainPresenter
public void DisableUser(Int32 UserId)
{
bool SendMail = this.Service.UserDisable(UserId, View.RoomId);
bool Sended = true;
if (... | 0 |
ab4294fa01a4a49e6d2e6261a102ae8a | 50c98423f9caf6b749bcd92dcad69f7c | ajax로 제품 페이징 처리 (제품리스트) | function paging(result){
$('.page-item').remove();
$('.page-link').remove();
let addr = result.addr;
let totalProduct = result.totalProduct;
let currentPage = result.pg;
let pageBlock = 10;
let pageSize = 10;
let temp = Math.ceil(currentPage / pageBlock);
let totalPage = Math.floor((totalProduct + pageSize - 1... | 1 |
94cd45f85986422ce6567a9a7a6232ba | 70f95beae87ffd0de76a7d7869ad5c24 | 用例2:检验上面homework函数的功能,% | def test():
s = test_2()
print(s) | 0 |
a91fda2091d5f1da4b9889faea0b42a1 | 85ebd58f03a77e977b64f1c1364e9740 | 获取五日天气预测数据 | class IndexController extends Controller
public function getForecastAction () {
return $this->api->getFiveDaysWeather();
} | 1 |
ba7cec24d3583a9f7719c42879e37612 | f1bda71db3d152dd6de35c40f78762a5 | grab the header from request and add to response if present | function echoHeader(call) {
var echo_initial = call.metadata.get(ECHO_INITIAL_KEY);
if (echo_initial.length > 0) {
var response_metadata = new grpc.Metadata();
response_metadata.set(ECHO_INITIAL_KEY, echo_initial[0]);
call.sendMetadata(response_metadata);
}
} | 1 |
f69b23148077b7d9a0599bed91900f42 | a2878e71214c8fb710202600f72cf9d1 | Import a /dev directory recursively. | {
char mask[80];
struct dirent *p;
DIR *d;
strcpy(mask, root);
if (*path)
{
strcat(mask, "/");
strcat(mask, path);
}
strlwr(mask);
d = opendir(mask);
while (d && (p = readdir(d)) != NULL)
{
waitfor(e_ticsfull);
intree(p, path, mask);
}
closedir(d);
waitfor(e_ticsfull);
} | 0 |
49caf6f9eea9da08dfd71eeb77b8f2cb | 7f61448ad6da3ef0f9cb03f40c5be655 | deliberately do nothing for now | cases like (1) | 0 |
efa351166bff0e066ff3590570c41092 | c449d5a6f3f5a72b64af845afb2833a5 | #' @return a string representing the default adapter. | response <- function() "Species" | 0 |
97bc4167de5a1941128e282542bc3ebc | 55785d94af9e7bb310c08e295c9d9518 | Is sequence instance is buckled or not. | public class MyJUCTemplate
public boolean isBroken(); | 0 |
b093c9f992170964b0b2b60041a95d23 | 5622bc31fde532a07be354fb8ace10d4 | Save the winners to databse. | class Sweepstakes
private function recordWinners($winners) {
$sql = "INSERT INTO winners (entrant_id,sweeps_date_time) values ";
$now = date("Y-m-d H:i:s");
foreach($winners as $winner) {
$sql .= "('" . $winner['id'] . "','" . $now . "'),";
}
$... | 1 |
abc41d3ffb50f47fbe20031278bf6091 | 8bfea8f9ee574ee626c60649ae9b2b19 | Gets the position of the bottom right field after being rotated to
the left. | @Override
public IFieldPosition rotateLeftPosition() {
return TOP;
} | 0 |
efe776d12b30864861766181c36a93e0 | 2c8700fe33856026dbab60a8218692b7 | 设置营地容量 | @Table(name = "inno72_store")
public class Inno72Store
public void setCapacity(Integer capacity) {
this.capacity = capacity;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.