prompt stringlengths 48 2.37k | chosen stringlengths 7 4.28k | rejected stringlengths 11 4.44k |
|---|---|---|
Question: I have installed the Java 3D API on PC via the exe installer, which simply created a new directory with `j3dcore.jar`, `vecmath.jar`, `j3dutils.jar` in a lib sub-directory and `j3dcore-ogl.dll` in a bin sub-directory.
Netbeans had no issues and my code compiled and executed smoothly, however once I built my ... | >
> Making my Java program easily distributable
>
>
>
If you mean 'easy for the end user' look to [Java Web Start](https://stackoverflow.com/tags/java-web-start/info).
---
A passer-by asks:
>
> Can you package the dll dependencies with Web Start?
>
>
>
Yes, but much, much better. You can package the nativ... | If you put the dlls in the same directory than you Jar, does it work?
If yes, you could consider distributing it like this. |
Question: I have installed the Java 3D API on PC via the exe installer, which simply created a new directory with `j3dcore.jar`, `vecmath.jar`, `j3dutils.jar` in a lib sub-directory and `j3dcore-ogl.dll` in a bin sub-directory.
Netbeans had no issues and my code compiled and executed smoothly, however once I built my ... | *Edit - After re-reading your question, your issue sounds different. However I'm able to get my running like so, by just dropping all dll files in the same directory as the .bat file starting the java process:*
*java -classpath ./YourJar.jar;./lib/j3dcore.jar;./lib/vecmath.jar;./lib/j3dutils.jar package.MainClass*
*A... | If you put the dlls in the same directory than you Jar, does it work?
If yes, you could consider distributing it like this. |
Question: I have installed the Java 3D API on PC via the exe installer, which simply created a new directory with `j3dcore.jar`, `vecmath.jar`, `j3dutils.jar` in a lib sub-directory and `j3dcore-ogl.dll` in a bin sub-directory.
Netbeans had no issues and my code compiled and executed smoothly, however once I built my ... | >
> Making my Java program easily distributable
>
>
>
If you mean 'easy for the end user' look to [Java Web Start](https://stackoverflow.com/tags/java-web-start/info).
---
A passer-by asks:
>
> Can you package the dll dependencies with Web Start?
>
>
>
Yes, but much, much better. You can package the nativ... | I guess DLL are searched in all folders in %PATH% on windows. (LD\_LIBRARY\_PATH for UNIX flavors)
Could you try by adding the path to dll to %path% variable?
It appears that you are trying package a product with many jars as dependencies. You may benefit from [One-Jar](http://one-jar.sourceforge.net/index.php?page=d... |
Question: I have installed the Java 3D API on PC via the exe installer, which simply created a new directory with `j3dcore.jar`, `vecmath.jar`, `j3dutils.jar` in a lib sub-directory and `j3dcore-ogl.dll` in a bin sub-directory.
Netbeans had no issues and my code compiled and executed smoothly, however once I built my ... | *Edit - After re-reading your question, your issue sounds different. However I'm able to get my running like so, by just dropping all dll files in the same directory as the .bat file starting the java process:*
*java -classpath ./YourJar.jar;./lib/j3dcore.jar;./lib/vecmath.jar;./lib/j3dutils.jar package.MainClass*
*A... | I guess DLL are searched in all folders in %PATH% on windows. (LD\_LIBRARY\_PATH for UNIX flavors)
Could you try by adding the path to dll to %path% variable?
It appears that you are trying package a product with many jars as dependencies. You may benefit from [One-Jar](http://one-jar.sourceforge.net/index.php?page=d... |
Question: ```
pt=new Date(2019,11,12,8,2,3)
console.log(pt.getFullYear()," ",pt.getMonth());
```
gives result `2019 " " 11`
```
console.log(pt.getFullYear()+" "+pt.getMonth());
```
gives the result as `2019 11`
What is the difference between using, and + in this example?
Answer: | The first of these gives three separate arguments to console.log, while the second appends the three together, then passes that as a single argument to console.log. | With the (,) you're with the console.log you're requesting to show a separate group of items as string, making a kind of array. When you put the (+) symbol you are adding the strings, and in this case the " " is just adding a space between the first and the second string. It is called concatenation. |
Question: ```
pt=new Date(2019,11,12,8,2,3)
console.log(pt.getFullYear()," ",pt.getMonth());
```
gives result `2019 " " 11`
```
console.log(pt.getFullYear()+" "+pt.getMonth());
```
gives the result as `2019 11`
What is the difference between using, and + in this example?
Answer: | The first of these gives three separate arguments to console.log, while the second appends the three together, then passes that as a single argument to console.log. | console.log is part of the Console API and is accesible in various browsers. You can find its full documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Console/log).
It states that console log has the following parameters:
```
obj1 ... objN
```
>
> A list of JavaScript objects to output. The str... |
Question: ```
pt=new Date(2019,11,12,8,2,3)
console.log(pt.getFullYear()," ",pt.getMonth());
```
gives result `2019 " " 11`
```
console.log(pt.getFullYear()+" "+pt.getMonth());
```
gives the result as `2019 11`
What is the difference between using, and + in this example?
Answer: | ```
console.log(pt.getFullYear()," ",pt.getMonth());
```
The above example passes three separate arguments to console.log. What it outputs depends on how `console.log` is implemented. It has changed over time and is little bit different between browsers. When invoked with arguments like in the example, it has access ... | With the (,) you're with the console.log you're requesting to show a separate group of items as string, making a kind of array. When you put the (+) symbol you are adding the strings, and in this case the " " is just adding a space between the first and the second string. It is called concatenation. |
Question: ```
pt=new Date(2019,11,12,8,2,3)
console.log(pt.getFullYear()," ",pt.getMonth());
```
gives result `2019 " " 11`
```
console.log(pt.getFullYear()+" "+pt.getMonth());
```
gives the result as `2019 11`
What is the difference between using, and + in this example?
Answer: | ```
console.log(pt.getFullYear()," ",pt.getMonth());
```
The above example passes three separate arguments to console.log. What it outputs depends on how `console.log` is implemented. It has changed over time and is little bit different between browsers. When invoked with arguments like in the example, it has access ... | console.log is part of the Console API and is accesible in various browsers. You can find its full documentation on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/Console/log).
It states that console log has the following parameters:
```
obj1 ... objN
```
>
> A list of JavaScript objects to output. The str... |
Question: I need to take some online tests for school.
This website tells me I need Flash Player 11.3.0 or higher. As far as I can see that is not yet avaible for Linux.
I use Ubuntu 12.04 LTS and Chromium. Is there a way I can work around it?
Greetz. Rob.
Answer: | The best way to get Flash Player 11.2+ is to use Google Chrome in Ubuntu. There is no other way to get it, because a higher version has not been released for Ubuntu.
[Download Google Chrome From Here](https://www.google.com/intl/en/chrome/browser/)
Select your OS version x86 or x64 and download it to any path.
Then ... | sudo apt-get install wine
Download Firefox for Windows
Visit Youtube and install the addon that pops up. You now have the latest version of Flash! |
Question: I have to go into a table to retrieve a parameter, then go back into the same table to retrieve data based on the parameter.
```
<cfquery name = "selnm" datasource = "Moxart">
select SelName from AuxXref
where Fieldname = <cfqueryparam value = "#orig#">
</cfquery>
<cfset selname = selnm.SelName>
<cfquer... | You can do this in one query like so:
```
<cfquery name = "fld" datasource = "Moxart">
select Fieldname, DBname, SelName from AuxXref
where SelName = <cfqueryparam value = "#orig#">
AND FieldName = <cfqueryparam value = "#orig#">
</cfquery>
``` | Something like this might satisfy your requirements.
```
select fieldname, DBname
from AuxXref
where selname in
(select distinct selname
from auxXref
where fieldname = <cfqueryparam value = "#orig#">
)
and fieldname <> <cfqueryparam value = "#orig#">
```
If the subquery returns more than one row, and you only wan... |
Question: **Rules**
1. Place some pentominoes into an 8 x 8 grid. They do not touch each other. They can touch only diagonally (with corner).
2. Pentominoes cannot repeat in the grid. Rotations and reflections of a pentomino are considered the same shape.
3. Grid is 8 x 8.
Answer: | With integer programming, I managed to place
>
> 8 pieces, proved to be optimal
>
>
>
like this.
>
> $$\begin{array}{cccccccc} 3&3&3&3& &5&5&5\\ 3& & & & &5& &5\\ &4&4&4&4& &A&\\ 6& & &4& &A&A&A\\ 6&6&6& &8& &A&\\ & &6& &8&8& &B\\ 2&2& &8&8& &B&B\\2&2&2& & &B&B&\\ \end{array}$$
>
>
>
Here is my formulation... | I can manage
>
> seven pentominoes, in a few different ways:
>
>
>
> [](https://i.stack.imgur.com/FPIEH.png) [](https://i.stack.imgur.com/rVcqQ.png)
>
>
>
There is an obvious upper bound of
>
> t... |
Question: I'm looking for changing the **TextView** Sizes automatically. And I found the solution as well. Here is the official [Doc](https://developer.android.com/preview/features/autosizing-textview.html) for Auto sizing textviews. But Still I'm not able to resolve it. When i paste autoSizeTextType its showing error ... | As stated in the [docs](https://developer.android.com/guide/topics/ui/look-and-feel/autosizing-textview.html#setting-textview-autosize):
>
> The Support Library 26.0 provides full support to the autosizing TextView feature on devices running Android versions prior to Android 8.0 (API level 26). The library provides ... | This API is available only from API level 26. |
Question: I'm looking for changing the **TextView** Sizes automatically. And I found the solution as well. Here is the official [Doc](https://developer.android.com/preview/features/autosizing-textview.html) for Auto sizing textviews. But Still I'm not able to resolve it. When i paste autoSizeTextType its showing error ... | Use AppCompatTextView and supportLibrary 26.0.1
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android... | This API is available only from API level 26. |
Question: I'm looking for changing the **TextView** Sizes automatically. And I found the solution as well. Here is the official [Doc](https://developer.android.com/preview/features/autosizing-textview.html) for Auto sizing textviews. But Still I'm not able to resolve it. When i paste autoSizeTextType its showing error ... | As stated in the [docs](https://developer.android.com/guide/topics/ui/look-and-feel/autosizing-textview.html#setting-textview-autosize):
>
> The Support Library 26.0 provides full support to the autosizing TextView feature on devices running Android versions prior to Android 8.0 (API level 26). The library provides ... | Use AppCompatTextView and supportLibrary 26.0.1
```
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android... |
Question: For example,
User adds this "iamsmelly.com".
And if I add an href to this, the link would be
www.mywebsite.com/iamsmelly.com
Is there a way to make it absolute if its not prepended by an http:// ?
Or should I revert to jQuery for this?
Answer: | Probably a good place to handle this is in a `before_save` on your model. I'm not aware of a predefined helper (though `auto_link` comes somewhat close) but a relatively simple regexp should do the job:
```
class User < ActiveRecord::Base
before_save :check_links
def check_links
self.link = "http://" + self... | I've looked for something similar before with no luck. I made a helper method like so:
```
def ensure_absolute(str_link)
(str_link.include?("http://") || str_link.include?("https://")) ? str_link : ("http://"+str_link)
end
``` |
Question: I have a `<div id="content">`. I want to load the content from <http://vietduc24h.com> into my `div`:
```
<html>
<head>
<script type="text/javascript">
$(document).ready(function()
{
$("#content").attr("src","http://vietduc24h.com");
})
</script>
</head>
<body>
<div id="content"></di... | You need to think about CORS in this aspect. The code you need to have is:
```
<script type="text/javascript">
$(document).ready(function()
{
$("#content").load("http://vietduc24h.com");
})
</script>
```
When your domain is not inside `vietduc24h.com`, you might get some security exception. In or... | Try this code with the jQuery `Load` function:
```
$('#content').load('http://vietduc24h.com', function() {
alert('Load was performed.');
});
```
If you encounter in security issues because of the Cross-Origin-Resource-Sharing policy than you have to use a proxy in your server code. |
Question: I have a `<div id="content">`. I want to load the content from <http://vietduc24h.com> into my `div`:
```
<html>
<head>
<script type="text/javascript">
$(document).ready(function()
{
$("#content").attr("src","http://vietduc24h.com");
})
</script>
</head>
<body>
<div id="content"></di... | Try this code with the jQuery `Load` function:
```
$('#content').load('http://vietduc24h.com', function() {
alert('Load was performed.');
});
```
If you encounter in security issues because of the Cross-Origin-Resource-Sharing policy than you have to use a proxy in your server code. | Try this:
```
$("#content").html('<object data="http://vietduc24h.com">');
```
Taken from [this answer](https://stackoverflow.com/a/9964050/646668). |
Question: I have a `<div id="content">`. I want to load the content from <http://vietduc24h.com> into my `div`:
```
<html>
<head>
<script type="text/javascript">
$(document).ready(function()
{
$("#content").attr("src","http://vietduc24h.com");
})
</script>
</head>
<body>
<div id="content"></di... | You need to think about CORS in this aspect. The code you need to have is:
```
<script type="text/javascript">
$(document).ready(function()
{
$("#content").load("http://vietduc24h.com");
})
</script>
```
When your domain is not inside `vietduc24h.com`, you might get some security exception. In or... | Try this:
```
$("#content").html('<object data="http://vietduc24h.com">');
```
Taken from [this answer](https://stackoverflow.com/a/9964050/646668). |
Question: 
can we change text in this lightbox
want to change "This site requires that you Connect with Facebook." and "Connect with Facebook to Continue"
Answer: | It is always safe! (Math agrees with me.)
The result of a mod operation is always less than the divisor. Since the result of a mod operation is essentially the remainder after performing integer division, you will never have a remainder larger than the divisor.
I suspect the reason for having the operation return a ... | As Marc B alluded to, Java will promote `b` to a `long` before actually doing the `%` operation. This promotion applies to all the arithmetic operations, even `<<` and `>>` I believe.
In other words, if you have a binary operation and the two arguments don't have the same type, the smaller one will be promoted so that... |
Question: 
can we change text in this lightbox
want to change "This site requires that you Connect with Facebook." and "Connect with Facebook to Continue"
Answer: | For most (if not all) arithmetic operations, Java will assume you want the maximum defined precision. Imagine if you did this:
```
long a = ...;
int b = ...;
long c = a % b + Integer.MAX_VALUE;
```
If Java automatically down-casted `a % b` to an `int`, then the above code would cause an `int` overflow rather than s... | It is always safe! (Math agrees with me.)
The result of a mod operation is always less than the divisor. Since the result of a mod operation is essentially the remainder after performing integer division, you will never have a remainder larger than the divisor.
I suspect the reason for having the operation return a ... |
Question: 
can we change text in this lightbox
want to change "This site requires that you Connect with Facebook." and "Connect with Facebook to Continue"
Answer: | It is always safe! (Math agrees with me.)
The result of a mod operation is always less than the divisor. Since the result of a mod operation is essentially the remainder after performing integer division, you will never have a remainder larger than the divisor.
I suspect the reason for having the operation return a ... | >
> does any one know why Java has a longer type for % than needed?
>
>
>
I don't know for sure. Maybe to make it work exactly the same way as the other multiplicative operators: `*` and `\`. In the [JLS](http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.17) `The type of a multiplicative ex... |
Question: 
can we change text in this lightbox
want to change "This site requires that you Connect with Facebook." and "Connect with Facebook to Continue"
Answer: | It is always safe! (Math agrees with me.)
The result of a mod operation is always less than the divisor. Since the result of a mod operation is essentially the remainder after performing integer division, you will never have a remainder larger than the divisor.
I suspect the reason for having the operation return a ... | This is a late party chime-in but the reason is pretty simple:
The bytecode operands do need explicit casts (`L2I`) and longs need 2 stack positions compared to 1 for int, char, short, byte [casting from byte to int doesn't need a bytecode instruction]. After the mod operation the result takes 2 positions on the top ... |
Question: 
can we change text in this lightbox
want to change "This site requires that you Connect with Facebook." and "Connect with Facebook to Continue"
Answer: | For most (if not all) arithmetic operations, Java will assume you want the maximum defined precision. Imagine if you did this:
```
long a = ...;
int b = ...;
long c = a % b + Integer.MAX_VALUE;
```
If Java automatically down-casted `a % b` to an `int`, then the above code would cause an `int` overflow rather than s... | As Marc B alluded to, Java will promote `b` to a `long` before actually doing the `%` operation. This promotion applies to all the arithmetic operations, even `<<` and `>>` I believe.
In other words, if you have a binary operation and the two arguments don't have the same type, the smaller one will be promoted so that... |
Question: 
can we change text in this lightbox
want to change "This site requires that you Connect with Facebook." and "Connect with Facebook to Continue"
Answer: | As Marc B alluded to, Java will promote `b` to a `long` before actually doing the `%` operation. This promotion applies to all the arithmetic operations, even `<<` and `>>` I believe.
In other words, if you have a binary operation and the two arguments don't have the same type, the smaller one will be promoted so that... | >
> does any one know why Java has a longer type for % than needed?
>
>
>
I don't know for sure. Maybe to make it work exactly the same way as the other multiplicative operators: `*` and `\`. In the [JLS](http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.17) `The type of a multiplicative ex... |
Question: 
can we change text in this lightbox
want to change "This site requires that you Connect with Facebook." and "Connect with Facebook to Continue"
Answer: | For most (if not all) arithmetic operations, Java will assume you want the maximum defined precision. Imagine if you did this:
```
long a = ...;
int b = ...;
long c = a % b + Integer.MAX_VALUE;
```
If Java automatically down-casted `a % b` to an `int`, then the above code would cause an `int` overflow rather than s... | >
> does any one know why Java has a longer type for % than needed?
>
>
>
I don't know for sure. Maybe to make it work exactly the same way as the other multiplicative operators: `*` and `\`. In the [JLS](http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.17) `The type of a multiplicative ex... |
Question: 
can we change text in this lightbox
want to change "This site requires that you Connect with Facebook." and "Connect with Facebook to Continue"
Answer: | For most (if not all) arithmetic operations, Java will assume you want the maximum defined precision. Imagine if you did this:
```
long a = ...;
int b = ...;
long c = a % b + Integer.MAX_VALUE;
```
If Java automatically down-casted `a % b` to an `int`, then the above code would cause an `int` overflow rather than s... | This is a late party chime-in but the reason is pretty simple:
The bytecode operands do need explicit casts (`L2I`) and longs need 2 stack positions compared to 1 for int, char, short, byte [casting from byte to int doesn't need a bytecode instruction]. After the mod operation the result takes 2 positions on the top ... |
Question: 
can we change text in this lightbox
want to change "This site requires that you Connect with Facebook." and "Connect with Facebook to Continue"
Answer: | This is a late party chime-in but the reason is pretty simple:
The bytecode operands do need explicit casts (`L2I`) and longs need 2 stack positions compared to 1 for int, char, short, byte [casting from byte to int doesn't need a bytecode instruction]. After the mod operation the result takes 2 positions on the top ... | >
> does any one know why Java has a longer type for % than needed?
>
>
>
I don't know for sure. Maybe to make it work exactly the same way as the other multiplicative operators: `*` and `\`. In the [JLS](http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.17) `The type of a multiplicative ex... |
Question: This is about converting the enumeration values to a string array. I have an enumeration:
```
enum Weather {
RAINY, SUNNY, STORMY
}
```
And I want to convert this to a string array with minimal effort and no loops with Java 8+. This is the best I came up with:
```
Arrays.stream(Weather.values()).map(E... | Original post
=============
Yes, that's a good Java 8 way, but...
The `toString` can be overridden, so you'd better go with `Weather::name` which returns the name of an enum constant (exactly as declared in the enum declaration) and can't be changed:
```
Stream.of(Weather.values()).map(Weather::name).toArray(String[... | If you're frequently converting enum values to any kind of array you can as well precompute it values as static field:
```
enum Weather {
RAINY, SUNNY, STORMY;
public static final String[] STRINGS = Arrays.stream(Weather.values())
.map(Enum::name)
... |
Question: I was studying for icing and a tailplane stall. I have looked up some internet pages and instrument flying handbook, and found the procedure below.
1. raise flaps to the previous setting. (To reduce down wash from the main wing so that reducing negative angle of attack of the tail and break the stall)
2. app... | There was a NASA report on the [NASA/FAA Tailplane Icing Program Overview](http://ntrs.nasa.gov/search.jsp?R=19990019485&hterms=19990019485&qs=Ntk%3DDocument-ID%26Ntt%3D19990019485%26N%3D0), which covers the points raised by you. It lists certain actions that can be done to recover from a tail plane stall:
>
> When t... | For those recommended actions to be effective, two preconditions have been quietly assumed:
1. The tail surface produces downward lift and
2. The wing has positive camber.
Both can be assumed to be correct in almost any case. Now let’s look at the three recommendations in detail:
>
> raise flaps to the previous set... |
Question: I was studying for icing and a tailplane stall. I have looked up some internet pages and instrument flying handbook, and found the procedure below.
1. raise flaps to the previous setting. (To reduce down wash from the main wing so that reducing negative angle of attack of the tail and break the stall)
2. app... | There was a NASA report on the [NASA/FAA Tailplane Icing Program Overview](http://ntrs.nasa.gov/search.jsp?R=19990019485&hterms=19990019485&qs=Ntk%3DDocument-ID%26Ntt%3D19990019485%26N%3D0), which covers the points raised by you. It lists certain actions that can be done to recover from a tail plane stall:
>
> When t... | I have a theory on applying the backstick on a tail stall induced while lowering the flaps. OP’s comment:
>
> apply nose up elevator pressure (I don't get it. The nose up pressure will make the elevator to go up and wouldn't this increase the negative angle of attack and worsen the stall?)
>
>
>
If the tail stall... |
Question: I understand that division by zero isn't allowed, but we merely just multiplied $f(x) = 1$ by $\frac{x-1}{x-1}$ to get $f(x) = \frac{x-1}{x-1}$ and $a\cdot 1 = 1\cdot a = a$ so they're the **same function** but with **different domain** how is this possible?
*Or in other words* why don't we simplify $f(x) = ... | They are the same *almost everywhere*. But clearly one of them does not exist for $x=1$ (since "$\tfrac{0}{0}$" is undefined), while the other one is simply $1$ at $x=1$.
>
> I understand that division by zero isn't allowed, but we merely just multiplied f(x) = 1 by (x-1)/(x-1)
>
>
>
You can multiply by any fract... | **Question**: What is a function?
**Answer**: Maybe simply said it is a map (receipe), $f(x)$, that projects some elements, $x$, contained in a specifically defined set, Domain $D$, into another set, Range $R$.
**Discussion**: Hence when defining a function one must define the Domain as well as the functional form. ... |
Question: I understand that division by zero isn't allowed, but we merely just multiplied $f(x) = 1$ by $\frac{x-1}{x-1}$ to get $f(x) = \frac{x-1}{x-1}$ and $a\cdot 1 = 1\cdot a = a$ so they're the **same function** but with **different domain** how is this possible?
*Or in other words* why don't we simplify $f(x) = ... | They are the same *almost everywhere*. But clearly one of them does not exist for $x=1$ (since "$\tfrac{0}{0}$" is undefined), while the other one is simply $1$ at $x=1$.
>
> I understand that division by zero isn't allowed, but we merely just multiplied f(x) = 1 by (x-1)/(x-1)
>
>
>
You can multiply by any fract... | $f(x)=(x-1)/(x-1)$ does not have a value when $x=1$, different thing happens to $f(x)=1$ |
Question: I understand that division by zero isn't allowed, but we merely just multiplied $f(x) = 1$ by $\frac{x-1}{x-1}$ to get $f(x) = \frac{x-1}{x-1}$ and $a\cdot 1 = 1\cdot a = a$ so they're the **same function** but with **different domain** how is this possible?
*Or in other words* why don't we simplify $f(x) = ... | **Question**: What is a function?
**Answer**: Maybe simply said it is a map (receipe), $f(x)$, that projects some elements, $x$, contained in a specifically defined set, Domain $D$, into another set, Range $R$.
**Discussion**: Hence when defining a function one must define the Domain as well as the functional form. ... | $f(x)=(x-1)/(x-1)$ does not have a value when $x=1$, different thing happens to $f(x)=1$ |
Question: Is there any way to show a calculated field when I'm filling out a new item for a list?
For example:
If I select "Blue" in field1, and "Bird" in field2,
then, on the same page where I am filling in information, I can see field3(Calculated field) show a value of "Blue Jay"
Currently, the calculated field d... | **As a short answer** : unfortunately , No, the calculated field is calculated after the item added or updated
If you are using Enterprise Edition of SharePoint then try editing list form with InfoPath and insert field which will do the calculation for you. Make that field read-only and then publish the form.
In Inf... | Calculated columns don't work that way, they are visible on the display form only or in views and only recalculate when items are edited.
If you want that type of preview feature, you'll have to incorporate custom javascript on your forms. |
Question: There seems to be a lot of software to control (or emulate) mouse input through the keyboard, but what about the opposite?
Basically I'm looking for a way to emulate up/down/left/right clicks with mouse movement, at a fast rate (i.e. lots of very short and quick right clicks while I move the mouse to the rig... | OK, hopefully supplying a *useful* answer this time, instead of the inverse of the actual answer you wanted...
How about an AutoHotkey script for [mouse gestures](http://www.autohotkey.com/docs/scripts/MouseGestures.htm)? You haven't indicated what sort of control you require, so perhaps a set of gestures is adequate.... | If you want something where you can type with your mouse, then I suggest you take a look at [Dasher](http://www.inference.phy.cam.ac.uk/dasher/).
That is, if I take your question title as the question. As I really don't quite understand your question. |
Question: There seems to be a lot of software to control (or emulate) mouse input through the keyboard, but what about the opposite?
Basically I'm looking for a way to emulate up/down/left/right clicks with mouse movement, at a fast rate (i.e. lots of very short and quick right clicks while I move the mouse to the rig... | If you're on Windows, what about the On-Screen Keyboard?
It's found under **All Programs -> Accessories -> Accessibility** on XP (similar for Vista+)
 | If you want something where you can type with your mouse, then I suggest you take a look at [Dasher](http://www.inference.phy.cam.ac.uk/dasher/).
That is, if I take your question title as the question. As I really don't quite understand your question. |
Question: There seems to be a lot of software to control (or emulate) mouse input through the keyboard, but what about the opposite?
Basically I'm looking for a way to emulate up/down/left/right clicks with mouse movement, at a fast rate (i.e. lots of very short and quick right clicks while I move the mouse to the rig... | OK, hopefully supplying a *useful* answer this time, instead of the inverse of the actual answer you wanted...
How about an AutoHotkey script for [mouse gestures](http://www.autohotkey.com/docs/scripts/MouseGestures.htm)? You haven't indicated what sort of control you require, so perhaps a set of gestures is adequate.... | If you're on Windows, what about the On-Screen Keyboard?
It's found under **All Programs -> Accessories -> Accessibility** on XP (similar for Vista+)
 |
Question: I was playing some math games intended for children, in Japanese, and the subject was 引き算.
The isolated question came up "14は10といくつ?" In the context of 引き算 it makes sense that the answer turned out to be 4, but I don't understand the question structurally. How does it imply "If you take 10 away from 14, what... | >
> Is this to be understood only in the context? Assuming the と is conditional
>
>
>
The と is not conditional, and you can tell that from the word followed by the と.
**The conditional と should follow 活用語の終止形/the terminal form of a conjugatable word**, such as verb, i/na-adjective, auxiliary, eg 「話す」「寒い」「静かだ」「〇〇だ... | I think it is an odd way to ask, but the structure is:
* 14 は 10 と いくつ
* 14 = 10 + ?
so that it is essentially a subtraction.
Grammatically, は is the subject marker and と is *and* (In words, *14 is 10 and how many?*) |
Question: I am using material-ui for my project and I have a need to get the selected text (not the value) and do some parsing. I can't seem to find a way to do this.
Here is what my component looks like:
```
<TextField
select
margin="dense"
... | This regex match should get you what you're looking for
```js
let regex = /1-[0-9]{3}-[0-9]{3}-[0-9]{4}/
``` | Try
```
let candidateValue = getMeSomeValue();
const isValid = (candidateValue || "").match( /^1-[0-9]{3}-[0-9]{4}$/ );
```
Add `\s` following the `^` and before the `$` if you want to play nice and ignore leading/trailing whitespace. |
Question: Is it coherent to suggest that it is possible to iterate, one-by-one, through every single item in an infinite set? Some have suggested that it is possible to iterate (or count) completely through an infinite set with no start (or lower bound), making infinite regress a genuinely possible reality.
Mathematic... | We may count through the integers by listing them $0,1,-1,2,-2,\dots$. This is an infinite set without a lower bound. In general, if you have a bijection $f:\mathbb{N} \to X$ where $X$ is an infinite set, then you can "iterate" through them by listing $f(1),f(2),f(3), \dots$. | Here is a way to iterate... To me, it is like mixing math and computers. You can find the ideas described in much more detail in [Generatingfunctionology by Wilf](http://www.math.upenn.edu/~wilf/gfology2.pdf). Knowing Calculus is very helpful for this.
Let me explain. We would like to iterate through infinity and stop... |
Question: I have string column in my `df` table, like this below:
```
d = {'col1': ['1.2', '3.4', '1.99', '0.14', '2.9', '', '2.3']}
df = pd.DataFrame(data=d)
df
```
[](https://i.stack.imgur.com/X2WXJ.png)
I would like to convert this column, so th... | Like this:
```
df['col1'] = df['col1'].astype(float).map('{:,.2f}'.format).astype(str)
```
If you have '' in this column you better replace them before to '0'. | This one will work no matter how many columns are in your dictionary.
Try this:
```py
d = {'col1': ['1.2', '3.4', '1.99', '0.14', '2.9' '', '2.3']}
for x in d:
for y in range(0,len(d[x])):
d[x][y]=d[x][y].ljust(4,"0")
print(d)
``` |
Question: I have string column in my `df` table, like this below:
```
d = {'col1': ['1.2', '3.4', '1.99', '0.14', '2.9', '', '2.3']}
df = pd.DataFrame(data=d)
df
```
[](https://i.stack.imgur.com/X2WXJ.png)
I would like to convert this column, so th... | Use [`str.ljust`](https://pandas.pydata.org/docs/reference/api/pandas.Series.str.ljust.html):
```
df['col1'] = df['col1'].str.ljust(4, '0')
```
output:
```
col1
0 1.20
1 3.40
2 1.99
3 0.14
4 2.90
5 2.30
```
To leave empty rows intact:
```
df['col1'] = df['col1'].mask(df['col1'].astype(bool), df['col1'].... | Like this:
```
df['col1'] = df['col1'].astype(float).map('{:,.2f}'.format).astype(str)
```
If you have '' in this column you better replace them before to '0'. |
Question: I have string column in my `df` table, like this below:
```
d = {'col1': ['1.2', '3.4', '1.99', '0.14', '2.9', '', '2.3']}
df = pd.DataFrame(data=d)
df
```
[](https://i.stack.imgur.com/X2WXJ.png)
I would like to convert this column, so th... | Like this:
```
df['col1'] = df['col1'].astype(float).map('{:,.2f}'.format).astype(str)
```
If you have '' in this column you better replace them before to '0'. | You can easily use the `round` or `format` function. In your specific case, using `format`, you can write something like this:
```
d = ['1.2', '3.4', '1.99', '0.14', '2.9', '', '2.3']
for i in range(len(d)):
if d[i] == '':
d[i] = '0'
d[i] = "{:.2f}".format(float(d[i]))
print ('col1', d)
```
o... |
Question: I have string column in my `df` table, like this below:
```
d = {'col1': ['1.2', '3.4', '1.99', '0.14', '2.9', '', '2.3']}
df = pd.DataFrame(data=d)
df
```
[](https://i.stack.imgur.com/X2WXJ.png)
I would like to convert this column, so th... | Use [`str.ljust`](https://pandas.pydata.org/docs/reference/api/pandas.Series.str.ljust.html):
```
df['col1'] = df['col1'].str.ljust(4, '0')
```
output:
```
col1
0 1.20
1 3.40
2 1.99
3 0.14
4 2.90
5 2.30
```
To leave empty rows intact:
```
df['col1'] = df['col1'].mask(df['col1'].astype(bool), df['col1'].... | This one will work no matter how many columns are in your dictionary.
Try this:
```py
d = {'col1': ['1.2', '3.4', '1.99', '0.14', '2.9' '', '2.3']}
for x in d:
for y in range(0,len(d[x])):
d[x][y]=d[x][y].ljust(4,"0")
print(d)
``` |
Question: I have string column in my `df` table, like this below:
```
d = {'col1': ['1.2', '3.4', '1.99', '0.14', '2.9', '', '2.3']}
df = pd.DataFrame(data=d)
df
```
[](https://i.stack.imgur.com/X2WXJ.png)
I would like to convert this column, so th... | Use [`str.ljust`](https://pandas.pydata.org/docs/reference/api/pandas.Series.str.ljust.html):
```
df['col1'] = df['col1'].str.ljust(4, '0')
```
output:
```
col1
0 1.20
1 3.40
2 1.99
3 0.14
4 2.90
5 2.30
```
To leave empty rows intact:
```
df['col1'] = df['col1'].mask(df['col1'].astype(bool), df['col1'].... | You can easily use the `round` or `format` function. In your specific case, using `format`, you can write something like this:
```
d = ['1.2', '3.4', '1.99', '0.14', '2.9', '', '2.3']
for i in range(len(d)):
if d[i] == '':
d[i] = '0'
d[i] = "{:.2f}".format(float(d[i]))
print ('col1', d)
```
o... |
Question: Sorry the title's so convoluted... I must've tried for ten minutes to get a good, descriptive title! Basically, here's the scenario.
Let's say a user can pick fifty different hat colors and styles to put on an avatar. The avatar can move his head around, so we'd need the same types of movements in the symbo... | [debu's suggestion](https://stackoverflow.com/questions/2435039/best-way-to-be-able-to-pick-multiple-colors-designs-of-symbols-dynamically-from-f/2435101#2435101) about a hat container makes sense in order to separate out control of the hat movement.
You could take this further by separating out different aspects of t... | You could do that a number of ways; firstly you could have each different hat as a different symbol in the Flash Library (if you're using the IDE), and then in their properties tick to 'Export for Actionscript', and choose some appropriate name. It'll tell you that there's no definition for the class path, and one will... |
Question: I am writing an application, running on a server, where multiple users access data from a database which is AES encrypted with a master secret. The master secret itself is initially randomly generated, and then AES encrypted with a user-secret to yield a 'user-hash'. The master secret is never stored, but the... | If a user has a copy of both the encrypted and decrypted data, he is in a position to perform at least a [known-plaintext attack](http://en.wikipedia.org/wiki/Known-plaintext_attack). If users can submit arbitrary plaintexts for encryption, they can conduct a [chosen-plaintext attack](http://en.wikipedia.org/wiki/Chose... | Your master secret is **never** secure, at least not as you have described it. As a user, I know my private secret. When I use your application, my private secret decrypts the master secret right there in the application. With modest technical skills, I can examine the memory of the process or machine and read the mast... |
Question: In his book "Men of Mathematics", Eric Temple Bell repeatedly makes the point that a student of mathematics must read the classics.
My question is what are some classic books in mathematics ( Dictionary definition : judged over a period of time to be of the highest quality and outstanding of its kind.) that ... | 1. Feller's first volume for Probability Theory.
2. Arnold's ODE for differential equations.
3. Cartan's Elementary Theory of Analytic Functions of One or Several Complex Variables for Complex Analysis | It's a bit more advanced than the topics you asked about, but Milnor's *Morse Theory* and Milnor and Stasheff's *Characteristic Classes* are astoundingly good. (There's a pattern here: Milnor's *Lectures on the h-Cobordism Theorem* is pretty good too!)
At a somewhat lower level, I find Spivak's *Calculus* (which many ... |
Question: In his book "Men of Mathematics", Eric Temple Bell repeatedly makes the point that a student of mathematics must read the classics.
My question is what are some classic books in mathematics ( Dictionary definition : judged over a period of time to be of the highest quality and outstanding of its kind.) that ... | I don’t agree with Bell on this point: one may well learn better and more easily from a book that is *not* generally considered a classic. For example, most people have never even heard of John Greever’s modified Moore method textbook *Theory and Examples of Point-Set Topology*, but for me it was the ideal introduction... | It's a bit more advanced than the topics you asked about, but Milnor's *Morse Theory* and Milnor and Stasheff's *Characteristic Classes* are astoundingly good. (There's a pattern here: Milnor's *Lectures on the h-Cobordism Theorem* is pretty good too!)
At a somewhat lower level, I find Spivak's *Calculus* (which many ... |
Question: In his book "Men of Mathematics", Eric Temple Bell repeatedly makes the point that a student of mathematics must read the classics.
My question is what are some classic books in mathematics ( Dictionary definition : judged over a period of time to be of the highest quality and outstanding of its kind.) that ... | 1. Feller's first volume for Probability Theory.
2. Arnold's ODE for differential equations.
3. Cartan's Elementary Theory of Analytic Functions of One or Several Complex Variables for Complex Analysis | The Mathematical Association of America (MAA) has got a rich collection of classic books under Doclani Mathematical Expositions. I would suggest you following:
$1$. Mathematical Gems Series ($3$ Volumes) By Ross Honsburger.
$2$. Linear Algebra problem book By Paul R Halmos.
$3$. Euler: Master of us all By William Du... |
Question: In his book "Men of Mathematics", Eric Temple Bell repeatedly makes the point that a student of mathematics must read the classics.
My question is what are some classic books in mathematics ( Dictionary definition : judged over a period of time to be of the highest quality and outstanding of its kind.) that ... | I don’t agree with Bell on this point: one may well learn better and more easily from a book that is *not* generally considered a classic. For example, most people have never even heard of John Greever’s modified Moore method textbook *Theory and Examples of Point-Set Topology*, but for me it was the ideal introduction... | The Mathematical Association of America (MAA) has got a rich collection of classic books under Doclani Mathematical Expositions. I would suggest you following:
$1$. Mathematical Gems Series ($3$ Volumes) By Ross Honsburger.
$2$. Linear Algebra problem book By Paul R Halmos.
$3$. Euler: Master of us all By William Du... |
Question: In his book "Men of Mathematics", Eric Temple Bell repeatedly makes the point that a student of mathematics must read the classics.
My question is what are some classic books in mathematics ( Dictionary definition : judged over a period of time to be of the highest quality and outstanding of its kind.) that ... | 1. Feller's first volume for Probability Theory.
2. Arnold's ODE for differential equations.
3. Cartan's Elementary Theory of Analytic Functions of One or Several Complex Variables for Complex Analysis | In the early '70s, I used two teaching books that I consider ''classic'':
*Foundations of modern analysis* of J. Dieudonné (at least in Europe).
*Algebra* of S. Mac Lane and G. Birkoff
At a different level, I think that an ''evergreen'' is:
*Methods of Mathematical physics* of R. Courant and D. Hilbert. |
Question: In his book "Men of Mathematics", Eric Temple Bell repeatedly makes the point that a student of mathematics must read the classics.
My question is what are some classic books in mathematics ( Dictionary definition : judged over a period of time to be of the highest quality and outstanding of its kind.) that ... | I don’t agree with Bell on this point: one may well learn better and more easily from a book that is *not* generally considered a classic. For example, most people have never even heard of John Greever’s modified Moore method textbook *Theory and Examples of Point-Set Topology*, but for me it was the ideal introduction... | 1. Feller's first volume for Probability Theory.
2. Arnold's ODE for differential equations.
3. Cartan's Elementary Theory of Analytic Functions of One or Several Complex Variables for Complex Analysis |
Question: In his book "Men of Mathematics", Eric Temple Bell repeatedly makes the point that a student of mathematics must read the classics.
My question is what are some classic books in mathematics ( Dictionary definition : judged over a period of time to be of the highest quality and outstanding of its kind.) that ... | I don’t agree with Bell on this point: one may well learn better and more easily from a book that is *not* generally considered a classic. For example, most people have never even heard of John Greever’s modified Moore method textbook *Theory and Examples of Point-Set Topology*, but for me it was the ideal introduction... | In the early '70s, I used two teaching books that I consider ''classic'':
*Foundations of modern analysis* of J. Dieudonné (at least in Europe).
*Algebra* of S. Mac Lane and G. Birkoff
At a different level, I think that an ''evergreen'' is:
*Methods of Mathematical physics* of R. Courant and D. Hilbert. |
Question: I'm using the [jQuery Validate Plugin](http://jqueryvalidation.org/validate) and I want to be able to hide the error messages next to my inputs and have a main error message at the bottom, I have this working kind of but the error messages are showing next to my input fields. (Obviously I would clean up the s... | May be use the Validator method
```
errorPlacement: function(error,element) {
return true;
}
```
It will not append the error to the inputs. | You can hide the error messages with CSS:
```
span.error {
display: none;
}
``` |
Question: I'm using the [jQuery Validate Plugin](http://jqueryvalidation.org/validate) and I want to be able to hide the error messages next to my inputs and have a main error message at the bottom, I have this working kind of but the error messages are showing next to my input fields. (Obviously I would clean up the s... | May be use the Validator method
```
errorPlacement: function(error,element) {
return true;
}
```
It will not append the error to the inputs. | Normally, `showErrors` will automatically suppress the default messages next to each input element.
You're creating your own issue because **`.defaultShowErrors()` is the method for putting back the default messages**.
Simply remove `this.defaultShowErrors()`...
```
showErrors: function(errorMap, errorList) {
$... |
Question: I have checked out many pages but most of the tutorials and script return an error code with this type of JSON output. So how would I be able to extract the data from this JSON in Java?:
```
[
{
"user":{"id":"1","username":"user1"},
"item_name":"item1",
"custom_field":"custom1"
},
{
"us... | If you want to use Gson, then first you declare classes for holding each element and sub elements:
```
public class MyUser {
public String id;
public String username;
}
public class MyElement {
public MyUser user;
public String item_name;
public String custom_field;
}
```
Then you declare an array of the ... | If your trying to serialize/deserialize json in Java I would recommend using Jackson. <http://jackson.codehaus.org/>
Once you have Jackson downloaded you can deserialize the json strings to an object which matches the objects in JSON.
Jackson provides annotations that can be attached to your class which make deserial... |
Question: I have checked out many pages but most of the tutorials and script return an error code with this type of JSON output. So how would I be able to extract the data from this JSON in Java?:
```
[
{
"user":{"id":"1","username":"user1"},
"item_name":"item1",
"custom_field":"custom1"
},
{
"us... | If you want to use Gson, then first you declare classes for holding each element and sub elements:
```
public class MyUser {
public String id;
public String username;
}
public class MyElement {
public MyUser user;
public String item_name;
public String custom_field;
}
```
Then you declare an array of the ... | You could try JSON Simple
<http://code.google.com/p/json-simple/>
Example:
```
JSONParser jsonParser = new JSONParser();
JSONArray jsonArray = (JSONArray) jsonParser.parse(jsonDataString);
for (int i = 0; i < jsonArray.size(); i++) {
JSONObject obj = (JSONObject) jsonArray.get(i);
//Access data with obj.g... |
Question: I have an array of objects:
```
this.array = [{name: null}, {name: null}, {name: null}]
```
and array of reservend names:
```
this.reserved = ["name2", "name3"]
```
I loop through array and try to set uniques name (not included inside `reserved` array)
```
for (let i = 0; i < array.length; i++) {
... | **Update:**
In the meantime, GitLab have released a new version of their Docker Machine fork which upgrades the default AMI to Ubuntu 20.04. That means that upgrading Docker Machine to the latest version released by GitLab will fix the issue without changing your runner configuration. The latest release can be found [... | I had the same issue since yesterday.
It could be related to GitLab releasing 15.0 with breaking changes (going `live on GitLab.com sometime between April 23 – May 22`)
* <https://about.gitlab.com/blog/2022/04/18/gitlab-releases-15-breaking-changes/>
* but there is no mention of missing `AMI` field to add to field `M... |
Question: I have an array of objects:
```
this.array = [{name: null}, {name: null}, {name: null}]
```
and array of reservend names:
```
this.reserved = ["name2", "name3"]
```
I loop through array and try to set uniques name (not included inside `reserved` array)
```
for (let i = 0; i < array.length; i++) {
... | **Update:**
In the meantime, GitLab have released a new version of their Docker Machine fork which upgrades the default AMI to Ubuntu 20.04. That means that upgrading Docker Machine to the latest version released by GitLab will fix the issue without changing your runner configuration. The latest release can be found [... | Make sure to select an ami for Ubuntu and not Debian and that your aws account is subscribed to it
What I did
1. subscribe in aws marketplace to a Ubuntu Amazon Image (Ubuntu 20.04 LTS - Focal)
2. select launch instance, choose the region, and copy the ami shown |
Question: I have an array of objects:
```
this.array = [{name: null}, {name: null}, {name: null}]
```
and array of reservend names:
```
this.reserved = ["name2", "name3"]
```
I loop through array and try to set uniques name (not included inside `reserved` array)
```
for (let i = 0; i < array.length; i++) {
... | **Update:**
In the meantime, GitLab have released a new version of their Docker Machine fork which upgrades the default AMI to Ubuntu 20.04. That means that upgrading Docker Machine to the latest version released by GitLab will fix the issue without changing your runner configuration. The latest release can be found [... | As Moritz pointed out:
Adding:
```
MachineOptions = [
"amazonec2-ami=ami-02584c1c9d05efa69",
]
```
solves the issue. |
Question: I have an array of objects:
```
this.array = [{name: null}, {name: null}, {name: null}]
```
and array of reservend names:
```
this.reserved = ["name2", "name3"]
```
I loop through array and try to set uniques name (not included inside `reserved` array)
```
for (let i = 0; i < array.length; i++) {
... | **Update:**
In the meantime, GitLab have released a new version of their Docker Machine fork which upgrades the default AMI to Ubuntu 20.04. That means that upgrading Docker Machine to the latest version released by GitLab will fix the issue without changing your runner configuration. The latest release can be found [... | Just wanted to add as well, go [here](https://cloud-images.ubuntu.com/locator/ec2/) for the ubuntu that corresponds with your region. Amis are region specific |
Question: I have an array of objects:
```
this.array = [{name: null}, {name: null}, {name: null}]
```
and array of reservend names:
```
this.reserved = ["name2", "name3"]
```
I loop through array and try to set uniques name (not included inside `reserved` array)
```
for (let i = 0; i < array.length; i++) {
... | **Update:**
In the meantime, GitLab have released a new version of their Docker Machine fork which upgrades the default AMI to Ubuntu 20.04. That means that upgrading Docker Machine to the latest version released by GitLab will fix the issue without changing your runner configuration. The latest release can be found [... | Using the new AMI worked for a bit but after sometime the /etc/gitlab-runner/config.toml reverted back to old configuration. All the changes made is gone and reset automatically. Anyone have any idea why the config.toml file revert back and how to prevent it ? |
Question: I have an array of objects:
```
this.array = [{name: null}, {name: null}, {name: null}]
```
and array of reservend names:
```
this.reserved = ["name2", "name3"]
```
I loop through array and try to set uniques name (not included inside `reserved` array)
```
for (let i = 0; i < array.length; i++) {
... | Make sure to select an ami for Ubuntu and not Debian and that your aws account is subscribed to it
What I did
1. subscribe in aws marketplace to a Ubuntu Amazon Image (Ubuntu 20.04 LTS - Focal)
2. select launch instance, choose the region, and copy the ami shown | I had the same issue since yesterday.
It could be related to GitLab releasing 15.0 with breaking changes (going `live on GitLab.com sometime between April 23 – May 22`)
* <https://about.gitlab.com/blog/2022/04/18/gitlab-releases-15-breaking-changes/>
* but there is no mention of missing `AMI` field to add to field `M... |
Question: I have an array of objects:
```
this.array = [{name: null}, {name: null}, {name: null}]
```
and array of reservend names:
```
this.reserved = ["name2", "name3"]
```
I loop through array and try to set uniques name (not included inside `reserved` array)
```
for (let i = 0; i < array.length; i++) {
... | Make sure to select an ami for Ubuntu and not Debian and that your aws account is subscribed to it
What I did
1. subscribe in aws marketplace to a Ubuntu Amazon Image (Ubuntu 20.04 LTS - Focal)
2. select launch instance, choose the region, and copy the ami shown | As Moritz pointed out:
Adding:
```
MachineOptions = [
"amazonec2-ami=ami-02584c1c9d05efa69",
]
```
solves the issue. |
Question: I have an array of objects:
```
this.array = [{name: null}, {name: null}, {name: null}]
```
and array of reservend names:
```
this.reserved = ["name2", "name3"]
```
I loop through array and try to set uniques name (not included inside `reserved` array)
```
for (let i = 0; i < array.length; i++) {
... | Make sure to select an ami for Ubuntu and not Debian and that your aws account is subscribed to it
What I did
1. subscribe in aws marketplace to a Ubuntu Amazon Image (Ubuntu 20.04 LTS - Focal)
2. select launch instance, choose the region, and copy the ami shown | Just wanted to add as well, go [here](https://cloud-images.ubuntu.com/locator/ec2/) for the ubuntu that corresponds with your region. Amis are region specific |
Question: I have an array of objects:
```
this.array = [{name: null}, {name: null}, {name: null}]
```
and array of reservend names:
```
this.reserved = ["name2", "name3"]
```
I loop through array and try to set uniques name (not included inside `reserved` array)
```
for (let i = 0; i < array.length; i++) {
... | Make sure to select an ami for Ubuntu and not Debian and that your aws account is subscribed to it
What I did
1. subscribe in aws marketplace to a Ubuntu Amazon Image (Ubuntu 20.04 LTS - Focal)
2. select launch instance, choose the region, and copy the ami shown | Using the new AMI worked for a bit but after sometime the /etc/gitlab-runner/config.toml reverted back to old configuration. All the changes made is gone and reset automatically. Anyone have any idea why the config.toml file revert back and how to prevent it ? |
Question: Prestashop 1.6 has some strange functions. One of them is:
```
\themes\my_theme\js\autoload\15-jquery.uniform-modified.js
```
Which add span to radio, input button. For example:
```
<div class="checker" id="uniform-cgv">
<span class="checked">
<input name="cgv" id="cgv" value="1" type="checkbox">
... | If you want to get the same checkbox like with uniform you just need to invoke method bindUniform() after your button was handled. I assume that you get an answer after form handling with an ajax response, so you need to add
`if (typeof bindUniform !=='undefined') {
bindUniform();
}`
after you get response and DOM ... | @Alexander Grosul Thanks again. To fix this issues You need to add this code to any js file.
```
$("select.form-control,input[type='radio'],input[type='checkbox']").uniform();
``` |
Question: Today I noticed that new MVC projects in VS 2012 are using [WebMatrix.WebData.WebSecurity](http://msdn.microsoft.com/en-us/library/webmatrix.webdata.websecurity%28v=vs.99%29.aspx) to handle membership related tasks.
I went to msdn to a quick look at the documentation and was surprised. Lot's of good stuff in... | Found the answer at MSDN:
<http://msdn.microsoft.com/en-us/library/webmatrix.webdata.simplemembershipprovider%28v=vs.111%29>
>
> In ASP.NET Web Pages sites, you can access the functionality of the SimpleMembershipProvider class by using the Membership property of a web page. You do not (in fact, cannot) initialize a ... | `((SimpleMembershipProvider)Membership.Provider).DeleteAccount("UserName");` //This will remove entry from **[webpages\_Membership]** table
`Roles.RemoveUserFromRole("UserName", "RoleName");` // This will remove from **[webpages\_UsersInRoles]** table
`((SimpleMembershipProvider)Membership.Provider).DeleteUser("UserN... |
Question: Today I noticed that new MVC projects in VS 2012 are using [WebMatrix.WebData.WebSecurity](http://msdn.microsoft.com/en-us/library/webmatrix.webdata.websecurity%28v=vs.99%29.aspx) to handle membership related tasks.
I went to msdn to a quick look at the documentation and was surprised. Lot's of good stuff in... | ```
((SimpleMembershipProvider)Membership.Provider).DeleteAccount("username");
((SimpleMembershipProvider)Membership.Provider).DeleteUser("username", true);
``` | `((SimpleMembershipProvider)Membership.Provider).DeleteAccount("UserName");` //This will remove entry from **[webpages\_Membership]** table
`Roles.RemoveUserFromRole("UserName", "RoleName");` // This will remove from **[webpages\_UsersInRoles]** table
`((SimpleMembershipProvider)Membership.Provider).DeleteUser("UserN... |
Question: everyone!
I am trying to render the exchange rates from a server to my page.
Here is my React code:
```
import React from 'react';
import ReactDOM from 'react-dom';
class App extends React.Component {
constructor() {
super();
this.state = {
exRates: []
};
}
g... | 1. You must not had an empty line beetween
`@app.route("/profile/<name>")` and `def profile(name):`
2. You have to set the html file in a folder called templates.
3. You have to set the templates folder and run.py in the same folder | You can try this below by adding the type string in your @app.route :
```
@app.route("/profile/<string:name>")
def profile(name):
return render_template("test.html", name=name)
``` |
Question: everyone!
I am trying to render the exchange rates from a server to my page.
Here is my React code:
```
import React from 'react';
import ReactDOM from 'react-dom';
class App extends React.Component {
constructor() {
super();
this.state = {
exRates: []
};
}
g... | Whenever we receive 500 internal server error on a Python wsgi application we can log it using 'logging'
First import `from logging import FileHandler,WARNING`
then after `app = Flask(__name__, template_folder = 'template')`
add
```
file_handler = FileHandler('errorlog.txt')
file_handler.setLevel(WARNING)
```
Then... | You can try this below by adding the type string in your @app.route :
```
@app.route("/profile/<string:name>")
def profile(name):
return render_template("test.html", name=name)
``` |
Question: I am executing a stored procedure but it is failing at some point,
Current error code is not helping me to find where and exactly what the error is
I wanted to know where it is exactly failing so wanted to print line by line output while executing.
for eg :
```
create or replace
-- decaring requir... | Your code will look like this; additionally you can write a procedure with autonomous transactions to log all error or logs. you will also get online code for this functionality.
[http://log4plsql.sourceforge.net/](http://logs)
```
create or replace procedure proc_data_table_details is
tablename varchar2(30);
... | Try to break the code to few segements. That way you will narrow down your search field. Becoz what you are trying to do is take an analytical decision about when to print.
Alternatively, if u want to print after every value assignment, you can parse the PL/SQL code as long to a variable and then loop over it until nex... |
Question: I need help with my program. I declared a one-dimensional array of 6 and I want to show random values between 1-6 in a text box
My question is how do I show values in my array in textbox1.text?
Here is my code:
```
Public Sub ClickMyFirstClassButton()
If FirstClass.Checked = True Then
'This p... | As suggested by @eryksun, this solves the issue:
```
p = subprocess.Popen('clip.exe', stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True)
p.communicate('hello \n world')
p.wait()
``` | I suspect it's because you're using `shell=True`, refactor your code to not use it.
But I would suggest abandoning this approach alltogether and use [pyperclip](https://pypi.python.org/pypi/pyperclip/) for the clipboard support. It's cross-platform and freely available. |
Question: In a C# enumeration, are there any negative side effects of using a negative number?
I am modelling response codes and one of the codes in negative. This compiles but I want to know if there are any negative side effects to this.
```
public enum ResponseCodes
{
InvalidServerUserPasswordCombo = -1,
... | >
> negative side effects of using a negative number
>
>
>
Clearly, with any underlying signed type, any bitwise operations are going to get "interesting" very quickly.
But using an enum as a collection of related constants can quite happily use negative values. | There's no negative side effects, however, keep in mind that an enum gets initialized to zero in this instance:
```
class YourClass {
public ResponseCodes ResponseCode { get; set; }
}
```
Providing just negative one will have an undesired impact for any users of the class (unless they initialize it. |
Question: In a C# enumeration, are there any negative side effects of using a negative number?
I am modelling response codes and one of the codes in negative. This compiles but I want to know if there are any negative side effects to this.
```
public enum ResponseCodes
{
InvalidServerUserPasswordCombo = -1,
... | >
> negative side effects of using a negative number
>
>
>
Clearly, with any underlying signed type, any bitwise operations are going to get "interesting" very quickly.
But using an enum as a collection of related constants can quite happily use negative values. | No, the enum is a value with an integer type and this can be any value from -2,147,483,648 to 2,147,483,647! :) |
Question: In a C# enumeration, are there any negative side effects of using a negative number?
I am modelling response codes and one of the codes in negative. This compiles but I want to know if there are any negative side effects to this.
```
public enum ResponseCodes
{
InvalidServerUserPasswordCombo = -1,
... | >
> negative side effects of using a negative number
>
>
>
Clearly, with any underlying signed type, any bitwise operations are going to get "interesting" very quickly.
But using an enum as a collection of related constants can quite happily use negative values. | This answer is 7 years late but I haven't seen the point made anywhere else.
There is a minor negative side effect when using negative numbers for enums. If you want to cast a negative number to an enum you'll need to ensure the number is in brackets to avoid a compile error, e.g.:
```
class YourClass {
Response... |
Question: In a C# enumeration, are there any negative side effects of using a negative number?
I am modelling response codes and one of the codes in negative. This compiles but I want to know if there are any negative side effects to this.
```
public enum ResponseCodes
{
InvalidServerUserPasswordCombo = -1,
... | There's no negative side effects, however, keep in mind that an enum gets initialized to zero in this instance:
```
class YourClass {
public ResponseCodes ResponseCode { get; set; }
}
```
Providing just negative one will have an undesired impact for any users of the class (unless they initialize it. | No, the enum is a value with an integer type and this can be any value from -2,147,483,648 to 2,147,483,647! :) |
Question: In a C# enumeration, are there any negative side effects of using a negative number?
I am modelling response codes and one of the codes in negative. This compiles but I want to know if there are any negative side effects to this.
```
public enum ResponseCodes
{
InvalidServerUserPasswordCombo = -1,
... | There's no negative side effects, however, keep in mind that an enum gets initialized to zero in this instance:
```
class YourClass {
public ResponseCodes ResponseCode { get; set; }
}
```
Providing just negative one will have an undesired impact for any users of the class (unless they initialize it. | This answer is 7 years late but I haven't seen the point made anywhere else.
There is a minor negative side effect when using negative numbers for enums. If you want to cast a negative number to an enum you'll need to ensure the number is in brackets to avoid a compile error, e.g.:
```
class YourClass {
Response... |
Question: I am trying to install additional drivers on Ubuntu 12.04. The application is returning an error. In the log file I can see various NVIDIA module failed to load. However, my PC do not have NVIDIA graphics card. Its Intel card, then why is Ubuntu searching for NVIDIA card?
I have installed Ubuntu 12.04 and ad... | **Yes**, but you will need Ubuntu 12.10.
1. Download Steam from Ubuntu Software Center
2. Start it up, you will be asked to log in with your Steam account. If you don't have one you can choose the create account option.
3. Go to the Store tab
4. Enter Don't Starve in the search bar in the top-right and click Don't Sta... | **Install from Chrome Webstore and play via Google Chrome**
Yes you can, altough Linux isn't officially supported according to the game's website ([system requirements](http://www.dontstarvegame.com/blog/system-requirements)), but the game is available in the *Chrome Webstore* for all platforms:
[Chrome Web Store - D... |
Question: I know the question has been asked thousands of times, but I'll ask it again: is there a way (even patchy) to write/read a dumb text file with Javascript or Protoype ?
This is only for debug purposes, and is not designed for production. The thing is I need it to work with (at least) both Firefox and IE (pref... | Writing to a file is not possible, you'd have to write a server-side script and make a request to that script. Reading is possible if you use an iframe with the text file's location as source, and reading the iframe contents. | Javascript in browsers doesn't allow you to write local files, for **security reasons**. This **may change with time**, but as for now you have to **deal with it**. |
Question: I know the question has been asked thousands of times, but I'll ask it again: is there a way (even patchy) to write/read a dumb text file with Javascript or Protoype ?
This is only for debug purposes, and is not designed for production. The thing is I need it to work with (at least) both Firefox and IE (pref... | Writing to a file is not possible, you'd have to write a server-side script and make a request to that script. Reading is possible if you use an iframe with the text file's location as source, and reading the iframe contents. | Only with a server side javascript interpreter, but that isn't the typical environment you run javascript in. |
Question: I know the question has been asked thousands of times, but I'll ask it again: is there a way (even patchy) to write/read a dumb text file with Javascript or Protoype ?
This is only for debug purposes, and is not designed for production. The thing is I need it to work with (at least) both Firefox and IE (pref... | Writing to a file is not possible, you'd have to write a server-side script and make a request to that script. Reading is possible if you use an iframe with the text file's location as source, and reading the iframe contents. | What about cookies? It is accessible via javascript, it is on your client and it is a plain text file. Only issue is the size of it (4k max if I remember well).
What you can do as well is use your browser localStorage / userData / globalStorage (depending on your browser version). It acts like cookies (new webStorage ... |
Question: I know the question has been asked thousands of times, but I'll ask it again: is there a way (even patchy) to write/read a dumb text file with Javascript or Protoype ?
This is only for debug purposes, and is not designed for production. The thing is I need it to work with (at least) both Firefox and IE (pref... | **It *is* possible to read/write to a local file via JavaScript**: take a look at [TiddlyWIki](http://www.tiddlywiki.com/). *(Caveat: only works for local documents.)*
I have actually written a [Single Page Application](http://softwareas.com/towards-a-single-page-application-framework) (SPA) using [twFile](http://jque... | Javascript in browsers doesn't allow you to write local files, for **security reasons**. This **may change with time**, but as for now you have to **deal with it**. |
Question: I know the question has been asked thousands of times, but I'll ask it again: is there a way (even patchy) to write/read a dumb text file with Javascript or Protoype ?
This is only for debug purposes, and is not designed for production. The thing is I need it to work with (at least) both Firefox and IE (pref... | Javascript in browsers doesn't allow you to write local files, for **security reasons**. This **may change with time**, but as for now you have to **deal with it**. | What about cookies? It is accessible via javascript, it is on your client and it is a plain text file. Only issue is the size of it (4k max if I remember well).
What you can do as well is use your browser localStorage / userData / globalStorage (depending on your browser version). It acts like cookies (new webStorage ... |
Question: I know the question has been asked thousands of times, but I'll ask it again: is there a way (even patchy) to write/read a dumb text file with Javascript or Protoype ?
This is only for debug purposes, and is not designed for production. The thing is I need it to work with (at least) both Firefox and IE (pref... | **It *is* possible to read/write to a local file via JavaScript**: take a look at [TiddlyWIki](http://www.tiddlywiki.com/). *(Caveat: only works for local documents.)*
I have actually written a [Single Page Application](http://softwareas.com/towards-a-single-page-application-framework) (SPA) using [twFile](http://jque... | Only with a server side javascript interpreter, but that isn't the typical environment you run javascript in. |
Question: I know the question has been asked thousands of times, but I'll ask it again: is there a way (even patchy) to write/read a dumb text file with Javascript or Protoype ?
This is only for debug purposes, and is not designed for production. The thing is I need it to work with (at least) both Firefox and IE (pref... | Only with a server side javascript interpreter, but that isn't the typical environment you run javascript in. | What about cookies? It is accessible via javascript, it is on your client and it is a plain text file. Only issue is the size of it (4k max if I remember well).
What you can do as well is use your browser localStorage / userData / globalStorage (depending on your browser version). It acts like cookies (new webStorage ... |
Question: I know the question has been asked thousands of times, but I'll ask it again: is there a way (even patchy) to write/read a dumb text file with Javascript or Protoype ?
This is only for debug purposes, and is not designed for production. The thing is I need it to work with (at least) both Firefox and IE (pref... | **It *is* possible to read/write to a local file via JavaScript**: take a look at [TiddlyWIki](http://www.tiddlywiki.com/). *(Caveat: only works for local documents.)*
I have actually written a [Single Page Application](http://softwareas.com/towards-a-single-page-application-framework) (SPA) using [twFile](http://jque... | What about cookies? It is accessible via javascript, it is on your client and it is a plain text file. Only issue is the size of it (4k max if I remember well).
What you can do as well is use your browser localStorage / userData / globalStorage (depending on your browser version). It acts like cookies (new webStorage ... |
Question: Isn't that nicely recursive?
I've got a portable command prompt on my external drive, and it has a nice .bat file to configure some initial settings, but I'd like more!
Here's what I know how to set from .bat:
* Colors = (color XY) where x and y are hex digits for the predefined colors
* Prompt = (prompt... | Regarding setting the buffer size:
Using `mode con: cols=XX lines=YY` sets not only the window (screen) size, but the buffer size too.
If you specify a size allowed by your system, based on available screen size, you'll see that both window and buffer dimension are set to the same value; .e.g:
```
mode con: cols=100... | Regarding auto-completion:
>
> File and Directory name completion is
> NOT enabled by default. You can
> enable or disable file name completion
> for a particular invocation of CMD.EXE
> with the /F:ON or /F:OFF switch. You
> can enable or disable completion for
> all invocations of CMD.EXE on a
> machine and/... |
Question: Isn't that nicely recursive?
I've got a portable command prompt on my external drive, and it has a nice .bat file to configure some initial settings, but I'd like more!
Here's what I know how to set from .bat:
* Colors = (color XY) where x and y are hex digits for the predefined colors
* Prompt = (prompt... | Regarding auto-completion:
>
> File and Directory name completion is
> NOT enabled by default. You can
> enable or disable file name completion
> for a particular invocation of CMD.EXE
> with the /F:ON or /F:OFF switch. You
> can enable or disable completion for
> all invocations of CMD.EXE on a
> machine and/... | For true Buffer Size adjustment use DOSKEY /LISTSIZE=size
You can't change colors within the shell anymore since Microsoft took ANSI ESC control out of the command/cmd prompts. |
Question: Isn't that nicely recursive?
I've got a portable command prompt on my external drive, and it has a nice .bat file to configure some initial settings, but I'd like more!
Here's what I know how to set from .bat:
* Colors = (color XY) where x and y are hex digits for the predefined colors
* Prompt = (prompt... | Regarding setting the buffer size:
Using `mode con: cols=XX lines=YY` sets not only the window (screen) size, but the buffer size too.
If you specify a size allowed by your system, based on available screen size, you'll see that both window and buffer dimension are set to the same value; .e.g:
```
mode con: cols=100... | For true Buffer Size adjustment use DOSKEY /LISTSIZE=size
You can't change colors within the shell anymore since Microsoft took ANSI ESC control out of the command/cmd prompts. |
Question: Isn't that nicely recursive?
I've got a portable command prompt on my external drive, and it has a nice .bat file to configure some initial settings, but I'd like more!
Here's what I know how to set from .bat:
* Colors = (color XY) where x and y are hex digits for the predefined colors
* Prompt = (prompt... | Regarding setting the buffer size:
Using `mode con: cols=XX lines=YY` sets not only the window (screen) size, but the buffer size too.
If you specify a size allowed by your system, based on available screen size, you'll see that both window and buffer dimension are set to the same value; .e.g:
```
mode con: cols=100... | You can set these values through a shortcut (.INK file).
I have a shortcut on my desktop with this as the target:
%windir%\system32\cmd.exe /K %userprofile%\STARTUP.CMD
The /K switch tells CMD.exe to run the batch file (which sets some variables, the prompt, etc.) and then stay open.
If you right-click on the short... |
Question: Isn't that nicely recursive?
I've got a portable command prompt on my external drive, and it has a nice .bat file to configure some initial settings, but I'd like more!
Here's what I know how to set from .bat:
* Colors = (color XY) where x and y are hex digits for the predefined colors
* Prompt = (prompt... | You can set these values through a shortcut (.INK file).
I have a shortcut on my desktop with this as the target:
%windir%\system32\cmd.exe /K %userprofile%\STARTUP.CMD
The /K switch tells CMD.exe to run the batch file (which sets some variables, the prompt, etc.) and then stay open.
If you right-click on the short... | For true Buffer Size adjustment use DOSKEY /LISTSIZE=size
You can't change colors within the shell anymore since Microsoft took ANSI ESC control out of the command/cmd prompts. |
Question: I am curious as to why Start-Job increments in twos. My worry is that I am doing something wrong that makes the ID of a new job jump by 2.
```
Start-Job -ScriptBlock {Get-WinEvent -LogName system -MaxEvents 1000}
```
Results as shown by Get-Job
```
Id Name State HasMoreData Command ... | Each time you start a job, it consists of a parent job and one or more child jobs. If you run `get-job | fl` you'll see the child jobs, and you'll see that their names are the "missing" odd numbered names. | @1.618 give the right answer, here are some more details :
```
Start-Job -ScriptBlock {Get-Process}
Id Name PSJobTypeName State HasMoreData Location Command
-- ---- ------------- ----- ----------- -------- ------- ... |
Question: I am creating a Chart (DataVisualization.Charting.Chart) programmatically, which is a Stacked Bar chart.
I am also adding Legend entries programmatically to it. I want to show the Legend at the bottom of the chart.
But, while doing so, the Legend overlapps with the X-axis of the chart.
Here is the code I a... | I had the same problem today. Try adding:
```
objLegend.Position.Auto = true
objLegend.DockedToChartArea = "yourChartAreaName"
```
That did not help me but I found on the net that this might be helpful (and clean solution).
What actually worked for me was moving chart area to make space for legend so it no longer o... | I had an overlapping legend/chart area problem as well but none of the other suggestions here seemed to make any difference. I think the problem stems from legend text wrapping to two lines and the sizing algorithms not taking account of this.
The ideas here got me thinking more clearly about the problem though, and I... |
Question: We will be developing a new web site for a client who already has a Kentico 8.2 license. I am trying to make a case for developing the site using Kentico 9. Some key features I have found so far include:
* faster performance (how much in real-world terms?)
* better integration with .Net MVC
* content staging... | ### Preserving and Restoring State
Feature you are looking for is called State Restoration. From the [docs](http://State%20preservation%20records%20the%20configuration%20of%20your%20app%20before%20it%20is%20suspended%20so%20that%20the%20configuration%20can%20be%20restored%20on%20a%20subsequent%20app%20launch.):
>
> ... | What you're trying to do is keep persistent data between launches of your application, right?
For that you should use core data, there are many useful recourses on the web to help you with that, heres a few helpful ones.
<https://developer.apple.com/library/watchos/documentation/Cocoa/Conceptual/CoreData/index.html>
... |
Question: What does テラス means in the context of declining an invitation, like below?
>
> うううううう!!いきたい!けどその時間帯もろに仕事だ:::またやって!!テラスーーーーー
>
>
>
I guess it is slang?
I am familiar with テラワロス but it seems different in both spelling and context.
More context: Public comment sent on a night-time birthday event page on ... | So far the only viable explanation I can think of is that テラス is a contracted form of テラワロス.
* [ニコニコ[百科]{ひゃっか} entry for テラス](http://dic.nicovideo.jp/a/%E3%83%86%E3%83%A9%E3%82%B9) defines it as: `3. テラワロスの略`
+ 3rd sense: Contraction of "terawarosu"
* [a 2ch.net post](http://2chnull.info/r/train/1273323743/901-1000) ... | I'm Japanese, but I've never heard Japanese people using テラス. That's not even slang. I don't understand its meaning. |
Question: $(l^2,\|\cdot\|\_2)$ is a Hilbert space with scalar product $\langle x,y\rangle=\sum^{\infty}\_{k=1}x\_ky\_k$.
How can I show that every vector $x\in l^2$ can be written in a form $\sum^{\infty}\_{k=1}x\_ke^k$ where $e^k,k\in N$ are unit vectors?
Answer: | By definition equality
$$
x=\sum\limits\_{k=1}^\infty x\_k e^k
$$
means that
$$
x=\lim\limits\_{n\to\infty}\sum\limits\_{k=1}^n x\_k e^k
$$
which by definition means that
$$
\lim\limits\_{n\to\infty}\left\Vert x-\sum\limits\_{k=1}^n x\_k e^k\right\Vert\_2=0\tag{1}
$$
Now use the fact that $\Vert z\Vert\_2^2=\langle... | Let's take $x$ and define $x\_k:=\langle x,e\_k\rangle$. Now we need to prove that the vector
$$y=\sum\_k x\_ke\_k$$
exists and equal to $x$.
First, we show that it exists: the series converges by [pythagorean identity](http://en.wikipedia.org/wiki/Hilbert_space#Pythagorean_identity) ); moreover, it converges to the ... |
Question: Harry Potter chose to come back from the dead because he was the master of death. But how could he be the master of death as he never had the Elder Wand?
If Harry could come back does that mean that Dumbledore could come back from the dead too? Why/why not?
After all, Dumbledore did have the three Deathly H... | >
> he passes the cloak to harry but he still own it
>
>
>
No, Dumbledore never **owned** it. Harry's father owned it, and and passed it along with everything else to Harry. Dumbledore was simply in possession of it because he had **borrowed** it before Harry's parents were killed.
I don't have the exact quote, b... | Dumbledore was never the master of death.
At the time he was in possession of the Elder Wand and the Resurrection Stone, Harry was in possession of the Cloak of Invisibility.
Harry was not the master of death when he 'died', as he did not possess the Elder Wand. There is no concrete answer as to why Harry survived. ... |
Question: Harry Potter chose to come back from the dead because he was the master of death. But how could he be the master of death as he never had the Elder Wand?
If Harry could come back does that mean that Dumbledore could come back from the dead too? Why/why not?
After all, Dumbledore did have the three Deathly H... | >
> he passes the cloak to harry but he still own it
>
>
>
No, Dumbledore never **owned** it. Harry's father owned it, and and passed it along with everything else to Harry. Dumbledore was simply in possession of it because he had **borrowed** it before Harry's parents were killed.
I don't have the exact quote, b... | Dumbledore *was* dead. Harry wasn't. That's established by the text itself:
>
> “But you’re dead.” said Harry. “Oh yes,” said Dumbledore matter-of-factly. “Then . . . I’m dead too?” “Ah,” said Dumbledore, smiling still more broadly. “That is the question, isn’t it? On the whole, dear boy, I think not.”
>
>
>
Harr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.