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
12,866,808
How do I use regex to convert ``` 11111aA$xx1111xxdj$%%` ``` to ``` aA$xx1111xxdj$%% ``` So, in other words, I want to remove (or match) the FIRST grouping of `1`'s.
2012/10/12
[ "https://Stackoverflow.com/questions/12866808", "https://Stackoverflow.com", "https://Stackoverflow.com/users/140811/" ]
If this is the beginning, you can use this: ``` ^[1]* ``` As far as replacing, it depends on the language. In powershell, I would do this: ``` [regex]::Replace("11111aA$xx1111xxdj$%%","^[1]*","") ``` This will return: ``` aA$xx1111xxdj$%% ```
In Javascript ``` var str = '11111aA$xx1111xxdj$%%'; var patt = /^1+/g; str = str.replace(patt,""); ```
189,588
I've been led to believe that for single variable assignment in T-SQL, `set` is the best way to go about things, for two reasons: * it's the ANSI standard for variable assignment * it's actually faster than doing a SELECT (for a single variable) So... ``` SELECT @thingy = 'turnip shaped' ``` becomes ``` SET @thin...
2008/10/09
[ "https://Stackoverflow.com/questions/189588", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1030/" ]
I don't speed is an issue, it has to do with more with the assignment feature set. I came across [this](http://vyaskn.tripod.com/differences_between_set_and_select.htm) a while ago and there is something new in SQL Server 2008...I heard, try googling SQL Set vs Select SQL SERVER 2008
Take a look at the "execution plan", it should tell you the cost of each line of your statement
189,588
I've been led to believe that for single variable assignment in T-SQL, `set` is the best way to go about things, for two reasons: * it's the ANSI standard for variable assignment * it's actually faster than doing a SELECT (for a single variable) So... ``` SELECT @thingy = 'turnip shaped' ``` becomes ``` SET @thin...
2008/10/09
[ "https://Stackoverflow.com/questions/189588", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1030/" ]
SET is faster on single runs. You can prove this easily enough. Whether or not it makes a difference is up to you, but I prefer SET, since I don't see the point of SELECT if all the code is doing is an assignment. I prefer to keep SELECT confined to SELECT statements from tables, views, etc. Here is a sample script, w...
Take a look at the "execution plan", it should tell you the cost of each line of your statement
189,588
I've been led to believe that for single variable assignment in T-SQL, `set` is the best way to go about things, for two reasons: * it's the ANSI standard for variable assignment * it's actually faster than doing a SELECT (for a single variable) So... ``` SELECT @thingy = 'turnip shaped' ``` becomes ``` SET @thin...
2008/10/09
[ "https://Stackoverflow.com/questions/189588", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1030/" ]
SET is faster on single runs. You can prove this easily enough. Whether or not it makes a difference is up to you, but I prefer SET, since I don't see the point of SELECT if all the code is doing is an assignment. I prefer to keep SELECT confined to SELECT statements from tables, views, etc. Here is a sample script, w...
I don't speed is an issue, it has to do with more with the assignment feature set. I came across [this](http://vyaskn.tripod.com/differences_between_set_and_select.htm) a while ago and there is something new in SQL Server 2008...I heard, try googling SQL Set vs Select SQL SERVER 2008
445,436
A block is suspended from a string; does the gravitational force do any work on it?
2018/12/06
[ "https://physics.stackexchange.com/questions/445436", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/215172/" ]
Work is performed when the point of application of a force travels through a distance in the direction of the force. An object suspended by a string in a gravitational field experiences the force of gravity but if it does not move, then no work is being done on it.
No, if the block is still, there is no work being done on it. There is a force on it, yes, but no work. Work is really a function of a period of time i.e. in 1 second, it did 1 Joule of work. It does not make sense to ask the value of such a quantity for any given moment.
45,648,411
I am working on a windows application where I get value of a string called 'strData' from a function which has '\' in it. I want to split that string by '\' but I don't know why 'Split' function is not working. ``` string strData= "0101-0000046C\0\0\0"; //This Value comes from a function string[] strTemp = strData.S...
2017/08/12
[ "https://Stackoverflow.com/questions/45648411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6529025/" ]
Your data is interpreted as a non-escaped string: this means all your `\0` in your code file get resolved to the ascii-char with the value of 0 (value-zero-char). In your case you finally have to replace the value-zero-char like this: `strData = strData.Replace("\0", "0\\");` then it works. **Explanation:** this repl...
code is incorrect, *backslash zero* \0 is "zero character" If You want real backslash, use double \\ ``` string strData= "0101-0000046C\\0\\0\\0"; //This Value comes from a function string[] strTemp = strData.Split('\\'); return strTemp[0]; ```
45,648,411
I am working on a windows application where I get value of a string called 'strData' from a function which has '\' in it. I want to split that string by '\' but I don't know why 'Split' function is not working. ``` string strData= "0101-0000046C\0\0\0"; //This Value comes from a function string[] strTemp = strData.S...
2017/08/12
[ "https://Stackoverflow.com/questions/45648411", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6529025/" ]
Your data is interpreted as a non-escaped string: this means all your `\0` in your code file get resolved to the ascii-char with the value of 0 (value-zero-char). In your case you finally have to replace the value-zero-char like this: `strData = strData.Replace("\0", "0\\");` then it works. **Explanation:** this repl...
use `@` to interpret the string literally ``` string strData= @"0101-0000046C\0\0\0"; ``` `\0` is only one character so add `@` before the string so that its interpreted literally
25,450,780
I'm having a strange issue with a permanent redirection in PHP. Here's the code I'm using: ``` if ($_SERVER['HTTP_HOST'] != 'www.mydomain.ca') { header("HTTP/1.1 301 Moved Permanently"); $loc = "http://www.mydomain.ca".$_SERVER['SCRIPT_NAME']; header("Location: ".$loc); exit; } ``` So, the home...
2014/08/22
[ "https://Stackoverflow.com/questions/25450780", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2300171/" ]
If you have a ftp-account to the server, you can create a .htaccess file and let it handle the requests. Just create a file named `.htaccess` in the root-folder of your site and post the code, changed to your desired pattern(s) ``` Options +FollowSymLinks RewriteEngine on RewriteCond {HTTP_HOST} ^yourdomain.com Rewrit...
Try it by htaccess, create .htaccess file and try something like this RewriteEngine on RewriteRule (.\*) <http://www.newdomain.com/>$1 [R=301,L] \*\* Apache Mod-Rewrite moduled should be enabled
43,741
I'm building a piece of software which will have a filtering system that involves multiple flags. The complication is that each flag has three possible states: 1. On 2. Off 3. N/A (i.e. It can't be applied, for whatever reason) Here's my current plan: ![enter image description here](https://i.stack.imgur.com/xPbFC.p...
2013/08/15
[ "https://ux.stackexchange.com/questions/43741", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/11647/" ]
Suggested solution: ![enter image description here](https://i.stack.imgur.com/bgc2R.png) > > How should I visually represent multiple three-state flags? The > complication is that each flag has three possible states > > > Means there are only two states "on/off" for the component, but component itself can be di...
Well, if you (rightly) don't rely on colours, you'll have to add another visual element. And I don't see the problem with using checkboxes (from Amazon.co.uk): ![Amazon Brand Filtering Grid](https://i.stack.imgur.com/kUKOh.png) You can gray out non-available options. Update ====== In respond to other posts, here's ...
43,741
I'm building a piece of software which will have a filtering system that involves multiple flags. The complication is that each flag has three possible states: 1. On 2. Off 3. N/A (i.e. It can't be applied, for whatever reason) Here's my current plan: ![enter image description here](https://i.stack.imgur.com/xPbFC.p...
2013/08/15
[ "https://ux.stackexchange.com/questions/43741", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/11647/" ]
Good answers here, but they don't mention the common name for this UI element... These are called **"[tri-state checkboxes](http://en.wikipedia.org/wiki/Checkbox#Tri-state_checkbox)"** (wikipedia), and are often used to show a "mixed" or "other" state in toggle switches. ![enter image description here](https://i.stac...
Well, if you (rightly) don't rely on colours, you'll have to add another visual element. And I don't see the problem with using checkboxes (from Amazon.co.uk): ![Amazon Brand Filtering Grid](https://i.stack.imgur.com/kUKOh.png) You can gray out non-available options. Update ====== In respond to other posts, here's ...
43,741
I'm building a piece of software which will have a filtering system that involves multiple flags. The complication is that each flag has three possible states: 1. On 2. Off 3. N/A (i.e. It can't be applied, for whatever reason) Here's my current plan: ![enter image description here](https://i.stack.imgur.com/xPbFC.p...
2013/08/15
[ "https://ux.stackexchange.com/questions/43741", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/11647/" ]
Suggested solution: ![enter image description here](https://i.stack.imgur.com/bgc2R.png) > > How should I visually represent multiple three-state flags? The > complication is that each flag has three possible states > > > Means there are only two states "on/off" for the component, but component itself can be di...
Red color is eye-attractive although it is for off state. Besides it could be not pleasant while long observation. I suggest other styles for the states distinction. Dots allow quick eye-jumps and have some meaning (on-off). ![enter image description here](https://i.stack.imgur.com/Ss96M.png)
43,741
I'm building a piece of software which will have a filtering system that involves multiple flags. The complication is that each flag has three possible states: 1. On 2. Off 3. N/A (i.e. It can't be applied, for whatever reason) Here's my current plan: ![enter image description here](https://i.stack.imgur.com/xPbFC.p...
2013/08/15
[ "https://ux.stackexchange.com/questions/43741", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/11647/" ]
Suggested solution: ![enter image description here](https://i.stack.imgur.com/bgc2R.png) > > How should I visually represent multiple three-state flags? The > complication is that each flag has three possible states > > > Means there are only two states "on/off" for the component, but component itself can be di...
Good answers here, but they don't mention the common name for this UI element... These are called **"[tri-state checkboxes](http://en.wikipedia.org/wiki/Checkbox#Tri-state_checkbox)"** (wikipedia), and are often used to show a "mixed" or "other" state in toggle switches. ![enter image description here](https://i.stac...
43,741
I'm building a piece of software which will have a filtering system that involves multiple flags. The complication is that each flag has three possible states: 1. On 2. Off 3. N/A (i.e. It can't be applied, for whatever reason) Here's my current plan: ![enter image description here](https://i.stack.imgur.com/xPbFC.p...
2013/08/15
[ "https://ux.stackexchange.com/questions/43741", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/11647/" ]
Good answers here, but they don't mention the common name for this UI element... These are called **"[tri-state checkboxes](http://en.wikipedia.org/wiki/Checkbox#Tri-state_checkbox)"** (wikipedia), and are often used to show a "mixed" or "other" state in toggle switches. ![enter image description here](https://i.stac...
Red color is eye-attractive although it is for off state. Besides it could be not pleasant while long observation. I suggest other styles for the states distinction. Dots allow quick eye-jumps and have some meaning (on-off). ![enter image description here](https://i.stack.imgur.com/Ss96M.png)
67,585,943
I don't know what's wrong here, all I'm trying to do is to open this file, but it says it can't find such a file or directory, however as I have highlighted on the side, the file is right there. I just want to open it. I have opened files before but never encountered this. I must have missed something, I checked online...
2021/05/18
[ "https://Stackoverflow.com/questions/67585943", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15054031/" ]
When [open()](https://docs.python.org/3/library/functions.html#open) function receives a relative path, it looks for that file relative to the current working directory. In other words: relative to the current directory from where the script is run. This can be any arbitrary location. I guess what you want to do is lo...
You need to import csv. Then you can open the file as a csv file. For example, ```py with open ("alphabetical.csv", "r") as csvfile: ``` Then you can use the file. Make sure the file is in your cwd.
112,725
I've heard much about bitcoin maximalism. As I've googled it, a bitcoin maximalist is a person who believe that the only real cryptocurrency would really be needed in the future is the bitcoin. Is this correct? Can someone explain it in simple language to me and also the root causes of this belief? Why would some peopl...
2022/03/04
[ "https://bitcoin.stackexchange.com/questions/112725", "https://bitcoin.stackexchange.com", "https://bitcoin.stackexchange.com/users/101040/" ]
I think your question might be opinion-based and therefore off-topic on this site, but I'll still try to give a helpful answer. Bitcoin maximalists believe that bitcoin is the only cryptocurrency worth holding, studying and/or building upon. That belief comes from any of these and/or related claims (with varying degre...
Bitcoin maximalism became a thing after this blog post by Vitalik: <https://blog.ethereum.org/2014/11/20/bitcoin-maximalism-currency-platform-network-effects/> I do not agree with anything shared in the post which was written in 2014. It was a narrative to promote an altcoin. In 2022, maximalism is a meme on Twitter...
258,812
I want to plot the waveform of an audiosnippet. Since I am working in matlab I exported my audiofile as csv with two columns (n, in). Of course this produces a huge file of about 40MB for my 1 000 000 datapoints. When I now try to plot this using pgf latex will run into a memory error. ``` TeX capacity exceeded, sorry...
2015/08/05
[ "https://tex.stackexchange.com/questions/258812", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/83229/" ]
Perhaps you can reduce the number of points by only plotting the envelope of the waveform. Im not certain if that would suffice for your waveform, but you can use Matlab to extract the envelope from the waveform; <http://mathworks.com/help/signal/ug/envelope-extraction-using-the-analytic-signal.html>
A bit late to the party, but I was looking to plot (quite a lot) of waveforms in my LaTeX document and came across this in the search. Unfortunately, this is not an *exact* answer to your question, but a way to accomplish what you want without using tikz / pgf. 1. Use `PythonTeX` (You'll need Python install - I used A...
33,311,725
With the new Codeigniter 3.0 version what authentication libraries do you use? * [Flexi auth](http://haseydesign.com/flexi-auth/) was very good and robust with great documentation for CI 2.0 but it is old and as I can see it is discontinued. Of course it does not work out of the box with CI 3.0. I have tested it and ...
2015/10/23
[ "https://Stackoverflow.com/questions/33311725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1219806/" ]
don't let the down votes get ya down. check out Ion Auth <https://github.com/benedmunds/CodeIgniter-Ion-Auth> take a look at the read me, you will have to rename two files for codeigniter 3. otherwise you can see that there are recent changes to the lib. the author Ben Edmunds is one of the four developers on the n...
For a simple library, I use <https://github.com/trafficinc/CodeIgniter-Authit> (Authit). It is very simple so I can do a lot of customizations to it or just leave it be.
33,311,725
With the new Codeigniter 3.0 version what authentication libraries do you use? * [Flexi auth](http://haseydesign.com/flexi-auth/) was very good and robust with great documentation for CI 2.0 but it is old and as I can see it is discontinued. Of course it does not work out of the box with CI 3.0. I have tested it and ...
2015/10/23
[ "https://Stackoverflow.com/questions/33311725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1219806/" ]
don't let the down votes get ya down. check out Ion Auth <https://github.com/benedmunds/CodeIgniter-Ion-Auth> take a look at the read me, you will have to rename two files for codeigniter 3. otherwise you can see that there are recent changes to the lib. the author Ben Edmunds is one of the four developers on the n...
Please check [Dnato System Login](https://github.com/abedputra/CodeIgniter-ion-Auth-Login) Its Simple, Fast and Lightweight auth codeigniter. **Feature:** -Add user -Delete user -Ban, Unban user -Register new user sent to email token -Forget password -Role user level -Edit user profile -Grav...
33,311,725
With the new Codeigniter 3.0 version what authentication libraries do you use? * [Flexi auth](http://haseydesign.com/flexi-auth/) was very good and robust with great documentation for CI 2.0 but it is old and as I can see it is discontinued. Of course it does not work out of the box with CI 3.0. I have tested it and ...
2015/10/23
[ "https://Stackoverflow.com/questions/33311725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1219806/" ]
don't let the down votes get ya down. check out Ion Auth <https://github.com/benedmunds/CodeIgniter-Ion-Auth> take a look at the read me, you will have to rename two files for codeigniter 3. otherwise you can see that there are recent changes to the lib. the author Ben Edmunds is one of the four developers on the n...
check this library.that is so nice.and with many features * login / logout * Login DDoS Protection * register and signup via email. (send verification code to your email) * users can send private message to other users * user group * create permissions and access control * error in other language this library for CI...
33,311,725
With the new Codeigniter 3.0 version what authentication libraries do you use? * [Flexi auth](http://haseydesign.com/flexi-auth/) was very good and robust with great documentation for CI 2.0 but it is old and as I can see it is discontinued. Of course it does not work out of the box with CI 3.0. I have tested it and ...
2015/10/23
[ "https://Stackoverflow.com/questions/33311725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1219806/" ]
Please check [Dnato System Login](https://github.com/abedputra/CodeIgniter-ion-Auth-Login) Its Simple, Fast and Lightweight auth codeigniter. **Feature:** -Add user -Delete user -Ban, Unban user -Register new user sent to email token -Forget password -Role user level -Edit user profile -Grav...
For a simple library, I use <https://github.com/trafficinc/CodeIgniter-Authit> (Authit). It is very simple so I can do a lot of customizations to it or just leave it be.
33,311,725
With the new Codeigniter 3.0 version what authentication libraries do you use? * [Flexi auth](http://haseydesign.com/flexi-auth/) was very good and robust with great documentation for CI 2.0 but it is old and as I can see it is discontinued. Of course it does not work out of the box with CI 3.0. I have tested it and ...
2015/10/23
[ "https://Stackoverflow.com/questions/33311725", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1219806/" ]
Please check [Dnato System Login](https://github.com/abedputra/CodeIgniter-ion-Auth-Login) Its Simple, Fast and Lightweight auth codeigniter. **Feature:** -Add user -Delete user -Ban, Unban user -Register new user sent to email token -Forget password -Role user level -Edit user profile -Grav...
check this library.that is so nice.and with many features * login / logout * Login DDoS Protection * register and signup via email. (send verification code to your email) * users can send private message to other users * user group * create permissions and access control * error in other language this library for CI...
2,863,587
Given $x\_0 \ldots x\_k$ and $n$, Define $$f(Q)=\sum\_{\substack{n\_0+\ldots+n\_k=n \\ n\_0,\ldots,n\_k \ >=0 \\n\_1+2\*n\_2+\ldots+k\*n\_k=Q}} \binom{n}{n\_0,\cdots,n\_k}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k}$$. Note that $$\sum\_{Q=0}^{n\*k} f(Q)=(\sum\_{i=0}^{k}x\_i)^n$$ which comes from the multinomial expansion. I was ...
2018/07/26
[ "https://math.stackexchange.com/questions/2863587", "https://math.stackexchange.com", "https://math.stackexchange.com/users/376930/" ]
You can calculate the generating function instead. Define $$ \begin{aligned} F(X,Y)&= \sum\_{n=0}^\infty X^n\sum\_{Q=0}^\infty Y^Q \sum\_{\substack{n\_0+\ldots+n\_k=n \\ n\_0,\ldots,n\_k \ >=0 \\n\_1+2\*n\_2+\ldots+k\*n\_k=Q}} \frac{1}{n\_0!n\_1!\cdots n\_k!}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k}\\ &=\sum\_{n=0}^\infty X^n\...
Starting from Hamed's answer, we can give a quick proof that $\sum\_{Q\ge 0} Qf(Q)$ equals what you think it is. They proved $$ \sum\_{n\ge 0}\sum\_{q\ge 0}\frac1{n!}f\_n(Q)X^nY^q = \exp\Big(\sum\_{m=0}^k x\_mXY^m\Big) $$ Differentiating both sides with respect to $Y$, and then multiplying by $Y$, you get $$ \sum\_{n\g...
2,863,587
Given $x\_0 \ldots x\_k$ and $n$, Define $$f(Q)=\sum\_{\substack{n\_0+\ldots+n\_k=n \\ n\_0,\ldots,n\_k \ >=0 \\n\_1+2\*n\_2+\ldots+k\*n\_k=Q}} \binom{n}{n\_0,\cdots,n\_k}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k}$$. Note that $$\sum\_{Q=0}^{n\*k} f(Q)=(\sum\_{i=0}^{k}x\_i)^n$$ which comes from the multinomial expansion. I was ...
2018/07/26
[ "https://math.stackexchange.com/questions/2863587", "https://math.stackexchange.com", "https://math.stackexchange.com/users/376930/" ]
You can calculate the generating function instead. Define $$ \begin{aligned} F(X,Y)&= \sum\_{n=0}^\infty X^n\sum\_{Q=0}^\infty Y^Q \sum\_{\substack{n\_0+\ldots+n\_k=n \\ n\_0,\ldots,n\_k \ >=0 \\n\_1+2\*n\_2+\ldots+k\*n\_k=Q}} \frac{1}{n\_0!n\_1!\cdots n\_k!}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k}\\ &=\sum\_{n=0}^\infty X^n\...
I'm going to provide a secondary generating function which is probably more relevant to your updated question. Let's recall your definition, $$ f(Q):=\sum\_{\substack{\sum\_{i=0}^k n\_i=n \\ n\_0,\ldots,n\_k \ \geq0 \\\sum\_{j=0}^kjn\_j=Q}} \binom{n}{n\_0,\cdots,n\_k}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k} $$ and let us calc...
2,863,587
Given $x\_0 \ldots x\_k$ and $n$, Define $$f(Q)=\sum\_{\substack{n\_0+\ldots+n\_k=n \\ n\_0,\ldots,n\_k \ >=0 \\n\_1+2\*n\_2+\ldots+k\*n\_k=Q}} \binom{n}{n\_0,\cdots,n\_k}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k}$$. Note that $$\sum\_{Q=0}^{n\*k} f(Q)=(\sum\_{i=0}^{k}x\_i)^n$$ which comes from the multinomial expansion. I was ...
2018/07/26
[ "https://math.stackexchange.com/questions/2863587", "https://math.stackexchange.com", "https://math.stackexchange.com/users/376930/" ]
Wikipedia on [Bell polynomials](https://en.wikipedia.org/wiki/Bell_polynomials): > > Likewise, the partial ordinary Bell polynomial, in contrast to the usual exponential Bell polynomial defined above, is given by $$\hat{B}\_{n,k}(x\_1,x\_2,\ldots,x\_{n-k+1})=\sum \frac{k!}{j\_1! j\_2! \cdots j\_{n-k+1}!} x\_1{}^{j\_1...
Starting from Hamed's answer, we can give a quick proof that $\sum\_{Q\ge 0} Qf(Q)$ equals what you think it is. They proved $$ \sum\_{n\ge 0}\sum\_{q\ge 0}\frac1{n!}f\_n(Q)X^nY^q = \exp\Big(\sum\_{m=0}^k x\_mXY^m\Big) $$ Differentiating both sides with respect to $Y$, and then multiplying by $Y$, you get $$ \sum\_{n\g...
2,863,587
Given $x\_0 \ldots x\_k$ and $n$, Define $$f(Q)=\sum\_{\substack{n\_0+\ldots+n\_k=n \\ n\_0,\ldots,n\_k \ >=0 \\n\_1+2\*n\_2+\ldots+k\*n\_k=Q}} \binom{n}{n\_0,\cdots,n\_k}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k}$$. Note that $$\sum\_{Q=0}^{n\*k} f(Q)=(\sum\_{i=0}^{k}x\_i)^n$$ which comes from the multinomial expansion. I was ...
2018/07/26
[ "https://math.stackexchange.com/questions/2863587", "https://math.stackexchange.com", "https://math.stackexchange.com/users/376930/" ]
Wikipedia on [Bell polynomials](https://en.wikipedia.org/wiki/Bell_polynomials): > > Likewise, the partial ordinary Bell polynomial, in contrast to the usual exponential Bell polynomial defined above, is given by $$\hat{B}\_{n,k}(x\_1,x\_2,\ldots,x\_{n-k+1})=\sum \frac{k!}{j\_1! j\_2! \cdots j\_{n-k+1}!} x\_1{}^{j\_1...
I'm going to provide a secondary generating function which is probably more relevant to your updated question. Let's recall your definition, $$ f(Q):=\sum\_{\substack{\sum\_{i=0}^k n\_i=n \\ n\_0,\ldots,n\_k \ \geq0 \\\sum\_{j=0}^kjn\_j=Q}} \binom{n}{n\_0,\cdots,n\_k}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k} $$ and let us calc...
2,863,587
Given $x\_0 \ldots x\_k$ and $n$, Define $$f(Q)=\sum\_{\substack{n\_0+\ldots+n\_k=n \\ n\_0,\ldots,n\_k \ >=0 \\n\_1+2\*n\_2+\ldots+k\*n\_k=Q}} \binom{n}{n\_0,\cdots,n\_k}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k}$$. Note that $$\sum\_{Q=0}^{n\*k} f(Q)=(\sum\_{i=0}^{k}x\_i)^n$$ which comes from the multinomial expansion. I was ...
2018/07/26
[ "https://math.stackexchange.com/questions/2863587", "https://math.stackexchange.com", "https://math.stackexchange.com/users/376930/" ]
Starting from Hamed's answer, we can give a quick proof that $\sum\_{Q\ge 0} Qf(Q)$ equals what you think it is. They proved $$ \sum\_{n\ge 0}\sum\_{q\ge 0}\frac1{n!}f\_n(Q)X^nY^q = \exp\Big(\sum\_{m=0}^k x\_mXY^m\Big) $$ Differentiating both sides with respect to $Y$, and then multiplying by $Y$, you get $$ \sum\_{n\g...
I'm going to provide a secondary generating function which is probably more relevant to your updated question. Let's recall your definition, $$ f(Q):=\sum\_{\substack{\sum\_{i=0}^k n\_i=n \\ n\_0,\ldots,n\_k \ \geq0 \\\sum\_{j=0}^kjn\_j=Q}} \binom{n}{n\_0,\cdots,n\_k}x\_{0}^{n\_0}\ldots x\_{k}^{n\_k} $$ and let us calc...
53,022,575
I'm trying to write a regex in php to split the string to array. The string is ``` #000000 | Black #ffffff | White #ff0000 | Red ``` there can or cannot be space between the character and ``` | ``` so the regex needs to work with ``` #000000|Black #ffffff|White #ff0000|Red ``` For the second type of string ...
2018/10/27
[ "https://Stackoverflow.com/questions/53022575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10519464/" ]
From <https://firebase.google.com/docs/android/setup> it looks like 16.0.4 is latest version ``` com.google.firebase:firebase-core:16.0.4 ```
@Johns solution did not work for us as we ran into another known issue with that version (see <https://developers.google.com/android/guides/releases>) What worked for us is to use the alias of firebase-core: change `com.google.firebase:firebase-core:16.0.4` to ``` com.google.firebase:firebase-analytics:16.0.5 ```
67,122,003
> > **Task:** According to the Taylor Series of sin(x) calculate with using a double function named **mysin** pass it to a double variable. Take a x value from user and use the mysin function to calculate sin(x). > > > [![Sin()x Tyler Series Formula](https://i.stack.imgur.com/elqSV.png)](https://i.stack.imgur.com/el...
2021/04/16
[ "https://Stackoverflow.com/questions/67122003", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14886767/" ]
The problem is that you're multiplying by `neg_pos` each step, which toggles between +1 and -1. That means the terms change sign only half the time, whereas they should change sign each time. The fix is to just multiply by -1 each time rather than `neg_pos`. Here's a working, slightly-simplified form of your program ...
From what I'm understanding you are not calculating the power correctly Firtsly use this: ``` #include <math.h> ``` Then create a factorial function: ``` int factorial(int x){ int result = 1; for(int i = 1; i < x; i++){ result += result * i; } return result; } ``` And finally: ``` while(1) { ...
1,399,204
Please help in Solving the Trigonometric Equation: $$\cos^2x - \sin^2x = \cos3x$$
2015/08/16
[ "https://math.stackexchange.com/questions/1399204", "https://math.stackexchange.com", "https://math.stackexchange.com/users/262417/" ]
$$\begin{align\*} \cos^2x-\sin^2x &= \cos3x\\ \cos2x &= \cos3x\\ 2x &= 2\pi n\pm 3x\\ x &= 2\pi n \text{ or } x=\frac{2\pi n}{5} \end{align\*}$$ where $n\in\mathbb Z$. @ThomasAndrews: The second case includes the first case. $2\pi n=\frac{2\pi(5n)}5$.
**Hint:** Use the trigonometry identity for the $\cos 2\theta$.
1,399,204
Please help in Solving the Trigonometric Equation: $$\cos^2x - \sin^2x = \cos3x$$
2015/08/16
[ "https://math.stackexchange.com/questions/1399204", "https://math.stackexchange.com", "https://math.stackexchange.com/users/262417/" ]
$$ \cos 3x=\cos x \cos x - \sin x \sin x= \cos 2x, $$ which is equivalent to $$ 3x\pm 2x = 2k\pi $$ for some integer $k$.
**Hint:** Use the trigonometry identity for the $\cos 2\theta$.
1,399,204
Please help in Solving the Trigonometric Equation: $$\cos^2x - \sin^2x = \cos3x$$
2015/08/16
[ "https://math.stackexchange.com/questions/1399204", "https://math.stackexchange.com", "https://math.stackexchange.com/users/262417/" ]
$$\begin{align\*} \cos^2x-\sin^2x &= \cos3x\\ \cos2x &= \cos3x\\ 2x &= 2\pi n\pm 3x\\ x &= 2\pi n \text{ or } x=\frac{2\pi n}{5} \end{align\*}$$ where $n\in\mathbb Z$. @ThomasAndrews: The second case includes the first case. $2\pi n=\frac{2\pi(5n)}5$.
$$\cos^2 x-\sin^2 x = \cos 3x$$ Now Using the formula $\cos2x = \cos^2 x-\sin^2 x$ So $$\cos 2x = \cos 3x\Rightarrow \cos3x = \cos 2x\Rightarrow 3x = 2n\pi\pm 2x$$ Where $n\in \mathbb{Z}\;,$ above we have used the formula $$\cos x = \cos \alpha \;,$$ Then $x=2n\pi\pm \alpha\;,$ Where $n\in \mathbb{Z}$ So Solutions ...
1,399,204
Please help in Solving the Trigonometric Equation: $$\cos^2x - \sin^2x = \cos3x$$
2015/08/16
[ "https://math.stackexchange.com/questions/1399204", "https://math.stackexchange.com", "https://math.stackexchange.com/users/262417/" ]
$$\begin{align\*} \cos^2x-\sin^2x &= \cos3x\\ \cos2x &= \cos3x\\ 2x &= 2\pi n\pm 3x\\ x &= 2\pi n \text{ or } x=\frac{2\pi n}{5} \end{align\*}$$ where $n\in\mathbb Z$. @ThomasAndrews: The second case includes the first case. $2\pi n=\frac{2\pi(5n)}5$.
$$ \cos 3x=\cos x \cos x - \sin x \sin x= \cos 2x, $$ which is equivalent to $$ 3x\pm 2x = 2k\pi $$ for some integer $k$.
1,399,204
Please help in Solving the Trigonometric Equation: $$\cos^2x - \sin^2x = \cos3x$$
2015/08/16
[ "https://math.stackexchange.com/questions/1399204", "https://math.stackexchange.com", "https://math.stackexchange.com/users/262417/" ]
$$\begin{align\*} \cos^2x-\sin^2x &= \cos3x\\ \cos2x &= \cos3x\\ 2x &= 2\pi n\pm 3x\\ x &= 2\pi n \text{ or } x=\frac{2\pi n}{5} \end{align\*}$$ where $n\in\mathbb Z$. @ThomasAndrews: The second case includes the first case. $2\pi n=\frac{2\pi(5n)}5$.
As others have mentioned you should be after the roots of $\cos(3x)-\cos(2x)=0$. To continue from here you may use the identity $\cos \theta-\cos \alpha=-2\sin\frac{\theta-\alpha}{2}\sin\frac{\theta+\alpha}{2}$, i.e. $$\cos(3x)-\cos(2x)=-2\sin\frac{5x}{2}\sin\frac{x}{2}$$
1,399,204
Please help in Solving the Trigonometric Equation: $$\cos^2x - \sin^2x = \cos3x$$
2015/08/16
[ "https://math.stackexchange.com/questions/1399204", "https://math.stackexchange.com", "https://math.stackexchange.com/users/262417/" ]
$$ \cos 3x=\cos x \cos x - \sin x \sin x= \cos 2x, $$ which is equivalent to $$ 3x\pm 2x = 2k\pi $$ for some integer $k$.
$$\cos^2 x-\sin^2 x = \cos 3x$$ Now Using the formula $\cos2x = \cos^2 x-\sin^2 x$ So $$\cos 2x = \cos 3x\Rightarrow \cos3x = \cos 2x\Rightarrow 3x = 2n\pi\pm 2x$$ Where $n\in \mathbb{Z}\;,$ above we have used the formula $$\cos x = \cos \alpha \;,$$ Then $x=2n\pi\pm \alpha\;,$ Where $n\in \mathbb{Z}$ So Solutions ...
1,399,204
Please help in Solving the Trigonometric Equation: $$\cos^2x - \sin^2x = \cos3x$$
2015/08/16
[ "https://math.stackexchange.com/questions/1399204", "https://math.stackexchange.com", "https://math.stackexchange.com/users/262417/" ]
$$ \cos 3x=\cos x \cos x - \sin x \sin x= \cos 2x, $$ which is equivalent to $$ 3x\pm 2x = 2k\pi $$ for some integer $k$.
As others have mentioned you should be after the roots of $\cos(3x)-\cos(2x)=0$. To continue from here you may use the identity $\cos \theta-\cos \alpha=-2\sin\frac{\theta-\alpha}{2}\sin\frac{\theta+\alpha}{2}$, i.e. $$\cos(3x)-\cos(2x)=-2\sin\frac{5x}{2}\sin\frac{x}{2}$$
4,642,372
Working over the real line, I am interested in the integral of the form $$ I := \int\_a^b dx \int\_a^x dy f(y) \delta'(y), $$ where $a < 0 < b < \infty$, $f$ is some smooth test function with compact support such that $(a,b) \subset supp(f)$, and $\delta$ is the usual Dirac delta "function". At first, when attempting ...
2023/02/19
[ "https://math.stackexchange.com/questions/4642372", "https://math.stackexchange.com", "https://math.stackexchange.com/users/604598/" ]
To expand a first-order theory to a second-order theory conservatively (i.e. without adding new first-order definable sets) you have to add a sort for every "definition-scheme". I.e. a sort for every partitioned formula $\varphi(x;y)$. The canonical expansion of a first-order structure $M$ has, beside the domain of th...
**Attempt** (*community wiki*): Note that for 2. I've been sloppy in declaring that $\mathfrak{F} \subseteq \mathcal{P}(\mathfrak{M})$ because the Tarskian semantics for multi-sorted logic don't require that. In general $\mathfrak{F}$ could be any set. However, my understanding is that one can assume without loss of ...
47,486
I have a friction damping system which is exited by a harmonic force FE (depicted on the left side). Is there a way to convert the friction damper to a linear or nonlinear damper, such that the damping at a given excitement frequency is equal? I am only considering sliding friction. A reasonable approximation would b...
2021/09/29
[ "https://engineering.stackexchange.com/questions/47486", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/25247/" ]
The problem when trying to replace coulomb damping (friction) with viscous damping is that it produces a relatively constant force ($- \mu \cdot N$). (the sign is opposite to the sign of the velocity). Viscous damping on the other hand is proportional to the velocity. $c\cdot \dot{x}$. Therefore, its not always possi...
I think a hydraulic device could approximate it. General concept: For each direction: a spring-loaded check valve (ie with a cracking pressure) in series with a small-diameter-tube would realize a roughly constant pressure difference, as long as there is some very small flow (i.e. cylinder movement). This could then o...
47,486
I have a friction damping system which is exited by a harmonic force FE (depicted on the left side). Is there a way to convert the friction damper to a linear or nonlinear damper, such that the damping at a given excitement frequency is equal? I am only considering sliding friction. A reasonable approximation would b...
2021/09/29
[ "https://engineering.stackexchange.com/questions/47486", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/25247/" ]
In general this is impossible, because for a given value of $F\_e$, the friction damper dissipates a fixed amount of energy per cycle of vibration *independent of the vibration frequency.* This is (nonlinear) *hysteretic* damping, not (nonlinear) *viscous* damping. The only way to approximate this with a viscous damp...
The problem when trying to replace coulomb damping (friction) with viscous damping is that it produces a relatively constant force ($- \mu \cdot N$). (the sign is opposite to the sign of the velocity). Viscous damping on the other hand is proportional to the velocity. $c\cdot \dot{x}$. Therefore, its not always possi...
47,486
I have a friction damping system which is exited by a harmonic force FE (depicted on the left side). Is there a way to convert the friction damper to a linear or nonlinear damper, such that the damping at a given excitement frequency is equal? I am only considering sliding friction. A reasonable approximation would b...
2021/09/29
[ "https://engineering.stackexchange.com/questions/47486", "https://engineering.stackexchange.com", "https://engineering.stackexchange.com/users/25247/" ]
In general this is impossible, because for a given value of $F\_e$, the friction damper dissipates a fixed amount of energy per cycle of vibration *independent of the vibration frequency.* This is (nonlinear) *hysteretic* damping, not (nonlinear) *viscous* damping. The only way to approximate this with a viscous damp...
I think a hydraulic device could approximate it. General concept: For each direction: a spring-loaded check valve (ie with a cracking pressure) in series with a small-diameter-tube would realize a roughly constant pressure difference, as long as there is some very small flow (i.e. cylinder movement). This could then o...
43,621,532
I'm trying to release a Xamarin.Forms application, but when I change to release in the configuration for the Android project and build I get the following error: ``` Java.Interop.Tools.Diagnostics.XamarinAndroidException: error XA2006: Could not resolve reference to 'System.Int32 Xamarin.Forms.Platform.Resource/String...
2017/04/25
[ "https://Stackoverflow.com/questions/43621532", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
The same error message occurred with me. I was able to solve it like this: Right-click the **Android Project > Properties > Android Options > Linker**, and then choose the "None" option in the **Linking** property.
We suspect that there are some version conflicts between **Syncfusion/Xamarin.Forms assemblies** and we kindly request you to follow the below steps. 1. Update your **Essential Studio for Xamarin** to latest version **(15.1.0.41)** which can be downloaded from the following location. **Link:** <https://www.syncfusion...
7,581,534
The following linq ``` var subjectMarks = (from DataRow row in objDatatable.Rows select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ``` throws an exception since some `row["EXM_MARKS"]` has non numeric values like `AB` etc. How can I get the sum of only numeric ones out of them?
2011/09/28
[ "https://Stackoverflow.com/questions/7581534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769091/" ]
For linq to sql queries you can use built-in `SqlFunctions.IsNumeric` Source: [SqlFunctions.IsNumeric](https://learn.microsoft.com/en-us/dotnet/api/system.data.objects.sqlclient.sqlfunctions.isnumeric?view=netframework-4.7.2)
You can make some extensions utility class like this for elegant solution: ``` public static class TypeExtensions { public static bool IsValidDecimal(this string s) { decimal result; return Decimal.TryParse(s, out result); } } ``` and use it in this way: ``` var subjectMarks = (from Data...
7,581,534
The following linq ``` var subjectMarks = (from DataRow row in objDatatable.Rows select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ``` throws an exception since some `row["EXM_MARKS"]` has non numeric values like `AB` etc. How can I get the sum of only numeric ones out of them?
2011/09/28
[ "https://Stackoverflow.com/questions/7581534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769091/" ]
Add `where` clause that filters out the records that cannot be parsed as decimals. Try: ``` decimal dummy; var subjectMarks = (from DataRow row in objDatatable.Rows where decimal.TryParse(row["EXM_MARKS"], out dummy) select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ```
``` var subjectMarks = objDatatable.Rows.Where(row => row["EXM_MARKS"].ToString().All(char.isDigit)) ``` part of solution is getted in: [here](https://stackoverflow.com/questions/4524957/how-to-check-if-my-string-only-numeric)
7,581,534
The following linq ``` var subjectMarks = (from DataRow row in objDatatable.Rows select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ``` throws an exception since some `row["EXM_MARKS"]` has non numeric values like `AB` etc. How can I get the sum of only numeric ones out of them?
2011/09/28
[ "https://Stackoverflow.com/questions/7581534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769091/" ]
You can make some extensions utility class like this for elegant solution: ``` public static class TypeExtensions { public static bool IsValidDecimal(this string s) { decimal result; return Decimal.TryParse(s, out result); } } ``` and use it in this way: ``` var subjectMarks = (from Data...
``` var subjectMarks = objDatatable.Rows.Where(row => row["EXM_MARKS"].ToString().All(char.isDigit)) ``` part of solution is getted in: [here](https://stackoverflow.com/questions/4524957/how-to-check-if-my-string-only-numeric)
7,581,534
The following linq ``` var subjectMarks = (from DataRow row in objDatatable.Rows select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ``` throws an exception since some `row["EXM_MARKS"]` has non numeric values like `AB` etc. How can I get the sum of only numeric ones out of them?
2011/09/28
[ "https://Stackoverflow.com/questions/7581534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769091/" ]
Add `where` clause that filters out the records that cannot be parsed as decimals. Try: ``` decimal dummy; var subjectMarks = (from DataRow row in objDatatable.Rows where decimal.TryParse(row["EXM_MARKS"], out dummy) select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ```
For LINQ to SQL queries with Entity Framework Core, [`ISNUMERIC`](https://learn.microsoft.com/en-us/sql/t-sql/functions/isnumeric-transact-sql?view=sql-server-ver16) function is part of EF Core 6.0 under [EF.Functions](https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.sqlserverdbfunctionsextens...
7,581,534
The following linq ``` var subjectMarks = (from DataRow row in objDatatable.Rows select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ``` throws an exception since some `row["EXM_MARKS"]` has non numeric values like `AB` etc. How can I get the sum of only numeric ones out of them?
2011/09/28
[ "https://Stackoverflow.com/questions/7581534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769091/" ]
use ``` Decimal Z; var subjectMarks = (from DataRow row in objDatatable.Rows where Decimal.TryParse (row["EXM_MARKS"], out Z) select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ```
For LINQ to SQL queries with Entity Framework Core, [`ISNUMERIC`](https://learn.microsoft.com/en-us/sql/t-sql/functions/isnumeric-transact-sql?view=sql-server-ver16) function is part of EF Core 6.0 under [EF.Functions](https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.sqlserverdbfunctionsextens...
7,581,534
The following linq ``` var subjectMarks = (from DataRow row in objDatatable.Rows select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ``` throws an exception since some `row["EXM_MARKS"]` has non numeric values like `AB` etc. How can I get the sum of only numeric ones out of them?
2011/09/28
[ "https://Stackoverflow.com/questions/7581534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769091/" ]
For linq to sql queries you can use built-in `SqlFunctions.IsNumeric` Source: [SqlFunctions.IsNumeric](https://learn.microsoft.com/en-us/dotnet/api/system.data.objects.sqlclient.sqlfunctions.isnumeric?view=netframework-4.7.2)
use ``` Decimal Z; var subjectMarks = (from DataRow row in objDatatable.Rows where Decimal.TryParse (row["EXM_MARKS"], out Z) select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ```
7,581,534
The following linq ``` var subjectMarks = (from DataRow row in objDatatable.Rows select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ``` throws an exception since some `row["EXM_MARKS"]` has non numeric values like `AB` etc. How can I get the sum of only numeric ones out of them?
2011/09/28
[ "https://Stackoverflow.com/questions/7581534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769091/" ]
You could create an extension method `SafeConvertToDecimal` and use this in your LINQ query: ``` var subjectMarks = (from DataRow row in objDatatable.Rows select row["EXM_MARKS"].SafeConvertToDecimal()).Sum(); ``` This extension method would look like this: ``` public static decimal SafeConvertT...
``` var subjectMarks = objDatatable.Rows.Where(row => row["EXM_MARKS"].ToString().All(char.isDigit)) ``` part of solution is getted in: [here](https://stackoverflow.com/questions/4524957/how-to-check-if-my-string-only-numeric)
7,581,534
The following linq ``` var subjectMarks = (from DataRow row in objDatatable.Rows select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ``` throws an exception since some `row["EXM_MARKS"]` has non numeric values like `AB` etc. How can I get the sum of only numeric ones out of them?
2011/09/28
[ "https://Stackoverflow.com/questions/7581534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769091/" ]
Add `where` clause that filters out the records that cannot be parsed as decimals. Try: ``` decimal dummy; var subjectMarks = (from DataRow row in objDatatable.Rows where decimal.TryParse(row["EXM_MARKS"], out dummy) select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ```
You could create an extension method `SafeConvertToDecimal` and use this in your LINQ query: ``` var subjectMarks = (from DataRow row in objDatatable.Rows select row["EXM_MARKS"].SafeConvertToDecimal()).Sum(); ``` This extension method would look like this: ``` public static decimal SafeConvertT...
7,581,534
The following linq ``` var subjectMarks = (from DataRow row in objDatatable.Rows select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ``` throws an exception since some `row["EXM_MARKS"]` has non numeric values like `AB` etc. How can I get the sum of only numeric ones out of them?
2011/09/28
[ "https://Stackoverflow.com/questions/7581534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769091/" ]
You could create an extension method `SafeConvertToDecimal` and use this in your LINQ query: ``` var subjectMarks = (from DataRow row in objDatatable.Rows select row["EXM_MARKS"].SafeConvertToDecimal()).Sum(); ``` This extension method would look like this: ``` public static decimal SafeConvertT...
You can make some extensions utility class like this for elegant solution: ``` public static class TypeExtensions { public static bool IsValidDecimal(this string s) { decimal result; return Decimal.TryParse(s, out result); } } ``` and use it in this way: ``` var subjectMarks = (from Data...
7,581,534
The following linq ``` var subjectMarks = (from DataRow row in objDatatable.Rows select Convert.ToDecimal(row["EXM_MARKS"])).Sum(); ``` throws an exception since some `row["EXM_MARKS"]` has non numeric values like `AB` etc. How can I get the sum of only numeric ones out of them?
2011/09/28
[ "https://Stackoverflow.com/questions/7581534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/769091/" ]
For linq to sql queries you can use built-in `SqlFunctions.IsNumeric` Source: [SqlFunctions.IsNumeric](https://learn.microsoft.com/en-us/dotnet/api/system.data.objects.sqlclient.sqlfunctions.isnumeric?view=netframework-4.7.2)
For LINQ to SQL queries with Entity Framework Core, [`ISNUMERIC`](https://learn.microsoft.com/en-us/sql/t-sql/functions/isnumeric-transact-sql?view=sql-server-ver16) function is part of EF Core 6.0 under [EF.Functions](https://learn.microsoft.com/en-us/dotnet/api/microsoft.entityframeworkcore.sqlserverdbfunctionsextens...
53,124
What I understand of these two terms is that: Paratope is a portion of antibody that recognises and binds to specific antigen. Idiotype is an antigenic determinant of antibody formed of CDRs that have specificity for a particular epitope. Some authors call the antibodies recognising a particular epitope an idiotype. ...
2016/11/04
[ "https://biology.stackexchange.com/questions/53124", "https://biology.stackexchange.com", "https://biology.stackexchange.com/users/16460/" ]
I have read that the unique amino acid sequence of the VH and VL domains of a given antibody can function not only as an antigen-binding site but also as a set of antigenic determinants. the idiotypic determinants are generated by the confomation of the heavy- and light-chain variable region. Each individual antigenic ...
The following was a reply by an expert from assignmentexpert.com : > > Paratope is only the part of Ab that binds to the epitope of an antigen. But this does not mean that every amino acid in the CDR should bind to epitope – it is possible that only 1-2 AAs per CDR bind directly to epitope. > Therefore, paratope is ...
20,129,762
In Java 8 we have the class [Stream<T>](http://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html), which curiously have a method ``` Iterator<T> iterator() ``` So you would expect it to implement interface [Iterable<T>](http://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html), which requires ex...
2013/11/21
[ "https://Stackoverflow.com/questions/20129762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/938782/" ]
To convert a `Stream` to an `Iterable`, you can do ``` Stream<X> stream = null; Iterable<X> iterable = stream::iterator ``` To pass a `Stream` to a method that expects `Iterable`, ``` void foo(Iterable<X> iterable) ``` simply ``` foo(stream::iterator) ``` however it probably looks funny; it might be better t...
You can use a Stream in a `for` loop as follows: ``` Stream<T> stream = ...; for (T x : (Iterable<T>) stream::iterator) { ... } ``` (Run [this snippet here](http://ideone.com/45QSHu)) (This uses a Java 8 functional interface cast.) (This is covered in some of the comments above (e.g. [Aleksandr Dubinsky](http...
20,129,762
In Java 8 we have the class [Stream<T>](http://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html), which curiously have a method ``` Iterator<T> iterator() ``` So you would expect it to implement interface [Iterable<T>](http://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html), which requires ex...
2013/11/21
[ "https://Stackoverflow.com/questions/20129762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/938782/" ]
To convert a `Stream` to an `Iterable`, you can do ``` Stream<X> stream = null; Iterable<X> iterable = stream::iterator ``` To pass a `Stream` to a method that expects `Iterable`, ``` void foo(Iterable<X> iterable) ``` simply ``` foo(stream::iterator) ``` however it probably looks funny; it might be better t...
`Stream` does not implement `Iterable`. The general understanding of `Iterable` is anything that can be iterated upon, often again and again. `Stream` may not be replayable. The only workaround that I can think of, where an iterable based on a stream is replayable too, is to re-create the stream. I am using a `Supplie...
20,129,762
In Java 8 we have the class [Stream<T>](http://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html), which curiously have a method ``` Iterator<T> iterator() ``` So you would expect it to implement interface [Iterable<T>](http://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html), which requires ex...
2013/11/21
[ "https://Stackoverflow.com/questions/20129762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/938782/" ]
[kennytm described](https://stackoverflow.com/a/20130131/1188377) why it's unsafe to treat a `Stream` as an `Iterable`, and [Zhong Yu offered a workaround](https://stackoverflow.com/a/20130475/1188377) that permits using a `Stream` as in `Iterable`, albeit in an unsafe manner. It's possible to get the best of both worl...
`Stream` does not implement `Iterable`. The general understanding of `Iterable` is anything that can be iterated upon, often again and again. `Stream` may not be replayable. The only workaround that I can think of, where an iterable based on a stream is replayable too, is to re-create the stream. I am using a `Supplie...
20,129,762
In Java 8 we have the class [Stream<T>](http://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html), which curiously have a method ``` Iterator<T> iterator() ``` So you would expect it to implement interface [Iterable<T>](http://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html), which requires ex...
2013/11/21
[ "https://Stackoverflow.com/questions/20129762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/938782/" ]
Not perfect, but will work: ``` iterable = stream.collect(Collectors.toList()); ``` Not perfect because it will fetch all items from the stream and put them into that `List`, which is not exactly what `Iterable` and `Stream` are about. They are supposed to be [lazy](https://en.wikipedia.org/wiki/Lazy_loading).
You can iterate over all files in a folder using `Stream<Path>` like this: ``` Path path = Paths.get("..."); Stream<Path> files = Files.list(path); for (Iterator<Path> it = files.iterator(); it.hasNext(); ) { Object file = it.next(); // ... } ```
20,129,762
In Java 8 we have the class [Stream<T>](http://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html), which curiously have a method ``` Iterator<T> iterator() ``` So you would expect it to implement interface [Iterable<T>](http://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html), which requires ex...
2013/11/21
[ "https://Stackoverflow.com/questions/20129762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/938782/" ]
You can use a Stream in a `for` loop as follows: ``` Stream<T> stream = ...; for (T x : (Iterable<T>) stream::iterator) { ... } ``` (Run [this snippet here](http://ideone.com/45QSHu)) (This uses a Java 8 functional interface cast.) (This is covered in some of the comments above (e.g. [Aleksandr Dubinsky](http...
If you don't mind using third party libraries [cyclops-react](https://github.com/aol/cyclops-react) defines a Stream that implements both Stream and Iterable and is replayable too (solving the problem [kennytm described](https://stackoverflow.com/a/20130131/1188377)). ``` Stream<String> stream = ReactiveSeq.of("hello...
20,129,762
In Java 8 we have the class [Stream<T>](http://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html), which curiously have a method ``` Iterator<T> iterator() ``` So you would expect it to implement interface [Iterable<T>](http://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html), which requires ex...
2013/11/21
[ "https://Stackoverflow.com/questions/20129762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/938782/" ]
People have already asked the same [on the mailing list](http://mail.openjdk.java.net/pipermail/lambda-dev/2013-March/008876.html) ☺. The main reason is Iterable also has a re-iterable semantic, while Stream is not. > > I think the main reason is that `Iterable` implies reusability, whereas `Stream` is something that...
You can iterate over all files in a folder using `Stream<Path>` like this: ``` Path path = Paths.get("..."); Stream<Path> files = Files.list(path); for (Iterator<Path> it = files.iterator(); it.hasNext(); ) { Object file = it.next(); // ... } ```
20,129,762
In Java 8 we have the class [Stream<T>](http://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html), which curiously have a method ``` Iterator<T> iterator() ``` So you would expect it to implement interface [Iterable<T>](http://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html), which requires ex...
2013/11/21
[ "https://Stackoverflow.com/questions/20129762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/938782/" ]
To convert a `Stream` to an `Iterable`, you can do ``` Stream<X> stream = null; Iterable<X> iterable = stream::iterator ``` To pass a `Stream` to a method that expects `Iterable`, ``` void foo(Iterable<X> iterable) ``` simply ``` foo(stream::iterator) ``` however it probably looks funny; it might be better t...
If you don't mind using third party libraries [cyclops-react](https://github.com/aol/cyclops-react) defines a Stream that implements both Stream and Iterable and is replayable too (solving the problem [kennytm described](https://stackoverflow.com/a/20130131/1188377)). ``` Stream<String> stream = ReactiveSeq.of("hello...
20,129,762
In Java 8 we have the class [Stream<T>](http://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html), which curiously have a method ``` Iterator<T> iterator() ``` So you would expect it to implement interface [Iterable<T>](http://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html), which requires ex...
2013/11/21
[ "https://Stackoverflow.com/questions/20129762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/938782/" ]
`Stream` does not implement `Iterable`. The general understanding of `Iterable` is anything that can be iterated upon, often again and again. `Stream` may not be replayable. The only workaround that I can think of, where an iterable based on a stream is replayable too, is to re-create the stream. I am using a `Supplie...
You can iterate over all files in a folder using `Stream<Path>` like this: ``` Path path = Paths.get("..."); Stream<Path> files = Files.list(path); for (Iterator<Path> it = files.iterator(); it.hasNext(); ) { Object file = it.next(); // ... } ```
20,129,762
In Java 8 we have the class [Stream<T>](http://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html), which curiously have a method ``` Iterator<T> iterator() ``` So you would expect it to implement interface [Iterable<T>](http://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html), which requires ex...
2013/11/21
[ "https://Stackoverflow.com/questions/20129762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/938782/" ]
People have already asked the same [on the mailing list](http://mail.openjdk.java.net/pipermail/lambda-dev/2013-March/008876.html) ☺. The main reason is Iterable also has a re-iterable semantic, while Stream is not. > > I think the main reason is that `Iterable` implies reusability, whereas `Stream` is something that...
If you don't mind using third party libraries [cyclops-react](https://github.com/aol/cyclops-react) defines a Stream that implements both Stream and Iterable and is replayable too (solving the problem [kennytm described](https://stackoverflow.com/a/20130131/1188377)). ``` Stream<String> stream = ReactiveSeq.of("hello...
20,129,762
In Java 8 we have the class [Stream<T>](http://docs.oracle.com/javase/8/docs/api/java/util/stream/Stream.html), which curiously have a method ``` Iterator<T> iterator() ``` So you would expect it to implement interface [Iterable<T>](http://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html), which requires ex...
2013/11/21
[ "https://Stackoverflow.com/questions/20129762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/938782/" ]
People have already asked the same [on the mailing list](http://mail.openjdk.java.net/pipermail/lambda-dev/2013-March/008876.html) ☺. The main reason is Iterable also has a re-iterable semantic, while Stream is not. > > I think the main reason is that `Iterable` implies reusability, whereas `Stream` is something that...
`Stream` does not implement `Iterable`. The general understanding of `Iterable` is anything that can be iterated upon, often again and again. `Stream` may not be replayable. The only workaround that I can think of, where an iterable based on a stream is replayable too, is to re-create the stream. I am using a `Supplie...
15,470,452
I am using Avplayer to show video clips and when i go back (app in background) video stop. How can i keep playing the video? I have search about background task & background thread ,IOS only support music in background (Not video) <http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogr...
2013/03/18
[ "https://Stackoverflow.com/questions/15470452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647942/" ]
This method supports all the possibilities: * Screen locked by the user; * List item * Home button pressed; As long as you have an instance of AVPlayer running iOS prevents auto lock of the device. First you need to configure the application to support audio background from the Info.plist file adding in the UIBackgr...
If you are Playing video using WebView you can handle using javascript to play video on background. ``` strVideoHTML = @"<html><head><style>body.........</style></head> <body><div id=\"overlay\"><div id=\"youtubelogo1\"></div></div><div id=\"player\"></div> <script> var tag = document.createElement('script'); tag.src ...
15,470,452
I am using Avplayer to show video clips and when i go back (app in background) video stop. How can i keep playing the video? I have search about background task & background thread ,IOS only support music in background (Not video) <http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogr...
2013/03/18
[ "https://Stackoverflow.com/questions/15470452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647942/" ]
It is not possible to play background music/video using Avplayer. But it is possible using MPMoviePlayerViewController. I have done this in one of my app using this player & this app is run successfully to appstore.
In addition to fattomhk's response, here's what you can do to achieve video forwarding to the time it should be after your application comes in foreground: * Get `currentPlaybackTime` of playing video when go to background and store it in `lastPlayBackTime` * Store the time when application goes to background (in `use...
15,470,452
I am using Avplayer to show video clips and when i go back (app in background) video stop. How can i keep playing the video? I have search about background task & background thread ,IOS only support music in background (Not video) <http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogr...
2013/03/18
[ "https://Stackoverflow.com/questions/15470452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647942/" ]
Swift version for the accepted answer. In the delegate: ``` AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, error: nil) AVAudioSession.sharedInstance().setActive(true, error: nil) ``` In the view controller that controls AVPlayer ``` override func viewDidAppear(animated: Bool) { UIA...
If you are Playing video using WebView you can handle using javascript to play video on background. ``` strVideoHTML = @"<html><head><style>body.........</style></head> <body><div id=\"overlay\"><div id=\"youtubelogo1\"></div></div><div id=\"player\"></div> <script> var tag = document.createElement('script'); tag.src ...
15,470,452
I am using Avplayer to show video clips and when i go back (app in background) video stop. How can i keep playing the video? I have search about background task & background thread ,IOS only support music in background (Not video) <http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogr...
2013/03/18
[ "https://Stackoverflow.com/questions/15470452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647942/" ]
If you try to change the background mode: Sorry, App store wont approve it.[MPMoviePlayerViewController playback video after going to background for youtube](https://stackoverflow.com/questions/15389989/mpmovieplayerviewcontroller-playback-video-after-going-to-background-for-youtube) In my research, someone would take...
If you are Playing video using WebView you can handle using javascript to play video on background. ``` strVideoHTML = @"<html><head><style>body.........</style></head> <body><div id=\"overlay\"><div id=\"youtubelogo1\"></div></div><div id=\"player\"></div> <script> var tag = document.createElement('script'); tag.src ...
15,470,452
I am using Avplayer to show video clips and when i go back (app in background) video stop. How can i keep playing the video? I have search about background task & background thread ,IOS only support music in background (Not video) <http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogr...
2013/03/18
[ "https://Stackoverflow.com/questions/15470452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647942/" ]
Swift version for the accepted answer. In the delegate: ``` AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback, error: nil) AVAudioSession.sharedInstance().setActive(true, error: nil) ``` In the view controller that controls AVPlayer ``` override func viewDidAppear(animated: Bool) { UIA...
I'd like to add something that for some reason ended up being the culprit for me. I had used AVPlayer and background play for a long time without problems, but this one time I just couldn't get it to work. I found out that when you go background, the `rate` property of the `AVPlayer` sometimes seems to dip to 0.0 (i.e...
15,470,452
I am using Avplayer to show video clips and when i go back (app in background) video stop. How can i keep playing the video? I have search about background task & background thread ,IOS only support music in background (Not video) <http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogr...
2013/03/18
[ "https://Stackoverflow.com/questions/15470452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647942/" ]
This method supports all the possibilities: * Screen locked by the user; * List item * Home button pressed; As long as you have an instance of AVPlayer running iOS prevents auto lock of the device. First you need to configure the application to support audio background from the Info.plist file adding in the UIBackgr...
It is not possible to play background music/video using Avplayer. But it is possible using MPMoviePlayerViewController. I have done this in one of my app using this player & this app is run successfully to appstore.
15,470,452
I am using Avplayer to show video clips and when i go back (app in background) video stop. How can i keep playing the video? I have search about background task & background thread ,IOS only support music in background (Not video) <http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogr...
2013/03/18
[ "https://Stackoverflow.com/questions/15470452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647942/" ]
In addition to fattomhk's response, here's what you can do to achieve video forwarding to the time it should be after your application comes in foreground: * Get `currentPlaybackTime` of playing video when go to background and store it in `lastPlayBackTime` * Store the time when application goes to background (in `use...
If you are Playing video using WebView you can handle using javascript to play video on background. ``` strVideoHTML = @"<html><head><style>body.........</style></head> <body><div id=\"overlay\"><div id=\"youtubelogo1\"></div></div><div id=\"player\"></div> <script> var tag = document.createElement('script'); tag.src ...
15,470,452
I am using Avplayer to show video clips and when i go back (app in background) video stop. How can i keep playing the video? I have search about background task & background thread ,IOS only support music in background (Not video) <http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogr...
2013/03/18
[ "https://Stackoverflow.com/questions/15470452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647942/" ]
Try with this snippet, I've already integrated this with my app & it's being useful for me..hope this will work for you!! Follow the steps given below: * Add UIBackgroundModes in the APPNAME-Info.plist, with the selection App plays audio * Then add the AudioToolBox framework to the folder frameworks. * In the APPNAM...
I'd like to add something that for some reason ended up being the culprit for me. I had used AVPlayer and background play for a long time without problems, but this one time I just couldn't get it to work. I found out that when you go background, the `rate` property of the `AVPlayer` sometimes seems to dip to 0.0 (i.e...
15,470,452
I am using Avplayer to show video clips and when i go back (app in background) video stop. How can i keep playing the video? I have search about background task & background thread ,IOS only support music in background (Not video) <http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogr...
2013/03/18
[ "https://Stackoverflow.com/questions/15470452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647942/" ]
It is not possible to play background music/video using Avplayer. But it is possible using MPMoviePlayerViewController. I have done this in one of my app using this player & this app is run successfully to appstore.
If you are Playing video using WebView you can handle using javascript to play video on background. ``` strVideoHTML = @"<html><head><style>body.........</style></head> <body><div id=\"overlay\"><div id=\"youtubelogo1\"></div></div><div id=\"player\"></div> <script> var tag = document.createElement('script'); tag.src ...
15,470,452
I am using Avplayer to show video clips and when i go back (app in background) video stop. How can i keep playing the video? I have search about background task & background thread ,IOS only support music in background (Not video) <http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogr...
2013/03/18
[ "https://Stackoverflow.com/questions/15470452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647942/" ]
If you try to change the background mode: Sorry, App store wont approve it.[MPMoviePlayerViewController playback video after going to background for youtube](https://stackoverflow.com/questions/15389989/mpmovieplayerviewcontroller-playback-video-after-going-to-background-for-youtube) In my research, someone would take...
In addition to fattomhk's response, here's what you can do to achieve video forwarding to the time it should be after your application comes in foreground: * Get `currentPlaybackTime` of playing video when go to background and store it in `lastPlayBackTime` * Store the time when application goes to background (in `use...
48,421,109
I am having problem installing a custom plugin in Cordova. ``` plugman -d install --platform android --project platforms\android --plugin plugins\PrintName ``` error: ``` Cannot read property 'fail' of undefined TypeError: Cannot read property 'fail' of undefined at C:\...\AppData\Roaming\npm\node_modules\plugman\n...
2018/01/24
[ "https://Stackoverflow.com/questions/48421109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1268945/" ]
What I ended up having to do is uninstall plugman 2.0 ``` npm remove -g plugman ``` Then I install plugman version 1.5.1 ``` npm install -g plugman@1.5 ``` Then I could finally add plugins to the project.
Just add the full path for customized Cordova plugin
48,421,109
I am having problem installing a custom plugin in Cordova. ``` plugman -d install --platform android --project platforms\android --plugin plugins\PrintName ``` error: ``` Cannot read property 'fail' of undefined TypeError: Cannot read property 'fail' of undefined at C:\...\AppData\Roaming\npm\node_modules\plugman\n...
2018/01/24
[ "https://Stackoverflow.com/questions/48421109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1268945/" ]
You need to specify the full plugin path, not a relative path. e.g.: ``` plugman -d install --platform android --project platforms\android --plugin "\full_path\of_your\plugins\PrintName" ```
Just add the full path for customized Cordova plugin
546,205
I read various stats/biostats textbooks, including Casella and Lehmann's book chapter on regression. Most of time, the textbook will report a *p*-value for significance of the parameters after regressing against some model. Then there is a model selection procedure followed afterwards. However, those books will never ...
2021/09/27
[ "https://stats.stackexchange.com/questions/546205", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/79469/" ]
I can't say with 100% certainty, but I can give you my two cents. Let's start with the difference in philosophy between statistics (as practised in the books mentioned) and machine learning. The former is (usually, but not always) concerned with some sort of inference. There is usually a latent parameter, like the sam...
### Probability If you consider a really strict delineation of **probability** and statistics, the former is about mathematically describing how likely it is for an event to occur, or a proposition to be true. You can have a textbook or a course that is about probability, without entering the field of statistics at al...
546,205
I read various stats/biostats textbooks, including Casella and Lehmann's book chapter on regression. Most of time, the textbook will report a *p*-value for significance of the parameters after regressing against some model. Then there is a model selection procedure followed afterwards. However, those books will never ...
2021/09/27
[ "https://stats.stackexchange.com/questions/546205", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/79469/" ]
I can't say with 100% certainty, but I can give you my two cents. Let's start with the difference in philosophy between statistics (as practised in the books mentioned) and machine learning. The former is (usually, but not always) concerned with some sort of inference. There is usually a latent parameter, like the sam...
**Descriptive vs. predictive** In, say biology textbooks, the focus is on *describing* the relevant data; the sample mean was…, the p-value for this result is… etc. In machine learning texts, the focus is on producing models that can *generalize* beyond their training set; thus techniques like cross-validation are re...
546,205
I read various stats/biostats textbooks, including Casella and Lehmann's book chapter on regression. Most of time, the textbook will report a *p*-value for significance of the parameters after regressing against some model. Then there is a model selection procedure followed afterwards. However, those books will never ...
2021/09/27
[ "https://stats.stackexchange.com/questions/546205", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/79469/" ]
I can't say with 100% certainty, but I can give you my two cents. Let's start with the difference in philosophy between statistics (as practised in the books mentioned) and machine learning. The former is (usually, but not always) concerned with some sort of inference. There is usually a latent parameter, like the sam...
The main reason is that almost all book authors are in [inference statistics](https://en.wikipedia.org/wiki/Statistical_inference). In particular, bio statistics is heavy on this aspect. A lot of stats used in regulated industries, such as banking is guilty of this too. Question like "what caused this? Did this cause t...
546,205
I read various stats/biostats textbooks, including Casella and Lehmann's book chapter on regression. Most of time, the textbook will report a *p*-value for significance of the parameters after regressing against some model. Then there is a model selection procedure followed afterwards. However, those books will never ...
2021/09/27
[ "https://stats.stackexchange.com/questions/546205", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/79469/" ]
### Probability If you consider a really strict delineation of **probability** and statistics, the former is about mathematically describing how likely it is for an event to occur, or a proposition to be true. You can have a textbook or a course that is about probability, without entering the field of statistics at al...
**Descriptive vs. predictive** In, say biology textbooks, the focus is on *describing* the relevant data; the sample mean was…, the p-value for this result is… etc. In machine learning texts, the focus is on producing models that can *generalize* beyond their training set; thus techniques like cross-validation are re...
546,205
I read various stats/biostats textbooks, including Casella and Lehmann's book chapter on regression. Most of time, the textbook will report a *p*-value for significance of the parameters after regressing against some model. Then there is a model selection procedure followed afterwards. However, those books will never ...
2021/09/27
[ "https://stats.stackexchange.com/questions/546205", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/79469/" ]
The main reason is that almost all book authors are in [inference statistics](https://en.wikipedia.org/wiki/Statistical_inference). In particular, bio statistics is heavy on this aspect. A lot of stats used in regulated industries, such as banking is guilty of this too. Question like "what caused this? Did this cause t...
### Probability If you consider a really strict delineation of **probability** and statistics, the former is about mathematically describing how likely it is for an event to occur, or a proposition to be true. You can have a textbook or a course that is about probability, without entering the field of statistics at al...
546,205
I read various stats/biostats textbooks, including Casella and Lehmann's book chapter on regression. Most of time, the textbook will report a *p*-value for significance of the parameters after regressing against some model. Then there is a model selection procedure followed afterwards. However, those books will never ...
2021/09/27
[ "https://stats.stackexchange.com/questions/546205", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/79469/" ]
The main reason is that almost all book authors are in [inference statistics](https://en.wikipedia.org/wiki/Statistical_inference). In particular, bio statistics is heavy on this aspect. A lot of stats used in regulated industries, such as banking is guilty of this too. Question like "what caused this? Did this cause t...
**Descriptive vs. predictive** In, say biology textbooks, the focus is on *describing* the relevant data; the sample mean was…, the p-value for this result is… etc. In machine learning texts, the focus is on producing models that can *generalize* beyond their training set; thus techniques like cross-validation are re...
22,119,487
I need to implement a 1024bit math operations in C .I Implemented a simple BigInteger library where the integer is stored as an array "typedef INT UINT1024[400]" where each element represent one digit. It turned up to be so slow so i decided to implement the BigInteger using a 1024bit array of UINT64: "typedef UINT64 U...
2014/03/01
[ "https://Stackoverflow.com/questions/22119487", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2627770/" ]
You need to implement two functions for your UINT1024 class, multiply by integer and add integer. Then for each digit you convert, multiply the previous value by 10 and add the value of the digit.
Writing, debugging, defining test cases, and checking they do work right is a *huge* undertaking. Just get one of the packaged multiprecission arithmetic libraries, like [GMP](https://gmplib.org), perhaps though [NTL](http://www.shoup.net/ntl) or [CLN](http://www.ginac.de/CLN) for C++. There are other alternatives, tra...
22,119,487
I need to implement a 1024bit math operations in C .I Implemented a simple BigInteger library where the integer is stored as an array "typedef INT UINT1024[400]" where each element represent one digit. It turned up to be so slow so i decided to implement the BigInteger using a 1024bit array of UINT64: "typedef UINT64 U...
2014/03/01
[ "https://Stackoverflow.com/questions/22119487", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2627770/" ]
You need to implement two functions for your UINT1024 class, multiply by integer and add integer. Then for each digit you convert, multiply the previous value by 10 and add the value of the digit.
If you are doing this for your education, you should take the middle road between your two previous approaches. Put more than 1 bit into a leaf or digit, but do not use the full bit range of the integer type. The reason is that this may significantly simplify the multiplication operation if you can at first just accum...
4,259,334
Will XCode installer automatically update my old version or do I need to uninstall old one first? Sorry, sort of newbie to Mac development. Going fine with Xcode 3.2.4, but new version is out as of today.
2010/11/23
[ "https://Stackoverflow.com/questions/4259334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/483163/" ]
The new Xcode installer will normally overwrite the older version for you automatically
You don't need to uninstall the old XCode, it will update automatically.
4,259,334
Will XCode installer automatically update my old version or do I need to uninstall old one first? Sorry, sort of newbie to Mac development. Going fine with Xcode 3.2.4, but new version is out as of today.
2010/11/23
[ "https://Stackoverflow.com/questions/4259334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/483163/" ]
You don't need to uninstall the old XCode, it will update automatically.
Considering that Xcode now supports installing versions side-by-side, I would suggest installing Xcode 3.2.5 in a folder called Dev325 or something and try it out first just to make sure. It's unlikely you will experience a problem, but it has been known to happen. Then, once you have used 3.2.5 for awhile and are comf...
4,259,334
Will XCode installer automatically update my old version or do I need to uninstall old one first? Sorry, sort of newbie to Mac development. Going fine with Xcode 3.2.4, but new version is out as of today.
2010/11/23
[ "https://Stackoverflow.com/questions/4259334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/483163/" ]
You don't need to uninstall the old XCode, it will update automatically.
I would suggest to install side by side, however, to retain the ability to run 3.2.4 should anything happen. I just upgraded to 3.2.5 and my application does not run in the simulator anymore, giving out an error as follows: > > Detected an attempt to call a symbol > in system libraries that is not > present on the ...
4,259,334
Will XCode installer automatically update my old version or do I need to uninstall old one first? Sorry, sort of newbie to Mac development. Going fine with Xcode 3.2.4, but new version is out as of today.
2010/11/23
[ "https://Stackoverflow.com/questions/4259334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/483163/" ]
The new Xcode installer will normally overwrite the older version for you automatically
Considering that Xcode now supports installing versions side-by-side, I would suggest installing Xcode 3.2.5 in a folder called Dev325 or something and try it out first just to make sure. It's unlikely you will experience a problem, but it has been known to happen. Then, once you have used 3.2.5 for awhile and are comf...
4,259,334
Will XCode installer automatically update my old version or do I need to uninstall old one first? Sorry, sort of newbie to Mac development. Going fine with Xcode 3.2.4, but new version is out as of today.
2010/11/23
[ "https://Stackoverflow.com/questions/4259334", "https://Stackoverflow.com", "https://Stackoverflow.com/users/483163/" ]
The new Xcode installer will normally overwrite the older version for you automatically
I would suggest to install side by side, however, to retain the ability to run 3.2.4 should anything happen. I just upgraded to 3.2.5 and my application does not run in the simulator anymore, giving out an error as follows: > > Detected an attempt to call a symbol > in system libraries that is not > present on the ...
3,321,511
Prove that the area bounded by the curve $y=\tanh x$ and the straight line $y=1$, between $x=0$ and $x=\infty$ is $\ln 2$ $\int^\infty \_0 (1-\tanh x) \mathrm{dx}= \biggr[x-\ln (\cosh x)\biggr]^\infty\_0\\\infty - \ln(\cosh \infty)+1$ How do I get $\ln 2$ because the line and curve intersect at infinity?
2019/08/12
[ "https://math.stackexchange.com/questions/3321511", "https://math.stackexchange.com", "https://math.stackexchange.com/users/455866/" ]
You need to evaluate the limit $$\lim\_{x\rightarrow \infty} (x - \ln(\cosh(x)))$$ Note that $$e^{\ln(\cosh(x)) -x} = e^{-x} \cosh(x) = \frac{1}{2}(1 + e^{-2x})\rightarrow \frac{1}{2}$$ Therefore $$\lim\_{x\rightarrow \infty} (x - \ln(\cosh(x))) = -\ln(1/2) = \ln(2)$$ Hence $$\int\_0^\infty (1-\tanh(x))dx = \lim\_{y...
Well, when you get the antiderivative, you can put in the limits and get $ \begin{array}{l} \lim\limits \_{x\rightarrow \infty }[ x-ln( cosh( x))] =\lim\limits \_{x\rightarrow \infty }\left[\frac{( x+ln( cosh( x)))( x-ln( cosh( x)))}{( x+ln( cosh( x)))}\right] =\lim\limits \_{x\rightarrow \infty }\left[\frac{x^{2} -ln...
6,454,460
I am using Oracle and I have modified code on some triggers and a package. When I run the script file which modifies the code and try to do an update on a table (which fires the trigger) I am getting Existing State of Package discarded I am getting a bunch of error ``` ORA-04068: ORA-04061: ORA-04065: ORA-06512:--Tri...
2011/06/23
[ "https://Stackoverflow.com/questions/6454460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/529866/" ]
serially\_reusable only makes sense for constant package variables. There is only one way to avoid this error and maintain performance (reset\_package is really not a good option). Avoid any package level variables in your PL/SQL packages. Your Oracle's server memory is not the right place to store state. If somethin...
Your script is more than likely caching out-dated code. So, from Michael Pakhanstovs link you can run ``` DBMS_SESSION.RESET_PACKAGE ``` at the beginning of your script or use ``` PRAGMA SERIALLY_REUSABLE; ``` in your script. Note however the implications of both: <http://download.oracle.com/docs/cd/B13789_...
6,454,460
I am using Oracle and I have modified code on some triggers and a package. When I run the script file which modifies the code and try to do an update on a table (which fires the trigger) I am getting Existing State of Package discarded I am getting a bunch of error ``` ORA-04068: ORA-04061: ORA-04065: ORA-06512:--Tri...
2011/06/23
[ "https://Stackoverflow.com/questions/6454460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/529866/" ]
Your script is more than likely caching out-dated code. So, from Michael Pakhanstovs link you can run ``` DBMS_SESSION.RESET_PACKAGE ``` at the beginning of your script or use ``` PRAGMA SERIALLY_REUSABLE; ``` in your script. Note however the implications of both: <http://download.oracle.com/docs/cd/B13789_...
I had the same problem. My situation was that I wrote a dynamic creation script for a package, then in the next script line call the procedure from the package. I think you're in the same situation. The problem I detected was that the timestamp for the package generation was identical to the timestamp of the procedur...
6,454,460
I am using Oracle and I have modified code on some triggers and a package. When I run the script file which modifies the code and try to do an update on a table (which fires the trigger) I am getting Existing State of Package discarded I am getting a bunch of error ``` ORA-04068: ORA-04061: ORA-04065: ORA-06512:--Tri...
2011/06/23
[ "https://Stackoverflow.com/questions/6454460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/529866/" ]
serially\_reusable only makes sense for constant package variables. There is only one way to avoid this error and maintain performance (reset\_package is really not a good option). Avoid any package level variables in your PL/SQL packages. Your Oracle's server memory is not the right place to store state. If somethin...
I had the same problem. My situation was that I wrote a dynamic creation script for a package, then in the next script line call the procedure from the package. I think you're in the same situation. The problem I detected was that the timestamp for the package generation was identical to the timestamp of the procedur...
38,664,135
I need to make a function which will add to the beginning date 3 days and if it's 3 then it shows alert. ``` $beginDate = 2016-07-29 17:14:43 (this one is from sql table format) $dateNow = date now if $beginDate + 3 days (72h) is >= $dateNow then echo "It's been three days from..." ``` It seems to be simple but I h...
2016/07/29
[ "https://Stackoverflow.com/questions/38664135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4591630/" ]
you can try Smaf.tv, the free cross-platform JS SDK and command line tool, with which you can build and package TV apps with one code base for LG WebOS, Samsung Smart TV (Orsay) & Tizen, Android TV and Amazon Fire TV. Disclaimer: I am part of the Smaf.tv team, but honestly I believe it fits your objective
If you already have an Android app, then it technically should already work with Android TV. There are a few [TV-specific things](https://developer.android.com/training/tv/start/start.html) you can do: * Declare a Leanback Launcher intent. Add this to your main activity in the manifest: ``` <intent-filter> <actio...
66,986,409
In my `df` below, I want to : 1. identify and flag the outliers in `col_E` using z-scores 2. separately explain how to identify and flag the outliers using z-scores in two or more columns, for example `col_D` & `col_E` See below for the dataset ``` import pandas as pd from scipy import stats # intialise data of lis...
2021/04/07
[ "https://Stackoverflow.com/questions/66986409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14488413/" ]
I assume the following meanings to demonstrate a broader range of usage. * Q1 stands for calculating a single column * Q2 stands for calculating over multiple columns pooled together. If Q2 is meant to calculated on multiple columns separately, then you can simply loop your Q1 solution over multiple columns, which sh...
Based on this [answer](https://stackoverflow.com/questions/52528568/using-dataframes-style-apply-for-highlighting-based-on-comparative-values), just pass the condition of the score to a dict storing the background color of each column index. ``` include_cols = ['col_D', 'col_E'] def color_outliers_yellow(row, include...
41,590,518
I'd like to return the rows which qualify to a certain condition. I can do this for a single row, but I need this for multiple rows combined. For example 'light green' qualifies to 'XYZ' being positive and 'total' > 10, where 'Red' does not. When I combine a neighbouring row or rows, it does => 'dark green'. Can I achi...
2017/01/11
[ "https://Stackoverflow.com/questions/41590518", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7168104/" ]
Here's a try. You would maybe want to use `rolling` or `expanding` (for speed and elegance) instead of explicitly looping with `range`, but I did it that way so as to be able to print out the rows being used to calculate each boolean. ``` df = df[['X','Y','Z']] # remove the "total" column in order ...
I am not too sure if I understood your question correctly, but if you are looking to put multiple conditions within a dataframe, you can consider this approach: `new_df = df[(df["X"] > 0) & (df["Y"] < 0)]` The `&` condition is for AND, while replacing that with `|` is for OR condition. Do remember to put the differen...
14,898,987
I have an MySQL statement that performs an inner `SELECT` and returns the result as a pseudo column. I’d like to use the result of this pseudo column in my `WHERE` clause. My current SQL statement looks like this: ``` SELECT product.product_id, product.range_id, product.title, product.image, produc...
2013/02/15
[ "https://Stackoverflow.com/questions/14898987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/102205/" ]
The `WHERE` clause is evaluated before the `SELECT` clause, so it doesn't say the alias name. You have to do the filter by the `WHERE` clause in an outer query like this: ``` SELECT * FROM ( SELECT product.product_id, product.range_id, product.title, product.image, product.i...
Try using a variable: ``` @price:= (SELECT price_now FROM product_bedding_sizes AS size WHERE size.product_id = product.product_id ORDER BY size.price_now ASC LIMIT 1) AS price; ``` Then reference it as ``` WHERE @price > 9000; ```
14,898,987
I have an MySQL statement that performs an inner `SELECT` and returns the result as a pseudo column. I’d like to use the result of this pseudo column in my `WHERE` clause. My current SQL statement looks like this: ``` SELECT product.product_id, product.range_id, product.title, product.image, produc...
2013/02/15
[ "https://Stackoverflow.com/questions/14898987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/102205/" ]
The `WHERE` clause is evaluated before the `SELECT` clause, so it doesn't say the alias name. You have to do the filter by the `WHERE` clause in an outer query like this: ``` SELECT * FROM ( SELECT product.product_id, product.range_id, product.title, product.image, product.i...
if you have ``` WHERE price > 0 AND price` <= 199` ``` in your where clause then try do this with HAVING clause like that ``` $HAVING //-- where $having = HAVING price > 0 AND price <= 199 ```
52,989,218
I have a one dimensional array of objects and each object has an id and an id of its parent. In the initial array I have each element can have at most one child. So if the array looks like this: ``` {id: 3, parent: 5}, {id: 5, parent: null}, {id: 6, parent: 3}, {id: 1, parent: null}, {id: 4, parent: 7}, {id: 2, parent...
2018/10/25
[ "https://Stackoverflow.com/questions/52989218", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3007853/" ]
For me, I ended up just editing the snippet itself. I'm sure I will need to do this every time there is an update and I'm not sure of a better permanent fix outside of creating a user-defined snippet. My quick and dirty fix was to edit the file... > > %USERPROFILE%.vscode\extensions\ms-dotnettools.csharp-1.23.8\snip...
You can tell the snippet if the using statement for system is not already on the page to add it. Include the following **after** the open tag `<snippet>` and **before** opening `<declarations>` tag. ``` <Imports> <Import> <Namespace>System</Namespace> </Import> </Imports> ``` For Reference to add mor...
8,531,269
How to Create a `View` with all days in year. `view` should fill with dates from JAN-01 to Dec-31. How can I do this in Oracle ? If current year have 365 days,`view` should have 365 rows with dates. if current year have 366 days,`view` should have 366 rows with dates. I want the `view` to have a single column of type ...
2011/12/16
[ "https://Stackoverflow.com/questions/8531269", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1029088/" ]
This simple view will do it: ``` create or replace view year_days as select trunc(sysdate, 'YYYY') + (level-1) as the_day from dual connect by level <= to_number(to_char(last_day(add_months(trunc(sysdate, 'YYYY'),11)), 'DDD')) / ``` Like this: ``` SQL> select * from year_days; THE_DAY --------- 01-JAN-11 02-JAN-11...
you can use piplined table, it should be something like this: ``` create or replace type year_date_typ as object (v_day date); create or replace type year_date_tab as table of year_date_typ; CREATE OR REPLACE FUNCTION get_dates(year IN VARCHAR2) RETURN year_date_tab PIPELINED IS v_start_date date := to_date('0101' ||...
8,531,269
How to Create a `View` with all days in year. `view` should fill with dates from JAN-01 to Dec-31. How can I do this in Oracle ? If current year have 365 days,`view` should have 365 rows with dates. if current year have 366 days,`view` should have 366 rows with dates. I want the `view` to have a single column of type ...
2011/12/16
[ "https://Stackoverflow.com/questions/8531269", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1029088/" ]
This simple view will do it: ``` create or replace view year_days as select trunc(sysdate, 'YYYY') + (level-1) as the_day from dual connect by level <= to_number(to_char(last_day(add_months(trunc(sysdate, 'YYYY'),11)), 'DDD')) / ``` Like this: ``` SQL> select * from year_days; THE_DAY --------- 01-JAN-11 02-JAN-11...
This works well in MS SQL ``` SELECT TOP (DATEDIFF(day, DATEADD(yy, DATEDIFF(yy,0,getdate()), 0), DATEADD(yy, DATEDIFF(yy,0,getdate()) + 1, -1))) n = ROW_NUMBER() OVER (ORDER BY [object_id]), dateadd(day, ROW_NUMBER() OVER (ORDER BY [object_id]) - 1, DATEADD(yy, DATEDIFF(yy,0,getdate()), 0)) AS AsOfDate FROM sys.a...
218,076
Is an infinite topological direct sum of amenable Banach algebras amenable again? Can you give me a good reference about this notion? Thanks
2015/09/11
[ "https://mathoverflow.net/questions/218076", "https://mathoverflow.net", "https://mathoverflow.net/users/27066/" ]
The OP has now clarified that he or she is asking about $c\_0$-direct sums. To answer the question we need the notion of the amenability constant of a Banach algebra. Everything that follows is probably "folklore", in the sense that (i) Johnson knew how to do it in 1972 but, due to the different culture at the time of...
**No.** $\left(\bigoplus\_{n=1}^\infty M\_n(\mathbb{C}\right)\_{\ell\_\infty}$ is not amenable. Of course, for $\ell\_p$-sums with $p\in [1,\infty)$ it is even worse. Here already $\ell\_p$ regarded as an infinite sum of one-dimensional algebras is not amenable.
46,179,420
I need, to clear my chartViewers from a layout, but when I do, I can't delete the last widget. when I test the length of my layout, I get 0 but the widget is still here after update of the layout, as in the picture : [![enter image description here](https://i.stack.imgur.com/dG8xb.png)](https://i.stack.imgur.com/dG8x...
2017/09/12
[ "https://Stackoverflow.com/questions/46179420", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8264778/" ]
Here is a [link](http://blogs.adatis.co.uk/jonathoneveoconnor/post/Continuous-Integration-With-TeamCity-Automating-SSIS-Build-and-Deployment) that describes the auto-deployment of packages post check-in into SSISDB catalog. If you have SSIS 2012+ then that would be a way to go. Even if not you would need to modify the ...
Generally, In TFS there isn't a way to do that. Although we can use the [Checkin command](https://www.visualstudio.com/en-us/docs/tfvc/checkin-command) to check in the changes, but have to identify the changes first. The system will identify the changes and display in **Pending Changes** page. Then we can check in th...