qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
5,932,699 | I want to clone a class object. I tried following from [here](http://blog.createdbychristian.com/cloning-objects-in-actionscript-3/):
```
package
{
import flash.net.registerClassAlias;
import flash.utils.ByteArray;
public class MyClass
{
public var property1:String;
public var property... | 2011/05/09 | [
"https://Stackoverflow.com/questions/5932699",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/427969/"
] | This is the best I could do for you:
```
package
{
import flash.display.Sprite;
public class Thing extends Sprite
{
// Cloneable properties.
private var _cloneable:Array = ["x","y","val1","val2"];
// Properties.
public var val1:uint = 10;
public var val2:String =... | My suggestion would be to not make it too complicated and not over think things. There really is no need to do anything more complicated than this.
```
public function clone():Thing {
var t:Thing = new Thing();
t.x = this.x;
t.y = this.y;
t.val1 = this.val1;
t.val2 = this.val2;
return ... |
5,932,699 | I want to clone a class object. I tried following from [here](http://blog.createdbychristian.com/cloning-objects-in-actionscript-3/):
```
package
{
import flash.net.registerClassAlias;
import flash.utils.ByteArray;
public class MyClass
{
public var property1:String;
public var property... | 2011/05/09 | [
"https://Stackoverflow.com/questions/5932699",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/427969/"
] | This is the best I could do for you:
```
package
{
import flash.display.Sprite;
public class Thing extends Sprite
{
// Cloneable properties.
private var _cloneable:Array = ["x","y","val1","val2"];
// Properties.
public var val1:uint = 10;
public var val2:String =... | You can create a class with constructor that has optional parameters. This is a good practice from test driven development and performance point. |
68,888,247 | I get this result from web service in php code:
```
> stdClass Object (
> [Post_Added_Record_ByMenuIDResult] => stdClass Object
> (
> [HTMLStructure] => ثبت انجام شد
> [IsAuthenticated] => 1
> [MenuID] => 1191
> [Password] =>
> [PersonID] => 2759... | 2021/08/23 | [
"https://Stackoverflow.com/questions/68888247",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4323507/"
] | You can use glob.
```
import glob
dir_list = os.listdir(root_path)
# if endwith "/", may glob only folders
dir_list += glob.glob(root_path+"//*//")
dir_list = list(set(dir_lsit))
for i,j in enumerate(dir_list):
src=root_path+"//"+j
dst=root_path+"//"+s[i]
os.rename(src, dst)
``` | ```
import os
root_path = 'C://Users//Practice'
s=[]
for i in range(80,130):
n='Name'
Folder=n+str(i)
s.append(Folder)
print(len(s))
from pathlib import Path
text = sorted(Path(root_path).iterdir(), key=os.path.getmtime)
text
##################################################RENAMING FOLDERS
for i,j in enu... |
37,408,223 | I want to test a page.Where i want to fill up the fields like first name last name etc.and after going two pages further if i come back to the original page by using back navigation ,data entered for first name and last name remains the same.or it is filled up.
In jmeter i want to check the same if data entered for the... | 2016/05/24 | [
"https://Stackoverflow.com/questions/37408223",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You need to understand 2 things. How JMeter works and how your application works.
JMeter only captures data that is communicated to server. It does not matter how data is entered from UI. It does not check if data retains in the fields or not. It only records the request that is sent by your application to server-sid... | **Please read the apache documentation carefully:**
>
> JMeter is not a browser. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javas... |
12,067,625 | I am using eclipse 3.7 indigo , the issue that I am facing is when I start my eclipse my machine gets too slow even the eclipse get hang some times in between , the settings of my eclipse.ini file is below..
```
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.eq... | 2012/08/22 | [
"https://Stackoverflow.com/questions/12067625",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1614879/"
] | Change this values to the higher ones:
```
--launcher.XXMaxPermSize 256m
-Xms40m
-Xmx512m
``` | Check with the eclipse.ini file and add the following java parameters and values.
```
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xmn128m
-Xms1024m
-Xmx1024m
-Xss2m
-XX:PermSize=256m
-XX:MaxPermSize=256m
-XX:+UseParallelGC
```
This worked for me. Might help. |
12,067,625 | I am using eclipse 3.7 indigo , the issue that I am facing is when I start my eclipse my machine gets too slow even the eclipse get hang some times in between , the settings of my eclipse.ini file is below..
```
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.eq... | 2012/08/22 | [
"https://Stackoverflow.com/questions/12067625",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1614879/"
] | Perhaps this will help? I mean, I don't know the specs of the machine you're on, but this is nice on less powerful machines.
[What are the best JVM settings for Eclipse?](https://stackoverflow.com/questions/142357/what-are-the-best-jvm-settings-for-eclipse) | Check with the eclipse.ini file and add the following java parameters and values.
```
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xmn128m
-Xms1024m
-Xmx1024m
-Xss2m
-XX:PermSize=256m
-XX:MaxPermSize=256m
-XX:+UseParallelGC
```
This worked for me. Might help. |
30,656,259 | How to convert tuple and a string to list without looping through each of the items of the tuple such as:
```
n = (102, '(24, -20)')
#to become (102,24,-20)
``` | 2015/06/05 | [
"https://Stackoverflow.com/questions/30656259",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1128088/"
] | For this particular situation, you can use `eval`.
```
>>> n = (102, '(24, -20)')
>>> n = list(n)
>>> n
[102, '(24, -20)']
>>> n[1] = eval(n[1])
>>> n
[102, (24, -20)]
>>> new = (n[0], [1][0], n[1][1])
>>> new
(102, 1, -20)
``` | For the example you show, you can do this:
```
exec('a='+n[1])
n = [n[0]]
n += list(a)
``` |
367,927 | I have done the following steps:
```
sudo add-apt-repository ppa:langdalepl/gvfs-mtp
sudo apt-get update
```
and updated some packages from update manager. After doing above steps I am able to see lumia phone name in file system. But when I try to mount device I am getting following errors:
```
Unable to mount RM-... | 2013/10/29 | [
"https://askubuntu.com/questions/367927",
"https://askubuntu.com",
"https://askubuntu.com/users/209126/"
] | Make a new udev rule
`sudo emacs -nw /etc/udev/rules.d/69-libmtp.rules`
And add the following line
```
ATTR{idVendor}=="01b1", ATTR{idProduct}=="01b1", SYMLINK+="libmtp",
MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
```
You need to [refresh the udev rules](https://unix.stackexchange... | Plug the phone in, then reboot the phone while it's plugged in.
Worked for me using Ubuntu 13.10 and Lumia 520. |
367,927 | I have done the following steps:
```
sudo add-apt-repository ppa:langdalepl/gvfs-mtp
sudo apt-get update
```
and updated some packages from update manager. After doing above steps I am able to see lumia phone name in file system. But when I try to mount device I am getting following errors:
```
Unable to mount RM-... | 2013/10/29 | [
"https://askubuntu.com/questions/367927",
"https://askubuntu.com",
"https://askubuntu.com/users/209126/"
] | These are my steps to connect the Nokia Lumia 920 (WP8):
**1. Add the MTP file system in Ubuntu:**
```
sudo add-apt-repository ppa:langdalepl/gvfs-mtp
sudo apt-get update
```
**2. Make a new udev rule:**
**2.1 Create the rule file:**
```
sudo nano /etc/udev/rules.d/69-libmtp.rules
```
**2.2 Add the following l... | Plug the phone in, then reboot the phone while it's plugged in.
Worked for me using Ubuntu 13.10 and Lumia 520. |
367,927 | I have done the following steps:
```
sudo add-apt-repository ppa:langdalepl/gvfs-mtp
sudo apt-get update
```
and updated some packages from update manager. After doing above steps I am able to see lumia phone name in file system. But when I try to mount device I am getting following errors:
```
Unable to mount RM-... | 2013/10/29 | [
"https://askubuntu.com/questions/367927",
"https://askubuntu.com",
"https://askubuntu.com/users/209126/"
] | Make a new udev rule
`sudo emacs -nw /etc/udev/rules.d/69-libmtp.rules`
And add the following line
```
ATTR{idVendor}=="01b1", ATTR{idProduct}=="01b1", SYMLINK+="libmtp",
MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
```
You need to [refresh the udev rules](https://unix.stackexchange... | Did you check with lock screen disabled?
I remember earlier when I hadn't kept the password lock screen - the file browser used to show the device and I could access it.
However, now that I have kept the password lock screen - the devices are visible but cannot be opened via file browser.
Of course there is one more a... |
367,927 | I have done the following steps:
```
sudo add-apt-repository ppa:langdalepl/gvfs-mtp
sudo apt-get update
```
and updated some packages from update manager. After doing above steps I am able to see lumia phone name in file system. But when I try to mount device I am getting following errors:
```
Unable to mount RM-... | 2013/10/29 | [
"https://askubuntu.com/questions/367927",
"https://askubuntu.com",
"https://askubuntu.com/users/209126/"
] | These are my steps to connect the Nokia Lumia 920 (WP8):
**1. Add the MTP file system in Ubuntu:**
```
sudo add-apt-repository ppa:langdalepl/gvfs-mtp
sudo apt-get update
```
**2. Make a new udev rule:**
**2.1 Create the rule file:**
```
sudo nano /etc/udev/rules.d/69-libmtp.rules
```
**2.2 Add the following l... | Did you check with lock screen disabled?
I remember earlier when I hadn't kept the password lock screen - the file browser used to show the device and I could access it.
However, now that I have kept the password lock screen - the devices are visible but cannot be opened via file browser.
Of course there is one more a... |
367,927 | I have done the following steps:
```
sudo add-apt-repository ppa:langdalepl/gvfs-mtp
sudo apt-get update
```
and updated some packages from update manager. After doing above steps I am able to see lumia phone name in file system. But when I try to mount device I am getting following errors:
```
Unable to mount RM-... | 2013/10/29 | [
"https://askubuntu.com/questions/367927",
"https://askubuntu.com",
"https://askubuntu.com/users/209126/"
] | These are my steps to connect the Nokia Lumia 920 (WP8):
**1. Add the MTP file system in Ubuntu:**
```
sudo add-apt-repository ppa:langdalepl/gvfs-mtp
sudo apt-get update
```
**2. Make a new udev rule:**
**2.1 Create the rule file:**
```
sudo nano /etc/udev/rules.d/69-libmtp.rules
```
**2.2 Add the following l... | Make a new udev rule
`sudo emacs -nw /etc/udev/rules.d/69-libmtp.rules`
And add the following line
```
ATTR{idVendor}=="01b1", ATTR{idProduct}=="01b1", SYMLINK+="libmtp",
MODE="660", GROUP="audio", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"
```
You need to [refresh the udev rules](https://unix.stackexchange... |
41,182,409 | Here is my complete code :
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SomuFinance - Personal Finance Manager</title>
<link rel="stylesheet" type="text/css" href="indexStyle.css">
<script src="scripts/jquery-3.1.0.min.js"></script>
</head>
<body>
<form method="post" ac... | 2016/12/16 | [
"https://Stackoverflow.com/questions/41182409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4930857/"
] | You could add use `removeAttr` instead :
```
$('#cancelDelete').click(function(){
$("input:checkbox[name='selected[]']").removeAttr('checked');
});
```
Hope this helps.
```js
$('#cancelDelete').click(function(){
$("input:checkbox[name='selected[]']").removeAttr('checked');
});
```
```html
<script src="https:... | Change the selector to the following:
```
$('#cancelDelete').click(function(){
$("input[type='checkbox']:checked").attr('checked', false);
});
``` |
41,182,409 | Here is my complete code :
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SomuFinance - Personal Finance Manager</title>
<link rel="stylesheet" type="text/css" href="indexStyle.css">
<script src="scripts/jquery-3.1.0.min.js"></script>
</head>
<body>
<form method="post" ac... | 2016/12/16 | [
"https://Stackoverflow.com/questions/41182409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4930857/"
] | On your cancel button add the following jquery before you close the popup
`$('.myform input:checkbox').prop('checked', false);`
this will set all to unchecked.
Example:
```js
$("#cancelButton").click(function() {
$('.myform input:checkbox').prop('checked', false);
// close the popup
});
```
```html
<script ... | Change the selector to the following:
```
$('#cancelDelete').click(function(){
$("input[type='checkbox']:checked").attr('checked', false);
});
``` |
41,182,409 | Here is my complete code :
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>SomuFinance - Personal Finance Manager</title>
<link rel="stylesheet" type="text/css" href="indexStyle.css">
<script src="scripts/jquery-3.1.0.min.js"></script>
</head>
<body>
<form method="post" ac... | 2016/12/16 | [
"https://Stackoverflow.com/questions/41182409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4930857/"
] | On your cancel button add the following jquery before you close the popup
`$('.myform input:checkbox').prop('checked', false);`
this will set all to unchecked.
Example:
```js
$("#cancelButton").click(function() {
$('.myform input:checkbox').prop('checked', false);
// close the popup
});
```
```html
<script ... | You could add use `removeAttr` instead :
```
$('#cancelDelete').click(function(){
$("input:checkbox[name='selected[]']").removeAttr('checked');
});
```
Hope this helps.
```js
$('#cancelDelete').click(function(){
$("input:checkbox[name='selected[]']").removeAttr('checked');
});
```
```html
<script src="https:... |
19,224,866 | How to get tr count from html table by using Id.Please check my code below
```
<table id="tableId">
<tr id="a">
<td>a</td>
</tr>
<tr id="b">
<td>b</td>
</tr>
```
Now I want to find rowNumber by using row Id.for example my rowId is 'b' I want to find rowNumber for this Id.Any one help me | 2013/10/07 | [
"https://Stackoverflow.com/questions/19224866",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2767541/"
] | Here you go
```
var table = document.getElementById("tableId");
var rowIndex = document.getElementById("b").rowIndex;
table.deleteRow(rowIndex);
```
Added the code for deletion, as requested in the comments below. | If you want to remove the row with id b
```
$("#b").remove()
``` |
19,224,866 | How to get tr count from html table by using Id.Please check my code below
```
<table id="tableId">
<tr id="a">
<td>a</td>
</tr>
<tr id="b">
<td>b</td>
</tr>
```
Now I want to find rowNumber by using row Id.for example my rowId is 'b' I want to find rowNumber for this Id.Any one help me | 2013/10/07 | [
"https://Stackoverflow.com/questions/19224866",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2767541/"
] | Here you go
```
var table = document.getElementById("tableId");
var rowIndex = document.getElementById("b").rowIndex;
table.deleteRow(rowIndex);
```
Added the code for deletion, as requested in the comments below. | It's very using with jquery
```
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
var rowCount = $('table#tableId tr:#b').index() + 1;
alert(rowCount);
$("#b").remove() // For Remove b Row (tr)
});
</script>
```
Your H... |
19,224,866 | How to get tr count from html table by using Id.Please check my code below
```
<table id="tableId">
<tr id="a">
<td>a</td>
</tr>
<tr id="b">
<td>b</td>
</tr>
```
Now I want to find rowNumber by using row Id.for example my rowId is 'b' I want to find rowNumber for this Id.Any one help me | 2013/10/07 | [
"https://Stackoverflow.com/questions/19224866",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2767541/"
] | Here you go
```
var table = document.getElementById("tableId");
var rowIndex = document.getElementById("b").rowIndex;
table.deleteRow(rowIndex);
```
Added the code for deletion, as requested in the comments below. | If you have the Id within any cell, then the below should work
```
document.getElementById("myID "+tempIdx).parentNode.parentNode.rowIndex;
```
provided table is in the below format
```
<table>
<tr>
<td>
<p id="myID 1" />
</td>
<td>xxx</td>
</tr>
<td>yyy</td>
<td>
<p id="myID 2" />
</td>
</t... |
19,224,866 | How to get tr count from html table by using Id.Please check my code below
```
<table id="tableId">
<tr id="a">
<td>a</td>
</tr>
<tr id="b">
<td>b</td>
</tr>
```
Now I want to find rowNumber by using row Id.for example my rowId is 'b' I want to find rowNumber for this Id.Any one help me | 2013/10/07 | [
"https://Stackoverflow.com/questions/19224866",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2767541/"
] | It's very using with jquery
```
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
var rowCount = $('table#tableId tr:#b').index() + 1;
alert(rowCount);
$("#b").remove() // For Remove b Row (tr)
});
</script>
```
Your H... | If you want to remove the row with id b
```
$("#b").remove()
``` |
19,224,866 | How to get tr count from html table by using Id.Please check my code below
```
<table id="tableId">
<tr id="a">
<td>a</td>
</tr>
<tr id="b">
<td>b</td>
</tr>
```
Now I want to find rowNumber by using row Id.for example my rowId is 'b' I want to find rowNumber for this Id.Any one help me | 2013/10/07 | [
"https://Stackoverflow.com/questions/19224866",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2767541/"
] | It's very using with jquery
```
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
var rowCount = $('table#tableId tr:#b').index() + 1;
alert(rowCount);
$("#b").remove() // For Remove b Row (tr)
});
</script>
```
Your H... | If you have the Id within any cell, then the below should work
```
document.getElementById("myID "+tempIdx).parentNode.parentNode.rowIndex;
```
provided table is in the below format
```
<table>
<tr>
<td>
<p id="myID 1" />
</td>
<td>xxx</td>
</tr>
<td>yyy</td>
<td>
<p id="myID 2" />
</td>
</t... |
17,647,627 | I'm using this dynamic linq orderby function which I got from [here](https://stackoverflow.com/questions/41244/dynamic-linq-orderby-on-ienumerablet).
This works fine with nested properties so I could do this:
```
var result = data.OrderBy("SomeProperty.NestedProperty");
```
The problem is that if SomeProperty is nu... | 2013/07/15 | [
"https://Stackoverflow.com/questions/17647627",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | ```
static void Main(string[] args)
{
var data = new List<MyType>() {
new MyType() { SomeProperty = new Inner() { NestedProperty = "2" }},
new MyType() { SomeProperty = new Inner() { NestedProperty = "1" }},
new MyType() { SomeProperty = new Inner() { NestedProperty = "3" }},
new MyT... | How about generics:
**Helper Method:**
```
public static Expression<Func<TEntity, TResult>> GetExpression<TEntity, TResult>(string prop)
{
var param = Expression.Parameter(typeof(TEntity), "p");
var parts = prop.Split('.');
Expression parent = parts.Aggregate<string, Expre... |
33,043,640 | I want to add a utility function in my test fixture class that will return a mock with particular expectations/actions set.
E.g.:
```
class MockListener: public Listener
{
// Google mock method.
};
class MyTest: public testing::Test
{
public:
MockListener getSpecialListener()
{
MockListener speci... | 2015/10/09 | [
"https://Stackoverflow.com/questions/33043640",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5090093/"
] | Mock objects are non-copyable, but you can write a factory method that returns a pointer to a newly created mock object. To simplify the object ownership, you can use `std::unique_ptr`.
```
std::unique_ptr<MockListener> getSpecialListener() {
MockListener* special = new MockListener();
EXPECT_CALL(*special, SomeMe... | Well it seems not possible [to copy mock class instances](https://groups.google.com/forum/m/#!topic/googlemock/GD73UXjQowE) properly, especially not deep copying any expectations bound to them.
What you though can do is, to provide helper functions in your test class, that set up specific expectations on mock instance... |
9,413,218 | I am trying to declare a static class within a parent class and initialize it, but I seem to be getting all sorts of errors.
```
/* MainWindow.h */
class MainWindow
{
private:
static DWORD WINAPI threadproc(void* param);
static MainWindow *hWin;
};
/* MainWindow.cpp */
#include "Mai... | 2012/02/23 | [
"https://Stackoverflow.com/questions/9413218",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1036606/"
] | Static members always consist of a *declaration* and a *definition*, you lack the definition in your cpp file. Put the following line outside of any functions:
```
MainWindow* MainWindow::hWin;
```
You can read more [here](http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=/com.ibm.xlcpp8l.doc/... | Using a static variable like in your example will not allow you to have more than one instance, so it's best to avoid it if possible. And in your example there is no need to use one, you can easily use a local variable instead.
Just remove the `static MainWindow *hWin;` from your class definition, and modify MainWindo... |
35,102,483 | I query db and I have an array. How can I access stdClass object ? And I want also serializedName property like in java serializedName. So, The fields which query from db must be assign with my custom object class fields.How can I use this?
```
Array
(
[0] => stdClass Object
(
... | 2016/01/30 | [
"https://Stackoverflow.com/questions/35102483",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3371708/"
] | I don't know how to do it with `qplot()` (it may not be possible) but you can do it with the full `ggplot()` command:
```
library(ggplot2)
ggplot(diamonds,aes(carat,price))+
scale_x_log10() + scale_y_log10() +
geom_point()+
geom_smooth(method="lm")
``` | qplot now is basically a ggplot decomposed. You can easily extend qplot and add whatever you want inside it. qplot now is more inline with basic plot() in R. As far as your question is concerned, you can add geom\_smooth(method="lm") in your qplot as:
```
qplot(carat, price, data=diamonds, log="xy",
geom=c('poin... |
15,262 | I have a set of points like this: P = {{$x\_1$,$y\_1$},{$x\_2$,$y\_2$},...,{$x\_n$,$y\_n$}}. I want to plot them and also plot the derivative of that graph. How can I do this with Mathematica? Is there a simple way in Mathematica? | 2012/11/27 | [
"https://mathematica.stackexchange.com/questions/15262",
"https://mathematica.stackexchange.com",
"https://mathematica.stackexchange.com/users/4679/"
] | Here is some sample data, hopefully of the sort you are looking for
```
a=Table[{i, i^2 - 3 i + 2 + 0.3 Random[]}, {i, -1, 3, 0.1}];
ListPlot[a]
```
will display the data.

This will create a derivable interpolation.
```
b = Interpolation[a, Method -> "S... | This is the data (taken from the previous example):
```
a = Table[{i, i^2 - 3 i + 2 + 0.3 Random[]}, {i, -1, 3, 0.1}];
```
This is derivatives calculated in each point except the first:
```
derA = Differences[a] /. {x_, y_} -> y/x;
```
here we combine it into the list of pairs:
```
lst=Transpose[{Drop[Transpose[... |
15,262 | I have a set of points like this: P = {{$x\_1$,$y\_1$},{$x\_2$,$y\_2$},...,{$x\_n$,$y\_n$}}. I want to plot them and also plot the derivative of that graph. How can I do this with Mathematica? Is there a simple way in Mathematica? | 2012/11/27 | [
"https://mathematica.stackexchange.com/questions/15262",
"https://mathematica.stackexchange.com",
"https://mathematica.stackexchange.com/users/4679/"
] | Here is some sample data, hopefully of the sort you are looking for
```
a=Table[{i, i^2 - 3 i + 2 + 0.3 Random[]}, {i, -1, 3, 0.1}];
ListPlot[a]
```
will display the data.

This will create a derivable interpolation.
```
b = Interpolation[a, Method -> "S... | I know the question is quite old but maybe this might be helpful for someone.
I again follow the data set from above and show two methods of performing the task in question:
```
a = Table[{i, i^2 - 3 i + 2 + 0.3 Random[]}, {i, -1, 3, 0.1}];
ListPlot[a]
```
See image above, I'm not allowed to post three links due to... |
9,190,638 | I've seen a couple of package on [hackage](http://hackage.haskell.org/packages/archive/pkg-list.html) which contain module names with `.Internal` as their last name component (e.g. `Data.ByteString.Internal`)
Those modules are usually not properly browsable (but they may show up nevertheless) in Haddock and should not... | 2012/02/08 | [
"https://Stackoverflow.com/questions/9190638",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480398/"
] | `Internal` modules are generally modules that expose the *internals* of a package, that break *package encapsulation*.
To take `ByteString` as an example: When you normally use `ByteString`s, they are used as opaque data types; a `ByteString` value is atomic, and its representation is uninteresting. All of the functio... | The idea is that you can have the "proper", stabile API which you export from `MyModule` and this is the preferred and documented way to use the library.
In addition to the public API, your module probably has private data constructors and internal helper functions etc. The `MyModule.Internal` submodule can be used to... |
9,190,638 | I've seen a couple of package on [hackage](http://hackage.haskell.org/packages/archive/pkg-list.html) which contain module names with `.Internal` as their last name component (e.g. `Data.ByteString.Internal`)
Those modules are usually not properly browsable (but they may show up nevertheless) in Haddock and should not... | 2012/02/08 | [
"https://Stackoverflow.com/questions/9190638",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480398/"
] | The idea is that you can have the "proper", stabile API which you export from `MyModule` and this is the preferred and documented way to use the library.
In addition to the public API, your module probably has private data constructors and internal helper functions etc. The `MyModule.Internal` submodule can be used to... | One extension (or possibly clarification) to what shang and dflemstr said: if you have internal definitions (data types whose constructors aren't exported, etc.) that you want to access from multiple modules which *are* exported, then you typically create such an `.Internal` module which isn't exposed at all (i.e. list... |
9,190,638 | I've seen a couple of package on [hackage](http://hackage.haskell.org/packages/archive/pkg-list.html) which contain module names with `.Internal` as their last name component (e.g. `Data.ByteString.Internal`)
Those modules are usually not properly browsable (but they may show up nevertheless) in Haddock and should not... | 2012/02/08 | [
"https://Stackoverflow.com/questions/9190638",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480398/"
] | @dflemstr is right, but not explicit about the following point. Some authors put internals of a package in a `.Internal` module and then don't expose that module via cabal, thereby making it inaccessible to client code. *This is a bad thing1*.
*Exposed* `.Internal` modules help to communicate different levels of abst... | The idea is that you can have the "proper", stabile API which you export from `MyModule` and this is the preferred and documented way to use the library.
In addition to the public API, your module probably has private data constructors and internal helper functions etc. The `MyModule.Internal` submodule can be used to... |
9,190,638 | I've seen a couple of package on [hackage](http://hackage.haskell.org/packages/archive/pkg-list.html) which contain module names with `.Internal` as their last name component (e.g. `Data.ByteString.Internal`)
Those modules are usually not properly browsable (but they may show up nevertheless) in Haddock and should not... | 2012/02/08 | [
"https://Stackoverflow.com/questions/9190638",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480398/"
] | `Internal` modules are generally modules that expose the *internals* of a package, that break *package encapsulation*.
To take `ByteString` as an example: When you normally use `ByteString`s, they are used as opaque data types; a `ByteString` value is atomic, and its representation is uninteresting. All of the functio... | One extension (or possibly clarification) to what shang and dflemstr said: if you have internal definitions (data types whose constructors aren't exported, etc.) that you want to access from multiple modules which *are* exported, then you typically create such an `.Internal` module which isn't exposed at all (i.e. list... |
9,190,638 | I've seen a couple of package on [hackage](http://hackage.haskell.org/packages/archive/pkg-list.html) which contain module names with `.Internal` as their last name component (e.g. `Data.ByteString.Internal`)
Those modules are usually not properly browsable (but they may show up nevertheless) in Haddock and should not... | 2012/02/08 | [
"https://Stackoverflow.com/questions/9190638",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480398/"
] | `Internal` modules are generally modules that expose the *internals* of a package, that break *package encapsulation*.
To take `ByteString` as an example: When you normally use `ByteString`s, they are used as opaque data types; a `ByteString` value is atomic, and its representation is uninteresting. All of the functio... | @dflemstr is right, but not explicit about the following point. Some authors put internals of a package in a `.Internal` module and then don't expose that module via cabal, thereby making it inaccessible to client code. *This is a bad thing1*.
*Exposed* `.Internal` modules help to communicate different levels of abst... |
9,190,638 | I've seen a couple of package on [hackage](http://hackage.haskell.org/packages/archive/pkg-list.html) which contain module names with `.Internal` as their last name component (e.g. `Data.ByteString.Internal`)
Those modules are usually not properly browsable (but they may show up nevertheless) in Haddock and should not... | 2012/02/08 | [
"https://Stackoverflow.com/questions/9190638",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/480398/"
] | @dflemstr is right, but not explicit about the following point. Some authors put internals of a package in a `.Internal` module and then don't expose that module via cabal, thereby making it inaccessible to client code. *This is a bad thing1*.
*Exposed* `.Internal` modules help to communicate different levels of abst... | One extension (or possibly clarification) to what shang and dflemstr said: if you have internal definitions (data types whose constructors aren't exported, etc.) that you want to access from multiple modules which *are* exported, then you typically create such an `.Internal` module which isn't exposed at all (i.e. list... |
11,063,287 | I have some buttons I am trying to create, and when I try to do a control-drag into the controller, it isn't showing me the options to create configure that button. Any idea what could be wrong? I am just following my first tutorial is its probably something for newbies.
My screen shot is attached.![enter image descri... | 2012/06/16 | [
"https://Stackoverflow.com/questions/11063287",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/478573/"
] | Version 2.5.0-rc1 of the gwt-maven-plugin will support it through the [`run-codeserver` goal](https://gwt-maven-plugin.github.io/gwt-maven-plugin/run-codeserver-mojo.html). That version is currently staged. Please test it and [vote](https://groups.google.com/d/topic/codehaus-mojo-gwt-maven-plugin-users/c0EQromeRgc/disc... | This src repo: <https://github.com/jbarop/gwt-maven-plugin/tree/gwt-2.5> looks like it supports GWT 2.5, with the last commit message being:
>
> added mojo for running the code server
>
>
>
(disclaimer: I've not tried it myself, yet) |
231,391 | **Edit:** I removed the somewhat "silly" parts that I originally included in the question for fun, since it appears some people didn't appreciate it.
In the Elder Scrolls games I played previous to Skyrim, there were only adults. Now, Skyrim has clearly shown that there are, without any doubt, children in the Elder Sc... | 2015/08/10 | [
"https://gaming.stackexchange.com/questions/231391",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/117521/"
] | Let's get the sillier part of the question out of the way- are there babies? Yes, there are.
There is at least one pregnant woman in the game. [Seren](http://elderscrolls.wikia.com/wiki/Seren), a Blacksmith in Skyrim mentions she is pregnant.
>
> "We discovered recently that I am with child. I'll need to stop workin... | Mixed-race children like Jagar Tharn exist, but are exceedingly rare
--------------------------------------------------------------------
The prototypical example of a mixed-race individual is Jagar Tharn, villain of the first game: *Arena*.
[](https... |
40,018 | As per my understanding contract`s own address is the address which we assign to owner of contract using **msg.sender**.
But I saw this [question](https://ethereum.stackexchange.com/questions/29469/is-addressthis-a-valid-address-in-a-contracts-constructor) on SE where it was described that a contract can access its own... | 2018/02/17 | [
"https://ethereum.stackexchange.com/questions/40018",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/20572/"
] | `this` is refers contract address. Contracts are non managable accounts which will not have any private key. That means if you created contract you don't have private key for contract A.
msg.sender = Contract caller (Who is calling your contract)
tx.origin = Transaction initiator
Refer bellow link for more details:
... | 'this' is very common construct in most of the programming languages. It basically refers to the object/instance itself which is under execution. So in solidity too it means same. |
40,018 | As per my understanding contract`s own address is the address which we assign to owner of contract using **msg.sender**.
But I saw this [question](https://ethereum.stackexchange.com/questions/29469/is-addressthis-a-valid-address-in-a-contracts-constructor) on SE where it was described that a contract can access its own... | 2018/02/17 | [
"https://ethereum.stackexchange.com/questions/40018",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/20572/"
] | `this` is refers contract address. Contracts are non managable accounts which will not have any private key. That means if you created contract you don't have private key for contract A.
msg.sender = Contract caller (Who is calling your contract)
tx.origin = Transaction initiator
Refer bellow link for more details:
... | Every account in Ethereum has an address. Contracts are special kinds of accounts and have their own addresses different from `msg.sender` and `this.owner`.
The contract's address is determined by the account that created it and its nonce. So if you create a new contract from `address1` you can know in advance what’s... |
40,018 | As per my understanding contract`s own address is the address which we assign to owner of contract using **msg.sender**.
But I saw this [question](https://ethereum.stackexchange.com/questions/29469/is-addressthis-a-valid-address-in-a-contracts-constructor) on SE where it was described that a contract can access its own... | 2018/02/17 | [
"https://ethereum.stackexchange.com/questions/40018",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/20572/"
] | `this` is refers contract address. Contracts are non managable accounts which will not have any private key. That means if you created contract you don't have private key for contract A.
msg.sender = Contract caller (Who is calling your contract)
tx.origin = Transaction initiator
Refer bellow link for more details:
... | I just want to add additional context to brianbhsu's answer (The most upvoted answer).
As I understand it, it could be the same in certain cases.
What I guess happened in your case was that you created the contract and then called the function from another account.
Because you called it from another account, that acc... |
40,018 | As per my understanding contract`s own address is the address which we assign to owner of contract using **msg.sender**.
But I saw this [question](https://ethereum.stackexchange.com/questions/29469/is-addressthis-a-valid-address-in-a-contracts-constructor) on SE where it was described that a contract can access its own... | 2018/02/17 | [
"https://ethereum.stackexchange.com/questions/40018",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/20572/"
] | `this` refers to the instance of the contract where the call is made (you can have multiple instances of the same contract).
`address(this)` refers to the address of the instance of the contract where the call is being made.
`msg.sender` refers to the address where the contract is being called from.
Therefore, `addr... | `msg.sender` is the address of the transaction invoker(address calling contract) whereas `address(this)` is the address of the contract itself.
`this` keyword refers to the instance of a Contract. |
40,018 | As per my understanding contract`s own address is the address which we assign to owner of contract using **msg.sender**.
But I saw this [question](https://ethereum.stackexchange.com/questions/29469/is-addressthis-a-valid-address-in-a-contracts-constructor) on SE where it was described that a contract can access its own... | 2018/02/17 | [
"https://ethereum.stackexchange.com/questions/40018",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/20572/"
] | `this` refers to the instance of the contract where the call is made (you can have multiple instances of the same contract).
`address(this)` refers to the address of the instance of the contract where the call is being made.
`msg.sender` refers to the address where the contract is being called from.
Therefore, `addr... | Every account in Ethereum has an address. Contracts are special kinds of accounts and have their own addresses different from `msg.sender` and `this.owner`.
The contract's address is determined by the account that created it and its nonce. So if you create a new contract from `address1` you can know in advance what’s... |
40,018 | As per my understanding contract`s own address is the address which we assign to owner of contract using **msg.sender**.
But I saw this [question](https://ethereum.stackexchange.com/questions/29469/is-addressthis-a-valid-address-in-a-contracts-constructor) on SE where it was described that a contract can access its own... | 2018/02/17 | [
"https://ethereum.stackexchange.com/questions/40018",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/20572/"
] | Every account in Ethereum has an address. Contracts are special kinds of accounts and have their own addresses different from `msg.sender` and `this.owner`.
The contract's address is determined by the account that created it and its nonce. So if you create a new contract from `address1` you can know in advance what’s... | I just want to add additional context to brianbhsu's answer (The most upvoted answer).
As I understand it, it could be the same in certain cases.
What I guess happened in your case was that you created the contract and then called the function from another account.
Because you called it from another account, that acc... |
40,018 | As per my understanding contract`s own address is the address which we assign to owner of contract using **msg.sender**.
But I saw this [question](https://ethereum.stackexchange.com/questions/29469/is-addressthis-a-valid-address-in-a-contracts-constructor) on SE where it was described that a contract can access its own... | 2018/02/17 | [
"https://ethereum.stackexchange.com/questions/40018",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/20572/"
] | `this` is refers contract address. Contracts are non managable accounts which will not have any private key. That means if you created contract you don't have private key for contract A.
msg.sender = Contract caller (Who is calling your contract)
tx.origin = Transaction initiator
Refer bellow link for more details:
... | `msg.sender` is the address of the transaction invoker(address calling contract) whereas `address(this)` is the address of the contract itself.
`this` keyword refers to the instance of a Contract. |
40,018 | As per my understanding contract`s own address is the address which we assign to owner of contract using **msg.sender**.
But I saw this [question](https://ethereum.stackexchange.com/questions/29469/is-addressthis-a-valid-address-in-a-contracts-constructor) on SE where it was described that a contract can access its own... | 2018/02/17 | [
"https://ethereum.stackexchange.com/questions/40018",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/20572/"
] | `msg.sender` is the address of the transaction invoker(address calling contract) whereas `address(this)` is the address of the contract itself.
`this` keyword refers to the instance of a Contract. | 'this' is very common construct in most of the programming languages. It basically refers to the object/instance itself which is under execution. So in solidity too it means same. |
40,018 | As per my understanding contract`s own address is the address which we assign to owner of contract using **msg.sender**.
But I saw this [question](https://ethereum.stackexchange.com/questions/29469/is-addressthis-a-valid-address-in-a-contracts-constructor) on SE where it was described that a contract can access its own... | 2018/02/17 | [
"https://ethereum.stackexchange.com/questions/40018",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/20572/"
] | Every account in Ethereum has an address. Contracts are special kinds of accounts and have their own addresses different from `msg.sender` and `this.owner`.
The contract's address is determined by the account that created it and its nonce. So if you create a new contract from `address1` you can know in advance what’s... | 'this' is very common construct in most of the programming languages. It basically refers to the object/instance itself which is under execution. So in solidity too it means same. |
40,018 | As per my understanding contract`s own address is the address which we assign to owner of contract using **msg.sender**.
But I saw this [question](https://ethereum.stackexchange.com/questions/29469/is-addressthis-a-valid-address-in-a-contracts-constructor) on SE where it was described that a contract can access its own... | 2018/02/17 | [
"https://ethereum.stackexchange.com/questions/40018",
"https://ethereum.stackexchange.com",
"https://ethereum.stackexchange.com/users/20572/"
] | `this` refers to the instance of the contract where the call is made (you can have multiple instances of the same contract).
`address(this)` refers to the address of the instance of the contract where the call is being made.
`msg.sender` refers to the address where the contract is being called from.
Therefore, `addr... | 'this' is very common construct in most of the programming languages. It basically refers to the object/instance itself which is under execution. So in solidity too it means same. |
152,747 | I am trying to set SELinux contexts within a directory structure. So it is something like this:
```
/var/www/sites
/www.example.com
/html
/logs
/www.example.org
/html
/logs
```
I want to set different contexts on all of the `logs` directories and the `html` directories. With `... | 2017/03/02 | [
"https://security.stackexchange.com/questions/152747",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/-1/"
] | I would still like to know if this is possible using the `semanage fcontext` command directly, but I worked out a way to do this using `find`:
```
sudo find /var/www/sites -type d -regex "/var/www/sites/[^/]+/html" -exec semanage fcontext -a -t httpd_sys_rw_content_t '{}(/.*)?' \;
``` | `semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/sites/.*/html(/.*)?"`
You'll see this format being used (on Centos 7 by default) by running `semanage fcontext -l | grep /var/www` |
152,747 | I am trying to set SELinux contexts within a directory structure. So it is something like this:
```
/var/www/sites
/www.example.com
/html
/logs
/www.example.org
/html
/logs
```
I want to set different contexts on all of the `logs` directories and the `html` directories. With `... | 2017/03/02 | [
"https://security.stackexchange.com/questions/152747",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/-1/"
] | Maybe a bit of documentation on the format of the regular expressions that semanage admits would be helpful, I've discovered some patterns that work only through trial and error.
These patterns have worked for me to specify multiple paths beyond the wildcard to he end:
```
semanage fcontext -a -t httpd_sys_rw_content... | `semanage fcontext -a -t httpd_sys_rw_content_t "/var/www/sites/.*/html(/.*)?"`
You'll see this format being used (on Centos 7 by default) by running `semanage fcontext -l | grep /var/www` |
37,311,698 | Here function is overriding on based framework called by name Sonata which is building admin template :
```
protected function configureFormFields(FormMapper $formMapper){
$formMapper->add('owner', 'sonata_type_model_list',
array(
'class' => 'XYZXBundle:ContestUser',
'btn_add' => false, ... | 2016/05/18 | [
"https://Stackoverflow.com/questions/37311698",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3483264/"
] | You may want to use one UDF to extract the first value and another to extract the second. You can then use the UDF with a select call on the output of the random forrest data frame. Example:
```py
from pyspark.sql.functions import udf, col
split1_udf = udf(lambda value: value[0], FloatType())
split2_udf = udf(lambda ... | I tried @Rookie Boy 's loop but it seems the splits udf loop doesn't work for me.
I modified a bit.
```
out = df
for i in range(len(n)):
splits_i = udf(lambda x: x[i].item(), FloatType())
out = out.withColumn('{col_}'.format(i), splits_i('probability'))
out.select(*['col_{}'.format(i) for i in range(3)]).show(... |
37,311,698 | Here function is overriding on based framework called by name Sonata which is building admin template :
```
protected function configureFormFields(FormMapper $formMapper){
$formMapper->add('owner', 'sonata_type_model_list',
array(
'class' => 'XYZXBundle:ContestUser',
'btn_add' => false, ... | 2016/05/18 | [
"https://Stackoverflow.com/questions/37311698",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3483264/"
] | I figured out the problem with the suggestion above. In pyspark, "dense vectors are simply represented as NumPy array objects", so the issue is with python and numpy types. Need to add .item() to cast a numpy.float64 to a python float.
The following code works:
```
split1_udf = udf(lambda value: value[0].item(), Floa... | I tried @Rookie Boy 's loop but it seems the splits udf loop doesn't work for me.
I modified a bit.
```
out = df
for i in range(len(n)):
splits_i = udf(lambda x: x[i].item(), FloatType())
out = out.withColumn('{col_}'.format(i), splits_i('probability'))
out.select(*['col_{}'.format(i) for i in range(3)]).show(... |
37,311,698 | Here function is overriding on based framework called by name Sonata which is building admin template :
```
protected function configureFormFields(FormMapper $formMapper){
$formMapper->add('owner', 'sonata_type_model_list',
array(
'class' => 'XYZXBundle:ContestUser',
'btn_add' => false, ... | 2016/05/18 | [
"https://Stackoverflow.com/questions/37311698",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3483264/"
] | Got the same problem, below is the code adjusted for the situation when you have n-length vector.
```
splits = [udf(lambda value: value[i].item(), FloatType()) for i in range(n)]
out = tstDF.select(*[s('features').alias("Column"+str(i)) for i, s in enumerate(splits)])
``` | I tried @Rookie Boy 's loop but it seems the splits udf loop doesn't work for me.
I modified a bit.
```
out = df
for i in range(len(n)):
splits_i = udf(lambda x: x[i].item(), FloatType())
out = out.withColumn('{col_}'.format(i), splits_i('probability'))
out.select(*['col_{}'.format(i) for i in range(3)]).show(... |
29,913,997 | I have a button which by default is disable, but when a checkbox is checked the button is then enabled. I would like to edit the script to make an alert window when the button is clicked when disabled, to make sure the user knows he/she has to check the checkbox.
My script so far:
```
<script type="text/javascript">
... | 2015/04/28 | [
"https://Stackoverflow.com/questions/29913997",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4738531/"
] | I've made a [Fiddle](https://jsfiddle.net/moonspace/9oxdnw40/)
Here's the code:
HTML
```
<form id="payment-form" action="chargeCard.php" method="POST" name="payment-form">
<input type="checkbox" id="terms" />
<input type="button" id="customButton" value="submit" alt="button" class="disabled"/>
</form>
```
JS
```... | ```
$("#customButton").click(function(){
if !($("#terms").is(':checked'))
{
alert("Accept terms first!");
}
})
```
if your browser can not detect click on a disabled button, Warp the button inside a div and change the function to click on that div. |
2,113,056 | The function $f(x)$ satisfying two properties as follows:
$$f(x+y)+f(x-y)=2\bigl(f(x)+f(y)\bigr)$$
$$f(1)=1$$
Then find the value of $f\left(\frac{22}{7}\right)$. | 2017/01/25 | [
"https://math.stackexchange.com/questions/2113056",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/407986/"
] | Let's see.
$f(x+0)+f(x-0)=2f(x)+2f(0)$, hence $f(0)=0$.
$f(0+y)+f(0-y)=2f(0)+2f(y)=2f(y)$, hence the function is even. (Not that we'll need it much.)
$f(x+x)+f(x-x)=2f(x)+2f(x)$, hence $f(2x)=4f(x)$.
At this point we might start to suspect what function is it, but let's not run ahead.
$f(3x)=f(2x+x)+f(2x-x)-f(x)=2... | Letting $x=y=0$ proves $f(0)=0$, and then letting $x=0$ proves $f(-y)=f(y)$.
Fix a $y\ne0$ and put $$x\_k:=ky\>, \qquad a\_k:=f(x\_k)\qquad(k\in{\mathbb Z})\ .$$ We then have
$$a\_{k+1}-2a\_k+a\_{k-1}=2f(y)\qquad(k\in{\mathbb Z})\ .\tag{1}$$
This shows that the second difference of the $a\_k$ is constant. The general ... |
2,113,056 | The function $f(x)$ satisfying two properties as follows:
$$f(x+y)+f(x-y)=2\bigl(f(x)+f(y)\bigr)$$
$$f(1)=1$$
Then find the value of $f\left(\frac{22}{7}\right)$. | 2017/01/25 | [
"https://math.stackexchange.com/questions/2113056",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/407986/"
] | Let's see.
$f(x+0)+f(x-0)=2f(x)+2f(0)$, hence $f(0)=0$.
$f(0+y)+f(0-y)=2f(0)+2f(y)=2f(y)$, hence the function is even. (Not that we'll need it much.)
$f(x+x)+f(x-x)=2f(x)+2f(x)$, hence $f(2x)=4f(x)$.
At this point we might start to suspect what function is it, but let's not run ahead.
$f(3x)=f(2x+x)+f(2x-x)-f(x)=2... | Note that
$$(x+y)^2+(x-y)^2=2(x^2+y^2)$$
This means that $f(x)=x^2$ satisfies the two properties, which means that $(22/7)^2$ is a *possible* value for $f(22/7)$. It remains to rule out any other possibility.
The easiest way to do this is to show inductively that $f(nx)=n^2f(x)$ for all $n\in\mathbb{N}$, because we ... |
2,113,056 | The function $f(x)$ satisfying two properties as follows:
$$f(x+y)+f(x-y)=2\bigl(f(x)+f(y)\bigr)$$
$$f(1)=1$$
Then find the value of $f\left(\frac{22}{7}\right)$. | 2017/01/25 | [
"https://math.stackexchange.com/questions/2113056",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/407986/"
] | Letting $x=y=0$ proves $f(0)=0$, and then letting $x=0$ proves $f(-y)=f(y)$.
Fix a $y\ne0$ and put $$x\_k:=ky\>, \qquad a\_k:=f(x\_k)\qquad(k\in{\mathbb Z})\ .$$ We then have
$$a\_{k+1}-2a\_k+a\_{k-1}=2f(y)\qquad(k\in{\mathbb Z})\ .\tag{1}$$
This shows that the second difference of the $a\_k$ is constant. The general ... | Note that
$$(x+y)^2+(x-y)^2=2(x^2+y^2)$$
This means that $f(x)=x^2$ satisfies the two properties, which means that $(22/7)^2$ is a *possible* value for $f(22/7)$. It remains to rule out any other possibility.
The easiest way to do this is to show inductively that $f(nx)=n^2f(x)$ for all $n\in\mathbb{N}$, because we ... |
1,404,734 | I have been very happy with my Ubuntu 20.04.4LTS system until a few days ago when I installed the 5.13.0-40 update. When installing this update the installation process seemed to freeze removing an earlier update (cant recall which one). I waited an hour to see if it would complete but no change so forced a shutdown an... | 2022/04/26 | [
"https://askubuntu.com/questions/1404734",
"https://askubuntu.com",
"https://askubuntu.com/users/1590262/"
] | You can try below actions
```
wget https://raw.githubusercontent.com/pimlie/ubuntu-mainline-kernel.sh/master/ubuntu-mainline-kernel.sh
chmod +x ubuntu-mainline-kernel.sh
# search and find your wanted version
ubuntu-mainline-kernel.sh -r | grep 5.13
# install that version kernel
ubuntu-mainline-kernel.sh -i v5.13.19
... | In my case, after clean install of lubuntu-22 on Dell-Inspiron\_5570, experienced "elantech touchpad problem" due to which "two finger scrolling" was not working. After 4-5 hectic days on the work dealing with the arrow keys on keyboard, I found it as kernel incompatibility. Then, tried installing different kernel vers... |
2,916,114 | Suppose that $15$ people are divided in a random manner into two groups of 10 and 5. What is probability that two particular people A and B would be in the same group?
My attempt:
$$P(A \cap B)= \binom{15}{10} \binom{15}{5} $$
Am I doing the right thing? | 2018/09/13 | [
"https://math.stackexchange.com/questions/2916114",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/586433/"
] | Let $\mathbb D$ be the open unit disc, $U$ the open right half plane. Suppose $f:\mathbb D\to U$ is bilholomorphic, with $f(0)= 1-i$ (just as your map $T\_2$ does.) How do we then find a biholomorphic map $g:\mathbb D\to U$ with $g(0)= 3?$
There are two families of biholomorphic maps from $U$ to $U$ that are simple an... | It is well worth knowing that the conformal map $z \rightarrow \frac{1+z}{1-z}$ permutes the regions shown below $(1234)$ and act similarly on the lower half plane.
[](https://i.stack.imgur.com/zfRg2.png)
In particular the unit circle is mapped to th... |
2,916,114 | Suppose that $15$ people are divided in a random manner into two groups of 10 and 5. What is probability that two particular people A and B would be in the same group?
My attempt:
$$P(A \cap B)= \binom{15}{10} \binom{15}{5} $$
Am I doing the right thing? | 2018/09/13 | [
"https://math.stackexchange.com/questions/2916114",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/586433/"
] | For a purely algebraic derivation, consider the general form of the Möbius transformation $\,T(z)=\dfrac{az+b}{cz+d}\,$. Both $\,a\,$ and $\,c\,$ cannot be $\,0\,$, otherwise it would be a constant transformation. The right half-plane is invariant to the inversion $\,T(z) \to \dfrac{1}{T(z)}\,$ so it can be assumed WLO... | It is well worth knowing that the conformal map $z \rightarrow \frac{1+z}{1-z}$ permutes the regions shown below $(1234)$ and act similarly on the lower half plane.
[](https://i.stack.imgur.com/zfRg2.png)
In particular the unit circle is mapped to th... |
2,916,114 | Suppose that $15$ people are divided in a random manner into two groups of 10 and 5. What is probability that two particular people A and B would be in the same group?
My attempt:
$$P(A \cap B)= \binom{15}{10} \binom{15}{5} $$
Am I doing the right thing? | 2018/09/13 | [
"https://math.stackexchange.com/questions/2916114",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/586433/"
] | You took only one possible transformation that maps the unit disk to the right half-plane. Generally, since the conjugation wrt the unit circle becomes the conjugation wrt the imaginary axis, $T(0) = 3$ implies $T(\infty) = -3$. Therefore, $T(z) = 3 - 6 z/(z + a)$. Then $T(a) = 0$, therefore $|a| = 1$ gives the general... | It is well worth knowing that the conformal map $z \rightarrow \frac{1+z}{1-z}$ permutes the regions shown below $(1234)$ and act similarly on the lower half plane.
[](https://i.stack.imgur.com/zfRg2.png)
In particular the unit circle is mapped to th... |
2,916,114 | Suppose that $15$ people are divided in a random manner into two groups of 10 and 5. What is probability that two particular people A and B would be in the same group?
My attempt:
$$P(A \cap B)= \binom{15}{10} \binom{15}{5} $$
Am I doing the right thing? | 2018/09/13 | [
"https://math.stackexchange.com/questions/2916114",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/586433/"
] | For a purely algebraic derivation, consider the general form of the Möbius transformation $\,T(z)=\dfrac{az+b}{cz+d}\,$. Both $\,a\,$ and $\,c\,$ cannot be $\,0\,$, otherwise it would be a constant transformation. The right half-plane is invariant to the inversion $\,T(z) \to \dfrac{1}{T(z)}\,$ so it can be assumed WLO... | Let $\mathbb D$ be the open unit disc, $U$ the open right half plane. Suppose $f:\mathbb D\to U$ is bilholomorphic, with $f(0)= 1-i$ (just as your map $T\_2$ does.) How do we then find a biholomorphic map $g:\mathbb D\to U$ with $g(0)= 3?$
There are two families of biholomorphic maps from $U$ to $U$ that are simple an... |
2,916,114 | Suppose that $15$ people are divided in a random manner into two groups of 10 and 5. What is probability that two particular people A and B would be in the same group?
My attempt:
$$P(A \cap B)= \binom{15}{10} \binom{15}{5} $$
Am I doing the right thing? | 2018/09/13 | [
"https://math.stackexchange.com/questions/2916114",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/586433/"
] | For a purely algebraic derivation, consider the general form of the Möbius transformation $\,T(z)=\dfrac{az+b}{cz+d}\,$. Both $\,a\,$ and $\,c\,$ cannot be $\,0\,$, otherwise it would be a constant transformation. The right half-plane is invariant to the inversion $\,T(z) \to \dfrac{1}{T(z)}\,$ so it can be assumed WLO... | You took only one possible transformation that maps the unit disk to the right half-plane. Generally, since the conjugation wrt the unit circle becomes the conjugation wrt the imaginary axis, $T(0) = 3$ implies $T(\infty) = -3$. Therefore, $T(z) = 3 - 6 z/(z + a)$. Then $T(a) = 0$, therefore $|a| = 1$ gives the general... |
1,170,745 | How to pass current scope variables and functions to the anonymous function in plain Javascript or in jQuery (if it's specific for frameworks).
For example:
```
jQuery.extend({
someFunction: function(onSomeEvent) {
var variable = 'some text'
onSomeEvent.apply(this); // how to pass current scope variables/fu... | 2009/07/23 | [
"https://Stackoverflow.com/questions/1170745",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/409016/"
] | Read about Scopes in JavaScript for example in "Java Script: The good parts".
In the Java Script there is only scope inside Functions.
If you specify your variable inside function with **var** you can't access them from outside of this function. This is way to make private variables in JavaScript.
You can use **this*... | Before line 1:
```
var that = this;
```
Then change line 4:
```
onSomeEvent.apply(that);
``` |
51,192,023 | I'm currently implement video call application, something like Google Hangout using Twilio Video. I want to show the video of person who is speaking at that time in the background.
Is it possible to detect who is speaking with Twilio Video JS SDK ? | 2018/07/05 | [
"https://Stackoverflow.com/questions/51192023",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5915844/"
] | **Edit**
The Twilio Video SDKs now include support for [detecting and updating the dominant speaker](https://www.twilio.com/docs/video/detecting-dominant-speaker). Please see [the documentation](https://www.twilio.com/docs/video/detecting-dominant-speaker) for full details.
**Original answer**
Twilio developer evang... | In the end, I managed to get the result I want using `getStats()` method using Twilio Video JS SDK. I'll put the example code here so it could be useful for people who are looking to implement the same functionality.
Reference: <https://media.twiliocdn.com/sdk/js/video/releases/1.10.0/docs/Room.html>
```
room.getSt... |
66,230,657 | So I have been following this youtube tutorial on how to create a login/sign up form and I've run into a problem. Whilst coding the JS, I tried testing out the continue button without any values submitted into the input groups, and nothing happened. So I went to check the console and I was met with this error message, ... | 2021/02/16 | [
"https://Stackoverflow.com/questions/66230657",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15222680/"
] | New instructions use previously-unused opcodes, or other ways to find more "coding space" (e.g. prefixes that didn't previously mean anything for a given opcode).
>
> How would an older processor know how to decode new instructions it doesn't know about?
>
>
>
It won't. A binary that wants to work on old CPUs as ... | Most of the times, old processor will have "Undefined Instruction" exception. The instruction is not defined in old CPU.
In more rare cases, the instruction will execute as a different instruction. This happens when then new instruction is encoded via obligatory prefix. As an example, PAUSE is encoded as REP NOP, so i... |
46,102,232 | This is an invalid syntax for some reason
```
<Link to={'/page/with/' + id + '/' + name}>Some param Page</Link>
```
The entire error is this and the app just doesn't compiles
```
Line 17: Unexpected use of 'name' no-restricted-globals
Search for the keywords to learn more about each error.
```
But this one i... | 2017/09/07 | [
"https://Stackoverflow.com/questions/46102232",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4770450/"
] | This error here
```
Line 17: Unexpected use of 'name' no-restricted-globals
Search for the keywords to learn more about each error.
```
`name` is a keyword in JS, so it throws an error. It's like trying to name a variable `this` - you're going to run into issues. Try picking a different variable name. | Ah, thanks for the edit! You are creating `name` outside of `Header` scope. let and const are limited in scope to the block, statement, or expression on which it is used. To fix this, just move `name` into the `Header` stateless component:
```
const Header = () => {
let name = 'sasho';
let id = 2;
return (
... |
276,984 | Is there a word that names an excuse made so as to not look stupid?
Here is an example that actually happened:
>
> A guy walks up to a girl and starts talking to her. After talking for some time, the girl asks the guy to give her a kiss, but the guy refuses. So to this, the girl said, "I just wanted to test you if y... | 2015/09/30 | [
"https://english.stackexchange.com/questions/276984",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/124070/"
] | An example using 'face-saving' (as suggested by Doug Warren):
>
> So to save face, the girl said, "I just wanted to test you if you are
> a good guy or a bad one."
>
>
> | [Lifesaver](http://dictionary.reference.com/browse/lifesaver?s=ts) is what comes to mind.
**lifesaver**: a person or thing that saves a person, as from a difficult situation or critical moment (Dictionary.com)
*The lawyer excuse was a [lifesaver](https://books.google.fr/books?id=qXNRBAAAQBAJ&pg=PT42&lpg=PT42&dq=%22ex... |
276,984 | Is there a word that names an excuse made so as to not look stupid?
Here is an example that actually happened:
>
> A guy walks up to a girl and starts talking to her. After talking for some time, the girl asks the guy to give her a kiss, but the guy refuses. So to this, the girl said, "I just wanted to test you if y... | 2015/09/30 | [
"https://english.stackexchange.com/questions/276984",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/124070/"
] | >
> **pretext**
>
>
> *noun*
>
>
> A reason given in justification of a course of action that is not the
> real reason:
> *the rebels had the perfect **pretext** for making their move*
> [OED](http://www.oxforddictionaries.com/us/definition/american_english/pretext)
>
>
>
So you could say
>
> A guy walks... | An example using 'face-saving' (as suggested by Doug Warren):
>
> So to save face, the girl said, "I just wanted to test you if you are
> a good guy or a bad one."
>
>
> |
276,984 | Is there a word that names an excuse made so as to not look stupid?
Here is an example that actually happened:
>
> A guy walks up to a girl and starts talking to her. After talking for some time, the girl asks the guy to give her a kiss, but the guy refuses. So to this, the girl said, "I just wanted to test you if y... | 2015/09/30 | [
"https://english.stackexchange.com/questions/276984",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/124070/"
] | It's not one word, but I would call such an excuse "**face-saving**", which is defined by [oxforddictionaries.com](https://www.oxforddictionaries.com/us/definition/american_english/face-saving?q=face-saver#face-saving__4) as "preserving one’s reputation, credibility, or dignity". | An example using 'face-saving' (as suggested by Doug Warren):
>
> So to save face, the girl said, "I just wanted to test you if you are
> a good guy or a bad one."
>
>
> |
276,984 | Is there a word that names an excuse made so as to not look stupid?
Here is an example that actually happened:
>
> A guy walks up to a girl and starts talking to her. After talking for some time, the girl asks the guy to give her a kiss, but the guy refuses. So to this, the girl said, "I just wanted to test you if y... | 2015/09/30 | [
"https://english.stackexchange.com/questions/276984",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/124070/"
] | It's not one word, but I would call such an excuse "**face-saving**", which is defined by [oxforddictionaries.com](https://www.oxforddictionaries.com/us/definition/american_english/face-saving?q=face-saver#face-saving__4) as "preserving one’s reputation, credibility, or dignity". | >
> **pretext**
>
>
> *noun*
>
>
> A reason given in justification of a course of action that is not the
> real reason:
> *the rebels had the perfect **pretext** for making their move*
> [OED](http://www.oxforddictionaries.com/us/definition/american_english/pretext)
>
>
>
So you could say
>
> A guy walks... |
276,984 | Is there a word that names an excuse made so as to not look stupid?
Here is an example that actually happened:
>
> A guy walks up to a girl and starts talking to her. After talking for some time, the girl asks the guy to give her a kiss, but the guy refuses. So to this, the girl said, "I just wanted to test you if y... | 2015/09/30 | [
"https://english.stackexchange.com/questions/276984",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/124070/"
] | How about ***[cop-out](http://www.merriam-webster.com/dictionary/cop-out)***?
>
> : an excuse for not doing something
>
>
> : something that avoids dealing with a problem in an appropriate way
>
>
>
So it's an excuse, except more emphasis on avoiding something (like not looking stupid in your example). so I thi... | Depending on context I suggest
[**"an extemporaneous excuse"**](http://www.merriam-webster.com/dictionary/extemporaneous)
>
> * composed, performed, or uttered on the spur of the moment
>
>
>
[**"an ad hoc excuse"**](http://www.merriam-webster.com/dictionary/ad%20hoc)
>
> * made or done without planning becau... |
276,984 | Is there a word that names an excuse made so as to not look stupid?
Here is an example that actually happened:
>
> A guy walks up to a girl and starts talking to her. After talking for some time, the girl asks the guy to give her a kiss, but the guy refuses. So to this, the girl said, "I just wanted to test you if y... | 2015/09/30 | [
"https://english.stackexchange.com/questions/276984",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/124070/"
] | Justification. "So to this, the girl justified herself by claiming she was testing him." | Depending on context I suggest
[**"an extemporaneous excuse"**](http://www.merriam-webster.com/dictionary/extemporaneous)
>
> * composed, performed, or uttered on the spur of the moment
>
>
>
[**"an ad hoc excuse"**](http://www.merriam-webster.com/dictionary/ad%20hoc)
>
> * made or done without planning becau... |
276,984 | Is there a word that names an excuse made so as to not look stupid?
Here is an example that actually happened:
>
> A guy walks up to a girl and starts talking to her. After talking for some time, the girl asks the guy to give her a kiss, but the guy refuses. So to this, the girl said, "I just wanted to test you if y... | 2015/09/30 | [
"https://english.stackexchange.com/questions/276984",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/124070/"
] | (Not a one word) **She tried to keep up appearances**.
>
> Definition: to make things look all right whether they are or not; to pretend to be happier, less poor, etc. than you really are, because you do not want people to know how bad your situation is.
>
>
> Examples: We must keep up appearances even if ... | An example using 'face-saving' (as suggested by Doug Warren):
>
> So to save face, the girl said, "I just wanted to test you if you are
> a good guy or a bad one."
>
>
> |
276,984 | Is there a word that names an excuse made so as to not look stupid?
Here is an example that actually happened:
>
> A guy walks up to a girl and starts talking to her. After talking for some time, the girl asks the guy to give her a kiss, but the guy refuses. So to this, the girl said, "I just wanted to test you if y... | 2015/09/30 | [
"https://english.stackexchange.com/questions/276984",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/124070/"
] | Depending on context I suggest
[**"an extemporaneous excuse"**](http://www.merriam-webster.com/dictionary/extemporaneous)
>
> * composed, performed, or uttered on the spur of the moment
>
>
>
[**"an ad hoc excuse"**](http://www.merriam-webster.com/dictionary/ad%20hoc)
>
> * made or done without planning becau... | [Lifesaver](http://dictionary.reference.com/browse/lifesaver?s=ts) is what comes to mind.
**lifesaver**: a person or thing that saves a person, as from a difficult situation or critical moment (Dictionary.com)
*The lawyer excuse was a [lifesaver](https://books.google.fr/books?id=qXNRBAAAQBAJ&pg=PT42&lpg=PT42&dq=%22ex... |
276,984 | Is there a word that names an excuse made so as to not look stupid?
Here is an example that actually happened:
>
> A guy walks up to a girl and starts talking to her. After talking for some time, the girl asks the guy to give her a kiss, but the guy refuses. So to this, the girl said, "I just wanted to test you if y... | 2015/09/30 | [
"https://english.stackexchange.com/questions/276984",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/124070/"
] | >
> **pretext**
>
>
> *noun*
>
>
> A reason given in justification of a course of action that is not the
> real reason:
> *the rebels had the perfect **pretext** for making their move*
> [OED](http://www.oxforddictionaries.com/us/definition/american_english/pretext)
>
>
>
So you could say
>
> A guy walks... | Depending on context I suggest
[**"an extemporaneous excuse"**](http://www.merriam-webster.com/dictionary/extemporaneous)
>
> * composed, performed, or uttered on the spur of the moment
>
>
>
[**"an ad hoc excuse"**](http://www.merriam-webster.com/dictionary/ad%20hoc)
>
> * made or done without planning becau... |
276,984 | Is there a word that names an excuse made so as to not look stupid?
Here is an example that actually happened:
>
> A guy walks up to a girl and starts talking to her. After talking for some time, the girl asks the guy to give her a kiss, but the guy refuses. So to this, the girl said, "I just wanted to test you if y... | 2015/09/30 | [
"https://english.stackexchange.com/questions/276984",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/124070/"
] | It's not one word, but I would call such an excuse "**face-saving**", which is defined by [oxforddictionaries.com](https://www.oxforddictionaries.com/us/definition/american_english/face-saving?q=face-saver#face-saving__4) as "preserving one’s reputation, credibility, or dignity". | [Lifesaver](http://dictionary.reference.com/browse/lifesaver?s=ts) is what comes to mind.
**lifesaver**: a person or thing that saves a person, as from a difficult situation or critical moment (Dictionary.com)
*The lawyer excuse was a [lifesaver](https://books.google.fr/books?id=qXNRBAAAQBAJ&pg=PT42&lpg=PT42&dq=%22ex... |
28,216,096 | I am building a C#/WPF application using VS2013, and I have the following class definition (in the same assembly of the running application):
```
namespace MyNamespace
{
public class MyKey
{
public MyKey() { }
public string name = "";
}
}
```
In MainWindow.xaml I have:
```
<Window x:Clas... | 2015/01/29 | [
"https://Stackoverflow.com/questions/28216096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4101439/"
] | One possible solution is by removing all the **.dll** files from **Debug** and **Release** folder.
Because sometimes when you refer to the project it refers to the pre-built dlls, even if you running your project in debug mode.
Remove all files from **debug** and **release** folder and build that project again, now a... | I had a similar issue. What fixed it for me was changing the build properties of the project, that was added as a reference. Turned out that the "Platform target" had been changed in the past. Setting it to "Any CPU" and rebuilding it solved the error. |
28,216,096 | I am building a C#/WPF application using VS2013, and I have the following class definition (in the same assembly of the running application):
```
namespace MyNamespace
{
public class MyKey
{
public MyKey() { }
public string name = "";
}
}
```
In MainWindow.xaml I have:
```
<Window x:Clas... | 2015/01/29 | [
"https://Stackoverflow.com/questions/28216096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4101439/"
] | One common solution to this known VS bug that you haven't specified as having tried is changing the build target platform.
1. If your current build target platform is x64, change to x86. If it's currently x86, change to x64.
2. Clean and Build solution for new target platform.
3. Change back to desired target platfor... | I had the same issue in VS2012 express edition. Solved the issue using the command
"WDExpress/ResetSettings" in vs2012 command prompt.
<https://stackoverflow.com/a/33706647/4855197> |
28,216,096 | I am building a C#/WPF application using VS2013, and I have the following class definition (in the same assembly of the running application):
```
namespace MyNamespace
{
public class MyKey
{
public MyKey() { }
public string name = "";
}
}
```
In MainWindow.xaml I have:
```
<Window x:Clas... | 2015/01/29 | [
"https://Stackoverflow.com/questions/28216096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4101439/"
] | I had the same issue in VS2012 express edition. Solved the issue using the command
"WDExpress/ResetSettings" in vs2012 command prompt.
<https://stackoverflow.com/a/33706647/4855197> | In my case the solution was deleting my cloned repository (means all project files) and cloning it again. This way you make sure that even those git-ignored files are deleted.
PS: When you start git-tracking your project using Visual Studio it will automatically generate the .gitignore file for you. If you didn't star... |
28,216,096 | I am building a C#/WPF application using VS2013, and I have the following class definition (in the same assembly of the running application):
```
namespace MyNamespace
{
public class MyKey
{
public MyKey() { }
public string name = "";
}
}
```
In MainWindow.xaml I have:
```
<Window x:Clas... | 2015/01/29 | [
"https://Stackoverflow.com/questions/28216096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4101439/"
] | One common solution to this known VS bug that you haven't specified as having tried is changing the build target platform.
1. If your current build target platform is x64, change to x86. If it's currently x86, change to x64.
2. Clean and Build solution for new target platform.
3. Change back to desired target platfor... | Running VS Enterprise 2017 version 15.6.2
Targeting .Net 4.6.1
I had this same problem with a UserControl xaml page where in its resources it was trying to reference a ValueConverter. The namespace was correct, the intellisense would even drop it in for you, but the designer would not load the page and the code would... |
28,216,096 | I am building a C#/WPF application using VS2013, and I have the following class definition (in the same assembly of the running application):
```
namespace MyNamespace
{
public class MyKey
{
public MyKey() { }
public string name = "";
}
}
```
In MainWindow.xaml I have:
```
<Window x:Clas... | 2015/01/29 | [
"https://Stackoverflow.com/questions/28216096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4101439/"
] | One common solution to this known VS bug that you haven't specified as having tried is changing the build target platform.
1. If your current build target platform is x64, change to x86. If it's currently x86, change to x64.
2. Clean and Build solution for new target platform.
3. Change back to desired target platfor... | One possible solution is by removing all the **.dll** files from **Debug** and **Release** folder.
Because sometimes when you refer to the project it refers to the pre-built dlls, even if you running your project in debug mode.
Remove all files from **debug** and **release** folder and build that project again, now a... |
28,216,096 | I am building a C#/WPF application using VS2013, and I have the following class definition (in the same assembly of the running application):
```
namespace MyNamespace
{
public class MyKey
{
public MyKey() { }
public string name = "";
}
}
```
In MainWindow.xaml I have:
```
<Window x:Clas... | 2015/01/29 | [
"https://Stackoverflow.com/questions/28216096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4101439/"
] | Typically when I encounter this problem I noticed that Visual Studio lists 'wrong' errors in the error list and puts me on a wrong track. Having a look in the actual build output in the output window of Visual Studio showed the correct error.
In short: Compare your build output with your error list. | Try changing the Dot.Net version in your project and update the installed packages if you use the NuGet packages. |
28,216,096 | I am building a C#/WPF application using VS2013, and I have the following class definition (in the same assembly of the running application):
```
namespace MyNamespace
{
public class MyKey
{
public MyKey() { }
public string name = "";
}
}
```
In MainWindow.xaml I have:
```
<Window x:Clas... | 2015/01/29 | [
"https://Stackoverflow.com/questions/28216096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4101439/"
] | One common solution to this known VS bug that you haven't specified as having tried is changing the build target platform.
1. If your current build target platform is x64, change to x86. If it's currently x86, change to x64.
2. Clean and Build solution for new target platform.
3. Change back to desired target platfor... | Try changing the Dot.Net version in your project and update the installed packages if you use the NuGet packages. |
28,216,096 | I am building a C#/WPF application using VS2013, and I have the following class definition (in the same assembly of the running application):
```
namespace MyNamespace
{
public class MyKey
{
public MyKey() { }
public string name = "";
}
}
```
In MainWindow.xaml I have:
```
<Window x:Clas... | 2015/01/29 | [
"https://Stackoverflow.com/questions/28216096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4101439/"
] | One possible solution is by removing all the **.dll** files from **Debug** and **Release** folder.
Because sometimes when you refer to the project it refers to the pre-built dlls, even if you running your project in debug mode.
Remove all files from **debug** and **release** folder and build that project again, now a... | Running VS Enterprise 2017 version 15.6.2
Targeting .Net 4.6.1
I had this same problem with a UserControl xaml page where in its resources it was trying to reference a ValueConverter. The namespace was correct, the intellisense would even drop it in for you, but the designer would not load the page and the code would... |
28,216,096 | I am building a C#/WPF application using VS2013, and I have the following class definition (in the same assembly of the running application):
```
namespace MyNamespace
{
public class MyKey
{
public MyKey() { }
public string name = "";
}
}
```
In MainWindow.xaml I have:
```
<Window x:Clas... | 2015/01/29 | [
"https://Stackoverflow.com/questions/28216096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4101439/"
] | One common solution to this known VS bug that you haven't specified as having tried is changing the build target platform.
1. If your current build target platform is x64, change to x86. If it's currently x86, change to x64.
2. Clean and Build solution for new target platform.
3. Change back to desired target platfor... | In my case the solution was deleting my cloned repository (means all project files) and cloning it again. This way you make sure that even those git-ignored files are deleted.
PS: When you start git-tracking your project using Visual Studio it will automatically generate the .gitignore file for you. If you didn't star... |
28,216,096 | I am building a C#/WPF application using VS2013, and I have the following class definition (in the same assembly of the running application):
```
namespace MyNamespace
{
public class MyKey
{
public MyKey() { }
public string name = "";
}
}
```
In MainWindow.xaml I have:
```
<Window x:Clas... | 2015/01/29 | [
"https://Stackoverflow.com/questions/28216096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4101439/"
] | Try changing the Dot.Net version in your project and update the installed packages if you use the NuGet packages. | In my case the solution was deleting my cloned repository (means all project files) and cloning it again. This way you make sure that even those git-ignored files are deleted.
PS: When you start git-tracking your project using Visual Studio it will automatically generate the .gitignore file for you. If you didn't star... |
39,589,715 | I am using the command line `sass --watch style.scss --style compressed` to output a compressed CSS version of my SCSS style sheet.
Is there a way to output one expanded and one compressed CSS file, calling them respectively style.css and style.min.css?
I read the [documentation](http://sass-lang.com/documentation/fi... | 2016/09/20 | [
"https://Stackoverflow.com/questions/39589715",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2154717/"
] | You could run two terminal windows, each with one watcher in it. In one you would run
```
sass --watch style.scss:style.css --style nested
```
and in the other you would run
```
sass --watch style.scss:style.min.css --style compressed
```
I am unaware of a method to do this in one line. | Your best bet would be to go with a task manager like Gulp or Grunt. Then you can specify two separate task for SASS and run grunt compile (using the Grunt example below). One for compressed and one for expanded. Otherwise I would just run another command on the terminal if you don't wan to mess with the config.
```
s... |
34,857,388 | In Ionic 1.2.4 i have added a button bar but the button doesn't have any border (instead in the official documentation they have a border).
I have:
```
<div class="button-bar bar-stable">
<a class="button">First</a>
<a class="button">Second</a>
<a class="button">Third</a>
</div>
```
I've seen that in the c... | 2016/01/18 | [
"https://Stackoverflow.com/questions/34857388",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1123460/"
] | Unfortunately in ionic 1.2.0 the border of buttons was removed and there seems to be no general solution.
Look here [Defaulting all button borders to transparent #4861](https://github.com/driftyco/ionic/issues/4861)
I'm currently fighting the same issue. | I used inline styling (bad practice I know) as a workaround to this problem to apply a border to an individual button without having to interfere with the button class. Like so:
```
<button style="border-right: 2px solid #15AB3F;" class="button button-block button-balanced"></button>
``` |
69,359 | I just got home file server, and it contains 7 hard drives. I installed on it Ubuntu Server (Jaunty). What should I do to make it power down drives when they are not in use (most of the time they will not be used).
All of them are sata drives, bundled together with software RAID. | 2009/09/28 | [
"https://serverfault.com/questions/69359",
"https://serverfault.com",
"https://serverfault.com/users/-1/"
] | type man hdparm | Maybe I am paranoid, but I don't like the idea of powering down a RAID more than you have to. What type of RAID is it? How often will it need to power on and off? |
69,359 | I just got home file server, and it contains 7 hard drives. I installed on it Ubuntu Server (Jaunty). What should I do to make it power down drives when they are not in use (most of the time they will not be used).
All of them are sata drives, bundled together with software RAID. | 2009/09/28 | [
"https://serverfault.com/questions/69359",
"https://serverfault.com",
"https://serverfault.com/users/-1/"
] | [I've answered a similar question elsewhere](https://serverfault.com/questions/48199/how-can-i-enable-spinning-down-of-idle-hard-disks-on-a-debian-lenny-server).
[Constant cycling of the power on regular drives actually leads to premature drive failure.](http://samwel.tk/laptop_mode/faq) The drives are rated for only ... | Maybe I am paranoid, but I don't like the idea of powering down a RAID more than you have to. What type of RAID is it? How often will it need to power on and off? |
26,530,946 | I'm trying to find an `OpenLayers3.js` file that is not minifed, it is a pain debugging stuff that is minified, can anyone help me find it?
Im using this address now: <http://openlayers.org/en/v3.0.0/build/ol.js>
By the way, it is a special thingy at the top. See the website: <http://ol3.js.org/> ? Made me laugh.
He... | 2014/10/23 | [
"https://Stackoverflow.com/questions/26530946",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2024913/"
] | If you need the unminified ol, you can use the one from ol:
<http://openlayers.org/en/v3.0.0/build/ol-debug.js>
It's a file of 3.5M so don't use this in production ;) | Have you tried the [Download](https://github.com/openlayers/ol3/releases) link on the [main page](http://openlayers.org/)?
<https://github.com/openlayers/ol3/releases/download/v3.0.0/v3.0.0.zip>
If you want a hosted version, upload one here:
<https://cdnjs.com> |
26,530,946 | I'm trying to find an `OpenLayers3.js` file that is not minifed, it is a pain debugging stuff that is minified, can anyone help me find it?
Im using this address now: <http://openlayers.org/en/v3.0.0/build/ol.js>
By the way, it is a special thingy at the top. See the website: <http://ol3.js.org/> ? Made me laugh.
He... | 2014/10/23 | [
"https://Stackoverflow.com/questions/26530946",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2024913/"
] | If you need the unminified ol, you can use the one from ol:
<http://openlayers.org/en/v3.0.0/build/ol-debug.js>
It's a file of 3.5M so don't use this in production ;) | Yes, <http://openlayers.org/en/v3.0.0/examples/loader.js> will load all the raw files -- basically by writing out a bunch of script tags. As @lexicore has already said, you can get the source from [github](https://github.com/openlayers/ol3), though this involves setting up nodejs locally to run (which actually isn't th... |
40,399,034 | I have:
```
const props = {
gallery: [],
select: () => null,
one: 1,
two: 2,
}
```
I can destructure it with:
```
const {gallery, select, ...other} = props
```
I will have three variables now:
* **gallery** = `[]`
* **select** = `() => null`
* **other** = `{one: 1,two: 2}`
Is it possible to destucture t... | 2016/11/03 | [
"https://Stackoverflow.com/questions/40399034",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1214289/"
] | Well, a corpus of **20 million** texts is **very large**, and without a meticulous and comprehensive preprocessing nor some good computing instances (i.e. a lot of memory and good CPUs), the TF-IDF calculation may take a lot of time.
*What you can do* :
* **Limit your text corpus** to some hundred of thousands of sam... | **start small**.
First cluster only 100.00 documents. Only once it works (because it probably won't), then think about scaling up.
If you don't succeed clustering the subset (and text clusters are usually pretty bad), then you won't fare well on the large set. |
74,102,026 | I am making a simple drop down menu app.
My goal is to update the look of the menu through DOM manipulation using an if else statement for specific keyboard key clicks.
Here is the code in question along with an explanation of what is happening currently as well as what I want the code to actually do.
```
componentD... | 2022/10/17 | [
"https://Stackoverflow.com/questions/74102026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16216838/"
] | When you return a value from a function, nothing after that return can be ran - you're leaving the function. Therefore the breaks will never be reached because there is always a return right before them.
You also don't need to assign the return value to the response variable, you can just write
```
return affirmative... | This is because when you return, you exit the function. It will never reach the break because you return right before it. The fix is simple. Just remove the breaks. |
74,102,026 | I am making a simple drop down menu app.
My goal is to update the look of the menu through DOM manipulation using an if else statement for specific keyboard key clicks.
Here is the code in question along with an explanation of what is happening currently as well as what I want the code to actually do.
```
componentD... | 2022/10/17 | [
"https://Stackoverflow.com/questions/74102026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16216838/"
] | the "return" keyword pretty much ends the method so you don't really need to add the "break;" in this instance. Also you need to a default condition when using switch statements and lastly your string response needs to be set to the console.readline.
```
{
public static void Main(string[] args)
... | This is because when you return, you exit the function. It will never reach the break because you return right before it. The fix is simple. Just remove the breaks. |
74,102,026 | I am making a simple drop down menu app.
My goal is to update the look of the menu through DOM manipulation using an if else statement for specific keyboard key clicks.
Here is the code in question along with an explanation of what is happening currently as well as what I want the code to actually do.
```
componentD... | 2022/10/17 | [
"https://Stackoverflow.com/questions/74102026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16216838/"
] | the "return" keyword pretty much ends the method so you don't really need to add the "break;" in this instance. Also you need to a default condition when using switch statements and lastly your string response needs to be set to the console.readline.
```
{
public static void Main(string[] args)
... | When you return a value from a function, nothing after that return can be ran - you're leaving the function. Therefore the breaks will never be reached because there is always a return right before them.
You also don't need to assign the return value to the response variable, you can just write
```
return affirmative... |
3,012,318 | I have some\* experience using the flex framework for building web apps.
But I have no experience with server side languages, I have heard the saying "choose one and stick to it" several times in reference to programming.
I have chosen coldfusion.
Now I have no clue what to do or where to start.
Now to the details... | 2010/06/10 | [
"https://Stackoverflow.com/questions/3012318",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302968/"
] | Probably the best place for you to start would be the "CFWACK" (ColdFusion Web Application Construction Kit) series of books. Pick the series specific to the version of ColdFusion you have available to you -- CF9 is relatively new to market, and the books are available, but a majority of shared (e.g. cheaper) hosts sti... | I'll ditto the recommendation for CFWACK, but as one of the authors I'm a bit biased. One point of clarification. The books are NOT written from scratch for each new version. In cases where we can just update, we do.
Now - I definitely want to see everyone buy CFWACK - but don't forget that Adobe ships a multi-thousan... |
3,012,318 | I have some\* experience using the flex framework for building web apps.
But I have no experience with server side languages, I have heard the saying "choose one and stick to it" several times in reference to programming.
I have chosen coldfusion.
Now I have no clue what to do or where to start.
Now to the details... | 2010/06/10 | [
"https://Stackoverflow.com/questions/3012318",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302968/"
] | Probably the best place for you to start would be the "CFWACK" (ColdFusion Web Application Construction Kit) series of books. Pick the series specific to the version of ColdFusion you have available to you -- CF9 is relatively new to market, and the books are available, but a majority of shared (e.g. cheaper) hosts sti... | The best resources:
<http://help.adobe.com/en_US/ColdFusion/9.0/Developing/index.html>
<http://www.carehart.org/ugtv/>
Keep yourself in the loop:
<http://twitter.com/danshort/coldfusion>
<http://feeds.adobe.com/>
If you're stuck with some CF questions, post up here or ask one of them:
<http://www.bennadel.com/as... |
3,012,318 | I have some\* experience using the flex framework for building web apps.
But I have no experience with server side languages, I have heard the saying "choose one and stick to it" several times in reference to programming.
I have chosen coldfusion.
Now I have no clue what to do or where to start.
Now to the details... | 2010/06/10 | [
"https://Stackoverflow.com/questions/3012318",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/302968/"
] | I'll ditto the recommendation for CFWACK, but as one of the authors I'm a bit biased. One point of clarification. The books are NOT written from scratch for each new version. In cases where we can just update, we do.
Now - I definitely want to see everyone buy CFWACK - but don't forget that Adobe ships a multi-thousan... | The best resources:
<http://help.adobe.com/en_US/ColdFusion/9.0/Developing/index.html>
<http://www.carehart.org/ugtv/>
Keep yourself in the loop:
<http://twitter.com/danshort/coldfusion>
<http://feeds.adobe.com/>
If you're stuck with some CF questions, post up here or ask one of them:
<http://www.bennadel.com/as... |
53,083,093 | I am looking for a clever solution to simplify a Lambda expression which is growing longer and longer. It looks something like this:
```
services.AddSingleton(provider => MassTransit.Bus.Factory.CreateUsingRabbitMq(cfg =>
{
var host = cfg.Host("xyz", "/", hst =>
{
hst.Username("user");
hst.Pass... | 2018/10/31 | [
"https://Stackoverflow.com/questions/53083093",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1639822/"
] | **Disclaimer**: I know nothing about MassTransit - I've never worked with it before and in fact, never even heard about it until reading the question.
You should probably check out [Alexey Zimarev's answer](https://stackoverflow.com/a/53084939/3094533) since he suggest a different way to work with MassTransit configur... | **Assumption:** My answer assumes there is an overload for `.Map()` that takes a `Type` instead of being `Generic`. (e.g. `.Map(typeof(Class1), e.InputAddress)`) as this is pretty common among such generic functions.
*If this is not the case, then ignore this answer. I feel it could still be useful for someone else i... |
53,083,093 | I am looking for a clever solution to simplify a Lambda expression which is growing longer and longer. It looks something like this:
```
services.AddSingleton(provider => MassTransit.Bus.Factory.CreateUsingRabbitMq(cfg =>
{
var host = cfg.Host("xyz", "/", hst =>
{
hst.Username("user");
hst.Pass... | 2018/10/31 | [
"https://Stackoverflow.com/questions/53083093",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1639822/"
] | It seems like you misunderstood the concept of endpoints, consumers and conventions.
I am very concerned that you use `LoadFrom` for each endpoint. It means that *all* your consumers that are registered in the container will be listening in each endpoint.
Usually, if you want to split consumers per endpoint, you nee... | **Disclaimer**: I know nothing about MassTransit - I've never worked with it before and in fact, never even heard about it until reading the question.
You should probably check out [Alexey Zimarev's answer](https://stackoverflow.com/a/53084939/3094533) since he suggest a different way to work with MassTransit configur... |
53,083,093 | I am looking for a clever solution to simplify a Lambda expression which is growing longer and longer. It looks something like this:
```
services.AddSingleton(provider => MassTransit.Bus.Factory.CreateUsingRabbitMq(cfg =>
{
var host = cfg.Host("xyz", "/", hst =>
{
hst.Username("user");
hst.Pass... | 2018/10/31 | [
"https://Stackoverflow.com/questions/53083093",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1639822/"
] | It seems like you misunderstood the concept of endpoints, consumers and conventions.
I am very concerned that you use `LoadFrom` for each endpoint. It means that *all* your consumers that are registered in the container will be listening in each endpoint.
Usually, if you want to split consumers per endpoint, you nee... | **Assumption:** My answer assumes there is an overload for `.Map()` that takes a `Type` instead of being `Generic`. (e.g. `.Map(typeof(Class1), e.InputAddress)`) as this is pretty common among such generic functions.
*If this is not the case, then ignore this answer. I feel it could still be useful for someone else i... |
6,712,244 | How can the last two lines of one function be
```
printf("disk_free_blocks returning %llu\n",item_int3);
return (item_int3);
```
and out put
disk\_free\_blocks returning 233012428800
returning to calling function as
```
part_avail=disk_free_blocks(DiskParts[part_index].part_name,DISK_AVAIL);
if (DEBUG) printf("D... | 2011/07/15 | [
"https://Stackoverflow.com/questions/6712244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/847061/"
] | The two output numbers are:
```
0x00000036409F8000
```
and
```
0x409F8000
```
It appears that the return type (which you haven't shown) isn't large enough to accomodate a 64-bit value, so the compiler simply truncates (which is the behavior required by the standard, for narrowing conversions on unsigned i... | The return value was truncated to 32 bits somewhere along the way. Perhaps `disk_free_blocks` is declared as returning an `int`? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.