query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
0f8c5d0e60be6eeabcd9d988e7bd4421 | 9e870541753832eaea6c58e1d62da82b | Gets all the routes that connect the given airports. | @Component
@AllArgsConstructor
public class SkyScannerFacade
public List<Flight> getFlightConnections(String originAirportCode, String destinationAirportCode, LocalDate date) {
return flightConnectionsResultMapper
.mapToFlightConnectionsResult(skyScannerClient.getFlightConnections(originAirportC... | 1 |
2feb3c8c0323f515fc31badca07a374c | bb0afef6b12ad8fc9c6076762c8bc9a5 | Obtem todos os medicamentos armazenados | class MedicineController extends Controller
public function index()
{
$medicines = Medicine::all();
return response()->json([
'success' => true,
'data' => $medicines,
]);
} | 1 |
fd028451d47181325802545a6f83c179 | 520940b3a312246a2c670b03de72a19b | Separation of space b/t siblings around a unit circle | class SectorsOfACircle(nn.Module):
def __init__(self):
super(SectorsOfACircle, self).__init__() | 0 |
00d48cd69e97fbfb350fa36584ef2923 | e695c052c658aad5f9e5e422b2a308c7 | Постепенно появляется черная заставка и сообщаем сцене, что игра закончена | end_message = games.Message(value="Game over",
size=90,
color=color.red,
x=games.screen.width/2,
y=games.screen.height/2,
lifetime=4... | 0 |
e2c3d540b14b6db037fca399c87cb0a2 | dfa827b073dd893464e6dd7ddfb2ca25 | Inform VBox that we will stop supplying it with dirty rectangle
information. This function is intended to be called when an X
virtual terminal is disabled, or the X server is terminated. | void
vboxDisableVbva(ScrnInfoPtr pScrn)
{
unsigned i;
VBOXPtr pVBox = pScrn->driverPrivate;
TRACE_ENTRY();
for (i = 0; i < pVBox->cScreens; ++i)
VBoxVBVADisable(&pVBox->pScreens[i].aVbvaCtx, &pVBox->guestCtx, i);
} | 1 |
1073a5e79970399f3d573f1a7e19f069 | 6c08de96803dc48a774f7db808346bbb | A wrapper for running commands inside the virturalenv | env = home_path
source = 'source %s/jobservice/bin/activate && ' % env
run(source + command) | 1 |
86eca5679ce56edc3bf3b8d3fd5f8d24 | 1e5e7131ea2b4e509c02f4d422bc1775 | 是否进入页面就加载数据 | export class HomePage
onPageDidEnter(){
if(this.index == true){
this.getRes();
this.index = false;
}
} | 1 |
db6ad434ded8784dc8a2cead2f159e77 | 0c98f6395d4f0f0663f76ed8fbfc11e0 | Filters documents that have fields that match any of the provided terms (not analyzed). | {
$query = new MultiMatchQuery($fields, $term, $attributes);
$this->append($query);
return $this;
} | 1 |
ea564b5d3f9a0e2a01895fb1c6a3a67c | 5362f7559c81c67dbcfc1899bc7fa0db | タイルに経路番号をセットする | namespace nitkagoshima_sysken.Procon29.Visualizer
public class Calc
public void PutTile(Team team, AgentNumber agent) => Field[Agents[team, agent].Position].IsTileOn[team] = true; | 0 |
720b69bb2ed1e397f2a4b9a92548ce32 | 674eb09f9bc52e8e39f59d87de078302 | Determine le noeud voisin ayant la plus basse valeur (la date de visite la plus vielle) | int i, imin;
event min;
for (int i = 0; i < Ech.taille; ++i)
{
if (Ech.tab[i].etat == 0)
{
min = Ech.tab[i];
imin = i;
break;
}
}
for (int i = 0; i < Ech.taille; ++i)
{
if (min.date > Ech.tab[i].date && Ech.tab[i].etat == 0)
{
min = Ech.tab[i];
imin = i;
}
}
Ech.tab[imin].etat = 1;
... | 1 |
78298bc992def32410d5ca1f96b4aa4b | 189cb5bd012e67baf47f48e42fcbd85e | IntZD不等于0,说明从父窗体传来了主键ID,
加载实体信息做修改操作。 | namespace DataQuality
public partial class ZDCrl : UserControl
private void btnEdit_Click(object sender, EventArgs e)
{
try
{
int selectRow = (int)dataGridView1.SelectedRows[0].Cells[0].Value;
if (selectRow > 0)
{
ZD... | 1 |
133dc1b6b65975e257ad72bb63f14515 | 2bbc45d31f405ea82afe5e47b58e0e18 | Keep track of the arguments that are being passed to wp_nav_menu(). | function my_wp_nav_menu_args( $args = '' ) {
$args['container'] = false;
return $args;
} | 0 |
db67db80b6bc642a603ba35959ef8eae | 51de45e027c63ce348335318f0f89572 | To get test data iteration value from config.properties file | public class GeneralSettingForm extends BasePage
public String getNumberIterationShow() {
return projectNumberOfDoneIterationsToShowTestField.getAttribute(ATTRIBUTE_VALUE);
} | 0 |
f120ae7dedcad08f626015ea1c48669d | 214684922171abf197f85f1cb84dd51f | Returns the first server on list. | class TaskContainer
public function getFirstServer()
{
return head($this->servers);
} | 1 |
caa6279b4354872992be4084bb6e93b9 | 9d6855501148e423ca46ad46c63594dc | Format a line in the directory list based on the file's type and other attributes. | mode = s.st_mode
perms = array.array('c', '-'*10)
ft = stat.S_IFMT(mode)
if stat.S_ISDIR(ft): perms[0] = 'd'
elif stat.S_ISCHR(ft): perms[0] = 'c'
elif stat.S_ISBLK(ft): perms[0] = 'b'
elif stat.S_ISREG(ft): perms[0] = '-'
elif stat.S_ISFIFO(ft): perms[0] = 'f'
elif stat.S_ISLNK(ft):... | 1 |
f7487e7a4f8490f25f304e9f9ed6de7c | 9f9ac2c8c0b37500d7886ff3c2da4a63 | Reset(self: SecurityCache)
Reset cache storage and free memory | del self._security_level
del self._key_dek
del self._s_enc
del self._s_mac
del self._s_rmac
del self._s_mac_inst
del self._s_rmac_inst
del self._mac_chain
del self._enc_ctr | 1 |
848198c585cbb5dbd808f10b5a69e7e9 | 84b90ab3fb107b084ea0d25470230446 | Create new instance of element resolver. | if (typeof urlOrOptions === 'string') {
this.resolverUrl = urlOrOptions;
this.fetchImplementation = this.getDefaultFetchImplementation();
} else {
this.resolverUrl = urlOrOptions.resolverUrl;
this.fetchImplementation = urlOrOptions.fetch || this.getDefaultFetchImplementation();
}
} | 0 |
a633d1d389e8f94f86aa568137628707 | 1faecb6997e5fe54be133d109fefcfab | Plot t-SNE of the encoded signatures color-coded with the labels | class Initialization(object):
def plot_signatures(self, bootstrap=None, init=None):
if init is None:
init = 0
plot_signatures(
self.S[..., init].reshape(3, 3, -1, self.S.shape[-3], self.rank),
bootstrap) | 0 |
5333a667ed092ff9cace39107ee76020 | 3b5584b4720c8c0f7fb99f0ae0a813ab | Get entity type element status
Returns true if entity is an element, false otherwise. An element may
contain either data or other elements and is used for tag representation. | class BEMHTML{
static function is_elem($ctx){
if(is_array($ctx))
return array_key_exists('elem', $ctx);
return false;
} | 1 |
24205a9a3c050dea55927f2824155954 | a2aab21d515882689447065a9e3d3442 | Gets an absolute path, given a package ID and the relative path inside the package. | namespace Rotorz.Games.EditorExtensions
public static class PackageUtility
public static string ResolveAssetPath(string packageName, string relativeFolderPath = null, string assetFileName = null)
{
CheckPackageNameArgument(packageName);
CheckRelativeFolderPathArgument(relativeFolderP... | 1 |
176e049b825d41ceb05318cbf6fe0dfc | ba144b5a8e36b38a7e360f5c817823e6 | Sets the first merchant defined field. | class EntryExecTranPayEasyInput
function setClientField1($clientField1) {
$this->execTranPayEasyInput->setClientField1($clientField1);
} | 1 |
3d97cc0ca413563c47a6590ab00cc86a | 6b066d7d4ad8a0722e24d719c95ffcf1 | Sets a timer which executes a function or specified piece of code once after the timer expires. | namespace EngineCore
public class TimeModule : Singleton<TimeModule>
public void SetTimeout(Action fun, float time, bool loop = false, bool canPause = true)
{
SetTimeout(fun, time, -1.0f, loop, canPause);
} | 1 |
0761136fea263551927cc909efd6396b | 9b747ea4190387ad9d0fcca4a1b76cef | convert a dictionary of raw frequencies to probabilities | def add_freqs(count_dict):
allcounts = count_dict.values()
total = float(sum(allcounts))
for (k,v) in count_dict.items():
count_dict[k] = v/total
return count_dict | 1 |
68740fb225d75d0c55496e8d9e3654aa | d3e1fec45f57891e55e2efe91b205ba2 | 通过学号获得一卡通卡号 | String selectIdNumberByInId(String inId); | 1 |
cb9acaf21b13fb2a6161061499833a5d | 0c3a486bd3f15d98970e17383d6dfab2 | Unsets surcharge id field. | class WP_List_Table_Helper extends WP_List_Table
public function unset_id_field() {
if ( array_key_exists( $this->primary_col, $this->columns ) ) { unset( $this->columns[ $this->primary_col ] ); }
} | 1 |
b9ccbe8de5f2825058e349ebea50e968 | 25b5332818d0fa5bd95b6971def208c3 | Фиксирует транзакцию | class Transaction extends Base
public function begin()
{
$this->_count ++;
} | 0 |
2e080c5cb1b26674d0705468b51ff365 | e476e0284e8a43918b8730a1b7259d2b | 종료된 방의 정보만 가져오는 메소드 | @Repository
public class ReservationDAOImpl implements ReservationDAO
public List<Map<String, Object>> getEnd(String timeStr){
return sqlSession.selectList(namespace + ".getEnd", timeStr);
} | 1 |
a1e4efe95b7eeb3158e28905893ef087 | 16007856ece16497b3401e1b13a13626 | 获得信号的周期 | double FollowerModule::getPeriod()
{
return m_period;
} | 1 |
fead4c1d8673e2ac4150cab81e657fc7 | 85cec2553d643149c2428686090da2f6 | 解析spiderservice返回的ip列表 | {
if (strpos($serverIpListStr, static::CHAR_DIVIDE)) {
$list = explode(static::CHAR_LINE, $serverIpListStr);
$serverIpList = [];
foreach ($list as $vo) {
if (!strpos($vo, static::CHAR_DIVIDE)) {
continue;
}
... | 1 |
61f53e1a5e6fa8a47c1e398591c6887c | 03b7629b5b0af941e39c58fb946e4af2 | Checks that the specific model version is truly associated with the model attribute
that is specified. | class VM
checkAttribute(node) {
return node.getAttribute("y-model");
} | 0 |
262fb60838aca669aa997b464a5df0ee | f72d0aa5609955e8652f10f44a79985c | compile cuda source file and execute it | class PycCompiler(BaseCompiler):
def compile_one(self, src_file, dst_file):
code = self._template.format(src_file=src_file, dst_file=dst_file)
run_cmd_args(self._interpreter, '-c', f'"exec(\'{code}\')"') | 0 |
c5de788af7fb2f0c01e781a84826defb | 7dd165392c09f59770c51b6982d8ec3f | ==== Constructor ====// | AudioData::AudioData(int id, const string& name, const string& filename)
{
this->id = id;
this->name = name;
this->fileName = filename;
} | 1 |
36c3af50a467711ebb2aaf2fe5292e42 | 6f276f26dbaa9d6d611e2cfc4291c3af | Returns the chain head. | namespace BitSharp.Core.Storage
ChainedHeader GetChainTip(); | 1 |
71ef376517509ef94fb5d5a8c7a9e859 | 5984ff308a2b53985513d028f1455993 | tests that __unicode__ or __str__ method of all models with more than one record does not return empty string
these methods used for history log | class CCenterTests(TestCase):
def test_model_unicode(self):
not_for_test = ['SystemParameters', 'ClinicalDomainProperties', 'Vpo', 'VpoCommon', 'VpoEHRAgentDomains', 'VpoPPOL',
'MyHROrganizationsEntity', 'PatientDetailsSectionOrdering','ParticipantListBasedPAAModel', 'OrderingFacilitie... | 1 |
0c356172ad547086ad37734318f9b786 | 9ada32b79fec1248427d7e78e832be58 | When the user clicks on any of the related companies buttons, close dialog and fill in search | export class AdminResetPasswordComponent implements OnInit, AfterViewInit
onCompanyItemSelect(value: any) {
this.userlogemail = '';
const generatebtn = $('#generatepasswrd');
generatebtn.attr('disabled', 'disabled');
this.fetchCompanyUsers(value.text);
this.userDisabled = false;
} | 0 |
134a6b7d9f8a64e66a5fe9768526f2f6 | 0d54dda1704921ddfc4c772de947f7b1 | Reset all component holders // | {
std::unordered_map<string, Component *>::iterator com = componentsCamera.begin();
while (com != componentsCamera.end())
{
delete com->second;
com++;
}
componentsCamera.clear();
com = componentsPhysics.begin();
while (com != componentsPhysics.end())
{
delete com->second;
com++;
}
componentsPhysics.cl... | 1 |
01389105e6ecfc6ea71eecbce0c192f9 | 7137eacefc0004606fe562044f0f36be | Process hosts and detect invalid certificates. | SSL *ssl;
char *host;
{
X509 *peer;
char peer_CN[256];
if(SSL_get_verify_result(ssl)!=X509_V_OK)
berr_exit("Certificate doesn't verify");
peer=SSL_get_peer_certificate(ssl);
X509_NAME_get_text_by_NID
(X509_get_subject_name(peer),
NID_commonName, peer_CN, 256);
if(strcasec... | 1 |
0480b23236aaf820fe9a8dfcc87f39f1 | 429043e5d0d16b7dbb378d3555b4a23f | Get array of Range from given string Range
Delimiter "," | var err error
result := &Range{range_: ranges, segs: nil}
for _, seg := range strings.Split(ranges, ",") {
points := strings.Split(seg, "-")
if len(points) < 2 {
if points[0] == "" {
continue
}
a, err := strconv.Atoi(points[0])
if err != nil {
return nil, err
}
result.segs = append(re... | 1 |
8d845d0b05c658ba9f1936e73f456438 | d581175666312c3ca5231910af493354 | Get recent tweets from local file if they exist | class TweetsAction
def twitter_tweets
@twitter_tweets ||= TwitterService.new(get_with_hashtag, get_hashtag_last_id).import!
end | 0 |
53c820043fb2642b7b055c59ad1252ca | dd56f7a7fb17b4dddbde8ecbd6eb8031 | While the jumping animation is active, update at every frame the vertical position
according to the physical law of x(t) = v0 * t + 1/2 * a * t^2 | void anim() {
if (jumping) {
jumpOffset = 3 * jumpCounter - jumpCounter * jumpCounter;
jumpCounter += 0.07;
if (jumpOffset < 0) {
jumping = false;
jumpOffset = 0.0;
jumpCounter = 0.0;
}
}
} | 0 |
85bf329987ed582bfd4cc7f46bb841c9 | 9cdf8e89513cdb0c3bc07b72c2a7e7ea | DataValidator constructor. | {
$this->emailValidator = new EmailValidator();
$this->allowedVarsToSerialization = ["name", "contact", "permissionReminder", "useArchiveBar",
"campaignDefaults", "notifyOnSubscribe", "notifyOnUnsubscribe", "emailTypeOption",
"visibility", "doubleOptin", "marketingPermission... | 0 |
b786951c0b54d2024ef56be5ae88c7c2 | fc2a87ecaa635f778a3c07ae13291792 | Returns whether there is a unique maximum confidence value above
threshold. | def uncertain_fraction(y_true, y_pred):
return K.cast(
K.equal(K.max(y_pred, -1), y_pred[:, -1])
, 'float32') | 0 |
e0a5f3ed32160895ff40ff98ea60d6f4 | e02e6442be2980ac18e1d3db5572b189 | BuildMagnet builds a magnet link from an info hash and a static list of trackers. | var magnet = ["magnet:?"];
if (file && file.hash && file.hash.tree_tiger) {
magnet.push("xt=urn:tree:tiger:");
magnet.push(file.hash.tree_tiger);
}else return;
if (file.size) {
magnet.push("&xl=");
magnet.push(encodeURIComponent(file.size));
}
if (file.name) {
magnet.push("&dn=");
magnet.p... | 0 |
ed50a80a95507b58379ce273a7ae1c25 | fe5d8b9646e56b46d1bef817cc25dabe | 生成require一维数组文件 | function require_one(array $array, &$hit = null){
foreach($array as $file){
if(is_file($file)){
$hit = $file;
return require_once $file;
}
}
Think::fail_error(ERR_NF_FILE, 'require_one: 找不到任何一个文件:' . implode_l("\n", $array));
} | 0 |
b260b0ed590c0b9725e69d426edcb1cb | ac85781611825755bd4d021832d3e8d7 | convert all state abbr to full | class EventsController
def to_state(x)
states = {
'AL' => 'Alabama',
'AK' => 'Alaska',
'AS' => 'America Samoa',
'AZ' => 'Arizona',
'AR' => 'Arkansas',
'CA' => 'California',
'CO' => 'Colorado',
'CT' => 'Connecticut',
'DE' => 'Delaware',
'DC' => 'District of... | 1 |
55a0f13c93d9f5750160ec6c3e5ba139 | 900bebe0691d0accb4c3f3bf6dbb9dcd | 检查是否抓到物品 | public class GIceTable implements IDrawable
public GPickable checkItemPickup() {
if (item != null && !iceTable.containsItem()) {
GPickable pickalbeItem = this.item;
this.item = null;
if (pickalbeItem.isUseableItem())
return pickalbeItem;
}
retu... | 1 |
14b365b985f60b5ed35ee31cbca6ccb9 | f3c81dc3b0b54a2e0d0a882692ebb7f1 | Given a clothing item the user wants to purchase, also recommends other clothing items that share
a lot of similar traits. | def recommend_product(items):
sales_df = pd.read_pickle("./data/sales.pkl")
items_in_cart = sales_df[sales_df.productid.isin(items)][['productid', 'brand', 'category', 'subcategory', 'price']].drop_duplicates()
print("\nItems in cart:\n",items_in_cart)
cos_score_df = pd.read_pickle("./models/cosine_simi... | 1 |
f8773ef009191aaa38c98776a7a56d88 | 65c2247439cced8dbf60c4e6d28f619f | Make the enemy invulnerable for a set amount of time | this.ability.immune = true
setTimeout(() => {
this.ability.immune = false
}, duration)
} | 1 |
33a4cb1ebd4d3425e1681226ec492516 | 43642d777bf4654380924ef702216837 | Sets the reporet count. | public class GameStats : MonoBehaviour
public void SetRep(float setAmount, Countries c)
{
compStatus.SetRep(setAmount, c);
} | 1 |
5abb0311377bfe67ad2b36a63c55f0e8 | c8dfaf0c8f530f285e37e6fdfc002614 | ● 卡片數量 | class NoddyPile
def no_of_cards
@card_list.no_of_cards
end | 1 |
f533cdd9c6e2dc80a84d9d73b2faa8f6 | 5f026e4164e011e8596600893ea17d83 | ログインIDと時間マスターテーブルの勤務開始時間を受けとり、出席状況と勤務開始時間をテーブルに記録 | function insertAttendanceSubmission ( $staffNo, $workYears ) {
$con = getConnection();
$insSql = sprintf('insert into attendancesubmission
(
staffNo,
workYears,
submissionStatus,
... | 0 |
5b4bb21b697952857077a29182af72ac | 78ebac93889fdf17e50c24dbd5665008 | 更新課程是否可重覆排課 | namespace LiXinBLL.PlanManage
public class Tr_YearPlanBL : ITr_YearPlan
public bool UpdateCo_Course(Co_Course model)
{
return YearCourseDB.UpdateCo_Course(model);
} | 0 |
27815a68d16346ec7a8d5ef41e3fe96d | 1b35bea6c3fee47bd5a54260bedb6e41 | Prevent Tank Shell explosion suicide | {
switch(currentState)
{
case HEALTHY:
currentState = TankState.EXPLODING;
stateCounter = 0;
break;
default:
break;
}
} | 0 |
d6bd27c1ea7410c28263f62043fde39a | 5b872ef21c9b93aaee89847b19c234a4 | 格式化充值类型 | function formatType(value){
if(value*1==1){
return "盘盈";
}
if(value*1==2){
return "盘亏";
}
} | 0 |
30deaf2390781a7dd2cda2147615571e | 83f9dede1f35575fd99f2b237b80f6f7 | Helper object that can be used to propogate server trace state. Typically over different threads. | public abstract class AbstractMediator implements Mediator, AspectConfigurable
@Override
public int getTraceState() {
return traceState;
} | 0 |
8ca8c737f02e193dbff64743fb9a77c4 | cd5aeebbbec0c5aa77e4f870c45860ad | Shoot a bullet from an entity | {
var translation = localToWorld.Position;
translation.z = 0;
var bulletstatus = GetComponent<BulletStatusData>(prefabEntity3);
bulletstatus.BulletSpeed *= (multiplier / 5.0f);
var entity = commandBuffer.Instantiate(prefabEntity3);
commandB... | 1 |
6c591412563b55e9353df73bf2111375 | 4d7683ce47fa84c720139b819f03edd4 | Test if deletion works and if it considers if there are dependencies to other objects | rel = all_models.Relationship
control = factories.ControlFactory()
control_id = control.id
revision_c = all_models.Revision.query.filter(
all_models.Revision.resource_id == control.id,
all_models.Revision.resource_type == control.__class__.__name__
).order_by(all_models.Revision.id.d... | 1 |
7cd16091226678159692e17cfdbeb53f | 1d508677427989eac371f564589adfd8 | Set flags in an object of type of_meter_features_stats_request. | void pushMeterFeatures(DeviceId deviceId,
MeterFeatures meterfeatures); | 0 |
678edaa32e3858dec38d34679a8326a2 | 1e47b020737ca1cf16917d9dd510fd31 | 获取收支统计金额 incTotal:收入 expTotal:支出 | $sql = 'select SUM(in_amount) as in_je,SUM(out_amount) as out_je ';
$wh = $this->get_list_where($filter);
$sql_main = $wh['sql_main'];
$sql_values = $wh['sql_values'];
$sql .= $sql_main;
$data = $this->db->get_row($sql,$sql_values);
$data['in_je'] = $data['in_je']?$data['in_je']:'0.00';
$data['out_je'] ... | 1 |
9cbc2f1b0421253f8e096c43f04a81d6 | eeda6c452fd53dccce41ed6c725c73d5 | This is used to run operations. | class BaseOperat():
def run(self):
pass | 1 |
744d3c718ac26c20500a60d25778e90d | 3d6cfe57460c45771c8136962dbe6051 | Create content values for the trailers of the movie currently displayed | class Post(models.Model):
def content_trailer(self):
self._bootstrap_content()
return self._content_trailer | 0 |
e364395609b85ab3da608a7a7b47f335 | e1c78718f322e793c1715491a1e5d4b4 | Check if there are any resources that can be assigned to user and, in that case, assign it to him. In the other case, the user go to state WAITING_RESOURCES. | public abstract class WaiterAgent extends GenericWaiter implements Waiter{
public boolean pickAndExecuteAction() {
if (wantsBreak) {
askForBreak();
return true;
}
try {
for (myCustomer mc : Customers) {
if (mc.s == CustomerState.waiting) {
seatCustomer(mc);
return true;
}
}
for (m... | 0 |
75e8724e3a32e6a286fc3f188ea9e68a | f013949cbcfc4d1c18e8f135729859f2 | Suspend function: Wrapper for readCollection | int stop_collection(PWCollector_cmd_t cmd)
{
pw_power_collector_task = NULL;
pw_collection_start_tsc = 0;
pw_collection_time_ticks = 0;
if (hrtimer_active(&pw_acpi_s3_hrtimer)) {
printk(KERN_INFO "WARNING: active ACPI S3 timer -- trying to cancel!\n");
hrtimer_try_to_cancel(&pw_acpi_s3_h... | 0 |
4526217fef8432a9e9025f2c6f77f0af | bc7a34f7db98806cb136efdde7ccad5c | Sets EventListeners For Bézier Calculations. | select("#paramSend").mousePressed(getParamEqFromInput);
select("#cubicIF").mousePressed(getImplicitEqFromParam);
select("#interPt").mousePressed(getInterceptionPoint);
select("#bézierPF").mousePressed(getParamEqFromPoints);
select("#bézierIF").mousePressed(getImplicitEqFromInput);
select("#allPa... | 1 |
ddb3d344339e20ba1bfe2dc996493cc9 | d1a5091ac5d04afc44157180f711dbdd | 使用单引号包围元字符串 | namespace FreeSql.Template
public class TemplateEngin : IDisposable public class Utils
public static string ReplaceSingleQuote(object exp) {
string exp2 = string.Concat(exp);
int quote_pos = -1;
while (true) {
int first_pos = quote_pos = exp2.IndexOf('\'', quote_pos + 1);
if (quote_pos == -1... | 0 |
2e6de262bd363eb2680c14c8de7bbed7 | 987612639af1804bf7e4d035ffeff1ab | Acts like `Array.prototype.concat` but does not create a copy of the original
array. It extends the original array and return it. | if (!array)
return source;
if (!source)
return array;
var i, len = array.length;
for (i = 0; i < len; i++) {
source.push(array[i]);
}
return source;
} | 1 |
5f6941bb7fdc6a061f43eb77216ee6ea | fcdc0f09073f38a83567409b242c2f11 | Checks if the image is too blurred to be processed | gray = cv2.cvtColor(img, cv2.COLOR_RGB2GRAY)
hist = cv2.calcHist([gray], [0], None, [256], [0, 256]).flatten()
background2image_ratio = np.max(hist) / gray.size
return background2image_ratio < .5 | 0 |
615873a1d41dcf4acc9fec610d46d2d1 | 7bc071773ae50861e214a4fc372638ea | \brief Returns true if this entity does not react to the sword.
If true is returned, nothing will happen when the hero taps this entity with the sword. | bool CFluffBaby::OnStabbed(CCueEvents &, const UINT , const UINT , WeaponType )
{
return false;
} | 1 |
7f4f78cb6f6f4f652fb381cf51ea88c0 | 262d875be6d113e116217b7d0441d28f | execute update check (if not already performed) then return result | try {
$q = $this->conn->prepare("SELECT 1 FROM {$this->tbl_check($tbl)} LIMIT 1;");
$this->get_last_stmt = $q->queryString;
$q->closeCursor();
$q->execute();
return true;
} catch (PDOException $e) {
return false;
}
} | 0 |
158a5981f33a5dde7906436e3695dbda | b44c2a746a18a2f4185e35a28ad5af01 | 根据条件查询业务通知单对应的工单表 | List<Workorder> getWorkorder(WorkorderInformationQueryParam param); | 1 |
977b67e6f995ddefa85145ff69a86be8 | 00dd2ad5c60c11ffad391e246a62cb5c | Methode appelee apres un clic droit / Ajouter apres sur l'un des elements de
la tournee | Object source = e.getSource();
if (source == button1) {
MessageBox.getMessageBox().ajouterMessage("Nouvelle Partie");
FenetreChoixJoueur.getFenetreChoixJoueur();
button1.setEnabled(false);
button2.setEnabled(true);
}
if (source == button2 || source == button5) {
VueCarte.getPioche();
Controleu... | 0 |
f2ef1af3fced059cbcd0a401d2371973 | 428ef7de0d9cdc88b56f8c95b151de6f | Creates a user in the Users DB (created on first time start up) | boolean result = false;
SQLiteDatabase db = dbHelper.getWritableDatabase();
userId = dbHelper.createUser(db,enteredUserName,userPhone);
if((userId != null) && (!userId.equals(""))) {
saveTextInPreferences("user_id", "" +userId);
result = true;
}
re... | 1 |
4389a00eb106cecb73ec8297bf412220 | 60e321432d8357bdfb0f5d31070e3c78 | Removes the chart that displays the heart rate chart. | public class FindTheBeetActivity extends WearableActivity
@Override
public void onDestroy(){
super.onDestroy();
heartRateReader.destroy();
} | 0 |
f55a7357b0a04fdfae05fd0865d0f812 | df77461dfa7e0a03dda900a403de10bd | Refreshes the banner ad regardless of whether autorefresh is enabled or not. | public class TapjoyPluginAndroid : MonoBehaviour
public static void RefreshDisplayAd()
{
TapjoyConnectInstance.Call("getDisplayAd");
} | 1 |
b74a548db5c2010f07b932b8fea768f1 | 55facb59943661054ebd030537262d2c | Internal representation of the sort portion of mergesort. | width = 7
@scratch = Rubinius::Tuple.new @tuple.size
left = @start
finish = @total + @start
while left < finish
right = left + width
right = right < finish ? right : finish
last = left + (2 * width)
last = last < finish ? last : finish
isort!(left, right)
isort!(r... | 1 |
99bd1dd420bdaf5b60c2a1ae35620922 | d13caa1ef3aca1cc92929ee1c80b1940 | Convertit une coordonnée exprimée en fraction de l'étendue (0 à 1) en espace-écran. | def c2s_x(x):
return int((640 * x - 640 * margin_x0) / coord_width) | 1 |
7dc947940b30827dee6649780d5fbd0c | 0d9fbca7bbc3936d549866b8a0efd427 | Returns the detected languages files in the language directory | $prefix = "trans";
$dir = dir($this->langpath);
while ( $file=$dir->read() ) {
if ( strpos($file,$prefix)===0 ) {
$pos = strpos($file,".");
$lang[] = substr($file,$pos+1);
}
}
return $lang;
} | 1 |
11338bf078bf5a0072da92730aa65e1d | 1b8a94cb4432629c95fd87bd2a91cb57 | Method for initial setup reading from the config files | switch (Systemconfig.readConfigType) {
case 0:
readConfigFromFile();
break;
case 1:
readConfigFromDB();
break;
}
} | 1 |
c9f59dfc45e69c2959ccf3d5cfe8a968 | 4563843839d64126a4be14a146c4a637 | Get the maximum unavilable pod budget. | class PodDisruptionBudgetSpec(dict):
def max_unavailable(self) -> Optional[Any]:
return pulumi.get(self, "max_unavailable") | 1 |
770251f44fa233fa7a1aebac2b8c6c2b | 8d11172b8674f9790d51da035eb99eac | 将当前项目向下移动 | class RearrangeVideoGallery extends React.Component
moveProjectDown(index) {
const {projects} = this.state;
moveEntryDownInArray(projects, index);
this.setState({projects}, () => this.props.updateItems(projects.flat()))
} | 1 |
c0813e4756c86ee213fac803d3591ff5 | b585f9d82f42fbb72da199e7cfa1a779 | Gets a node with the given name. Returns null if not found. | @Nonnull
INode get (@Nonnull String name) throws NoSuchElementException; | 0 |
806777880408befdd069a49cac5e1959 | 453901348cae8eb4f895e2930a2567e8 | Gets the inheritedFrom property value. If this content type is inherited from another scope (like a site), provides a reference to the item where the content type is defined. | final class KTAPI_PermissionAllocation extends KTAPI_AllocationBase
public
function getIsInherited() { return $this->map['inherited']; } | 0 |
7ead9c0c36dae65425f20ef02a7a88df | 3a88fe69440fc78994369c352ca20350 | Creates a new font settings object. | $this->_ttf = (null === $ttf) ? $this->_ttf : $ttf;
$this->_randomFactor = (null === $randomFactor) ? $this->_randomFactor : $randomFactor;
$this->_codeLen = $codeLen;
$this->_width = $width;
$this->_height = $height;
$this->_fontSize = $fontSize;
} | 0 |
6e069bfb15a6416ec057b1915a4a1c75 | e167d026352194c48585587a9f3998a4 | map each date to a mapping from times to events | var grouping = {}
_.map(events, function(event) {
var key = event._id.date.year + '-' + event._id.date.month + '-' + event._id.date.day
if (grouping[key] === undefined) {
grouping[key] = []
}
grouping[key].push(event._id)
})
return grouping
} | 0 |
4d28346b499096af8275c45f958b93d8 | a7695c3682f1299f2a19495e627019b1 | 获取与当前登录的学生的所有一同入学的综测成绩 | func StudentGetSelfXt(stuId int, year string)(int, []StudentSelfXt) {
var xtlist []StudentSelfXt
var codes int = code.SUCCESS
err := mysql.Db.Raw("call stu_get_self_xt(?, ?)", stuId, year).Scan(&xtlist)
if err.Error != nil {
codes = code.SUCCESS
}
return codes, xtlist
} | 1 |
ecc36dc2cc47788ce1f96cd66eecf74d | a9fa99b93c8f70b11b2da70e42eb8e99 | Cleanup all UART when system cleanup | static void modemCmdCleanup(void)
{
disable_UART_rx();
disable_UART_tx();
mcData.busy = false;
} | 1 |
ff807f666be6754a745e5f8ef1740263 | 3de985f319bb8e09cba9ee990d5ea6a4 | If true is returned, the buildable is considered "rotatable"
and it's state can be changed with r and shift + r. | boolean getRotWithShape(); | 1 |
cad4319f9e621ca245f4020b85dfc90f | 0cb09f5b28a06771944988d297d6e6b3 | Fonction ... | function mafonction_5(nbr, str) {
return "je suis eudes "+ nbr + "er des "+ str;
} | 1 |
7a3269ee635f6ff260a98ae7c422b99c | b22ef9b2f3ab1f209fd8e5f30ee112e7 | Clear any necessary caches when an Undo or Redo occurs. | public class ShapeCreator : EditorWindow
void UndoRedo()
{
currentTangents.Clear();
Repaint();
} | 1 |
1892a8706bcde12e5552d13a23620313 | cd6ae4c44b983fa073460a9367dc24cd | change account info | const response = yield call(changeAccountProfile,payload);
if (response.status === 'success') {
message.success(response.msg, 3);
} else {
message.error(response.msg, 3);
}
} | 1 |
60acb9260b1952c57e95c4130090fa2b | e53e05e217d939c2d108825ac13acc8c | POST /diaries | @diary = Diary.find(params[:diary_id])
@diary_detail = DiaryDetail.new(diary_detail_params)
@diary_detail.diary_id = @diary.id
if
@diary_detail.save
redirect_to diary_diary_detail_path(@diary, @diary_detail.id), notice: "日記内容が作成されました"
else
render :new
end
end | 0 |
c817421a068e76febeb80056c46b1b08 | d66a2b64d0e0a48c94408c7b2d43d03d | Maps the keywords of bibtex record to portfolio "keywords" | void TScacheSO::getBundleKeywords(TSPLdbConnection* pConnection, TSaudit* pAudit, const TSguid& bundle_id, TSmstring& keywords)
{
boost::shared_ptr<BundleCache> spBundle = performanceMgr.getBundle(pConnection, pAudit, bundle_id.getRawData());
if (!spBundle)
throw TSexGeneral(TSERR_BO_BAD_PARAMETER_ORDER_NODE, TSex... | 0 |
4ce3b89fffc3de44d65ff58c98e9231b | 9726affb78dd5a84b31a26fa31490ab7 | 订单创建成功时,相关处理业务 | void orderInfoAfterCreateSuccessProcess(OrderInfo orderInfo); | 1 |
b94a1eec65975ca54005effd542af871 | 7558d2ba7be54da61f7d5cf49d7e33e5 | 设置是否进行自动开火 | if self.m_isDraw and self.m_curShootMode == FireModeEnum.Auto then
self.m_isGoingToFire = true
end
end | 1 |
c0c0646593323efd53cd7aa55b84e088 | 83e42af0f0a1e5df6c0e31b2d9f01c29 | 将NavigationBar 添加到父布局中 | public abstract class BaseActivity extends RootActivity
public void setBottomNavigationBarLayout(int layout_id)
{
navigationBarLl.removeAllViews();
navigationBarLl.setClipChildren(false);
navigationBarView = inflater.inflate(layout_id,navigationBarLl,false);
navigationBarView.set... | 1 |
ad0482dd4b28adf1aee413901ef44ed5 | ff341b3107fb642ed2d32208689ea2ad | Verifica se o voo existe | boolean existsByFlightNumber(String flightNumber); | 1 |
c8d837e9c025284f26902ef090fa642d | e1e0ea8c9133c08deb7ddcdc8535b8b3 | 取得 N件统一价的 obj_ident,product_id 由小到大 | class NormalCartSer extends CartsSer
public static function getNjObjIdent(array $nj)
{
foreach ($nj as $product) {
for ($i = 0, $iMax = $product['quantity']; $i < $iMax; $i++) {
$productIds[] = $product['product_id'];
}
}
sort($productIds, SORT_NUMERIC... | 1 |
44381a32f7c8d35c8918356f03df987c | eba12d210b0fe61329592ce7f0120235 | Calculate the custom cnn root-mean square error, which measures the
similarity between the original abundance fractions and the predicted ones.
Zhang, Xiangrong, Yujia Sun, Jingyan Zhang, Peng Wu, and Licheng Jiao.
"Hyperspectral unmixing via deep convolutional neural networks."
IEEE Geoscience and Remote Sensing Lette... | prediction = np.array(prediction)
mse = np.sum( (prediction[:,3] - prediction[:,2])**2 ) / len(prediction)
return mse | 0 |
560c9ac1f1780925297d541f76c835b7 | 87db0322e5f8180bf0f686a52e90624f | 根据nodeName获取nodeId | class AdminNode extends Model{
public function getNode_id($role_name){
$role_id=Db::name("role")->where("role_name",$role_name)->find();
return $role_id;
} | 0 |
24c610a9f3fb45b7545b8232f9cdb1fd | f4c87b3c1b31d5a73addafe1ce3c461d | Método cuando se pausa la actividad, se desactiva la música, si se pausa justo cuando el camión estaba avanzando se para también el sonido | public void onStop() {
super.onStop();
if (quiere_musica == true) {
mp_inicio.pause();
}
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.