qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
13,232
Does anyone know the difference between the 3rd and 4th edition of "100 Endgames You Must Know"? I just looked at the Table Of Contents and they are identical and random pages on Amazon look the same too. I would imagine there must be some new use of the new tablebases that were completed since 2012?
2015/12/29
[ "https://chess.stackexchange.com/questions/13232", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/9096/" ]
De la Villa's "100 Endgames you must know", though apparently a good book seems to have been plagued by an abundance of typos and mistakes as [detailed in this blogpost.](http://streathambrixtonchess.blogspot.com.es/2012/08/sixty-memorable-annotations.html) So although the culprit in this case has been the 2nd edition...
I have the book on Chessable (popular site for reading chess books like this one): > > <https://www.chessable.com/endgame-book/100-endgames-you-must-know/5193/> > > > [![enter image description here](https://i.stack.imgur.com/jTMne.png)](https://i.stack.imgur.com/jTMne.png) The difference in edition come from im...
13,232
Does anyone know the difference between the 3rd and 4th edition of "100 Endgames You Must Know"? I just looked at the Table Of Contents and they are identical and random pages on Amazon look the same too. I would imagine there must be some new use of the new tablebases that were completed since 2012?
2015/12/29
[ "https://chess.stackexchange.com/questions/13232", "https://chess.stackexchange.com", "https://chess.stackexchange.com/users/9096/" ]
I have the book on Chessable (popular site for reading chess books like this one): > > <https://www.chessable.com/endgame-book/100-endgames-you-must-know/5193/> > > > [![enter image description here](https://i.stack.imgur.com/jTMne.png)](https://i.stack.imgur.com/jTMne.png) The difference in edition come from im...
I know this answer is coming late, but as someone who had the 3rd edition and upgrated to the 4th edition I can answer this definitely. The ONLY difference in the new edition is that diagrams have an indicator of who is to move, and glancing at the text below the diagram it's very easy to see who is to move if you can'...
27,792,302
I'm trying to add JSF to my webstarterapp. I have created an JSF managed bean, but when compiling the app using the provided `build.xml`, I get the errors: ``` [javac] /Users/snowch/.../Customer.java:8: error: package javax.faces.bean does not exist [javac] import javax.faces.bean.ManagedBean; [javac] ...
2015/01/06
[ "https://Stackoverflow.com/questions/27792302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1033422/" ]
Below developer works article can help you (it has everything to get started with JSF2) along with required download details of lib files for Bluemix: <http://www.ibm.com/developerworks/library/j-richfaces4/> Although I had never worked on these things,hoping that it this article info may help you.
In the end, I updated the `build.xml` file to add a `pathelement` for `javax.faces.jar` that was sitting in my glassfish installation folder: ``` <path id="classpathDir"> <pathelement location="bin"/> <pathelement location="dep-jar/com.ibm.ws.javaee.jaxrs.1.1_1.0.1.jar"/> <!- added \/ --> <pathelement locatio...
379,988
I'm trying to make a database and so far, I've been using strings to store my entries from a text file into an array, but this just isn't working out. Thus, I began thinking of a new way of doing it. What I want to do: Lets say I have a text file with the following database... John Smith 00001 jsmith@email pw1 ...
2008/12/19
[ "https://Stackoverflow.com/questions/379988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Usually the term "database" is reserved to the standard notion of a relational database such as MySQL, MS SQL Server, Oracle etc' So this begs the question why don't you use a standard relational database? you might want to try looking up [TinySQL](http://www.jepstone.net/tinySQL/)
Read one line at a time with [`ifstream`](http://www.cplusplus.com/reference/iostream/ifstream/) and then use [`strtok`](http://www.cplusplus.com/reference/clibrary/cstring/strtok.html) to split each line, use the whitespace as the delimiter. You should use `string` except for the numeric values, which you can save as ...
379,988
I'm trying to make a database and so far, I've been using strings to store my entries from a text file into an array, but this just isn't working out. Thus, I began thinking of a new way of doing it. What I want to do: Lets say I have a text file with the following database... John Smith 00001 jsmith@email pw1 ...
2008/12/19
[ "https://Stackoverflow.com/questions/379988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
As TomWij says, you do ifstream then strtok, but I'd recommend you escape your strings with "", not just spaces, that way you can store "something like this, for example a note about the user", that's how its done with CSV (comma separated values). ``` #include <iostream> #include <string> #include <fstream> #include ...
Read one line at a time with [`ifstream`](http://www.cplusplus.com/reference/iostream/ifstream/) and then use [`strtok`](http://www.cplusplus.com/reference/clibrary/cstring/strtok.html) to split each line, use the whitespace as the delimiter. You should use `string` except for the numeric values, which you can save as ...
379,988
I'm trying to make a database and so far, I've been using strings to store my entries from a text file into an array, but this just isn't working out. Thus, I began thinking of a new way of doing it. What I want to do: Lets say I have a text file with the following database... John Smith 00001 jsmith@email pw1 ...
2008/12/19
[ "https://Stackoverflow.com/questions/379988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
As TomWij says, you do ifstream then strtok, but I'd recommend you escape your strings with "", not just spaces, that way you can store "something like this, for example a note about the user", that's how its done with CSV (comma separated values). ``` #include <iostream> #include <string> #include <fstream> #include ...
Usually the term "database" is reserved to the standard notion of a relational database such as MySQL, MS SQL Server, Oracle etc' So this begs the question why don't you use a standard relational database? you might want to try looking up [TinySQL](http://www.jepstone.net/tinySQL/)
379,988
I'm trying to make a database and so far, I've been using strings to store my entries from a text file into an array, but this just isn't working out. Thus, I began thinking of a new way of doing it. What I want to do: Lets say I have a text file with the following database... John Smith 00001 jsmith@email pw1 ...
2008/12/19
[ "https://Stackoverflow.com/questions/379988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Usually the term "database" is reserved to the standard notion of a relational database such as MySQL, MS SQL Server, Oracle etc' So this begs the question why don't you use a standard relational database? you might want to try looking up [TinySQL](http://www.jepstone.net/tinySQL/)
``` #include<iostream> #include<conio.h> #include<fstream> using namespace std; int main(int argc, char *argv[]) { char Name[100]; char FTE[100]; cout<<"What is the file name?\n"; cin>>FTE; ifstream myfile (FTE); while(1) { myfile.getline(Name, 30, '|'); cout<<l...
379,988
I'm trying to make a database and so far, I've been using strings to store my entries from a text file into an array, but this just isn't working out. Thus, I began thinking of a new way of doing it. What I want to do: Lets say I have a text file with the following database... John Smith 00001 jsmith@email pw1 ...
2008/12/19
[ "https://Stackoverflow.com/questions/379988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
As TomWij says, you do ifstream then strtok, but I'd recommend you escape your strings with "", not just spaces, that way you can store "something like this, for example a note about the user", that's how its done with CSV (comma separated values). ``` #include <iostream> #include <string> #include <fstream> #include ...
``` #include<iostream> #include<conio.h> #include<fstream> using namespace std; int main(int argc, char *argv[]) { char Name[100]; char FTE[100]; cout<<"What is the file name?\n"; cin>>FTE; ifstream myfile (FTE); while(1) { myfile.getline(Name, 30, '|'); cout<<l...
43,609,774
I have a java servlet that sends a json object to a jsp page in a javascript variabile with array format. Here is my servlet ( a part of it): ``` List<HistoryLeavesScalar> returnedPastInfo = SaveDAO.getPastInformation(username); JSONArray jsonArray = new JSONArray(returnedPastInfo); String s = jsonArray.toString(); ...
2017/04/25
[ "https://Stackoverflow.com/questions/43609774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6337109/" ]
You already have it as string: ``` String s = jsonArray.toString(); ``` Store `s` in session instead of `jsonArray`; ``` session.setAttribute("jsonArray", s); ``` And print it in the servlet: ``` var USER_DAYS = ${jsonArray}; ``` --- **MY TEST** Java servlet (with sample data): [![enter image description h...
you can write like this ``` <script> var DAYS = '${jsonArray}'; if(DAYS.length > 0 ){ var USER_DAYS = { id: DAYS[0].nr, date: DAYS[0].req, title: DAYS[0].type, startDate: new Date(DAYS[0].startDate), endDate: new Date(DAYS[0].endDate), ...
43,609,774
I have a java servlet that sends a json object to a jsp page in a javascript variabile with array format. Here is my servlet ( a part of it): ``` List<HistoryLeavesScalar> returnedPastInfo = SaveDAO.getPastInformation(username); JSONArray jsonArray = new JSONArray(returnedPastInfo); String s = jsonArray.toString(); ...
2017/04/25
[ "https://Stackoverflow.com/questions/43609774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6337109/" ]
You already have it as string: ``` String s = jsonArray.toString(); ``` Store `s` in session instead of `jsonArray`; ``` session.setAttribute("jsonArray", s); ``` And print it in the servlet: ``` var USER_DAYS = ${jsonArray}; ``` --- **MY TEST** Java servlet (with sample data): [![enter image description h...
You can parse your `jsonString` to javascript `JSON` object. Then you want to change some of the object key's of your `json` object, delete one more extra key `[e.g "Dep":"2017-04-19"]` and at last want add two key's with values in your final json object. ``` allDay: true, className: 'done' ``` Here is the solution....
43,487,492
I'm using the terminal which is integrated in Visual Studio Code. When I scroll up it shows the previous lines, but they are not enough for me. I need to see more lines. How can I increase the total number of lines that are displayed by the terminal in VS Code?
2017/04/19
[ "https://Stackoverflow.com/questions/43487492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1470116/" ]
There is a way to change number of lines for that you have to go: > > file-->preferences-->configuration > > > Then, it will open file `settings.json` you should to search `Integrated terminal` and then you search for `terminal.integrated.scrollback` copy and paste this sentence on your user configuration so like...
1. Go to `File -> Preferences -> Settings` [![terminal_limit_exceaded_menu](https://i.stack.imgur.com/oiieb.jpg)](https://i.stack.imgur.com/oiieb.jpg) 2. Search for `terminal` and open `settings.json` [![terminal_limit_exceaded](https://i.stack.imgur.com/J9yQg.jpg)](https://i.stack.imgur.com/J9yQg.jpg) 3. Add new l...
43,487,492
I'm using the terminal which is integrated in Visual Studio Code. When I scroll up it shows the previous lines, but they are not enough for me. I need to see more lines. How can I increase the total number of lines that are displayed by the terminal in VS Code?
2017/04/19
[ "https://Stackoverflow.com/questions/43487492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1470116/" ]
There is a way to change number of lines for that you have to go: > > file-->preferences-->configuration > > > Then, it will open file `settings.json` you should to search `Integrated terminal` and then you search for `terminal.integrated.scrollback` copy and paste this sentence on your user configuration so like...
Visual Studio Code Version 1.47.3, You can do it in Files --> Preferences --> Settings then select Feature/Terminal menu. Find the "Integrated:**Scrollback**" property and change it. Save the settings. [![enter image description here](https://i.stack.imgur.com/ijU2Q.png)](https://i.stack.imgur.com/ijU2Q.png)
43,487,492
I'm using the terminal which is integrated in Visual Studio Code. When I scroll up it shows the previous lines, but they are not enough for me. I need to see more lines. How can I increase the total number of lines that are displayed by the terminal in VS Code?
2017/04/19
[ "https://Stackoverflow.com/questions/43487492", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1470116/" ]
1. Go to `File -> Preferences -> Settings` [![terminal_limit_exceaded_menu](https://i.stack.imgur.com/oiieb.jpg)](https://i.stack.imgur.com/oiieb.jpg) 2. Search for `terminal` and open `settings.json` [![terminal_limit_exceaded](https://i.stack.imgur.com/J9yQg.jpg)](https://i.stack.imgur.com/J9yQg.jpg) 3. Add new l...
Visual Studio Code Version 1.47.3, You can do it in Files --> Preferences --> Settings then select Feature/Terminal menu. Find the "Integrated:**Scrollback**" property and change it. Save the settings. [![enter image description here](https://i.stack.imgur.com/ijU2Q.png)](https://i.stack.imgur.com/ijU2Q.png)
14,610,581
I dont understand why in the parent process my data is not set to what its set to in my child process. I create the shared\_data struct variable before I fork my program so it should be shared memory, correct? Here is the code: ``` #include <sys/types.h> #include <stdio.h> #include <unistd.h> #define MAX_SEQUENCE 2...
2013/01/30
[ "https://Stackoverflow.com/questions/14610581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1763669/" ]
Not with a raw C compiler unfortunately. You should try a lint tool, as splint, that might help you about this (I'm not sure, though).
> > Is there any way to still get warnings for 0-literals > > > I don't know about one, an anyway you don't want that. The constant numeric value 0, when assigned to a pointer, is implicitly treated as `NULL` without casting it to a pointer type.
14,610,581
I dont understand why in the parent process my data is not set to what its set to in my child process. I create the shared\_data struct variable before I fork my program so it should be shared memory, correct? Here is the code: ``` #include <sys/types.h> #include <stdio.h> #include <unistd.h> #define MAX_SEQUENCE 2...
2013/01/30
[ "https://Stackoverflow.com/questions/14610581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1763669/" ]
GCC supports a [`nonnull` attribute on function parameters](http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function-Attributes) that can do what you want (as long as the `-Wnonnull` warning option is enabled): ``` void* foo( int* cannot_be_null) __attribute((nonnull (1))) ; int main(int argc, char *argv[...
> > Is there any way to still get warnings for 0-literals > > > I don't know about one, an anyway you don't want that. The constant numeric value 0, when assigned to a pointer, is implicitly treated as `NULL` without casting it to a pointer type.
14,610,581
I dont understand why in the parent process my data is not set to what its set to in my child process. I create the shared\_data struct variable before I fork my program so it should be shared memory, correct? Here is the code: ``` #include <sys/types.h> #include <stdio.h> #include <unistd.h> #define MAX_SEQUENCE 2...
2013/01/30
[ "https://Stackoverflow.com/questions/14610581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1763669/" ]
Not with a raw C compiler unfortunately. You should try a lint tool, as splint, that might help you about this (I'm not sure, though).
I think conversion to null probably fairly intrinsic to the compiler - It should be easy however to statically check for these cases as they are fairly unique. If you are expecting to pass null and not (int)0, use an explicit NULL enum or define, and then anything matching the pattern YourFunction(0); (allowing for wh...
14,610,581
I dont understand why in the parent process my data is not set to what its set to in my child process. I create the shared\_data struct variable before I fork my program so it should be shared memory, correct? Here is the code: ``` #include <sys/types.h> #include <stdio.h> #include <unistd.h> #define MAX_SEQUENCE 2...
2013/01/30
[ "https://Stackoverflow.com/questions/14610581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1763669/" ]
GCC supports a [`nonnull` attribute on function parameters](http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function-Attributes) that can do what you want (as long as the `-Wnonnull` warning option is enabled): ``` void* foo( int* cannot_be_null) __attribute((nonnull (1))) ; int main(int argc, char *argv[...
Not with a raw C compiler unfortunately. You should try a lint tool, as splint, that might help you about this (I'm not sure, though).
14,610,581
I dont understand why in the parent process my data is not set to what its set to in my child process. I create the shared\_data struct variable before I fork my program so it should be shared memory, correct? Here is the code: ``` #include <sys/types.h> #include <stdio.h> #include <unistd.h> #define MAX_SEQUENCE 2...
2013/01/30
[ "https://Stackoverflow.com/questions/14610581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1763669/" ]
Not with a raw C compiler unfortunately. You should try a lint tool, as splint, that might help you about this (I'm not sure, though).
This question is similar to the question. `Should I use symbolic names like TRUE and FALSE for Boolean constants, or plain 1 and 0?` C programmers must understand that NULL and 0 are interchangeable in pointer contexts, and that an uncast 0 is perfectly acceptable. Any usage of NULL (as opposed to 0) should be conside...
14,610,581
I dont understand why in the parent process my data is not set to what its set to in my child process. I create the shared\_data struct variable before I fork my program so it should be shared memory, correct? Here is the code: ``` #include <sys/types.h> #include <stdio.h> #include <unistd.h> #define MAX_SEQUENCE 2...
2013/01/30
[ "https://Stackoverflow.com/questions/14610581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1763669/" ]
GCC supports a [`nonnull` attribute on function parameters](http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function-Attributes) that can do what you want (as long as the `-Wnonnull` warning option is enabled): ``` void* foo( int* cannot_be_null) __attribute((nonnull (1))) ; int main(int argc, char *argv[...
I think conversion to null probably fairly intrinsic to the compiler - It should be easy however to statically check for these cases as they are fairly unique. If you are expecting to pass null and not (int)0, use an explicit NULL enum or define, and then anything matching the pattern YourFunction(0); (allowing for wh...
14,610,581
I dont understand why in the parent process my data is not set to what its set to in my child process. I create the shared\_data struct variable before I fork my program so it should be shared memory, correct? Here is the code: ``` #include <sys/types.h> #include <stdio.h> #include <unistd.h> #define MAX_SEQUENCE 2...
2013/01/30
[ "https://Stackoverflow.com/questions/14610581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1763669/" ]
GCC supports a [`nonnull` attribute on function parameters](http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function-Attributes) that can do what you want (as long as the `-Wnonnull` warning option is enabled): ``` void* foo( int* cannot_be_null) __attribute((nonnull (1))) ; int main(int argc, char *argv[...
This question is similar to the question. `Should I use symbolic names like TRUE and FALSE for Boolean constants, or plain 1 and 0?` C programmers must understand that NULL and 0 are interchangeable in pointer contexts, and that an uncast 0 is perfectly acceptable. Any usage of NULL (as opposed to 0) should be conside...
393,673
Let's say I wanted to identify individuals who are taking an excessive amount of the blood clotting drug warfarin relative to their peers. To do this, I'm considering building a regression model that uses patient level data such as sex, age, and health status as factors and their actual drug dosage as the response. Aft...
2019/02/21
[ "https://stats.stackexchange.com/questions/393673", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/238529/" ]
I think you can go for one of these approaches: 1. cluster your data based on the specified features and then you will be able to identify each group/cluster average, maximum, minimum, ....etc drug dosage. then you can judge any instance by how far it is from it`s cluster mean(far by n-Standard deviations) then dec...
I think you are right: regression (linear or otherwise) may be the way to go. The only exception would be the case is which dosage is limited to a small amount of fixed values, in which case I would consider classification instead But remember, you model will only be as good as your data, so make sure you have abundan...
24,470,664
Okay, I'm obviously an extreme newbie, so be gentle. As I'm learning Javascript, I'm creating a quiz to better help me retain and practice the information. The following is a sample of my code so far(the actual array has been shortened for this question). I works fine for what it is at this point in my learning progre...
2014/06/28
[ "https://Stackoverflow.com/questions/24470664", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3786587/" ]
Easiest way to select a random element in an array: ``` var randomIndex = Math.floor(Math.random() * qAndA.length) var randomQuestion = qAndA[randomIndex] ``` Now put that in a loop: ``` var questionsToAsk = qAndA.length for (i = 0; i < questionsToAsk; i++) { var randomIndex = Math.floor(Math.random() * qAndA.l...
It's faster to use `| 0` as in ``` const randomIndex = Math.random() * qAndA.length | 0; const randomQuestion = qAndA[randomIndex]; ``` The `| 0` is a binary *or* of 0 which the JavaScript spec effectively says the result is converted to an integer before the `|` happens. Note that `| 0` is not the same as `Math.flo...
33,437,891
I'm doing a clone of a DIV element on button click, I'm able to change the value of ID of the DIV element I'm cloning. But is it possible to change the id of the inner element. In the below code I'm changing the Id of `#selection` while cloning, I need to dynamically change the id `#select`. ``` <div id="selections"...
2015/10/30
[ "https://Stackoverflow.com/questions/33437891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245234/" ]
Yes.. its totally possible as follows: ``` var clone = $("#selection").clone(); clone.attr("id", newId); clone.find("#select").attr("id","select-"+length); //append clone on the end $("#selections").append(clone); ```
You need to change all children's ID manually. Either change it for only one like that: ``` //clone first element with new id clone = $("#selection").clone(); clone.attr("id", newId); clone.find("#select").attr("id","whateverID"); ``` Or change all children using something like that: [jQuery changing the id attribu...
33,437,891
I'm doing a clone of a DIV element on button click, I'm able to change the value of ID of the DIV element I'm cloning. But is it possible to change the id of the inner element. In the below code I'm changing the Id of `#selection` while cloning, I need to dynamically change the id `#select`. ``` <div id="selections"...
2015/10/30
[ "https://Stackoverflow.com/questions/33437891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245234/" ]
Yes.. its totally possible as follows: ``` var clone = $("#selection").clone(); clone.attr("id", newId); clone.find("#select").attr("id","select-"+length); //append clone on the end $("#selections").append(clone); ```
Use the class `.show-tick` and the `.children()` method to locate the element: ``` clone.children('.show-tick').attr('id', 'select-' + length); ``` ```js $(function() { //on click $(".btn-primary").on("click", function() { alert($(".input-group").length) var //get length of selections len...
33,437,891
I'm doing a clone of a DIV element on button click, I'm able to change the value of ID of the DIV element I'm cloning. But is it possible to change the id of the inner element. In the below code I'm changing the Id of `#selection` while cloning, I need to dynamically change the id `#select`. ``` <div id="selections"...
2015/10/30
[ "https://Stackoverflow.com/questions/33437891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245234/" ]
Yes.. its totally possible as follows: ``` var clone = $("#selection").clone(); clone.attr("id", newId); clone.find("#select").attr("id","select-"+length); //append clone on the end $("#selections").append(clone); ```
I had a similar need to change the id of the clone and all its children. Posting my solution to help someone in the future. I wanted to change the ids and the names of all the children of the clone. ``` $("#form").on('click', '.clone', function (e) { e.preventDefault(); var myid = this....
33,437,891
I'm doing a clone of a DIV element on button click, I'm able to change the value of ID of the DIV element I'm cloning. But is it possible to change the id of the inner element. In the below code I'm changing the Id of `#selection` while cloning, I need to dynamically change the id `#select`. ``` <div id="selections"...
2015/10/30
[ "https://Stackoverflow.com/questions/33437891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245234/" ]
Use the class `.show-tick` and the `.children()` method to locate the element: ``` clone.children('.show-tick').attr('id', 'select-' + length); ``` ```js $(function() { //on click $(".btn-primary").on("click", function() { alert($(".input-group").length) var //get length of selections len...
You need to change all children's ID manually. Either change it for only one like that: ``` //clone first element with new id clone = $("#selection").clone(); clone.attr("id", newId); clone.find("#select").attr("id","whateverID"); ``` Or change all children using something like that: [jQuery changing the id attribu...
33,437,891
I'm doing a clone of a DIV element on button click, I'm able to change the value of ID of the DIV element I'm cloning. But is it possible to change the id of the inner element. In the below code I'm changing the Id of `#selection` while cloning, I need to dynamically change the id `#select`. ``` <div id="selections"...
2015/10/30
[ "https://Stackoverflow.com/questions/33437891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2245234/" ]
I had a similar need to change the id of the clone and all its children. Posting my solution to help someone in the future. I wanted to change the ids and the names of all the children of the clone. ``` $("#form").on('click', '.clone', function (e) { e.preventDefault(); var myid = this....
You need to change all children's ID manually. Either change it for only one like that: ``` //clone first element with new id clone = $("#selection").clone(); clone.attr("id", newId); clone.find("#select").attr("id","whateverID"); ``` Or change all children using something like that: [jQuery changing the id attribu...
41,008,229
I am working on a website where the nav is search form. Basically you can only search for letters. If you search for "A" I want that submit redirects you to a.html, if you search for "B" to redirect you to b.html, and so on. Is this possible? Can I do this with css and javascript?
2016/12/07
[ "https://Stackoverflow.com/questions/41008229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7259984/" ]
Okay, if you're looking for an explanation of why the code works the way it does, it goes something like this. Given the following code: ``` len([]) -> 0; len([_|T]) -> 1 + len(T). ``` If you were to call `len/1` like `len([a,b,c])`, then you can think of it executing like: * call `len([a,b,c])` * does `[a,b,c]`...
Erlang has a debugger call `im()` try to use it
30,841,525
While running through bamboo(CI), my script is getting failed where all "upload file link" is not starting with the input tag. I am using Auto IT for uploading the file which is working fine locally and when I am trying to run through Bamboo on remote machine it is getting failed there. So want to upload file from bac...
2015/06/15
[ "https://Stackoverflow.com/questions/30841525", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5010571/" ]
As you are using PrimeFaces 5.2, you can check all the skinning CSS classes in the current [PrimeFaces User Guide](http://www.primefaces.org/docs/guide/primefaces_user_guide_5_2.pdf) and page 411, in particular, which gives you details about `p:selectBooleanCheckbox` > > **.ui-chkbox** Main container element. > > ...
I managed to solve this same problem using these CSS codes: ``` .indivcheckbox .ui-chkbox-icon { background-position-x: -66px; background-position-y: -147px; } .indivcheckbox .ui-icon-check { width: 12px; height: 12px; } ``` While my component is this: ``` <p:selectBooleanCheckbox styleClass="indi...
62,815,597
``` import re for _ in range(int(input())): s=input() #input alphanumeric string print(sum(map(int,re.findall('\d+',s)))) ```
2020/07/09
[ "https://Stackoverflow.com/questions/62815597", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13898585/" ]
Sure you can do it with map: ``` Promise.all([productVariant1, productVariant2].map((productVariant, i) => { return fetch("https://cors-anywhere.herokuapp.com/https://api.myurl.com/verify", { body: `link=${productVariant}&license_key=${licenseKey}`, headers: { "Content-Type": "applicati...
You could create a function: ```js function Fetch(body) { return fetch("https://cors-anywhere.herokuapp.com/https://api.myurl.com/verify", { body, headers: { "Content-Type": "application/x-www-form-urlencoded" }, method: "POST" }).then(doSomething) } // And then Promise.all([ Fetch(`link...
15,380,874
Is it possible to create a contact form that sends the answers by email with *only* HTML5 and JavaScript? And if it is, how do I do it?
2013/03/13
[ "https://Stackoverflow.com/questions/15380874", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2140042/" ]
Not only you don't need to do this, you simply can't (`String` is `final`).
If your intention is to use `String` in your `Switch` statement then it's better to use [ENUM TYPE](http://docs.oracle.com/javase/tutorial/java/javaOO/enum.html)
47,649
During the First age and before, Arda was flat. I'm not certain how flat it was, but wouldn't this imply that one could see great distances, as far as the nearest mountain that was higher than your vantage point? If you were high enough (and had very keen eyes), couldn't you see to the edge of the world? Were there an...
2014/01/07
[ "https://scifi.stackexchange.com/questions/47649", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/16157/" ]
How flat was the world? Here's an old map from the [Ambarkanta](http://en.wikipedia.org/wiki/The_Shaping_of_Middle-earth) of the 1930s demonstrating exactly how flat the world was - which was actually quite curved indeed. ![How flat, indeed?](https://i.stack.imgur.com/0NsEQ.jpg) Of course, we're talking about a stric...
From "[AskAMathematician](http://www.askamathematician.com/2012/08/q-if-earth-was-flat-would-there-be-the-horizon-if-so-what-would-it-look-like-if-the-earth-was-flat-and-had-infinite-area-would-that-change-the-answer/)"; > > For someone around 5’6″ tall, if the Earth were perfectly flat the > horizon would be about...
47,649
During the First age and before, Arda was flat. I'm not certain how flat it was, but wouldn't this imply that one could see great distances, as far as the nearest mountain that was higher than your vantage point? If you were high enough (and had very keen eyes), couldn't you see to the edge of the world? Were there an...
2014/01/07
[ "https://scifi.stackexchange.com/questions/47649", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/16157/" ]
From "[AskAMathematician](http://www.askamathematician.com/2012/08/q-if-earth-was-flat-would-there-be-the-horizon-if-so-what-would-it-look-like-if-the-earth-was-flat-and-had-infinite-area-would-that-change-the-answer/)"; > > For someone around 5’6″ tall, if the Earth were perfectly flat the > horizon would be about...
Even under extremely clear conditions, it's unusual to see more than a couple of hundred kilometers. This is due to a variety of very complex effects, but visibility is limited by scattered light in the lower atmosphere due to particles, moisture, etc. <http://mintaka.sdsu.edu/GF/explain/atmos_refr/horizon.html> Exc...
47,649
During the First age and before, Arda was flat. I'm not certain how flat it was, but wouldn't this imply that one could see great distances, as far as the nearest mountain that was higher than your vantage point? If you were high enough (and had very keen eyes), couldn't you see to the edge of the world? Were there an...
2014/01/07
[ "https://scifi.stackexchange.com/questions/47649", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/16157/" ]
From "[AskAMathematician](http://www.askamathematician.com/2012/08/q-if-earth-was-flat-would-there-be-the-horizon-if-so-what-would-it-look-like-if-the-earth-was-flat-and-had-infinite-area-would-that-change-the-answer/)"; > > For someone around 5’6″ tall, if the Earth were perfectly flat the > horizon would be about...
Near where I live is a mountain peak with an elevation of almost 7,000 ft. About 100 miles to the west is another peak with an elevation of over 10,000 ft. On a clear day, from the nearer peak, the taller peak is visible, though it does have a significant blue tint. On a hazy day, the mountain can be completely hidde...
47,649
During the First age and before, Arda was flat. I'm not certain how flat it was, but wouldn't this imply that one could see great distances, as far as the nearest mountain that was higher than your vantage point? If you were high enough (and had very keen eyes), couldn't you see to the edge of the world? Were there an...
2014/01/07
[ "https://scifi.stackexchange.com/questions/47649", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/16157/" ]
How flat was the world? Here's an old map from the [Ambarkanta](http://en.wikipedia.org/wiki/The_Shaping_of_Middle-earth) of the 1930s demonstrating exactly how flat the world was - which was actually quite curved indeed. ![How flat, indeed?](https://i.stack.imgur.com/0NsEQ.jpg) Of course, we're talking about a stric...
Even under extremely clear conditions, it's unusual to see more than a couple of hundred kilometers. This is due to a variety of very complex effects, but visibility is limited by scattered light in the lower atmosphere due to particles, moisture, etc. <http://mintaka.sdsu.edu/GF/explain/atmos_refr/horizon.html> Exc...
47,649
During the First age and before, Arda was flat. I'm not certain how flat it was, but wouldn't this imply that one could see great distances, as far as the nearest mountain that was higher than your vantage point? If you were high enough (and had very keen eyes), couldn't you see to the edge of the world? Were there an...
2014/01/07
[ "https://scifi.stackexchange.com/questions/47649", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/16157/" ]
How flat was the world? Here's an old map from the [Ambarkanta](http://en.wikipedia.org/wiki/The_Shaping_of_Middle-earth) of the 1930s demonstrating exactly how flat the world was - which was actually quite curved indeed. ![How flat, indeed?](https://i.stack.imgur.com/0NsEQ.jpg) Of course, we're talking about a stric...
Near where I live is a mountain peak with an elevation of almost 7,000 ft. About 100 miles to the west is another peak with an elevation of over 10,000 ft. On a clear day, from the nearer peak, the taller peak is visible, though it does have a significant blue tint. On a hazy day, the mountain can be completely hidde...
41,543,974
```html <div class="block-update-card status" ng-show="isShow"> <div class="update-card-body"> <div class="update-card-body"> <p><textarea name="feedback" spellcheck="false" placeholder="Discription" ></textarea></p> </div> </div> <div class="card-action-pellet btn-toolbar pull-...
2017/01/09
[ "https://Stackoverflow.com/questions/41543974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7393472/" ]
Use `getattr` for accessing members of the module: ``` func = getattr(globals()['file_that_have_abc'], 'abc') func() ``` of course, you can drop the `globals` here if you don't *need* to look up the module too.
You just need to use the `globals()` call to access the variables in your current module. For other modules, just use the name you imported the module with - and to retrieve functions/classes/variables from there from their names as strings, use the `getattr` function. For example: ``` import math func = `sin` geta...
49,625,859
The docker daemon isn't starting anymore on my computer (Linux / Centos 7), and I strongly suspect that a container that is set to auto-restart is to blame in this case. If I start the daemon manually, the last line I see is "Loading containers: start", and then it just hangs. What I'd like to do is to start the daemo...
2018/04/03
[ "https://Stackoverflow.com/questions/49625859", "https://Stackoverflow.com", "https://Stackoverflow.com/users/347857/" ]
You have the order of the text and the style tag in the wrong way around. > > > ``` > h('label', "Hello: ", {style: { fontWeight: "1500"}}), > > ``` > > Should be: ``` h('label', {style: { fontWeight: "1500"}}, "Hello: "), ``` Also, 1500 is an invalid value for `font-weight`, this is inside the initial revisi...
You should put the params in the correct order: ``` h('label', {style: { fontWeight: "500"}}, "Hello: "), ``` Or you can pass the innerHTML like bellow: ``` h('div', { style: {} }, [ h('label', { domProps: { innerHTML:"Hello: " }, style: { fontWeight: "500"}}), h('label', "world") ]) ``` for [detail](https://...
215,164
I have the following in a child theme's functions.php file: ``` <?php function theme_child_add_scripts() { wp_register_script( 'script', get_stylesheet_directory_uri() . '/js/script.js', array( 'jquery' ), null, false ); wp_enqueue_script( 'script' ) } add_action('w...
2016/01/20
[ "https://wordpress.stackexchange.com/questions/215164", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/87192/" ]
Our problem was that our style.css file was in a css folder inside the child theme directory, not at the root of the child theme. When we placed a style.css file at the root and included the comment block with theme name and template it picked up the functions.php file as expected.
I had a problem with a code that executed perfectly in the theme functions.php but not in the child theme's (that's how I found this page). I found a non-tech solution, using the free plug in Code Snippets the code executed perfectly. I was looking for a php solution, but this has saved me a bit of time.
15,713
I recently came across an article printed in our school magazine, which read, "I studied that a year ago". But, doesn't "I studied that a year back" sound better? What's your say?
2011/03/09
[ "https://english.stackexchange.com/questions/15713", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4924/" ]
I would think that "a year ago" is the phrase normally used. Looking at the data reported by the *Corpus of Contemporary American*, I can create the [following chart](https://i.stack.imgur.com/VTbyC.png). ![CoCa results](https://i.stack.imgur.com/VTbyC.png) "Year ago" and "years ago" are the most used phrases, at lea...
**A year ago** would be the regular way to say it; **a year back** is a colloquial way of saying the same.
15,713
I recently came across an article printed in our school magazine, which read, "I studied that a year ago". But, doesn't "I studied that a year back" sound better? What's your say?
2011/03/09
[ "https://english.stackexchange.com/questions/15713", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4924/" ]
**A year ago** would be the regular way to say it; **a year back** is a colloquial way of saying the same.
"I studied that a year ago" sounds better.
15,713
I recently came across an article printed in our school magazine, which read, "I studied that a year ago". But, doesn't "I studied that a year back" sound better? What's your say?
2011/03/09
[ "https://english.stackexchange.com/questions/15713", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4924/" ]
**A year ago** would be the regular way to say it; **a year back** is a colloquial way of saying the same.
It would be proper to say *ago* when it is time specific, otherwise, *back*. * “A few years back” is a more correct form than “a few years ago”. * “A hundred years ago” is a more correct form than “a hundred years back”.
15,713
I recently came across an article printed in our school magazine, which read, "I studied that a year ago". But, doesn't "I studied that a year back" sound better? What's your say?
2011/03/09
[ "https://english.stackexchange.com/questions/15713", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4924/" ]
I would think that "a year ago" is the phrase normally used. Looking at the data reported by the *Corpus of Contemporary American*, I can create the [following chart](https://i.stack.imgur.com/VTbyC.png). ![CoCa results](https://i.stack.imgur.com/VTbyC.png) "Year ago" and "years ago" are the most used phrases, at lea...
"I studied that a year ago" sounds better.
15,713
I recently came across an article printed in our school magazine, which read, "I studied that a year ago". But, doesn't "I studied that a year back" sound better? What's your say?
2011/03/09
[ "https://english.stackexchange.com/questions/15713", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4924/" ]
I would think that "a year ago" is the phrase normally used. Looking at the data reported by the *Corpus of Contemporary American*, I can create the [following chart](https://i.stack.imgur.com/VTbyC.png). ![CoCa results](https://i.stack.imgur.com/VTbyC.png) "Year ago" and "years ago" are the most used phrases, at lea...
It would be proper to say *ago* when it is time specific, otherwise, *back*. * “A few years back” is a more correct form than “a few years ago”. * “A hundred years ago” is a more correct form than “a hundred years back”.
15,713
I recently came across an article printed in our school magazine, which read, "I studied that a year ago". But, doesn't "I studied that a year back" sound better? What's your say?
2011/03/09
[ "https://english.stackexchange.com/questions/15713", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4924/" ]
"I studied that a year ago" sounds better.
It would be proper to say *ago* when it is time specific, otherwise, *back*. * “A few years back” is a more correct form than “a few years ago”. * “A hundred years ago” is a more correct form than “a hundred years back”.
126,883
I need to get the order information (shipping details, item SKU's) in order to send it over to the Amazon API for easy FBA shipping. Ideally I will be able to capture this information upon a successful payment. How do you get this information?
2016/07/21
[ "https://magento.stackexchange.com/questions/126883", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/42464/" ]
You can use below code to get details in success.phtml file. It will work for magentoce2.1 also. ``` <?php $lid = $this->getOrderId(); echo "Order ID:".$lid."<br/>"; $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $order = $objectManager->create('Magento\Sales\Model\Order')->load($lid); $total...
``` //Use this Class to get order id protected $_checkoutSession; \Magento\Checkout\Model\Session $checkoutSession, $this->_checkoutSession = $checkoutSession; // Use this method to get ID public function getRealOrderId() { $lastorderId = $this->_checkoutSession->getLastOrderId(); return $la...
46,674,355
I am trying to connect 2 or more Raspberry Pi 3 boards over bluetooth. I am looking for options to set security while pairing. I am using Raspian-stretch(Latest one available). Bluez version available on RPI-3 is 5.23(as shown from bluetoothd -v command). I am using headless version. I want the pairing to be secured(m...
2017/10/10
[ "https://Stackoverflow.com/questions/46674355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/940662/" ]
I was able to get this working with the test scripts. For anyone who is interested to know the details, please refer to my post on Raspberry Pi forum. Below is the link. <https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=195090&p=1221455#p1221455>
First you have to configurate sspmode 0, for pin request: hciconfig hci0 sspmode 0 And using bt-agent aplicattion (you can run as deamon too): bt-agent -c NoInputNoOutput -p /root/bluethooth.cfg Edit the file configuration, you can put tha mac address and the pin: For example: XX:XX:XX:XX:XX:XX 1234 Or if you want ...
46,674,355
I am trying to connect 2 or more Raspberry Pi 3 boards over bluetooth. I am looking for options to set security while pairing. I am using Raspian-stretch(Latest one available). Bluez version available on RPI-3 is 5.23(as shown from bluetoothd -v command). I am using headless version. I want the pairing to be secured(m...
2017/10/10
[ "https://Stackoverflow.com/questions/46674355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/940662/" ]
After few days fiddling with BlueZ 5 this is what I've got. Using BlueZ **5.50** & Raspbian Stretch (Pi Zero W): Start bluetoothd with **--compat**: > > append to **ExecStart** line in **/etc/systemd/system/dbus-org.bluez.service** > > > or > > in rc.local: sudo bluetoothd --compat & > > > --- The next...
First you have to configurate sspmode 0, for pin request: hciconfig hci0 sspmode 0 And using bt-agent aplicattion (you can run as deamon too): bt-agent -c NoInputNoOutput -p /root/bluethooth.cfg Edit the file configuration, you can put tha mac address and the pin: For example: XX:XX:XX:XX:XX:XX 1234 Or if you want ...
273,587
I'm trying to send data by STM32f103 to an Arduino board using UART. Data isn't received properly. The code is generated using STM32CUBEMX and here is the part I added: STM32 code (Transmit): ``` uint8_t Test[] = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 \n"; //D...
2016/12/07
[ "https://electronics.stackexchange.com/questions/273587", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/109413/" ]
You receive ~67 characters, which at 10 bits/character, is 670 bits. Given that your timeout (parameter 4) is set to 10ms or 0.01 s, the average bit rate seems to be around 67000 bit/s. My guess is that you are transmitting at 115200 baud with some inter-character delay giving an effective bit rate of 67000 bit/s. Th...
The higher a baud rate goes, the faster data is sent/received, but there are limits to how fast data can be transferred. You usually won’t see speeds exceeding 115200 - that’s fast for most microcontrollers. Get too high, and you’ll begin to see errors on the receiving end, as clocks and sampling periods just can’t kee...
273,587
I'm trying to send data by STM32f103 to an Arduino board using UART. Data isn't received properly. The code is generated using STM32CUBEMX and here is the part I added: STM32 code (Transmit): ``` uint8_t Test[] = "1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 \n"; //D...
2016/12/07
[ "https://electronics.stackexchange.com/questions/273587", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/109413/" ]
You receive ~67 characters, which at 10 bits/character, is 670 bits. Given that your timeout (parameter 4) is set to 10ms or 0.01 s, the average bit rate seems to be around 67000 bit/s. My guess is that you are transmitting at 115200 baud with some inter-character delay giving an effective bit rate of 67000 bit/s. Th...
Arduino's SoftwareSerial library cannot operate with high UART rates. Never use it with speeds higher than 38400 on Uno/Nano boards for example. If you still want 115200 try HardwareSerial instead.
5,312,306
I want to insert a result in mysql, i use this query: ``` $sql= "INSERT into {test} WHERE Id = $currentID (soortstage)VALUES('%s')"; ``` that is the error: ``` * user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near `WHE...
2011/03/15
[ "https://Stackoverflow.com/questions/5312306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/642760/" ]
You might be looking for [REPLACE](http://dev.mysql.com/doc/refman/5.1/en/replace.html), which will either UPDATE or INSERT based on whether or not the primary ID of the record exists. `REPLACE INTO {test} WHERE Id = $currentID (soortstage) VALUES('%s')` But, frankly, you mention Drupal, which has a nice helper for t...
You need an update query ``` $sql= "UPDATE {test} SET soortstage = '%s' WHERE Id = $currentID "; ```
33,133,645
I'm trying to secure my webapp by using nginx base authentication. What I'm looking for is a way to force the browser to show my custom html login page instead of the default login popup but still handle the authorization process. I try to omit the 'WWW-Authenticate' header and the popup wasn't display but I've no id...
2015/10/14
[ "https://Stackoverflow.com/questions/33133645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5446392/" ]
\*has\* to be a better way to accomplish this, but i managed to do it with X-Accel-Redirect and php, here's how: i wanted to have a custom login page for folder /foo/ (and recursively all its content) ... first i renamed the on-disk folder `/var/www/html/foo` to `/var/www/html/internal_foo` , then i added to nginx co...
If you really want to do this. The easiest way is to put the username and password into the url. Basic Authentication supports this. Change all requests to the format below and it will work: ``` "http://" + username + ":" + password + "@example.com" ```
33,133,645
I'm trying to secure my webapp by using nginx base authentication. What I'm looking for is a way to force the browser to show my custom html login page instead of the default login popup but still handle the authorization process. I try to omit the 'WWW-Authenticate' header and the popup wasn't display but I've no id...
2015/10/14
[ "https://Stackoverflow.com/questions/33133645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5446392/" ]
You need to add `proxy_intercept_errors on;` or you will not be able to define `error_page`. Otherwise NGINX just passes the HTTP 401 response back to the client. ``` location /{ auth_basic "Restricted"; auth_basic_user_file htpasswd; proxy_pass http://tomcat:8080/; proxy_intercept_errors on; error...
If you really want to do this. The easiest way is to put the username and password into the url. Basic Authentication supports this. Change all requests to the format below and it will work: ``` "http://" + username + ":" + password + "@example.com" ```
33,133,645
I'm trying to secure my webapp by using nginx base authentication. What I'm looking for is a way to force the browser to show my custom html login page instead of the default login popup but still handle the authorization process. I try to omit the 'WWW-Authenticate' header and the popup wasn't display but I've no id...
2015/10/14
[ "https://Stackoverflow.com/questions/33133645", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5446392/" ]
You need to add `proxy_intercept_errors on;` or you will not be able to define `error_page`. Otherwise NGINX just passes the HTTP 401 response back to the client. ``` location /{ auth_basic "Restricted"; auth_basic_user_file htpasswd; proxy_pass http://tomcat:8080/; proxy_intercept_errors on; error...
\*has\* to be a better way to accomplish this, but i managed to do it with X-Accel-Redirect and php, here's how: i wanted to have a custom login page for folder /foo/ (and recursively all its content) ... first i renamed the on-disk folder `/var/www/html/foo` to `/var/www/html/internal_foo` , then i added to nginx co...
27,488
I was talking with a pilot about an inability to maintain the targeted climb rate in a particular situation and asked him what the Vy was for the jet. He curtly replied "Vy is only for Part 23 aircraft." (FYI for those outside the US: Part 25 aircraft are commerical planes, while Part 23 are usually general aviation pl...
2016/05/11
[ "https://aviation.stackexchange.com/questions/27488", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/14613/" ]
Large commercial jets operate within a much wider range of weights than most GA aircraft do, and since Vy varies with weight, it wouldn't make sense to publish "a" single Vy speed for them. The crew can get a best rate or best angle of climb speed from the FMC (which "knows" the current weight of the aircraft, based on...
Actually modern jets in general do have massive excess thrust. One big reason is due to safety requirements to handle engine loss. Vy is a big issue while on a single engine or piston props. With two turbofans/turboprops running and at low altitudes, they "climb like a rocket" compared with single piston and even twin ...
27,488
I was talking with a pilot about an inability to maintain the targeted climb rate in a particular situation and asked him what the Vy was for the jet. He curtly replied "Vy is only for Part 23 aircraft." (FYI for those outside the US: Part 25 aircraft are commerical planes, while Part 23 are usually general aviation pl...
2016/05/11
[ "https://aviation.stackexchange.com/questions/27488", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/14613/" ]
Large commercial jets operate within a much wider range of weights than most GA aircraft do, and since Vy varies with weight, it wouldn't make sense to publish "a" single Vy speed for them. The crew can get a best rate or best angle of climb speed from the FMC (which "knows" the current weight of the aircraft, based on...
Airplanes certificated under FAR Part 25 (Transport Category Airplanes) must meet far more complex and regulated takeoff performance criteria than can be reduced to a (light aircraft) Vy or Vx (Vyse or Vxse) speed. If you're taking off in a Cessna 310 and interested in gaining altitude as quickly as possible (rate) t...
27,488
I was talking with a pilot about an inability to maintain the targeted climb rate in a particular situation and asked him what the Vy was for the jet. He curtly replied "Vy is only for Part 23 aircraft." (FYI for those outside the US: Part 25 aircraft are commerical planes, while Part 23 are usually general aviation pl...
2016/05/11
[ "https://aviation.stackexchange.com/questions/27488", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/14613/" ]
Large commercial jets operate within a much wider range of weights than most GA aircraft do, and since Vy varies with weight, it wouldn't make sense to publish "a" single Vy speed for them. The crew can get a best rate or best angle of climb speed from the FMC (which "knows" the current weight of the aircraft, based on...
Well they do of sorts. But your pilot friend is right, they are not tabulated for a transport category aircraft like is done for a Part 23 aircraft. Due to the large payloads, CG ranges and configurations, the best rate of climb speed must be computed for each situation. There is no one published Vy for a large transpo...
27,488
I was talking with a pilot about an inability to maintain the targeted climb rate in a particular situation and asked him what the Vy was for the jet. He curtly replied "Vy is only for Part 23 aircraft." (FYI for those outside the US: Part 25 aircraft are commerical planes, while Part 23 are usually general aviation pl...
2016/05/11
[ "https://aviation.stackexchange.com/questions/27488", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/14613/" ]
Large commercial jets operate within a much wider range of weights than most GA aircraft do, and since Vy varies with weight, it wouldn't make sense to publish "a" single Vy speed for them. The crew can get a best rate or best angle of climb speed from the FMC (which "knows" the current weight of the aircraft, based on...
First things first. All the airplanes have a speed for best climb rate (Vy), and this includes transport category aircraft. But the speed Vy, does not matter to us because our climb performance calculations are a little bit more complex when compared to a small GA aircraft. Think of this. For a general aviation pilot ...
27,488
I was talking with a pilot about an inability to maintain the targeted climb rate in a particular situation and asked him what the Vy was for the jet. He curtly replied "Vy is only for Part 23 aircraft." (FYI for those outside the US: Part 25 aircraft are commerical planes, while Part 23 are usually general aviation pl...
2016/05/11
[ "https://aviation.stackexchange.com/questions/27488", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/14613/" ]
Airplanes certificated under FAR Part 25 (Transport Category Airplanes) must meet far more complex and regulated takeoff performance criteria than can be reduced to a (light aircraft) Vy or Vx (Vyse or Vxse) speed. If you're taking off in a Cessna 310 and interested in gaining altitude as quickly as possible (rate) t...
Actually modern jets in general do have massive excess thrust. One big reason is due to safety requirements to handle engine loss. Vy is a big issue while on a single engine or piston props. With two turbofans/turboprops running and at low altitudes, they "climb like a rocket" compared with single piston and even twin ...
27,488
I was talking with a pilot about an inability to maintain the targeted climb rate in a particular situation and asked him what the Vy was for the jet. He curtly replied "Vy is only for Part 23 aircraft." (FYI for those outside the US: Part 25 aircraft are commerical planes, while Part 23 are usually general aviation pl...
2016/05/11
[ "https://aviation.stackexchange.com/questions/27488", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/14613/" ]
Well they do of sorts. But your pilot friend is right, they are not tabulated for a transport category aircraft like is done for a Part 23 aircraft. Due to the large payloads, CG ranges and configurations, the best rate of climb speed must be computed for each situation. There is no one published Vy for a large transpo...
Actually modern jets in general do have massive excess thrust. One big reason is due to safety requirements to handle engine loss. Vy is a big issue while on a single engine or piston props. With two turbofans/turboprops running and at low altitudes, they "climb like a rocket" compared with single piston and even twin ...
27,488
I was talking with a pilot about an inability to maintain the targeted climb rate in a particular situation and asked him what the Vy was for the jet. He curtly replied "Vy is only for Part 23 aircraft." (FYI for those outside the US: Part 25 aircraft are commerical planes, while Part 23 are usually general aviation pl...
2016/05/11
[ "https://aviation.stackexchange.com/questions/27488", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/14613/" ]
First things first. All the airplanes have a speed for best climb rate (Vy), and this includes transport category aircraft. But the speed Vy, does not matter to us because our climb performance calculations are a little bit more complex when compared to a small GA aircraft. Think of this. For a general aviation pilot ...
Actually modern jets in general do have massive excess thrust. One big reason is due to safety requirements to handle engine loss. Vy is a big issue while on a single engine or piston props. With two turbofans/turboprops running and at low altitudes, they "climb like a rocket" compared with single piston and even twin ...
27,488
I was talking with a pilot about an inability to maintain the targeted climb rate in a particular situation and asked him what the Vy was for the jet. He curtly replied "Vy is only for Part 23 aircraft." (FYI for those outside the US: Part 25 aircraft are commerical planes, while Part 23 are usually general aviation pl...
2016/05/11
[ "https://aviation.stackexchange.com/questions/27488", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/14613/" ]
Airplanes certificated under FAR Part 25 (Transport Category Airplanes) must meet far more complex and regulated takeoff performance criteria than can be reduced to a (light aircraft) Vy or Vx (Vyse or Vxse) speed. If you're taking off in a Cessna 310 and interested in gaining altitude as quickly as possible (rate) t...
Well they do of sorts. But your pilot friend is right, they are not tabulated for a transport category aircraft like is done for a Part 23 aircraft. Due to the large payloads, CG ranges and configurations, the best rate of climb speed must be computed for each situation. There is no one published Vy for a large transpo...
27,488
I was talking with a pilot about an inability to maintain the targeted climb rate in a particular situation and asked him what the Vy was for the jet. He curtly replied "Vy is only for Part 23 aircraft." (FYI for those outside the US: Part 25 aircraft are commerical planes, while Part 23 are usually general aviation pl...
2016/05/11
[ "https://aviation.stackexchange.com/questions/27488", "https://aviation.stackexchange.com", "https://aviation.stackexchange.com/users/14613/" ]
Airplanes certificated under FAR Part 25 (Transport Category Airplanes) must meet far more complex and regulated takeoff performance criteria than can be reduced to a (light aircraft) Vy or Vx (Vyse or Vxse) speed. If you're taking off in a Cessna 310 and interested in gaining altitude as quickly as possible (rate) t...
First things first. All the airplanes have a speed for best climb rate (Vy), and this includes transport category aircraft. But the speed Vy, does not matter to us because our climb performance calculations are a little bit more complex when compared to a small GA aircraft. Think of this. For a general aviation pilot ...
26,939,349
I have to draw a cone with a given height and radius at a specific co-ordinate. MATLAB has the function `cylinder(r)`, but it draws only a unit cylinder whereas I need it to be of a specific height. None of the other links specify how to draw a cone of height 'h'.
2014/11/14
[ "https://Stackoverflow.com/questions/26939349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1750013/" ]
Probably this is more a workaround that proper support for test module overriding, but it allows to override production modules with test one. The code snippets below shows simple case when you have just one component and one module, but this should work for any scenario. It requires a lot of boilerplate and code repet...
It seems I've found yet another way and it's working so far. First, a component interface that is not a component itself: **MyComponent.java** ``` interface MyComponent { Foo provideFoo(); } ``` Then we have two different modules: actual one and testing one. **MyModule.java** ``` @Module class MyModule { ...
26,939,349
I have to draw a cone with a given height and radius at a specific co-ordinate. MATLAB has the function `cylinder(r)`, but it draws only a unit cylinder whereas I need it to be of a specific height. None of the other links specify how to draw a cone of height 'h'.
2014/11/14
[ "https://Stackoverflow.com/questions/26939349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1750013/" ]
The workaround proposed by @tomrozb is very good and put me on the right track, but my problem with it was that it exposed a `setTestComponent()` method in the PRODUCTION `Application` class. I was able to get this working slightly differently, such that my production application doesn't have to know anything at all ab...
Can you guys check out my solution, I have included subcomponent example: <https://github.com/nongdenchet/android-mvvm-with-tests>. Thank you @vaughandroid, I have borrowed your overriding methods. Here is the main point: 1. I create a class to create subcomponent. My custom application will also hold an instance of t...
26,939,349
I have to draw a cone with a given height and radius at a specific co-ordinate. MATLAB has the function `cylinder(r)`, but it draws only a unit cylinder whereas I need it to be of a specific height. None of the other links specify how to draw a cone of height 'h'.
2014/11/14
[ "https://Stackoverflow.com/questions/26939349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1750013/" ]
The workaround proposed by @tomrozb is very good and put me on the right track, but my problem with it was that it exposed a `setTestComponent()` method in the PRODUCTION `Application` class. I was able to get this working slightly differently, such that my production application doesn't have to know anything at all ab...
**THIS ANSWER IS OBSOLETE. READ BELOW IN EDIT.** Disappointingly enough, you *cannot extend from a Module*, or you'll get the following compilation error: ``` Error:(24, 21) error: @Provides methods may not override another method. Overrides: Provides retrofit.Endpoint hu.mycompany.injection.modules.application....
26,939,349
I have to draw a cone with a given height and radius at a specific co-ordinate. MATLAB has the function `cylinder(r)`, but it draws only a unit cylinder whereas I need it to be of a specific height. None of the other links specify how to draw a cone of height 'h'.
2014/11/14
[ "https://Stackoverflow.com/questions/26939349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1750013/" ]
As @EpicPandaForce rightly says, you can't extend Modules. However, I came up with a sneaky workaround for this which I think avoids a lot of the boilerplate which the other examples suffer from. The trick to 'extending' a Module is to create a partial mock, and mock out the provider methods which you want to override...
Can you guys check out my solution, I have included subcomponent example: <https://github.com/nongdenchet/android-mvvm-with-tests>. Thank you @vaughandroid, I have borrowed your overriding methods. Here is the main point: 1. I create a class to create subcomponent. My custom application will also hold an instance of t...
26,939,349
I have to draw a cone with a given height and radius at a specific co-ordinate. MATLAB has the function `cylinder(r)`, but it draws only a unit cylinder whereas I need it to be of a specific height. None of the other links specify how to draw a cone of height 'h'.
2014/11/14
[ "https://Stackoverflow.com/questions/26939349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1750013/" ]
Probably this is more a workaround that proper support for test module overriding, but it allows to override production modules with test one. The code snippets below shows simple case when you have just one component and one module, but this should work for any scenario. It requires a lot of boilerplate and code repet...
With Dagger2, you can pass a specific module (the TestModule there) to a component using the generated builder api. ``` ApplicationComponent appComponent = Dagger_ApplicationComponent.builder() .helloModule(new TestModule()) .build(); ``` Please note that, Dagger\_ApplicationComponent...
26,939,349
I have to draw a cone with a given height and radius at a specific co-ordinate. MATLAB has the function `cylinder(r)`, but it draws only a unit cylinder whereas I need it to be of a specific height. None of the other links specify how to draw a cone of height 'h'.
2014/11/14
[ "https://Stackoverflow.com/questions/26939349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1750013/" ]
As @EpicPandaForce rightly says, you can't extend Modules. However, I came up with a sneaky workaround for this which I think avoids a lot of the boilerplate which the other examples suffer from. The trick to 'extending' a Module is to create a partial mock, and mock out the provider methods which you want to override...
It seems I've found yet another way and it's working so far. First, a component interface that is not a component itself: **MyComponent.java** ``` interface MyComponent { Foo provideFoo(); } ``` Then we have two different modules: actual one and testing one. **MyModule.java** ``` @Module class MyModule { ...
26,939,349
I have to draw a cone with a given height and radius at a specific co-ordinate. MATLAB has the function `cylinder(r)`, but it draws only a unit cylinder whereas I need it to be of a specific height. None of the other links specify how to draw a cone of height 'h'.
2014/11/14
[ "https://Stackoverflow.com/questions/26939349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1750013/" ]
Probably this is more a workaround that proper support for test module overriding, but it allows to override production modules with test one. The code snippets below shows simple case when you have just one component and one module, but this should work for any scenario. It requires a lot of boilerplate and code repet...
The workaround proposed by @tomrozb is very good and put me on the right track, but my problem with it was that it exposed a `setTestComponent()` method in the PRODUCTION `Application` class. I was able to get this working slightly differently, such that my production application doesn't have to know anything at all ab...
26,939,349
I have to draw a cone with a given height and radius at a specific co-ordinate. MATLAB has the function `cylinder(r)`, but it draws only a unit cylinder whereas I need it to be of a specific height. None of the other links specify how to draw a cone of height 'h'.
2014/11/14
[ "https://Stackoverflow.com/questions/26939349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1750013/" ]
Probably this is more a workaround that proper support for test module overriding, but it allows to override production modules with test one. The code snippets below shows simple case when you have just one component and one module, but this should work for any scenario. It requires a lot of boilerplate and code repet...
I have solution for **Roboletric 3.+**. I have MainActivity which i want to test without injection on create: ``` public class MainActivity extends BaseActivity{ @Inject public Configuration configuration; @Inject public AppStateService appStateService; @Inject public LoginService loginService; @Ove...
26,939,349
I have to draw a cone with a given height and radius at a specific co-ordinate. MATLAB has the function `cylinder(r)`, but it draws only a unit cylinder whereas I need it to be of a specific height. None of the other links specify how to draw a cone of height 'h'.
2014/11/14
[ "https://Stackoverflow.com/questions/26939349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1750013/" ]
The workaround proposed by @tomrozb is very good and put me on the right track, but my problem with it was that it exposed a `setTestComponent()` method in the PRODUCTION `Application` class. I was able to get this working slightly differently, such that my production application doesn't have to know anything at all ab...
For me the following works best. That's not a test-friendly solution but I use it a lot to mock some APIs while developing whenever backend is not ready yet but I need to implement UI in advance. Dagger (2.29.1) won't allow to override providing methods in modules with: ``` Binding methods may not be overridden in m...
26,939,349
I have to draw a cone with a given height and radius at a specific co-ordinate. MATLAB has the function `cylinder(r)`, but it draws only a unit cylinder whereas I need it to be of a specific height. None of the other links specify how to draw a cone of height 'h'.
2014/11/14
[ "https://Stackoverflow.com/questions/26939349", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1750013/" ]
As @EpicPandaForce rightly says, you can't extend Modules. However, I came up with a sneaky workaround for this which I think avoids a lot of the boilerplate which the other examples suffer from. The trick to 'extending' a Module is to create a partial mock, and mock out the provider methods which you want to override...
For me the following works best. That's not a test-friendly solution but I use it a lot to mock some APIs while developing whenever backend is not ready yet but I need to implement UI in advance. Dagger (2.29.1) won't allow to override providing methods in modules with: ``` Binding methods may not be overridden in m...
235,838
In about 50 minutes from now (it's 11:06 PM) my machine will slow down. It does this every night at the exact same time. Is OSX indexing or what is going on and what can I do about it?
2011/01/20
[ "https://superuser.com/questions/235838", "https://superuser.com", "https://superuser.com/users/63997/" ]
Your processor has [HyperThreading](http://en.wikipedia.org/wiki/HyperThreading), giving it two *virtual/logical* cores per *physical* core.
Sounds like your processor is hyper threaded which means each core will have two threads, Windows will see these threads (logical cores) as additional cores.
235,838
In about 50 minutes from now (it's 11:06 PM) my machine will slow down. It does this every night at the exact same time. Is OSX indexing or what is going on and what can I do about it?
2011/01/20
[ "https://superuser.com/questions/235838", "https://superuser.com", "https://superuser.com/users/63997/" ]
Your processor has [HyperThreading](http://en.wikipedia.org/wiki/HyperThreading), giving it two *virtual/logical* cores per *physical* core.
Looks like the applications are detecting what is called Hyperthreading. This feature effectively allows a single core to behave as two cores. See the wikipedia article if you want to know more. <http://en.wikipedia.org/wiki/Hyper-threading>
235,838
In about 50 minutes from now (it's 11:06 PM) my machine will slow down. It does this every night at the exact same time. Is OSX indexing or what is going on and what can I do about it?
2011/01/20
[ "https://superuser.com/questions/235838", "https://superuser.com", "https://superuser.com/users/63997/" ]
Your processor has [HyperThreading](http://en.wikipedia.org/wiki/HyperThreading), giving it two *virtual/logical* cores per *physical* core.
This is most probably because the i7 870 has hyperthreading (~2 hardware threads by core), my Core i5 760 shows only 4. [For each processor core that is physically present, the operating system addresses two virtual processors](http://en.wikipedia.org/wiki/Hyper-threading)
235,838
In about 50 minutes from now (it's 11:06 PM) my machine will slow down. It does this every night at the exact same time. Is OSX indexing or what is going on and what can I do about it?
2011/01/20
[ "https://superuser.com/questions/235838", "https://superuser.com", "https://superuser.com/users/63997/" ]
Sounds like your processor is hyper threaded which means each core will have two threads, Windows will see these threads (logical cores) as additional cores.
Looks like the applications are detecting what is called Hyperthreading. This feature effectively allows a single core to behave as two cores. See the wikipedia article if you want to know more. <http://en.wikipedia.org/wiki/Hyper-threading>
235,838
In about 50 minutes from now (it's 11:06 PM) my machine will slow down. It does this every night at the exact same time. Is OSX indexing or what is going on and what can I do about it?
2011/01/20
[ "https://superuser.com/questions/235838", "https://superuser.com", "https://superuser.com/users/63997/" ]
This is most probably because the i7 870 has hyperthreading (~2 hardware threads by core), my Core i5 760 shows only 4. [For each processor core that is physically present, the operating system addresses two virtual processors](http://en.wikipedia.org/wiki/Hyper-threading)
Looks like the applications are detecting what is called Hyperthreading. This feature effectively allows a single core to behave as two cores. See the wikipedia article if you want to know more. <http://en.wikipedia.org/wiki/Hyper-threading>
72,661,424
example of a valley: 9,6,5,4,10,13,40,55,68 The list must be strictly decreasing until one point and then after the list must be strictly increasing. Then it is considered as a valley. constraints: Use two pointer approach Guys, I have come up with this code: --- ``` def isValley(n,j,n1): i = 0 res = Fal...
2022/06/17
[ "https://Stackoverflow.com/questions/72661424", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15927270/" ]
I think you can just iterate from left to right (and from right to left), while the elements are strictly decreasing (increasing). Then it's a valley if and only if the pointers end up at the same location ``` def isValley(array): N = len(array) front_i = 0 back_i = N-1 while front_i < N-1 and array[fr...
You can check that there is a strictly negative gradient followed by a strictly positive gradient. One way of doing this (using numpy) is: ```py import numpy as np def isValley(array): d = np.diff(array) return ( np.array_equal( np.concatenate((np.argwhere(d < 0), np.argwhere(d > 0))).flat...
51,844,508
I am trying to aggregate a `GroupedData` object into a `Row` with the best attributes (not `None` or highest `timestamp`) for a `Dataframe` like: ``` ╔═══════╦═══════════╦════════╦════════╦════════╗ ║ group ║ timestamp ║ value1 ║ value2 ║ value3 ║ ╠═══════╬═══════════╬════════╬════════╬════════╣ ║ a ║ 111 ║ ...
2018/08/14
[ "https://Stackoverflow.com/questions/51844508", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1517843/" ]
`SparkSQL` will actually do exactly what you want it to do and ignore null values when aggregating a column. As an example, let's consider the following dataframe: ``` df = sc.parallelize([("a", 1, None), ("b", None, 5), ("a", 2, None), ("b", 0, 7)]).toDF(["A", "B", "C"]) ``` that looks like this: ``` +---+----+---...
You can do like below to achieve your result ``` # create data frame like below to match your grouped data frame df = sqlContext.createDataFrame([('a', 111, None, None, None), ('a', 222, 'a', None, None), ('a', 333, 'b', 1, 1.1), ('a', 444, None, None, 2.2), ('b', 111, 'c', None, 3.3)], ('group', 'timestamp', 'value1...
45,570,827
I am trying to run a script using Java and ProcessBuilder. When I try to run, I receive the following message: error=2, No such file or directory. I dont know what I am doing wrong but here is my code (ps: I tried to execute just the script without arguments and the error is the same: ``` String[] command = {"/teste/...
2017/08/08
[ "https://Stackoverflow.com/questions/45570827", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7478594/" ]
Try replacing ``` String[] command = {"/teste/teste_back/script.sh, "+argument1+", "+argument+""}; ``` with ``` String[] command = {"/teste/teste_back/script.sh", argument1, argument}; ``` Refer [ProcessBuilder](https://docs.oracle.com/javase/8/docs/api/java/lang/ProcessBuilder.html) for more information. > > ...
Unless your script.sh has a comma in its name, that is the mistake: ``` String[] command = {"/teste/teste_back/script.sh" , argument1, argument}; ```
45,570,827
I am trying to run a script using Java and ProcessBuilder. When I try to run, I receive the following message: error=2, No such file or directory. I dont know what I am doing wrong but here is my code (ps: I tried to execute just the script without arguments and the error is the same: ``` String[] command = {"/teste/...
2017/08/08
[ "https://Stackoverflow.com/questions/45570827", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7478594/" ]
Try replacing ``` String[] command = {"/teste/teste_back/script.sh, "+argument1+", "+argument+""}; ``` with ``` String[] command = {"/teste/teste_back/script.sh", argument1, argument}; ``` Refer [ProcessBuilder](https://docs.oracle.com/javase/8/docs/api/java/lang/ProcessBuilder.html) for more information. > > ...
You can define a method with ProcessBuilder. ``` public static Map execCommand(String... str) { Map<Integer, String> map = new HashMap<>(); ProcessBuilder pb = new ProcessBuilder(str); pb.redirectErrorStream(true); Process process = null; try { process = pb.start(); } catch (IOException...
267
I just had an [old question of mine](https://bioinformatics.stackexchange.com/q/3151/298) closed by a moderator with the following comment: > > I’m voting to close this question because it was asked a long time ago, and it is likely that an answer is no longer useful to the person who asked the question, or to the ge...
2021/07/04
[ "https://bioinformatics.meta.stackexchange.com/questions/267", "https://bioinformatics.meta.stackexchange.com", "https://bioinformatics.meta.stackexchange.com/users/298/" ]
I agree. We should not assume that all old and non-answered questions are not interesting or unnecessary. However, I also do see that bioinformatics is a fast evolving discipline and some of the unanswered questions are very quickly outdated. I do think it would be handy to have "question is outdated" closing reason. ...
Bioinformatics Stack Exchange has an existing canned site-specific close reason: > > Questions describing a problem that can't be reproduced and seemingly went away on its own (or went away when a typo was fixed) are off-topic as they are unlikely to help future readers. > > > I used this as a base, and added add...
62,872,032
Getting (java.net.MalformedURLException) unknown protocol: jrt error, with suggestion to rebuild the project, in Intellij. Stack trace - ``` Error:Internal error: (java.net.MalformedURLException) unknown protocol: jrt java.net.MalformedURLException: unknown protocol: jrt at java.net.URL.<init>(URL.java:421) ...
2020/07/13
[ "https://Stackoverflow.com/questions/62872032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5488173/" ]
If I understood the question correctly. this might be what you are looking for ```js var searchIDs = [ { "id":"6001", "other" : "..." }, { "id":"6002", "other" : "..."} ] var list = [ {"id":"9666", "status":"active"}, {"id":"9667", "status":"none"}, {"id":"9999", "status":"none"}, {"id":"96...
I would suggest searching for the items in the first list (searchIDs) in an [Array.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) call on the second list (list), we're essentially checking if each member of list is also a member of searchIDs. This might not be super-ef...
62,872,032
Getting (java.net.MalformedURLException) unknown protocol: jrt error, with suggestion to rebuild the project, in Intellij. Stack trace - ``` Error:Internal error: (java.net.MalformedURLException) unknown protocol: jrt java.net.MalformedURLException: unknown protocol: jrt at java.net.URL.<init>(URL.java:421) ...
2020/07/13
[ "https://Stackoverflow.com/questions/62872032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5488173/" ]
If I understood the question correctly. this might be what you are looking for ```js var searchIDs = [ { "id":"6001", "other" : "..." }, { "id":"6002", "other" : "..."} ] var list = [ {"id":"9666", "status":"active"}, {"id":"9667", "status":"none"}, {"id":"9999", "status":"none"}, {"id":"96...
This works. ``` var searchIDs = [ { "id":"6001", "other" : "..." }, { "id":"6002", "other" : "..."} ] var list = [ {"id":"9666", "status":"active"}, {"id":"9667", "status":"none"}, {"id":"9999", "status":"none"}, {"id":"9668", "status":"none"}, {"id":"9669", "status":"active"}, {...
62,872,032
Getting (java.net.MalformedURLException) unknown protocol: jrt error, with suggestion to rebuild the project, in Intellij. Stack trace - ``` Error:Internal error: (java.net.MalformedURLException) unknown protocol: jrt java.net.MalformedURLException: unknown protocol: jrt at java.net.URL.<init>(URL.java:421) ...
2020/07/13
[ "https://Stackoverflow.com/questions/62872032", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5488173/" ]
If I understood the question correctly. this might be what you are looking for ```js var searchIDs = [ { "id":"6001", "other" : "..." }, { "id":"6002", "other" : "..."} ] var list = [ {"id":"9666", "status":"active"}, {"id":"9667", "status":"none"}, {"id":"9999", "status":"none"}, {"id":"96...
Posting with a very basic approach as below, hope it helps you. ``` var searchIDs = [{ "id":"6001", "other" : "..." }, { "id":"6002", "other" : "..."}] var list = [ {"id":"9666", "status":"active"}, {"id":"9667", "status":"none"}, {"id":"9999", "status":"none"}, {"id":"9668"...
63,516
Not sure if this is right place for this question, but taking an example of the following trend, how can I determine that groups A and B are the areas where the result has been best? [![enter image description here](https://i.stack.imgur.com/SyQMj.png)](https://i.stack.imgur.com/SyQMj.png) I have already tried by doi...
2019/11/21
[ "https://datascience.stackexchange.com/questions/63516", "https://datascience.stackexchange.com", "https://datascience.stackexchange.com/users/78392/" ]
Let's start with the definitions: $$ \text{RMSE} = \sqrt{\frac{1}{N} \sum\_{i = 1}^{N} (y\_i - \hat y\_i)^2}, $$ $$ \text{RMSLE} = \sqrt{\frac{1}{N} \sum\_{i = 1}^{N} (\log y\_i - \log \hat y\_i)^2}, $$ where $y\_i$ is the target value for example $i$ and $\hat y\_i$ is the model's prediction. Both metrics quantify the...
RMSE will have a drastic effect of outliers on its values. But in case of RMSLE we can reduce the effect of outliers by many magnitudes & their effect is much less. RMSLE value will only consider the relative error between Predicted and the actual value neglecting the scale of data. But RMSE value will increase in mag...
27,878
I am rather new to Mac, but I am trying to get familiar with Terminal and I want to change its theme. I am a bit confused on how to go about installing Solarized themes I am seeing so much of around the net. I am able to get the theme installed for vim, but I want it for just my general terminal usage. I see some sugg...
2011/10/15
[ "https://apple.stackexchange.com/questions/27878", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/12137/" ]
Just open up terminal, go to the preferences and select the theme (the .terminal file) ![enter image description here](https://i.stack.imgur.com/KeH56.png)
Double-Clicking a .terminal file will not "run" anything, it will just install the configuration in Terminal. At the end you will get to the same result by double-clicking and by importing the settings from Terminal directly.
27,878
I am rather new to Mac, but I am trying to get familiar with Terminal and I want to change its theme. I am a bit confused on how to go about installing Solarized themes I am seeing so much of around the net. I am able to get the theme installed for vim, but I want it for just my general terminal usage. I see some sugg...
2011/10/15
[ "https://apple.stackexchange.com/questions/27878", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/12137/" ]
Just open up terminal, go to the preferences and select the theme (the .terminal file) ![enter image description here](https://i.stack.imgur.com/KeH56.png)
Using the 'save link as' option on the Github site for these themes didn't work, as noted in another answer. I dug in and noticed that the XML file formats were different when comparing the export of built-in themes and the ones I was trying to import. When I did the **Download .zip** (the link is on the RHS of the ma...
388,189
Ever heard of a proverb that reflects on "solving a problem creates a bigger one"?
2017/05/07
[ "https://english.stackexchange.com/questions/388189", "https://english.stackexchange.com", "https://english.stackexchange.com/users/100311/" ]
***[out of the frying pan (and) into the fire](http://idioms.thefreedictionary.com/out+of+the+frying+pan+into+the+fire)*** suggests the idea that sometime trying to solve a problem may result in a bigger one: > > Fig. from a bad situation to a worse situation. (\*Typically: get ~; go ~; jump ~.) > > > * When I trie...
[*The cure is worse than the disease* (Wikitionary):](https://en.wiktionary.org/wiki/the_cure_is_worse_than_the_disease) > > 2. (*figuratively*) The solution or proposed solution to a problem produces a worse net result than the problem does (or threatens a non-negligible risk of doing so), especially via unintended ...
479,438
This is only a general question in order for me to get a better idea of my dual boot (windows 8 & Ubuntu) systems. I noticed that every time I run Ubuntu (which is becoming more often) the battery power gets consumed really fast. I am not performing any special tasks at the moment, just getting to know the system, for...
2014/06/08
[ "https://askubuntu.com/questions/479438", "https://askubuntu.com", "https://askubuntu.com/users/285421/" ]
Similar trouble can get solved by typing ``` $ tidy --help The program 'tidy' is currently not installed. You can install it by typing: sudo apt-get install tidy ``` ... to get a hint on which packages might come into question. If there are several suggested ones, then look them up (google). The " --help" makes MO...
Run this in a terminal to install tidy: ``` sudo apt-get install tidy ``` then you are able to compile (`F8`) html files in Geany. If you want to run them in the browser press `F5`.
45,091,841
I'm using expect to simulate sftp interactive prompt (`download_from_sftp.exp`): ``` #!/usr/bin/expect set username [lindex $argv 0]; set server [lindex $argv 1] set password [lindex $argv 2]; set source [lindex $argv 3]; set target [lindex $argv 4]; set timeout 2400; spawn sftp "$username@$server" expect "password:...
2017/07/13
[ "https://Stackoverflow.com/questions/45091841", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3935286/" ]
In the shell, you cannot "serialize" a command with arguments into a single string and get the command deserialized with some spaces as regular spaces and some as "special" spaces. You need to use a shell array (bash, ksh, zsh all have arrays) ``` cmd=( "$git_directory/sh/download_from_sftp.exp" "$sftp_usern...
You can enclose the arguement with quotes: ``` cmd="${git_directory}/sh/download_from_sftp.exp $sftp_username $sftp_server$sftp_password \"${src_xml}\" \"${target_xml}\"" $cmd # run ```
53,053,326
I got an MVC 5 application that i'm porting to asp.net Core. In the MVC application call to controller we're made using AngularJS $resource (sending JSON) and we we're POSTing data doing : ``` ressource.save({ entries: vm.entries, projectId: vm.project.id }).$promise... ``` that will send a JSON body like: ``` { ...
2018/10/29
[ "https://Stackoverflow.com/questions/53053326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4115322/" ]
As pointed out in the comment, one possible solution is to unify the properties you're posting onto a single model class. Something like the following should do the trick: ``` public class SaveModel { public List<EntryViewModel> Entries{get;set;} public int ProjectId {get;set;} } ``` Don't forget to decor...
It's still rough but I made a Filter to mimic the feature. ``` public class OldMVCFilter : IActionFilter { public void OnActionExecuted(ActionExecutedContext context) { } public void OnActionExecuting(ActionExecutingContext context) { if (context.HttpContext.Request.Method != "GET") ...
53,053,326
I got an MVC 5 application that i'm porting to asp.net Core. In the MVC application call to controller we're made using AngularJS $resource (sending JSON) and we we're POSTing data doing : ``` ressource.save({ entries: vm.entries, projectId: vm.project.id }).$promise... ``` that will send a JSON body like: ``` { ...
2018/10/29
[ "https://Stackoverflow.com/questions/53053326", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4115322/" ]
you cannot have multiple parameter with the FromBody attibute in an action method. If that is need, use a complex type such as a class with properties equivalent to the parameter or dynamic type like that ``` [HttpPost("save/{projectId}")] public JsonResult Save(int projectId, [FromBody] dynamic entries) { // code her...
It's still rough but I made a Filter to mimic the feature. ``` public class OldMVCFilter : IActionFilter { public void OnActionExecuted(ActionExecutedContext context) { } public void OnActionExecuting(ActionExecutingContext context) { if (context.HttpContext.Request.Method != "GET") ...
113,288
I have a 32bit 10.04 server has 32gb ram I am running opencart e-commerce sites (php) Max How much ram can use by opencart? (32gb or 4gb?)
2012/03/15
[ "https://askubuntu.com/questions/113288", "https://askubuntu.com", "https://askubuntu.com/users/50776/" ]
If you use a [PAE-kernel](https://help.ubuntu.com/community/EnablingPAE) a 32 bit operating systems like yours, can use up to 64 Gb of memory (RAM).
Also, PHP has various tuning parameters, including `memory_limit`, which may be as high as 128MiB if you're running a recent version. Check your `php.ini` file for details.
113,288
I have a 32bit 10.04 server has 32gb ram I am running opencart e-commerce sites (php) Max How much ram can use by opencart? (32gb or 4gb?)
2012/03/15
[ "https://askubuntu.com/questions/113288", "https://askubuntu.com", "https://askubuntu.com/users/50776/" ]
If you have a PAE kernel installed, your 32 bit operating system should be able to address up to 64 GB of RAM. As far as I know, each single process should be able to address not more than 4 GB RAM. Now since opencart is a PHP application and I assume that each visit of your website by another browser spwans a new PHP...
Also, PHP has various tuning parameters, including `memory_limit`, which may be as high as 128MiB if you're running a recent version. Check your `php.ini` file for details.
9,563,302
I have service url : [please check it](http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/export?bbox=9153621.1267%2C-644273.9207%2C13435472.9966%2C3637577.9492&bboxSR=&layers=&layerdefs=&size=800%2C600&imageSR=&format=png&transparent=false&dpi=&time=&layerTimeOptions=&f=pjson), It's retur...
2012/03/05
[ "https://Stackoverflow.com/questions/9563302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1115817/" ]
I imagine you need the service request from the server and not from the client; if so a straightforward way would be ``` string json = null; HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/export?bbox=9153621.1267%2C-644273....
1. Add Json.NET package (see for reference [How to install JSON.NET using NuGet?](https://stackoverflow.com/questions/4444903/how-to-install-json-net-using-nuget)) 2. Use the following code: ``` using Newtonsoft.Json; ...... string url = "..."; var webClient = new WebClient(); var s = webClient.DownloadString(url);...
9,563,302
I have service url : [please check it](http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/export?bbox=9153621.1267%2C-644273.9207%2C13435472.9966%2C3637577.9492&bboxSR=&layers=&layerdefs=&size=800%2C600&imageSR=&format=png&transparent=false&dpi=&time=&layerTimeOptions=&f=pjson), It's retur...
2012/03/05
[ "https://Stackoverflow.com/questions/9563302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1115817/" ]
Using Data Contracts and `DataContractJsonSerializer`: References Required: -------------------- ``` using System.Runtime.Serialization; using System.IO; using System.Runtime.Serialization.Json; using System.Text; using System.Net; ``` Data Contract ------------- ``` [DataContract] internal class GISData { [Da...
1. Add Json.NET package (see for reference [How to install JSON.NET using NuGet?](https://stackoverflow.com/questions/4444903/how-to-install-json-net-using-nuget)) 2. Use the following code: ``` using Newtonsoft.Json; ...... string url = "..."; var webClient = new WebClient(); var s = webClient.DownloadString(url);...
58,247
Say I have a disease that is autosomal recessive. If one was heterozygous for this trait, could the recessive gene still be expressed? I know sickle cell anemia has a heterozygous advantage so it must be possible but what are the conditions for this to happen and also to what degree? EDIT: This isn't asking how a gen...
2017/04/10
[ "https://biology.stackexchange.com/questions/58247", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/31455/" ]
**Short answer** The concepts dominance, additivity, epistasis, recessivity and others are all specific to a given phenotype. Here you are getting confused because you are considering two different phenotypes at once. **Slightly longer answer** By definition, if an allele is recessive, then in the heterozygote state...
There are a couple of distinctions to make here. You can have an allele which is 'Phenotypically Expressed', that is it's visible at the organism level by some feature. In that case, no, recessive alleles by definition do not express that particular phenotype. Now at the molecular level things can be different. You ha...
58,247
Say I have a disease that is autosomal recessive. If one was heterozygous for this trait, could the recessive gene still be expressed? I know sickle cell anemia has a heterozygous advantage so it must be possible but what are the conditions for this to happen and also to what degree? EDIT: This isn't asking how a gen...
2017/04/10
[ "https://biology.stackexchange.com/questions/58247", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/31455/" ]
**Short answer** The concepts dominance, additivity, epistasis, recessivity and others are all specific to a given phenotype. Here you are getting confused because you are considering two different phenotypes at once. **Slightly longer answer** By definition, if an allele is recessive, then in the heterozygote state...
Others have already explained. I add some clarifications. You said that you know the molecular mechanism of dominance; revisiting them will answer your queries. Gene expression means the formation of the gene product in whatever form it is active – protein or RNA. If an allele is recessive it can: * Not form the pro...