query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
f7fb6716973b724a210d9ae0f38c3c47 | 8bc9e9c1af45789fae5399b8c8c2a0fd | Asyncronously inserts the scraped data of an inmate into the mongodb. | import mars_news_scraping as mns
scraped_data = mns.scrape()
mongo_col.insert_one(scraped_data)
return redirect(url_for('home')) | 0 |
4b861426fa81a21ee75a7c1f8f23247e | 09bbe3531664648a3819c25f05e87f28 | Initiates the asynchronous execution of the ListResourceSetResources operation. | namespace Amazon.FMS
ListResourceSetResourcesResponse EndListResourceSetResources(IAsyncResult asyncResult); | 0 |
671e32f5794a3f77a85846853a46d101 | f050aaddd77568cd0f52f4eb5f1f2995 | Adds and then Squares the numbers | new_numbers = []
numbers.each do |element|
new_number = element**2
new_numbers << new_number
end
return new_numbers
end | 0 |
fb85c2b5046eb9b5dd5fba441fbefd06 | 8ca87ab14a9c8b8b5fb505545f20f9d1 | Finds the longest sequence of zeroes in a
binary string derived from an integer | def find_trailing_zeroes(num): | 0 |
a2e2a8224b5e38fb38841ec95225ff9e | bcff1b76bac53845df7c3ba952e805c8 | Движение корабля вниз | namespace TanksClass
public abstract class Tanks : Figures
public void MoveDowbY()
{
this.y0 += speed;
this.point = new Point[] { new Point(x0, y0), new Point(x0 + WIDTH, y0 + HIGHT), new Point(x0, y0 + 2 * HIGHT), new Point(x0, y0) };
} | 1 |
e2b7b1d7ca27fde99c4c15fda393f824 | 65b7351535e0bb611978045f5f381947 | Determine the records that are in the cache but not in the data that needs to replace the cache content.
These records will need removing from the cache since they are not part of the data received, and do not need updating. | update_records = []
current_records_by_name = _build_dict(current_records, key='record')
old_records_by_name = _build_dict(old_records, key='record')
for old_rec in old_records_by_name:
rec = old_records_by_name[old_rec]
current_rec = current_records_by_name.pop(old_rec, None)
if... | 1 |
4e540538d12561b25a579f7ee5942a36 | b7e8d3a7bab2645ca776f8872ce569b1 | 随机产生父代基因 | copy_put = [[0 for i in range(WIDTH)] for j in range(HIGHT)]
copy2put = [[0 for i in range(WIDTH)] for j in range(HIGHT)]
genom_list = []
cross_one = (random.randint(0, GENOM_LENGTH/3)*3)
cross_second = random.randint(cross_one, GENOM_LENGTH)
endflag = False
while(not endflag):
if(cr... | 0 |
a5aa74b4ebfa837c2d4e2a189b1a3513 | 9edda2a7ab239a85fa39baaa5e8af3ae | 解析fmap文件,获取数据的schema | class DataLoader:
def _parse_schema(self):
if not os.path.exists(self.fmap_filename):
raise ValueError(common.colors.RED + self.fmap_filename + "doesn't exist!!" + common.colors.ENDC)
dtype_map = {
"int": np.int32,
"float": np.float64,
"str": np.object,
"strin... | 1 |
846067cc10104ebfaf875dbbff30e2d9 | ae5ae6533d3348ebb40c34a5910be232 | Function to calculate area proportion based on original area and cropped area | def calcArea(Gacc,polygons):
gaccArea = Gacc.area
output = []
for poly in polygons:
overlap = Gacc.intersection(poly[0])
overlapArea =overlap.area / gaccArea
output.append((poly[1]["NAT_CODE"],overlapArea))
return output | 1 |
aea71b55916e47638b16d38783340796 | 1dfa5e93d969a589f44161b854331f54 | Convenience method when framework name is seame as the realm ID | void setFrameworkID(Option<Protos.FrameworkID> frameworkID) throws Exception; | 0 |
02d6cdd1524ed48daa1e544ffc4df937 | 644351bbbbef8a047e9872ae425eb83e | We initialize all member variables. In general, this sets the values to 0,
<nl><md WiaEventNotifier::m_ulSig> is set to be WiaEventNotifier_UNINIT_SIG.
<nl><md WiaEventNotifier::m_cRef> is set to be 1. | namespace fawkes
BlackBoardNotifier::BlackBoardNotifier()
{
__bbil_writer_events = 0;
__bbil_writer_mutex = new Mutex();
__bbil_writer_waitcond = new WaitCondition(__bbil_writer_mutex);
__bbil_reader_events = 0;
__bbil_reader_mutex = new Mutex();
__bbil_reader_waitcond = new WaitCondit... | 0 |
b34553c2e267a0f78cc5ab3eabe135b4 | 6f69c32a725b14a12583cac7de5c054a | Supports dictionary-like retrieval, with square brackets []
key is course info, which is a (dept, id) tuple. | class Term(object):
def getCourses(self):
return self.__courses | 0 |
f573604b2b8cecaf78ebfbb5b84c5a6c | ac59c4d7f7e9534f78b3455e4ab08c3a | 分页获得设备权限记录列表 | PageInfo<DeviceDataPermission> findBySelective(Integer deviceDataPermissionId, String dataName, String fieldName,String deviceDataId, Integer pageNum, Integer pageSize); | 1 |
87d5a01496021b2b4f23cfe7aec6cd2d | 61fad9dafb50ca2b46b88d10db538448 | Gets the extra_tokens of this PassportPDFPassport. # noqa: E501 | try :
self._usetwotickets = usetwotickets
except Exception as e:
raise e | 0 |
73574ac36476b2acc91b22ba96049440 | e5a232213a22418d397eac8ceea7cf29 | 2-dim version of `range_1d_nb`. | if npoints == 1:
return (np.array([(range_1d[1]+range_1d[0])/2]),
np.array([float(range_1d[1]-range_1d[0])]))
xx = np.linspace(range_1d[0], range_1d[1], npoints)
ww = np.ones((npoints), dtype=float)/(npoints-1)*(range_1d[1]-range_1d[0])
ww[0] *= 0.5
ww[-1] *= 0.5
return x... | 0 |
9b3684e83ef141db367a01dadb952f04 | 43ff775575ac44b74e0e114b1ac7f143 | buscas las escuelas y las muestra en el combobox | public class CtrlRequisitos implements ActionListener{
public void llenadoCbxCursosEscuela(){
cursoDAO.listarCursoEscuela(this.frm.cbxEscuela,this.frm.cbxCurso);
} | 0 |
c8597f312aac847ff894d8e1de18feaa | 309a2f74efe6e91b64e68a3d84022cbd | Destructive multiply | Ostap::Math::Point3DWithError::__imul__ ( const double v )
{
point() *= v ;
m_cov2 *= (v*v) ;
return *this ;
} | 1 |
23e50f458a8e90cbdb3b0f7d254b7e1e | 2a98acc0ed931b4c67b130ea4fefd583 | @brief SFMTによる乱数系列を初期化します | {
enum {
LEN = 64,
};
uint32_t buf[LEN];
fs->get_random(buf, LEN * sizeof(uint32_t));
init_by_array(buf, LEN);
rand_initialized = TRUE;
} | 1 |
f8b34cfc4f9e0fff0769d8d75b02a8d0 | f03075259f0dced7f891472604550d01 | Get the maximum number of redirects to follow during HTTP operations | class Customweb_Http_Request
public function setRedirectionFollowLimit($limit) {
$this->redirectionFollowLimit = $limit;
return $this;
} | 0 |
45f152d2f963efb3c26e9193301356a6 | 1d9331fd3ed9857523547158693d162f | Adds a rotation schedule to the secret. | class SecretRotationRotationRulesArgs:
def duration(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "duration") | 0 |
e0ffbdcae9c1d40c4bda9420445ddeb6 | db3ee82ff490ea6482903c76a4462a79 | Hack to trigger automatic "reloading plugins".
This is needed to ensure TextCommand's and WindowCommand's are ready. | def admin_command_reloadscripts(player, playerCommand):
Plugin.load(); | 1 |
0a2266d8714bcb6f866106b6dfabf8a4 | 1d6534ce9b7d6739158fe1efc13164bd | Sends a logging message containing
location (channel), and ID of the message deleted | {
IMessageChannel logchannel = await Log.GetLogChannel(context);
if (logchannel != null) { await logchannel.SendMessageAsync(Log.LogMessageStringBuilder(context, logmessage)); }
} | 0 |
4cb468769ef493732ddb557b2305defc | 6311800ca02b24f29d23c0453001d09c | Performance characteristic: probability that query is lost because of buffer is full | namespace QueueServerLight.Servers
class QueueingNetworksCluster
public double _p()
{
return ((double)_servedQuery / _totalQueryCount) ;
} | 0 |
fe9d0b800a718c16260c8df458d5a3f3 | d0325dee7eecab8a213503fea2e95f19 | High Resolution TIMER1E
HRTIMER1E global initialization for high resolution time base usage | {
#if (USE_TIMEOUT == 1)
uint32_t Timeout = 0;
#endif
HRTIM1_FLT1_GPIO_CLK_ENABLE();
LL_GPIO_SetPinMode(HRTIM1_FLT1_GPIO_PORT, HRTIM1_FLT1_PIN, LL_GPIO_MODE_ALTERNATE);
LL_GPIO_SetPinPull(HRTIM1_FLT1_GPIO_PORT, HRTIM1_FLT1_PIN, LL_GPIO_PULL_DOWN);
LL_GPIO_SetAFPin_8_15(HRTIM1_FLT1_GPIO_PORT, HRTIM1_FLT1_PIN... | 0 |
c12549af503bbd372bf19b5bb070a39a | 8d64e06984f5bc3de0ec8730acc85285 | Create an entity for this test.
<p>
This is a static method, as tests for other entities might also need it,
if they test an entity which requires the current entity. | @RunWith(SpringRunner.class)
@SpringBootTest(classes = SkeletonApp.class)
public class CelebResourceIntTest
public static Celeb createEntity(EntityManager em) {
Celeb celeb = new Celeb()
.celebName(DEFAULT_CELEB_NAME);
return celeb;
} | 1 |
b00077b1d9ae3260456d63d85e824a04 | 1a4b49d91e7a1491451dc0f20de33694 | Adiciona uma nova linha na janela de conversa de saida de cliente | {
EventQueue.invokeLater(new Runnable()
{
public void run()
{
chatTextArea.append(s);
chatTextArea.append(System.getProperty("line.separator"));
}
});
} | 1 |
a596345413152bb156b72de4b97a22c8 | ebce3ca22237d2f74caac2103dcdd73f | Create new order delivery with all goods. | class DeliveryController extends SAdminController
public function actionCreate()
{
$this->actionUpdate(true);
} | 0 |
b97343152e0434606add6c77eeaf8c9d | d267ef8bfefaf00cd32eaf0c8b837f88 | last-applied-configuration should not be copied from the SecretDef to the Secret | secret := &corev1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: "mycluster",
Namespace: fakeNamespace,
},
Data: map[string][]byte{
"name": []byte("test"),
"server": []byte("http://mycluster"),
},
}
cluster, err := secretToCluster(secret)
assert.Nil(t, err)
assert.Equal(t, *cluster, argoap... | 0 |
5e86082e9f5967128f8937ceae6ff12d | ab51e975819bc2a9a99fc1590eca4ae0 | Provides the identities of all concept-level frames of which
the instance-level frame is a direct instance. | public class ProtegeSlotItem extends DMAPItem
public Collection<DMAPItem> allInstances() {
return dmapItems(allInstancesOfFrame());
} | 0 |
13d785afada466a57de05d5d0265d166 | 834ee269d475109fdbb2f5cd78e63bd4 | Computes the population covariance matrix.
Feature matrix should contain rows as samples and columns as features | rows, columns = X.shape
mu_vector = (np.sum(X, axis=0)) / rows
mu_matrix = mu_vector * np.ones([rows, 1])
x = X - mu_matrix
x_transposed = np.transpose(x)
covariance = np.dot(x_transposed, x) / (rows - 1)
x_squared = np.multiply(x, x)
variance = np.sum(x_squared, axis=0) / (rows - 1)
... | 0 |
0f282f3c48d548e0630898ad36bb5836 | 33a5f2f028d691d6a74daa5e1f4a6ea4 | Preloads the resources used by the Dialogue System to avoid delays caused by lazy loading. | void Preload(); | 1 |
8baa9e1ca426fa58238e066e6696b355 | b68e8794d9f3f60b240d6f9c6122c18a | set no limit for the number of entries (default behavior) | class ListParameters
public function setMaxLimit(): ListParameters
{
$this->setLimit(self::LIMIT_MAX);
return $this;
} | 0 |
e0a2d61b18152b457b9fa37990de4bed | fb9cdde9fafb820a257d86315d410be1 | Метод подсчета суммы всех элементов некоторого столбца | double result = 0;
for (int row = 0; row < m.length; row++){
result += m[row][columnIndex];
}
return result;
} | 1 |
2426dedebe3a507446ae52e35e831a98 | b5a836f563a85957e3eee5e73ab6170f | Atualiza a vaga no banco | class VacanteController extends Controller
public function update($VACA_ID)
{
parent::updateModel($VACA_ID);
} | 1 |
f440842d91f189f74b76677c96996bbe | a62f6cf402c2c4876ccd7f158f4b2bff | Advance linear scan iterator | {
if (count) {
kdtree_search ();
}
advance_linear (x, v, count);
} | 1 |
b623515d39a1a40df58cec60998da3e0 | b2b07eba5fe34c61b68051746220fb59 | Gets a list of starting points in a map. These are locations that a pathfinding algorithm should start from. | class Database:
def get_start_points(self):
connection = sqlite3.connect('database.db')
ans = []
cur = connection.cursor()
cur.execute("SELECT DISTINCT start_location FROM Trips order by start_location")
rows = cur.fetchall()
for row in rows:
ans.append(row[0]... | 1 |
35743922e21501458441116353f6b8fe | 094d8b791937da21281d5c2a23060d1a | Parses the INI file and generates the rule list, adding default=false
if no default is specified for that role (deny by default). | {
var files = System.IO.Directory.GetFiles(config.RulefilesPath, "*.rule");
if (files == null || files.Length == 0)
throw new Exception("rule文件不存在");
StringBuilder text = new StringBuilder();
files.ToList().ForEach(file =>
{
... | 0 |
803c23dbf5a059ec781c89ea944be451 | 68fe39880cf6a3f8072464b347a13420 | Changes colors of the blocks that indicate progress through the form | function colorInputs() {
let thisHour = moment().get('hour');
$('.time-block').each(function () {
let timeDiv = $(this);
let divHour = timeDiv[0].dataset.columns;
let blockHouse = parseInt(divHour);
if (blockHouse < thisHour) {
$(this).addClass("past");
$(... | 1 |
1e05858ef781587d732ee81ddd33f35f | b668dbabb755f519bf8ece6fcfd4e0d3 | Funkcja obsługująca naciśnięcie przycisku Graj od początku. | {
PlayerButton.IsChecked = false;
EasyButton.IsChecked = true;
HardButton.IsChecked = false;
ImpossibleButton.IsChecked = false;
jakgramy = 1;
resetuj();
if (AI)
{
LosowyRuchKomputera();
... | 1 |
177f91f522960ec4dce22f32f55c06cb | d3dd68bfe89d25acc6fd271c766a094f | Whether the parameters of the functional code may be analysed. | namespace VTSWebService.AnalysisCore.Statistics
bool Fits(PsaParametersSet set); | 1 |
6d18c0dad8572c27f389adbb916046a5 | 1015110dfc2e4c099757b0724cdb18fe | Get the to date summary. | $open = $this->getSetting('open');
$summary[] = $this->t('Default state: @state', [
'@state' => $open ? $this->t('Open') : $this->t('Closed'),
]);
return $summary;
} | 0 |
186d9ae5cc41e07d884f55482903261c | b071e35285e73651d2a68c149765ba61 | 체크된/안된 항목 객체 하나를 한 줄로 보여주기 위한 컴포넌트 | function TodoItem({ item, onItemClick }) {
const classNameAdded = item.done ? "panel-block has-text-grey-light" : "panel-block"
return (
<label className={classNameAdded}>
<input
type="checkbox"
onClick={() => onItemClick(item)}
defaultChecked={item.done ? true : false}
/>
... | 1 |
00c8fa9bdad95383c3937638eacf2a1f | 7cd41d570110ed087ce2e4bf9ad31c4f | A simple forever loop over a queue, executing the actions in it | {
while (true)
{
if (CancelToken.IsCancellationRequested)
CancelToken.ThrowIfCancellationRequested();
var tasks = CollectActions();
if (tasks.Count > 0)
{
ProcessAction?.Invoke(new Que... | 1 |
ca7c7e75bb56c96580bc04f26d394d9d | fe91b54a976f067b85afed96ad0ebe1a | 给账本创建默认分类 | namespace mbill_service.Controllers.Bill
[Route("api/category")]
public class CategoryController : ApiControllerBase
[Logger("用户新建了一个账单分类")]
[HttpPost]
[Authorize]
[LocalAuthorize("新增", "账单分类")]
[ApiExplorerSettings(GroupName = SystemConst.Grouping.GroupName_v2)]
public a... | 0 |
4d96232cf09b702dc886b7079810526f | e20f2b7bbea6ffa19bb1805a8f1a1073 | Gets the clip inspector with access to the specified ClipControl. | InternalUnsafeMethods.GetControlObject__Args _args = new InternalUnsafeMethods.GetControlObject__Args() {
};
int _engineResult = InternalUnsafeMethods.GetControlObject()(ObjectPtr, _args);
return _engineResult;
} | 0 |
5abd7211b32dec8ea55c4db11152157d | a681e48a83b9db26dea4159e659f4ddf | 返回数组中最大值的指针 | int *find_max(int *array, size_t size)
{
int *max = array;
int rep;
for(rep = 0; rep < size; rep++){
if (*(array + rep) > *max){
max = array + rep;
}
}
return max;
} | 1 |
09936e002c7e604fb6081c4d85ffe5bf | b01242fd7dcbfe2c9505c1a42951276d | Adds a new company. Returns id of the added company. | namespace DAL.Repositories
public class CompanyRepository : BaseRepository<Company>, ICompanyRepository
public int InsertWithId(Company item)
{
context.Companies.Add(item);
context.SaveChanges();
return item.Id;
} | 1 |
a80cf65373ddd332c7b93879ef126f62 | 47e4010aa993bd874c48c7bfea68243c | Transform indoor eCO2 values to IAQ points. | for iz in range(90, alt):
self.CO2[iz] = self.CO2[iz] * (
10.0 ** (-0.07 * (1.0 + np.tanh(0.18 * (self.Z[iz] - 111.0))))
)
self.CO[iz] = self.CO[iz] * (
10.0 ** (-0.24 * np.exp(-0.009 * (self.Z[iz] - 97.7) ** 2))
)
self.... | 0 |
19bb01a99b3286e494ab00065189423b | d873e5e16744e93783dd6c0a08a56987 | 找到链表倒数第k个结点的位置 双指针 | class List{
public ListNode findKthToTail(int k){
ListNode fast = this.head;
ListNode slow = this.head;
while (k<0){
fast = fast.next;
k--;
}
while (fast.next!=null){
fast = fast.next;
slow = slow.next;
}
return slow... | 1 |
ad2adea6b3ccc3871d2c71837893a74e | 6cbb746c24c1fbb98ea72e7cc25ad237 | Return a random RGB color using datatype specified. | class RGBUniform:
def sample(self): | 0 |
ee391766a242aa97c59ceb1516d4e602 | d8083d75dade191bc5f1f2995ec16a86 | Sets the value of the clipXPosition property.
allowed object is
{@link java.math.BigInteger } | public void setBIG_INTEGER(java.math.BigInteger value); | 1 |
0eca7d9d4bd8005de0ba69ccf2c005b8 | 2fd4be2f1ec0e5ca9c302522c50cde37 | Sort each individual bucket | class BucketSort:
def sort_single_bucket(bucket):
InsertionSort.insertion_sort(bucket) | 1 |
aea9b83ac6b687e6fa19c4ea14c76399 | fabd30ead85df90eee9e5c1008839009 | 外部リンク契約フラグを設定します。 | public class ShopListingInfoView implements ViewHelper public class ShopListingInfoDetailView
public void setLinkFlg(String linkFlg) {
this.linkFlg = linkFlg;
} | 1 |
cb38a4023293b57c6fb85e8e30f26e05 | ea90a81ecdbc0ead3a97904eb2bc05ad | Función para llenar la table de patrocinadores | namespace straviaBackend.AccessImpl
public class PatrocinadoresporCarreraAccess : IPatrociandorporCarreraAccessInterface
public List<Modelpatrocinadoresporcarrera> GetPats()
{
return _context.patrocinadoresporcarrera.ToList();
} | 1 |
917aef362b421f2284063281cbd9f945 | 456d0d70633174d3ddb3accffdecdc1f | Get the list of users attending a talk | self::$logger->debug ( __CLASS__ . '-' . __METHOD__ . ' begin' );
if (! isset ( $expositionId ) || $expositionId == null) {
self::$logger->error ( 'expositionId parameter expected' );
throw new InvalidArgumentException ( 'expositionId parameter expected' );
}
$list = array ();
$expositionFilter = new Nu... | 1 |
8d8d3c9959dedb77391abbd23f4260f5 | 124be0f2fdac8787291231bf29bcf448 | # Ref: http://en.wikipedia.org/wiki/Rosenbrock_function, http://www.it.lut.fi/ip/evo/functions/node5.html | def rosenbrock(x):
return sum(100.0*(x[1:]-x[:-1]**2.0)**2.0 + (1-x[:-1])**2.0) | 1 |
aec62fca53291d8a75d330edc1e4a79e | 5fcf0938fa1aac4f8e2a3167abb49f6c | Metodo que analiza recursivamente si una secuencia pertenece a un AFD
partiendo desde un nodo dado | if len(mainChar) > 0:
eocs = SubToken(EOC, EOC, (mainChar[-1].getPosition()[0], mainChar[-1].getPosition()[1]+1))
else:
eocs = SubToken(EOC, EOC, (0,0))
mainChar.append(eocs)
stack = []
stack.append(self.getInitialNt())
head = 0
while(len(s... | 0 |
7669dab2eefefcec3938c42365f00e9a | 0d150a7bebc277781a7904de1cedcad4 | -------------------------------------------------------------------------
키入力から기능を得る
同一の키が할당られている場合전부の목록が返る
KeyDownイベントから呼ばれることを期待している
할당られた기능がない場合nullを返す
--------------------------------------------------------------------------- | namespace Utility.KeyAssign
public sealed class KeyAssignList : IEnumerable<KeyAssignList.Assign>
public List<Assign> GetAssignedList(KeyEventArgs e)
{
return GetAssignedList(e.KeyData);
} | 1 |
d83e360ee05eb67c3fb77bf8ac6f4ac7 | f64a21c81e7dd4d610c6dd719a1ff098 | Grab a statistics snapshot from multiple test servers. | count = 0
rpc_stats = {}
with self.__stats_lock:
count = self.__sock_count
for key, stats in list(self.__times.items()):
snap = stats.snapshot()
if snap is not None:
rpc_stats[key] = snap
return {
"so... | 0 |
70608bfc260b0b70778062fb09718528 | c3d3ee3d01d0cb6588523f0450716433 | Check whether this object can handle the given telegram.
This method uses the header given in the constructor to
check the first bytes of the telegram. | boolean canHandle(Message message); | 1 |
46ea354dd0c920bcd04f3ff71819fa0e | 246839fdddf8e41f87385618a81e0dea | Add number of seconds second to the time represenetation | {
if (Seconds + countOfSeconds < 60 && Seconds + countOfSeconds > -1)
Seconds += countOfSeconds;
else
{
int countOfMinutes = countOfSeconds / 60;
if (countOfMinutes > 0)
AddMinutes(countOfMinutes);
... | 1 |
d7a0ea66b91382f2ae416696c267015a | 631675c727983c10dc2a52b99bdf59ed | Imprime el árbol en posorden, primero el subárbol izquierdo, luego el
subárbol derecho, y por últio la raiz | class ArbolBST:
def _imprimir(self, p, root, es_izq):
if root:
print(p, end='')
if es_izq:
print("|--", end='')
cad = "| "
else:
print("'--", end='')
cad = " "
print(root.valor)
self... | 0 |
7f65a45bf1df0ea1d3439c0f6f4ad933 | b1646e1a1122875e027a64dbc94a2653 | Проверяем доступность страниц для незарегистрированных пользователей | class PostsURLTests(TestCase):
def test_url_allowed_to_anonymous(self):
url_names = (
reverse("index"),
reverse("group", kwargs={"slug": self.group.slug}),
reverse("profile", args=[PostsURLTests.post.author.username]),
reverse("post", args=[
PostsU... | 1 |
3a18bf59ccea2efcc1e8b9e75d3e2759 | 1af90b7aae751c8472003a119035fbc4 | 根据条件查询满足条件的(订单商品关系附件参数信息)记录数 | @SelectProvider(type = ChProductItemProvider.class, method = "selectChProductItemByCount")
public int selectChProductItemByCount(ChProductItem entity); | 1 |
ca86fb04f9363ca29937f5da45ba5289 | ab347fbd78054d0f72da310fa4b619ab | 根据传入的字段与值的字典信息,返回sql查询语句 | sql = f'insert into {db_name}.{table_name} ('
before_values_sql = ""
after_values_sql = ""
for key, value in insert_dict.items():
before_values_sql += str(key) + ', '
if value in ["null", None]:
after_values_sql += 'null, '
else:
... | 1 |
075a58e5b0eaae7e508d515b47247aa2 | 2789efbbdb430df59104e80bada2d618 | Removes the software from black list. | string AppName = environment.AppFriendlyName;
string SettingFile = fileSystem.Path.Combine(environment.CommonApplicationDataPath, @"\SVP 3.1\Settings\SVPMgr.ini");
if (fileSystem.File.Exists(SettingFile)) {
bool HasChanges = false;
String[] EditFile = ... | 0 |
702abbc7fc739e31525d1d6683d673f7 | ed4ac3f176c0d4f9faf990fd6a60bdcc | Interpolate 3 Vectors using Barycentric coordinates | Vector Vec4Barycentric(const Vector v1, const Vector v2, const Vector v3, const Vector& f, const Vector& g)
{
Vector vTemp1 = _mm_sub_ps(v2, v1);
vTemp1 = _mm_mul_ps(vTemp1, f);
Vector vResult = _mm_add_ps(v1, vTemp1);
vTemp1 = _mm_sub_ps(v3, v1);
vTemp1 = _mm_mul_ps(vTemp1, g);
return _mm_add_ps(vResult, vTemp1)... | 1 |
d23419b676115bc649f9f904ad11bcc7 | 8296ddcfb622ad45ba15f340649bdc1d | 查询基本信息根据订单编号查询 | @GetMapping("/orderGoodsBase/queryByOrderNo/{orderNo}")
ResponseMessage<OrderGoodsBase> queryByOrderNo(@PathVariable(value = "orderNo") String orderNo); | 1 |
e07f773f20029c93697dd5af9b8f7578 | a05b24a84a38367a4adb126f1e00c3a3 | Destroys all sub modules. | export class Module
public destroy() {
if (Util.isArray(this.children)) {
this.children.forEach((item) => {
let m: Module = ModuleFactory.get(item);
if (m) {
m.destroy();
}
});
}
this.clearCache(true);
... | 1 |
943f7bb4018e962cef1ed491fd33cc38 | 6876fafc263e4d60f0c9e0c8f66fb803 | 获取所有的日期格式化 | {
List<string> stringList = new List<string>(132);
for (int index = 0; index < DateTimeFormat.allStandardFormats.Length; ++index)
{
foreach (string allDateTimePattern in this.GetAllDateTimePatterns(DateTimeFormat.allStandardFormats[index]))
stringList.Add(allDateTimePattern);
... | 1 |
987047a91cf58cb9feb88f7edf48d84f | 1a52c2e3c4bb1a080850febe9b39dff5 | It can be unwrapped. | class Environment(object):
def unwrapped(self):
return self | 1 |
a05cef1c9c34e8903569a5691e622829 | 8af4f57f92b1d91ffcffc04a7ba0986a | Gets the "gsModel" attribute | String getModelA(); | 0 |
ae4d44b5ab58d0ddc8d03adaa5fdcd53 | a77c93e0d42d37c61fa0b2e6645cd3fd | check if there is an error message when password is empty | def test_empty_psw():
assert register("Bob", "", db) == (-1, PSW_EMPTY) | 1 |
e27fc23512b2ad591aab7fb277f2d40c | f0423e7e5b9deb0bb0df97b572c7bd6e | ustawienie odpowiednich skladowych wektora elementami tablicy | void Kepler::SetElements(const double elem[6])
{
a = elem[0]; e = elem[1]; i = elem[2];
o = elem[3]; w = elem[4]; M = elem[5];
} | 1 |
59ff74bab005c8e586a451a0d377bf25 | 0702eecbf834434094d214aa9d436a19 | 苹果支付查询 | class PurchasediOS extends Command{
function validate_apple_pay($receipt_data, $sendbox) {
if (strlen($receipt_data) < 20) {
$result = array( 'status' => false, 'message' => '非法参数' );
return $result;
}
$html = $this->acurl($receipt_data, $sendbox);
$data = j... | 1 |
f98b1147e3b55b6650ab0b6d6d2c8a74 | 02cd87cc06dd737a52251e33c7c040b7 | Set the lookup url according to a given Fogbugz case_id. | case_number = request.GET.get('case', None)
try:
case_number = long(case_number)
except ValueError:
case_number = 0
if case_number <= 0:
return HttpResponseServerError('Error: please specify a valid case number.')
issue_desc_id = '(Case ' + str(case_number) + ') Review: '
... | 1 |
b2402df83f3841c1c2ab1a129916359b | 300cd12d8dedf4ddd515e77280efe23a | Convert Object to UnionType <br />
将对象转换为联合类型 | @types = types.flat_map do |type|
if type.is_a?(Union)
type.types
else
T::Utils.coerce(type)
end
end.uniq
end | 0 |
7979dc13f8f29ec9b6fd53a59264651c | 610cde04a2f89bf2345296b53aa1da28 | Отклонить вариант перевода (убрать галочку) | function clearTargetLang(form) {
var count = document[form]['target_lang[]'].length;
for (i = 0; i < count; i++) {
document[form]['target_lang[]'][i].checked=false;
}
$('.translator.td').addClass('hidden');
} | 1 |
765bc79bc367274a3cffc592dfa70787 | 216636532e13d4c628ae4ff14db01f01 | Evicts all members of the "countrys" cache. | interface UserCache
fun evictAll() | 0 |
b48c55b34bd99d03aad529927d48410d | 8968df60b12df536cdbf26d1370d9216 | Very basic initializations | function basicmodInit()
end | 1 |
3d9c1821b0b5c8303ed19bcbf7a3d3eb | 4bdc3f370cc2983318fb6fdee92e9663 | !
Get the dimensions of the final FBO. Regular viewport rendering renders directly to this FBO but a fisheye renders first a cubemap and then to the final FBO.
Post effects are rendered using these dimensions. | namespace vee
int RenderPass::getFBOHeight() {
return mFBOHeight;
} | 1 |
329e5db17ba426085bece1673cc26471 | 8fe1862fd4d8d19a0c83724b6b885199 | matches all goodie types that should be picked up along the way | function ITEM:CanPickup(player, quickUse, itemEntity)
return "boxed_backpack";
end | 0 |
b6cd8b154a0b37b2d96b1b5154e6e227 | 1bbe92f9b48f8054c99b2a9d40dae1cf | 重新报备 | @Controller
@RequestMapping("/oefullinfo")
public class OefullinfoController extends BaseController
@RequestMapping(value = "/reFiling")
public @ResponseBody Object reFiling(Oefullinfo oefullinfo) throws BusinessException {
oefullinfoService.updateOefullinfoAndprostatus(oefullinfo);
return SUCCESS_T... | 1 |
726bca491b8a111a1b44c7064ab8ac6f | 1a7afc21d13cb30e1ddac08ad505628b | Make a hitbox for some object. | const area = new Shape();
area.graphics
.beginFill("#000")
.drawRect(x, y, w, h)
.endFill();
this.hitArea = area;
} | 1 |
83d8d9fcce569440868ade9edc96d4b4 | 51e0b04fc183caf3196de6aacbc48ed6 | Notifies the mode that it is now the topmost mode on the mode queue <para/>
This method should not be invoked directly, it is called by the GameController run loop | namespace NetProc.Domain
void ModeTopMost(); | 1 |
1ed95ec0561c27bc272d9b30c79089c0 | cb470b20839e7f93ca45da3bb15630f7 | Sets the playback rate for the current media session. | class Player:
def set_rate(self, rate):
return self.media.set_rate(rate) | 1 |
3a75744f6c9fd196ca253367b0674467 | 2550d6e28f1d28c1bea6919166e31b99 | Same but for the case of both bounds being AD variables | {
float result;
float high;
numeric_limits<float> mathInfo;
float epsilon = mathInfo.epsilon();
if ((lower - epsilon) > (upper + epsilon))
{
char msg[80];
sprintf(msg,
"Lower bound %f is > upper bound %f\n",
lower, upper);
throw ... | 0 |
e0e40909fdb65b011a35a75e157ca9fc | bd70394a1a2ebee4223732644cd747c9 | 在就绪队列中寻找下一个要运行的进程并返回 | nproc--;
assert(ready_procs[head]);
pid_t ret = ready_procs[head];
ready_procs[head] = 0;
head = (head+1)%MAX_PROCESS_NUM;
return ret;
} | 1 |
6fbea76a107452f43eb1c93ad648e19c | 692055181fdd9634551992981165cc74 | Funcion para almacenar en tabla muchos-a-muchos en la base de datos | class Api_model extends CI_Model
public function guardar_varios($tabla, $datos)
{
$this->db->trans_start();
$this->db->insert($tabla, $datos);
$this->db->trans_complete();
if ($this->db->trans_status() === FALSE) {
return false;
}
return true;
} | 0 |
6f2293142b0eda6d264f3e56f49d38cb | d7bb907e935c340057be4e35c0c82501 | Открываем фрагмент с историей бронирования | public void run() {
OrderCreationFragment fragment = new OrderCreationFragment();
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.setCustomAnimations(android.R.anim.fade_in,... | 0 |
83eaee8c52ba220a47c88500078f1ad5 | af0d93b9d698eae87c66f2214218cecf | \brief Get number of value entries from a CTL element id/info | u16 tot_len;
tot_len = (u16)(*(config + 2));
tot_len += (u16)(*(config + 3) << 8);
u8 *ptr = config;
while (ptr < (u8*)(config + tot_len)) {
u8 len = ( u8)(*ptr);
u8 type = ( u8)(*(ptr + 1));
u8 subtype = ( u8)(*(ptr + 2));
u8 term_id = ( u8)(*(ptr + 3));
*term_type = (u16)(*(ptr + 4... | 0 |
7cfce705b081df0483e5184408a21f24 | 792a3469f1c74fdbffe1cccb404b8e42 | génère une chaine de caractère décrivant l'objet BusinessUnit
sous la forme "Client: NOM_CLIENT - PHONE_CLIENT Situé à: NOM_LOCALITE CODEPOSTAL_LOCALITE NUMERO_RUE NOM RUE | StringBuilder data = new StringBuilder();
data.Append($"{this.ID} {this.Name} {this.BussinessName}.");
return data.ToString();
} | 0 |
f0340c02db9b5d58ac2ebb08d97775e6 | 98c1853ada0ea6dbdc15a6ad7b2b56d0 | True if the given objects have the same parameter values; false otherwise. | {
return (this.ParameterName == other.ParameterName) && (this.Value == other.Value);
} | 1 |
53c41bf5f7ed4339e245ce1fd6d3998d | 9130ce2b892b0439642ee656c0b8b7b4 | *********************************************分页加载商品数据,并动态创建分页条 | function pPager(data, nowPage) {
for (var i = nowPage * 20; i < data.length && i < (nowPage * 20 + 20); i++) {
var item = $('<a id="'+ i +'" href="'+ i +'" class="list-group-item pro-item">'+
'<div class="row">'+
'<div class="col-xs-4 col-sm-4">'+
'<img src="' + data[i].img + '" class="img-rounded img... | 0 |
d6eba29b4ff9f1035a39bfec90eadfa2 | b87e13dc7e5b9cd4ebf095e94ac58bda | This is an address family-agnostic version of inet_ntop. | const char * Inet_ntop(int family, const void *addrptr, char *strptr, size_t len)
{
const char *ptr;
if (strptr == NULL)
err_quit("NULL 3rd argument to inet_ntop");
if ((ptr = inet_ntop(family, addrptr, strptr, len)) == NULL)
err_sys("inet_ntop error");
return(ptr);
} | 0 |
209664d0089685643a280dd1ed35a94d | efd893e2421135ae8da254d2a4951566 | returns index of empty block based on file allocation table data | int i;
for (i = 0; i < BLOCK_SIZE; i++) {
if (blocks[i] == 0) {
return i;
}
}
return -1;
} | 1 |
d2cc6a7d19f823978c81a582160c2f57 | 02ec66ecba0f9a4d6c74bc5956849034 | Gets mass of all actors in the trigger volume | {
float TotalOverlappingMass = 0.f;
if (PressurePlate)
{
TSet<AActor*> OverlappingActors;
PressurePlate->GetOverlappingActors(OUT OverlappingActors);
for (AActor* OverlappingActor : OverlappingActors)
{
TotalOverlappingMass += OverlappingActor->FindComponentByClass<UPrimitiveComponent>()->GetMass();
}
... | 1 |
31bcbb626fab0ae0552e4ffb2b48a98e | 9849eb17da137f830c1f2c3ad30992cd | Returns the path to the cache file including the folder and file name | class CFileCache
public function getPath()
{
return $this->filePath;
} | 1 |
495e2456fe88369fdbb2cd238c37e369 | 2ce31546f945389ed0b012a6f7b4b28c | 增加车辆违章历史选择岗位 | function cheLiangTouBaoLiShiRolesAdmin(){
$.post(
Ext.basePath+"tjsinfo/lhcrms/system/rolesAdminManage.action",
{taskName:'查询车辆投保历史',architectureTaskdepartmentId:$('input[name=chaxuncheliangtoubaolishi.architectureTaskdepartmentId]').val(),
architectureTaskgroupId:$('input[name=chaxuncheliangtoubaolishi.archi... | 0 |
28abcbe04fa04ace62db058dbe15638d | d947d991d92153d4d84975d78394f954 | Gets the find reward account by user account id command. | IncorrectResultSizeDataAccessException {
SqlCondition condition = new SqlCondition(COLUMNS.get(0).getColumnName(), SqlCondition.EQ, accountId);
try {
return jdbcTemplate
.queryForObject(super.getSelectQueryByCondition(TABLE_NAME, condition), new MAccountMapper... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.