store

Storing values from a loop in a function in Matlab

对着背影说爱祢 提交于 2019-12-02 05:12:25
I am writing a function in Matlab to model the length of stay in hospital of stroke patients. I am having difficulty in storing my output values. Here is my function: function [] = losdf(age, strokeType, dest) % function to mdetermine length of stay in hospitaal of stroke patients % t = time since admission (days); % age = age of patient; % strokeType = 1. Haemorhagic, 2. Cerebral Infarction, 3. TIA; % dest = 5.Death 6.Nursing Home 7. Usual Residence; alpha1 = 6.63570; beta1 = -0.03652; alpha2 = -3.06931; beta2 = 0.07153; theta0 = -8.66118; theta1 = 0.08801; mu1 = 22.10156; mu2 = 2.48820; mu3

PHP: let a file return its own directory

戏子无情 提交于 2019-12-02 04:13:20
I am having trouble finding the rigth directory on my online server. is there a function that returns the folder the file is stored in? In PHP>=5.3 use __DIR__ and before use dirname(__FILE__) http://php.net/constants.predefined http://php.net/dirname Use the magic constant __DIR__ You can read more about the magic constants here: http://php.net/manual/en/language.constants.predefined.php http://php.net/manual/en/function.getcwd.php Returns the current working directory on success, or FALSE on failure. The dirname() function will return the directory portion of a path. For example, dirname(

storage problem in R. alternative to nested loop for creating array of matrices and then multiple plots

心不动则不痛 提交于 2019-12-02 03:05:28
问题 With the following pieces of information, I can easily create an array of matrices b0=data.frame(b0_1=c(11.41,11.36),b0_2=c(8.767,6.950)) b1=data.frame(b1_1=c(0.8539,0.9565),b1_2=c(-0.03179,0.06752)) b2=data.frame(b2_1=c(-0.013020 ,-0.016540),b2_2=c(-0.0002822,-0.0026720)) T.val=data.frame(T1=c(1,1),T2=c(1,2),T3=c(2,1)) dt_data=cbind(b0,b1,b2,T.val) fu.time=seq(0,50,by=0.8) pat=ncol(T.val) #number of T's nit=2 #no of rows pt.array1=array(NA, dim=c(nit,length(fu.time),pat)) for ( it.er in 1

How to read extra properties from model store EXTJs?

馋奶兔 提交于 2019-12-02 01:45:48
​Json reader in is defined for the store as follows: Ext.define('App.store.MyList', { extend : 'Ext.data.Store', model : 'App.model.MyList', pageSize : 100, proxy : { type : 'ajax', actionMethods : { create : 'POST', read : 'POST', update : 'POST', destroy : 'POST' }, root : 'results', url : 'aaa.htm', reader : { type : 'json', root : 'results', totalProperty: 'totalCount', extraProperty: 'abcd' }, simpleSortMode : true } }); How do I read extra property outside the root? I tried to put one inside the reader , it did not work. try this grid.getStore().getProxy().getReader().extraProperty 来源:

How sort elements and store them in a variable, XSLT

时光总嘲笑我的痴心妄想 提交于 2019-12-01 20:26:41
I was wondering whether it's possible to sort some elements first and store them (already sorted) in a variable. I would need to refer to them thought XSLT that's why I'd like to store them in a variable. I was trying to do the following, but it doesn't seem to work <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:variable name="deposits"> <xsl:for-each select="/BookingCostings/MultiDeposits"> <xsl:sort select="substring(@DepositDate, 1, 4)" /> <xsl:sort select="substring(@DepositDate, 6, 2)" /> <xsl:sort select="substring(@DepositDate, 9, 2)" /> </xsl:for

What to Use to Pick Multiple files (Media files) and retrieve them in a StorageFile collection at custom/desired index?

僤鯓⒐⒋嵵緔 提交于 2019-12-01 14:07:48
I have a list in which i retrieve multiple mp3 files. Now when i want to add files again, i pick files from picker but they overwrite the previous files in IReadOnlyList filesList i want that if i choose files again...then they should go to the next index of filesList Ex: First time i pick 3 files and they go to filesList[0], filesList[1], filesList[2]. Now I again click on addmusicbtn to pick files and i pick 2 files. Now what i want is to get these files on filesList[3] and filesList[4]. But IReadOnlyList is'nt allowing to do this, it starts storing from index 0. I've also tried IList but it

store.sync() callback

浪子不回头ぞ 提交于 2019-12-01 13:52:04
Is there a callback for store.sync()? I am trying to do: store.sync(function(){ alert('1'); }); but it does not work. The store is a local store. Alex There is no 'callback' for sync(). In order to achieve this behaviour, you will need to listen to the store's write event. Check this solution . You can try: store.sync({ callback: function (records, operation) { alert('1'); } }); There is the way to listen success event store.on('write', function(){ alert('ready'); }); store.sync(); write fires whenever a successful write has been made via the configured Proxy 来源: https://stackoverflow.com

How to create notes in iPhone notes app programmatically

筅森魡賤 提交于 2019-12-01 09:21:18
I have some data in my local database in my iPhone app. I want to programmatically create a note in iPhones notes app and store this data. Does anyone know how to do it? It's currently not possible as there are no known APIs for working with the Notes application. 来源: https://stackoverflow.com/questions/3252599/how-to-create-notes-in-iphone-notes-app-programmatically

How to create notes in iPhone notes app programmatically

喜夏-厌秋 提交于 2019-12-01 07:53:58
问题 I have some data in my local database in my iPhone app. I want to programmatically create a note in iPhones notes app and store this data. Does anyone know how to do it? 回答1: It's currently not possible as there are no known APIs for working with the Notes application. 来源: https://stackoverflow.com/questions/3252599/how-to-create-notes-in-iphone-notes-app-programmatically

Where is the HttpSession data stored?

我与影子孤独终老i 提交于 2019-12-01 07:37:37
HttpSession is a high level interface built on top of cookies and url-rewriting, which means that there is only a session ID is stored in client side and the data associated with it is stored in server side. Where is the HttpSession data actually stored in the server side? In the JVM memory or somewhere else? Can I change the place where to store it, e.g. save them into an in-memory database? If it's not in a database, is there any concurrency problem when many clients work on the same session data at the same time? It's up to the server where to store session data; the ones I'm familiar with