qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
15,363,595 | I'm practicing ACM problems to become a better programmer, but I'm still fairly new to c++ and I'm having trouble interpreting some of the judges code I'm reading. The beginning of a class starts with
```
public:
State(int n) : _n(n), _p(2*n+1)
{
```
and then later it's initialized with
```
State s(n);
s(0,0... | 2013/03/12 | [
"https://Stackoverflow.com/questions/15363595",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1874415/"
] | You are confusing a call to `state::operator()(int, int)` with an initialization. That operator call lets you set the value of an element of the class instance.
```
State s(n); // this is the only initialization
s(0,0) = 1; // this calls operator()(int, int) on instance s
``` | This part:
```
State(int n) : _n(n), _p(2*n+1)
```
...is a member initializer list. It's sort of similar to if you'd written the construct like:
```
state(int n) { _n = n; _p = 2*n+1; }
```
...except that it initializes `_n` and `_p` instead of starting with them unitialized, then assigning values to them. In thi... |
17,020,311 | I am getting this error whenever I leave my drop down lists blank:
>
> "String was not recognized as a valid DateTime"
>
>
>
My .aspx looks like below:
```
<asp:DropDownList ID="cboDay" runat="server" Width="55px" Height="32px" AppendDataBoundItems="true">
<asp:ListItem></asp:ListItem>
</asp:DropDownList>
<... | 2013/06/10 | [
"https://Stackoverflow.com/questions/17020311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2388316/"
] | >
> I am getting this error whenever I leave my drop down lists blank
>
>
>
Then don't leave it blank, or change your code to detect empty input.
There are a few ways to do this, but for example you can do it like this:
```
protected void btnSave_Click(object sender, EventArgs e)
{
if (String.IsNullOr... | Should you use a nullable datetime when the field is left blank?
```
DateTime? dt = null;
DateTime tmp;
if (DateTime.TryParse(
String.Format("{0}/{1}/{2}",
cboDay.SelectedItem.Text
, cboMonth.SelectedItem.Text
, cboYear.SelectedItem.Text
)
, out tmp
))
{
dt = tmp;
}
``` |
17,020,311 | I am getting this error whenever I leave my drop down lists blank:
>
> "String was not recognized as a valid DateTime"
>
>
>
My .aspx looks like below:
```
<asp:DropDownList ID="cboDay" runat="server" Width="55px" Height="32px" AppendDataBoundItems="true">
<asp:ListItem></asp:ListItem>
</asp:DropDownList>
<... | 2013/06/10 | [
"https://Stackoverflow.com/questions/17020311",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2388316/"
] | >
> I am getting this error whenever I leave my drop down lists blank
>
>
>
Then don't leave it blank, or change your code to detect empty input.
There are a few ways to do this, but for example you can do it like this:
```
protected void btnSave_Click(object sender, EventArgs e)
{
if (String.IsNullOr... | as you are using seperate dropdownlists for day month and year try this one
```
string date=cboDay.selectedtext+"/"+cbomonth.selectedtext+"/"+cboYear.selectedtext;
convert.todatetime(date);
```
but before trying this make sure that your day format is like 01,02,...29,30 and month format as 01,02,..11,12 all two dig... |
9,262,695 | I'm trying to pull code comment blocks out of JavaScript files. I'm making a light code documentator.
An example would be:
```
/** @Method: setSize
* @Description: setSize DESCRIPTION
* @param: setSize PARAMETER
*/
```
I need to pull out the comments setup like this, ideally into an array.
I had gotten as far a... | 2012/02/13 | [
"https://Stackoverflow.com/questions/9262695",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1148438/"
] | This should grab a comment block `\/\*\*[^/]+\/`. I don't think Regexp is the best way to generate an array from these blocks though. This regexp basically says:
Find a `/**` (the asterisk and forward slashes are escaped with `\`)
then find anything that isn't a `/`
then find one `/`
It's crude but is should genera... | What about some magic :)
```js
comment.replace(/@(\w+)\s*\:\s*(\S+)\s+(\w+)/gim, function (match, tag, name, descr) {
console.log(arguments);
// Do sth. ...
});
```
I've not tested this so for the regex there is no guarantee, just to point you to a possibility do some RegExp-search the John Resig way 8-) |
9,262,695 | I'm trying to pull code comment blocks out of JavaScript files. I'm making a light code documentator.
An example would be:
```
/** @Method: setSize
* @Description: setSize DESCRIPTION
* @param: setSize PARAMETER
*/
```
I need to pull out the comments setup like this, ideally into an array.
I had gotten as far a... | 2012/02/13 | [
"https://Stackoverflow.com/questions/9262695",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1148438/"
] | Depending on what you want to continue doing with the extracted docblocks, multiple approaches come to mind. If you simply need the docblocks without further references, String.match() may suffice. Otherwise you might need the index of the block.
As others have already pointed out, javascript's RegEx machine is everyt... | This should grab a comment block `\/\*\*[^/]+\/`. I don't think Regexp is the best way to generate an array from these blocks though. This regexp basically says:
Find a `/**` (the asterisk and forward slashes are escaped with `\`)
then find anything that isn't a `/`
then find one `/`
It's crude but is should genera... |
9,262,695 | I'm trying to pull code comment blocks out of JavaScript files. I'm making a light code documentator.
An example would be:
```
/** @Method: setSize
* @Description: setSize DESCRIPTION
* @param: setSize PARAMETER
*/
```
I need to pull out the comments setup like this, ideally into an array.
I had gotten as far a... | 2012/02/13 | [
"https://Stackoverflow.com/questions/9262695",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1148438/"
] | Depending on what you want to continue doing with the extracted docblocks, multiple approaches come to mind. If you simply need the docblocks without further references, String.match() may suffice. Otherwise you might need the index of the block.
As others have already pointed out, javascript's RegEx machine is everyt... | What about some magic :)
```js
comment.replace(/@(\w+)\s*\:\s*(\S+)\s+(\w+)/gim, function (match, tag, name, descr) {
console.log(arguments);
// Do sth. ...
});
```
I've not tested this so for the regex there is no guarantee, just to point you to a possibility do some RegExp-search the John Resig way 8-) |
1,517,016 | I have a small application which can be used to set reminders for future events. The app uses an AlarmManager to set the time for when the user should be reminded. When the alarm goes off, a BroadcastReceiver registers this and in turn starts a service to notify the user via a toast and a notification in the status bar... | 2009/10/04 | [
"https://Stackoverflow.com/questions/1517016",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/91098/"
] | Try adding [`FLAG_UPDATE_CURRENT`](http://developer.android.com/reference/android/app/PendingIntent.html#FLAG_UPDATE_CURRENT) to your `PendingIntent` when you create it via `getBroadcast()`. | The above answers are correct, but they lack an explanation. It's worth noting this part of the [PendingIntent documentation](http://developer.android.com/reference/android/app/PendingIntent.html):
>
> A PendingIntent itself is simply a reference to a token maintained by the system describing the original data used t... |
1,517,016 | I have a small application which can be used to set reminders for future events. The app uses an AlarmManager to set the time for when the user should be reminded. When the alarm goes off, a BroadcastReceiver registers this and in turn starts a service to notify the user via a toast and a notification in the status bar... | 2009/10/04 | [
"https://Stackoverflow.com/questions/1517016",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/91098/"
] | Try adding [`FLAG_UPDATE_CURRENT`](http://developer.android.com/reference/android/app/PendingIntent.html#FLAG_UPDATE_CURRENT) to your `PendingIntent` when you create it via `getBroadcast()`. | best Link I've found on this topic: <http://alvinalexander.com/source-code/android/android-how-attach-extra-intent-pendingintent-notification-solution-example>
this is the clue:
```
int uniqueInt = (int) (System.currentTimeMillis() & 0xfffffff);
PendingIntent.getService(context, uniqueInt, intent, 0)
``` |
314,723 | **Problem**
Many users (including me) found out from one moment to another that the usage disk space is really strange. One day I had 50Gb free and the next I had 3Gb, it is just crazy.
This happened with different versions of Ubuntu (11.04, 12.04 and 12.10 just to mention).
Some of those user have create question o... | 2013/06/30 | [
"https://askubuntu.com/questions/314723",
"https://askubuntu.com",
"https://askubuntu.com/users/62483/"
] | You could investigate the problem. Yes, I know it's a big file, but by throwing away data and letting the computer do the work, one could:
```
cat .xsession-errors* | \
egrep -v '^$' | \
sed -e 's/[0-9][0-9]\+/#NUM#/g' | \
sort | \
uniq -c | \
sort -rn | \
tee counts.out | \
less -XMersj3... | I am not sure why this happens, but this is a bit big for a comment.
I would just stop them being created by running these command:
`rm .xsession-errors.old`
`touch .xsession-errors.old`
`sudo chattr +i .xsession-errors.old`
So delete the file, create a new one, and then set the immutable attribute to stop anythi... |
36,200 | I am trying to build a neural net that will overfit random walk path. So, far I wasn't able to get a neural net that we shatter/overfit. I was wondering which parameters I should explore, or which guide lines I should follow to achieve this (wierd) task.
### Code:
```
from keras.models import Sequential
from keras.la... | 2018/07/30 | [
"https://datascience.stackexchange.com/questions/36200",
"https://datascience.stackexchange.com",
"https://datascience.stackexchange.com/users/56928/"
] | Generally, library that you use for k-means clustering will report "within cluster sum-of-squares" value after running k-means procedure. A smaller value means the cluster is tightly bound (most messages are similar to each other). You can use this value to order the cluster IDs. | Assuming you have clustered them according to some word/characters vectors, your clustering algorithm probably produced a centroid point for each cluster.
Now, the next step depends on what you have defined as a 'higher ranking'. Do you see clusters having very dense distribution of text as having a good rank? Or do ... |
17,488,978 | Suppose I have a bunch of students and a couple of professors. Each student needs to take an oral exam with one of the professors. For this, every student supplies an (ordered) list consisting of three professors he would prefer taking the exam with. Of course, each professor can only give a limited number of exams.
I ... | 2013/07/05 | [
"https://Stackoverflow.com/questions/17488978",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2553174/"
] | You can model this *exactly* using Integer programming as an [Assignment Problem.](http://en.wikipedia.org/wiki/Assignment_problem)
**Variables**
Let there be **s** students and **p** professors.
The decision variable
```
X_sp is 1 if student s takes an exam with professor p
0 otherwise
Let Limit_p b... | I think you can solve this optimally by solving a min cost flow problem.
The Python code below illustrates how this can be done for 3 students using the networkx library.
```
import networkx as nx
G=nx.DiGraph()
multiple_prefs=[{'Tom':['Prof1','Prof2','Prof3'],
'Dick':['Prof2','Prof1','Prof3'],
'Harry... |
17,232,932 | I am working on Quiz App. In my app I want to get difference between quiz start time and end time. How to get difference between start and end time.
Thanks in advance. | 2013/06/21 | [
"https://Stackoverflow.com/questions/17232932",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1969269/"
] | You can use **NSDate** `- (NSTimeInterval)timeIntervalSinceDate:(NSDate *)anotherDate` for this purpose. | The `NSDate` class has a method `timeIntervalSinceDate` that does the trick.
```
NSTimeInterval interval = [firstDate timeIntervalSinceDate:secondDate];
``` |
17,232,932 | I am working on Quiz App. In my app I want to get difference between quiz start time and end time. How to get difference between start and end time.
Thanks in advance. | 2013/06/21 | [
"https://Stackoverflow.com/questions/17232932",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1969269/"
] | You can use **NSDate** `- (NSTimeInterval)timeIntervalSinceDate:(NSDate *)anotherDate` for this purpose. | Use this
```
NSDateFormatter *dateFormatter1 = [[NSDateFormatter alloc] init];
[dateFormatter1 setDateFormat:@"MM/dd/yy"];
NSDate *today = [NSDate date];
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"MM/dd/yy"];
NSString *dateString11 = [dateFormat stri... |
17,232,932 | I am working on Quiz App. In my app I want to get difference between quiz start time and end time. How to get difference between start and end time.
Thanks in advance. | 2013/06/21 | [
"https://Stackoverflow.com/questions/17232932",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1969269/"
] | Use this
```
NSDateFormatter *dateFormatter1 = [[NSDateFormatter alloc] init];
[dateFormatter1 setDateFormat:@"MM/dd/yy"];
NSDate *today = [NSDate date];
NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
[dateFormat setDateFormat:@"MM/dd/yy"];
NSString *dateString11 = [dateFormat stri... | The `NSDate` class has a method `timeIntervalSinceDate` that does the trick.
```
NSTimeInterval interval = [firstDate timeIntervalSinceDate:secondDate];
``` |
25,208,968 | Is there a function to do this?
For example if I have an array like this:
```
array(
2014-08-05 10:23:34,
2014-08-08 13:12:56,
2014-08-07 08:02:21,
2014-08-06 11:22:33,
2014-08-03 6:02:44,
2014-08-08 10:23:34
);
```
and I'd like to return all the dates BETWEEN 2014-08-03 AND 2014-08-06.
There is ... | 2014/08/08 | [
"https://Stackoverflow.com/questions/25208968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2874194/"
] | Are you able to do your sorting in MySQL? If so, you can use the BETWEEN operator:
'SELECT \* FROM my\_table where date\_column BETWEEN '2014-08-03' and '2014-08-06'
Edit: same as using >= and <=, so be careful with the second date. 2014-08-06 00:00:01 would not be returned by this query because it is greater than 20... | You can try using array walk
```
function checkDate(&$item1, $key, $dateToCompare)
{
//Your Function to compare and echo or anything else
}
array_walk($fruits, 'checkDate', $dateToCompare);
``` |
25,208,968 | Is there a function to do this?
For example if I have an array like this:
```
array(
2014-08-05 10:23:34,
2014-08-08 13:12:56,
2014-08-07 08:02:21,
2014-08-06 11:22:33,
2014-08-03 6:02:44,
2014-08-08 10:23:34
);
```
and I'd like to return all the dates BETWEEN 2014-08-03 AND 2014-08-06.
There is ... | 2014/08/08 | [
"https://Stackoverflow.com/questions/25208968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2874194/"
] | Are you able to do your sorting in MySQL? If so, you can use the BETWEEN operator:
'SELECT \* FROM my\_table where date\_column BETWEEN '2014-08-03' and '2014-08-06'
Edit: same as using >= and <=, so be careful with the second date. 2014-08-06 00:00:01 would not be returned by this query because it is greater than 20... | As Pagerange mentioned, it would be best to use a SQL query, but if you must do this in PHP here is one solution:
```
// start date chosen by user
$start_year = 2014;
$start_month = 8;
$start_day = 3;
// end date chosen by user
$end_year = 2014;
$end_month = 8;
$end_day = 6;
$dates = array(
'2014-08-05 10:23:34',... |
193,115 | I have a SP UIModal Pop-Up, in which I want show Alert to user when click on [X].
How can i do this in SPD 2013 | 2016/09/06 | [
"https://sharepoint.stackexchange.com/questions/193115",
"https://sharepoint.stackexchange.com",
"https://sharepoint.stackexchange.com/users/58738/"
] | use option property of ModalDialog **dialogReturnValueCallback**
```
var options = {
url: "/_layouts/myPage.aspx" ,
dialogReturnValueCallback: function (dialogResult,returnValue )
{
if (dialogResult == SP.UI.DialogResult.cancel)//when user click on [X]
alert ('popup canceled')
}
};
S... | This code work for me :
```
function fAddOnCloseHandler()
{
var oCloseButton = $("a[id^='DlgClose']");
$clearHandlers(oCloseButton.get(0));
$(oCloseButton).on("click", function (event) { fyourFun(event)} );
}
_spBodyOnLoadFunctionNames.push( ExecuteOrDelayUntilScriptLoaded(fAddOnCloseHandler, "SP.js"... |
5,229,163 | I want to create the rounded corner container in winform .net. My aim is to create a container such that if I dropped any other control within it, that control will also become round shape.
Is this possible? | 2011/03/08 | [
"https://Stackoverflow.com/questions/5229163",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/408941/"
] | You're looking for the [**`Control.Region`** property](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.region.aspx), which allows you to set the window region associated with a particular control. The operating system will not draw or display any portion of a window that lies outside of a window re... | [Control.ControlAdded Event](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.controladded.aspx)
[Control.Region](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.region.aspx)
[Control.DesignMode](http://msdn.microsoft.com/en-us/library/system.web.ui.control.designmode.aspx)
Y... |
52,725 | John 1:29 KJV
The next day John seeth Jesus coming unto him, and saith, Behold the Lamb of God, which taketh away the sin of the world.
John 12:47 KJV
And if any man hear my words, and believe not, I judge him not: for I came not to judge the world, but to save the world. | 2020/10/31 | [
"https://hermeneutics.stackexchange.com/questions/52725",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/38999/"
] | Does John teach Universalism? Yes and NO! Let me be more specific.
There is an important difference between the **provision** of salvation and the reality of salvation. The Bible clearly teaches that the **provision** of salvation is universal but the **actuality** is not. In the writings of John we have:
* John 1:29... | I believe the correct answer is YES.
In John 1:7
>
> The same came for a witness, to bear witness of the Light, that **all men through him might believe**.
>
>
>
John 3:17 states that God sent the Son, who is the God's Word to save the world
>
> For God did not send his Son into the world to condemn the world,... |
52,725 | John 1:29 KJV
The next day John seeth Jesus coming unto him, and saith, Behold the Lamb of God, which taketh away the sin of the world.
John 12:47 KJV
And if any man hear my words, and believe not, I judge him not: for I came not to judge the world, but to save the world. | 2020/10/31 | [
"https://hermeneutics.stackexchange.com/questions/52725",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/38999/"
] | Does John teach Universalism? Yes and NO! Let me be more specific.
There is an important difference between the **provision** of salvation and the reality of salvation. The Bible clearly teaches that the **provision** of salvation is universal but the **actuality** is not. In the writings of John we have:
* John 1:29... | The question is a bit ambiguous, for it gives two quotes - John 1:29 an John 12:47 - which have quite different connotations: the first clearly shows that according to John Jesus' ministry is for the entire world and not just for one chosen nation of Jews, and there are quite a few passages in John that confirm the sam... |
52,725 | John 1:29 KJV
The next day John seeth Jesus coming unto him, and saith, Behold the Lamb of God, which taketh away the sin of the world.
John 12:47 KJV
And if any man hear my words, and believe not, I judge him not: for I came not to judge the world, but to save the world. | 2020/10/31 | [
"https://hermeneutics.stackexchange.com/questions/52725",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/38999/"
] | Does John teach Universalism? Yes and NO! Let me be more specific.
There is an important difference between the **provision** of salvation and the reality of salvation. The Bible clearly teaches that the **provision** of salvation is universal but the **actuality** is not. In the writings of John we have:
* John 1:29... | That the Father sent the Son to be the saviour of the world and that John declares of him ‘Behold the Lamb of God which taketh away the sin of the world’, does not suggest, in any way, a ‘Christian Universalism’, that is to say the notion that, automatically, all humankind shall be saved irrespective of their behaviour... |
52,725 | John 1:29 KJV
The next day John seeth Jesus coming unto him, and saith, Behold the Lamb of God, which taketh away the sin of the world.
John 12:47 KJV
And if any man hear my words, and believe not, I judge him not: for I came not to judge the world, but to save the world. | 2020/10/31 | [
"https://hermeneutics.stackexchange.com/questions/52725",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/38999/"
] | John is a fascinating philosophical take. Its perception in scholarship has also evolved remarkably. Pretty much everything we thought we knew about John has changed in the 20th century, particularly since the 1980s. There has been new knowledge about John that has come from excavation of the pool of Bethesda to the re... | The greater question of the question posed is, ***“Does Scripture support the Universalism?”*** And do the passages-John 1:29 & 12:47 support the Universalism?
**1. The Universalism** (differ from the Universal atonement)
The modern-day Universalism -Christian Universalism - is a specific theological term for a belie... |
52,725 | John 1:29 KJV
The next day John seeth Jesus coming unto him, and saith, Behold the Lamb of God, which taketh away the sin of the world.
John 12:47 KJV
And if any man hear my words, and believe not, I judge him not: for I came not to judge the world, but to save the world. | 2020/10/31 | [
"https://hermeneutics.stackexchange.com/questions/52725",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/38999/"
] | The greater question of the question posed is, ***“Does Scripture support the Universalism?”*** And do the passages-John 1:29 & 12:47 support the Universalism?
**1. The Universalism** (differ from the Universal atonement)
The modern-day Universalism -Christian Universalism - is a specific theological term for a belie... | The question is a bit ambiguous, for it gives two quotes - John 1:29 an John 12:47 - which have quite different connotations: the first clearly shows that according to John Jesus' ministry is for the entire world and not just for one chosen nation of Jews, and there are quite a few passages in John that confirm the sam... |
52,725 | John 1:29 KJV
The next day John seeth Jesus coming unto him, and saith, Behold the Lamb of God, which taketh away the sin of the world.
John 12:47 KJV
And if any man hear my words, and believe not, I judge him not: for I came not to judge the world, but to save the world. | 2020/10/31 | [
"https://hermeneutics.stackexchange.com/questions/52725",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/38999/"
] | Does John teach Universalism? Yes and NO! Let me be more specific.
There is an important difference between the **provision** of salvation and the reality of salvation. The Bible clearly teaches that the **provision** of salvation is universal but the **actuality** is not. In the writings of John we have:
* John 1:29... | The greater question of the question posed is, ***“Does Scripture support the Universalism?”*** And do the passages-John 1:29 & 12:47 support the Universalism?
**1. The Universalism** (differ from the Universal atonement)
The modern-day Universalism -Christian Universalism - is a specific theological term for a belie... |
52,725 | John 1:29 KJV
The next day John seeth Jesus coming unto him, and saith, Behold the Lamb of God, which taketh away the sin of the world.
John 12:47 KJV
And if any man hear my words, and believe not, I judge him not: for I came not to judge the world, but to save the world. | 2020/10/31 | [
"https://hermeneutics.stackexchange.com/questions/52725",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/38999/"
] | Does John teach Universalism? Yes and NO! Let me be more specific.
There is an important difference between the **provision** of salvation and the reality of salvation. The Bible clearly teaches that the **provision** of salvation is universal but the **actuality** is not. In the writings of John we have:
* John 1:29... | John is a fascinating philosophical take. Its perception in scholarship has also evolved remarkably. Pretty much everything we thought we knew about John has changed in the 20th century, particularly since the 1980s. There has been new knowledge about John that has come from excavation of the pool of Bethesda to the re... |
52,725 | John 1:29 KJV
The next day John seeth Jesus coming unto him, and saith, Behold the Lamb of God, which taketh away the sin of the world.
John 12:47 KJV
And if any man hear my words, and believe not, I judge him not: for I came not to judge the world, but to save the world. | 2020/10/31 | [
"https://hermeneutics.stackexchange.com/questions/52725",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/38999/"
] | That the Father sent the Son to be the saviour of the world and that John declares of him ‘Behold the Lamb of God which taketh away the sin of the world’, does not suggest, in any way, a ‘Christian Universalism’, that is to say the notion that, automatically, all humankind shall be saved irrespective of their behaviour... | The question is a bit ambiguous, for it gives two quotes - John 1:29 an John 12:47 - which have quite different connotations: the first clearly shows that according to John Jesus' ministry is for the entire world and not just for one chosen nation of Jews, and there are quite a few passages in John that confirm the sam... |
52,725 | John 1:29 KJV
The next day John seeth Jesus coming unto him, and saith, Behold the Lamb of God, which taketh away the sin of the world.
John 12:47 KJV
And if any man hear my words, and believe not, I judge him not: for I came not to judge the world, but to save the world. | 2020/10/31 | [
"https://hermeneutics.stackexchange.com/questions/52725",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/38999/"
] | I believe the correct answer is YES.
In John 1:7
>
> The same came for a witness, to bear witness of the Light, that **all men through him might believe**.
>
>
>
John 3:17 states that God sent the Son, who is the God's Word to save the world
>
> For God did not send his Son into the world to condemn the world,... | The greater question of the question posed is, ***“Does Scripture support the Universalism?”*** And do the passages-John 1:29 & 12:47 support the Universalism?
**1. The Universalism** (differ from the Universal atonement)
The modern-day Universalism -Christian Universalism - is a specific theological term for a belie... |
52,725 | John 1:29 KJV
The next day John seeth Jesus coming unto him, and saith, Behold the Lamb of God, which taketh away the sin of the world.
John 12:47 KJV
And if any man hear my words, and believe not, I judge him not: for I came not to judge the world, but to save the world. | 2020/10/31 | [
"https://hermeneutics.stackexchange.com/questions/52725",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/38999/"
] | That the Father sent the Son to be the saviour of the world and that John declares of him ‘Behold the Lamb of God which taketh away the sin of the world’, does not suggest, in any way, a ‘Christian Universalism’, that is to say the notion that, automatically, all humankind shall be saved irrespective of their behaviour... | The greater question of the question posed is, ***“Does Scripture support the Universalism?”*** And do the passages-John 1:29 & 12:47 support the Universalism?
**1. The Universalism** (differ from the Universal atonement)
The modern-day Universalism -Christian Universalism - is a specific theological term for a belie... |
63,798,361 | I have created a function day\_of\_week(dayy) and used switch-case statements in function.
```
function day_of_week(dayy) {
var result;
switch (dayy) {
case 1:
result = "monday";
case 2:
result = "Tuesday";
case 3:
result = "wednesday";
... | 2020/09/08 | [
"https://Stackoverflow.com/questions/63798361",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14037917/"
] | There is no break statement in your code. I hope this will work for you.
```
<!DOCTYPE html>
<html>
<head>
<script>
function day_of_week(dayy){
var result;
switch(dayy){
case 1: result = "Monday";
break;
case 2: result = "Tuesday";
break;
... | I would do something like this to get a random day:
```
function getDay() {
const days = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
return days[Math.floor(Math.random() * 7)];
}
``` |
63,798,361 | I have created a function day\_of\_week(dayy) and used switch-case statements in function.
```
function day_of_week(dayy) {
var result;
switch (dayy) {
case 1:
result = "monday";
case 2:
result = "Tuesday";
case 3:
result = "wednesday";
... | 2020/09/08 | [
"https://Stackoverflow.com/questions/63798361",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14037917/"
] | There is no break statement in your code. I hope this will work for you.
```
<!DOCTYPE html>
<html>
<head>
<script>
function day_of_week(dayy){
var result;
switch(dayy){
case 1: result = "Monday";
break;
case 2: result = "Tuesday";
break;
... | I refactor this code by using berak and Math method
```
function day_of_week(day) {
var result;
switch (day) {
case 1:
result = "monday";
break;
case 2:
result = "Tuesday";
break;
case 3:
result = "wednesday";
... |
970,828 | Has anyone seen a library that tests WCF DataContracts? The motivation behind asking this is that I just found a bug in my app that resulted from my not annotating a property with the DataMember attribute - as a result, that property wasn't being serialized.
What I have in mind is an API that, given a particular type ... | 2009/06/09 | [
"https://Stackoverflow.com/questions/970828",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1727/"
] | It's simple enough to use `DataContractSerializer` to serialise your object to a `MemoryStream`, then deserialise it back into existence as a new instance.
Here's a class that demonstrates this round-trip serialisation:
```
public static class WcfTestHelper
{
/// <summary>
/// Uses a <see cref="DataContractSe... | A better approach: create a proxy that serializes/deserializes all arguments when calling a method. Code can be found here: <http://mkramar.blogspot.com/2013/01/unit-test-wcf-with-serialization.html> |
40,062,557 | I'm allowing users to select/deselect cells in my collection view and then hit a save/delete button.
When I'm selecting rows, I add them to a dictionary
```
var selectedIndexes = Dictionary<IndexPath, String> ()
```
and when I deselect the row I set the selectedIndexes[indexPath] = nil
When the user hits delete... | 2016/10/15 | [
"https://Stackoverflow.com/questions/40062557",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6820041/"
] | What it is saying is that your collection view is no longer in sync with your data source. So you also need to update whatever you are using as your dataSource to reflect your changes and then call deleteCells. | ```
for index in selectedIndexes.keys {
indexesToDelete.append(index)
}
yourCollectionViewDataSourceArray.remove(at: index)
collectionView.deleteItems(at: indexesToDelete)
```
if your collectionView data source is yourCollectionViewDataSourceArray, both are synced together. Every time collectionView reloa... |
18,027,508 | In CoffeeScript:
```
f = ->
v = 5
g = ->
v
g()
f() # returns 5 as expected
```
In Ruby:
```
def f
v = 5
def g
v # undefined local variable or method `v' for main:Object (NameError)
end
g
end
f
```
Okay, so apparently JavaScript functions are set up to capture variables in the scope they are... | 2013/08/02 | [
"https://Stackoverflow.com/questions/18027508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1291990/"
] | You don't really define methods inside of methods in Ruby, but you can use `lambda`:
```
def f
v = 5
g = lambda do
v
end
g.call
end
``` | Short answer, no. Ruby's functions have different scoping rules than Javascript functions.
Longer answer is that you can define objects in Ruby that preserve the scope in which they are defined (called a closure). These are called lambdas, Procs, and blocks in Ruby. Look [here](http://www.robertsosinski.com/2008/12/21... |
18,027,508 | In CoffeeScript:
```
f = ->
v = 5
g = ->
v
g()
f() # returns 5 as expected
```
In Ruby:
```
def f
v = 5
def g
v # undefined local variable or method `v' for main:Object (NameError)
end
g
end
f
```
Okay, so apparently JavaScript functions are set up to capture variables in the scope they are... | 2013/08/02 | [
"https://Stackoverflow.com/questions/18027508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1291990/"
] | Ruby has script scope, module/class/method definition scope and block scope. Only blocks create nested scopes. So, you need to use a block to define your method. Thankfully, there is a method for defining methods that takes a block:
```
def f
v = 5
define_method :g do
v
end
g
end
f
# => 5
```
However, no... | You don't really define methods inside of methods in Ruby, but you can use `lambda`:
```
def f
v = 5
g = lambda do
v
end
g.call
end
``` |
18,027,508 | In CoffeeScript:
```
f = ->
v = 5
g = ->
v
g()
f() # returns 5 as expected
```
In Ruby:
```
def f
v = 5
def g
v # undefined local variable or method `v' for main:Object (NameError)
end
g
end
f
```
Okay, so apparently JavaScript functions are set up to capture variables in the scope they are... | 2013/08/02 | [
"https://Stackoverflow.com/questions/18027508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1291990/"
] | You don't really define methods inside of methods in Ruby, but you can use `lambda`:
```
def f
v = 5
g = lambda do
v
end
g.call
end
``` | To add to the other answers, for most consistency with your CoffeeScript code, you would probably write:
```
f = lambda do
v = 5
g = lambda do
v
end
g[]
end
f[]
``` |
18,027,508 | In CoffeeScript:
```
f = ->
v = 5
g = ->
v
g()
f() # returns 5 as expected
```
In Ruby:
```
def f
v = 5
def g
v # undefined local variable or method `v' for main:Object (NameError)
end
g
end
f
```
Okay, so apparently JavaScript functions are set up to capture variables in the scope they are... | 2013/08/02 | [
"https://Stackoverflow.com/questions/18027508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1291990/"
] | You don't really define methods inside of methods in Ruby, but you can use `lambda`:
```
def f
v = 5
g = lambda do
v
end
g.call
end
``` | A closure is a named block of code (a function in some languages, a lambda or proc in Ruby) with the following characteristics:
* It remembers the values of all variables that were available in the
scope it was defined (outer scope), even when called on another scope
or when those variables are no longer available (ou... |
18,027,508 | In CoffeeScript:
```
f = ->
v = 5
g = ->
v
g()
f() # returns 5 as expected
```
In Ruby:
```
def f
v = 5
def g
v # undefined local variable or method `v' for main:Object (NameError)
end
g
end
f
```
Okay, so apparently JavaScript functions are set up to capture variables in the scope they are... | 2013/08/02 | [
"https://Stackoverflow.com/questions/18027508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1291990/"
] | Ruby has script scope, module/class/method definition scope and block scope. Only blocks create nested scopes. So, you need to use a block to define your method. Thankfully, there is a method for defining methods that takes a block:
```
def f
v = 5
define_method :g do
v
end
g
end
f
# => 5
```
However, no... | Short answer, no. Ruby's functions have different scoping rules than Javascript functions.
Longer answer is that you can define objects in Ruby that preserve the scope in which they are defined (called a closure). These are called lambdas, Procs, and blocks in Ruby. Look [here](http://www.robertsosinski.com/2008/12/21... |
18,027,508 | In CoffeeScript:
```
f = ->
v = 5
g = ->
v
g()
f() # returns 5 as expected
```
In Ruby:
```
def f
v = 5
def g
v # undefined local variable or method `v' for main:Object (NameError)
end
g
end
f
```
Okay, so apparently JavaScript functions are set up to capture variables in the scope they are... | 2013/08/02 | [
"https://Stackoverflow.com/questions/18027508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1291990/"
] | Short answer, no. Ruby's functions have different scoping rules than Javascript functions.
Longer answer is that you can define objects in Ruby that preserve the scope in which they are defined (called a closure). These are called lambdas, Procs, and blocks in Ruby. Look [here](http://www.robertsosinski.com/2008/12/21... | To add to the other answers, for most consistency with your CoffeeScript code, you would probably write:
```
f = lambda do
v = 5
g = lambda do
v
end
g[]
end
f[]
``` |
18,027,508 | In CoffeeScript:
```
f = ->
v = 5
g = ->
v
g()
f() # returns 5 as expected
```
In Ruby:
```
def f
v = 5
def g
v # undefined local variable or method `v' for main:Object (NameError)
end
g
end
f
```
Okay, so apparently JavaScript functions are set up to capture variables in the scope they are... | 2013/08/02 | [
"https://Stackoverflow.com/questions/18027508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1291990/"
] | Short answer, no. Ruby's functions have different scoping rules than Javascript functions.
Longer answer is that you can define objects in Ruby that preserve the scope in which they are defined (called a closure). These are called lambdas, Procs, and blocks in Ruby. Look [here](http://www.robertsosinski.com/2008/12/21... | A closure is a named block of code (a function in some languages, a lambda or proc in Ruby) with the following characteristics:
* It remembers the values of all variables that were available in the
scope it was defined (outer scope), even when called on another scope
or when those variables are no longer available (ou... |
18,027,508 | In CoffeeScript:
```
f = ->
v = 5
g = ->
v
g()
f() # returns 5 as expected
```
In Ruby:
```
def f
v = 5
def g
v # undefined local variable or method `v' for main:Object (NameError)
end
g
end
f
```
Okay, so apparently JavaScript functions are set up to capture variables in the scope they are... | 2013/08/02 | [
"https://Stackoverflow.com/questions/18027508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1291990/"
] | Ruby has script scope, module/class/method definition scope and block scope. Only blocks create nested scopes. So, you need to use a block to define your method. Thankfully, there is a method for defining methods that takes a block:
```
def f
v = 5
define_method :g do
v
end
g
end
f
# => 5
```
However, no... | To add to the other answers, for most consistency with your CoffeeScript code, you would probably write:
```
f = lambda do
v = 5
g = lambda do
v
end
g[]
end
f[]
``` |
18,027,508 | In CoffeeScript:
```
f = ->
v = 5
g = ->
v
g()
f() # returns 5 as expected
```
In Ruby:
```
def f
v = 5
def g
v # undefined local variable or method `v' for main:Object (NameError)
end
g
end
f
```
Okay, so apparently JavaScript functions are set up to capture variables in the scope they are... | 2013/08/02 | [
"https://Stackoverflow.com/questions/18027508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1291990/"
] | Ruby has script scope, module/class/method definition scope and block scope. Only blocks create nested scopes. So, you need to use a block to define your method. Thankfully, there is a method for defining methods that takes a block:
```
def f
v = 5
define_method :g do
v
end
g
end
f
# => 5
```
However, no... | A closure is a named block of code (a function in some languages, a lambda or proc in Ruby) with the following characteristics:
* It remembers the values of all variables that were available in the
scope it was defined (outer scope), even when called on another scope
or when those variables are no longer available (ou... |
13,135,181 | I have encountered some problem with QGLFrameBufferObject, when I change my OS from win7 to Ubuntu 12.04 LTS. After recompiling the code in the new ubuntu system, the color goes wrong. So I made a minimal test. I just clear the color buffer with color (1.0, 0.0, 0.0, 0.8), and that's it.
I get the correct result when ... | 2012/10/30 | [
"https://Stackoverflow.com/questions/13135181",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1784746/"
] | You could hold everything in one table with `contenttypes`:
```
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
class HistoryRecord(models.Model):
history_date = models.DateTimeField()
history_id = models.PositiveIntegerFi... | All models could inherit from one table (via `one-to-one` key).
That way you can sort by django ORM on this field using base table and later on get proper instances.
See [that discussion](https://stackoverflow.com/questions/5225556/determining-django-model-instance-types-after-a-query-on-a-base-class) for help with ... |
48,577,331 | How to update heap size in tomcat linux container using dockerfile | 2018/02/02 | [
"https://Stackoverflow.com/questions/48577331",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Simply, you can check `@users` value:
```
<% if @uses.present? %>
<% @users.each_with_index do |index| %>
<tr>
...
</tr>
<% end %>
<% end %>
```
Or give `@users` a value if its `nil`:
```
# In controller:
@users = User.where(...) || []
```
Hope it helps. | First of all `each_with_index` iterate over two arguments one is index and second is array object
so here your syntax should be like this: -
```
<% unless @users.blank?%>
<%@users.each_with_index do |user, index|%>
<%= index +=1 %>
<%=user.name%>
#.... and so on
<%end%>
<%end%>
```
make... |
63,058,283 | I want to eject expo to bare react native cli but i can't because I am not able to enter android package name when asked. Basically when i type any android package name and hit enter it just return a blank value again.Looks like cmd is not taking input. But i degraded to expo sdk 36 from 38, then it works fine as There... | 2020/07/23 | [
"https://Stackoverflow.com/questions/63058283",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9631081/"
] | i also had the same issue
Go to app.json in your react native project folder and add in
```
“ios”: { “bundleIdentifier”: “IOSName” },
“android”: { “package”: “AndroidName” }
```
and then save it and then go to your terminal and type ***expo eject***
When it asks for Android Package Name, give the name that you ha... | I ran into this issue as well and found out you can only use alphanumeric characters, '.' and '\_', and for some reason you have to have at least one `.` or `_` in there. So something like `My.App` worked for me |
63,058,283 | I want to eject expo to bare react native cli but i can't because I am not able to enter android package name when asked. Basically when i type any android package name and hit enter it just return a blank value again.Looks like cmd is not taking input. But i degraded to expo sdk 36 from 38, then it works fine as There... | 2020/07/23 | [
"https://Stackoverflow.com/questions/63058283",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9631081/"
] | i also had the same issue
Go to app.json in your react native project folder and add in
```
“ios”: { “bundleIdentifier”: “IOSName” },
“android”: { “package”: “AndroidName” }
```
and then save it and then go to your terminal and type ***expo eject***
When it asks for Android Package Name, give the name that you ha... | by default package name & versionCode for android and bundleIdentifier & buildNumber for iOS is skipped in **app.json** [present in root directory of your project] when you start with expo react native project...
so it is asking the package name when you expo eject.
example of package name >>> "com.yourcompany.yourap... |
35,046,343 | 1) [API for send here](https://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.send_to) returns `Result<usize>`. Why is that ? In my head, a UDP send is all or none. The return value seems to suggest that sending can succeed but entire data may not be written which makes me code like:
```
let mut bytes_... | 2016/01/27 | [
"https://Stackoverflow.com/questions/35046343",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1060004/"
] | The answer to both of these questions lies in the documentation of the respective BSD sockets functions, `sendto()` and `recvfrom()`. If you use some \*nix system (OS X or Linux, for example), you can use `man sendto` and `man recvfrom` to find it.
1) `sendto()` man page is rather vague on this; [Windows](https://msdn... | If you [dig down](https://github.com/rust-lang/rust/blob/464cdff102993ff1900eebbf65209e0a3c0be0d5/src/libstd/sys/common/net.rs#L374), it just wrapping the [C sendto function](http://pubs.opengroup.org/onlinepubs/009695399/functions/sendto.html). This function returns number of bytes sent, so Rust just passes that on (w... |
36,820 | I'm setting up products and tier prices in Magento, but I've noticed that a in Simple Product with Custom Options (example: blue t-shirt, red t-shirt), the Tier Price won't work if we combine them to reach the quantity.
Tier Prices seem to work only when the quantity is reached from one product variation, but not a co... | 2014/09/23 | [
"https://magento.stackexchange.com/questions/36820",
"https://magento.stackexchange.com",
"https://magento.stackexchange.com/users/14550/"
] | The problem here is that Magento treats products with different custom options as different line items in cart. So, the qty for the two variants of custom options never adds up to be able to qualify the quote item for a particular tier of tiered pricing.
Now, making this work would involve custom work. I can give you ... | I can confirm, this works
```
/* hard coded - start */
$cart = Mage::getModel('checkout/cart')->getQuote();
$total_qty = 0;
foreach ($cart->getAllItems() as $item2) {
if ($item2->getProductId() == $quoteItem->getProductId()) $total_qty+= $item2->getQty();
}
... |
6,797,506 | Hey looking through the net I can't seem to find a solution on how to pull these values out of this column of mine, I have only been developing for a year at Uni so this is all new to me.
Basically I don't know how to do it, and reading up on Linq to SQL as well as conditional statements and loops hasn't brought me an... | 2011/07/23 | [
"https://Stackoverflow.com/questions/6797506",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/851326/"
] | What is this line doing?
```
var client = new ServiceFairy.clientURI();
```
Aside from the fact that this wouldn't compile (it needs to be `new ServiceFairy()`), what does `clientURI()` return? You use it here like this:
```
foreach (string r in client.uri)
```
I suspect that `client.uri` is actually a *string*. ... | I suspect `client.uri` is just a single `string`, not an array of `string[]`. So the `foreach` is iterating through each `char` in the string.
So you can change it to: `foreach(char r in client.uri) {...` but I don't think that's what you want.
Just ditch the whole foreach loop and do:
```
Uri rs = new Uri(client.ur... |
12,937,704 | I have a database containing movies Name, their description and their cover picture. The cover picture field type is as blob and the problem is that I can't retrieve it from the database. I want to display the movie name along their cover picture beside them... How to do it.. Here is my code..
```
<?php
include ("php... | 2012/10/17 | [
"https://Stackoverflow.com/questions/12937704",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1753625/"
] | Yes it won't display because `any output above header would always generate error` ... you need to have a different page to output your image or include it has `base64` image
Remove
```
header("Content-type: image/jpeg");
echo $row['Image'];
```
And add this :
```
printf("<img src=\"data:image/jpeg;base64,%s\" />... | I suggest something like that:
Make a new php file called for example image.php; That file will replace physical image file.
In that file you put the code from your post plus some logic to get image data from database;
In parent template(php file maybe) you put code for image:
```
<img src="image.php?id_movie=<?php ... |
21,021,821 | I dont know what I have missed, but the thing is that I would like to have an action on my "add"-button so it can go to the next page "page2".
The same will be with the "show" and "cancel" button to get to previous and next page.
In my PhoneGap app I have a index.html and a index.js file, there is no page2.html and so... | 2014/01/09 | [
"https://Stackoverflow.com/questions/21021821",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2127826/"
] | Hope this JSFiddle can help you [JSFiDDLE](http://jsfiddle.net/Gajotres/g5vAN/)
For better understanding you can read here too [jQuery Mobile navigate or changePage?](https://stackoverflow.com/questions/16616538/jquery-mobile-navigate-or-changepage)
```
<div data-role="page" id="index">
<div data-theme="b"... | try
```
window.location.href = "page2.html"
```
but how do you expect to go to page2 if there is no page2.html? |
21,021,821 | I dont know what I have missed, but the thing is that I would like to have an action on my "add"-button so it can go to the next page "page2".
The same will be with the "show" and "cancel" button to get to previous and next page.
In my PhoneGap app I have a index.html and a index.js file, there is no page2.html and so... | 2014/01/09 | [
"https://Stackoverflow.com/questions/21021821",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2127826/"
] | Add following code in your body tag.
```
<div data-role="page" id="page1">
<div data-role="header">
<h1>Page 1</h1>
</div>
<div data-role="content"></div>
<div data-role="footer">
<h1>Footer</h1>
<div data-role="navbar">
<ul>
<li>
... | try
```
window.location.href = "page2.html"
```
but how do you expect to go to page2 if there is no page2.html? |
21,021,821 | I dont know what I have missed, but the thing is that I would like to have an action on my "add"-button so it can go to the next page "page2".
The same will be with the "show" and "cancel" button to get to previous and next page.
In my PhoneGap app I have a index.html and a index.js file, there is no page2.html and so... | 2014/01/09 | [
"https://Stackoverflow.com/questions/21021821",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2127826/"
] | I recommend adding a **event listener** to the element which calls the **changepage** event.
This helped me boost up user experience, since it fires quicker than the **href** anchor.
```
$(document).on('tap', '#add', function(e){
$.mobile.changePage('#page2');
});
``` | try
```
window.location.href = "page2.html"
```
but how do you expect to go to page2 if there is no page2.html? |
21,021,821 | I dont know what I have missed, but the thing is that I would like to have an action on my "add"-button so it can go to the next page "page2".
The same will be with the "show" and "cancel" button to get to previous and next page.
In my PhoneGap app I have a index.html and a index.js file, there is no page2.html and so... | 2014/01/09 | [
"https://Stackoverflow.com/questions/21021821",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2127826/"
] | Hope this JSFiddle can help you [JSFiDDLE](http://jsfiddle.net/Gajotres/g5vAN/)
For better understanding you can read here too [jQuery Mobile navigate or changePage?](https://stackoverflow.com/questions/16616538/jquery-mobile-navigate-or-changepage)
```
<div data-role="page" id="index">
<div data-theme="b"... | I recommend adding a **event listener** to the element which calls the **changepage** event.
This helped me boost up user experience, since it fires quicker than the **href** anchor.
```
$(document).on('tap', '#add', function(e){
$.mobile.changePage('#page2');
});
``` |
21,021,821 | I dont know what I have missed, but the thing is that I would like to have an action on my "add"-button so it can go to the next page "page2".
The same will be with the "show" and "cancel" button to get to previous and next page.
In my PhoneGap app I have a index.html and a index.js file, there is no page2.html and so... | 2014/01/09 | [
"https://Stackoverflow.com/questions/21021821",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2127826/"
] | Add following code in your body tag.
```
<div data-role="page" id="page1">
<div data-role="header">
<h1>Page 1</h1>
</div>
<div data-role="content"></div>
<div data-role="footer">
<h1>Footer</h1>
<div data-role="navbar">
<ul>
<li>
... | I recommend adding a **event listener** to the element which calls the **changepage** event.
This helped me boost up user experience, since it fires quicker than the **href** anchor.
```
$(document).on('tap', '#add', function(e){
$.mobile.changePage('#page2');
});
``` |
52,774,628 | Error i see on my console is
*Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<http://localhost:3000>' is therefore not allowed access. The response had HTTP status code 401. If an opaque response serves your needs,... | 2018/10/12 | [
"https://Stackoverflow.com/questions/52774628",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6519815/"
] | It seem you misconstrued something here.
The header of CORS should be returned from server and not send from clients (react).
```
Access-Control-Allow-Origin
Access-Control-Allow-Credentials
```
Example:
You want to send a request from A -> server B.
Browser will send HTTP OPTIONS firstly, to verify if the method... | You have to send back to the client from server that this domain is allowed or not
```
import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletR... |
26,480,993 | I have two table users and Areas.Areas has a relation with users.So I have add users\_id in Areas table.After bake I get the output fine.But here in areas add form user field is showing users\_id in select box.Here I want to show users\_name.How can I change it?
Here is the model code
```
MadAreas' => array(
... | 2014/10/21 | [
"https://Stackoverflow.com/questions/26480993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4164819/"
] | Try specifying the fields you want in your find statement:
```
$madAreas = $this->MadArea->Users->find('list', array(
'fields' => array('id','username')
)
);
```
Changing the `$displ... | Change the display field in your User model
<http://book.cakephp.org/2.0/en/models/model-attributes.html#displayfield> |
26,480,993 | I have two table users and Areas.Areas has a relation with users.So I have add users\_id in Areas table.After bake I get the output fine.But here in areas add form user field is showing users\_id in select box.Here I want to show users\_name.How can I change it?
Here is the model code
```
MadAreas' => array(
... | 2014/10/21 | [
"https://Stackoverflow.com/questions/26480993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4164819/"
] | Try specifying the fields you want in your find statement:
```
$madAreas = $this->MadArea->Users->find('list', array(
'fields' => array('id','username')
)
);
```
Changing the `$displ... | Have you set the data in your controller before rendering the view?
```
$this->Set(compact('madAreas'));
``` |
61,203,828 | I have created a simple splash screen that is basically a `JFrame` with a background image, two `JLabels` and a `JProgressbar`. When I only render the frame with the background image it takes about 200 milliseconds which is a good time for the splash screen.
But as soon as I add a JLabel (using Sansserif-font) it take... | 2020/04/14 | [
"https://Stackoverflow.com/questions/61203828",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12707241/"
] | This has nothing to do with rendering speed. The rendering speed of all that is in the order of tens of milliseconds.
The performance penalty you are witnessing has to do with loading classes. Before a `JFrame` can be rendered, its class needs to be loaded, and all classes that it depends on, and so on, and so forth.... | I also have another answer for you. Your problem might be related to this issue, which is still open:
**JDK-8179209 Text rendering has slow initialization time**
<https://bugs.openjdk.java.net/browse/JDK-8179209>
In short, java swing takes a long time to load fonts, and there is no solution to this other than to sta... |
27,308,323 | Trying to diagnose a work development laptop... What version of Clang and GCC come standard with OSX 10.10 Yosemite?
This is what I have on my Mavericks... machine, will respond with my home iMac when it boots.
```
which clang
/usr/bin/clang
which gcc
/usr/bin/gcc
clang --version
Apple LLVM version 4.2 (clang-425.0... | 2014/12/05 | [
"https://Stackoverflow.com/questions/27308323",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1655918/"
] | On my Mac OS X 10.10.1 with the current XCode (6.1.1 (6A2008a)), I get:
```
$ /usr/bin/clang --version
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix
$ /usr/bin/gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr -... | After many failed attempts at updating the C Compilers, we did a fresh install of Yosemite and it was fixed.
Not a great solution, but without trying to hand build Clang the sane as Mac native it was the only solution. |
27,308,323 | Trying to diagnose a work development laptop... What version of Clang and GCC come standard with OSX 10.10 Yosemite?
This is what I have on my Mavericks... machine, will respond with my home iMac when it boots.
```
which clang
/usr/bin/clang
which gcc
/usr/bin/gcc
clang --version
Apple LLVM version 4.2 (clang-425.0... | 2014/12/05 | [
"https://Stackoverflow.com/questions/27308323",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1655918/"
] | Try running: `xcode-select --install`, followed by: `xcodebuild -license` | After many failed attempts at updating the C Compilers, we did a fresh install of Yosemite and it was fixed.
Not a great solution, but without trying to hand build Clang the sane as Mac native it was the only solution. |
63,232,480 | I cannot figure out why this breaks it. I have an a element which uses CSS transitions to fade into a gradient background on hover. For whatever reason whenever I set the text color on hover to white the transition breaks?
```css
.social-item {
margin-left: 0.25vw;
padding: 0.1vw;
transition: 0.2s;
col... | 2020/08/03 | [
"https://Stackoverflow.com/questions/63232480",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14042866/"
] | Meanwhile here are the places (not all) where/how you can call a function
```
init() {
self.testFunction() // non always good, but can
}
var body: some View {
self.testFunction() // 1)
return VStack {
Text("TextBox")
.onTapGesture {
... | **Using Swift 5.3 and Xcode 12.4**
I use a little extension to debug inside the Views (VStack in the example), e.g. to inspect a geometryReader.size. It could be used to call any function in the View as follows:
**NOTE: For debugging purposes only. I don't recommend including code like this in any production code**
... |
63,232,480 | I cannot figure out why this breaks it. I have an a element which uses CSS transitions to fade into a gradient background on hover. For whatever reason whenever I set the text color on hover to white the transition breaks?
```css
.social-item {
margin-left: 0.25vw;
padding: 0.1vw;
transition: 0.2s;
col... | 2020/08/03 | [
"https://Stackoverflow.com/questions/63232480",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14042866/"
] | Meanwhile here are the places (not all) where/how you can call a function
```
init() {
self.testFunction() // non always good, but can
}
var body: some View {
self.testFunction() // 1)
return VStack {
Text("TextBox")
.onTapGesture {
... | There is a reason, when writing in swift UI (iOS Apps), that there is a View protocol that needs to be followed. Calling functions from inside the structure is not compliant with the protocol.
The best thing you can do is the .on(insertTimeORAction here).
[Read more about it here](https://developer.apple.com/document... |
63,232,480 | I cannot figure out why this breaks it. I have an a element which uses CSS transitions to fade into a gradient background on hover. For whatever reason whenever I set the text color on hover to white the transition breaks?
```css
.social-item {
margin-left: 0.25vw;
padding: 0.1vw;
transition: 0.2s;
col... | 2020/08/03 | [
"https://Stackoverflow.com/questions/63232480",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14042866/"
] | Meanwhile here are the places (not all) where/how you can call a function
```
init() {
self.testFunction() // non always good, but can
}
var body: some View {
self.testFunction() // 1)
return VStack {
Text("TextBox")
.onTapGesture {
... | An additional method:
Testing with Swift 5.8, you can also stick in a `let _ = self.testFunction()`.
eg
(this is extra-contrived so that it's possible to see the effect in Preview, because print() doesn't happen in Preview, at least for me)
```
import SwiftUI
class MyClass {
var counter = 0
}
struct ContentVie... |
63,232,480 | I cannot figure out why this breaks it. I have an a element which uses CSS transitions to fade into a gradient background on hover. For whatever reason whenever I set the text color on hover to white the transition breaks?
```css
.social-item {
margin-left: 0.25vw;
padding: 0.1vw;
transition: 0.2s;
col... | 2020/08/03 | [
"https://Stackoverflow.com/questions/63232480",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14042866/"
] | **Using Swift 5.3 and Xcode 12.4**
I use a little extension to debug inside the Views (VStack in the example), e.g. to inspect a geometryReader.size. It could be used to call any function in the View as follows:
**NOTE: For debugging purposes only. I don't recommend including code like this in any production code**
... | An additional method:
Testing with Swift 5.8, you can also stick in a `let _ = self.testFunction()`.
eg
(this is extra-contrived so that it's possible to see the effect in Preview, because print() doesn't happen in Preview, at least for me)
```
import SwiftUI
class MyClass {
var counter = 0
}
struct ContentVie... |
63,232,480 | I cannot figure out why this breaks it. I have an a element which uses CSS transitions to fade into a gradient background on hover. For whatever reason whenever I set the text color on hover to white the transition breaks?
```css
.social-item {
margin-left: 0.25vw;
padding: 0.1vw;
transition: 0.2s;
col... | 2020/08/03 | [
"https://Stackoverflow.com/questions/63232480",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14042866/"
] | There is a reason, when writing in swift UI (iOS Apps), that there is a View protocol that needs to be followed. Calling functions from inside the structure is not compliant with the protocol.
The best thing you can do is the .on(insertTimeORAction here).
[Read more about it here](https://developer.apple.com/document... | An additional method:
Testing with Swift 5.8, you can also stick in a `let _ = self.testFunction()`.
eg
(this is extra-contrived so that it's possible to see the effect in Preview, because print() doesn't happen in Preview, at least for me)
```
import SwiftUI
class MyClass {
var counter = 0
}
struct ContentVie... |
29,020,638 | Currently if I set the TERM environment variable to 'xterm-1003' I can get mouse move events but I get crappy colors and curses.can\_change\_color() == False
```
os.environ['TERM'] = 'xterm-1003'
...
curses.mousemask(curses.ALL_MOUSE_EVENTS | curses.REPORT_MOUSE_POSITION)
...
while True:
event = screen.getch()
... | 2015/03/12 | [
"https://Stackoverflow.com/questions/29020638",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4424383/"
] | You can always make your own, using [infocmp](http://invisible-island.net/ncurses/man/infocmp.1m.html) (to show the contents of an entry), and [tic](http://invisible-island.net/ncurses/man/tic.1m.html) (to compile an entry). If you do not have permission to write in the system area, it goes to $HOME/.terminfo
Start by... | The problem: **Mouse position reported even when no mouse button held down.**
This answer is intended to be an extension of the other [answer here posted by Thomas Dickey](https://stackoverflow.com/a/29023361/7915759). Using the links provided and basic steps, I managed to find an XM string that gave me the mouse beha... |
39,021,119 | I need build port with something as in shell:
>
> cd /usr/ports/www/nginx/ && make HTTP\_GEOIP=YES BATCH=yes
>
>
>
I can find [any](http://docs.ansible.com/ansible/portinstall_module.html) document, how run this with [ansible module portinstall](https://github.com/ansible/ansible-modules-extras/blob/devel/packagi... | 2016/08/18 | [
"https://Stackoverflow.com/questions/39021119",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/948657/"
] | I'd propose to keep local file of customized build options and copy it to the host before portinstall.
```
- name: Copy customized build options
copy: src="{{role_path}}/files/nginx-build-options"
dest="/var/db/ports/www_nginx/options"
- name: Install nginx from the port
portinstall: name=nginx state=pres... | Seems like this operation is not implemented in the [port\_install module](http://docs.ansible.com/ansible/portinstall_module.html) The module is part of the [ansible-module-extra repository](http://docs.ansible.com/ansible/modules_extra.html) which means:
>
> These modules are currently shipped with Ansible, but mig... |
39,021,119 | I need build port with something as in shell:
>
> cd /usr/ports/www/nginx/ && make HTTP\_GEOIP=YES BATCH=yes
>
>
>
I can find [any](http://docs.ansible.com/ansible/portinstall_module.html) document, how run this with [ansible module portinstall](https://github.com/ansible/ansible-modules-extras/blob/devel/packagi... | 2016/08/18 | [
"https://Stackoverflow.com/questions/39021119",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/948657/"
] | I'd like to add. Unfortunately, the proposed workaround is not idempotent.
`- name: Build Nginx with geoip.
command: make HTTP_GEOIP=YES BATCH=yes
args:
chdir: /usr/ports/www/nginx/`
This means, that it will be always reported as "changed". | Seems like this operation is not implemented in the [port\_install module](http://docs.ansible.com/ansible/portinstall_module.html) The module is part of the [ansible-module-extra repository](http://docs.ansible.com/ansible/modules_extra.html) which means:
>
> These modules are currently shipped with Ansible, but mig... |
39,021,119 | I need build port with something as in shell:
>
> cd /usr/ports/www/nginx/ && make HTTP\_GEOIP=YES BATCH=yes
>
>
>
I can find [any](http://docs.ansible.com/ansible/portinstall_module.html) document, how run this with [ansible module portinstall](https://github.com/ansible/ansible-modules-extras/blob/devel/packagi... | 2016/08/18 | [
"https://Stackoverflow.com/questions/39021119",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/948657/"
] | I'd like to add. Unfortunately, the proposed workaround is not idempotent.
`- name: Build Nginx with geoip.
command: make HTTP_GEOIP=YES BATCH=yes
args:
chdir: /usr/ports/www/nginx/`
This means, that it will be always reported as "changed". | I'd propose to keep local file of customized build options and copy it to the host before portinstall.
```
- name: Copy customized build options
copy: src="{{role_path}}/files/nginx-build-options"
dest="/var/db/ports/www_nginx/options"
- name: Install nginx from the port
portinstall: name=nginx state=pres... |
56,246,805 | I have a Map and a HashSet.
The goal is to check the contents of the Set against the Map and add it to the Map if the elements are there in the HashSet but not in the Map.
```
// Map is defined in a class
private final Map<String, A> sb = new ConcurrentHashMap<>();
public void someMethod() {
Set<A> hSet = new H... | 2019/05/21 | [
"https://Stackoverflow.com/questions/56246805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11477352/"
] | if you want to search in map values:
```
if(!map.values().contains(a))
// put a in the map
```
if you want to look for keys
```
if(!map.containsKey(a))
// put a in the map
```
keep in mind that contains calls equals so in your A class you have to implement hashCode and equals. | ```
for (String element : hSet) {
if (!sb.containsKey(element)) {
sb.put(element, A);
}
}
``` |
56,246,805 | I have a Map and a HashSet.
The goal is to check the contents of the Set against the Map and add it to the Map if the elements are there in the HashSet but not in the Map.
```
// Map is defined in a class
private final Map<String, A> sb = new ConcurrentHashMap<>();
public void someMethod() {
Set<A> hSet = new H... | 2019/05/21 | [
"https://Stackoverflow.com/questions/56246805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11477352/"
] | ```
public static void main(String[] args) {
Set<String> set = Stream.of("a","b","c","d").collect(Collectors.toSet());
Map<String, String> map = new HashMap<String, String>();
map.put("a", "foo");
map.put("h", "bar");
map.put("c", "ipsum");
for (String string : set) {
if(!map.containsKe... | ```
for (String element : hSet) {
if (!sb.containsKey(element)) {
sb.put(element, A);
}
}
``` |
56,246,805 | I have a Map and a HashSet.
The goal is to check the contents of the Set against the Map and add it to the Map if the elements are there in the HashSet but not in the Map.
```
// Map is defined in a class
private final Map<String, A> sb = new ConcurrentHashMap<>();
public void someMethod() {
Set<A> hSet = new H... | 2019/05/21 | [
"https://Stackoverflow.com/questions/56246805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11477352/"
] | ```
for (String element : hSet) {
if (!sb.containsKey(element)) {
sb.put(element, A);
}
}
``` | Following could also be solution:
```
private final Map<String, A> sb = new ConcurrentHashMap<>();
public void someMethod() {
Set<String> set = new HashSet<>();
set.stream().filter(word -> !sb.containsKey(word))
.forEach(word -> sb.put(word, correspondingValueOfTypeA));
}
``` |
56,246,805 | I have a Map and a HashSet.
The goal is to check the contents of the Set against the Map and add it to the Map if the elements are there in the HashSet but not in the Map.
```
// Map is defined in a class
private final Map<String, A> sb = new ConcurrentHashMap<>();
public void someMethod() {
Set<A> hSet = new H... | 2019/05/21 | [
"https://Stackoverflow.com/questions/56246805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11477352/"
] | if you want to search in map values:
```
if(!map.values().contains(a))
// put a in the map
```
if you want to look for keys
```
if(!map.containsKey(a))
// put a in the map
```
keep in mind that contains calls equals so in your A class you have to implement hashCode and equals. | Following could also be solution:
```
private final Map<String, A> sb = new ConcurrentHashMap<>();
public void someMethod() {
Set<String> set = new HashSet<>();
set.stream().filter(word -> !sb.containsKey(word))
.forEach(word -> sb.put(word, correspondingValueOfTypeA));
}
``` |
56,246,805 | I have a Map and a HashSet.
The goal is to check the contents of the Set against the Map and add it to the Map if the elements are there in the HashSet but not in the Map.
```
// Map is defined in a class
private final Map<String, A> sb = new ConcurrentHashMap<>();
public void someMethod() {
Set<A> hSet = new H... | 2019/05/21 | [
"https://Stackoverflow.com/questions/56246805",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11477352/"
] | ```
public static void main(String[] args) {
Set<String> set = Stream.of("a","b","c","d").collect(Collectors.toSet());
Map<String, String> map = new HashMap<String, String>();
map.put("a", "foo");
map.put("h", "bar");
map.put("c", "ipsum");
for (String string : set) {
if(!map.containsKe... | Following could also be solution:
```
private final Map<String, A> sb = new ConcurrentHashMap<>();
public void someMethod() {
Set<String> set = new HashSet<>();
set.stream().filter(word -> !sb.containsKey(word))
.forEach(word -> sb.put(word, correspondingValueOfTypeA));
}
``` |
445,763 | I have a few hundred files named hortstu01-01-14 then hortstu01-02-14... Do you get the idea?
Well half of the files are named hortstu\_01-03-14 then hortstu\_01-04-14.
This messes up sorting the files by name and getting them in the order I'd prefer them to be. So I'd like to rename the ones without the underscore t... | 2014/04/10 | [
"https://askubuntu.com/questions/445763",
"https://askubuntu.com",
"https://askubuntu.com/users/121408/"
] | Open a terminal. Firstly, double check you have the perl `rename`, by typing `man rename`. At the bottom, it should say `perl v5.18.2` or similar. (I think Ubuntu always ships the perl `rename`, but other distros ship other versions.)
If it's the correct version, then `cd` to the directory that contains these files. T... | Or a Bash one liner navigate to the folder with the files and then run this in terminal:
```
for file in hortsu*;do echo "$file" "${file/_/-}";done;
```
Basically what this does is for files with the name 'hortsu' followed by any characters '\*', echo the name of "$file" and also the name of file with all underscore... |
445,763 | I have a few hundred files named hortstu01-01-14 then hortstu01-02-14... Do you get the idea?
Well half of the files are named hortstu\_01-03-14 then hortstu\_01-04-14.
This messes up sorting the files by name and getting them in the order I'd prefer them to be. So I'd like to rename the ones without the underscore t... | 2014/04/10 | [
"https://askubuntu.com/questions/445763",
"https://askubuntu.com",
"https://askubuntu.com/users/121408/"
] | Open a terminal. Firstly, double check you have the perl `rename`, by typing `man rename`. At the bottom, it should say `perl v5.18.2` or similar. (I think Ubuntu always ships the perl `rename`, but other distros ship other versions.)
If it's the correct version, then `cd` to the directory that contains these files. T... | For those who prefer GUI applications or just like the ability to preview the result, you might want to install Thunar. It's the main file manager of XFCE; you find it in the repositories.
When you select multiple files in Thunar and rename them (via context menu or F2), you get an elaborate dialog which support all k... |
79,854 | You can decompose a number greater than 0 as a unique sum of positive Fibonacci numbers. In this question we do this by repeatedly subtracting the **largest possible** positive Fibonacci number. E.g.:
```
1 = 1
2 = 2
3 = 3
4 = 3 + 1
12 = 8 + 3 + 1
13 = 13
100 = 89 + 8 + 3
```
Now, I call a *Fibonacci product* the sa... | 2016/05/13 | [
"https://codegolf.stackexchange.com/questions/79854",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/4162/"
] | Python, 54 bytes
----------------
```py
f=lambda n,a=1,b=1:n<1or b>n and a*f(n-a)or f(n,b,a+b)
```
Just some good old recursion. | Haskell, 44 bytes
=================
Yay for mutual recursion:
```
(a&b)c|c<1=1|b>c=a*f(c-a)|d<-a+b=b&d$c
f=0&1
```
* `a` is the previous Fibonacci number
* `b` is the current Fibonacci number
* `c` is the input
* `f` is the desired function
Less golfed:
```
(a & b) c | c == 0 = 1
| c < b = a * f ... |
79,854 | You can decompose a number greater than 0 as a unique sum of positive Fibonacci numbers. In this question we do this by repeatedly subtracting the **largest possible** positive Fibonacci number. E.g.:
```
1 = 1
2 = 2
3 = 3
4 = 3 + 1
12 = 8 + 3 + 1
13 = 13
100 = 89 + 8 + 3
```
Now, I call a *Fibonacci product* the sa... | 2016/05/13 | [
"https://codegolf.stackexchange.com/questions/79854",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/4162/"
] | [Jelly](https://github.com/DennisMitchell/jelly), 10 bytes
==========================================================
```
ŒṗḟÐḟÆḞ€ṪP
```
[Try it online!](https://tio.run/##y0rNyan8///opIc7pz/cMf/wBBDR9nDHvEdNax7uXBXw//9/MwMA "Jelly – Try It Online")
Times out for \$n > 60\$
How it works
------------
```
ŒṗḟÐḟÆḞ€Ṫ... | Javascript (ES6) ~~134~~ ~~106~~ 92 bytes
=========================================
Thanks for @cat for spotting a space.
```
n=>{for(c=[a=b=s=1,1];a+b<=n;)a+=b,c.unshift(b+=a,a);c.map(i=>i<=n&&(n-=i)&(s*=i));alert(s)}
```
Just an unoptimized version made on my phone, I golf it down, once I get home. Ideas are welc... |
79,854 | You can decompose a number greater than 0 as a unique sum of positive Fibonacci numbers. In this question we do this by repeatedly subtracting the **largest possible** positive Fibonacci number. E.g.:
```
1 = 1
2 = 2
3 = 3
4 = 3 + 1
12 = 8 + 3 + 1
13 = 13
100 = 89 + 8 + 3
```
Now, I call a *Fibonacci product* the sa... | 2016/05/13 | [
"https://codegolf.stackexchange.com/questions/79854",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/4162/"
] | Python, 54 bytes
----------------
```py
f=lambda n,a=1,b=1:n<1or b>n and a*f(n-a)or f(n,b,a+b)
```
Just some good old recursion. | Q, 47 Bytes
-----------
```
m:{*/1_-':|(0<){y-x x bin y}[*+60(|+\)\1 0]\x}
```
**Test**
```
+(i;m'i:1 2 3 4 5 6 7 8 9 42 1000 12345)
```
read it as pairs (i,map(m,i)), where m is the calculating function and i the different args
writes
```
1 1
2 2
3 3
4 3
5 5
6 5
7 10
8 8
9 8... |
79,854 | You can decompose a number greater than 0 as a unique sum of positive Fibonacci numbers. In this question we do this by repeatedly subtracting the **largest possible** positive Fibonacci number. E.g.:
```
1 = 1
2 = 2
3 = 3
4 = 3 + 1
12 = 8 + 3 + 1
13 = 13
100 = 89 + 8 + 3
```
Now, I call a *Fibonacci product* the sa... | 2016/05/13 | [
"https://codegolf.stackexchange.com/questions/79854",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/4162/"
] | Haskell, 44 bytes
=================
Yay for mutual recursion:
```
(a&b)c|c<1=1|b>c=a*f(c-a)|d<-a+b=b&d$c
f=0&1
```
* `a` is the previous Fibonacci number
* `b` is the current Fibonacci number
* `c` is the input
* `f` is the desired function
Less golfed:
```
(a & b) c | c == 0 = 1
| c < b = a * f ... | Actually, 22 bytes
------------------
```
W;╗uR♂F;`╜≥`M░M;╜-WXkπ
```
[Try it online!](http://actually.tryitonline.net/#code=VzvilZd1UuKZgkY7YOKVnOKJpWBN4paRTTvilZwtV1hrz4A&input=MTAw)
Explanation:
```
W;╗uR♂F;`╜≥`M░M;╜-WXkπ
(implicit input)
W W while top of stack is trut... |
79,854 | You can decompose a number greater than 0 as a unique sum of positive Fibonacci numbers. In this question we do this by repeatedly subtracting the **largest possible** positive Fibonacci number. E.g.:
```
1 = 1
2 = 2
3 = 3
4 = 3 + 1
12 = 8 + 3 + 1
13 = 13
100 = 89 + 8 + 3
```
Now, I call a *Fibonacci product* the sa... | 2016/05/13 | [
"https://codegolf.stackexchange.com/questions/79854",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/4162/"
] | [Jelly](http://github.com/DennisMitchell/jelly), ~~16~~ 15 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
==========================================================================================================================
```
Rf1+С¤ṪạµÐĿIAP
```
Not particularly fast or memory friendly, but e... | Actually, 22 bytes
------------------
```
W;╗uR♂F;`╜≥`M░M;╜-WXkπ
```
[Try it online!](http://actually.tryitonline.net/#code=VzvilZd1UuKZgkY7YOKVnOKJpWBN4paRTTvilZwtV1hrz4A&input=MTAw)
Explanation:
```
W;╗uR♂F;`╜≥`M░M;╜-WXkπ
(implicit input)
W W while top of stack is trut... |
79,854 | You can decompose a number greater than 0 as a unique sum of positive Fibonacci numbers. In this question we do this by repeatedly subtracting the **largest possible** positive Fibonacci number. E.g.:
```
1 = 1
2 = 2
3 = 3
4 = 3 + 1
12 = 8 + 3 + 1
13 = 13
100 = 89 + 8 + 3
```
Now, I call a *Fibonacci product* the sa... | 2016/05/13 | [
"https://codegolf.stackexchange.com/questions/79854",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/4162/"
] | [Jelly](http://github.com/DennisMitchell/jelly), ~~16~~ 15 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
==========================================================================================================================
```
Rf1+С¤ṪạµÐĿIAP
```
Not particularly fast or memory friendly, but e... | JavaScript (ES6), ~~78~~ 42 bytes
---------------------------------
```
f=(n,a=1,b=1)=>n?b>n?a*f(n-a):f(n,b,a+b):1
```
Port of @Sp3000's answer. Original 78 byte version:
```
f=(n,a=[2,1])=>n>a[0]?f(n,[a[0]+a[1],...a]):a.map(e=>e>n?0:(r*=e,n-=e),r=1)&&r
``` |
79,854 | You can decompose a number greater than 0 as a unique sum of positive Fibonacci numbers. In this question we do this by repeatedly subtracting the **largest possible** positive Fibonacci number. E.g.:
```
1 = 1
2 = 2
3 = 3
4 = 3 + 1
12 = 8 + 3 + 1
13 = 13
100 = 89 + 8 + 3
```
Now, I call a *Fibonacci product* the sa... | 2016/05/13 | [
"https://codegolf.stackexchange.com/questions/79854",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/4162/"
] | [Jelly](https://github.com/DennisMitchell/jelly), 10 bytes
==========================================================
```
ŒṗḟÐḟÆḞ€ṪP
```
[Try it online!](https://tio.run/##y0rNyan8///opIc7pz/cMf/wBBDR9nDHvEdNax7uXBXw//9/MwMA "Jelly – Try It Online")
Times out for \$n > 60\$
How it works
------------
```
ŒṗḟÐḟÆḞ€Ṫ... | Q, 47 Bytes
-----------
```
m:{*/1_-':|(0<){y-x x bin y}[*+60(|+\)\1 0]\x}
```
**Test**
```
+(i;m'i:1 2 3 4 5 6 7 8 9 42 1000 12345)
```
read it as pairs (i,map(m,i)), where m is the calculating function and i the different args
writes
```
1 1
2 2
3 3
4 3
5 5
6 5
7 10
8 8
9 8... |
79,854 | You can decompose a number greater than 0 as a unique sum of positive Fibonacci numbers. In this question we do this by repeatedly subtracting the **largest possible** positive Fibonacci number. E.g.:
```
1 = 1
2 = 2
3 = 3
4 = 3 + 1
12 = 8 + 3 + 1
13 = 13
100 = 89 + 8 + 3
```
Now, I call a *Fibonacci product* the sa... | 2016/05/13 | [
"https://codegolf.stackexchange.com/questions/79854",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/4162/"
] | Perl, ~~69~~ 63 + 4 (`-pl61` flag) = 67 bytes
=============================================
```
#!perl -pl61
while($_){$n=$m=1;($n,$m)=($m,$n+$m)until$m>$_;$_-=$n;$\*=$n}}{
```
Using:
```
> echo 42 | perl -pl61e 'while($_){$n=$m=1;($n,$m)=($m,$n+$m)until$m>$_;$_-=$n;$\*=$n}}{'
```
Ungolfed:
```perl
while (<>) {
... | Haskell, 44 bytes
=================
Yay for mutual recursion:
```
(a&b)c|c<1=1|b>c=a*f(c-a)|d<-a+b=b&d$c
f=0&1
```
* `a` is the previous Fibonacci number
* `b` is the current Fibonacci number
* `c` is the input
* `f` is the desired function
Less golfed:
```
(a & b) c | c == 0 = 1
| c < b = a * f ... |
79,854 | You can decompose a number greater than 0 as a unique sum of positive Fibonacci numbers. In this question we do this by repeatedly subtracting the **largest possible** positive Fibonacci number. E.g.:
```
1 = 1
2 = 2
3 = 3
4 = 3 + 1
12 = 8 + 3 + 1
13 = 13
100 = 89 + 8 + 3
```
Now, I call a *Fibonacci product* the sa... | 2016/05/13 | [
"https://codegolf.stackexchange.com/questions/79854",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/4162/"
] | Perl, ~~69~~ 63 + 4 (`-pl61` flag) = 67 bytes
=============================================
```
#!perl -pl61
while($_){$n=$m=1;($n,$m)=($m,$n+$m)until$m>$_;$_-=$n;$\*=$n}}{
```
Using:
```
> echo 42 | perl -pl61e 'while($_){$n=$m=1;($n,$m)=($m,$n+$m)until$m>$_;$_-=$n;$\*=$n}}{'
```
Ungolfed:
```perl
while (<>) {
... | [RETURN](https://github.com/molarmanful/RETURN), 44 bytes
=========================================================
```
[a:[a;][1$[¤¤+$a;->~][]#%$␌a;\-a:]#␁[¤][×]#]
```
`[Try it here.](http://molarmanful.github.io/RETURN/)`
Astonishingly inefficient anonymous lambda that leaves result on Stack2. Usage:
```
12345[a... |
79,854 | You can decompose a number greater than 0 as a unique sum of positive Fibonacci numbers. In this question we do this by repeatedly subtracting the **largest possible** positive Fibonacci number. E.g.:
```
1 = 1
2 = 2
3 = 3
4 = 3 + 1
12 = 8 + 3 + 1
13 = 13
100 = 89 + 8 + 3
```
Now, I call a *Fibonacci product* the sa... | 2016/05/13 | [
"https://codegolf.stackexchange.com/questions/79854",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/4162/"
] | Perl, ~~69~~ 63 + 4 (`-pl61` flag) = 67 bytes
=============================================
```
#!perl -pl61
while($_){$n=$m=1;($n,$m)=($m,$n+$m)until$m>$_;$_-=$n;$\*=$n}}{
```
Using:
```
> echo 42 | perl -pl61e 'while($_){$n=$m=1;($n,$m)=($m,$n+$m)until$m>$_;$_-=$n;$\*=$n}}{'
```
Ungolfed:
```perl
while (<>) {
... | Q, 47 Bytes
-----------
```
m:{*/1_-':|(0<){y-x x bin y}[*+60(|+\)\1 0]\x}
```
**Test**
```
+(i;m'i:1 2 3 4 5 6 7 8 9 42 1000 12345)
```
read it as pairs (i,map(m,i)), where m is the calculating function and i the different args
writes
```
1 1
2 2
3 3
4 3
5 5
6 5
7 10
8 8
9 8... |
3,757,321 | I am trying to use R to estimate a multinomial logit model with a manual specification. I have found a few packages that allow you to estimate MNL models [here](http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/VGAM/html/multinomial.html) or [here](http://cran.r-project.org/web/packages/mlogit/index.html).
I've found... | 2010/09/21 | [
"https://Stackoverflow.com/questions/3757321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/415635/"
] | Tried with the nlm() function already? Don't know if it's much faster, but it does improve speed. Also check the options. optim uses a slow algorithm as the default. You can gain a > 5-fold speedup by using the Quasi-Newton algorithm (method="BFGS") instead of the default. If you're not concerned too much about the las... | Did you consider the material on the [CRAN Task View for Optimization](http://cran.r-project.org/web/views/Optimization.html) ? |
3,757,321 | I am trying to use R to estimate a multinomial logit model with a manual specification. I have found a few packages that allow you to estimate MNL models [here](http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/VGAM/html/multinomial.html) or [here](http://cran.r-project.org/web/packages/mlogit/index.html).
I've found... | 2010/09/21 | [
"https://Stackoverflow.com/questions/3757321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/415635/"
] | Tried with the nlm() function already? Don't know if it's much faster, but it does improve speed. Also check the options. optim uses a slow algorithm as the default. You can gain a > 5-fold speedup by using the Quasi-Newton algorithm (method="BFGS") instead of the default. If you're not concerned too much about the las... | FWIW, I've done this in C-ish, using OPTIF9. You'd be hard-pressed to go faster than that. There are plenty of ways for something to go slower, such as by running an interpreter like R.
Added: From the comments, it's clear that OPTIF9 is used as the optimizing engine. That means that most likely the bulk of the time i... |
3,757,321 | I am trying to use R to estimate a multinomial logit model with a manual specification. I have found a few packages that allow you to estimate MNL models [here](http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/VGAM/html/multinomial.html) or [here](http://cran.r-project.org/web/packages/mlogit/index.html).
I've found... | 2010/09/21 | [
"https://Stackoverflow.com/questions/3757321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/415635/"
] | Tried with the nlm() function already? Don't know if it's much faster, but it does improve speed. Also check the options. optim uses a slow algorithm as the default. You can gain a > 5-fold speedup by using the Quasi-Newton algorithm (method="BFGS") instead of the default. If you're not concerned too much about the las... | I am the author of the R package **optimParallel**, which could be helpful in your case. The package provides parallel versions of the gradient-based optimization methods of `optim()`. The main function of the package is `optimParallel()`, which has the same usage and output as `optim()`. Using `optimParallel()` can si... |
3,757,321 | I am trying to use R to estimate a multinomial logit model with a manual specification. I have found a few packages that allow you to estimate MNL models [here](http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/VGAM/html/multinomial.html) or [here](http://cran.r-project.org/web/packages/mlogit/index.html).
I've found... | 2010/09/21 | [
"https://Stackoverflow.com/questions/3757321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/415635/"
] | Did you consider the material on the [CRAN Task View for Optimization](http://cran.r-project.org/web/views/Optimization.html) ? | FWIW, I've done this in C-ish, using OPTIF9. You'd be hard-pressed to go faster than that. There are plenty of ways for something to go slower, such as by running an interpreter like R.
Added: From the comments, it's clear that OPTIF9 is used as the optimizing engine. That means that most likely the bulk of the time i... |
3,757,321 | I am trying to use R to estimate a multinomial logit model with a manual specification. I have found a few packages that allow you to estimate MNL models [here](http://hosho.ees.hokudai.ac.jp/~kubo/Rdoc/library/VGAM/html/multinomial.html) or [here](http://cran.r-project.org/web/packages/mlogit/index.html).
I've found... | 2010/09/21 | [
"https://Stackoverflow.com/questions/3757321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/415635/"
] | I am the author of the R package **optimParallel**, which could be helpful in your case. The package provides parallel versions of the gradient-based optimization methods of `optim()`. The main function of the package is `optimParallel()`, which has the same usage and output as `optim()`. Using `optimParallel()` can si... | FWIW, I've done this in C-ish, using OPTIF9. You'd be hard-pressed to go faster than that. There are plenty of ways for something to go slower, such as by running an interpreter like R.
Added: From the comments, it's clear that OPTIF9 is used as the optimizing engine. That means that most likely the bulk of the time i... |
54,006 | Does Virgin Galatic go into space high enough to experience real weightlessness?
A CNBC article states it's more microgravity centrifugal:
>
> The spacecraft essentially does a slow back flip at the edge of space, with passengers spending a few minutes floating in microgravity
>
>
>
*[How SpaceX, Virgin Galactic... | 2021/07/06 | [
"https://space.stackexchange.com/questions/54006",
"https://space.stackexchange.com",
"https://space.stackexchange.com/users/42278/"
] | Yes, for a few minutes. It is similar to what is done in a zero gravity airplane flight, but a longer period of time.
Also, orbital weightlessness is basically the same thing, the spacecraft and you are falling at the same rate. | Virgin Galactic's flights are sub-orbital and pass below the [Kármán line](https://en.wikipedia.org/wiki/K%C3%A1rm%C3%A1n_line) (about 100 km up), so technically the passengers don't qualify as astronauts in space, but while they experience weightlessness, this is a consequence of the trajectory of their spacecraft rat... |
54,006 | Does Virgin Galatic go into space high enough to experience real weightlessness?
A CNBC article states it's more microgravity centrifugal:
>
> The spacecraft essentially does a slow back flip at the edge of space, with passengers spending a few minutes floating in microgravity
>
>
>
*[How SpaceX, Virgin Galactic... | 2021/07/06 | [
"https://space.stackexchange.com/questions/54006",
"https://space.stackexchange.com",
"https://space.stackexchange.com/users/42278/"
] | This is a point worth emphasizing: When you dive off a high dive, or go on a free fall ride at an amusement park, or fly on Virgin Galactic, you are experiencing weightlessness in exactly the same way as the astronauts on the ISS.
At the height of the ISS, the earth's gravity is about [90% of what it is at sea level](... | Virgin Galactic's flights are sub-orbital and pass below the [Kármán line](https://en.wikipedia.org/wiki/K%C3%A1rm%C3%A1n_line) (about 100 km up), so technically the passengers don't qualify as astronauts in space, but while they experience weightlessness, this is a consequence of the trajectory of their spacecraft rat... |
114,561 | I'm following the freecodecamp solidity tutorial and unfortunately I get a mistake when I try to get the nonce meaning. I use web3.py and ganache as it's shown in the tutorial. Here's my code:
```
from solcx import compile_standard, install_solc
import json
from web3 import Web3
with open("./SimpleStorage.sol", "r") ... | 2021/11/29 | [
"https://ethereum.stackexchange.com/questions/114561",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/86790/"
] | `http://0.0.0.0:8545` is not a valid Ethereum JSON-RPC node URL. PLease get a valid node.
[Here are some examples](https://ethereumnodes.com/). | Please double check the address from RPC Server on Ganache |
58,205,847 | I'm trying to extract data between two quotes using the Google Sheets REGEXEXTRACT function.
The regex works perfect:
```
(?<=actor_email":")(.*?)(?=")
```
Data in the cell is:
```
{"account_name":"Test","actor_email":"test@test.com","user_email":"anyone@test.com"}
```
However, placing it within the Google Sheet... | 2019/10/02 | [
"https://Stackoverflow.com/questions/58205847",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2193480/"
] | Restarting the "Azure Pipelines Agent (MyCompanyName.MyMachineName)" service on the build server solved this for me. | This is because you have committed your `bin` folder to source control. `bin` and `obj` folders should **never** be committed to source control. Remove it and ensure it is never re-added by making an appropriate `.tfignore` or `.gitignore` depending on whether you are using Git or TFVC for source control. |
4,114,052 | I need to 'scale' text to fill an antire HTML5 canvas. It appears that the `scale()` method does not affect text. I've seen approximation methods with iterative loops on the `measureText()` method but this doesn't get me exactly what I need. Ideally I'd like to fill both horizontally and vertically without conserving t... | 2010/11/06 | [
"https://Stackoverflow.com/questions/4114052",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/346490/"
] | My bad - Scale DOES apply to text. I've come up with a solution:
```
context.font = "20px 'Segoe UI'";
var metrics = context.measureText("Testing!");
var textWidth = metrics.width;
var scalex = (canvas.width / textWidth);
var scaley = (canvas.height / 23);
var ypos = (canvas.height / (scaley * 1.25));
context.scale... | Scale does affect text. Try this:
```
var can = document.getElementById('test');
var ctx = can.getContext('2d');
ctx.fillText("test", 10, 10); // not scaled text
ctx.scale(3,3);
ctx.fillText("test", 10, 10); // scaled text
```
See it in action here:
<http://jsfiddle.net/3zeBk/8/> |
16,401,449 | I am working on a project where I'm creating lots, (potentially x,000,000s) of images.
When they are created, they are created on the fly and are blobs. e.g.
```
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAO... etc
```
Is it safe and efficient to save them as they are in MySQL or would you recommend saving them ... | 2013/05/06 | [
"https://Stackoverflow.com/questions/16401449",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/973552/"
] | Try this code ->
```
JSONObject dObject = output.getJSONObject("d")
this.UserID = dObject.getInt("med_ID");
this.gebGUID = dObject.getString("geb_GUID"); // As your geb_GUID is String object
``` | If you want to convert a json string into an object, you can use :
```
Type type = new TypeToken<HashMap<String, ArrayList<String>>>(){}.getType();
HashMap<String, ArrayList<String>> result = new Gson().fromJson(json, type);
```
You can change the type, in my case it was a `HashMap<String, ArrayList<String>>`. |
177,098 | <https://stackoverflow.com/a/16086837/438992> (10k+)
The question is (redux) "Is there an advantage/difference" but it's a simple shortcut method, and the says so explicitly. Few of the other answers offer significantly more information, except for Stefan's.
At least partially I suspect it's some intra-user hostility... | 2013/04/18 | [
"https://meta.stackexchange.com/questions/177098",
"https://meta.stackexchange.com",
"https://meta.stackexchange.com/users/168933/"
] | It seems to me that your answer is too terse to qualify. 'The docs'? The docs of what? I know you mean jQuery, but to the google-landing reader, it's potentially opaque. A slightly more verbose formulation ("They do exactly the same thing, one is a notational shortcut for the other, see the jQuery doc") would pass in m... | Since it was my question, I would say that my only gripe with your answer was that I was interested in the theoretical, not the practical differences, and why people would have a preference. I stated in the question that I knew both methods worked, so while I didn't necessarily agree that yours wasn't a valid answer, i... |
177,098 | <https://stackoverflow.com/a/16086837/438992> (10k+)
The question is (redux) "Is there an advantage/difference" but it's a simple shortcut method, and the says so explicitly. Few of the other answers offer significantly more information, except for Stefan's.
At least partially I suspect it's some intra-user hostility... | 2013/04/18 | [
"https://meta.stackexchange.com/questions/177098",
"https://meta.stackexchange.com",
"https://meta.stackexchange.com/users/168933/"
] | It seems to me that your answer is too terse to qualify. 'The docs'? The docs of what? I know you mean jQuery, but to the google-landing reader, it's potentially opaque. A slightly more verbose formulation ("They do exactly the same thing, one is a notational shortcut for the other, see the jQuery doc") would pass in m... | I was going to answer "Too terse", but that was too terse. |
62,055,789 | In my React Native App, i have a simple FlatList. Flatlist's render item is a component "SearchItem.js"
I need to re-initialize a state inside this component each time my component is called.
Flatlist
```
<FlatList
ListFooterComponent={<View style={{ paddingBottom... | 2020/05/28 | [
"https://Stackoverflow.com/questions/62055789",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13246365/"
] | Your last layer `model.add(layers.Dense(7))` is using linear activation function. To get probability of 7 classes, you should use `softmax` activation.
Change your last layer to
```
model.add(layers.Dense(7 , activation='softmax'))
``` | add an Activation Layer to convert your output value into value of [0,1] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.