qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
52,594,654 | When deploying a service on `kubernetes` that one wants to be publicly accessible, the way around is to declare its type as `LoadBalancer`
What is the equivalent way to expose a service endpoint on MESOS/DCOS? | 2018/10/01 | [
"https://Stackoverflow.com/questions/52594654",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2409793/"
] | Actually you should avoid using http, but if there is no way you can do this:
1. Add @xml/network\_security\_config into your resources:
```
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">www.smedk.ru</doma... | You can use Base64 to load HTML into WebView.
```
String base64version = Base64.encodeToString(htmlString.getBytes(), Base64.DEFAULT);
webView.loadData(base64version, "text/html; charset=UTF-8", "base64");
``` |
52,594,654 | When deploying a service on `kubernetes` that one wants to be publicly accessible, the way around is to declare its type as `LoadBalancer`
What is the equivalent way to expose a service endpoint on MESOS/DCOS? | 2018/10/01 | [
"https://Stackoverflow.com/questions/52594654",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2409793/"
] | Actually you should avoid using http, but if there is no way you can do this:
1. Add @xml/network\_security\_config into your resources:
```
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">www.smedk.ru</doma... | Please try to use secure url.
Use https instead of http. Android 9.0 don't allow unsecured urls |
52,594,654 | When deploying a service on `kubernetes` that one wants to be publicly accessible, the way around is to declare its type as `LoadBalancer`
What is the equivalent way to expose a service endpoint on MESOS/DCOS? | 2018/10/01 | [
"https://Stackoverflow.com/questions/52594654",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2409793/"
] | This method works for all domains also with Android 9. Add this property to your Manifest like this:
```
<application
...
android:usesCleartextTraffic="true"
...>
</application>
``` | In android 10 finally, this is worked for me to load full content rather partial.
```
webView.loadDataWithBaseURL(null, contentText, "text/html", "UTF-8", null);
``` |
7,854,570 | I am trying to implement a search (Ctrl+F) feature on a XamDataGrid. How can I programmatically invoke record filtering on the grid that searches across content in multiple columns and displays only columns that match the search? | 2011/10/21 | [
"https://Stackoverflow.com/questions/7854570",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48954/"
] | The record filtering in the **DataPresenter** is just that - a means of the filtering the records based on some specified criteria. Normally that criteria is provided via one of the built in ui's - either using the **LabelIcons** which is just a drop down list of the filtered values or via the **FilterRecord** which is... | The way that I would approach this problem would be to add code to the search button click event (or some other trigger mechanism) and perform the search directly in code, using linq or record by record comparison, whatever works best in your situation (it would help to know how the columns and rows are populated).
On... |
7,854,570 | I am trying to implement a search (Ctrl+F) feature on a XamDataGrid. How can I programmatically invoke record filtering on the grid that searches across content in multiple columns and displays only columns that match the search? | 2011/10/21 | [
"https://Stackoverflow.com/questions/7854570",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48954/"
] | The way that I would approach this problem would be to add code to the search button click event (or some other trigger mechanism) and perform the search directly in code, using linq or record by record comparison, whatever works best in your situation (it would help to know how the columns and rows are populated).
On... | I was looking for a very basic solution, so I'll share what has worked for me. Here is my C# code-behind code to apply a filter to a column:
```
grdConnectionManagerEntries.FieldLayouts[0].RecordFilters.Clear(); // Clear any existing filters before applying this one.
grdConnectionManagerEntries.FieldLayouts[0].Record... |
7,854,570 | I am trying to implement a search (Ctrl+F) feature on a XamDataGrid. How can I programmatically invoke record filtering on the grid that searches across content in multiple columns and displays only columns that match the search? | 2011/10/21 | [
"https://Stackoverflow.com/questions/7854570",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48954/"
] | The record filtering in the **DataPresenter** is just that - a means of the filtering the records based on some specified criteria. Normally that criteria is provided via one of the built in ui's - either using the **LabelIcons** which is just a drop down list of the filtered values or via the **FilterRecord** which is... | Thank you for sharing. I'll share too.
I used this example to handle a more simple case.
I just wanted to set up a filter on one column.
Here it is:
```
Imports Infragistics.Windows.DataPresenter
Imports Infragistics.Windows.Controls
Public Class DataPresenterFilter
Public Shared Function GetTitleFilter(ByVal elemen... |
7,854,570 | I am trying to implement a search (Ctrl+F) feature on a XamDataGrid. How can I programmatically invoke record filtering on the grid that searches across content in multiple columns and displays only columns that match the search? | 2011/10/21 | [
"https://Stackoverflow.com/questions/7854570",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48954/"
] | The record filtering in the **DataPresenter** is just that - a means of the filtering the records based on some specified criteria. Normally that criteria is provided via one of the built in ui's - either using the **LabelIcons** which is just a drop down list of the filtered values or via the **FilterRecord** which is... | I was looking for a very basic solution, so I'll share what has worked for me. Here is my C# code-behind code to apply a filter to a column:
```
grdConnectionManagerEntries.FieldLayouts[0].RecordFilters.Clear(); // Clear any existing filters before applying this one.
grdConnectionManagerEntries.FieldLayouts[0].Record... |
7,854,570 | I am trying to implement a search (Ctrl+F) feature on a XamDataGrid. How can I programmatically invoke record filtering on the grid that searches across content in multiple columns and displays only columns that match the search? | 2011/10/21 | [
"https://Stackoverflow.com/questions/7854570",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/48954/"
] | Thank you for sharing. I'll share too.
I used this example to handle a more simple case.
I just wanted to set up a filter on one column.
Here it is:
```
Imports Infragistics.Windows.DataPresenter
Imports Infragistics.Windows.Controls
Public Class DataPresenterFilter
Public Shared Function GetTitleFilter(ByVal elemen... | I was looking for a very basic solution, so I'll share what has worked for me. Here is my C# code-behind code to apply a filter to a column:
```
grdConnectionManagerEntries.FieldLayouts[0].RecordFilters.Clear(); // Clear any existing filters before applying this one.
grdConnectionManagerEntries.FieldLayouts[0].Record... |
15,925,494 | I'm currently trying to write URLs that are entered into a `ComboBox` (from an Outlook Addin) into a txt file, but as i beginner i don't really know how to go for it.
I don't have any code snippets that could assist you in anyway so i think I'll just keep it simple, by asking you for the General Approach that I could ... | 2013/04/10 | [
"https://Stackoverflow.com/questions/15925494",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2261606/"
] | Try this htaccess code
```
RewriteEngine on
RewriteBase /folder1
RewriteRule ^folder2/(.*).php$ system/folder2/$1.php [L]
``` | try this
```
RewriteEngine on
RewriteRule ^/([^/]+)/(.*)$ $1/system/$2 [QSA,L]
```
Edit:
```
RewriteCond %{REQUEST_URI} ^/folder1/system/(.*)$
RewriteRule ^ - [S=1,L]
RewriteCond %{REQUEST_URI} ^/folder1/(.*)$
RewriteRule ^ /folder1/system/%1
``` |
15,925,494 | I'm currently trying to write URLs that are entered into a `ComboBox` (from an Outlook Addin) into a txt file, but as i beginner i don't really know how to go for it.
I don't have any code snippets that could assist you in anyway so i think I'll just keep it simple, by asking you for the General Approach that I could ... | 2013/04/10 | [
"https://Stackoverflow.com/questions/15925494",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2261606/"
] | Try this htaccess code
```
RewriteEngine on
RewriteBase /folder1
RewriteRule ^folder2/(.*).php$ system/folder2/$1.php [L]
``` | Replace your rule with this:
```
RewriteCond %{REQUEST_URI} !/system/ [NC]
RewriteRule ^([^/]+)/(.*)$ /$1/system/$2 [L]
``` |
15,925,494 | I'm currently trying to write URLs that are entered into a `ComboBox` (from an Outlook Addin) into a txt file, but as i beginner i don't really know how to go for it.
I don't have any code snippets that could assist you in anyway so i think I'll just keep it simple, by asking you for the General Approach that I could ... | 2013/04/10 | [
"https://Stackoverflow.com/questions/15925494",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2261606/"
] | Try this htaccess code
```
RewriteEngine on
RewriteBase /folder1
RewriteRule ^folder2/(.*).php$ system/folder2/$1.php [L]
``` | ```
RewriteEngine On
RewriteRule ^(.*)$ %{REQUEST_URI}/system/$1 [R,NC,L]
```
Try this. |
15,925,494 | I'm currently trying to write URLs that are entered into a `ComboBox` (from an Outlook Addin) into a txt file, but as i beginner i don't really know how to go for it.
I don't have any code snippets that could assist you in anyway so i think I'll just keep it simple, by asking you for the General Approach that I could ... | 2013/04/10 | [
"https://Stackoverflow.com/questions/15925494",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2261606/"
] | Try this htaccess code
```
RewriteEngine on
RewriteBase /folder1
RewriteRule ^folder2/(.*).php$ system/folder2/$1.php [L]
``` | Remember you need to place the `.htaccess`-file in the folder1-directory! I think you might have placed it in the root of your site.
Also, be careful not to use a leading /.
Try this:
```
RewriteEngine on
RewriteRule ^/(.*) system/$1
``` |
3,053,217 | I'm doing massive tests on a Postgres database...
so basically I have 2 table where I inserted 40.000.000 records on, let's say table1 and 80.000.000 on table2
after this I deleted all those records.
Now if I do SELECT \* FROM table1 it takes 199000ms ?
I can't understand what's happening?
can anyone help me on th... | 2010/06/16 | [
"https://Stackoverflow.com/questions/3053217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/180699/"
] | If you delete all the rows from a table, they are marked as deleted but not actually removed from disk immediately. In order to remove them you need to do a "vacuum" operation- this should kick in automatically some time after such a big delete. Even so, that will just leave the pages empty but taking up quite a bit of... | The tuples are logically deleted, not fisically.
You should perform a VACUUM on the db.
[More info here](http://wiki.postgresql.org/wiki/VACUUM_FULL) |
3,053,217 | I'm doing massive tests on a Postgres database...
so basically I have 2 table where I inserted 40.000.000 records on, let's say table1 and 80.000.000 on table2
after this I deleted all those records.
Now if I do SELECT \* FROM table1 it takes 199000ms ?
I can't understand what's happening?
can anyone help me on th... | 2010/06/16 | [
"https://Stackoverflow.com/questions/3053217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/180699/"
] | The tuples are logically deleted, not fisically.
You should perform a VACUUM on the db.
[More info here](http://wiki.postgresql.org/wiki/VACUUM_FULL) | If you are deleting all records, use truncate not delete. Further the first time you run it the relation will not be cached (file cache or shared buffers), so it will be slower than subsequent times. |
3,053,217 | I'm doing massive tests on a Postgres database...
so basically I have 2 table where I inserted 40.000.000 records on, let's say table1 and 80.000.000 on table2
after this I deleted all those records.
Now if I do SELECT \* FROM table1 it takes 199000ms ?
I can't understand what's happening?
can anyone help me on th... | 2010/06/16 | [
"https://Stackoverflow.com/questions/3053217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/180699/"
] | If you delete all the rows from a table, they are marked as deleted but not actually removed from disk immediately. In order to remove them you need to do a "vacuum" operation- this should kick in automatically some time after such a big delete. Even so, that will just leave the pages empty but taking up quite a bit of... | If you are deleting all records, use truncate not delete. Further the first time you run it the relation will not be cached (file cache or shared buffers), so it will be slower than subsequent times. |
29,104,183 | I'm processing multiple files as part of an external table. Is there any way I can get the file name being processed in external tables and place it in the table?
At the moment the only solution I can find is appending the file name to every record in the flat file which isn't ideal from an efficiency standpoint and ... | 2015/03/17 | [
"https://Stackoverflow.com/questions/29104183",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4589976/"
] | I'm not aware of any way to capture the file name within the access parameters. As a workaround, rather than modifying the original files you could use a preprocessor to append the file name on the fly. If you had two files, say `file_1.csv` containing `a,b,1` and `file_2.csv` containing `c,d,2`, you could have a small... | You might be able to extract that data from the [`all_external_locations`](http://docs.oracle.com/cd/B19306_01/server.102/b14237/statviews_1056.htm) DDL. It contains the directory name and location parameters specified when you created the table. |
42,076 | **What mechanisms do you know that prevent your site from being abused by anonymous spammers.**
For example, let's say that I have a site where people can vote something. But I *don't* want someone to spam something all the way to the top. So I found (a) creating an account and only allowed to vote once and (b) CAPTCH... | 2008/09/03 | [
"https://Stackoverflow.com/questions/42076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] | 
From [Quantum Random Bit Generator Service](http://random.irb.hr/signup.php), via [MNeylon](http://www.mneylon.com/blog/archives/2008/09/02/captcha-sorts-out-the-nerds-from-the-boys/) | This is the study area of [Human Computation](http://en.wikipedia.org/wiki/Human_computation).
there is an excellent video from Luis von Ahn here:
<http://video.google.com/videoplay?docid=-8246463980976635143> |
42,076 | **What mechanisms do you know that prevent your site from being abused by anonymous spammers.**
For example, let's say that I have a site where people can vote something. But I *don't* want someone to spam something all the way to the top. So I found (a) creating an account and only allowed to vote once and (b) CAPTCH... | 2008/09/03 | [
"https://Stackoverflow.com/questions/42076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] | The big thing I've noticed is that whatever you do, you want your system to be unique. You want an attacker to have to tailor their automation program for your specific site, rather than just throw a pre-existing script at it that will work almost anywhere. It doesn't even have to be cryptographically secure; it just h... | stackoverflow has a few features that help with this; I think the single most useful step you can take is disabling the ability of anonymous users and new accounts to vote. This way, no one can sign up for hundreds of accounts and use their one vote to overpower other users. I'd say requiring a few posts or membership ... |
42,076 | **What mechanisms do you know that prevent your site from being abused by anonymous spammers.**
For example, let's say that I have a site where people can vote something. But I *don't* want someone to spam something all the way to the top. So I found (a) creating an account and only allowed to vote once and (b) CAPTCH... | 2008/09/03 | [
"https://Stackoverflow.com/questions/42076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] | * Limit the number of votes per IP address per time
* Block anonymizing proxies.
* For voting: How about shuffling the value that has to be returned by the form on a "per session basis". Once "1" means the first item, "2" means the second. Then "77" means the first item, "812" means the second, ... could be some simple... | This is the study area of [Human Computation](http://en.wikipedia.org/wiki/Human_computation).
there is an excellent video from Luis von Ahn here:
<http://video.google.com/videoplay?docid=-8246463980976635143> |
42,076 | **What mechanisms do you know that prevent your site from being abused by anonymous spammers.**
For example, let's say that I have a site where people can vote something. But I *don't* want someone to spam something all the way to the top. So I found (a) creating an account and only allowed to vote once and (b) CAPTCH... | 2008/09/03 | [
"https://Stackoverflow.com/questions/42076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] | * Limit the number of votes per IP address per time
* Block anonymizing proxies.
* For voting: How about shuffling the value that has to be returned by the form on a "per session basis". Once "1" means the first item, "2" means the second. Then "77" means the first item, "812" means the second, ... could be some simple... | There's a few ideas in the answers to the [Best non-image based CAPTCHA?](https://stackoverflow.com/questions/8472/best-non-image-based-captcha) question if you haven't seen it already. |
42,076 | **What mechanisms do you know that prevent your site from being abused by anonymous spammers.**
For example, let's say that I have a site where people can vote something. But I *don't* want someone to spam something all the way to the top. So I found (a) creating an account and only allowed to vote once and (b) CAPTCH... | 2008/09/03 | [
"https://Stackoverflow.com/questions/42076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] | 
From [xkcd](http://xkcd.com/233/) | I'm a fan of the "hidden field" CAPTCHA. I don't remember where I read about it, but the idea is this:
* create your form as normal
* add an extra field but hide it (i.e. `style="display:none"` on the surrounding div or table row)
* after submission, if the field is blank, do the appropriate action (eg send an email);... |
42,076 | **What mechanisms do you know that prevent your site from being abused by anonymous spammers.**
For example, let's say that I have a site where people can vote something. But I *don't* want someone to spam something all the way to the top. So I found (a) creating an account and only allowed to vote once and (b) CAPTCH... | 2008/09/03 | [
"https://Stackoverflow.com/questions/42076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] | 
From [xkcd](http://xkcd.com/233/) | stackoverflow has a few features that help with this; I think the single most useful step you can take is disabling the ability of anonymous users and new accounts to vote. This way, no one can sign up for hundreds of accounts and use their one vote to overpower other users. I'd say requiring a few posts or membership ... |
42,076 | **What mechanisms do you know that prevent your site from being abused by anonymous spammers.**
For example, let's say that I have a site where people can vote something. But I *don't* want someone to spam something all the way to the top. So I found (a) creating an account and only allowed to vote once and (b) CAPTCH... | 2008/09/03 | [
"https://Stackoverflow.com/questions/42076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] | For a CAPTCHA system, I heartily recommend [reCAPTCHA](http://recaptcha.net/learnmore.html).
Traditional computer-generated CAPTCHAs will [eventually be broken](http://www.codinghorror.com/blog/archives/001001.html) by developing a sufficiently intelligent system. For instance, [here's someone](http://www.lafdc.com/ca... | I'm a fan of the "hidden field" CAPTCHA. I don't remember where I read about it, but the idea is this:
* create your form as normal
* add an extra field but hide it (i.e. `style="display:none"` on the surrounding div or table row)
* after submission, if the field is blank, do the appropriate action (eg send an email);... |
42,076 | **What mechanisms do you know that prevent your site from being abused by anonymous spammers.**
For example, let's say that I have a site where people can vote something. But I *don't* want someone to spam something all the way to the top. So I found (a) creating an account and only allowed to vote once and (b) CAPTCH... | 2008/09/03 | [
"https://Stackoverflow.com/questions/42076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] | I'm a fan of the "hidden field" CAPTCHA. I don't remember where I read about it, but the idea is this:
* create your form as normal
* add an extra field but hide it (i.e. `style="display:none"` on the surrounding div or table row)
* after submission, if the field is blank, do the appropriate action (eg send an email);... | stackoverflow has a few features that help with this; I think the single most useful step you can take is disabling the ability of anonymous users and new accounts to vote. This way, no one can sign up for hundreds of accounts and use their one vote to overpower other users. I'd say requiring a few posts or membership ... |
42,076 | **What mechanisms do you know that prevent your site from being abused by anonymous spammers.**
For example, let's say that I have a site where people can vote something. But I *don't* want someone to spam something all the way to the top. So I found (a) creating an account and only allowed to vote once and (b) CAPTCH... | 2008/09/03 | [
"https://Stackoverflow.com/questions/42076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] | The big thing I've noticed is that whatever you do, you want your system to be unique. You want an attacker to have to tailor their automation program for your specific site, rather than just throw a pre-existing script at it that will work almost anywhere. It doesn't even have to be cryptographically secure; it just h... | I normally use a combination of the two: anonmous user is free to browse everything, but if he wants to vote, then he has to register.
In the registration process, depending on the situation, I use an optin thru mail (to complete registration and confirm that at least the mailbox exists) and/or a CAPTCHA.
From that p... |
42,076 | **What mechanisms do you know that prevent your site from being abused by anonymous spammers.**
For example, let's say that I have a site where people can vote something. But I *don't* want someone to spam something all the way to the top. So I found (a) creating an account and only allowed to vote once and (b) CAPTCH... | 2008/09/03 | [
"https://Stackoverflow.com/questions/42076",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2644/"
] | 
From [xkcd](http://xkcd.com/233/) | Charge for votes, like they do on some television "talent" shows, and get spammed all the way to the bank!
Seriously, this is a really tough problem, and someday (maybe soon, if you listen to Ray Kurzweil), computers will do testing to screen out humans. The answers I'm adding to the list have obvious drawbacks, but j... |
11,881,032 | I give that values to Highcharts pie chart:
```
series:[
{
type:'pie',
name:'Ratio',
data:[
['A', 42.6],
{
name:'B',
y:14.2,
sliced:true,
selected:true
... | 2012/08/09 | [
"https://Stackoverflow.com/questions/11881032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/453596/"
] | We do have tooltip formatter options to display the value as number instead of percentage
<http://api.highcharts.com/highstock#tooltip.formatter>
```
tooltip: {
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ this.point.y ;
}
},
```
this.point.y will do the trick (now you have this.perc... | `plotOptions.pie.dataLabels.formatter` is a function that will let you format the label. In this case I returned `this.percentage.toFixed(2)` which will trim your number at 2 decimal places. Demo at [this jsFiddle](http://jsfiddle.net/HEyCX/22/)
```
plotOptions: {
pie: {
dataLabels: {
formatter... |
11,881,032 | I give that values to Highcharts pie chart:
```
series:[
{
type:'pie',
name:'Ratio',
data:[
['A', 42.6],
{
name:'B',
y:14.2,
sliced:true,
selected:true
... | 2012/08/09 | [
"https://Stackoverflow.com/questions/11881032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/453596/"
] | `plotOptions.pie.dataLabels.formatter` is a function that will let you format the label. In this case I returned `this.percentage.toFixed(2)` which will trim your number at 2 decimal places. Demo at [this jsFiddle](http://jsfiddle.net/HEyCX/22/)
```
plotOptions: {
pie: {
dataLabels: {
formatter... | ```
tooltip: {
pointFormat: "Value: {point.y:.2f}"
}
```
this is not for formating the values .
```
var data = [{
name: 'Population',
data: [],
dataLabels: {
enabled: true,
rotation: -90,
color: '#FFFFFF',
align: 'right',
x: 4,
y: 10,
... |
11,881,032 | I give that values to Highcharts pie chart:
```
series:[
{
type:'pie',
name:'Ratio',
data:[
['A', 42.6],
{
name:'B',
y:14.2,
sliced:true,
selected:true
... | 2012/08/09 | [
"https://Stackoverflow.com/questions/11881032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/453596/"
] | `plotOptions.pie.dataLabels.formatter` is a function that will let you format the label. In this case I returned `this.percentage.toFixed(2)` which will trim your number at 2 decimal places. Demo at [this jsFiddle](http://jsfiddle.net/HEyCX/22/)
```
plotOptions: {
pie: {
dataLabels: {
formatter... | ```
tooltip: {
pointFormat: "Percentage: {point.percentage:.2f}"
}
```
This will give you the percentage value |
11,881,032 | I give that values to Highcharts pie chart:
```
series:[
{
type:'pie',
name:'Ratio',
data:[
['A', 42.6],
{
name:'B',
y:14.2,
sliced:true,
selected:true
... | 2012/08/09 | [
"https://Stackoverflow.com/questions/11881032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/453596/"
] | We do have tooltip formatter options to display the value as number instead of percentage
<http://api.highcharts.com/highstock#tooltip.formatter>
```
tooltip: {
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ this.point.y ;
}
},
```
this.point.y will do the trick (now you have this.perc... | You can just format it like this below.
```
tooltip: {
pointFormat: "Value: {point.y:.2f}"
}
```
[documentation about Highcharts formatting](http://docs.highcharts.com/#formatting) |
11,881,032 | I give that values to Highcharts pie chart:
```
series:[
{
type:'pie',
name:'Ratio',
data:[
['A', 42.6],
{
name:'B',
y:14.2,
sliced:true,
selected:true
... | 2012/08/09 | [
"https://Stackoverflow.com/questions/11881032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/453596/"
] | We do have tooltip formatter options to display the value as number instead of percentage
<http://api.highcharts.com/highstock#tooltip.formatter>
```
tooltip: {
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ this.point.y ;
}
},
```
this.point.y will do the trick (now you have this.perc... | ```
tooltip: {
pointFormat: "Value: {point.y:.2f}"
}
```
this is not for formating the values .
```
var data = [{
name: 'Population',
data: [],
dataLabels: {
enabled: true,
rotation: -90,
color: '#FFFFFF',
align: 'right',
x: 4,
y: 10,
... |
11,881,032 | I give that values to Highcharts pie chart:
```
series:[
{
type:'pie',
name:'Ratio',
data:[
['A', 42.6],
{
name:'B',
y:14.2,
sliced:true,
selected:true
... | 2012/08/09 | [
"https://Stackoverflow.com/questions/11881032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/453596/"
] | We do have tooltip formatter options to display the value as number instead of percentage
<http://api.highcharts.com/highstock#tooltip.formatter>
```
tooltip: {
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ this.point.y ;
}
},
```
this.point.y will do the trick (now you have this.perc... | ```
tooltip: {
pointFormat: "Percentage: {point.percentage:.2f}"
}
```
This will give you the percentage value |
11,881,032 | I give that values to Highcharts pie chart:
```
series:[
{
type:'pie',
name:'Ratio',
data:[
['A', 42.6],
{
name:'B',
y:14.2,
sliced:true,
selected:true
... | 2012/08/09 | [
"https://Stackoverflow.com/questions/11881032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/453596/"
] | You can just format it like this below.
```
tooltip: {
pointFormat: "Value: {point.y:.2f}"
}
```
[documentation about Highcharts formatting](http://docs.highcharts.com/#formatting) | ```
tooltip: {
pointFormat: "Value: {point.y:.2f}"
}
```
this is not for formating the values .
```
var data = [{
name: 'Population',
data: [],
dataLabels: {
enabled: true,
rotation: -90,
color: '#FFFFFF',
align: 'right',
x: 4,
y: 10,
... |
11,881,032 | I give that values to Highcharts pie chart:
```
series:[
{
type:'pie',
name:'Ratio',
data:[
['A', 42.6],
{
name:'B',
y:14.2,
sliced:true,
selected:true
... | 2012/08/09 | [
"https://Stackoverflow.com/questions/11881032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/453596/"
] | You can just format it like this below.
```
tooltip: {
pointFormat: "Value: {point.y:.2f}"
}
```
[documentation about Highcharts formatting](http://docs.highcharts.com/#formatting) | ```
tooltip: {
pointFormat: "Percentage: {point.percentage:.2f}"
}
```
This will give you the percentage value |
11,881,032 | I give that values to Highcharts pie chart:
```
series:[
{
type:'pie',
name:'Ratio',
data:[
['A', 42.6],
{
name:'B',
y:14.2,
sliced:true,
selected:true
... | 2012/08/09 | [
"https://Stackoverflow.com/questions/11881032",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/453596/"
] | ```
tooltip: {
pointFormat: "Value: {point.y:.2f}"
}
```
this is not for formating the values .
```
var data = [{
name: 'Population',
data: [],
dataLabels: {
enabled: true,
rotation: -90,
color: '#FFFFFF',
align: 'right',
x: 4,
y: 10,
... | ```
tooltip: {
pointFormat: "Percentage: {point.percentage:.2f}"
}
```
This will give you the percentage value |
16,536,071 | I was working on these functions (see [this](https://stackoverflow.com/questions/16525224/how-to-breakup-a-list-of-list-in-a-given-way-in-python)):
```
def removeFromList(elementsToRemove):
def closure(list):
for element in elementsToRemove:
if list[0] != element:
return
... | 2013/05/14 | [
"https://Stackoverflow.com/questions/16536071",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2338725/"
] | Use `copy.deepcopy`:
```
from copy import deepcopy
new_list = deepcopy([[1], [1, 2], [1, 2, 3]])
```
Demo:
```
>>> lis = [[1], [1, 2], [1, 2, 3]]
>>> new_lis = lis[:] # creates a shallow copy
>>> [id(x)==id(y) for x,y in zip(lis,new_lis)]
[True, True, True] #inner lists are st... | both with `list(my_list)` and `my_list[:]` you get a shallow copy of the list.
```
id(copy_my_list[0]) == id(my_list[0])
# True
```
so use `copy.deepcopy` to avoid your problem:
```
copy_my_list = copy.deepcopy(my_list)
id(copy_my_list[0]) == id(my_list[0])
# False
``` |
16,536,071 | I was working on these functions (see [this](https://stackoverflow.com/questions/16525224/how-to-breakup-a-list-of-list-in-a-given-way-in-python)):
```
def removeFromList(elementsToRemove):
def closure(list):
for element in elementsToRemove:
if list[0] != element:
return
... | 2013/05/14 | [
"https://Stackoverflow.com/questions/16536071",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2338725/"
] | Use `copy.deepcopy`:
```
from copy import deepcopy
new_list = deepcopy([[1], [1, 2], [1, 2, 3]])
```
Demo:
```
>>> lis = [[1], [1, 2], [1, 2, 3]]
>>> new_lis = lis[:] # creates a shallow copy
>>> [id(x)==id(y) for x,y in zip(lis,new_lis)]
[True, True, True] #inner lists are st... | Use a tuple. `my_list = ([1], [1, 2], [1, 2, 3])`
`my_list` is now immutable, and anytime you want a mutable copy you can just use `list(my_list)`
```
>>> my_list = ([1], [1, 2], [1, 2, 3])
>>> def mutate(aList):
aList.pop()
return aList
>>> mutate(list(my_list))
[[1], [1, 2]]
>>> my_list
([1], [1, ... |
16,536,071 | I was working on these functions (see [this](https://stackoverflow.com/questions/16525224/how-to-breakup-a-list-of-list-in-a-given-way-in-python)):
```
def removeFromList(elementsToRemove):
def closure(list):
for element in elementsToRemove:
if list[0] != element:
return
... | 2013/05/14 | [
"https://Stackoverflow.com/questions/16536071",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2338725/"
] | both with `list(my_list)` and `my_list[:]` you get a shallow copy of the list.
```
id(copy_my_list[0]) == id(my_list[0])
# True
```
so use `copy.deepcopy` to avoid your problem:
```
copy_my_list = copy.deepcopy(my_list)
id(copy_my_list[0]) == id(my_list[0])
# False
``` | Use a tuple. `my_list = ([1], [1, 2], [1, 2, 3])`
`my_list` is now immutable, and anytime you want a mutable copy you can just use `list(my_list)`
```
>>> my_list = ([1], [1, 2], [1, 2, 3])
>>> def mutate(aList):
aList.pop()
return aList
>>> mutate(list(my_list))
[[1], [1, 2]]
>>> my_list
([1], [1, ... |
99,411 | Maybe someone has experience in this field.
I'd like to overmold a PCBA, which has SMT components, with a low pressure molding process.
I am concerned about the temperature of the hotmelt material when it reaches the PCBA. The temperature should be between 200°C and 215°C.
Does anyone know if this material temperatur... | 2014/02/11 | [
"https://electronics.stackexchange.com/questions/99411",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/37013/"
] | Make the two input resistors significantly bigger (say 10xR) - the gain will now be lower but you can added an extra amplifier onto Vout to restore the gain you need. Be aware of common mode problems with this type of circuit - you'll probably need to use 0.1% (or better) resistors to get an accurate representation of ... | unlike Andy's answear i wouldn't use input resistors on your input. they add [noise](http://en.wikipedia.org/wiki/Johnson%E2%80%93Nyquist_noise) to your signal. of course its depending on your application.
what i would use is something like an [AD8479](http://www.analog.com/static/imported-files/data_sheets/AD8479.PDF... |
99,411 | Maybe someone has experience in this field.
I'd like to overmold a PCBA, which has SMT components, with a low pressure molding process.
I am concerned about the temperature of the hotmelt material when it reaches the PCBA. The temperature should be between 200°C and 215°C.
Does anyone know if this material temperatur... | 2014/02/11 | [
"https://electronics.stackexchange.com/questions/99411",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/37013/"
] | Make the two input resistors significantly bigger (say 10xR) - the gain will now be lower but you can added an extra amplifier onto Vout to restore the gain you need. Be aware of common mode problems with this type of circuit - you'll probably need to use 0.1% (or better) resistors to get an accurate representation of ... | The voltages at the input terminals must be within the common mode input range of the op-amp, and the output must of course not exceed maximum output range. Unfortunately, all the 741 data sheets I can find don't actually have the common mode input range specced. I'd avoid that op-amp anyway, and move to a rail to rail... |
99,411 | Maybe someone has experience in this field.
I'd like to overmold a PCBA, which has SMT components, with a low pressure molding process.
I am concerned about the temperature of the hotmelt material when it reaches the PCBA. The temperature should be between 200°C and 215°C.
Does anyone know if this material temperatur... | 2014/02/11 | [
"https://electronics.stackexchange.com/questions/99411",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/37013/"
] | unlike Andy's answear i wouldn't use input resistors on your input. they add [noise](http://en.wikipedia.org/wiki/Johnson%E2%80%93Nyquist_noise) to your signal. of course its depending on your application.
what i would use is something like an [AD8479](http://www.analog.com/static/imported-files/data_sheets/AD8479.PDF... | The voltages at the input terminals must be within the common mode input range of the op-amp, and the output must of course not exceed maximum output range. Unfortunately, all the 741 data sheets I can find don't actually have the common mode input range specced. I'd avoid that op-amp anyway, and move to a rail to rail... |
73,120,720 | I have a Dataframe and I want to get the previous data as an example, how can I do this?
If the previous row of A is B, get the value of B
Dataframe
```
df = pd.DataFrame({'Status':['A','A','A','A','A','B','A','A','A','A']})
print(df)
Status
0 A
1 A
2 A
3 A
4 A
5 B <----- get the value... | 2022/07/26 | [
"https://Stackoverflow.com/questions/73120720",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19623688/"
] | I'm sorry, but it was just my stupid mistake and inattention. I created a **variables.env** file at a level higher than the directory with the **docker-compose.yml** file.
2 hours wasted...
Answer: The **variables.env** and **docker-compose.yml** files must be in the same directory. | Try this should work.. also try with \ slash `.\variables.env`
```
version: '3.1'
services:
geo:
build:
context: .
image:geo_image
container_name: geo
ports:
- "3003:3003"
volumes:
- ${path}:/var/geo/data
- /app/node_modules
- ${path}:/app
env_file:
- ./varia... |
35,147,872 | here is my code:
```css
td{
white-space: nowrap;
}
table{
text-align: center;
}
input[type="checkbox"]{
-ms-transform: scale(2); /* IE */
-moz-transform: scale(2); /* FF */
-webkit-transform: scale(3); /* Safari and Chrome */
-o-transform: scale(2); /*... | 2016/02/02 | [
"https://Stackoverflow.com/questions/35147872",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5375118/"
] | Use this code
```
Sub shalu()
s = sss(",", "Repace_Comma")
s = sss(".", "Replace_dot")
s = sss("-", "replace_hyphen")
End Sub
Public Function sss(A As String, B As String) As String
Dim myword As Range
For Each myword In ActiveDocument.StoryRanges
With myword.Find
.Text = A
.Replacement.Text = B
... | this is what I use, when I want to replace something in Excel. You may change it a bit, so it works in Word as well.
```
Public Sub remove_space_in_string()
Dim r_range As Range
For Each r_range In Selection
r_range = Trim(r_range)
r_range = Replace(r_range, vbTab, "")
r_range = Replace(r_range, " ", "")... |
35,147,872 | here is my code:
```css
td{
white-space: nowrap;
}
table{
text-align: center;
}
input[type="checkbox"]{
-ms-transform: scale(2); /* IE */
-moz-transform: scale(2); /* FF */
-webkit-transform: scale(3); /* Safari and Chrome */
-o-transform: scale(2); /*... | 2016/02/02 | [
"https://Stackoverflow.com/questions/35147872",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5375118/"
] | Use this code
```
Sub shalu()
s = sss(",", "Repace_Comma")
s = sss(".", "Replace_dot")
s = sss("-", "replace_hyphen")
End Sub
Public Function sss(A As String, B As String) As String
Dim myword As Range
For Each myword In ActiveDocument.StoryRanges
With myword.Find
.Text = A
.Replacement.Text = B
... | What i suggest is store all the special characters and replacemnt values in array and iterate throgh all the ranges like how you do.
```
Dim comma As Range
For i=0 to Ubound(arraySpCahr)-1
For Each comma In ActiveDocument.StoryRanges
With comma.Find
.Text = arraySpCahr(i) ' arraySpCahr(0)="," (1)="-"...etc
.Replac... |
22,870,217 | ```
#include<stdio.h>
main()
{
printf("%c\n",1-3+2["nexus"]);
}
```
The result is **v**. How does it turn out?
What does the indentation (square ones) do? | 2014/04/04 | [
"https://Stackoverflow.com/questions/22870217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3315476/"
] | There's also one other good [source](https://androidlearnersite.wordpress.com/2017/02/27/fragment-lifecycle-during-fragment-transaction/) that you can read through.
I think, the important point is the difference of the transaction you performed on Fragment B. If it's **add**, then no lifecycle methods are called on *... | You can find a nice `Fragment` lifecycle diagram in the android docs [here](http://developer.android.com/guide/components/fragments.html). So yes, if the fragment is brought to the foreground from the backstack `onCreateView()`, `onActivityCreated()`, `onStart()` and `onResume()` are called. |
22,870,217 | ```
#include<stdio.h>
main()
{
printf("%c\n",1-3+2["nexus"]);
}
```
The result is **v**. How does it turn out?
What does the indentation (square ones) do? | 2014/04/04 | [
"https://Stackoverflow.com/questions/22870217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3315476/"
] | I know this is a bit late for an answer but for anyone who navigates here this might help!
First thing is first: popBackStack()doesn't pop a fragment, it pops a fragment transaction. So the last fragment transaction is reversed upon being called. If you were displaying FragmentA currently and your transaction was:
``... | My workaround is to get the current title of the actionbar in the Fragment before setting it to the new title. This way, once the Fragment is popped, I can change back to that title.
```
@Override
public void onResume() {
super.onResume();
// Get/Backup current title
mTitle = ((ActionBarActivity) getActivi... |
22,870,217 | ```
#include<stdio.h>
main()
{
printf("%c\n",1-3+2["nexus"]);
}
```
The result is **v**. How does it turn out?
What does the indentation (square ones) do? | 2014/04/04 | [
"https://Stackoverflow.com/questions/22870217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3315476/"
] | I know this is a bit late for an answer but for anyone who navigates here this might help!
First thing is first: popBackStack()doesn't pop a fragment, it pops a fragment transaction. So the last fragment transaction is reversed upon being called. If you were displaying FragmentA currently and your transaction was:
``... | You can find a nice `Fragment` lifecycle diagram in the android docs [here](http://developer.android.com/guide/components/fragments.html). So yes, if the fragment is brought to the foreground from the backstack `onCreateView()`, `onActivityCreated()`, `onStart()` and `onResume()` are called. |
22,870,217 | ```
#include<stdio.h>
main()
{
printf("%c\n",1-3+2["nexus"]);
}
```
The result is **v**. How does it turn out?
What does the indentation (square ones) do? | 2014/04/04 | [
"https://Stackoverflow.com/questions/22870217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3315476/"
] | I know this is a bit late for an answer but for anyone who navigates here this might help!
First thing is first: popBackStack()doesn't pop a fragment, it pops a fragment transaction. So the last fragment transaction is reversed upon being called. If you were displaying FragmentA currently and your transaction was:
``... | There's also one other good [source](https://androidlearnersite.wordpress.com/2017/02/27/fragment-lifecycle-during-fragment-transaction/) that you can read through.
I think, the important point is the difference of the transaction you performed on Fragment B. If it's **add**, then no lifecycle methods are called on *... |
22,870,217 | ```
#include<stdio.h>
main()
{
printf("%c\n",1-3+2["nexus"]);
}
```
The result is **v**. How does it turn out?
What does the indentation (square ones) do? | 2014/04/04 | [
"https://Stackoverflow.com/questions/22870217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3315476/"
] | use addOnBackStackChangedListener method in your BaseActivity, which will be called any time backstack changes
```
getSupportFragmentManager().addOnBackStackChangedListener(
new FragmentManager.OnBackStackChangedListener() {
public void onBackStackChanged() {
FragmentMan... | You can find a nice `Fragment` lifecycle diagram in the android docs [here](http://developer.android.com/guide/components/fragments.html). So yes, if the fragment is brought to the foreground from the backstack `onCreateView()`, `onActivityCreated()`, `onStart()` and `onResume()` are called. |
22,870,217 | ```
#include<stdio.h>
main()
{
printf("%c\n",1-3+2["nexus"]);
}
```
The result is **v**. How does it turn out?
What does the indentation (square ones) do? | 2014/04/04 | [
"https://Stackoverflow.com/questions/22870217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3315476/"
] | I know this is a bit late for an answer but for anyone who navigates here this might help!
First thing is first: popBackStack()doesn't pop a fragment, it pops a fragment transaction. So the last fragment transaction is reversed upon being called. If you were displaying FragmentA currently and your transaction was:
``... | use addOnBackStackChangedListener method in your BaseActivity, which will be called any time backstack changes
```
getSupportFragmentManager().addOnBackStackChangedListener(
new FragmentManager.OnBackStackChangedListener() {
public void onBackStackChanged() {
FragmentMan... |
22,870,217 | ```
#include<stdio.h>
main()
{
printf("%c\n",1-3+2["nexus"]);
}
```
The result is **v**. How does it turn out?
What does the indentation (square ones) do? | 2014/04/04 | [
"https://Stackoverflow.com/questions/22870217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3315476/"
] | My workaround is to get the current title of the actionbar in the Fragment before setting it to the new title. This way, once the Fragment is popped, I can change back to that title.
```
@Override
public void onResume() {
super.onResume();
// Get/Backup current title
mTitle = ((ActionBarActivity) getActivi... | You can find a nice `Fragment` lifecycle diagram in the android docs [here](http://developer.android.com/guide/components/fragments.html). So yes, if the fragment is brought to the foreground from the backstack `onCreateView()`, `onActivityCreated()`, `onStart()` and `onResume()` are called. |
22,870,217 | ```
#include<stdio.h>
main()
{
printf("%c\n",1-3+2["nexus"]);
}
```
The result is **v**. How does it turn out?
What does the indentation (square ones) do? | 2014/04/04 | [
"https://Stackoverflow.com/questions/22870217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3315476/"
] | use addOnBackStackChangedListener method in your BaseActivity, which will be called any time backstack changes
```
getSupportFragmentManager().addOnBackStackChangedListener(
new FragmentManager.OnBackStackChangedListener() {
public void onBackStackChanged() {
FragmentMan... | My workaround is to get the current title of the actionbar in the Fragment before setting it to the new title. This way, once the Fragment is popped, I can change back to that title.
```
@Override
public void onResume() {
super.onResume();
// Get/Backup current title
mTitle = ((ActionBarActivity) getActivi... |
22,870,217 | ```
#include<stdio.h>
main()
{
printf("%c\n",1-3+2["nexus"]);
}
```
The result is **v**. How does it turn out?
What does the indentation (square ones) do? | 2014/04/04 | [
"https://Stackoverflow.com/questions/22870217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3315476/"
] | My workaround is to get the current title of the actionbar in the Fragment before setting it to the new title. This way, once the Fragment is popped, I can change back to that title.
```
@Override
public void onResume() {
super.onResume();
// Get/Backup current title
mTitle = ((ActionBarActivity) getActivi... | I use following workaround:
1) set 1st fragment `setHasOptionsMenu(false)` before add 2nd fragment on top of 1st one.
2) set 1st fragment `setHasOptionsMenu(true)` in `onOptionsItemSelected()` after return from 2nd fragment.
3) `onCreateOptionsMenu()` of 1st fragment should be called and you can change actionbar her... |
22,870,217 | ```
#include<stdio.h>
main()
{
printf("%c\n",1-3+2["nexus"]);
}
```
The result is **v**. How does it turn out?
What does the indentation (square ones) do? | 2014/04/04 | [
"https://Stackoverflow.com/questions/22870217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3315476/"
] | use addOnBackStackChangedListener method in your BaseActivity, which will be called any time backstack changes
```
getSupportFragmentManager().addOnBackStackChangedListener(
new FragmentManager.OnBackStackChangedListener() {
public void onBackStackChanged() {
FragmentMan... | There's also one other good [source](https://androidlearnersite.wordpress.com/2017/02/27/fragment-lifecycle-during-fragment-transaction/) that you can read through.
I think, the important point is the difference of the transaction you performed on Fragment B. If it's **add**, then no lifecycle methods are called on *... |
33,230 | My husband found 2 of the 1993 collectors edition boxes (still sealed, but small rips at the seems on the top). I was hoping you could tell me how much they are worth and where the best places to go to sell them. | 2016/12/03 | [
"https://boardgames.stackexchange.com/questions/33230",
"https://boardgames.stackexchange.com",
"https://boardgames.stackexchange.com/users/19073/"
] | [Here](http://www.abugames.com/item262815-new/0/86-magic/(MTG)---Collectors'-Edition-International-Set-Box.html), it's sold for $3,800.00. I'm guessing yours will fetch a few hundred less (they are retail and try to sell for profit after all).
Things to know. **Don't open them**. The value is on being sealed. They all... | That is likely worth quite a bit of cash.
The best place to see the prices of cards is TCGPlayer.com. Look at mid to low leverl. The best place to make the most money off of something like that once you have found a reasonable price is to post it on ebay honestly. If you want to accept much less but unload it quickly... |
71,586 | I own a domain, which I will call example.com.
In June, I received an email, purporting to be from the Play Station Network, addresses to first.last@example.com. (I receive all the email for the domain. "First" and "Last" are distinctive names which are not my name.)
It was an account registration confirmation. I was... | 2016/10/10 | [
"https://money.stackexchange.com/questions/71586",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/49295/"
] | You've already done what's necessary, by not confirming the subscription request.
The only thing you know has happened is that someone typed your user ID into a registration field, which could just have been a typing error.
Nothing else appears to be at risk. | >
> No money has been stolen from me, yet, so I have no reason to involve the police.
>
>
>
Attempting to commit a crime can be reported. This is no different from someone planning to rob a bank, but not done yet.
Agreed that given your scenario police may not act.
Best is block email on domain. You may be using ... |
71,586 | I own a domain, which I will call example.com.
In June, I received an email, purporting to be from the Play Station Network, addresses to first.last@example.com. (I receive all the email for the domain. "First" and "Last" are distinctive names which are not my name.)
It was an account registration confirmation. I was... | 2016/10/10 | [
"https://money.stackexchange.com/questions/71586",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/49295/"
] | You've already done what's necessary, by not confirming the subscription request.
The only thing you know has happened is that someone typed your user ID into a registration field, which could just have been a typing error.
Nothing else appears to be at risk. | It's hard to say if this is a scam or not because of the, um, free-wheeling way PayPal does things.
Someone recently opened a Paypal account using a secondary email address of mine (one that Comcast forced me to create, and which was in a recent breach). Paypal *does not confirm* they have access to the email, but let... |
71,586 | I own a domain, which I will call example.com.
In June, I received an email, purporting to be from the Play Station Network, addresses to first.last@example.com. (I receive all the email for the domain. "First" and "Last" are distinctive names which are not my name.)
It was an account registration confirmation. I was... | 2016/10/10 | [
"https://money.stackexchange.com/questions/71586",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/49295/"
] | You've already done what's necessary, by not confirming the subscription request.
The only thing you know has happened is that someone typed your user ID into a registration field, which could just have been a typing error.
Nothing else appears to be at risk. | The one question that hasn't been answered is how did they fake the email from your domain. That is very simple - they used what's called an open relay.
An open relay server (most email servers are configured not to do this) will allow emails to be sent from wherever without verification. Think of it as like sending ... |
71,586 | I own a domain, which I will call example.com.
In June, I received an email, purporting to be from the Play Station Network, addresses to first.last@example.com. (I receive all the email for the domain. "First" and "Last" are distinctive names which are not my name.)
It was an account registration confirmation. I was... | 2016/10/10 | [
"https://money.stackexchange.com/questions/71586",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/49295/"
] | You've been targeted by an attempt of phishing. Nowadays it's quite easy to fake an email from PayPal etc.
So they're trying to make you believe that you need to click on the links from PayPal and login to figure out what's going on. Don't ever do that. If you did, change all your passwords quickly. | >
> No money has been stolen from me, yet, so I have no reason to involve the police.
>
>
>
Attempting to commit a crime can be reported. This is no different from someone planning to rob a bank, but not done yet.
Agreed that given your scenario police may not act.
Best is block email on domain. You may be using ... |
71,586 | I own a domain, which I will call example.com.
In June, I received an email, purporting to be from the Play Station Network, addresses to first.last@example.com. (I receive all the email for the domain. "First" and "Last" are distinctive names which are not my name.)
It was an account registration confirmation. I was... | 2016/10/10 | [
"https://money.stackexchange.com/questions/71586",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/49295/"
] | You've been targeted by an attempt of phishing. Nowadays it's quite easy to fake an email from PayPal etc.
So they're trying to make you believe that you need to click on the links from PayPal and login to figure out what's going on. Don't ever do that. If you did, change all your passwords quickly. | It's hard to say if this is a scam or not because of the, um, free-wheeling way PayPal does things.
Someone recently opened a Paypal account using a secondary email address of mine (one that Comcast forced me to create, and which was in a recent breach). Paypal *does not confirm* they have access to the email, but let... |
71,586 | I own a domain, which I will call example.com.
In June, I received an email, purporting to be from the Play Station Network, addresses to first.last@example.com. (I receive all the email for the domain. "First" and "Last" are distinctive names which are not my name.)
It was an account registration confirmation. I was... | 2016/10/10 | [
"https://money.stackexchange.com/questions/71586",
"https://money.stackexchange.com",
"https://money.stackexchange.com/users/49295/"
] | You've been targeted by an attempt of phishing. Nowadays it's quite easy to fake an email from PayPal etc.
So they're trying to make you believe that you need to click on the links from PayPal and login to figure out what's going on. Don't ever do that. If you did, change all your passwords quickly. | The one question that hasn't been answered is how did they fake the email from your domain. That is very simple - they used what's called an open relay.
An open relay server (most email servers are configured not to do this) will allow emails to be sent from wherever without verification. Think of it as like sending ... |
2,964,728 | I have decided to assume that $a<0$ and let $\epsilon=-a>0$. Then I want to come to a contradiction.
$|a\_n-a|<-a$.
Since we have $a\_n>a$ from our assumption,
$a\_n-a<-a$
so $a\_n<0$ which is a contradiction. | 2018/10/21 | [
"https://math.stackexchange.com/questions/2964728",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/427952/"
] | If $a<0$ then since $a\_n\to a$, there is an integer $N$ such that whenever $n>N$, we must have $a\_n\in (a,0)$, i.e. $a\_n<0.$ And this is a contradiction.
In fact, the same reasoning shows that if $a\_n>0$ for all $n$, then $any$ limit point $a$ of $(a\_n)$ must satisfy $a\ge 0.$ | This proof has a flaw since there is no restriction that $a\_n>a$ (consider $a\_n=(-{1\over 2})^n+1$ and $a=1$) but it can be simply fixed. Just conclude from $|a\_n-a|<-a$ that $$a<a\_n-a<-a$$ or equivalently $$2a<a\_n<0$$ which is **now** a contradiction. Except that, your proof is fine. |
43,440,618 | I am trying to separate the digits of a number entered by the user. i get the digits in reversed order.For example, if input is 12345,I get 5 4 3 2 1 as output.
I had similar case while finding the binary of a number.
can you explain me why this problem occurring and easy solution to this problem.
```
#include<iostr... | 2017/04/16 | [
"https://Stackoverflow.com/questions/43440618",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7573927/"
] | You are not using correct logic to do the job.
When you use modulus operator then it gives the remainder and that will be last digit if modulus is performed with 10. And then you print that so it will always be the last digit and then you divide the number by 10, and the number is of integer type so it will remove the ... | That is because your algorithm works on the smaller "rear" end of your number.
Simple as that!
```
15 % 10 = 5
10 % 10 = 1
```
That is why it would print 5 1 and not 1 5.
So, if you want to print the number as 1 5, you simply have to push those values into an array for example, and then print the array in reve... |
43,440,618 | I am trying to separate the digits of a number entered by the user. i get the digits in reversed order.For example, if input is 12345,I get 5 4 3 2 1 as output.
I had similar case while finding the binary of a number.
can you explain me why this problem occurring and easy solution to this problem.
```
#include<iostr... | 2017/04/16 | [
"https://Stackoverflow.com/questions/43440618",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7573927/"
] | You are not using correct logic to do the job.
When you use modulus operator then it gives the remainder and that will be last digit if modulus is performed with 10. And then you print that so it will always be the last digit and then you divide the number by 10, and the number is of integer type so it will remove the ... | As @GhostCat said. Math does a job here. I would recommend you sketch your algorithm and this may show you what's 'wrong' here. ^^
Can you show us what final output do you expect?
If it's just same order I might be an array with every digit with own index in right order.
Also your code has shortcoming at while loop c... |
494,425 | Below solid black curve is the bandwidth of a signal(a 4kHz RC low pass filter). And when we sample the signal at 8kHz rate due to folding the blue dashed line shows the aliasing:
[](https://i.stack.imgur.com/8xvGb.png)
1-) It looks very symmetric bu... | 2020/04/20 | [
"https://electronics.stackexchange.com/questions/494425",
"https://electronics.stackexchange.com",
"https://electronics.stackexchange.com/users/161776/"
] | You add the energies in the signal and aliased curves.
Now if you assume the aliasing is completely de-correlated with the signal, you can treat them as two independent sources (like a "random walk" with 2 steps in statistics) you can use an RMS summation of the amplitudes.
Since the crossover at 4 kHz has both ampli... | >
> It looks very symmetric but how can we calculate the overall shape of the original bandwidth plus the aliasing? Should we add or multiply these curves?
>
>
>
Neither!
This is just an amplitude spectrum plot. There's nothing said about the phase of the signals at the individual frequencies.
For example, if t... |
29,314,021 | My main view consists of a scrollview, with several textfields as part of a form.
I then have a textView (actually a HPGrowingTextView) which resizes the textview vertically as text/lines are added.
Beneath this textview is a mkmapview.
Autolayout works fine for the initial layout, however when the textview resizes its... | 2015/03/28 | [
"https://Stackoverflow.com/questions/29314021",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/188150/"
] | I'd suggest the Include Browser view. You can drag a file in there and you get a nice tree which shows all files that include your file, including indirect includes. | In Eclipse, under the search menu, the entry `File...` exists.
Searching there for `#include*"file1.h"` should do the trick.
Optimization suggestions:
`Preferences->General->Keys`, search for `file search` then add the binding `Ctrl+H` for it. This is by default mapped to `C/C++ Search`, so you will have to remove the... |
37,930,407 | I made div, if i click on it, jquery makes bullet and that element is animated. This is code:
```
$('.square').click(function() {
$('<div class="bullet"></div>').appendTo($('body')).animate({
'margin-top': 554
}, 2000, function() {
$(this).remove();
});
});
```
It works properly when I'm not clicking second... | 2016/06/20 | [
"https://Stackoverflow.com/questions/37930407",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5678972/"
] | First of all, it's important that `Array` doesn't extend `Iterable` (because it's a Java type). Instead there is an implicit conversion from `Array[A]` to `Iterable[A]`, so expected types matter.
In the first case: `Iterable(Array(123))` is an argument to `f3` and thus is typechecked with expected type `Iterable[Itera... | This has to do with the way type inference/unification works in Scala.
When you define a variable and leave out the type, Scala applies the most specific type possible:
```
scala> val v1 = Iterable(Array(123))
v1: Iterable[Array[Int]] = List(Array(123))
```
However, when you specify the expected type (eg by passing... |
22,738,038 | For the variable snake1, is there a set method so that I can later get the x and y coordinates.
Something like snake1.getX() or something? Can't seem to find anything
```
var canvas = document.getElementById("canvas");
var context = canvas.getContext("2d");
var snake1 = context.fillRect(x,y, snakeHeight, snakeWidth)... | 2014/03/29 | [
"https://Stackoverflow.com/questions/22738038",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2581586/"
] | Are you sure action bar uses a relative layout? If not, then you can't treat it as a relative layout layout params and can ONLY use the base layoutParams functions | I hate to answer my own questions - but I just thought of something to try (that worked) after I hit Submit.
Instead of importing:
```
import android.app.ActionBar.LayoutParams;
```
I needed to import:
```
import android.widget.RelativeLayout.LayoutParams;
```
I am still able to import extend ActionBarActivity... |
609,767 | I have a simple script which outputs a bunch of logs to screen and I piped the STDOUT to a file to store the logs. Since this script is long running, I needed to rotate the log files so they are chucked into smaller more manageable ones.
The problem I faced was that once the `logrotate` moves the current log file into... | 2014/07/03 | [
"https://serverfault.com/questions/609767",
"https://serverfault.com",
"https://serverfault.com/users/184733/"
] | You should use the copytruncate directive in your logrotate config for this log file.
>
> copytruncate
> Truncate the original log file in place after creating a copy, instead of moving the old log file and optionally creating a new one. It can be used when some program cannot be told to close its logfile and thus m... | As an alternative, you may also:
* use the logger utility in your script instead of piping, with a dedicated facility (e.g. local5), for example:
`logger -p local5.info -t myscriptname "this is some log data"`
* configure syslog to write this facility to wanted log file, example (rsyslog.conf) :
`local5.* /var/log... |
609,767 | I have a simple script which outputs a bunch of logs to screen and I piped the STDOUT to a file to store the logs. Since this script is long running, I needed to rotate the log files so they are chucked into smaller more manageable ones.
The problem I faced was that once the `logrotate` moves the current log file into... | 2014/07/03 | [
"https://serverfault.com/questions/609767",
"https://serverfault.com",
"https://serverfault.com/users/184733/"
] | You should use the copytruncate directive in your logrotate config for this log file.
>
> copytruncate
> Truncate the original log file in place after creating a copy, instead of moving the old log file and optionally creating a new one. It can be used when some program cannot be told to close its logfile and thus m... | Another alternative to Iain solution is to use a `postrotate` script to relaunch your script once the rotation has taken place. This is done for lots of daemons (restart or reload the daemon), but not knowing your script I don't know if this solution will suit you or not (does your script depend on some state generated... |
609,767 | I have a simple script which outputs a bunch of logs to screen and I piped the STDOUT to a file to store the logs. Since this script is long running, I needed to rotate the log files so they are chucked into smaller more manageable ones.
The problem I faced was that once the `logrotate` moves the current log file into... | 2014/07/03 | [
"https://serverfault.com/questions/609767",
"https://serverfault.com",
"https://serverfault.com/users/184733/"
] | You should use the copytruncate directive in your logrotate config for this log file.
>
> copytruncate
> Truncate the original log file in place after creating a copy, instead of moving the old log file and optionally creating a new one. It can be used when some program cannot be told to close its logfile and thus m... | You can pipe stdout to "split" (part of coreutils in linux). It allows you to split file/stdin into chunks based on size, number of lines, etc. Once you get it chunked you can manage it with logrotate if needed. |
609,767 | I have a simple script which outputs a bunch of logs to screen and I piped the STDOUT to a file to store the logs. Since this script is long running, I needed to rotate the log files so they are chucked into smaller more manageable ones.
The problem I faced was that once the `logrotate` moves the current log file into... | 2014/07/03 | [
"https://serverfault.com/questions/609767",
"https://serverfault.com",
"https://serverfault.com/users/184733/"
] | As an alternative, you may also:
* use the logger utility in your script instead of piping, with a dedicated facility (e.g. local5), for example:
`logger -p local5.info -t myscriptname "this is some log data"`
* configure syslog to write this facility to wanted log file, example (rsyslog.conf) :
`local5.* /var/log... | Another alternative to Iain solution is to use a `postrotate` script to relaunch your script once the rotation has taken place. This is done for lots of daemons (restart or reload the daemon), but not knowing your script I don't know if this solution will suit you or not (does your script depend on some state generated... |
609,767 | I have a simple script which outputs a bunch of logs to screen and I piped the STDOUT to a file to store the logs. Since this script is long running, I needed to rotate the log files so they are chucked into smaller more manageable ones.
The problem I faced was that once the `logrotate` moves the current log file into... | 2014/07/03 | [
"https://serverfault.com/questions/609767",
"https://serverfault.com",
"https://serverfault.com/users/184733/"
] | As an alternative, you may also:
* use the logger utility in your script instead of piping, with a dedicated facility (e.g. local5), for example:
`logger -p local5.info -t myscriptname "this is some log data"`
* configure syslog to write this facility to wanted log file, example (rsyslog.conf) :
`local5.* /var/log... | You can pipe stdout to "split" (part of coreutils in linux). It allows you to split file/stdin into chunks based on size, number of lines, etc. Once you get it chunked you can manage it with logrotate if needed. |
609,767 | I have a simple script which outputs a bunch of logs to screen and I piped the STDOUT to a file to store the logs. Since this script is long running, I needed to rotate the log files so they are chucked into smaller more manageable ones.
The problem I faced was that once the `logrotate` moves the current log file into... | 2014/07/03 | [
"https://serverfault.com/questions/609767",
"https://serverfault.com",
"https://serverfault.com/users/184733/"
] | Another alternative to Iain solution is to use a `postrotate` script to relaunch your script once the rotation has taken place. This is done for lots of daemons (restart or reload the daemon), but not knowing your script I don't know if this solution will suit you or not (does your script depend on some state generated... | You can pipe stdout to "split" (part of coreutils in linux). It allows you to split file/stdin into chunks based on size, number of lines, etc. Once you get it chunked you can manage it with logrotate if needed. |
11,484,339 | Im displaying two Alert Views one after another in succession with the following:
-IBAction
```
UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Alert" message:@"my message" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert setDelegate:self];
[alert show];
}
- (void)didPresentAlertV... | 2012/07/14 | [
"https://Stackoverflow.com/questions/11484339",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1238867/"
] | I would suggest using `dispatch_after`, which can be inlined:
```
double delayInSeconds = 2.0;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
// code to be executed on the main queue after delay
});
``` | Try this simple method:
```
- (void)alertView
{
UIAlertView * alertView = [[UIAlertView alloc] initWithTitle:@"Get Ready!" message:nil delegate:nil cancelButtonTitle:nil otherButtonTitles:nil];
[alertView show];
[self performSelector:@selector(dismissStartAlert:) withObject:alertView afterDelay:5];
}
... |
1,838,911 | If controller A's action redirects to another controller B's action, can I check in A's functional test that B's action template is being rendered?
in controller As functional test
i.e. assert\_template 'controllerB/some\_view'
I know that this should be done in controllers Bs tests but I'm wondering if it is technic... | 2009/12/03 | [
"https://Stackoverflow.com/questions/1838911",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/189090/"
] | Rails functional tests do not follow redirects from one controller to another. To test this you need to use an integration test. The [Rails Guide for testing](http://guides.rubyonrails.org/testing.html) can help you get started with integration tests | ```
test "current/index should render others/action template" do
get :index
assert_response :success
assert_template "others/index"
end
``` |
9,542,474 | I'm trying to adding TableRows to a TableLayout, which is working fantastically. However, I'm running into some problems with layout parameters. The spacing between the TextViews within a TableRow isn't working out like I thought it would.
My current code looks as follows.
```
paymentTable = (TableLayout) findViewByI... | 2012/03/03 | [
"https://Stackoverflow.com/questions/9542474",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1212908/"
] | Typically a GPS device shows up as a virtual com port. You should see it listed in com ports in the device manager. Nearly every GPS sends data to the computer using standard [NMEA 0183](http://en.wikipedia.org/wiki/NMEA_0183) messages, you just need a library to read them. One really nice full featured one is [DotSpat... | You may have to and your equipment supplier contact, and obtain recognition equipment driver, and call the API for communication equipment. If you can get from a GPS device on bytes, closer to success is just around the corner, and the rest is packaging and analytical data packets. PS: if is serial communication, reali... |
2,103,993 | $y={\dfrac{[3x+1]}{[4x-1]^\frac{1}{2}}}$
Is it logical to square both the numerator and denominator to cancel out the power to $\frac12$ in the denominator?
Edit: This expression is being used for a chain rule application. | 2017/01/19 | [
"https://math.stackexchange.com/questions/2103993",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/407878/"
] | This can be done, but unless someone has a bright idea, the algebra is pretty revolting. Start with
$$\eqalign{
x^2+y^2=r^2&\qquad\qquad(1)\cr
(x-1)^2+y^2=(r+b)^2&\qquad\qquad(2)\cr
(x-\tfrac12)^2+(y-\tfrac{\sqrt3}2)^2=(r+a)^2&\qquad\qquad(3)\cr}$$
If you now take $(a-b)$ times $(1)$, minus $a$ times $(2)$, plus $b$... | Let the coordinates of the triangle be $(0,0),(1,0),\left(\frac{1}{2},\frac{\sqrt{3}}{2}\right)$. Then, we can write three equations of the form
$$(x-x\_0)^2+(y-y\_0)^2=r\_0^2$$
for various $x\_0,y\_0,r\_0$. What happens if you assume a solution to each of these concurrently and then solve for $r$? |
2,103,993 | $y={\dfrac{[3x+1]}{[4x-1]^\frac{1}{2}}}$
Is it logical to square both the numerator and denominator to cancel out the power to $\frac12$ in the denominator?
Edit: This expression is being used for a chain rule application. | 2017/01/19 | [
"https://math.stackexchange.com/questions/2103993",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/407878/"
] | Consider a general point $(x,y)$ inside the triangle,
and let the distance of $(x,y)$ from the vertices $(0,0),$
$\left(\frac12,\frac{\sqrt3}2\right),$ and $(1,0)$ be
$r\_1$, $r\_2,$ and $r\_3$ respectively.
(That is, each of $r\_1$, $r\_2,$ and $r\_3$ is a function of $(x,y)$.)
We want to find a point $(x,y)$ such th... | Let the coordinates of the triangle be $(0,0),(1,0),\left(\frac{1}{2},\frac{\sqrt{3}}{2}\right)$. Then, we can write three equations of the form
$$(x-x\_0)^2+(y-y\_0)^2=r\_0^2$$
for various $x\_0,y\_0,r\_0$. What happens if you assume a solution to each of these concurrently and then solve for $r$? |
2,103,993 | $y={\dfrac{[3x+1]}{[4x-1]^\frac{1}{2}}}$
Is it logical to square both the numerator and denominator to cancel out the power to $\frac12$ in the denominator?
Edit: This expression is being used for a chain rule application. | 2017/01/19 | [
"https://math.stackexchange.com/questions/2103993",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/407878/"
] | Let the coordinates of the triangle be $(0,0),(1,0),\left(\frac{1}{2},\frac{\sqrt{3}}{2}\right)$. Then, we can write three equations of the form
$$(x-x\_0)^2+(y-y\_0)^2=r\_0^2$$
for various $x\_0,y\_0,r\_0$. What happens if you assume a solution to each of these concurrently and then solve for $r$? | First, note that (x,y) is determined by the intersection of the circles with radii r and r+b, Given the "safe" values assumed, so we should be able to express both x and y in terms of r and b only.
Safe values values are those such that:
\* 2r + a > 1
\* 2r + b > 1
\* r + a < 1
\* r + b < 1
Since it... |
2,103,993 | $y={\dfrac{[3x+1]}{[4x-1]^\frac{1}{2}}}$
Is it logical to square both the numerator and denominator to cancel out the power to $\frac12$ in the denominator?
Edit: This expression is being used for a chain rule application. | 2017/01/19 | [
"https://math.stackexchange.com/questions/2103993",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/407878/"
] | Consider a general point $(x,y)$ inside the triangle,
and let the distance of $(x,y)$ from the vertices $(0,0),$
$\left(\frac12,\frac{\sqrt3}2\right),$ and $(1,0)$ be
$r\_1$, $r\_2,$ and $r\_3$ respectively.
(That is, each of $r\_1$, $r\_2,$ and $r\_3$ is a function of $(x,y)$.)
We want to find a point $(x,y)$ such th... | This can be done, but unless someone has a bright idea, the algebra is pretty revolting. Start with
$$\eqalign{
x^2+y^2=r^2&\qquad\qquad(1)\cr
(x-1)^2+y^2=(r+b)^2&\qquad\qquad(2)\cr
(x-\tfrac12)^2+(y-\tfrac{\sqrt3}2)^2=(r+a)^2&\qquad\qquad(3)\cr}$$
If you now take $(a-b)$ times $(1)$, minus $a$ times $(2)$, plus $b$... |
2,103,993 | $y={\dfrac{[3x+1]}{[4x-1]^\frac{1}{2}}}$
Is it logical to square both the numerator and denominator to cancel out the power to $\frac12$ in the denominator?
Edit: This expression is being used for a chain rule application. | 2017/01/19 | [
"https://math.stackexchange.com/questions/2103993",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/407878/"
] | This can be done, but unless someone has a bright idea, the algebra is pretty revolting. Start with
$$\eqalign{
x^2+y^2=r^2&\qquad\qquad(1)\cr
(x-1)^2+y^2=(r+b)^2&\qquad\qquad(2)\cr
(x-\tfrac12)^2+(y-\tfrac{\sqrt3}2)^2=(r+a)^2&\qquad\qquad(3)\cr}$$
If you now take $(a-b)$ times $(1)$, minus $a$ times $(2)$, plus $b$... | First, note that (x,y) is determined by the intersection of the circles with radii r and r+b, Given the "safe" values assumed, so we should be able to express both x and y in terms of r and b only.
Safe values values are those such that:
\* 2r + a > 1
\* 2r + b > 1
\* r + a < 1
\* r + b < 1
Since it... |
2,103,993 | $y={\dfrac{[3x+1]}{[4x-1]^\frac{1}{2}}}$
Is it logical to square both the numerator and denominator to cancel out the power to $\frac12$ in the denominator?
Edit: This expression is being used for a chain rule application. | 2017/01/19 | [
"https://math.stackexchange.com/questions/2103993",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/407878/"
] | Consider a general point $(x,y)$ inside the triangle,
and let the distance of $(x,y)$ from the vertices $(0,0),$
$\left(\frac12,\frac{\sqrt3}2\right),$ and $(1,0)$ be
$r\_1$, $r\_2,$ and $r\_3$ respectively.
(That is, each of $r\_1$, $r\_2,$ and $r\_3$ is a function of $(x,y)$.)
We want to find a point $(x,y)$ such th... | First, note that (x,y) is determined by the intersection of the circles with radii r and r+b, Given the "safe" values assumed, so we should be able to express both x and y in terms of r and b only.
Safe values values are those such that:
\* 2r + a > 1
\* 2r + b > 1
\* r + a < 1
\* r + b < 1
Since it... |
12,472 | An old Chinese poem goes:
>
> 一百饅頭一百僧,
>
> 大僧三個更無爭,
>
> 小僧三人分一個,
>
> 大小和尚得幾丁?
>
>
>
When translated into English, this math problem reads:
>
> 100 buns and 100 monks,
>
> Big monks eat 3 buns with no shortage,
>
> Little monks share one bun among three,
>
> Big and little monks, how m... | 2013/09/06 | [
"https://codegolf.stackexchange.com/questions/12472",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/7110/"
] | ~~Python 3,~~ ~~173~~ ~~146~~ Python 2, 125(see below)
------------------------------------------------------
**Original version, 173:**
```py
C=sorted(S[0]);C[-1]=0
while C:
v={i:sum(i==min(C,key=s.__getitem__)for s in S)for i in C};c=max(C,key=v.get);C.remove(min(C,key=v.get))
if v[c]*2>len(S):C=print(v[c],c+1)
... | ### GolfScript, 37 characters
```
.0=,({.0={`{\0==}+1$\,,}$1>`{&}+%}*0=
```
Input (on stack) is a list of votes where elements can be e.g. numbers or strings. [Example](http://golfscript.apphb.com/?c=WwogIFsiQmVybmFyZCIgIkFyY2hpYmFsZCIgIkNocmlzIl0KICBbIkFyY2hpYmFsZCIgIkJlcm5hcmQiICJDaHJpcyJdCiAgWyJDaHJpcyIgIkJlcm5hc... |
12,228,375 | I wrote a Web Service server using Sun Ws implementation and I used a HttpsServer for publication (TLS mutual authentication).
```
httpServer=HttpsServer.create(...);
ssl=SSLContext.getInstance("TLS");
...
ssl.init(keyFactory.getKeyManagers(),trustFactory.getTrustManagers(),new SecureRa... | 2012/09/01 | [
"https://Stackoverflow.com/questions/12228375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1640562/"
] | in your handler you get not the `HttpExchange` instance but the instance of its subclass `HttpsExchange` that has the extra method:
>
> abstract [SSLSession](http://docs.oracle.com/javase/6/docs/api/javax/net/ssl/SSLSession.html?is-external=true) getSSLSession();
>
>
>
Among many other things an SSLSession expose... | `getUserPrincipal()` gives you the certificate in `httpservletrequest`. |
26,868,315 | I am trying to release my program as a *release* build. I switched to release mode and then my \*.h file broke.
```
#include "GL\glew.h"
#include "GLFW\glfw3.h"
#include "ft2build.h"
#include "FTGL\ftgl.h"
//#include "GL/glew.h"
//#include <GLFW/glfw3.h>
//#include <ft2build.h>
//#include <FTGL/ftgl.h>
```
The a... | 2014/11/11 | [
"https://Stackoverflow.com/questions/26868315",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1137669/"
] | You should config bind\_ip = 0.0.0.0 when start mongod
eg
mongod.conf as folowing
```
fork = true
bind_ip = 0.0.0.0
port = 27017
quiet = true
dbpath = /srv/mongodb
logpath = /var/log/mongodb/mongod.log
logappend = true
journal = true
```
and start mongo as this command
```
sudo mongod --config /etc/mongodb.conf
``... | I suggest that you check if your MongoDB is listening on port 27017 by running the following command:
```
sudo netstat -nap | grep 27017
```
I suggest also that you try to turn off your IP tables on the VM and try to access maybe a rule is blocking your access.
One thing also to check is your *bindIp* using *db.serv... |
11,271 | Меня вчера озадачили вопросом: а какой антоним к слову "защищать"? Я сказал "нападать", но это не совсем антоним. А кто что думает по этому поводу? | 2012/10/25 | [
"https://rus.stackexchange.com/questions/11271",
"https://rus.stackexchange.com",
"https://rus.stackexchange.com/users/3/"
] | Контекстуальные (***контекстные***) антонимы – слова, которые вступают в антонимические отношения только в определенном контексте. Они не являются языковыми антонимами, не осознаются как слова с противоположным значением вне этого контекста.
Пример: И ненавидим мы и любим мы случайно, / Ничем не жертвуя *ни злобе, ни л... | Разные антонимы к разному значению слова "защищать". Антонимами будут или "нападать", или "обвинять" |
11,271 | Меня вчера озадачили вопросом: а какой антоним к слову "защищать"? Я сказал "нападать", но это не совсем антоним. А кто что думает по этому поводу? | 2012/10/25 | [
"https://rus.stackexchange.com/questions/11271",
"https://rus.stackexchange.com",
"https://rus.stackexchange.com/users/3/"
] | Разные антонимы к разному значению слова "защищать". Антонимами будут или "нападать", или "обвинять" | Нападать - не антоним. С точки зрения теории отношений это не противоположное, а обратное значение. Иногда они совпадают, но не всегда. Например, ниже-выше можно понимать как антонимы, а можно - и как обратные друг к другу отношения (если А ниже В, то В выше А).
В Вашем примере еще сложнее, так как отношение "защища... |
11,271 | Меня вчера озадачили вопросом: а какой антоним к слову "защищать"? Я сказал "нападать", но это не совсем антоним. А кто что думает по этому поводу? | 2012/10/25 | [
"https://rus.stackexchange.com/questions/11271",
"https://rus.stackexchange.com",
"https://rus.stackexchange.com/users/3/"
] | Контекстуальные (***контекстные***) антонимы – слова, которые вступают в антонимические отношения только в определенном контексте. Они не являются языковыми антонимами, не осознаются как слова с противоположным значением вне этого контекста.
Пример: И ненавидим мы и любим мы случайно, / Ничем не жертвуя *ни злобе, ни л... | Нападать - не антоним. С точки зрения теории отношений это не противоположное, а обратное значение. Иногда они совпадают, но не всегда. Например, ниже-выше можно понимать как антонимы, а можно - и как обратные друг к другу отношения (если А ниже В, то В выше А).
В Вашем примере еще сложнее, так как отношение "защища... |
11,271 | Меня вчера озадачили вопросом: а какой антоним к слову "защищать"? Я сказал "нападать", но это не совсем антоним. А кто что думает по этому поводу? | 2012/10/25 | [
"https://rus.stackexchange.com/questions/11271",
"https://rus.stackexchange.com",
"https://rus.stackexchange.com/users/3/"
] | Контекстуальные (***контекстные***) антонимы – слова, которые вступают в антонимические отношения только в определенном контексте. Они не являются языковыми антонимами, не осознаются как слова с противоположным значением вне этого контекста.
Пример: И ненавидим мы и любим мы случайно, / Ничем не жертвуя *ни злобе, ни л... | Универсального антонима (ну кроме примитива) не существует.
В этой ситуации нападать - вполне пойдет. Пожалуй, самый универсальный.
Еще - атаковать (более точно, но только в определенных контекстах), обвинять (в суде), нарушать (гуманитарное право) и т.д. |
11,271 | Меня вчера озадачили вопросом: а какой антоним к слову "защищать"? Я сказал "нападать", но это не совсем антоним. А кто что думает по этому поводу? | 2012/10/25 | [
"https://rus.stackexchange.com/questions/11271",
"https://rus.stackexchange.com",
"https://rus.stackexchange.com/users/3/"
] | Универсального антонима (ну кроме примитива) не существует.
В этой ситуации нападать - вполне пойдет. Пожалуй, самый универсальный.
Еще - атаковать (более точно, но только в определенных контекстах), обвинять (в суде), нарушать (гуманитарное право) и т.д. | Нападать - не антоним. С точки зрения теории отношений это не противоположное, а обратное значение. Иногда они совпадают, но не всегда. Например, ниже-выше можно понимать как антонимы, а можно - и как обратные друг к другу отношения (если А ниже В, то В выше А).
В Вашем примере еще сложнее, так как отношение "защища... |
10,438,158 | I have a product which bootloader and application are compiled using a compiler (gnuarm GCC 4.1.1) that generates "arm-elf".
The bootloader and application are segregated in different FLASH memory areas in the linker script.
The application has a feature that enables it to call the bootloader (as a simple c-function ... | 2012/05/03 | [
"https://Stackoverflow.com/questions/10438158",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/466339/"
] | No. An ABI is the magic that makes binaries compatible. The Application Binary Interface determines various conventions on how to communicate with other libraries/applications. For example, an ABI will define calling convention, which makes implicit assumptions about things like which registers are used for passing arg... | I *Think* that this will be OK. I did a migration something like this myself, from what I remember I only ran into a problem to do with handling division.
[This is the best info I can find about the differences](http://wiki.debian.org/ArmEabiPort), it suggests that if you don't have struct alignment issues, you may be... |
10,438,158 | I have a product which bootloader and application are compiled using a compiler (gnuarm GCC 4.1.1) that generates "arm-elf".
The bootloader and application are segregated in different FLASH memory areas in the linker script.
The application has a feature that enables it to call the bootloader (as a simple c-function ... | 2012/05/03 | [
"https://Stackoverflow.com/questions/10438158",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/466339/"
] | There is always the option of making the call to bootloader in inline assembly, in which case you can adhere to any calling standard you need :).
However, besides the portability issue it introduces, this approach will also make two assumptions about your bootloader and application:
* you are able to detect in your a... | I *Think* that this will be OK. I did a migration something like this myself, from what I remember I only ran into a problem to do with handling division.
[This is the best info I can find about the differences](http://wiki.debian.org/ArmEabiPort), it suggests that if you don't have struct alignment issues, you may be... |
7,697,136 | I have the following code:
```
for (i = 0; i < 13; i++){
$('.players').append('<div class="rule_dropdown"><select name="rule' + i + '">');
for(j = 0; j < rules.length; j++){
$('.players').append('<option>' + rules[j] + '</option>');
}
$('.players').append('</select></div>');
}
```
I want to ... | 2011/10/08 | [
"https://Stackoverflow.com/questions/7697136",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/733142/"
] | One way to do it could be:
```
#include <stdio.h>
#include <stdlib.h>
int main()
{
const char* str = "123 402 10 aaa bbb cc";
short i,j,y;
char c[256];
if (sscanf(str, "%hd %hd %hd %255[^\n]", &i, &j, &y, c) == 4) {
printf("i=%hd j=%hd y=%hd c=\"%s\"\n", i, j, y, c);
}
return 0;
}
``` | You don't need `sscanf`. You can use `strchr` to find the spaces, `atoi` to turn strings into integers, and simple assignment to turn the spaces into terminating zeroes.
You can also do this:
```
#include <stdio.h>
int main(void)
{
const char *test="123 402 10 aaa bbb cc";
short i, j, y;
char c[128];
sscanf(test,... |
7,697,136 | I have the following code:
```
for (i = 0; i < 13; i++){
$('.players').append('<div class="rule_dropdown"><select name="rule' + i + '">');
for(j = 0; j < rules.length; j++){
$('.players').append('<option>' + rules[j] + '</option>');
}
$('.players').append('</select></div>');
}
```
I want to ... | 2011/10/08 | [
"https://Stackoverflow.com/questions/7697136",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/733142/"
] | It's not that difficult:
```
#include <stdio.h>
int main() {
short i, j, y;
char text[80];
if (sscanf("123 402 10 aaa bbb cc\nsecond line", "%hd %hd %hd %79[^\n]", &i, &j, &y, text) == 4) {
printf("success: i=%d, j=%d, y=%d, text=%s\n", i, j, y, text);
}
return 0;
}
```
Note that you have to allocate... | You don't need `sscanf`. You can use `strchr` to find the spaces, `atoi` to turn strings into integers, and simple assignment to turn the spaces into terminating zeroes.
You can also do this:
```
#include <stdio.h>
int main(void)
{
const char *test="123 402 10 aaa bbb cc";
short i, j, y;
char c[128];
sscanf(test,... |
226,786 | In the following sentence:
>
> By the year 2050, we will have 10 billion people on our planet. Linking this rise to the ‘what’ and ‘how’ of feeding the entire population in a sustainable manner is what **got Varun Deshpande and Ramya Ramamurthy of the US-based Good Food Institute’s (GFI) India chapter started on crea... | 2019/10/05 | [
"https://ell.stackexchange.com/questions/226786",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/-1/"
] | You've mis-parsed this. "started" is part of the phrase you're confused about: it's "got somebody started on doing something". It's not part of "India chapter".
You might rewrite this as:
>
> Varun Deshpande and Ramya Ramamurthy are members of the India chapter of the US-based Good Food Institute’s (GFI).
>
>
> Li... | [...] got Varun Deshpande and Ramya Ramamurthy of the US-based Good Food Institute’s (GFI) India chapter started on creating their new podcast, Feeding 10 Billion.
I am removing where these guys work to show the usage:
[...] **got** Varun Deshpande and Ramya Ramamurthy started on[...] creating their new podcast, Feed... |
70,856,433 | The problem looks like I've had about 500 files with `if` statements looking like the one I have below. How might I replace these `if` statements without manually overwriting them each by each?
The `if` statement below returns a null reference exception if \_azon is null so that is the main reason behind the replaceme... | 2022/01/25 | [
"https://Stackoverflow.com/questions/70856433",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6942487/"
] | Based on your question and the code snippet in one of your comments, my understanding is that you want to replace this:
```
if (((_azon == null) && (value != null)) || !_azon.Equals(value)) {
```
with this:
```
if ((_azon == null) && (value != null)) {
```
You can do that with the [Capture groups and replacement ... | Assuming your `NotifyPropertyChanged` method is implemented something like this:
```
private void NotifyPropertyChanged([CallerMemberName] String propertyName = "")
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
```
You could write a function that looks something like:
```
... |
1,281,107 | >
> Find a vector equation for the line through the point $(3,-8,-8)$ perpendicular to these vectors $u=\langle 2,2,-1\rangle$ and $v=\langle -9,-8,-3\rangle$.
>
>
>
I'm fairly new to vector equations. Would I find a component vector of $u$ and $v$ and write the parametric equation for it and then use the formula ... | 2015/05/13 | [
"https://math.stackexchange.com/questions/1281107",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/181956/"
] | Here's a sketch.
The best way to approach this is by thinking about what fundamentally defines a line: a vector and a point. In this case, we have the point, but instead of a vector in the direction of the line, we have two vectors perpendicular to the line. However, if we take the cross product of these two vectors, ... | Let $P = (3,-8,-8)$ be the point given above, $u$ and $v$ be defined as above, and $O = (0,0,0)$ (origin). Let $O \rightarrow P$ denote the distance from the origin to $P$. The cross product of two vectors results in a perpendicular vector. Hence $u \times v = (-14,15,2)$. Thus the equation for the line through the poi... |
40,837,759 | The subject pretty much speaks for itself, but I am quite confident that if I deploy a standard Web API to an Azure web site, it will work without issue using standard forms authentication.
So I assume an Azure API app has some added extra's, like security and other services. What does an Azure app offer me that a sta... | 2016/11/28 | [
"https://Stackoverflow.com/questions/40837759",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8741/"
] | Azure API Management is a way to publish and consume your Web APIs, it enables you to categorize your APIs, create segments and add pricing for each segment, it also offers many other features like caching, throttling, and format conversion. All of these features can be enabled by some manipulation of a simple XML file... | **Web Apps** and **API Apps** are both part of **App Service**. They are both web hosting platforms. And as you said, a Web API will work just fine in a Web App.
Before, API Apps had certain features that Web Apps did not, though that has changed. Web Apps also support e.g. Swagger definitions now.
The difference bet... |
66,221,421 | I'm trying to do two things here but can't make either work. I've never played with CSS before so I've just been sitting on jsfiddle for a few hours trying to just make this basic div table
The first thing I'm trying to do is get 30px border spacing working. I've tried to enter it everywhere in the CSS and all the cel... | 2021/02/16 | [
"https://Stackoverflow.com/questions/66221421",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15219216/"
] | You can use [default parameters](https://www.typescriptlang.org/docs/handbook/functions.html#optional-and-default-parameters):
```
const renderComponent = ({ urlToHideAt, links, currentLink }: IRenderComponent = {}) => {}
```
If the caller doesn't pass the first parameter, it will default to `{}`, which is a valid `... | You cannot make the interface optional but you can give a default value to the first argument of ˋrenderComponentˋ to make it optional:
```
const renderComponent = ({ urlToHideAt, links, currentLink }: IRenderComponent = {}) => {
// Do something
}
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.