query_id
string
corpus_id
string
query
string
code
string
label
int64
84e8e29d1543f6a023ed6c9291e90ecd
1deecdfb28e1f4fc45515a11bf332e8c
Deze methode voegt een Scheduled Downtime toe aan de databank.
class BusDriverSchedule function addNewSchedule($_date,$_timeOfDay,$_busDriverID,$_status){ $this->db->insertNewSchedule($_date,$_timeOfDay,$_busDriverID,$_status); }
0
65cb59e2bf9dc452c4ea740a90d960f9
8b63a63cb3ee53d0bf44dfc35ab69240
Return the numeric identifier for the proposition.
public class ProportionSymbol extends Symbol public int propId() { return _propId; }
1
c1cca2c7d59933a378b63c5859a4d840
d5d478018e0868fb154303909798294a
StreamVideoViewの状態を利用可能状態に変更する. <p>画面遷移を伴うケースでStreamVideoViewを再利用する場合は、画面復帰時に本メソッドをコールすること</p>
void setViewStatus();
1
52828de0dfc9fc5fb8a82ef963360977
a405e288eb709f38b6e04d75f47374ff
Scrapes the web version of the current tweet returning formatted retweet text
def embed_tweet(tweet_id,tweet_handle): response = consumer.embed("https://twitter.com/"+tweet_handle+"/status/" + str(tweet_id)) html_tweet = response["html"] return html_tweet
0
5d578b97bfbe7f83ebafe9479b9af51d
8ac07f5a2ee6c4c33c99a61d8cdfa051
Initializes the type of the Parameter or Column object. This method will resolve any dependencies necessary depending on whether the object is typed as a user defined type or predefined data type.
public void initializeTypeDefinition(AlfTypeDesc typeDesc);
1
5ffb93335f3d56dcff49e118dbcc28fc
9c41a20e6061a2020a38d560720affe9
Get the booking update service
public function getUpdateService() { if (null == $this->updateService) { $this->setUpdateService( new EntityUpdateService($this->getNewEntity()) ); } return $this->updateService; }
1
3ade642fd31ebe3b3e8a4c88fa6b9221
1fac8b8ff48f86e696f582a8efc7263b
Gets arguments to be passed to the command line. http://wiki.videolan.org/VLC_command-line_help
class _Command(six.with_metaclass(abc.ABCMeta, object)): def GetArgs(self, descriptor, app_dir, staging_dir): return [self.GetPath(), descriptor, app_dir, staging_dir]
1
3b91787215be666da8dbf60703475d60
185ce9790810aeb17f47d11aecbe7abc
metoda sprawdza czy podano prawidłowe hasło
File file = new File("C:\\Users\\Laptop\\Nina\\Fakultet\\Master\\SEP\\Projekat\\SEP\\SEP\\NC\\src\\main\\resources\\passwords.txt"); BufferedReader br = null; try { br = new BufferedReader(new FileReader(file)); String st; while ((st = br.readLine()) != null) { System.out.println(st); if(st.equal...
1
d909b024eb3cc715836540bfc5f1d6b7
6ff45fdb370cb60752a3bfd5393a9b10
Create an instance of {@link BatchResponseMsg }
class RowInBatchWriteRowResponse extends \ProtobufMessage public function __construct() { $this->reset(); }
0
c8863a7f49641b6933b11b1706bc58da
43828522eb82d9473215860a83746f39
判断text串中是否包含pattern串
{ int status; regmatch_t pmatch[1]; int cflags = REG_EXTENDED; const size_t nmatch = 1; regex_t reg; const char *pattern = match_pattern; regcomp(&reg, pattern, cflags); status = regexec(&reg, match_text, nmatch, pmatch, 0); regfree(&reg); return status == 0 ? 0 : 1; }
1
f1c8eb64fcf355e34bfe553e1a4f0ef0
be485e066d498701c16b12c14cd1d58b
保存/更新租户菜单
public JsonResult SaveMenu(List<CheckBoxListInfo> data, string userName) { MSGReturnModel result = SystemForITRepository.saveMenu(data, userName); return Json(result); }
1
cffc6b060280bfc4a4a513fd8e39dc6c
d71275ac032239d6539ed2e9c5efb3d7
Container for channel objects
class ChannelManager: def __init__(self): self._channels = {}
1
73a6eba11a15ac0b4dd823f85947db67
4e8fe631a35a6ccfb78e8f6e6f86fc23
检查监视点是否变化
WP * temp = head; bool stop = false; bool success = false; while(temp) { uint32_t cur_val = expr(temp->expr, &success); Assert(success, "创建的时候应该就进行过判断,不应该会出错"); if (success && cur_val != temp->prev_value) { temp->prev_value = cur_val; stop = true; printf("watchpoint No.%d value cha...
1
94c3ffd8b3b777a1e02c8d82021231ef
688fcdab3c333d7addf1263685a5d6db
防抖实现 指触发事件后在 n 秒内函数只能执行一次,如果在 n 秒内又触发了事件,则会重新计算函数执行时间
function debounce(fn, wait) { let timer = null return function () { let context = this, args = arguments if (timer) { clearTimeout(timer) timer = null } timer = setTimeout(() => { fn.apply(context, args) }, wait) } }
1
fbaddad73aba41754e23c2d122244520
ec0dc7a566f7195410a0f341d289588d
A trigger for an ocean being placed
local player = CastToPlayer( trigger_entity ) local team = player:GetTeamId() if team == 2 then player:SetLocation(entity:GetId(), "Blue Bunker", Team.kBlue) end if team == 3 then player:SetLocation(entity:GetId(), "Red Bunker", Team.kRed) end player:AddAmmo( Ammo.kNails, 5 ) player:AddAmmo( Ammo.kShells, 5...
0
fc08ecc82d55debe7db9ead0a2dc2441
9c6c3df024ac17aba4ea58fc82d9bf92
Gets the contact location.
namespace M4PL.DataAccess.Vendor public class VendDcLocationContactCommands : BaseCommands<VendDcLocationContact> public static VendDcLocationContact Get(ActiveUser activeUser, long id) { return Get(activeUser, id, StoredProceduresConstant.GetVendDcLocationContact); }
1
65ba7913513e738b7f4b016dcc708f9c
3d079b367ea9011ba39cb3147959251e
Compute the coordinates of inner and outer equatorial points and high point based on plasma geometrical parameters.
Rbo = self.get_Rbo() hssp = pi / self.Zs alpha = arcsin(self.W0 / (2 * Rbo)) Harc = float(Rbo * (1 - cos(alpha))) Z1 = Rbo * exp(-1j * alpha) if self.is_outwards(): R1 = Rbo - Harc + self.H0 + self.H1 Z2 = Z1 + self.H0 else: R1 = Rbo - Harc - self.H0 - self.H1 ...
1
e527325def50a2468b9d0ffd934a61ec
92bdaebaad6a6ff96d8ad0ebca855655
Build JSON for Brewery Page
class BreweryController extends Controller public function index(Request $request) { $brewery = $this->brewery->getBreweries($request); $beer_types = BeerType::getMap(); return view('brewery.index')->with(compact('brewery', 'beer_types')); }
0
ea2d9ef657decc8fcbba94b7e1641adf
2e979bf69d41ffd259038dd5de960c3f
마지막 변경 시각으로부터 지금까지 흐른 시간을 초 단위로. Time elapsed from the last change to the present in seconds
public class CalendarView extends JPanel public long getTimeChanged() { return _lastChanged; }
0
6c5314911b13ffd028cba9dc4a321b23
89480696af6a46d4d13cf0e9760f81d3
Retrieve patients who have any of these names: Katie, Kevin, Rick.
try { if("".equals(firstName)) firstName = "%"; if("".equals(lastName)) lastName = "%"; return patientDAO.searchForPatientsWithName(firstName, lastName); } catch (DBException e) { return null; } }
0
4085d145f215a9ae621fe068d98b3215
1b577b9d5fe92077f4cdb07d49fdec5c
This method returns an array of rectangles of last detected objects.
class Tracking(): def getRectangles(self): return self.trackedRectangles
1
f32ca1eda019924bb83345055ce6bbce
fbd8f7086287258f3d1216be41694a39
Helper method to validate the graph of a model with static LSTM.
model_dir = tempfile.mkdtemp() saver.save(sess, model_dir) tf.reset_default_graph() x, prediction, output_class = self.buildModel(lstm_layer, is_dynamic_rnn) new_sess = tf.compat.v1.Session(config=CONFIG) saver = tf.train.Saver() saver.restore(new_sess, model_dir) return x, prediction, o...
0
b48956a597698f966cc26fcbaba9ccc3
91e24862e0c751edb0c2ad59f04a5cc2
получить расписание по фильтру
function getLesson(day, timeStart, hall, filter){ for (const group of groups) { if (!groupIsVisible(group, filter)) { continue } for (const time of group.times){ if( day.short.toLowerCase()==time.day && timeStart.slice(0,2)==time.start...
1
bae03e5209bc6957f963c61be661fdbd
21fe80d95e938edadee464ec0350d7dd
The ID of the interconnect or LAG.
class GetInterconnectResult: def google_reference_id(self) -> str: return pulumi.get(self, "google_reference_id")
1
219abc4024824922fea434cb3e4b6edf
28ff8b440764f22605a5b4785e11e2fb
会员之前购买的数量
$user=session('user'); $user_id=$user['id']; $where=[ ["goods_id","=",$goods_id], ["user_id","=",$user_id], ["is_del","=",1] ]; $buy_number=Cart::where($where)->value("buy_number"); return $buy_number; }
1
49f5ab09600ddcfbdef280b36db0bb75
3e34ec3b05660391d25cf750d4442dbb
Test the Jacobian of the from_rotation_matrix function.
Sophus::SE3d pose = Sophus::SE3d::exp(Sophus::Vector6d::Random()); Sophus::Matrix6d Ja; Ja.setIdentity(); Ja.topRightCorner<3, 3>() = Sophus::SO3d::hat(pose.translation()); Sophus::Vector6d x0; x0.setZero(); test_jacobian( "inc test", Ja, [&](const Sophus::Vector6d &x) { Sophus::SE3d p...
0
9b8672268f16bdb2567764777413c47c
d3ea12ad471556bc7a595e169ddfb663
get the nutrient list by input keyword and display
const [keyword, setKeyword] = useState(""); return ( <ScrollView styles={styles.container2}> <Text style={{ marginTop: 15, marginBottom: 10, marginLeft: 20, fontSize: 28, textAlign: "left", marginHorizontal: 15, color: "black", ...
0
bb70d11eed5edf67899f7c3ae3dfef7c
6dacba6f5744d6ef3f0499d3e7a2bf59
Windows修复斜杠
win_path = { 'aoeu/aoeu': 'aoeu/aoeu', 'aoeu\\aoeu': 'aoeu\\aoeu', 'aoeu / aoeu ': 'aoeu/aoeu', 'aoeu \\aoeu ': 'aoeu\\aoeu', 'aoeu./aoeu.\\aoeu.': 'aoeu/aoeu\\aoeu', } for test in win_path: result = pathscrub(test, ...
1
6b7c806a9c9684940bd37313523ee6a3
b55b2e1d8a83009cddf1b65570c34ec4
Метод возвращает количество сообщений в книге
class BookShelf() : Aggregate fun getLength(): Int { return this.books.size }
0
9d2742e7823e2b014f51a65b376d745e
fdd87caac5ca4c18b30a42830180c591
This should return the minimal set of attributes required to create a valid PnCrossReference. As you add validations to PnCrossReference, be sure to update the return value of this method accordingly.
def valid_attributes { "new_and_returning_member_progress_id" => "1" } end
0
7895b63690e51d74a146c0d853daee3e
585b3792dfce80ecf08cf258a18676b4
try to read incoming serial print and store it in self._data_holder.
class QtSerialWinch(object): def read_input(self): data = self._port.readAll() if len(data) > 0: self.data_received(data) return
0
8868f3a1ec1b1b1a394f6387206ff033
075c0f82455d98e3510c5de953843ef1
Returns the meta object for the attribute '{@link fr.diverse.moda.model.moda.MODARelation#getName <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EAttribute getRelacion_Nombre();
1
20ed0c659ec7b08da6645bd81b0d0608
0c29702df27c9b337efad368d9b3f338
Find N-th power of the element with index N.
def index_power(array: list, n: int) -> int: if n > len(array)-1: return -1 return pow(array[n],n)
1
989927be0608a676611a61d712a71e19
8ebadbba50afa5313705c39c80dec174
When search is triggered, broadcast changes to this property. Setter on the property takes care of the rest.
export class Search implements ControlValueAccessor onSearch(search: string) { this.value = search; this.emitChangeEvent(); }
1
76c96d2aa2595c78ae21dd13fc9331a1
e5cbadaecf7bf54c32a5297852545b08
Saves specified collection as JSON contents in a data file.
{ bool status = false; try { if (collection != null) { string filename = @$"{_path}\{_file}.json"; using (StreamWriter file = File.CreateText(filename)) { JsonS...
1
da258b37f1e2b35c93c2d60d35171f6b
251fe58e20c54f912f29def219cbabc0
タイマーによる配達記録の表示の更新
namespace DD.DebugTools public partial class DeliveryView : UserControl private void timer1_Tick (object sender, EventArgs e) { if (wld != null) { textBox1.SuspendLayout (); var po = wld.PostOffice; foreach (var rec in po.DeliveryRecords) { ...
1
edc353413333ce00d5469179ac1d8528
38e871a813e847ad40875167571d2a94
发送信息到主窗口
function sendUpdateMessage(text) { mainWindow.webContents.send('message', text) }
1
303e06376c74da4e470764b2dafbbdb3
1647db4e60a6917d90eea8232c84dab4
修改设备编号
@Transactional @Service("deviceGroupService") public class DeviceGroupServiceImpl implements DeviceGroupService{ @Override public void changeDeviceGroupNum(String device_num, String device_group_num,String login_user) { deviceGroupDao.changeDeviceGroupNum(device_num, device_group_num); }
0
da378ddf3a66730fdbc75b92d191e198
56232cca65548cfc1d5792ef5d35d74e
Write 16-bit data to display
void display_write_data (BYTE data) { DISPLAY_REGISTER_SELECT(1); DISPLAY_WRITE_DATA(data); DISPLAY_RW_ACCESS_DELAY(); DISPLAY_WR(0); DISPLAY_RW_ACCESS_DELAY(); DISPLAY_WR(1); }
0
eaa123707120435fe83fd6947c0ae910
8b3c145b944a2fc0d065a9b6d8b5a7a0
获取促销渠道
@Controller @RequestMapping("statisticschannel") public class StatisticsChannelController extends AbstractController private List<PromotionChannel> getPromotionChannels(HttpSession session) throws BizException { Muser user = (Muser) session.getAttribute(AppConstant.SESSION_MUSER); String muserName = null; int rol...
1
29e8dafaecf6f7c75904a2196dfa75d8
aeef33983b6ce24a925c63822bb05c54
Interface to the linear fit method mixed layer depth computation.
double multimed_r_nlay (ex,mm,X,Y,Z) Exterior ex; mm_np mm; double X, Y, Z; { int i, it=0; double beta1, beta2[32], beta3, r, rbeta, rdiff, rq, mmf; double ocf=1.0; if (mm.n1==1 && mm.nlay == 1 && mm.n2[0]==1 && mm.n3==1) return (1.0); if (mm.lut) { for (i=0; i<n_img; i++) if (Ex[i].x0 == ex.x...
0
cac2969c41043e74d44efec0bdef73e0
6b547b2c513c2f3c7ca736ca91e66686
Returns the parse tree which covers the given position or undefined if none could be found.
public class AcceleoSourceContent public ASTNode getASTNodeWithoutImportsExtends(int posBegin, int posEnd) { if (posBegin > -1) { org.eclipse.acceleo.model.mtl.Module vAST = getAST(); if (vAST != null) { ASTNode candidate = null; ASTNode childrenCandidate = getChildrenCandidate(vAST, posBegin, posE...
1
f33dbcca947797e7a49ba777dd1950a5
7b19653463907d45fa59e5493122acb5
removes the currently selected folder from the dropdown list
row = self.fileOrFolderList.currentRow() itm = self.fileOrFolderList.takeItem(row) del itm row = self.fileOrFolderList.currentRow() self.on_fileOrFolderList_currentRowChanged(row)
1
a7fa982d4f7fac8aaa9f5d22ecf8fa10
7312cb05f17961add4706be9d6401e8d
记事本程序
namespace NotePad static class Program [STAThread] static void Main() { FT.Windows.Forms.AppicationHelper.BeforeStart(); FT.Windows.Forms.AppicationHelper.StartLimitTimes("keywords" , NotePad.Properties.Resources.bg , 8, "15814584509", false,typeof...
1
feb06e53f6c0b898227bcd777199c341
52dc57e129c0579633e6dc64339e140a
Возвращает игры, которые должны показать юзеру в рекламном попапе (GamesAdPopup.js).
namespace Vk.CSharp.Sdk.Home IAds GetAds();
0
73db802e8b31149b5514a6fdb880675f
f344c6b94028926c5f228ce890fb6826
Iš duoto duomenų masyvo sukuria atributus deklaruojantį tekstą HTML elementui. (pavadinimas="vertė")
if (typeof selector !== 'string') { console.error('ERROR: selektorius turi būti tekstinio tipo.'); return false; } if (typeof selector == '') { console.error('ERROR: selektorius negali būti tuščias tekstas.'); return false; } const DOM = document.querySelector(selecto...
0
e16103cb94759df8d8b216a35a05bfdf
fd934a3bb2c9b6070a1a869ecb668b6b
根据经纬度、距离查询附近视频
public UserIndexDto serachByGeo(String lng , String lat, String distance);
0
bf37a34d2ebc06c2f57ac429879d9cb2
ecb01f632fb8a7ee758771e6cf5772b3
This function takes in the name of two artists, get the appleid of the two artists and then using the iTunes API to gather all the album info of these artists and save to two different file. This functions does not return anything This function uses what the starter code provided
id1 = apple_api_id_scraper(artist1) apple_api_full_scraper(id1, filename_to_save = fname1) id2 = apple_api_id_scraper(artist2) apple_api_full_scraper(id2, filename_to_save = fname2)
1
05b4a9d81fc2e98845da05da6c2796cd
76ed9da7fd52db8cb317c01e52747c91
创建章节(不会重复创建),返回章节号sid
public static function createSection(array $params = []):?int;
1
3cf5a797de8cd55a16332d2af2537fd0
6df382daed0e628e7307cf4a38f08793
Denna funktion får IP och port. Försöker att connecta och vid sucess: sätter igång en funktion startRecieverThread. Om inte: return "no connection"
class SocketHandler: def connect(self,ip, port): try: self.clientSocket.connect((ip,int(port))) self.startReceiverThread() except: return "no connection"
1
371afe35253c9ae0e615fd47cc85ab24
c2001d09ec46dc0e77e98c84fb93e7d3
Retorna una lista con todos los elementos que estan siendo tocados por el jugador
public final class PresentacioCtrl public Object[] getElementsDeControlPartida() { return PartidaCtrl.getInstancia().getElementsDeControlPartida(); }
0
0c708e8bedf3c7658feb75358b9edbe9
5fa7d0aca4cde82f114efef6da594f2b
Copy an ellpack matrix. \ingroup copy_group
const char *funcname = "CSMatrixC_copy"; nza = _aa.nza; nzatot = _aa.nzatot; a = new dcmplx [nza]; if (!a) MemoryFail (funcname); for (int i=0;i<nza;i++) { a[i] = _aa.a[i]; }; }
1
2fb685f657c5e463ef6bd74a29cd8699
b36cae90ccb73a02ccfd827e2d60f3e1
{@link jp.ossc.nimbus.service.context.Context Context}サービスに設定するサービスを取得する。<p>
public final class WF public static ServiceContext getServiceContext() { return services; }
0
90396fdc04d75b4bcbc1ff8924828166
3bd473c075696afbddc79a2d3940a19f
Returns the named chained parameter
namespace ZeldaOracle.Common.Conscripts.Commands public class CommandParam public CommandParam GetNamedParam(string name) { for (CommandParam child = namedChildren; child != null; child = child.nextParam) { if (string.Compare(child.name, name, true) == 0) return child; } return null; }
1
1e8a9c0e829e70b0738768d9a0a9cc9c
bd850a1969fab9b551d5f0e370c32920
获取下一楼层的id
using (DaoTransactionScope ts = new DaoTransactionScope()) { DLDepartment dl = new DLDepartment(); string result = dl.GetNextLevelId(companyid, depid); ts.Complete(); return result; } }
1
68f4f179842c3ce5169046852b63fd2a
596de020258a7c4a5d4a25d85eb546c6
Get the URL to the house list on Tibia.com with the specified filters.
if type(num_rooms) != str: num_rooms = str(num_rooms) city, state = location base = "https://www.airbnb.com/s/homes?tab_id=all_tab&refinement_paths%5B%5D=%2Fhomes&query=" query = f"{city}%2C%20{state}&checkin={checkin}&checkout={checkout}&adults={num_rooms}&source=structure...
0
75a7b73ed0df493caec27bb34caa0506
12e4e29d04b9d82c60b6aee1eb7e616a
删除一个 ReactiveX 订阅
removeSub(sub) { var index = this.subs.indexOf(sub); if(index != -1) { this.subs.splice(index, 1); } }
1
ab9032cbfa271c5c07d9bed71fd5eb50
01b2e4481924594a19576395605b8601
Sets the value of the extended attribute. <p> The value is not checkd against the {@link #getInstanceType()}. It is the responsibility of the {@link DeployValidatorService} to do so. the new attribute value.
interface ExtendedAttribute @Throws(ServerException::class) fun setExtendedAttribute(path: String, attribName: String, attribValue: String)
1
5fccfd9e7f486ffe160cccffd16b7850
934d3ef1b76472ebfe93d50f1f60c70d
Getter for <code>learn.user.id</code>.
public class LearningActivityWrapper implements LearningActivity, ModelWrapper<LearningActivity> public long getUserId() { return _learningActivity.getUserId(); }
1
c61491922e4d3784a649f39d9a37ad61
a0529792d3b74f5f79999287f67176af
Transform misspelled artist names into correct artist names, returning the correct version instead. (Optional parameter of the Last.fm API)
{ if (string.IsNullOrEmpty(artist)) Console.Write("Incorrect input, try again: "); res = artist; }
0
c083074e64964f6047a8796bc6bdbbc7
f3acc5a860f2872aeac71dca3abc34dd
function to instance and create the arena
public class arena : MonoBehaviour void Start () { }
0
89ff72f2d0f5a557fcbf2a276bdcf02c
80bf97200ef513a3d1e14594da541a15
Returns the boxedTypes type that corresponds to the given unboxedTypes type
public class TypeRepositoryImpl implements ar.com.kfgodel.primitons.api.repositories.TypeRepository @Override public Optional<Class<?>> boxedFor(Class<?> unboxedType) { return findOptionalIn(unboxedToBoxedTypes, unboxedType); }
1
74fc165fb5f6d524bea997088fbfbfa7
5d2f561285d6d097e3be8a301ee5feee
Gets the mine numeral entity associated to this entity
public int getNumMines();
0
be789c93e424e43958541b1add4c14ca
1875a33844f91d059381a156eb740cb4
simulate an idling client that suddenly disconnects
class ContainerTest def test_idle_timeout_client server = ServerContainerThread.new("#{__method__}.server", {:idle_timeout => 0.1}) client_handler = Class.new(ExceptionMessagingHandler) do def initialize() @ready, @block = Queue.new, Queue.new; end attr_reader :ready, :block def on_connection_...
0
583aafb536f0939c013b3aea98f4c461
1b1899670f7cba0c4a7a8028fcff18cd
gcd(a,b) returns the greatest common divisor of the integers a and b.
func GCD(a, b *big.Int) *big.Int { x := new(big.Int) y := new(big.Int) return new(big.Int).GCD(x, y, a, b) }
1
a048c3c4fca7f0bb05ccd002fbc20a44
eb966a314d9ae9aeca49d2a8d6311c9c
Returns {@code true} if authorization consent is required, {@code false} otherwise.
boolean isConsentRequired(Service service, RegisteredService registeredService, Authentication authentication, RequestContext requestContext);
1
4e6dedb81d626b7d25ce72e2a5f8f80d
b64520077a3afeb2b74fc8439b8c3a0d
Destructor of clsImage
Image::~Image() { if ( tab != NULL ) delete []tab; dimx = 0; dimy = 0; }
1
c2a8f779aca7bb97b256e5d833385f1b
f55402f61946ad0dbe2d72192ab49e90
this class contains all api calls as functions
function Account($http) { var Account = {}; Account.updateCompany = function (updatedCompanyInfo, onSuccess, onFail) { $http({ url: '/updateAccount', method: 'POST', data: updatedCompanyInfo }) .then(function success(response) { onSuccess(response.data.result); }, function fail(respons...
1
254a6be05d9132c0179c48a49a36a92f
fe3aa3085f7299918424d549e4f0c726
Get the dependent variable.
class Analysis(BlockBase): def get_y(self): return self._y
1
b4e07747578574b43cbf9bd795fe3336
48e1cff22953f12438bc4ddaa5b667b5
Método para consultar los alquileres según el id del alquiler
function fetchRental($rentalId);
1
847ef5a5560c0ecba73c805ebc5a3806
1a00adf565d1feeaf29f0b095b4c6960
获取移除指定元素后的数组
export class _Array splice () { let arr = [1,2,3,4,5,6,7]; console.log(arr.splice(1,2)); console.log(arr); }
1
712f296fc5fe33d5873081d7204af4e6
a39dd67e7bc1a3abe450820d1afc90f0
返回的是每次减去的delta(w),w_k是第k步的权重,x是输入,t是目标值,由于参数是ndarray,即多笔测试数据,需要sum1
def step_1(W): R = np.array([]) for t in range(1, len(W)): R = np.append(R, ((W[t] - W[t - 1]) / W[t - 1])) return R
0
753e4c2308753963abec18a5f5e0b2c8
cc391797db9f8044e2ebc8295dd7a894
Test of set/getBuffer method, of class IOChannelReadReply.
{ strcpy(nvm->uuid,"123456789"); exosite_setCIK(validTestcik); uint8_t resp; resp = exosite_init(TEST_VENDOR, TEST_MODEL); EXPECT_EQ(EXO_STATE_NO_RESPONSE,resp); message out_msg = {0}; setMsg(&out_msg); http_parser_init(&parser, HTTP_REQUEST); const char * xoResponse = "HTTP/1.1 200 ...
0
edded924a133b9d009c95f2970f5da04
2a2cb892e0a3a207636fe45881e64e36
Reads the image names and finds which image to use. Returns: A list of paths to images, a list of classes of these images and a dict from synset to a class.
annotations = loadmat(os.path.join(self.root, self.annot_file))['groundtruth'][0] result = [] for annot in annotations: name = annot[2][0] if self.classes is not None and name not in self.classes: continue image = annot[0][0].replace('\\', '/')...
0
47c4fe8bc4516531aca15fd4fedecb83
33050bfaf43d97a4c1ab3af09b838066
Interpolate a function, assumed to have been given at the original radial grid points used to construct the ``HankelTransform`` object onto the grid required of use in the QDHT algorithm. If the the ``HankelTransform`` object was constructed with a (say) equally-spaced grid in radius, then it needs the function to tran...
from scipy.interpolate import CloughTocher2DInterpolator as ct2d types={'1':[3],'2':[4, 5],'3':[6, 7, 8],'4':[9, 10, 11, 12]} if how in types: checkint = types[how] else: print("no key...") arr = np.genfromtxt("KeplerLDlaws.txt",skip_header=2) FeHarr=np.unique(arr[:, 2]) if n...
0
231a086102c117f1cee64eb8d51fb42b
c45b901c60d4acc78f38376aab8a5abd
右匹配,从文本最后一个字符开始往前都与关键字字符相匹配,则返回true
boolean result = false; for (int i = 0; i < txt.length(); i++) { int matchFlag = checkKeyword(txt, i, matchType); if (matchFlag > 0) { result = true; } } return result; }
0
fe665f1f1093e78d3ac6a4b5376580c2
c29b7048847668da27d41200d419eaad
Gets a list of students score and outputs the highest score in the class
def start(): n = input() scores = [] for x in range(0, n): name = raw_input() scores.append([float(raw_input()), name]) scores = sorted(scores) lowest = scores[0][0] for i in range(1, len(scores)): if (lowest != scores[i][0]): second_lowest = scores[i][0] break for i in range(0, len(scores)): if (s...
0
d0dd3a8d83b280024ec6260987f05f7b
bd3acc32d7ffec73be09edf11a78f311
Save the actual primary key of the base content type object along the index row. We need those later to filter a queryset.
if not hasattr(obj, '_history_pks'): obj._history_pks = list( obj.history.all().values_list('history_id', flat=True)) if not hasattr(obj, '_children_pks'): obj._children_pks = [ child_pk for child_pk, _ in obj._child_pks_and_is_page] if not...
0
70242501143fe30f319f4522a6cf2f8d
696bee892486a9cee80e45271a165e60
Hace una busqueda del lado del servidor.
class Serverinf: def passive_search_order_headers(self): with open(self.srv_dir, "r") as sjson: srv_json = loads(sjson.read()) s=Session() headers={} headers['User-agent']=self.user_agent s.mount(self.site, HTTPAdapter(max_retries=2)) response=s.head(self.site...
1
15ca1d362f5a9f0c641bc67cc59c0199
6ba250c7d431d6960dbfdfa8bebec0a0
<p> Tests the setSubtype and getSubtype methods. It verifies that the field can be accessed correctly. </p>
ExpressionSubsumptionRelationship newRelationship = new ExpressionSubsumptionRelationshipImpl(UUID.randomUUID(), subTypeUuid); testExpressionSubsumptionRelationshipDAO.saveRelationship(newRelationship); assertEquals("Two supertypes for subtype must be returned", 2, ...
0
b35c3dcf23351c3c7a691880b89fbeb2
8bf7dbbe55a8c2cbec63ec703bc5c643
Sets the value of the '{@link org.oasisopen.names.tc.opendocument.xmlns.fo.DocumentRoot#getPadding <em>Padding</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc -->
void setPadding(String value);
1
d11af2840f32f3339c3c2ac29eef8667
480e490dca342dad12f3735c0e3579ee
一覧に表示するタスクリストの切り替え(未完了 or 完了済み)
if (command == "list") { $(".project_item_full").removeClass("now"); $(".project_list_full").addClass("now"); } else if (command == "item") { $(".project_list_full").removeClass("now"); $(".project_item_full").addClass("now"); } }
0
0241f0b83dfd470bee74eebeb3892389
e847cecd82020382b383642a7a7ba6a1
Demarre ou poursuit une session.
class Session public static function start() { if(!session_id()) return session_start(); else return true; }
1
bb24ae65b4ebe17cccbdd8a63b054138
9591c4d8c77c5a61f61f6c3321cc8a12
Enter a parse tree produced by SqlBaseParser#setOperation.
if self.lexer.sym != Token.ID: return self._test() n = self._test() if n.kind == NodeType.VAR and self.lexer.sym == Token.EQUAL: self.lexer.next_token() n = Node(NodeType.SET, op1=n, op2=self._expr()) return n
1
8b8e999855640b1cc786f5e0d57770e1
0510de7d645ae08be4c12a3a3d6387f9
Returns a boolean TRUE/FALSE value based on whether the form should attach files automatically to the generated sent email.
class iDokladRequest public function isAttachement() { return $this->sendAttachement; }
1
1dfb75acd88e3208ca4c310dad30ff24
0a440f880f7e82c28b293d1fa0c3ff28
Iterates, with pauseSeconds seconds between iterations, until either the given ChangeMonitor's valueChanged method returns true, or at least maxWaitSeconds seconds have passed.
public T WaitUntilNotEqAndSet( T undesiredValue, int maxDelay, T newValue ) { WaitUntilNotEq( undesiredValue, maxDelay ); return Set( newValue ); }
0
1898d96a90045add1ad643ae28a354c9
2c316cab4af7252a32b283f28319e08d
only include fields that has value = true
func GetEnableProperties(properties []*tmodels.DynamicProperty, custField *CustomerField) { fields := map[string]*tmodels.DynamicProperty{} fieldsArr := []*tmodels.DynamicProperty{} for _, field := range custField.Properties { fields[field.Name] = field } for _, property := range properties { if property.Enabl...
1
afbbef3f47c416f6e4b6274423b5e125
67fe84a15899ea919b1e91398d06a023
activer le champ idres et desactiver les autres
document.getElementById("cout_total").style.display = 'block'; document.getElementById("box_nb_appart").style.display = 'block'; document.getElementById("box_nb_etage").style.display = 'block'; document.getElementById("box_nb_soussol").style.display = 'block'; document.getElementById("box_nb_commerc...
0
585d7e672c61caa2e499abeacaed408e
ab970ffc67ef1acc7b2cffc969c38366
Remove binary data and other unusuaed sections from a DICOM image. Extracted from https://bitbucket.org/scicomcore/dcm2slimjson/src/master/dcm2slimjson/main.py
specData = np.frombuffer(img.dcm_data[('7fe1', '1010')].value, dtype=np.single) specDataCmplx = specData[0::2] + 1j * specData[1::2] rows = img.csa_header['tags']['Rows']['items'][0] cols = img.csa_header['tags']['Columns']['items'][0] slices = img.csa_header['tags']['NumberOfFrames']['items'][0] ...
0
e80ef9c44c2b410a373b9df91dce78d7
5da98f47307001e633799cf50f71409e
Updates a card text.
class EditCardView(Window): def _change_ruletext(self): remaining_text = self._cut_boxtext(self._ruletext_textbox.toPlainText(), True) kks.update_card(self._card, remaining_text, "ruletext") self._update_card_layout()
1
6bcf831f4f96f2dc9e757d50e0b796ee
6d9cdf3332a0bcefe3a2160b3f90c7f3
更新固定语音段服务
class AsrClient(AbstractClient): def VoicePrintUpdate(self, request): try: params = request._serialize() headers = request.headers body = self.call("VoicePrintUpdate", params, headers=headers) response = json.loads(body) model = models.VoicePrintUpdate...
1
8f038d385673d0e0a111fc52a75b08ae
8dc33c1698f75e2a5e925e106d326a25
Function to generate a One Time Pad.
parser = argparse.ArgumentParser(description='Tool to compute the one time pad of a and b.') parser.add_argument('string_a', type=bytes.fromhex, help='string a - hexadecimal encoded') parser.add_argument('string_b', type=bytes.fromhex, help='string b - hexadecimal encoded') args = parser.parse_args() ...
1
74aa502b985d8d94b6d066806350fa90
0709ef221da24a45f0bb46fcb155d300
funcion para reporte de disponibilidad de papeleria
let report = new XMLHttpRequest(); let start = document.getElementById("start").value; let end = document.getElementById("end").value; let dni = document.getElementById("dni").value; let formData = new FormData(); formData.append("hora_inicio", start); formData.append("hora_fin", end); f...
0
ab84d00ff9cc02a1814a2d30b2d7ce23
cf966ddd39b6ff4c5cbb5ecd0b1e2947
Creates Simple XACML request using given attribute value.Here category, attribute ids and datatypes are taken as default values.
public class Ledger extends IndyJava.API public static CompletableFuture<String> buildAttribRequest( String submitterDid, String targetDid, String hash, String raw, String enc) throws IndyException { ParamGuard.notNullOrWhiteSpace(submitterDid, "submitterDid"); ParamGuard.notNullOrWhiteSpace(targetDi...
0
d79efb14c070bdd1722851a13d38072e
1c8f62e6940d5d34fd1a920cdad4eee3
Count money to cut.
namespace Heist public class Hacker : IRobber public int TakeHomeMoney(Bank newBank) { int moneyToTake = (newBank.CashOnHand * PercentageCut / 100); Console.WriteLine($"{Name} takes home: {moneyToTake}"); Console.WriteLine("---------------"); return moneyToTak...
1
e1012d3646df7ef0bb9b4beaf8157f4e
a85bc4c50d707e3d4080ead96ca886b2
更新项目顺序
$id = input('id/a'); $sequence = input('sequence/a'); foreach($id as $i => $rs){ $data['id'] = (int)$id[$i]; $data['sequence'] = $sequence[$i]; ProjectModel::update($data); } $this->success(lang('操作成功')); }
1
9898d2ba167f426e7aa9f4423718a759
b293a2e3cc0b15e9b02640b1581f63f6
rescale every row of array arr so that each row has unit 2-norm.
def closurez(x): if len(x.shape)==1: norm_arr = x/x.sum() else: row_sums = x.sum(axis=1) norm_arr = x / row_sums[:, np.newaxis] return norm_arr
0
77dff269c56b162786dc7e659a0dbe75
66c3cccccabc58488dae0a76cbab4a67
对象转数组
function toArray(obj) { return Array.prototype.slice.call(obj, 0); }
1
d382ea194377428d7b6ac4cc588ecb34
0dd5d1eb161911dc937663782bffa7ac
nonmember
void Hannah::printCrap(){ cout << "h=" << h << endl; cout << "this->=" << this->h << endl; cout << "(*this).h=" << (*this).h << endl; }
0
11b0fea0e43c5b3ce35021446db859ff
5ecadce267c9f3fbd79b1c35367bdc57
Gets an Iterator for the source address HashSet.
<String> itr = myHashSet.iterator();
1