query_id
string
corpus_id
string
query
string
code
string
label
int64
9f4bee8aa4bd21c5b4f3817ba86fae62
e6cf8fd83a07e67b2ca78c93a2a4f40b
It returns manager of all task models.
class TaskModelSource(ASTBasedModelSourceFile): def taskModel(self): m=self.model return m
0
7a2c3ef601867152ab370886eedfc8af
c8a3ba52af364677c7689e03bbc8b0f8
Get path to file in temporary directory
@Log public abstract class ConfigFileWriter private Path getFilePath(String filename) { return tmpDir.resolve(filename); }
1
cbd37e91adaf7c3ca3d6071407ac9c1c
8f4e60163c6c8045c6690f3485857ab9
Delete from the Canvas the selected Control
class tkinterEditor(componentMgr): def delete_control(self): cur_tab = self.file_tab_window.get_cur_tab() if cur_tab is None: return edit_component = self.get_selected_component() if edit_component is None: return edit_component.delete_self()
1
76b4ab85a1549502ddf804aa53e38226
f08303f5f0987bf23d927e59c378e1d1
Creates the graphical representations of the pieces
for (int x = 0; x < 8; x++) { for (int y = 0; y < 8; y++) { if (((y == 0) && (x % 2 == 0)) || ((y == 7) && (x % 2 != 0))) { pieces[x][y] = new Piece(y==0, this, x, y, "pawn"); } if (((y == 1) && (x % 2 != 0)) || ((y == 6) && (x % 2 == 0))) { pieces[x][y] = new Piece(y==1, this, x, y, "shield"...
0
d06a30a01c8ef316ab8ec1091d66c367
1fb22a092d4806cd40685ead159b2476
移除自身的父容器
export class BaseEuiView extends eui.Component implements IBaseView public removeFromParent():void { if(this.parent){ this.parent.removeChild(this); } }
1
3a14b54e9e18c3a11dd277eaf7cba7f6
058fd0b20418677463762dfcc8b4bb9e
Callback that is called in main thread when subroutine completes.
LONG CMainFrame::OnMainThreadCallback(WPARAM wParam, LPARAM lParam) { ((PFN_MAIN_THREAD_CALLBACK)wParam)(lParam); SetEvent(m_evaMainThreadCallback); return 0; }
1
d436cd5bb42b17feb40ff2edf28cc7cc
01e26a81867767586563993c08c35686
get top element without removing it
class Queue int peek(void) { stack<int> temp; stackSwap(stk, temp); int topElement = temp.top(); stackSwap(temp, stk); return topElement; }
1
8fd0059960bf7f21fb0887290df08d60
ff5873c7c61abbca3605c56e4d6bcdaa
Con este mouseclicked controlamos que podamos clickar sobre una tabla para poder recoger esos datos y mostrarlos en otro campo
private void posicionRatonTabla(MouseEvent event) { persona = new PersonaClass(); persona = tablaPersonas.getSelectionModel().getSelectedItem(); if (persona != null) { txtUsuario.setText(persona.getNombre()); txtPassword.setText(persona.getPassword()); } ...
1
6d216bb6cadf0d3bad3fd5a61f40faec
8db1debc6a507aafb33f54e9220c8cb7
CreateDataFilterPipeline creates a pipeline that will filter a dataset.
b := databuilder.TablesBuilder{TileWidth: 4} b.CommitsWithData(). Insert("0000000098", "user", "commit 98, expected tile 0", "2020-12-01T00:00:00Z"). Insert("0000000099", "user", "commit 99, expected tile 0", "2020-12-02T00:00:00Z"). Insert("0000000100", "user", "commit 100, expected tile 0", "2020-12-03T00:00:...
0
5b08107e075afd965afd0bc9dc2ee15c
f1d02e4e7e5ff196ef9d56153dd56f50
加载所有实例
public static function loadAll();
1
65222b595d36fe19ef9a8d762a1db46b
e73a171fbd26e73a21fa508094a9fc73
如果缓存为空则返回一个空数组
class Base protected function getCache($key) { if (Config::IS_DEBUG) { return []; } if (empty($key)) { Exception::throwSysException(Error::SYS_CANNOT_EMPTY, __METHOD__); } $str = $this->mc->get($key); if (empty($str)) { return []; ...
1
c07e86d0ea56d256b9d40696b1f40296
f8a98d0a510528d2fb26efff21df5d47
Tell simplestore to unmark the last read page as read
if (!window.show_read) { $('#entries_container').html(''); } $('#entries_count').text('0'); $.post( $SCRIPT_ROOT + "/mark_all_as_read", { feed : $('.selected-feed').attr('id') }, function(data) { if ( !data.result ) { alert(data); } }); return false; }
0
7319dce2cb5a5ca349a110c657947ff5
a5d790f7810dea501eda9347b7345a0b
the binary search method will search through candidates to find a specific one
void socialNetwork::binarySearch(int user,bool& found) { int first = 0; int last = badCount - 1; int middle; found = false; while(last >= first && !found) { middle = (first + last)/2; if(user < badRecom[middle].amigo) last = middle - 1; else if (user > badRecom[middle].amigo) first = middle + 1; els...
1
8f69a09152d0baca41281e62e6e33483
596f2c42d55b3718e7f9640f0c2098f1
Devuelve el número de pixels de alto de cada casilla del tablero
export class Board get height(): number { return this.boardHeight; }
0
da6e0bc0fb3945376fd38aef9d86ddee
51ece5d42b2454b4d23f689731240b11
Draws the row of captured pieces on the side of the board
void ChessRenderer::DrawCaptured(Team team) { int x = team == Team::White ? 9 : -2; int y = 0; for (Piece *piece : gameState->capturedPieces) { if (piece->team == team) { piece->position = glm::vec2(x, y); DrawPiece(piece); y++; if (y > 7) { ...
1
591be6ea9d2070ee169f18ce87a2e0af
df85ddf1f0bbc50bd46c17a8618ea725
write complex matrix m_gsl to numpy file
void rmat_save(int m, int n, rmulti **A, int LDA, int digits, char* fmt, ...) { int i,j; char fname[FILE_NAME_LENGTH_MAX+1]; va_list argp; FILE *fid; char gmpfmt[16]; va_start(argp,fmt); vsprintf(fname,fmt,argp); if((fid=fopen(fname,"w"))==0){ ERROR_AT; printf("Cant't open file: %s\n",fname); exit(0); }...
0
8cfd9ea3d9ce3bc7502e19855b5ea8a9
0301d6243015ba3fb6806b5d07589381
アマゾンからデータ取得
$url = "https://api.rms.rakuten.co.jp/es/1.0/item/get?itemUrl={$item}"; try { $data = self::init($url); $data = self::_setResponseXml($data); return self::_getDataSet_item($data); } catch(Exception $e){ Log::error("商品情報(...
0
ee8e376ea9b73247f91ce89aadd9dfcf
321439512fd3724fb66a98023af8f409
Invoke callback to unity. This is where physics code that interfaces with bullet can be called. We will invoke it before simulating.
void UTimePhysics::BeginPlay() { Super::BeginPlay(); }
0
37af0fa41a3675b4b3629a39faf46afa
211fa45e53e69c623b9a5e97b3758eaa
Checks for the dynamic content updates.
public class DynamicTexture boolean onCheckForUpdate(long enlapsedTime);
1
5c59efc056b5d9694d39abd4a5224789
90ab7f431a7e547979317b1fdbc186b9
Fake API call for todos
interface NetworkApi @GET(Apis.GET_TODO) suspend fun getTodoItems(): ArrayList<TodoResponse>
0
1edd96dcea6640190f02ac0ba31dab76
cb9dc70f41e77a2db6e6de1a0ffe8595
Write this method to store the info from the GUI in the data object.
public abstract class StoreData public void storeData() {}
0
a8ae548d74462f84fc6a7d2066ca86d9
6bebe39c50acc1dfe61149f060932dae
Returns the signature of a number. The signature is composed of all the digit of the number, sorted.
def getSignature(word): word = word.lower() signature = ''.join(sorted(word)) return signature
0
fdef7c6f0fb9c87cc164e4f3e893a41b
29f83a03c494a35478cdf9b282845191
スコアに応じてスプライトを出し分ける
class MyGame(arcade.Window): def split_asteroid(self, asteroid: AsteroidSprite): x = asteroid.center_x y = asteroid.center_y self.score += 1 if asteroid.size == 4: for i in range(3): image_no = random.randrange(2) image_list = ["assets/spaceMet...
0
378e2ce4bf13da10675ee53be8b5d862
a247c8b890b2658c9ca0bd685b58b737
runs Jenkins jobs for testing
SwingWorker<Void, Void> runTests = new SwingWorker<Void,Void>(){ @Override protected Void doInBackground() throws Exception { Process testBuilder = new ProcessBuilder("/bin/bash", "JarResources/runtests.bash").start(); return null; } }; runTests.execute(); }
0
300d060dc490a903bb0e900b92b06f68
d332040eb0c43dd01ab1b02dc346cbd8
Convert projected coordinates into WGS84
namespace SteuerSoft.Maps.Core.Interfaces MapPointLatLon FromProjection(MapPointLatLon projected);
1
cfcb7cd6924be70598e893c2f321f61c
ee48f1053876a703d6747be78d13ccee
更新下载队列状态
public class BasicDataInfo public synchronized static void updateDownRecordState(SQLiteDatabase mSQLiteDatabase, String path, int state) { Cursor cur = null; cur = Database.query(mSQLiteDatabase, true, DatabaseAccessor.TABLE_DOWNRECORD, null, AppSourceColumns.TABLE_DOWNLOADURL + " =?", new String[]{path...
1
60f12606c89404e1a4099f01685d26cf
a09a06fa5bdbc7de54834e5645e56b77
Verifies a CycloneDX BoM conforms to the specification through XML validation.
Task<bool> ValidateSbomAsync();
0
5f0b03a17d870c23d77aa3dd843e7e15
30284d8d8a216762c26321b8a325370c
Getting the training data and drawing a graph of loss rpn classifier, loss rpn regression, loss class classifier, loss class regression, total_loss and class_accuracy for each number of Epochs.
data_set = pd.read_csv(config.train_data_path, encoding="ISO-8859-1") model = Model(opt) plot_loss = [] while model.start_iter <= config.max_iterations and model.cant_do_more==0: start_time = time.time() prev = 0 batch_count = 0 mle_total = 0 simplification_tot...
0
cb6805b3997b146321187c86ec02362f
24ecf33a0f18119fb5d17bd142356965
生成负的交款记录
@Service @Transactional(readOnly = true) public class VoucherAccCashService extends CrudService<VoucherAccCashDao, VoucherAccCash> @Transactional(readOnly = false) public int negativeRecharge(VoucherAccCash voucherAccCash) { VoucherAccCash vac = new VoucherAccCash(); vac.setBindUser(voucherAccCash.getBindUser()); ...
1
d4e421bbe3c69337859446ca7e8056b1
6a82332b4bc325e9b694d37fa5c63566
This function augments the badge placement element, which is passed in. This is an element that will have <svg> and other markup inserted inside of it. It binds the permanent event handlers. It positions the elements so they appear directly over the websites placeholder. It sets the SVG height and width so that it vis...
const badgesContainer = document.createElement("section"); badgesContainer.id = "badge-display"; badges.forEach((badge) => { let imgSrc = `../../../static/assets/badges/${badge}.svg`; const newImg = document.createElement("img"); newImg.src = imgSrc; let number = badge.match(/\d/g); let name =...
0
b65648b68cc980cf64c080decacc0d14
51b232381af85f801a0d45890f5c047d
ContextsController constructor.
class ApiController extends Controller function __construct() { $this->middleware('auth'); $this->middleware('context'); parent::__construct(); }
0
784ec1c9af0e8adad03e02a4484416be
0debae54f1b6ff8cba0398828735ff09
Zeichnet das Gebäude neu
int x = i * TILE_SIZE; int y = j * TILE_SIZE; GreenfootImage image = getBackground(); int lgrayVariation = LIGHT_GRAY + Greenfoot.getRandomNumber(GRAY_VARIATION); image.setColor(new Color(lgrayVariation, lgrayVariation, lgrayVariation)); image.fillRect(x, y, TILE_SIZE, TI...
1
5ffa469f6133d8f25c47aee1e617aa42
7ae44de20e5b57ff22db78d32e6ae18c
Flattens the (MATLAB) variable in time, as it is scattered in xy.
def flatten(x: np.ndarray): assert len(x.shape) == 2 and x.shape[0] == 1 return x[0]
0
6050dab78f023f459f5db7d8aa4d1b58
6bcab0c62015ff66419ca42a976d5ef5
Override in subclasses:
class Manager: def update_model(self, **kwargs): raise NotImplementedError
1
c227a3960840ec20c54ca82d497e8ac6
7d5c106975989ad88fd9c555f17c5261
106014 This test is for '106014 Invite an another practice's staff to the practice
class testcase_recommend(testcase_base): def test_12004(self): cmdid = 12004 headers = { "cmdid": str(cmdid), "timestamp": str(long(time.time() * 1000)) } body = { "common": { "userid": 154, ...
0
ac5ed9aca1c01503065301d633e2f45b
59a0f0e77fb84598830ea2dd2f399470
Set the unused2 field for the SEP record.
namespace NPOI.HWPF.Model.Types public abstract class SEPAbstractType : BaseObject public short GetUnused3() { return field_36_unused3; }
0
5e098c64a06de6d60860afbe1dcaf73f
1032f8e84637eef9e1be77e781372c47
Add used or bookmarked recipes to database.
public class RecipeFragment extends Fragment private void saveToDb(){ mRecipe.setDate(new Date()); if (mRecipe.getTitle().isEmpty()) { String title = getResources().getString(R.string.default_title); mRecipe.setTitle(title); } if (mRecipe.getId() != 0) { ...
1
cd34fe7460ade53cdbd989504a658c1b
bae411383f0b4574decddc2444c48626
Add `item` to history. If the pointer doesn't point to the last history entry, the list will be truncated before appending `item`.
for history_item in self.history: if history_item.given == item.given and history_item.family == item.family: return self.history.append(item)
0
013bffe9b8f8bd1bc73e8fb46f213b67
8e626d22c5353713950564b4e9f7027b
Verificar se o usuário está online
class Profile(models.Model): def is_online(self): try: LastVisit.objects.get( user=self.user, date__gt=datetime.datetime.now() - datetime.timedelta(seconds=ONLINE_TIME) ) return True except LastVisit.DoesNotExist: return Fal...
1
00c0428c25a4dacf8c1d13df5d299297
0ce19f17dfcb12f7d8237217b4581a1b
发布音乐模型
class SongsModel extends Model{ public function update($post=""){ $post = empty($post)? I('post.'): $post; $data = $this->create($post); if(!$data){ return false; } $extend= array( 'listen_url' => $data['listen_url'], 'down_url' => !empty($data['down_url'])?$data['down_url']:$dat...
1
b7849d13f2cca60cb13135e45471581b
65e8b61944b411ae87c94b9f3b11f75b
云运动 - 会员管理 - 批量生成会员卡
Result<Boolean> batchGenerateCard(BatchGenerateCardRequest request);
1
e0b8a3c183e3ba7cf59e22b1fc04f82b
abb2f7877e290b5278b8bada37b5101d
post Multipart数据,返回String
CloseableHttpClient httpClient = null; CloseableHttpResponse response = null; try { httpClient = HttpClients.createDefault(); HttpPost httpPost = new HttpPost(urlStr); MultipartEntityBuilder multipart = MultipartEntityBuilder.create(); if(!files.isEmpty() && files.size() > 0){ for (int i = 0; i<fi...
1
9e5b52121648110f95136a6f84f05de5
6b2558342440c75abc92fc58e6626255
Get temporary reporter.
class FileReporterTest(unittest.TestCase): def setUp(self): self.tmp = tempfile.NamedTemporaryFile() self.reporter = FileReporter(path=self.tmp.name)
1
ba7e722c9314b1635995e69d5d7cfe6c
eedf0f21ef2009e756acbbda8a98bba9
Obtiene el valor de FK_Id_Estudiante
public class Enrollment public int getIdStudent() { return idStudent; }
1
6000d28b1275cfdaa80029823b786700
e191d711f8318df303487763767c197a
根据tag的id的数组获取标签信息
ArrayList<String> getTagById(Integer id) throws SQLException;
0
37411c15fe675a4fdae22d9c71e6fba8
3f4ea718ec0a76b144dc2cefae96edf9
Can be used to work out extent of .ply file points
_, _, fpoint = extract_bounds_info(meshtool_output) fdist = fpoint[-1] return (0.65 / fdist + 1e-9,) * 3
0
ae138ff7a959277d292304e9137653a1
d7ffb4eecc34d6c061263f64223399a1
Ham nhap chu (chu thuong va chu hoa) va dau cach
int laHoahaythuong(char a) { int kt; if ((65 <= a) && (a <= 90)) kt = 1; else if ((97 <= a) && (a <= 122)) kt = 2; else kt = 0; return kt; }
0
ef54eacfcc5cf7e53462bf4314863834
84d5d82effbbe89093ece479ddd790a0
Triggers update of plan instances and service template instance
class TestPlanController extends ProjectBaseController public function postUpdate() { return parent::postUpdate(); }
0
9d56488976624ecb34d052a53c21261a
9a3357016594913494a0955a10a6b5c9
Roi to lobe mapping of Neuromorphometrics atlas. Returns
class LunglessCT: def binary_map(self): if self.pat_obj.data_name == 'LTRC': _ = self.LTRC_lungs() elif self.pat_obj.data_name == 'UMM': _ = self.UMM_lungs() elif self.pat_obj.data_name == 'UKSH': _ = self.UKSH_lungs() return self
0
9ab30e26dfc8fa89d6292d829dfc1ddf
087b64dbd71607acd0f7da861c0e6bd3
Sets meta data retrieved in meta data resolver to the current view model.
namespace MotoProfessional.Models.Interfaces void PopulateFromMetaData();
1
d5ad74d04cc177fc63a34be100974e8f
e6d6a895fe8d4c10915fd692c4765d1e
save the turn-off delay in seconds
{ fprintf(DEBUG,"\r\nPower will to turn off in %ds\r\n",insec); timekeeping = insec; count_keepPWR = 0; enable_sleeping_flag = 1; }
1
a51750b25962c1d90fee7655e64c8173
88f1c6ce11ae98fd04ccbca2d7ad14cb
固定时间间隔刷新面板
namespace Tool.UpdateBin public partial class UpdateBin : Page private void DispatcherTimerTick(object sender, EventArgs e) { refresh(); }
1
de673bb3e9c91b969f77a71864fc04b3
73664cbc7f95c23f51f3ab22c6471f5b
检查表名是否合法
class TableName implements Rule public function passes($attribute, $value) { if ($this->module && $module = Module::find($this->module) ) { $moduleName = $module->getLowerName(); if (!($value == $moduleName || starts_with($value, $moduleName.'_')) || ends_with($value, '_')) { ...
1
ce575d0a0202195e0af8df1cea288a98
52eea8f36a0aff5705be4e7d49d3251c
推荐码生成
class IndexController extends Controller{ public function code(){ $num = Config::get('self.codelen'); Code::num($num)->make(); }
1
1db35108c134e97734690d1c88477084
73466e7f01c37c0f4a1b2f36664e5584
Desactiva la cuenta de un caminante marcando como false su atributo cuentaActiva.
namespace Persistencia void ReactivarCuenta(string pCuenta);
0
ca482e0be161fbe575c3a22cde6b369e
a7cf31d5b85c737b7dea2c3b1f1722f9
Je-li zásobník prázdný, vrátí hodnotu true.
try { String vrchZasobnika = zasobnik.get(zasobnik.size() - 1); try { Integer.parseInt(vrchZasobnika); } catch (NumberFormatException e) { return false; } return true; } catch (IndexOutOfBoundsException e) ...
0
0b381acc04d8e5da171c1c334d44acbb
bcbb3ec05d95245b91fe4dcaedea5b8d
The prompt is capitalized appropriately.
class NapHelpFormatter(argparse.HelpFormatter): def start_section(self, heading): heading = '%s%s' % (heading[0].upper(), heading[1:]) super(NapHelpFormatter, self).start_section(heading)
1
bfae7cdc88c1b2c8fb661e93f44c7dc3
65122710e0ce87b63ed88634a347b472
Function to update the video title and description based on its unique identifier .
{ this.videoname = videoname; this.videodescription = videoDescription; VideoName.text = videoname; VideoDescription.text = videoDescription; }
0
03b41c79dedbafc878e1800b73617c2a
c4c7ac7d2bb42064c0b36d7d768a4be6
发送关闭连续获取数据命令
void Transiver::close_slot(unsigned char ts){ unsigned char cmd = 0x08; vector<unsigned char> args; args.push_back(ts); vector<unsigned char> answ = send_cmd(cmd, args); check_cmd_answer_len(answ, cmd, 0); }
1
d72b9e522950ea78455cf028a82d9c2e
69d1aa85e078dd89987764505fb61fe2
Find an instance of an application belonging to the current user
class Application extends \Phalcon\Mvc\Model public static function findApplication($clientID, $userID){ return \Model\Auth\Application::findFirst(array( 'conditions' => 'userID = ?1 AND clientID = ?2', 'bind' => array(1 => $userID, 2 => $clientID), 'bindTypes' => array(1 => ...
1
6c455241b8d9cda43ba23e2d8d80a8e0
30211089ac22bd75dfae1c36cef00617
TAKEGOLD 拿走玩家金币
public class JGUtil public static void takePlayerMoney(Player player, double money) { JingGong.getInstance().getEco().withdrawPlayer(Bukkit.getOfflinePlayer(player.getUniqueId()), money); }
1
f56fd770566ade3f1358a2abb95886eb
8d01273054fa6cdfe9f5df9db001d0f6
Return a default air quality fixture.
value = float(format(random.uniform(5, 20), '.1f')) sensor_node = random.randint(1, 5) sensor_address = random.choice( ['class01', 'class02', 'class03'] ) return {"temperature": {'value': value, 'node': sensor_node, 'address': sensor_address}}
0
dfe8b4b6d7c99970f84464088dc5144d
d25ef9fee7ebad356de04356a069befa
查询商家审核状态
public AemoneySellerStoreAudit getAemoneySellerStoreAuditBySellerId(Long sellerId)throws Exception;
1
be2358d04dfa2e433eac73c5606196a5
2791394c3a8e9390c11bdc29de4a7c1d
最大的权限项序号
namespace FJW.BoLuo.Web.SQLServerDAL public partial class GW_Admin_Permission:IGW_Admin_Permission public int GetMaxId() { return DbHelperSQL.GetMaxID("PermissionId", "GW_Admin_Permission"); }
1
e894dfe93e6f285b5286b3cf07a9b9f3
088519a5aa878a04292640e6bde2a76c
| Print selected filename to its correct printer |
{ QPrinter printer; QPrintDialog dlg(&printer, this); if (ui->txtMain->textCursor().hasSelection()) { dlg.addEnabledOption(QAbstractPrintDialog::PrintSelection); } if (dlg.exec() == QDialog::Accepted) { ui->txtMain->print(&printer); } }
0
0a294117d5d64babfc07681cd81c1db6
078f10067d5e36013fdbaddf804eb6e3
convert to dict for jsonify, except password
class test_user(db.Model): def to_json(self): item = self.__dict__ if "_sa_instance_state" in item: del item["_sa_instance_state"] return item
0
22e72752d7d356e010555bd37200c1fc
b571a7e8eab8ba4211658296ddfae315
Returns the meta object for class '{@link dC.StateMachine <em>State Machine</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getUCApplication_State_machine();
0
70a194a66b2bcb5fb3d18597f0431e41
26fe123923afb019508dc86aea04368b
Read and preprocess VP data between datetimes.
def preprocess(filename): zf = ZipFile(ZIP_FILE_NAME) df = pd.read_csv(zf.open(filename)) zf.close() if 'datum' in df.columns: df.rename(columns={'datum': 'date'}, inplace=True) df['date'] = pd.to_datetime(df['date']) df.set_index(['geoRegion', 'date'], inplace=True) df.drop('FL', ax...
0
ed0f7cfb04a1488198857620a668e640
1334fa50c1a1c17bd08204e50bd2462c
根据歌曲名下载对应的歌曲
def download_music(word): global music_choose_list global music_info_dict try: url_search = 'https://c.y.qq.com/soso/fcgi-bin/client_search_cp?&t=0&aggr=1&cr=1&catZhida=1&lossless=0&flag_qc=0&p=1&n=20&w=' search_result = requests.get(url_search + word).text music_info = json.loads(se...
1
3abefd6022ba1a220f17e3ce2c5e4166
ebacb99d0f0a5615f72a46182e375438
특정 데이터를 삭제 할 경우, pk값을 이용하므로 조회와 유사한 작업을 한다 / 몇건의 데이터가 삭제하는 지를 반환하므로 int
class HelloAPIView(APIView): def delete(self, request, pk=None): return Response({'method':'delte'})
0
6732e124e9b68a64a59159e79ee20a81
25ac90397c6063b6b9c1dd3667ffd893
检查是否允许变形
allowableRotate(arr, currentShape) { let beforeChange = currentShape.arr; let afterChange = currentShape.afterRotateArr(); console.log(beforeChange); console.log(afterChange); for (let i = 0; i < afterChange.length; i++) { for (let j = 0; j < afterChange[0].length; j++) { console.log...
1
4428d467f2e1bb4d76208662fb71657f
3078c2e41fd6bfe08db06019d86fc25f
Creates native objects and attaches them to the underlying request adapter object. Always called on executor thread.
public void preMakeNative(MakeNativeLifecycleEvent event);
0
23734afcef4df949157d907ab46413ba
408ee10988893ba710183bbb71e0a45f
Updates the properties of items in the scene. This is where the game logic is applied.
namespace finalProject public class ActionScene : GameScene public override void Update(GameTime gameTime) { base.Update(gameTime); }
0
c45d71fe8051bd219a42c4a96cb80904
9e7526737538f590eaab26d1fcb5c165
[Min] 以原 context 为 parent,加入 metadata 返回一个新的 context
class Context(object): def _with_span(self, span): return self.__class__( trace_id=span.trace_id, span_id=span.span_id, meta=self._meta, metrics=self._metrics, lock=self._lock )
0
d5e42522a4ed19a82f7dbcafbf56a306
df340ff5b0187d742c18db9b8d42a9fc
n个整数冒泡升序排序
func bubbleSort() { var n int for { fmt.Scanln(&n) arr := make([]int, n) for i := 0; i < n; i++ { fmt.Scanf("%d", &arr[i]) } res := stable_sort.BubbleSort(arr) fmt.Println(res) } }
1
ca43742c5bcf9a3ff96f3f097665b018
793426f7e0d1ac0b2d0a107d9df82ba4
针对notify_url验证消息是否是财付通发出的合法消息
String partner = PropertiesUtil.getContexrtParam("alipay.partner"); AssertUtil.isTrue(StringUtils.isNotBlank(partner), "参数【alipay.partner】未配置"); String veryfy_url = HTTPS_VERIFY_URL + "partner=" + partner + "&notify_id=" + notify_id; return _checkUrl(veryfy_url); }
0
d901145b4d257e414c0bf4b024241802
fda2f5159111a8f48791aa83c00fc4c0
Check the means of the uncertainty distributions
sl, sr = hep_spt.wilson_unc(0, 1) assert sl == 0. sl, sr = hep_spt.wilson_unc(1, 1) assert sr == 0. sl, sr = hep_spt.wilson_unc(1, 2) assert np.isclose(sl, sr) sl, sr = hep_spt.wilson_unc([0, 1, 1], [1, 1, 2]) assert sl[0] == 0. and sr[1] == 0. and np.isclose(sl[2], sr[2])
1
82568fd0315a0e21faf7ff37c252c1d6
a99f7d87ff75d9e519c8b8a75f0371c9
This routine is used when a node is being deleted. The link to its descendant is broken by pulling the descendant in to overlay the existing link.
IXML_Node *nodeptr) { IXML_Node *parentNode = nodeptr->parentNode; IXML_Node *nextptr = nodeptr->nextSibling; while (nextptr != NULL) { nextptr->parentNode = parentNode; nextptr = nextptr->nextSibling; } }
0
87f00aa3556af468f5bcb9b9f865add8
f4aa81d742ab60dd4e7f096ffb786e64
根据工作任务列表的标识查询工作任务列表信息
List<WorkTaskList> findByCodeList(List<String> codeList);
1
bb07b8d7ba923a95291b5eae57daaab4
b5a18836c0fadc049282bcb7fd0611d6
交换表中的两列,需要遍历每一行,然后交换每一个元素。因为没有表列对象 add by wanglei 2008-08-01
public class Ncode extends AsynchronousLayer public synchronized void Permut_col(int[][] B, int col1, int col2, int L) { int tmpd; if (col1!=col2) { Pkt_ID id = (Pkt_ID) varList.elementAt(col1); varList.set(col1, varList.elementAt(col2)); varList.set(col2, id); for(int l = 0; l < L; l++){ tmpd = B[l...
1
408f3e07781877cadef9b078954dccf0
9b4058d396754b4f3d6a7e23c7bd81e2
Returns the value of the radio option at the given index.
class RadioButtonSet extends ChoiceGroup int getID(int index) { return ids[index]; }
0
bbcc5d1bfb83a2db6d3b03dba1910751
6df7e0489431881f235b2f0fbc3e6816
Test the property promotedArticles
NodeType::create([ 'name' => 'article', 'type' => 'article', ])->save(); $this->container->get('router.builder')->rebuild(); $promoted_nodes = []; for ($i = 0; $i < 8; $i++) { $promoted = ($i % 2 === 0); $node = Node::create([ 'type' => 'article', 'title' => $...
1
6b3ebeb3e27d15b55a7fb3cbbdb89472
4dceffab65abb4d9ca245088bd9f22ec
A function that takes a vector of values. Calculates the reciprocal of each value and returns a diagonalised matrix of these reciprocals. Zero values remain zero.
for (int i = 0; i < matrix->num_rows; i++){ int num_nonzero = 0; for (int j = 0; j < matrix->num_cols; j++) if (matrix->vals[i][j]) num_nonzero++; for (int j = 0; j < matrix->num_cols; j++) matrix->vals[i][j] /= num_nonzero; } }
0
8f88d05dfbb070d40f90bdeb3f45e654
a8369ad661295852ae1d75175ba2589d
Write a tweet streaming API message to the mock stream
return given().auth().oauth(this.apiKey, this.apiSecretKey, this.accessToken, this.accessTokenSecret) .param("status", tweet) .when().post(this.baseUrl + this.CREATE_TWEET_ENDPOINT + "8923") .then(); }
0
8c63bf774b70635ae8c3829400a553ce
d9a0f3aa5b10f2707e0a93fac6fc23b1
Disables the <i>Swipe to Dismiss</i> feature for this list.
class Alerter private constructor() fun enableSwipeToDismiss(): Alerter { alert?.enableSwipeToDismiss() return this }
0
f179930ae74c4457487ebd9ace4dadeb
2eb3f1abc667a8be217ed1f81db70baf
should throw when the owner attempts to withdraw a connector token while the converter is active
converter_address = self.setup_converter( self.token_address, self.registry_address, 0, ZERO_SCORE_ADDRESS, 0) token_address = icx_call(self, self.keys[0].address, converter_address, 'getToken', {}) self.assertEqual(self.token_address, token_address) registry_address = icx_ca...
0
cbb1091824ef401f8b5e123139a637ac
6a98977de7c99da0492e674770f6a70f
Change the location of the keys on the container based on its new co-ordinates.
public class Container extends FocusableComponent @Override public void handleKey (Context context, int scancode) { int posy=renderer.getOffset(); for (Component component: components) { Context subContext=new Context(context,renderer.getBorder(),posy,hasFocus(context)); component.handleKey(subContext,scanco...
0
ead64da2ae126bc59a46c3f6ff1ab7eb
16bb4e9892484c76c534ccd0c61eecb2
设置地图是否可以通过手势进行旋转, 默认为true
let methodName = "setMapZoomGesturesEnabled" let paramsTypeStr = [this.BOOLEAN]; let paramsStr = [enabled]; await this.invokeByParam(methodName, paramsTypeStr, paramsStr, this.VOID); }
0
954ae8ad552338b28ba33bcb4d1d09f6
813596a4e68d9b36b26b907bdc0217b0
BigDecimal的除法运算封装,如果除数或者被除数为0,返回默认值 默认返回小数位后2位,用于金额计算
public class MathCalcUtils public static <T extends Number> BigDecimal div(T b1, T b2, BigDecimal defaultValue){ if( null == b1 || null == b2){ return defaultValue; } try{ return BigDecimal.valueOf(b1.doubleValue()).divide(BigDecimal.valueOf(b2.doubleValue()), 2, BigDecim...
1
4f1666024ebccce4c6b7c9b393faa930
fc5d3375a34052dbd0bd6430fd8925c6
Returns the most-recent observation for this tag, or None.
class ContextManager(): def lasttag(self): try: return self._lasttags[-1][-1][1] except IndexError: pass
0
4df3a3278bd05d2b3abf5647d0045f07
b2c5efda2d2e0b0a1113ce4367186ddd
Проверяет, может ли пользователь редактировать сообщение.
public function CanEdit($message = null);
1
fbbcaba6ee29b27158fc03b03c230858
df751c2f2c38ac37e7f86a9076e5b5c1
Function for specificity score.
def image_specificity(descriptions, vectorizer, analyzer, model): similarities = [sentence_similarity(sent1, sent2, vectorizer, analyzer, model) for sent1, sent2 in combinations(descriptions, 2)] specificity = nanmean(similarities) return specificity
1
2ebe8c91839c79bb883b6e30d1419ee9
d67e96e786854d0845222c4df7e38351
Updates the search highlights.
if (searchRequest.isHighlight()) { solrQuery.setHighlight(searchRequest.isHighlight()); solrQuery.setHighlightSnippets(NUM_HL_SNIPPETS); solrQuery.setHighlightFragsize(FRAGMENT_SIZE); for (NameUsageSearchRequest.QueryField hlField : searchRequest.getHighlightFields()) { solrQuery.add...
1
46b2469c55ad14172072fcb6f9dbdd79
301f119b788426b325253f84cd6d89ae
Set low priority.
public class ThirdPresenter @FXML void lowPriorityClick() { priorityValue = "low"; priorityMenuButton.setText("Low"); }
1
b88edc15f838e030c3d97f21ec2ecb20
21b1eaa9458f8a2a15c055050eae6702
获取老师请假列表
interface LeaveService fun getLeaveFromTeacher(teacherId: Long): List<Leave>
1
46a835eadad911bdafe5ef3c66991c9f
6ac79a6903f4f979f3fec1ae78670680
転置行列を取得します。
private Matrix3x3 Transpose() { Matrix3x3 output = new Matrix3x3(); output.m00 = m00; output.m01 = m10; output.m02 = m20; output.m10 = m01; output.m11 = m11; output.m12 = m21; output.m20 = m02; output.m21 = m12; output.m22 = m22; return output; }
1
24ed50bf8b5a602fab52a3902b3227f0
743ad281a72c951d2a7c5a88b140d546
Calculate streamline-based connectivity matrices using DSI Studio. DSI Studio has a deterministic tractography algorithm that can be used to estimate pairwise regional connectivity. It calculates multiple connectivity measures. Inputs fibgz A DSI Studio fib file produced by DSI Studio reconstruction. Outputs matfile A ...
inputnode = pe.Node( niu.IdentityInterface(fields=['in_file', 'in_mask']), name='inputnode') outputnode = pe.Node( niu.IdentityInterface(fields=['out_file']), name='outputnode') fugue = pe.Node( fsl.FUGUE( save_fmap=True, despike_2dfilter=True, despike_threshold=2.1), ...
0
af5c10f23d24fc9cce5922a2ff2597b8
2686beacaab8d7ec69d771733ccb3282
上传设备报警信息
try { passRecordDao.insertAlarm(passRecordEntity); } catch (Exception e) { logger.error("提交数据出错", e); return; } switch (EgciController.equipmentMaps.get(passRecordEntity.getPassRecordEquipmentIp()).getEquipmentPermission()) { case 1: ...
1
6e3a5c33d0a7065dee2ce7ea2a5182a8
19c8f0f71011ab8f90791075e95976c9
Same thing as above but is hard coded to send a message to its self.
def send_msg_self(): bot.self.send('Hello World!')
1
813720984c762166088be8ff4b13694a
0c9b6cc1812d3293bf4c83a54ee56594
Atualiza um pais no banco de dados. Nesta versão, espera um DTO para atualizar.
public void updateCountries(CountryDTO countryDTO)throws EOTException;
1