qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
31,173,307
What are the differences between this: ``` if(a && b) { //code } ``` and this: ``` if(a) { if(b) { //code } } ``` From what I know `b` will only get evaluated in the first code block if `a` is true, and the second code block would be the same thing. Are there any benefits of using o...
2015/07/01
[ "https://Stackoverflow.com/questions/31173307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4714970/" ]
It makes a difference if you have an **else** associated with each **if**. ``` if(a && b) { //do something if both a and b evaluate to true } else { //do something if either of a or b is false } ``` and this: ``` if(a) { if(b) { //do something if both a and b are true } else { ...
there shouldn't be a difference, but in readability I would prefer the first one, because it is less verbose and less indented.
31,173,307
What are the differences between this: ``` if(a && b) { //code } ``` and this: ``` if(a) { if(b) { //code } } ``` From what I know `b` will only get evaluated in the first code block if `a` is true, and the second code block would be the same thing. Are there any benefits of using o...
2015/07/01
[ "https://Stackoverflow.com/questions/31173307", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4714970/" ]
They get compiled to the same bytecode. No performance difference. Readability is the only difference. As a huge generalization, short-circuiting looks better but nesting is slightly clearer. It really boils down to the specific use case. I'd typically short-circuit. --- I tried this out. Here's the code: ``` publi...
It makes a difference if you have an **else** associated with each **if**. ``` if(a && b) { //do something if both a and b evaluate to true } else { //do something if either of a or b is false } ``` and this: ``` if(a) { if(b) { //do something if both a and b are true } else { ...
403,709
I have a map $f(t,g,h)$ where $f:[0,1]\times C^1 \times C^1 \to \mathbb{R}.$ I want to define $$F(t,g,h) = \frac{d}{dt}f(t,g,h)$$ where $g$ and $h$ have no $t$-dependence in them. So $g(x) = t^2x$ would not be admissible if you want to calculate what $F$ is. How do I write this properly? Is it correct to write instead...
2013/05/27
[ "https://math.stackexchange.com/questions/403709", "https://math.stackexchange.com", "https://math.stackexchange.com/users/61615/" ]
Without words... Well, nearly without words... ![enter image description here](https://i.stack.imgur.com/la68x.png)
For $0\leq\phi\leq{\pi\over2}$ consider the two points $(\cos \phi,\pm\sin \phi)$ on the unit circle. Their distance is $2\sin \phi$, while the length of the circular arc between them is $2\phi$. Therefore we have $$2\sin\phi\leq 2\phi\qquad(0\leq\phi\leq{\pi\over2})\ .$$ Putting $\phi:=|x|$ we obtain $$|\sin x|\leq |x...
403,709
I have a map $f(t,g,h)$ where $f:[0,1]\times C^1 \times C^1 \to \mathbb{R}.$ I want to define $$F(t,g,h) = \frac{d}{dt}f(t,g,h)$$ where $g$ and $h$ have no $t$-dependence in them. So $g(x) = t^2x$ would not be admissible if you want to calculate what $F$ is. How do I write this properly? Is it correct to write instead...
2013/05/27
[ "https://math.stackexchange.com/questions/403709", "https://math.stackexchange.com", "https://math.stackexchange.com/users/61615/" ]
For $0\leq\phi\leq{\pi\over2}$ consider the two points $(\cos \phi,\pm\sin \phi)$ on the unit circle. Their distance is $2\sin \phi$, while the length of the circular arc between them is $2\phi$. Therefore we have $$2\sin\phi\leq 2\phi\qquad(0\leq\phi\leq{\pi\over2})\ .$$ Putting $\phi:=|x|$ we obtain $$|\sin x|\leq |x...
The sine function is an odd function, so it suffices to prove the inequality for nonnegative $x$. For $0\le x\le 1$, rewrite $\sin x$ in two different ways: \begin{align\*} \sin x &=\sum\_{n=0}^\infty\left(\frac{x^{4n+1}}{(4n+1)!} - \frac{x^{4n+3}}{(4n+3)!}\right)\tag{1}\\ &=x - \sum\_{n=0}^\infty\left(\frac{x^{4n+3}}...
403,709
I have a map $f(t,g,h)$ where $f:[0,1]\times C^1 \times C^1 \to \mathbb{R}.$ I want to define $$F(t,g,h) = \frac{d}{dt}f(t,g,h)$$ where $g$ and $h$ have no $t$-dependence in them. So $g(x) = t^2x$ would not be admissible if you want to calculate what $F$ is. How do I write this properly? Is it correct to write instead...
2013/05/27
[ "https://math.stackexchange.com/questions/403709", "https://math.stackexchange.com", "https://math.stackexchange.com/users/61615/" ]
Without words... Well, nearly without words... ![enter image description here](https://i.stack.imgur.com/la68x.png)
The sine function is an odd function, so it suffices to prove the inequality for nonnegative $x$. For $0\le x\le 1$, rewrite $\sin x$ in two different ways: \begin{align\*} \sin x &=\sum\_{n=0}^\infty\left(\frac{x^{4n+1}}{(4n+1)!} - \frac{x^{4n+3}}{(4n+3)!}\right)\tag{1}\\ &=x - \sum\_{n=0}^\infty\left(\frac{x^{4n+3}}...
65,618,221
Why isn't C/C++ called platform independent like java when the same source code written in C/C++ can be made to run on different operating systems by different compilers, just like JVM is used in java. Isn't different compilers and JVM doing same thing and achieving platform independence.
2021/01/07
[ "https://Stackoverflow.com/questions/65618221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11815436/" ]
> > Isn't different compilers and JVM doing same thing and achieving platform independence. > > > The JVM per se is the platform. It is abstracting away, whether it is ARM/AMD64/... C/C++ is getting compiled. It may only run on the processor(family) that it was compiled for. You can't just take a binary for MIPS ...
C++ language itself doesn't assume any specific platform, so in that sense it is platform independent.
65,618,221
Why isn't C/C++ called platform independent like java when the same source code written in C/C++ can be made to run on different operating systems by different compilers, just like JVM is used in java. Isn't different compilers and JVM doing same thing and achieving platform independence.
2021/01/07
[ "https://Stackoverflow.com/questions/65618221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11815436/" ]
> > Isn't different compilers and JVM doing same thing and achieving platform independence. > > > Not really. Your Java program is running *within* the JVM, which acts as a translation layer between the Java byte code and the native machine code. It *hides* the platform-specific details from the Java application c...
In case of C or C++ (language that are not platform independent), the compiler generates an .exe file which is OS dependent. When we try to run this .exe file on another OS it does not run, since it is OS dependent and hence is not compatible with the other OS.
65,618,221
Why isn't C/C++ called platform independent like java when the same source code written in C/C++ can be made to run on different operating systems by different compilers, just like JVM is used in java. Isn't different compilers and JVM doing same thing and achieving platform independence.
2021/01/07
[ "https://Stackoverflow.com/questions/65618221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11815436/" ]
> > Isn't different compilers and JVM doing same thing and achieving platform independence. > > > Not really. Your Java program is running *within* the JVM, which acts as a translation layer between the Java byte code and the native machine code. It *hides* the platform-specific details from the Java application c...
C++ language itself doesn't assume any specific platform, so in that sense it is platform independent.
65,618,221
Why isn't C/C++ called platform independent like java when the same source code written in C/C++ can be made to run on different operating systems by different compilers, just like JVM is used in java. Isn't different compilers and JVM doing same thing and achieving platform independence.
2021/01/07
[ "https://Stackoverflow.com/questions/65618221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11815436/" ]
> > Isn't different compilers and JVM doing same thing and achieving platform independence. > > > Not really. Your Java program is running *within* the JVM, which acts as a translation layer between the Java byte code and the native machine code. It *hides* the platform-specific details from the Java application c...
> > Isn't different compilers and JVM doing same thing and achieving platform independence. > > > The JVM per se is the platform. It is abstracting away, whether it is ARM/AMD64/... C/C++ is getting compiled. It may only run on the processor(family) that it was compiled for. You can't just take a binary for MIPS ...
65,618,221
Why isn't C/C++ called platform independent like java when the same source code written in C/C++ can be made to run on different operating systems by different compilers, just like JVM is used in java. Isn't different compilers and JVM doing same thing and achieving platform independence.
2021/01/07
[ "https://Stackoverflow.com/questions/65618221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11815436/" ]
It's not the language itself that is platform dependent. It's possible to compile both C and C++ for JVM, but it's not very common to do so. [Compiling C++ for the JVM](https://stackoverflow.com/q/4221605/6699433) In the same way, it is possible to compile Java for a specific target instead of JVM. [Compiling java sou...
In case of C or C++ (language that are not platform independent), the compiler generates an .exe file which is OS dependent. When we try to run this .exe file on another OS it does not run, since it is OS dependent and hence is not compatible with the other OS.
65,618,221
Why isn't C/C++ called platform independent like java when the same source code written in C/C++ can be made to run on different operating systems by different compilers, just like JVM is used in java. Isn't different compilers and JVM doing same thing and achieving platform independence.
2021/01/07
[ "https://Stackoverflow.com/questions/65618221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11815436/" ]
It's not the language itself that is platform dependent. It's possible to compile both C and C++ for JVM, but it's not very common to do so. [Compiling C++ for the JVM](https://stackoverflow.com/q/4221605/6699433) In the same way, it is possible to compile Java for a specific target instead of JVM. [Compiling java sou...
C++ language itself doesn't assume any specific platform, so in that sense it is platform independent.
65,618,221
Why isn't C/C++ called platform independent like java when the same source code written in C/C++ can be made to run on different operating systems by different compilers, just like JVM is used in java. Isn't different compilers and JVM doing same thing and achieving platform independence.
2021/01/07
[ "https://Stackoverflow.com/questions/65618221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11815436/" ]
> > Isn't different compilers and JVM doing same thing and achieving platform independence. > > > Not really. Your Java program is running *within* the JVM, which acts as a translation layer between the Java byte code and the native machine code. It *hides* the platform-specific details from the Java application c...
The role of JVM in the independent platform is that it acts as a virtual processor. when we used c/c++ to compiler different processor converts the source code into a different binary pattern that's why there are not platform-independent.
65,618,221
Why isn't C/C++ called platform independent like java when the same source code written in C/C++ can be made to run on different operating systems by different compilers, just like JVM is used in java. Isn't different compilers and JVM doing same thing and achieving platform independence.
2021/01/07
[ "https://Stackoverflow.com/questions/65618221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11815436/" ]
In case of C or C++ (language that are not platform independent), the compiler generates an .exe file which is OS dependent. When we try to run this .exe file on another OS it does not run, since it is OS dependent and hence is not compatible with the other OS.
The role of JVM in the independent platform is that it acts as a virtual processor. when we used c/c++ to compiler different processor converts the source code into a different binary pattern that's why there are not platform-independent.
65,618,221
Why isn't C/C++ called platform independent like java when the same source code written in C/C++ can be made to run on different operating systems by different compilers, just like JVM is used in java. Isn't different compilers and JVM doing same thing and achieving platform independence.
2021/01/07
[ "https://Stackoverflow.com/questions/65618221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11815436/" ]
> > Isn't different compilers and JVM doing same thing and achieving platform independence. > > > Not really. Your Java program is running *within* the JVM, which acts as a translation layer between the Java byte code and the native machine code. It *hides* the platform-specific details from the Java application c...
It's not the language itself that is platform dependent. It's possible to compile both C and C++ for JVM, but it's not very common to do so. [Compiling C++ for the JVM](https://stackoverflow.com/q/4221605/6699433) In the same way, it is possible to compile Java for a specific target instead of JVM. [Compiling java sou...
65,618,221
Why isn't C/C++ called platform independent like java when the same source code written in C/C++ can be made to run on different operating systems by different compilers, just like JVM is used in java. Isn't different compilers and JVM doing same thing and achieving platform independence.
2021/01/07
[ "https://Stackoverflow.com/questions/65618221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11815436/" ]
It's not the language itself that is platform dependent. It's possible to compile both C and C++ for JVM, but it's not very common to do so. [Compiling C++ for the JVM](https://stackoverflow.com/q/4221605/6699433) In the same way, it is possible to compile Java for a specific target instead of JVM. [Compiling java sou...
The role of JVM in the independent platform is that it acts as a virtual processor. when we used c/c++ to compiler different processor converts the source code into a different binary pattern that's why there are not platform-independent.
3,816,331
I have 3 ways I want to filter: 1. by name 2. by list 3. and show all I'm using ASP.NET 3.5 and SQL Server 2008. Using ADO.NET and stored procs. I'm passing my list as a table valued parameter (but I'm testing with a table variable) and the name as a nvarchar. I have "show all" as ISNULL(@var, column) = column. Ob...
2010/09/28
[ "https://Stackoverflow.com/questions/3816331", "https://Stackoverflow.com", "https://Stackoverflow.com/users/428757/" ]
I'm a bit confused by your question but I'll give it a shot. First off i suspect your issues with the incorrect records being returned have to do with your comparison of a null value. To demonstrate what I am talking about query any table you want and add this to the end: ``` WHERE null = null ``` no records will b...
Have you considered changing the WHERE clause to something like: ``` WHERE Answers.taskAction = 1 AND(ISNULL(@resp1, Answers.responsible) = Answers.responsible OR Answers.responsible IN (SELECT responsible FROM uT)) ``` Instead of JOINing on the table-valued parameter?
49,815,229
i've been trying to authenticate user input using the mysqli\_fetch\_assoc function, though it works i.e redirects user to the home page when the username and password is correct, but it doesn't display the error message(s) when the inputs are incorrect however it displays the username error message when the username i...
2018/04/13
[ "https://Stackoverflow.com/questions/49815229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9602904/" ]
``` if ($row) { if ($row['Username'] != $username ) { $username_err = "Incorrect Username"; }elseif ($row['Password'] != $password ) { $password_err = "Incorrect Password"; }else{ header("location:../home/homeIndex.php"); } } ``` data inside the ...
You are wrapping the incorrect username conditions inside `if($row)` , this is not going to work as inside query , you are checking for username and password both , but incase any of these is wrong , query is going to return 0 results so that means `if($row)` is negative and anything inside it will not work ... try bel...
49,815,229
i've been trying to authenticate user input using the mysqli\_fetch\_assoc function, though it works i.e redirects user to the home page when the username and password is correct, but it doesn't display the error message(s) when the inputs are incorrect however it displays the username error message when the username i...
2018/04/13
[ "https://Stackoverflow.com/questions/49815229", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9602904/" ]
``` if ($row) { if ($row['Username'] != $username ) { $username_err = "Incorrect Username"; }elseif ($row['Password'] != $password ) { $password_err = "Incorrect Password"; }else{ header("location:../home/homeIndex.php"); } } ``` data inside the ...
If Username or password are incorrect the $result must be empty. Check if !empty($result).
68,146,659
Is it possible to achive authentication with email and password in flutter without using firebase? I have searched around Stackoverflow and internet in general and found nothing about this. I am creating a simple authentication class this is what I have done at the moment: ``` class User { bool isAuthenticated = fal...
2021/06/26
[ "https://Stackoverflow.com/questions/68146659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10457357/" ]
You can use Nodejs & express to create your own API and MongoDB or any other DB to act as a persistent DB. I am attaching my github repo link which has minimum code required to setup a email/password auth in mongodb [Github](https://github.com/AshutoshPatole/backends) EDIT : I have little to no idea about sessions bu...
Yes it is Totally possible to create Authentication without Firebase, but it becomes a-lot more difficult and there are multiple solutions. What firebase provides: ----------------------- 1. Server space with no down time 2. Complete set of Api's including authentication with various methods 3. Strong security(built ...
68,146,659
Is it possible to achive authentication with email and password in flutter without using firebase? I have searched around Stackoverflow and internet in general and found nothing about this. I am creating a simple authentication class this is what I have done at the moment: ``` class User { bool isAuthenticated = fal...
2021/06/26
[ "https://Stackoverflow.com/questions/68146659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10457357/" ]
This answer is based of #edit1. Since you mentioned that you already know how to set up tokens on the server side you're half way done. Here's a few assumptions I'm making, you already know js/php and worked with JSON output, The database already has a column and table that keeps track of sessions and user\_id. Since ...
Yes it is Totally possible to create Authentication without Firebase, but it becomes a-lot more difficult and there are multiple solutions. What firebase provides: ----------------------- 1. Server space with no down time 2. Complete set of Api's including authentication with various methods 3. Strong security(built ...
68,146,659
Is it possible to achive authentication with email and password in flutter without using firebase? I have searched around Stackoverflow and internet in general and found nothing about this. I am creating a simple authentication class this is what I have done at the moment: ``` class User { bool isAuthenticated = fal...
2021/06/26
[ "https://Stackoverflow.com/questions/68146659", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10457357/" ]
This answer is based of #edit1. Since you mentioned that you already know how to set up tokens on the server side you're half way done. Here's a few assumptions I'm making, you already know js/php and worked with JSON output, The database already has a column and table that keeps track of sessions and user\_id. Since ...
You can use Nodejs & express to create your own API and MongoDB or any other DB to act as a persistent DB. I am attaching my github repo link which has minimum code required to setup a email/password auth in mongodb [Github](https://github.com/AshutoshPatole/backends) EDIT : I have little to no idea about sessions bu...
8,713
another user recommend to me in another post [this page](http://www.bricklink.com/) to buy miniatures for my growing collection of minifigures of LEGO Star Wars. My question regarding the page is simple, there is a large assortment of minifigures of all the years, but why no one includes their accessories? For example...
2017/03/15
[ "https://bricks.stackexchange.com/questions/8713", "https://bricks.stackexchange.com", "https://bricks.stackexchange.com/users/8450/" ]
As you've noticed, the [Starwars Minifigs](https://www.bricklink.com/catalogList.asp?catType=M&catString=65) don't come with accessories - this probably makes it easier for the sellers and buyers in terms of sorting: for example the battle packs often came with 3 or 4 different characters along with 2 different weapon ...
Since you are asking 'why' accessories are not included in listings for minifigures, I will give you a short and simple answer to directly answer that part of your question. It is not nearly as efficient to try and have figures with their accessories be listed as it would be for them to be alone. Accessories are diffe...
8,585,380
My code gives me segfault error: which I don't understand,the debugger says error comes from printing the value from stored\_ ``` char *stored_ = NULL; char testMessage[15]; //strcpy(stored_, testMessage); for (int a = 0;a < 10; a++) { sprintf(testMessage,"Message::%i\n",a); printf("string is:%s;length is %...
2011/12/21
[ "https://Stackoverflow.com/questions/8585380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1051003/" ]
Fist up, `sizeof(char)` is *always* 1, you don't need to multiply by it. Secondly, when you're allocating room for a string, you have to use: ``` malloc (strlen (string) + 1); ``` In other words, you need room for the null byte at the end. Thirdly, you appear to be confused between character pointers and character...
You don't appear to be calculating the string length of `stored_` correctly. Every loop you assign `testMessage` to `&stored_[loopindex]`. I'm not sure if this is intended behaviour, but it's what you're doing, so I'd expect your 10th iteration to give the string `"MMMMMMMMMessage::9\n"`. Anyway, `testMessage` is alw...
17,787,603
This is code to perform the delete operation. The four images appear, but the alert box for delete operation is not appearing by giving the onload functionality. Please guide me...here is the code. ``` // script for deletedelete operation $(document).ready(function(){ $('a.delete').on('click',function(...
2013/07/22
[ "https://Stackoverflow.com/questions/17787603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2605662/" ]
You can use jQuery's build in filter() function, and write a filter with the condition you described. First, you should hide all the items with any price. ``` $(".price").parent().hide(); ``` Then, you can filter all the items with in-range prices and show them: ``` $(".price").filter(function(){ var $this = $...
I would go by something like: 1. Get all the divs that have prices. 2. Iterate through all: 1. Transform the strings (minus the pound symbol) to float numbers and compare with an IF statement if they are inside the provided range. 2. If they are just go to the next (use continue maybe) 3. Else (not in the range) ad...
17,787,603
This is code to perform the delete operation. The four images appear, but the alert box for delete operation is not appearing by giving the onload functionality. Please guide me...here is the code. ``` // script for deletedelete operation $(document).ready(function(){ $('a.delete').on('click',function(...
2013/07/22
[ "https://Stackoverflow.com/questions/17787603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2605662/" ]
I'd use a function like this one, where `range` is the string you gave ``` function highlightDivs(range) { var lower = range.split(" ")[0].slice(1); var upper = range.split(" ")[2].slice(1); $('.section-link').hide(); $('.section-link').children('.price').each(function() { if (...
You can use jQuery's build in filter() function, and write a filter with the condition you described. First, you should hide all the items with any price. ``` $(".price").parent().hide(); ``` Then, you can filter all the items with in-range prices and show them: ``` $(".price").filter(function(){ var $this = $...
17,787,603
This is code to perform the delete operation. The four images appear, but the alert box for delete operation is not appearing by giving the onload functionality. Please guide me...here is the code. ``` // script for deletedelete operation $(document).ready(function(){ $('a.delete').on('click',function(...
2013/07/22
[ "https://Stackoverflow.com/questions/17787603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2605662/" ]
I'd use a function like this one, where `range` is the string you gave ``` function highlightDivs(range) { var lower = range.split(" ")[0].slice(1); var upper = range.split(" ")[2].slice(1); $('.section-link').hide(); $('.section-link').children('.price').each(function() { if (...
I would go by something like: 1. Get all the divs that have prices. 2. Iterate through all: 1. Transform the strings (minus the pound symbol) to float numbers and compare with an IF statement if they are inside the provided range. 2. If they are just go to the next (use continue maybe) 3. Else (not in the range) ad...
17,787,603
This is code to perform the delete operation. The four images appear, but the alert box for delete operation is not appearing by giving the onload functionality. Please guide me...here is the code. ``` // script for deletedelete operation $(document).ready(function(){ $('a.delete').on('click',function(...
2013/07/22
[ "https://Stackoverflow.com/questions/17787603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2605662/" ]
Use jQuery's filter() An example -> <http://jsfiddle.net/H6mtY/1/> ``` var minValue = 0.01, maxValue = 100.01; var filterFn = function(i){ var $this = $(this); if($this.hasClass('amount')){ // assume that text is always a symbol with a number var value = +$this.text().match(/\d+.?\d*...
I would go by something like: 1. Get all the divs that have prices. 2. Iterate through all: 1. Transform the strings (minus the pound symbol) to float numbers and compare with an IF statement if they are inside the provided range. 2. If they are just go to the next (use continue maybe) 3. Else (not in the range) ad...
17,787,603
This is code to perform the delete operation. The four images appear, but the alert box for delete operation is not appearing by giving the onload functionality. Please guide me...here is the code. ``` // script for deletedelete operation $(document).ready(function(){ $('a.delete').on('click',function(...
2013/07/22
[ "https://Stackoverflow.com/questions/17787603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2605662/" ]
I'd use a function like this one, where `range` is the string you gave ``` function highlightDivs(range) { var lower = range.split(" ")[0].slice(1); var upper = range.split(" ")[2].slice(1); $('.section-link').hide(); $('.section-link').children('.price').each(function() { if (...
Use jQuery's filter() An example -> <http://jsfiddle.net/H6mtY/1/> ``` var minValue = 0.01, maxValue = 100.01; var filterFn = function(i){ var $this = $(this); if($this.hasClass('amount')){ // assume that text is always a symbol with a number var value = +$this.text().match(/\d+.?\d*...
122,741
We are traveling from Tbilisi to Ataturk airport and then with a transit to Antalya; both legs were sold under a single ticket by Turkish Airlines. * Do they automatically put luggage for transit? * How far is the second terminal, and where we should go for passport control?
2018/09/23
[ "https://travel.stackexchange.com/questions/122741", "https://travel.stackexchange.com", "https://travel.stackexchange.com/users/84484/" ]
For International to Domestic connections on Turkish Airlines, your bags will be automatically transferred to the domestic flight IF (and only if!) the domestic destination you are travelling to has customs facilities at the airport. In the case of Antalya, they DO have such facilities, so your bags will be automatica...
* I just always ask about luggage at the check-in when I drop it off to be extra sure. I expect that it would be transferred automatically in your case. * There is no way that you will miss the passport control (just follow the signs), and Ataturk is a single large building so different places in it can't be very far.
34,666,777
I am creating a simple program that takes some input and turns it into an output to .txt file. I have been trying to use if-else statements to make it so that after it has received a name ; ``` //user enters name and then moves to next line System.out.println("Enter Your Name"); gamerName = Scan.nextLine(); ``` it ...
2016/01/07
[ "https://Stackoverflow.com/questions/34666777", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5517288/" ]
In this case, the problem turned out to be because my project in Eclipse depended on downstream project. When I went into my project's build path and removed the downstream project, my test went from red to green. The difference was spotted by contrasting output from the correct Maven CLI execution and the incorrect E...
Check that the class name ends with "Test", otherwise maven will just skip the tests in that class and that's confusing you. Eclipse JUnit doesn't care about the class name and runs it anyway
23,936
I have the following setup: There is a collection of items I and a collection of partial rankings V. That is, an element of V is a total ordering on a subset of I. There is no expectation of consistency among the elements of V: it may be that x < y for one element and y < x for another. I would like to assign a scor...
2010/05/08
[ "https://mathoverflow.net/questions/23936", "https://mathoverflow.net", "https://mathoverflow.net/users/4959/" ]
Here is a list biased towards what is remarkable in the complex case. (To the potential peeved real manifold: I love you too.) By "complex" I mean holomorphic manifolds and holomorphic maps; by "real" I mean $\mathcal{C}^{\infty}$ manifolds and $\mathcal{C}^{\infty}$ maps. * Consider a map $f$ between manifolds of *e...
Some embedding statements. A compact complex subvariety of ${\mathbb{C}}^n$ is a point. However, every compact real manifold of dimension $n$ can be realized as a submanifold of some ${\mathbb{R}}^{2n}$. There are compact complex manifolds that cannot be embedded into complex projective space. An example most often q...
23,936
I have the following setup: There is a collection of items I and a collection of partial rankings V. That is, an element of V is a total ordering on a subset of I. There is no expectation of consistency among the elements of V: it may be that x < y for one element and y < x for another. I would like to assign a scor...
2010/05/08
[ "https://mathoverflow.net/questions/23936", "https://mathoverflow.net", "https://mathoverflow.net/users/4959/" ]
Any two compact surfaces (without boundary) of the same genus are diffeomorphic. However, if S is a surface of genus g > 0, there are uncountably many non-isomorphic complex (or, equivalently, algebraic) structures on S.
For a closed analytic subset Z ⊂ S of a (say compact) complex manifold with complement U=S-Z one has additivity of the (topological) Euler characteristic: Χ(S)=Χ(Z)+Χ(U). This is wrong for if S and Z are topological spaces or smooth manifolds. Indeed, take for Z a point on a circle S. This (surprising) difference wa...
23,936
I have the following setup: There is a collection of items I and a collection of partial rankings V. That is, an element of V is a total ordering on a subset of I. There is no expectation of consistency among the elements of V: it may be that x < y for one element and y < x for another. I would like to assign a scor...
2010/05/08
[ "https://mathoverflow.net/questions/23936", "https://mathoverflow.net", "https://mathoverflow.net/users/4959/" ]
Here is a list biased towards what is remarkable in the complex case. (To the potential peeved real manifold: I love you too.) By "complex" I mean holomorphic manifolds and holomorphic maps; by "real" I mean $\mathcal{C}^{\infty}$ manifolds and $\mathcal{C}^{\infty}$ maps. * Consider a map $f$ between manifolds of *e...
Some of these properties are local, and distinguish analytic and algebraic functions, from smooth functions. Others are global and distinguish compact manifolds from projective manifolds by their difference in containment of many subvarieties. some are as simple as contrasting the dimension, and homology of say proje...
23,936
I have the following setup: There is a collection of items I and a collection of partial rankings V. That is, an element of V is a total ordering on a subset of I. There is no expectation of consistency among the elements of V: it may be that x < y for one element and y < x for another. I would like to assign a scor...
2010/05/08
[ "https://mathoverflow.net/questions/23936", "https://mathoverflow.net", "https://mathoverflow.net/users/4959/" ]
Some of these properties are local, and distinguish analytic and algebraic functions, from smooth functions. Others are global and distinguish compact manifolds from projective manifolds by their difference in containment of many subvarieties. some are as simple as contrasting the dimension, and homology of say proje...
A connected real manifold can be disconnected by the removal of a submanifold but the complement of a subvariety on an irreducible variety is still connected.
23,936
I have the following setup: There is a collection of items I and a collection of partial rankings V. That is, an element of V is a total ordering on a subset of I. There is no expectation of consistency among the elements of V: it may be that x < y for one element and y < x for another. I would like to assign a scor...
2010/05/08
[ "https://mathoverflow.net/questions/23936", "https://mathoverflow.net", "https://mathoverflow.net/users/4959/" ]
Some of these properties are local, and distinguish analytic and algebraic functions, from smooth functions. Others are global and distinguish compact manifolds from projective manifolds by their difference in containment of many subvarieties. some are as simple as contrasting the dimension, and homology of say proje...
For a closed analytic subset Z ⊂ S of a (say compact) complex manifold with complement U=S-Z one has additivity of the (topological) Euler characteristic: Χ(S)=Χ(Z)+Χ(U). This is wrong for if S and Z are topological spaces or smooth manifolds. Indeed, take for Z a point on a circle S. This (surprising) difference wa...
23,936
I have the following setup: There is a collection of items I and a collection of partial rankings V. That is, an element of V is a total ordering on a subset of I. There is no expectation of consistency among the elements of V: it may be that x < y for one element and y < x for another. I would like to assign a scor...
2010/05/08
[ "https://mathoverflow.net/questions/23936", "https://mathoverflow.net", "https://mathoverflow.net/users/4959/" ]
Here is a list biased towards what is remarkable in the complex case. (To the potential peeved real manifold: I love you too.) By "complex" I mean holomorphic manifolds and holomorphic maps; by "real" I mean $\mathcal{C}^{\infty}$ manifolds and $\mathcal{C}^{\infty}$ maps. * Consider a map $f$ between manifolds of *e...
A proper variety doesn't have (non-constant) global sections. A real manifold, compact or not, has lots of global sections. There are lots of maps between real manifolds. Maps between varieties are much more restricted (e.g. by Riemann-Hurwitz in the case of curves).
23,936
I have the following setup: There is a collection of items I and a collection of partial rankings V. That is, an element of V is a total ordering on a subset of I. There is no expectation of consistency among the elements of V: it may be that x < y for one element and y < x for another. I would like to assign a scor...
2010/05/08
[ "https://mathoverflow.net/questions/23936", "https://mathoverflow.net", "https://mathoverflow.net/users/4959/" ]
Some embedding statements. A compact complex subvariety of ${\mathbb{C}}^n$ is a point. However, every compact real manifold of dimension $n$ can be realized as a submanifold of some ${\mathbb{R}}^{2n}$. There are compact complex manifolds that cannot be embedded into complex projective space. An example most often q...
For a closed analytic subset Z ⊂ S of a (say compact) complex manifold with complement U=S-Z one has additivity of the (topological) Euler characteristic: Χ(S)=Χ(Z)+Χ(U). This is wrong for if S and Z are topological spaces or smooth manifolds. Indeed, take for Z a point on a circle S. This (surprising) difference wa...
23,936
I have the following setup: There is a collection of items I and a collection of partial rankings V. That is, an element of V is a total ordering on a subset of I. There is no expectation of consistency among the elements of V: it may be that x < y for one element and y < x for another. I would like to assign a scor...
2010/05/08
[ "https://mathoverflow.net/questions/23936", "https://mathoverflow.net", "https://mathoverflow.net/users/4959/" ]
Here is a list biased towards what is remarkable in the complex case. (To the potential peeved real manifold: I love you too.) By "complex" I mean holomorphic manifolds and holomorphic maps; by "real" I mean $\mathcal{C}^{\infty}$ manifolds and $\mathcal{C}^{\infty}$ maps. * Consider a map $f$ between manifolds of *e...
A connected real manifold can be disconnected by the removal of a submanifold but the complement of a subvariety on an irreducible variety is still connected.
23,936
I have the following setup: There is a collection of items I and a collection of partial rankings V. That is, an element of V is a total ordering on a subset of I. There is no expectation of consistency among the elements of V: it may be that x < y for one element and y < x for another. I would like to assign a scor...
2010/05/08
[ "https://mathoverflow.net/questions/23936", "https://mathoverflow.net", "https://mathoverflow.net/users/4959/" ]
Some embedding statements. A compact complex subvariety of ${\mathbb{C}}^n$ is a point. However, every compact real manifold of dimension $n$ can be realized as a submanifold of some ${\mathbb{R}}^{2n}$. There are compact complex manifolds that cannot be embedded into complex projective space. An example most often q...
I think there's some big difference concerning the metric approach too. In fact, the Gram-Schmidt process (which is real analytic) enables us -in real differential geometry- to find some local orthonormal frames (for any hermitian bundle, and in particular for the tangent bundle), whereas in the holomorphic case, very...
23,936
I have the following setup: There is a collection of items I and a collection of partial rankings V. That is, an element of V is a total ordering on a subset of I. There is no expectation of consistency among the elements of V: it may be that x < y for one element and y < x for another. I would like to assign a scor...
2010/05/08
[ "https://mathoverflow.net/questions/23936", "https://mathoverflow.net", "https://mathoverflow.net/users/4959/" ]
Some of these properties are local, and distinguish analytic and algebraic functions, from smooth functions. Others are global and distinguish compact manifolds from projective manifolds by their difference in containment of many subvarieties. some are as simple as contrasting the dimension, and homology of say proje...
I think there's some big difference concerning the metric approach too. In fact, the Gram-Schmidt process (which is real analytic) enables us -in real differential geometry- to find some local orthonormal frames (for any hermitian bundle, and in particular for the tangent bundle), whereas in the holomorphic case, very...
11,289,905
I can't understand what is happening in my code: ``` for (NSMutableDictionary *dict in jsonResponse) { NSString *days = [dict objectForKey:@"dayOfTheWeek"]; NSArray *arrayDays = [days componentsSeparatedByString:@" "]; NSLog(@"la var %@ size %lu", days, sizeof(arrayDays)); for(int i = 0; i<siz...
2012/07/02
[ "https://Stackoverflow.com/questions/11289905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1256477/" ]
Regex! ``` re.sub('[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}','CENSORED_IP',data) ``` Worthy of note, this also matches things like 999.999.999.999. If that's a problem, you will have to get a regex that is a little more complicated. Furthermore, this only works on IPv4 Addresses. On only valid IP's: ``` re.s...
For IPv4 Addresses you can use the Regex provided by [Regular-Expression.info](http://www.regular-expressions.info/examples.html). This will ensure that your IP Address is actually valid. > > Matching an IP address is another good example of a trade-off between regex complexity and exactness. \b\d{1,3}.\d{1,3}.\d{1,3...
394,250
Here's a snippet of code: An inlined function: ``` inline void rayStep(const glm::vec3 &ray, float &rayLength, const glm::vec3 &distanceFactor, glm::ivec3 &currentVoxelCoordinates, const glm::ivec3 &raySign, const glm::ivec3 &rayPositive, glm::vec3 &positionInVoxel, const int smallestIndex) { rayLength += distanc...
2019/07/04
[ "https://softwareengineering.stackexchange.com/questions/394250", "https://softwareengineering.stackexchange.com", "https://softwareengineering.stackexchange.com/users/247488/" ]
This is going to be a frame challenge answer. > > It is possible to design base class in a way that I have to pass connection string only once and not for each of the 4 concrete classes? > > > You *shouldn't* try to achieve what you want to with a base class. Why not? ======== Basically, if you use a base clas...
> > It is possible to design base class in a way that I have to pass connection string only once and not for each of the 4 concrete classes? > > > Short answer - No. If you're going to use inheritance and work with [instances of] subclasses, then you have to use the proper plumbing to allow the derived classes t...
1,271,166
I am looking for help to achieve the following The Diagram represents a car, users can add engine and colour when I view the XML it looks like this: ``` <Car> <Engine>BigEngine</Engine> <Colour>Pink</Colour> </Car> ``` What I would like to do is to wrap the car inside 'vehicle', i.e ``` <Vehicle> <Car> ...
2009/08/13
[ "https://Stackoverflow.com/questions/1271166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76581/" ]
not sure how to do it in Jquery ``` window.onbeforeunload = function (e) { var e = e || window.event; // For IE and Firefox if (e) { e.returnValue = 'Any string'; } // For Safari return 'Any string'; }; ``` <https://developer.mozilla.org/en/DOM/window.onbeforeunload>
The event you're looking for is beforeunload, you can stop a page refresh like this: ``` $(window).bind('beforeunload', function(){ return ''; }); ```
1,271,166
I am looking for help to achieve the following The Diagram represents a car, users can add engine and colour when I view the XML it looks like this: ``` <Car> <Engine>BigEngine</Engine> <Colour>Pink</Colour> </Car> ``` What I would like to do is to wrap the car inside 'vehicle', i.e ``` <Vehicle> <Car> ...
2009/08/13
[ "https://Stackoverflow.com/questions/1271166", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76581/" ]
On $(document).load() * read a var current\_page from cookie * if it's the same as your current page, you have a refresh * write current page to var current\_page in cookie
The event you're looking for is beforeunload, you can stop a page refresh like this: ``` $(window).bind('beforeunload', function(){ return ''; }); ```
23,600
Any idea how to write this code better."the html is nested tabs" Two selectors and two similar events, in a function would be better or a pattern to reduce lines. [eg .jsbin](http://jsbin.com/utaxot/3/edit) ``` $(function() { var $items = $('#vtab>ul>li'), $items2 = $('#vtab2>ul>li'); $items.mouseover(func...
2013/03/08
[ "https://codereview.stackexchange.com/questions/23600", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/22919/" ]
First of all, your code has a bug: You did not follow the [rule of three](http://en.wikipedia.org/wiki/Rule_of_three_%28C++_programming%29). Code such as `myStack1 = myStack2;` will cause the pointer to be deleted twice - which is undefined behavior. --- ``` int storedElements; ``` This seems kind of misleading. Th...
`this` is not always needed in member functions, you can remove all the ``` this-> ``` The compiler knows this from the context. And move brackets, e.g.: ``` int myStaticIntStack::peek() { if( 0 == storedElements ){ cout << "Stack is empty, you must PUSH an element before PEEKing one!" << endl; ...
23,600
Any idea how to write this code better."the html is nested tabs" Two selectors and two similar events, in a function would be better or a pattern to reduce lines. [eg .jsbin](http://jsbin.com/utaxot/3/edit) ``` $(function() { var $items = $('#vtab>ul>li'), $items2 = $('#vtab2>ul>li'); $items.mouseover(func...
2013/03/08
[ "https://codereview.stackexchange.com/questions/23600", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/22919/" ]
First of all, your code has a bug: You did not follow the [rule of three](http://en.wikipedia.org/wiki/Rule_of_three_%28C++_programming%29). Code such as `myStack1 = myStack2;` will cause the pointer to be deleted twice - which is undefined behavior. --- ``` int storedElements; ``` This seems kind of misleading. Th...
If you have to implement a stack backwards, ok. :) It's a common thought pattern; i used to do it all the time too. But the truth is, it makes a lot of things easier if you consider the stack to grow upward. ``` void myStaticIntStack::push( int newElement ) { if( storedElements == stackSize ) { cout << "St...
23,600
Any idea how to write this code better."the html is nested tabs" Two selectors and two similar events, in a function would be better or a pattern to reduce lines. [eg .jsbin](http://jsbin.com/utaxot/3/edit) ``` $(function() { var $items = $('#vtab>ul>li'), $items2 = $('#vtab2>ul>li'); $items.mouseover(func...
2013/03/08
[ "https://codereview.stackexchange.com/questions/23600", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/22919/" ]
First of all, your code has a bug: You did not follow the [rule of three](http://en.wikipedia.org/wiki/Rule_of_three_%28C++_programming%29). Code such as `myStack1 = myStack2;` will cause the pointer to be deleted twice - which is undefined behavior. --- ``` int storedElements; ``` This seems kind of misleading. Th...
Ok, a few comments: 1. If you are going to support a stack with no capacity, I don't know why you need to allocate memory at all. You could simply have the pointer as `NULL`. 2. Using `cout` for error handling is not appropriate. You could either give "undefined behaviour" however may I suggest you throw an exception....
93,285
I apologize if this is a duplicate, I can't find anything up-to-date that really helps answer my question. I know this is nitpicky, but it's been a long battle and I am losing it. For some time, I have been annoyed with the fact that you can't customize the android camera app's naming convention. My workaround, sin...
2014/12/30
[ "https://android.stackexchange.com/questions/93285", "https://android.stackexchange.com", "https://android.stackexchange.com/users/87069/" ]
Use Tasker's native Java calls ============================== Java code --------- Use [ExifInterface.getAttribute](http://developer.android.com/reference/android/media/ExifInterface.html#getAttribute(java.lang.String)) to solve this problem. ``` exif = new ExifInterface( %filename ) %datetime = exif.getAttribute(exi...
Since you are using the "file modified" trigger (which should be instant at the moment the file is written,) you can use the current date and time instead of trying to extract the EXIF data from the images. Tasker's [getFormattedDate](http://tasker.wikidot.com/getformatteddate) function will help with parsing the date...
50,179,858
I've been having issues regarding this narrowing conversion error > > Overload resolution failed because no accessible 'Show' can be called without a narrowing conversion: > > > 'Public Shared Function Show(owner As System.Windows.Forms.IWin32Window, text As String, caption As String, buttons As System.Windows.Form...
2018/05/04
[ "https://Stackoverflow.com/questions/50179858", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9742443/" ]
You've invoking `Show({string}, {MsgBoxStyle}, {MessageBoxIcon})`, so the last overload in the error message is the closest: > > 'Public Shared Function Show(text As String, caption As String, buttons As System.Windows.Forms.MessageBoxButtons, icon As System.Windows.Forms.MessageBoxIcon) As System.Windows.Forms.Dialo...
You are mixing your MesssageBox with MsgBox Change MsgBoxStyle.OkCancel to the MessageBox syntax. ``` If MessageBox.Show("Please Enter a value for ESD (rad)", "ESD (rad) Value", MessageBoxButtons.OKCancel, MessageBoxIcon.Information) = DialogResult.OK Then ```
28,235,744
I am trying to start an external executable file via Groovy but got some problems with it! I just want to start the `rs.exe` with several parameters to create a PDF-file using the SSRS. But as soon as I try to get the return value/exit-code it doesn't work anymore! But I want to grab the generated file and add it to ...
2015/01/30
[ "https://Stackoverflow.com/questions/28235744", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4511347/" ]
Try executing command when it's defined in the following way: ``` def cmd = ['cmd', '/c', 'C://Program Files (x86)//...//rs.exe', '-i', 'C:\\export.rss', '-s', 'http://localhost/ReportServer_SQLEXPRESS', '-v', "ID=${id}", '-e', 'Exec2005'] def proc = cmd.execute() ```
I was able to run it now and get the exit-code. But without those escape forward-slashes I wasn't able to let it run. To get the exit-codes I just used "proc.text" and it works perfectly now. It was working before but I didn't know how to get the exit-codes, ".text" solved it completely. Thanks for your help!
31,758,853
I'm currently working on a Node.js stack application used by over 25000 people, we're using Sails.js framework in particular and we got MongoDB Application is running at a EC2 instance with 30GB of RAM, databse is running on a Mongolab AWS based cluster in same zone the EC2 is. We even got an Elastic Cache Redis insta...
2015/08/01
[ "https://Stackoverflow.com/questions/31758853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/742560/" ]
Basically most of main points are already present in answers. I'll just summarise them. To optimize your application you could do several main things. 1. Try to move form `node.js` to `io.js` it still have a bit better performance and latest cutting edge updated. (But read carefully about experimental features). Or...
Firstly, ensure that you are not using synchronous I/O. If you can run on `io.js`, there is `--trace-sync-io` flag (`iojs --trace-sync-io server.js`) that will warn you if you use synchronous code with the following console warning: `WARNING: Detected use of sync API`. Secondly, find out why your RAM usage goes so hig...
31,758,853
I'm currently working on a Node.js stack application used by over 25000 people, we're using Sails.js framework in particular and we got MongoDB Application is running at a EC2 instance with 30GB of RAM, databse is running on a Mongolab AWS based cluster in same zone the EC2 is. We even got an Elastic Cache Redis insta...
2015/08/01
[ "https://Stackoverflow.com/questions/31758853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/742560/" ]
Basically most of main points are already present in answers. I'll just summarise them. To optimize your application you could do several main things. 1. Try to move form `node.js` to `io.js` it still have a bit better performance and latest cutting edge updated. (But read carefully about experimental features). Or...
For Mongodb you can use [mongtop](http://docs.mongodb.org/manual/reference/program/mongotop/) to see which databases are contested, 2.2+ uses per database locks, if database has write heavy workload reads will be affected as mongodb is using [writer greedy locks](http://docs.mongodb.org/v2.6/faq/concurrency/#what-type-...
42,850,428
We are currently use the oob page types for Blog, News and Event. We have one page for each of these types that includes a repeater to show a list of the pages of that type. We would also like to have a page that includes a repeater that shows all blog, news and event pages in one spot, sorted by their created date. ...
2017/03/17
[ "https://Stackoverflow.com/questions/42850428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6683608/" ]
For this scenario use a universal viewer. Reason being is you can create a hierarchical transformation which will have different transformations for each of your unique page types. You most likely won't use the hierarchy at all but you can simply add 3 different item transformations for the different page types.
The other ways are this 1. Evaluate right `fieldname` by check object `classname` inside the transformation and assign appropriate value. 2. Dynamically assign transformation by checking the object classname
42,850,428
We are currently use the oob page types for Blog, News and Event. We have one page for each of these types that includes a repeater to show a list of the pages of that type. We would also like to have a page that includes a repeater that shows all blog, news and event pages in one spot, sorted by their created date. ...
2017/03/17
[ "https://Stackoverflow.com/questions/42850428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6683608/" ]
You can use the **Hierarchical viewer** or the **Universal viewer**, as Brenden Kehren mentioned, to achieve the goal you are describing. When configuring the web part you must select all the **Page types** that are included in the hierarchy, in your case: **CMS.MenuItem, CMS.Blog, CMS.BlogMonth, CMS.BlogPost** and **...
For this scenario use a universal viewer. Reason being is you can create a hierarchical transformation which will have different transformations for each of your unique page types. You most likely won't use the hierarchy at all but you can simply add 3 different item transformations for the different page types.
42,850,428
We are currently use the oob page types for Blog, News and Event. We have one page for each of these types that includes a repeater to show a list of the pages of that type. We would also like to have a page that includes a repeater that shows all blog, news and event pages in one spot, sorted by their created date. ...
2017/03/17
[ "https://Stackoverflow.com/questions/42850428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6683608/" ]
You can use the **Hierarchical viewer** or the **Universal viewer**, as Brenden Kehren mentioned, to achieve the goal you are describing. When configuring the web part you must select all the **Page types** that are included in the hierarchy, in your case: **CMS.MenuItem, CMS.Blog, CMS.BlogMonth, CMS.BlogPost** and **...
The other ways are this 1. Evaluate right `fieldname` by check object `classname` inside the transformation and assign appropriate value. 2. Dynamically assign transformation by checking the object classname
1,617,855
The question is basically it but here's the background of the story if curious: My eyes woulld ache since I spend 12+ hours a day looking at a computer screen, so I decided to give night light a try and turned it to 70% strength. The colors were uglier than normal but I used it for about a year (always on) and now whe...
2021/01/15
[ "https://superuser.com/questions/1617855", "https://superuser.com", "https://superuser.com/users/1233850/" ]
> > is leaving night light on long periods of time bad for my computer? > > > What night light setting does is just to decrease light of display, and maybe not equally all colours, but blue is reduced a bit more then the others. So the answer for your question is **NO**, using night light will not cause any negat...
Well, it depends on the strength of the Night Light. If it's Normal then It's Beneficial for your Health but if you set it to Extreme Kinda Ultra Instinct then you need to check whether you are color blind for red because it's bad for your display as it uses the red color at its max then all time. So Just Consider the ...
774,809
I'd like to make a tool bar with icons that get's bigger when you mouse over them. I don't mind reinventing the wheel, but if anyone can suggest a good: 1. Image Format (not sure bitmaps'll work here and not sure how to do Vectors) 2. Existing Control (pay or free, so long as I can use it in a close source app) 3. Con...
2009/04/21
[ "https://Stackoverflow.com/questions/774809", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1765/" ]
I've not used it yet personally, but maybe check out TMS TAdvSmoothDock rather than reinventing wheel..? <http://www.tmssoftware.com/site/advsmoothdock.asp>
There is some sample code doing exactly this on the delphi.about.com website. The link below shows the code as well as an example image of the dock while running. <http://delphi.about.com/od/fullcodeprojects/a/mac-doc-launch.htm> I don't know if the code is D2009 compatible or not, but even if it isn't the code shou...
15,430,684
I have searched on this subject and am just getting more confused. We have a Forms Authentication web application. I have changed the old FormsAuthentication.SetCookie statement to instead create a GenericPrincipal containing a FormsIdentity, then I have added a couple of custom claims, then I write a sessionsecurityt...
2013/03/15
[ "https://Stackoverflow.com/questions/15430684", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2047485/" ]
Your approach is fine - you create a ClaimsPrincipal with all the claims you need and write out the session cookie. No need for a claims authentication manager. possible gotchas: * make sure you set the authentication type when creating the ClaimsIdentity - otherwise the client will not be authenticated * by default ...
You need custom ClaimsAuthenticationManager, it will be called once and add claims. Don't forget to register this custom class in your application: ``` public override ClaimsPrincipal Authenticate(string resourceName, ClaimsPrincipal incomingPrincipal) { //works only with one default identity //In ...
34,517,581
> > Note: I already went through the below SO Question and 7 Answers (as of now) about [Symbols](https://github.com/zenparsing/es-private-fields), WeekMaps and Maps, Please read the full question before you vote: [Private properties in JavaScript ES6 classes](https://stackoverflow.com/questions/22156326/private-proper...
2015/12/29
[ "https://Stackoverflow.com/questions/34517581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5696335/" ]
**Private properties** In ES6 (and before), all private property implementations rely on [closure](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures). People [have been doing it](http://javascript.crockford.com/private.html) even before JavaScript has versions. WeakMap is just a variation that removes ...
I'm late to answer this, but it is possible to emulate private AND protected methods in javascript. **Private methods/properties** Uses the well known Symbol approach ``` const someMethod = Symbol() const someProperty = Symbol() export default class Parent { constructor () { this[someProperty] = 'and a privat...
34,517,581
> > Note: I already went through the below SO Question and 7 Answers (as of now) about [Symbols](https://github.com/zenparsing/es-private-fields), WeekMaps and Maps, Please read the full question before you vote: [Private properties in JavaScript ES6 classes](https://stackoverflow.com/questions/22156326/private-proper...
2015/12/29
[ "https://Stackoverflow.com/questions/34517581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5696335/" ]
**Private properties** In ES6 (and before), all private property implementations rely on [closure](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures). People [have been doing it](http://javascript.crockford.com/private.html) even before JavaScript has versions. WeakMap is just a variation that removes ...
Also can use a symbol as a "key" for enabling a version of a class with protected inheritance via gatekeepers and conditional behavior. eg in this BST `root` is private and `add`/`insert` returns true. Did not want any direct node access. However, an AVL subclass could use both, as well as some utility functions. Th...
34,517,581
> > Note: I already went through the below SO Question and 7 Answers (as of now) about [Symbols](https://github.com/zenparsing/es-private-fields), WeekMaps and Maps, Please read the full question before you vote: [Private properties in JavaScript ES6 classes](https://stackoverflow.com/questions/22156326/private-proper...
2015/12/29
[ "https://Stackoverflow.com/questions/34517581", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5696335/" ]
I'm late to answer this, but it is possible to emulate private AND protected methods in javascript. **Private methods/properties** Uses the well known Symbol approach ``` const someMethod = Symbol() const someProperty = Symbol() export default class Parent { constructor () { this[someProperty] = 'and a privat...
Also can use a symbol as a "key" for enabling a version of a class with protected inheritance via gatekeepers and conditional behavior. eg in this BST `root` is private and `add`/`insert` returns true. Did not want any direct node access. However, an AVL subclass could use both, as well as some utility functions. Th...
155,882
I have a simple echo server program running on CentOS 7. If I run both the client and the server in the VM, I can connect to the server. I'm using VirtualBox with the "bridged" network configuration. Using the IP of my Linux VM (found using ifconfig), I can successfully ssh into the Linux VM from Cygwin in Windows. H...
2014/09/16
[ "https://unix.stackexchange.com/questions/155882", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/84370/" ]
I suggest you capture the packets and write them to a file with the `<file>.pcap` extension, and then open with `wireshark`. For example, in CentOS, to capture the packets: ``` $ tcpdump -i eth0 -s 1500 -w /root/<filename.pcap> ```
Something else must be up. The following test works fine for me. I'm using `socat` as both the client and server and I'm running `tcpdump` on my local system that I'm sitting at. ### 1. Setup socat server (listener) ``` $ socat - TCP-LISTEN:2222,crlf ``` ### 2. Setup socat client ``` $ socat - TCP:192.168.1.80:222...
155,882
I have a simple echo server program running on CentOS 7. If I run both the client and the server in the VM, I can connect to the server. I'm using VirtualBox with the "bridged" network configuration. Using the IP of my Linux VM (found using ifconfig), I can successfully ssh into the Linux VM from Cygwin in Windows. H...
2014/09/16
[ "https://unix.stackexchange.com/questions/155882", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/84370/" ]
I suggest you capture the packets and write them to a file with the `<file>.pcap` extension, and then open with `wireshark`. For example, in CentOS, to capture the packets: ``` $ tcpdump -i eth0 -s 1500 -w /root/<filename.pcap> ```
For anyone who comes across this one another good answer is here <https://stackoverflow.com/questions/3130911/tcpdump-localhost-to-localhost>, if the traffic that isn't showing up is localhost->localhost traffic. I feel like in other situations I haven't had to do that, but at least a few times I've had to.
155,882
I have a simple echo server program running on CentOS 7. If I run both the client and the server in the VM, I can connect to the server. I'm using VirtualBox with the "bridged" network configuration. Using the IP of my Linux VM (found using ifconfig), I can successfully ssh into the Linux VM from Cygwin in Windows. H...
2014/09/16
[ "https://unix.stackexchange.com/questions/155882", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/84370/" ]
I suggest you capture the packets and write them to a file with the `<file>.pcap` extension, and then open with `wireshark`. For example, in CentOS, to capture the packets: ``` $ tcpdump -i eth0 -s 1500 -w /root/<filename.pcap> ```
as suggested by wurtel: Use `-n` with `tcpdump` to stop it trying to resolve IP addresses to names, which can take a long time and result this issue.
155,882
I have a simple echo server program running on CentOS 7. If I run both the client and the server in the VM, I can connect to the server. I'm using VirtualBox with the "bridged" network configuration. Using the IP of my Linux VM (found using ifconfig), I can successfully ssh into the Linux VM from Cygwin in Windows. H...
2014/09/16
[ "https://unix.stackexchange.com/questions/155882", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/84370/" ]
I suggest you capture the packets and write them to a file with the `<file>.pcap` extension, and then open with `wireshark`. For example, in CentOS, to capture the packets: ``` $ tcpdump -i eth0 -s 1500 -w /root/<filename.pcap> ```
try this: ``` sudo bash ``` and then ``` tcpdump ... ``` On some Linux versions I see this from time to time that tcpdump or similar tools don't work with sudo as expected..
155,882
I have a simple echo server program running on CentOS 7. If I run both the client and the server in the VM, I can connect to the server. I'm using VirtualBox with the "bridged" network configuration. Using the IP of my Linux VM (found using ifconfig), I can successfully ssh into the Linux VM from Cygwin in Windows. H...
2014/09/16
[ "https://unix.stackexchange.com/questions/155882", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/84370/" ]
Something else must be up. The following test works fine for me. I'm using `socat` as both the client and server and I'm running `tcpdump` on my local system that I'm sitting at. ### 1. Setup socat server (listener) ``` $ socat - TCP-LISTEN:2222,crlf ``` ### 2. Setup socat client ``` $ socat - TCP:192.168.1.80:222...
as suggested by wurtel: Use `-n` with `tcpdump` to stop it trying to resolve IP addresses to names, which can take a long time and result this issue.
155,882
I have a simple echo server program running on CentOS 7. If I run both the client and the server in the VM, I can connect to the server. I'm using VirtualBox with the "bridged" network configuration. Using the IP of my Linux VM (found using ifconfig), I can successfully ssh into the Linux VM from Cygwin in Windows. H...
2014/09/16
[ "https://unix.stackexchange.com/questions/155882", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/84370/" ]
Something else must be up. The following test works fine for me. I'm using `socat` as both the client and server and I'm running `tcpdump` on my local system that I'm sitting at. ### 1. Setup socat server (listener) ``` $ socat - TCP-LISTEN:2222,crlf ``` ### 2. Setup socat client ``` $ socat - TCP:192.168.1.80:222...
try this: ``` sudo bash ``` and then ``` tcpdump ... ``` On some Linux versions I see this from time to time that tcpdump or similar tools don't work with sudo as expected..
155,882
I have a simple echo server program running on CentOS 7. If I run both the client and the server in the VM, I can connect to the server. I'm using VirtualBox with the "bridged" network configuration. Using the IP of my Linux VM (found using ifconfig), I can successfully ssh into the Linux VM from Cygwin in Windows. H...
2014/09/16
[ "https://unix.stackexchange.com/questions/155882", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/84370/" ]
For anyone who comes across this one another good answer is here <https://stackoverflow.com/questions/3130911/tcpdump-localhost-to-localhost>, if the traffic that isn't showing up is localhost->localhost traffic. I feel like in other situations I haven't had to do that, but at least a few times I've had to.
as suggested by wurtel: Use `-n` with `tcpdump` to stop it trying to resolve IP addresses to names, which can take a long time and result this issue.
155,882
I have a simple echo server program running on CentOS 7. If I run both the client and the server in the VM, I can connect to the server. I'm using VirtualBox with the "bridged" network configuration. Using the IP of my Linux VM (found using ifconfig), I can successfully ssh into the Linux VM from Cygwin in Windows. H...
2014/09/16
[ "https://unix.stackexchange.com/questions/155882", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/84370/" ]
For anyone who comes across this one another good answer is here <https://stackoverflow.com/questions/3130911/tcpdump-localhost-to-localhost>, if the traffic that isn't showing up is localhost->localhost traffic. I feel like in other situations I haven't had to do that, but at least a few times I've had to.
try this: ``` sudo bash ``` and then ``` tcpdump ... ``` On some Linux versions I see this from time to time that tcpdump or similar tools don't work with sudo as expected..
50,588,967
I am trying to solve a problem given to me and it involves using basic loops, functions and conditions. I have been given the below: ``` // TODO: complete program console.log(calculate(4, "+", 6)); // Must show 10 console.log(calculate(4, "-", 6)); // Must show -2 console.log(calculate(2, "*", 0)); // Must show 0 ...
2018/05/29
[ "https://Stackoverflow.com/questions/50588967", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9865551/" ]
You can't set variables equal to operators. Your `if` blocks should look like this instead: ``` if (n2 == "+") { return parseInt(n1) + parseInt(n3); }; ``` Use `parseInt` if you are passing in strings instead of numbers
I'd take the input given in the n2 parameter and return the calculation directly. Also you had some issues with () in your code. ``` function calculate(n1, n2, n3) { if (n2 == "+") { return n1 + n3; } else if (n2 == "-") { return n1 - n3; } else if (n2 == "*") { return n1 * n3; } else { return n1 / n3;...
13,856,436
I'm developing a Java project using Eclipse, and Ant as a build tool. When I run "ant all" from the command line, my project builds without any errors, but on Eclipse I get many compilation errors. So I thought I'd copy Ant's Classpath onto my Eclipse Project's Build Path. Is there an Ant task/command to show that? ...
2012/12/13
[ "https://Stackoverflow.com/questions/13856436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1264138/" ]
If you run Ant with the -verbose and -debug flags, you'll see all gory details of what javac is doing, including the classpath.
I would introduce a task for printing the classpath, and call that task with antcall. The classpath would be given as a parameter to that task.
13,856,436
I'm developing a Java project using Eclipse, and Ant as a build tool. When I run "ant all" from the command line, my project builds without any errors, but on Eclipse I get many compilation errors. So I thought I'd copy Ant's Classpath onto my Eclipse Project's Build Path. Is there an Ant task/command to show that? ...
2012/12/13
[ "https://Stackoverflow.com/questions/13856436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1264138/" ]
If you run Ant with the -verbose and -debug flags, you'll see all gory details of what javac is doing, including the classpath.
You can do something like this in your target, so for example lets say you've defined your classpath as ``` <path id="project.classpath"> <fileset dir="${SERVER_DEV}/classes"> <include name="*.zip"/> <include name="*.jar"/> </fileset> <pathelement location="${SERVER_DEV}/3rdParty/jre/NT/1....
13,856,436
I'm developing a Java project using Eclipse, and Ant as a build tool. When I run "ant all" from the command line, my project builds without any errors, but on Eclipse I get many compilation errors. So I thought I'd copy Ant's Classpath onto my Eclipse Project's Build Path. Is there an Ant task/command to show that? ...
2012/12/13
[ "https://Stackoverflow.com/questions/13856436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1264138/" ]
I would introduce a task for printing the classpath, and call that task with antcall. The classpath would be given as a parameter to that task.
You can do something like this in your target, so for example lets say you've defined your classpath as ``` <path id="project.classpath"> <fileset dir="${SERVER_DEV}/classes"> <include name="*.zip"/> <include name="*.jar"/> </fileset> <pathelement location="${SERVER_DEV}/3rdParty/jre/NT/1....
20,983,535
``` /* result 1 */ select Id, Name from Items /* result 2 */ select Id, Alias from ItemAliases where Id in ( select Id, Name from table abc ) ``` We use SQL Server 2008. Using the above example, it should be pretty straightforward what I'm trying to do. I need to return the results of query...
2014/01/07
[ "https://Stackoverflow.com/questions/20983535", "https://Stackoverflow.com", "https://Stackoverflow.com/users/704238/" ]
I think you just want to store Result1 and use it to compose Result2: ``` declare @Result1 table (Id int primary key, Name varchar(100)); insert into @Result1 -- store Result1 select Id, Name from Items --return Result1 select Id, Name from @Result1; --return Result2 using stored Result1 select Id, ...
``` --Result 1 SELECT ID, Name FROM Items [You WHERE Clause here if any] --Result 2 SELECT Id, Alias FROM ItemAliases ia INNER JOIN Items i ON ia.ID = i.ID ``` OR ``` --Using temporay in memory table DECLARE @abc AS TABLE ( ID AS Int, Name AS varchar(25) ) SELECT ID, Name INTO @abc FROM Items [...
38,464,876
When I update my Google Play dependencies in my Gradle file from version 8.4.0 to 9.2.1, I get the following error: > > Error:Failed to resolve: com.google.android.gms:play-services-measurement:9.2.1 > > > This was not an issue when using version 8.4.0. I tried to include it as an explicit dependency but makes no...
2016/07/19
[ "https://Stackoverflow.com/questions/38464876", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2815375/" ]
Try update google-services plugin in main `build.gradle` file ``` buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.0.0' classpath 'com.google.gms:google-services:3.0.0' } } ```
Add the dependency to your project-level build.gradle: ``` dependencies { classpath 'com.android.tools.build:gradle:2.1.3' classpath 'com.google.gms:google-services:3.0.0' } ```
14,367,906
I trying to deploy an app to Heroku, but when I push my config.ru file I've got errors. Follow Heroku's log: ``` 2013-01-16T21:04:14+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 29160` 2013-01-16T21:04:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.4/li...
2013/01/16
[ "https://Stackoverflow.com/questions/14367906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1472317/" ]
Try this: ``` <A.*HREF\s*=\s*(?:"|')([^"']*)(?:"|').*>(.*)<\/A> ``` Group1 and Group2 will give you the desired result.
Because the text `html` does not appear in your tag.....
14,367,906
I trying to deploy an app to Heroku, but when I push my config.ru file I've got errors. Follow Heroku's log: ``` 2013-01-16T21:04:14+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 29160` 2013-01-16T21:04:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.4/li...
2013/01/16
[ "https://Stackoverflow.com/questions/14367906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1472317/" ]
Regular expressions for HTML can be brittle to change, but a regex for this exact case would be; [`<A HREF="\(.*\)" .*>\(.*\)</A>`](http://refiddle.com/gjv)
Because the text `html` does not appear in your tag.....
14,367,906
I trying to deploy an app to Heroku, but when I push my config.ru file I've got errors. Follow Heroku's log: ``` 2013-01-16T21:04:14+00:00 heroku[web.1]: Starting process with command `bundle exec rackup config.ru -p 29160` 2013-01-16T21:04:16+00:00 app[web.1]: from /app/vendor/bundle/ruby/1.9.1/gems/rack-1.4.4/li...
2013/01/16
[ "https://Stackoverflow.com/questions/14367906", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1472317/" ]
Regular expressions for HTML can be brittle to change, but a regex for this exact case would be; [`<A HREF="\(.*\)" .*>\(.*\)</A>`](http://refiddle.com/gjv)
Try this: ``` <A.*HREF\s*=\s*(?:"|')([^"']*)(?:"|').*>(.*)<\/A> ``` Group1 and Group2 will give you the desired result.
1,853,771
Find the probability that the birth days of 6 different persons will fall in exactly two calendar months. Ans.is 341/(12^6) Here each person has 12 option So there are 6 persons .total no. Of ways 12^6 And out of 12 months 2 are randomly selected ..so $12$C$2$ B'day of 6 persons fall in 2 months in 2^6 ways. The...
2016/07/09
[ "https://math.stackexchange.com/questions/1853771", "https://math.stackexchange.com", "https://math.stackexchange.com/users/351895/" ]
I'm assuming you mean How do we find the derivative of $y= \frac{(4x^3 +8)^{\frac{1}{3}}}{(x+2)^5}$? The quotation rule: $\frac{f(x)}{g(x)}=\frac{f'(x)g(x)-g'(x)f(x)}{g^2(x)}$ The chain rule: $f(g(x))=f'(g(x))g'(x)$ So to solve the question, we apply the quotation rule first Letting $$(4x^3 +8)^{\frac{1}{3}}=f(x)$$...
Use this relation $$( \frac{f}{g})'=\frac{(f')g-(g')f}{g^2}$$ with $$f(x)=(4x^3+8)^{1/3}$$ and $$g(x)=(x+2)^5. $$ Also use the chain rule.
1,853,771
Find the probability that the birth days of 6 different persons will fall in exactly two calendar months. Ans.is 341/(12^6) Here each person has 12 option So there are 6 persons .total no. Of ways 12^6 And out of 12 months 2 are randomly selected ..so $12$C$2$ B'day of 6 persons fall in 2 months in 2^6 ways. The...
2016/07/09
[ "https://math.stackexchange.com/questions/1853771", "https://math.stackexchange.com", "https://math.stackexchange.com/users/351895/" ]
I'm assuming you mean How do we find the derivative of $y= \frac{(4x^3 +8)^{\frac{1}{3}}}{(x+2)^5}$? The quotation rule: $\frac{f(x)}{g(x)}=\frac{f'(x)g(x)-g'(x)f(x)}{g^2(x)}$ The chain rule: $f(g(x))=f'(g(x))g'(x)$ So to solve the question, we apply the quotation rule first Letting $$(4x^3 +8)^{\frac{1}{3}}=f(x)$$...
You have optionnally two equivalent ways: $$(\frac{u}{v})'=(\frac{u'v-uv'}{v^2})\\(\frac 1v\cdot u)'=(\frac 1v)'\cdot u+(\frac 1v)\cdot u'$$ You must get after some care in calculations $$\left(\frac{\sqrt[3]{4x^3+8}}{(x+2)^5}\right)'=\frac{-16x^3+8x^2-40}{(x+2)^6\sqrt[3]{(4x^3+8)^2}}$$
1,853,771
Find the probability that the birth days of 6 different persons will fall in exactly two calendar months. Ans.is 341/(12^6) Here each person has 12 option So there are 6 persons .total no. Of ways 12^6 And out of 12 months 2 are randomly selected ..so $12$C$2$ B'day of 6 persons fall in 2 months in 2^6 ways. The...
2016/07/09
[ "https://math.stackexchange.com/questions/1853771", "https://math.stackexchange.com", "https://math.stackexchange.com/users/351895/" ]
I'm assuming you mean How do we find the derivative of $y= \frac{(4x^3 +8)^{\frac{1}{3}}}{(x+2)^5}$? The quotation rule: $\frac{f(x)}{g(x)}=\frac{f'(x)g(x)-g'(x)f(x)}{g^2(x)}$ The chain rule: $f(g(x))=f'(g(x))g'(x)$ So to solve the question, we apply the quotation rule first Letting $$(4x^3 +8)^{\frac{1}{3}}=f(x)$$...
**Hint** When you face products, quotients, powers, .. , you can make life much easier using logarithmic differentiation. In your case $$y = \frac{\sqrt[3]{4x^3+8}}{(x+2)^5}\implies \log(y)=\frac 13 \log(4x^3+8)-5\log(x+2)$$ Now, differentiate $$\frac{y'}y=\frac 13 \times\frac {12x^2}{4x^2+8}-5\times\frac 1{x+2}= ??$$...
58,831,853
``` print("Please enter integers (then press enter key twice to show you're done):") s = input() #whatever you're inputting after the print first = True #What does this mean??? while s != "": #What does this mean??? lst = s.split() #split all your inputs into ...
2019/11/13
[ "https://Stackoverflow.com/questions/58831853", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12364974/" ]
I don't really know what programming language this is but with basic knowledge I can kinda tell you what these things mean. I hope it helps: ``` print("Please enter integers (then press enter key twice to show you're done):") s = input() #Here s becomes your input first = True #Here y...
``` first = True ``` set boolean variabel to `True` ``` while s != "": ``` check if input is empty. `!=` means not equal and is the opposite to `==` which means equal ``` if first: ``` if the `first` variable is `True` run the code for the if statement. In this case set the value as your max va...
44,320,604
I have a view like this: ``` Year | Month | Week | Category | Value | 2017 | 1 | 1 | A | 1 2017 | 1 | 1 | B | 2 2017 | 1 | 1 | C | 3 2017 | 1 | 2 | A | 4 2017 | 1 | 2 | B | 5 2017 | 1 | 2 | C | 6 2017 | 1 | 3 | A | 7 2017 | 1 | 3...
2017/06/02
[ "https://Stackoverflow.com/questions/44320604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8091329/" ]
Assuming that you need a month average and a value for the max week not the max value per month ``` SELECT year, month, category, avg_val, value max_week_val FROM ( SELECT *, AVG(value) OVER (PARTITION BY year, month, category) avg_val, ROW_NUMBER() OVER (PARTITION BY year, month, category ...
``` with data (yr, mnth, wk, cat, val) as ( -- begin test data select 2017 , 1 , 1 , 'A' , 1 from dual union all select 2017 , 1 , 1 , 'B' , 2 from dual union all select 2017 , 1 , 1 , 'C' , 3 from dual union all select 2017 , 1 , 2 , 'A' , 4 from dual union all...
44,320,604
I have a view like this: ``` Year | Month | Week | Category | Value | 2017 | 1 | 1 | A | 1 2017 | 1 | 1 | B | 2 2017 | 1 | 1 | C | 3 2017 | 1 | 2 | A | 4 2017 | 1 | 2 | B | 5 2017 | 1 | 2 | C | 6 2017 | 1 | 3 | A | 7 2017 | 1 | 3...
2017/06/02
[ "https://Stackoverflow.com/questions/44320604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8091329/" ]
Assuming that you need a month average and a value for the max week not the max value per month ``` SELECT year, month, category, avg_val, value max_week_val FROM ( SELECT *, AVG(value) OVER (PARTITION BY year, month, category) avg_val, ROW_NUMBER() OVER (PARTITION BY year, month, category ...
And here is my **NEW** version. My thanks to @peterm for pointing me about the prior false value of `val_from_max_week_of_month`. So, I corrected it: ``` SELECT a.Year, a.Month, a.Category, max(a.Week) AS max_week, AVG(a.Value) AS avg_val, ( SELECT b.Value FROM decades AS b ...
44,320,604
I have a view like this: ``` Year | Month | Week | Category | Value | 2017 | 1 | 1 | A | 1 2017 | 1 | 1 | B | 2 2017 | 1 | 1 | C | 3 2017 | 1 | 2 | A | 4 2017 | 1 | 2 | B | 5 2017 | 1 | 2 | C | 6 2017 | 1 | 3 | A | 7 2017 | 1 | 3...
2017/06/02
[ "https://Stackoverflow.com/questions/44320604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8091329/" ]
Assuming that you need a month average and a value for the max week not the max value per month ``` SELECT year, month, category, avg_val, value max_week_val FROM ( SELECT *, AVG(value) OVER (PARTITION BY year, month, category) avg_val, ROW_NUMBER() OVER (PARTITION BY year, month, category ...
First, you *might* need to check, how do you handle the first week in January. If 1st of January are not a Monday, there are several interpretations & not every one of them will fit the solutions here. You'll either need to use: * the [ISO week concept](https://en.wikipedia.org/wiki/ISO_week_date), ie. the `week` colu...
39,931,342
I have got a string ``` $key1={331015EA261D38A7} $key2={9145A98BA37617DE} $key3={EF745F23AA67243D} ``` How do i split each of the keys based on "$" and the "next line" element? and then place it in an Arraylist? The output should look like this: Arraylist[0]: ``` $key1={331015EA261D38A7} ``` Arraylist[1]: ``` ...
2016/10/08
[ "https://Stackoverflow.com/questions/39931342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6659196/" ]
If you just want to split by new line, it is as simple as : ``` yourstring.split("\n"): ```
yourstring.split(System.getProperty("line.separator"));
39,931,342
I have got a string ``` $key1={331015EA261D38A7} $key2={9145A98BA37617DE} $key3={EF745F23AA67243D} ``` How do i split each of the keys based on "$" and the "next line" element? and then place it in an Arraylist? The output should look like this: Arraylist[0]: ``` $key1={331015EA261D38A7} ``` Arraylist[1]: ``` ...
2016/10/08
[ "https://Stackoverflow.com/questions/39931342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6659196/" ]
If you just want to split by new line, it is as simple as : ``` yourstring.split("\n"): ```
Don't split, *search* your `String` for key value pairs: ``` \$(?<key>[^=]++)=\{(?<value>[^}]++)\} ``` For example: ``` final Pattern pattern = Pattern.compile("\\$(?<key>[^=]++)=\\{(?<value>[^}]++)\\}"); final String input = "$key1={331015EA261D38A7}\n$key2={9145A98BA37617DE}\n$key3={EF745F23AA67243D}"; final Matc...
39,931,342
I have got a string ``` $key1={331015EA261D38A7} $key2={9145A98BA37617DE} $key3={EF745F23AA67243D} ``` How do i split each of the keys based on "$" and the "next line" element? and then place it in an Arraylist? The output should look like this: Arraylist[0]: ``` $key1={331015EA261D38A7} ``` Arraylist[1]: ``` ...
2016/10/08
[ "https://Stackoverflow.com/questions/39931342", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6659196/" ]
Don't split, *search* your `String` for key value pairs: ``` \$(?<key>[^=]++)=\{(?<value>[^}]++)\} ``` For example: ``` final Pattern pattern = Pattern.compile("\\$(?<key>[^=]++)=\\{(?<value>[^}]++)\\}"); final String input = "$key1={331015EA261D38A7}\n$key2={9145A98BA37617DE}\n$key3={EF745F23AA67243D}"; final Matc...
yourstring.split(System.getProperty("line.separator"));
1,486,009
I have the following norms: $$ \|f\|\_1=\int\_{t\_0}^{t\_1}\|f(t)\|\_2dt $$ $$ \|f\|\_2=\sqrt{\int\_{t\_0}^{t\_1}\|f(t)\|\_2^2dt} $$ I need to show their non-equivalence, i.e. that there do not exist numbers $a,b\in\mathbb R$, $a\ge b>0$ such that $b\|f\|\_2\le\|f\|\_1\le a\|f\|\_2$. I would like to do the proof by m...
2015/10/18
[ "https://math.stackexchange.com/questions/1486009", "https://math.stackexchange.com", "https://math.stackexchange.com/users/218257/" ]
**Hint**: Try to construct a sequence of functions $f\_n$ in the vector space you work in such that $\frac{||f\_n||\_1}{||f\_n||\_2} < \frac{1}{n}$. This will show that a constant $b > 0$ such that $b ||f||\_2 \leq ||f||\_1$ for **all** $f$ does not exist.
HINT: To find a counterexample, think about $1/x$ on $(0,1]$. HINT TO A HINT: $1/x$ is $f^2$, not $f$.
1,486,009
I have the following norms: $$ \|f\|\_1=\int\_{t\_0}^{t\_1}\|f(t)\|\_2dt $$ $$ \|f\|\_2=\sqrt{\int\_{t\_0}^{t\_1}\|f(t)\|\_2^2dt} $$ I need to show their non-equivalence, i.e. that there do not exist numbers $a,b\in\mathbb R$, $a\ge b>0$ such that $b\|f\|\_2\le\|f\|\_1\le a\|f\|\_2$. I would like to do the proof by m...
2015/10/18
[ "https://math.stackexchange.com/questions/1486009", "https://math.stackexchange.com", "https://math.stackexchange.com/users/218257/" ]
Think of $$ f(t)=\frac{1}{\sqrt{t-t\_0}}. $$ You can show that $f$ belongs to $L^1$ but not $L^2$. If you for some reason would like a sequence of functions $f\_n\in L^1\cap L^2$ such that $$ \lim\_{n\to+\infty}\frac{\|f\_n\|\_{L^2}}{\|f\_n\|\_{L^1}}=+\infty, $$ then you can cut the example above off, and consider $$...
HINT: To find a counterexample, think about $1/x$ on $(0,1]$. HINT TO A HINT: $1/x$ is $f^2$, not $f$.
1,486,009
I have the following norms: $$ \|f\|\_1=\int\_{t\_0}^{t\_1}\|f(t)\|\_2dt $$ $$ \|f\|\_2=\sqrt{\int\_{t\_0}^{t\_1}\|f(t)\|\_2^2dt} $$ I need to show their non-equivalence, i.e. that there do not exist numbers $a,b\in\mathbb R$, $a\ge b>0$ such that $b\|f\|\_2\le\|f\|\_1\le a\|f\|\_2$. I would like to do the proof by m...
2015/10/18
[ "https://math.stackexchange.com/questions/1486009", "https://math.stackexchange.com", "https://math.stackexchange.com/users/218257/" ]
**Hint**: Try to construct a sequence of functions $f\_n$ in the vector space you work in such that $\frac{||f\_n||\_1}{||f\_n||\_2} < \frac{1}{n}$. This will show that a constant $b > 0$ such that $b ||f||\_2 \leq ||f||\_1$ for **all** $f$ does not exist.
Think of $$ f(t)=\frac{1}{\sqrt{t-t\_0}}. $$ You can show that $f$ belongs to $L^1$ but not $L^2$. If you for some reason would like a sequence of functions $f\_n\in L^1\cap L^2$ such that $$ \lim\_{n\to+\infty}\frac{\|f\_n\|\_{L^2}}{\|f\_n\|\_{L^1}}=+\infty, $$ then you can cut the example above off, and consider $$...
25,446,685
I have a simple tab system but I'm a bit stuck on exactly how to make this work. I'm using ng-repeat to spit out the tabs and the content and so far this is working fine. Here are my tabs: ``` <ul class="job-title-list"> <li ng-repeat="tab in tabBlocks"> <a href="javascript:;" ng-click="activeTab($index...
2014/08/22
[ "https://Stackoverflow.com/questions/25446685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1768250/" ]
``` jFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); ``` Now for a bit of explanation. The closest equivalent to as seen in the question is.. ``` jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ``` But that kills the entire JRE irrespective of other non-daemon threads that are running. If they are ...
If you're talking about a `JButton` that you want to put into your form, then you want to invoke `JFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)` in your constructor for the form, and then your button handler can invoke ``` dispose() ``` to close the form.
25,446,685
I have a simple tab system but I'm a bit stuck on exactly how to make this work. I'm using ng-repeat to spit out the tabs and the content and so far this is working fine. Here are my tabs: ``` <ul class="job-title-list"> <li ng-repeat="tab in tabBlocks"> <a href="javascript:;" ng-click="activeTab($index...
2014/08/22
[ "https://Stackoverflow.com/questions/25446685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1768250/" ]
If you want to create a button which exits the application when the user clicks it, try this: ``` JButton exit = new JButton("exit"); ActionListener al = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { System.exit(0); } }; exit.addActionListener(al); ``` Now when y...
If you're talking about a `JButton` that you want to put into your form, then you want to invoke `JFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)` in your constructor for the form, and then your button handler can invoke ``` dispose() ``` to close the form.
25,446,685
I have a simple tab system but I'm a bit stuck on exactly how to make this work. I'm using ng-repeat to spit out the tabs and the content and so far this is working fine. Here are my tabs: ``` <ul class="job-title-list"> <li ng-repeat="tab in tabBlocks"> <a href="javascript:;" ng-click="activeTab($index...
2014/08/22
[ "https://Stackoverflow.com/questions/25446685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1768250/" ]
@AndrewThompson is right about `JFrame.EXIT_ON_CLOSE` but you can take steps to avoid just killing stuff. *`JFrame.EXIT_ON_CLOSE` is just fine, if you handle cleanup in an overridden `JFrame.processWindowEvent(WindowEvent)` checking for `WindowEvent.WINDOW_CLOSING` events.* ```java import java.awt.BorderLayout; impor...
If you're talking about a `JButton` that you want to put into your form, then you want to invoke `JFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)` in your constructor for the form, and then your button handler can invoke ``` dispose() ``` to close the form.
25,446,685
I have a simple tab system but I'm a bit stuck on exactly how to make this work. I'm using ng-repeat to spit out the tabs and the content and so far this is working fine. Here are my tabs: ``` <ul class="job-title-list"> <li ng-repeat="tab in tabBlocks"> <a href="javascript:;" ng-click="activeTab($index...
2014/08/22
[ "https://Stackoverflow.com/questions/25446685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1768250/" ]
``` jFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); ``` Now for a bit of explanation. The closest equivalent to as seen in the question is.. ``` jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ``` But that kills the entire JRE irrespective of other non-daemon threads that are running. If they are ...
If you want to create a button which exits the application when the user clicks it, try this: ``` JButton exit = new JButton("exit"); ActionListener al = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { System.exit(0); } }; exit.addActionListener(al); ``` Now when y...
25,446,685
I have a simple tab system but I'm a bit stuck on exactly how to make this work. I'm using ng-repeat to spit out the tabs and the content and so far this is working fine. Here are my tabs: ``` <ul class="job-title-list"> <li ng-repeat="tab in tabBlocks"> <a href="javascript:;" ng-click="activeTab($index...
2014/08/22
[ "https://Stackoverflow.com/questions/25446685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1768250/" ]
``` jFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); ``` Now for a bit of explanation. The closest equivalent to as seen in the question is.. ``` jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ``` But that kills the entire JRE irrespective of other non-daemon threads that are running. If they are ...
Very simple answer is as @Andrew Thompson said. ``` jFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); ``` **OR** ``` jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ``` and if u want to make it in other way by code. then u can put this code anywhere. in events. System.exit(0); hope this will help...
25,446,685
I have a simple tab system but I'm a bit stuck on exactly how to make this work. I'm using ng-repeat to spit out the tabs and the content and so far this is working fine. Here are my tabs: ``` <ul class="job-title-list"> <li ng-repeat="tab in tabBlocks"> <a href="javascript:;" ng-click="activeTab($index...
2014/08/22
[ "https://Stackoverflow.com/questions/25446685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1768250/" ]
``` jFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); ``` Now for a bit of explanation. The closest equivalent to as seen in the question is.. ``` jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ``` But that kills the entire JRE irrespective of other non-daemon threads that are running. If they are ...
@AndrewThompson is right about `JFrame.EXIT_ON_CLOSE` but you can take steps to avoid just killing stuff. *`JFrame.EXIT_ON_CLOSE` is just fine, if you handle cleanup in an overridden `JFrame.processWindowEvent(WindowEvent)` checking for `WindowEvent.WINDOW_CLOSING` events.* ```java import java.awt.BorderLayout; impor...
25,446,685
I have a simple tab system but I'm a bit stuck on exactly how to make this work. I'm using ng-repeat to spit out the tabs and the content and so far this is working fine. Here are my tabs: ``` <ul class="job-title-list"> <li ng-repeat="tab in tabBlocks"> <a href="javascript:;" ng-click="activeTab($index...
2014/08/22
[ "https://Stackoverflow.com/questions/25446685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1768250/" ]
If you want to create a button which exits the application when the user clicks it, try this: ``` JButton exit = new JButton("exit"); ActionListener al = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { System.exit(0); } }; exit.addActionListener(al); ``` Now when y...
Very simple answer is as @Andrew Thompson said. ``` jFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); ``` **OR** ``` jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ``` and if u want to make it in other way by code. then u can put this code anywhere. in events. System.exit(0); hope this will help...
25,446,685
I have a simple tab system but I'm a bit stuck on exactly how to make this work. I'm using ng-repeat to spit out the tabs and the content and so far this is working fine. Here are my tabs: ``` <ul class="job-title-list"> <li ng-repeat="tab in tabBlocks"> <a href="javascript:;" ng-click="activeTab($index...
2014/08/22
[ "https://Stackoverflow.com/questions/25446685", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1768250/" ]
@AndrewThompson is right about `JFrame.EXIT_ON_CLOSE` but you can take steps to avoid just killing stuff. *`JFrame.EXIT_ON_CLOSE` is just fine, if you handle cleanup in an overridden `JFrame.processWindowEvent(WindowEvent)` checking for `WindowEvent.WINDOW_CLOSING` events.* ```java import java.awt.BorderLayout; impor...
Very simple answer is as @Andrew Thompson said. ``` jFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); ``` **OR** ``` jFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); ``` and if u want to make it in other way by code. then u can put this code anywhere. in events. System.exit(0); hope this will help...
17,635,381
I am new to triggers i have two tables with names ArefSms And tblSalesProd i want after an insert my trigger update ArefSms where tblSalesProd.SalesID=ArefSms.SalesID for this propose i write below code ``` USE [ACEDB] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER TRIGGER [dbo].[areftblSalesProd] ON [...
2013/07/14
[ "https://Stackoverflow.com/questions/17635381", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2304094/" ]
You need to specify `inserted` in the `update` statement. It is a table reference: ``` Update ArefSms set qt=inserted.ProdQty from inserted where ArefSms.SalesID=inserted.SalesID; ```
When updating tables from other tables (in this case `inserted`), I prefer the syntax using `JOINs`: ``` UPDATE Aref SET Aref.qt=inserted.ProdQty FROM ArefSms Aref INNER JOIN inserted ON Aref.SalesID=inserted.SalesID ``` * [Condensed Fiddle Demo](http://sqlfiddle.com/#!3/25771/1)