query_id
string
corpus_id
string
query
string
code
string
label
int64
08374504c60bf512803527ada16e4ecb
72e96b7e8e16e12b146869548ac37438
查询所有医生的详细信息
@RestController @RequestMapping("SecDoctor") public class SecDoctorController @RequestMapping("doctor_all") public List<DoctorVo> doctor_all(){ return secDoctorService.doctor_all(); }
1
ff3e2a853b90c03e2ded8966fd9819f8
17604e97805c29cde48dd6ad43de418d
All subordinates of this leader
class User extends Authenticatable implements JWTSubject public function subordinates() { return $this->hasMany(User::class, 'parent_id', 'id'); }
1
500068058f7150126d0b18fedb5cf1f7
e6a8d38120cb5e0b21138d1230c09a38
= Manually mines Ore
namespace WorldGen public partial class Generator : Form static void AddMinerals(byte oreType, int yVal) { int x, y, yMax, xMax, oreChance, oreCount, orePlaced; for (y = yVal; y < size; y++) for (x = 0; x < size; x++) { oreChance = ...
0
99d883559f3aa65fc156f2231b6d21f5
9dcafb59db5415199f096df0b174f8ef
Strips string of all characters in tokens list
int i; for (i = 0; i < num_tokens; ++i) { if (token_buffer[i] != NULL) { token_buffer[i] = NULL; } } num_tokens = 0; return num_tokens; }
0
c26a7a9cfab80ebb83d9702a66e9fb24
bb715a3b22b955821c173b9e8b43a129
Record model confidence on every prediction
if self.n_out == 1: y_decision = (p_y_given_x > 0.5) y_decision = y_decision.astype(int) else: y_decision = numpy.argmax(p_y_given_x, axis=1) for i in xrange(y.shape[0]): self.conf_mat[y[i]][y_decision[i]] +=1
0
51197eea498a1bad1d0ca3d9b21303e7
5b1a4aac69579e7c92e8844094222608
Recupera o menor_f dentre os vertices em aberto
double min = INF; int min_index = -1; for (int v = 0; v < nV; v++) if (verFaltantes[v] == false && pesos[v] < min) { min = pesos[v]; min_index = v; } return min_index; }
1
d5be2900801e4aa099fb886cf34229d2
9a77137e240a5d7b9c85d686555ce3fd
Computes the bin count of an FFT with given size.
def bincount(src, size=None): src = src.contiguous().view(-1) if src.is_cuda: size = src.max() + 1 if size is None else size return bincount_cuda.bincount(src, size) else: out = np.bincount(src.long().numpy(), minlength=size) return torch.from_numpy(out)
0
5400dcf4b5d1d96540ff0904f56a9d52
8a51345d6c9baa2c2b9c7eb474093c9b
驗證 代理商詳細資料 - 更新代理推廣鏈接
namespace Domain.Api.V1.Test.Model public class DomainAgencyServiceV2ModelAgentInAgencyListTests : IDisposable [Fact] public void CreAgentVideoURLTest() { }
0
8ce6a645e785958fbf82033f75e1b3f0
84259f9207f0239b9544f6329dd39124
arc-distance = arccos of the dot-product ( range in [0, PI] )
double sphere_distance_cartesian(const POINT3D *s, const POINT3D *e) { return acos(FP_MIN(1.0, dot_product(s, e))); }
1
23e690cf71362887966e359e615d6559
e9427d25faca3754fca0a9b767f9e89e
Set the default query state to a new query state.
def newQueryState(data, modelState): K, vocab, dtype = modelState.K, modelState.vocab, modelState.dtype D,T = data.words.shape assert T == vocab.shape[1], "The number of terms in the document-term matrix (" + str(T) + ") differs from that in the model-states vocabulary parameter " + str(vocab.shape[1]) ...
1
2558e2142ccf2545b32db48ba8b673c5
3723585397104165b8a22260dd4f14ee
Create an intermediate package init function.
def emit_imports(): return self.emit_imports_for_root_package(ctx) code = self.emit_package_init_file(ctx, _TEMPLATE_PACKAGE, emit_imports) dir = get_ontology_directory(ctx, 'types') file = get_package_init_file_name() return (code, dir, file)
1
16059d6d00c189bc5b50aebf9f777aa2
42ed2028259ce054bcefacbc6b14da39
Creates supporting stored procedures
class CreateMachinesRoutines extends Migration public function up() { $SQL = " CREATE FUNCTION get_type_id(in_name VARCHAR(45)) RETURNS INT BEGIN RETURN (SELECT id FROM machine_types WHERE type=in_name); END "; DB::connection()-...
1
5b34b88ca6834119f8803c423da6265d
bb86c9efe0fd8a47279845135a615f11
根据用户id查找用户信息,放入缓存中
User getAllUserByCacheById(int id);
0
5a209f2757921c6d4757b8fde47a5122
3135171a03ae8d47274274e754b49d6e
Decode a B16 formatted value in a short (2 bytes) encoded B16 format value
def u16b(x): import struct return struct.unpack('>H', x)[0]
1
3ed249ac1324fbf2e2390b3f3a8a4b35
14de75bce5eb74c24648402ec7a1f92d
中文字符统计
func main() { fileName := "d:/test/abc.txt" file, err := os.Open(fileName) if err != nil { fmt.Println("open file err=", err) } defer file.Close() reader := bufio.NewReader(file) count := CharCount{} for { content, err := reader.ReadString('\n') for _, v := range content { switch { case v >= 'a' && ...
0
b86ac24bc7261757e6eee526661a07ef
799e2f62f119965be517acece5e7f252
Starts an activity with {@link Intent#FLAG_ACTIVITY_CLEAR_TOP} If the activity is already running in the current task, then instead of launching a new instance of that activity, all of the other activities on top of it will be closed and this Intent will be delivered to the (now on top) old activity as a new Intent.
abstract class BaseActivity : ActivityView(), MvpView protected fun startActivityClearStack(intent: Intent?) { intent?.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK startActivity(intent) finish() }
0
913d08eb1437fdafb0d47c49ed74bfb4
9f5c51dd2b00b6420b147593b08103a9
更新上传进度V2
function updateUpload(id,name,progress){ for(var i = 0 , l = $scope.newList.length; i < l ; i++ ){ if( $scope.newList[i]['id'] === id ){ if( progress == 100 ){ $scope.newList[i]['confirmTipShow'] = true; $scope.newList[i]['p...
1
681a692445cde09bd22c4b684ca5748a
6d30b4c53a1e5aed2fb743d71a5cb89f
Runs the test using the specified user control and view model.
namespace Xunit.UserContext.XunitExtensions public class UserContextTestCase : XunitTestCase public override Task<RunSummary> RunAsync(IMessageSink diagnosticMessageSink, IMessageBus messageBus, object[] constructorArguments, ExceptionAggregator aggregator, CancellationTokenSource cancellationTokenSource) {...
0
2bde8c37c04a0d531fa6165f7bf0a042
8c2122c2fb1fe9aede8bd146b1e3f6d3
Check if we're leaving the collider of the TargetObstacle
public class VisionRadius : TargetDetection virtual public void OnTriggerStay2D(Collider2D other) { if (CheckObscured (other.gameObject) == false) { TargetDetected (other.gameObject); } }
0
9f6e07ccfb3c22b0e0a9c7e75b7483c4
d146cc76b9b01e25e334f25dbf82ec27
OutputFormat should format record according to template
record = logdog.LogRecord('\n', {'a1': 'hello', 'a2': 'world'}) format = logdog.OutputFormat('%(a1)s %(a2)s\n') result = format.format(record) self.assertEqual(result, 'hello world\n')
1
239abedfb81a3bf48f480f3b85814cae
5f4535cb58d28bc113258614666eed29
Removes all occurences of HTTP GET arguments specified by their HTTP GET argument names.
export class HttpGetArgumentCollection extends HttpArgumentCollection replaceBy( httpGetArgumentReplacement, ...predicateHandlers ) { super.replaceBy( httpGetArgumentReplacement, ...predicateHandlers ); }
0
e5a22cdd27965bd77a633e4f372c560d
420cda01267bc1f71f58ea5d8340f772
Finds all similar songs to a song which are stored as children of an XML corpus.
public void findCollocations();
0
d6fa36a4a39be5f2dc68e5443fec487a
9b1356b21215684cb5698946672e5f2e
Devuelve la dirección en la que se está moviendo la serpiente.
switch (this.direction) { case "right": return { x: this.head.x + 1, y: this.head.y }; case "down": return { x: this.head.x, y: this.head.y + 1 }; case "left": return { x: this.head.x - 1, y: this.h...
0
b5300dca48e69da18d3f0fcf0ee2a036
24a8d74282e0631303f546bda35dcab2
How many times a Rabbitmq consumer will retry the same message if Camel failed to process the message. The option will be converted to a &lt;code&gt;int&lt;/code&gt; type.
retries_ = value; bitField0_ |= 0x00000020; onChanged(); return this; }
1
a767f54695726973f570aa1267338aef
391d7675bfa2022c88c3eac7a71222bf
删除对应的交易参考号和pos机小照片
var posInfo = this.positions[relateID]; if (posInfo){ if (posInfo.SLorder && posInfo.SLorder.ID==orderID){ delete posInfo.SLorder; delete posInfo.SL; delete posInfo.SLDesc; return true; }else if(posInfo.TPorder && po...
0
869a03c551c169b42e436acce3261761
ef7fd4dc6226aefe3e0be1e02b4c7de1
集合转为符号隔开的字符串
StringBuilder sB = new StringBuilder(); for(String value: hs){ sB.append(value).append(";"); } return sB.toString(); }
1
5a135113b5d87ad24aa96e43b3793b6b
ec739b4ef93737a5697e4916a5cec81f
Create regular pool with mutual exclussion guard.
static mp_gpool_t* mp_gpool_create(void* p, ssize_t size, ssize_t stack_size, ssize_t gap_size, bool zeroed) { mp_assert_internal(size >= stack_size + gap_size && p != NULL && (size_t)stack_size > sizeof(mp_gpool_t)); stack_size = mp_align_up(stack_size, os_page_size); gap_size = mp_align_up(gap_size, os_page_siz...
1
ce63bc47e21ed40b735d9417957d3210
9a908fb6de9683bc294b649427f6415b
create subsets from dataset, each subset is balanced regarding the number of rows for each class
data_subsets = dict() for row in data: category = row[col] if category not in data_subsets: data_subsets[category] = list() data_subsets[category].append(row) return data_subsets
0
d64fb086cce94baab19547296f303e5a
a05bda9c856f82c00c96dad0d40a3be2
Searches the events asynchronously.
public IEnumerable<EventWrapper> SearchEvents(string query) { var feeds = FeedStorage.SearchFeeds(query, FeedType.All, Guid.Empty, (int)_context.Count, (int)_context.StartIndex); _context.SetDataPaginated(); return feeds.Select(x => new EventWrapper(x)).ToSmartList();...
0
be8476418f41d837e74d58af592d6ec3
1a3d73eb5cc069eb29308bb12d1e7e2f
수정된 데이터들을 저장하고 목록으로 돌아감
@Controller // controller bean으로 등록 public class GuestbookController @RequestMapping("update.do") public String update(GuestbookDTO dto) { guestbookService.update(dto); return "redirect:/list.do"; }
1
01ca8a6aab21c4c644acf6d7d3421408
894317b9a9b579f4cb2ab5a49c308530
将所有数据绝对值化
class Statistics_Computation: def abs_values(self): try: df = self.dataframe.abs() self.results.append(df) return df except Exception as Ex: return None
1
928c53ed06ebd56a04d6b5d2eac0beae
658c92d32fac37099491934da0e7b9bd
Gets the value of the realname property.
class profile: def get_real_name(self): return self._summary_object.get("realname")
1
a09ed8ba5ea384fd5ff0099ac3d618c8
da1aa384fe1d06791f6af5c332c66751
Test case for a_pifaq_api_key_id_get
class TestMoviesApiApi(unittest.TestCase): def test_a_pi_search_title_api_key_expression_get(self): pass
0
4094a724d46d8d7526d0bc0761fe489a
ce5829293c42f5f3b2bea5b6d733d37b
current_userに値があればtrue、無ければfalseを返す。
def logged_in? !!current_user end
1
925dbaeb96b3885ad82fd235504c6930
370ea4eb3e3050500b2cca1f96ffc249
Accept Work
class PerformancePresenter @Inject constructor( viewState: PerformanceViewState, private val sessionManager: SessionManager, private val subscriptionProvider: SubscriptionProvider, private val worksLoader: WorksLoader, private val navigator: Navigator, private val workJob...
1
7a8e4636a383717c35d7bef9ca948edb
a5af0dbbe2781bb71f6145844ffc9e17
Test case for addressBookGetByContactId This call returns new profile data (for archiving purpose) by contact identifier.
{ $newContact = new Addressbook_Model_Contact(array( 'n_family' => 'PHPUNIT', 'container_id' => Addressbook_Controller_Contact::getInstance()->getDefaultAddressbook()->getId(), 'tel_cell_private' => '+49TELCELLPRIVATE', )); $newContact = Add...
0
443970ebad3b53391344b9131f4d42d8
17ba44f649318aabc2ac214cb01561a7
Reads the current value of the Control Register 2 (CR2). Reads and returns the current value of CR2. This function is only available on IA-32 and x64. This returns a 32-bit value on IA-32 and a 64-bit value on x64.
uint8 CONTROL_2_ReadDataReg(void) { return (uint8)((CONTROL_2_DR & CONTROL_2_MASK) >> CONTROL_2_SHIFT); }
0
9ab3eae06aad473ceb430b13c5b81659
954020fcdefe76936f52e40c1a617c23
function to convert sorted array to a almost complete balanced tree
struct bstnode* sortedarraytoBST(int arr[],int start,int end){ if(start > end) return NULL; int mid = (start + end)/2; struct bstnode* root = getnewnode(arr[mid]); root->left = sortedarraytoBST(arr, start, mid-1); root->right = sortedarraytoBST(arr, mid+1 , end); return root; }
1
a628f6e98167554ff2c7a6a3e1098ce5
1e0c24397eb97b3f0afbc7e524af04d4
fill the screen with an acid pattern
void FillScreen () { char ch = 'A'; LCD_Clear(); for (byte count=1;count<100;count++) { LCD_Goto(18,0); LCD_Integer(count); for (byte i=0;i<NUMCHARS;i++) { UpdateCursor(i); LCD_Char(ch); ch = GetNextChar(ch); msDelay(60); } } }
0
7236cce21213de722e55040f231ed521
81363f08c3d8308d691053371ff9696c
The name of the pragma. E.g. for #pragma foo bar, returns 'foo'
set<string> PragmaParser::getNames() { if(!isPopcornPragma()) throw string("Cannot get names because this is an unknown pragma"); return names; }
0
2125fcb4e016a938633030c5626b223f
cddbf0eca486ce643b82ca2f2334217f
apply change to html pages accoriding to the output of keywords analysis
function gui_htmlChanged(str) { var out_element = document.getElementById('dd_output'); if(out_element){ var out = document.getElementById('dd_output').value; if (document.getElementById('html_container')) { if (out == 'css') { document.getElementById('html_container').value = output_css(); } else if...
0
a2b0e0229c116e94e7ee167e318d5c31
3c67505ed994e59ade8231a280be1a51
Draws user interface according to xml layout.
class MainView(base, form): def draw_ui(self): self.ComboxCategories = QComboBox() self.stackedWidgetComboxesAlgorithms = QStackedWidget() self.select_cat_alg_vbox_layout.addWidget(self.ComboxCategories) self.select_cat_alg_vbox_layout.addWidget(self.stackedWidgetComboxesAlgorithms) ...
0
273bf1b03f303de233c05d3cdc3a9a6d
4c7b6a8b9fe3d6851d4d195f0d5952fa
*Two Pair: two sets of pairs of the same card denomination.
def two_pair(hand): p1, n1 = one_pair(hand) if not p1: return False, None left_over_hand = [x for x in hand if conv_card_to_num(x[0]) != n1[0]] p2, n2 = one_pair(left_over_hand) if p1 and p2: final_card_val = [conv_card_to_num( x[0]) for x in left_over_hand if conv_card_t...
1
d9bda1af8bf633658cd09145a5fd8b31
9e09330358bf0cdd4ee275ff77997735
Add a new regex and stores it as a compiled Pattern
class EveCoreValidator extends EveCoreSingleton public function addPattern($name, $regex, $override = false){ if(empty($name)){ throw new Exception('Pattern name should be non-empty'); } elseif(!$override && isset(self::$patterns[$name])){ throw new Exception('Pattern alr...
1
abdf7a33a806a44cf4681bd07114b8e8
7d793e07f4923582296c98925a99036d
Create new views for list items (invoked by the WearableListView's layout manager)
public View newView(Context context, Cursor cursor, ViewGroup parent) { return LayoutInflater.from(context).inflate(R.layout.list_item, parent, false); }
1
5b6dc2a9344c598c17018b65d0a53ff2
ae66589e4a581602585dd4a0722aed93
Performs and displays search suggestions once the first few letters, entered by the user, matches existing words already in the database.
cur_word = self._ta.get('start', tk.INSERT).lower() if cur_word == self._prev_word: return else: self._prev_word = cur_word if not cur_word or (len(cur_word) == 1 and not cur_word.isalnum()): self._suggestions = [] else: completions...
1
da45ad0fbbbe7a66cd55d17b50533a5c
56b9484791946c878d54de8ddecc4b0f
从redis中获取json字符串,转换成指定对象返回
@Slf4j public class RedisUtil public static <T> T get(String key, Type type) { key = prefix + key; return JSONObject.parseObject(getFromRedis(key), type); }
1
4641b8375d045e365f211c5190a45a47
c66f570aadf97844be3bbd29d2e74f97
Adds or removes given mean and std from time series.
self.count += 1 delta1 = value1 - self._mean_1 delta2 = value2 - self._mean_2 self._mean_1 += delta1 / self.count self._mean_2 += delta2 / self.count self._m2_1 += delta1 * (value1 - self._mean_1) self._m2_2 += delta2 * (value2 - self._mean_2) self.comomen...
0
2c67bf05a07cef1291d625da0037ae89
6a3b1841c73daee5968272af639f692a
Returns the scheduling rule for this operation.
ISchedulingRule getSchedulingRule();
1
e8a326923f382543b1979cd8db6f94a8
694a4dd0c782d3eb429b707d829b8804
Set the next protocol to use.
class ReolinkBase: async def set_protocol(self, protocol): self._protocol = protocol await self._api.set_protocol(protocol)
1
91b3af87ee3288b3f9ee99cd6d051665
f163a0455d91998bc15ef24b70c8629b
Clones an existing customer context.
namespace Nettiers.AdventureWorks.Entities [Serializable] [DataObject, CLSCompliant(true)] public abstract partial class CustomerBase : EntityBase, ICustomer, IEntityId<CustomerKey>, System.IComparable, System.ICloneable, ICloneableEx, IEditableObject, IComponent, INotifyPropertyChanged public object Clone(IDictio...
1
ac8aa314fb916253eb3e707b14deed1b
409d6bf79c803fd4c159227a0ff872b9
Make Sure Sample Size Will Be Between 64 and 6192
class MLMCSimulator: def _verify_sample_sizes(self, sample_sizes, initial_samples=True): if isinstance(sample_sizes, np.ndarray): verified_sample_sizes = sample_sizes elif isinstance(sample_sizes, list): verified_sample_sizes = np.array(sample_sizes) else: if ...
0
82cce65822e874aef824b131687d81f8
886480d100970863528d7bfd2969b925
如果是admin 用户直接通过,不走权限限制
if ctx.Request.RequestURI == "/admin/login" || ctx.Request.RequestURI == "/admin/dologin" { return } adminUser := ctx.Input.Session("admin_user").(*models.AdminUser) if adminUser.RoleId == 1 { return } authRule, _ := models.CheckRuleByUrl(ctx.Request.RequestURI) if authRule == nil { return } else { if u...
1
6f8220fc104165232c8012a9cf3fcb7b
c4d2aec8827f2c3ba1cc88f5590c630d
Generate options for a post request
function generateOptions(message) { return { 'method': 'POST', 'headers': { 'Content-type': 'application/json' }, 'payload': { 'access_token': Settings.ACCESS_TOKEN, 'formatting': 'MARKDOWN', 'message': message } } }
1
29517d1b6deaa366a25c70a588d63f57
a392704ea35282ba50d698d1460157cb
Note: This sorts alphabetically, which isn't ideal for the age column. However, it doesn't matter how these are sorted in the backend, this is just for convenience when looking at the data in BigQuery.
def author_records_to_bq(author_records: List[Dict]): records = [] for record in author_records: tmp = copy.copy(record) tmp["age"] = str(tmp["age"]) records.append(tmp) return records
0
0f9138e0892a5e14b4a8c993ca20d9da
b22bc1727e0b34e73f2520fc3162f2eb
finds player inventory
class Rpg(cmd.Cmd): def do_inventory(self, arg): Player().inventory()
1
7709077d84eb64c0623d28bfdf5d94da
92962430d2bf2540203aed252d4c6627
Return true if the touch event is handled and should not be propagated further, false otherwise. If false [onTouchMove] and [onTouchUp] will not be called.
function M:onTouchHandled(event, x, y) end
0
196bc0b2d2276ecdcdaf3d18ecbffbfe
d992ac0f62b8595e530c6efa65f1a30e
@brief Compose the response on a XPeer read command.
bStatus_t ATT_ParseReadRsp( uint8* pParams, uint16 len, attMsg_t* pMsg ) { attReadRsp_t* pRsp = &pMsg->readRsp; if ( len <= ATT_MTU_SIZE - 1 ) { pRsp->len = len; VOID osal_memcpy( pRsp->value, pParams, len ); return ( SUCCESS); } return ( ATT_ERR_INVALID_PDU ); }
0
7542b09adcc5a0b15fbd2785188f8122
41eb7b27626f6b915a34bcb7353e4817
returns a python dictionary of the jsons that we stored.
class SmartDL: def get_json(self): data = self.get_data() return json.loads(data)
1
f73148ae6089f813727623c2222edf84
398b22f801f5f8a88f13d2bfa2d6282e
Creates and updates managers for the player, Sets the UI to InGame-mode, and adds events listeners
public class InGame_UI_Manager : MonoBehaviour void Start () { }
0
bb60407ef15d99903f6637ea293e478f
09ba4542c2a706ea8edf5726e67dd332
This function adds elements -- like script and css files -- to the <head> section of the admin HTML documents
class plgK2Example extends K2Plugin public function onK2RenderAdminHead($row, $type) { $this->addScript(JUri::root(true).'/plugins/k2/example/assets/script.js'); $this->addStyle(JUri::root(true).'/plugins/k2/example/assets/style.css'); }
1
6b4db9d199fae7eb8a7cc2eab478d22c
659f6864c7583134ed9a6262edc405d9
专家评价创客项目
public String evaluate(@RequestParam(value="presention")String evaluation, @RequestParam(value="advice")String problems, @RequestParam(value="sort")String flag, @RequestParam(value="id")int id,ModelMap model) throws UnsupportedEncodingException{ problems = new String(problems.getBytes("iso-8859-1"), "...
1
f9fedaa9b5b468c06b8240ebd434392f
04c6aee5c853aa241cc5a83332fa1625
Setter method for cli.
if ($this->isCLI) { $this->console = new ConsoleOutput(); } return $this; }
0
c890e9e4503d45bc0d41a8dc6c4ed156
09d2846ad6f6a9244fdf54bfec38a40c
Vrací název vrcholu
public class ClimbInfo public String getHName() { return hName; }
1
a12ad1460a0d68d5efa0817610f0dd7f
7482650a9526b6a6a29dc94ddcb0b180
Check that the collection does not contain any null elements
{ IsNotNull<ICollection<T>>(o, message); if (o.Count == 0) Fault(message); return this; }
0
4cc1c52d4bacaea7b378ca8211ddb66e
d08cf166694f1707bca36aaf1fd70cd9
Get all rounds for a game
return this.http.get(this.baseUrl + 'api/Game/GetByRound', { params: { round: round } }); }
0
5a9aa92341befbf721899af865b4d68f
d604d0a8148c048f3bc486ac4750d1e1
Get the customer's address by id
var address; if (customer && customer.isAuthenticated()) { var addressBook = customer.profile.addressBook; address = addressBook.getAddress(addressID); } return address; }
1
fa5796768b0fc75fa628def506987db3
b81193ab1cde1ae66b69b87d66988e6f
https://qiita.com/riktor/items/4a90b4e125cd091a9d07
pub fn signal_name(sig: i32) -> String { if 32 <= sig && sig <= 64 { return format!("SIGRT{}", sig); } match sig { libc::SIGHUP => "SIGHUP".into(), libc::SIGINT => "SIGINT".into(), libc::SIGQUIT => "SIGQUIT".into(), libc::SIGILL => "SIGILL".into(), libc::SIGTR...
1
33763a541908b55a4d8ca39276dca9f1
300b60543fecfe308f53cefe677d0e96
Form instance used to clean/(de)serialize field values.
def construct_instance(form, instance, fields=None, exclude=None): from django.db import models opts = instance._meta cleaned_data = form.cleaned_data file_field_list = [] for f in opts._fields.values(): if not f.editable or isinstance(f, models.AutoField) \ or f.name not in ...
1
b26e47725ec95bd191ee5dc1aa3d8145
51bc49e3d5fad1fbc188ac0fe9a9baf4
Issues a request for a connection to the passed host and port, and returns the connected channel
{ HttpConnection connection; var key = string.Format("{0}:{1}", host, port); if (connectionPool.ContainsKey(key)) { connection = connectionPool[key]; connectionPool.Remove(key); if (connection.IsConnected()) { return connection; } connection.Dispose(); } connection = new...
1
ce7128d0d1896f29f36863ce2c3e9fd8
2f314cbd188990b681c88ef9934f871b
楽曲ごとに似ている楽曲の情報を取得する関数(不使用)
with connection.cursor() as cursor: sql = "SELECT * FROM `music2` where music_id < '427595864' group BY music_id " cursor.execute(sql, ()) return cursor.fetchall()
0
21205a8d5df1461def0068eac5b7441b
0392cfe8a26f4e88ee3a892bf2a75efe
Test case for delete_property_set
class TestSetsApi(unittest.TestCase): def test_sets_delete_delete(self): pass
0
09f02c4afbace10665d9ceff0706354a
15b5fb2138f50799827b0a093e241c03
Transition to the next checkpoint and resets the input setting. This method is passed to the phase manager as the interrupt transition callback.
abstract class _RedoWriter implements CauseCloseable, ShutdownHook, Flushable abstract void checkpointSwitch() throws IOException;
1
d49589d63a170a744985aebc333efc27
2a3161d52e5937e15387bc732431e0ed
Sets the no_internet_enabled of this Context. Specifies whether the context applies to connections that are neither connection nor Internet enabled. Set to true to apply. # noqa: E501
class Context(object): def no_connection_enabled(self, no_connection_enabled): self._no_connection_enabled = no_connection_enabled
0
0dc754d63b7bc26884dcbc154ba7d3db
c16fcfe805224ed4ac4afc94f046ed83
创建隐藏平移动画(纵向 Y轴)
TranslateAnimation mHiddenAction = new TranslateAnimation(Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 0.0f, Animation.RELATIVE_TO_SELF, 1.0f); mHiddenAction.setDuration(250); return mHiddenAction; }
1
680d37dc69a22f71071c6de0805f51a5
8da6d71aee10a8997de170962f081ffc
Metodo que se llamada del lado del cliente para realizar la operacion de llenar las cuentas
try { ServerSocket server = new ServerSocket(port); Socket client; BufferedReader fromClient; PrintStream toClient; while (true) { client = server.accept(); fromClient = new BufferedReader(new InputStreamRe...
0
16b798b083404b16b20cadd0300c09c2
ac7799cb2a8f356c0e02b49cac1fd88c
Рисует объемы по активной свечке
axes= self._Axes xindex= self._xindex up= self._up down= self._down side= self._side for idx, poc in enumerate(self._zipoc): if poc[0] == poc[1] and None not in poc: variant= int(round((poc[1]+1000)/2000.0, 0)) self._open[idx]...
0
50b917c07e105547012551323ebbd4fa
bc9f6ffd4cb671eef0258d1b1afaa855
生成一个正交投影矩阵
function projection(width, height, depth) { return [ 2 / width, 0, 0, 0, 0, -2 / height, 0, 0, 0, 0, 2 / depth, 0, -1, 1, 0, 1, ]; }
1
34f3c7ed4a2cba938968bcf9230d05b8
649734446c42edf3bcb6f02a1fd21680
Test case to check the use of one instance in key and value.
public class InstanceTest @Test public void testAddValue() { Instance i = new Instance("i", "uri", this.it, null, null); Pair<ValueType, String> valueEntry = new Pair<>(this.vt, "droelf"); i.addValue(this.vt, "droelf"); Assertions.assertTrue(i.getValues().size() == 1); Assert...
0
a7d7df17fca63abee9eeff17b78cc4d3
ab0f249e4413ade5fdac7cf718f72c48
业绩目标展示页面 该页面由三方跳转,带上参数商家编号、分店编号、导购编号 导购业绩目标展示、已经完成的业绩、未完成的数量; 当月剩余的天数,计算出平均每天还需完成量; 将数据推送到页面上
class AgentAchievementController extends AgentController{ public function index(){ $id = getHomeUserID(); $user_info = D('AdminInfo')->getInfo($id); $scenic_spots_id = $user_info['scenic_spots_id']; $spots_info = D('ScenicSpots')->getInfoById($user_info['scenic_spots_id']); $type...
0
14f87e8e308b6f508cec5f59f37722e0
3fe44f90f0f08d4555255ab84ba91439
Gets a mempool item by tx id.
class Chain: def get_mem_pool_entry(self, tx_id: str): return self._provider.make_request(RPC.chain_getMemPoolEntry, [tx_id])
1
65742f97cbac986070217cd618dd6ac1
bd94581b80042ae5f8e247ff2a067849
Gets a complete options schema for a rule.
const result: any = {}; schematicOptions.forEach(element => { const newOption: any = { type: element.type, description: element.description, }; if (element.default) { newOption.default = element.default; } if (paramAliases[element.name]) { newOption.alias = paramAliases[e...
1
cdf510eff712fe50ce6c84a60f5c3657
83221be1953457627d6b80e39385f8d4
1D Multi-resolution analysis DCT.
class DCT: def dct(self, data): return self.phi_1d.dot(data)
1
851ff60c8b47ab432ff2afd002ea5807
21484b8b2e82c4ee7717f1b90881918b
! Enable or disable sub-modules of ESAI.
static vfe_status_t vfe_dynamic_enable_modules(vfe_ctrl_info_t *vfe_ctrl_obj) { vfe_status_t status = VFE_SUCCESS; vfe_module_t *mod_obj = &(vfe_ctrl_obj->vfe_module); vfe_params_t* params = &vfe_ctrl_obj->vfe_params; uint32_t config = 0; #ifdef _ANDROID_ char value[PROPERTY_VALUE_MAX]; property_get("persis...
0
1b2d888c61b00c62964a42a6da5f6aee
209486462c80d43b511fb58d6df75be5
Возвращает список ссылок (не самих объектов!) от данного объекта Если Объект - имя класса, то от всех объектов данного класса.
class Works(TeambitionAPI): def get_objectlinks(self, id): return self._get('api/works/{0}/objectlinks'.format(id))
1
fc9c5ca063f29447632ef15914b08a51
d690c0bf9448a7c320d4c06cb4e785f8
edit_storage_domain_configuration
r = sd_api.createStorageDomain(xml_info) if r['status_code'] == self.dm.expected_status_code_create_sd_fail: sd_ip = xmltodict.parse(xml_info)['storage_domain']['storage']['address'] dictCompare = DictCompare() if dictCompare.isSubsetDict(xmltodict...
0
a5d880ec3a5228169fa81af0bd5090f1
9319dc81f8b0ffa35cdb3dc4d0c84a5b
Whether bar chart or not.
public class Plot extends PlotBox public void setBars(boolean on) { _bars = on; }
1
7d8fd424a048bbb0b2933bb17371f6ae
baa1c216cd949dc96f11d96b911d40a8
Retrieves the list in which the log is written.
export class LogService getData() { return this.logList; }
1
f0a4f723b2401fdc4312c2e5450f80c8
248201ea058a06ef0b8ce542da3ab192
Number of remaining enemies.
try: enemies = self.browser.find_elements_by_xpath( "//span[contains(@class, 'hostile')]" ) numstale = 0 for enemy in enemies: try: enemy.get_attribute("class") except selenium.common.exceptions.S...
1
d242c3a28ecd066d2c5eb9b5bcf998eb
2b36a20b23ea13ee2009887753e09768
u"""获取车型颜色列表接口
async function getCarParityColors(typeId, modelId) { let time = new Date().getTime() let search = `?source=${source}&time=${time}` let url = `${GLOBAL_API_DOMAIN}/ware/car/${this.cityCode}/car-type/${typeId}/model/${modelId}/color${search}` const Response = await fetch(url, options) const ResponseOK = await R...
1
3066edf5f2f0b328951547a41a4709a4
0dfac767b23d6f6a5deb18e501fc3a78
Sets the attestation certificate.
class AttestationCacm public function setEtblAdr($etblAdr) { $this->etblAdr = $etblAdr; return $this; }
0
0cb61831646d055a597a66a41da25e12
bc35ce8c0e398b24c09c6d9dfd78f8f3
does some manipulation with a filled HashMap and checks if they work as intended
public class ExternalTests @Test public void testManipulate() throws Exception { map.clear(); assertTrue(map.isEmpty()); assertEquals(0, map.size()); assertNull(map.get(null)); assertNull(map.get("one")); assertFalse(map.containsKey("one")); assertFalse(map.conta...
1
08097b25fb69a27fda326cd829245f0e
e7b699f01bd3405032332102a325c60e
Retrieve TokenModel object from the auth context and returns it.
class TokenAuth implements AuthenticationInterface public function getUser(): ?UserModel { }
0
4b0665a6f3773fdeeab6b7b31fa73bd7
a60d50188d6bd302844d4b70bf1729ef
Affiche l'ArrayList sur plusieurs ligne lorsqu'elle depasse de celle courante.
if (this.n <= 0) this.n = 1; if (this.n > s.length + 1) this.n = 1; this.text.setText("<html>" + this.s[this.n - 1] + "</html>"); this.prec.setEnabled((this.n >= 2)); this.suiv.setEnabled((this.n < this.s.length)); if(this.n >= this.s.length){ this.desactiv.setSelected(true); BiomorphLauncher.gO...
0
843b4354dcf48a90d27ae3628263cfb9
1aebb0c4bd8ca1273bee87ea00b28d15
Toma el valor de la caja de texto y lo muestra letra a letra en la matriz de led
void send_image(uint8_t *text_data, int size) { static uint16_t first_idx = 0; static uint8_t row = 0; uint16_t i, j; ADC10CTL0 = REFON + MSC + SREF_1 + ADC10SHT_2 + ADC10ON + ADC10IE; ADC10CTL1 = INCH_0 + CONSEQ_2 + ADC10DIV_7 + ADC10SSEL_3; ADC10CTL0 |= ENC + ADC10SC; j = first_idx + row; for(i=0 ; i<...
1
dd3696f13cd585ddad894d919296e0dd
2263e3f8ed7339fee6f5746ef2dc6003
将当前选中的顶点作为顶点1
public class NetChoose : MonoBehaviour public void Btn1() { chosenID = 1; }
0
e86eb42d5dff9a4b9b11492b3eba7427
06841d5403a34d2677fb2d1b6554d141
Returns the OpenGL texture target needed to read from this surface texture. This will be `GL_TEXTURE_2D` or `GL_TEXTURE_RECTANGLE`, depending on platform.
namespace Veldrid public class BackendInfoOpenGL public uint GetTextureName(Texture texture) => Util.AssertSubtype<Texture, OpenGLTexture>(texture).Texture;
0
64ad385b5e01a2a1f9cf623e85aff10b
f6936c8e6ff7957dabd15ccdaabc820b
Computes amplitude for the 2D sine wave projection of the passed phasor
num_actuators_pupil = CONFIG_INI.getint(dm_config_id, 'dm_length_actuators') linear_ramp = np.linspace(-0.5, 0.5, num=num_actuators_pupil, endpoint=False) linear_ramp += 0.5/num_actuators_pupil phase_rad = np.deg2rad(phase) theta_rad = np.deg2rad(rotate_deg) x_mesh, y_mesh = np.meshgrid(linear_r...
1
b7dd3a7ce29df6f53ef541b63aaad6f8
74cc0ba65e1d2be2332e394afdc8c214
Verifica o compartilhamento dos relacionamentos.
public boolean equals(Object obj) { return ReflexaoUtils.equals(this, obj, "idPessoaCompartilhamento", "codigoNacionalidade"); }
0
dd5f6938cfa6a9016af7d6c997f41b32
447bc4b0a42d374f99ad134590e2453b
Finds the key (time) of the currently hovered entry, or -1 if none is hovered.
{ if (parentHandle->graphMode != 2 && parentHandle->graphMode != 3 && parentHandle->graphMode != 4) return; if (parentHandle->graphMode == 3 && clickedOnGraph) return; QPoint cursorPos = mapFromGlobal(QCursor::pos()); cursorPos.setY(cursorPos.y()-31); for (std::size_t i = 0; i < mainWindowHandle->ke...
1