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
33,934
Madara gave his Rinnegan to Nagato. But after Kabuto brings him back using Edo Tensei, he still has the Rinnegan. How is this possible?
2016/06/25
[ "https://anime.stackexchange.com/questions/33934", "https://anime.stackexchange.com", "https://anime.stackexchange.com/users/16712/" ]
Narutopedia: > > **A reincarnated individual will have all the abilities they had during their life, including kekkei genkai and kekkei tōta.** They are psychically restored as they were at the time of their death, including any physical handicaps they may have possessed, such as Nagato's damaged legs. > > > Sinc...
Actually Madara didn't give Nagato the Rinnegan,he only awakened it in him,and as he was an Uzumaki (which are distant relatives of Senju),he was able to control it.Madara got the Rinnegan by merging Hashirama's cells with his heart,awakening his Rinnegan very late in his life,after which he shortly died.That is why,wh...
196,528
I can see that it is 101 'moving to the right' but I cannot think of a short way to generate it in R language. \$\begin{bmatrix} 0 & 1 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 & 0 & 1 \\ 0 & 0 & 0 & 0 & 1 & 0 \\ \end{bmatrix}\$
2019/11/30
[ "https://codegolf.stackexchange.com/questions/196528", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/90705/" ]
[R](https://www.r-project.org/), ~~24~~ ~~23~~ ~~22~~ 20 bytes ============================================================== ```r diag(0,6)+c(!-1:4,1) ``` [Try it online!](https://tio.run/##K/r/PyUzMV3DQMdMUztZQ1HX0MpEx1Dz/38A "R – Try It Online") Just use R's recycling! This does give a warning, but otherwise is ...
[R](https://www.r-project.org/), 34 bytes ========================================= ```r x=cbind(rbind(0,diag(5)),0) x+t(x) ``` [Try it online!](https://tio.run/##K/r/v8I2OSkzL0WjCEwa6KRkJqZrmGpq6hhoclVol2hUaP7/DwA "R – Try It Online") Outputs ```r [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0 1 0 0 0 ...
196,528
I can see that it is 101 'moving to the right' but I cannot think of a short way to generate it in R language. \$\begin{bmatrix} 0 & 1 & 0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 & 0 & 0 \\ 0 & 1 & 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 & 0 & 1 \\ 0 & 0 & 0 & 0 & 1 & 0 \\ \end{bmatrix}\$
2019/11/30
[ "https://codegolf.stackexchange.com/questions/196528", "https://codegolf.stackexchange.com", "https://codegolf.stackexchange.com/users/90705/" ]
[R](https://www.r-project.org/), ~~30~~ 27 bytes ================================================ ```r +!abs(outer(1:6,1:6,`-`))-1 ``` [Try it online!](https://tio.run/##K/r/X1sxMalYI7@0JLVIw9DKTAeEE3QTNDV1Df//BwA "R – Try It Online") Another alternative. Note this matrix shows which integers between 1 and 6 are ex...
[R](https://www.r-project.org/), 34 bytes ========================================= ```r x=cbind(rbind(0,diag(5)),0) x+t(x) ``` [Try it online!](https://tio.run/##K/r/v8I2OSkzL0WjCEwa6KRkJqZrmGpq6hhoclVol2hUaP7/DwA "R – Try It Online") Outputs ```r [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0 1 0 0 0 ...
16,007,712
``` //Loop to initialize the array of structs; set count to zero for(int i = 0; i < 26; i++) { //This segment sets the uppercase letters letterList[i].letter = static_cast<char>(65 + i); letterList[i].count = 0; //This segment sets the lowercase letters letterList[i + 26].letter = static_cast<char...
2013/04/15
[ "https://Stackoverflow.com/questions/16007712", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2281168/" ]
I dont see any problem for this codes ouput ``` letterType letterList[52]; for(int i = 0; i < 26; i++) { //This segment sets the uppercase letters letterList[i].letter = static_cast<char>('A' + i); letterList[i].count = 0; //This segment sets the lowercase letters l...
``` for(int i=0, c='a'; i<26; i++) { letterList[i] = c++; } for(int i=26,c='a'; i<52; i++) { letterList[i] = toupper(c++); } ``` Alternatively, you can replace the second for loop with this: ``` for(int i=26,c='A'; i<52; i++) { letterList[i] = c++; } ``` **EDIT** Based on your requirement...
76,256
I have an iPad retina and would like to load data from a MS Duo memory card (the proprietary format for Sony digital cameras). What are my options? Unfortunately, using the USB port of the digital camera is not an option as my camera does not have one. **EDIT** According to several forums, using a USB memory car...
2012/12/29
[ "https://apple.stackexchange.com/questions/76256", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/37503/" ]
1. Buy a USB memory card reader that supports MS Duo cards. Make sure that it is compatible with OS X. 2. Attach the card reader to a powered USB hub and connect that to the USB port of your Camera Connection Kit. Insert the card in the reader. Attach the kit to the iPad.
One option is to put a [MS Duo to MicroSD card adapter](http://rads.stackoverflow.com/amzn/click/B00176F2RC) in your camera, then put the MicroSD card in the Camera Connection Kit's SD Card reader (via a MicroSD to SD card adapter).
387,060
Let $f:\left[a,b\right]\to\mathbb{R}$ be a function that is derivative so that $f'$ is continuous then $$ \lim\_{n\to\infty}\int\limits \_{a}^{b}\sin\left(nt\right)f\left(t\right)dt=0 $$ My attempt: I want to show that $\forall\epsilon>0 \ \exists \ n\_0 \in \mathbb{N}$ so that $\forall n>n\_0 \ \ \ \left|\int\limits...
2013/05/09
[ "https://math.stackexchange.com/questions/387060", "https://math.stackexchange.com", "https://math.stackexchange.com/users/75812/" ]
Good idea. You just did the wrong integration by parts. Instead $$ \int\_a^b\sin(nt)f(t)dt=\frac{-\cos(nt)f(t)}{n}\Big|\_a^b+\frac{1}{n}\int\_a^b\cos(nt)f'(t)dt. $$ Now it is easy to see why the rhs tends to $0$. **Note:** this follows from Riemann-Lebesgue lemma as soon as $f$ is Lebesgue integrable over the interval...
You're integrating the wrong thing by parts. Use the technique on the actual expression you want the limit of, differentiating $f$ and integrating $\sin$ to get a $1/n$ which is small. Then have a go at bounding the thing it multiplies by something finite. A very crude estimate will do!
387,060
Let $f:\left[a,b\right]\to\mathbb{R}$ be a function that is derivative so that $f'$ is continuous then $$ \lim\_{n\to\infty}\int\limits \_{a}^{b}\sin\left(nt\right)f\left(t\right)dt=0 $$ My attempt: I want to show that $\forall\epsilon>0 \ \exists \ n\_0 \in \mathbb{N}$ so that $\forall n>n\_0 \ \ \ \left|\int\limits...
2013/05/09
[ "https://math.stackexchange.com/questions/387060", "https://math.stackexchange.com", "https://math.stackexchange.com/users/75812/" ]
Good idea. You just did the wrong integration by parts. Instead $$ \int\_a^b\sin(nt)f(t)dt=\frac{-\cos(nt)f(t)}{n}\Big|\_a^b+\frac{1}{n}\int\_a^b\cos(nt)f'(t)dt. $$ Now it is easy to see why the rhs tends to $0$. **Note:** this follows from Riemann-Lebesgue lemma as soon as $f$ is Lebesgue integrable over the interval...
For future references, this is a special case of the Riemann Lebesgue Lemma (well, [this](http://www.proofwiki.org/wiki/Riemann-Lebesgue_Lemma) is *the* Riemann Lebesgue Lemma, really). It states: > > **T** Let $f:[a,b]\to\Bbb R$ be Riemann integrable over $[a,b]$. Then $$\lim\_{\lambda\to\infty}\int\_a^b f(t)\sin\la...
387,060
Let $f:\left[a,b\right]\to\mathbb{R}$ be a function that is derivative so that $f'$ is continuous then $$ \lim\_{n\to\infty}\int\limits \_{a}^{b}\sin\left(nt\right)f\left(t\right)dt=0 $$ My attempt: I want to show that $\forall\epsilon>0 \ \exists \ n\_0 \in \mathbb{N}$ so that $\forall n>n\_0 \ \ \ \left|\int\limits...
2013/05/09
[ "https://math.stackexchange.com/questions/387060", "https://math.stackexchange.com", "https://math.stackexchange.com/users/75812/" ]
For future references, this is a special case of the Riemann Lebesgue Lemma (well, [this](http://www.proofwiki.org/wiki/Riemann-Lebesgue_Lemma) is *the* Riemann Lebesgue Lemma, really). It states: > > **T** Let $f:[a,b]\to\Bbb R$ be Riemann integrable over $[a,b]$. Then $$\lim\_{\lambda\to\infty}\int\_a^b f(t)\sin\la...
You're integrating the wrong thing by parts. Use the technique on the actual expression you want the limit of, differentiating $f$ and integrating $\sin$ to get a $1/n$ which is small. Then have a go at bounding the thing it multiplies by something finite. A very crude estimate will do!
19,922,602
The goal: > > Write a function that takes two parameters: (1) a String representing a text document and (2) an integer providing the number of items to return. Implement the function such that it returns a list of Strings ordered by word frequency, the most frequently occurring word first. Use your best judgement to ...
2013/11/12
[ "https://Stackoverflow.com/questions/19922602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1218599/" ]
One idea is following: 1. You are already constructing a hash map that gives the frequency of a given word. 2. Now iterate through this hash map and create a reverse "hash set". That is the set of words for a given frequency. 3. Find the maximum frequency and output the set of words for that frequency. 4. Decrement it...
Sample, quick way :) ``` #assuming you read from the file and get it to a string called str h = {} arr = str.split("\n") arr.each do |i| i.split(" ").each do |w| if h.has_key[w] h[w] += 1 else h[w] = 1 end end end Hash[h.sort_by{|k, v| v}.reverse] ``` This works, but could be improved.
19,922,602
The goal: > > Write a function that takes two parameters: (1) a String representing a text document and (2) an integer providing the number of items to return. Implement the function such that it returns a list of Strings ordered by word frequency, the most frequently occurring word first. Use your best judgement to ...
2013/11/12
[ "https://Stackoverflow.com/questions/19922602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1218599/" ]
Two ways: ``` def word_counter(string, max) string.split(/\s+/) .group_by{|x|x} .map{|x,y|[x,y.size]} .sort_by{|_,size| size} # Have to sort =/ .last(max) end def word_counter(string, max) # Create a Hash and a List to store values in. word_counter, max_storage = Hash.new(0), [...
Sample, quick way :) ``` #assuming you read from the file and get it to a string called str h = {} arr = str.split("\n") arr.each do |i| i.split(" ").each do |w| if h.has_key[w] h[w] += 1 else h[w] = 1 end end end Hash[h.sort_by{|k, v| v}.reverse] ``` This works, but could be improved.
19,922,602
The goal: > > Write a function that takes two parameters: (1) a String representing a text document and (2) an integer providing the number of items to return. Implement the function such that it returns a list of Strings ordered by word frequency, the most frequently occurring word first. Use your best judgement to ...
2013/11/12
[ "https://Stackoverflow.com/questions/19922602", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1218599/" ]
Two ways: ``` def word_counter(string, max) string.split(/\s+/) .group_by{|x|x} .map{|x,y|[x,y.size]} .sort_by{|_,size| size} # Have to sort =/ .last(max) end def word_counter(string, max) # Create a Hash and a List to store values in. word_counter, max_storage = Hash.new(0), [...
One idea is following: 1. You are already constructing a hash map that gives the frequency of a given word. 2. Now iterate through this hash map and create a reverse "hash set". That is the set of words for a given frequency. 3. Find the maximum frequency and output the set of words for that frequency. 4. Decrement it...
26,088,502
I want to know if a `List` is homogeneous. Here is my code : `def isHomogeneous(ls: List[Any]) = ls.map(_.getClass).toSet.size == 1` Is there a better way ?
2014/09/28
[ "https://Stackoverflow.com/questions/26088502", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1437346/" ]
``` def allEqual(xs: Traversable[_]) = xs.headOption.forall(head => xs.forall(_ == head)) def isHomogeneous(xs: Traversable[_]) = allEqual(xs.view.map(_.getClass)) ``` * Keeps the `getClass` business separate from the traversal. * Uses more general type `Traversable` instead of `List`. * Works for `Nil`. * Does ...
How about ``` def isHomogeneous(l: List[Any]) = { val t = l(0).getClass l.forall(_.getClass == t) } ``` So if all elements have the same type as the first, it returns true EDIT: To expand a bit on why I think this solution is better: * It only loops through the list once * It can exit early(If the second eleme...
50,299,475
Is there a way to create a user-defined function using `PROC FCMP` that allows optional parameters? For example, I've written a simple udf in SAS that checks if a string is numeric or not. ``` PROC FCMP OUTLIB = fcns.functions.all; FUNCTION isNumeric(string $); result = ifn(verify(string, " -0123456789") =...
2018/05/11
[ "https://Stackoverflow.com/questions/50299475", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8765475/" ]
Unfortunately, it is not possible to define optional parameters using fcmp. It's a real shame! The closest you can come is to define your last value as an array (of values), using the `varargs` argument. The major problem with this is that all the values must be of the same type. See [documentation](http://support.sa...
Not sure what you were trying to do with the `=0` in the function definition, but that is what is causing it to not compile. ``` 376 FUNCTION isNumeric(string $, symbols=0); - 22 200 ...
1,249,074
i wanna ask that , is there any api to recognize image? i need read data from image...can i read numbers which is printed on image..
2009/08/08
[ "https://Stackoverflow.com/questions/1249074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
`UPDATE()` can be true, even if it's the same value. I would not rely on it personally and would compare values. Second, `DELETED` and `INSERTED` have the same number of rows. The Update() function is not per row, but across all rows. Another reason not to use it. [More here in MSDN](http://msdn.microsoft.com/en-us/...
The update trigger will fire on *all* update statements. the impacted rows are available within the trigger in the "inserted" and "deleted" tables. You can compare the old and new values by comparing the PK columns in the two tables (if you have a PK). The *actual* table remains unchanged till the trigger finishes exec...
1,249,074
i wanna ask that , is there any api to recognize image? i need read data from image...can i read numbers which is printed on image..
2009/08/08
[ "https://Stackoverflow.com/questions/1249074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
`UPDATE()` can be true, even if it's the same value. I would not rely on it personally and would compare values. Second, `DELETED` and `INSERTED` have the same number of rows. The Update() function is not per row, but across all rows. Another reason not to use it. [More here in MSDN](http://msdn.microsoft.com/en-us/...
Triggers are tricky and you need to think in bulk when you're creating one. A trigger fires once for each UPDATE statement. If that UPDATE statement updates multiple rows, the trigger will still only fire once. The UPDATE() function returns true for a column when that column is included in the UPDATE statement. That fu...
1,249,074
i wanna ask that , is there any api to recognize image? i need read data from image...can i read numbers which is printed on image..
2009/08/08
[ "https://Stackoverflow.com/questions/1249074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
`UPDATE()` can be true, even if it's the same value. I would not rely on it personally and would compare values. Second, `DELETED` and `INSERTED` have the same number of rows. The Update() function is not per row, but across all rows. Another reason not to use it. [More here in MSDN](http://msdn.microsoft.com/en-us/...
I agree the best way to determine if a column value has actually changed (as opposed to being updated with the same value) is to do a comparison of the column values in the deleted and inserted pseudo tables. However, this can be a real pain if you want to check more than a few columns. Here's a trick I came across i...
1,249,074
i wanna ask that , is there any api to recognize image? i need read data from image...can i read numbers which is printed on image..
2009/08/08
[ "https://Stackoverflow.com/questions/1249074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
`UPDATE()` can be true, even if it's the same value. I would not rely on it personally and would compare values. Second, `DELETED` and `INSERTED` have the same number of rows. The Update() function is not per row, but across all rows. Another reason not to use it. [More here in MSDN](http://msdn.microsoft.com/en-us/...
I think that the following code is better than the examples above because it focuses on just the columns you want to check in a concise and efficient manner. It determines if a value has changed in only the columns specified. I have not investigated its performance compared with the other solutions but it is working w...
1,249,074
i wanna ask that , is there any api to recognize image? i need read data from image...can i read numbers which is printed on image..
2009/08/08
[ "https://Stackoverflow.com/questions/1249074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Triggers are tricky and you need to think in bulk when you're creating one. A trigger fires once for each UPDATE statement. If that UPDATE statement updates multiple rows, the trigger will still only fire once. The UPDATE() function returns true for a column when that column is included in the UPDATE statement. That fu...
The update trigger will fire on *all* update statements. the impacted rows are available within the trigger in the "inserted" and "deleted" tables. You can compare the old and new values by comparing the PK columns in the two tables (if you have a PK). The *actual* table remains unchanged till the trigger finishes exec...
1,249,074
i wanna ask that , is there any api to recognize image? i need read data from image...can i read numbers which is printed on image..
2009/08/08
[ "https://Stackoverflow.com/questions/1249074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I agree the best way to determine if a column value has actually changed (as opposed to being updated with the same value) is to do a comparison of the column values in the deleted and inserted pseudo tables. However, this can be a real pain if you want to check more than a few columns. Here's a trick I came across i...
The update trigger will fire on *all* update statements. the impacted rows are available within the trigger in the "inserted" and "deleted" tables. You can compare the old and new values by comparing the PK columns in the two tables (if you have a PK). The *actual* table remains unchanged till the trigger finishes exec...
1,249,074
i wanna ask that , is there any api to recognize image? i need read data from image...can i read numbers which is printed on image..
2009/08/08
[ "https://Stackoverflow.com/questions/1249074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I think that the following code is better than the examples above because it focuses on just the columns you want to check in a concise and efficient manner. It determines if a value has changed in only the columns specified. I have not investigated its performance compared with the other solutions but it is working w...
The update trigger will fire on *all* update statements. the impacted rows are available within the trigger in the "inserted" and "deleted" tables. You can compare the old and new values by comparing the PK columns in the two tables (if you have a PK). The *actual* table remains unchanged till the trigger finishes exec...
1,249,074
i wanna ask that , is there any api to recognize image? i need read data from image...can i read numbers which is printed on image..
2009/08/08
[ "https://Stackoverflow.com/questions/1249074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Triggers are tricky and you need to think in bulk when you're creating one. A trigger fires once for each UPDATE statement. If that UPDATE statement updates multiple rows, the trigger will still only fire once. The UPDATE() function returns true for a column when that column is included in the UPDATE statement. That fu...
I agree the best way to determine if a column value has actually changed (as opposed to being updated with the same value) is to do a comparison of the column values in the deleted and inserted pseudo tables. However, this can be a real pain if you want to check more than a few columns. Here's a trick I came across i...
1,249,074
i wanna ask that , is there any api to recognize image? i need read data from image...can i read numbers which is printed on image..
2009/08/08
[ "https://Stackoverflow.com/questions/1249074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Triggers are tricky and you need to think in bulk when you're creating one. A trigger fires once for each UPDATE statement. If that UPDATE statement updates multiple rows, the trigger will still only fire once. The UPDATE() function returns true for a column when that column is included in the UPDATE statement. That fu...
I think that the following code is better than the examples above because it focuses on just the columns you want to check in a concise and efficient manner. It determines if a value has changed in only the columns specified. I have not investigated its performance compared with the other solutions but it is working w...
1,249,074
i wanna ask that , is there any api to recognize image? i need read data from image...can i read numbers which is printed on image..
2009/08/08
[ "https://Stackoverflow.com/questions/1249074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I agree the best way to determine if a column value has actually changed (as opposed to being updated with the same value) is to do a comparison of the column values in the deleted and inserted pseudo tables. However, this can be a real pain if you want to check more than a few columns. Here's a trick I came across i...
I think that the following code is better than the examples above because it focuses on just the columns you want to check in a concise and efficient manner. It determines if a value has changed in only the columns specified. I have not investigated its performance compared with the other solutions but it is working w...
253,300
I'm at a dead end with the following question, It seems simple enough but I cant seem to see it. Let G be a simple undirected graph with minimal degree 3, show that G contains an even cycle. Thanks.
2012/12/07
[ "https://math.stackexchange.com/questions/253300", "https://math.stackexchange.com", "https://math.stackexchange.com/users/28606/" ]
Consider the maximal path $P$ in the graph G. Let it be $u\_1u\_2...u\_k$. By the maximality of the path $P$, we know that all neighbors of $u\_1$ belong to {$u\_2,u\_3,...,u\_k$}. Since $3\leq \deg(u\_1)$, let $u\_i,u\_j$ be two neighbors of $u\_1$ such that $2<i<j$. Now it is easy to show that one of the following cy...
**Hint 1**: Find a cycle $c$ in $G$ and a path $\pi$ that connects two vertices of $c$ without using an edge of $c$. The path splits $c$ into two cycles $c\_1$ and $c\_2$. If both $c\_1$ and $c\_2$ are odd cycles, then the paths $c\_1 \setminus \pi$ and $c\_2 \setminus \pi$ are either both even or both odd. Hence $c$...
46,292,304
I have a Jenkinsfile that needs to ask for a password. I have the following: ``` def password = input message: 'Please enter the password', parameters: [string(defaultValue: '', description: '', name: 'password')] ``` The problem is that the field shows up the characters in Jenkins when I type them in meaning anyon...
2017/09/19
[ "https://Stackoverflow.com/questions/46292304", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4277304/" ]
Use a `password` parameter named ‘hidden‘ as following: ``` input message: 'enter password', parameters: [password(defaultValue: 'value', description: '', name: 'hidden')] ```
@hayderimran7 was almost there but did not address my comment in his answer so posting it here. Use a `password` parameter as following: `input message: 'enter password', parameters: [password(defaultValue: 'value', description: '', name: 'hidden')]`
24,784
Has anyone configured FTP rules in the Meraki MX family of network devices? Locally, inside the LAN, I can login to the FTP server (IIS Windows 2012 server) without problems; but, I cannot login from outside (via WAN). The FTP Server uses Passive mode. Later I'm going to attached links from Meraki and YouTube webs...
2015/11/27
[ "https://networkengineering.stackexchange.com/questions/24784", "https://networkengineering.stackexchange.com", "https://networkengineering.stackexchange.com/users/20972/" ]
[Active and Passive FTP Overview and Configuration](https://documentation.meraki.com/MX-Z/NAT_and_Port_Forwarding/Active_and_Passive_FTP_Overview_and_Configuration) Under Security Appliance > Firewall, configure a 1:1 NAT with the allowed inbound connections. > > Two firewall rules are necessary for passive FTP to f...
Allow port forward on TCP 21 to your server Same for TCP 50000 - 50100 following advice of <https://wiki.filezilla-project.org/Network_Configuration#Active_mode> Worked for me on Meraki MX64w
18,624,231
I am working on a Excel VSTO project with C#. Excel will auto-format codes like "SEP-1" to a date, which is not what is supposed to happen. Is there a way to turn off this feature on a spreadsheet in code? Thanks!
2013/09/04
[ "https://Stackoverflow.com/questions/18624231", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1898994/" ]
By default, the environment variable is only set for the current process (and inherited in any child processes that spawn from it). You're probably looking for the [overload](http://msdn.microsoft.com/en-us/library/96xafkes.aspx) which lets you specify an [EnvironmentVariableTarget](http://msdn.microsoft.com/en-us/libr...
To set the environment variable for the the current process: ``` Environment.SetEnvironmentVariable(String EnvironmentVariableName, String EnvironmentVariableValue, EnvironmentVariableTarget.Process) ``` To set the environment variable for the the current user: ``` Environment.SetEnvironmentVariable(String Environm...
2,416,844
friends, i have created custom title bar using following titlebar.xml file with code ``` <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myTitle" android:text="This is my new title" android:layout_width="fill_parent" android:...
2010/03/10
[ "https://Stackoverflow.com/questions/2416844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249991/" ]
Have you tried the [`setTitle()`](http://developer.android.com/reference/android/app/Activity.html#setTitle%28java.lang.CharSequence%29) method of your `Activity`?
Try the following: ``` @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.main); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle); TextView my...
2,416,844
friends, i have created custom title bar using following titlebar.xml file with code ``` <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myTitle" android:text="This is my new title" android:layout_width="fill_parent" android:...
2010/03/10
[ "https://Stackoverflow.com/questions/2416844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249991/" ]
This is the way to set the custom title: ``` @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final boolean customTitleSupported = requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.main); if ( customTitleSupported ) { ...
Have you tried the [`setTitle()`](http://developer.android.com/reference/android/app/Activity.html#setTitle%28java.lang.CharSequence%29) method of your `Activity`?
2,416,844
friends, i have created custom title bar using following titlebar.xml file with code ``` <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myTitle" android:text="This is my new title" android:layout_width="fill_parent" android:...
2010/03/10
[ "https://Stackoverflow.com/questions/2416844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249991/" ]
Have you tried the [`setTitle()`](http://developer.android.com/reference/android/app/Activity.html#setTitle%28java.lang.CharSequence%29) method of your `Activity`?
**my\_title.xml** ```xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:id="@+id/header" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_width="fill_parent" android:background="#d4e9a9"> <ImageView android:src="@drawable/je...
2,416,844
friends, i have created custom title bar using following titlebar.xml file with code ``` <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myTitle" android:text="This is my new title" android:layout_width="fill_parent" android:...
2010/03/10
[ "https://Stackoverflow.com/questions/2416844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249991/" ]
SDK 2.1+ ``` @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setTitle("========= NEW TITLE =========="); } ```
Have you tried the [`setTitle()`](http://developer.android.com/reference/android/app/Activity.html#setTitle%28java.lang.CharSequence%29) method of your `Activity`?
2,416,844
friends, i have created custom title bar using following titlebar.xml file with code ``` <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myTitle" android:text="This is my new title" android:layout_width="fill_parent" android:...
2010/03/10
[ "https://Stackoverflow.com/questions/2416844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249991/" ]
This is the way to set the custom title: ``` @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final boolean customTitleSupported = requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.main); if ( customTitleSupported ) { ...
Try the following: ``` @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.main); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle); TextView my...
2,416,844
friends, i have created custom title bar using following titlebar.xml file with code ``` <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myTitle" android:text="This is my new title" android:layout_width="fill_parent" android:...
2010/03/10
[ "https://Stackoverflow.com/questions/2416844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249991/" ]
**my\_title.xml** ```xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:id="@+id/header" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_width="fill_parent" android:background="#d4e9a9"> <ImageView android:src="@drawable/je...
Try the following: ``` @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.main); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle); TextView my...
2,416,844
friends, i have created custom title bar using following titlebar.xml file with code ``` <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myTitle" android:text="This is my new title" android:layout_width="fill_parent" android:...
2010/03/10
[ "https://Stackoverflow.com/questions/2416844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249991/" ]
SDK 2.1+ ``` @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setTitle("========= NEW TITLE =========="); } ```
Try the following: ``` @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.main); getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.mytitle); TextView my...
2,416,844
friends, i have created custom title bar using following titlebar.xml file with code ``` <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myTitle" android:text="This is my new title" android:layout_width="fill_parent" android:...
2010/03/10
[ "https://Stackoverflow.com/questions/2416844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249991/" ]
This is the way to set the custom title: ``` @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final boolean customTitleSupported = requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.main); if ( customTitleSupported ) { ...
**my\_title.xml** ```xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:id="@+id/header" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_width="fill_parent" android:background="#d4e9a9"> <ImageView android:src="@drawable/je...
2,416,844
friends, i have created custom title bar using following titlebar.xml file with code ``` <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myTitle" android:text="This is my new title" android:layout_width="fill_parent" android:...
2010/03/10
[ "https://Stackoverflow.com/questions/2416844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249991/" ]
This is the way to set the custom title: ``` @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final boolean customTitleSupported = requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); setContentView(R.layout.main); if ( customTitleSupported ) { ...
SDK 2.1+ ``` @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setTitle("========= NEW TITLE =========="); } ```
2,416,844
friends, i have created custom title bar using following titlebar.xml file with code ``` <?xml version="1.0" encoding="utf-8"?> <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/myTitle" android:text="This is my new title" android:layout_width="fill_parent" android:...
2010/03/10
[ "https://Stackoverflow.com/questions/2416844", "https://Stackoverflow.com", "https://Stackoverflow.com/users/249991/" ]
SDK 2.1+ ``` @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); setTitle("========= NEW TITLE =========="); } ```
**my\_title.xml** ```xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:id="@+id/header" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content" android:layout_width="fill_parent" android:background="#d4e9a9"> <ImageView android:src="@drawable/je...
331,180
Which design would be better for the following batteries the most positive/negative connector? The reason i am asking is my original design is the one on the left, but someone told me the one on the right is better because the current is evenly distributed. Is that true? ![schematic](https://i.stack.imgur.com/1bBKd.pn...
2017/09/25
[ "https://electronics.stackexchange.com/questions/331180", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/132527/" ]
That's not used as a transformer, it is referred to as a "common-mode choke". It and the capacitors connected to it are there to minimize the amount of interference that conducts from the device into the power line from which it can radiate and interfere with other equipment. It also reduces the chance of any interfer...
In order to understand the circuit, you need to understand what it is trying to accomplish. Primarily, it is a high frequency (low pass) **line filter**. This is accomplished with a capacitor and an inductor, **for each line** (4 components). Some smart person figured out that the windings of a 1:1 transformer could...
2,719,012
I am trying to better understand related rates problems. Prior to being exposed to related rates problems, the derivatives I solved were always with respect to the independent variable of the equation, e.g. $y=x^2, \frac{dy}{dx}=2x$. With related rates, the problems are solved by taking the derivatives with respect to ...
2018/04/02
[ "https://math.stackexchange.com/questions/2719012", "https://math.stackexchange.com", "https://math.stackexchange.com/users/533889/" ]
I am answering my own question for two reasons: (1) I believe I now understand my problem and (2) because I believe it is not easy for readers of my question to determine the source of my misunderstanding. What I failed to fully understand and apply was the chain rule. As long as the problems I worked were in terms of ...
While you get the correct results, you don't offer any reasoning that explains your motivation for doing this, which means we cannot tell if you are thinking about the math correctly. Quite frankly, it makes me suspicious that you are looking at the chain rule (single and multi-variable) - which can be found in many p...
49,383,899
I am trying to use Bind Variable for Informix Procedure. Can someone guide me how to use for the below procedure? CREATE PROCEDURE neura\_omega\_stg.grn\_payment\_mode\_update(vv\_material\_document\_id Varchar(20),vv\_payment\_mode Varchar(10)) UPDATE goods\_receive\_header\_tbl SET payment\_mode=vv\_payment\_mod...
2018/03/20
[ "https://Stackoverflow.com/questions/49383899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7499245/" ]
use `PIVOT` ``` select * from #MyTable pivot ( max(Sessions) for Direction in ([S], [R]) ) p ```
`CASE` in SQL is an expression that returns a single value. It cannot be used to control execution flow like in procedural languages. You can use *conditional aggregation* for this: ``` select DateKey, ID, max(case Direction when 'S' then [Sessions] end) as S_Sessions, max(case Direction when 'R' then [Sessio...
49,383,899
I am trying to use Bind Variable for Informix Procedure. Can someone guide me how to use for the below procedure? CREATE PROCEDURE neura\_omega\_stg.grn\_payment\_mode\_update(vv\_material\_document\_id Varchar(20),vv\_payment\_mode Varchar(10)) UPDATE goods\_receive\_header\_tbl SET payment\_mode=vv\_payment\_mod...
2018/03/20
[ "https://Stackoverflow.com/questions/49383899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7499245/" ]
use `PIVOT` ``` select * from #MyTable pivot ( max(Sessions) for Direction in ([S], [R]) ) p ```
assuming that your table contains the "pairs" S and R you can also use a self join ``` SELECT s.DateKey , s.ID , s.Sessions S_Sessions , r.Sessions R_Sessions FROM #MyTable S JOIN #MyTable R ON s.ID = r.ID AND s.DateKey = r.DateKey WHERE S.Direction = 'S' AND r.Direction = 'R' ```
49,383,899
I am trying to use Bind Variable for Informix Procedure. Can someone guide me how to use for the below procedure? CREATE PROCEDURE neura\_omega\_stg.grn\_payment\_mode\_update(vv\_material\_document\_id Varchar(20),vv\_payment\_mode Varchar(10)) UPDATE goods\_receive\_header\_tbl SET payment\_mode=vv\_payment\_mod...
2018/03/20
[ "https://Stackoverflow.com/questions/49383899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7499245/" ]
use `PIVOT` ``` select * from #MyTable pivot ( max(Sessions) for Direction in ([S], [R]) ) p ```
Try It ... It works for me . more variable more case and more left join table. ``` select a.DateKey,a.ID, (case a.Direction when 'S' then a.Sessions end) as S_Sessions, (case b.Direction when 'R' then b.Sessions end) as R_Sessions from mytable as a CROSS JOIN mytable as b ON a.ID=b.ID LIMIT 2...
49,383,899
I am trying to use Bind Variable for Informix Procedure. Can someone guide me how to use for the below procedure? CREATE PROCEDURE neura\_omega\_stg.grn\_payment\_mode\_update(vv\_material\_document\_id Varchar(20),vv\_payment\_mode Varchar(10)) UPDATE goods\_receive\_header\_tbl SET payment\_mode=vv\_payment\_mod...
2018/03/20
[ "https://Stackoverflow.com/questions/49383899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7499245/" ]
`CASE` in SQL is an expression that returns a single value. It cannot be used to control execution flow like in procedural languages. You can use *conditional aggregation* for this: ``` select DateKey, ID, max(case Direction when 'S' then [Sessions] end) as S_Sessions, max(case Direction when 'R' then [Sessio...
Try It ... It works for me . more variable more case and more left join table. ``` select a.DateKey,a.ID, (case a.Direction when 'S' then a.Sessions end) as S_Sessions, (case b.Direction when 'R' then b.Sessions end) as R_Sessions from mytable as a CROSS JOIN mytable as b ON a.ID=b.ID LIMIT 2...
49,383,899
I am trying to use Bind Variable for Informix Procedure. Can someone guide me how to use for the below procedure? CREATE PROCEDURE neura\_omega\_stg.grn\_payment\_mode\_update(vv\_material\_document\_id Varchar(20),vv\_payment\_mode Varchar(10)) UPDATE goods\_receive\_header\_tbl SET payment\_mode=vv\_payment\_mod...
2018/03/20
[ "https://Stackoverflow.com/questions/49383899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7499245/" ]
assuming that your table contains the "pairs" S and R you can also use a self join ``` SELECT s.DateKey , s.ID , s.Sessions S_Sessions , r.Sessions R_Sessions FROM #MyTable S JOIN #MyTable R ON s.ID = r.ID AND s.DateKey = r.DateKey WHERE S.Direction = 'S' AND r.Direction = 'R' ```
Try It ... It works for me . more variable more case and more left join table. ``` select a.DateKey,a.ID, (case a.Direction when 'S' then a.Sessions end) as S_Sessions, (case b.Direction when 'R' then b.Sessions end) as R_Sessions from mytable as a CROSS JOIN mytable as b ON a.ID=b.ID LIMIT 2...
39,633,471
Is there a way I can insert `<` or `>` in HTML file using PHP. Here is a a part of code ``` <?php $custom_tag = $searchNode->nodeValue = "<"; $custom_tag = $searchNode->setAttribute("data-mark", $theme_name); $custom_tag = $dom->saveHTML($searchNode); $root = $searchNode->parentNode; $root->removeChild($searchNode); $...
2016/09/22
[ "https://Stackoverflow.com/questions/39633471", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2657104/" ]
The original question appears to concern how to use PHP to manufacture an HTML tag, so I'll address that question. While it is a good idea to use htmlentities(), you also need to be aware that it's primary purpose is to protect your code so that a malicious user doesn't inject it with javascript or other tags that coul...
If I understand you correctly, I think you could use < and > in the first place. They should be rendered as HTML. Might save you some coding. Let me know if it works.
3,634,546
The given series is: $$x+2x^2+x^3+2x^4+x^5+2x^6+....$$ Now I can see that the sum starts at $n=0$ and that is closely follows the common series $\frac{1}{1-x}$. What I have so far is: $$\sum^\infty\_{n=0}x^{n+1}$$ What I am having trouble with is the $2$ that alternates terms, I see that it is only present on the eve...
2020/04/20
[ "https://math.stackexchange.com/questions/3634546", "https://math.stackexchange.com", "https://math.stackexchange.com/users/624395/" ]
Note that$$x^2+x^4+x^6+\cdots=\frac{x^2}{1-x^2}$$and that therefore the sum of your series is$$\frac x{1-x}+\frac{x^2}{1-x^2}=\frac{2x^2+x}{1-x^2}.$$
Note that it is $(x+2x^2)(1+x^2+x^4+x^6+\cdots)$
10,099,854
I want to send email from HP unix using mailx command. I have to include cc and bcc in my email and have to use the specific email address as the sender. But -r (which is to define the sender's email address) will disalbe ~ commands so if i have to define the sender's email address, i cannot use ~c and ~b commands for...
2012/04/11
[ "https://Stackoverflow.com/questions/10099854", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1024815/" ]
Just re-order the arguments to `mailx` command. That would give the desired result ``` $ echo "something" | mailx -s "subject" -b bcc_user@some.com -c cc_user@some.com -r sender@some.com recipient@example.com ```
In my case I have to keep multiple `id`'s in cc which has been done by giving the `email-id`'s comma separated one by one as below: ``` $ echo -e "Hi Team, \n \n Action Needed \n \n Regards, \n XYZ team"| mailx -s "subject" -b bcc_user1@some.com,bcc_user2@some.com -c cc_user1@some.com,cc_user2@some.com -r sender@some....
2,339,773
I'm using ESE (JetBlue) in an app, when JetAttachDatabase is called it returns JET\_errDatabaseDirtyShutdown. What am I supposed to do in my app? my desire is for any uncommeted transactions to be deleted
2010/02/26
[ "https://Stackoverflow.com/questions/2339773", "https://Stackoverflow.com", "https://Stackoverflow.com/users/112321/" ]
Log recovery will be done automatically by the call to JetInit, which will automatically rollback uncomitted transactions. In order for JetInit to work it has to find the logfiles so in this case you have probably either: 1. Deleted the logfiles. Don't do that. 2. Didn't set the logfile path correctly. Always set the ...
You can configure your application to automatically attempt to clear the "dirty shutdown" by adding the following after JetCreateInstance() and before JetInit(). Yes the order of these things is important: ``` Api.JetSetSystemParameter(instance, JET_SESID.Nil, Server2003Param.AlternateDatabaseRecoveryPath, 0, Path.Get...
35,312,468
I think standard notation for javascript properties is camelCase (most of frameworks in javascript use camelCase), so JSON keys must be camelCase (according to javascript object notation), also I've seen WIKIPEDIA and W3SCHOOLS documentation about JSON, all sample wrote in camelCase, but when see API documentation of T...
2016/02/10
[ "https://Stackoverflow.com/questions/35312468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/829920/" ]
JSON defines no convention for the choice of property names. There is no standard for this.
Here is a snippet on Googles intepretation on JSON naming conventions... Choose meaningful property names. Property names must conform to the following guidelines: * Property names should be meaningful names with defined semantics. * Property names must be camel-cased, ascii strings. The first * character must be a l...
35,312,468
I think standard notation for javascript properties is camelCase (most of frameworks in javascript use camelCase), so JSON keys must be camelCase (according to javascript object notation), also I've seen WIKIPEDIA and W3SCHOOLS documentation about JSON, all sample wrote in camelCase, but when see API documentation of T...
2016/02/10
[ "https://Stackoverflow.com/questions/35312468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/829920/" ]
JSON defines no convention for the choice of property names. There is no standard for this.
Typically you'll find JSON keys to be camel cased. This is of course entirely up to the developer, and many APIs use underscores. But the mainstream solution is `propertyName`.
35,312,468
I think standard notation for javascript properties is camelCase (most of frameworks in javascript use camelCase), so JSON keys must be camelCase (according to javascript object notation), also I've seen WIKIPEDIA and W3SCHOOLS documentation about JSON, all sample wrote in camelCase, but when see API documentation of T...
2016/02/10
[ "https://Stackoverflow.com/questions/35312468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/829920/" ]
JSON defines no convention for the choice of property names. There is no standard for this.
Well according to [JSON API.org](http://jsonapi.org/) It should be, ``` { "first-name": "John" } ```
35,312,468
I think standard notation for javascript properties is camelCase (most of frameworks in javascript use camelCase), so JSON keys must be camelCase (according to javascript object notation), also I've seen WIKIPEDIA and W3SCHOOLS documentation about JSON, all sample wrote in camelCase, but when see API documentation of T...
2016/02/10
[ "https://Stackoverflow.com/questions/35312468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/829920/" ]
JSON defines no convention for the choice of property names. There is no standard for this.
Check JSON standarts specification here: <https://www.rfc-editor.org/rfc/rfc4627> As you can see there is not standart format vor objects key.
207,784
I have a live website and I want to test different themes and add some other functionality without risking messing up my running website. Is there any way I can test all changes and commit before actually making the changes visible on my site? Perhaps by testing on localhost? Also I had a customised theme which is not ...
2015/11/06
[ "https://wordpress.stackexchange.com/questions/207784", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/83115/" ]
If I got you correctly, [**WP Theme Test**](https://wordpress.org/plugins/wp-theme-test/) is such a plugin that can assist you. In my case I take the whole live site in localhost, by copying the whole WordPress installation and its database, and then test any new theme on it (or any modification to existing theme). If...
The easiest method is to migrate your current WordPress site into a new folder or server using e.g. **All-in-One WP Migration**. Then make all changes on new WordPress. As far as I'm concerned WordPress doesn't have "testing" environment and making one requires much knowledge. --- About making it 100%. Go to page and...
72,211,820
I am currently using a VBA code from Kutools that lets me combine all my worksheets into one combined "Master" sheet. However, every relevant worksheet is preceded by an irrelevant one that should and cannot be combined. So I need to first delete worksheets 1,3,5... in order for the code to work. Alternatively, ignori...
2022/05/12
[ "https://Stackoverflow.com/questions/72211820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19100004/" ]
Copy Data From Every Other Worksheet ------------------------------------ ```vb Sub CombineEveryOtherWorksheet() Const wsName As String = "Combined" Dim hrCount As Variant Dim msg As Long Do hrCount = Application.InputBox("The number of title rows", "", "1") If TypeName(hrCount) = "B...
If you just want to delete worksheets 1,3,5,... ``` Dim i As Long Dim LastWk As Integer 'delete odds worksheets 'first we must check if last worksheet is odd or even LastWk = Worksheets.Count LastWk = IIf(Application.WorksheetFunction.IsOdd(LastWk), LastWk, LastWk - 1) For i = LastWk To 1 Step -2 Application.Dis...
72,211,820
I am currently using a VBA code from Kutools that lets me combine all my worksheets into one combined "Master" sheet. However, every relevant worksheet is preceded by an irrelevant one that should and cannot be combined. So I need to first delete worksheets 1,3,5... in order for the code to work. Alternatively, ignori...
2022/05/12
[ "https://Stackoverflow.com/questions/72211820", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19100004/" ]
Copy Data From Every Other Worksheet ------------------------------------ ```vb Sub CombineEveryOtherWorksheet() Const wsName As String = "Combined" Dim hrCount As Variant Dim msg As Long Do hrCount = Application.InputBox("The number of title rows", "", "1") If TypeName(hrCount) = "B...
Usually when we delete items from a collection we iterate backwards to avoid the items shifting from their original positions. Here, I create an array with all the names of the odd worksheets and use it to delete them in one operation. ``` Sub ReplaceOddWorksheets() Const Delimiter As String = "\" Dim SheetNam...
12,312,065
I have a database table in MYSQL with around 1000 rows. In the table I have a column called 'overview'. In each row, this column has some value and at the end of that value I have a specific line (text) starting with: 'Source...' Now what I want is, I want to remove this line from each column and replace it with some ...
2012/09/07
[ "https://Stackoverflow.com/questions/12312065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1490278/" ]
You can simply use [REPLACE](http://dev.mysql.com/doc/refman/5.0/en/replace.html) in your query like this ``` UPDATE your_table SET col_name = REPLACE(col_name , ‘Source...’, ‘new_val’) WHERE col_name LIKE '%Source...'; ``` Check Out the **[SQLFIDDLE](http://sqlfiddle.com/#!3/c178d/3)**.
MySQL database has a handy and simple string function `REPLACE()` that allows table data with the matching string (`from_string`) to be replaced by new string (`to_string`). The syntax of [`REPLACE`](http://dev.mysql.com/doc/refman/5.0/en/replace.html) is: ``` REPLACE (text_string, from_string, to_string) ``` In yo...
12,312,065
I have a database table in MYSQL with around 1000 rows. In the table I have a column called 'overview'. In each row, this column has some value and at the end of that value I have a specific line (text) starting with: 'Source...' Now what I want is, I want to remove this line from each column and replace it with some ...
2012/09/07
[ "https://Stackoverflow.com/questions/12312065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1490278/" ]
You can simply use [REPLACE](http://dev.mysql.com/doc/refman/5.0/en/replace.html) in your query like this ``` UPDATE your_table SET col_name = REPLACE(col_name , ‘Source...’, ‘new_val’) WHERE col_name LIKE '%Source...'; ``` Check Out the **[SQLFIDDLE](http://sqlfiddle.com/#!3/c178d/3)**.
Use `Replace` update TBL set overview = Replace(picture, 'Source..', 'replacement') keep a backup of the table before anything.Or you can do it on a copy.
12,312,065
I have a database table in MYSQL with around 1000 rows. In the table I have a column called 'overview'. In each row, this column has some value and at the end of that value I have a specific line (text) starting with: 'Source...' Now what I want is, I want to remove this line from each column and replace it with some ...
2012/09/07
[ "https://Stackoverflow.com/questions/12312065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1490278/" ]
You can simply use [REPLACE](http://dev.mysql.com/doc/refman/5.0/en/replace.html) in your query like this ``` UPDATE your_table SET col_name = REPLACE(col_name , ‘Source...’, ‘new_val’) WHERE col_name LIKE '%Source...'; ``` Check Out the **[SQLFIDDLE](http://sqlfiddle.com/#!3/c178d/3)**.
you can do this by following: ``` update table_name set col_name = replace(column_name , ‘Source...’, ‘Replaced String...’); ```
24,008,630
What is `Window` ? Here's what I see on the console in Chrome : ``` window Window {top: Window, window: Window, location: Location, external: Object, chrome: Object…} Window function Window() { [native code] } ```
2014/06/03
[ "https://Stackoverflow.com/questions/24008630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2645137/" ]
[`Window`](https://developer.mozilla.org/en/docs/Web/API/Window) is a function, as you can see. It's the constructor for the windows (but you can't build new windows directly with the constructor, you usually use the [`Window.open`](https://developer.mozilla.org/en-US/docs/Web/API/Window.open) function). `Window.protot...
`Window` is the constructor function that is used to create `window`. To see this, try `alert(window.constructor === Window)`.
24,008,630
What is `Window` ? Here's what I see on the console in Chrome : ``` window Window {top: Window, window: Window, location: Location, external: Object, chrome: Object…} Window function Window() { [native code] } ```
2014/06/03
[ "https://Stackoverflow.com/questions/24008630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2645137/" ]
`Window` is the constructor function that is used to create `window`. To see this, try `alert(window.constructor === Window)`.
console outputs from the Chrome browser: ``` console.log(window instanceof Window); // true console.log(window.constructor === Window); // true console.log(this); // Window {document:document, alert:ƒ, setTimeout:ƒ,..} console.log(window); // Window {document:document, alert:ƒ, setTimeout:ƒ,..} console.log(Wind...
24,008,630
What is `Window` ? Here's what I see on the console in Chrome : ``` window Window {top: Window, window: Window, location: Location, external: Object, chrome: Object…} Window function Window() { [native code] } ```
2014/06/03
[ "https://Stackoverflow.com/questions/24008630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2645137/" ]
[`Window`](https://developer.mozilla.org/en/docs/Web/API/Window) is a function, as you can see. It's the constructor for the windows (but you can't build new windows directly with the constructor, you usually use the [`Window.open`](https://developer.mozilla.org/en-US/docs/Web/API/Window.open) function). `Window.protot...
console outputs from the Chrome browser: ``` console.log(window instanceof Window); // true console.log(window.constructor === Window); // true console.log(this); // Window {document:document, alert:ƒ, setTimeout:ƒ,..} console.log(window); // Window {document:document, alert:ƒ, setTimeout:ƒ,..} console.log(Wind...
3,866,910
I had seen a colleague use this to fetch users from a table under these conditions: ``` SELECT * FROM users WHERE gender ='male' AND activated='yes' AND date_registered BETWEEN '$date1' AND '$date2' ``` He said there was an problem (it not outputting any rows when the `AND activated='yes'` was put there as well, ...
2010/10/05
[ "https://Stackoverflow.com/questions/3866910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/445413/" ]
Nope, it will work just fine. However, you might want to format your query so it is clear which `AND` is standalone, and which belongs to a `BETWEEN .. AND ...` statement: ``` SELECT * FROM users WHERE gender ='male' AND activated='yes' AND date_registered BETWEEN '$date1' AND '$date2' ```
No brackets required. You've got the correct syntax.
1,514,061
I'm using the WebBrowser control and mshtml.dll. When I simulate click on link `<a href='..'>..</a>`, the WebBrowser shows a JavaScript warning dialog: > > Unable to move the focus to the element as it is in the invisible ,off or can't have a focus. > > > The code I use to simulate the click: ``` anchor.click()...
2009/10/03
[ "https://Stackoverflow.com/questions/1514061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I'm not sure if your referring to the windows forms [WebBrowser](http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx) control but it has the [ScriptErrorsSuppressed](http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.scripterrorssuppressed.aspx) property for disabling scrip...
You have to find the place where you are doing `anchor.click();` and either remove it or replace it with `if(anchor.clientHeight != 0){anchor.click();}`.
1,514,061
I'm using the WebBrowser control and mshtml.dll. When I simulate click on link `<a href='..'>..</a>`, the WebBrowser shows a JavaScript warning dialog: > > Unable to move the focus to the element as it is in the invisible ,off or can't have a focus. > > > The code I use to simulate the click: ``` anchor.click()...
2009/10/03
[ "https://Stackoverflow.com/questions/1514061", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
I'm not sure if your referring to the windows forms [WebBrowser](http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx) control but it has the [ScriptErrorsSuppressed](http://msdn.microsoft.com/en-us/library/system.windows.forms.webbrowser.scripterrorssuppressed.aspx) property for disabling scrip...
It's possible to work around this particular warning by having the link element be part of the page and visible. Calling the `click()` method actually does more than execute an onclick handler and navigate the browser, it also focuses the element - just like when a real click happens. If the element is offscreen, this...
12,073,635
I'd like to open a PDF file in the filesystem from go with the default application. How can I do that? From the command line I just write the filename of the pdf file and the application opens (with the requested file). When I try to use `exec.Command()` I get an error (not surprisingly) `exec: "foo.pdf": executable fi...
2012/08/22
[ "https://Stackoverflow.com/questions/12073635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/317915/" ]
``` exec.Command("rundll32.exe", "url.dll,FileProtocolHandler", "path_to_foo.pdf") ``` should also handle it. Note that still the right way to do it is to use a C wrapper around the [`ShellExecute()`](http://msdn.microsoft.com/en-us/library/windows/desktop/bb762153) API function exported by `shell32.dll`, and the ["...
You must launch `cmd /C start foo.pdf`. This will let the start command find the correct executable for you. ``` cmd := exec.Command("cmd", "/C start path_to_foo.pdf") ```
12,073,635
I'd like to open a PDF file in the filesystem from go with the default application. How can I do that? From the command line I just write the filename of the pdf file and the application opens (with the requested file). When I try to use `exec.Command()` I get an error (not surprisingly) `exec: "foo.pdf": executable fi...
2012/08/22
[ "https://Stackoverflow.com/questions/12073635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/317915/" ]
You must launch `cmd /C start foo.pdf`. This will let the start command find the correct executable for you. ``` cmd := exec.Command("cmd", "/C start path_to_foo.pdf") ```
Create a file like this: ``` //go:generate mkwinsyscall -output zmain.go main.go //sys shellExecute(hwnd int, oper string, file string, param string, dir string, show int) (err error) = shell32.ShellExecuteW package main const sw_shownormal = 1 func main() { shellExecute(0, "", "file.pdf", "", "", sw_shownormal) ...
12,073,635
I'd like to open a PDF file in the filesystem from go with the default application. How can I do that? From the command line I just write the filename of the pdf file and the application opens (with the requested file). When I try to use `exec.Command()` I get an error (not surprisingly) `exec: "foo.pdf": executable fi...
2012/08/22
[ "https://Stackoverflow.com/questions/12073635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/317915/" ]
``` exec.Command("rundll32.exe", "url.dll,FileProtocolHandler", "path_to_foo.pdf") ``` should also handle it. Note that still the right way to do it is to use a C wrapper around the [`ShellExecute()`](http://msdn.microsoft.com/en-us/library/windows/desktop/bb762153) API function exported by `shell32.dll`, and the ["...
Create a file like this: ``` //go:generate mkwinsyscall -output zmain.go main.go //sys shellExecute(hwnd int, oper string, file string, param string, dir string, show int) (err error) = shell32.ShellExecuteW package main const sw_shownormal = 1 func main() { shellExecute(0, "", "file.pdf", "", "", sw_shownormal) ...
46,368
[Source:](http://www.theguardian.com/culture/2012/jul/29/10-best-last-novel-lines) 'The 10 best… closing lines of books', The Guadian broadsheet, by Robert McCrum > > > > > > "There, in front of us, where a broken row of houses stood between us and the harbour, and where the eye encountered all sorts of **stratagem...
2015/01/11
[ "https://ell.stackexchange.com/questions/46368", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/-1/" ]
When the pink and blue underwear are described as *cakewalking*, one understands them to be placed *above* the clothesline, dancing on it, as it were, not hanging from it. And it is odd to find a lady's bicycle on a *rudimentary balcony*. So these *stratagems* are devices, in the imaginary *Find What the Sailor has Hi...
I think the answer is **READ THE NOVEL** Or look the words up. Why do you want us to do your **thinking** for you. This is not a question about English, this is a question suggesting that we interpret a literary passage for you. It is opinion-based. It is also the case you can look the words up. **A strategem is a s...
50,207,815
Recently, I found a post on Internet asking this question, I tried to figure out but not sure. I guess the problem is related with Boxing and Unboxing: ``` public readonly object counter = new Counter(); ``` This line boxs a Counter onto heap, and counter refers to it. ``` ((Counter)riddle.counter) ``` This lin...
2018/05/07
[ "https://Stackoverflow.com/questions/50207815", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1509182/" ]
Firstly, this is all a good example of why I try to avoid mutable structs in almost all cases. While you can usually predict what will happen if you pay enough attention, it's easy to miss one copy along the way which messes everything up. If you keep all structs immutable, life is simpler. For your question: yes, you...
Because struct is value type- You can use "class Counter instead "struct Counter" or use below solution **Reason** : ((Counter)riddle.counter).Count is treat as another copy of struct not as ref type. so it's showing initial value 0 ``` using System; using System.Text.RegularExpressions; public class Program { ...
55,174,865
I need help with said subject. I am attaching a screenshot where I am stuck after login and several clicks into the webpage. Both chromedriver and gekodriver, same issue. What I am after is the "Launch" button shown in the image. The highlighted elements is shown in the image in blue and the xpath is pretty simple: "...
2019/03/15
[ "https://Stackoverflow.com/questions/55174865", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1357518/" ]
Singles and Maybes have a success signal and the handler has the `onSuccess` method called. Often though, you'd want to side-effect the success signal at various points in the flow so there is the `doOnSuccess` operator. ```java getUserAsSingle() .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread())...
One use case I normally apply for `doOnSuccess()` is to enforce some triggers when the call is successful. For example, I have a function to fetch user data in a common class ``` fun getUserData(userId: Int) { userDataApi(userId) .doOnSuccess { fetchAllImages() } .doOnError { Log.e(it...
60,562,787
Hello: I'm new programming. My problem is that the evaluation in the `for` sentence is not working properly. > > With: salir='n' it works correctly > > > With: salir=='n' don't works. > > > Thanks ``` <script type="text/javascript"> var tabla=""; var numusuario=0; var min=0; var max=9; ...
2020/03/06
[ "https://Stackoverflow.com/questions/60562787", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13018334/" ]
`salir='n'` means assignments. it is always return `true` `salir=='n'` means comparision. it is return `false` because `salir='s'` so `s` is not equal to `n`
Several things happenning here, but main is that you are mixing different forms of flow control: * You are using `salir` (exit, for non-spanish speakers) as a loop end indicator, but... * The loop condition is always true (as `salir='n'` evaluates to `'n'`, which is true) * You are using also a variable, `j`, with no ...
66,909,000
I have the following code in mvc: ```cs <a class="cta-icon-link" > @Html.RenderMediaData(Model.Icon, new { TypeCssClasses = new Dictionary<string, string>() { { "imageFile", "cta-icon" }, { "VectorImageFile", "cta-icon" } } }) </a> <a class="@cssClass" >@Model.LinkText</a> ``` So basically the sequence is as fol...
2021/04/01
[ "https://Stackoverflow.com/questions/66909000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15532895/" ]
CSS DOESN'T has conditionals. So you can't do that "else". But you can do an import for the default and then, override the CSS values by importing dark.css ``` @import "default.css" screen; @import "dark.css" screen and (prefers-color-scheme: dark); ```
There is no if/else in pure `CSS`. You must use the javascript function to do this. Alternative there are `CSS` preprocessors like Sass, you can use. You can read more about it here: [Sass conditonals](https://sass-lang.com/documentation/at-rules/control).
51,633,782
I need to generate a list of my assemblies for a project. I am using this code : ``` Assembly[] lstAssembly = AppDomain.CurrentDomain.GetAssemblies(); ``` which is somehow working but It doesn't show all of my namespaces in solution. I want To know why it doesn't show all the namespace in my solution My solution a...
2018/08/01
[ "https://Stackoverflow.com/questions/51633782", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9121590/" ]
It returns just directly referenced libraries by default. You need to load recursively if you want to load all of them. ``` var myrootAssembly = Assembly.GetExecutingAssembly(); var loadedPath = myrootAssembly.Location; var rootPath = loadedPath.Substring(0, loadedPath.LastIndexOf('...
Did you meant to do something like below which would give you the namespace for that assembly ``` Assembly.GetExecutingAssembly().GetTypes().Select(t => t.Namespace).ToList(); ```
50,064,199
I am dealing with a forecast of time series in R. I have several questions: 1. I would like to ask how we can handle missing values in time series? 2. I guess we can somehow interpolate them? 3. Can you suggest some solution in R for this?
2018/04/27
[ "https://Stackoverflow.com/questions/50064199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8855762/" ]
One of the solutions `imputeTS` library. ``` library(imputeTS) # amount of NA table(is.na(tsAirgap)) # Kalman smoothing imputation (one of the best) imp_tsAirgap <- na_kalman(tsAirgap) # Imputed time-series, no NAs table(is.na(imp_tsAirgap)) ```
If you would like to delete the missing values and their corresponding time-stamps, you can also use the `na.remove` function within the `tseries` package.
25,217,158
Lets say I have the following flags: ``` [Flags] public enum Foo { None = 0, Foo1 = 1, Foo2 = 2, Foo4 = 4, Foo8 = 8 } ``` Now I have a variable foo: ``` var foo = Foo.Foo1 | Foo.Foo4; ``` What I want to get is the following the inverted flags of `foo`. That would mean something like this: ```...
2014/08/09
[ "https://Stackoverflow.com/questions/25217158", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1293906/" ]
What you want to do is to combine all the values of the enum and then mask it with the complement of your current value. ``` Foo value = Foo.Foo4; Foo allValues = (Foo)0; foreach (var v in Enum.GetValues(typeof(Foo))) allValues |= (Foo)v; var compliment = allValues & ~(value...
To invert individual Enum flag try this ``` private Foo foos; private static void FlagInvert(Foo foo) {var res = foos.HasFlag(foo) ? foos &= ~foo : foos |= foo;} ```
25,217,158
Lets say I have the following flags: ``` [Flags] public enum Foo { None = 0, Foo1 = 1, Foo2 = 2, Foo4 = 4, Foo8 = 8 } ``` Now I have a variable foo: ``` var foo = Foo.Foo1 | Foo.Foo4; ``` What I want to get is the following the inverted flags of `foo`. That would mean something like this: ```...
2014/08/09
[ "https://Stackoverflow.com/questions/25217158", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1293906/" ]
What you want to do is to combine all the values of the enum and then mask it with the complement of your current value. ``` Foo value = Foo.Foo4; Foo allValues = (Foo)0; foreach (var v in Enum.GetValues(typeof(Foo))) allValues |= (Foo)v; var compliment = allValues & ~(value...
A more elegant solution would be using mask of all the fields and perform a XOR operation on the remainder. Usually you start by adding an 'All' value to your enum (this way you are less likely to forget updating it if another values are added), so in your case: ``` [Flags] public enum Foo { None = 0, Foo1 = 1...
25,217,158
Lets say I have the following flags: ``` [Flags] public enum Foo { None = 0, Foo1 = 1, Foo2 = 2, Foo4 = 4, Foo8 = 8 } ``` Now I have a variable foo: ``` var foo = Foo.Foo1 | Foo.Foo4; ``` What I want to get is the following the inverted flags of `foo`. That would mean something like this: ```...
2014/08/09
[ "https://Stackoverflow.com/questions/25217158", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1293906/" ]
A more elegant solution would be using mask of all the fields and perform a XOR operation on the remainder. Usually you start by adding an 'All' value to your enum (this way you are less likely to forget updating it if another values are added), so in your case: ``` [Flags] public enum Foo { None = 0, Foo1 = 1...
To invert individual Enum flag try this ``` private Foo foos; private static void FlagInvert(Foo foo) {var res = foos.HasFlag(foo) ? foos &= ~foo : foos |= foo;} ```
65,898,076
I am aggregating some data and I want to add group sizes `N` to the output table. Until recently, the code below worked fine. Now, `N` is equal to the rowcount of my table. ``` iris %>% group_by(Species) %>% group_by(N = n(), .add = TRUE) %>% summarise_all(list(~mean(., na.rm = TRUE))) # A tibble: 3 x 6 # G...
2021/01/26
[ "https://Stackoverflow.com/questions/65898076", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3700437/" ]
This looks like a recently introduced bug. Can be reproduced on `dplyr` 1.0.3 but not on 1.0.2. You could however, avoid the second `group_by` completely in this case. ``` library(dplyr) iris %>% group_by(Species) %>% summarise(across(.fns = mean, na.rm = TRUE), N = n()) # Species Sepal.Length...
Try this: ``` rm(list = ls()) library(dplyr) iris %>% group_by(Species) %>% group_by(N = n(), .add = TRUE) %>% summarise_all(list(~mean(., na.rm = TRUE))) ```
73,845,590
I am making a calculator with ANTLR4 targetting C++ and I am trying to handle the integer (...-1,0,1,....) with the g4 code below. ``` INT :'-'? [0-9]+ ; ``` this is based on regex ``` [-]?[0-9]+ ``` But this accept -0 case How can I handle modify code to get rid of this negative zero case?
2022/09/25
[ "https://Stackoverflow.com/questions/73845590", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18047268/" ]
I solved this by installing ffmpeg and adding the ffmpeg binary to my PATH environment variable. I was using the cmd.exe terminal not Code. Edit: Tested in VS Code and it worked there too after including ffmpeg binary in PATH.
I initially ran into this same problem and it was entirely related to installing ffmpeg. You need to install it as a python module (with `pip install ffmpeg`) and from here (<https://ffmpeg.org/download.html>) while following these instructions: <https://www.geeksforgeeks.org/how-to-install-ffmpeg-on-windows/>
14,732,269
I am facing two problems . 1)I am searching a directory for certain keywords and the directory contains files with many extension like .java .sql .ksh .pl .jar etc.. . Now my problem is i dont want to search the files having .jar or .doc or .docx . currently my code looks like below ``` use strict; use warnings; use...
2013/02/06
[ "https://Stackoverflow.com/questions/14732269", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2032004/" ]
``` return if /\.(?:docx?|jar)\z/; ``` and ``` if (/obsolete|retired/) { $File::Find::prune = 1; return; } ```
Change this line ``` if(-f $element && $element =~ /\.*$/){ ``` to this ``` if( (-f $element && $element !~ /\.(jar|docx?)$/i) || ( $File::Find::dir !~ /(obsolete|retired)/i) ){ ``` a good guide: <http://www.perlmonks.org/?node_id=217166> Regards,
14,732,269
I am facing two problems . 1)I am searching a directory for certain keywords and the directory contains files with many extension like .java .sql .ksh .pl .jar etc.. . Now my problem is i dont want to search the files having .jar or .doc or .docx . currently my code looks like below ``` use strict; use warnings; use...
2013/02/06
[ "https://Stackoverflow.com/questions/14732269", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2032004/" ]
To reject the unwanted files you should check the name of the file using a regular expression and `return` from the `print_file` subroutine if necessary. To ignore directories containing `obsolete` or `retired` you should check whether the node is a directory whose name contains either of these words. If so, then sett...
Change this line ``` if(-f $element && $element =~ /\.*$/){ ``` to this ``` if( (-f $element && $element !~ /\.(jar|docx?)$/i) || ( $File::Find::dir !~ /(obsolete|retired)/i) ){ ``` a good guide: <http://www.perlmonks.org/?node_id=217166> Regards,
51,469,487
I am struggling to install `gem install rails` because constantly got back this text: ``` ERROR: Could not find a valid gem 'rails' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: tlsv1 alert protocol version (https://r...
2018/07/22
[ "https://Stackoverflow.com/questions/51469487", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6156759/" ]
Change: ``` $pdf->getDomPDF()->setBasePath(public_path().'/../../'); ``` to: ``` $pdf->getDomPDF()->setBasePath(public_path()); ``` and then you just need ``` $pdf->loadHTML('<p>cert1<img src="/img/image_1532441196_7GT.jpeg" alt="" width="1200" height="900" /></p>'); ``` To get that point we need to know what...
*You Must use the full server path. to solve this you must replace the `../../../` to `projects/proj/public` do like this.* ``` <?php str_replace('../../../','projects/proj/public',$content); ?> ``` *after that it loke like this.* ``` <img src="{{ public_path("projects/proj/public/img/".$ImageName) }}" alt=""> ```
123,677
I can not find Rotation Numbers in EDIT mode. I can see them in Object mode, but I do not want to rotate the entire Object, only certain Edges / faces. Can you tell me where they are, or are they not in program at all ? If not It would be extremely helpful to have rotation numbers ( editable, like all other location n...
2018/11/27
[ "https://blender.stackexchange.com/questions/123677", "https://blender.stackexchange.com", "https://blender.stackexchange.com/users/-1/" ]
If you mean the equivalent of the [![enter image description here](https://i.stack.imgur.com/7PVzT.jpg)](https://i.stack.imgur.com/7PVzT.jpg) for edit mode, there's little chance you have one, since it is simply difficult to define. However, each faces has a Normal, which is a vector that points to the direction the...
How to find out the rotation value of a face: * Select Face * Align View > Align View to active > Top * In Object mode add a cube * In Add cube properties select Align to view (bottom left) * Check the cubes rotation, that's the face rotation However I think it is totally fine that it isn't easily accessible, I've be...
60,595,193
I am working on this **social media** website and after creating a header file, I created a `userLoggedIn` variable which I assigned it to the session variable I created in **login handler** page for username using if statement or else the page should redirect to registration page. The problem is the **login** page do...
2020/03/09
[ "https://Stackoverflow.com/questions/60595193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13029326/" ]
Change summ,maximum\_sum=0 by: ``` summ=0 maximum_sum=0 ```
As mentioned by Klaus D also ``` def maxsum(arry): if len(arry)==0: return 0 summ,maximum_sum=0, 0 for i in arry: summ=summ+i maximum_sum=max(summ,maximum_sum) return maximum_sum maxsum([1,2,-1,-2]) ```
60,595,193
I am working on this **social media** website and after creating a header file, I created a `userLoggedIn` variable which I assigned it to the session variable I created in **login handler** page for username using if statement or else the page should redirect to registration page. The problem is the **login** page do...
2020/03/09
[ "https://Stackoverflow.com/questions/60595193", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13029326/" ]
The error due to variable assignment. ``` def maxsum(arry): if len(arry)==0: return 0 summ,maximum_sum=0,0 # Changes for i in arry: summ=summ+i maximum_sum=max(summ,maximum_sum) return maximum_sum ``` <https://note.nkmk.me/en/python-multi-variables-values/> cannot unpack non-iterable int object : ...
As mentioned by Klaus D also ``` def maxsum(arry): if len(arry)==0: return 0 summ,maximum_sum=0, 0 for i in arry: summ=summ+i maximum_sum=max(summ,maximum_sum) return maximum_sum maxsum([1,2,-1,-2]) ```
423,147
I'm going to keep this quick. A friend of mine's dev locked him out of his EC2. Now I'm not familiar with Amazon EC2, but I've setup my fair share of keypairs. Note: I will get the PEM/PPK (private key) from the dev, but I'm going to need to lock him out. The question I'm posing is the proper process of creating a n...
2012/08/31
[ "https://serverfault.com/questions/423147", "https://serverfault.com", "https://serverfault.com/users/134182/" ]
You can't add new key pairs to existing instances like that. If you're well and truly locked out of an instance, your best option is shutting it down (not terminating!), unattaching its EBS root volume, attaching that root volume to another instance, and adding your public key in the right spot on that new instance. R...
I'll answer your specific questions below, but [the Amazon getting started guide might be a handy general resource for you or your friend](http://docs.amazonwebservices.com/AWSEC2/latest/GettingStartedGuide/GetStartedLinux.html). (Unlike most of the online documentation I'm used to, it's actually pretty good.) > > 1....
31,544,856
I have a compressed URL of place holder site (<http://placehold.it/600/24f355>). how can I get full URL (<https://placeholdit.imgix.net/~text?txtsize=56&bg=24f355&txt=600%C3%97600&w=600&h=600>) from the compressed URL in Android? I tried the following but I get same URL what I give. ``` public static void main(Strin...
2015/07/21
[ "https://Stackoverflow.com/questions/31544856", "https://Stackoverflow.com", "https://Stackoverflow.com/users/694240/" ]
As described in [this article](http://www.mkyong.com/java/java-httpurlconnection-follow-redirect-example/), you need to check the response code (`conn.getResponseCode()`), and if it is a 3xx (= redirection), you can get the new URL from the "Location" header field. ``` String newUrl = conn.getHeaderField("Location"); ...
Try this: ``` public static void main(String[] args) throws IOException { URL address=new URL("your short URL"); //Connect & check for the location field HttpURLConnection connection = null; try { connection = (HttpURLConnection) address.openConnection(Proxy.NO_PROXY); connection.setIn...
23,543,135
I have a table name courses ``` courses('course_id','course_name','course_desc') ``` I am using php. I have 2 rows of record in this table. And I have used a `while` loop to list the two as radio button options. I want to add a hidden input field that posts the related `course_id` to the course selected in the radio...
2014/05/08
[ "https://Stackoverflow.com/questions/23543135", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1565552/" ]
You should put that `course_id` in value of radio field, so that you will get it posted with your form and by that `course_id` you can easily retrieve `course_name` ``` while($row = mysql_fetch_assoc($result)){ echo '<td>'. '<strong class="panel-title">'.$row['coursename'].'</strong> - '. ...
I think for a radio button to work properly, all the `name` attribute must be same. If not you will be able to select two or more radio buttons.
32,560,244
I would like to convert a series of integers to decimal. I know the procedure but how can I put all integers as one binary number? Output has to be like this: ``` Enter first binary digit: 0 Enter second binary digit: 0 Enter third binary digit: 0 Enter fourth binary digit: 0 0000 = 0 ``` The following is how I wro...
2015/09/14
[ "https://Stackoverflow.com/questions/32560244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5176046/" ]
Well, that's simple math. The first binary digit is 2^0, the second 2^1, the third 2^2, ... ``` number = first * 1 + second * 2 + third * 4 + forth * 8; ```
``` //binary to decimal converter long int bin2dec(long int binary_number,int i){ if(binary_number == 0) return 0; else return ((binary_number%10)*pow(2,i) + bin2dec(binary_number/10,++i)); } ```
32,560,244
I would like to convert a series of integers to decimal. I know the procedure but how can I put all integers as one binary number? Output has to be like this: ``` Enter first binary digit: 0 Enter second binary digit: 0 Enter third binary digit: 0 Enter fourth binary digit: 0 0000 = 0 ``` The following is how I wro...
2015/09/14
[ "https://Stackoverflow.com/questions/32560244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5176046/" ]
Well, that's simple math. The first binary digit is 2^0, the second 2^1, the third 2^2, ... ``` number = first * 1 + second * 2 + third * 4 + forth * 8; ```
``` #include <stdio.h> #include <string.h> #include <math.h> int baseN_to_decimal(char *number, int from_base){ int result = 0; int digit; int len = strlen(number); for(int i=len-1;i>=0;i--){ // printf("%c", number[i]); if(number[i]>='0' && number[i]<='9'){ digit = number[i]...
32,560,244
I would like to convert a series of integers to decimal. I know the procedure but how can I put all integers as one binary number? Output has to be like this: ``` Enter first binary digit: 0 Enter second binary digit: 0 Enter third binary digit: 0 Enter fourth binary digit: 0 0000 = 0 ``` The following is how I wro...
2015/09/14
[ "https://Stackoverflow.com/questions/32560244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5176046/" ]
Well, that's simple math. The first binary digit is 2^0, the second 2^1, the third 2^2, ... ``` number = first * 1 + second * 2 + third * 4 + forth * 8; ```
``` #include <stdio.h> #include<math.h> int main() { int bin,dec=0,i=0,c,p,a; printf("Enter a number in binary to convert into decimal = "); scanf("%d",&bin); p=bin; while (bin>0) { c=pow(2,i); a=p%10; dec=dec+c*a; printf("%d\n",dec); bin=bin/10; ...
32,560,244
I would like to convert a series of integers to decimal. I know the procedure but how can I put all integers as one binary number? Output has to be like this: ``` Enter first binary digit: 0 Enter second binary digit: 0 Enter third binary digit: 0 Enter fourth binary digit: 0 0000 = 0 ``` The following is how I wro...
2015/09/14
[ "https://Stackoverflow.com/questions/32560244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5176046/" ]
``` #include <stdio.h> #include <string.h> #include <math.h> int baseN_to_decimal(char *number, int from_base){ int result = 0; int digit; int len = strlen(number); for(int i=len-1;i>=0;i--){ // printf("%c", number[i]); if(number[i]>='0' && number[i]<='9'){ digit = number[i]...
``` //binary to decimal converter long int bin2dec(long int binary_number,int i){ if(binary_number == 0) return 0; else return ((binary_number%10)*pow(2,i) + bin2dec(binary_number/10,++i)); } ```
32,560,244
I would like to convert a series of integers to decimal. I know the procedure but how can I put all integers as one binary number? Output has to be like this: ``` Enter first binary digit: 0 Enter second binary digit: 0 Enter third binary digit: 0 Enter fourth binary digit: 0 0000 = 0 ``` The following is how I wro...
2015/09/14
[ "https://Stackoverflow.com/questions/32560244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5176046/" ]
``` #include <stdio.h> #include<math.h> int main() { int bin,dec=0,i=0,c,p,a; printf("Enter a number in binary to convert into decimal = "); scanf("%d",&bin); p=bin; while (bin>0) { c=pow(2,i); a=p%10; dec=dec+c*a; printf("%d\n",dec); bin=bin/10; ...
``` //binary to decimal converter long int bin2dec(long int binary_number,int i){ if(binary_number == 0) return 0; else return ((binary_number%10)*pow(2,i) + bin2dec(binary_number/10,++i)); } ```
450,589
$$\sum\_0^\infty \frac{1}{2^{1+3n}}$$ So maybe I have written the sequence incorrectly, but how do I apply the $\frac{1}{1 - r}$ formula for summing a geometric sequence to this? When I do it I get something over one which is wrong because this is suppose to model a percentage of something.
2013/07/23
[ "https://math.stackexchange.com/questions/450589", "https://math.stackexchange.com", "https://math.stackexchange.com/users/85142/" ]
**Hint:** write $$ \sum\_{n=0}^\infty \frac{1}{2^{1+2n}} = \frac12 \sum\_{n=0}^\infty \frac{1}{2^{2n}} = \frac12 \sum\_{n=0}^\infty \frac{1}{4^{n}} $$ and use the closed-form formula for geometric series.
This is $$ \begin{align} \frac12\sum\_{n=0}^\infty\frac1{4^n} &=\frac12\frac1{1-\frac14}\\ \end{align} $$
450,589
$$\sum\_0^\infty \frac{1}{2^{1+3n}}$$ So maybe I have written the sequence incorrectly, but how do I apply the $\frac{1}{1 - r}$ formula for summing a geometric sequence to this? When I do it I get something over one which is wrong because this is suppose to model a percentage of something.
2013/07/23
[ "https://math.stackexchange.com/questions/450589", "https://math.stackexchange.com", "https://math.stackexchange.com/users/85142/" ]
**Hint:** write $$ \sum\_{n=0}^\infty \frac{1}{2^{1+2n}} = \frac12 \sum\_{n=0}^\infty \frac{1}{2^{2n}} = \frac12 \sum\_{n=0}^\infty \frac{1}{4^{n}} $$ and use the closed-form formula for geometric series.
Write $$S=\sum\_{n=0}^{\infty}\frac{1}{2^{1+2n}}=\frac{1}{2}+\frac{1}{2^3}+\frac{1}{2^5}+\cdots$$ Then note that $$\frac{S}{2^2}=S-\frac{1}{2}\Rightarrow S=\frac{\frac{1}{2}}{\frac{3}{4}}=\frac{2}{3}$$
450,589
$$\sum\_0^\infty \frac{1}{2^{1+3n}}$$ So maybe I have written the sequence incorrectly, but how do I apply the $\frac{1}{1 - r}$ formula for summing a geometric sequence to this? When I do it I get something over one which is wrong because this is suppose to model a percentage of something.
2013/07/23
[ "https://math.stackexchange.com/questions/450589", "https://math.stackexchange.com", "https://math.stackexchange.com/users/85142/" ]
This is $$ \begin{align} \frac12\sum\_{n=0}^\infty\frac1{4^n} &=\frac12\frac1{1-\frac14}\\ \end{align} $$
Write $$S=\sum\_{n=0}^{\infty}\frac{1}{2^{1+2n}}=\frac{1}{2}+\frac{1}{2^3}+\frac{1}{2^5}+\cdots$$ Then note that $$\frac{S}{2^2}=S-\frac{1}{2}\Rightarrow S=\frac{\frac{1}{2}}{\frac{3}{4}}=\frac{2}{3}$$
658
In [this question](https://cstheory.stackexchange.com/questions/2075/bounded-input-bijections-of-infinite-sequences), I offered a bounty, but there are only two answers which really qualify as non-answers. I asked in a comment for the OP to post an answer so I could award him the bounty for asking a cool question, but ...
2010/11/16
[ "https://cstheory.meta.stackexchange.com/questions/658", "https://cstheory.meta.stackexchange.com", "https://cstheory.meta.stackexchange.com/users/30/" ]
If all answers are really non-answers, I guess the best solution is to let the bounty expire (and let the software do whatever it does in these situations). A bounty is always risky. You are not guaranteed to get a good answer even if you offer a bounty. And the system is really built so that you can't get your bounty...
I decided to award the full bounty to the most upvoted answer, since it was going to receive half the rep anyway. If someone posts a solution to that problem in the future, I'll start another bounty so I can award rep to the solver.
11,256,138
I have a script that scans a document for all image types, converts them all to black and white, and then exports the black and white images to a new folder. --- It seems as if InDesign will export these image file-formats:  `JPEG, TIFF, and PNG` (it does **not** export GIF files). However, it seems that InDesign do...
2012/06/29
[ "https://Stackoverflow.com/questions/11256138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1298685/" ]
> > So, is there a way to convert TIFF and PNG files to black and white in > InDesign's Extendscript? > > > Not that I am aware of. > > If there is not, what would be the reasoning for not providing black and white conversion for these file types? > > > He he only God knows :D Given your expectations, I w...
So, though I have been working on a version of this code that uses `BridgeTalk`, I discovered recently that any formatting that is applied to JPEG's can be applied to .BMP's, .TIF's, .EPS's, and .PNG's by *programmatically* renaming the file extension afterwards to the desired format. However, .PDF's **cannot** be coe...
20,320,591
I am using a UITableView to present a variety of viewControllers. Depending on which index is clicked, it will present a different view controller, which can then be dismissed. For some reason one of my ViewControllers takes two clicks to display. Thus, it seems every other click is working. Other view presentations wo...
2013/12/02
[ "https://Stackoverflow.com/questions/20320591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1795643/" ]
Check this out: <https://devforums.apple.com/thread/201431> If you don't want to read it all - the solution for some people (including me) was to make the `presentViewController` call explicitly on the main thread: ``` dispatch_async(dispatch_get_main_queue(), ^{ [self presentViewController:myVC animated:YES compl...
**Swift 3 :** ``` DispatchQueue.main.async(execute: { self.present(yourViewControllerHere, animated: true, completion: nil) }) ```
20,320,591
I am using a UITableView to present a variety of viewControllers. Depending on which index is clicked, it will present a different view controller, which can then be dismissed. For some reason one of my ViewControllers takes two clicks to display. Thus, it seems every other click is working. Other view presentations wo...
2013/12/02
[ "https://Stackoverflow.com/questions/20320591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1795643/" ]
As already mentioned, one fix is to run any presenting of the view controllers on the main thread explicitly or to use `performSelector`. **However**, it wasn't clear to me why this was a fix because I was under the impression that `didSelectRow` runs on the main thread anyway. It wasn't until I read [this answer](ht...
One reason for this behavior could be that your table view code, and thus the code to start up your other view controllers, is not executed on the main thread. But all code related to UI must be executed on the main thread to work correctly. Thus please ensure that the code runs on the main thread, e.g. by setting a...