query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
d7effb69ab207850be1df23368858cb5 | 7b35e2a9b18af89bd0175623f110dd1f | Quoting is done when rendering the error in the template. | class ReportingAdapter
def quote_string(s)
s.gsub(/\\/, '\&\&').gsub(/'/, "\\\\'")
end | 1 |
abf2d684b0b404b497a90a02c009c96b | cf8d3c4cb721dfc6feb1898e8664b3ac | This walks you through the basics of objects,
and demonstrates that
each object has its own distinct storage space. | int main() {
std::cout << "========================" << std::endl;
Test t0 {"0", 10};
t0.get_info();
std::cout << "========================" << std::endl;
Test *t1 = new Test {"1", 20};
t1->get_info();
delete t1;
std::cout << "========================" << std::endl;
std::unique_ptr<Test> t2 =... | 1 |
6ca4156c882a03f34bad049caedc61a7 | a1409c5d277ce9e3f156a7481c97f901 | Вызывается когда процесс, открывший файл устройства
пытается считать из него данные. | int my_proc_read(char *page, char **start, off_t off, int count, int *eof,
void *data)
{
return -EINVAL;
} | 1 |
f52f57883708bd6999edecbd28afb2e7 | b0381aea341776fb66b084129ba0ab86 | 计算年龄, 以365天为一年 | const someDayTimestamp = new Date("1998/7/26").getTime();
const currentTimestamp = Date.now();
return Math.floor(
(currentTimestamp - someDayTimestamp) / 1000 / 3600 / 24 / 365,
);
} | 1 |
7a11e59444ed61b8166881da90985a91 | d4a3212af85c102a807d16cf4cb1d483 | # Email Alert to distributor for Payment Receipt | function edd_ppe_trigger_purchase_receipt( $payment_id ) {
if ( isset( $_POST['edd-action'] ) && 'edit_payment' == $_POST['edd-action'] )
return;
edd_ppe_email_custom_purchase_receipts( $payment_id );
} | 1 |
a3c6b79698eea884f227839d91aa7c5c | 9f8a044422325344c3d49df9e333b952 | VERIFICA SE A SALA ESTÁ CHEIA | @Service
public class CartModeStub implements CartModeServices
@Override
public Boolean getListoSala(Integer idSala) throws CartModeException {
return salas.get(idSala).getListo();
} | 1 |
94522c332389ba89a5c6ade232b7f858 | 12921cf1dfa966efac285c8cf1199b3d | 获取单号1输入框 | class Order_list():
def get_order_no_element(self):
return self.fd.get_element("order_no") | 1 |
d779fc0e86d360a71191c481f1d8f5b0 | c941867b3f022467348e175462565ab9 | gets the list of moves, as an array | $validMoves = $this->_get('valid_moves');
return !is_array($validMoves) ? [] : $validMoves;
} | 1 |
57ce01dafc3271589dee53a47e5ab7c6 | e00fbdd677b0b790b48c0e6da72ab532 | 移除所有键盘 | namespace CRC.Util
public class HotKeyUtil : System.Windows.Forms.IMessageFilter
public bool RemoveAll()
{
bool result = true;
foreach (var item in _HotMap.Values)
{
result &=HotKeyUtil.UnregisterHotKey(item.Hand, item.ID);
}
return... | 1 |
a37f6c16840d3ecfa408bb679aad208e | b01f63fea1591c44350bee816167f161 | Common initialization for post operations | class PdfBaseRenderer(object):
def _postop(self, op):
pass | 0 |
a1115f1884eac7e2697f77fe1b48df40 | 7a02740f0fa30e2d2411b2121cb16336 | Lister les fichiers physiques présents dans IMG/ mais qui ne sont plus dans la BDD. | return db.query(dbo, "SELECT Name, Path FROM dbfs WHERE " \
"(LOWER(Name) Like '%.jpg' OR LOWER(Name) Like '%.png' OR LOWER(Name) Like '%.gif') " \
"AND Path Like '/report%' ORDER BY Path, Name") | 0 |
d07174654992f6648b086c6f0567eb76 | 995832607de2ce3241c9f5bce85c99be | TMPricesCommand constructor. | class UpdateOrderproductsTmpPriceCommand extends Command
public function __construct()
{
parent::__construct();
} | 0 |
2d48ed85cce8dd7bd70a77cc792a8edb | de0caffba8ea873d478878456c7d21b8 | 只复制.meta文件 | {
FileUtility::renameFile(fullFileName, destFullFileName);
string metaFile = fullFileName + ".meta";
if (FileUtility::isFileExist(metaFile))
{
FileUtility::renameFile(metaFile, destFullFileName + ".meta");
}
} | 0 |
7bb9198a672539b0edce2975768e648b | 67e24b80ca19e3e63f93d8fda21bae96 | Frame time must be positive. | {
if (value < TimeSpan.Zero) {
throw new ArgumentOutOfRangeException(argumentName);
}
} | 1 |
edba665e661e8daa132907054fb4ccaf | 914d3049221d44ff7606eb50a78c8814 | Draw node group.
The node group is drawn when layout debugging is enabled only. | public void mapGroup(final GroupRepresentation group, final NodeDescription groupNode)
{
if (this.enabled)
{
this.map(group.getAttributes(), groupNode);
}
} | 1 |
c0d83ed98df13d520efcf222a065c0b1 | e85397cfa55309f223da984c020b2772 | Test ham tim kiem user trong csdl: | s = raw_input('Ho ten hoc sinh can tim: ')
c=0
for i in range(len(l)):
if l[i]['hoten']==s:
print str(l[i]['id'])+' '+l[i]['hoten']+' '+l[i]['bod']+' '+l[i]['qq']
c=c+1
if c==0:
print 'Khong tim thay, hay thu lai.' | 1 |
b828df7cf508140c8c89af1182672e1e | f746c3864fc0e204ba1fe87ae8ea0177 | 软删除权限 | @Service
public class RoleService
public void softDeleteRole(Integer id){
roleMapper.softDeleteRole(id);
} | 1 |
7ef33942db08a776af9a65fc1141da85 | 9c9cc363ef1d40affa81f2da8e075150 | solo mostrar los objetos del usuario, o todo si es superuser | class UserController extends Controller
public function index()
{
$userRole = Auth()->user()->getRoleNames();
if($userRole[0] == 'SuperUser'){
$users = User::all();
}elseif($userRole[0] == 'Prestamista'){
$users = User::role('Administrador')->get();
$users... | 1 |
3bbca43321e8b25c3b1ca9566a3f83f2 | 985e772b164511ea46dd3d1117c7bc26 | Only add student names if they're not currently on roster | public class Course
public void printRoster(){
for (int i=0; i<(seats-remainingSeats);i++){
System.out.println(this.studentRoster[i].getName()+this.studentRoster[i].studentID);
}
} | 0 |
d1c1128ab5451b5798a339d7e683bdfa | 75e24550ac40aaee6d5806f6629d2d99 | Called when a capture object has been created, it configures the camera for the capture process | void CameraThread::setup() {
image.allocate(1024,768,OF_IMAGE_COLOR);
image.setUseTexture(false);
cam.setDesiredFrameRate(60);
cam.initGrabber(1024, 768);
cam.setUseTexture(false);
} | 1 |
043ad9ee1277a3a98b132057faf73d38 | 632b9a02a823ca70a2aafbf3ff1f0b3e | 初始化病人缓存 | public class PatientQuery
public void setup() {
cacheDB = new HashMap<Integer, Patient>();
loadPatientData(1);
} | 1 |
1e8cd895d057608aa95cc839be1615ae | 33780d95f3b9349b96fc62377c7fc14b | Used to redirect a logged in user to the user path with their id | class ApplicationController
def after_sign_in_path_for(resource)
user_path(current_user.id)
end | 1 |
ee4e1352ef98806e54949104cb34f9ab | a0472f522c9108bc946ec32bbe5465b4 | Iterate over all the actions and compute their q-values. Then return the action with the highest q-value. | states = self.mdp.getStates()
numStates = len(states)
for i in range(self.iterations):
j = i % numStates
s = states[j]
if self.mdp.isTerminal(s):
continue
actions = self.mdp.getPossibleActions(s)
qvalues = [sel... | 0 |
7a4c9e138817019688ad1054fd4edd15 | cca5917b18465a8c23f1afe53f53931a | 解决SwipeRefreshLayout包含ViewPager时的滑动冲突 | public class TopNewsViewPager extends ViewPager
@Override
public boolean dispatchTouchEvent(MotionEvent ev) {
getParent().requestDisallowInterceptTouchEvent(true);
switch (ev.getAction()) {
case MotionEvent.ACTION_DOWN:
downX = (int) ev.getX();
downY = (int) ev.getY();
break;
case MotionEvent.ACTION_M... | 1 |
969c6eabf383ffd689ca08302824cd30 | 1ce0f87862b04ec7ccb37a86e780bd7b | Compute the current limit magnitude by dichotomy | dE = np.ediff1d(Val)
L_max = -1.0
L_min = 1.0
for i in range(len(dE) - 1):
e = dE[i + 1]
if (abs(e / Val[i]) < 1e-6): break
L = e / dE[i]
L_max = max(L_max, L)
L_min = min(L_min, L)
return L_min, L_max | 0 |
b5675f531379113c2dbff48f664cabcd | 7ed66f438970486ef242bec64c70f055 | Método que obtiene todos los Servidores de Archivos. | {
Dictionary<object, object> param = new Dictionary<object, object>(1);
param.Add("ACCION", "OBTENER_FILESERVER-LISTA_COMPLETA");
return this.propertyServidorArchivoParam.ObtenerDatos(param);
} | 1 |
4e120cd0022a5dc5e326a4e790afc9e5 | 5826844aa29fbb45b3494df3a148838b | Lists all employees in records in order of hire date | {
List<EmployeeDetail> employees = EmployeeDetailContext.Collection().OrderBy(e => e.FirstName).ToList();
ViewBag.Employees = employees;
return View();
} | 0 |
94029e2c826ecdc62a31d6fd6aae76d4 | ff78eb97c6f581fa9a722a38bf2f87bc | Sets the fecha nacimiento. | public class ConsultaSISEFINVO
extends ObjetoValor
public void setFechaNacimiento(java.util.Date fechaNacimiento) {
this.fechaNacimiento = fechaNacimiento;
} | 1 |
ad7c52621561a456ba153da8d7a85503 | 3bb411592bc4aadd1e681d272ffa7ba5 | Returns the Amount in Cents | public final class Money implements Serializable
public String getAmountInCent() {
return String.valueOf(this.amount.setScale(0, BigDecimal.ROUND_HALF_UP));
} | 1 |
e55595145b53cfaeb62df34d41cf387f | f93025e29fa776aa96e7543c4400c312 | Loads the prices from the database. | public partial class TitleGM : MonoBehaviour
void LoadPriceData()
{
StartCoroutine(
RequestDataToServer<PriceData>(
"getPrices", 0.2f, "price", "PriceData", "codeNo",
GameData.Instance.priceDic,
LoadItemData)
);
} | 1 |
ed97d9a57671111b67792fd6ee1ca9bd | 136c6f46fe08f247b837f803612e33e4 | 确认兑换弹窗确定按钮 | class UnionLottoChooseNumber_lexiu(Page_lexiu,UChooseNum_lexiu_loc,LChooseNum_lexiu_loc):
################################元素操作##############################################
#鼠标向下拖动
def Confirm_button(self):
self.wait_element_located(self.driver,self.confirm_button_loc)
self.find_element(*self.co... | 1 |
947dcb6756044c0487835cd6744085f5 | f876b547017d404f2d50bd8758a5c446 | Retorna un arreglo indexado por fechas de los eventos de una aplicacion | class Eventstatistics extends BaseStatistics
public function getTypes($idApp, $initialDate, $finalDate){
@list($d1, $m1, $y1) = explode( $this->separador,$initialDate,3);
@list($d2, $m2, $y2) = explode( $this->separador,$finalDate,3);
$c=$this->getConector($y1, $y2);
if($this->getSegment... | 0 |
c460dcb0e76e961ae970eb6ada52f74b | 46f2b1788bd0eb7999b0c39ef56e1089 | 获得分词结果所包含的词的集合 | public class Searcher
public Set<String> getQuerySet() {
return queryWords;
} | 1 |
17016f4d332afde78df5e995e7917b0e | b2db8d21a74c9c1086cfcd338f1ce7d5 | Gets the Sord object with the given numeric object ID.
The Sord must exist. | namespace BesAsm.MasterData.Data.Bases
public abstract partial class SscProviderBaseCore : EntityProviderBase<BesAsm.MasterData.Entities.Ssc, BesAsm.MasterData.Entities.SscKey>
public BesAsm.MasterData.Entities.Ssc GetBySscId(System.Int32 _sscId, int start, int pageLength, out int count)
{
return GetBySscId(null,... | 0 |
feaee79766c5b6fc99dfcfb7c64092d0 | bb829069701d9a0bb039b9992a1e678e | Test repeatedly the number of maximum incrementations in a clock edge.
This gives indication of both resolution (average number of incrementations)
and jitter (variance of the number of ticks).
It also allows to plot the histogram of the distribution of the number of incrementations.
Writes the result in the folder div... | print('Testing the number of ticks in a clock period on Firefox ' + str(version) + ", " + str(repetitions) + ' repetitions.')
if coop:
print('COOP/COEP is on.')
else:
print('COOP/COEP is off.')
fp = webdriver.FirefoxProfile()
binary = FirefoxBinary(config.BROWSER_DIR['firefox'] + "fi... | 1 |
849097d1cbf4ae3bd1a38d4a3ef12cde | 8f83a0382642aaa902b09d4fc84866ba | les mouvements de la dame = ceux de la tour + ceux du fou | void get_moves_fou(int ind_case, int couleur, int tab []){
int cpt =7 ;
switch (couleur) {
case 0 :
while(ind_case-cpt >=0){
if(mailbox[tab64[ind_case-cpt]]!=-1 && mailbox[tab64[ind_case-cpt]-1]!=-1){
if (echiquier[ind_case-cpt].c==0) break;
if(echiquier[ind_case-cpt].c==1 ) {
... | 1 |
c31090458e84e4078e45d35fb754b212 | aa2935f1516b6f0ac5873572ea48ad79 | Adds the supplied instance of <code>JInternalFrame</code> to the desktop
for display to the user. | new RunnableInEDT<Boolean>() {
public Boolean work() {
JInternalFrame pluginFrame = plugin.getCooja();
if (pluginFrame == null) {
logger.fatal("Failed trying to show plugin without visualizer.");
return false;
}
myDesktopPane.add(pluginFrame);
if (pl... | 1 |
370cf07ab627bf7fb03471d3aee37575 | 7c844d0125582c105c7b377a2c5ac995 | Wrapper for PHP's "mysqli_ping" function. | class phpsqlanywheredb
function db_ping() {
return false;
} | 0 |
90b3c8d5a02a337f7fc9759961c57b29 | d6c3602ab2c0e37f4a612500afdbda81 | # prediction function for a generalized fitted object
#
# Args:
# obj: a gfo object
# newdata: either a data.frame or a mids (multiply imputed data set) object
# type: TODO: this is not hooked up yet
#
# Returns: numerical vector of fitted response values | if (is.null(object)) return(NA)
if (! is.null(newdata)) {
if (!is.null(object$formula)) {
tt <- terms(object)
tt <- delete.response(tt)
newdata <- model.frame(tt, newdata)
}
}
if (is.null(binData))
binData <- object$binData
y <- vector(le... | 1 |
714dca893d48f7f324c67c2cd73e2327 | c3aa36dbbcdc369cd2bed5348a91c9f5 | useEnv overrides `process.env` before each tests and restores to the original value after each test. | if myEnv is None:
myEnv = buildEnv()
oldEnviron = os.environ
def _cleanup():
os.environ = oldEnviron
case.addCleanup(_cleanup)
os.environ = myEnv | 1 |
48c114e5f3f3c38359f0107ed1696b8e | 500b90052973bceef1c769fc71158762 | Decrease the indentation of a region of code by a certain number
of levels.
**INPUTS**
*STR* levels=1 -- Number of levels to unindent
*(INT, INT)* range=None -- Start and end position of code to be indent.
If *None*, use current selection
**OUTPUTS**
*none* -- | class Wrapper:
def _indent_level_down(self, levels=1):
self._indent_level -= int(levels) | 1 |
71c06ff091c11b5cdf72ff8b3fc2b6a4 | ffb6e46c5cc2b7c902746c578145d3eb | Removes the given event callback. If no callback, clears all callbacks in `eventNames`. If no `eventNames`, clears all | function removeEventListener( eventNames, listener ) {
if( typeof eventNames === "function" ) {
listener = eventNames;
eventNames = Object.keys( eventListeners );
}
else if( !Array.isArray( eventNames ) ) {
eventNames = [ eventNames ];
}
if( eventNames.length === 0 ) {
... | 1 |
a1905fef839bf17a0b836b1e230323a1 | 61ebdf95b2d5de20439dc05de7659aca | Сохранение массива байтов в файл. С помощью этого метода можно сохранять во
внешний файл ключ симметричного шифрования или вектор инициализации. | namespace Kalk.Core.Modules
[KalkExportModule(ModuleName)]
public partial class FileModule : KalkModuleWithFunctions
[KalkExport("save_bytes", CategoryMiscFile)]
public object SaveBytes(IEnumerable data, string path)
{
var fullPath = AssertWriteFile(path);
using var strea... | 1 |
c964f2a11f65a234bbedf95153f7ba5c | 47f5c2709442a4384858907eb2fc61e6 | 画面の更新を行う | class Window_Message
def update(*args,&block)
lctseng_for_face_ex_at_Window_Message_for_Update(*args,&block)
update_face_sprite
end | 1 |
7fb68bc7fdb4f99ca182fc2cc0e37a12 | 490633f04dfd68e23206fd53775afd9f | Books an OpenBox offer so that it cannot be bought by several customers simultaneously. | namespace Google.Apis.Books.v1
public class PromoofferResource
public virtual AcceptRequest Accept()
{
return new AcceptRequest(service);
} | 0 |
f56a16010726f9642730a6cb3a73e4fd | 76a986f7fe972806bc6694eeae35c50c | Deletes all rows from the pengguna table. | class CreatePenggunaTable extends Migration
public function down()
{
Schema::dropIfExists('pengguna');
} | 0 |
50bb3186c67471081a916b90ff7943aa | a21b363ba8954c987809a00927a922eb | Handler for rebinding control when the selected index of a parent changes. | namespace Rocket.UI
public sealed class ControlTemplateInstance<TControl> : ContentElement where TControl : Control
protected override void OnParentChanged(Element oldParent, Element newParent)
{
if (newParent == this.control)
{
this.Trigger?.Invoke(this.control);
... | 0 |
ce647e8907be663407a17698640d8769 | d3d40e277fa5addb1a2dfa5baa49f853 | Converting English digits to Kurdish digits | {
$text = str_replace('0' , '٠' , $text);
$text = str_replace('1' , '١' , $text);
$text = str_replace('2' , '٢' , $text);
$text = str_replace('3' , '٣' , $text);
$text = str_replace('4' , '۴' , $text);
$text = str_replace('5' , '۵' , $text);
$text = str_replace('6' , '۶' , $text);
$text = str_replace('... | 1 |
78ba5aec9240d58a0f7c8242bcdbb8b3 | 55a8d59a28e4c21e44fa6cc07f5e4110 | 予備金額5を取得する | class OricoscAuthorizeRequestDto extends AbstractPaymentRequestDto
public function getItemAmount5() {
return $this->itemAmount5;
} | 1 |
8d66cb85ccf71f43428af7026c0e833d | e6c6088f30e53b614aade88b41025c78 | 生成某个渠道某天的对账文件 | public void generatorDayReport(String merchantNo, String merchanName, Date reportDate); | 1 |
477024c4927cadae0239e04cbab0e3b4 | 2a55560057d5da5c32360d15acdf067b | 변량들의 제곱의 합을 구한다. | ArrayList<Double> time2 = new ArrayList<Double>();
for (int i = 0; i < rate.size(); i++) {
time2.add(Math.pow(rate.get(i) - returnAverage(rate), 2));
}
double sum = 0;
for (int i = 0; i < rate.size(); i++) {
sum = sum + time2.get(i);
}
retu... | 1 |
11563e90cc6850b21a8d564a621d5e8a | ed504f3e3a5bcb6db6f59e161c46a06a | 测试当前环境的默认字符集 | function test_handle_dev() {
print_code_page();
} | 0 |
118b65be1c03f62dfb76454dbd2f859a | f1d5ef3e387a349e9e2615137d077e85 | Update the write circular queue indicating data has been written, freeing space for more data to write. | uint8_t CycQueueWrite(uint8_t *pWriteBuf, uint16_t length)
{
uint8_t ret = TRUE;
int s;
static uint8_t isBufferFull = FALSE;
if(cyc_buffer == NULL)
{
return FALSE;
}
s = osInterruptDisable();
if(CycQueueRemainSize() >= length)
{
isBufferFull = FALSE;
if( (pWrite + length) <= MAX_BUFFER_SIZE )
... | 0 |
f53a511d6ab1277d664bd92d7019de3b | 7a3fa26183e7c4c175021ca1ea62ff65 | 检查企业是否进行了资质认证 | $userInfo=new UsersModel();
$result=$userInfo->getCurrentUserInf();
$isEnterpriseChecked=$result['is_enterprise_checked'];
$this->assign('isEnterpriseChecked',$isEnterpriseChecked);
switch($isEnterpriseChecked){
case 1:{
$this->display();
break;
}
case 2:{
$this->show_msg("您已通过认证");
b... | 1 |
5256307ae1b3194cbfb2e5cf29030228 | d813cc98669b0190d759a8854562b262 | The maximum height the resizable should be allowed to resize to. | public UIValidator maxHeight(int height) {
validateMaxHeight(getConvertedInt(height, false));
return this;
} | 1 |
afc23bc70ea8121f57f5fdfc399f17e5 | 246633c7f5b59b6c54f175701913f6f9 | 获取当前选定对象的下钻对象集合 | where T : DependencyObject
{
return items.DrillDown<T>(i => i.Descendants());
} | 1 |
6d5b6a689ea8158a1881b13fcc365e4d | 25bc6f3b5a8939668d0bbca51a9881f0 | 當使用者填妥資料按下Submit按鈕後,本方法接收將瀏覽器送來的會員資料,新進行資料的檢查,
若資料有誤,轉向寫入錯誤訊息的網頁,若資料無誤,則呼叫Service元件寫入資料庫 | public String userAddSubmit(Model model, @Valid User user, BindingResult result) throws Exception {
if (result.hasErrors()) {
List<ObjectError> allErrors = result.getAllErrors();
model.addAttribute("allErrors", allErrors);
return "user/user-add.jsp";
}
userService.add(user);
return "redirect:user-list... | 1 |
e6d83b9869d1087c1f36d385a6c9a8cf | 9f59647045daf68069a8c97632910394 | Starts MapActivity with property information from list bundled as extras | public class MainActivity extends AppCompatActivity
public void startMap(View view) {
Intent intent = new Intent(this, MapActivity.class);
startActivity(intent);
} | 0 |
d9014e88de34e78265bce159d3379cd1 | 4e22f621281a2da1c002c6851cf8c271 | Creates custom JPanel component with fields for editing order time to live value. | public class ThreadGroupGui
extends AbstractJMeterGuiComponent
implements ItemListener
private JPanel createEndTimePanel()
{
JPanel panel = new JPanel(new BorderLayout(5, 0));
JLabel label = new JLabel(JMeterUtils.getResString("endtime"));
panel.add(label, BorderLayout.WEST);
... | 0 |
b8e6bed1ed52efe1cb3f4df3ea437c88 | 92cd9dae1bf3ca1af85e3c575c52f31f | GET /short_urls
GET /short_urls.json | class UrlController extends Controller
public function index()
{
$urls = Url::orderBy('created_at', 'desc')->paginate(config('shorturl.items_per_page'));
return view('shorturl::urls.index', compact('urls'));
} | 0 |
7ac9614e1aadb4b3125181d0e1fd323c | 1d8d92556c85febb1a5f362de92c5461 | Tests that we can transfer weights from one network to another that has a potentially different size. | m = nn.Conv2d(4, 4, kernel_size=3, groups=2).to(device, dtype)
i = torch.randn(2, 4, 6, 6, device=device, dtype=dtype, requires_grad=True)
output = m(i)
grad_output = torch.randn(2, 4, 4, 4, device=device, dtype=dtype)
output.backward(grad_output)
m1 = nn.Conv2d(2, 2, ker... | 1 |
bede4f501cb38e0d82c62557e10bb78f | 4f01926e94beb25154b600eca8fb9485 | Test the 'classify cuisine' endpoint (POST) | passcase = {
"class": "dish",
"name": "name_example",
"type": "antenna"
}
asset = Asset().from_dict(passcase)
headers = [('X-User', 'admin')]
response = self.client.open('/api/assets',
method='POST',
... | 0 |
8f5be8e853b7f07c7cbc8dec8a83ad32 | fd77e051c6356e4f85b0a30e799edecf | This function returns whether this Backend supports databases or not | {
if (IsADBLSupportedFeature(_T("SupportUserDefinedDomain")))
return TRUE;
if ((m_nDBMS == SQLSERVER && m_nDBMSVersion >= 9) || (m_nDBMS == DB2) || (m_nDBMS == DB2_2) || (m_nDBMS == SQLAZURE))
return TRUE;
return FALSE;
} | 0 |
02ff9ad4533a0ca1c810846d267684eb | 69e88af2f32ad62a542b94fa10114b2c | Default destructor for Battle class | Battle2::~Battle2()
{} | 0 |
cb177d0bc1989af884a93fd2b1557de9 | ad8b0750c9636e371b8e7a92eb5cbf3a | Function: List available job templates | class MediaServicesRestProxy extends ServiceRestProxy implements IMediaServices
public function getJobTemplateList()
{
$propertyList = $this->_getEntityList('JobTemplates');
$result = array();
foreach ($propertyList as $properties) {
$result[] = JobTemplate::createFromOptio... | 1 |
8cabd821318776666258c1f55272db02 | a69056efae7bd2641e48698b8894292a | <para>当前鼠标位置(移动设备第一个触摸位置)点是否在EventSystem对象上面</para>
<para>可以指定Raycaster名称</para> | public class MousePositionToRay
public static bool MPSPToRay(string tagName)
{
Ray r = Camera.main.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
if (Physics.Raycast(r, out hit))
{
if (hit.collider.tag == tagName)
{
return true;
... | 0 |
c1316228a00fe8421a540485de092ace | 4ff247b084e7e0db0591ed59937eb4d1 | Deletes the specified resource share.
<important>
<para>
This doesn't delete any of the resources that were associated with the resource share;
it only stops the sharing of those resources through this resource share.
</para>
</important> | export class FileShares
deleteMethod(deviceName: string, fileServerName: string, shareName: string, resourceGroupName: string, managerName: string, options?: msRest.RequestOptionsBase): Promise<msRest.RestResponse> {
return this.beginDeleteMethod(deviceName,fileServerName,shareName,resourceGroupName,managerName,opt... | 1 |
5e4ac58be476e7903d03828383f2dbaa | 5df52689c51c32a7dc7c0a732d6cc2da | gives less velocity change the further the square is from the center | if(Math.abs(rest)<=checkerboard.boardWidth/20){
v -= rest;
}
else if(rest>0){
v = v+checkerboard.boardWidth/10-rest;
}
else{
v = v-rest-checkerboard.boardWidth/10;
}
return v;
} | 1 |
b3a50513195ed945d9fa64a0fa1bbcac | 349d464d739caff1514ff829f01cec29 | Called by InvalidateMeasure | namespace Avalonia.Controls
internal sealed class SharedSizeScopeHost : IDisposable
private sealed class MeasurementCache : IDisposable
public void InvalidateMeasure()
{
var newItems = new List<MeasurementResult>();
var oldItems = new List<MeasurementResult>();
... | 1 |
681c65a1241d6837c386dbb18e177cbc | 22d9bb77ef19678b9b66b254bc663e06 | Example demonstrating the use the default method in interfaces. | namespace DocumentedApplication
void InterfaceMethod(); | 0 |
642898fa90a59fbedea1b4824e8cd321 | 2ea984874cfded54b1941e607294a38c | Vaihtaa kahden indeksin alkioiden paikat. | public class Jarjestaja
protected boolean vaihdaPaikat(Paikka ekaPaikka, Paikka ekaKohdePaikka) {
this.ekaPaikka = ekaPaikka;
this.ekaKohdePaikka = ekaKohdePaikka;
return vaihdaPaikat();
} | 0 |
f65db7b06841e4b22ab6f96689d9989a | eeb4d4fdd4b1d514fbb90878c8821ca6 | 获取距今日前N天的日期 | public class FormatDemo
public static ArrayList<String> getBeforeDay(Integer n) throws ParseException {
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
ArrayList<String> list = new ArrayList<>();
Calendar cal = Calendar.getInstance();
for(int i=0;i<=n;i++) {
cal.setT... | 1 |
26365712218ca6a93fb2613136580237 | 96ab5917c8a0ecd2a6288b1e6924e398 | Destroys an {@code ovrTextureSwapChain} and frees all the resources associated with it. | public class OVR
public static void ovr_DestroyTextureSwapChain(long session, long chain) {
if ( CHECKS )
checkPointer(session);
novr_DestroyTextureSwapChain(session, chain);
} | 1 |
f0d1dd29f25b2d32621f24015798b49b | 27e98ebca6d77019ec3b7d2e9b30dbbb | Fx0A | public class CPU
private void xF2() {
A = memory.readByte(0xFF00 + toUnsigned(C));
setClockRegisters(8);
} | 0 |
59596df0e7daf779eceb3352f1d4fae6 | 8e6090d92db31cf7764f0d657fe410cc | StartButton
A class to control the start button on the waiting room page. The master of the
game selects this to transition from the waiting room to gameplay. | function StartButton(x,y) {
this.x = x;
this.y = y;
this.width = 400;
this.height = 100;
} | 1 |
b3ac65570bbfe3a7dce71ab2be473096 | 783341a58a887fffbbb7f30b44710726 | Removes an instantiated bot. Every bot has its ID as its avatar name. | boolean removeBotMaster(final String username); | 0 |
2c5b8b83931ce6efe11324c0cbf1b3d2 | a89f9958c00f610d673c20f5416f78f5 | Test gate cover discovery. | self.get_nodes_utility()
self.get_obms_utility()
data_payload = {
"name": "Graph.Ucs.Discovery",
"options":
{
"defaults":
{
"username": "ucspe",
"password":... | 0 |
49a30390c12bbb5a1ff4f10016901526 | 8cc726d4614bae6624d2c640c9ae7e01 | Return lookup value description. | public class LookUpResult
public String getLocatorDescription()
{
return getStrategy().getLocatorDescription();
} | 1 |
23a071e659323e2daa8054347fda7e94 | 0b3a98b282482e1ed1cba9d851819a31 | Returns the surfaces adjacent to the environment and ground | public class PlayerController : BaseCharacterController
private List<Vector3> CheckSurroundings()
{
Debug.Log("Checking Surroundings");
List<Vector3> hitNormals = new List<Vector3>();
RaycastHit[] hits = Physics.SphereCastAll(transform.position + Motor.CharacterUp * Motor.Capsule.height,
... | 1 |
3cb2ac06186e797b4ae6500dad59f4cc | a03ce5338e4fa4368c4a40399e44ab4d | Fires the actual request for the access token. This was isolated so it can be stubbed in unit tests. | export class IamTokenManager extends JwtTokenManager
protected requestToken(): Promise<any> {
const requiredHeaders = {
'Content-type': 'application/x-www-form-urlencoded',
} as OutgoingHttpHeaders;
if (this.clientId && this.clientSecret) {
requiredHeaders.Authorization = computeBasicAuthHeader(... | 1 |
25e4fb0d048b87a268d76ccc628907fc | 3cbd3eef259c5d584ebc9ac1ca1cbe39 | @brief Set the address length for S2LP Basic packets.
This parameter can be: S_ENABLE or S_DISABLE. | uint8_t config;
AX5043ReadLongAddress(interfaceID, PKTLENCFG, &config, 1);
config = (config & ~LENBITS_MASK) | (significantBits << 4);
AX5043WriteLongAddress(interfaceID, PKTLENCFG, &config, 1);
} | 0 |
6d7f0f5a5c9b0647362232c7faaa5f3f | 20a5c5e680a5425bb67c6e37c1d650d6 | Überprüft ob die Nummer in dem Block schon vorhanden ist. | const idNummern = liste.querySelectorAll("#id");
let istVorhanden = false;
idNummern.forEach((idNummer) => {
if (idNummer.value == id) istVorhanden = true;
});
return istVorhanden;
} | 1 |
87ed537abda1d57223062af0c2f56c82 | 1d77a35f0c829e28034534070ef88c65 | Визначає назву моделі та id примірника u | try:
m = u._meta.model_name
m_id_n = {
'id' : str(u.id),
'model' : m,
'name' : "%s" % u
}
except:
m_id_n = {}
return m_id_n | 1 |
84895001ce9fd7d1136a2b7f0f4e620d | 340817fcb2f201d6d17f59b1d1268d33 | gets all leave applications | List<Leavee> getAllLeavs(); | 1 |
2334a081c57999aeecbf79377faa2e01 | 3a799a6af6e1e4b40cfbdaf12d9c1208 | Time elapsed since this entity's creation | long Track::getTime_elapsed_from_creation() const {
return time_elapsed_from_creation;
} | 1 |
b00054dd362c0b5ee8ee3ac0830f307b | d61b6076b3ea5dfe9018efb5d5e649e8 | Returns the device terminals that the wire is connected to. | public final class Cwa14890OneConnection implements ApduConnection
@Override
public long[] getTerminals(final boolean onlyWithCardPresent) throws ApduConnectionException {
return this.subConnection.getTerminals(onlyWithCardPresent);
} | 1 |
553b33d33c24e2f224742cd57d86c603 | 6855f8cbe667c0cc833de7ea177fc7eb | Get a np.ndarray representation of the point cloud.
Returns:
np.ndarray: the point cloud's points | class PointCloud:
def points(self):
return np.asarray(self.point_cloud.points) | 1 |
802de58d605573d0b7fc3c814f73dcfa | 808d1d1b85970931831f438d82af0660 | Creates an OTA Update tool with the given properties. | namespace LoRaWan.Test.Shared
public class TestDeviceInfo
public static TestDeviceInfo CreateOTAADevice(uint deviceID, string prefix = null, string gatewayID = null, string sensorDecoder = "DecoderValueSensor", char deviceClassType = 'A')
{
var value16 = deviceID.ToString("0000000000000000");
... | 0 |
1c8efa176657bff2a8a1008f1f9936d5 | 578033dc66377b8ebed13851035d3e1e | Abstract method returning the unit of this period. | class RhythmFeatureExtractor(FeatureExtractor, metaclass=ABCMeta):
def get_unit(self) -> str:
raise NotImplementedError | 1 |
c2f4a77b721369b76006071d36f499bf | c41b7e4fab7b71ba3b738c4e99e35739 | Calculates the day of the year on which a specified date occurs. | namespace System.Globalization
[Serializable]
public class UmAlQuraCalendar : Calendar
public override int GetDayOfYear(DateTime time)
{
return this.GetDatePart(time, 1);
} | 1 |
a156951a4c2ae8a3949cf5b2915b4b31 | 541afe2ca2ae0980cc0952fbb38b8db7 | 获取渠道商信息根据渠道商ID | namespace net91com.Reports.Services.CommonServices.SjqdUserStat
public class CfgChannelService
public Sjqd_ChannelCustomers GetChannelCustomer(int id)
{
return SjqdChannelCustomers_DataAccess.Instance.GetChannelCustomer(id);
} | 1 |
39edac4032867f850ebb11116f5b0181 | 742f9b3ab4591255978247ed9aebc3d4 | 一定時間経過後消滅する | public class Destroy : MonoBehaviour
void Update () {
if (Time.time > time + count)
Destroy(gameObject);
} | 1 |
bd857c3221bcf20f7f820df2fb19a915 | 0eb49bb2e2c6c85f7df20b164c2aa60f | Project egovehicle coordinate to image. | class TLDetector(object):
def project_to_image_plane(self, point_in_world):
image_width = self.config['camera_info']['image_width']
image_height = self.config['camera_info']['image_height']
pos = self.pose.pose.position
t = tf.transformations.translation_matrix((-pos.x, -pos.y, -pos.z))
... | 1 |
63c994b71291da7924d64f6398bb7eb1 | 417835ca43371df9d1c25f8fd38ca424 | Sets the value of the '{@link org.openebiz.core.docs.remittanceadvice.RemittanceAdviceType#getTotalCreditAmount <em>Total Credit Amount</em>}' containment reference.
<!-- begin-user-doc -->
<!-- end-user-doc --> | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"requestForPaymentIdentification",
"specialInstruction",
"orderIdentification",
"additionalInformation",
"deliveryNote",
"buyer",
"seller",
"shipTo",
"invoiceCreator",
"customs",
"currency",
"paymentT... | 0 |
193dde433e34532460ed65c6df5e0b05 | 3ebe037da745cac98cb6e947b67fc560 | # function to plot the passaging data in ANP_passage_experiment.csv alongside best estimates (see estimating_virus_production_rates.R) and CI (see CIbootstrap.Rmd) | add_simulated_median=TRUE,prediction_corrected=TRUE,plot_obs=FALSE,plot_outer=TRUE,
legend_position='topright',bw=FALSE,legend_size=0.7,col_scheme=FALSE,...) {
print('Default x-axis label is Time after dose (hours) and default y-axis label is Prediction corrected concentra... | 0 |
832de673bc2a6f80a1a28442172a2bd0 | d10c501469573e61feed55c461921055 | Set Shipping Protection base price | public function setBaseShippingTaxAmount($amount); | 0 |
e4954f4f2db3c69437bfbcd84091aac4 | d44daa53509c41506ecd3220810c2ee5 | 判断代理数量是否超过代理池设定值 | class Getter():
def is_over_threshold(self):
if self.redis.count() >= PROXIES_THRESHOLD:
return True
else:
return False | 1 |
b5cc8f45d89eb6fba59754db1fca9a37 | f1e71e3752570add8e5b084042c39102 | Sets up and runs the RandomColor GUI program. | public class rgb extends JFrame
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
rgb window = new rgb();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
} | 1 |
483cf14c9c26a224116858ca574e0133 | 81c5d28acd8498d15b05684329783fee | Determine if there is an obstacle between two vectors | {
v1 = v1.Normalise();
v2 = v2.Normalise();
return v1.Subtract(v2).GetLength() < errorVal;
} | 0 |
85f156ad135a91ad95ad401f136338d0 | c6f8f9bb0b359083d130850cad5dcbfc | 此方法用于将用户输入转为HashCode数组 | int len = ca.length;
int[] iArr = new int[len];
try {
for (int i = 0; i < len; i++) {
iArr[i] = Integer.parseInt(String.valueOf(ca[i]));
}
} catch (NumberFormatException e) {
e.printStackTrace();
}
return iArr;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.