qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
53,074,117
I am using the heatmap.js library with @asymmetrik/ngx-leaflet in an Angular project in order to display a heatmap of the user's locations. I use the bounds of the map to create a polygon and with it bring the aggregated count of the positions inside it. I am able to bring and display the data, but I would like for th...
2018/10/30
[ "https://Stackoverflow.com/questions/53074117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5425908/" ]
> > To my knowledge there is at least one case (return value optimization) where the compiler can alter the observable behavior of the program by avoiding the call to a copy constructor which has side effect. > > > These cases are explicitly specified by the standard, and unfortunately, cases like your case 2 are ...
Although it is possible to get a temporary lvalue without a name (see this [question](https://stackoverflow.com/questions/23566857/in-c11-how-can-i-get-a-temporary-lvalue-without-a-name)), that is not what is happening here. In case 2, `a` is not a temporary but a named lvalue, so no elison happens and copy constructo...
38,912,091
If I declare static const variable in header file like this: ``` static const int my_variable = 1; ``` and then include this header in more than one `.c` files, will compilator make new instance per each file or will be "smart" enough to see it is `const` and will make only one instance for all the files? I know I ...
2016/08/12
[ "https://Stackoverflow.com/questions/38912091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6290005/" ]
If you use address of that object - compiler surely creates one instance per each translation unit. If you use only value - it is probably smart enough to avoid creating of object at all - value will be inlined where need.
I guess it will make only one instance for all files. But you can verify it by calling it in different files and check its value
38,912,091
If I declare static const variable in header file like this: ``` static const int my_variable = 1; ``` and then include this header in more than one `.c` files, will compilator make new instance per each file or will be "smart" enough to see it is `const` and will make only one instance for all the files? I know I ...
2016/08/12
[ "https://Stackoverflow.com/questions/38912091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6290005/" ]
I answered this at length [here](https://stackoverflow.com/questions/3698043/static-variables-in-c/3698179#3698179). That answer is for C++, but it holds true for C as well. The translation unit is the individual source file. Each translation unit including your header will "see" a `static const int`. The `static`, in...
I guess it will make only one instance for all files. But you can verify it by calling it in different files and check its value
38,912,091
If I declare static const variable in header file like this: ``` static const int my_variable = 1; ``` and then include this header in more than one `.c` files, will compilator make new instance per each file or will be "smart" enough to see it is `const` and will make only one instance for all the files? I know I ...
2016/08/12
[ "https://Stackoverflow.com/questions/38912091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6290005/" ]
I answered this at length [here](https://stackoverflow.com/questions/3698043/static-variables-in-c/3698179#3698179). That answer is for C++, but it holds true for C as well. The translation unit is the individual source file. Each translation unit including your header will "see" a `static const int`. The `static`, in...
If you use address of that object - compiler surely creates one instance per each translation unit. If you use only value - it is probably smart enough to avoid creating of object at all - value will be inlined where need.
16,849,452
Alright, I'm trying to succinct some code in my app. It works fine, I'm just a bit OCD and want to keep improving performance. Here's what the code in question looks like now: ``` switch(ressound){ case R.id.button40: ressound = R.raw.sound40; soundname = (this.getString(R.string.a...
2013/05/31
[ "https://Stackoverflow.com/questions/16849452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2328381/" ]
You can use the [`chardet`](https://pypi.python.org/pypi/chardet) package. Read [this](http://getpython3.com/diveintopython3/case-study-porting-chardet-to-python-3.html) tutorial. --- If you are using Ubuntu: ``` sudo apt-get install python3-chardet ``` If you are using pip: ``` pip install chardet2 ```
Since you've entered it from the console, the encoding will be `sys.stdin.encoding` ``` >>> name = '深入 damon' >>> import sys >>> sys.stdin.encoding 'UTF-8' >>> b1 = name.decode(sys.stdin.encoding) >>> b1 u'\u6df1\u5165 damon' >>> b1.encode(sys.stdin.encoding) '\xe6\xb7\xb1\xe5\x85\xa5 damon' >>> print b1.encode(sys.st...
39,650,668
I'm doing a very simple react+redux application where I've a reducer called goals and a container called GoalsContainer. From App Container I call the action goal for load the initial goals from a local db(indexedDB) ``` dispatch(loadGoals(currentDate)); ``` This call the loadGoals from the goals actions: ``` expo...
2016/09/23
[ "https://Stackoverflow.com/questions/39650668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6867427/" ]
For jmx default credentials are admin:activemq <https://github.com/apache/activemq/blob/master/assembly/src/release/conf/jmx.password>
The default username/password are: admin/admin
4,715,073
in my website i set the url adress using ``` window.location.hash = 'project_name'; ``` but if i want to clean the adress url from any hashes (when i close a project) and i set ``` window.location.hash = ''; ``` it happens the page scrolls up to the top page there is any way to clean up the url without any side ...
2011/01/17
[ "https://Stackoverflow.com/questions/4715073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/282772/" ]
There's the `onhashchange` event, but it cannot be cancelled reliably across browsers to prevent scrolling. The best solution is to record the scroll position before changing the hash location and reset it afterwards. For example, the following code will catch a click on any link ― that doesn't stop propagation ― with ...
I was having the same problem and came here for an answer. Just found out there is a very easy way: ``` window.location.hash = ' '; ``` Basically you are setting it to '# ', since the space doesn't exist, it doesn't move. When you revisit the page, it also doesn't treat it any differently than just #
4,715,073
in my website i set the url adress using ``` window.location.hash = 'project_name'; ``` but if i want to clean the adress url from any hashes (when i close a project) and i set ``` window.location.hash = ''; ``` it happens the page scrolls up to the top page there is any way to clean up the url without any side ...
2011/01/17
[ "https://Stackoverflow.com/questions/4715073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/282772/" ]
There's the `onhashchange` event, but it cannot be cancelled reliably across browsers to prevent scrolling. The best solution is to record the scroll position before changing the hash location and reset it afterwards. For example, the following code will catch a click on any link ― that doesn't stop propagation ― with ...
First off, thanks for your solutions - @Andy-E and @JustMaier. However, I had a problem getting it to work based on Andy E's second code block in Firefox and JustMaier's code in chrome. So I did a mash up of those two code blocks and it works just as intended on both browsers ``` var scr = document.body.scrollTop; ...
4,715,073
in my website i set the url adress using ``` window.location.hash = 'project_name'; ``` but if i want to clean the adress url from any hashes (when i close a project) and i set ``` window.location.hash = ''; ``` it happens the page scrolls up to the top page there is any way to clean up the url without any side ...
2011/01/17
[ "https://Stackoverflow.com/questions/4715073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/282772/" ]
There's the `onhashchange` event, but it cannot be cancelled reliably across browsers to prevent scrolling. The best solution is to record the scroll position before changing the hash location and reset it afterwards. For example, the following code will catch a click on any link ― that doesn't stop propagation ― with ...
document.body.scrollTop [is deprecated](https://stackoverflow.com/questions/28633221/document-body-scrolltop-firefox-returns-0-only-js#answer-28633515), also latest Chrome versions seem to be unstable here. The following should work: ``` var topPos = window.pageYOffset || document.documentElement.scrollTop || docume...
4,715,073
in my website i set the url adress using ``` window.location.hash = 'project_name'; ``` but if i want to clean the adress url from any hashes (when i close a project) and i set ``` window.location.hash = ''; ``` it happens the page scrolls up to the top page there is any way to clean up the url without any side ...
2011/01/17
[ "https://Stackoverflow.com/questions/4715073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/282772/" ]
I was having the same problem and came here for an answer. Just found out there is a very easy way: ``` window.location.hash = ' '; ``` Basically you are setting it to '# ', since the space doesn't exist, it doesn't move. When you revisit the page, it also doesn't treat it any differently than just #
First off, thanks for your solutions - @Andy-E and @JustMaier. However, I had a problem getting it to work based on Andy E's second code block in Firefox and JustMaier's code in chrome. So I did a mash up of those two code blocks and it works just as intended on both browsers ``` var scr = document.body.scrollTop; ...
4,715,073
in my website i set the url adress using ``` window.location.hash = 'project_name'; ``` but if i want to clean the adress url from any hashes (when i close a project) and i set ``` window.location.hash = ''; ``` it happens the page scrolls up to the top page there is any way to clean up the url without any side ...
2011/01/17
[ "https://Stackoverflow.com/questions/4715073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/282772/" ]
I was having the same problem and came here for an answer. Just found out there is a very easy way: ``` window.location.hash = ' '; ``` Basically you are setting it to '# ', since the space doesn't exist, it doesn't move. When you revisit the page, it also doesn't treat it any differently than just #
document.body.scrollTop [is deprecated](https://stackoverflow.com/questions/28633221/document-body-scrolltop-firefox-returns-0-only-js#answer-28633515), also latest Chrome versions seem to be unstable here. The following should work: ``` var topPos = window.pageYOffset || document.documentElement.scrollTop || docume...
4,715,073
in my website i set the url adress using ``` window.location.hash = 'project_name'; ``` but if i want to clean the adress url from any hashes (when i close a project) and i set ``` window.location.hash = ''; ``` it happens the page scrolls up to the top page there is any way to clean up the url without any side ...
2011/01/17
[ "https://Stackoverflow.com/questions/4715073", "https://Stackoverflow.com", "https://Stackoverflow.com/users/282772/" ]
First off, thanks for your solutions - @Andy-E and @JustMaier. However, I had a problem getting it to work based on Andy E's second code block in Firefox and JustMaier's code in chrome. So I did a mash up of those two code blocks and it works just as intended on both browsers ``` var scr = document.body.scrollTop; ...
document.body.scrollTop [is deprecated](https://stackoverflow.com/questions/28633221/document-body-scrolltop-firefox-returns-0-only-js#answer-28633515), also latest Chrome versions seem to be unstable here. The following should work: ``` var topPos = window.pageYOffset || document.documentElement.scrollTop || docume...
398,397
I was thinking about how energy is harvested on Earth from movements of certain forces like wind and ocean currents. Could similar principles be applied in space? Satellites are virtually in perpetual motion when orbiting the Earth. Is there kinetic energy that can be extracted from this orbital motion and harvested f...
2018/04/07
[ "https://physics.stackexchange.com/questions/398397", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/191822/" ]
I do absolutely agree with @knzhou, but going to provide a couple of points here, more intuitive than scientific. A satellite can spin for quite a long time since the kinetic energy of it doesn't decrease significantly (it doesn't mean that the energy doesn't decrease *at all* - it does, and for that reason a satellit...
Energy is 'harvested' from satellites all the time. Air drag converts the satellite's energy into heat in the atmosphere. This is, of course, not a perpetual motion machine. The orbit of the satellite will get closer to Earth over time, until the satellite crashes back down, as the [Tiangong-1](https://en.wikipedia.org...
398,397
I was thinking about how energy is harvested on Earth from movements of certain forces like wind and ocean currents. Could similar principles be applied in space? Satellites are virtually in perpetual motion when orbiting the Earth. Is there kinetic energy that can be extracted from this orbital motion and harvested f...
2018/04/07
[ "https://physics.stackexchange.com/questions/398397", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/191822/" ]
Energy is 'harvested' from satellites all the time. Air drag converts the satellite's energy into heat in the atmosphere. This is, of course, not a perpetual motion machine. The orbit of the satellite will get closer to Earth over time, until the satellite crashes back down, as the [Tiangong-1](https://en.wikipedia.org...
What knzhou and nicael said is absolutely true, you cannot extract from the satellite itself more energy of that you have put in it when you launch it in orbit. Maybe you're interested in knowing how that energy could be extract, and I think that a [space tether](https://en.m.wikipedia.org/wiki/Space_tether) could be ...
398,397
I was thinking about how energy is harvested on Earth from movements of certain forces like wind and ocean currents. Could similar principles be applied in space? Satellites are virtually in perpetual motion when orbiting the Earth. Is there kinetic energy that can be extracted from this orbital motion and harvested f...
2018/04/07
[ "https://physics.stackexchange.com/questions/398397", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/191822/" ]
Energy is 'harvested' from satellites all the time. Air drag converts the satellite's energy into heat in the atmosphere. This is, of course, not a perpetual motion machine. The orbit of the satellite will get closer to Earth over time, until the satellite crashes back down, as the [Tiangong-1](https://en.wikipedia.org...
The energy conservation discussed by [knzhou](https://physics.stackexchange.com/a/398398/26076) and [nicael](https://physics.stackexchange.com/a/398404/26076) render the idea of harvesting energy from artificial satellites non useful. However, energy is usefully and routinely harvested from natural satellites of the S...
398,397
I was thinking about how energy is harvested on Earth from movements of certain forces like wind and ocean currents. Could similar principles be applied in space? Satellites are virtually in perpetual motion when orbiting the Earth. Is there kinetic energy that can be extracted from this orbital motion and harvested f...
2018/04/07
[ "https://physics.stackexchange.com/questions/398397", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/191822/" ]
I do absolutely agree with @knzhou, but going to provide a couple of points here, more intuitive than scientific. A satellite can spin for quite a long time since the kinetic energy of it doesn't decrease significantly (it doesn't mean that the energy doesn't decrease *at all* - it does, and for that reason a satellit...
What knzhou and nicael said is absolutely true, you cannot extract from the satellite itself more energy of that you have put in it when you launch it in orbit. Maybe you're interested in knowing how that energy could be extract, and I think that a [space tether](https://en.m.wikipedia.org/wiki/Space_tether) could be ...
398,397
I was thinking about how energy is harvested on Earth from movements of certain forces like wind and ocean currents. Could similar principles be applied in space? Satellites are virtually in perpetual motion when orbiting the Earth. Is there kinetic energy that can be extracted from this orbital motion and harvested f...
2018/04/07
[ "https://physics.stackexchange.com/questions/398397", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/191822/" ]
I do absolutely agree with @knzhou, but going to provide a couple of points here, more intuitive than scientific. A satellite can spin for quite a long time since the kinetic energy of it doesn't decrease significantly (it doesn't mean that the energy doesn't decrease *at all* - it does, and for that reason a satellit...
While I agree with other answers as to the physics of the problem, there is at least one practical area where *harvesting energy from the orbital motion* of satellites could be of practical utility: [space debris](https://en.wikipedia.org/wiki/Space_debris) removal system. As already mentioned, removing kinetic energy ...
398,397
I was thinking about how energy is harvested on Earth from movements of certain forces like wind and ocean currents. Could similar principles be applied in space? Satellites are virtually in perpetual motion when orbiting the Earth. Is there kinetic energy that can be extracted from this orbital motion and harvested f...
2018/04/07
[ "https://physics.stackexchange.com/questions/398397", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/191822/" ]
I do absolutely agree with @knzhou, but going to provide a couple of points here, more intuitive than scientific. A satellite can spin for quite a long time since the kinetic energy of it doesn't decrease significantly (it doesn't mean that the energy doesn't decrease *at all* - it does, and for that reason a satellit...
The energy conservation discussed by [knzhou](https://physics.stackexchange.com/a/398398/26076) and [nicael](https://physics.stackexchange.com/a/398404/26076) render the idea of harvesting energy from artificial satellites non useful. However, energy is usefully and routinely harvested from natural satellites of the S...
398,397
I was thinking about how energy is harvested on Earth from movements of certain forces like wind and ocean currents. Could similar principles be applied in space? Satellites are virtually in perpetual motion when orbiting the Earth. Is there kinetic energy that can be extracted from this orbital motion and harvested f...
2018/04/07
[ "https://physics.stackexchange.com/questions/398397", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/191822/" ]
While I agree with other answers as to the physics of the problem, there is at least one practical area where *harvesting energy from the orbital motion* of satellites could be of practical utility: [space debris](https://en.wikipedia.org/wiki/Space_debris) removal system. As already mentioned, removing kinetic energy ...
What knzhou and nicael said is absolutely true, you cannot extract from the satellite itself more energy of that you have put in it when you launch it in orbit. Maybe you're interested in knowing how that energy could be extract, and I think that a [space tether](https://en.m.wikipedia.org/wiki/Space_tether) could be ...
398,397
I was thinking about how energy is harvested on Earth from movements of certain forces like wind and ocean currents. Could similar principles be applied in space? Satellites are virtually in perpetual motion when orbiting the Earth. Is there kinetic energy that can be extracted from this orbital motion and harvested f...
2018/04/07
[ "https://physics.stackexchange.com/questions/398397", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/191822/" ]
What knzhou and nicael said is absolutely true, you cannot extract from the satellite itself more energy of that you have put in it when you launch it in orbit. Maybe you're interested in knowing how that energy could be extract, and I think that a [space tether](https://en.m.wikipedia.org/wiki/Space_tether) could be ...
The energy conservation discussed by [knzhou](https://physics.stackexchange.com/a/398398/26076) and [nicael](https://physics.stackexchange.com/a/398404/26076) render the idea of harvesting energy from artificial satellites non useful. However, energy is usefully and routinely harvested from natural satellites of the S...
398,397
I was thinking about how energy is harvested on Earth from movements of certain forces like wind and ocean currents. Could similar principles be applied in space? Satellites are virtually in perpetual motion when orbiting the Earth. Is there kinetic energy that can be extracted from this orbital motion and harvested f...
2018/04/07
[ "https://physics.stackexchange.com/questions/398397", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/191822/" ]
While I agree with other answers as to the physics of the problem, there is at least one practical area where *harvesting energy from the orbital motion* of satellites could be of practical utility: [space debris](https://en.wikipedia.org/wiki/Space_debris) removal system. As already mentioned, removing kinetic energy ...
The energy conservation discussed by [knzhou](https://physics.stackexchange.com/a/398398/26076) and [nicael](https://physics.stackexchange.com/a/398404/26076) render the idea of harvesting energy from artificial satellites non useful. However, energy is usefully and routinely harvested from natural satellites of the S...
66,870,436
I want to replace all of the Uppercase letters in string with lowercase letters is there any function to do so because the replace function is not giving any result. Here is my code.. ``` for (int i = 0 ; i < string. size() ; i++ ) { if (string[i] >= 65 && string[i] <= 90) { string....
2021/03/30
[ "https://Stackoverflow.com/questions/66870436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15311860/" ]
Does this work: ``` library(dplyr) library(stringr) df %>% mutate(B = case_when(str_detect(A, 'Sales|Marketing') ~ 'Yes', TRUE ~ 'No')) A B 1 Manager, Sales Yes 2 Manager No 3 Manager, Marketing Yes 4 Manager, Marketing, Sales Yes ```
Using `ifelse` ``` df$B <- ifelse(grepl('Sales|Marketing', df$A), "Yes", "No") ```
15,715,602
I want to use the `yum` command in Red Hat 3.4.6-3. How can I install it?
2013/03/30
[ "https://Stackoverflow.com/questions/15715602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1996792/" ]
* Download the yum version of your choice: wget <http://linux.duke.edu/projects/yum/download/2.0/yum-2.0.7.tar.gz> * Untar the package: tar xvzf yum-2.0.7.tar.gz * change directory into the newly expanded folder: cd yum-2.0.7 * run the configuration file: ./configure * make configuration: make * make installation: make...
download `yum-2.4.2-0.4.el4.rf.noarch.rpm` and install using `rpm -ivh yum-2.4.2-0.4.el4.rf.noarch.rpm`
2,297,446
> > Given binomial coefficients, show that > > > $$ \begin{pmatrix} n+1 \\ m \end{pmatrix} = \begin{pmatrix} n \\ m \end{pmatrix} + \begin{pmatrix} n \\ m-1 \end{pmatrix}$$ for $0 \leq m \leq n$ > > > and use this to show by induction on n that: > > > $$ \begin{pmatrix} n \\ m \end{pmatrix} =\frac{n!}{m!(n-m)!} ...
2017/05/26
[ "https://math.stackexchange.com/questions/2297446", "https://math.stackexchange.com", "https://math.stackexchange.com/users/430020/" ]
\begin{align\*} \binom{n}{m}+\binom{n}{m-1}&=\frac{n!}{m!(n-m)!}+\frac{n!}{(m-1)!(n-m+1)!}\\ &=\frac{(n-m+1)(n!)}{m!(n-m+1)!}+\frac{m(n!)}{m!(n-m+1)!}\\ &=\frac{(n+1)(n!)}{m!(n-m+1)!}\\ &=\frac{(n+1)!}{m!(n+1-m)!}\\ &=\binom{n+1}{m} \end{align\*} Another approach is: To pick $m$ objects from $n+1$ objects, we have $\...
**Hint:** $\dbinom nm$ is the coefficient of $x^m$ in the expansion of $(1+x)^n$. Write $$(1+x)^{n+1}=(1+x)(1+x)^n$$ and proceed with induction.
2,297,446
> > Given binomial coefficients, show that > > > $$ \begin{pmatrix} n+1 \\ m \end{pmatrix} = \begin{pmatrix} n \\ m \end{pmatrix} + \begin{pmatrix} n \\ m-1 \end{pmatrix}$$ for $0 \leq m \leq n$ > > > and use this to show by induction on n that: > > > $$ \begin{pmatrix} n \\ m \end{pmatrix} =\frac{n!}{m!(n-m)!} ...
2017/05/26
[ "https://math.stackexchange.com/questions/2297446", "https://math.stackexchange.com", "https://math.stackexchange.com/users/430020/" ]
\begin{align\*} \binom{n}{m}+\binom{n}{m-1}&=\frac{n!}{m!(n-m)!}+\frac{n!}{(m-1)!(n-m+1)!}\\ &=\frac{(n-m+1)(n!)}{m!(n-m+1)!}+\frac{m(n!)}{m!(n-m+1)!}\\ &=\frac{(n+1)(n!)}{m!(n-m+1)!}\\ &=\frac{(n+1)!}{m!(n+1-m)!}\\ &=\binom{n+1}{m} \end{align\*} Another approach is: To pick $m$ objects from $n+1$ objects, we have $\...
Use a Pascal argument, where $m\choose k$ is the number of $k$-element subsets of the set $\{1,\ldots,m\}$. Let $A$ be the number of subsets of $\{1,\ldots,m\}$ that do not contain $m$ and let $B$ be the complementary set. Then $\{1,\ldots,m\}$ is the disjoint union of $A$ and $B$. But $A$ has cardinality $m-1\choose ...
2,297,446
> > Given binomial coefficients, show that > > > $$ \begin{pmatrix} n+1 \\ m \end{pmatrix} = \begin{pmatrix} n \\ m \end{pmatrix} + \begin{pmatrix} n \\ m-1 \end{pmatrix}$$ for $0 \leq m \leq n$ > > > and use this to show by induction on n that: > > > $$ \begin{pmatrix} n \\ m \end{pmatrix} =\frac{n!}{m!(n-m)!} ...
2017/05/26
[ "https://math.stackexchange.com/questions/2297446", "https://math.stackexchange.com", "https://math.stackexchange.com/users/430020/" ]
\begin{align\*} \binom{n}{m}+\binom{n}{m-1}&=\frac{n!}{m!(n-m)!}+\frac{n!}{(m-1)!(n-m+1)!}\\ &=\frac{(n-m+1)(n!)}{m!(n-m+1)!}+\frac{m(n!)}{m!(n-m+1)!}\\ &=\frac{(n+1)(n!)}{m!(n-m+1)!}\\ &=\frac{(n+1)!}{m!(n+1-m)!}\\ &=\binom{n+1}{m} \end{align\*} Another approach is: To pick $m$ objects from $n+1$ objects, we have $\...
You are in a class with $n+1$ pupils. Now a group of $m$ pupils should be chosen out of all $n+1$ pupils. Either you belong to that group or not. Now if you don't belong to the group there are $\binom{n}{m}$ possibilities. If you belong to it then there are $\binom{n}{m-1}$ possibilities.
404,371
So I got a [TekPower TP4000ZC MultiMeter](http://tekpower.us/tp4000zc.html). [![Photo of multimeter](https://i.stack.imgur.com/36W1R.jpg)](https://i.stack.imgur.com/36W1R.jpg) ([Image source](http://tekpower.us/tp4000zc.html)) It has COM port and two red ports: * V-Ohm-etc. set at 600V Max and 500mA Max Fused * 10A...
2018/10/31
[ "https://electronics.stackexchange.com/questions/404371", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/203000/" ]
Page 16 of your manual: 2.2 DC and AC Voltage measurement 1) Connect the black test lead to "COM" socket and red test leads to the "VΩHz" socket. 2) Set the selector switch to desired “ V [squiggle]” position, and press “SELECT” key to choose function.(DC or AC) 3) Connect the probes across the source or load under...
The 10A circuit has its own socket so that the current doesn't have to go through the selector switch - the selector does have a contact that switches the mode so that the brains in the meter knows to look at the voltage developed across the 10A shunt. All the other ranges go through the one V-Ohm-Amp-Hz socket, and t...
404,371
So I got a [TekPower TP4000ZC MultiMeter](http://tekpower.us/tp4000zc.html). [![Photo of multimeter](https://i.stack.imgur.com/36W1R.jpg)](https://i.stack.imgur.com/36W1R.jpg) ([Image source](http://tekpower.us/tp4000zc.html)) It has COM port and two red ports: * V-Ohm-etc. set at 600V Max and 500mA Max Fused * 10A...
2018/10/31
[ "https://electronics.stackexchange.com/questions/404371", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/203000/" ]
Page 16 of your manual: 2.2 DC and AC Voltage measurement 1) Connect the black test lead to "COM" socket and red test leads to the "VΩHz" socket. 2) Set the selector switch to desired “ V [squiggle]” position, and press “SELECT” key to choose function.(DC or AC) 3) Connect the probes across the source or load under...
> > Why the 1st red port (600 V / 500mA MAX red port V-Ohm-Amp-Hz one) is the correct one to use when measuring voltage in the outlet? > > > Presumably you wanted to measure voltage so the V and COM sockets are correct but you need to select V AC range to measure it. > > Wouldn't plugging MM into the outlet comp...
404,371
So I got a [TekPower TP4000ZC MultiMeter](http://tekpower.us/tp4000zc.html). [![Photo of multimeter](https://i.stack.imgur.com/36W1R.jpg)](https://i.stack.imgur.com/36W1R.jpg) ([Image source](http://tekpower.us/tp4000zc.html)) It has COM port and two red ports: * V-Ohm-etc. set at 600V Max and 500mA Max Fused * 10A...
2018/10/31
[ "https://electronics.stackexchange.com/questions/404371", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/203000/" ]
Page 16 of your manual: 2.2 DC and AC Voltage measurement 1) Connect the black test lead to "COM" socket and red test leads to the "VΩHz" socket. 2) Set the selector switch to desired “ V [squiggle]” position, and press “SELECT” key to choose function.(DC or AC) 3) Connect the probes across the source or load under...
Notice how the right side red port has a bunch of symbols over it, which correspond to the symbols on the dial. The key is that every one of those measurements uses that port - notice both voltage and current are included. Your multimeter is smart - it knows that voltage measurements can only be taken with high input ...
404,371
So I got a [TekPower TP4000ZC MultiMeter](http://tekpower.us/tp4000zc.html). [![Photo of multimeter](https://i.stack.imgur.com/36W1R.jpg)](https://i.stack.imgur.com/36W1R.jpg) ([Image source](http://tekpower.us/tp4000zc.html)) It has COM port and two red ports: * V-Ohm-etc. set at 600V Max and 500mA Max Fused * 10A...
2018/10/31
[ "https://electronics.stackexchange.com/questions/404371", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/203000/" ]
> > Why the 1st red port (600 V / 500mA MAX red port V-Ohm-Amp-Hz one) is the correct one to use when measuring voltage in the outlet? > > > Presumably you wanted to measure voltage so the V and COM sockets are correct but you need to select V AC range to measure it. > > Wouldn't plugging MM into the outlet comp...
The 10A circuit has its own socket so that the current doesn't have to go through the selector switch - the selector does have a contact that switches the mode so that the brains in the meter knows to look at the voltage developed across the 10A shunt. All the other ranges go through the one V-Ohm-Amp-Hz socket, and t...
404,371
So I got a [TekPower TP4000ZC MultiMeter](http://tekpower.us/tp4000zc.html). [![Photo of multimeter](https://i.stack.imgur.com/36W1R.jpg)](https://i.stack.imgur.com/36W1R.jpg) ([Image source](http://tekpower.us/tp4000zc.html)) It has COM port and two red ports: * V-Ohm-etc. set at 600V Max and 500mA Max Fused * 10A...
2018/10/31
[ "https://electronics.stackexchange.com/questions/404371", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/203000/" ]
> > Why the 1st red port (600 V / 500mA MAX red port V-Ohm-Amp-Hz one) is the correct one to use when measuring voltage in the outlet? > > > Presumably you wanted to measure voltage so the V and COM sockets are correct but you need to select V AC range to measure it. > > Wouldn't plugging MM into the outlet comp...
Notice how the right side red port has a bunch of symbols over it, which correspond to the symbols on the dial. The key is that every one of those measurements uses that port - notice both voltage and current are included. Your multimeter is smart - it knows that voltage measurements can only be taken with high input ...
5,224,267
how to remove dynamically Arabic diacritic I'm designing an ebook "chm" and have multi html pages contain Arabic text but some time the search engine want highlight some of Arabic words because its diacritic so is it possible when page load to use JavaScript functions that would strip the Arabic diacritic text ?? bu...
2011/03/07
[ "https://Stackoverflow.com/questions/5224267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/602720/" ]
Try this ``` Text : الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ converted to : الحمد لله رب العالمين ``` <http://www.suhailkaleem.com/2009/08/26/remove-diacritics-from-arabic-text-quran/> The code is C# not javascript though. Still trying to figure out how to achieve this in javascript EDIT: Apparently it's very easy i...
Use this regex to catch all tashkeel [ؐ-ًؚٟ]
5,224,267
how to remove dynamically Arabic diacritic I'm designing an ebook "chm" and have multi html pages contain Arabic text but some time the search engine want highlight some of Arabic words because its diacritic so is it possible when page load to use JavaScript functions that would strip the Arabic diacritic text ?? bu...
2011/03/07
[ "https://Stackoverflow.com/questions/5224267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/602720/" ]
I wrote this function which handles strings with mixed Arabic and English characters, removing special characters (including diacritics) and normalizing some Arabic characters like converting all ة's into ه's. ```js normalize_text = function(text) { //remove special characters text = text.replace(/([^\u0621-\u0...
I tried the following solution and it works fine: ```js const str = 'الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ'; const withoutDiacs = str.replace(/([^\u0621-\u063A\u0641-\u064A\u0660-\u0669a-zA-Z 0-9])/g, ''); console.log(withoutDiacs); //الحمد لله رب العالمين ``` Reference: <https://www.overdoe.com/javascript/2020/06/18...
5,224,267
how to remove dynamically Arabic diacritic I'm designing an ebook "chm" and have multi html pages contain Arabic text but some time the search engine want highlight some of Arabic words because its diacritic so is it possible when page load to use JavaScript functions that would strip the Arabic diacritic text ?? bu...
2011/03/07
[ "https://Stackoverflow.com/questions/5224267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/602720/" ]
I wrote this function which handles strings with mixed Arabic and English characters, removing special characters (including diacritics) and normalizing some Arabic characters like converting all ة's into ه's. ```js normalize_text = function(text) { //remove special characters text = text.replace(/([^\u0621-\u0...
Try this ``` Text : الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ converted to : الحمد لله رب العالمين ``` <http://www.suhailkaleem.com/2009/08/26/remove-diacritics-from-arabic-text-quran/> The code is C# not javascript though. Still trying to figure out how to achieve this in javascript EDIT: Apparently it's very easy i...
5,224,267
how to remove dynamically Arabic diacritic I'm designing an ebook "chm" and have multi html pages contain Arabic text but some time the search engine want highlight some of Arabic words because its diacritic so is it possible when page load to use JavaScript functions that would strip the Arabic diacritic text ?? bu...
2011/03/07
[ "https://Stackoverflow.com/questions/5224267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/602720/" ]
Try this ``` Text : الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ converted to : الحمد لله رب العالمين ``` <http://www.suhailkaleem.com/2009/08/26/remove-diacritics-from-arabic-text-quran/> The code is C# not javascript though. Still trying to figure out how to achieve this in javascript EDIT: Apparently it's very easy i...
A shorter approach to remove the Arabic diacritics (either the 8 Basic diacritics or the full 52 diacritics) could be as follows: **Remove Basic Diacritics** ```js function removeTashkeelBasic(s) {return s.replace(/[ً-ْ]/g,'');} //=================== // Test Cases //=================== console.log(removeTashkeel...
5,224,267
how to remove dynamically Arabic diacritic I'm designing an ebook "chm" and have multi html pages contain Arabic text but some time the search engine want highlight some of Arabic words because its diacritic so is it possible when page load to use JavaScript functions that would strip the Arabic diacritic text ?? bu...
2011/03/07
[ "https://Stackoverflow.com/questions/5224267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/602720/" ]
Here's a javascript code that can handle removing Arabic diacritics nearly all the time. ``` var arabicNormChar = { 'ك': 'ک', 'ﻷ': 'لا', 'ؤ': 'و', 'ى': 'ی', 'ي': 'ی', 'ئ': 'ی', 'أ': 'ا', 'إ': 'ا', 'آ': 'ا', 'ٱ': 'ا', 'ٳ': 'ا', 'ة': 'ه', 'ء': '', 'ِ': '', 'ْ': '', 'ُ': '', 'َ': '', 'ّ': '', 'ٍ': '', 'ً': '', 'ٌ': '...
I tried the following solution and it works fine: ```js const str = 'الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ'; const withoutDiacs = str.replace(/([^\u0621-\u063A\u0641-\u064A\u0660-\u0669a-zA-Z 0-9])/g, ''); console.log(withoutDiacs); //الحمد لله رب العالمين ``` Reference: <https://www.overdoe.com/javascript/2020/06/18...
5,224,267
how to remove dynamically Arabic diacritic I'm designing an ebook "chm" and have multi html pages contain Arabic text but some time the search engine want highlight some of Arabic words because its diacritic so is it possible when page load to use JavaScript functions that would strip the Arabic diacritic text ?? bu...
2011/03/07
[ "https://Stackoverflow.com/questions/5224267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/602720/" ]
Use this regex to catch all tashkeel [ؐ-ًؚٟ]
[This site](http://rishida.net/blog/?p=222) has some routines for Javascript Unicode normalization which could be used to do what you're attempting. If nothing else it could provide a good starting point. If you can preprocess the data, Python has good Unicode routines to make easy work of these sorts of transformatio...
5,224,267
how to remove dynamically Arabic diacritic I'm designing an ebook "chm" and have multi html pages contain Arabic text but some time the search engine want highlight some of Arabic words because its diacritic so is it possible when page load to use JavaScript functions that would strip the Arabic diacritic text ?? bu...
2011/03/07
[ "https://Stackoverflow.com/questions/5224267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/602720/" ]
I tried the following solution and it works fine: ```js const str = 'الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ'; const withoutDiacs = str.replace(/([^\u0621-\u063A\u0641-\u064A\u0660-\u0669a-zA-Z 0-9])/g, ''); console.log(withoutDiacs); //الحمد لله رب العالمين ``` Reference: <https://www.overdoe.com/javascript/2020/06/18...
A shorter approach to remove the Arabic diacritics (either the 8 Basic diacritics or the full 52 diacritics) could be as follows: **Remove Basic Diacritics** ```js function removeTashkeelBasic(s) {return s.replace(/[ً-ْ]/g,'');} //=================== // Test Cases //=================== console.log(removeTashkeel...
5,224,267
how to remove dynamically Arabic diacritic I'm designing an ebook "chm" and have multi html pages contain Arabic text but some time the search engine want highlight some of Arabic words because its diacritic so is it possible when page load to use JavaScript functions that would strip the Arabic diacritic text ?? bu...
2011/03/07
[ "https://Stackoverflow.com/questions/5224267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/602720/" ]
I wrote this function which handles strings with mixed Arabic and English characters, removing special characters (including diacritics) and normalizing some Arabic characters like converting all ة's into ه's. ```js normalize_text = function(text) { //remove special characters text = text.replace(/([^\u0621-\u0...
[This site](http://rishida.net/blog/?p=222) has some routines for Javascript Unicode normalization which could be used to do what you're attempting. If nothing else it could provide a good starting point. If you can preprocess the data, Python has good Unicode routines to make easy work of these sorts of transformatio...
5,224,267
how to remove dynamically Arabic diacritic I'm designing an ebook "chm" and have multi html pages contain Arabic text but some time the search engine want highlight some of Arabic words because its diacritic so is it possible when page load to use JavaScript functions that would strip the Arabic diacritic text ?? bu...
2011/03/07
[ "https://Stackoverflow.com/questions/5224267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/602720/" ]
Here's a javascript code that can handle removing Arabic diacritics nearly all the time. ``` var arabicNormChar = { 'ك': 'ک', 'ﻷ': 'لا', 'ؤ': 'و', 'ى': 'ی', 'ي': 'ی', 'ئ': 'ی', 'أ': 'ا', 'إ': 'ا', 'آ': 'ا', 'ٱ': 'ا', 'ٳ': 'ا', 'ة': 'ه', 'ء': '', 'ِ': '', 'ْ': '', 'ُ': '', 'َ': '', 'ّ': '', 'ٍ': '', 'ً': '', 'ٌ': '...
A shorter approach to remove the Arabic diacritics (either the 8 Basic diacritics or the full 52 diacritics) could be as follows: **Remove Basic Diacritics** ```js function removeTashkeelBasic(s) {return s.replace(/[ً-ْ]/g,'');} //=================== // Test Cases //=================== console.log(removeTashkeel...
5,224,267
how to remove dynamically Arabic diacritic I'm designing an ebook "chm" and have multi html pages contain Arabic text but some time the search engine want highlight some of Arabic words because its diacritic so is it possible when page load to use JavaScript functions that would strip the Arabic diacritic text ?? bu...
2011/03/07
[ "https://Stackoverflow.com/questions/5224267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/602720/" ]
Try this ``` Text : الْحَمْدُ لِلَّهِ رَبِّ الْعَالَمِينَ converted to : الحمد لله رب العالمين ``` <http://www.suhailkaleem.com/2009/08/26/remove-diacritics-from-arabic-text-quran/> The code is C# not javascript though. Still trying to figure out how to achieve this in javascript EDIT: Apparently it's very easy i...
Here's a javascript code that can handle removing Arabic diacritics nearly all the time. ``` var arabicNormChar = { 'ك': 'ک', 'ﻷ': 'لا', 'ؤ': 'و', 'ى': 'ی', 'ي': 'ی', 'ئ': 'ی', 'أ': 'ا', 'إ': 'ا', 'آ': 'ا', 'ٱ': 'ا', 'ٳ': 'ا', 'ة': 'ه', 'ء': '', 'ِ': '', 'ْ': '', 'ُ': '', 'َ': '', 'ّ': '', 'ٍ': '', 'ً': '', 'ٌ': '...
21,008,017
I am getting an Invalid Operation Exception, the stack is down below. I think it is because `db.Responses.Where(y => y.ResponseId.Equals(item.ResponseId)).First();` is not returning any results. I checked the response data and the userResponseDetails has a ResponseId, I also just used a hard coded value. I also know th...
2014/01/08
[ "https://Stackoverflow.com/questions/21008017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2851048/" ]
Check again. Use debugger if must. My guess is that for some item in userResponseDetails this query finds no elements: ``` .Where(y => y.ResponseId.Equals(item.ResponseId)) ``` so you can't call ``` .First() ``` on it. Maybe try ``` .FirstOrDefault() ``` if it solves the issue. Do NOT return NULL value! This...
In the following line. ``` temp.Response = db.Responses.Where(y => y.ResponseId.Equals(item.ResponseId)).First(); ``` You are calling First but the collection returned from db.Responses.Where is empty.
21,008,017
I am getting an Invalid Operation Exception, the stack is down below. I think it is because `db.Responses.Where(y => y.ResponseId.Equals(item.ResponseId)).First();` is not returning any results. I checked the response data and the userResponseDetails has a ResponseId, I also just used a hard coded value. I also know th...
2014/01/08
[ "https://Stackoverflow.com/questions/21008017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2851048/" ]
If this is the offending line: ``` db.Responses.Where(y => y.ResponseId.Equals(item.ResponseId)).First(); ``` Then it's because there is no object in `Responses` for which the `ResponseId == item.ResponseId`, and you can't get the `First()` record if there are no matches. Try this instead: ``` var response = db....
In the following line. ``` temp.Response = db.Responses.Where(y => y.ResponseId.Equals(item.ResponseId)).First(); ``` You are calling First but the collection returned from db.Responses.Where is empty.
21,008,017
I am getting an Invalid Operation Exception, the stack is down below. I think it is because `db.Responses.Where(y => y.ResponseId.Equals(item.ResponseId)).First();` is not returning any results. I checked the response data and the userResponseDetails has a ResponseId, I also just used a hard coded value. I also know th...
2014/01/08
[ "https://Stackoverflow.com/questions/21008017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2851048/" ]
Check again. Use debugger if must. My guess is that for some item in userResponseDetails this query finds no elements: ``` .Where(y => y.ResponseId.Equals(item.ResponseId)) ``` so you can't call ``` .First() ``` on it. Maybe try ``` .FirstOrDefault() ``` if it solves the issue. Do NOT return NULL value! This...
If this is the offending line: ``` db.Responses.Where(y => y.ResponseId.Equals(item.ResponseId)).First(); ``` Then it's because there is no object in `Responses` for which the `ResponseId == item.ResponseId`, and you can't get the `First()` record if there are no matches. Try this instead: ``` var response = db....
6,326,301
We are making use of Castle Windsor's typed factories in our application and finding that, while they do "hide" the IoC container from the application, some of the abstraction is certainly leaking through. That is, the factories must implement a release method so that resolved instances can be safely disposed or otherw...
2011/06/13
[ "https://Stackoverflow.com/questions/6326301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/92587/" ]
This is due to ajax cross domain security restrictions, one trick is to setup a proxy script from the server that the downloads the contents from different site(domain) and use that proxy as your reference in javascript. Example: (proxy.php) ``` <?php $url = 'http://www.anothersite.com'; $htm = file_get_conte...
the most straight forward (and cross browser) way is to write a server side program (in PHP or Perl) that sits on your server and that you call locally that then goes and gets what you want from the remote site. If the foreign domain is under your control there are ways to do it in straight javascript, but it's much ...
6,326,301
We are making use of Castle Windsor's typed factories in our application and finding that, while they do "hide" the IoC container from the application, some of the abstraction is certainly leaking through. That is, the factories must implement a release method so that resolved instances can be safely disposed or otherw...
2011/06/13
[ "https://Stackoverflow.com/questions/6326301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/92587/" ]
This is due to ajax cross domain security restrictions, one trick is to setup a proxy script from the server that the downloads the contents from different site(domain) and use that proxy as your reference in javascript. Example: (proxy.php) ``` <?php $url = 'http://www.anothersite.com'; $htm = file_get_conte...
Set up your AJAX request to hit a PHP script that loads the content (ie, curl) and returns it as the AJAX's xhr response. An AJAX response (in your case, the partial page) can be loaded and inserted into the current page according to the target element's id, for example. See this question, it pretty much your issue: <...
65,278,776
First of all, this is really just a golf question. My code works fine as it is. But I feel like there is probably a better (i.e. cooler) way to do this. So I've got a class that acts a lot like a hash. However, it really internally generates a hash for each call to its hash-ish methods. The private method for generati...
2020/12/13
[ "https://Stackoverflow.com/questions/65278776", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5527374/" ]
I figured it out and it's incredibly simple. Just delegate to the name of the method. Here's a working example: ``` class MyClass extend Forwardable delegate %w([] []=) => :build_hash def build_hash return {'a'=>1} end end ```
**edit: don't do this; I forgot `Forwardable` existed** You can write a "macro" for this. Well, Ruby doesn't technically have actual "macros" but it's a fairly common pattern nonetheless. Rails in particular uses it extensively - stuff like `belongs_to`, `validates`, etc are all class methods which are being used to g...
1,653,067
OK. So I have a CMS written in Java that satisfies the needs of several hundred clients. But periodically, a client will need a specialized application: for example, a class registration database application. So let's say that I don't feel like writing it or I'm too busy. So I outsource it to someone else but I don't...
2009/10/31
[ "https://Stackoverflow.com/questions/1653067", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197028/" ]
One option would be to aggregate pages using [WSRP](http://en.wikipedia.org/wiki/Web_Services_for_Remote_Portlets). This is basically a web service that includes the UI of the consumed service (portlet). It will have tackled many of the issues you'll face (URL rewriting and so on), so it is probably worth looking at p...
Create an [iframe](http://en.wikipedia.org/wiki/HTML_element#Frames) in which to show that application within your web page.
1,653,067
OK. So I have a CMS written in Java that satisfies the needs of several hundred clients. But periodically, a client will need a specialized application: for example, a class registration database application. So let's say that I don't feel like writing it or I'm too busy. So I outsource it to someone else but I don't...
2009/10/31
[ "https://Stackoverflow.com/questions/1653067", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197028/" ]
Write a [Filter](http://java.sun.com/blueprints/corej2eepatterns/Patterns/InterceptingFilter.html) which you'd configure in your *web.xml* which intercepts requests matching the particular type you'd like to outsource. This filter could then use [Commons HttpClient](http://hc.apache.org/httpclient-3.x/) to make the act...
Create an [iframe](http://en.wikipedia.org/wiki/HTML_element#Frames) in which to show that application within your web page.
1,653,067
OK. So I have a CMS written in Java that satisfies the needs of several hundred clients. But periodically, a client will need a specialized application: for example, a class registration database application. So let's say that I don't feel like writing it or I'm too busy. So I outsource it to someone else but I don't...
2009/10/31
[ "https://Stackoverflow.com/questions/1653067", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197028/" ]
One option would be to aggregate pages using [WSRP](http://en.wikipedia.org/wiki/Web_Services_for_Remote_Portlets). This is basically a web service that includes the UI of the consumed service (portlet). It will have tackled many of the issues you'll face (URL rewriting and so on), so it is probably worth looking at p...
You can look at [Open Social](http://code.google.com/apis/opensocial/) which is the way Google allows you to add applications to their platforms (Orkut, iGoogle and, with some extensions, Wave). [Shindig](http://incubator.apache.org/shindig/) is a Java implementation of an Open Social container, which you can use as th...
1,653,067
OK. So I have a CMS written in Java that satisfies the needs of several hundred clients. But periodically, a client will need a specialized application: for example, a class registration database application. So let's say that I don't feel like writing it or I'm too busy. So I outsource it to someone else but I don't...
2009/10/31
[ "https://Stackoverflow.com/questions/1653067", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197028/" ]
Write a [Filter](http://java.sun.com/blueprints/corej2eepatterns/Patterns/InterceptingFilter.html) which you'd configure in your *web.xml* which intercepts requests matching the particular type you'd like to outsource. This filter could then use [Commons HttpClient](http://hc.apache.org/httpclient-3.x/) to make the act...
You can look at [Open Social](http://code.google.com/apis/opensocial/) which is the way Google allows you to add applications to their platforms (Orkut, iGoogle and, with some extensions, Wave). [Shindig](http://incubator.apache.org/shindig/) is a Java implementation of an Open Social container, which you can use as th...
1,653,067
OK. So I have a CMS written in Java that satisfies the needs of several hundred clients. But periodically, a client will need a specialized application: for example, a class registration database application. So let's say that I don't feel like writing it or I'm too busy. So I outsource it to someone else but I don't...
2009/10/31
[ "https://Stackoverflow.com/questions/1653067", "https://Stackoverflow.com", "https://Stackoverflow.com/users/197028/" ]
Write a [Filter](http://java.sun.com/blueprints/corej2eepatterns/Patterns/InterceptingFilter.html) which you'd configure in your *web.xml* which intercepts requests matching the particular type you'd like to outsource. This filter could then use [Commons HttpClient](http://hc.apache.org/httpclient-3.x/) to make the act...
One option would be to aggregate pages using [WSRP](http://en.wikipedia.org/wiki/Web_Services_for_Remote_Portlets). This is basically a web service that includes the UI of the consumed service (portlet). It will have tackled many of the issues you'll face (URL rewriting and so on), so it is probably worth looking at p...
44,118,847
My project is using reatJS, jest is used to do unit test and also to generate the coverage report. Now I need to use jenkins to automatically build the project and then display the code coverate result. But I could not find out jest plugins in jenkins. Can anyone show me how you integrate jest with jenkins for displayi...
2017/05/22
[ "https://Stackoverflow.com/questions/44118847", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3006967/" ]
If cannot get a direct plugin use html publish plugin and point it to your test reports index.html or whatever equivalent to it. I have got a custom inhouse made oracle db code quality tool which produces html result and using html publish plugin brings up a link in the lefthand side of the job which shows the job. You...
Just to complement the above answer, in my case I'm using a declarative pipeline, and in the final stage after we run the tests in the pipelines we added. The folder where the results are generated is `coverage/lcov-report`, and we need to point to the `index.html` generated. i.e. ``` publishHTML(target: [ ...
22,786,798
I have a `WebView` application, when i change the screen orientation of application it reloads itself. I am using ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapp34" android:versionCode="1" android:versionName="1.0" > ...
2014/04/01
[ "https://Stackoverflow.com/questions/22786798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3079784/" ]
Added as answer as suggested by mic\_e Assuming you're trying to search for a player name using the input from a user, you have the arguments of strstr in the reverse order. Also note that strstr is case sensitive. char \*p = strstr(players[x].name, inputFromUser);
Like this: ``` char *p = strstr(players[x].name, inputFromUser); ```
22,786,798
I have a `WebView` application, when i change the screen orientation of application it reloads itself. I am using ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapp34" android:versionCode="1" android:versionName="1.0" > ...
2014/04/01
[ "https://Stackoverflow.com/questions/22786798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3079784/" ]
Added as answer as suggested by mic\_e Assuming you're trying to search for a player name using the input from a user, you have the arguments of strstr in the reverse order. Also note that strstr is case sensitive. char \*p = strstr(players[x].name, inputFromUser);
It should work, It's fail if your input is wrong let me expalain in simple ``` int main() { char *ret; char mystr[]="stack"; char str[]="This is stack over flow string"; ret = strstr(str, mystr); printf("The substring is: %s\n", ret); return(0); } ``` Output is ``` The substring is: stack over...
22,786,798
I have a `WebView` application, when i change the screen orientation of application it reloads itself. I am using ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapp34" android:versionCode="1" android:versionName="1.0" > ...
2014/04/01
[ "https://Stackoverflow.com/questions/22786798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3079784/" ]
Added as answer as suggested by mic\_e Assuming you're trying to search for a player name using the input from a user, you have the arguments of strstr in the reverse order. Also note that strstr is case sensitive. char \*p = strstr(players[x].name, inputFromUser);
That Should Work. I think You have the problem with file reading Which fills the data array. Please make sure that data you filled into structure is Ok. And strstr returns address of the first Occurrence of the string1 in string2 where, strstr(string2, string1);
22,786,798
I have a `WebView` application, when i change the screen orientation of application it reloads itself. I am using ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapp34" android:versionCode="1" android:versionName="1.0" > ...
2014/04/01
[ "https://Stackoverflow.com/questions/22786798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3079784/" ]
Added as answer as suggested by mic\_e Assuming you're trying to search for a player name using the input from a user, you have the arguments of strstr in the reverse order. Also note that strstr is case sensitive. char \*p = strstr(players[x].name, inputFromUser);
`fgets` stores the `\n` and then stops taking input. So suppose a player name is `"user"`, `players[i].name` will be equal to `"user\n"` while `a` is `"user"`. So return of `strstr` is always `NULL`. Try this instead: ``` p = strstr(players[i].name,a); ``` OR, remove the `\n` after taking input from file by `fget...
22,786,798
I have a `WebView` application, when i change the screen orientation of application it reloads itself. I am using ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapp34" android:versionCode="1" android:versionName="1.0" > ...
2014/04/01
[ "https://Stackoverflow.com/questions/22786798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3079784/" ]
`fgets` stores the `\n` and then stops taking input. So suppose a player name is `"user"`, `players[i].name` will be equal to `"user\n"` while `a` is `"user"`. So return of `strstr` is always `NULL`. Try this instead: ``` p = strstr(players[i].name,a); ``` OR, remove the `\n` after taking input from file by `fget...
Like this: ``` char *p = strstr(players[x].name, inputFromUser); ```
22,786,798
I have a `WebView` application, when i change the screen orientation of application it reloads itself. I am using ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapp34" android:versionCode="1" android:versionName="1.0" > ...
2014/04/01
[ "https://Stackoverflow.com/questions/22786798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3079784/" ]
`fgets` stores the `\n` and then stops taking input. So suppose a player name is `"user"`, `players[i].name` will be equal to `"user\n"` while `a` is `"user"`. So return of `strstr` is always `NULL`. Try this instead: ``` p = strstr(players[i].name,a); ``` OR, remove the `\n` after taking input from file by `fget...
It should work, It's fail if your input is wrong let me expalain in simple ``` int main() { char *ret; char mystr[]="stack"; char str[]="This is stack over flow string"; ret = strstr(str, mystr); printf("The substring is: %s\n", ret); return(0); } ``` Output is ``` The substring is: stack over...
22,786,798
I have a `WebView` application, when i change the screen orientation of application it reloads itself. I am using ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapp34" android:versionCode="1" android:versionName="1.0" > ...
2014/04/01
[ "https://Stackoverflow.com/questions/22786798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3079784/" ]
`fgets` stores the `\n` and then stops taking input. So suppose a player name is `"user"`, `players[i].name` will be equal to `"user\n"` while `a` is `"user"`. So return of `strstr` is always `NULL`. Try this instead: ``` p = strstr(players[i].name,a); ``` OR, remove the `\n` after taking input from file by `fget...
That Should Work. I think You have the problem with file reading Which fills the data array. Please make sure that data you filled into structure is Ok. And strstr returns address of the first Occurrence of the string1 in string2 where, strstr(string2, string1);
73,174,017
I'm trying to make a seemingly simple update to a MongoDB collection that looks like the below using Node. **Collection** ``` { account_id: "ORG1", progress: [{week: 1, goal: 5000, raised: 2400}, {week: 2, goal:5100, raised: 1000}] } ``` The goal is to be able to 1. Find the correct org (this works for me) 2...
2022/07/30
[ "https://Stackoverflow.com/questions/73174017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2860565/" ]
One option is using an update pipeline: 1. Split the array into the last item and all the rest. 2. update the last item 3. Build the array again using `$concatArrays` ``` db.collection.update( {account_id: "ORG1"}, [ {$set: { lastItem: {$last: "$progress"}, rest: {$slice: ["$progress", 0, {$subtra...
I ended up finding a solution that feels a bit simpler than the solutions I've seen. I added a field to the db called "status": ``` { account_id: "ORG1", progress: [{week: 1, goal: 5000, raised: 2400, status: historic}, {week: 2, goal:5100, raised: 1000, status: current}] } ``` Then I ended up using the [posi...
73,174,017
I'm trying to make a seemingly simple update to a MongoDB collection that looks like the below using Node. **Collection** ``` { account_id: "ORG1", progress: [{week: 1, goal: 5000, raised: 2400}, {week: 2, goal:5100, raised: 1000}] } ``` The goal is to be able to 1. Find the correct org (this works for me) 2...
2022/07/30
[ "https://Stackoverflow.com/questions/73174017", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2860565/" ]
One way to do it is by using [`"$function"`](https://www.mongodb.com/docs/v6.0/reference/operator/aggregation/function/) in the update/aggregation pipeline. ```js db.collection.update({ "account_id": "ORG1" }, [ { "$set": { "progress": { "$function": { // your increment value goes here ...
I ended up finding a solution that feels a bit simpler than the solutions I've seen. I added a field to the db called "status": ``` { account_id: "ORG1", progress: [{week: 1, goal: 5000, raised: 2400, status: historic}, {week: 2, goal:5100, raised: 1000, status: current}] } ``` Then I ended up using the [posi...
41,033,365
Hey friends today I am creating my login page which saved user pass on my data base this project is given me in my school and now I am totally frustrated because everything seems to be right but when I am trying to create database it says error ......I already posted screen shot after this **index.php** script... ```...
2016/12/08
[ "https://Stackoverflow.com/questions/41033365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
The values are assigned to the targets on the left-hand side in order from left to right. So after the first value is assigned to `a[i]`, the value of `a[i]` is changed, and this new value is used to compute the assignment to `a[a[i]-1]`.
> > In an assignment statement, the right-hand side is always evaluated > fully before doing the actual variable assignment. > > > ``` a[i],a[a[i]-1] = a[a[i]-1],a[i] # is Equal to a[i], a[a[i]-1] = 1, 4 ``` Actual variable assignment from left to right ``` a[i], a[a[i]-1] = 1, 4 # is same as a[i] = 1 a[1-1] ...
1,602,752
Suppose I have a base form Main1 which may need to be altered slightly, including perhaps adding additional Controls and altering the size/location of existing Controls. Those base Controls which I need to alter I set to 'protected' in the designer. So I have another form, Main2, that derives from Main1. Then I have an...
2009/10/21
[ "https://Stackoverflow.com/questions/1602752", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88739/" ]
I agree with the first camp. C# is already loaded with features. Leverage the [PostSharp](https://www.postsharp.net/) library instead.
It would be useful, but many of the uses are being included in various ways as it is. For example, we will have the ability to do post and pre validation in .NET4, which was one use for using around, in aspectJ. By using extension methods you can inject new methods into objects you may not have source code for. And, ...
1,602,752
Suppose I have a base form Main1 which may need to be altered slightly, including perhaps adding additional Controls and altering the size/location of existing Controls. Those base Controls which I need to alter I set to 'protected' in the designer. So I have another form, Main2, that derives from Main1. Then I have an...
2009/10/21
[ "https://Stackoverflow.com/questions/1602752", "https://Stackoverflow.com", "https://Stackoverflow.com/users/88739/" ]
It would be great if languages would make it *easier* to develop and use AOP extensions. For instance: * It would be nice if one could give a delegate (or anonymous method, or lambda) as a parameter to a custom attribute. It's not a lot of work to implement this in C#, it's quite easy to implement it in the CLR (sin...
It would be useful, but many of the uses are being included in various ways as it is. For example, we will have the ability to do post and pre validation in .NET4, which was one use for using around, in aspectJ. By using extension methods you can inject new methods into objects you may not have source code for. And, ...
44,071,324
I've set an on click listener on a linear layout. Here's the code: ``` Context context = this; LinearLayout credit = (LinearLayout) findViewById(R.id.credits_activity); credit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { AlertDialog.Builder c...
2017/05/19
[ "https://Stackoverflow.com/questions/44071324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7755806/" ]
you are using getapplicationcontext() in AlertDialog.builder(getapplicationcontext()) ``` LinearLayout credit = (LinearLayout) findViewById(R.id.credits_activity); credit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { AlertDialog...
In place of getApplicationContext() pass ActivityName.this
22,255,813
I am playing around with some data for March Madness, and I am trying to create new dataframes in R that would split everything that is "AP" into one dataframe and everything that is "DUN" into a different frame. It is a huge dataset, but that is a slice that illustrates what I wnat to do, I just can't figure it out in...
2014/03/07
[ "https://Stackoverflow.com/questions/22255813", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3393553/" ]
You can't. Images typically contain a lot of data. When you convert that to text as base64 it becomes even bigger (4 characters for every 3 bytes). So yes, that will typically be very long if it's a large image. You could compress the image more heavily in order to reduce the size, but eventually it will be hard to ev...
I believe the only answer for this is that if you want a shorter string, you should use smaller image
22,255,813
I am playing around with some data for March Madness, and I am trying to create new dataframes in R that would split everything that is "AP" into one dataframe and everything that is "DUN" into a different frame. It is a huge dataset, but that is a slice that illustrates what I wnat to do, I just can't figure it out in...
2014/03/07
[ "https://Stackoverflow.com/questions/22255813", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3393553/" ]
You can't. Images typically contain a lot of data. When you convert that to text as base64 it becomes even bigger (4 characters for every 3 bytes). So yes, that will typically be very long if it's a large image. You could compress the image more heavily in order to reduce the size, but eventually it will be hard to ev...
Depends on the size of the image. A larger image is gonna yield a larger string. Images contain a lot of data. That is why people usually only do base64 encoding for very small images like icons, etc. You *could* try reducing the quality of the JPEG compression, but I doubt you'd save much space. Reducing the dimensio...
64,600,380
I have been reading about the ways in which I can push the database on kubernetes. Initially, I attached the data to the docker image and deployed the `service` and `deployment` files. But the issue was that when the container/pod restarts the data gets lost. I, then, came across the concept of persistent volume claim....
2020/10/29
[ "https://Stackoverflow.com/questions/64600380", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8300989/" ]
PVCs will consume the PV resources you've provisioned. There a more detailed explanation in the Kubernetes docs on [Persistent Volumes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) including the lifecycle of volumes and PV claims. As a side note in case you weren't already aware, there are several ...
[Persistent Volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/): > > `PV` is a piece of storage in the cluster that has been provisioned by an administrator or `dynamically provisioned` using `Storage Classes`. > [Persistent Volume Claim](https://cloud.google.com/kubernetes-engine/docs/concepts/p...
47,472,352
I'm attempting to track events for all UI elements on a page. The page contains dynamically generated content and various frameworks / libraries. Initially I tracked elements through creating a css class "track" , then adding style "track" to tracked elements. elements are then tracked using : ``` $('.track').on('c...
2017/11/24
[ "https://Stackoverflow.com/questions/47472352", "https://Stackoverflow.com", "https://Stackoverflow.com/users/470184/" ]
Assuming that localhost:4200 is your front-end server, you have to set your php server api path in the call. If your php server in in local on the 8080 port, you type `this.http.get('http://localhost:8080/weather.php',...`
You can put it in your `src/assets` folder and then call it using `this.http.get("assets/weather.php", {...`.
47,472,352
I'm attempting to track events for all UI elements on a page. The page contains dynamically generated content and various frameworks / libraries. Initially I tracked elements through creating a css class "track" , then adding style "track" to tracked elements. elements are then tracked using : ``` $('.track').on('c...
2017/11/24
[ "https://Stackoverflow.com/questions/47472352", "https://Stackoverflow.com", "https://Stackoverflow.com/users/470184/" ]
Assuming that localhost:4200 is your front-end server, you have to set your php server api path in the call. If your php server in in local on the 8080 port, you type `this.http.get('http://localhost:8080/weather.php',...`
This is because for Angular application is hosted on 4200 port and your PHP file will be using port 80. Try using ``` http://localhot/path/to/weather.php ```
41,236,741
I am using observable in angular .Actually my issue when I click button my `subscribe` function not called why ? as per documentation `subscribe` function will call when we call `next` function <https://plnkr.co/edit/83NaHoVaxiXAeUFoaEmb?p=preview> ``` constructor() { this.data = new Observable(observer => this.dat...
2016/12/20
[ "https://Stackoverflow.com/questions/41236741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3701974/" ]
On basis of Volodymyr Bilyachat suggestion i have modified your code. its working now plz check. Problem was in your way of using dataObserver ``` //our root app component import {Component, NgModule} from '@angular/core' import {BrowserModule} from '@angular/platform-browser' import 'rxjs/Rx'; import {Observable...
In your case, it's better to use this solution: ``` constructor() { this.data = new Subject(); this.data.subscribe(value => { console.log('+++'); console.log(value); }); } hndle() { // TYPO: Probably it was meant to be handle this.name.push({ name: 'navee' }); this.d...
41,236,741
I am using observable in angular .Actually my issue when I click button my `subscribe` function not called why ? as per documentation `subscribe` function will call when we call `next` function <https://plnkr.co/edit/83NaHoVaxiXAeUFoaEmb?p=preview> ``` constructor() { this.data = new Observable(observer => this.dat...
2016/12/20
[ "https://Stackoverflow.com/questions/41236741", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3701974/" ]
On basis of Volodymyr Bilyachat suggestion i have modified your code. its working now plz check. Problem was in your way of using dataObserver ``` //our root app component import {Component, NgModule} from '@angular/core' import {BrowserModule} from '@angular/platform-browser' import 'rxjs/Rx'; import {Observable...
I believe you are subscribing to the observable 2 times. You should be able to fix it by adding .share() ``` constructor() { this.data = new Observable(observer => this.dataObserver = observer).share(); this.data.subscribe(value => { console.log('+++') console.log(value) }) } hndle(){ this....
1,441
When translating Exodus, I became intimately familiar with every sentence (it is really a tremendous form of close reading), and I noticed something amazing. The cases where Moses speaks Hebrew, he always speaks in what I would call "Moses speak", a strangely ungrammatical and inelegant Hebrew that is distinguished by ...
2012/04/04
[ "https://hermeneutics.stackexchange.com/questions/1441", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/442/" ]
Might be 32:11 rather than 34:11. Classical Hebrew does not include consistency of person or voice in the same way that modern English does. Not only is the language different, the idiom is different. You can see this all over the Psalms - what appear to us to be jarring changes of person, voice and subject within a ve...
Thank you for validating that Moses was quoted directly. He said himself that he was not eloquent. As Rashi said, "heavy of mouth: I speak with difficulty, and in old French, it is balbu, stammerer." > > Ex 4:10 ¶ And Moses said unto the LORD, O my Lord, I [am] not > eloquent, neither heretofore, nor since thou hast...
1,441
When translating Exodus, I became intimately familiar with every sentence (it is really a tremendous form of close reading), and I noticed something amazing. The cases where Moses speaks Hebrew, he always speaks in what I would call "Moses speak", a strangely ungrammatical and inelegant Hebrew that is distinguished by ...
2012/04/04
[ "https://hermeneutics.stackexchange.com/questions/1441", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/442/" ]
Might be 32:11 rather than 34:11. Classical Hebrew does not include consistency of person or voice in the same way that modern English does. Not only is the language different, the idiom is different. You can see this all over the Psalms - what appear to us to be jarring changes of person, voice and subject within a ve...
<< *there is a Rabbinical tradition that Moses is a clunky speaker* >> No there isn't. In the Torah [Exodus 4:10], Moses initially resists being God’s messenger because of his speech, saying: “Please, O Lord, I have never been a man of words…. I am heavy of mouth and heavy of tongue.” From this the rabbis concluded t...
1,441
When translating Exodus, I became intimately familiar with every sentence (it is really a tremendous form of close reading), and I noticed something amazing. The cases where Moses speaks Hebrew, he always speaks in what I would call "Moses speak", a strangely ungrammatical and inelegant Hebrew that is distinguished by ...
2012/04/04
[ "https://hermeneutics.stackexchange.com/questions/1441", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/442/" ]
Might be 32:11 rather than 34:11. Classical Hebrew does not include consistency of person or voice in the same way that modern English does. Not only is the language different, the idiom is different. You can see this all over the Psalms - what appear to us to be jarring changes of person, voice and subject within a ve...
Bible clearly states where Moses spent his first 40 years (not among the Hebrews but Egyptians) and the "Book of the Rightous" ie. [Jasher](https://www.sacred-texts.com/chr/apo/jasher/76.htm) clearly states where Moses spent his next 40 years. (See ref#.) Both accounts throw in quite a LOT of details. Don't forget the ...
1,441
When translating Exodus, I became intimately familiar with every sentence (it is really a tremendous form of close reading), and I noticed something amazing. The cases where Moses speaks Hebrew, he always speaks in what I would call "Moses speak", a strangely ungrammatical and inelegant Hebrew that is distinguished by ...
2012/04/04
[ "https://hermeneutics.stackexchange.com/questions/1441", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/442/" ]
<< *there is a Rabbinical tradition that Moses is a clunky speaker* >> No there isn't. In the Torah [Exodus 4:10], Moses initially resists being God’s messenger because of his speech, saying: “Please, O Lord, I have never been a man of words…. I am heavy of mouth and heavy of tongue.” From this the rabbis concluded t...
Thank you for validating that Moses was quoted directly. He said himself that he was not eloquent. As Rashi said, "heavy of mouth: I speak with difficulty, and in old French, it is balbu, stammerer." > > Ex 4:10 ¶ And Moses said unto the LORD, O my Lord, I [am] not > eloquent, neither heretofore, nor since thou hast...
1,441
When translating Exodus, I became intimately familiar with every sentence (it is really a tremendous form of close reading), and I noticed something amazing. The cases where Moses speaks Hebrew, he always speaks in what I would call "Moses speak", a strangely ungrammatical and inelegant Hebrew that is distinguished by ...
2012/04/04
[ "https://hermeneutics.stackexchange.com/questions/1441", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/442/" ]
<< *there is a Rabbinical tradition that Moses is a clunky speaker* >> No there isn't. In the Torah [Exodus 4:10], Moses initially resists being God’s messenger because of his speech, saying: “Please, O Lord, I have never been a man of words…. I am heavy of mouth and heavy of tongue.” From this the rabbis concluded t...
Bible clearly states where Moses spent his first 40 years (not among the Hebrews but Egyptians) and the "Book of the Rightous" ie. [Jasher](https://www.sacred-texts.com/chr/apo/jasher/76.htm) clearly states where Moses spent his next 40 years. (See ref#.) Both accounts throw in quite a LOT of details. Don't forget the ...
12,937,101
I have [Git Source Control Provider](http://gitscc.codeplex.com/wikipage?title=Commit%20Changes&referringTitle=Documentation) setup and running well. For Visual Studio projects, that is. The problem is that each such project is **tightly tied** to a SQL Server database. I know [how to version control a database](htt...
2012/10/17
[ "https://Stackoverflow.com/questions/12937101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1498636/" ]
You can install the `SQL Server Data Tools` if you want to, but you don't have to: You can [Use the Database Publishing Wizard to script your table data](http://weblogs.asp.net/jgalloway/archive/2006/12/29/tip-use-the-database-publishing-wizard-to-script-your-table-data.aspx) **right from Visual Studio** into the solut...
You can store your database schema as Visual studio project using [SQL Server Data Tools](http://msdn.microsoft.com/en-us/data/tools.aspx) and then version control this project using Git.
12,937,101
I have [Git Source Control Provider](http://gitscc.codeplex.com/wikipage?title=Commit%20Changes&referringTitle=Documentation) setup and running well. For Visual Studio projects, that is. The problem is that each such project is **tightly tied** to a SQL Server database. I know [how to version control a database](htt...
2012/10/17
[ "https://Stackoverflow.com/questions/12937101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1498636/" ]
You can install the `SQL Server Data Tools` if you want to, but you don't have to: You can [Use the Database Publishing Wizard to script your table data](http://weblogs.asp.net/jgalloway/archive/2006/12/29/tip-use-the-database-publishing-wizard-to-script-your-table-data.aspx) **right from Visual Studio** into the solut...
Being in the database version control space for 5 years (as director of product management at [DBmaestro](http://www.dbmaestro.com)) and having worked as a DBA for over two decades, I can tell you the simple fact that you cannot treat the database objects as you treat your Java, C# or other files and save the changes i...
37,066,221
Here is a shell script reading the file. ``` #!/bin/sh procDate=$1 echo "Date $procDate" file=`cat filename_$procDate.txt` echo "$file" ``` I want to convert it to Perl and use the `split` operator with pipe `|` as delimiter.
2016/05/06
[ "https://Stackoverflow.com/questions/37066221", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6299016/" ]
It's far from clear from your question what it is that you want to do with these fields once you have split them Your own shell script uses `cat` to copy the entire contents of your file into `$file`, but that's unlikely to be what you need to do A very generalised Perl program would look like this ``` use strict; u...
``` #!/usr/bin/perl use strict; use warnings; use Data::Dumper; open(FILE, "<filename_$procDate.txt") or die "Couldn't open file filename_$procDate.txt, $!"; while ( my $line = <FILE> ) { print "Line content is $line\n"; my @line_content = split(/\|/, $line); print Dumper (\@line_content); } close (FIL...
44,913,999
I am new to functional programming and Haskell. Trying to learn it. Not sure what is wrong with the following definition: Function definition in test.h ``` drop5 [a] = drop 5 [a] ``` Trying to use this function I get Program error ``` $:load test.h $drop5 [2,3,4,5,6,7,8] Program error: pattern match failure: dro...
2017/07/04
[ "https://Stackoverflow.com/questions/44913999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2913687/" ]
In the first definition, `[a]` is a pattern that only matches a list of exactly one element, and that element becomes known as `a` in the right part of the rule. Thus, you define the function as only accepting singleton lists. Moreover, dropping 5 elements from a list that only has one obviously results in an empty l...
Your function definition: ``` drop5 [a] = drop 5 [a] ``` Specifies that the clause only "fires" for lists with exactly *one* element. Indeed in a function definition `[a]` is **not the type** of the parameter, it is **a pattern**. The pattern `[a]` means that we are working with a list with exactly one element. If ...
44,913,999
I am new to functional programming and Haskell. Trying to learn it. Not sure what is wrong with the following definition: Function definition in test.h ``` drop5 [a] = drop 5 [a] ``` Trying to use this function I get Program error ``` $:load test.h $drop5 [2,3,4,5,6,7,8] Program error: pattern match failure: dro...
2017/07/04
[ "https://Stackoverflow.com/questions/44913999", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2913687/" ]
In the first definition, `[a]` is a pattern that only matches a list of exactly one element, and that element becomes known as `a` in the right part of the rule. Thus, you define the function as only accepting singleton lists. Moreover, dropping 5 elements from a list that only has one obviously results in an empty l...
`[a]` is telling Haskell that there is only one element in a list, while `ns` tells Haskell that it could be anything (even a boolean if you want) until you finish the function and it identifies the output and input type. You could also explicitly tell Haskell what the input and output type is by adding this above that...
26,444
I have been trying this *notoriously difficult problem* for quite some time but i haven't made any progress. Let $\mathscr{I}(V)$ denote the set of all homomorphisms $f : V \to V$. That is $\mathscr{I}(V) = \text{Hom}(V,V)$. * Suppose $V$ is a vector space over a field $K$ and $\text{dim}\_{K}(V)>1$, then prove that...
2011/03/11
[ "https://math.stackexchange.com/questions/26444", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Let $c\colon\mathbb R P^{2n+1}\to \mathbb C P^n$ be the map from the post and let $v\_2\colon\mathbb C P^n\to \mathbb C P^{N}$ be the degree 2 Veronese embedding. Their composition induces zero map on K-theory. So one gets a map $K\_0(\mathbb R P^{2n+1})\gets K\_0(\mathbb C P^n)/\operatorname{Im} v\_2^\*=\mathbb Z[t]/\...
I could not comment on this now for unknown reason, so I will venture a proof, which means myself is not very sure. All the $K$ groups below are reduced $K$ groups as $\overline{K}$ is quite complicated to type. For $n=2k+1$ we have $$K^{0}(S\_{n},X)\rightarrow K^{0}(S\_{n})\rightarrow K^{0}(X)\rightarrow K^{-1}(S^{n...
26,444
I have been trying this *notoriously difficult problem* for quite some time but i haven't made any progress. Let $\mathscr{I}(V)$ denote the set of all homomorphisms $f : V \to V$. That is $\mathscr{I}(V) = \text{Hom}(V,V)$. * Suppose $V$ is a vector space over a field $K$ and $\text{dim}\_{K}(V)>1$, then prove that...
2011/03/11
[ "https://math.stackexchange.com/questions/26444", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
Using the long exact sequence of the pair $(\mathbb{R}\mathbb{P}^{n},\mathbb{R}\mathbb{P}^{n-1})$. For n=odd, we should have the exact sequence $$..\mathbb{Z}\rightarrow K^{-1}(\mathbb{R}\mathbb{P}^{n})\rightarrow K^{-1}(\mathbb{R}\mathbb{P}^{n-1})\rightarrow 0\rightarrow K^{0}(\mathbb{R}\mathbb{P}^{n})\rightarrow K^{0...
I could not comment on this now for unknown reason, so I will venture a proof, which means myself is not very sure. All the $K$ groups below are reduced $K$ groups as $\overline{K}$ is quite complicated to type. For $n=2k+1$ we have $$K^{0}(S\_{n},X)\rightarrow K^{0}(S\_{n})\rightarrow K^{0}(X)\rightarrow K^{-1}(S^{n...
20,548,783
I have done my project with XNA and I'm currently trying to convert it while using Monogame. My problem is that i can't load my XML file. the error: `Could not load Level asset as a non-content file!` My code: `file = Content.Load<XmlData[]>(path);` Path = xml name file without extension. (i tried both). class XM...
2013/12/12
[ "https://Stackoverflow.com/questions/20548783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2783603/" ]
Try that: ``` $('.image').each(function (i) { $(this).delay(i*1000).queue(function (next) { $(this).addClass('img-vis'); next(); //used just to dequeue }); }); ```
you mean something like this: ``` $(document).scroll(function(){ if($(this).scrollTop() > t) { setTimeout( addImgVis, 1000 ); } }); function addImgVis(){ $('.image').addClass('img-vis'); } ``` that will add the class 1 second ( ie. 1000 milliseconds ) after it executes w/in ur scroll func...
16,137,129
I have a control in a nested masterPage, that I need to get at in the codebehind. Ive tried various things and havent been able to get a successful result. The control is a panel called: ``` pnlNewsHeader ``` And this renders on the page as: ``` MainContent_MainContent_ContentBottom_pnlNewsHeader ``` These addit...
2013/04/21
[ "https://Stackoverflow.com/questions/16137129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/619792/" ]
You can get a reference to the master page by calling me.Master: ``` Dim blogsMaster as Blogs = CType(me.Master, Blogs) ``` or in C#: ``` Blogs blogsMaster = (Blogs)this.Master; ``` Then you can just use blogsMaster as you would the page's class (me).
add this markup to the top of you page and access your masterpage in code behind. Update the address of you master pages. ``` <%@ MasterType VirtualPath="~/MasterPages/Main.master" %> ```
7,998,687
What is the best method for counting the number of times a string appears within a string using JS? For example: ``` count("fat math cat", "at") returns 3 ```
2011/11/03
[ "https://Stackoverflow.com/questions/7998687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436493/" ]
Use a regex and then the number of matches can be found from the returned array. This is the naive approach using regex. ``` 'fat cat'.match(/at/g).length ``` To protect against cases where the string doesn't match, use: ``` ( 'fat cat'.match(/at/g) || [] ).length ```
Here: ``` function count( string, substring ) { var result = string.match( RegExp( '(' + substring + ')', 'g' ) ); return result ? result.length : 0; } ```
7,998,687
What is the best method for counting the number of times a string appears within a string using JS? For example: ``` count("fat math cat", "at") returns 3 ```
2011/11/03
[ "https://Stackoverflow.com/questions/7998687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436493/" ]
Use a regex and then the number of matches can be found from the returned array. This is the naive approach using regex. ``` 'fat cat'.match(/at/g).length ``` To protect against cases where the string doesn't match, use: ``` ( 'fat cat'.match(/at/g) || [] ).length ```
Can use `indexOf` in a loop: ``` function count(haystack, needle) { var count = 0; var idx = -1; haystack.indexOf(needle, idx + 1); while (idx != -1) { count++; idx = haystack.indexOf(needle, idx + 1); } return count; } ```
7,998,687
What is the best method for counting the number of times a string appears within a string using JS? For example: ``` count("fat math cat", "at") returns 3 ```
2011/11/03
[ "https://Stackoverflow.com/questions/7998687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436493/" ]
Use a regex and then the number of matches can be found from the returned array. This is the naive approach using regex. ``` 'fat cat'.match(/at/g).length ``` To protect against cases where the string doesn't match, use: ``` ( 'fat cat'.match(/at/g) || [] ).length ```
Don't use this, it's overcomplicated: ``` function count(sample, searchTerm) { if(sample == null || searchTerm == null) { return 0; } if(sample.indexOf(searchTerm) == -1) { return 0; } return count(sample.substring(sample.indexOf(searchTerm)+searchTerm.length), searchTerm)+1; } ```
7,998,687
What is the best method for counting the number of times a string appears within a string using JS? For example: ``` count("fat math cat", "at") returns 3 ```
2011/11/03
[ "https://Stackoverflow.com/questions/7998687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436493/" ]
Use a regex and then the number of matches can be found from the returned array. This is the naive approach using regex. ``` 'fat cat'.match(/at/g).length ``` To protect against cases where the string doesn't match, use: ``` ( 'fat cat'.match(/at/g) || [] ).length ```
``` function count(str,ma){ var a = new RegExp(ma,'g'); // Create a RegExp that searches for the text ma globally return str.match(a).length; //Return the length of the array of matches } ``` Then call it the way you did in your example. `count('fat math cat','at');`
7,998,687
What is the best method for counting the number of times a string appears within a string using JS? For example: ``` count("fat math cat", "at") returns 3 ```
2011/11/03
[ "https://Stackoverflow.com/questions/7998687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436493/" ]
Use a regex and then the number of matches can be found from the returned array. This is the naive approach using regex. ``` 'fat cat'.match(/at/g).length ``` To protect against cases where the string doesn't match, use: ``` ( 'fat cat'.match(/at/g) || [] ).length ```
You can use `split` also: ``` function getCount(str,d) { return str.split(d).length - 1; } getCount("fat math cat", "at"); // return 3 ```
7,998,687
What is the best method for counting the number of times a string appears within a string using JS? For example: ``` count("fat math cat", "at") returns 3 ```
2011/11/03
[ "https://Stackoverflow.com/questions/7998687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436493/" ]
Here: ``` function count( string, substring ) { var result = string.match( RegExp( '(' + substring + ')', 'g' ) ); return result ? result.length : 0; } ```
Can use `indexOf` in a loop: ``` function count(haystack, needle) { var count = 0; var idx = -1; haystack.indexOf(needle, idx + 1); while (idx != -1) { count++; idx = haystack.indexOf(needle, idx + 1); } return count; } ```
7,998,687
What is the best method for counting the number of times a string appears within a string using JS? For example: ``` count("fat math cat", "at") returns 3 ```
2011/11/03
[ "https://Stackoverflow.com/questions/7998687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436493/" ]
Here: ``` function count( string, substring ) { var result = string.match( RegExp( '(' + substring + ')', 'g' ) ); return result ? result.length : 0; } ```
Don't use this, it's overcomplicated: ``` function count(sample, searchTerm) { if(sample == null || searchTerm == null) { return 0; } if(sample.indexOf(searchTerm) == -1) { return 0; } return count(sample.substring(sample.indexOf(searchTerm)+searchTerm.length), searchTerm)+1; } ```
7,998,687
What is the best method for counting the number of times a string appears within a string using JS? For example: ``` count("fat math cat", "at") returns 3 ```
2011/11/03
[ "https://Stackoverflow.com/questions/7998687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436493/" ]
Here: ``` function count( string, substring ) { var result = string.match( RegExp( '(' + substring + ')', 'g' ) ); return result ? result.length : 0; } ```
``` function count(str,ma){ var a = new RegExp(ma,'g'); // Create a RegExp that searches for the text ma globally return str.match(a).length; //Return the length of the array of matches } ``` Then call it the way you did in your example. `count('fat math cat','at');`
7,998,687
What is the best method for counting the number of times a string appears within a string using JS? For example: ``` count("fat math cat", "at") returns 3 ```
2011/11/03
[ "https://Stackoverflow.com/questions/7998687", "https://Stackoverflow.com", "https://Stackoverflow.com/users/436493/" ]
Here: ``` function count( string, substring ) { var result = string.match( RegExp( '(' + substring + ')', 'g' ) ); return result ? result.length : 0; } ```
You can use `split` also: ``` function getCount(str,d) { return str.split(d).length - 1; } getCount("fat math cat", "at"); // return 3 ```
414,555
I am on Catalina 10.15.3 and do not want to move to Big Sur just yet. Software Update does have the option to update to Big Sur but I am unable to determine how to do just a minor point update. How do I install the latest update of Catalina? **Update** From a comment by @jefe2000 I am trying the command line version a...
2021/02/26
[ "https://apple.stackexchange.com/questions/414555", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/55242/" ]
Download and install the [Catalina 10.15.7 Combo Update](https://support.apple.com/kb/DL2052?locale=en_GB) from Apple.
The command line version of the macOS software update — `/usr/sbin/softwareupdate` — has the capability to ignore specified updates. The `--ignore` command line option performs the functionality. From the `sofwareupdate` man page: > > > ``` > --ignore identifier ... > Manages the per-machine list of ignored upd...
414,555
I am on Catalina 10.15.3 and do not want to move to Big Sur just yet. Software Update does have the option to update to Big Sur but I am unable to determine how to do just a minor point update. How do I install the latest update of Catalina? **Update** From a comment by @jefe2000 I am trying the command line version a...
2021/02/26
[ "https://apple.stackexchange.com/questions/414555", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/55242/" ]
Download and install the [Catalina 10.15.7 Combo Update](https://support.apple.com/kb/DL2052?locale=en_GB) from Apple.
You should be able to install the update with the following: `softwareupdate --install "macOS Catalina 10.15.7 Update" --restart`
414,555
I am on Catalina 10.15.3 and do not want to move to Big Sur just yet. Software Update does have the option to update to Big Sur but I am unable to determine how to do just a minor point update. How do I install the latest update of Catalina? **Update** From a comment by @jefe2000 I am trying the command line version a...
2021/02/26
[ "https://apple.stackexchange.com/questions/414555", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/55242/" ]
You should be able to install the update with the following: `softwareupdate --install "macOS Catalina 10.15.7 Update" --restart`
The command line version of the macOS software update — `/usr/sbin/softwareupdate` — has the capability to ignore specified updates. The `--ignore` command line option performs the functionality. From the `sofwareupdate` man page: > > > ``` > --ignore identifier ... > Manages the per-machine list of ignored upd...
22,985,987
Apologies if my following question sounds trivial but I'm struggling with the fundamental concept of "converting an a char array to a string" for use in the method `strstr()`. Essentially I have an array called `EUI_only[]` which is dynamically populated at a certain stage of my program i.e. ``` EUI_only[0] = A; EUI...
2014/04/10
[ "https://Stackoverflow.com/questions/22985987", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1565545/" ]
If your only definition is `char EUI_only[];` then it actually has a size of `1`. You cause a buffer overflow by writing 5 characters to it. In C, arrays don't automatically resize; they have a fixed size for their lifetime. Successfully printing its contents doesn't prove anything, as it could perhaps happen that you...
C strings are terminated by null `'\0'` character `EUI_only[5] = '\0' ;` and `receive_key_press_temporary_analysis_buffer[10] = '\0' ;` Make sure you have extra space for null character at declaration.