qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
66,192,294
I am trying to plot an ideal case situation of rolling N dice in python to compare it to experimental values, I am able to create the number of various combinations that the dice will produce but I can't sum the tuples to figure out how many of the rolls will for example result in the number 7 or 8 to generate a normal...
2021/02/14
[ "https://Stackoverflow.com/questions/66192294", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14696511/" ]
You can sum them in a list comprehension when defining `r` rather than simply building a `list`: ``` from itertools import product t = [list(range(1,7)) for x in range(2)] r = [sum(pair) for pair in product(*t)] # r = [2, 3, 4, 5, ...] ``` This gives you an array that is a little out of order from what you requested...
You can try something like this ``` list1, list2 = [], [] for i in range(1, 7): for j in range(1, 7): list1.append((i, j)) list2.append(i + j) ``` It produces the following output ```py >>> list1 [(1, 1), (1, 2), (1, 3), (1, 4), (1, 5), (1, 6), (2, 1), (2, 2), (2, 3), (2, 4), (2, 5), (2, 6), (3...
42,105
> > Immanuel Kant has been born in Europe. > > > I heard you can't use the Present Perfect for dead people, so can I use it to indirectly state how influential Kant was (as if he were Immortal, or that he still lives today through his ideas)? Are there instances where authors used the Present Perfect in this matte...
2019/02/10
[ "https://writers.stackexchange.com/questions/42105", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/36239/" ]
> > can I use it to indirectly state how influential Kant was (as if he > were Immortal, or that he still lives today through his ideas)? > > > This is how I interpreted it. So, **yes. Maybe.** However, it was awkward and I had to pause to decide what it meant.
That grammatically incorrect phrase connotes something other than you intend. Unless you want to once and future king him, just stick with was. People are born once and then live their lives, your construction seems to trap him at birth. Why choose Europe? His birthplace is well documented and giving him an entire co...
42,105
> > Immanuel Kant has been born in Europe. > > > I heard you can't use the Present Perfect for dead people, so can I use it to indirectly state how influential Kant was (as if he were Immortal, or that he still lives today through his ideas)? Are there instances where authors used the Present Perfect in this matte...
2019/02/10
[ "https://writers.stackexchange.com/questions/42105", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/36239/" ]
> > can I use it to indirectly state how influential Kant was (as if he > were Immortal, or that he still lives today through his ideas)? > > > This is how I interpreted it. So, **yes. Maybe.** However, it was awkward and I had to pause to decide what it meant.
> > (as if he were Immortal, or that he still lives today through his ideas)? > > > The approach of subverting Grammar to make your point will not go smoothly with **everyone** who will read your article. How about proving through your writing that Kant's ideas are immortal or that he 'still lives on' through them...
73,381,711
I am using Firebase JavaScript Modular Web Version 9 SDK with my Vue 3 / TypeScript app. My understanding is that when using Firestore real-time **listeners** with offline persistence it should work like this: 1. When the listener is started the callback fires with data read from the local cache, and then immediately...
2022/08/17
[ "https://Stackoverflow.com/questions/73381711", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1526396/" ]
Nothing is wrong. What you're describing is working exactly the way I would expect. Firestore local persistence is not meant to be a full replacement for the backend. By default, It's meant to be a temporary data source in the case that the backend is not available. If the backend is available, then the SDK will prefe...
I figured out why I was getting a result different than expected. The culprit was `{ includeMetadataChanges: true }`. As explained [here in the docs](https://firebase.google.com/docs/firestore/query-data/listen#events-metadata-changes), that option will trigger a listener event for metadata changes. So the listener ...
23,600,557
I am trying to enter the following meta tag in my jsp page using strut taglib ``` <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" name="Webmaster" content="Telephone: <s:text name="webmaster.phone" /> , email:<s:text name="webmaster.email" />, address:<s:text name="webmaster.mail" />"> ``` Bu...
2014/05/12
[ "https://Stackoverflow.com/questions/23600557", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3528482/" ]
If your JSP declare a kind of xhtml `DOCTYPE` than the `<meta>` tag must be properly closed, as reported in [Differences Between HTML and XHTML](http://www.w3schools.com/tags/tag_meta.asp). So your tag should be: ``` <meta http-equiv="Content-Type" content="text/html; ... address:<s:text name="webmaster.ma...
I had the same Eclipse warning in my html code and discovered it's b/c I didn't properly close the meta tag. Example incorrect meta tag: ``` <meta name="description" content="blah blah"> ``` Fixed by properly closing meta tag with "/>" : ``` <meta name="description" content="blah blah"/> ```
4,091,235
**Context**: I am deriving the formula for active earth pressure for an inclined soil mass behind a retaining wall. The formula is given in a textbooks (page 25 of [Theoretical Foundation Engineering by Braja M. Das](https://www.google.co.in/books/edition/Theoretical_Foundation_Engineering/A_26N9wg8kAC?hl=en&gbpv=1)). ...
2021/04/06
[ "https://math.stackexchange.com/questions/4091235", "https://math.stackexchange.com", "https://math.stackexchange.com/users/565021/" ]
Lots of algebra, but here we go. Let $\alpha=\cos(a+b-c-d)$, $\beta=\sqrt{1-\alpha^2}$, $\gamma=\cos(d-c)$ and $\delta=\cos(b-a)$. Using the Prosthaphaeresis formulas, the end result can be written as $$f\_\max=\frac{1-\delta^2}{\alpha-\gamma\delta+\sqrt\Delta}\tag1$$ where $\Delta=\alpha^2+\gamma^2+\delta^2-2\alpha\g...
I am not sure of my work as I find it hard to recheck, so if there's one, please comment on my answer. --- > > Find the maximum value of $f(\theta) = \dfrac{\sin(\theta-a)\sin(\theta-b)}{\sin(\theta-c)\sin(\theta-d)}$. > > > To simplify this one, you can use the product-to-sum identity: > > For angles $\alpha$...
4,091,235
**Context**: I am deriving the formula for active earth pressure for an inclined soil mass behind a retaining wall. The formula is given in a textbooks (page 25 of [Theoretical Foundation Engineering by Braja M. Das](https://www.google.co.in/books/edition/Theoretical_Foundation_Engineering/A_26N9wg8kAC?hl=en&gbpv=1)). ...
2021/04/06
[ "https://math.stackexchange.com/questions/4091235", "https://math.stackexchange.com", "https://math.stackexchange.com/users/565021/" ]
By the product-to-sum formula, the expression is $$\frac{\cos(b-a)-\cos(2\theta-a-b)}{\cos(d-c)-\cos(2\theta-c-d)},$$ which can be rewritten in the form $$\frac{p\cos(2\theta)+q\sin(2\theta)+r}{p'\cos(2\theta)+q'\sin(2\theta)+r'}.$$ Now we cancel the numerator of the derivative, $$(qr'-q'r)\cos(2\theta)+(rp'-r'p)\s...
I am not sure of my work as I find it hard to recheck, so if there's one, please comment on my answer. --- > > Find the maximum value of $f(\theta) = \dfrac{\sin(\theta-a)\sin(\theta-b)}{\sin(\theta-c)\sin(\theta-d)}$. > > > To simplify this one, you can use the product-to-sum identity: > > For angles $\alpha$...
4,091,235
**Context**: I am deriving the formula for active earth pressure for an inclined soil mass behind a retaining wall. The formula is given in a textbooks (page 25 of [Theoretical Foundation Engineering by Braja M. Das](https://www.google.co.in/books/edition/Theoretical_Foundation_Engineering/A_26N9wg8kAC?hl=en&gbpv=1)). ...
2021/04/06
[ "https://math.stackexchange.com/questions/4091235", "https://math.stackexchange.com", "https://math.stackexchange.com/users/565021/" ]
After a few hours, I get the following solution. This is clearly based on the form of known solution without which I would not know how to get the roots of those big equations (posted in the question). Here is what I got: We can rewrite $f(\theta)$ as $$ f(\theta) = \dfrac{\sin(\theta-a)\sin((\theta-a)+(a-b))}{\sin((...
I am not sure of my work as I find it hard to recheck, so if there's one, please comment on my answer. --- > > Find the maximum value of $f(\theta) = \dfrac{\sin(\theta-a)\sin(\theta-b)}{\sin(\theta-c)\sin(\theta-d)}$. > > > To simplify this one, you can use the product-to-sum identity: > > For angles $\alpha$...
4,091,235
**Context**: I am deriving the formula for active earth pressure for an inclined soil mass behind a retaining wall. The formula is given in a textbooks (page 25 of [Theoretical Foundation Engineering by Braja M. Das](https://www.google.co.in/books/edition/Theoretical_Foundation_Engineering/A_26N9wg8kAC?hl=en&gbpv=1)). ...
2021/04/06
[ "https://math.stackexchange.com/questions/4091235", "https://math.stackexchange.com", "https://math.stackexchange.com/users/565021/" ]
Lots of algebra, but here we go. Let $\alpha=\cos(a+b-c-d)$, $\beta=\sqrt{1-\alpha^2}$, $\gamma=\cos(d-c)$ and $\delta=\cos(b-a)$. Using the Prosthaphaeresis formulas, the end result can be written as $$f\_\max=\frac{1-\delta^2}{\alpha-\gamma\delta+\sqrt\Delta}\tag1$$ where $\Delta=\alpha^2+\gamma^2+\delta^2-2\alpha\g...
By the product-to-sum formula, the expression is $$\frac{\cos(b-a)-\cos(2\theta-a-b)}{\cos(d-c)-\cos(2\theta-c-d)},$$ which can be rewritten in the form $$\frac{p\cos(2\theta)+q\sin(2\theta)+r}{p'\cos(2\theta)+q'\sin(2\theta)+r'}.$$ Now we cancel the numerator of the derivative, $$(qr'-q'r)\cos(2\theta)+(rp'-r'p)\s...
4,091,235
**Context**: I am deriving the formula for active earth pressure for an inclined soil mass behind a retaining wall. The formula is given in a textbooks (page 25 of [Theoretical Foundation Engineering by Braja M. Das](https://www.google.co.in/books/edition/Theoretical_Foundation_Engineering/A_26N9wg8kAC?hl=en&gbpv=1)). ...
2021/04/06
[ "https://math.stackexchange.com/questions/4091235", "https://math.stackexchange.com", "https://math.stackexchange.com/users/565021/" ]
Lots of algebra, but here we go. Let $\alpha=\cos(a+b-c-d)$, $\beta=\sqrt{1-\alpha^2}$, $\gamma=\cos(d-c)$ and $\delta=\cos(b-a)$. Using the Prosthaphaeresis formulas, the end result can be written as $$f\_\max=\frac{1-\delta^2}{\alpha-\gamma\delta+\sqrt\Delta}\tag1$$ where $\Delta=\alpha^2+\gamma^2+\delta^2-2\alpha\g...
After a few hours, I get the following solution. This is clearly based on the form of known solution without which I would not know how to get the roots of those big equations (posted in the question). Here is what I got: We can rewrite $f(\theta)$ as $$ f(\theta) = \dfrac{\sin(\theta-a)\sin((\theta-a)+(a-b))}{\sin((...
53,825,238
I want to jump to a section within a html page using the tag: ``` <a href="#details">example</a> ``` The section id: ``` <div id="details"></div> <section id="viewad-details"> ``` The page itself contains a base tag which I need to keep: ``` <base href=//domain.com/"> ``` Doctype (pretty old legacy) ``` <!DOC...
2018/12/18
[ "https://Stackoverflow.com/questions/53825238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/547262/" ]
This is feasible with HTML5 as below code demonstrates: ```html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title of the document</title> </head> <body> <a href="#details">example</a> <div id="ipsum" style="width: 200px"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec pulvinar...
In order for the link to work with the `#` sign, the code needs to have an anchor link's "name" property. ``` <a name="details"><section id="viewad-details"></a> ``` The [W3C](https://www.w3.org/) defines this as a feature of HTML [Anchor tags](https://www.w3.org/MarkUp/1995-archive/Elements/A.html): > > NAME > O...
53,825,238
I want to jump to a section within a html page using the tag: ``` <a href="#details">example</a> ``` The section id: ``` <div id="details"></div> <section id="viewad-details"> ``` The page itself contains a base tag which I need to keep: ``` <base href=//domain.com/"> ``` Doctype (pretty old legacy) ``` <!DOC...
2018/12/18
[ "https://Stackoverflow.com/questions/53825238", "https://Stackoverflow.com", "https://Stackoverflow.com/users/547262/" ]
This is feasible with HTML5 as below code demonstrates: ```html <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Title of the document</title> </head> <body> <a href="#details">example</a> <div id="ipsum" style="width: 200px"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec pulvinar...
Here's some example ```js $(document).on('click', 'a[href^="#"]', function(event) { event.preventDefault(); $('html, body').animate({ scrollTop: $($.attr(this, 'href')).offset().top - 60 }, 500); }); ``` ```css .container { max-width: 900px; margin: auto; } header { text-align: center; ...
310,421
I am running `RHEL 6.7` with the following configuration for `sshd` ``` # $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. # This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin # The strategy ...
2016/09/16
[ "https://unix.stackexchange.com/questions/310421", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/72302/" ]
Because the `AUTOCREATE_SERVER_KEYS` is valid not in `/etc/ssh/sshd_config` file but in `/etc/sysconfig/sshd`
`AUTOCREATE_SERVER_KEYS=RSAONLY` is a service setting which belongs in `/etc/sysconfig/sshd`, not part of the sshd configuration in `/etc/ssh/sshd_config`
53,347,766
I am trying to change the text color by simply clicking the button but when I click the button it changes the previously typed text color also. Means changes the whole text color. When I try to change color through Spannable then it changes the color of the selected part of the text but not for the text which I am goin...
2018/11/17
[ "https://Stackoverflow.com/questions/53347766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5700719/" ]
What worked for me (I was missing some dependencies): ``` pip3 install opencv-python sudo apt-get install libcblas-dev sudo apt-get install libhdf5-dev sudo apt-get install libhdf5-serial-dev sudo apt-get install libatlas-base-dev sudo apt-get install libjasper-dev sudo apt-get install libqtgui4 sudo apt-get insta...
Exact same solution as @thvs86 but here's a single 1 line copy-paste so you don't have to insert each command individually: `pip3 install opencv-contrib-python; sudo apt-get install -y libatlas-base-dev libhdf5-dev libhdf5-serial-dev libatlas-base-dev libjasper-dev libqtgui4 libqt4-test`
53,347,766
I am trying to change the text color by simply clicking the button but when I click the button it changes the previously typed text color also. Means changes the whole text color. When I try to change color through Spannable then it changes the color of the selected part of the text but not for the text which I am goin...
2018/11/17
[ "https://Stackoverflow.com/questions/53347766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5700719/" ]
What worked for me (I was missing some dependencies): ``` pip3 install opencv-python sudo apt-get install libcblas-dev sudo apt-get install libhdf5-dev sudo apt-get install libhdf5-serial-dev sudo apt-get install libatlas-base-dev sudo apt-get install libjasper-dev sudo apt-get install libqtgui4 sudo apt-get insta...
You need to install only one package with neccessary shared object for it to work ```sh sudo apt-get install libatlas-base-dev ```
53,347,766
I am trying to change the text color by simply clicking the button but when I click the button it changes the previously typed text color also. Means changes the whole text color. When I try to change color through Spannable then it changes the color of the selected part of the text but not for the text which I am goin...
2018/11/17
[ "https://Stackoverflow.com/questions/53347766", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5700719/" ]
You need to install only one package with neccessary shared object for it to work ```sh sudo apt-get install libatlas-base-dev ```
Exact same solution as @thvs86 but here's a single 1 line copy-paste so you don't have to insert each command individually: `pip3 install opencv-contrib-python; sudo apt-get install -y libatlas-base-dev libhdf5-dev libhdf5-serial-dev libatlas-base-dev libjasper-dev libqtgui4 libqt4-test`
24,592,266
Starting with this `L Hernandez` From a vector containing the following: ``` [1] "HernandezOlaf " "HernandezLuciano " "HernandezAdrian " ``` I tried this: ``` 'subset(ABC, str_detect(ABC, "L Hernandez") == TRUE)' ``` The name Hernandez which includes the capital L anyplace is the desired output. The desire...
2014/07/06
[ "https://Stackoverflow.com/questions/24592266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2802775/" ]
May be this helps: ``` vec1 <- c("L Hernandez", "HernandezOlaf ","HernandezLuciano ", "HernandezAdrian ") grep("L ?Hernandez|Hernandez ?L",vec1,value=T) #[1] "L Hernandez" "HernandezLuciano " ``` ### Update ``` variable <- "L Hernandez" v1 <- gsub(" ", " ?", variable) #replace space with a space and question mark ...
You could use `agrep` function for approximate string matching. If you simply run this function it matches every string... ``` agrep("L Hernandez", c("HernandezOlaf ", "HernandezLuciano ", "HernandezAdrian ")) [1] 1 2 3 ``` but if you modify this a little "L Hernandez" -> "Hernandez L" ``` agrep("Hernandez L", c...
24,592,266
Starting with this `L Hernandez` From a vector containing the following: ``` [1] "HernandezOlaf " "HernandezLuciano " "HernandezAdrian " ``` I tried this: ``` 'subset(ABC, str_detect(ABC, "L Hernandez") == TRUE)' ``` The name Hernandez which includes the capital L anyplace is the desired output. The desire...
2014/07/06
[ "https://Stackoverflow.com/questions/24592266", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2802775/" ]
May be this helps: ``` vec1 <- c("L Hernandez", "HernandezOlaf ","HernandezLuciano ", "HernandezAdrian ") grep("L ?Hernandez|Hernandez ?L",vec1,value=T) #[1] "L Hernandez" "HernandezLuciano " ``` ### Update ``` variable <- "L Hernandez" v1 <- gsub(" ", " ?", variable) #replace space with a space and question mark ...
You could modify the following if you only want full names after a capital L: ``` vec1[grepl("Hernandez", vec1) & grepl("L\\.*", vec1)] [1] "L Hernandez" "HernandezLuciano ``` or ``` vec1[grepl("Hernandez", vec1) & grepl("L[[:alpha:]]", vec1)] [1] "HernandezLuciano " ``` The expression looks for a match on...
48,995,618
I have a script where I keep time of when I start and finish. This code works on Linux, but not on my MacOS Sierra v 10.12.6 ``` start=`date +"%a %b %d %Y %r"` end=`date +"%a %b %d %Y %r"` elapsed_time=`date -d @$(( $(date -d "$end" +%s) - $(date -d "$start" +%s) )) -u +'%H:%M:%S'` ``` The error I get is: ``` usag...
2018/02/26
[ "https://Stackoverflow.com/questions/48995618", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6153163/" ]
**Yes**, you definitely **can track moving surfaces and moving objects** in `ARCore`. If you track static surface using `ARCore` – the resulted features are mainly suitable for so-called `Camera Tracking`. If you track moving object/surface – the resulted features are mostly suitable for `Object Tracking`. You also...
Yes, ARCore tracks feature points, estimates surfaces, and also allows access to the image data from the camera, so custom computer vision algorithms can be written as well.
48,995,618
I have a script where I keep time of when I start and finish. This code works on Linux, but not on my MacOS Sierra v 10.12.6 ``` start=`date +"%a %b %d %Y %r"` end=`date +"%a %b %d %Y %r"` elapsed_time=`date -d @$(( $(date -d "$end" +%s) - $(date -d "$start" +%s) )) -u +'%H:%M:%S'` ``` The error I get is: ``` usag...
2018/02/26
[ "https://Stackoverflow.com/questions/48995618", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6153163/" ]
**Yes**, you definitely **can track moving surfaces and moving objects** in `ARCore`. If you track static surface using `ARCore` – the resulted features are mainly suitable for so-called `Camera Tracking`. If you track moving object/surface – the resulted features are mostly suitable for `Object Tracking`. You also...
I guess it should be possible theoretically. However, Ive tested it with some stuff in my HOUSE (running S8 and an app with unity and arcore) and the problem is more or less that it refuses to even start tracking movable things like books and plates etc: due to the feature points of the surrounding floor etc it alw...
134,651
So I have a script that needs to be executed remotely as root. This isn't a problem with most Linux distros since they have a root account. But since Ubuntu does not, executing anything as root requires a 2-step process of entering the account password twice - once to log in and once for sudo. The SSH process to launch...
2010/04/21
[ "https://serverfault.com/questions/134651", "https://serverfault.com", "https://serverfault.com/users/30408/" ]
> > This isn't a problem with most Linux > distros since they have a root > account. But since Ubuntu does not > > > Is this a serious sentence? I am yet to see a single \*nix system without `root` account. ``` sudo su ``` and you are root. After that use `passwd` to set root password. And BAM! you are able t...
By default connecting as the root account is possible. You just need to setup your ssh keys for the root account. Add your public key to /root/.ssh/authorized\_keys Tou could also create a service account to login that has sudo setup with NOPASSWD. ``` serviceaccount ALL = NOPASSWD: ALL ``` On Debian by default the...
134,651
So I have a script that needs to be executed remotely as root. This isn't a problem with most Linux distros since they have a root account. But since Ubuntu does not, executing anything as root requires a 2-step process of entering the account password twice - once to log in and once for sudo. The SSH process to launch...
2010/04/21
[ "https://serverfault.com/questions/134651", "https://serverfault.com", "https://serverfault.com/users/30408/" ]
You can ssh in using key-based only authentication, and then edit the sudoers file not to require a password. This will eliminate the password at the two steps you described. To see up ssh key based ssh access: ``` ssh-keygen ssh-copy-id dest-server ``` And the for the sudoers file: ``` sudo visudo -f /etc/sudoers...
> > This isn't a problem with most Linux > distros since they have a root > account. But since Ubuntu does not > > > Is this a serious sentence? I am yet to see a single \*nix system without `root` account. ``` sudo su ``` and you are root. After that use `passwd` to set root password. And BAM! you are able t...
134,651
So I have a script that needs to be executed remotely as root. This isn't a problem with most Linux distros since they have a root account. But since Ubuntu does not, executing anything as root requires a 2-step process of entering the account password twice - once to log in and once for sudo. The SSH process to launch...
2010/04/21
[ "https://serverfault.com/questions/134651", "https://serverfault.com", "https://serverfault.com/users/30408/" ]
You can ssh in using key-based only authentication, and then edit the sudoers file not to require a password. This will eliminate the password at the two steps you described. To see up ssh key based ssh access: ``` ssh-keygen ssh-copy-id dest-server ``` And the for the sudoers file: ``` sudo visudo -f /etc/sudoers...
By default connecting as the root account is possible. You just need to setup your ssh keys for the root account. Add your public key to /root/.ssh/authorized\_keys Tou could also create a service account to login that has sudo setup with NOPASSWD. ``` serviceaccount ALL = NOPASSWD: ALL ``` On Debian by default the...
126,185
I came to my current place of employment as an contracted IT support technician of the most generic variety about a year ago. I had only an associates degree to my name and most of what I knew both as a support technician, and as a tech professional in general, was self taught. In short time, I showed myself to be usef...
2019/01/10
[ "https://workplace.stackexchange.com/questions/126185", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/97769/" ]
I say listen to your body. I have been burned out twice. Don't let it happen to you. Did you know that burning out can have [lasting damaging effects on the brain](https://www.psychologicalscience.org/observer/burnout-and-the-brain)? When work affects your sleep you need to take a step back and address the things thst ...
***Don't just sit there, watching the wall coming closer, take control and steer away before you smash into it.*** > > Was I stupid to take such a job in the first place? > > > Ill advised, to put it very politely. You need to know your abilities and shortcomings very well! Only take on assignments that you're...
126,185
I came to my current place of employment as an contracted IT support technician of the most generic variety about a year ago. I had only an associates degree to my name and most of what I knew both as a support technician, and as a tech professional in general, was self taught. In short time, I showed myself to be usef...
2019/01/10
[ "https://workplace.stackexchange.com/questions/126185", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/97769/" ]
***Don't just sit there, watching the wall coming closer, take control and steer away before you smash into it.*** > > Was I stupid to take such a job in the first place? > > > Ill advised, to put it very politely. You need to know your abilities and shortcomings very well! Only take on assignments that you're...
IMHO, Find your balance and get help (i.e. more devs or contractors for areas you feel weaker at)
126,185
I came to my current place of employment as an contracted IT support technician of the most generic variety about a year ago. I had only an associates degree to my name and most of what I knew both as a support technician, and as a tech professional in general, was self taught. In short time, I showed myself to be usef...
2019/01/10
[ "https://workplace.stackexchange.com/questions/126185", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/97769/" ]
I say listen to your body. I have been burned out twice. Don't let it happen to you. Did you know that burning out can have [lasting damaging effects on the brain](https://www.psychologicalscience.org/observer/burnout-and-the-brain)? When work affects your sleep you need to take a step back and address the things thst ...
IMHO, Find your balance and get help (i.e. more devs or contractors for areas you feel weaker at)
126,185
I came to my current place of employment as an contracted IT support technician of the most generic variety about a year ago. I had only an associates degree to my name and most of what I knew both as a support technician, and as a tech professional in general, was self taught. In short time, I showed myself to be usef...
2019/01/10
[ "https://workplace.stackexchange.com/questions/126185", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/97769/" ]
I say listen to your body. I have been burned out twice. Don't let it happen to you. Did you know that burning out can have [lasting damaging effects on the brain](https://www.psychologicalscience.org/observer/burnout-and-the-brain)? When work affects your sleep you need to take a step back and address the things thst ...
Software projects are always overpromised and underdelivered, that's more or less a fact of life. Step 1: Mention to your manager you are understaffed relative to the workload. Estimate (realistically) how long it will take for various milestones in the project to be ready, even if it was just you working on them, ass...
126,185
I came to my current place of employment as an contracted IT support technician of the most generic variety about a year ago. I had only an associates degree to my name and most of what I knew both as a support technician, and as a tech professional in general, was self taught. In short time, I showed myself to be usef...
2019/01/10
[ "https://workplace.stackexchange.com/questions/126185", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/97769/" ]
I say listen to your body. I have been burned out twice. Don't let it happen to you. Did you know that burning out can have [lasting damaging effects on the brain](https://www.psychologicalscience.org/observer/burnout-and-the-brain)? When work affects your sleep you need to take a step back and address the things thst ...
To quote from one of your comments: > > The funding isn't really there to hire an additional resource and, to be honest, I don't even get paid that much. They definitely are not paying me as a full stack developer, which I believe is essentially the role I am playing. > > > An important thing to realize is, that ...
126,185
I came to my current place of employment as an contracted IT support technician of the most generic variety about a year ago. I had only an associates degree to my name and most of what I knew both as a support technician, and as a tech professional in general, was self taught. In short time, I showed myself to be usef...
2019/01/10
[ "https://workplace.stackexchange.com/questions/126185", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/97769/" ]
I say listen to your body. I have been burned out twice. Don't let it happen to you. Did you know that burning out can have [lasting damaging effects on the brain](https://www.psychologicalscience.org/observer/burnout-and-the-brain)? When work affects your sleep you need to take a step back and address the things thst ...
One step that hasn't been touched on much: update your resume. You have, from a very unpromising start, created an application that should be beyond your abilities. Emphasize that. You are almost certainly not going to be paid what you're worth where you are, and you definitely can't keep that pace up. If you fall bac...
126,185
I came to my current place of employment as an contracted IT support technician of the most generic variety about a year ago. I had only an associates degree to my name and most of what I knew both as a support technician, and as a tech professional in general, was self taught. In short time, I showed myself to be usef...
2019/01/10
[ "https://workplace.stackexchange.com/questions/126185", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/97769/" ]
Software projects are always overpromised and underdelivered, that's more or less a fact of life. Step 1: Mention to your manager you are understaffed relative to the workload. Estimate (realistically) how long it will take for various milestones in the project to be ready, even if it was just you working on them, ass...
IMHO, Find your balance and get help (i.e. more devs or contractors for areas you feel weaker at)
126,185
I came to my current place of employment as an contracted IT support technician of the most generic variety about a year ago. I had only an associates degree to my name and most of what I knew both as a support technician, and as a tech professional in general, was self taught. In short time, I showed myself to be usef...
2019/01/10
[ "https://workplace.stackexchange.com/questions/126185", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/97769/" ]
To quote from one of your comments: > > The funding isn't really there to hire an additional resource and, to be honest, I don't even get paid that much. They definitely are not paying me as a full stack developer, which I believe is essentially the role I am playing. > > > An important thing to realize is, that ...
IMHO, Find your balance and get help (i.e. more devs or contractors for areas you feel weaker at)
126,185
I came to my current place of employment as an contracted IT support technician of the most generic variety about a year ago. I had only an associates degree to my name and most of what I knew both as a support technician, and as a tech professional in general, was self taught. In short time, I showed myself to be usef...
2019/01/10
[ "https://workplace.stackexchange.com/questions/126185", "https://workplace.stackexchange.com", "https://workplace.stackexchange.com/users/97769/" ]
One step that hasn't been touched on much: update your resume. You have, from a very unpromising start, created an application that should be beyond your abilities. Emphasize that. You are almost certainly not going to be paid what you're worth where you are, and you definitely can't keep that pace up. If you fall bac...
IMHO, Find your balance and get help (i.e. more devs or contractors for areas you feel weaker at)
6,768,897
I have put together a very complicated search form. Using arrays I have managed to get it searching by checkboxes. ``` if(isset($_POST['search']) && !empty($_POST['search'])){ foreach($_POST['search'] as $key=>$value){ if($value==1) $search[] = "$key"; } $searchstring = implode(' AND ', $search); ``` } ``` ...
2011/07/20
[ "https://Stackoverflow.com/questions/6768897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/849850/" ]
OK, I think I found a very short way of doing this (only 1 line for the for loop): ``` var arr = [1,2,3,4,5,6,8,10,12,13,14,15,20,21,22,23,24,25,26,27,28,29,30]; var res = new Array(); res[0] = 0; for(var i=1;i<arr.length;i++) res[i] = (arr[i] == arr[i-1] + 1) ? (res[i-1] + 1) : 0; var maxLength = Math.max.apply({},...
You don't need jQuery for this. ``` function longestSeq(arr) { var len = 0, longestLen = -1, prev = null; for (var i = 0; i < arr.length; ++i) { if (prev == null || arr[i] - 1 === prev) ++len; else { if (len > longestLen) longestLen = len; len = 1; } } return longestLen > len ? l...
6,768,897
I have put together a very complicated search form. Using arrays I have managed to get it searching by checkboxes. ``` if(isset($_POST['search']) && !empty($_POST['search'])){ foreach($_POST['search'] as $key=>$value){ if($value==1) $search[] = "$key"; } $searchstring = implode(' AND ', $search); ``` } ``` ...
2011/07/20
[ "https://Stackoverflow.com/questions/6768897", "https://Stackoverflow.com", "https://Stackoverflow.com/users/849850/" ]
OK, I think I found a very short way of doing this (only 1 line for the for loop): ``` var arr = [1,2,3,4,5,6,8,10,12,13,14,15,20,21,22,23,24,25,26,27,28,29,30]; var res = new Array(); res[0] = 0; for(var i=1;i<arr.length;i++) res[i] = (arr[i] == arr[i-1] + 1) ? (res[i-1] + 1) : 0; var maxLength = Math.max.apply({},...
Here's the solution in pseudo code... First, setup another array with the same number of elements and initialised to zero, to use as counters... ``` Array01:=[1,2,3,4,5,6,8,10,12,13,14,15,20,21,22,23,24,25,26,27,28,29,30] Array02:=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] ``` Now the logic for filling in the...
33,148,172
I downloaded [ElasticSearch](https://www.elastic.co/downloads/elasticsearch), ran `bin/elasticsearch.bat` and it worked on my local machine. Then I added the elasticsearch folder to my repository and updated the deploymentscript (deploy.cmd), adding these lines: ``` echo starting ElasticSearch... elasticsearch-1.7.2\b...
2015/10/15
[ "https://Stackoverflow.com/questions/33148172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1654763/" ]
I suspect that this is failing due to its attempt to make local requests. Please see [this document](https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox#local-address-requests) for more information on the restrictions on the Azure Web App sandbox.
Pass `-Djava.net.preferIPv4Stack=true` argument to `elasticsearch.bat`. Also make sure that `JAVA_HOME` is set to Java 8 and not Java 7. The path on Azure Web Apps is `D:\Program Files\Java\jdk1.8.0_25` Also keep in mind that if you run multiple elasticsearch servers on the same VM (in the same App Service Plan) they...
33,148,172
I downloaded [ElasticSearch](https://www.elastic.co/downloads/elasticsearch), ran `bin/elasticsearch.bat` and it worked on my local machine. Then I added the elasticsearch folder to my repository and updated the deploymentscript (deploy.cmd), adding these lines: ``` echo starting ElasticSearch... elasticsearch-1.7.2\b...
2015/10/15
[ "https://Stackoverflow.com/questions/33148172", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1654763/" ]
Per my experience, Using the deployment script to start up ElasticSearch on Azure WebApp is not a correct way. In the doc <https://github.com/projectkudu/kudu/wiki/Azure-Web-App-sandbox>, the section "Network endpoint listening" says "The only way an application can be accessed via the internet is through the already-...
Pass `-Djava.net.preferIPv4Stack=true` argument to `elasticsearch.bat`. Also make sure that `JAVA_HOME` is set to Java 8 and not Java 7. The path on Azure Web Apps is `D:\Program Files\Java\jdk1.8.0_25` Also keep in mind that if you run multiple elasticsearch servers on the same VM (in the same App Service Plan) they...
26,881,360
I'm trying to alter some sample code I found. It's a one on one chat application but all commands are delivered and read by a buffered reader's `br.readLine();`. I need to alter that and instead of (within a while loop) wait for the user to input text in the console (via br.readLine();), but rather to wait for the ente...
2014/11/12
[ "https://Stackoverflow.com/questions/26881360", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1397978/" ]
When the Web server (here django hosted on IIS) takes care of authentication it typically sets the `REMOTE_USER` environment variable for use in the underlying application. In Django, `REMOTE_USER` is made available in the request.META attribute. Django can be configured to make use of the `REMOTE_USER` value using the...
Check out this module <https://pypi.org/project/django-windowsauth/> You can use it module to deploy your Django Project on IIS and enable Windows Authentication. It can also handle synchronize extra user information from Active Directory, and some other neat features.
71,729,310
For different analysis, I use different samples, but I need to make it transparent how the sample came about. Stata shows me *"XX observations dropped"* after each drop command. Is there a way to get R to state the number of observations dropped in the console during a "tidyverse styled" sample selection (see below)? I...
2022/04/03
[ "https://Stackoverflow.com/questions/71729310", "https://Stackoverflow.com", "https://Stackoverflow.com/users/17988045/" ]
**Description** Although I'm not able to test it, and I hope I didn't make any typos, I believe this sample script will copy both values and formulas to the destination range. `getFormulas()` returns an array of strings representing the formulas in each cell. These strings can simply be copied to the values array and ...
Try to change the loop: ``` for (var i = 0; i < lastRow; i++) { if(dest.setFormulas[Formulas[i]] = ""){ dest.setValues(Values[i][0]); dest.setFormulas(Formulas[i][0]); } } ``` This way: ``` for (var i = 0; i < lastRow; i++) { if (Formulas[i][0] != "") { dest.setFormula(Formulas[i][0]); } else { ...
28,250,946
I'm creating a bigContentView notification layout [as seen in this blog post](https://wiki.pushapps.mobi/pages/viewpage.action?pageId=5407074). For tracking purposes it is important for me to know whether the bigContentView layout was displayed or not? Is there a programmatic way to know that? It could be before I disp...
2015/01/31
[ "https://Stackoverflow.com/questions/28250946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1641535/" ]
You can surely estabilish if the **bigContentView** is (at least) set in your notification because is API-level dependent (API 16): this means you can **easly check if a session is eligible to display a big notification** or not and trace your metric accordingly by simply verifying the system api level. Regarding the ...
The closest I can think of at the moment to the notify event is at the GCM BroadcastReceiver's `onReceive()` [method](https://developer.android.com/google/gcm/client.html#sample-receive). With regards to strictly bigContentView displays, this may prove to be a challenge. The [documentation](http://developer.android.co...
73,920
I found this [cool website](http://gamemechanicexplorer.com/#easing-1) for game development and it has a list of easing functions: ![enter image description here](https://i.stack.imgur.com/Q5VXB.png) Although the site contains a description of what they're for, it goes over my head. What are easing functions and wha...
2014/04/23
[ "https://gamedev.stackexchange.com/questions/73920", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/31177/" ]
Easing functions are used for interpolation, typically (but not necessarily) in animation / kinematic motion. Linear interpolation (lerp) is something you may have heard of. Let's say you lerp a smiley face from one corner of the screen to another (much as per your image). This means the smiley will move at a steady ve...
Easing functions serve to change a value during a time period, from a starting number to an end number. You use that value to animate a property of an object in your game, such as position, rotation, scale, changing colors and other properties that use a value. The different easing functions determine the "feel" of t...
73,920
I found this [cool website](http://gamemechanicexplorer.com/#easing-1) for game development and it has a list of easing functions: ![enter image description here](https://i.stack.imgur.com/Q5VXB.png) Although the site contains a description of what they're for, it goes over my head. What are easing functions and wha...
2014/04/23
[ "https://gamedev.stackexchange.com/questions/73920", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/31177/" ]
An easing function lets you interpolate values from one value to another over a given interval using something called an "easing function". These are functions that are designed to take a value and at any given point in the interval, output the value at a certain point in time. This can be best explained by taking a l...
Easing functions serve to change a value during a time period, from a starting number to an end number. You use that value to animate a property of an object in your game, such as position, rotation, scale, changing colors and other properties that use a value. The different easing functions determine the "feel" of t...
73,920
I found this [cool website](http://gamemechanicexplorer.com/#easing-1) for game development and it has a list of easing functions: ![enter image description here](https://i.stack.imgur.com/Q5VXB.png) Although the site contains a description of what they're for, it goes over my head. What are easing functions and wha...
2014/04/23
[ "https://gamedev.stackexchange.com/questions/73920", "https://gamedev.stackexchange.com", "https://gamedev.stackexchange.com/users/31177/" ]
Easing functions are used for interpolation, typically (but not necessarily) in animation / kinematic motion. Linear interpolation (lerp) is something you may have heard of. Let's say you lerp a smiley face from one corner of the screen to another (much as per your image). This means the smiley will move at a steady ve...
An easing function lets you interpolate values from one value to another over a given interval using something called an "easing function". These are functions that are designed to take a value and at any given point in the interval, output the value at a certain point in time. This can be best explained by taking a l...
15,624,512
Here is the problem : I would like to merge two classes called *Song* each, both do share most members but not all. Populating their contents won't be problem in case members are not found, they will be simply ignored, so probably okay but who knows, I might have to revert back to the original implementation (separate...
2013/03/25
[ "https://Stackoverflow.com/questions/15624512", "https://Stackoverflow.com", "https://Stackoverflow.com/users/361899/" ]
`django.views.generic.list_detail` was [deprecated in Django 1.3](https://docs.djangoproject.com/en/1.3/topics/generic-views/#generic-views): > > From Django 1.3, function-based generic views have been deprecated in favor of a class-based approach. > > > Use [`django.views.generic.list.ListView`](https://docs.dja...
After importing `django.views.generic.list.ListView` You just need to change `list_detail.object_detail` to `ListView.as_view()`
14,758,515
I have a simple Java theory question. If I write a class that contains a main() method along with some other methods, and within that main method invoke an instance of the class (say new Class()), I'm a bit confused why a recursion doesn't occur. Let's say I'm writing a graphing program, where the other methods in the ...
2013/02/07
[ "https://Stackoverflow.com/questions/14758515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1827485/" ]
I think you're confusing the `main` method - which is just the entry point of the program - with a *constructor*. For example, if you wrote: ``` public class Example { public Example() { new Example(); // Recursive call } public static void main(String[] args) { // Will call the construct...
The `main` method does not get executed automatically when you instance a class. It simply can be used as an entry point to an application - and then will be executed once.
14,758,515
I have a simple Java theory question. If I write a class that contains a main() method along with some other methods, and within that main method invoke an instance of the class (say new Class()), I'm a bit confused why a recursion doesn't occur. Let's say I'm writing a graphing program, where the other methods in the ...
2013/02/07
[ "https://Stackoverflow.com/questions/14758515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1827485/" ]
The `main` method does not get executed automatically when you instance a class. It simply can be used as an entry point to an application - and then will be executed once.
just because you have a main method in the class doesn' mean that it will be called every time you create the class. Java looks for main as an entry point for the program, and calls it upon startup. Any objects you instantiate from their do not call main, since as far as java is concerned, it has done its job of maki...
14,758,515
I have a simple Java theory question. If I write a class that contains a main() method along with some other methods, and within that main method invoke an instance of the class (say new Class()), I'm a bit confused why a recursion doesn't occur. Let's say I'm writing a graphing program, where the other methods in the ...
2013/02/07
[ "https://Stackoverflow.com/questions/14758515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1827485/" ]
I think you're confusing the `main` method - which is just the entry point of the program - with a *constructor*. For example, if you wrote: ``` public class Example { public Example() { new Example(); // Recursive call } public static void main(String[] args) { // Will call the construct...
just because you have a main method in the class doesn' mean that it will be called every time you create the class. Java looks for main as an entry point for the program, and calls it upon startup. Any objects you instantiate from their do not call main, since as far as java is concerned, it has done its job of maki...
14,758,515
I have a simple Java theory question. If I write a class that contains a main() method along with some other methods, and within that main method invoke an instance of the class (say new Class()), I'm a bit confused why a recursion doesn't occur. Let's say I'm writing a graphing program, where the other methods in the ...
2013/02/07
[ "https://Stackoverflow.com/questions/14758515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1827485/" ]
I think you're confusing the `main` method - which is just the entry point of the program - with a *constructor*. For example, if you wrote: ``` public class Example { public Example() { new Example(); // Recursive call } public static void main(String[] args) { // Will call the construct...
Recursion isn't a bad thing. I suspect you are asking why there isn't an infinite recursion. The big concept you are missing is that when you call new Example() you are allocating memory and then invoking just one method (the constructor). The `main()` is only invoked at the start of the whole program unless you expli...
14,758,515
I have a simple Java theory question. If I write a class that contains a main() method along with some other methods, and within that main method invoke an instance of the class (say new Class()), I'm a bit confused why a recursion doesn't occur. Let's say I'm writing a graphing program, where the other methods in the ...
2013/02/07
[ "https://Stackoverflow.com/questions/14758515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1827485/" ]
Recursion isn't a bad thing. I suspect you are asking why there isn't an infinite recursion. The big concept you are missing is that when you call new Example() you are allocating memory and then invoking just one method (the constructor). The `main()` is only invoked at the start of the whole program unless you expli...
just because you have a main method in the class doesn' mean that it will be called every time you create the class. Java looks for main as an entry point for the program, and calls it upon startup. Any objects you instantiate from their do not call main, since as far as java is concerned, it has done its job of maki...
62,670
In *Harry Potter and the Prisoner of Azkaban*, Prof. Lupin turns into a werewolf and tries to kill Harry, and just a few days later Harry talks nicely with Prof. Lupin. Why would Harry do that?
2016/11/02
[ "https://movies.stackexchange.com/questions/62670", "https://movies.stackexchange.com", "https://movies.stackexchange.com/users/42753/" ]
Because he knows that Lupin is a werewolf because of Hermione. > > **Hermione:** He's a werewolf! That's why he's been missing classes. > > > **Lupin:** How long have you known? > > > **Hermione:** Since Professor Snape set the essay. > > > A werewolf can hurt his dear ones without knowing and transforming in...
Because a werewolf has no control over themselves if they turn. However, some of the worst effects can be mitigated by consuming Wolfsbane Potion, which allows a werewolf to retain his or her human mind while transformed, thus freeing him or her from the worry of harming other humans or themselves. But Lupin had not t...
73,157,949
i paste a code that i found to centralize the content of container, but now im trying to use float:left and right and the divs are not going to the side. Link for codepen of this code: <https://codepen.io/racr-1/pen/oNqoZVQ> ```css .container { width: 65%; border: 1px solid black; display: flex; flex-direction...
2022/07/28
[ "https://Stackoverflow.com/questions/73157949", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19260332/" ]
Although as the other answer indicates it is undefined behavior per standard to instantiate `std::uniform_int_distribution` with `uint8_t` template argument, the UBsan warning here is unrelated to that. UBSan is flagging the implementation of the Mersenne twister itself, but the implementation doesn't have any undefin...
The result of using `uint8_t` in a [`std::uniform_int_distribution`](https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution) is undefined, so: ```cpp std::uniform_int_distribution<uint8_t> dd(0, 255); // Don't do this! ``` You can use any of `short`, `int`, `long`, `long long`, `unsigned short`, `...
73,157,949
i paste a code that i found to centralize the content of container, but now im trying to use float:left and right and the divs are not going to the side. Link for codepen of this code: <https://codepen.io/racr-1/pen/oNqoZVQ> ```css .container { width: 65%; border: 1px solid black; display: flex; flex-direction...
2022/07/28
[ "https://Stackoverflow.com/questions/73157949", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19260332/" ]
The result of using `uint8_t` in a [`std::uniform_int_distribution`](https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution) is undefined, so: ```cpp std::uniform_int_distribution<uint8_t> dd(0, 255); // Don't do this! ``` You can use any of `short`, `int`, `long`, `long long`, `unsigned short`, `...
**`unsigned` types have well-defined wrapping behaviour in C++.** This is one reason why they get used in PRNGs and other bit-manipulation use-cases where that's desired and expected (and necessary for the algorithm), not an error. GCC devs are right: it's unreasonable to treat *all* unsigned wrapping as a problem. **...
73,157,949
i paste a code that i found to centralize the content of container, but now im trying to use float:left and right and the divs are not going to the side. Link for codepen of this code: <https://codepen.io/racr-1/pen/oNqoZVQ> ```css .container { width: 65%; border: 1px solid black; display: flex; flex-direction...
2022/07/28
[ "https://Stackoverflow.com/questions/73157949", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19260332/" ]
Although as the other answer indicates it is undefined behavior per standard to instantiate `std::uniform_int_distribution` with `uint8_t` template argument, the UBsan warning here is unrelated to that. UBSan is flagging the implementation of the Mersenne twister itself, but the implementation doesn't have any undefin...
**`unsigned` types have well-defined wrapping behaviour in C++.** This is one reason why they get used in PRNGs and other bit-manipulation use-cases where that's desired and expected (and necessary for the algorithm), not an error. GCC devs are right: it's unreasonable to treat *all* unsigned wrapping as a problem. **...
73,072,065
I'm using Oracle SQL Developer and I would like to make a SELECT that brings all the products sold from the last day of the previous month (but only products sold from 4 pm on the last day of the previous month) to the current day (only until 8 am of the current day). For example, today is 7/21/2022. If I run this que...
2022/07/21
[ "https://Stackoverflow.com/questions/73072065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11585676/" ]
You can use `TRUNC(value, 'MM')` to find midnight of the 1st day of the current month and then subtract 8 hours to find the start of the range and then use `TRUNC(value)` to find midnight of today and add 8 hours to find the end of the range: ```sql SELECT * FROM table_name WHERE date_column >= TRUNC(SYSDATE, 'MM')...
You can use `TRUNC` to get to the first day of a date's month. Then subtract one day and add sixteen hours. And it's again `TRUNC` that you use to get back to the beginning of a day (midnight) to which you can add eight hours. ``` select * from mytable where dt >= trunc(sysdate, 'mm') - interval '1' day + interval '1...
8,833,819
I have a UIWebView that loads html, css and javascript. When ever I do a change in the html or css, that is applied ones I reopen the WebView. But my JavaScripts seems to be cached, changes in them dosen't get visbile when reopen the WebView. What am I missing here?
2012/01/12
[ "https://Stackoverflow.com/questions/8833819", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
This answer helped me: [Prevent caching of .css files in UIWebView loaded from disk](https://stackoverflow.com/questions/3549508/prevent-caching-of-css-files-in-uiwebview-loaded-from-disk) Basically, you just need to add an incrementer as parameter to the link like `?version=1` or `?time=12345678`. For example: `<scri...
I suspected UIWebView caching as well. Initially. But the actual problem was with Xcode treating .js files as compilable sources - Xcode puts them into a "Compile Sources" build phase (project targets -> Build Phases tab) whereas they should be in "Copy Bundle Resources" phase. Whatever compiler think about the .js fil...
10,557,871
I'm trying to implement a list where the only item type is a folder. If someone click "New" they are brought to a form that allows them to enter a folder name, description, and select either "Active" or "Inactive" from a drop-down menu. Inside the folder I want a simple list with only 2 columns. I tried making a cust...
2012/05/11
[ "https://Stackoverflow.com/questions/10557871", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1265571/" ]
I don't know if this issue is still relevant, but maybe someone else will find my answer useful. I used to implement a list that contains only folders in the root, which in order can contain few item based content types. There was two event receivers for FeatureActivated and ItemAdded events, which changes UniqueConte...
Unfortunately, no. Since SharePoint is Lists are not relational data, the only options to you are allowing several Content Types. If a content type is available to the list, it's available to the entire list (root, and sub-folders). One possibility to model what you are trying to accomplish relies on SharePoint 2010 E...
20,508
In my company to access my application to record, i need internet connection (with auto proxy: Ex: <http://autoproxy.xx.xx>), how and where can i set this proxy in **HTTPS Test script recorder?** thanks,
2016/07/14
[ "https://sqa.stackexchange.com/questions/20508", "https://sqa.stackexchange.com", "https://sqa.stackexchange.com/users/19291/" ]
It seems JMeter doesn't support PAC files. Try an alternative recording solution i.e. [JMeter Chrome Extension](https://guide.blazemeter.com/hc/en-us/articles/206732579-Chrome-Extension)
I did a Google search for "JMeter automatic proxy". The first search result said this: > > PAC fiels[sic] contain javascript which is executed by the browser to decide which proxy URL they want to use. JMeter is not a browser so it does not run this code. The solution is simply to resolve which proxy this script retu...
14,590
I'm trying to process a payment with Stripe, but am getting an error after the form submits and reloads. The error is "Sorry, there was an unexpected error communicating with the payment gateway." I did a little digging and dumped out the exception being throw inside OrdersService.php file. The exception message say...
2013/10/15
[ "https://expressionengine.stackexchange.com/questions/14590", "https://expressionengine.stackexchange.com", "https://expressionengine.stackexchange.com/users/206/" ]
I've somewhat pinpointed the issue, but I'm not too sure where to start fixing it. Essentially, the token generated on the client side which is being set to an input with the name payment[token] is not being recognized inside the payment processing. Inside the file `Omnipay/Stripe/Message/AuthorizeRequest.php` file t...
Store 2.x use the new Stripe.js which requires that you use `data-stripe=""` on your form elements oppose to `id=""` and `name=""`for all of your payment specific fields. Here is a stripped down version of your template: ``` <h4>Payment Information</h4> <label>Name</label> <input data-stripe="name" type="text" placeh...
14,590
I'm trying to process a payment with Stripe, but am getting an error after the form submits and reloads. The error is "Sorry, there was an unexpected error communicating with the payment gateway." I did a little digging and dumped out the exception being throw inside OrdersService.php file. The exception message say...
2013/10/15
[ "https://expressionengine.stackexchange.com/questions/14590", "https://expressionengine.stackexchange.com", "https://expressionengine.stackexchange.com/users/206/" ]
Store 2.x use the new Stripe.js which requires that you use `data-stripe=""` on your form elements oppose to `id=""` and `name=""`for all of your payment specific fields. Here is a stripped down version of your template: ``` <h4>Payment Information</h4> <label>Name</label> <input data-stripe="name" type="text" placeh...
This has been fixed in [Store 2.0.4](https://exp-resso.com/docs/release_notes.html#store_204): > > Fixed an error with Stripe gateway where card token was not submitted correctly > > > Per Bryant's answer, in Store 2.0.3 the card token was not being correctly passed through to Stripe which meant the payment was u...
14,590
I'm trying to process a payment with Stripe, but am getting an error after the form submits and reloads. The error is "Sorry, there was an unexpected error communicating with the payment gateway." I did a little digging and dumped out the exception being throw inside OrdersService.php file. The exception message say...
2013/10/15
[ "https://expressionengine.stackexchange.com/questions/14590", "https://expressionengine.stackexchange.com", "https://expressionengine.stackexchange.com/users/206/" ]
I've somewhat pinpointed the issue, but I'm not too sure where to start fixing it. Essentially, the token generated on the client side which is being set to an input with the name payment[token] is not being recognized inside the payment processing. Inside the file `Omnipay/Stripe/Message/AuthorizeRequest.php` file t...
This has been fixed in [Store 2.0.4](https://exp-resso.com/docs/release_notes.html#store_204): > > Fixed an error with Stripe gateway where card token was not submitted correctly > > > Per Bryant's answer, in Store 2.0.3 the card token was not being correctly passed through to Stripe which meant the payment was u...
5,134,946
I have an `NSArray` of `NSDictionary`. Each dictionary in the array has three keys: 'Name', 'Sex' and 'Age' How can I find the index in `NSArray` of `NSDictionary` where, for example, `Name = 'Roger'`?
2011/02/27
[ "https://Stackoverflow.com/questions/5134946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/469162/" ]
``` NSUInteger count = [array count]; for (NSUInteger index = 0; index < count; index++) { if ([[[array objectAtIndex: index] objectForKey: @"Name"] isEqualToString: @"Roger"]) { return index; } } return NSNotFound; ```
There's method [NSArray indexOfObjectPassingTest]. But it employs blocks, an Apple extension to C, and therefore is evil. Instead, do this: ``` NSArray *a; //Comes from somewhere... int i; for(i=0;i<a.count;i++) if([[[a objectAtIndex:i] objectForKey: @"Name"] compare: @"Roger"] == 0) return i; //That's the...
5,134,946
I have an `NSArray` of `NSDictionary`. Each dictionary in the array has three keys: 'Name', 'Sex' and 'Age' How can I find the index in `NSArray` of `NSDictionary` where, for example, `Name = 'Roger'`?
2011/02/27
[ "https://Stackoverflow.com/questions/5134946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/469162/" ]
On iOS 4.0 and up you can do the following: ``` - (NSUInteger) indexOfObjectWithName: (NSString*) name inArray: (NSArray*) array { return [array indexOfObjectPassingTest: ^BOOL(id dictionary, NSUInteger idx, BOOL *stop) { return [[dictionary objectForKey: @"Name"] isEqualToString: name]; }]...
There's method [NSArray indexOfObjectPassingTest]. But it employs blocks, an Apple extension to C, and therefore is evil. Instead, do this: ``` NSArray *a; //Comes from somewhere... int i; for(i=0;i<a.count;i++) if([[[a objectAtIndex:i] objectForKey: @"Name"] compare: @"Roger"] == 0) return i; //That's the...
5,134,946
I have an `NSArray` of `NSDictionary`. Each dictionary in the array has three keys: 'Name', 'Sex' and 'Age' How can I find the index in `NSArray` of `NSDictionary` where, for example, `Name = 'Roger'`?
2011/02/27
[ "https://Stackoverflow.com/questions/5134946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/469162/" ]
``` NSUInteger count = [array count]; for (NSUInteger index = 0; index < count; index++) { if ([[[array objectAtIndex: index] objectForKey: @"Name"] isEqualToString: @"Roger"]) { return index; } } return NSNotFound; ```
If you're using iOS > 3.0 you will be able to use the `for in` construct. ``` for(NSDictionary *dict in myArray) { if([[dict objectForKey:@"Name"] isEqualToString:@"Roger"]) { return [myArray indexForObject:dict]; } } ```
5,134,946
I have an `NSArray` of `NSDictionary`. Each dictionary in the array has three keys: 'Name', 'Sex' and 'Age' How can I find the index in `NSArray` of `NSDictionary` where, for example, `Name = 'Roger'`?
2011/02/27
[ "https://Stackoverflow.com/questions/5134946", "https://Stackoverflow.com", "https://Stackoverflow.com/users/469162/" ]
On iOS 4.0 and up you can do the following: ``` - (NSUInteger) indexOfObjectWithName: (NSString*) name inArray: (NSArray*) array { return [array indexOfObjectPassingTest: ^BOOL(id dictionary, NSUInteger idx, BOOL *stop) { return [[dictionary objectForKey: @"Name"] isEqualToString: name]; }]...
If you're using iOS > 3.0 you will be able to use the `for in` construct. ``` for(NSDictionary *dict in myArray) { if([[dict objectForKey:@"Name"] isEqualToString:@"Roger"]) { return [myArray indexForObject:dict]; } } ```
1,436,565
We have to prove this identity : $$4\cos\frac\pi5\cdot\sin\frac\pi{10}=1$$ The book's hint is we somehow find out that $\displaystyle1+2\left(\cos\frac\pi5-\cos\frac{2\pi}5\right)$ equals something (from the geometry of a regular pentagon) and the result follows. But I can neither see why the book's hint is true nor ho...
2015/09/15
[ "https://math.stackexchange.com/questions/1436565", "https://math.stackexchange.com", "https://math.stackexchange.com/users/268989/" ]
Given $\displaystyle 2\cos \frac{\pi}{5}\cdot \sin \frac{\pi}{10}\;,$ Now Let $\displaystyle \frac{\pi}{10} = \theta \;,$ and using $$ 2\sin A\cdot \cos A = \sin 2A$$ Then $$\displaystyle 2\cos 2\theta \cdot \sin \theta=\frac{2\cos 2\theta\cdot \sin \theta \cdot \cos \theta}{\cos \theta} = \frac{2\sin 2\theta \cdot \c...
HINT: Notice $$LHS=2\cos \frac{\pi}{5}\sin\frac{\pi}{10}$$ $$=2\cos 36^\circ \sin18^\circ$$ Setting the values of $\cos 36^\circ$ & $\sin 18^\circ$ $$=2\left(\frac{\sqrt 5+1}{4}\right)\left(\frac{\sqrt 5-1}{4}\right)$$ $$=\frac{(\sqrt 5+1)(\sqrt 5-1)}{8}$$ $$=\frac{(\sqrt 5)^2-1^2}{8}$$ $$=\frac{5-1}{8}=\frac{1}{2}$...
1,436,565
We have to prove this identity : $$4\cos\frac\pi5\cdot\sin\frac\pi{10}=1$$ The book's hint is we somehow find out that $\displaystyle1+2\left(\cos\frac\pi5-\cos\frac{2\pi}5\right)$ equals something (from the geometry of a regular pentagon) and the result follows. But I can neither see why the book's hint is true nor ho...
2015/09/15
[ "https://math.stackexchange.com/questions/1436565", "https://math.stackexchange.com", "https://math.stackexchange.com/users/268989/" ]
Using [Werner Formula](http://mathworld.wolfram.com/WernerFormulas.html), $$2\cos36^\circ\sin18^\circ=\sin54^\circ-\sin18^\circ=\cos36^\circ-\cos72^\circ$$ Now see [Proving trigonometric equation $\cos(36^\circ) - \cos(72^\circ) = 1/2$](https://math.stackexchange.com/questions/827540/proving-trigonometric-equation-cos...
HINT: Notice $$LHS=2\cos \frac{\pi}{5}\sin\frac{\pi}{10}$$ $$=2\cos 36^\circ \sin18^\circ$$ Setting the values of $\cos 36^\circ$ & $\sin 18^\circ$ $$=2\left(\frac{\sqrt 5+1}{4}\right)\left(\frac{\sqrt 5-1}{4}\right)$$ $$=\frac{(\sqrt 5+1)(\sqrt 5-1)}{8}$$ $$=\frac{(\sqrt 5)^2-1^2}{8}$$ $$=\frac{5-1}{8}=\frac{1}{2}$...
4,203,957
While reading the [pigeonhole principle](http://en.wikipedia.org/wiki/Pigeonhole_principle) on Wikipedia, I come across - "collisions are inevitable in a hash table because the number of possible keys exceeds the number of indices in the array. No hashing algorithm, no matter how clever, can avoid these collisions". Bu...
2010/11/17
[ "https://Stackoverflow.com/questions/4203957", "https://Stackoverflow.com", "https://Stackoverflow.com/users/138645/" ]
`gperf` creates the hash function and the hash table basing on a **predefined** list of strings. It therefore appears to me that `gperf` creates the hashes long enough so that there are enough possibilities. That's what you can do only if you know every possible key upfront - which is an assumption which didn't hol...
From the gperf's website: "For a given list of strings, it produces a hash function and hash table,..." - which means it has to know all the strings previously in order to prepare a function, that works without collisions. Usual hash functions you are using in general programming languages are able to handle any strin...
3,412,690
My definition of $A\subset B$ dense in $B$ if $$\forall x\_0\in B, \forall \varepsilon >0, \mathcal B(x\_0 ,\varepsilon )\cap A\neq \emptyset.$$ In this definition, shouldn't we rather take $$\mathcal B(x\_0,\varepsilon )\setminus \{x\_0\}\neq\emptyset \ \ ?$$
2019/10/28
[ "https://math.stackexchange.com/questions/3412690", "https://math.stackexchange.com", "https://math.stackexchange.com/users/714065/" ]
No, the definition you gave is correct. Take for example $\mathbb N$ with discrete metric. Of course $\mathbb N$ is dense in it self. If you use $\mathcal B(x\_0,\varepsilon )\setminus \{x\_0\}$ instead of $\mathcal B(x\_0,\varepsilon )$, then when $\varepsilon <1$ and $n\in\mathbb N$, you'll get $$\mathcal B(n,\vareps...
To rephrase the definition given, $$ \forall x\_0 \in B,\ \forall \varepsilon > 0,\ \exists a \in A,\ d(x\_0,a) < \varepsilon $$ where $d$ is the metric. If $x\_0 \in A$ already, then that's fine. But what's more interesting is that points of $B \setminus A$ also have points of $A$ arbitrarily close to them.
46,859,093
I'm currently working on a smart home project, which conects sensors and that stuff. The main server runs on a Raspberry Pi, and was designed using Node JS. On the local network, you can access the system web page and see logs, users and manage the sensors. I would also like to add a camera streaming. I have an IP cam...
2017/10/21
[ "https://Stackoverflow.com/questions/46859093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3735796/" ]
I solved the issue. If anyone has a problem similar to this, I hope this might help! To achieve this like I was trying, depends a lot on the camera you are using. I was using a rg-ip01 camera. Some cameras will use different protocols and technologies. So I installed the camera and accessed its IP address. I inspected...
Where is IP camera stream to? Seem I not found Streaming server. * You need RTMP Server, but some IP camera build-in RTMP server. * ipcamlive is a streaming service. but you need bandwidth for sending. * You would't install any plugin, but RTMP need plugin, i.e. flash, vlc. You need to convert to HTTP protocols. for e...
46,859,093
I'm currently working on a smart home project, which conects sensors and that stuff. The main server runs on a Raspberry Pi, and was designed using Node JS. On the local network, you can access the system web page and see logs, users and manage the sensors. I would also like to add a camera streaming. I have an IP cam...
2017/10/21
[ "https://Stackoverflow.com/questions/46859093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3735796/" ]
I have published project on Github that help you to stream ip/network camera on to web browser real time without plugin require, which I contributed to open source project under MIT License that might be matched to your need, if you need to try check this out: [Streaming IP/Network Camera on web browser using NodeJS...
Where is IP camera stream to? Seem I not found Streaming server. * You need RTMP Server, but some IP camera build-in RTMP server. * ipcamlive is a streaming service. but you need bandwidth for sending. * You would't install any plugin, but RTMP need plugin, i.e. flash, vlc. You need to convert to HTTP protocols. for e...
46,859,093
I'm currently working on a smart home project, which conects sensors and that stuff. The main server runs on a Raspberry Pi, and was designed using Node JS. On the local network, you can access the system web page and see logs, users and manage the sensors. I would also like to add a camera streaming. I have an IP cam...
2017/10/21
[ "https://Stackoverflow.com/questions/46859093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3735796/" ]
Almost every camera support MJPEG stream that can be displayed on the web easily using an IMG tag. However MJPEG stream requires really high bandwidth (e.g. 20-30mbps for megapixel resolution). If bandwidth consumption counts you need H264/H265 video streaming. Problem is that IP cameras use RTSP protocol for H264/H26...
Where is IP camera stream to? Seem I not found Streaming server. * You need RTMP Server, but some IP camera build-in RTMP server. * ipcamlive is a streaming service. but you need bandwidth for sending. * You would't install any plugin, but RTMP need plugin, i.e. flash, vlc. You need to convert to HTTP protocols. for e...
46,859,093
I'm currently working on a smart home project, which conects sensors and that stuff. The main server runs on a Raspberry Pi, and was designed using Node JS. On the local network, you can access the system web page and see logs, users and manage the sensors. I would also like to add a camera streaming. I have an IP cam...
2017/10/21
[ "https://Stackoverflow.com/questions/46859093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3735796/" ]
I have used Node js node RTSP Stream from an RTSP URL. ``` Stream = require('node-rtsp-stream') stream = new Stream({ name: 'name', streamUrl: 'rtsp://username:password@IP Address/h265/ch1/main/av_stream', wsPort: 9999, ffmpegOptions: { // options ffmpeg flags '-stats': '', // an option with no neccessary value uses...
Where is IP camera stream to? Seem I not found Streaming server. * You need RTMP Server, but some IP camera build-in RTMP server. * ipcamlive is a streaming service. but you need bandwidth for sending. * You would't install any plugin, but RTMP need plugin, i.e. flash, vlc. You need to convert to HTTP protocols. for e...
46,859,093
I'm currently working on a smart home project, which conects sensors and that stuff. The main server runs on a Raspberry Pi, and was designed using Node JS. On the local network, you can access the system web page and see logs, users and manage the sensors. I would also like to add a camera streaming. I have an IP cam...
2017/10/21
[ "https://Stackoverflow.com/questions/46859093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3735796/" ]
I solved the issue. If anyone has a problem similar to this, I hope this might help! To achieve this like I was trying, depends a lot on the camera you are using. I was using a rg-ip01 camera. Some cameras will use different protocols and technologies. So I installed the camera and accessed its IP address. I inspected...
I have published project on Github that help you to stream ip/network camera on to web browser real time without plugin require, which I contributed to open source project under MIT License that might be matched to your need, if you need to try check this out: [Streaming IP/Network Camera on web browser using NodeJS...
46,859,093
I'm currently working on a smart home project, which conects sensors and that stuff. The main server runs on a Raspberry Pi, and was designed using Node JS. On the local network, you can access the system web page and see logs, users and manage the sensors. I would also like to add a camera streaming. I have an IP cam...
2017/10/21
[ "https://Stackoverflow.com/questions/46859093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3735796/" ]
I solved the issue. If anyone has a problem similar to this, I hope this might help! To achieve this like I was trying, depends a lot on the camera you are using. I was using a rg-ip01 camera. Some cameras will use different protocols and technologies. So I installed the camera and accessed its IP address. I inspected...
Almost every camera support MJPEG stream that can be displayed on the web easily using an IMG tag. However MJPEG stream requires really high bandwidth (e.g. 20-30mbps for megapixel resolution). If bandwidth consumption counts you need H264/H265 video streaming. Problem is that IP cameras use RTSP protocol for H264/H26...
46,859,093
I'm currently working on a smart home project, which conects sensors and that stuff. The main server runs on a Raspberry Pi, and was designed using Node JS. On the local network, you can access the system web page and see logs, users and manage the sensors. I would also like to add a camera streaming. I have an IP cam...
2017/10/21
[ "https://Stackoverflow.com/questions/46859093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3735796/" ]
I solved the issue. If anyone has a problem similar to this, I hope this might help! To achieve this like I was trying, depends a lot on the camera you are using. I was using a rg-ip01 camera. Some cameras will use different protocols and technologies. So I installed the camera and accessed its IP address. I inspected...
I have used Node js node RTSP Stream from an RTSP URL. ``` Stream = require('node-rtsp-stream') stream = new Stream({ name: 'name', streamUrl: 'rtsp://username:password@IP Address/h265/ch1/main/av_stream', wsPort: 9999, ffmpegOptions: { // options ffmpeg flags '-stats': '', // an option with no neccessary value uses...
46,859,093
I'm currently working on a smart home project, which conects sensors and that stuff. The main server runs on a Raspberry Pi, and was designed using Node JS. On the local network, you can access the system web page and see logs, users and manage the sensors. I would also like to add a camera streaming. I have an IP cam...
2017/10/21
[ "https://Stackoverflow.com/questions/46859093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3735796/" ]
I have used Node js node RTSP Stream from an RTSP URL. ``` Stream = require('node-rtsp-stream') stream = new Stream({ name: 'name', streamUrl: 'rtsp://username:password@IP Address/h265/ch1/main/av_stream', wsPort: 9999, ffmpegOptions: { // options ffmpeg flags '-stats': '', // an option with no neccessary value uses...
I have published project on Github that help you to stream ip/network camera on to web browser real time without plugin require, which I contributed to open source project under MIT License that might be matched to your need, if you need to try check this out: [Streaming IP/Network Camera on web browser using NodeJS...
46,859,093
I'm currently working on a smart home project, which conects sensors and that stuff. The main server runs on a Raspberry Pi, and was designed using Node JS. On the local network, you can access the system web page and see logs, users and manage the sensors. I would also like to add a camera streaming. I have an IP cam...
2017/10/21
[ "https://Stackoverflow.com/questions/46859093", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3735796/" ]
I have used Node js node RTSP Stream from an RTSP URL. ``` Stream = require('node-rtsp-stream') stream = new Stream({ name: 'name', streamUrl: 'rtsp://username:password@IP Address/h265/ch1/main/av_stream', wsPort: 9999, ffmpegOptions: { // options ffmpeg flags '-stats': '', // an option with no neccessary value uses...
Almost every camera support MJPEG stream that can be displayed on the web easily using an IMG tag. However MJPEG stream requires really high bandwidth (e.g. 20-30mbps for megapixel resolution). If bandwidth consumption counts you need H264/H265 video streaming. Problem is that IP cameras use RTSP protocol for H264/H26...
35,217,894
I've got a Kanji database I'm putting together, and it's got several map tables to show one-to-many relationships between characters and how they can be read. Keeping it simple, here are three sample tables: ``` `kanji` `id` `character` `readings` `id` `reading` `reading_map` `kanji` => Foreign ...
2016/02/05
[ "https://Stackoverflow.com/questions/35217894", "https://Stackoverflow.com", "https://Stackoverflow.com/users/215950/" ]
You solved your problem. Because installing application without **superuser permission** prevent the other dependencies to be installed. I recommend to enter to super user / root by **sudo su -** when installing.
Run 'sudo npm install' to avoid exceptions and it creates node\_modules directory with current user. This solved my problem.
28,214,449
I have an activity with action bar and one icon on this ActionBar. When user press this icon I need to hide this icon and show EditText with cross to clear text. When user will done with it (choose item in ListView or press back button) I will need to show icon again. Here is two related question: 1. How to add EditTe...
2015/01/29
[ "https://Stackoverflow.com/questions/28214449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1393280/" ]
You need to add a SearchView widget to your application. The official documentation is here: <http://developer.android.com/training/search/setup.html> There are also detailed instructions to add it.
> > 1. How to add EditText on ActionBar for ListView filtering? > > > Please refer to [this answer](https://stackoverflow.com/a/11638739/2319390) by Commonsware . More clearly his [sample project](https://github.com/commonsguy/cw-omnibus/tree/master/ActionBar/ActionBarDemo) will do the trick. > > 2. How to chang...
28,214,449
I have an activity with action bar and one icon on this ActionBar. When user press this icon I need to hide this icon and show EditText with cross to clear text. When user will done with it (choose item in ListView or press back button) I will need to show icon again. Here is two related question: 1. How to add EditTe...
2015/01/29
[ "https://Stackoverflow.com/questions/28214449", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1393280/" ]
**searchmenu.xml** ``` <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@+id/action_search" android:title="search" android:icon="@android:drawable/ic_menu_search" android:showAsAction="always" android:actionViewCl...
> > 1. How to add EditText on ActionBar for ListView filtering? > > > Please refer to [this answer](https://stackoverflow.com/a/11638739/2319390) by Commonsware . More clearly his [sample project](https://github.com/commonsguy/cw-omnibus/tree/master/ActionBar/ActionBarDemo) will do the trick. > > 2. How to chang...
43,507,162
I'm currently building a food application which has users select a range of options (perishable, non-perishable ) and (snack, produce or meal) via a set of radio buttons. I'm currently using node.js and sqlite 3 to query a database to determine which entries to return to the user after they search the database. I wan...
2017/04/19
[ "https://Stackoverflow.com/questions/43507162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6768876/" ]
How about (insert as many `row.names` as you want rows in the output `data.frame`): ``` data = data.frame(row.names = '1') data[paste0('a', 1:10)] = .614 data[paste0('c', 1:10)] = -6.198 data[paste0('d', 1:10)] = 35.952 ``` Or (column names won't be exactly right; thanks @Frank for simplifying my approach here) ```...
Do it all in one go: ``` n <- 10 setNames( data.frame(rep(list(0.641,-6.198,35.952), each=n)), paste0(rep(c("a","c","d"),each=n), seq_len(n)) ) ```
24,254,089
TypeScript and CoffeeScript both use an `__extends` function to setup inheritance. Here's the one form TypeScript (CoffeeScript's is very similart). ``` var __extends = this.__extends || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } __.prot...
2014/06/17
[ "https://Stackoverflow.com/questions/24254089", "https://Stackoverflow.com", "https://Stackoverflow.com/users/794234/" ]
These three lines a): ``` function __() { this.constructor = d; } __.prototype = b.prototype; d.prototype = new __(); ``` Are *almost exactly* equivalent to b): ``` d.prototype.__proto__ = b.prototype; ``` And the reason why a) is prefferred is because `__proto__` is non standard. I say *almost...
John Resig may have answered this in his [Simple Javascript Inheritance](http://ejohn.org/blog/simple-javascript-inheritance/). > > What’s challenging about this, though, is that all we really want is the benefits of ‘instanceof’, not the whole cost of instantiating a Person object and running its constructor. > > ...
874,206
We host a multi-tenant shared exchange environment and some customers are seeing a certificate warning when they open outlook as their domain name is not included in our SSL certificate as a subject alternative name. We have a wildcard certificate for this mail server. [![enter image description here](https://i.stack....
2017/09/18
[ "https://serverfault.com/questions/874206", "https://serverfault.com", "https://serverfault.com/users/378607/" ]
It can be done - Office365 doesn't have an SSL certificate for every client. You need to look at using SRV and/or HTTP records for Autodiscover. The most common reason for this error is the domain having a wildcard in it - so Autodiscover.example.com resolves somewhere. For the alternative methods of Autodiscover - ...
Yes it can be done. However its a "configuration change" and you need another approach to "provide the service". That means you couldn´t use the hostnames from the customers, they need to use the hostname from the "master server". In our company we have multiple different email adresses (every department has a own Dom...
874,206
We host a multi-tenant shared exchange environment and some customers are seeing a certificate warning when they open outlook as their domain name is not included in our SSL certificate as a subject alternative name. We have a wildcard certificate for this mail server. [![enter image description here](https://i.stack....
2017/09/18
[ "https://serverfault.com/questions/874206", "https://serverfault.com", "https://serverfault.com/users/378607/" ]
[This](https://support.microsoft.com/en-us/help/3211279/outlook-2016-implementation-of-autodiscover) worked for me. ``` Certificate Error Handling Key: HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover Value: ShowCertErrors Default: 0 Data: 1 = Show certificate warnings/errors; 0 = Don't show cert...
It can be done - Office365 doesn't have an SSL certificate for every client. You need to look at using SRV and/or HTTP records for Autodiscover. The most common reason for this error is the domain having a wildcard in it - so Autodiscover.example.com resolves somewhere. For the alternative methods of Autodiscover - ...
874,206
We host a multi-tenant shared exchange environment and some customers are seeing a certificate warning when they open outlook as their domain name is not included in our SSL certificate as a subject alternative name. We have a wildcard certificate for this mail server. [![enter image description here](https://i.stack....
2017/09/18
[ "https://serverfault.com/questions/874206", "https://serverfault.com", "https://serverfault.com/users/378607/" ]
[This](https://support.microsoft.com/en-us/help/3211279/outlook-2016-implementation-of-autodiscover) worked for me. ``` Certificate Error Handling Key: HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover Value: ShowCertErrors Default: 0 Data: 1 = Show certificate warnings/errors; 0 = Don't show cert...
Yes it can be done. However its a "configuration change" and you need another approach to "provide the service". That means you couldn´t use the hostnames from the customers, they need to use the hostname from the "master server". In our company we have multiple different email adresses (every department has a own Dom...
4,367,890
> > Find a function $f:\mathbb{R}^2\to \mathbb{Z}$ that satisfies the following properties, or show that no such function exists: > > > * $f$ is increasing with respect to its first coordinate (i.e. $f(x, a) \leq f(y,a)$ for $x\leq y$) * $f$ is decreasing with respect to its second coordinate (i.e. $f(a, x) \leq f...
2022/01/27
[ "https://math.stackexchange.com/questions/4367890", "https://math.stackexchange.com", "https://math.stackexchange.com/users/817094/" ]
Being isolated is a property defined only in terms of open sets, so if $f$ is the homeomorphism, then $x$ is isolated if and only if $f(x)$ is. Thus, $f$ induces a bijection between the isolated point sets.
If $f:X\to Y$ is a homeomorphism, then it is an open map. Let $x\in U\in \tau\_X$ such that $U\cap \{x\}=\{x\}.$ As $f\upharpoonleft U$ is bijective and open $f(U)$ is open and $f(U)\cap \{f(x)\}=\{f(x\},$ which shows $f(x)$ is isolated. To finish, apply the same reasoning to $f^{-1}.$
24,668,284
I'm new to Xcode. I spent the last two days trying to figure out how to test my app on my iPhone which accesses a web service. On the simulator I can use a hard-coded 'localhost' variable, but I don't want to hardcode all the configuration settings. I'm using Swift + Xcode 6 but I think this is the same process as Xc...
2014/07/10
[ "https://Stackoverflow.com/questions/24668284", "https://Stackoverflow.com", "https://Stackoverflow.com/users/422304/" ]
1. Setup config hierarchy in case you have pods configs: [![enter image description here](https://i.stack.imgur.com/9qk8u.jpg)](https://i.stack.imgur.com/9qk8u.jpg) OR if you haven't any pods at all, the Configurations hierarchy gonna look like this: [![enter image description here](https://i.stack.imgur.com/HXSAM.jpg...
You don't want `.xcconfig`; that stores settings for Xcode. Instead, you want a property list (`.plist`) file. To do so, hit `command-N` to create a new file, then select `iOS > Resources > Property List`. Use the plist editor to add keys, values, and value types. Then load your properties by adding these lines somewhe...
31,113,793
I want to generate toString() method for a class extending an other one. But in generate toString() dialog, there is no checkbox for inherited fields (see picture below) ![enter image description here](https://i.stack.imgur.com/CNJVk.jpg) What's the problem here ?
2015/06/29
[ "https://Stackoverflow.com/questions/31113793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2854181/" ]
The `Inherited fields` option will turn out if: * You are extending a class with inheritable fields, i.e. `public`, `protected` (or package-protected within the same package) * You are generating the `toString` method contextually to a right-click when your cursor is within the child class The latter can be confusing...
You have to write a `toString()` method in the superclass and then you need to select the inherited method and select `toString()` there. ![enter image description here](https://i.stack.imgur.com/VFeiN.png)
31,113,793
I want to generate toString() method for a class extending an other one. But in generate toString() dialog, there is no checkbox for inherited fields (see picture below) ![enter image description here](https://i.stack.imgur.com/CNJVk.jpg) What's the problem here ?
2015/06/29
[ "https://Stackoverflow.com/questions/31113793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2854181/" ]
The `Inherited fields` option will turn out if: * You are extending a class with inheritable fields, i.e. `public`, `protected` (or package-protected within the same package) * You are generating the `toString` method contextually to a right-click when your cursor is within the child class The latter can be confusing...
I know this is slightly off-topic, but someone might prefer the following code: ``` public String toString() { StringBuilder toReturn = new StringBuilder("\r\n-------------\r\n"); Class<?> c = this.getClass(); toReturn.append(c.getName()).append("\r\n"); Method[] methods = c.getMethods(); for (Method me...
31,113,793
I want to generate toString() method for a class extending an other one. But in generate toString() dialog, there is no checkbox for inherited fields (see picture below) ![enter image description here](https://i.stack.imgur.com/CNJVk.jpg) What's the problem here ?
2015/06/29
[ "https://Stackoverflow.com/questions/31113793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2854181/" ]
The `Inherited fields` option will turn out if: * You are extending a class with inheritable fields, i.e. `public`, `protected` (or package-protected within the same package) * You are generating the `toString` method contextually to a right-click when your cursor is within the child class The latter can be confusing...
Bit late, but consider using the `reflectionToString` method in the [ToStringBuilder class in the Apache Commons](http://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/builder/ToStringBuilder.html#reflectionToString(java.lang.Object)) library rather than implementing your own `toString` method ...
31,113,793
I want to generate toString() method for a class extending an other one. But in generate toString() dialog, there is no checkbox for inherited fields (see picture below) ![enter image description here](https://i.stack.imgur.com/CNJVk.jpg) What's the problem here ?
2015/06/29
[ "https://Stackoverflow.com/questions/31113793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2854181/" ]
You have to write a `toString()` method in the superclass and then you need to select the inherited method and select `toString()` there. ![enter image description here](https://i.stack.imgur.com/VFeiN.png)
I know this is slightly off-topic, but someone might prefer the following code: ``` public String toString() { StringBuilder toReturn = new StringBuilder("\r\n-------------\r\n"); Class<?> c = this.getClass(); toReturn.append(c.getName()).append("\r\n"); Method[] methods = c.getMethods(); for (Method me...
31,113,793
I want to generate toString() method for a class extending an other one. But in generate toString() dialog, there is no checkbox for inherited fields (see picture below) ![enter image description here](https://i.stack.imgur.com/CNJVk.jpg) What's the problem here ?
2015/06/29
[ "https://Stackoverflow.com/questions/31113793", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2854181/" ]
Bit late, but consider using the `reflectionToString` method in the [ToStringBuilder class in the Apache Commons](http://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/builder/ToStringBuilder.html#reflectionToString(java.lang.Object)) library rather than implementing your own `toString` method ...
I know this is slightly off-topic, but someone might prefer the following code: ``` public String toString() { StringBuilder toReturn = new StringBuilder("\r\n-------------\r\n"); Class<?> c = this.getClass(); toReturn.append(c.getName()).append("\r\n"); Method[] methods = c.getMethods(); for (Method me...
16,406,705
I have a navigationBar in my TabBarView. I want a rightBarButtonItem and a title on my navigationBar. Why is this happening? My code is in the viewDidLoad method. Why is my title showing as a left button item? Then when I click on it, it acts like it's moving a view then my right bar button item is gone and the title i...
2013/05/06
[ "https://Stackoverflow.com/questions/16406705", "https://Stackoverflow.com", "https://Stackoverflow.com/users/613858/" ]
UINavigationItem contains the title and bar button items. You're creating multiple navigationItems, while instead you should just be assigning the properties of a single UINavigationItem. Take a look of the header file and you'll see it contains everything you need: ``` NS_CLASS_AVAILABLE_IOS(2_0) @interface UINaviga...
You are creating multiple navigation buttons. You should set all those properties to a single button. If you want to set title for bar, you can set it as self.title = @"title"; You can also try to set navigationbar.titleview.
646,425
I'm trying to configure a Debian Linux (ARMHF 3.8.13-bone20) on a BeagleBone Black to use German as the default language and keyboard layout, which does not work, and I can't see why. I'm talking about the console settings, not X or Gnome etc. Here are my settings and what I did so far: ``` dpkg-reconfigure locales `...
2013/09/17
[ "https://superuser.com/questions/646425", "https://superuser.com", "https://superuser.com/users/233574/" ]
After `dpkg-reconfigure keyboard-configuration`, you need to run ``` setupcon ``` > > > ``` > NAME > setupcon - sets up the font and the keyboard on the console > > SYNOPSIS > setupcon [OPTION]... [VARIANT] > > DESCRIPTION > setupcon is a program for fast and easy setup of the font and the ...
The combination of commands that worked for me were: ``` $ sudo dpkg-reconfigure keyboard-configuration $ setupcon $ sudo update-initramfs -u ``` And then reboot. The last command rebuilds your GRUB boot settings. I don't know for sure if the keyboard layout is set in the boot image, but I noticed that the prompt f...
646,425
I'm trying to configure a Debian Linux (ARMHF 3.8.13-bone20) on a BeagleBone Black to use German as the default language and keyboard layout, which does not work, and I can't see why. I'm talking about the console settings, not X or Gnome etc. Here are my settings and what I did so far: ``` dpkg-reconfigure locales `...
2013/09/17
[ "https://superuser.com/questions/646425", "https://superuser.com", "https://superuser.com/users/233574/" ]
You might try to add the boot parameters of `debian-installer/keymap=de` and `keymap=de`. Also, the answer at the thread [Keyboard layout HELP](http://www.turnkeylinux.org/forum/support/20130912/keyboard-layout-help) says : > > 1. Go to the webmin and do this SYSTEM -> SOFTWARE PACKADGES -> UPGRADE ALL > 2. (I don't...
``` dpkg-reconfigure keyboard-configuration udevadm trigger --subsystem-match=input --action=change ```
646,425
I'm trying to configure a Debian Linux (ARMHF 3.8.13-bone20) on a BeagleBone Black to use German as the default language and keyboard layout, which does not work, and I can't see why. I'm talking about the console settings, not X or Gnome etc. Here are my settings and what I did so far: ``` dpkg-reconfigure locales `...
2013/09/17
[ "https://superuser.com/questions/646425", "https://superuser.com", "https://superuser.com/users/233574/" ]
To change the german keyboard in Kali Linux 2020.02 (Debian) do the following: 1. `dpkg-reconfigure locales` Choose `de_DE.UTF-8 UTF-8` and unselect `en_US.UTF-8 UTF-8` (by pressing `Space`) 2. `dpkg-reconfigure keyboard-configuration` Choose your keyboard hardware 3. For Kali Linux 2020.2 (Debian) goto GUI *Settin...
The combination of commands that worked for me were: ``` $ sudo dpkg-reconfigure keyboard-configuration $ setupcon $ sudo update-initramfs -u ``` And then reboot. The last command rebuilds your GRUB boot settings. I don't know for sure if the keyboard layout is set in the boot image, but I noticed that the prompt f...
646,425
I'm trying to configure a Debian Linux (ARMHF 3.8.13-bone20) on a BeagleBone Black to use German as the default language and keyboard layout, which does not work, and I can't see why. I'm talking about the console settings, not X or Gnome etc. Here are my settings and what I did so far: ``` dpkg-reconfigure locales `...
2013/09/17
[ "https://superuser.com/questions/646425", "https://superuser.com", "https://superuser.com/users/233574/" ]
After `dpkg-reconfigure keyboard-configuration`, you need to run ``` setupcon ``` > > > ``` > NAME > setupcon - sets up the font and the keyboard on the console > > SYNOPSIS > setupcon [OPTION]... [VARIANT] > > DESCRIPTION > setupcon is a program for fast and easy setup of the font and the ...
``` dpkg-reconfigure keyboard-configuration udevadm trigger --subsystem-match=input --action=change ```
646,425
I'm trying to configure a Debian Linux (ARMHF 3.8.13-bone20) on a BeagleBone Black to use German as the default language and keyboard layout, which does not work, and I can't see why. I'm talking about the console settings, not X or Gnome etc. Here are my settings and what I did so far: ``` dpkg-reconfigure locales `...
2013/09/17
[ "https://superuser.com/questions/646425", "https://superuser.com", "https://superuser.com/users/233574/" ]
After `dpkg-reconfigure keyboard-configuration`, you need to run ``` setupcon ``` > > > ``` > NAME > setupcon - sets up the font and the keyboard on the console > > SYNOPSIS > setupcon [OPTION]... [VARIANT] > > DESCRIPTION > setupcon is a program for fast and easy setup of the font and the ...
On Stretch you'll need console-setup (in addition to keyboard-configuration), which includes the necessary systemd-service keyboard-setup: ``` apt-get install keyboard-configuration console-setup ```
646,425
I'm trying to configure a Debian Linux (ARMHF 3.8.13-bone20) on a BeagleBone Black to use German as the default language and keyboard layout, which does not work, and I can't see why. I'm talking about the console settings, not X or Gnome etc. Here are my settings and what I did so far: ``` dpkg-reconfigure locales `...
2013/09/17
[ "https://superuser.com/questions/646425", "https://superuser.com", "https://superuser.com/users/233574/" ]
You might try to add the boot parameters of `debian-installer/keymap=de` and `keymap=de`. Also, the answer at the thread [Keyboard layout HELP](http://www.turnkeylinux.org/forum/support/20130912/keyboard-layout-help) says : > > 1. Go to the webmin and do this SYSTEM -> SOFTWARE PACKADGES -> UPGRADE ALL > 2. (I don't...
On Stretch you'll need console-setup (in addition to keyboard-configuration), which includes the necessary systemd-service keyboard-setup: ``` apt-get install keyboard-configuration console-setup ```
646,425
I'm trying to configure a Debian Linux (ARMHF 3.8.13-bone20) on a BeagleBone Black to use German as the default language and keyboard layout, which does not work, and I can't see why. I'm talking about the console settings, not X or Gnome etc. Here are my settings and what I did so far: ``` dpkg-reconfigure locales `...
2013/09/17
[ "https://superuser.com/questions/646425", "https://superuser.com", "https://superuser.com/users/233574/" ]
On Stretch you'll need console-setup (in addition to keyboard-configuration), which includes the necessary systemd-service keyboard-setup: ``` apt-get install keyboard-configuration console-setup ```
The combination of commands that worked for me were: ``` $ sudo dpkg-reconfigure keyboard-configuration $ setupcon $ sudo update-initramfs -u ``` And then reboot. The last command rebuilds your GRUB boot settings. I don't know for sure if the keyboard layout is set in the boot image, but I noticed that the prompt f...
646,425
I'm trying to configure a Debian Linux (ARMHF 3.8.13-bone20) on a BeagleBone Black to use German as the default language and keyboard layout, which does not work, and I can't see why. I'm talking about the console settings, not X or Gnome etc. Here are my settings and what I did so far: ``` dpkg-reconfigure locales `...
2013/09/17
[ "https://superuser.com/questions/646425", "https://superuser.com", "https://superuser.com/users/233574/" ]
After `dpkg-reconfigure keyboard-configuration`, you need to run ``` setupcon ``` > > > ``` > NAME > setupcon - sets up the font and the keyboard on the console > > SYNOPSIS > setupcon [OPTION]... [VARIANT] > > DESCRIPTION > setupcon is a program for fast and easy setup of the font and the ...
To change the german keyboard in Kali Linux 2020.02 (Debian) do the following: 1. `dpkg-reconfigure locales` Choose `de_DE.UTF-8 UTF-8` and unselect `en_US.UTF-8 UTF-8` (by pressing `Space`) 2. `dpkg-reconfigure keyboard-configuration` Choose your keyboard hardware 3. For Kali Linux 2020.2 (Debian) goto GUI *Settin...