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 |
|---|---|---|---|---|---|
35,645,919 | I was able to implement a `PaypalController`, with a reusable `postPayment()` method, which accepts items and their prices, and creates a Paypal payment, and redirects to a Paypal payment page.
```
class PaypalController extends Controller {
private static $_api_context;
private static function initialize() ... | 2016/02/26 | [
"https://Stackoverflow.com/questions/35645919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/193375/"
] | No it's not a good practice. You should abstract the business logic to a service/repository class. So for example:
Create an interface as Contract:
```
namespace App\Services\Paypal;
interface PaypalInterface {
public function PostRegister(Array $array, /*More $params if necessary*/);
}
```
Then implement t... | The fact that your `postPayment` is a static method is a code smell for me that tells "Nope, not inside a controller".
* As you said, I think a service would be a better place for that, you can take a look at [Omnipay](https://github.com/thephpleague/omnipay-paypal) if you want to.
* You can make `PaypalController` ab... |
35,645,919 | I was able to implement a `PaypalController`, with a reusable `postPayment()` method, which accepts items and their prices, and creates a Paypal payment, and redirects to a Paypal payment page.
```
class PaypalController extends Controller {
private static $_api_context;
private static function initialize() ... | 2016/02/26 | [
"https://Stackoverflow.com/questions/35645919",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/193375/"
] | No it's not a good practice. You should abstract the business logic to a service/repository class. So for example:
Create an interface as Contract:
```
namespace App\Services\Paypal;
interface PaypalInterface {
public function PostRegister(Array $array, /*More $params if necessary*/);
}
```
Then implement t... | This is not the right way to do it. Rember, controllers should only take a request and dispatch it to the right service, not handle buisness logic by themselves.
This rule apply: when you need to call a controller method from another controller it smells of bad code
Instead, use a service provider and a service clas... |
41,134,628 | When I use hide and confirm in html. The hide is not working properly in Chrome only. When the confirmation window is shown, the "aa" element is not hidden. IE and FF is working fine.
Any kind of suggestion is appreciated.
```
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/li... | 2016/12/14 | [
"https://Stackoverflow.com/questions/41134628",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2998584/"
] | Try the below code it's working properly.
```
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" ></script>
</head>
<body>
<a id='aa' href='javascript:hideit();'>try it</a>
<script type='text/javascript'>
function hideit() {
... | Please check following code, it works properly in all browsers :
```
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" >
</script>
</head>
<body>
<a id='aa' href='javascript:hideit();'>try it</a>
<script type='text/javascript'>
... |
41,134,628 | When I use hide and confirm in html. The hide is not working properly in Chrome only. When the confirmation window is shown, the "aa" element is not hidden. IE and FF is working fine.
Any kind of suggestion is appreciated.
```
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/li... | 2016/12/14 | [
"https://Stackoverflow.com/questions/41134628",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2998584/"
] | please check this link Here is the working fiddler link [element hide on alert](https://jsfiddle.net/neeraj692/24c3vtkL/1/)
it's not working StackOverflow editor.
```html
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
</head>
<body>
... | Please check following code, it works properly in all browsers :
```
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" >
</script>
</head>
<body>
<a id='aa' href='javascript:hideit();'>try it</a>
<script type='text/javascript'>
... |
41,134,628 | When I use hide and confirm in html. The hide is not working properly in Chrome only. When the confirmation window is shown, the "aa" element is not hidden. IE and FF is working fine.
Any kind of suggestion is appreciated.
```
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/li... | 2016/12/14 | [
"https://Stackoverflow.com/questions/41134628",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2998584/"
] | The hide function is actually working normally. The confirm dialog is the cause of the issue.
The issue occurred because after calling the hide function (while the browser is repainting itself to hide the element), the confirm dialog is triggered immediately which stops everything till it gets response. Hence, the hid... | Please check following code, it works properly in all browsers :
```
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" >
</script>
</head>
<body>
<a id='aa' href='javascript:hideit();'>try it</a>
<script type='text/javascript'>
... |
8,851,933 | I am trying to learn MVP
It is using web forms in ASP.NET. I have two user controls CurrentTimeView.ascx and MonthViewControl.ascx. The CurrentTimeView displayes time. There is a textbox to add days in the same control. The newly got date is called “resultant date”. When the button is clicked for add days, an event is... | 2012/01/13 | [
"https://Stackoverflow.com/questions/8851933",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/696627/"
] | TLDR the code.
Here's how I would do it.
You say there are 2 controls on the same page. So that can be served by a ContainerVM with references (members) of TimeVM and MonthVM.
1. TimeVM updates a backing property ResultantDate whenever you do your thing.
2. ContainerVM has subscribed to property-changed notifications... | I am not experienced with ASP.net but I think I follow the gist of what you are trying to do.
It appears that you are going down to fine a level with your presenter by making presenters for the individual UI elements. In this case the Month and the Time. I would think of it more as ShowTime period. ShowTime has the c... |
8,851,933 | I am trying to learn MVP
It is using web forms in ASP.NET. I have two user controls CurrentTimeView.ascx and MonthViewControl.ascx. The CurrentTimeView displayes time. There is a textbox to add days in the same control. The newly got date is called “resultant date”. When the button is clicked for add days, an event is... | 2012/01/13 | [
"https://Stackoverflow.com/questions/8851933",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/696627/"
] | Thanks for the inputs. I referred MVP Quickstarts <http://msdn.microsoft.com/en-us/library/ff650240.aspx>. `Model can raise events`. I think, I should go with that approach. Any thoughts are welcome.
Also, I have posted <http://forums.asp.net/t/1760921.aspx/1?Model+View+Presenter+Guidelines> to collect general rules o... | TLDR the code.
Here's how I would do it.
You say there are 2 controls on the same page. So that can be served by a ContainerVM with references (members) of TimeVM and MonthVM.
1. TimeVM updates a backing property ResultantDate whenever you do your thing.
2. ContainerVM has subscribed to property-changed notifications... |
8,851,933 | I am trying to learn MVP
It is using web forms in ASP.NET. I have two user controls CurrentTimeView.ascx and MonthViewControl.ascx. The CurrentTimeView displayes time. There is a textbox to add days in the same control. The newly got date is called “resultant date”. When the button is clicked for add days, an event is... | 2012/01/13 | [
"https://Stackoverflow.com/questions/8851933",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/696627/"
] | Thanks for the inputs. I referred MVP Quickstarts <http://msdn.microsoft.com/en-us/library/ff650240.aspx>. `Model can raise events`. I think, I should go with that approach. Any thoughts are welcome.
Also, I have posted <http://forums.asp.net/t/1760921.aspx/1?Model+View+Presenter+Guidelines> to collect general rules o... | I am not experienced with ASP.net but I think I follow the gist of what you are trying to do.
It appears that you are going down to fine a level with your presenter by making presenters for the individual UI elements. In this case the Month and the Time. I would think of it more as ShowTime period. ShowTime has the c... |
50,268,365 | I'm trying to style my TabNavigator using Native Base, but I always get "`props.navigation.navigate` is not a function" and I have no idea why.
This is my TabNavigator:
```
import { createBottomTabNavigator } from 'react-navigation';
import React from 'react';
import { Button, Text, Icon, Footer, FooterTab } from 'na... | 2018/05/10 | [
"https://Stackoverflow.com/questions/50268365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9692714/"
] | if want to implement with `react-navigation 3.0` with `native-base 2.13` then below code will work.
```
import { createBottomTabNavigator,createStackNavigator,createAppContainer } from 'react-navigation';
import React from 'react';
import { Button, Text, Icon, Footer, FooterTab } from 'native-base';
import Hom... | <https://reactnavigation.org/docs/en/navigation-prop.html>
This doc mentions that navigation props is not available to every component by default only the screen components have it.
if you wish to access this prop in other components then you either pass this prop to the component where it is needed or you use what i... |
50,268,365 | I'm trying to style my TabNavigator using Native Base, but I always get "`props.navigation.navigate` is not a function" and I have no idea why.
This is my TabNavigator:
```
import { createBottomTabNavigator } from 'react-navigation';
import React from 'react';
import { Button, Text, Icon, Footer, FooterTab } from 'na... | 2018/05/10 | [
"https://Stackoverflow.com/questions/50268365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9692714/"
] | if want to implement with `react-navigation 3.0` with `native-base 2.13` then below code will work.
```
import { createBottomTabNavigator,createStackNavigator,createAppContainer } from 'react-navigation';
import React from 'react';
import { Button, Text, Icon, Footer, FooterTab } from 'native-base';
import Hom... | I think the props aren't being passed through from your App component, could you try this?
```
class App extends Component {
render() {
const store = createStore(reducers);
return (
<Provider store={store}>
<MainRouter {...props}/>
</Provider>
);
}
}
export default App;
``` |
50,268,365 | I'm trying to style my TabNavigator using Native Base, but I always get "`props.navigation.navigate` is not a function" and I have no idea why.
This is my TabNavigator:
```
import { createBottomTabNavigator } from 'react-navigation';
import React from 'react';
import { Button, Text, Icon, Footer, FooterTab } from 'na... | 2018/05/10 | [
"https://Stackoverflow.com/questions/50268365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9692714/"
] | if want to implement with `react-navigation 3.0` with `native-base 2.13` then below code will work.
```
import { createBottomTabNavigator,createStackNavigator,createAppContainer } from 'react-navigation';
import React from 'react';
import { Button, Text, Icon, Footer, FooterTab } from 'native-base';
import Hom... | I found the solution to my problem: I had to add a root StackNavigator |
64,592,534 | I am trying to publish a detailed report online in my Azure DevOps Pipeline, but all I got is a link to download this Coverage file. (That can not be read anymore with the community version since the Visual Studio 2019)
[](https://i.stack.imgur.com/Aq5... | 2020/10/29 | [
"https://Stackoverflow.com/questions/64592534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5686886/"
] | To have there published report you need to use Cobertura. For TRX you will get only link to download file. And to create Cobertura report you need to install in your test projects `coverlet.collector` nuget package. Here you have code which should fix your problem:
```yaml
# You just added coverlet.collector to use 'X... | I have tried a lot to solve his problem...
So first of all, the problem is the test task of the pipeline (in my case the DotNetCoreCLI@2 task). If this task collects the code coverage it is automatically published with the tests in the .coverage format. For some reason this push of the .coverage file is at the end of ... |
64,592,534 | I am trying to publish a detailed report online in my Azure DevOps Pipeline, but all I got is a link to download this Coverage file. (That can not be read anymore with the community version since the Visual Studio 2019)
[](https://i.stack.imgur.com/Aq5... | 2020/10/29 | [
"https://Stackoverflow.com/questions/64592534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5686886/"
] | To have there published report you need to use Cobertura. For TRX you will get only link to download file. And to create Cobertura report you need to install in your test projects `coverlet.collector` nuget package. Here you have code which should fix your problem:
```yaml
# You just added coverlet.collector to use 'X... | I had the same problem with Azure DevOps and code coverage report rendering. I tried everything under the sun but to no avail. There were solutions with upvotes but none seems to be working for me. I was always getting that stupid download link only.
After reading @h0p3zZ answer, it gave me a new hint. For some reason... |
64,592,534 | I am trying to publish a detailed report online in my Azure DevOps Pipeline, but all I got is a link to download this Coverage file. (That can not be read anymore with the community version since the Visual Studio 2019)
[](https://i.stack.imgur.com/Aq5... | 2020/10/29 | [
"https://Stackoverflow.com/questions/64592534",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5686886/"
] | I have tried a lot to solve his problem...
So first of all, the problem is the test task of the pipeline (in my case the DotNetCoreCLI@2 task). If this task collects the code coverage it is automatically published with the tests in the .coverage format. For some reason this push of the .coverage file is at the end of ... | I had the same problem with Azure DevOps and code coverage report rendering. I tried everything under the sun but to no avail. There were solutions with upvotes but none seems to be working for me. I was always getting that stupid download link only.
After reading @h0p3zZ answer, it gave me a new hint. For some reason... |
38,196,291 | i have an array with this structure
```
$font = Array
(
["family"] => ABeeZee
["category"] => sans-serif
["variants"] => Array
(
[0] => regular
[1] => italic
)
["subsets"] => Array
(
[0] => latin
)
)
```
i want to get the elements like **$family = ABeeZee**
**,$variants = re... | 2016/07/05 | [
"https://Stackoverflow.com/questions/38196291",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5456483/"
] | Variables in Javascript are function scoped. You don't have to declare them again using `var` inside your `if`, `else-if` blocks.
Edit: As others have pointed out, the problem is with the case of the css class `iphone5c`. You are checking for `iPhone5c`. | I'm sorry guys i made a silly error, @nnnnnn pointed me in the right direction. i was not consistent in my cases, 'iPhone5c' uppercase P was in my jQuery code while 'iphone5c' lowercase p was in my html. I corrected the cases and it works fine now. Also you guys were also correct, I didnt need to have 'var' infront of ... |
38,196,291 | i have an array with this structure
```
$font = Array
(
["family"] => ABeeZee
["category"] => sans-serif
["variants"] => Array
(
[0] => regular
[1] => italic
)
["subsets"] => Array
(
[0] => latin
)
)
```
i want to get the elements like **$family = ABeeZee**
**,$variants = re... | 2016/07/05 | [
"https://Stackoverflow.com/questions/38196291",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5456483/"
] | The problem is that you are checking for the class `iPhone5c` instead of the class `iphone5c`, note the capital P. JQuery is case sensitive, so you should writte them in with the same caps.
So your your code is storing 0 on the variables because it doesn't pass the `if else` condition.
Furthermore, as other answers ... | I'm sorry guys i made a silly error, @nnnnnn pointed me in the right direction. i was not consistent in my cases, 'iPhone5c' uppercase P was in my jQuery code while 'iphone5c' lowercase p was in my html. I corrected the cases and it works fine now. Also you guys were also correct, I didnt need to have 'var' infront of ... |
14,521,423 | i've done an ajax request in my wordpress plugin.My request is based on steps below:
**1) i am including js file and starting a request document on ready**
**2)At the php side i want to take this request and print it to test.**
for all these stuff i wrote these codes:
main.js:
```
$(function(){
$.post('... | 2013/01/25 | [
"https://Stackoverflow.com/questions/14521423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1772101/"
] | WordPress has a unique way of handling AJAX. If you make a request to the php file directly, then you are not loading the rest of the WordPress framework and a lot of WordPress specific functionality will not be available to you.
In the PHP side, what you have to do is use code that looks like this:
```
//for logged ... | Make sure you have enqueued your custom script as follows. If your script is included before the Wordpress jQuery scripts are custom injected your code might not work properly.
```
function my_scripts_method() {
wp_enqueue_script(
'custom-script',
get_template_directory_uri() . '/js/main.js',
... |
19,950,299 | Is there a possible way to fire an event when user clicks the no matches found message in jquery plugin select2??? i need that event for my project i have tried this code but it seems not working
```
$('.select2-no-results').live('click',function(){
alert("Yes");
});
$('.select2-drop-active').delegate('li.select2-no-... | 2013/11/13 | [
"https://Stackoverflow.com/questions/19950299",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2797782/"
] | Hope my solution helps with your problem:
**\*Select2 configuration**
```
var $select2 = $('#select2_id').select2(
{
//Your parameters
formatNoMatches: Not_Found
});
```
**\*Error handling function**
```
function Not_Found()
{
var $not_found = '<div>Result not found. <a href="#" onclick="return myClick... | Try to use [on()](http://api.jquery.com/on) like,
```
$('.select2-drop-active').on('click','li.select2-no-results',function(){
alert('Hello');
});
``` |
19,950,299 | Is there a possible way to fire an event when user clicks the no matches found message in jquery plugin select2??? i need that event for my project i have tried this code but it seems not working
```
$('.select2-no-results').live('click',function(){
alert("Yes");
});
$('.select2-drop-active').delegate('li.select2-no-... | 2013/11/13 | [
"https://Stackoverflow.com/questions/19950299",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2797782/"
] | Hope my solution helps with your problem:
**\*Select2 configuration**
```
var $select2 = $('#select2_id').select2(
{
//Your parameters
formatNoMatches: Not_Found
});
```
**\*Error handling function**
```
function Not_Found()
{
var $not_found = '<div>Result not found. <a href="#" onclick="return myClick... | try using .trigger()
```
$(".select2-no-results").click(function()
{
$("li.select2-no-results").trigger("click");
});
``` |
1,361,873 | Doing `WIN``LEFT ARROW` on application A and `WIN``RIGHT ARROW` on application B is a very cool and useful feature on Windows 7 to split the screen into 2 applications.
Now that I use it everyday, I would like even more (never happy!): is there a shortcut to **resize and move a window to the upper-left corner / upper-... | 2018/09/27 | [
"https://superuser.com/questions/1361873",
"https://superuser.com",
"https://superuser.com/users/221041/"
] | I don't think it's possible in windows 7, the good news you'll be able to do it in Windows 10.
Win logo key + left / right then Win logo key + up / down will move your app to left / right top / bottom corner. | I didn't find it available directly in Windows 7.
It may be possible to create an Autohotkey script for this.
I've finally found a solution with [AquaSnap](https://www.nurgo-software.com/pricing/aquasnap) (free for personal use). By default it's:
* `WIN``HOME` for top left
* `WIN``END` for bottom left
* `WIN``PGUP` ... |
20,054,034 | I am trying to make a program that calculates the answer of a quadratic equation with the general formula but i am encountering a few errors.
The way I have my Windows Form Application set up it asks for a, b, and c, and substitutes them in the general formula.
I have 3 text boxes, one for each value of a, b and c and ... | 2013/11/18 | [
"https://Stackoverflow.com/questions/20054034",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2738052/"
] | group 2a and make sure values are valid (b^2 > 4ac)
```
answer = (b + Math.Sqrt(sqrtpart)) / (2 * a);
``` | If you want your calculator to be able to compute complex numbers try the following
```
string ans = "";
double root1 = 0;
double root2 = 0;
double b = 0;
double a = 0;
double c = 0;
double identifier = 0;
a =Convert.ToDouble(Console.ReadLine());
b = Co... |
20,054,034 | I am trying to make a program that calculates the answer of a quadratic equation with the general formula but i am encountering a few errors.
The way I have my Windows Form Application set up it asks for a, b, and c, and substitutes them in the general formula.
I have 3 text boxes, one for each value of a, b and c and ... | 2013/11/18 | [
"https://Stackoverflow.com/questions/20054034",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2738052/"
] | group 2a and make sure values are valid (b^2 > 4ac)
```
answer = (b + Math.Sqrt(sqrtpart)) / (2 * a);
``` | Use the following code:
```
using System;
using System.Collections.Generic;
using System.Text;
namespace SoftwareAndFinance
{
class Math
{
// quadratic equation is a second order of polynomial equation in a single variable
// x = [ -b +/- sqrt(b^2 - 4ac) ] / 2a
public... |
20,054,034 | I am trying to make a program that calculates the answer of a quadratic equation with the general formula but i am encountering a few errors.
The way I have my Windows Form Application set up it asks for a, b, and c, and substitutes them in the general formula.
I have 3 text boxes, one for each value of a, b and c and ... | 2013/11/18 | [
"https://Stackoverflow.com/questions/20054034",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2738052/"
] | group 2a and make sure values are valid (b^2 > 4ac)
```
answer = (b + Math.Sqrt(sqrtpart)) / (2 * a);
``` | A little late, but here is my solution:
```
using System;
using System.Collections.Generic;
namespace MyFunctions
{
class Program
{
static void Main(string[] args)
{
printABCSolution(1, -3, 4);
printABCSolution(1, -4, 4);
printABCSolution(1, -5, 4);
... |
20,054,034 | I am trying to make a program that calculates the answer of a quadratic equation with the general formula but i am encountering a few errors.
The way I have my Windows Form Application set up it asks for a, b, and c, and substitutes them in the general formula.
I have 3 text boxes, one for each value of a, b and c and ... | 2013/11/18 | [
"https://Stackoverflow.com/questions/20054034",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2738052/"
] | group 2a and make sure values are valid (b^2 > 4ac)
```
answer = (b + Math.Sqrt(sqrtpart)) / (2 * a);
``` | Here is code:
```java
using System;
namespace RoomPaintCost
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("This program applies quadratic formula to Ax^2+Bx+C=0 problems");
double[] ABC= getABC();
... |
20,054,034 | I am trying to make a program that calculates the answer of a quadratic equation with the general formula but i am encountering a few errors.
The way I have my Windows Form Application set up it asks for a, b, and c, and substitutes them in the general formula.
I have 3 text boxes, one for each value of a, b and c and ... | 2013/11/18 | [
"https://Stackoverflow.com/questions/20054034",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2738052/"
] | First, make sure that 4ac < b². The quadratic formula also utilizes the ± sign, so we must make two separate variables to hold the two different answers.
```
double sqrtpart = (b * b) - (4 * a * c);
answer1 = ((-1)*b + Math.Sqrt(sqrtpart)) / (2 * a);
answer2 = ((-1)*b - Math.Sqrt(sqrtpart)) / (2 * a);
textBox4.Text = ... | If you want your calculator to be able to compute complex numbers try the following
```
string ans = "";
double root1 = 0;
double root2 = 0;
double b = 0;
double a = 0;
double c = 0;
double identifier = 0;
a =Convert.ToDouble(Console.ReadLine());
b = Co... |
20,054,034 | I am trying to make a program that calculates the answer of a quadratic equation with the general formula but i am encountering a few errors.
The way I have my Windows Form Application set up it asks for a, b, and c, and substitutes them in the general formula.
I have 3 text boxes, one for each value of a, b and c and ... | 2013/11/18 | [
"https://Stackoverflow.com/questions/20054034",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2738052/"
] | First, make sure that 4ac < b². The quadratic formula also utilizes the ± sign, so we must make two separate variables to hold the two different answers.
```
double sqrtpart = (b * b) - (4 * a * c);
answer1 = ((-1)*b + Math.Sqrt(sqrtpart)) / (2 * a);
answer2 = ((-1)*b - Math.Sqrt(sqrtpart)) / (2 * a);
textBox4.Text = ... | Use the following code:
```
using System;
using System.Collections.Generic;
using System.Text;
namespace SoftwareAndFinance
{
class Math
{
// quadratic equation is a second order of polynomial equation in a single variable
// x = [ -b +/- sqrt(b^2 - 4ac) ] / 2a
public... |
20,054,034 | I am trying to make a program that calculates the answer of a quadratic equation with the general formula but i am encountering a few errors.
The way I have my Windows Form Application set up it asks for a, b, and c, and substitutes them in the general formula.
I have 3 text boxes, one for each value of a, b and c and ... | 2013/11/18 | [
"https://Stackoverflow.com/questions/20054034",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2738052/"
] | First, make sure that 4ac < b². The quadratic formula also utilizes the ± sign, so we must make two separate variables to hold the two different answers.
```
double sqrtpart = (b * b) - (4 * a * c);
answer1 = ((-1)*b + Math.Sqrt(sqrtpart)) / (2 * a);
answer2 = ((-1)*b - Math.Sqrt(sqrtpart)) / (2 * a);
textBox4.Text = ... | A little late, but here is my solution:
```
using System;
using System.Collections.Generic;
namespace MyFunctions
{
class Program
{
static void Main(string[] args)
{
printABCSolution(1, -3, 4);
printABCSolution(1, -4, 4);
printABCSolution(1, -5, 4);
... |
20,054,034 | I am trying to make a program that calculates the answer of a quadratic equation with the general formula but i am encountering a few errors.
The way I have my Windows Form Application set up it asks for a, b, and c, and substitutes them in the general formula.
I have 3 text boxes, one for each value of a, b and c and ... | 2013/11/18 | [
"https://Stackoverflow.com/questions/20054034",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2738052/"
] | First, make sure that 4ac < b². The quadratic formula also utilizes the ± sign, so we must make two separate variables to hold the two different answers.
```
double sqrtpart = (b * b) - (4 * a * c);
answer1 = ((-1)*b + Math.Sqrt(sqrtpart)) / (2 * a);
answer2 = ((-1)*b - Math.Sqrt(sqrtpart)) / (2 * a);
textBox4.Text = ... | Here is code:
```java
using System;
namespace RoomPaintCost
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("This program applies quadratic formula to Ax^2+Bx+C=0 problems");
double[] ABC= getABC();
... |
82,072 | In class today (philosophy of the mind) we discussed the ideas of Richard Lewontin. He stated that in determining the phenotype of a gene we must take into account the environment but also quantum uncertainties. Many people did not understand what these uncertainties might be. I would like to email the class and explai... | 2013/10/24 | [
"https://physics.stackexchange.com/questions/82072",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/22643/"
] | I strongly suspect that his argument is utter garbage. Is his intent to argue that since phenotypes arise due to cellular interactions that depend on chemical reactions which proceed by quantum-mechanical dynamics, then phenotypes depend on quantum dynamics? If so, then his statement is true, but vacuously so.
As Joh... | In most chemical reactions there is a barrier, that is an [activation energy](http://en.wikipedia.org/wiki/Activation_energy), to the reaction. This barrier controls the reaction rate: a high barrier means a low rate and a low barrier means a high(er) rate. In most cases the reagents get through the barrier because the... |
39,057,835 | Hi i am having problem with push data to firebase from angular. I am newbie in this so i need help to check what is wrong with my code
this is my code:
addrestaurant.html
```
<h4>Nama Restaurant</h4>
<input type="text" class="form-control" ng-model="namaResto" >
<h4>Alamat:</h4>
<input type="text" class="form-c... | 2016/08/20 | [
"https://Stackoverflow.com/questions/39057835",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5914949/"
] | You have [android](/questions/tagged/android "show questions tagged 'android'") on this question, so I assume that you are trying to write an Android app. If so, this will not work:
```
String path = "C:\\Users\\My Name\\IntelliJIDEAProjects\\Intereview\\app\\src\\main\\res\\Data\\dat... | This appears when the file isn't there...
Check the spelling of your pathname `(intereview?)` and... check if the file is there. |
39,057,835 | Hi i am having problem with push data to firebase from angular. I am newbie in this so i need help to check what is wrong with my code
this is my code:
addrestaurant.html
```
<h4>Nama Restaurant</h4>
<input type="text" class="form-control" ng-model="namaResto" >
<h4>Alamat:</h4>
<input type="text" class="form-c... | 2016/08/20 | [
"https://Stackoverflow.com/questions/39057835",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5914949/"
] | You have [android](/questions/tagged/android "show questions tagged 'android'") on this question, so I assume that you are trying to write an Android app. If so, this will not work:
```
String path = "C:\\Users\\My Name\\IntelliJIDEAProjects\\Intereview\\app\\src\\main\\res\\Data\\dat... | you need to put json inside the assets folder.
1. In the perspective window open the Project Perspective.
2. Create the directory inside your android\_test/test folder with name assets depending upon where you need the JSON response
3. Now simple put your JSON file inside the assets folder
4. And call your JSON by sim... |
422,782 | in cases, that all nodes in some `tikz` pictures have shadow. this can be done for example by:
```
every node/.style = {draw, fill=white, drop shadow},
```
problem arise, if i like to some of this nodes add labels. this labels also have shadows, which i not like to have. i try remove them with
```
no shadows/.styl... | 2018/03/23 | [
"https://tex.stackexchange.com/questions/422782",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/18189/"
] | You could to modify the `every shadow` style, inside the `every label` style. E.g. add `every shadow/.style={opacity=0}` to `every label` to make the shadow invisible.
[](https://i.stack.imgur.com/BFr1x.png)
```
\documentclass[tikz, margin=3mm]{stand... | OK, I didn't know you don't like the `\makeatletter` stuff. In this case, I think that Torbjørn T.'s solution is the best. Here is an alternative, which has the advantage that the shadow can be switched off locally (no every shadow), but the big disadvantage that it will put a white box on top of other things that may ... |
103,638 | To all the people with good ears:
when you're figuring out a melody by ear, are you listening to the sequence of notes and figuring out where each note sits relative to the root of the key?
Or are you figuring out what the next note is by the interval from the last note? | 2020/08/06 | [
"https://music.stackexchange.com/questions/103638",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/71281/"
] | Many good answers here already, but I'd like to keep it simple:
**Use all the clues that you can get, starting from the easiest**.
If the interval from the previous note is obvious, use that.
If the interval to the root is what stands out, use that.
If you're not sure and you have an instrument with you, use that -... | When playing by ear (or writing things down), I have a lot of mental scaffoldings in my head. Like a set of automatons working in parallel, each making sense of something else:
* relative intervals to the last sound
* relative interval to some sound I remember / can relate (e.g. when I play a 6 note motive I hear that... |
103,638 | To all the people with good ears:
when you're figuring out a melody by ear, are you listening to the sequence of notes and figuring out where each note sits relative to the root of the key?
Or are you figuring out what the next note is by the interval from the last note? | 2020/08/06 | [
"https://music.stackexchange.com/questions/103638",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/71281/"
] | >
> when you're figuring out a melody by ear, are you listening to the
> sequence of notes and figuring out where each note sits relative to
> the root of the key? Or are you figuring out what the next note is by
> the interval from the last note?
>
>
>
All of those, and none of them.
The thing is, I don't "figur... | Many good answers here already, but I'd like to keep it simple:
**Use all the clues that you can get, starting from the easiest**.
If the interval from the previous note is obvious, use that.
If the interval to the root is what stands out, use that.
If you're not sure and you have an instrument with you, use that -... |
103,638 | To all the people with good ears:
when you're figuring out a melody by ear, are you listening to the sequence of notes and figuring out where each note sits relative to the root of the key?
Or are you figuring out what the next note is by the interval from the last note? | 2020/08/06 | [
"https://music.stackexchange.com/questions/103638",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/71281/"
] | You have to learn motifs and intervals. (Make your self a list of the most usual like:
so-mi, so-la-so-mi, do-re-mi-do, do-re-mi-fa-so, so-do, so-do-mi, so-la-ti-do, do-do-ti-do, do-ti-la-ti-do etc. etc. and then you'll recognize them in a melody. There are lots of identical turns and formulas in folk or pop songs.
Yo... | If you have perfect pitch, congratulations! None of the following probably applies.
If you have good but not perfect pitch, you can probably get by...if the key and the number of voices, counterpoint, and harmony isn't that complicated. I did this in my first music theory class when we had to transcribe 2-3 moving lin... |
103,638 | To all the people with good ears:
when you're figuring out a melody by ear, are you listening to the sequence of notes and figuring out where each note sits relative to the root of the key?
Or are you figuring out what the next note is by the interval from the last note? | 2020/08/06 | [
"https://music.stackexchange.com/questions/103638",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/71281/"
] | >
> when you're figuring out a melody by ear, are you listening to the
> sequence of notes and figuring out where each note sits relative to
> the root of the key? Or are you figuring out what the next note is by
> the interval from the last note?
>
>
>
All of those, and none of them.
The thing is, I don't "figur... | I don't rate my ear as good, but pretty good. (Last thing I tried to transcribe was *Making Our Dreams Come True* from memory. I'd say it was 85-90% right compared to the sheet music.)
I compare to the previous note. Also I make reference not to the tonic (not root) of the key, but to what I think is the surrounding c... |
103,638 | To all the people with good ears:
when you're figuring out a melody by ear, are you listening to the sequence of notes and figuring out where each note sits relative to the root of the key?
Or are you figuring out what the next note is by the interval from the last note? | 2020/08/06 | [
"https://music.stackexchange.com/questions/103638",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/71281/"
] | As someone with absolute pitch, when I sit down and transcribe a piece or melody by ear, I determine each note individually by ear regardless of whether the piece is atonal or not or what the note intervals are.
Whoops.
For particularly hard-to-hear notes, though, I do fall back to intervals.
(As an aside, I often s... | When playing by ear (or writing things down), I have a lot of mental scaffoldings in my head. Like a set of automatons working in parallel, each making sense of something else:
* relative intervals to the last sound
* relative interval to some sound I remember / can relate (e.g. when I play a 6 note motive I hear that... |
103,638 | To all the people with good ears:
when you're figuring out a melody by ear, are you listening to the sequence of notes and figuring out where each note sits relative to the root of the key?
Or are you figuring out what the next note is by the interval from the last note? | 2020/08/06 | [
"https://music.stackexchange.com/questions/103638",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/71281/"
] | You have to learn motifs and intervals. (Make your self a list of the most usual like:
so-mi, so-la-so-mi, do-re-mi-do, do-re-mi-fa-so, so-do, so-do-mi, so-la-ti-do, do-do-ti-do, do-ti-la-ti-do etc. etc. and then you'll recognize them in a melody. There are lots of identical turns and formulas in folk or pop songs.
Yo... | When playing by ear (or writing things down), I have a lot of mental scaffoldings in my head. Like a set of automatons working in parallel, each making sense of something else:
* relative intervals to the last sound
* relative interval to some sound I remember / can relate (e.g. when I play a 6 note motive I hear that... |
103,638 | To all the people with good ears:
when you're figuring out a melody by ear, are you listening to the sequence of notes and figuring out where each note sits relative to the root of the key?
Or are you figuring out what the next note is by the interval from the last note? | 2020/08/06 | [
"https://music.stackexchange.com/questions/103638",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/71281/"
] | >
> when you're figuring out a melody by ear, are you listening to the
> sequence of notes and figuring out where each note sits relative to
> the root of the key? Or are you figuring out what the next note is by
> the interval from the last note?
>
>
>
All of those, and none of them.
The thing is, I don't "figur... | If you have perfect pitch, congratulations! None of the following probably applies.
If you have good but not perfect pitch, you can probably get by...if the key and the number of voices, counterpoint, and harmony isn't that complicated. I did this in my first music theory class when we had to transcribe 2-3 moving lin... |
103,638 | To all the people with good ears:
when you're figuring out a melody by ear, are you listening to the sequence of notes and figuring out where each note sits relative to the root of the key?
Or are you figuring out what the next note is by the interval from the last note? | 2020/08/06 | [
"https://music.stackexchange.com/questions/103638",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/71281/"
] | >
> when you're figuring out a melody by ear, are you listening to the
> sequence of notes and figuring out where each note sits relative to
> the root of the key? Or are you figuring out what the next note is by
> the interval from the last note?
>
>
>
All of those, and none of them.
The thing is, I don't "figur... | As someone with absolute pitch, when I sit down and transcribe a piece or melody by ear, I determine each note individually by ear regardless of whether the piece is atonal or not or what the note intervals are.
Whoops.
For particularly hard-to-hear notes, though, I do fall back to intervals.
(As an aside, I often s... |
103,638 | To all the people with good ears:
when you're figuring out a melody by ear, are you listening to the sequence of notes and figuring out where each note sits relative to the root of the key?
Or are you figuring out what the next note is by the interval from the last note? | 2020/08/06 | [
"https://music.stackexchange.com/questions/103638",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/71281/"
] | I don't rate my ear as good, but pretty good. (Last thing I tried to transcribe was *Making Our Dreams Come True* from memory. I'd say it was 85-90% right compared to the sheet music.)
I compare to the previous note. Also I make reference not to the tonic (not root) of the key, but to what I think is the surrounding c... | If you have perfect pitch, congratulations! None of the following probably applies.
If you have good but not perfect pitch, you can probably get by...if the key and the number of voices, counterpoint, and harmony isn't that complicated. I did this in my first music theory class when we had to transcribe 2-3 moving lin... |
103,638 | To all the people with good ears:
when you're figuring out a melody by ear, are you listening to the sequence of notes and figuring out where each note sits relative to the root of the key?
Or are you figuring out what the next note is by the interval from the last note? | 2020/08/06 | [
"https://music.stackexchange.com/questions/103638",
"https://music.stackexchange.com",
"https://music.stackexchange.com/users/71281/"
] | Many good answers here already, but I'd like to keep it simple:
**Use all the clues that you can get, starting from the easiest**.
If the interval from the previous note is obvious, use that.
If the interval to the root is what stands out, use that.
If you're not sure and you have an instrument with you, use that -... | I don't rate my ear as good, but pretty good. (Last thing I tried to transcribe was *Making Our Dreams Come True* from memory. I'd say it was 85-90% right compared to the sheet music.)
I compare to the previous note. Also I make reference not to the tonic (not root) of the key, but to what I think is the surrounding c... |
29,961,756 | My `Car.m` implementation file is as follows. Here I have 1 private method **engineStarting**.
Here I have used class extension concept to introduce
private method and I have also used `Car+Maintainance` as a category.
```
#import "Car.h"
//private methods
@interface Car()
-(BOOL) engineStarting;
@end
@implement... | 2015/04/30 | [
"https://Stackoverflow.com/questions/29961756",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4786045/"
] | Since *y* = *a* \* *b* ^ *x* is the same as log(*y*) = log(*a*) + *x* log(*b*) you can do
```
>> y = y(:);
>> x = x(:);
>> logy = log(y);
>> beta = regress(logy, [ones(size(x)), x]);
>> loga = beta(1);
>> logb = beta(2);
>> a = exp(loga);
>> b = exp(logb);
```
so the values of *a* and *b* are
```
>> a, b
a =
... | As an extension to the answer given by Chris Taylor, which provides the best linear fit in the logarithmic-transformed domain, you can find a better fit in the original domain by solving directly the non-linear problem with, for example, the [Gauss-Newton algorithm](http://en.wikipedia.org/wiki/Gauss%E2%80%93Newton_alg... |
29,961,756 | My `Car.m` implementation file is as follows. Here I have 1 private method **engineStarting**.
Here I have used class extension concept to introduce
private method and I have also used `Car+Maintainance` as a category.
```
#import "Car.h"
//private methods
@interface Car()
-(BOOL) engineStarting;
@end
@implement... | 2015/04/30 | [
"https://Stackoverflow.com/questions/29961756",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4786045/"
] | Since *y* = *a* \* *b* ^ *x* is the same as log(*y*) = log(*a*) + *x* log(*b*) you can do
```
>> y = y(:);
>> x = x(:);
>> logy = log(y);
>> beta = regress(logy, [ones(size(x)), x]);
>> loga = beta(1);
>> logb = beta(2);
>> a = exp(loga);
>> b = exp(logb);
```
so the values of *a* and *b* are
```
>> a, b
a =
... | One more option is to use MATLAB's [Curve Fitting Toolbox](http://www.mathworks.com/products/curvefitting/) which lets you generate the fit interactively, and can also emit the MATLAB code needed to run the fit.
 |
29,961,756 | My `Car.m` implementation file is as follows. Here I have 1 private method **engineStarting**.
Here I have used class extension concept to introduce
private method and I have also used `Car+Maintainance` as a category.
```
#import "Car.h"
//private methods
@interface Car()
-(BOOL) engineStarting;
@end
@implement... | 2015/04/30 | [
"https://Stackoverflow.com/questions/29961756",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4786045/"
] | As an extension to the answer given by Chris Taylor, which provides the best linear fit in the logarithmic-transformed domain, you can find a better fit in the original domain by solving directly the non-linear problem with, for example, the [Gauss-Newton algorithm](http://en.wikipedia.org/wiki/Gauss%E2%80%93Newton_alg... | One more option is to use MATLAB's [Curve Fitting Toolbox](http://www.mathworks.com/products/curvefitting/) which lets you generate the fit interactively, and can also emit the MATLAB code needed to run the fit.
 |
237 | I want to ask this question:
>
> **Who was the author of Hebrews?**
>
>
> Who was the author of Hebrews, or who are the likely candidates?
>
>
>
But I get the message:
>
> Oops! Your question couldn't be submitted because:
>
>
> It does not meet our quality standards.
>
>
>
What am I doing wrong? What r... | 2012/01/11 | [
"https://hermeneutics.meta.stackexchange.com/questions/237",
"https://hermeneutics.meta.stackexchange.com",
"https://hermeneutics.meta.stackexchange.com/users/150/"
] | Yes, any question like that would be off-topic here IMO - it might fit on C.SE? | In reference to Jacks [suggestion](https://hermeneutics.meta.stackexchange.com/a/231/36) that this might fit on C.SE, I could see this going a couple ways depending on what you had in mind.
* If you would like to know how different Christian traditions interpret that and perhaps what doctrines they build off of it, C.... |
2,805,987 | I have a tab control with draggable tabs. When the mouse is released it removes the selected tab from the tabControl and adds it to its new location. My problem is that the TabControl draws itself after removing the tab, and then again when adding the tab so there is a very noticeable flicker that shows the tab behind ... | 2010/05/10 | [
"https://Stackoverflow.com/questions/2805987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302677/"
] | I too have encountered this error and was unable to find a reason why it was happening. Like Joe Plante points out if it isn't working then something is wrong....
In my scenario I happened to give the Relative Layout an id (ie clicking in a blank space in the graphical layout) the same ID as my button. This was causi... | this class cast exception occurred while calling the widget type mismatch like you having one Image View image1, but you are calling that in java code by using
ImageButton ib=(ImageButto) findViewById(R.id.image1);
that time you get the error message like that |
2,805,987 | I have a tab control with draggable tabs. When the mouse is released it removes the selected tab from the tabControl and adds it to its new location. My problem is that the TabControl draws itself after removing the tab, and then again when adding the tab so there is a very noticeable flicker that shows the tab behind ... | 2010/05/10 | [
"https://Stackoverflow.com/questions/2805987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302677/"
] | I too have encountered this error and was unable to find a reason why it was happening. Like Joe Plante points out if it isn't working then something is wrong....
In my scenario I happened to give the Relative Layout an id (ie clicking in a blank space in the graphical layout) the same ID as my button. This was causi... | I met this in Android Studio 3.5, the IDE has not discover library by intelligence.
I solved this by manually insert the library:
```
import android.widget.Button;
``` |
2,805,987 | I have a tab control with draggable tabs. When the mouse is released it removes the selected tab from the tabControl and adds it to its new location. My problem is that the TabControl draws itself after removing the tab, and then again when adding the tab so there is a very noticeable flicker that shows the tab behind ... | 2010/05/10 | [
"https://Stackoverflow.com/questions/2805987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302677/"
] | My guess is that your XML view (my\_button) is not a button. Otherwise, are you sure that the id for your button is correct? It should read like "`android:id="@+id/my_button"`" as well as having a width and a height. Please post your XML file. | In my case, I missed that I'm using an ImageButton.
Check it too |
2,805,987 | I have a tab control with draggable tabs. When the mouse is released it removes the selected tab from the tabControl and adds it to its new location. My problem is that the TabControl draws itself after removing the tab, and then again when adding the tab so there is a very noticeable flicker that shows the tab behind ... | 2010/05/10 | [
"https://Stackoverflow.com/questions/2805987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302677/"
] | try this,
```
android.widget.Button myButton = (android.widget.Button)findViewById(R.id.my_button);
``` | I met this in Android Studio 3.5, the IDE has not discover library by intelligence.
I solved this by manually insert the library:
```
import android.widget.Button;
``` |
2,805,987 | I have a tab control with draggable tabs. When the mouse is released it removes the selected tab from the tabControl and adds it to its new location. My problem is that the TabControl draws itself after removing the tab, and then again when adding the tab so there is a very noticeable flicker that shows the tab behind ... | 2010/05/10 | [
"https://Stackoverflow.com/questions/2805987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302677/"
] | Is the exception a ClassCastException? If so then the view you are finding with the id `my_button` isn't a button. If it's a NullPointerException then there is no view with the id my\_button. This could be cause by not calling setContent() before you try to find the views. | In my case, I missed that I'm using an ImageButton.
Check it too |
2,805,987 | I have a tab control with draggable tabs. When the mouse is released it removes the selected tab from the tabControl and adds it to its new location. My problem is that the TabControl draws itself after removing the tab, and then again when adding the tab so there is a very noticeable flicker that shows the tab behind ... | 2010/05/10 | [
"https://Stackoverflow.com/questions/2805987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302677/"
] | Is the exception a ClassCastException? If so then the view you are finding with the id `my_button` isn't a button. If it's a NullPointerException then there is no view with the id my\_button. This could be cause by not calling setContent() before you try to find the views. | this class cast exception occurred while calling the widget type mismatch like you having one Image View image1, but you are calling that in java code by using
ImageButton ib=(ImageButto) findViewById(R.id.image1);
that time you get the error message like that |
2,805,987 | I have a tab control with draggable tabs. When the mouse is released it removes the selected tab from the tabControl and adds it to its new location. My problem is that the TabControl draws itself after removing the tab, and then again when adding the tab so there is a very noticeable flicker that shows the tab behind ... | 2010/05/10 | [
"https://Stackoverflow.com/questions/2805987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302677/"
] | My guess is that your XML view (my\_button) is not a button. Otherwise, are you sure that the id for your button is correct? It should read like "`android:id="@+id/my_button"`" as well as having a width and a height. Please post your XML file. | In my case, I had created an activity, named 'Button'. This contradict with button widget. When I change my activity name with "ButtonActivity", then the problem has gone. |
2,805,987 | I have a tab control with draggable tabs. When the mouse is released it removes the selected tab from the tabControl and adds it to its new location. My problem is that the TabControl draws itself after removing the tab, and then again when adding the tab so there is a very noticeable flicker that shows the tab behind ... | 2010/05/10 | [
"https://Stackoverflow.com/questions/2805987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302677/"
] | I actually encountered this in code I was doing. Basically it was the "If it looks like a duck and if it sounds like a duck, then why the bloody *insert expletive here* aren't you seeing it as a duck?" situation. I changed the equivalent of android:id="@+id/someid" by changing it to equivalent of android:id="@+id/somei... | Check if you have missed this line
`import android.view.View;` |
2,805,987 | I have a tab control with draggable tabs. When the mouse is released it removes the selected tab from the tabControl and adds it to its new location. My problem is that the TabControl draws itself after removing the tab, and then again when adding the tab so there is a very noticeable flicker that shows the tab behind ... | 2010/05/10 | [
"https://Stackoverflow.com/questions/2805987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302677/"
] | My guess is that your XML view (my\_button) is not a button. Otherwise, are you sure that the id for your button is correct? It should read like "`android:id="@+id/my_button"`" as well as having a width and a height. Please post your XML file. | Check if you have missed this line
`import android.view.View;` |
2,805,987 | I have a tab control with draggable tabs. When the mouse is released it removes the selected tab from the tabControl and adds it to its new location. My problem is that the TabControl draws itself after removing the tab, and then again when adding the tab so there is a very noticeable flicker that shows the tab behind ... | 2010/05/10 | [
"https://Stackoverflow.com/questions/2805987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302677/"
] | try this,
```
android.widget.Button myButton = (android.widget.Button)findViewById(R.id.my_button);
``` | My guess is that your XML view (my\_button) is not a button. Otherwise, are you sure that the id for your button is correct? It should read like "`android:id="@+id/my_button"`" as well as having a width and a height. Please post your XML file. |
40,543,267 | I have set a function as `action` called `coler` and bind it to my component but it cannot identify it with the error:
```
props.color is not a function
```
The action function is:
```
export default function collorSetter(color){
return {type:'Color',payload:color};
}
```
The component is:
```
import Reac... | 2016/11/11 | [
"https://Stackoverflow.com/questions/40543267",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2380115/"
] | I have doubts that the query you are using is the best way to do what you want to achieve since it seems that the query and the subquery are returning the same value
Anyway this is how you can obtain the same exact query you asked
```
$q = $this->Articles->find();
$q->select([$q->func()->count('*')])
->where(['u... | Ariala's comment almost good but i think this code is more flexible because the suquery is not contains user id fixed condition:
```
$q = $this->Articles->find();
$q->select([$q->func()->count('*')])
->where(['Articles.user_id = Users.id']);
$q2 = $this->Users->find()
->select(['id', 'first_name', '... |
341,656 | Microsoft Security Essentials detected Google Chrome as a Password Stealer:
>
> **PWS:Win32/Zbot**
>
>
> Category: Password Stealer
>
>
> Description: This program is dangerous and captures user passwords.
>
>
> Recommended action: Remove this software immediately.
>
>
> Security Essentials detected programs ... | 2011/09/30 | [
"https://superuser.com/questions/341656",
"https://superuser.com",
"https://superuser.com/users/60949/"
] | This is how I fixed it:
1. Delete the entire Chrome directory under `%LocalAppData%`.
2. Download the Google Chrome installer using another browser.
3. Disable Microsoft Security Essentials.
4. Install Google Chrome.
5. Enable Microsoft Security Essentials. | I do believe Chrome launches its extensions in a secured environment within itself.
I would disable/delete all your extensions and scan the same file. If it is not detected as the same file, then an extension is the cause, and could be a real threat.
Of course MSE does use behavioral detection, so the chances of it b... |
341,656 | Microsoft Security Essentials detected Google Chrome as a Password Stealer:
>
> **PWS:Win32/Zbot**
>
>
> Category: Password Stealer
>
>
> Description: This program is dangerous and captures user passwords.
>
>
> Recommended action: Remove this software immediately.
>
>
> Security Essentials detected programs ... | 2011/09/30 | [
"https://superuser.com/questions/341656",
"https://superuser.com",
"https://superuser.com/users/60949/"
] | As a workaround for now, the [current Chrome Beta](http://www.google.com/landing/chrome/beta/) doesn't trip the MSE stuff.
**UPDATE:** Microsoft confirms it's a false positive and releases a fix, [read about it](http://www.zdnet.com/blog/bott/users-report-microsoft-security-essentials-removes-google-chrome/4006). | I do believe Chrome launches its extensions in a secured environment within itself.
I would disable/delete all your extensions and scan the same file. If it is not detected as the same file, then an extension is the cause, and could be a real threat.
Of course MSE does use behavioral detection, so the chances of it b... |
341,656 | Microsoft Security Essentials detected Google Chrome as a Password Stealer:
>
> **PWS:Win32/Zbot**
>
>
> Category: Password Stealer
>
>
> Description: This program is dangerous and captures user passwords.
>
>
> Recommended action: Remove this software immediately.
>
>
> Security Essentials detected programs ... | 2011/09/30 | [
"https://superuser.com/questions/341656",
"https://superuser.com",
"https://superuser.com/users/60949/"
] | As a workaround for now, the [current Chrome Beta](http://www.google.com/landing/chrome/beta/) doesn't trip the MSE stuff.
**UPDATE:** Microsoft confirms it's a false positive and releases a fix, [read about it](http://www.zdnet.com/blog/bott/users-report-microsoft-security-essentials-removes-google-chrome/4006). | This is how I fixed it:
1. Delete the entire Chrome directory under `%LocalAppData%`.
2. Download the Google Chrome installer using another browser.
3. Disable Microsoft Security Essentials.
4. Install Google Chrome.
5. Enable Microsoft Security Essentials. |
8,383,583 | I have a table which has around 1 million rows (size on physical disk is nearly 8 GB since it has a text column) which takes a lot of time for any transaction. In particular for "select" it takes enormous time for e.g. it takes around 20 minutes for count query without any condition i.e., `select count(*) from TestPerf... | 2011/12/05 | [
"https://Stackoverflow.com/questions/8383583",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1081294/"
] | >
> How can I speed up transaction of this table without deleting any data?
>
>
>
1 million rows is *not* a lot of data. 8Gb is a sizable amount of data.
Move the text type column into a sperate table (with a 1:1 relationship). Reduce the size of those varchar tables to the minimum size needed to hold the data (o... | Run EXPLAIN on your query (which you should post for us to see). This will help identify what indices your query is attempting to use and what columns are using a full table scan.
Also, don't do select count \*, instead count your primary recid so it can just count using your index. |
30,640,968 | I have a view that takes logged in user input then runs a function to produce a report. The result is returned in an HTML page. I render the report to PDF as well.
I create a PDF with the content from my function and save it in some folder on the server. I don't want to have my server filled with files from every run,... | 2015/06/04 | [
"https://Stackoverflow.com/questions/30640968",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1398955/"
] | If someone is interested in this question I solved it another way. I do not check if the user logs out or create any cron script respectively.
I created an Object that runs a counting thread for every pdf created. After elapsed time, pdf is deleted.
Code looks like this:
```
class TimeSet(set):
def add(self, ite... | Clicking the log out button does the same thing as expiring the session, right?
There are two ways you can do this: 1) add code to the session expiration routine that cleans up the temporary files, and/or 2) write a `cron` script that checks for active sessions and cleans up the temporary files for inactive sessions. |
6,528 | I want to talk about a specific class of opinion based questions That I believe should be handled differently from the standard 'close it'.
We all know that we don't want to be in a position where there conflicting answers and people vote them up or down based on their preferences. SE isn't that kind of site and we d... | 2018/05/01 | [
"https://christianity.meta.stackexchange.com/questions/6528",
"https://christianity.meta.stackexchange.com",
"https://christianity.meta.stackexchange.com/users/162/"
] | While your answer is good for what you've proposed here, note that there are five other answers doing the exact opposite, as well as people debating definitions in comments on the answers (of which I'm a little guilty.)
This is a lot of mess in order to prevent the OP from hypothetically feel like it's a slap on the w... | As I read your question and the answers I remembered a quote from [Korvin Starmast](https://christianity.meta.stackexchange.com/questions/6358/does-this-site-have-a-novel-approach-to-christianity/6359#6359)
>
> Because this community is not interested (collectively) in the great, 1900-year-long shouting match of "I'm... |
6,528 | I want to talk about a specific class of opinion based questions That I believe should be handled differently from the standard 'close it'.
We all know that we don't want to be in a position where there conflicting answers and people vote them up or down based on their preferences. SE isn't that kind of site and we d... | 2018/05/01 | [
"https://christianity.meta.stackexchange.com/questions/6528",
"https://christianity.meta.stackexchange.com",
"https://christianity.meta.stackexchange.com/users/162/"
] | It certainly is frustrating to me that so many questions by new users end up getting closed. We have one of the highest question closure rates on the entire Stack Exchange network, and you're right that closing questions can be interpreted as an insult or "slap on the wrist."
This is true regardless of why we close t... | As I read your question and the answers I remembered a quote from [Korvin Starmast](https://christianity.meta.stackexchange.com/questions/6358/does-this-site-have-a-novel-approach-to-christianity/6359#6359)
>
> Because this community is not interested (collectively) in the great, 1900-year-long shouting match of "I'm... |
13,653,394 | I have two entities that share an abstract class creating class table inheritance. I can query for the entities by using the abstract class' repository and get all the entities that extend the abstract class as the result.
```
$qb = $this->createQueryBuilder('c')
->where('c.featured = true')
->orderBy('c.stic... | 2012/11/30 | [
"https://Stackoverflow.com/questions/13653394",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/947655/"
] | Better to use FQL in this case. More suited to this type of nested question.
```
select uid, rsvp_status from event_member where eid = <EVENT_ID> and uid IN (SELECT uid2 from friend where uid1 = me())
```
That will return all friends of the person logged in who are attending the event you specify. | The accepted answer doesn't work anymore, as facebook no longer allows event attendee requests without one of the event admins' access keys [(see Graph api reference)](https://developers.facebook.com/docs/graph-api/reference/event/attending/). As they also [removed the option](https://stackoverflow.com/questions/246403... |
1,690,032 | Let $k$ be a positive interger number, and define the sequence $\{P\_k(n)\}\_n$ as: $P\_k(0)=0$, $P\_k(1)=1$ and for every $n \geq 2$, $P\_{k}(n)=k\cdot P\_k(n-1)+P\_k(n-2)$. I want to find:
1-$H\_k=\lim\_{ n \to \infty }\frac{P\_k(n)}{P\_k({n-1})}$ and
2-$M=\sum\_{k=1}^{\infty}({H\_k }-k)$ | 2016/03/09 | [
"https://math.stackexchange.com/questions/1690032",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/268101/"
] | **Hint** If you assume by contradiction that $-1 \in U$, then prove first that $f(z)=g(z)$ on $U \backslash \{-1\}$.
Then use the fact that $f$ is continuous at $-1$, and hence
$$f(-1)=\lim\_{z \to -1} \frac{z}{z+1}=\infty$$ | Hint: Note that a holomorphic function on a open and connected set $ U $ of $\mathbb {C}$ is uniquely determined by a non discrete subset of $U$. |
297,328 | I have a VPS running Windows 2008 Web Edition 32bit.
Currently it is rebooting at random times every day, usually 2-3 times a day for no reason that I can see.
The hosting company assures me that the host server is fine and not causing the reboots on my node, but there's nothing whatsoever in the event viewer that wou... | 2011/08/03 | [
"https://serverfault.com/questions/297328",
"https://serverfault.com",
"https://serverfault.com/users/54764/"
] | The backup DNS servers (one or more) will be slaves to your primary DNS server. Changes to the primary DNS server will be picked up by the slaves. This may be done on a periodic basis, or in response from a notification from the primary server. This is one cause of delays in changes to DNS being recognized across the I... | You are right -- you don't need a third-party secondary in your situation, and it'll offer few improvements to you, provided that all your other services (including the mail) are still hosted on a single box in a single network.
Yes, both the primary and secondary are run next to each other; both are supposed to have ... |
297,328 | I have a VPS running Windows 2008 Web Edition 32bit.
Currently it is rebooting at random times every day, usually 2-3 times a day for no reason that I can see.
The hosting company assures me that the host server is fine and not causing the reboots on my node, but there's nothing whatsoever in the event viewer that wou... | 2011/08/03 | [
"https://serverfault.com/questions/297328",
"https://serverfault.com",
"https://serverfault.com/users/54764/"
] | You are right -- you don't need a third-party secondary in your situation, and it'll offer few improvements to you, provided that all your other services (including the mail) are still hosted on a single box in a single network.
Yes, both the primary and secondary are run next to each other; both are supposed to have ... | in reality, in much of the world, the backup DNS server is never queried if the primary goes down. because its an extra step for the resolver. it doesnt want to do that work, and it wont.
so the backup us useless. if the primary goes down, the users dns query will return nothing (even if there is a completely fine DNS... |
297,328 | I have a VPS running Windows 2008 Web Edition 32bit.
Currently it is rebooting at random times every day, usually 2-3 times a day for no reason that I can see.
The hosting company assures me that the host server is fine and not causing the reboots on my node, but there's nothing whatsoever in the event viewer that wou... | 2011/08/03 | [
"https://serverfault.com/questions/297328",
"https://serverfault.com",
"https://serverfault.com/users/54764/"
] | It is a must of the RFC. See <http://www.ietf.org/rfc/rfc1035.txt>
To cite the important things from page 4:
>
> The DNS requires that all zones be redundantly supported by more than
> one name server. Designated secondary servers can acquire zones and
> check for updates from the primary server using the zone tra... | in reality, in much of the world, the backup DNS server is never queried if the primary goes down. because its an extra step for the resolver. it doesnt want to do that work, and it wont.
so the backup us useless. if the primary goes down, the users dns query will return nothing (even if there is a completely fine DNS... |
297,328 | I have a VPS running Windows 2008 Web Edition 32bit.
Currently it is rebooting at random times every day, usually 2-3 times a day for no reason that I can see.
The hosting company assures me that the host server is fine and not causing the reboots on my node, but there's nothing whatsoever in the event viewer that wou... | 2011/08/03 | [
"https://serverfault.com/questions/297328",
"https://serverfault.com",
"https://serverfault.com/users/54764/"
] | The major point in having a secondary DNS server is as backup in the event the primary DNS server handling your domain goes down. In this case, your server would be still up, and so without having a backup, nobody could get to your server possibly costing you lots of lost customers (i.e. REAL MONEY).
A secondary DNS s... | >
> Is the point of having secondary DNS
>
>
>
Only extremely small organizations can do everything on a single server. I have many servers, I want my email to be able to continue operating even though the web server is down. I have services hosted on external networks that I want to stay up even if my Internet li... |
297,328 | I have a VPS running Windows 2008 Web Edition 32bit.
Currently it is rebooting at random times every day, usually 2-3 times a day for no reason that I can see.
The hosting company assures me that the host server is fine and not causing the reboots on my node, but there's nothing whatsoever in the event viewer that wou... | 2011/08/03 | [
"https://serverfault.com/questions/297328",
"https://serverfault.com",
"https://serverfault.com/users/54764/"
] | It is a must of the RFC. See <http://www.ietf.org/rfc/rfc1035.txt>
To cite the important things from page 4:
>
> The DNS requires that all zones be redundantly supported by more than
> one name server. Designated secondary servers can acquire zones and
> check for updates from the primary server using the zone tra... | You don't need to switch to the backup it's automagic. If a DNS request for a name within your domain gets as far as querying (remember DNS is heavily cahed) you servers then if your primary NS server doesn't respond, the secondary NS server will be queried.
If you host your DNS away from the server hosting the servi... |
297,328 | I have a VPS running Windows 2008 Web Edition 32bit.
Currently it is rebooting at random times every day, usually 2-3 times a day for no reason that I can see.
The hosting company assures me that the host server is fine and not causing the reboots on my node, but there's nothing whatsoever in the event viewer that wou... | 2011/08/03 | [
"https://serverfault.com/questions/297328",
"https://serverfault.com",
"https://serverfault.com/users/54764/"
] | The backup DNS servers (one or more) will be slaves to your primary DNS server. Changes to the primary DNS server will be picked up by the slaves. This may be done on a periodic basis, or in response from a notification from the primary server. This is one cause of delays in changes to DNS being recognized across the I... | You don't need to switch to the backup it's automagic. If a DNS request for a name within your domain gets as far as querying (remember DNS is heavily cahed) you servers then if your primary NS server doesn't respond, the secondary NS server will be queried.
If you host your DNS away from the server hosting the servi... |
297,328 | I have a VPS running Windows 2008 Web Edition 32bit.
Currently it is rebooting at random times every day, usually 2-3 times a day for no reason that I can see.
The hosting company assures me that the host server is fine and not causing the reboots on my node, but there's nothing whatsoever in the event viewer that wou... | 2011/08/03 | [
"https://serverfault.com/questions/297328",
"https://serverfault.com",
"https://serverfault.com/users/54764/"
] | The major point in having a secondary DNS server is as backup in the event the primary DNS server handling your domain goes down. In this case, your server would be still up, and so without having a backup, nobody could get to your server possibly costing you lots of lost customers (i.e. REAL MONEY).
A secondary DNS s... | It is a must of the RFC. See <http://www.ietf.org/rfc/rfc1035.txt>
To cite the important things from page 4:
>
> The DNS requires that all zones be redundantly supported by more than
> one name server. Designated secondary servers can acquire zones and
> check for updates from the primary server using the zone tra... |
297,328 | I have a VPS running Windows 2008 Web Edition 32bit.
Currently it is rebooting at random times every day, usually 2-3 times a day for no reason that I can see.
The hosting company assures me that the host server is fine and not causing the reboots on my node, but there's nothing whatsoever in the event viewer that wou... | 2011/08/03 | [
"https://serverfault.com/questions/297328",
"https://serverfault.com",
"https://serverfault.com/users/54764/"
] | The major point in having a secondary DNS server is as backup in the event the primary DNS server handling your domain goes down. In this case, your server would be still up, and so without having a backup, nobody could get to your server possibly costing you lots of lost customers (i.e. REAL MONEY).
A secondary DNS s... | The backup DNS servers (one or more) will be slaves to your primary DNS server. Changes to the primary DNS server will be picked up by the slaves. This may be done on a periodic basis, or in response from a notification from the primary server. This is one cause of delays in changes to DNS being recognized across the I... |
297,328 | I have a VPS running Windows 2008 Web Edition 32bit.
Currently it is rebooting at random times every day, usually 2-3 times a day for no reason that I can see.
The hosting company assures me that the host server is fine and not causing the reboots on my node, but there's nothing whatsoever in the event viewer that wou... | 2011/08/03 | [
"https://serverfault.com/questions/297328",
"https://serverfault.com",
"https://serverfault.com/users/54764/"
] | >
> Is the point of having secondary DNS
>
>
>
Only extremely small organizations can do everything on a single server. I have many servers, I want my email to be able to continue operating even though the web server is down. I have services hosted on external networks that I want to stay up even if my Internet li... | The backup DNS servers (one or more) will be slaves to your primary DNS server. Changes to the primary DNS server will be picked up by the slaves. This may be done on a periodic basis, or in response from a notification from the primary server. This is one cause of delays in changes to DNS being recognized across the I... |
297,328 | I have a VPS running Windows 2008 Web Edition 32bit.
Currently it is rebooting at random times every day, usually 2-3 times a day for no reason that I can see.
The hosting company assures me that the host server is fine and not causing the reboots on my node, but there's nothing whatsoever in the event viewer that wou... | 2011/08/03 | [
"https://serverfault.com/questions/297328",
"https://serverfault.com",
"https://serverfault.com/users/54764/"
] | You don't need to switch to the backup it's automagic. If a DNS request for a name within your domain gets as far as querying (remember DNS is heavily cahed) you servers then if your primary NS server doesn't respond, the secondary NS server will be queried.
If you host your DNS away from the server hosting the servi... | in reality, in much of the world, the backup DNS server is never queried if the primary goes down. because its an extra step for the resolver. it doesnt want to do that work, and it wont.
so the backup us useless. if the primary goes down, the users dns query will return nothing (even if there is a completely fine DNS... |
1,917,577 | Find the limit if any of
$$ { \lim\_{z \rightarrow 3-4i}} \frac{(\bar z-3-4i)^4}{| z-3+4i|^4}$$
I have no idea how to start this question. Can anyone give a hint? Should i use L'hopital's Rule? | 2016/09/07 | [
"https://math.stackexchange.com/questions/1917577",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/187985/"
] | Yes it is ! Just take $$\varphi: \mathbb Z\longrightarrow M$$
defined by $$\varphi(m)= (m,-m).$$
The surjectivity is obvious. For the injectivity, it's easy to prove that $\ker \varphi=\{0\}.$ | The pair $(m, -m)$ is an **element** of $\mathbb Z^2$
$\mathbb Z$ is a **set**, and with the operation $+$ it is a **group**.
---
Speaking about homomorphisms between the two makes very little sensem because $(m, -m)$ is not a group (because even though technically, it is a set of two elements, you haven't defined a... |
27,065,249 | It doesn't seem to impact anything in my app... yet. I'm using the Android support libraries for the first time (my projects to date have not used support libraries), but this is a new project without much in the way of customization yet. Activities were generated by Android Studio 0.9.2 and implement Navigation Drawer... | 2014/11/21 | [
"https://Stackoverflow.com/questions/27065249",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3576831/"
] | I would like to add on top of what @Monte Creasor explained.
I have had the same issue and consulted [this bug report](https://code.google.com/p/android/issues/detail?id=91424) which basically says that the problem might be caused by com.android.support:appcompat-v7:21.0.3, on of the main dependencies required to use A... | These errors occur when you run android studio 1.0 using the sliding drawer sample WITHOUT adding any additional code and using all the defaults the project creation wizard offers. So it would seem to be an Android Studio problem and not a developer coding error. |
27,065,249 | It doesn't seem to impact anything in my app... yet. I'm using the Android support libraries for the first time (my projects to date have not used support libraries), but this is a new project without much in the way of customization yet. Activities were generated by Android Studio 0.9.2 and implement Navigation Drawer... | 2014/11/21 | [
"https://Stackoverflow.com/questions/27065249",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3576831/"
] | These errors occur when you run android studio 1.0 using the sliding drawer sample WITHOUT adding any additional code and using all the defaults the project creation wizard offers. So it would seem to be an Android Studio problem and not a developer coding error. | I had the same issue, also I wasn't able to get my ListFragment scrollable. Used v4 support library 21.0.3 before and upgraded to 22.0.0.
This fixed my problems! |
27,065,249 | It doesn't seem to impact anything in my app... yet. I'm using the Android support libraries for the first time (my projects to date have not used support libraries), but this is a new project without much in the way of customization yet. Activities were generated by Android Studio 0.9.2 and implement Navigation Drawer... | 2014/11/21 | [
"https://Stackoverflow.com/questions/27065249",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3576831/"
] | These errors occur when you run android studio 1.0 using the sliding drawer sample WITHOUT adding any additional code and using all the defaults the project creation wizard offers. So it would seem to be an Android Studio problem and not a developer coding error. | I'm currently going through my logs generated from using Sony's remote device lab, the same warning appears so it's not a Android Studio problem. I suspect its a problem with the ActionBar theme used during the development of the application. |
27,065,249 | It doesn't seem to impact anything in my app... yet. I'm using the Android support libraries for the first time (my projects to date have not used support libraries), but this is a new project without much in the way of customization yet. Activities were generated by Android Studio 0.9.2 and implement Navigation Drawer... | 2014/11/21 | [
"https://Stackoverflow.com/questions/27065249",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3576831/"
] | I would like to add on top of what @Monte Creasor explained.
I have had the same issue and consulted [this bug report](https://code.google.com/p/android/issues/detail?id=91424) which basically says that the problem might be caused by com.android.support:appcompat-v7:21.0.3, on of the main dependencies required to use A... | I had the same issue, also I wasn't able to get my ListFragment scrollable. Used v4 support library 21.0.3 before and upgraded to 22.0.0.
This fixed my problems! |
27,065,249 | It doesn't seem to impact anything in my app... yet. I'm using the Android support libraries for the first time (my projects to date have not used support libraries), but this is a new project without much in the way of customization yet. Activities were generated by Android Studio 0.9.2 and implement Navigation Drawer... | 2014/11/21 | [
"https://Stackoverflow.com/questions/27065249",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3576831/"
] | I would like to add on top of what @Monte Creasor explained.
I have had the same issue and consulted [this bug report](https://code.google.com/p/android/issues/detail?id=91424) which basically says that the problem might be caused by com.android.support:appcompat-v7:21.0.3, on of the main dependencies required to use A... | I'm currently going through my logs generated from using Sony's remote device lab, the same warning appears so it's not a Android Studio problem. I suspect its a problem with the ActionBar theme used during the development of the application. |
141,892 | Our user actively use the OOB "reusable content" function to dynamic update their pages. Each "reusable content" item is applying to 10-20 pages.
Let's say one day user is going to remove one of "reusable content" item. How can he list all related pages for review purpose? | 2015/05/07 | [
"https://sharepoint.stackexchange.com/questions/141892",
"https://sharepoint.stackexchange.com",
"https://sharepoint.stackexchange.com/users/22423/"
] | Unless you click on "Automatic Update" it simple copy-pastes in the resuable-content in a new page and then forgets about it.
If you do have Automatic Update on the other hand, the pages instead store references to the resuable content (not the content itself) and fetches the reusable content on render:
>
> The "sto... | If the content is a section of text, you could attempt to use SharePoint's search to find all pages with this particular text.
Perhaps you could also customise Search to search in page sources, although I have never done this myself. |
159,239 | I want to simplify this expression:
```
BooleanMinimize[(A ∧ ¬ B ∧ C ∧ ¬ D) ∨ (A ∧ B ∧ ¬ C ∧ ¬ D) ∨ (A ∧ B ∧ C ∧ ¬ D)]
```
And I get this:
```
(A ∧ B ∧ ¬ D) ∨ (A ∧ C ∧ ¬ D)
```
But using a Karnaugh Map and "don't cares" I get `¬ D`. Is there anyway that I can get similar answer in *Mathematica*? | 2017/11/04 | [
"https://mathematica.stackexchange.com/questions/159239",
"https://mathematica.stackexchange.com",
"https://mathematica.stackexchange.com/users/44692/"
] | An arbitrary function with "don't cares" can be defined using either `BooleanFunction` or `BooleanConvert`, but in those cases, Mathematica makes no effort to find the minimal representation of such a function.
Instead, use `BooleanMinimize` with the optional third argument: an assumed condition on the variables. In y... | Thank's to @Misha Lavrov (a great thanks !), here is how you can solve the problem :
```
BooleanMinimize[
BooleanFunction[{
{1,0,1,0}-> 1,
{1,0,1,1}-> 0,
{1,1,0,0}-> 1,
{1,1,0,1}-> 0,
{1,1,1,0}-> 1,
{1,1,1,1}-> 0
},{a,b,c,d}],
"SOP" (* = "DNF" *),
... |
46,874,437 | I have a `socketChannel` (java.nio.channels.SocketChannel) listening for reading requests (from multiple clients). It stores each request in a **Request Queue**.
Also `socketChannel.configureBlocking(false)`
Then I want the multiple threads to take one request at a time from the R**equest Queue** and write to the `s... | 2017/10/22 | [
"https://Stackoverflow.com/questions/46874437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6003136/"
] | Using magic numbers like this is fairly unmaintainable (adding new allowed times isn't clean, you have to edit conditions and such), your version with the array was better. The rest of this answer focuses on getting that solution to work how you wanted it to:
It's perfectly efficient (could make it more efficient by u... | To make something easy to understand you can avoid using those magic numbers or wrap them in a meaningful structure like `checkTime` and then use it for this kind of check. That way suppose next time you are asked to build a check time with some different times you won't have to look for hardcoded times and replace wit... |
46,874,437 | I have a `socketChannel` (java.nio.channels.SocketChannel) listening for reading requests (from multiple clients). It stores each request in a **Request Queue**.
Also `socketChannel.configureBlocking(false)`
Then I want the multiple threads to take one request at a time from the R**equest Queue** and write to the `s... | 2017/10/22 | [
"https://Stackoverflow.com/questions/46874437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6003136/"
] | Check the return of scanf to make sure it was successful. If not, the input stream will need to be cleaned of pending characters.
```
#include <stdio.h>
typedef struct{
char movieName[20];
int screenTime;
float price;
int seatNum;
} MovieTicket;
int main( void) {
MovieTicket ticket;
int resu... | To make something easy to understand you can avoid using those magic numbers or wrap them in a meaningful structure like `checkTime` and then use it for this kind of check. That way suppose next time you are asked to build a check time with some different times you won't have to look for hardcoded times and replace wit... |
19,150,606 | ```
<HTML>
<HEAD>
<TITLE> <b> Select the colors you want </b> </TITLE>
</HEAD>
<BODY>
<FORM action="colortables.php" method='post'>
<p>Pick one or more of the colors: </p><br/>
<select name='bcolors[]' size=8 multiple>
<?php
$pickcolors = array('red', 'blue', 'green', 'yellow', 'orange', 'black', 'white' 'purple');
... | 2013/10/03 | [
"https://Stackoverflow.com/questions/19150606",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1883008/"
] | Try this
I fixed this by editing the file "/usr/local/hbase-0.94.1/conf/hbase-env.sh" and adding the element "export HBASE\_CLASSPATH=/usr/local/hbase-0.94.1/lib".
The zookeeper JAR is located in the HBase installation at "/usr/local/hbase-0.94.1/lib". | Just include the zookeeper jar file in your build path located in HBASE.
It should solve your problem. |
19,150,606 | ```
<HTML>
<HEAD>
<TITLE> <b> Select the colors you want </b> </TITLE>
</HEAD>
<BODY>
<FORM action="colortables.php" method='post'>
<p>Pick one or more of the colors: </p><br/>
<select name='bcolors[]' size=8 multiple>
<?php
$pickcolors = array('red', 'blue', 'green', 'yellow', 'orange', 'black', 'white' 'purple');
... | 2013/10/03 | [
"https://Stackoverflow.com/questions/19150606",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1883008/"
] | Try this
I fixed this by editing the file "/usr/local/hbase-0.94.1/conf/hbase-env.sh" and adding the element "export HBASE\_CLASSPATH=/usr/local/hbase-0.94.1/lib".
The zookeeper JAR is located in the HBase installation at "/usr/local/hbase-0.94.1/lib". | Your class might not get access via your code try using distributed cache and load the jar files, use the link to set the configurations : <https://hadoop.apache.org/docs/r2.4.1/api/org/apache/hadoop/filecache/DistributedCache.html> |
25,177,674 | I am working on a page which have some pop ups. I want to test all the HTML element availability on all the pop ups. SO to know current frame no. Is there any method available like `Selenium.getFrameNumber()` or something so that I can switch to required frames using
```
Selenium.switchTo().frame(0); or Selenium.sw... | 2014/08/07 | [
"https://Stackoverflow.com/questions/25177674",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1944816/"
] | In one project I made, I used a ArrayList to keep track of the windows.
```
List<String> windowList = new ArrayList<String>();
windowList.add( driver.getWindowHandle() );
```
The initial window always populates the first entry in the list and never changes.
Subsequent windows get added onto the END of the list like... | There is no default option available for that, but you can get this in different ways,
Store the list of iframes in the page,
```
List<WebElement> myIframes= driver.findElements(By.tagName("iframe"));
```
and you can iterate to get to the required frame with their id.
you can get the total no. of frames,
```
myI... |
15,498,702 | I'm using [JQuery Form Plugin](http://malsup.com/jquery/form/) for AJAX file uploader.
The (html) form is **created dynamically**, and looks like this:
```
<form id="formUpload" action="fileReceiver.php" method="post" enctype="multipart/form-data">
<input type="file" name="fileUpload" multiple>
<input type="s... | 2013/03/19 | [
"https://Stackoverflow.com/questions/15498702",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/690714/"
] | The proper way to create an instance of a type is to call the constructor on the type and assign the result to a variable of that type:
```
var
Param: CustomParam;
Param := CustomParam.Create;
```
Instances created that way are already references, so there's rarely a need for an additional pointer.
If you really... | Your problem is that your declaration
pCustomParam = CustomParam
defines pCustomParam to be of type CustomParam, not a POINTER to Customparam.
Hence `pointerToCustomParam` will not be a POINTER, but a CustomParam - hence the 'rubbish contents'
Try
pCustomParam = ^CustomParam; |
1,262,915 | I have an external style resource in a resource dictionary I'm referencing with x:Key. It has an x:TargetType specifying a target (TextBlock). Is it possible to apply this to a control containing a TextBlock and have all TextBlock elements within that control have the style applied?
Thanks,
Robert | 2009/08/11 | [
"https://Stackoverflow.com/questions/1262915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/125601/"
] | The easiest way to do that would be to define a Style within the Control that is based on your external style resource, but don't specify an x:Key, just the TargetType.
```
<Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource SomeOtherStyle}">
```
Without a key, it'll apply itself to all TextBlocks within... | No, but you can automatically apply a style to all elements of a certain type, like this:
```
<!-- Applies to all buttons in scope of this style -->
<Style x:Key="{x:Type Button}" TargetType="{x:Type Button}">
...
</Style>
``` |
1,262,915 | I have an external style resource in a resource dictionary I'm referencing with x:Key. It has an x:TargetType specifying a target (TextBlock). Is it possible to apply this to a control containing a TextBlock and have all TextBlock elements within that control have the style applied?
Thanks,
Robert | 2009/08/11 | [
"https://Stackoverflow.com/questions/1262915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/125601/"
] | To expand a bit on other comments. When you use the syntax as Brandon showed:
```
<Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource SomeOtherStyle}">
```
The BasedOn="" is basically a kind of "inheritance" of style. This style will have as its base set of setters the ones from the style it is based on.... | No, but you can automatically apply a style to all elements of a certain type, like this:
```
<!-- Applies to all buttons in scope of this style -->
<Style x:Key="{x:Type Button}" TargetType="{x:Type Button}">
...
</Style>
``` |
1,262,915 | I have an external style resource in a resource dictionary I'm referencing with x:Key. It has an x:TargetType specifying a target (TextBlock). Is it possible to apply this to a control containing a TextBlock and have all TextBlock elements within that control have the style applied?
Thanks,
Robert | 2009/08/11 | [
"https://Stackoverflow.com/questions/1262915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/125601/"
] | The easiest way to do that would be to define a Style within the Control that is based on your external style resource, but don't specify an x:Key, just the TargetType.
```
<Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource SomeOtherStyle}">
```
Without a key, it'll apply itself to all TextBlocks within... | I think this is what you are looking for:
Your custom user control "test":
```
<UserControl x:Class="WpfApplication4.test"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="300" Width="300">
<Grid>
<TextBlock>test</... |
1,262,915 | I have an external style resource in a resource dictionary I'm referencing with x:Key. It has an x:TargetType specifying a target (TextBlock). Is it possible to apply this to a control containing a TextBlock and have all TextBlock elements within that control have the style applied?
Thanks,
Robert | 2009/08/11 | [
"https://Stackoverflow.com/questions/1262915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/125601/"
] | The easiest way to do that would be to define a Style within the Control that is based on your external style resource, but don't specify an x:Key, just the TargetType.
```
<Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource SomeOtherStyle}">
```
Without a key, it'll apply itself to all TextBlocks within... | To expand a bit on other comments. When you use the syntax as Brandon showed:
```
<Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource SomeOtherStyle}">
```
The BasedOn="" is basically a kind of "inheritance" of style. This style will have as its base set of setters the ones from the style it is based on.... |
1,262,915 | I have an external style resource in a resource dictionary I'm referencing with x:Key. It has an x:TargetType specifying a target (TextBlock). Is it possible to apply this to a control containing a TextBlock and have all TextBlock elements within that control have the style applied?
Thanks,
Robert | 2009/08/11 | [
"https://Stackoverflow.com/questions/1262915",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/125601/"
] | To expand a bit on other comments. When you use the syntax as Brandon showed:
```
<Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource SomeOtherStyle}">
```
The BasedOn="" is basically a kind of "inheritance" of style. This style will have as its base set of setters the ones from the style it is based on.... | I think this is what you are looking for:
Your custom user control "test":
```
<UserControl x:Class="WpfApplication4.test"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="300" Width="300">
<Grid>
<TextBlock>test</... |
44,057,920 | I've a div
```
@{int index = 0;}
@for (int i = 0; i < Model.lstFiles.Count; i++)
{
<div id="attachmentDetail(@index)" name="attachmentDetail(@index)" class="panel-body">
<a asp-action="Download" asp-controller="Admin" asp-route-realName=Model.lstFiles[i].RealName>@Model.lstFiles[i].FileName</a>
... | 2017/05/18 | [
"https://Stackoverflow.com/questions/44057920",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2660342/"
] | >
> how i can get this selected image path
>
>
>
For what feels like the 3,735th time, there is no "selected image path". You are getting a `Uri` back (`data.getData()`); a `Uri` does not have to point to a file. For example, `http://stackoverflow.com/questions/44057912/not-getting-correct-path-when-select-image-f... | At last, I decided to do the same procedure what I did in Method "onCaptureImageResult(Intent data)". The image I get from the Gallery stored again to a directory.I know this is absolutely not the good procedure, but it solved my problem temporally until I get a good answer.
```
@SuppressWarnings("deprecation")
privat... |
509 | In [Triangle](http://www.imdb.com/title/tt1187064/), at the start when Jess arrives at the boat for the "first" time, is this the start of the continuation of the ending scene?
It's known that the cruise ship and any surroundings after leaving it is in a time loop.
Though Jess remembers the ship and tells Greg, she m... | 2011/12/15 | [
"https://movies.stackexchange.com/questions/509",
"https://movies.stackexchange.com",
"https://movies.stackexchange.com/users/68/"
] | Not the way I remember it. The way I see it Jess is in a kind of purgatory, as the end of the movie shows her as an abusive mother. She's trapped in the time loop, but seems to be gradually changing things. Perhaps when she has righted all her wrongs she can be free? | This is the first time I've seen Triangle so my answer may have flaws in it please correct me if I am wrong, here is my understanding of what has happened:
The abusive mother Jess was killed before the beginning of the film by a Jess that emerged from the future to protect her son from her rage. The future Jess tries ... |
509 | In [Triangle](http://www.imdb.com/title/tt1187064/), at the start when Jess arrives at the boat for the "first" time, is this the start of the continuation of the ending scene?
It's known that the cruise ship and any surroundings after leaving it is in a time loop.
Though Jess remembers the ship and tells Greg, she m... | 2011/12/15 | [
"https://movies.stackexchange.com/questions/509",
"https://movies.stackexchange.com",
"https://movies.stackexchange.com/users/68/"
] | I thought it might help to explain just the mechanics of the events on board the *Aeolus* a bit to clear up what's happening. I am loosely following this [video analysis by Peng Yang](https://www.youtube.com/watch?v=uWZfHfQokMA), though I think I simplified the explanation a bit.
The two key aspects of the main plot a... | Let me add more to the answers.
Reference : [Triangle TimeLoop or DeathLoop explained](http://www.digestivepyrotechnics.com/2014/12/triangle-explained-plot-holes-explained.html).
Aeolus is the name of the liner. In mythology, Sisyphus, the son of Aeolus, breaks a promise he makes to death. As a result he is punished b... |
509 | In [Triangle](http://www.imdb.com/title/tt1187064/), at the start when Jess arrives at the boat for the "first" time, is this the start of the continuation of the ending scene?
It's known that the cruise ship and any surroundings after leaving it is in a time loop.
Though Jess remembers the ship and tells Greg, she m... | 2011/12/15 | [
"https://movies.stackexchange.com/questions/509",
"https://movies.stackexchange.com",
"https://movies.stackexchange.com/users/68/"
] | The movie *just* shows us the never-ending loop in which Jess is stuck seemingly forever. What *actually happened* that left her in this loop is never shown. Only subtle hints are given throughout the movie.
There is no starting point to the loop. That just seems so to the viewer. I would say that the instant she has ... | jess said the whole process restarts when all them dies, just like the other jess who was wearing those black gowns told her that jess must kill her(jess) but she fell of the ship and ended at the beach where she walked back to her home(begining of the movie). there was a black cloth in the water at the beach, the same... |
509 | In [Triangle](http://www.imdb.com/title/tt1187064/), at the start when Jess arrives at the boat for the "first" time, is this the start of the continuation of the ending scene?
It's known that the cruise ship and any surroundings after leaving it is in a time loop.
Though Jess remembers the ship and tells Greg, she m... | 2011/12/15 | [
"https://movies.stackexchange.com/questions/509",
"https://movies.stackexchange.com",
"https://movies.stackexchange.com/users/68/"
] | The only thing possible to break out from the same-things-happening time loop is the "knowledge" of the previous loop, so that she can change them. I think she loses it all while she falls asleep on the boat, waking up with champagne and all.
All time bending movies have their inconsistencies somewhere. They're good f... | I think, that the time repeats itself because Jess does not want to let go of her son. When they are sitting on their yacht, after the storm, she says that "If I do something differently, I'll loose him (her son)", and therefore she lets the story happen over and over again. Also I believe that the taxi driver is the d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.