query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
17823e6a05bd185e73e6bb6a353b61b9 | 692836b8c99243705ea95bdd6e64da49 | 根据商品ID获取会员ID集合 | namespace ERP.DAL.Implement.Order
public class GoodsOrder : IGoodsOrder
public IList<Guid> GetMemberIdListByRealGoodsIds(int keepyear, DateTime startTime, DateTime endTime, List<Guid> realGoodsIds)
{
IList<Guid> list = new List<Guid>();
if (realGoodsIds.Count > 0)
{
... | 1 |
c7ed293b979a026649d2246bd1ea647d | df7c96548665268bb8fb7f6cffb3511a | 清空所有情景对象 | public synchronized void destroyAll()
{
for (int i=0;i<MAX_SCENES;i++)
{
destroy(i);
}
} | 1 |
d8ced632c6e7c9501f2c8269acecd1c9 | 4b015382c2246687c556660c655c13a8 | Method that uses the list of Lines to build connections from the consecutive stations in the stationList of a line. | {
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(xmlFile);
XmlNode root = xmlDoc.SelectSingleNode("Projet");
XmlNode subroot = root.SelectSingleNode("Connections");
if (subroot == null)
{
subroot = xmlDoc.CreateElemen... | 0 |
c71483ec9c3f1a7980f596ec52507227 | 1f6c568e6f7574c6fa8b18a83415cf18 | Method to retreive the query response from the DL on the basis of the input provided | resultsIterator, err := stub.GetQueryResult(queryString)
if err != nil{
log.Error(ERRNMCC0006)
return nil, err, ERRNMCC0006
}
defer resultsIterator.Close()
var resArr []string
for resultsIterator.HasNext() {
queryResponse, err := resultsIterator.Next()
if err != nil{
log.Error(ERRNMCC0007)
return ni... | 1 |
880fb50bd65c44097eb8fc04aa65f106 | 1128b1e0537df5694d30d49f297fab5f | Decides which end of the worm is the one to track,
based on the direction of movement | {
if (velocity.X > 0 || (this.velocity == Vector2.Zero && (this.destination.X - this.position.X) > 0))
{
return nearby[8];
}
else if (velocity.X < 0 || (this.velocity == Vector2.Zero && (this.destination.X - this.position.X < 0)))
{
... | 1 |
4905d4c7d4357a110f31d737540db6e0 | 7424a5933fc56e2b5b0622d9224ab527 | Get the starting wavelength of a scan.
Applies to both quick scan and point to point scans.
Returns | self.__write('w?')
line_count = 0
data = ''
while True:
if line_count>=5:
raise TimeoutError('No expected end message after 5 lines.')
line_count += 1
dataline = self.__readline().decode()
if 'done' in dataline.lower():
... | 1 |
3b04c39b139e6df3324858977c1305bd | 6f2b8233556f0c415ea2a77ed89b9a9f | Gets the overall course score for a student. | public class Gradebook
public double getOverallScore(string username)
{
return -1;
} | 1 |
5fe8f89e1f88e996143ec17ac66612ae | 2dd83282950e6a9eb4c8adfeae541554 | make sure file cache is empty before we start | self.cache = PkgCache('/tmp/cache', force_clean=True)
for fn in ('file_a', 'file_b', 'file_c'):
with open(os.path.join('/tmp', fn), 'w') as f:
print >>f, fn | 1 |
30f74faa0828090220bb0a2d376bcf9b | 73b8642fef2b638564aa73699c5df2e0 | Récupère toutes les recettes dans une asynctask
pour ne pas bloquer l'UI | public class HistoryActivity extends AppCompatActivity implements View.OnClickListener
private void printRecipes() {
StringRequest stringRequest = new StringRequest(Request.Method.POST, URL_FOOD,
new Response.Listener<String>() {
@Override
public void onRe... | 1 |
09ac752ba2ed9b268f32cc9d5aec9cda | 848e28ed3a71e6ded5f429fb3da07ef4 | Returns if client origin is required to be present in the list of all the allowed origin or not. | public class WebSocketServicesBridgeConfiguration extends YamlConfiguration
public boolean getCheckOrigin() {
return getBoolean("websocketservicesbridge.checkOrigin", false);
} | 1 |
ee35ff4a0f3f75a6c845a6f9982f4241 | af2d8a98d2c9ab2b451e6e88ea6669ec | Get all client orders | class OrderClientCollection(Resource):
def get(self, id):
return Client.query.filter(Client.order_id == id).all() | 0 |
f3e60e766cdd3c3d8ad7c0c152a725f5 | 7057d8625d42683c1e943a7725272ade | @brief Create new OpenFlow rule from a classic 5-tuple rule | ice_add_rule_internal(struct ice_hw *hw, struct ice_sw_recipe *recp_list,
u8 lport, struct ice_fltr_list_entry *f_entry)
{
struct ice_fltr_info *new_fltr, *cur_fltr;
struct ice_fltr_mgmt_list_entry *m_entry;
struct ice_lock *rule_lock;
enum ice_status status = ICE_SUCCESS;
if (!ice_is_vsi_valid(hw, f_entr... | 0 |
651287ab6e22b90fc6fe126669268919 | 3b71ee307a78eb082d891d6019b03556 | Affichages de tous les pokemons appartenant à un certain type | def find_by_type(typ):
with connection.cursor() as cursor:
query = "SELECT DISTINCT Pokemon.name FROM Pokemon, pokemon_type " \
f"WHERE pokemon_type.typ = '{typ}' and Pokemon.id = pokemon_type.pokemon_id"
cursor.execute(query)
result = cursor.fetchall()
return list(ma... | 1 |
8f9d617440c1586a0c316f224fdd8cd3 | 32657a6adbf4baeb8d38e98f402e7183 | Crafts an string with formatted datetime as yyyy-mm-dd hh:mm:ss | def DandTstr2():
return datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S") | 1 |
1035eec289daf28d2b0d382d7796ff61 | 043395eb030a7f8b3778af0041c34a4a | Update the required product custom option. | return $this->__soapCall('catalogProductCustomOptionUpdate', array($sessionId, $optionId, $data, $store), array(
'uri' => 'urn:Magento',
'soapaction' => ''
)
);
} | 1 |
40782970ffff516725a46a3a260c4078 | f059b07ce78fb666c65b923c02583811 | Stores a script. If a script with the same name is already stored, the new script replaces that script.
same name | namespace SnowRabbit.Compiler.IO
public class SrStringScriptStorage : ISrScriptStorage
public void SetScript(string name, string scriptCode)
{
scriptTable[name] = scriptCode;
} | 1 |
cdd3fe2c5a7693860081a92e6597a361 | d2fc3d79433445420413c95bdfa896a6 | https://blender.stackexchange.com/a/27759/13707 | scene = bpy.context.scene
region = bpy.context.region
rv3d = bpy.context.region_data
coord = event.mouse_region_x, event.mouse_region_y
view_vector = view3d_utils.region_2d_to_vector_3d(region, rv3d, coord)
ray_origin = view3d_utils.region_2d_to_origin_3d(region, rv3d, coord)
ray_location = ... | 1 |
88d1508b18f39443576a8d66c4d0b091 | b9b85b53e1bf6c6e6ec450942b826265 | 输出频率最高的子树和 | {
if (root == NULL)
return;
int res = root->freq;
int lres = findMaxFreq(root->left);
int rres = findMaxFreq(root->right);
if (lres > res)
res = lres;
if (rres > res)
res = rres;
return res;
} | 0 |
65706c1733120570851ce305f2355497 | 7f0a2ad507390650a9c90424157a8f42 | Executes formatted COPY command to stage data from S3 to Redshift.
Keyword Argument:
context -- DAG context dictionary | class StageToRedshiftOperator(BaseOperator):
def execute(self, context):
self.check_invalid_params()
query = SqlQueries.staging_table_copy.strip().format(
self._target_table,
self._s3_prefix,
self._iam_role_arn,
self._json_path
)
self.log.i... | 1 |
2d13a2a0d467860da27d2c9a0a5710a8 | 937c78a0332d61cfb35b4c70308e198f | Returns a new servlet request configuration that is backed by the passed
in configuration. | {
final ServletRequest request = new MockHttpServletRequest()
{
@Override
public String[] getParameterValues(final String key)
{
return base.getStringArray(key);
}
@Override
public Map<?, ?> getParameterMap()
... | 1 |
526c22a6fcb5c0a22e7f88b1978298d8 | bca42a9c4aebf26d52001a400f6f4527 | Return a list of strings for the currently implemented
similarity measures, aka metrics, which support vectors other
then binary vectors.
Returns:
List: List of strings. | class SimilarityMeasure(object, metaclass=RegisteringType):
def get_supported_general_metrics():
return list(
set(SimilarityMeasure.get_supported_metrics())
- set(SimilarityMeasure.get_supported_binary_metrics())
) | 1 |
5b55c0bd47999c09f50516f2457d300e | 7518b4b2d6b84d19daa315cc341eeaf3 | Объединяем ячейки B1:D1 | string fromPlaceBegin, string fromPlaceEnd,
string startPlace)
{
xlSheet.Range[fromPlaceBegin, fromPlaceEnd].Copy();
xlSheet.Range[startPlace].Select();
xlSheet.Paste();
} | 0 |
bad178ebb4b59a48fad823571567c4d9 | e43ad5f79beab93e0d22b433101c5279 | Callback method for 'serverqueryWaitTimeout' signals. | class TCPServer(socketserver.TCPServer, socketserver.ThreadingMixIn):
#class TCPServer(socketserver.TCPServer):
def handle_timeout(self):
pass | 0 |
662127f10fee6ecc2069f546483237f0 | 111798e53d30ff76d0fc37e1e1ab6629 | AddScene adds a scene with the given name and functions to the scene map | class SceneManager():
def add_scene(self, name, obj):
if name is None or name == "" or obj is None or isinstance(obj, scene.Scene) is False:
raise RuntimeError("Invalid argument")
self.scenes[name] = obj
logger.debug(self, "Registered scene {name}".format(name=name)) | 1 |
749b174ccce3e136894257c9e6467a4c | 33216d5cd073ad51736e9faa6bd85307 | 静态方法创建Product实例 | public class ProductFactory
public static Product createPro(String name){
if (name.equals("apple")) {
return new Apple();
}
else if (name.equals("orange")) {
return new Orange();
}else {
return null;
}
} | 1 |
87ee46367833bb0f242e7f4c4c927979 | 7b80dd4b2540204aed28c006a79d4978 | 课件订单展示 | class OrderController extends Controller
public function lect_order()
{
$query = request()->all();
$course_id=$query['course_id'];
$b_num=Order::where('course_id',$course_id)->count();
$date = Detail::join("Course","Detail.course_id","=","Course.course_id")->where(['Detail.is_del'=>1... | 1 |
30e1d950e6431c1d861c0ef4334472e9 | 8030dfcdc2497c64dbe558a7d8e150d1 | Checks and waits until an ECS instance has drained all its running tasks.
Returns True if the instance drains.
Returns False if there is less than 40 seconds left in the Lambda
functions execution and we need to re-invoke to wait longer. | def check_instance_drained(ecs_c, cluster_name, instance_id, context):
while True:
response = ecs_c.describe_container_instances(
cluster=cluster_name,
containerInstances=[
instance_id
]
)
print("- Instance has {} running tasks and {} pendi... | 1 |
2c69ad6dd4372416c179ae87e7f079e0 | 8869b92ef2e4a96a86157d703aabe472 | Computes the mode of the given arguments (min. 1).
If there is more than one "most frequent" value,
only the first one is returned. | function modes(...xs: bigint[]): bigint[] {
xs.sort(compare);
var r = maxRepeat(xs);
return getRepeats(xs, r);
} | 0 |
7fed097a07576906861d4a11eaa5c3c1 | 917b8fe368247df86e59a1f7d502a7a0 | https://en.bitcoin.it/wiki/Version_Handshake | bits.append(version, 6);
const bchCode = calculateBCHCode(version, VERSION_INFO_POLY);
bits.append(bchCode, 12);
} | 1 |
0341c80e21fc0771b5ec3a2ab643ed84 | 03bb7ddfa905ab0ae212990422ba09a5 | Unloads the MIB file from the currently selected symbol. | public class MibbleBrowser
public void unloadAllMibs() {
removeFilePrefs();
loader.unloadAll();
} | 0 |
5c3a8a0fcb424b57392ce8b008e5548d | 414d4e4b6637f052290419d555afab7a | main entry point for proxy threads | void proxy_thread_init(void *ctx, LIBEVENT_THREAD *thr) {
assert(ctx != NULL);
assert(thr != NULL);
thr->proxy_hooks = calloc(CMD_SIZE, sizeof(struct proxy_hook));
if (thr->proxy_hooks == NULL) {
fprintf(stderr, "Failed to allocate proxy hooks\n");
exit(EXIT_FAILURE);
}
thr->prox... | 1 |
9e7f3c98a9d5159c0cb6ff25d18570c6 | de8b00ac448e683d771e2ed58024cf1c | 将字符串转换为摩斯码,用空格分离 | length := len(str)
if length == 0{
return "", errors.New("length must > 1")
}
values := make([]string, 0)
for _, v := range str{
if value, ok := morseMap[byte(v)]; ok{
values = append(values, value)
}
}
result := strings.Join(values, "")
return result, nil
} | 0 |
9b1d4fb6cdf16719c48a79889b016acf | 5168a75b3ee6705bc1aa60a2f9267bc6 | Set 'TransferDate' value | class dbs_templates_records_acceptRecordTransferData extends super
public function set_TransferCode($value)
{
$this->setdata ( self::DBKey_TransferCode, strval($value) );
return $this;
} | 0 |
79d5d15009f1361be0289d1be09e2204 | 1ad77267c555b0447a54c9f5548a37f6 | This function returns time interval of free time. | uint32_t dd_return_idle_time() {
_queue_id qid = _msgq_open(MSGQ_FREE_QUEUE, 0);
if(qid == MSGQ_NULL_QUEUE_ID) {
printf("\nCould not create message queue\n");
return 0;
}
GENERIC_MESSAGE_PTR msg_ptr = (GENERIC_MESSAGE_PTR)_msg_alloc(message_pool);
if (msg_ptr == NULL){
printf("\nCould not allocate a message\... | 1 |
9bc0df54a51e0565c811f56306244ec8 | c3b261c6135a82c58960f882cc678f1e | Remove all queens from a board. | boolean changed = false;
for(int x = 0; x<board.length; x++) {
if(!changed) {
for (int y = 0; y < board[x].length; y++) {
if (board[x][y] != SqrType.EMPTY)
changed = true;
board[x][y] = SqrType.EMPTY;
... | 1 |
c01a98c53f221c81707950e00acb67c3 | 2c712598e423270a891063e6b0dedd39 | Validates the connection search button. | {
try
{
this.EnableSearchButton();
}
catch (Exception ex)
{
ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm);
}
} | 0 |
4e9e28f0b467238158322f844cbb1ed7 | 15c7f5b35e6198d5fbb6e14d7d92b60c | Specify that this column must not be used when serializing. | if (!$this->lastColumn) return $this;
$this->definition[$this->name][$this->lastColumn]['serialize'] = false;
return $this;
} | 1 |
d750441b0a2ba5e5c5cb57004f61b3a5 | ee3f5d57bd510a6ce5ece71ce34af93d | reset all delta coding counters; | {
m_offset = 0;
m_lastEncode = 0;
m_lastDecode = 0;
} | 1 |
c7f9078568e913ce5984d13d2597e285 | 1bd6b3a9e5e106b7698669092fe3fe8d | СКРОЛЛ ВНИЗ ПРИ ДОБАВЛЕНИИ НОВОГО СООБЩЕНИЯ | def add_scroll():
db.scrolls.insert(
author_name=request.vars.author_name,
title = request.vars.title,
abstract = request.vars.abstract,
post = request.vars.post
) | 0 |
9a66fd05a2241cbc3be6451950fd2d69 | f94ef4178ff2bbf5e9c6574c54273422 | سطرهای گزارش کارکرد ماهانه را برای یک دوره یک ماهه برمیگرداند | class OtherCompanyStatisticsController extends Controller
private function monthReportTelemarketing($month,$year){
$check_working_days = DB::table('hour_report_other_company')
->select(DB::raw('
DISTINCT(report_date),
hour_report_other_company.department_info_id
... | 1 |
0b029c430599c0a5d2427f589f742873 | da62bd5fbde10e9b7cec0a6ffa005f26 | such as caplock, shifts, alts, and controls, and gives it to putc to properly
display them ont the terminal.
RETURN VALUE: none
SIDE EFFECTS: processes keys to be printed | {
unsigned char scan_code;
scan_code = inb(0x60);
if (scan_code == 0x2A || scan_code == 0x36)
{
shift = 1;
}
else if (scan_code == 0x3A)
{
caps = 1;
outb(0xED, 0x02);
}
else
{
if (scan_code & 0x80)
{
if (scan_code == 0xAA || sc... | 1 |
096f9fdcca26c9b81754d1787ba7ff25 | 70a2a8947cb43c65d7040b896cf8dce0 | 参数说明:id,整型,为员工编号 返回值: List<UserInfo>,用户信息记录的集合 函数功能:根据条件获取用户信息 | public class CommonAPI
public static List<UserInfo> getUsersByIdList(Set<Long> userIds, Set<String> retrievedFieldsSet) throws Exception {
if (userIds == null || userIds.isEmpty()) {
return new ArrayList<UserInfo>();
} else {
Query<UserInfo> query = ds.createQuery(UserInfo.class)... | 1 |
d3c5f594cc13853972ebbe020411ec07 | 7ce4b0b38e6c05a88b44e1151ee18363 | Test the internal code that generates combinations of indices | gen = SymmetricGroupGenerator(6)
test_inds = [200, 758, 203, 204, 780, 769, 781, 770, 779, 779, 782,]
p = gen.from_indices(test_inds)
self.assertEquals(gen.to_indices(p).tolist(), test_inds)
test_inds = [ 200, 758, 203, 204, 780, 769, 781, 770, 779, 779, 782,
... | 1 |
8096e2d09c62336886d23596f36e9124 | 9346d17a05579f354b6e60096193abb6 | Sprawdza, czy wybrany dzień jest zaznaczony. | public class KCalendar extends ViewFlipper implements
android.view.GestureDetector.OnGestureListener
public boolean hasMarked(String date) {
return marksMap.get(date) == null ? false : true;
} | 1 |
2bf3bdf02faec5ff39059e8c0a2d424c | f3f4a2989d7b32c8ca3868ffaef5c723 | Get all ChapterHeadings. | class ChapterHeadingService implements ServiceInterface
public function getAll(): LengthAwarePaginator
{
return ChapterHeading::paginate(10);
} | 1 |
3bfad8b9545de0c02a3d36de14ad592b | 820e19a60980c5f4c3d6f60af421ce60 | Lista os nomes dos acessorios e os concatenam com o codigo e os grava em um DataTable | {
List<SelectListItem> list = new List<SelectListItem>();
List<int> intpList = new List<int>();
foreach (var i in haveList)
{
intpList.Add(Convert.ToInt16(i));
}
var plist = from p in basedb.product_accessories
... | 0 |
4055a9a7470592a2b1e4f45ba2abf3bc | c21a3bb8f69d9789bccf19ed36366e20 | Print the graph into a file in Graphviz (xdot) format | {
std::ofstream ofs( filename );
toDot( ofs, oi );
ofs.close();
} | 1 |
5f1b15e21cfe416ff002596471ed92b1 | fc67f9bc94a277688b4bcfc31f9fd87e | Run the Cli 'copy' command. | class TreeView extends BaseView
public function copy()
{
if ($this->environment->getDataDefinition()->getBasicDefinition()->isEditOnlyMode())
{
return $this->edit();
}
$this->checkClipboard('copy');
$this->redirectHome();
} | 0 |
0ab7e9fb25e6a8e7e59b4d10d32525b2 | d7870f767eba0deacb5a51074c0e3248 | Updates the current dialogue line, character by character | {
finishCurrentLine = false;
Yarn.Markup.MarkupParseResult markupResult = TryParseCharacter(dialogueLine);
onLineParse?.Invoke();
string text = TryParseMarkup(markupResult);
Sequence showAnimation = onLineStart.Invoke(text, textSpeed);
var frame = new WaitForEndOfFram... | 1 |
7accafef1b6f988eff18a55e19535743 | d0fb04ccd591287c6daa35ef5c332902 | Runs the two sum test. | void Test001_Two_Sum()
{
vector<int> nums;
nums.push_back(2);
nums.push_back(15);
nums.push_back(11);
nums.push_back(7);
twoSum2(nums, 9);
} | 1 |
b48ed1aa88a2a3aff7ce7d165d643b8f | 511a40752f809d8fab6c634a67ef21e2 | Interrupt handler for battery voltage interrupt. | LXPanel *panel)
{
lx_battery *lx_b = lxpanel_plugin_get_data(p);
update_display(lx_b, TRUE);
return FALSE;
} | 0 |
f07a8766e40448816d0524b1ce69ca62 | e9135c8bda3c744883f691bea22254a5 | Parse openssl-style /-separated list to dict. | if not isinstance(variables, list):
variables = [variables]
result = dict()
for variable in variables:
if variable is None:
continue
for var in shlex.split(variable):
matched = re.match("([^=]+)=(.*)", var)
if not matched:
raise Gen... | 0 |
171dcf8c78b36f7e615d1756cc4991c5 | c6ef66b3323d09e2cf5be2f0180fbbd5 | Autoload all the files in the includes directory. | class Autoload
public static function includeFiles($pattern){
$files = glob($pattern);
foreach ($files as $file)
if (substr($file, 0, 1) != '_')
include($file);
} | 1 |
f76b5f782ac2cebe1effb41498d64dfb | 23d9ff4238a308f5c480b11fe946fceb | sets offset of bricks from left wall by centering whole brick stack in app window | function initializeBrick()
{
infiniteBrick[0].css({"left": "-245%"});
infiniteBrick[2].css({"left": "145%"});
} | 0 |
fb2593f6f1454cd7a4664891da287ad4 | c47d41f8d9c9b6bb71f8a91a339fcd2a | Start a CouchDB instance for a test. | auth = COUCH_USER + ":" + COUCH_PASS + "@"
server = couchdb.Server("https://" + auth + COUCH_SERVER)
db = server[COUCH_DB_NAME]
return db | 0 |
c85468a9f6d62f56669a4eeac255b080 | e62e2014eb802c94b299c868b4d41f9d | 设置订单餐盒费 | public class WaybillInfoBindingListener implements IBindingListener
private void unsetWoodenPackFee(WaybillPanelVo bean) {
bean.setPackageFee(BigDecimal.ZERO);
bean.setCalculatedPackageFee(BigDecimal.ZERO);
bean.setStandCharge(BigDecimal.ZERO);
bean.setBoxCharge(BigDecimal.ZERO);
} | 0 |
0052731d8af7b3dda6f42be158fe729c | 60e32310a47675c073aa96a149924cf9 | Extracts a mutable slice containing the entire vector. | impl<S> Vector2<S>
where
S: Copy
pub fn as_slice(&self) -> &[S] {
<Self as AsRef<[S; 2]>>::as_ref(self)
} | 0 |
5690e594bb659d5a01dbba4f0d8d0822 | b2ca4874bf55bb00a8f4e10865507a63 | Getter-function for the maximum food reserve. | int Map::GetMaxFood() const
{
return mFood.GetSize();
} | 1 |
ae77b184b7736fe73b1cd7179aeadc9d | 4168183fb86bf5bf834d763b847f07f5 | Returns the infix expression input by user | {
Console.WriteLine("Welcome to Reverse Polish Notation");
Console.WriteLine("Please enter an expression...(Include spaces)");
var stringExpression = Console.ReadLine();
return stringExpression;
} | 0 |
8ff60a29ce0a9b0473eb4da601249963 | 48880f13cefe88bfce52def0a3e7cc65 | RETORNA A QUANTIDADE DE CASAS ABERTAS | {
int numopen = 0;
for (int i = 0; i < id; i++) {
if (status[i] == true) {
numopen++;
}
}
return numopen;
} | 1 |
b435f59e82fe2ab32df0a61809056ad4 | 4710b6764d883ea684237947bbd8c2df | Prepares the job list by clearing all entries. | namespace KFreonLibME.ViewModels
public class ModMakerViewModel : MEViewModelBase
public void ClearJobs()
{
ModMakerHelper.JobList.Clear();
PrimaryProgress = 0;
PrimaryStatus = "Ready.";
Loaded = false;
Busy = false;
} | 1 |
4164cc123c62fa8f9637498d27028c2f | 2f759adc731ffed3608f05b1c4ba859f | Get the number of password change done by a user since the given date. | namespace Dibware.Web.Security.Providers.Contracts
DateTime GetPasswordChangedDate(String userName); | 0 |
053bc15dc9c301773ab244a501254b10 | dc6edbbec8c324fa2efedb0ae38ada00 | Opens a file selector allowing selection of the kit log database file | {
OpenFileDialog dbConnectionDialog = new OpenFileDialog();
String path;
dbConnectionDialog.Filter = "sdf files (*.sdf)|*.sdf";
if (dbConnectionDialog.ShowDialog() == DialogResult.OK)
{
path = dbConnectionDialog.FileName;
}... | 1 |
413902d7376c67a6a7ce859b75af5c10 | c63b5203b070bd3f0424d3cf35112696 | Start reading after writing | void Seqlock::BeginRead()
{
while(isWriting());
} | 1 |
c1dbbf6218495697f4f6b0e4cc76f178 | 9a87aad5b416797c7cc8e33537f433e0 | Converts Speckle objects to Rhino objects. | namespace SpeckleRhinoConverter
public class RhinoConverter : Converter, IDisposable
public override object ToNative(SpeckleObject _object)
{
object encodedObject = null;
switch (_object.Type)
{
case "invalid_object":
encodedObject = "I... | 1 |
5d9bd4bdce53f0eaca969bb60180c98e | 501cde66a27ecc62ebe41499069d9eff | GET: Bible | {
if (searchString != null)
{
page = 1;
}
else
{
searchString = currentFilter;
}
ViewBag.CurrentFilter = searchString;
var items = await rep.GetBemMaster();
if (!String.IsN... | 0 |
b1e4607cd7c57ad3582be6f5fb1b5dbb | 0e807de1294f7a1d7aa2a0ab4da844ef | 定期设置利率页面 | @Controller
public class InterestRateAction
@RequestMapping("/interestrate/fixedrate/list")
public void fixedRateList(@RequestBody ReqPamars<FixedRate> req, HttpServletRequest request, HttpServletResponse response)
throws IOException {
LogUtil.write(new Log("定期利率设置信息", "查询", "InterestRateAction.fixedRateList", r... | 1 |
81e0c7e633f2727ccde644206d93ae69 | 86a7b711e3c0e8f3da0523734cb95703 | Tests sigma clipping failure on elements that are in the middle of an
array. | def test_sigmaclip_fully_masked():
data = np.ma.MaskedArray(
data=[[1.0, 0.0], [0.0, 1.0]], mask=[[True, True], [True, True]]
)
clipped_data = sigma_clip(data)
assert np.ma.allequal(data, clipped_data)
clipped_data = sigma_clip(data, masked=False)
assert not isinstance(clipped_data, np.m... | 0 |
d9b9ab4e1837101bc411d6234302d8cd | 9f7f0bacd20e455d9aa6244aeed77d78 | 如果当前文本框自动换行,设置为非自动换行;反之设置为自动换行。 | class Notepad(QMainWindow):
def set_wrap(self):
mode = self.text.lineWrapMode()
if 1 == mode:
self.text.setLineWrapMode(QPlainTextEdit.NoWrap)
self.auto_wrap_action.setIcon(QIcon(icon_list['check_no']))
else:
self.text.setLineWrapMode(QPlainTextEdit.WidgetWidt... | 1 |
32e679d12424dda77c788a491d98429e | e464980e741ee741721f0405c09bbed2 | comes from here: https://github.com/hashicorp/terraform-provider-external/blob/main/internal/provider/data_source.go | func UnmarshalSource(data []byte, s *chronograf.Source) error {
var pb Source
if err := proto.Unmarshal(data, &pb); err != nil {
return err
}
s.ID = int(pb.ID)
s.Name = pb.Name
s.Type = pb.Type
s.Username = pb.Username
s.Password = pb.Password
s.SharedSecret = pb.SharedSecret
s.URL = pb.URL
s.MetaURL = pb.... | 0 |
50df1062bdceacf5c9914f1d89d8d4a7 | bb7c5267cb0c4dfa66f26a3350886062 | Set up loading screen to pick a user | public class LoginGUI : MonoBehaviour
void OnGUI () {
GUI.Box(new Rect(10,10,100,90), "Loader Menu");
if(GUI.Button(new Rect(20,40,80,20), "Player Blue")) {
player.GetComponent<PlayerState>().id = 1;
Application.LoadLevel("scene1");
}
if(GUI.Button(new Rect(20,70,80,20), "Player Red")) {
player.GetComp... | 1 |
66626f99b6763b4d4244ca4b8d864c66 | 6a91efefa3bd384e0b2fb3855777f7b5 | creates a shared ptr to Root (to go up hierarchy) | namespace Geometry{
std::shared_ptr<RootModel> RootModel::getInstance()
{
if( !s_instance )
s_instance.reset( new RootModel );
return s_instance;
} | 1 |
9ce6c7c429271dc608fb86d371debee7 | a46dabda47cc063990436c0f3b735915 | Returns a list of nodes from a given xml url according to an XPATH expression | public List<XmlNode> getNodeList(String xpath) {
try {
NodeList nodeList = (NodeList) xPath.compile(xpath).evaluate(xmlDocument,
XPathConstants.NODESET);
return XmlNodeImpl.nodeListToXmlNodes(nodeList);
} catch (XPathExpressionException ex) {
l... | 1 |
b194b21141eac2262889b1c1a62f0f10 | a0da0b790d52a705d2ea662bc09ec6f5 | Test case for taskLayoutNewTaskLayout
This call inserts a new task layout. | class TaskLayoutApiTest extends \PHPUnit_Framework_TestCase
public function testTaskLayoutNewTaskLayout()
{
} | 1 |
9aabf8232bd4ad43326e62491052fd6e | 90547aad44e81042a4220e1cbf8e74ba | Should never be used anywhere other then where it is syntactically
unambiguous, so should never need parenthesizing | internal static class Helpers
internal static bool RequiresParentheses(ExpressionSyntax expr)
{
if (expr is IdentifierNameSyntax ||
expr is LiteralExpressionSyntax ||
expr is MemberAccessExpressionSyntax ||
expr is PostfixUnaryExpressionSyntax ||
expr is Eleme... | 1 |
405a25d66f6be0158c33147141cf8daa | d10834362aa1c184d53c5beb2f3ba2b5 | Get the current hand state of the left or right hand | KinectV2SensorData::HandState KinectV2SensorData::getLeftHandState() const
{
return this->leftHandState;
} | 1 |
e2db51d36eb118e2424808145d8ee247 | 41448fb8d5b2502c6f6e0867e398924a | Convert `f([1,2])` to `f(1,2)` call, so that pool can do multiple | def pool_eval(f_args):
return f_args[0](*f_args[1:]) | 1 |
9c792de088e0e46a03fe41e4a36e083f | df3e14e76318fe54565391493d385b41 | function to calculate thruster performance at a given power level | def supplied_by_battery(data, capacity):
def peukerts(i, c):
try:
t = 20 * ((float(c) / (float(i) * 20)) ** 1.17)
except:
t=0
print("Invalid Current or Capacity")
return t | 0 |
35d554d3fc01c880a9f4857a41bbf32a | e905c7f5466bdd788f6837f6b89c80d8 | GET: StaffRegistration | namespace MAS_Sustainability.Controllers
public class StaffRegistrationController : Controller
public ActionResult Index()
{
return View();
} | 1 |
f8f9aac205ca43925eec124a7f5e0b03 | b1e4d66d4d0d3d233fd4b247db7a0193 | UI背景遮罩回调方法 (重写) | class FaceBehavior : CoordinatorLayout.Behavior<View>
override fun onLayoutChild(parent: CoordinatorLayout, child: View, layoutDirection: Int): Boolean {
child.findViewById<View>(R.id.v_mask).background = drawable
return false
} | 1 |
d6f01d450b689153992a0b999b234cb7 | a9d0ef3ca45e08b79091dccebb99c178 | Process log messages to request its location details. | public void start(ExecuteContext executeContext) throws Exception {
LocationProcessResult result = rawLogProcessor.processLocationData();
executeContext.collectKVData(RETURN_KEY_LOCATIONS, result);
} | 1 |
c2a1cb5c1a76517730f4a8ffc36bc672 | 5934526a44440d53573e5b0b28037b44 | 根据点击的按钮对数组进行对应操作 | if(flag === 1) {
try {
var inputList = inputObj.value.split(",");
if (inputObj.value === "") {
throw "请输入内容";
}
for (var k = 0; k < inputList.length; k++) {
blockList.unshift(creatBlock(inputList[k]));
}
... | 1 |
f154938f7f070312b5eb10268a9e30f1 | 2b656315f5fa3a493911c36fb7fb2fb5 | Lee toda la informacion en filename y la devuelve como un vector de string
siendo cada string una linea en el archivo filename. | string line = " ";
ifstream fileReader(fileName, ios::in);
int lineCount = getFileLineCount(fileName);
vector<string> lines;
for( int i = 0; i < lineCount; i++){
getline(fileReader, line);
lines.push_back(line);
}
return lines;
} | 1 |
7b0695548038b48aa7cc31d29f803b66 | 01a0b98295ce044bd701103cfe4a9ef5 | 插入数据到公司和金融牌照的关联表中 | class SaveDataPipeline(object):
def insert_corp_info(self, item, cur):
values = (item['id'],
item['org_name'],
item['org_code'],
item['org_type'],
item['address'],
item['tyshxydm'],
item['nsrsbh'],
... | 0 |
646de8ec5c285ccddb22e1ae7812e154 | ea24f4c67a1246967a58710213658bad | Returns train, validation and test directories | def filepaths():
return TRAIN_PATH, DEV_PATH, TEST_PATH | 1 |
388aea8b3fcc19f6ad12532d60db478e | 8c3b0b103a1dbe79eeefd3f2fb52448e | For every pixel in the column, find the closest matching median color of a subcube | uint8_t u_M, uint8_t v_m, uint8_t v_M, uint32_t *col)
{
uint32_t cnt = 0;
uint8_t *source = input->buf;
uint8_t *dest = output->buf;
output->ts = input->ts;
for (uint16_t x = 0; x < output->w; x++){
for (uint16_t y = 0; y < output->h; y+=2) {
if (
(dest[1] >= y_m)... | 0 |
b3383a2af6e16089ba4d092922383574 | c0ebd386d5387dabd8903493ec7019c1 | 更新店铺理发师 | @TxTransaction
@Transactional(rollbackFor = Exception.class)
public int modifyObj(StoreBeautician storeBeautician) {
return this.storeBeauticianMapper.updateByPrimaryKeySelective(storeBeautician);
} | 1 |
2e244b4e56f6f733d02a9353c0cdb41e | 3bacfd2797ddc96bd94a9dce8684d0e5 | To find the greatest commom divisor of two numbers | {
int temp = 0;
int rem = 0;
do
{
rem = n1 % n2;
if (rem == 0)
temp = n2;
else
{
n1 = n2;
n2 = rem;
}
}
while (rem != 0);
return temp;
} | 1 |
2f5efab17222faea8fb3abecfbea1a5e | 147f152137358586a1e1fdc4e0fbd389 | Enable/disable VLAN ingress filtering on a VSC9953 port | shiva_port_igmps_status_set(a_uint32_t dev_id, fal_port_t port_id, a_bool_t enable)
{
sw_error_t rv;
HSL_API_LOCK;
rv = _shiva_port_igmps_status_set(dev_id, port_id, enable);
HSL_API_UNLOCK;
return rv;
} | 0 |
89c78339fa58eb72728a6469feb8f984 | 30e62291bd2e10acdfe3f0efb6d2b9d3 | Submit a Storm topology to Nimbus. | @POST
@Path("/create")
public Response createTopology(ResTopology topology); | 1 |
bedfc95cbfadddc1410935aa39b240f3 | 121ae55970654bdfc7d731a9311fc80b | Runs after each test. They would all be deleted at the end of the tests but if it was in production
there would be a lot of tests so this avoids them building up. | class GeneratingTest extends \Codeception\TestCase\Test
protected function _after()
{
unset($this->api);
Test::clean();
} | 1 |
bdf8d636e91bdb8ad77dff78fdcf3098 | 644e1d5f494d3872414177f0a9e58d60 | Verifica che un campo sia compilato | if(!isset($this->fields[$field]) || $this->fields[$field] == null)
return false;
return true;
} | 1 |
505d4a67743b06cb77e18b565d813e64 | a567226c313eb319e45294bb4f67eca3 | transform vector of classes with one hot encoding | def convertToClasses(targetVector):
return np.argmax(targetVector[:,1:5], axis=1) | 0 |
a29bc11c0849ead7539ea0f5510dc04d | cc07193e50e796c990f6f3fec8604b95 | Finishes the graph for the current field. | {
#if UNITY_EDITOR
GraphFieldUpdateStyle();
GraphFieldStartGL();
GraphFieldDraw();
GraphFieldDrawBorders();
if (m_Values.Count > 2)
{
float _lowestValY, _valRangeY, _stepX;
GraphFieldRemoveHistory();
GraphFieldCalculateStepS... | 1 |
a4dab5e04d47b3d3d3168a890a819310 | e6804e133f704bf7e3e6a89d9aa2ab41 | 35.请编写一个函数,用来删除字符串中的所有空格。 | {
char *psrc = s;
char *pdst = s;
cout << "remove_space: input: " << psrc << endl;
while(*psrc != '\0') {
if (*psrc != ' ') {
*pdst = *psrc;
pdst++;
psrc++;
}else {
psrc++;
}
}
*pdst='\0';
cout << "remove_space: output: ... | 1 |
fc43145cf1f9ab720e77e51d6abda02a | faf4804087e3739800c91981e65a169c | Retrieves a user's current Do Not Disturb status.
} | isDoNotDisturb(){
return !this._notificationSettings.get_boolean('show-banners');
} | 1 |
0fe407cb5e06e726c77b1d5b3471a06b | 071a6227906d5c2e5453c19f0963b10b | replace the terraintrees with prefab trees | {
let [mainTerrain, terrainForestFloor1, terrainForestFloor2, terrainForestTree1, terrainForestTree2] = terrainSet;
let forestVariants = [
{
"borderTerrains": [terrainForestFloor2, mainTerrain, terrainForestTree1],
"interiorTerrains": [terrainForestFloor2, terrainForestTree1]
},
{
"borderTerrains": [te... | 0 |
3e9fd60f2de31aa3589b284ebe37bf7a | 8f5121fff48f533100f1ae52b14d08c3 | write the config to the file, overwrite current config file | class ConfigEditor(object):
# initialize ConfigEditor
def write_config_file(self,file_path):
try:
f = open(file_path,'w')
libconf.dump(self.output,f)
self.output = dict()
except Exception as e:
print 'Failed to write to file ',e
raise | 1 |
17e9e3d03b6157c4af83d470fca06ea9 | c2cace43a4b19318877e42f3e90c57ae | Called when a POI has been selected by the active point in the map. | public void onResume() {
Log.d(LOG_TAG, "onResume");
selectedPOIs = tourState.getSelectedPOIs();
updateTour(selectedPOIs);
super.onResume();
} | 0 |
c4535939218072e16b36636c231cf52b | 9f314502b869f26fa182e4be10b97b71 | Individual stats access - gets the worst frame time. | namespace OgrePlugin
[NativeSubsystemType]
public abstract class RenderTarget : IDisposable
public float getWorstFPS()
{
return RenderTarget_getWorstFPS(renderTarget);
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.