qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
232,345
In helping a corporate user log on to eBay, I noticed that when on the login page, a stream of errors were coming up in the Firefox JS Console about not being able to connect to `wss://localhost`. This is a bit concerning, obviously. Why would a web site need to connect to a web server running locally. [![ebay](https:...
2020/05/28
[ "https://security.stackexchange.com/questions/232345", "https://security.stackexchange.com", "https://security.stackexchange.com/users/21054/" ]
This is ebay running a local port scan over websockets. It has been reported recently: * <https://twitter.com/JackRhysider/status/1264415919691841536> (original research) * <https://www.bleepingcomputer.com/news/security/ebay-port-scans-visitors-computers-for-remote-access-programs/> (bleeping computer article) I don...
There's been some discussion of this recently, e.g. [here](https://news.ycombinator.com/item?id=23246170) and [here](https://securityboulevard.com/2020/05/is-ebay-port-scanning-your-pc-probably/). Suggested reasons for port scanning include: a) fingerprinting to uniquely identify your machine for future reference, or...
232,345
In helping a corporate user log on to eBay, I noticed that when on the login page, a stream of errors were coming up in the Firefox JS Console about not being able to connect to `wss://localhost`. This is a bit concerning, obviously. Why would a web site need to connect to a web server running locally. [![ebay](https:...
2020/05/28
[ "https://security.stackexchange.com/questions/232345", "https://security.stackexchange.com", "https://security.stackexchange.com/users/21054/" ]
This is ebay running a local port scan over websockets. It has been reported recently: * <https://twitter.com/JackRhysider/status/1264415919691841536> (original research) * <https://www.bleepingcomputer.com/news/security/ebay-port-scans-visitors-computers-for-remote-access-programs/> (bleeping computer article) I don...
A German computer magazine was writing about this observation last week and asked eBay for a statement. eBay's answer was: > > There is some widely spread software that is either Malware or legit > software which can be miss-used to steal the eBay password. This > software is listening on certain TCP ports. > > ...
73,240,220
How does array.filter((item, index) => array.indexOf(item) === index) work? I'm aware the that filter method iterates over all the items in the array, but how does this method work when you add in index as a parameter too? Does it then iterate over entire set of pairs of (item, index)? I'm trying to find the unique e...
2022/08/04
[ "https://Stackoverflow.com/questions/73240220", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19352292/" ]
When you add an index the index parameter will be the index of the element that the iteration is happening on, for example: ``` const myArray = [a, b, c] myArray.filter((item, index) => {console.log(`The item ${item} is on index ${index} on the array`)} ``` That will print ``` $ The item a is on index 0 on the arra...
Try this code: ``` ['a','b','c'].filter((item, index) => console.log(item, index)) ``` It basically iterates through each item and its index.
36,985,738
I know this question has been asked a couple of times already but most of the time, the solution is to handle this in the parent, as the flow of responsibility is only descending. However, sometimes, you need to kill a component from one of its methods. I know I can't modify its props, and If I start adding booleans as...
2016/05/02
[ "https://Stackoverflow.com/questions/36985738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/263521/" ]
Just like that nice warning you got, you are trying to do something that is an Anti-Pattern in React. This is a no-no. React is intended to have an unmount happen from a parent to child relationship. Now if you want a child to unmount itself, you can simulate this with a state change in the parent that is triggered by ...
instead of using `ReactDOM.unmountComponentAtNode(ReactDOM.findDOMNode(this).parentNode);` try using ``` ReactDOM.unmountComponentAtNode(document.getElementById('root')); ```
36,985,738
I know this question has been asked a couple of times already but most of the time, the solution is to handle this in the parent, as the flow of responsibility is only descending. However, sometimes, you need to kill a component from one of its methods. I know I can't modify its props, and If I start adding booleans as...
2016/05/02
[ "https://Stackoverflow.com/questions/36985738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/263521/" ]
Just like that nice warning you got, you are trying to do something that is an Anti-Pattern in React. This is a no-no. React is intended to have an unmount happen from a parent to child relationship. Now if you want a child to unmount itself, you can simulate this with a state change in the parent that is triggered by ...
In most cases, it is enough just to hide the element, for example in this way: ``` export default class ErrorBoxComponent extends React.Component { constructor(props) { super(props); this.state = { isHidden: false } } dismiss() { this.setState({ isH...
36,985,738
I know this question has been asked a couple of times already but most of the time, the solution is to handle this in the parent, as the flow of responsibility is only descending. However, sometimes, you need to kill a component from one of its methods. I know I can't modify its props, and If I start adding booleans as...
2016/05/02
[ "https://Stackoverflow.com/questions/36985738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/263521/" ]
Just like that nice warning you got, you are trying to do something that is an Anti-Pattern in React. This is a no-no. React is intended to have an unmount happen from a parent to child relationship. Now if you want a child to unmount itself, you can simulate this with a state change in the parent that is triggered by ...
I've been to this post about 10 times now and I just wanted to leave my two cents here. You can just unmount it conditionally. ``` if (renderMyComponent) { <MyComponent props={...} /> } ``` All you have to do is remove it from the DOM in order to unmount it. As long as `renderMyComponent = true`, the component wi...
36,985,738
I know this question has been asked a couple of times already but most of the time, the solution is to handle this in the parent, as the flow of responsibility is only descending. However, sometimes, you need to kill a component from one of its methods. I know I can't modify its props, and If I start adding booleans as...
2016/05/02
[ "https://Stackoverflow.com/questions/36985738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/263521/" ]
Just like that nice warning you got, you are trying to do something that is an Anti-Pattern in React. This is a no-no. React is intended to have an unmount happen from a parent to child relationship. Now if you want a child to unmount itself, you can simulate this with a state change in the parent that is triggered by ...
This isn't appropriate in all situations but you can conditionally `return false` inside the component itself if a certain criteria is or isn't met. It doesn't unmount the component, but it removes all rendered content. This would only be bad, in my mind, if you have event listeners in the component that should be rem...
36,985,738
I know this question has been asked a couple of times already but most of the time, the solution is to handle this in the parent, as the flow of responsibility is only descending. However, sometimes, you need to kill a component from one of its methods. I know I can't modify its props, and If I start adding booleans as...
2016/05/02
[ "https://Stackoverflow.com/questions/36985738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/263521/" ]
instead of using `ReactDOM.unmountComponentAtNode(ReactDOM.findDOMNode(this).parentNode);` try using ``` ReactDOM.unmountComponentAtNode(document.getElementById('root')); ```
In most cases, it is enough just to hide the element, for example in this way: ``` export default class ErrorBoxComponent extends React.Component { constructor(props) { super(props); this.state = { isHidden: false } } dismiss() { this.setState({ isH...
36,985,738
I know this question has been asked a couple of times already but most of the time, the solution is to handle this in the parent, as the flow of responsibility is only descending. However, sometimes, you need to kill a component from one of its methods. I know I can't modify its props, and If I start adding booleans as...
2016/05/02
[ "https://Stackoverflow.com/questions/36985738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/263521/" ]
instead of using `ReactDOM.unmountComponentAtNode(ReactDOM.findDOMNode(this).parentNode);` try using ``` ReactDOM.unmountComponentAtNode(document.getElementById('root')); ```
I've been to this post about 10 times now and I just wanted to leave my two cents here. You can just unmount it conditionally. ``` if (renderMyComponent) { <MyComponent props={...} /> } ``` All you have to do is remove it from the DOM in order to unmount it. As long as `renderMyComponent = true`, the component wi...
36,985,738
I know this question has been asked a couple of times already but most of the time, the solution is to handle this in the parent, as the flow of responsibility is only descending. However, sometimes, you need to kill a component from one of its methods. I know I can't modify its props, and If I start adding booleans as...
2016/05/02
[ "https://Stackoverflow.com/questions/36985738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/263521/" ]
instead of using `ReactDOM.unmountComponentAtNode(ReactDOM.findDOMNode(this).parentNode);` try using ``` ReactDOM.unmountComponentAtNode(document.getElementById('root')); ```
This isn't appropriate in all situations but you can conditionally `return false` inside the component itself if a certain criteria is or isn't met. It doesn't unmount the component, but it removes all rendered content. This would only be bad, in my mind, if you have event listeners in the component that should be rem...
36,985,738
I know this question has been asked a couple of times already but most of the time, the solution is to handle this in the parent, as the flow of responsibility is only descending. However, sometimes, you need to kill a component from one of its methods. I know I can't modify its props, and If I start adding booleans as...
2016/05/02
[ "https://Stackoverflow.com/questions/36985738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/263521/" ]
In most cases, it is enough just to hide the element, for example in this way: ``` export default class ErrorBoxComponent extends React.Component { constructor(props) { super(props); this.state = { isHidden: false } } dismiss() { this.setState({ isH...
I've been to this post about 10 times now and I just wanted to leave my two cents here. You can just unmount it conditionally. ``` if (renderMyComponent) { <MyComponent props={...} /> } ``` All you have to do is remove it from the DOM in order to unmount it. As long as `renderMyComponent = true`, the component wi...
36,985,738
I know this question has been asked a couple of times already but most of the time, the solution is to handle this in the parent, as the flow of responsibility is only descending. However, sometimes, you need to kill a component from one of its methods. I know I can't modify its props, and If I start adding booleans as...
2016/05/02
[ "https://Stackoverflow.com/questions/36985738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/263521/" ]
In most cases, it is enough just to hide the element, for example in this way: ``` export default class ErrorBoxComponent extends React.Component { constructor(props) { super(props); this.state = { isHidden: false } } dismiss() { this.setState({ isH...
This isn't appropriate in all situations but you can conditionally `return false` inside the component itself if a certain criteria is or isn't met. It doesn't unmount the component, but it removes all rendered content. This would only be bad, in my mind, if you have event listeners in the component that should be rem...
36,985,738
I know this question has been asked a couple of times already but most of the time, the solution is to handle this in the parent, as the flow of responsibility is only descending. However, sometimes, you need to kill a component from one of its methods. I know I can't modify its props, and If I start adding booleans as...
2016/05/02
[ "https://Stackoverflow.com/questions/36985738", "https://Stackoverflow.com", "https://Stackoverflow.com/users/263521/" ]
I've been to this post about 10 times now and I just wanted to leave my two cents here. You can just unmount it conditionally. ``` if (renderMyComponent) { <MyComponent props={...} /> } ``` All you have to do is remove it from the DOM in order to unmount it. As long as `renderMyComponent = true`, the component wi...
This isn't appropriate in all situations but you can conditionally `return false` inside the component itself if a certain criteria is or isn't met. It doesn't unmount the component, but it removes all rendered content. This would only be bad, in my mind, if you have event listeners in the component that should be rem...
25,241,244
I'm getting an exception telling me "Binding' cannot be set on the 'InitialStartDateTime' property of type 'WinFormsWrapper'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject." but my properties are dependency properties as you can see here, right? ``` public class WinFormsWrapper : WindowsFor...
2014/08/11
[ "https://Stackoverflow.com/questions/25241244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3596113/" ]
``` DependencyProperty.Register("StartDateTime", ``` You have to Name it ``` DependencyProperty.Register("InitialStartDateTime", ``` :) Same Problem with the EndDateTime I hope that solves your problem
You are using the wrong properties in your DependencyProperty creation. ``` public static readonly DependencyProperty InitialEndDateTimeProperty = DependencyProperty.Register("EndDateTime", typeof(DateTime), typeof(WinFormsWrapper), new FrameworkPropertyMetadata(control.InitialEndDateTime, new PropertyChangedCallback(...
434,395
Let's say you have a VAR model that estimates GDP and Unemployment among many other variables using a certain number of lags. This VAR model can estimate or regress GDP using Unemployment. And, it can do the reverse too. It can also do Granger Causality analysis between these two variables to analyze the direction of t...
2019/11/03
[ "https://stats.stackexchange.com/questions/434395", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/1329/" ]
With VAR models you can predict as many steps ahead as you like. When the future horizon increases, you will eventually run out of observed values to base your forecasts on. Then you just substitute the required observed values with their forecasts and iterate forward. Here is an example of VAR(1) (I skip the intercept...
After giving it some thought, I think the straight forward answer is that VAR does not resolve the circular function situation as framed in my question. And, frankly I don't think any other methodology can. You can't use A to forecast B at the same time as you use B to forecast A once you go beyond any related lagged v...
7,129,884
I need a ruby regexp pattern that matches a string containing a letter (for simplicity say 'a') n times and then n at the end. For example, it should match "aaa3", "aaaa4" etc but not "a2" or "aaa1", etc.
2011/08/20
[ "https://Stackoverflow.com/questions/7129884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/903453/" ]
That is not possible in regex since it is not a regular language (that's easy to prove with the [Pumping Lemma for Regular Languages](http://en.wikipedia.org/wiki/Pumping_lemma_for_regular_languages)). I'm not sure how much more powerful ruby regex is than a true Regular Expression, but I doubt it's powerful enough for...
I can do it in Perl, but not in Ruby. ``` /^(a+)(??{length($1)})$/ ``` Fun, eh? Check it out: <http://ideone.com/ShB6C>
7,129,884
I need a ruby regexp pattern that matches a string containing a letter (for simplicity say 'a') n times and then n at the end. For example, it should match "aaa3", "aaaa4" etc but not "a2" or "aaa1", etc.
2011/08/20
[ "https://Stackoverflow.com/questions/7129884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/903453/" ]
That is not possible in regex since it is not a regular language (that's easy to prove with the [Pumping Lemma for Regular Languages](http://en.wikipedia.org/wiki/Pumping_lemma_for_regular_languages)). I'm not sure how much more powerful ruby regex is than a true Regular Expression, but I doubt it's powerful enough for...
I just woke up, so take this with a grain of salt, but instead of doing it with a single regex, an easy way to do it would be ``` def f(s) s =~ /(a+)(\d)/ $1.size == $2.to_i end #=> nil f 'aaa3' #=> true f 'aa3' #=> false ```
7,129,884
I need a ruby regexp pattern that matches a string containing a letter (for simplicity say 'a') n times and then n at the end. For example, it should match "aaa3", "aaaa4" etc but not "a2" or "aaa1", etc.
2011/08/20
[ "https://Stackoverflow.com/questions/7129884", "https://Stackoverflow.com", "https://Stackoverflow.com/users/903453/" ]
I can do it in Perl, but not in Ruby. ``` /^(a+)(??{length($1)})$/ ``` Fun, eh? Check it out: <http://ideone.com/ShB6C>
I just woke up, so take this with a grain of salt, but instead of doing it with a single regex, an easy way to do it would be ``` def f(s) s =~ /(a+)(\d)/ $1.size == $2.to_i end #=> nil f 'aaa3' #=> true f 'aa3' #=> false ```
1,050,027
I need to implement a thesaurus application in Java which will retrieve the synonyms of the user's input.
2009/06/26
[ "https://Stackoverflow.com/questions/1050027", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
do a dictionary.com search on the word and scrape the synonyms..
Build a quick application to take the search string and call a synonym web service - [like this one](http://watson.kmi.open.ac.uk/API/explain-syn.html).
1,050,027
I need to implement a thesaurus application in Java which will retrieve the synonyms of the user's input.
2009/06/26
[ "https://Stackoverflow.com/questions/1050027", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
do a dictionary.com search on the word and scrape the synonyms..
"retrieve the synonyms" Where are you getting the synonyms? Are they stored in a DB/file, hard-coded? Or do you need to get retrieve them yourself from an external service? If you already have a list of synonyms, populate a HashMap and key the list of synonyms with the search word.
1,050,027
I need to implement a thesaurus application in Java which will retrieve the synonyms of the user's input.
2009/06/26
[ "https://Stackoverflow.com/questions/1050027", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If the user input is a word then do something like: 1. Create a Hashtable that uses the word for its Key 2. Store the synonyms in a List or String array 3. Add the Key and synonyms to the hash table 4. When the user inputs a word print the list associted with that key I am assuming this is homework and you will be ha...
Build a quick application to take the search string and call a synonym web service - [like this one](http://watson.kmi.open.ac.uk/API/explain-syn.html).
1,050,027
I need to implement a thesaurus application in Java which will retrieve the synonyms of the user's input.
2009/06/26
[ "https://Stackoverflow.com/questions/1050027", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
If the user input is a word then do something like: 1. Create a Hashtable that uses the word for its Key 2. Store the synonyms in a List or String array 3. Add the Key and synonyms to the hash table 4. When the user inputs a word print the list associted with that key I am assuming this is homework and you will be ha...
"retrieve the synonyms" Where are you getting the synonyms? Are they stored in a DB/file, hard-coded? Or do you need to get retrieve them yourself from an external service? If you already have a list of synonyms, populate a HashMap and key the list of synonyms with the search word.
34,247,499
I am trying to position a font awesome icon - an exclamation point stacked on top of a circle - like so: [![enter image description here](https://i.stack.imgur.com/myKG6.png)](https://i.stack.imgur.com/myKG6.png) What's happening is that it looks like this: [![enter image description here](https://i.stack.imgur.com/...
2015/12/13
[ "https://Stackoverflow.com/questions/34247499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1141299/" ]
Use margins. In this case, I used negative margins.
``` .fa-stack { z-index: 100; margin-left: -20px; } ``` Z-index makes sure the icon sits on top of the text. Depending on how you've build this out, you might or might not need to add it. The number just needs to be higher than the z-index of the text (100 is arbitrary). Negative margin will move it over.
34,247,499
I am trying to position a font awesome icon - an exclamation point stacked on top of a circle - like so: [![enter image description here](https://i.stack.imgur.com/myKG6.png)](https://i.stack.imgur.com/myKG6.png) What's happening is that it looks like this: [![enter image description here](https://i.stack.imgur.com/...
2015/12/13
[ "https://Stackoverflow.com/questions/34247499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1141299/" ]
`What's New<sup><i class="fa fa-circle fa-stack-1x" style="color:red"></i></sup>` Remove space before font-awesome icon and put the code in superscript
``` .fa-stack { z-index: 100; margin-left: -20px; } ``` Z-index makes sure the icon sits on top of the text. Depending on how you've build this out, you might or might not need to add it. The number just needs to be higher than the z-index of the text (100 is arbitrary). Negative margin will move it over.
53,708,106
I have component that calling fuction for opening window: ``` @Component({ selector: 'app-deposits', templateUrl: './deposits.component.html', styleUrls: ['./deposits.component.scss'], animations: [listFade, growing] }) export class DepositsComponent implements OnInit { depos...
2018/12/10
[ "https://Stackoverflow.com/questions/53708106", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6708266/" ]
In JavaScript, coercing any non-boolean value to boolean just does a "falsiness" check; for the most part, any non-empty value is false and everything else is true. So the Go equivalent for an integer value would simply be: ``` return i != 0 ```
To put it all together ``` package main import ( "fmt" ) //function SomeFunc(i) { // var f = 0x80000000; // // return Boolean(i & f); //} func SomeFunc(i uint64) bool{ return i & 0x80000000 != 0 } func main() { fmt.Println(SomeFunc(0x800)) fmt.Println(SomeFunc(0x81234567)) } ```
168,455
How do you post data to an iframe?
2008/10/03
[ "https://Stackoverflow.com/questions/168455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24958/" ]
Depends what you mean by "post data". You can use the HTML `target=""` attribute on a `<form />` tag, so it could be as simple as: ``` <form action="do_stuff.aspx" method="post" target="my_iframe"> <input type="submit" value="Do Stuff!"> </form> <!-- when the form is submitted, the server response will appear in th...
An iframe is used to embed another document inside a html page. If the form is to be submitted to an iframe within the form page, then it can be easily acheived using the target attribute of the tag. Set the target attribute of the form to the name of the iframe tag. ``` <form action="action" method="post" target="o...
168,455
How do you post data to an iframe?
2008/10/03
[ "https://Stackoverflow.com/questions/168455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24958/" ]
Depends what you mean by "post data". You can use the HTML `target=""` attribute on a `<form />` tag, so it could be as simple as: ``` <form action="do_stuff.aspx" method="post" target="my_iframe"> <input type="submit" value="Do Stuff!"> </form> <!-- when the form is submitted, the server response will appear in th...
This function creates a temporary form, then send data using jQuery : ``` function postToIframe(data,url,target){ $('body').append('<form action="'+url+'" method="post" target="'+target+'" id="postToIframe"></form>'); $.each(data,function(n,v){ $('#postToIframe').append('<input type="hidden" name="'+n+...
168,455
How do you post data to an iframe?
2008/10/03
[ "https://Stackoverflow.com/questions/168455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24958/" ]
Depends what you mean by "post data". You can use the HTML `target=""` attribute on a `<form />` tag, so it could be as simple as: ``` <form action="do_stuff.aspx" method="post" target="my_iframe"> <input type="submit" value="Do Stuff!"> </form> <!-- when the form is submitted, the server response will appear in th...
If you want to change inputs in an iframe then submit the form from that iframe, do this ``` ... var el = document.getElementById('targetFrame'); var doc, frame_win = getIframeWindow(el); // getIframeWindow is defined below if (frame_win) { doc = (window.contentDocument || window.document); } if (doc) { doc.for...
168,455
How do you post data to an iframe?
2008/10/03
[ "https://Stackoverflow.com/questions/168455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24958/" ]
Depends what you mean by "post data". You can use the HTML `target=""` attribute on a `<form />` tag, so it could be as simple as: ``` <form action="do_stuff.aspx" method="post" target="my_iframe"> <input type="submit" value="Do Stuff!"> </form> <!-- when the form is submitted, the server response will appear in th...
You can use this code, will have to add proper params to be passed and also the api url to get the data. ``` var allParams = { xyz, abc } var parentElm = document.getElementBy... // your own element where you want to create the iframe // create an iframe var addIframe = document.createElement('iframe');...
168,455
How do you post data to an iframe?
2008/10/03
[ "https://Stackoverflow.com/questions/168455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24958/" ]
An iframe is used to embed another document inside a html page. If the form is to be submitted to an iframe within the form page, then it can be easily acheived using the target attribute of the tag. Set the target attribute of the form to the name of the iframe tag. ``` <form action="action" method="post" target="o...
This function creates a temporary form, then send data using jQuery : ``` function postToIframe(data,url,target){ $('body').append('<form action="'+url+'" method="post" target="'+target+'" id="postToIframe"></form>'); $.each(data,function(n,v){ $('#postToIframe').append('<input type="hidden" name="'+n+...
168,455
How do you post data to an iframe?
2008/10/03
[ "https://Stackoverflow.com/questions/168455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24958/" ]
An iframe is used to embed another document inside a html page. If the form is to be submitted to an iframe within the form page, then it can be easily acheived using the target attribute of the tag. Set the target attribute of the form to the name of the iframe tag. ``` <form action="action" method="post" target="o...
If you want to change inputs in an iframe then submit the form from that iframe, do this ``` ... var el = document.getElementById('targetFrame'); var doc, frame_win = getIframeWindow(el); // getIframeWindow is defined below if (frame_win) { doc = (window.contentDocument || window.document); } if (doc) { doc.for...
168,455
How do you post data to an iframe?
2008/10/03
[ "https://Stackoverflow.com/questions/168455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24958/" ]
An iframe is used to embed another document inside a html page. If the form is to be submitted to an iframe within the form page, then it can be easily acheived using the target attribute of the tag. Set the target attribute of the form to the name of the iframe tag. ``` <form action="action" method="post" target="o...
You can use this code, will have to add proper params to be passed and also the api url to get the data. ``` var allParams = { xyz, abc } var parentElm = document.getElementBy... // your own element where you want to create the iframe // create an iframe var addIframe = document.createElement('iframe');...
168,455
How do you post data to an iframe?
2008/10/03
[ "https://Stackoverflow.com/questions/168455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24958/" ]
This function creates a temporary form, then send data using jQuery : ``` function postToIframe(data,url,target){ $('body').append('<form action="'+url+'" method="post" target="'+target+'" id="postToIframe"></form>'); $.each(data,function(n,v){ $('#postToIframe').append('<input type="hidden" name="'+n+...
If you want to change inputs in an iframe then submit the form from that iframe, do this ``` ... var el = document.getElementById('targetFrame'); var doc, frame_win = getIframeWindow(el); // getIframeWindow is defined below if (frame_win) { doc = (window.contentDocument || window.document); } if (doc) { doc.for...
168,455
How do you post data to an iframe?
2008/10/03
[ "https://Stackoverflow.com/questions/168455", "https://Stackoverflow.com", "https://Stackoverflow.com/users/24958/" ]
This function creates a temporary form, then send data using jQuery : ``` function postToIframe(data,url,target){ $('body').append('<form action="'+url+'" method="post" target="'+target+'" id="postToIframe"></form>'); $.each(data,function(n,v){ $('#postToIframe').append('<input type="hidden" name="'+n+...
You can use this code, will have to add proper params to be passed and also the api url to get the data. ``` var allParams = { xyz, abc } var parentElm = document.getElementBy... // your own element where you want to create the iframe // create an iframe var addIframe = document.createElement('iframe');...
1,418,612
Can anyone tell me why this bash script works if I cut and paste it to the terminal but throws "server\_prep.sh: 7: Syntax error: "(" unexpected" when launched using $ sudo sh server\_prep.sh ? ``` #!/bin/sh #Packages apt-get -y install ssh libsqlite3-dev ruby-full mercurial #Gems required_gems = ( rake rails sqlite...
2009/09/13
[ "https://Stackoverflow.com/questions/1418612", "https://Stackoverflow.com", "https://Stackoverflow.com/users/37196/" ]
Are you on ubuntu? Then you should change the `#!-`line at the top to read `#!/bin/bash` because /bin/sh is a very limited shell. This would explain why works in the terminal (where the shell is bash) but not as a shell script (which is run by /bin/sh). They changed this a couple of releases ago for performance reas...
Try ``` required_gems=( rake rails sqlite3-ruby ) ``` instead (note the lack of spaces around '=').
33,585
I'm having some problems understanding and translating Ephesians 5:33. > > 33 πλὴν καὶ ὑμεῖς **οἱ καθ’ ἕνα,** ἕκαστος τὴν ἑαυτοῦ γυναῖκα οὕτως ἀγαπάτω ὡς ἑαυτόν, ἡ δὲ γυνὴ ἵνα φοβῆται τὸν ἄνδρα. > > > 33 but ye also, every one in particular -- let each his own wife so love as himself, and the wife -- that she may r...
2018/06/23
[ "https://hermeneutics.stackexchange.com/questions/33585", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/17070/" ]
καθ ενα is an idiom 'one by one' see also I Cor 14:31 : > > δυνασθε ...γαρ .. καθ ενα .... παντες ..προφητευειν [Stephens 1550] > > > Ye can ... for ... one by one ... all ... prophesy [EGNT literal] Prefixing the plural, masculine article, οι καθ ενα, is applying it to the whole company, inclusively. So - in E...
Contextually speaking, οἱ καθ’ ἕνα ("each indvidual"—salvishly literally perhaps *the 'each ones'* i.e. within the whole mentioned in the prior verse) contrasts with the Church as Bride of Christ *as a whole*, since the verse prior says, "This mystery is a great one—that is, of Christ and the Church—" but he continues,...
33,585
I'm having some problems understanding and translating Ephesians 5:33. > > 33 πλὴν καὶ ὑμεῖς **οἱ καθ’ ἕνα,** ἕκαστος τὴν ἑαυτοῦ γυναῖκα οὕτως ἀγαπάτω ὡς ἑαυτόν, ἡ δὲ γυνὴ ἵνα φοβῆται τὸν ἄνδρα. > > > 33 but ye also, every one in particular -- let each his own wife so love as himself, and the wife -- that she may r...
2018/06/23
[ "https://hermeneutics.stackexchange.com/questions/33585", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/17070/" ]
The article οἱ is being used here "to nominalize a prepositional phrase" **1** καθ’ ἕνα. The preposition κατά indicates, among other things, a "marker of division of a greater whole into individual parts", i.e., a distributive use, and ἕνα is "a numerical term" (from εἷς). So, καθʼ ἕνα can be translated as "singly" and...
Contextually speaking, οἱ καθ’ ἕνα ("each indvidual"—salvishly literally perhaps *the 'each ones'* i.e. within the whole mentioned in the prior verse) contrasts with the Church as Bride of Christ *as a whole*, since the verse prior says, "This mystery is a great one—that is, of Christ and the Church—" but he continues,...
7,682
I own a Job Search site named [www.conservationjobboard.com](http://www.conservationjobboard.com) and have a concern about how the domain is viewed by search engines. The issue is that when the site was first designed, the default page was left as default.php, but the homepage was actually JobBoard.php. To handle this,...
2011/01/12
[ "https://webmasters.stackexchange.com/questions/7682", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/-1/" ]
Google Analytics can be very useful, but it is generally not required. Typically if you are showing ads for syndications (such as Google) then the ad is loaded from the syndicator each time, so they track hits that way. There may be instances where someone requires you to provide numbers from Google Analytics, but tho...
I would set it up anyway. It takes about 5 minutes and is a piece of cake. Even if you don't use it, it won't hurt, and can only help the way Google views your website.
7,682
I own a Job Search site named [www.conservationjobboard.com](http://www.conservationjobboard.com) and have a concern about how the domain is viewed by search engines. The issue is that when the site was first designed, the default page was left as default.php, but the homepage was actually JobBoard.php. To handle this,...
2011/01/12
[ "https://webmasters.stackexchange.com/questions/7682", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/-1/" ]
To answer the question directly - no there is not a problem if you don't set up a google analytics account. Millions of websites don't use google analytics. In this instance I would define "problem" as: google don't penalise websites for not using analytics. Now my opinion - whilst it won't do you any harm to *not* h...
Google Analytics can be very useful, but it is generally not required. Typically if you are showing ads for syndications (such as Google) then the ad is loaded from the syndicator each time, so they track hits that way. There may be instances where someone requires you to provide numbers from Google Analytics, but tho...
7,682
I own a Job Search site named [www.conservationjobboard.com](http://www.conservationjobboard.com) and have a concern about how the domain is viewed by search engines. The issue is that when the site was first designed, the default page was left as default.php, but the homepage was actually JobBoard.php. To handle this,...
2011/01/12
[ "https://webmasters.stackexchange.com/questions/7682", "https://webmasters.stackexchange.com", "https://webmasters.stackexchange.com/users/-1/" ]
To answer the question directly - no there is not a problem if you don't set up a google analytics account. Millions of websites don't use google analytics. In this instance I would define "problem" as: google don't penalise websites for not using analytics. Now my opinion - whilst it won't do you any harm to *not* h...
I would set it up anyway. It takes about 5 minutes and is a piece of cake. Even if you don't use it, it won't hurt, and can only help the way Google views your website.
22,811,589
I'm trying to make a simple game in AS3, similar to Tilt To Live. I try to make a ball follow my mouse (an other ball) so when the ball touches the Mouseball you will lose. It's keep giving errors, and I dont really know how to solve it. This is my game so far : public class Main extends Sprite { ``` public ...
2014/04/02
[ "https://Stackoverflow.com/questions/22811589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3489342/" ]
There are no 17 months, use `"MM/dd/yyyy"` instead of `"dd/MM/yyyy"`: ``` DateTime dt= DateTime.ParseExact("03/17/2014", "MM/dd/yyyy", CultureInfo.InvariantCulture) ``` **Update**: > > is it mandatory that we need to specify the format. i do not want to > specify the format then how to use it. basically the pc wh...
From [`The "MM" Custom Format` Specifier](http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx#MM_Specifier) > > The "MM" custom format specifier represents the month as a number from > **01 through 12 (or from 1 through 13 for calendars that have 13 > months)**. > > > You should probably change your day speci...
22,811,589
I'm trying to make a simple game in AS3, similar to Tilt To Live. I try to make a ball follow my mouse (an other ball) so when the ball touches the Mouseball you will lose. It's keep giving errors, and I dont really know how to solve it. This is my game so far : public class Main extends Sprite { ``` public ...
2014/04/02
[ "https://Stackoverflow.com/questions/22811589", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3489342/" ]
You have `month` before `day` in the value `"03/17/2014"` i.e `"MM/dd/yyyy"`, You get the exception because month should not be have 17 it could have values from 1 to 12. You can learn more about custom date formats [here](http://msdn.microsoft.com/en-us/library/8kb3ddd4%28v=vs.110%29.aspx). ``` DateTime dt= DateTime....
From [`The "MM" Custom Format` Specifier](http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx#MM_Specifier) > > The "MM" custom format specifier represents the month as a number from > **01 through 12 (or from 1 through 13 for calendars that have 13 > months)**. > > > You should probably change your day speci...
26,665,399
In other projects, the menu is not missing. However, in one project I cannot see or find the menu. Does anyone know how to make it reappear? I could not find here or via Google or in the Apple docs, but perhaps I am not looking in the right place. I am using v6.1, if that matters. Many thanks!
2014/10/30
[ "https://Stackoverflow.com/questions/26665399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3557284/" ]
Select the Storyboard file in the navigator, open the utilities menu on the top right, show the file inspector (the left icon) and under the Interface Builder Document menu, click Use Auto Layout. Regards
First select the LaunchScreen.storyboard: ![](https://i.stack.imgur.com/HPfZc.png) Second select the parents view: ![](https://i.stack.imgur.com/0PgL8.png) Third go to the file inspector: ![](https://i.stack.imgur.com/FbAJI.png) Fourth chick the use auto layout: ![](https://i.stack.imgur.com/F170k.png)
26,665,399
In other projects, the menu is not missing. However, in one project I cannot see or find the menu. Does anyone know how to make it reappear? I could not find here or via Google or in the Apple docs, but perhaps I am not looking in the right place. I am using v6.1, if that matters. Many thanks!
2014/10/30
[ "https://Stackoverflow.com/questions/26665399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3557284/" ]
At the bottom-right corner of canvas view there are some icons, one of them is the new pin menu. Use it [Pin in storyboard](https://i.stack.imgur.com/NAoKC.png)
First select the LaunchScreen.storyboard: ![](https://i.stack.imgur.com/HPfZc.png) Second select the parents view: ![](https://i.stack.imgur.com/0PgL8.png) Third go to the file inspector: ![](https://i.stack.imgur.com/FbAJI.png) Fourth chick the use auto layout: ![](https://i.stack.imgur.com/F170k.png)
26,665,399
In other projects, the menu is not missing. However, in one project I cannot see or find the menu. Does anyone know how to make it reappear? I could not find here or via Google or in the Apple docs, but perhaps I am not looking in the right place. I am using v6.1, if that matters. Many thanks!
2014/10/30
[ "https://Stackoverflow.com/questions/26665399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3557284/" ]
Select the Storyboard file in the navigator, open the utilities menu on the top right, show the file inspector (the left icon) and under the Interface Builder Document menu, click Use Auto Layout. Regards
Verified in Xcode 8.3 Swift 3 There is a possibility that Autolayout was disabled while creating the project. Select Main.storyboard, In the right menu that has "File Inspector", under the section 'Interface Builder Document', enable 'Use Auto Layout'. The pin menu comes up at the usual place - bottom right corner
26,665,399
In other projects, the menu is not missing. However, in one project I cannot see or find the menu. Does anyone know how to make it reappear? I could not find here or via Google or in the Apple docs, but perhaps I am not looking in the right place. I am using v6.1, if that matters. Many thanks!
2014/10/30
[ "https://Stackoverflow.com/questions/26665399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3557284/" ]
Select the Storyboard file in the navigator, open the utilities menu on the top right, show the file inspector (the left icon) and under the Interface Builder Document menu, click Use Auto Layout. Regards
In case anyone has this problem: the one piece of information is missing from the otherwise correct answers - these icons are in the lower RIGHT corner. As such, if you don't have your storyboard view wide enough you won't get them - you have to increase the size of the view then you will see them.
26,665,399
In other projects, the menu is not missing. However, in one project I cannot see or find the menu. Does anyone know how to make it reappear? I could not find here or via Google or in the Apple docs, but perhaps I am not looking in the right place. I am using v6.1, if that matters. Many thanks!
2014/10/30
[ "https://Stackoverflow.com/questions/26665399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3557284/" ]
At the bottom-right corner of canvas view there are some icons, one of them is the new pin menu. Use it [Pin in storyboard](https://i.stack.imgur.com/NAoKC.png)
I got the same problem, and was looking for a solution. I tried many options, but what really solved it, was closing the project and reopening it again (the same project, not a new one).
26,665,399
In other projects, the menu is not missing. However, in one project I cannot see or find the menu. Does anyone know how to make it reappear? I could not find here or via Google or in the Apple docs, but perhaps I am not looking in the right place. I am using v6.1, if that matters. Many thanks!
2014/10/30
[ "https://Stackoverflow.com/questions/26665399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3557284/" ]
At the bottom-right corner of canvas view there are some icons, one of them is the new pin menu. Use it [Pin in storyboard](https://i.stack.imgur.com/NAoKC.png)
Verified in Xcode 8.3 Swift 3 There is a possibility that Autolayout was disabled while creating the project. Select Main.storyboard, In the right menu that has "File Inspector", under the section 'Interface Builder Document', enable 'Use Auto Layout'. The pin menu comes up at the usual place - bottom right corner
26,665,399
In other projects, the menu is not missing. However, in one project I cannot see or find the menu. Does anyone know how to make it reappear? I could not find here or via Google or in the Apple docs, but perhaps I am not looking in the right place. I am using v6.1, if that matters. Many thanks!
2014/10/30
[ "https://Stackoverflow.com/questions/26665399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3557284/" ]
Select the Storyboard file in the navigator, open the utilities menu on the top right, show the file inspector (the left icon) and under the Interface Builder Document menu, click Use Auto Layout. Regards
I got the same problem, and was looking for a solution. I tried many options, but what really solved it, was closing the project and reopening it again (the same project, not a new one).
26,665,399
In other projects, the menu is not missing. However, in one project I cannot see or find the menu. Does anyone know how to make it reappear? I could not find here or via Google or in the Apple docs, but perhaps I am not looking in the right place. I am using v6.1, if that matters. Many thanks!
2014/10/30
[ "https://Stackoverflow.com/questions/26665399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3557284/" ]
In case anyone has this problem: the one piece of information is missing from the otherwise correct answers - these icons are in the lower RIGHT corner. As such, if you don't have your storyboard view wide enough you won't get them - you have to increase the size of the view then you will see them.
I got the same problem, and was looking for a solution. I tried many options, but what really solved it, was closing the project and reopening it again (the same project, not a new one).
26,665,399
In other projects, the menu is not missing. However, in one project I cannot see or find the menu. Does anyone know how to make it reappear? I could not find here or via Google or in the Apple docs, but perhaps I am not looking in the right place. I am using v6.1, if that matters. Many thanks!
2014/10/30
[ "https://Stackoverflow.com/questions/26665399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3557284/" ]
Select the Storyboard file in the navigator, open the utilities menu on the top right, show the file inspector (the left icon) and under the Interface Builder Document menu, click Use Auto Layout. Regards
At the bottom-right corner of canvas view there are some icons, one of them is the new pin menu. Use it [Pin in storyboard](https://i.stack.imgur.com/NAoKC.png)
26,665,399
In other projects, the menu is not missing. However, in one project I cannot see or find the menu. Does anyone know how to make it reappear? I could not find here or via Google or in the Apple docs, but perhaps I am not looking in the right place. I am using v6.1, if that matters. Many thanks!
2014/10/30
[ "https://Stackoverflow.com/questions/26665399", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3557284/" ]
Verified in Xcode 8.3 Swift 3 There is a possibility that Autolayout was disabled while creating the project. Select Main.storyboard, In the right menu that has "File Inspector", under the section 'Interface Builder Document', enable 'Use Auto Layout'. The pin menu comes up at the usual place - bottom right corner
I got the same problem, and was looking for a solution. I tried many options, but what really solved it, was closing the project and reopening it again (the same project, not a new one).
527,072
I recently installed Linux Mint 14 on my Samsung R580 laptop. The Fn-keys worked out of the box, I can switch screens, adjust volume and so on. When I try to adjust the brightness (`Fn` + `↑`/`↓`), the slider shows up and moves to the left and right, but screen brightness does not change at all, it always stays at 100...
2013/01/02
[ "https://superuser.com/questions/527072", "https://superuser.com", "https://superuser.com/users/144405/" ]
From [Samsung R580, Ubuntu 10.04 and Brightness control](http://mcgivrer.fr/samsung-r580-ubuntu-1004-and-brightness-contr), not written for Mint but may still work : Edit the `/etc/X11/xorg.conf` file and add the RegistryDwords line (only that line) to the Device section: ``` Section "Device" Identifier "Default D...
For linux mint version 8 + * `gksudo gedit /etc/default/grub` * Find the line which says GRUB\_CMDLINE\_LINUX="" * enter acpi\_backlight=vendor between the quotes ("") * `sudo update-grub` * reboot your laptop / pc Source: * <http://forums.linuxmint.com/viewtopic.php?f=42&t=45271>
527,072
I recently installed Linux Mint 14 on my Samsung R580 laptop. The Fn-keys worked out of the box, I can switch screens, adjust volume and so on. When I try to adjust the brightness (`Fn` + `↑`/`↓`), the slider shows up and moves to the left and right, but screen brightness does not change at all, it always stays at 100...
2013/01/02
[ "https://superuser.com/questions/527072", "https://superuser.com", "https://superuser.com/users/144405/" ]
Edit this line in `/etc/default/grub`: ``` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=" ``` Then: ``` update-grub reboot ```
For linux mint version 8 + * `gksudo gedit /etc/default/grub` * Find the line which says GRUB\_CMDLINE\_LINUX="" * enter acpi\_backlight=vendor between the quotes ("") * `sudo update-grub` * reboot your laptop / pc Source: * <http://forums.linuxmint.com/viewtopic.php?f=42&t=45271>
527,072
I recently installed Linux Mint 14 on my Samsung R580 laptop. The Fn-keys worked out of the box, I can switch screens, adjust volume and so on. When I try to adjust the brightness (`Fn` + `↑`/`↓`), the slider shows up and moves to the left and right, but screen brightness does not change at all, it always stays at 100...
2013/01/02
[ "https://superuser.com/questions/527072", "https://superuser.com", "https://superuser.com/users/144405/" ]
From [Samsung R580, Ubuntu 10.04 and Brightness control](http://mcgivrer.fr/samsung-r580-ubuntu-1004-and-brightness-contr), not written for Mint but may still work : Edit the `/etc/X11/xorg.conf` file and add the RegistryDwords line (only that line) to the Device section: ``` Section "Device" Identifier "Default D...
Edit this line in `/etc/default/grub`: ``` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=" ``` Then: ``` update-grub reboot ```
22,063
A euphemism is a word used to replace another worse-sounding word. For example, 'pass away' for 'die', 'battle fatigue' for 'shell shock', 'PTSD' for 'battle fatigue', often a word created to replace a taboo word. A dysphemism is a bit of the opposite, a synonym that sounds -worse- than the original, for example, 'bon...
2011/04/21
[ "https://english.stackexchange.com/questions/22063", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4972/" ]
General synonyms could be ***circumlocution***, ***substitute*** or ***alternative***. If you want to give the impression that the replacement term is nicer than the original, you can use ***polite term***, ***understatement***, ***genteelism*** (my personal favorite). If you're going the other way, i.e. using a more u...
* circumlocution * bowdlerism * code word * allusion
22,063
A euphemism is a word used to replace another worse-sounding word. For example, 'pass away' for 'die', 'battle fatigue' for 'shell shock', 'PTSD' for 'battle fatigue', often a word created to replace a taboo word. A dysphemism is a bit of the opposite, a synonym that sounds -worse- than the original, for example, 'bon...
2011/04/21
[ "https://english.stackexchange.com/questions/22063", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4972/" ]
*paranym*, which is defined as > > a word or words whose meaning is > altered to conceal; an evasion; see > euphemism > (by [Wordnik](http://www.wordnik.com/words/paranym)) > > > and > > euphemism; word whose meaning altered > to conceal evasion (by [Phrontistery](http://phrontistery.info/p.html)) > > >
General synonyms could be ***circumlocution***, ***substitute*** or ***alternative***. If you want to give the impression that the replacement term is nicer than the original, you can use ***polite term***, ***understatement***, ***genteelism*** (my personal favorite). If you're going the other way, i.e. using a more u...
22,063
A euphemism is a word used to replace another worse-sounding word. For example, 'pass away' for 'die', 'battle fatigue' for 'shell shock', 'PTSD' for 'battle fatigue', often a word created to replace a taboo word. A dysphemism is a bit of the opposite, a synonym that sounds -worse- than the original, for example, 'bon...
2011/04/21
[ "https://english.stackexchange.com/questions/22063", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4972/" ]
General synonyms could be ***circumlocution***, ***substitute*** or ***alternative***. If you want to give the impression that the replacement term is nicer than the original, you can use ***polite term***, ***understatement***, ***genteelism*** (my personal favorite). If you're going the other way, i.e. using a more u...
A *restatement* refers to anything without regard to good or bad. Does that count?
22,063
A euphemism is a word used to replace another worse-sounding word. For example, 'pass away' for 'die', 'battle fatigue' for 'shell shock', 'PTSD' for 'battle fatigue', often a word created to replace a taboo word. A dysphemism is a bit of the opposite, a synonym that sounds -worse- than the original, for example, 'bon...
2011/04/21
[ "https://english.stackexchange.com/questions/22063", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4972/" ]
General synonyms could be ***circumlocution***, ***substitute*** or ***alternative***. If you want to give the impression that the replacement term is nicer than the original, you can use ***polite term***, ***understatement***, ***genteelism*** (my personal favorite). If you're going the other way, i.e. using a more u...
The best way to classify words along the lines you are considering is by **connotation vs. denotation.** For example, English provides a number of words for 'an olfactory experience': scent, fragrance, odor, perfume, smell, aroma, stench, etc. Ranking these words from positive to negative forms a continuum of synonyms.
22,063
A euphemism is a word used to replace another worse-sounding word. For example, 'pass away' for 'die', 'battle fatigue' for 'shell shock', 'PTSD' for 'battle fatigue', often a word created to replace a taboo word. A dysphemism is a bit of the opposite, a synonym that sounds -worse- than the original, for example, 'bon...
2011/04/21
[ "https://english.stackexchange.com/questions/22063", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4972/" ]
*paranym*, which is defined as > > a word or words whose meaning is > altered to conceal; an evasion; see > euphemism > (by [Wordnik](http://www.wordnik.com/words/paranym)) > > > and > > euphemism; word whose meaning altered > to conceal evasion (by [Phrontistery](http://phrontistery.info/p.html)) > > >
* circumlocution * bowdlerism * code word * allusion
22,063
A euphemism is a word used to replace another worse-sounding word. For example, 'pass away' for 'die', 'battle fatigue' for 'shell shock', 'PTSD' for 'battle fatigue', often a word created to replace a taboo word. A dysphemism is a bit of the opposite, a synonym that sounds -worse- than the original, for example, 'bon...
2011/04/21
[ "https://english.stackexchange.com/questions/22063", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4972/" ]
* circumlocution * bowdlerism * code word * allusion
A *restatement* refers to anything without regard to good or bad. Does that count?
22,063
A euphemism is a word used to replace another worse-sounding word. For example, 'pass away' for 'die', 'battle fatigue' for 'shell shock', 'PTSD' for 'battle fatigue', often a word created to replace a taboo word. A dysphemism is a bit of the opposite, a synonym that sounds -worse- than the original, for example, 'bon...
2011/04/21
[ "https://english.stackexchange.com/questions/22063", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4972/" ]
* circumlocution * bowdlerism * code word * allusion
The best way to classify words along the lines you are considering is by **connotation vs. denotation.** For example, English provides a number of words for 'an olfactory experience': scent, fragrance, odor, perfume, smell, aroma, stench, etc. Ranking these words from positive to negative forms a continuum of synonyms.
22,063
A euphemism is a word used to replace another worse-sounding word. For example, 'pass away' for 'die', 'battle fatigue' for 'shell shock', 'PTSD' for 'battle fatigue', often a word created to replace a taboo word. A dysphemism is a bit of the opposite, a synonym that sounds -worse- than the original, for example, 'bon...
2011/04/21
[ "https://english.stackexchange.com/questions/22063", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4972/" ]
*paranym*, which is defined as > > a word or words whose meaning is > altered to conceal; an evasion; see > euphemism > (by [Wordnik](http://www.wordnik.com/words/paranym)) > > > and > > euphemism; word whose meaning altered > to conceal evasion (by [Phrontistery](http://phrontistery.info/p.html)) > > >
A *restatement* refers to anything without regard to good or bad. Does that count?
22,063
A euphemism is a word used to replace another worse-sounding word. For example, 'pass away' for 'die', 'battle fatigue' for 'shell shock', 'PTSD' for 'battle fatigue', often a word created to replace a taboo word. A dysphemism is a bit of the opposite, a synonym that sounds -worse- than the original, for example, 'bon...
2011/04/21
[ "https://english.stackexchange.com/questions/22063", "https://english.stackexchange.com", "https://english.stackexchange.com/users/4972/" ]
*paranym*, which is defined as > > a word or words whose meaning is > altered to conceal; an evasion; see > euphemism > (by [Wordnik](http://www.wordnik.com/words/paranym)) > > > and > > euphemism; word whose meaning altered > to conceal evasion (by [Phrontistery](http://phrontistery.info/p.html)) > > >
The best way to classify words along the lines you are considering is by **connotation vs. denotation.** For example, English provides a number of words for 'an olfactory experience': scent, fragrance, odor, perfume, smell, aroma, stench, etc. Ranking these words from positive to negative forms a continuum of synonyms.
7,424,425
I'm playing around with adding user authentication on my website using OAuth. I'm using Twitter as the website to authenticate against. When I *accept* the app on the Twitter site, I get bounced back to my website perfectly. Then I need to do something with the `Tokens` that come back. Looking at some demo code, the c...
2011/09/15
[ "https://Stackoverflow.com/questions/7424425", "https://Stackoverflow.com", "https://Stackoverflow.com/users/30674/" ]
Should your application require access to a user's protected Twitter resources it will have to use the user's info (access token & token secret) along with your application's info (consumer key and consumer secret.) If you store the user's info in a persistent storage space and you share this and your consumer secret w...
A secure system should promise you 1. confidentiality - nobody reads your communication in transit 2. integrity - nobody sabotages your message in transit without your detecting it 3. authentication - the sender of the message is not an impostor <http://en.wikipedia.org/wiki/Security_testing> **--disclaimer: I dont ...
19,967
> > **Exact Duplicate:** > > [Can anyone tell me what the suffix “-fu” stands for in the following sentence?](https://english.stackexchange.com/questions/3306/can-anyone-tell-me-what-the-suffix-fu-stands-for-in-the-following-sentence) > > > I was reading an article on MSDN where I found a mention to google-fu....
2011/04/07
[ "https://english.stackexchange.com/questions/19967", "https://english.stackexchange.com", "https://english.stackexchange.com/users/6500/" ]
It means “mastery of Google” or “Googling skill”. It is modelled after *kung fu*: > > kung fu (noun): a primarily unarmed Chinese martial art resembling karate. > > **ORIGIN from Chinese gōngfú, from gōng ‘merit’ + fú ‘master.’** > > >
It's a pormanteau of "Google" and "Kung-Fu," meaning to have high skill or art.
19,967
> > **Exact Duplicate:** > > [Can anyone tell me what the suffix “-fu” stands for in the following sentence?](https://english.stackexchange.com/questions/3306/can-anyone-tell-me-what-the-suffix-fu-stands-for-in-the-following-sentence) > > > I was reading an article on MSDN where I found a mention to google-fu....
2011/04/07
[ "https://english.stackexchange.com/questions/19967", "https://english.stackexchange.com", "https://english.stackexchange.com/users/6500/" ]
*[Google-fu](http://en.wiktionary.org/wiki/Google-fu)* is defined as "skill in using search engines (especially Google) to quickly find useful information on the Internet." It is a somewhat tongue-in-cheek reference to kung-fu, which is generally perceived as requiring a high degree of skill to master in the western h...
It's a pormanteau of "Google" and "Kung-Fu," meaning to have high skill or art.
19,967
> > **Exact Duplicate:** > > [Can anyone tell me what the suffix “-fu” stands for in the following sentence?](https://english.stackexchange.com/questions/3306/can-anyone-tell-me-what-the-suffix-fu-stands-for-in-the-following-sentence) > > > I was reading an article on MSDN where I found a mention to google-fu....
2011/04/07
[ "https://english.stackexchange.com/questions/19967", "https://english.stackexchange.com", "https://english.stackexchange.com/users/6500/" ]
It means “mastery of Google” or “Googling skill”. It is modelled after *kung fu*: > > kung fu (noun): a primarily unarmed Chinese martial art resembling karate. > > **ORIGIN from Chinese gōngfú, from gōng ‘merit’ + fú ‘master.’** > > >
Google fu is a slightly jokey term referring to the ability to utilise google's search functionality better than your average user. [urban dictionary](http://www.urbandictionary.com/define.php?term=Google%20fu)
19,967
> > **Exact Duplicate:** > > [Can anyone tell me what the suffix “-fu” stands for in the following sentence?](https://english.stackexchange.com/questions/3306/can-anyone-tell-me-what-the-suffix-fu-stands-for-in-the-following-sentence) > > > I was reading an article on MSDN where I found a mention to google-fu....
2011/04/07
[ "https://english.stackexchange.com/questions/19967", "https://english.stackexchange.com", "https://english.stackexchange.com/users/6500/" ]
*[Google-fu](http://en.wiktionary.org/wiki/Google-fu)* is defined as "skill in using search engines (especially Google) to quickly find useful information on the Internet." It is a somewhat tongue-in-cheek reference to kung-fu, which is generally perceived as requiring a high degree of skill to master in the western h...
It means “mastery of Google” or “Googling skill”. It is modelled after *kung fu*: > > kung fu (noun): a primarily unarmed Chinese martial art resembling karate. > > **ORIGIN from Chinese gōngfú, from gōng ‘merit’ + fú ‘master.’** > > >
19,967
> > **Exact Duplicate:** > > [Can anyone tell me what the suffix “-fu” stands for in the following sentence?](https://english.stackexchange.com/questions/3306/can-anyone-tell-me-what-the-suffix-fu-stands-for-in-the-following-sentence) > > > I was reading an article on MSDN where I found a mention to google-fu....
2011/04/07
[ "https://english.stackexchange.com/questions/19967", "https://english.stackexchange.com", "https://english.stackexchange.com/users/6500/" ]
*[Google-fu](http://en.wiktionary.org/wiki/Google-fu)* is defined as "skill in using search engines (especially Google) to quickly find useful information on the Internet." It is a somewhat tongue-in-cheek reference to kung-fu, which is generally perceived as requiring a high degree of skill to master in the western h...
Google fu is a slightly jokey term referring to the ability to utilise google's search functionality better than your average user. [urban dictionary](http://www.urbandictionary.com/define.php?term=Google%20fu)
54,161,940
I have the code of the servlet where I want to get a valid response. This is the original layout of the request ``` { "function": "Check", "teamId": "<teamId>", "teamKey": "<teamKey>", "requestId": "<request-id>", "firstName": "<FirstName>", "lastName": "<LastName>", "ticketNumber": "<ticket-num>" } ``...
2019/01/12
[ "https://Stackoverflow.com/questions/54161940", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10338090/" ]
You should write your json data to request body. For this you can use `OutputStreamWriter` class to write to the output stream of `HttpURLConnection` like below: ``` String ticketCheck = "{ \"function\":\"Check\",\"teamId\":IC106-2,\"teamKey\":1b3741ccf6d9ec5245055370125d901e,\"requestId\":1,\"firstName\":\"" + fname ...
Solved. Simple quote typo. "bad request" means bad syntax and I forgot to add \" next to function. ``` String ticketCheck = "{\"function\":\"Check\",\"teamId\":\"IC106-2\",\"teamKey\":\"1b3741ccf6d9ec5245055370125d901e\",\"requestId\":\""+REQ_ID+"\",\"firstName\":\""+fname+"\",\"lastName\":\""+lastName+"\",\"tick...
16,141,576
Consider the following document: ``` { "_id" : "ID_01", "code" : ["001", "002", "003"], "Others" : "544554" } ``` I went through this [MongoDB doc for elemmatch-query](http://docs.mongodb.org/manual/reference/operator/elemMatch/#elemmatch-query) & [elemmatch-projection](http://docs.mongodb.org/manual/reference...
2013/04/22
[ "https://Stackoverflow.com/questions/16141576", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1933917/" ]
You'll want to use the `$in` operator rather than `$elemMatch` in this case as `$in` can be used to search for a value (or values) inside a specific field. $in requires a list of values to be passed as an array. Additionally, and for your case, it will find either a single value, or by searching in an array of values. ...
If you're simply looking to match all documents with an array containing a given value, you can just specify the value on the reference to that array, e.g. ``` db.mycodes.find( { code: '001' } ) ``` Which thus would return you all documents that contained `'001'` in their `code` array
1,764,199
What would be the value of the limit $\lim \_{x\to \infty} (\frac{3x +1}{3x-1})^{4x}$? My initial idea was to divide by x in the numerator and denominator. However that would only solve the inner problem. How can the power be manipulated to evaluate the limit?
2016/04/29
[ "https://math.stackexchange.com/questions/1764199", "https://math.stackexchange.com", "https://math.stackexchange.com/users/288116/" ]
$$\left(\frac{3x +1}{3x-1}\right)^{4x}=\left[\frac{\left(1+\frac{1}{3x}\right)^{3x}}{\left(1-\frac{1}{3x}\right)^{3x}}\right]^\frac{4}{3}\to\left[\frac{e}{e^{-1}}\right]^{\frac{4}{3}}=e^\frac{8}{3}$$
HINT: $$\dfrac{3x+1}{3x-1}=1+\dfrac2{3x-1}$$ Use $$\lim\_{n\to\infty}\left(1+\dfrac1n\right)^n=e$$ $$\lim\_{x\to\infty}\left(\frac{3x +1}{3x-1}\right)^{4x}=\left[\lim\_{x\to\infty}\left(1+\dfrac2{3x-1}\right)^{\dfrac{3x-1}2}\right]^{\lim\_{x\to\infty}\dfrac{2\cdot4x}{3x-1}}=?$$
1,764,199
What would be the value of the limit $\lim \_{x\to \infty} (\frac{3x +1}{3x-1})^{4x}$? My initial idea was to divide by x in the numerator and denominator. However that would only solve the inner problem. How can the power be manipulated to evaluate the limit?
2016/04/29
[ "https://math.stackexchange.com/questions/1764199", "https://math.stackexchange.com", "https://math.stackexchange.com/users/288116/" ]
$$\left(\frac{3x +1}{3x-1}\right)^{4x}=\left[\frac{\left(1+\frac{1}{3x}\right)^{3x}}{\left(1-\frac{1}{3x}\right)^{3x}}\right]^\frac{4}{3}\to\left[\frac{e}{e^{-1}}\right]^{\frac{4}{3}}=e^\frac{8}{3}$$
You may transform the variable linearly ($3x-1=t$) to make a term disappear in the denominator and make the expression more familiar. $$\lim\_{x\to\infty}\left(\frac{3x+1}{3x-1}\right)^{4x}=\lim\_{t\to\infty}\left(\frac{t+2}t\right)^{4(t+1)/3}=\lim\_{t\to\infty}\left(1+\frac2t\right)^{4t/3+4/3}.$$ Then with a rescali...
9,078,562
I need to get the calendar data from Lotus Traveler. But it is hard to find any material on how to get anything. There are some examples regarding adding to Lotus Notes, but no info on the other way. Is it like contacting an exchange server?
2012/01/31
[ "https://Stackoverflow.com/questions/9078562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1056922/" ]
Lotus Traveler is a middle ware tool which sits between a domino server and mobile devices which have apps specifically defined to interface with it. For security and confidentiality there is minimal API documentation for the Traveler interfaces. You can access calenders directly from the domino server through standar...
With Lotus Notes Traveler installed on the server, you can get to your mail, contacts and calendar on e.g. an iPhone using the ActiveSync protocol. So you can say that Traveler emulates Exchange. If you are looking to retrieve calendar data from another Notes/Domino database then you can extend the mail database as pe...
64,365
To best maintain the functioning of the standard, rechargeable Lithium ion batteries in modern cameras, should the battery be used until the camera shuts down? Some types of batteries have memory and their effectiveness is reduced if they are not fully charged and then used until fully discharged each time. (NiCad ar...
2015/06/05
[ "https://photo.stackexchange.com/questions/64365", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/26631/" ]
Lithium batteries are almost free of memory effects, what will degrade the performance of the battery over time are build up of chemicals due to irreversible chemical reactions. If the battery is charged or discharged close to or beyond 100% charge state or close to or below 0% charge state, then you'll get a lot more ...
if you are using AA or AAA batteries, I suggest you look for a charger with maintenance functions, it costs about 30~50 $ but it makes your batteries last and younger :) this is not the model I have but you may look at the features <http://www.thomasdistributing.com/Maha-MH-C9000-Advanced-Battery-Charger_p_2558.html>
64,365
To best maintain the functioning of the standard, rechargeable Lithium ion batteries in modern cameras, should the battery be used until the camera shuts down? Some types of batteries have memory and their effectiveness is reduced if they are not fully charged and then used until fully discharged each time. (NiCad ar...
2015/06/05
[ "https://photo.stackexchange.com/questions/64365", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/26631/" ]
For a camera battery, the best advice is possibly to just not worry about the battery. Charge it when convenient or when you require it - simple as that. As Count Iblis has stated, lithium batteries do not suffer from a "memory effect" - if anything, a complete discharge would be worse than charging when full. The opt...
if you are using AA or AAA batteries, I suggest you look for a charger with maintenance functions, it costs about 30~50 $ but it makes your batteries last and younger :) this is not the model I have but you may look at the features <http://www.thomasdistributing.com/Maha-MH-C9000-Advanced-Battery-Charger_p_2558.html>
10,117
There's a Halacha/Mitzvah to say at-least 100 Brochos a day. My question is: what does the term "day" mean in this regard. Does a day start at night, and end the following night (as is the case in most of Judaism), or is there a different time-period used for this count? Also, assuming it starts at night, does it sta...
2011/09/18
[ "https://judaism.stackexchange.com/questions/10117", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/128/" ]
It turns out that it's actually a machlokes: * Most poskim hold that it begins at nightfall and continues until the next nightfall * A few poskim hold that the day starts at morning and continues until the next morning When necessary, one may rely on the second opinion above. For example, if one didn't say all 100 br...
This page here gives you an explanation of how to reach your 100 brachot: [The Requirement To Recite 100 Brachos Each Day](http://www.beureihatefila.com/files/The_Requirement_To_Recite_100_Brachos_Each_Day.pdf). Based on the counting, it appears that your 100 brachot go from maariv to maariv. Otherwise there would be ...
10,117
There's a Halacha/Mitzvah to say at-least 100 Brochos a day. My question is: what does the term "day" mean in this regard. Does a day start at night, and end the following night (as is the case in most of Judaism), or is there a different time-period used for this count? Also, assuming it starts at night, does it sta...
2011/09/18
[ "https://judaism.stackexchange.com/questions/10117", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/128/" ]
It turns out that it's actually a machlokes: * Most poskim hold that it begins at nightfall and continues until the next nightfall * A few poskim hold that the day starts at morning and continues until the next morning When necessary, one may rely on the second opinion above. For example, if one didn't say all 100 br...
Apparently, its from sunset to sunset. (See Mogen Avraham Siman 46:8 and Shulchan Aruch HaRav Siman 46) See [here](http://halachafortoday.com/archives-2/archives-hilchos-brachos/) for more sources and details.
27,483,428
Is it possible to stop getting negative numbers in TextView in android by writing a code in java. I tried this ``` int up = 0; TextView textview; if (allowNagativeNumbers == false) { if ( up < 0 ) { up = 0; textview.setText(0); } } ...
2014/12/15
[ "https://Stackoverflow.com/questions/27483428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Before displaying your number in `TextView` use `Math.abs()` function on your number.This function will give you absolute value.
I'm guessing you want this to happen in real-time? Are you using a listener for the textview? If so make sure this is inside a listener and also double check and make sure that allowNegativeNumbers is actually false.
27,483,428
Is it possible to stop getting negative numbers in TextView in android by writing a code in java. I tried this ``` int up = 0; TextView textview; if (allowNagativeNumbers == false) { if ( up < 0 ) { up = 0; textview.setText(0); } } ...
2014/12/15
[ "https://Stackoverflow.com/questions/27483428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Before displaying your number in `TextView` use `Math.abs()` function on your number.This function will give you absolute value.
Implement your own TextView class (you will also be able to use it in XML files). ``` public class MyTextView extends TextView { @Override public void setText (CharSequence text, BufferType type) { if(Integer.valueOf(text) > 0) { super.setText (text, type); } el...
27,483,428
Is it possible to stop getting negative numbers in TextView in android by writing a code in java. I tried this ``` int up = 0; TextView textview; if (allowNagativeNumbers == false) { if ( up < 0 ) { up = 0; textview.setText(0); } } ...
2014/12/15
[ "https://Stackoverflow.com/questions/27483428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Before displaying your number in `TextView` use `Math.abs()` function on your number.This function will give you absolute value.
Try These statements ``` int up = 5; up = up >0 ? up: 0; and set the text in textView. ``` another way get the text from textView and convert it into string. ``` int up = Integet.parseInt(textView.getText()); up = up >0 ? up: 0; and set the text in textView. ```
142,556
I'm running a model that breaks a dataset into several dbf tables based on a query. However, only half of the query is being honored.![enter image description here](https://i.stack.imgur.com/HlSaR.png)![enter image description here](https://i.stack.imgur.com/JglfZ.png) The PopDenZone field is not being accepted and I ...
2015/04/14
[ "https://gis.stackexchange.com/questions/142556", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/9788/" ]
Do you need parentheses around part of the expression? Either of the following could be correct, but I assume it is the latter. ``` (PopDenZone = 'CPSE URBAN' AND Priority_Description = 'Life Threat') OR Priority_Description = 'Urgent Medical' PopDenZone = 'CPSE URBAN' AND (Priority_Description = 'Life Threat' OR P...
Perhaps try parentheses around the expressions. I think what you're trying to say is: ``` PopDenZone = 'CPSE URBAN' AND (Priority_Description = 'Life Threat' OR Priority_Description = 'Urgent Medical') ``` It's worth noting that: ``` (x AND y) OR z ``` is different to: ``` x AND (y OR z) ```
68,087,377
How do I read a file into an array, but correctly handle duplicates? I have a file consisting of two columns, a name and a number. Eventually the names will repeat, with a number that may or may not be different. ``` Rita,13 Sue,11 Bob,01 Too,05 Rita,13 Sue,07 Bob,02 Too,05 ``` I need to read these lines into an ar...
2021/06/22
[ "https://Stackoverflow.com/questions/68087377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16291379/" ]
You can use `Object.entries` to get the keys/values from your `data.person` object, but then due to the nature of the array underneath that you're stuck with expecting `job` to be in the first element and `alterEgo` being in the second - as soon as that changes/goes out of order you're stuck with having to look for the...
Here is another way you can do this : ```js const jsonData = `{ "person": { "Clark": [ { "lastName": "Kent", "job": "Reporter", "roll": "20" }, { "alterEgo": "Superman", "powers":["strength", "lasereyes", "hair"] } ], "Bruce": [ ...
185,679
I understand and respect the policy against being "chatty" with the comment system, but I think there are substantive benefits to simple "thank yous" and certain other strictly social comments. I wonder if we could support the latter by providing an "ephemeral" option when submitting a comment such that the comment goe...
2013/06/24
[ "https://meta.stackexchange.com/questions/185679", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/216381/" ]
A "thank you" comment is not necessarily just social. By publicly thanking someone, it shows their answer was helpful to you. Granted, upvoting and accepting an answer are more useful metrics for SO, but there is still a place for an occasional "thanks" as long as it does not get out of hand...
I like this idea, but I think I'd prefer the ability to send "kudos" or something of the sort that won't clog up the comment system for any period of time, but will alert the user you wish to thank with a small, private popup expressing as much.
3,662,542
I notice in my `R` console that `x=sample(1:n); all(order(order(x)) == x)` always evaluates `TRUE`, for any `n`. Just to assure you I'm not on the wrong SE site here, I know exactly what the code means, but this still makes my brain hurt. Can anyone draw a picture or give an explanatory proof to show what's going on? ...
2020/05/06
[ "https://math.stackexchange.com/questions/3662542", "https://math.stackexchange.com", "https://math.stackexchange.com/users/255406/" ]
In general, when $x$ is a list of $n$ elements, $\text{order}(x)$ is a permutation of $\{1,2,\ldots,n\}$ such that $x\_{\text{order}(x)\_i} \le x\_{\text{order}(x)\_j}$ whenever $i<j$. (The elements of $x$, taken in the order given by $\text{order}(x)$, are non-decreasing.) When $x$ is itself a permutation of $\{1,2,\l...
any is a quantifying operator. If test whether one sequence is identic independent of order to the other. So `x=sample(1:n); any(order(order(x)) == x)` has always to be true. order() is idempotent. That is, if applied once there is no more change in the next application of order() to the sequence it is applied to. Fro...
35,798,507
I have the following inputs: `cost`, where I type in a currency value, like `6,23`, `profit`, where I type in a percentage value like `29,21` and `value` where the sum of the both values is show. JavaScript does the math and returns me in `value` the value from `cost` + the currency value of the percentage typed in `...
2016/03/04
[ "https://Stackoverflow.com/questions/35798507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5225620/" ]
The calculations appear to be incorrect because decimal separators in JavaScript are not localized. ```js 6,23 * 29,21 // 21 6.23 * 29.21 // 181.97830000000002 parseFloat(6,23); // 6 parseFloat(6.23); // 6.23 ``` You can use [`Number.prototype.toLocaleString()`](https://developer.mozilla.org/en-US/docs/Web/JavaSc...
If your total profit equation is `total = cost + (cost * profit)`. Then your profit % equation should be `profit = (total - cost) / cost`. Here are two functions that provide you with what you need. You might be interested to use them instead of calculating in line like how you do in your question. ``` function getP...
35,798,507
I have the following inputs: `cost`, where I type in a currency value, like `6,23`, `profit`, where I type in a percentage value like `29,21` and `value` where the sum of the both values is show. JavaScript does the math and returns me in `value` the value from `cost` + the currency value of the percentage typed in `...
2016/03/04
[ "https://Stackoverflow.com/questions/35798507", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5225620/" ]
The calculations appear to be incorrect because decimal separators in JavaScript are not localized. ```js 6,23 * 29,21 // 21 6.23 * 29.21 // 181.97830000000002 parseFloat(6,23); // 6 parseFloat(6.23); // 6.23 ``` You can use [`Number.prototype.toLocaleString()`](https://developer.mozilla.org/en-US/docs/Web/JavaSc...
So seems that the problem was in this part of the code: ``` valor = valor.replace(",",""); var inteiro = valor.substring(0,valor.length - 2); var decimal = valor.substr(2); return inteiro + "." + decimal; ``` After changing it to this worked fine: ``` var inteiro = valor.substring(0,valor.length - 2); var decima...
48,469,783
I would like to split a string where the delimiter is a pipe. But the pipe can be escaped and not splitted than. example: ``` 'aa|bb|cc'.split(/*??*/) // ['aa','bb','cc'] 'aa\|aa|bb|cc|dd\|dd|ee'.split(/*??*/) // ['aa|aa', 'bb', 'cc', 'dd|dd', 'ee'] ``` I try this, but it not work in javascript: `(?<!\\)[\|]`
2018/01/26
[ "https://Stackoverflow.com/questions/48469783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6029440/" ]
Try this: ```js console.log('aa|bb|cc'.split('|')); console.log('aa\|aa|bb|cc|dd\|dd|ee'.split('|')); ```
Hi the Regex I created <https://www.regexpal.com/index.php?fam=100132> What you need to do is concact the matches in an array the code generated looks like this... ``` const regex = /(([^\\\|]+)\\?\|\2)|(\w+)/g; const str = `aa\\|aa|bb|cc|dd\\|dd|ee`; let m; while ((m = regex.exec(str)) !== null) { // This is nec...
48,469,783
I would like to split a string where the delimiter is a pipe. But the pipe can be escaped and not splitted than. example: ``` 'aa|bb|cc'.split(/*??*/) // ['aa','bb','cc'] 'aa\|aa|bb|cc|dd\|dd|ee'.split(/*??*/) // ['aa|aa', 'bb', 'cc', 'dd|dd', 'ee'] ``` I try this, but it not work in javascript: `(?<!\\)[\|]`
2018/01/26
[ "https://Stackoverflow.com/questions/48469783", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6029440/" ]
I assume that you want to skip splitting on escaped pipes. Use `match` instead: ```js console.log( 'aa\\|aa|bb|cc|dd\\|dd|ee'.match(/[^\\|]*(?:\\.[^\\|]*)*/g).filter(Boolean) ); ```
Hi the Regex I created <https://www.regexpal.com/index.php?fam=100132> What you need to do is concact the matches in an array the code generated looks like this... ``` const regex = /(([^\\\|]+)\\?\|\2)|(\w+)/g; const str = `aa\\|aa|bb|cc|dd\\|dd|ee`; let m; while ((m = regex.exec(str)) !== null) { // This is nec...
21,346,410
I'm trying to get the SHA1 commit hash for a GIT commit manually, but something isn't working correctly. First we have the standard commit message that looks something like this: ``` tree f594b3f6d9ae291c83902f3992aa36872aa70d68 parent 0000004bf6d464667df5150b4526083886947d92 author User <foo@bar.com> 1390620460.46...
2014/01/25
[ "https://Stackoverflow.com/questions/21346410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/721519/" ]
Every object's hash is actually the hash of "Length + ' ' + Content" - this works to prevent SHA1 hash collisions (since now you have to collide on both the SHA1 *and* the length, which is way less likely)
There should be no blank lines after the `tree` and `parent` lines, i.e. the commit body should be: ``` tree f594b3f6d9ae291c83902f3992aa36872aa70d68 parent 0000004bf6d464667df5150b4526083886947d92 author User <foo@bar.com> 1390620460.46263 +0000 committer User <foo@bar.com> 1390620460.46263 +0000 Commit Message ```...
21,346,410
I'm trying to get the SHA1 commit hash for a GIT commit manually, but something isn't working correctly. First we have the standard commit message that looks something like this: ``` tree f594b3f6d9ae291c83902f3992aa36872aa70d68 parent 0000004bf6d464667df5150b4526083886947d92 author User <foo@bar.com> 1390620460.46...
2014/01/25
[ "https://Stackoverflow.com/questions/21346410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/721519/" ]
Every object's hash is actually the hash of "Length + ' ' + Content" - this works to prevent SHA1 hash collisions (since now you have to collide on both the SHA1 *and* the length, which is way less likely)
Not C#, but here's how you can calculate a git commit hash from the bash prompt: ``` commit_len=$(git cat-file commit HEAD | wc -c) (echo -ne "commit $commit_len\0"; git cat-file commit HEAD) | sha1sum ``` Check that the hash is correct: ``` git show HEAD | grep commit ```
21,346,410
I'm trying to get the SHA1 commit hash for a GIT commit manually, but something isn't working correctly. First we have the standard commit message that looks something like this: ``` tree f594b3f6d9ae291c83902f3992aa36872aa70d68 parent 0000004bf6d464667df5150b4526083886947d92 author User <foo@bar.com> 1390620460.46...
2014/01/25
[ "https://Stackoverflow.com/questions/21346410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/721519/" ]
If you are using UTF-8 characters in your strings, don't use `string.Length` to reserve bytes array. This is true if the string only contains ASCII characters, but if there is UTF-8 Characters in your string, then `.Length` will will be smaller than the actual byte size. Since you are using `.Length` to allocate an a...
There should be no blank lines after the `tree` and `parent` lines, i.e. the commit body should be: ``` tree f594b3f6d9ae291c83902f3992aa36872aa70d68 parent 0000004bf6d464667df5150b4526083886947d92 author User <foo@bar.com> 1390620460.46263 +0000 committer User <foo@bar.com> 1390620460.46263 +0000 Commit Message ```...
21,346,410
I'm trying to get the SHA1 commit hash for a GIT commit manually, but something isn't working correctly. First we have the standard commit message that looks something like this: ``` tree f594b3f6d9ae291c83902f3992aa36872aa70d68 parent 0000004bf6d464667df5150b4526083886947d92 author User <foo@bar.com> 1390620460.46...
2014/01/25
[ "https://Stackoverflow.com/questions/21346410", "https://Stackoverflow.com", "https://Stackoverflow.com/users/721519/" ]
If you are using UTF-8 characters in your strings, don't use `string.Length` to reserve bytes array. This is true if the string only contains ASCII characters, but if there is UTF-8 Characters in your string, then `.Length` will will be smaller than the actual byte size. Since you are using `.Length` to allocate an a...
Not C#, but here's how you can calculate a git commit hash from the bash prompt: ``` commit_len=$(git cat-file commit HEAD | wc -c) (echo -ne "commit $commit_len\0"; git cat-file commit HEAD) | sha1sum ``` Check that the hash is correct: ``` git show HEAD | grep commit ```
221,424
I want to create a map in the style of a London tube map (or similar metro systems) where the stations are linked together (with train lines) but the placement of the stations does not directly relate to their position in real life. In QGIS I can create the stations (as points) and can draw lines connecting the statio...
2016/12/14
[ "https://gis.stackexchange.com/questions/221424", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/88158/" ]
Tube maps are abstract representations of the geometry. They tend to follow certain graphical conventions, too:- * lines which overlap geographically are rendered in parallel. For example, the London Underground Map, where many lines can share the same piece of track. This is especially common with tube-style bus maps...
If you're just looking to manually move points, then right-click the layer, 'Toggle Editing', and then use the 'Move Feature' tool in the Digitizing Toolbar. Be sure to do this to a copy of your original shapefile, or the changes will be permanent to your source data.
221,424
I want to create a map in the style of a London tube map (or similar metro systems) where the stations are linked together (with train lines) but the placement of the stations does not directly relate to their position in real life. In QGIS I can create the stations (as points) and can draw lines connecting the statio...
2016/12/14
[ "https://gis.stackexchange.com/questions/221424", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/88158/" ]
For future reference for others trying to do the same, I managed to create a map using QGIS (and learnt a lot along the way). See <https://derbycyclinggroup.org.uk/blog/map/> for the final version. I never found a way to move the "stations" and the lines connected to them as one. However, I found that creating a grid ...
If you're just looking to manually move points, then right-click the layer, 'Toggle Editing', and then use the 'Move Feature' tool in the Digitizing Toolbar. Be sure to do this to a copy of your original shapefile, or the changes will be permanent to your source data.
221,424
I want to create a map in the style of a London tube map (or similar metro systems) where the stations are linked together (with train lines) but the placement of the stations does not directly relate to their position in real life. In QGIS I can create the stations (as points) and can draw lines connecting the statio...
2016/12/14
[ "https://gis.stackexchange.com/questions/221424", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/88158/" ]
For future reference for others trying to do the same, I managed to create a map using QGIS (and learnt a lot along the way). See <https://derbycyclinggroup.org.uk/blog/map/> for the final version. I never found a way to move the "stations" and the lines connected to them as one. However, I found that creating a grid ...
Tube maps are abstract representations of the geometry. They tend to follow certain graphical conventions, too:- * lines which overlap geographically are rendered in parallel. For example, the London Underground Map, where many lines can share the same piece of track. This is especially common with tube-style bus maps...
38,928,756
I have run into this issue and my app wont compile. I was trying to use play services in my app but it was giving me resource not found error I got frustrated and removed all the xamarin files and reinstalled everything. that issue went away now this error has popped up. Any help will be appreciated. P.S I am a beginne...
2016/08/13
[ "https://Stackoverflow.com/questions/38928756", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Use `adb` to uninstall your app: ``` adb uninstall <your app's package name> ``` This cleans all the leftover Xamarin libraries.
in android go to Settings > Applications > All Remove your app. It might not have the original application name in this list. mine was "com.bla.bla.appname" and was 0.0k in size.
60,748,644
I want to export an objects `based on conditions` for example first I check some which language stored in 'AsyncStorage' then based on languages I return a particular `object`. **file**: `lang.js` ``` import AsyncStorage from '@react-native-community/async-storage'; let exportingLang = {}; AsyncStorage.getItem('@lan...
2020/03/18
[ "https://Stackoverflow.com/questions/60748644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11566074/" ]
Using auto in the middle of a hand-written detailed apply proof is very strange. Your problem is that you applied disjE too late: you need to apply it before impE and not after (it is an issue of --> vs ==>: with impE you commit to the choice P). ``` lemma ‹∀s. P s ∨ Q s ⟹ ∀s. P s ⟶ R s ⟹ ∀s. Q s ⟶ R s ⟹ ∀s. R s› app...
I think explaining both OrE and AndE rules and comparing them is productive. Let's start with the Or (disjunction): Disjunction Elimination ----------------------- Recall the rule: `disjE = OrE: ⟦ P ∨ Q; P ⟹ R; Q ⟹ R ⟧ ⟹ R`. To explain it consider the following story: > > You know P or Q but you don’t know which on...
60,748,644
I want to export an objects `based on conditions` for example first I check some which language stored in 'AsyncStorage' then based on languages I return a particular `object`. **file**: `lang.js` ``` import AsyncStorage from '@react-native-community/async-storage'; let exportingLang = {}; AsyncStorage.getItem('@lan...
2020/03/18
[ "https://Stackoverflow.com/questions/60748644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11566074/" ]
The rule you want to apply, namely *disjunction elimination* (`disjE`), allows you to **eliminate** a disjunction `P ∨ Q` in the premises without knowing a priori whether `P` or `Q` is true. In that situation, you need to consider both cases separately (i.e. assume `P` is true and assume `Q` is true) in order to safely...
I think explaining both OrE and AndE rules and comparing them is productive. Let's start with the Or (disjunction): Disjunction Elimination ----------------------- Recall the rule: `disjE = OrE: ⟦ P ∨ Q; P ⟹ R; Q ⟹ R ⟧ ⟹ R`. To explain it consider the following story: > > You know P or Q but you don’t know which on...