query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
112059a08a4c615e86b18f9611d956ce | 1c80baade60887a17067738da4759ed6 | Disabling zoom scrolling on GeoMyWP Maps | function gmw_disable_scroll_zoom( $args ) {
$args['map_options']['gestureHandling'] = 'cooperative';
$args['map_options']['scrollwheel'] = 0;
$args['map_options']['mapTypeControl'] = 0;
$args['map_options']['maxZoom'] = 16;
return $args;
} | 1 |
bfb290a31a4a5ae695a7e3b8ecaabfb8 | 2cb6fe47ca648c4caa9a80be4ea6b130 | 返回最长递增序列 | public class LongestIncrese
private int[] generateLIS(int[] arr, int[] dp) {
int len = 0;
int index = 0;
for (int i = 0; i < dp.length; i++) {
if (len < dp[i]) {
len = dp[i];
index = i;
}
}
int[] lis = new int[len];
... | 1 |
17090ff77d685bb53f5ca4557caf8630 | 12a641b531bc61eaed34a960b177f182 | compute every node coordinates after converging to optimal ordering by N
rounds, and finally perform the edge routing. | class OP_Routing(ModalOperator):
def generate_vertices(self):
routingPoints = []
for vert in self.bezierVertices:
rotating = True
if(vert == self.bezierVertices[0] or vert == self.bezierVertices[-1]):
rotating = False
if(vert[0] > 0.001 or vert[0] < -0.001 or vert[1] > 0.001 or vert[... | 0 |
1dc59bb00e0dc92ef7007ea75ef218ea | 35d46e222d338db6107429508d8de54a | Permanent redirects for previous url pattern. | if 'section' in self.request.GET:
section = self.request.GET["section"]
if section == 'about':
return HttpResponsePermanentRedirect(reverse('about'))
elif section == 'contact':
return HttpResponsePermanentRedirect(reverse('contact'))
... | 1 |
5321aec3a9406216901748f4aac67cd7 | 33657580c86397e1f2a0514ddd64f2cc | Loads normalized paths to images into memory | def load_images(image_paths):
return np.asarray([imread(p) for p in image_paths]) | 0 |
628bdbf49391d1b618a762396334e52d | 4eb3c6061925e6a7a524bcf74e19b79f | Prints that the program is aborting. | TAO_IDL_BE_Export void
BE_abort (void)
{
ACE_ERROR ((LM_ERROR,
"Fatal Error - Aborting\n"));
throw Bailout ();
} | 1 |
a4f628ca7746bae881acb3f3b1cb13c0 | 67428028063a7e3d23547a31c11092d7 | 学生查看自己本学期的成绩,包括了考试总分和平时分等成绩明细 | public String querySelf(Model model, String sno) {
Student student = new Student();
student = studentService.queryStudentBySno(sno);
student.setSdept(studentService.querySdepBySmajor(student.getSmajor()));
Term term = new Term();
term = termService.getTerm();
term.createPastterm();
model.addAttribute("Ti... | 0 |
1ac5409e2a4db7e178dbc76b7b760fe2 | bee75e9d4e521dfad2d3c6b4df47d5c2 | Returns a shallow copy of this set. | public class ExBaseSet extends LinkedHashSet<ExBase> implements exalge2.io.IDataOutput
public ExBaseSet clone() {
ExBaseSet newSet = (ExBaseSet) super.clone();
return newSet;
} | 1 |
691080dd79f1834e72556c07d12a3443 | c07621590bc035f510661b805ea24e9d | Build the SQL query used to fetch one instance of this query. | select_clause = self._render_columns()
from_clause, from_vars = self._render_from()
where_clause, where_vars = self.condition.render()
order_clause = self._render_order()
limit_offset_clause, limit_offset_vars = self._render_limit_offset()
return (
(
... | 1 |
1532866b65868cd8995fe5d6f0f1797f | 8feb28b9e4818d7c78ce550b8406c708 | Enable transmit (disables receive) | void SX128XLT::rxEnable()
{
#ifdef SX128XDEBUGRXTX
Serial.println(F("rxEnable()"));
#endif
digitalWrite(_RXEN, HIGH);
digitalWrite(_TXEN, LOW);
} | 0 |
237e76f9774ac08ed6461872aaf8579f | 91ee20ca8cd24527410c884b99b3b060 | 个人购物车 | class PersonController extends Controller
public function pcollection ()
{
$id = session('user')->id;
$shoppingcar = count(shoppingcar::where('uid' ,$id)->get());
$collection = collection::where('uid', $id)->get();
$arr = array();
foreach ($collection as $value) {
$arr[] = $value->gi... | 0 |
cfc76273b257c6290fc64d2f29146603 | d5585d2bd2937f08898a938a805d3776 | Maps data from a invoice item entity. | $tax_rates = $this->get_tax_rates();
foreach ( $this->tax_item_mapping as $from => $to ) {
if ( isset( $tax_item_data[ $from ] ) ) {
$tax_item_data[ $to ] = $tax_item_data[ $from ];
unset( $tax_item_data[ $from ] );
}
}
if ( ! isset( $tax_item_data['tax_amount'] ) && ! isset( $tax_item_data['shipp... | 1 |
b9077fa6f8d25cff6b79a7adc34bc5d5 | c92a673b3f1699e8a1b5ed9efaa505ae | Sanity checks on the implementation of FileObject | if ($file->getIsBroken()) {
throw new \InvalidArgumentException(sprintf('Broken file given: "%s"', $file->getFilePath(true)));
}
} | 1 |
1df3effc7da0663effeaa8f8f424fce9 | b6f5d2b76b7c7536b8654e4ee951bdb1 | 设置电话区号 | final class PhoneNumber
private function setAreaCode($areaCode)
{
$this->areaCode = $areaCode;
} | 1 |
d3ed0a592472d146c4efae0e94c5e189 | ab5c640b7849d5524e83289929c336ec | Resolve the config for a server by merging it with the default config | protected static getDefaultConfig(): ServerManagerConfig {
return {
priority: 0
};
} | 0 |
1dcee69858e4f5a963b76144eb07c35c | 959e5de6705db6f8a278cfc17568b359 | Retrieve a specific component.
(Horde_Icalendar_*) The requested component. | public function get_component(); | 1 |
0be90768940959cb0cacfa17c854c3f0 | 63e3aad97906b1bcda5bdb6e644c559b | accessor function for min number of crew | public abstract class Avion
public int getNbPersonnelsMin() {
return nbPersonnelMin;
} | 1 |
fb7cc822f6dea839ad0055070a277217 | aeb04eb8b1a4ac18fa0e83c43263f22e | gets the value of 2 elements and returns the hash of their combination | {
int v [2];
int s = (a+b)*17;
v[0] = a;
v[1] = b;
srand(s);
s=rand()%2;
return v[s];
} | 0 |
e9b3d0e39cca42e36fcd9573d4bd7053 | 192e6f295a94197c875a9b82d22d2a06 | 生成缴费任务 | class FeeTaskService extends ScService
public function computeTaskFee($payNo,$isSettled = false,$isCompensate = false){
$payLog = $this->getPayService()->getPayLog($payNo);
$channel = $payLog['channel'];
$tradeRule = $this->getTaskTradeRule($channel);
$serviceRule = $this->getTaskService... | 0 |
a88710064ea307b5d63781c64108f138 | e9451cd33fc62384c87074553827419a | Return a boolean indicating whether a name has been reserved | func IsReserved(name string) bool {
return strings.HasPrefix(name, ReservedNamePrefix)
} | 1 |
4acd09f97fb15de867403097a3256348 | e26531a9c3f7c7d0603e1ce381d88710 | Write an aberration (phase or amplitude) map to a FITS file. | def write_imgspec(flux, wave, loglam, objtype):
hdr = dict(FLUXUNIT='erg/s/cm^2/A')
if wave is None:
if loglam:
hdr['LOGLAM'] = loglam
hdr['CRVAL1'] = np.log10(wave1D[0])
hdr['CDELT1'] = np.log10(1+dwave/wave1D[0])
else:
if loglam is not None:
... | 0 |
c17b4e9a3bb82b0ae028eed5f4a417f4 | d0656d6fb1987b4c9cb5ea34b48c6926 | Insère un objet dans la base de données, puis crée un objet planète à partir de l'objet ajouté à la base. | {
$insert = new Insert($star->GetTable());
$insert->values([
'name' => $star->getName(),
'description' => $star->getDescription(),
'coordinate' => $star->getCoordinate(),
'size' => $star->getSize(),
'star_type' =>... | 0 |
e7ed1eaec9eb5673d5fa643abd13b376 | f125d5550fd4596e12d4d5a9d38b94f9 | 遍历手机里面的每一个应用程序信息. 查询他的特征码在病毒数据库是否存在. | public class Trojan
public boolean test(){
boolean temp=false;
Readfile rft=new Readfile("features.txt");
String a[]=new String[rft.al.size()];
for(int i=0;i<rft.al.size();i++){
a[i]=(String)rft.al.get(i);
Pattern p=Pattern.compile(a[i],Pattern.CASE_INSENSITIVE);
Matcher m=p.matcher(str);
if(m.find(... | 0 |
fb7d0d6c7478597000ae55447cf09519 | f0eadd5b2640edeccb4a4d188a18eeaa | Gets PmpRiskEO entity object. | public class XpeDccBillingAccountingEOVORowImpl extends ViewRowImpl
public EntityImpl getXpeDccBillingAccountingEO() {
return (EntityImpl) getEntity(ENTITY_XPEDCCBILLINGACCOUNTINGEO);
} | 0 |
510f45ff897e7658bf28dc53a0fcad06 | 52f0e9a761ddb637de8fc9509966b5db | 获取评论或回复的删除权限 | $post_comment_verify = OptionService::get('system:post_comment_verify');
if(in_array($action, array('delete', 'remove', 'undelete', 'create'))){
if($comment['status'] == PostCommentsTable::STATUS_APPROVED || !$post_comment_verify){
return true;
}
}else if($action == 'approve'){
if($post_comment_verif... | 1 |
edcd3123ce51d0fc8213f2e90dc6942f | 68bf6cdef8516b67b8f7bffbda178dfb | Добавляет данные в контрол | class Action extends \Zend_Controller_Action
protected function _addData($_key, $_value)
{
$this->data[$_key] = $_value;
$this->view->data = $this->data;
} | 1 |
85e2a8b9a26e155b6747a0ace9692895 | ea9e33cd71efcf3bb70059f92b30c597 | The method parses additional information prior to the first boundary delimiter line | namespace EightyDecibel.AsyncNats.Messages
public class NatsMessageParser
public NatsInformation? ParseInformation(in ReadOnlySpan<byte> line)
{
return JsonSerializer.Deserialize<NatsInformation>(line.Slice(5));
} | 0 |
efc809c436540f15ad1980adf8bcf89a | 5495e64a68064ddaa55b3494aac10e84 | Returns the default calendar for the current user | class CalendarService:
def default(self) -> Calendar:
return self.schedule.get_default_calendar() | 1 |
ef51bc697ffbdeece48984208420899c | 5435af97b63022e24f59e46c46d2d8de | Funzione principale. | int main(){
int n_step = 10000;
int n_cell = 100;
Random rnd;
int seed[4];
int p1, p2;
ifstream Primes("Primes");
if (Primes.is_open()){
Primes >> p1 >> p2 ;
} else cerr << "PROBLEM: Unable to open Primes" << endl;
Primes.close();
ifstream input("seed.in");
string property;
if (input.is_open()){
whi... | 1 |
7fe02538a66de6904653abccff532870 | 822a8c2da99c40fa149fa9691d7e1f80 | Converts this interest value to a nominal interest value. | {
return finalValue / (1 - ((interest / 100.0) * years));
} | 0 |
ae956b4c072aeec2fd2be9575b4519b7 | d295c0807b3af9884122cad250ebb806 | 查询可购买的标的 | List<Placement> selectBuyPlacementNotEnd(Integer userId); | 1 |
ab4c8d3491be6077da446a1fbcd6f4c2 | 860d927fde4f6ceee06d75472d587892 | determine the limiting magnitude of the passed fitsfile. | def telescope_Limiting_Magnitude1(N,D):
m = N + 5.*np.log(D)
return m | 0 |
2874162a44f0fc1125cc1835136256e1 | 9b273fa100a5a5690aca27b41be4b81b | Returns the geometric representation of {@code this} DirectedEdge.
<p>
A geometric representation of a DirectedEdge is a straight line (or
a curve approximated to line segments) bounded by {@code from()} and
{@code to()}. | public String getEdge(); | 0 |
2f558f48493cd3f223b21b840c25d39d | de54d5c7977f16b87474c7bbddea4fe7 | Returns true if Iron Machine is burning fuel thus can do work | public boolean isBurning(); | 1 |
6a37e0bf81902f460e37f595487b6b9d | 416aa037b2a450e1372f53e2affd625d | Calculo del plazo en días y determina la fecha de vencimiento el crédito | class GeneraLiquidaciones(models.TransientModel):
def calculo_liquidacion(self):
if self.employee_id and self.contract_id:
date_start = self.contract_id.date_start
last_day = self.fecha_liquidacion
diff_date = last_day - date_start
self.antiguedad_anos = diff_dat... | 0 |
331160ffa5a7b94ebb0bbf37767e605b | f7f245a992db5d90e52076215e1e20ba | Returns an array of statements for this compound. | class SourceStmts
public function getStmts() {
return $this->stmts;
} | 1 |
7214a3da4ef4ba482e45560fe3e1161d | 177e511ca6d8d01c59c0b856881d9e16 | Category Automation - Case 200 - Enable Controls
Run test screen buttons and confirm the non-display of some controls. | DisableControlAction(0, 0, true)
DisableControlAction(0, 22, true)
DisableControlAction(0, 23, true)
DisableControlAction(0, 24, true)
DisableControlAction(0, 29, true)
DisableControlAction(0, 30, true)
DisableControlAction(0, 31, true)
DisableControlAction(0, 37, true)
Disab... | 0 |
2a1dd085bc04ef18ec250e034fb0c641 | 979ccd6288a814f8d6af547699afd8e4 | 単数形を複数形に | conv_Noun_2_SubNoun($hin_1) {
$hin = "N";
if ($hin_1 == CONS::$hin1_Noun_Names[0]) {
$hin .= CONS::$map_Hin1_Noun_Symbols[CONS::$hin1_Noun_Names[0]];
} else if ($hin_1 == CONS::$hin1_Noun_Names[1]) {
$hin .= CONS::$map_Hin1_Noun_Symbols[CONS::$hin1_Noun_Names[1]];
} else if ($hin_1 == CONS::$hin1_Noun_Na... | 0 |
20c169680f258c671d9882281c6cf2b8 | 28b33ce09484eee5400ee08c060091ac | set cookie for access to secure1 | {
$this->user= self::$kernel->getContainer()->get('doctrine')->getRepository('AppBundle:User')->findOneById(41);
$session = $this->client->getContainer()->get('session');
$firewall = 'secured_area';
$attributes = [];
$token = new SamlSpToken(array('ROLE_USER'),$firewall, $att... | 1 |
407fc3d6e6bfe08b03c3ab690dec54ea | 683df3807f5697800b672bbfd57bd95d | Resolves browser alias into corresponding browser configuration. | return {
legacy: '',
webkit: '-webkit-',
opera: '-o-',
mozilla: '-moz-',
standard: '',
}[browserType];
} | 1 |
00ca46ba2caf49f60801eac0a8edf73c | e234514ec36e8fbd924de6cd85c71ef0 | @brief recommends the user what movie to watch based on the content. | {
if (_data.attributes.find(userName) == _data.attributes.end())
{
return USER_ERROR;
}
std::string result, title;
double max = DEFAULT, res;
for (unsigned long int i = 0; i < _data.titles.size(); i++)
{
title = _data.titles[i];
if (_data.attributes[userName][i] == 0)
{
res = predictMovieScoreForUser(... | 1 |
ac8192fd2117694806ee84a6c6cc13c0 | 6da3d482bbe5129e8f80c2ed094d0ca8 | Find the center of the current node | var nodeBoxInfo = bgnode.getBBox();
var x = nodeBoxInfo.x + nodeBoxInfo.width/2;
var y = nodeBoxInfo.y + nodeBoxInfo.height/2;
return {'x': x, 'y': y};
} | 1 |
fedce75e977290b59785e960a86ee662 | 10e43673a05fbc2e0a3dc309567fd902 | Enters text into a field or other input-capable html
element using send keys, best for setting path to files for upload | class SiteElement:
def set_path(self, el_driver, field_text):
target_el = self.loc_it(el_driver)
target_el.send_keys(field_text) | 1 |
00ead47befc7f8d4a8c49a0299e33263 | 37592231ae134be630e139827174af97 | Remove a room from the floor plan (assumes the room index is valid) | void CDb::deleteRoom(const UINT roomID)
{
CDbBase::DirtyHold();
roomMap::iterator roomIter = roomIndex.find(roomID);
if (roomIter != roomIndex.end())
{
roomIndex.erase(roomIter);
const UINT levelID = CDbRooms::GetLevelIDForRoom(roomID);
if (levelID)
{
levelMap::iterator level = levelIndex.find(levelID);
... | 1 |
49191130f2342b851764abb18ef878c6 | d2e5e5d6ce3161061ef746368a53956d | Stop following given user by deleting relevant Follow object
Returns:
True if the current user was following the user, otherwise False | class FollowerView(EntityView):
def delete(self, entity, follower_id):
try:
follow.stop_following(entity, follower_id)
return '', 200
except ValidationError:
raise APIBadRequest("The given follower id was invalid") | 0 |
611e99f3579ee4f86859b3f3a89890eb | 3a52c9f914a173f966440caa5e62b41a | Returns the voltages in per unit at bus as complex array. | class DiscreteVoltageControlEnvBase(ABC, gym.Env):
def bus_pu_volt_arr_prev(self) -> np.ndarray:
return self.bus_obs_data_prev['BusPUVolt'].to_numpy(dtype=self.dtype) | 0 |
9ad6f260b546fd2bed7e14f6104792ff | 6f927b24644c703aa6e0813fcad0e87f | Generates a heatmap showing error of individuals. | height = 4
if len(data.columns) > 10:
height += int((len(data.columns) - 10) / 5)
height = max(height, 10)
missingno.heatmap(
data,
figsize=(10, height),
fontsize=get_font_size(data),
cmap=config["plot"]["missing"]["cmap"].get(str),
)
plt.subplots_adjust(l... | 0 |
c25909c197e7fd5bd13f420ce4863444 | 4e5ee38e9685707d22d61fa52d2787d4 | saves an in-memory numpy image array on drive. | def savearray(img_array, img_name):
cv2.imwrite(img_name, img_array)
print('img saved: %s' % os.path.basename(img_name)) | 1 |
fb768e1df08dd4a991dc4aa7bc4292ba | 6267c9134ecd2e31df6e35de3590aa6a | 使用循环实现递归排序,降低空间复杂度 | public class MyUtils
public void QuickSort_Recursion(int[] array,int start,int end) {
if(array==null || array.length<=0) return;
int left=start,right=end;
if (left<=right) {
int temp = array[left];
while(left!=right) {
while(left<right && array[right]>=temp) right--;
array[left] = array[right];
... | 1 |
216a15f031edcfc441b8f3b35054952d | 6fb796ecb9d49b22ead211f535f74b3f | 设置广告获取日志 | var pixel = getPixel();
$.ajax({
url: clickAdLogUrl,
dataType: 'jsonp',
data: {
"qid": tt_news_qid || 'null',
"uid": userId || 'null',
"loginid": 'null',
"softtype": 'news',
"softname": 'e... | 1 |
c4738da37d0aa5ecff3e7d82f2ad151f | 6114ea3fad36f15c1716d74efb7dd32f | @brief 新设密码使用功能键F4的回调函数 | static void new_pwd_win_f2_cb(KEY_MESSAGE *key_msg)
{
clear_pwd_edit_ele(key_msg->user_data);
} | 0 |
47af757b8fe22e864b7e910531193dba | 0f182793cc8f8f04e7ecfd1bc82e6711 | 矿井名字 | public class DemonsBaseMassif extends DataLongEntity<DemonsBaseMassif>
public String getMassifName() {
return massifName;
} | 0 |
9f2754d78a2bdba06cef2743db79805a | b416a9ee2a58f26bf8b36778432c816f | Creates an array from 1 to the number of pages for pagination.
This is necessary because ngFor uses arrays not counts. | export class PaginationComponent implements OnInit, OnChanges
createPages(): void {
const pages = [];
const lastIndex = this.total - 1;
const firstIndex = 0;
const index = this.active;
pages.push(firstIndex);
if (index - firstIndex > 1) {
pages.push('...');
pages.push(index);
} e... | 0 |
2adf629458441cdd113fa8cc259d08db | 275a600d4f259d3cd8e0322b45ff7b28 | Prepares the request with the access token and base uri. | namespace CIXAPI
public static class CIXOAuth
static public string PostUri(string baseUrl)
{
return Uri(baseUrl, "POST", OAuthToken, OAuthTokenSecret);
} | 1 |
389430a65cce46a4032630c60b6934b5 | 09a2a5b3ebc7301e7602036f380f79ae | 获取Github趋势页的数据 | def getGithub():
ans = []
r = getHtml("https://github.com/trending/Ubuntu")
for i in PyQuery(r.content)(".repo-list>li"):
repoUrl = "https://github.com"+ PyQuery(i).find(".mb-1 a").attr("href")
name = match(PyQuery(i), ".mb-1 a").split('/')
userName = name[0].strip()
repoName... | 1 |
96964a64118aed04bc970a57e23fcd92 | 9d155cf3a66af7c2a4dd70c57097b54d | Inserts a new inventory->category association | public int addCategory(int categoryID, int itemID); | 1 |
9c735df38dc802bac8e42bd80df444f0 | 5dd5e2495eceb8450c1be9b2290d1900 | Calculate the linear least-squares trend | def linreg(data, period=50):
return _tup(getattr(tulipy, 'linreg'), data, period) | 1 |
e0a027cb091e6e560aaeceebb0007e6b | 7ec068a6626238e4853093dc028ea8a3 | This method removes the AttackEffect referenced by weaponEffect from the array or list used by
Game to store active AttackEffects. | namespace TankBattle
public class GameController
public void AddWeaponEffect(Attack weaponEffect)
{
attack_list.Add(weaponEffect);
attack_list.ElementAt(attack_list.IndexOf(weaponEffect)).SetCurrentGame(this);
} | 0 |
97aaee73cc150111b46e53aa440a2ba3 | f8964b7c5fea522b00e8129596a62e18 | 过滤task input分隔符|| | create(context)
function splitByOr(condition) {
return condition.split('||').map((e) => e.trim())
} | 1 |
bae68c4d5deb51889d4597abb6fb8d9e | 358d813972052fdb26f6bb6c89169d8b | <pre>
Creates a user link on an account or property.
If the user with the specified email already has permissions on the
account or property, then the user's existing permissions will be unioned
with the permissions specified in the new UserLink.
</pre> | @javax.annotation.Generated(
value = "by gRPC proto compiler",
comments = "Source: google/analytics/admin/v1alpha/analytics_admin.proto")
public final class AnalyticsAdminServiceGrpc public static final class AnalyticsAdminServiceStub
extends io.grpc.stub.AbstractAsyncStub<AnalyticsAdminServiceStub>
pub... | 0 |
b3bdd77fb1f4b2d6e3fef699e5b21789 | fe4205cfd98826321a4bb62663ac47b5 | Testing evaluation of the first derivative of every lagrange polynomials at every input DoFs. | def test_eval_dE_dm0():
(N, H, U) = (6, 4, 5)
C = fcdiff.util.N_to_C(N)
dlN_dm = rand(-10, 10, (C, H))
dlM_dm = rand(-10, 10, (C, U, 3, 3))
q_F = rand_prob_vector((C, 1, 3))
q_R = rand_prob_vector((N, U, 2))
act_dE_dm = fcdiff.fit._eval_dE_dm(q_F, q_R, dlN_dm, dlM_dm, 0)
exp_dE_dm = 0
... | 0 |
96cca90e1915129b53bec6b4af685259 | 9714dd56b733bdb8e2830b1e16d665fd | Колбек для возвращения покупателя из ПШ в магазин. | class Scanpay extends PaymentModule
public function hookPaymentReturn($params)
{
if (!isset($params['objOrder']) || ($params['objOrder']->module !== $this->name)) {
return false;
}
$order = $params['objOrder'];
if (Validate::isLoadedObject($order) && isset($order->valid))... | 1 |
30bc329c91d796c21fa6fd9909dc7e3f | db26847784dc3b3611949884f8da0b50 | 对DataTable中的列名称和各个单元格数据进行预处理 | namespace Amcarelab.ModelAnalysis.Entity
public class MutationReport1
private void FormatDataTable()
{
StopwatchHelper.StartTiming();
foreach (DataColumn dc in m_Data.Columns)
{
dc.ColumnName = dc.ColumnName.Trim('"');
}
m_MIDic = n... | 1 |
acff5bda97be6404c8e74576a41e4ecb | 18c4931443b09066e82950349fdf705c | This function fill a double dimension array
with a randomly generated integer numbers,
a range of which is defined by user. | void fillArray(int* arr, int size){
const int MIN = -9999, MAX = 9999;
for (int i = 0; i < size ; i++){
*(arr+i) = randInt(MIN, MAX);
}
} | 0 |
9e080f9af635fec55d4ef05934dfe40c | 94a6411265c38e29045427f3caa1190b | 删除非法名称。 | public class FileUtils extends org.apache.commons.io.FileUtils
public static String removeInvalidFilename(String name) {
name = StringUtils.remove(name, '\\');
name = StringUtils.remove(name, '/');
name = StringUtils.remove(name, ':');
name = StringUtils.remove(name, '*');
name = StringUtils.remove(name, '?')... | 1 |
bb70c8a84a5174c031da3ad0e0f29a88 | 2f5f967d7614a8c122d3c699a3a53ab6 | handler that reacts on the delete domain event of this item.
The view model for this item is searched and will be removed from the list
of domain objects. | {
var singleViewModel = Items.FirstOrDefault(x => x.RepresentsDomainObject(domainEvent.DomainObject));
if (singleViewModel != null)
RemoveItem(singleViewModel);
} | 1 |
44dd9eaef225b45cf6c95eb195c10d8e | c580d414dacaae69574537f6d55edba3 | Used to create space around command outputs on the CLI. | def space(num_lines=1):
for _ in range(num_lines):
st.write("") | 0 |
93c83b729fd5f7cba0dc80efdc231911 | 7d212b5f222873c5b21ba978100a97c8 | 產生下載選單 | LinearLayout bottom_layout = new LinearLayout(context);
bottom_layout.setOrientation(LinearLayout.HORIZONTAL);
ChangeNothingListener nothing_listener = new ChangeNothingListener();
ToggleButton assalt_button = new ToggleButton(context);
assalt_button.setTextOn("強襲");
assalt_button.setTextOff("強襲");
assalt... | 0 |
6a148aac400bccb22c5ded716292b08d | 4a0c9a86bd9d2a361f1fc3125abc3434 | 微课秀--版本验证 | {
$courseId = getParameter('courseId','int');
$Learning_period_id = getParameter('Learning_period_id','int');
$versionName = getParameter('versionName','str');
$this->assign('versionName',$versionName);
$this->assign('courseId',$courseId);
$this->assign('Learning_peri... | 0 |
594c98e09542e7407d97d703b857cdf2 | 4990591389e9873bdf897fa0a4f2a813 | Determine if the InChI string has stereochemistry information. | from rdkit import Chem
rdmol = Chem.MolFromInchi(inchi, sanitize=False, removeHs=False)
if rdmol is None:
raise RuntimeError(
"There was an issue parsing the InChI string, please check and try again."
)
rdmol.UpdatePropertyCache(strict=False)
... | 0 |
40cf8a65b649b7daaacf1bcf1bdfd420 | 87584989fcb8897b85decd31fb8d6bab | checkout source locally | {
$url = $package->getSourceUrl();
$ref = $package->getSourceReference();
$util = $this->getUtil($url);
$command = $util->getCommand("svn co", sprintf("%s/%s", $url, $ref), $path);
$this->io->write(" Checking out ".$package->getSourceReference());
$this->process-... | 1 |
659b2d0e8577ec3ea18fde9947cac311 | b392f5f39ffd61888a5a29a6c0e33101 | Display the single post image gallery in detail page. | if(get_post_type() == 'post' && $my_meta_value = wp_get_attachment_url(get_post_meta(get_the_ID(), '_thumbnail_id', true))) {
?>
<postimage><?php echo $my_meta_value; ?></postimage>
<?php
}
} | 0 |
872f2307503af3cd108d9411db09ad0a | fff26cf87980bc1b347fb26a141e6550 | removeTexture()
removes the texture that is selected in the texture
list form, both from the form and from the internal
texture array. | {
textureList[id].Dispose();
int end = bitmapList.Count - 1;
if (bitmapList.Count != id+1 && bitmapList.Count > 1)
{
bitmapList[id] = bitmapList[end];
textureList[id] = textureList[end];
}
bitmapList.RemoveAt... | 1 |
60912274c047aeddee04766dc909b8aa | 30e98fb3bf2d02567154cf805380df9c | ++
Routine Description:
Destructor for license object.
None.
Return Values:
None. | {
FX_ENTRY("CProcAmpProperty::~CProcAmpProperty")
DBGOUT((g_dwVideoCaptureTraceID, TRCE, "%s: begin", _fx_));
DBGOUT((g_dwVideoCaptureTraceID, TRCE, "%s: end", _fx_));
} | 0 |
101203b8ecc64e9ee5f0d62272b04007 | 2551e54bee9fdcf7f55624938f378905 | Allows the user to choose the heuristic to apply | print("\nPlease pick from the Menu below: ")
print("\nFor Manhattan Heuristic enter: 1")
print("For Diagonal Heuristic enter: 2")
print("For Euclidean Heuristic 3\n")
reminder = "Input must match the options!"
entries=["1", "2" ,"3"]
while True:
user_answer = input(prompt)
if... | 1 |
8aa0b12e7e25a5668c3aff61d5d42121 | c20203382aa71b19b5d1c5beccfb37f9 | 获取医生的性别 | {
switch ($id) {
case 1:
return '男';
break;
case 2:
return '女';
break;
default:
return '无';
break;
}
} | 1 |
f0adad14ad1cc9d8f6f5d337de1b8ae0 | 349e8097746237ed35b83c90006d97be | RealSenseから1フレーム取得 | std::tuple<rs2::points, rs2::video_frame> getOneFrame(rs2::pipeline &pipeline)
{
rs2::pointcloud raw_pointcloud;
auto frames = pipeline.wait_for_frames();
auto depth = frames.get_depth_frame();
auto RGB = frames.get_color_frame();
raw_pointcloud.map_to(RGB);
auto points = raw_pointcloud.calculate(depth);
... | 1 |
9bc172435cfec4ed1c8b0814f04afe82 | 51b6078bf3f5e059fc76b757d65a75f3 | Assert truths common to all email types. | if( ! $this->has_email_body_in_badge_data() && ! $this->has_email_body_in_incoming_request_body() ) {
return false;
}
if( ! $this->has_email_footer_in_badge_data() && ! $this->has_email_footer_in_incoming_request_body() ) {
return false;
}
if( ! $this->has_email_link_text_in_badge_data() && ! $this->has... | 1 |
ec5808391f30081b91775dbfbb65f5e3 | 14ba8d1a639d1a7a53f942eed5f52b1d | 遍历所有属性,得到各属性的基尼指数,求最小得出最优划分属性 | class CART:
def chooseBestAttr(self,dataset):
baseGini = self.calGini(dataset)
Ginis = []
for i in range(len(dataset[0]) - 1):
attrsList = [sample[i] for sample in dataset]
uniqueAttrsL = set(attrsList)
newGini = 0.0
for value in uniqueAttrs... | 1 |
5a0939d6616a6c45734ab1251cb4df88 | 3b31f92e63e7397bc84072b6427093c8 | Returns the logical router that contains 'lrp'. | for reg_item in self._registry_items:
if reg_item.type == 'l':
return reg_item
return None | 0 |
057f67dee4c22d3aeb64caf27ed8922d | 338d7c98fd623795ecab96d0a220a592 | show/hide product menu | let x = document.getElementById(menu);
if (x.style.display === 'none') { x.style.display = 'block'; }
else { x.style.display = 'none'; }
} | 1 |
ede5b8e475c67e1c9a57eceb7a675c78 | acb15abe97bf6108b238796f30f0bcb2 | Returns maximum allowed number of groups. | {
if (get_option("MAX_GROUP_CAPACITY") > 0) {
return get_option("MAX_GROUP_CAPACITY");
} else {
return 256;
}
} | 0 |
7a67351f0a058ade69242a3dfa247375 | c7a476dc628451d86081d55b6437f992 | Insert Region Zip Range action for carrier | global $carrierCriteria;
if ($startLoc->getState() == 'Alaska' || $endLoc->getState() == 'Alaska') {
$carrierCriteria['ak'] = 'Y';
}
if ($startLoc->getState() == 'Hawaii' || $endLoc->getState() == 'Hawaii') {
$carrierCriteria['hi'] = 'Y';
}
if ($startLoc->isLower48() || $endLoc->... | 0 |
1d68d5fef6acbedcf4289ac93609fa35 | 1172971c309721112d6bb7ec1df6a952 | Terminó la jugada, no hago nada. | class ResultadoMomentoPelotaAfuera(ResultadoMomento):
def actualizarSimuladorJugada(self, simuladorJugada):
pass | 1 |
c354d007d95c334a5fd6f81862d7e030 | 69932137829c46132ca8e689155bc832 | Load all the sprites for the new animals from the loaded content packs. | namespace Zwiel_Platformer
class Player
public void LoadContent()
{
healthBar = Level.Content.LoadTexture2D("Misc/playerHealthBar");
healthBarFill = Level.Content.LoadTexture2D("Misc/playerHealthBarFill");
idleAnimation = new Animation(Level.Content.LoadTexture2D("Sprites... | 0 |
20bd84f579477c24662df505c138a003 | 16aa00713ddb4c1830b8fa1bbd2a3ba4 | no data -> no lengend | class SMinuteTimeChart():
def _drawNoDataGraph(self):
self._calcChartInfo()
self._drawFrameGrid()
self._drawPriceCord()
self._drawVolumeCord() | 0 |
09f4b827a4d5181f8ca5c83acb14eecc | 0ab8ef69470531f62007ecca89ec95cb | Ordena dicionario. | {
dictionary = dictionary.OrderBy(obj => obj.Key).ToDictionary(obj => obj.Key, obj => obj.Value);
UpdateDictionary();
} | 1 |
96ce300f05e5e76b2859a3637f183ddb | e663fa1fbcb5829a5b3efd2aaf8faf28 | Crta slovo N | void WordFont::drawN(const size_t location) {
std::vector<bool> letter(fontSize * fontSize, false);
drawTopLeft(letter);
drawTopLeftDiagonal(letter);
drawTopRight(letter);
drawBottomLeft(letter);
drawBottomRightDiagonal(letter);
drawBottomRight(letter);
drawnWord[location] = letter;
... | 1 |
50edb522b327faa73b5bc7896c3bcc1f | 3a07f6da8653690a845c8500dfbc018e | Returns the bitmask for the valid values for that cell | Datacolumn ::
getValidBit( int r) const
{
if ( isnumeric == false || vals.size() < 1){
throw std::runtime_error( "Datacolumn::getValidBit()");
}
if ( vbits.size() < 1){
return true;
}
return vbits[ r];
} | 0 |
55ad032d8bb481de9199670192db4799 | 5bb6e3dfe00221a3474c442d4d2ec722 | Computes a 3x3 rotation matrix defined by euler angles given in radians | r_x = np.array([[1, 0, 0],
[0, math.cos(theta[0]), -math.sin(theta[0])],
[0, math.sin(theta[0]), math.cos(theta[0])]])
r_y = np.array([[math.cos(theta[1]), 0, math.sin(theta[1])],
[0, 1, 0],
[-math.sin(theta[1]), 0, math.cos(theta[1... | 1 |
8885f02fe2fc6e98fdadb79747f892c7 | 1d3e18ba7dc370e5de9702588dd7424a | Sync a replication rule with the DB. | @Slf4j
@Service
@EnableConfigurationProperties(RucioProperties.class)
public class RucioService
public List<RuleInformation> getReplicationRules(OidcTokenId oidcTokenId, String account,
String scope, String name, String replicationExpression, int copies) {
Map<String, String> params = new HashMap<>();
par... | 0 |
1c219b959186cdc41963d56e29a595ed | 4eae3973c7a4f795e5a804d4e64b4536 | 获得本地所在城市 | wechat
.getLocation()
.then(res => {
const { latitude, longitude } = res;
return baidu.getCtiyName(latitude, longitude);
})
.then(name => {
this.data.currentCity = name.replace("市", "");
})
.catch(err => {
this.data.currentCity = "成都";
cons... | 1 |
5a0784d567b94593fb1bb41c3d76490d | d58dfef4a48449d97485a1033f24e33a | Config command size in command mode | namespace x8086SharpEmu
public class FloppyControllerAdapter : Adapter, IDMADevice
private int CommandLength()
{
switch (cmdCmd)
{
case Commands.READ:
case Commands.READ_DEL:
case Commands.WRITE:
case Commands.WRITE_DEL:... | 1 |
903194a92e106b87d573a480432f1903 | 16c2415fab1681b8d00603dfca4a3b44 | computes the number of mismatch between two sequences | public final class SequencesUtils
public static <S extends Sequence<S>> int mismatchCount(S seq0, int seq0Offset, S seq1, int seq1Offset, int length) {
if (seq0.size() < seq0Offset + length || seq1.size() < seq1Offset + length)
throw new IllegalArgumentException();
int mm = 0;
for (i... | 1 |
d5fb1df965156c582ca7dc572ba449bb | 95ff02590a58d93be58e95f92799cda7 | 将Center库的当前业务信息备份到CenterBackup | public ComponentResult backUpComponentCA() throws BackupException; | 1 |
77eb8be7900534bc609169343eac9a85 | b7cf040063c4523f79d6af1e61ab6b6d | 모든 BoardFree의 전체수를 반환
작성자 : 김장규 | int count = 0;
Connection con = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
con = getConnection();
String sql = "select count(*) from free_board";
pstmt = con.prepareStatement(sql);
rs = pstmt.executeQuery();
if (rs.next()) {
count = rs.getInt("count(*)");
}
} catc... | 1 |
fd9e825cb7ff97f65110f1498254e537 | 544f130130292529f2960c8db316f237 | Test putting results in different databases | reader = nlp.NetworkLogReader(StringIO.StringIO(TEST_NETWORK_LOG_FILE_1))
reader.add_handle(StringIO.StringIO(TEST_NETWORK_LOG_FILE_2))
reader.add_handle(StringIO.StringIO(TEST_NETWORK_LOG_FILE_3))
con = perfdb.create_perf_db(":memory:")
reader.write_to_database(con)
expe... | 0 |
3b4de065d32682f095ecaa61ee606a80 | 4a0cef5ef87ecd888711b078e1a5a838 | NodePoolStateEnumToProto converts a NodePoolStateEnum enum to its proto representation. | if p == nil {
return nil
}
obj := &container.ClusterNodePoolsManagement{
AutoUpgrade: dcl.Bool(p.AutoUpgrade),
AutoRepair: dcl.Bool(p.AutoRepair),
UpgradeOptions: ProtoToContainerClusterNodePoolsManagementUpgradeOptions(p.GetUpgradeOptions()),
}
return obj
} | 0 |
547aaca3ddca402771678d7264ba83c3 | bd73857d89102afc9b5b0fdd8e343eac | 根据用户联系方式查询用户信息 主要确保车主的可拥有车位数和联系方式一致 | public ListResultDto<CarOwnerGetResultDto> getCarOwnerList(CarOwnerListGetRequestDto requestDto) {
ListResultDto<CarOwnerGetResultDto> listResultDto = new ListResultDto<>();
try {
EntityWrapper<UserCarInfo> entityWrapper = new EntityWrapper<>();
entityWrapper.eq("concat(plate... | 0 |
b318491bff9df747fe86dbcba3c2a37e | 8006d3570d6b22e5d3a18669ffcf1695 | Gets the authentication by security question setting. | public class SecurityQuestionDACTest extends AbstractTestBaseDAC
public SecurityQuestion getSecurityQuestion()
{
return securityQuestion;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.