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
3,160,730
$$\int\sec x dx?$$ This is the method I used: $$\int\sec x\times\frac{\sec x +\tan x}{\sec x +\tan x}dx=\int\frac{\sec^2x+\sec x\tan x}{\sec x +\tan x}=\ln(\sec x +\tan x)+c$$ **I would like to see another method to solve this integral.**
2019/03/24
[ "https://math.stackexchange.com/questions/3160730", "https://math.stackexchange.com", "https://math.stackexchange.com/users/657384/" ]
Wrie $$\frac{1}{\cos(x)}=\frac{\sin^2(x)+\cos^2(x)}{\cos(x)}=\cos(x)+\frac{\sin^2(x)}{\cos(x)}$$
Substitute $u=\sin x$ to get $\int\frac{du}{1-u^2}$.
3,160,730
$$\int\sec x dx?$$ This is the method I used: $$\int\sec x\times\frac{\sec x +\tan x}{\sec x +\tan x}dx=\int\frac{\sec^2x+\sec x\tan x}{\sec x +\tan x}=\ln(\sec x +\tan x)+c$$ **I would like to see another method to solve this integral.**
2019/03/24
[ "https://math.stackexchange.com/questions/3160730", "https://math.stackexchange.com", "https://math.stackexchange.com/users/657384/" ]
$$\int \sec x\mathrm dx=\int\frac{\mathrm dx}{\cos x}=\int\frac{\cos x}{\cos^2x}\mathrm dx=\int\frac{\cos x}{1-\sin^2x}\mathrm dx\stackrel{\sin x=x}=\int \frac{\mathrm du}{1-u^2}=\frac12\log\frac{1+u}{1-u}+k$$ > > $$\therefore~\int \sec x\mathrm dx~=~\frac12\log\frac{1+\sin x}{1-\sin x}+k$$ > > > Even more intere...
Let $f(x)=\sec x$ and $g(x)=\tan x$. Observe the derivatives of $f(x)$ and $g(x)$ $$\begin{align\*} & f'(x)=\sec x\tan x\\ & g'(x)=\sec^2x\end{align\*}$$ Thus, their sum is$$f'(x)+g'(x)=\sec x(\sec x+\tan x)=\sec x\left(f(x)+g(x)\right)$$ Dividing and integrating gives$$\begin{align\*}\int\mathrm dx\,\sec x & =\int\...
3,160,730
$$\int\sec x dx?$$ This is the method I used: $$\int\sec x\times\frac{\sec x +\tan x}{\sec x +\tan x}dx=\int\frac{\sec^2x+\sec x\tan x}{\sec x +\tan x}=\ln(\sec x +\tan x)+c$$ **I would like to see another method to solve this integral.**
2019/03/24
[ "https://math.stackexchange.com/questions/3160730", "https://math.stackexchange.com", "https://math.stackexchange.com/users/657384/" ]
$$\int \sec x\mathrm dx=\int\frac{\mathrm dx}{\cos x}=\int\frac{\cos x}{\cos^2x}\mathrm dx=\int\frac{\cos x}{1-\sin^2x}\mathrm dx\stackrel{\sin x=x}=\int \frac{\mathrm du}{1-u^2}=\frac12\log\frac{1+u}{1-u}+k$$ > > $$\therefore~\int \sec x\mathrm dx~=~\frac12\log\frac{1+\sin x}{1-\sin x}+k$$ > > > Even more intere...
Wrie $$\frac{1}{\cos(x)}=\frac{\sin^2(x)+\cos^2(x)}{\cos(x)}=\cos(x)+\frac{\sin^2(x)}{\cos(x)}$$
3,160,730
$$\int\sec x dx?$$ This is the method I used: $$\int\sec x\times\frac{\sec x +\tan x}{\sec x +\tan x}dx=\int\frac{\sec^2x+\sec x\tan x}{\sec x +\tan x}=\ln(\sec x +\tan x)+c$$ **I would like to see another method to solve this integral.**
2019/03/24
[ "https://math.stackexchange.com/questions/3160730", "https://math.stackexchange.com", "https://math.stackexchange.com/users/657384/" ]
$$\int \sec x\mathrm dx=\int\frac{\mathrm dx}{\cos x}=\int\frac{\cos x}{\cos^2x}\mathrm dx=\int\frac{\cos x}{1-\sin^2x}\mathrm dx\stackrel{\sin x=x}=\int \frac{\mathrm du}{1-u^2}=\frac12\log\frac{1+u}{1-u}+k$$ > > $$\therefore~\int \sec x\mathrm dx~=~\frac12\log\frac{1+\sin x}{1-\sin x}+k$$ > > > Even more intere...
$$\int\sec x\,dx=\int\frac{1}{\cos x}\cdot\frac{\cos x}{\cos x}\,dx =\int\frac{\cos x}{1-\sin^2x}\,dx= \begin{bmatrix}\sin x=t\\ \cos xdx=dt\end{bmatrix} =\int \frac{1}{1-t^2}dt = $$ $$=-\frac{1}{2}\int\left(\frac{1}{t-1}-\frac{1}{t+1}\right)dt = -\frac{1}{2} \left(\ln|t-1|-\ln|t+1|\right)=\ln\sqrt{\left|\frac{t+1}{t-1...
3,160,730
$$\int\sec x dx?$$ This is the method I used: $$\int\sec x\times\frac{\sec x +\tan x}{\sec x +\tan x}dx=\int\frac{\sec^2x+\sec x\tan x}{\sec x +\tan x}=\ln(\sec x +\tan x)+c$$ **I would like to see another method to solve this integral.**
2019/03/24
[ "https://math.stackexchange.com/questions/3160730", "https://math.stackexchange.com", "https://math.stackexchange.com/users/657384/" ]
Wrie $$\frac{1}{\cos(x)}=\frac{\sin^2(x)+\cos^2(x)}{\cos(x)}=\cos(x)+\frac{\sin^2(x)}{\cos(x)}$$
Let $f(x)=\sec x$ and $g(x)=\tan x$. Observe the derivatives of $f(x)$ and $g(x)$ $$\begin{align\*} & f'(x)=\sec x\tan x\\ & g'(x)=\sec^2x\end{align\*}$$ Thus, their sum is$$f'(x)+g'(x)=\sec x(\sec x+\tan x)=\sec x\left(f(x)+g(x)\right)$$ Dividing and integrating gives$$\begin{align\*}\int\mathrm dx\,\sec x & =\int\...
3,160,730
$$\int\sec x dx?$$ This is the method I used: $$\int\sec x\times\frac{\sec x +\tan x}{\sec x +\tan x}dx=\int\frac{\sec^2x+\sec x\tan x}{\sec x +\tan x}=\ln(\sec x +\tan x)+c$$ **I would like to see another method to solve this integral.**
2019/03/24
[ "https://math.stackexchange.com/questions/3160730", "https://math.stackexchange.com", "https://math.stackexchange.com/users/657384/" ]
Wrie $$\frac{1}{\cos(x)}=\frac{\sin^2(x)+\cos^2(x)}{\cos(x)}=\cos(x)+\frac{\sin^2(x)}{\cos(x)}$$
$$\int\sec x\,dx=\int\frac{1}{\cos x}\cdot\frac{\cos x}{\cos x}\,dx =\int\frac{\cos x}{1-\sin^2x}\,dx= \begin{bmatrix}\sin x=t\\ \cos xdx=dt\end{bmatrix} =\int \frac{1}{1-t^2}dt = $$ $$=-\frac{1}{2}\int\left(\frac{1}{t-1}-\frac{1}{t+1}\right)dt = -\frac{1}{2} \left(\ln|t-1|-\ln|t+1|\right)=\ln\sqrt{\left|\frac{t+1}{t-1...
2,008,682
how do i check if a BOOL is set in objective-c (iphone)? i know that it can be done with an int or float this way: NSNumber \*Num = [prefs floatForKey:@"key"]; for example
2010/01/05
[ "https://Stackoverflow.com/questions/2008682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/230637/" ]
You can't. A `BOOL` is either `YES` or `NO`. There is no other state. The way around this would be to use an `NSNumber` (`[NSNumber numberWithBool:YES];`), and then check to see if the `NSNumber` itself is `nil`. Or have a second `BOOL` to indicate if you've altered the value of the first.
Annoyingly, Objective-C has no Boolean class. It certainly feels like it should and that trips a lot of people up. In collections and core data, all bools are stored as NSNumber instances. It's really annoying having to convert back and forth all the time.
2,008,682
how do i check if a BOOL is set in objective-c (iphone)? i know that it can be done with an int or float this way: NSNumber \*Num = [prefs floatForKey:@"key"]; for example
2010/01/05
[ "https://Stackoverflow.com/questions/2008682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/230637/" ]
You can't. A `BOOL` is either `YES` or `NO`. There is no other state. The way around this would be to use an `NSNumber` (`[NSNumber numberWithBool:YES];`), and then check to see if the `NSNumber` itself is `nil`. Or have a second `BOOL` to indicate if you've altered the value of the first.
By default, a bool value is set to 0 in Objective-C, so you don't need to check if your bool value is nil anytime.
2,008,682
how do i check if a BOOL is set in objective-c (iphone)? i know that it can be done with an int or float this way: NSNumber \*Num = [prefs floatForKey:@"key"]; for example
2010/01/05
[ "https://Stackoverflow.com/questions/2008682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/230637/" ]
You can't. A `BOOL` is either `YES` or `NO`. There is no other state. The way around this would be to use an `NSNumber` (`[NSNumber numberWithBool:YES];`), and then check to see if the `NSNumber` itself is `nil`. Or have a second `BOOL` to indicate if you've altered the value of the first.
You can use something like this instead... ``` @import Foundation; @interface CSBool : NSObject + (CSBool *)construct:(BOOL)value; @property BOOL value; @end #import "CSBool.h" @implementation CSBool + (CSBool *)construct:(BOOL)value { CSBool *this = [self new]; this.value = value; return this; } @e...
2,008,682
how do i check if a BOOL is set in objective-c (iphone)? i know that it can be done with an int or float this way: NSNumber \*Num = [prefs floatForKey:@"key"]; for example
2010/01/05
[ "https://Stackoverflow.com/questions/2008682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/230637/" ]
Annoyingly, Objective-C has no Boolean class. It certainly feels like it should and that trips a lot of people up. In collections and core data, all bools are stored as NSNumber instances. It's really annoying having to convert back and forth all the time.
By default, a bool value is set to 0 in Objective-C, so you don't need to check if your bool value is nil anytime.
2,008,682
how do i check if a BOOL is set in objective-c (iphone)? i know that it can be done with an int or float this way: NSNumber \*Num = [prefs floatForKey:@"key"]; for example
2010/01/05
[ "https://Stackoverflow.com/questions/2008682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/230637/" ]
Annoyingly, Objective-C has no Boolean class. It certainly feels like it should and that trips a lot of people up. In collections and core data, all bools are stored as NSNumber instances. It's really annoying having to convert back and forth all the time.
You can use something like this instead... ``` @import Foundation; @interface CSBool : NSObject + (CSBool *)construct:(BOOL)value; @property BOOL value; @end #import "CSBool.h" @implementation CSBool + (CSBool *)construct:(BOOL)value { CSBool *this = [self new]; this.value = value; return this; } @e...
2,008,682
how do i check if a BOOL is set in objective-c (iphone)? i know that it can be done with an int or float this way: NSNumber \*Num = [prefs floatForKey:@"key"]; for example
2010/01/05
[ "https://Stackoverflow.com/questions/2008682", "https://Stackoverflow.com", "https://Stackoverflow.com/users/230637/" ]
By default, a bool value is set to 0 in Objective-C, so you don't need to check if your bool value is nil anytime.
You can use something like this instead... ``` @import Foundation; @interface CSBool : NSObject + (CSBool *)construct:(BOOL)value; @property BOOL value; @end #import "CSBool.h" @implementation CSBool + (CSBool *)construct:(BOOL)value { CSBool *this = [self new]; this.value = value; return this; } @e...
55,946,083
I have been trying to use the ADDIS and ADDI instructions for a basic function that sums constants to an array, I followed the instructions in pages 48 and 49 of <https://cr.yp.to/2005-590/powerpc-cwg.pdf>, but the behavior isn't what I expected. What I'm trying to do is create this function in assembler, but for cert...
2019/05/02
[ "https://Stackoverflow.com/questions/55946083", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11252219/" ]
> > has bit 16 set to 1 but is not incremented. > > > PowerPC's `addi` instruction works similar to the instruction with the same name on MIPS CPUs: You can add a number in the range (-0x8000) to (+0x7FFF) to a register. The `addis` instruction will add a multiple of 0x10000 to a register. Because 0x9f321062 = ...
This makes sense if the immediate is *sign*-extended to 32-bit. Notice that `0xae53` has its high bit set, so it would sign extend to `0xffffae53`. i.e. it would subtract 1 from the high half as well as adding `0xae53` to the low half (with potential carry into high half of course). So it's not possible to write `add...
9,603
I have a walnut desk that now requires a 2" walnut grommet (since I cut the hole in the desk before realizing that walnut grommets are only for sale in 1 3/4" size)....so I need to make my own. Pretty simple if I had a lathe to turn it on but that's not the case. Does anyone have an idea of how to create a 1/2" lip o...
2019/05/17
[ "https://woodworking.stackexchange.com/questions/9603", "https://woodworking.stackexchange.com", "https://woodworking.stackexchange.com/users/7436/" ]
This looks like a problem commonly encountered when the clearance hole in the first board (the one on the outside of the joint - in your case the vertical piece) is not wide enough. This hole should be at least as wide as the widest part of the screw threads. The true pilot hole in the second piece should be sized appr...
The issue is that the top shelf is shorter than the other two. You have three choices (four if you count do nothing). 1. Shorten the other two to match. 2. Widen the top shelf with a shim cut to match the gap. If you don't have access to a saw that can cut that fine, go buy some veneer banding from Home Depot. Two or...
9,603
I have a walnut desk that now requires a 2" walnut grommet (since I cut the hole in the desk before realizing that walnut grommets are only for sale in 1 3/4" size)....so I need to make my own. Pretty simple if I had a lathe to turn it on but that's not the case. Does anyone have an idea of how to create a 1/2" lip o...
2019/05/17
[ "https://woodworking.stackexchange.com/questions/9603", "https://woodworking.stackexchange.com", "https://woodworking.stackexchange.com/users/7436/" ]
This looks like a problem commonly encountered when the clearance hole in the first board (the one on the outside of the joint - in your case the vertical piece) is not wide enough. This hole should be at least as wide as the widest part of the screw threads. The true pilot hole in the second piece should be sized appr...
Edge banding is nothing more than veneer sold in strips 1 or 2 in wide, preglued (usually). Unscrew the offending shelf and layer one, two or three strips of banding over each other on the end until you get a snug fit between the uprights. Trim the excess with a sharp utility knife and use some leftover stain to matc...
9,603
I have a walnut desk that now requires a 2" walnut grommet (since I cut the hole in the desk before realizing that walnut grommets are only for sale in 1 3/4" size)....so I need to make my own. Pretty simple if I had a lathe to turn it on but that's not the case. Does anyone have an idea of how to create a 1/2" lip o...
2019/05/17
[ "https://woodworking.stackexchange.com/questions/9603", "https://woodworking.stackexchange.com", "https://woodworking.stackexchange.com/users/7436/" ]
The issue is that the top shelf is shorter than the other two. You have three choices (four if you count do nothing). 1. Shorten the other two to match. 2. Widen the top shelf with a shim cut to match the gap. If you don't have access to a saw that can cut that fine, go buy some veneer banding from Home Depot. Two or...
Edge banding is nothing more than veneer sold in strips 1 or 2 in wide, preglued (usually). Unscrew the offending shelf and layer one, two or three strips of banding over each other on the end until you get a snug fit between the uprights. Trim the excess with a sharp utility knife and use some leftover stain to matc...
63,130,082
I'd like some feedback on how to optimize the following pandas computation: We have a fixed index set `I` and a `lookback`. In addition we have a pd.Series `index` its median over lookback, `index_MEDIAN`, and a large list of pandas data frames. All series/dataframes have I as their index. Each dataframe has the colum...
2020/07/28
[ "https://Stackoverflow.com/questions/63130082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421683/" ]
This method: `public static double median(int[] numbers)` returns an object of type `double`. When you want to call a method a get the result in a variable, you need to make sure the variable is of the same type as the type returned by the method. You need to change this line: ``` double[] med = median(numbers); ``...
Your median() method is supposed to return a "double" value and not an array of double values. ``` public static void main(String[] args) { int[] numbers = {25,36,38,63,89,52,74}; double med = median(numbers); // remove [] on this line. } ```
63,130,082
I'd like some feedback on how to optimize the following pandas computation: We have a fixed index set `I` and a `lookback`. In addition we have a pd.Series `index` its median over lookback, `index_MEDIAN`, and a large list of pandas data frames. All series/dataframes have I as their index. Each dataframe has the colum...
2020/07/28
[ "https://Stackoverflow.com/questions/63130082", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421683/" ]
This method: `public static double median(int[] numbers)` returns an object of type `double`. When you want to call a method a get the result in a variable, you need to make sure the variable is of the same type as the type returned by the method. You need to change this line: ``` double[] med = median(numbers); ``...
You are returning a double value but you are returning it to a double array, there is type mismatch. import java.util.\*; public class Test { ``` public static void main(String[] args) { int [] numbers = { 25,36,38,63,89,52,74}; double med = median(numbers); } //Return the median value of an array of numbers ...
54,599,459
I have this sentence that I need to parse. The senetence is the following bellow: ``` I'm sure _I_ shan't be able! I shall be a great deal too far off to trouble myself ``` The outcome that I need below is : ``` I'm sure I shan't be able! I shall be a great deal too far off to trouble myself ``` What would the ...
2019/02/08
[ "https://Stackoverflow.com/questions/54599459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Found this searching for the same error message. I was able to resolve the issue by switching the version of sass on my local from `sass-3.7.4` to `sass-3.4.25 (Selective Steve)`. Another possible fix for this error message.
### The problem: The problem resided in the fact, that I installed the Debian's package `ruby-full`, along with Sass and Compass as ruby gems, e.g. using the *gem* command-line tool. ### The solution: By default, Debian 9.7 (*Stretch*) has the Ruby interpreter installed (version 2.3). The package name is `ruby2.3`. ...
5,037,587
``` import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.applet.*; public class Stuff extends Applet implements ActionListener { Button okButton; public void init() { setLayout(new FlowLayout()); okButton = new Button(""); add(okButton); okButto...
2011/02/18
[ "https://Stackoverflow.com/questions/5037587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/516805/" ]
`EditorFor` vs `DisplayFor` is simple. The semantics of the methods is to generate edit/insert and display/read only views (respectively). Use `DisplayFor` when displaying data (i.e. when you generate divs and spans that contain the model values). Use `EditorFor` when editing/inserting data (i.e. when you generate inpu...
You certainly *could* customize `DisplayFor` to display an editable form. But the convention is for `DisplayFor` to be `readonly` and `EditorFor` to be for editing. Sticking with the convention will ensure that no matter what you pass into `DisplayFor`, it will do the same type of thing.
5,037,587
``` import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.applet.*; public class Stuff extends Applet implements ActionListener { Button okButton; public void init() { setLayout(new FlowLayout()); okButton = new Button(""); add(okButton); okButto...
2011/02/18
[ "https://Stackoverflow.com/questions/5037587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/516805/" ]
`EditorFor` vs `DisplayFor` is simple. The semantics of the methods is to generate edit/insert and display/read only views (respectively). Use `DisplayFor` when displaying data (i.e. when you generate divs and spans that contain the model values). Use `EditorFor` when editing/inserting data (i.e. when you generate inpu...
Just to give my 2c worth, our project is using a partial view with several jQuery tabs, and each tab rendering its fields with its own partial view. This worked fine until we added a feature whereby some of the tabs shared some common fields. Our first approach to this was to create another partial view with these comm...
5,037,587
``` import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.applet.*; public class Stuff extends Applet implements ActionListener { Button okButton; public void init() { setLayout(new FlowLayout()); okButton = new Button(""); add(okButton); okButto...
2011/02/18
[ "https://Stackoverflow.com/questions/5037587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/516805/" ]
`EditorFor` vs `DisplayFor` is simple. The semantics of the methods is to generate edit/insert and display/read only views (respectively). Use `DisplayFor` when displaying data (i.e. when you generate divs and spans that contain the model values). Use `EditorFor` when editing/inserting data (i.e. when you generate inpu...
Use `_partial` view approach if: 1. View Centric Logic 2. What to keep all `_partial` view related HTML in this view only. In the template method, you will have to keep some HTML outside the Template View like "Main Header or any outer border/settings. 3. Want to render partial view with logic (From controller) using ...
5,037,587
``` import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.applet.*; public class Stuff extends Applet implements ActionListener { Button okButton; public void init() { setLayout(new FlowLayout()); okButton = new Button(""); add(okButton); okButto...
2011/02/18
[ "https://Stackoverflow.com/questions/5037587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/516805/" ]
`EditorFor` vs `DisplayFor` is simple. The semantics of the methods is to generate edit/insert and display/read only views (respectively). Use `DisplayFor` when displaying data (i.e. when you generate divs and spans that contain the model values). Use `EditorFor` when editing/inserting data (i.e. when you generate inpu...
Another difference that hasn't been mentioned so far is that a partialview doesn't add model prefixes while a template does [Here](https://stackoverflow.com/questions/1488890/asp-net-mvc-partial-views-input-name-prefixes) is the issue
5,037,587
``` import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.applet.*; public class Stuff extends Applet implements ActionListener { Button okButton; public void init() { setLayout(new FlowLayout()); okButton = new Button(""); add(okButton); okButto...
2011/02/18
[ "https://Stackoverflow.com/questions/5037587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/516805/" ]
You certainly *could* customize `DisplayFor` to display an editable form. But the convention is for `DisplayFor` to be `readonly` and `EditorFor` to be for editing. Sticking with the convention will ensure that no matter what you pass into `DisplayFor`, it will do the same type of thing.
Use `_partial` view approach if: 1. View Centric Logic 2. What to keep all `_partial` view related HTML in this view only. In the template method, you will have to keep some HTML outside the Template View like "Main Header or any outer border/settings. 3. Want to render partial view with logic (From controller) using ...
5,037,587
``` import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.applet.*; public class Stuff extends Applet implements ActionListener { Button okButton; public void init() { setLayout(new FlowLayout()); okButton = new Button(""); add(okButton); okButto...
2011/02/18
[ "https://Stackoverflow.com/questions/5037587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/516805/" ]
You certainly *could* customize `DisplayFor` to display an editable form. But the convention is for `DisplayFor` to be `readonly` and `EditorFor` to be for editing. Sticking with the convention will ensure that no matter what you pass into `DisplayFor`, it will do the same type of thing.
Another difference that hasn't been mentioned so far is that a partialview doesn't add model prefixes while a template does [Here](https://stackoverflow.com/questions/1488890/asp-net-mvc-partial-views-input-name-prefixes) is the issue
5,037,587
``` import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.applet.*; public class Stuff extends Applet implements ActionListener { Button okButton; public void init() { setLayout(new FlowLayout()); okButton = new Button(""); add(okButton); okButto...
2011/02/18
[ "https://Stackoverflow.com/questions/5037587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/516805/" ]
Just to give my 2c worth, our project is using a partial view with several jQuery tabs, and each tab rendering its fields with its own partial view. This worked fine until we added a feature whereby some of the tabs shared some common fields. Our first approach to this was to create another partial view with these comm...
Use `_partial` view approach if: 1. View Centric Logic 2. What to keep all `_partial` view related HTML in this view only. In the template method, you will have to keep some HTML outside the Template View like "Main Header or any outer border/settings. 3. Want to render partial view with logic (From controller) using ...
5,037,587
``` import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.applet.*; public class Stuff extends Applet implements ActionListener { Button okButton; public void init() { setLayout(new FlowLayout()); okButton = new Button(""); add(okButton); okButto...
2011/02/18
[ "https://Stackoverflow.com/questions/5037587", "https://Stackoverflow.com", "https://Stackoverflow.com/users/516805/" ]
Just to give my 2c worth, our project is using a partial view with several jQuery tabs, and each tab rendering its fields with its own partial view. This worked fine until we added a feature whereby some of the tabs shared some common fields. Our first approach to this was to create another partial view with these comm...
Another difference that hasn't been mentioned so far is that a partialview doesn't add model prefixes while a template does [Here](https://stackoverflow.com/questions/1488890/asp-net-mvc-partial-views-input-name-prefixes) is the issue
49,055,208
I've this code, and i'm trying to put all results of itertools in one single list : `l = ['00','01','02','03'..]` , instead of that i'm getting a list on every single line `['0', '0'] ['0', '1'] ['0', '2'] ['0', '3']` ``` import itertools for r in itertools.product('0123456789', repeat=2): print list(r) ```
2018/03/01
[ "https://Stackoverflow.com/questions/49055208", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9134855/" ]
Using `itertools` you can do this: ``` from itertools import product list(map(''.join, product('0123456789', repeat=2))) # ['00', '01', '02', '03', '04', '05', '06', '07', ...] ```
Above code each and every iteration you are creating a list. To take the elements to one list create an empty list append items to list in each array. Actually you don't need `itertool` for this... ``` strng = '0123456789' num = [] for r in strng : num.append(r) print(num) ``` But if you really want to use `it...
7,785,760
I found this [CDI/Weld: book or resource recommendation](https://stackoverflow.com/questions/5293941/cdi-weld-book-or-resource-recommendation), and yes it is the same question but it is "old" now so I wonder if it has come any updates on this question? I am in the process of learning Java EE 6 so I am looking for bo...
2011/10/16
[ "https://Stackoverflow.com/questions/7785760", "https://Stackoverflow.com", "https://Stackoverflow.com/users/454049/" ]
The following articles may not be very new but I think they are useful if you want to learn about CDI: 1. [Dependency Injection in Java EE 6: Part I](http://www.theserverside.com/news/1373391/Dependency-Injection-in-Java-EE-6-Part-1) 2. [Dependency Injection in Java EE 6: Part II](http://www.theserverside.com/news/137...
Start with the Weld tutorial, is way easier to read and targets the principles of CDI in a much easier way than the TCK reference (even though the reference is a good for quick references, just as the name suggests). Unfortunately, there are still (10/2011) no books available. *"Enterprise JavaBeans 3.1" / Andrew Rubi...
19,690,805
I have a csv file with a bunch of lat long coordinates. I also have a csv file with a bunch of positions that a particular person will be standing at. For each of the points in the second file, I need to figure out whether they are near (under 1 mile) any of the points in the first file. I have about 500 points in each...
2013/10/30
[ "https://Stackoverflow.com/questions/19690805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965124/" ]
Because they don't represent equally convertible types/values. The conversion used by `==` is much more complex than a simple `toBoolean` conversion used by `if ('true')`. So given this code `true == 'true'`, it finds this: > > *"If `Type(x)` is `Boolean`, return the result of the comparison `ToNumber(x) == y`."* > ...
true is a boolean value 'true' is a string. you are comparing different data types. [look here: http://w3schools.com/js/js\_datatypes.asp](http://w3schools.com/js/js_datatypes.asp)
19,690,805
I have a csv file with a bunch of lat long coordinates. I also have a csv file with a bunch of positions that a particular person will be standing at. For each of the points in the second file, I need to figure out whether they are near (under 1 mile) any of the points in the first file. I have about 500 points in each...
2013/10/30
[ "https://Stackoverflow.com/questions/19690805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965124/" ]
Because they don't represent equally convertible types/values. The conversion used by `==` is much more complex than a simple `toBoolean` conversion used by `if ('true')`. So given this code `true == 'true'`, it finds this: > > *"If `Type(x)` is `Boolean`, return the result of the comparison `ToNumber(x) == y`."* > ...
true = boolean type 'true' = string type the expression "if ('true')" evaluates the 'true'(string) as true(boolean) on the same way that if('foo') or any other string does.
19,690,805
I have a csv file with a bunch of lat long coordinates. I also have a csv file with a bunch of positions that a particular person will be standing at. For each of the points in the second file, I need to figure out whether they are near (under 1 mile) any of the points in the first file. I have about 500 points in each...
2013/10/30
[ "https://Stackoverflow.com/questions/19690805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965124/" ]
Because they don't represent equally convertible types/values. The conversion used by `==` is much more complex than a simple `toBoolean` conversion used by `if ('true')`. So given this code `true == 'true'`, it finds this: > > *"If `Type(x)` is `Boolean`, return the result of the comparison `ToNumber(x) == y`."* > ...
A non-empty string will return true: * `if ('0') true; // true` * `if ('false') true; // true` * `if ('anything') true; // true` A null string will return undefined and thus is *falsy*: * `if ('') true; // not true` When comparing types, JavaScript will try to do some magic for you: * `if (1 == "1") true; // tru...
19,690,805
I have a csv file with a bunch of lat long coordinates. I also have a csv file with a bunch of positions that a particular person will be standing at. For each of the points in the second file, I need to figure out whether they are near (under 1 mile) any of the points in the first file. I have about 500 points in each...
2013/10/30
[ "https://Stackoverflow.com/questions/19690805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965124/" ]
Because they don't represent equally convertible types/values. The conversion used by `==` is much more complex than a simple `toBoolean` conversion used by `if ('true')`. So given this code `true == 'true'`, it finds this: > > *"If `Type(x)` is `Boolean`, return the result of the comparison `ToNumber(x) == y`."* > ...
The `==` operator uses ECMAScript's [abstract equality algorithm](http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3) which is quite complex. Its exact behavior depends on the types of each argument involved, and each step usually involves another invoking another ECMAScript function. The `if(condition)` state...
19,690,805
I have a csv file with a bunch of lat long coordinates. I also have a csv file with a bunch of positions that a particular person will be standing at. For each of the points in the second file, I need to figure out whether they are near (under 1 mile) any of the points in the first file. I have about 500 points in each...
2013/10/30
[ "https://Stackoverflow.com/questions/19690805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965124/" ]
true = boolean type 'true' = string type the expression "if ('true')" evaluates the 'true'(string) as true(boolean) on the same way that if('foo') or any other string does.
true is a boolean value 'true' is a string. you are comparing different data types. [look here: http://w3schools.com/js/js\_datatypes.asp](http://w3schools.com/js/js_datatypes.asp)
19,690,805
I have a csv file with a bunch of lat long coordinates. I also have a csv file with a bunch of positions that a particular person will be standing at. For each of the points in the second file, I need to figure out whether they are near (under 1 mile) any of the points in the first file. I have about 500 points in each...
2013/10/30
[ "https://Stackoverflow.com/questions/19690805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965124/" ]
A non-empty string will return true: * `if ('0') true; // true` * `if ('false') true; // true` * `if ('anything') true; // true` A null string will return undefined and thus is *falsy*: * `if ('') true; // not true` When comparing types, JavaScript will try to do some magic for you: * `if (1 == "1") true; // tru...
true is a boolean value 'true' is a string. you are comparing different data types. [look here: http://w3schools.com/js/js\_datatypes.asp](http://w3schools.com/js/js_datatypes.asp)
19,690,805
I have a csv file with a bunch of lat long coordinates. I also have a csv file with a bunch of positions that a particular person will be standing at. For each of the points in the second file, I need to figure out whether they are near (under 1 mile) any of the points in the first file. I have about 500 points in each...
2013/10/30
[ "https://Stackoverflow.com/questions/19690805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965124/" ]
The `==` operator uses ECMAScript's [abstract equality algorithm](http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3) which is quite complex. Its exact behavior depends on the types of each argument involved, and each step usually involves another invoking another ECMAScript function. The `if(condition)` state...
true is a boolean value 'true' is a string. you are comparing different data types. [look here: http://w3schools.com/js/js\_datatypes.asp](http://w3schools.com/js/js_datatypes.asp)
19,690,805
I have a csv file with a bunch of lat long coordinates. I also have a csv file with a bunch of positions that a particular person will be standing at. For each of the points in the second file, I need to figure out whether they are near (under 1 mile) any of the points in the first file. I have about 500 points in each...
2013/10/30
[ "https://Stackoverflow.com/questions/19690805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965124/" ]
The `==` operator uses ECMAScript's [abstract equality algorithm](http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3) which is quite complex. Its exact behavior depends on the types of each argument involved, and each step usually involves another invoking another ECMAScript function. The `if(condition)` state...
true = boolean type 'true' = string type the expression "if ('true')" evaluates the 'true'(string) as true(boolean) on the same way that if('foo') or any other string does.
19,690,805
I have a csv file with a bunch of lat long coordinates. I also have a csv file with a bunch of positions that a particular person will be standing at. For each of the points in the second file, I need to figure out whether they are near (under 1 mile) any of the points in the first file. I have about 500 points in each...
2013/10/30
[ "https://Stackoverflow.com/questions/19690805", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1965124/" ]
The `==` operator uses ECMAScript's [abstract equality algorithm](http://www.ecma-international.org/ecma-262/5.1/#sec-11.9.3) which is quite complex. Its exact behavior depends on the types of each argument involved, and each step usually involves another invoking another ECMAScript function. The `if(condition)` state...
A non-empty string will return true: * `if ('0') true; // true` * `if ('false') true; // true` * `if ('anything') true; // true` A null string will return undefined and thus is *falsy*: * `if ('') true; // not true` When comparing types, JavaScript will try to do some magic for you: * `if (1 == "1") true; // tru...
118,797
It was thought that the "island" has the size of 5,000,000 km². After reading a bit about geography, I'm unsure. My island would be far bigger than even the largest islands on Earth. But it would still be much smaller than the continents on earth. Now I'm undecided. Would the size still be fine for an island or should ...
2018/07/21
[ "https://worldbuilding.stackexchange.com/questions/118797", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/49776/" ]
Your island simply needs to be part of a big [Continental plate](https://en.wikipedia.org/wiki/Plate_tectonics#/media/File:Plates_tect2_en.svg) You will notice that Greenland is part of the North american plate and therefore an island. But India can be called a sub-Continent because it is on its own plate. The movement...
It's still a continent. A good borderline is 1/4 the size of Australia
118,797
It was thought that the "island" has the size of 5,000,000 km². After reading a bit about geography, I'm unsure. My island would be far bigger than even the largest islands on Earth. But it would still be much smaller than the continents on earth. Now I'm undecided. Would the size still be fine for an island or should ...
2018/07/21
[ "https://worldbuilding.stackexchange.com/questions/118797", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/49776/" ]
Your island simply needs to be part of a big [Continental plate](https://en.wikipedia.org/wiki/Plate_tectonics#/media/File:Plates_tect2_en.svg) You will notice that Greenland is part of the North american plate and therefore an island. But India can be called a sub-Continent because it is on its own plate. The movement...
There is a continuum between an islet (a tiny island) and Eurasia (the largest continent.) There is no *scientific* distinction that makes Europe and Asia separate continents and makes Australia a continent and Greenland not. (Geology speaks of "continents", but the definition is different from the geographical one.) ...
118,797
It was thought that the "island" has the size of 5,000,000 km². After reading a bit about geography, I'm unsure. My island would be far bigger than even the largest islands on Earth. But it would still be much smaller than the continents on earth. Now I'm undecided. Would the size still be fine for an island or should ...
2018/07/21
[ "https://worldbuilding.stackexchange.com/questions/118797", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/49776/" ]
There is a continuum between an islet (a tiny island) and Eurasia (the largest continent.) There is no *scientific* distinction that makes Europe and Asia separate continents and makes Australia a continent and Greenland not. (Geology speaks of "continents", but the definition is different from the geographical one.) ...
It's still a continent. A good borderline is 1/4 the size of Australia
6,322,943
I'm trying to create a custom editor for my UIViewController. It was suggested that I hide the textfields until the user presses the Edit key. How do you do this programmatically? In other words when the user hits 'Edit' I would like the label to disappear and the Textfield to appear. Thanks,
2011/06/12
[ "https://Stackoverflow.com/questions/6322943", "https://Stackoverflow.com", "https://Stackoverflow.com/users/385559/" ]
You can make use of the `hidden` property for quickly turning something visible or invisible. ``` self.widget1.hidden = YES; self.widget2.hidden = NO; ``` Another option is to set alpha to 0 to hide and 1 to show. This is beneficial if you want to have an animation fade the widgets in and out for a smooth transition...
You just need to use the `hidden` property. ``` label.hidden = YES; textField.hidden = NO; ```
65,588,638
What I am trying to do is replace the entire div with another div, each time leading to a new div with links to replace it. I'm close, but Only the first selection works properly. Only one div should show at a time. ```js $(document).ready(function() { $(".link2").click(function() { $(".changesections").replace...
2021/01/06
[ "https://Stackoverflow.com/questions/65588638", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4092226/" ]
> > What defines the main class if MANIFEST.MF is not present > > > If a JAR file doesn't have a "META-INF/MANIFEST.MF" component, then **it is not a JAR file**. It is just a ZIP file and you cannot use `java -jar ...` with a ZIP file. (You can include a ZIP file on the classpath, but it is not normally done.) If...
A "runnable jar" is a jar file where the manifest file contains instructions allowing the `java` Java runner command to "run" the jar file in a simpler way. E.g. if a `Foo.jar` file has a `static void main(String[])` method in a class `Bar` in package `com.example`, then you can run the program using: ```none java -c...
241,840
I found a spiky chest. I'm assuming it's going to hurt me when I touch it. Is there any way I can open it without getting damaged? [![Spiky chest](https://i.stack.imgur.com/EGJTP.jpg)](https://i.stack.imgur.com/EGJTP.jpg)
2015/11/02
[ "https://gaming.stackexchange.com/questions/241840", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/39891/" ]
Long and short: No. This chest will always deal you damage - it's kinda a requirement to open the chest. Touching it from any side (to open the chest) will cause damage, not just from the front.
You have multiple options: * put a bomb over the rock in the top-right of the chest, the explosion will move the rock into the gap to the right of the chest * put a bomb to the right of that rock, the explosion will move it into the gap at the top of the chest * put a bomb below the rock in the bottom-left of the ches...
241,840
I found a spiky chest. I'm assuming it's going to hurt me when I touch it. Is there any way I can open it without getting damaged? [![Spiky chest](https://i.stack.imgur.com/EGJTP.jpg)](https://i.stack.imgur.com/EGJTP.jpg)
2015/11/02
[ "https://gaming.stackexchange.com/questions/241840", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/39891/" ]
According to the [Rebirth wikia](http://bindingofisaacrebirth.gamepedia.com/Chest#Spike_Chests): > > **Spike Chests** are purple colored chests with spikes protruding from it that will deal damage to Isaac upon opening it. > > > I think that the only way to open that kind of chest without getting damaged is havin...
You have multiple options: * put a bomb over the rock in the top-right of the chest, the explosion will move the rock into the gap to the right of the chest * put a bomb to the right of that rock, the explosion will move it into the gap at the top of the chest * put a bomb below the rock in the bottom-left of the ches...
241,840
I found a spiky chest. I'm assuming it's going to hurt me when I touch it. Is there any way I can open it without getting damaged? [![Spiky chest](https://i.stack.imgur.com/EGJTP.jpg)](https://i.stack.imgur.com/EGJTP.jpg)
2015/11/02
[ "https://gaming.stackexchange.com/questions/241840", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/39891/" ]
According to the [Rebirth wikia](http://bindingofisaacrebirth.gamepedia.com/Chest#Spike_Chests): > > **Spike Chests** are purple colored chests with spikes protruding from it that will deal damage to Isaac upon opening it. > > > I think that the only way to open that kind of chest without getting damaged is havin...
Long and short: No. This chest will always deal you damage - it's kinda a requirement to open the chest. Touching it from any side (to open the chest) will cause damage, not just from the front.
15,064,173
I'm thinking about the possibility of teaching the use of Software Transactional Memory through 1 or 2 guided laboratories for a university course. I only know about Haskell's STM, but the students of the course probably never heard a word about it. I already found some lists of such libraries online or in other quest...
2013/02/25
[ "https://Stackoverflow.com/questions/15064173", "https://Stackoverflow.com", "https://Stackoverflow.com/users/898400/" ]
Production-quality STM-Libraries are not intended as a **teaching tool**, not even as "best practice". What is worth learning for any college/university-course is maybe **1%** of the code; the remaining 99% is *nitty-gritty platform-dependent intrinsic corner-cases*. The 1% that is interesting is not highlighted in any...
> > Start by introducing the problems: concurrency, cache... > > > Leading on from [eznme](https://stackoverflow.com/users/618598/bernd-elkemann), some good problems that I covered while at University for `concurrency`. * [Dining philosophers problem](https://en.wikipedia.org/wiki/Dining_philosophers_problem) > ...
15,064,173
I'm thinking about the possibility of teaching the use of Software Transactional Memory through 1 or 2 guided laboratories for a university course. I only know about Haskell's STM, but the students of the course probably never heard a word about it. I already found some lists of such libraries online or in other quest...
2013/02/25
[ "https://Stackoverflow.com/questions/15064173", "https://Stackoverflow.com", "https://Stackoverflow.com/users/898400/" ]
Production-quality STM-Libraries are not intended as a **teaching tool**, not even as "best practice". What is worth learning for any college/university-course is maybe **1%** of the code; the remaining 99% is *nitty-gritty platform-dependent intrinsic corner-cases*. The 1% that is interesting is not highlighted in any...
There are three good ways to do STM today. The first way is to use gcc and do TM in C or C++. As of gcc 4.7, transactional memory is supported via the -fgnu-tm flag. The gcc maintainers have done a lot of work, and as of the 4.9 (trunk) branch, you can even use hardware TM (e.g., Intel Haswell TSX). There is a draft s...
15,064,173
I'm thinking about the possibility of teaching the use of Software Transactional Memory through 1 or 2 guided laboratories for a university course. I only know about Haskell's STM, but the students of the course probably never heard a word about it. I already found some lists of such libraries online or in other quest...
2013/02/25
[ "https://Stackoverflow.com/questions/15064173", "https://Stackoverflow.com", "https://Stackoverflow.com/users/898400/" ]
> > Start by introducing the problems: concurrency, cache... > > > Leading on from [eznme](https://stackoverflow.com/users/618598/bernd-elkemann), some good problems that I covered while at University for `concurrency`. * [Dining philosophers problem](https://en.wikipedia.org/wiki/Dining_philosophers_problem) > ...
There are three good ways to do STM today. The first way is to use gcc and do TM in C or C++. As of gcc 4.7, transactional memory is supported via the -fgnu-tm flag. The gcc maintainers have done a lot of work, and as of the 4.9 (trunk) branch, you can even use hardware TM (e.g., Intel Haswell TSX). There is a draft s...
52,904,643
I have a AWS Lambda function which is triggered by SQS. This function is triggered approximately 100 times daily, but request count to the SQS queue is approximately 20.000 times daily. I don't understand why the number of requests made to the SQS is too high. My expectation is that the number of requests made to the S...
2018/10/20
[ "https://Stackoverflow.com/questions/52904643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1027846/" ]
When using SQS as an event source for AWS Lambda, AWS Lambda regularly polls the configured SQS queue to fetch new messages. While the official documentation isn't clear really about that, the [blog post announcing that feature](https://aws.amazon.com/de/blogs/aws/aws-lambda-adds-amazon-simple-queue-service-to-supporte...
Here is how we originally implemented when there is no SQS trigger. Create a SNS trigger with the SQS Cloudwatch Metric > > ApproximateNumberOfMessagesVisible > 0 > > > Trigger a Lambda from SNS, Read Messages from SQS and deliver it to whichever the lambda needs the message. Alternatively, you can use **Kinesi...
47,776,162
I need to host an **ASP.NET Core 2.0** app in IIS on **Windows Server 2008 R2 SP**1. I'm following the Docs guide on how to [Host ASP.NET Core on Windows with IIS](https://learn.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x). After installation, I still can't run `dotnet.exe`. It calls for a DLL na...
2017/12/12
[ "https://Stackoverflow.com/questions/47776162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1392152/" ]
It's probably not that the DLL is *missing*, but rather one of the DLL's dependencies is missing. 1. Make sure you're installing the [Update 3 version](https://www.microsoft.com/en-us/download/details.aspx?id=53840) of the Visual C++ 2015 Redistributable. 2. One of the requirements of the Visual C++ 2015 Redistributa...
**TL;DR:** Install these Windows updates **in this order**: 1. KB2919442 2. KB2919355 3. KB2999226 After installing the above 3 Windows update in the correct order, the error about the missing `dll` should stop. --- I ran into basically this same problem when attempting to deploy a **.NET Core 2.1** application to ...
47,776,162
I need to host an **ASP.NET Core 2.0** app in IIS on **Windows Server 2008 R2 SP**1. I'm following the Docs guide on how to [Host ASP.NET Core on Windows with IIS](https://learn.microsoft.com/en-us/aspnet/core/publishing/iis?tabs=aspnetcore2x). After installation, I still can't run `dotnet.exe`. It calls for a DLL na...
2017/12/12
[ "https://Stackoverflow.com/questions/47776162", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1392152/" ]
on windows server 2012 R2 I had same issue. Windows update + installing windows specific update solved it. see: <https://github.com/dotnet/core-setup/issues/4388>. I installed this update: <https://support.microsoft.com/en-us/help/3118401/update-for-universal-c-runtime-in-windows>
**TL;DR:** Install these Windows updates **in this order**: 1. KB2919442 2. KB2919355 3. KB2999226 After installing the above 3 Windows update in the correct order, the error about the missing `dll` should stop. --- I ran into basically this same problem when attempting to deploy a **.NET Core 2.1** application to ...
13,061,836
I've started getting the following error in one of my views for some reason, I don't get it in development, but only in production. Here is a snippet of the backtrace, any ideas? ``` ActionView::Template::Error (code converter not found (UTF-8 to UTF-16)): 19: [title, summary.gsub(/^/, " "), nil].join("\...
2012/10/25
[ "https://Stackoverflow.com/questions/13061836", "https://Stackoverflow.com", "https://Stackoverflow.com/users/407615/" ]
After some fiddling, I traced the problem to included javascrips in my view, based on conditionals, which had to manually be listed in rails configuration in order to be put through the asset pipeline. The relevant info from Rails Guides is: > > If you have other manifests or individual stylesheets and JavaScript >...
I just spent my 4 hours trying to debug this exact same error message. Are you using the workless gem ? <https://github.com/lostboy/workless> or any other kind of DelayedJob::Scaler? Removing this gem fixed everything!
2,167,643
Ok so in my html/js i have a form that updates based on the users previous selection. On the last stage i have a select menu where the user will choose their city. I have stored the value of the selected item in my Options list with the id #myCity to the following. ``` ('#myCity').change(function(){ var CityValue ...
2010/01/30
[ "https://Stackoverflow.com/questions/2167643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/262416/" ]
Well, the first function you specified (the event handler for onchange) doesn't do anything right now. You can just remove it and edit the second function like this: ``` function getweather(){ var CityValue = $("#myCity").val(); var to_load = 'getweather.php?p='+ CityValue +'.html'; $('#weather').empty()...
You declared the `CityValue` only in the function scope that you cannot access from outside. Either declare your variable globally: ``` var CityValue; $('#myCity').change(function(){ CityValue = $("#myCity").val(); }); function getweather() { var to_load = 'getweather.php?p='+ encodeURIComponent(CityValue) +'....
2,167,643
Ok so in my html/js i have a form that updates based on the users previous selection. On the last stage i have a select menu where the user will choose their city. I have stored the value of the selected item in my Options list with the id #myCity to the following. ``` ('#myCity').change(function(){ var CityValue ...
2010/01/30
[ "https://Stackoverflow.com/questions/2167643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/262416/" ]
You declared the `CityValue` only in the function scope that you cannot access from outside. Either declare your variable globally: ``` var CityValue; $('#myCity').change(function(){ CityValue = $("#myCity").val(); }); function getweather() { var to_load = 'getweather.php?p='+ encodeURIComponent(CityValue) +'....
> > Well, the first function you specified (the event handler for onchange) doesn't do anything right now. You can just remove it and edit the second function like this: > > > You can then add this function call to the change event. ``` function getweather(){ var CityValue = $("#myCity").val(); var to_lo...
2,167,643
Ok so in my html/js i have a form that updates based on the users previous selection. On the last stage i have a select menu where the user will choose their city. I have stored the value of the selected item in my Options list with the id #myCity to the following. ``` ('#myCity').change(function(){ var CityValue ...
2010/01/30
[ "https://Stackoverflow.com/questions/2167643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/262416/" ]
You declared the `CityValue` only in the function scope that you cannot access from outside. Either declare your variable globally: ``` var CityValue; $('#myCity').change(function(){ CityValue = $("#myCity").val(); }); function getweather() { var to_load = 'getweather.php?p='+ encodeURIComponent(CityValue) +'....
The more elegant answer to the question is in using [jQuery data API](http://api.jquery.com/data/). This allows you to store arbitrary data within an object rather than declaring variables, keeping everything in a nice OOP manner. So, to do what you want would mean storing the value like so: ``` $('#myCity').change(fu...
2,167,643
Ok so in my html/js i have a form that updates based on the users previous selection. On the last stage i have a select menu where the user will choose their city. I have stored the value of the selected item in my Options list with the id #myCity to the following. ``` ('#myCity').change(function(){ var CityValue ...
2010/01/30
[ "https://Stackoverflow.com/questions/2167643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/262416/" ]
Well, the first function you specified (the event handler for onchange) doesn't do anything right now. You can just remove it and edit the second function like this: ``` function getweather(){ var CityValue = $("#myCity").val(); var to_load = 'getweather.php?p='+ CityValue +'.html'; $('#weather').empty()...
> > Well, the first function you specified (the event handler for onchange) doesn't do anything right now. You can just remove it and edit the second function like this: > > > You can then add this function call to the change event. ``` function getweather(){ var CityValue = $("#myCity").val(); var to_lo...
2,167,643
Ok so in my html/js i have a form that updates based on the users previous selection. On the last stage i have a select menu where the user will choose their city. I have stored the value of the selected item in my Options list with the id #myCity to the following. ``` ('#myCity').change(function(){ var CityValue ...
2010/01/30
[ "https://Stackoverflow.com/questions/2167643", "https://Stackoverflow.com", "https://Stackoverflow.com/users/262416/" ]
Well, the first function you specified (the event handler for onchange) doesn't do anything right now. You can just remove it and edit the second function like this: ``` function getweather(){ var CityValue = $("#myCity").val(); var to_load = 'getweather.php?p='+ CityValue +'.html'; $('#weather').empty()...
The more elegant answer to the question is in using [jQuery data API](http://api.jquery.com/data/). This allows you to store arbitrary data within an object rather than declaring variables, keeping everything in a nice OOP manner. So, to do what you want would mean storing the value like so: ``` $('#myCity').change(fu...
22,077,910
I have an application which I want to communicate over a serial link to an embedded device. The communication protocol is binary - meaning that I have a structured message that I want to copy from memory into the serial byte stream unaltered (no encoding). I am using Microsoft VS 2012 writing the application in C# wi...
2014/02/27
[ "https://Stackoverflow.com/questions/22077910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1745900/" ]
If this is an in memory collect, there's no reason to convert to queryable: ``` IEnumerable<YourType> query = this.Collection.Where(x => x.FirstName = "FirstName" && x => x.LastName= "LastName"); if (includeAge) query = query.Where(x => x.Age == 21); ```
``` var queryable = this.Collection.AsQueryable().Where(x => x.FirstName = "FirstName" && x => x.LastName= "LastName"); if (!includeAge) { return queryable; } return queryable.Where(x => x.Age == 21); ```
22,077,910
I have an application which I want to communicate over a serial link to an embedded device. The communication protocol is binary - meaning that I have a structured message that I want to copy from memory into the serial byte stream unaltered (no encoding). I am using Microsoft VS 2012 writing the application in C# wi...
2014/02/27
[ "https://Stackoverflow.com/questions/22077910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1745900/" ]
If this is an in memory collect, there's no reason to convert to queryable: ``` IEnumerable<YourType> query = this.Collection.Where(x => x.FirstName = "FirstName" && x => x.LastName= "LastName"); if (includeAge) query = query.Where(x => x.Age == 21); ```
This is a possible solution to your problem. ``` if (includeAge) { firstExpr = firstExpr.Where(n => n.Age == 21); } ``` Unless you want it in a newExpr... in which case you can just keep var newExpr up top then assign it as above.
22,077,910
I have an application which I want to communicate over a serial link to an embedded device. The communication protocol is binary - meaning that I have a structured message that I want to copy from memory into the serial byte stream unaltered (no encoding). I am using Microsoft VS 2012 writing the application in C# wi...
2014/02/27
[ "https://Stackoverflow.com/questions/22077910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1745900/" ]
If this is an in memory collect, there's no reason to convert to queryable: ``` IEnumerable<YourType> query = this.Collection.Where(x => x.FirstName = "FirstName" && x => x.LastName= "LastName"); if (includeAge) query = query.Where(x => x.Age == 21); ```
Maybe something like this? ``` var persons = new Person[] { new Person() { FirstName = "John", LastName = "Appleseed", IsHuman = true }, new Person() { FirstName = "Compu", LastName = "Tron", IsHuman = false }, new Person() { FirstName = "John", LastName = "Tron", IsHuman = false } ...
39,815,403
I have the following problem im trying to put three ImageButtons over a Fragment Map so i have the following xml code: ``` <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/activ...
2016/10/02
[ "https://Stackoverflow.com/questions/39815403", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6911001/" ]
I guess `ClassCastException` is thrown at this line ``` this.con = ds.getConnection(); ``` Your code doesn't show the type of `this.con`, but it must be an `OracleConnection`. You can't do that, because connection is a wrapped dbcp connection. If you want to take Oracle Connection, you have to unwrap it before wit...
If you get below error ,make sure you have got connection with database java.lang.ClassCastException: org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper cannot be cast to oracle.jdbc.OracleConnection at If there is no connection then you may get this error.
48,393
Same question with 靉. I know together they make a literary translation of 'dark' in the context of clouds.
2021/10/04
[ "https://chinese.stackexchange.com/questions/48393", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/29369/" ]
As a native speaker, I have to admit that this is the first time that I see these two characters. By the help of dictionaries, I found that together 靉靆 means very cloudy so that it's dark. A new meaning appeared in the Ming Dynasty to mean glasses. 靉靆 is a 叠韵连绵词. Not sure how to translate the term, but it means a wor...
宋本廣韻:《廣韻·去聲·代·代》靆:靉靆雲狀。 康熙字典: 《玉篇》靆: 不明貌。《正韻》蕩亥切,音駘。義同。 《游宦紀聞》:汲泉滿池,粲粲相輝,半月止墨,玄雲(黑炎)"靆"而下,古人制作之精如此。 I can't explain/translate the sentence though :) <https://ctext.org/dictionary.pl?if=gb&char=%E9%9D%86>
26,003,184
Background ---------- At a high level, I have a Java application in which certain events should trigger a certain action to be taken for the current user. However, the events may be very frequent, and the action is always the same. So when the first event happens, I would like to schedule the action for some point in ...
2014/09/23
[ "https://Stackoverflow.com/questions/26003184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/461800/" ]
Although you're worried that Camel might be gross overkill for this usecase, I think that ActiveMQ is already gross overkill for the usecase you've described. You're looking to schedule something to happen 5 minutes after an event happens, and for it to consume only the first event and ignore all the ones between the ...
A simple solution is keeping track of the pending actions in a concurrent structure and use a [`ScheduledExecutorService`](http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ScheduledExecutorService.html) to execute them: ``` private static final Object RUNNING = new Object(); private final ConcurrentMap<Us...
26,003,184
Background ---------- At a high level, I have a Java application in which certain events should trigger a certain action to be taken for the current user. However, the events may be very frequent, and the action is always the same. So when the first event happens, I would like to schedule the action for some point in ...
2014/09/23
[ "https://Stackoverflow.com/questions/26003184", "https://Stackoverflow.com", "https://Stackoverflow.com/users/461800/" ]
Although you're worried that Camel might be gross overkill for this usecase, I think that ActiveMQ is already gross overkill for the usecase you've described. You're looking to schedule something to happen 5 minutes after an event happens, and for it to consume only the first event and ignore all the ones between the ...
With Camel this could be easily achieved with an [Aggregator](http://camel.apache.org/aggregator2.html) component with the parameter `completionInterval` , so on every five minutes you can check if the list aggregated messages is empty, if it's not fire a message to the route responsible for you user action and empty t...
13,945,182
When I load it by `Loader.load` I can pass them via `URLRequest`. But I don't see any opportunity in case of `Loader.loadBytes`. This question is similar to [Passing flashvars-style parameters to a loaded SWF](https://stackoverflow.com/questions/407858).
2012/12/19
[ "https://Stackoverflow.com/questions/13945182", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1826684/" ]
The answer is in API documentation. I've been hinted at another site. You should use [`parameters`](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/LoaderContext.html#parameters) property of `LoaderContext` object which you pass to the [`Loader.loadBytes`](http://help.adobe.com/en_US/Fl...
Great! runs for me only if parameters are strings: ``` loaderContext.parameters = {"a": "1", "b": "2"}; ```
156,719
What if I live alone and cannot unlock the door during an emergency? What can I do to enable 911 responders to enter my residence without tearing down the door?
2019/02/04
[ "https://diy.stackexchange.com/questions/156719", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/56573/" ]
My mother lives alone and is in a wheelchair so she has limited mobility. She has a number code door control and local EMS has the code on file. She also has a "I've fallen and I can't get up!" service and they have a record of the code as well.
This kind of thing comes up often in regards to security (well in my IT security experience at least). You want to make something easy to break into access for the good folks, without making it easy for the bad folks. **This is hard!** Some of the other answers suggested lock boxes with a master key or number combo. ...
156,719
What if I live alone and cannot unlock the door during an emergency? What can I do to enable 911 responders to enter my residence without tearing down the door?
2019/02/04
[ "https://diy.stackexchange.com/questions/156719", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/56573/" ]
One option is to buy a 'smart lock' that gives you the ability to unlock the door from device such as smart phone or tablet. If you carry a smartphone around, this might be a viable option. I feel obligated to note, however, that products in the 'internet of things' (IOT) space have notoriously poor software security ...
Depending on where you live, **Smart911** can be a nice option. It is a free system where you can add medical information, access codes, pictures of your children, vehicle information, and other pertinent details that can save valuable time for first responders in emergency situations. (If the 911 answering service is ...
156,719
What if I live alone and cannot unlock the door during an emergency? What can I do to enable 911 responders to enter my residence without tearing down the door?
2019/02/04
[ "https://diy.stackexchange.com/questions/156719", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/56573/" ]
The least expensive solution here is to buy a [combo lock key box](https://rads.stackoverflow.com/amzn/click/com/B0002YP1VC). You place a key to your home inside, put the box somewhere accessible outside and, if you call 911, you simply provide them the location and code. Just be sure to reset the code between uses. A...
One option is to buy a 'smart lock' that gives you the ability to unlock the door from device such as smart phone or tablet. If you carry a smartphone around, this might be a viable option. I feel obligated to note, however, that products in the 'internet of things' (IOT) space have notoriously poor software security ...
156,719
What if I live alone and cannot unlock the door during an emergency? What can I do to enable 911 responders to enter my residence without tearing down the door?
2019/02/04
[ "https://diy.stackexchange.com/questions/156719", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/56573/" ]
Call your local police department and inquire about a **["Knox Box Key"](https://www.knoxbox.com/)**. They probably have a master already to open one. You will need to buy the one they suggest or have a locksmith get involved to match their key to the box you purchase. They might even have a system set up for your comm...
My mother lives alone and is in a wheelchair so she has limited mobility. She has a number code door control and local EMS has the code on file. She also has a "I've fallen and I can't get up!" service and they have a record of the code as well.
156,719
What if I live alone and cannot unlock the door during an emergency? What can I do to enable 911 responders to enter my residence without tearing down the door?
2019/02/04
[ "https://diy.stackexchange.com/questions/156719", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/56573/" ]
Call your local police department and inquire about a **["Knox Box Key"](https://www.knoxbox.com/)**. They probably have a master already to open one. You will need to buy the one they suggest or have a locksmith get involved to match their key to the box you purchase. They might even have a system set up for your comm...
All the answers about lock boxes and such look great. But if you don't have some kind of medical condition where you expect it's likely you'll have an emergency at some point, and if you live in the US, I wouldn't worry about it. As far as I'm aware typically the fire department responds to all medical calls, and they ...
156,719
What if I live alone and cannot unlock the door during an emergency? What can I do to enable 911 responders to enter my residence without tearing down the door?
2019/02/04
[ "https://diy.stackexchange.com/questions/156719", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/56573/" ]
The least expensive solution here is to buy a [combo lock key box](https://rads.stackoverflow.com/amzn/click/com/B0002YP1VC). You place a key to your home inside, put the box somewhere accessible outside and, if you call 911, you simply provide them the location and code. Just be sure to reset the code between uses. A...
At our home town, the Police, Fire, and EMT have a program that address this. At one's descretion, a home owner can leave a copy of the door key and/or PIN code, secured at the station, andt used in an emergency. No waiting for beaking doors or windows.
156,719
What if I live alone and cannot unlock the door during an emergency? What can I do to enable 911 responders to enter my residence without tearing down the door?
2019/02/04
[ "https://diy.stackexchange.com/questions/156719", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/56573/" ]
This kind of thing comes up often in regards to security (well in my IT security experience at least). You want to make something easy to break into access for the good folks, without making it easy for the bad folks. **This is hard!** Some of the other answers suggested lock boxes with a master key or number combo. ...
All the answers about lock boxes and such look great. But if you don't have some kind of medical condition where you expect it's likely you'll have an emergency at some point, and if you live in the US, I wouldn't worry about it. As far as I'm aware typically the fire department responds to all medical calls, and they ...
156,719
What if I live alone and cannot unlock the door during an emergency? What can I do to enable 911 responders to enter my residence without tearing down the door?
2019/02/04
[ "https://diy.stackexchange.com/questions/156719", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/56573/" ]
This kind of thing comes up often in regards to security (well in my IT security experience at least). You want to make something easy to break into access for the good folks, without making it easy for the bad folks. **This is hard!** Some of the other answers suggested lock boxes with a master key or number combo. ...
Leave one of the windows unlocked
156,719
What if I live alone and cannot unlock the door during an emergency? What can I do to enable 911 responders to enter my residence without tearing down the door?
2019/02/04
[ "https://diy.stackexchange.com/questions/156719", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/56573/" ]
Call your local police department and inquire about a **["Knox Box Key"](https://www.knoxbox.com/)**. They probably have a master already to open one. You will need to buy the one they suggest or have a locksmith get involved to match their key to the box you purchase. They might even have a system set up for your comm...
Depending on where you live, **Smart911** can be a nice option. It is a free system where you can add medical information, access codes, pictures of your children, vehicle information, and other pertinent details that can save valuable time for first responders in emergency situations. (If the 911 answering service is ...
156,719
What if I live alone and cannot unlock the door during an emergency? What can I do to enable 911 responders to enter my residence without tearing down the door?
2019/02/04
[ "https://diy.stackexchange.com/questions/156719", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/56573/" ]
The least expensive solution here is to buy a [combo lock key box](https://rads.stackoverflow.com/amzn/click/com/B0002YP1VC). You place a key to your home inside, put the box somewhere accessible outside and, if you call 911, you simply provide them the location and code. Just be sure to reset the code between uses. A...
Get a lock with a built-in electronic keypad. Then if you ever have to call for an ambulance but can't get to the door, simply tell the dispatcher the code before the ambulance arrives. They will be able to relay it to the emergency responders, who will have no trouble opening the door. Locks like this typically have...
32,268,101
Desperatly trying to send an email to myself: ``` import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import java.util.Properties; Properties props = new Properties(...
2015/08/28
[ "https://Stackoverflow.com/questions/32268101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4059656/" ]
> > Create the **javax.mail.Session** object like below, with your username and > password:- > > > ``` Session session = Session.getInstance(props, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthenticati...
Set the below properties with your smtp user and password ``` props.put("mail.smtp.user", "myuser"); props.put("mail.smtp.password", "mypwd"); ``` Reference : <http://www.tutorialspoint.com/java/java_sending_email.htm>
32,268,101
Desperatly trying to send an email to myself: ``` import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import java.util.Properties; Properties props = new Properties(...
2015/08/28
[ "https://Stackoverflow.com/questions/32268101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4059656/" ]
In past I solved similar issue adding this: ``` if ("true".equals(emailConfig.get("mail.smtp.auth"))) { session = Session.getInstance(properties, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(emailConfig.get("ma...
Set the below properties with your smtp user and password ``` props.put("mail.smtp.user", "myuser"); props.put("mail.smtp.password", "mypwd"); ``` Reference : <http://www.tutorialspoint.com/java/java_sending_email.htm>
32,268,101
Desperatly trying to send an email to myself: ``` import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import java.util.Properties; Properties props = new Properties(...
2015/08/28
[ "https://Stackoverflow.com/questions/32268101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4059656/" ]
Set the below properties with your smtp user and password ``` props.put("mail.smtp.user", "myuser"); props.put("mail.smtp.password", "mypwd"); ``` Reference : <http://www.tutorialspoint.com/java/java_sending_email.htm>
Hope you have included the "mail.jar" and "activation.jar" in your project. This [link](http://javainfinite.com/java/send-email-using-gmail-in-java/) may help you
32,268,101
Desperatly trying to send an email to myself: ``` import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import java.util.Properties; Properties props = new Properties(...
2015/08/28
[ "https://Stackoverflow.com/questions/32268101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4059656/" ]
Set the below properties with your smtp user and password ``` props.put("mail.smtp.user", "myuser"); props.put("mail.smtp.password", "mypwd"); ``` Reference : <http://www.tutorialspoint.com/java/java_sending_email.htm>
You're calling the Transport.send static method, which ignores the Transport instance you created and connected. Call the sendMessage method instead, or skip creating your own Transport instance and call the static send method that takes a username and password. This is one of the [JavaMail common mistakes](http://www...
32,268,101
Desperatly trying to send an email to myself: ``` import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import java.util.Properties; Properties props = new Properties(...
2015/08/28
[ "https://Stackoverflow.com/questions/32268101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4059656/" ]
> > Create the **javax.mail.Session** object like below, with your username and > password:- > > > ``` Session session = Session.getInstance(props, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthenticati...
Hope you have included the "mail.jar" and "activation.jar" in your project. This [link](http://javainfinite.com/java/send-email-using-gmail-in-java/) may help you
32,268,101
Desperatly trying to send an email to myself: ``` import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import java.util.Properties; Properties props = new Properties(...
2015/08/28
[ "https://Stackoverflow.com/questions/32268101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4059656/" ]
> > Create the **javax.mail.Session** object like below, with your username and > password:- > > > ``` Session session = Session.getInstance(props, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthenticati...
You're calling the Transport.send static method, which ignores the Transport instance you created and connected. Call the sendMessage method instead, or skip creating your own Transport instance and call the static send method that takes a username and password. This is one of the [JavaMail common mistakes](http://www...
32,268,101
Desperatly trying to send an email to myself: ``` import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import java.util.Properties; Properties props = new Properties(...
2015/08/28
[ "https://Stackoverflow.com/questions/32268101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4059656/" ]
In past I solved similar issue adding this: ``` if ("true".equals(emailConfig.get("mail.smtp.auth"))) { session = Session.getInstance(properties, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(emailConfig.get("ma...
Hope you have included the "mail.jar" and "activation.jar" in your project. This [link](http://javainfinite.com/java/send-email-using-gmail-in-java/) may help you
32,268,101
Desperatly trying to send an email to myself: ``` import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import java.util.Properties; Properties props = new Properties(...
2015/08/28
[ "https://Stackoverflow.com/questions/32268101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4059656/" ]
In past I solved similar issue adding this: ``` if ("true".equals(emailConfig.get("mail.smtp.auth"))) { session = Session.getInstance(properties, new javax.mail.Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(emailConfig.get("ma...
You're calling the Transport.send static method, which ignores the Transport instance you created and connected. Call the sendMessage method instead, or skip creating your own Transport instance and call the static send method that takes a username and password. This is one of the [JavaMail common mistakes](http://www...
1,093,305
I have been trying to migrate a laptop from a HDD to an SSD. I initially cloned the drive with the latest version of TODO Backup and then tried with Macrium Reflect. Both have the same problem. The drive clones fine and all the files appear to be present, but Windows 10 won't boot. I have booted from a recovery disk, ...
2016/06/24
[ "https://superuser.com/questions/1093305", "https://superuser.com", "https://superuser.com/users/610073/" ]
Reload windows to the new drive like you are doing a fresh install, then use AOMEI Backupper free to clone only the windows partition to over top of the windows partition on the new drive and overwrite it with the windows partition from the old drive.
Fixed, here is what you do ... You f2 force boot with the SSD. You use the command prompt in admin to navigate disks with the following * `LIST DISK` * `SELECT DISK n` -- n is the disk you want (HDD storage) * `LIST PARTITION` * `SELECT PARTITION n` -- the system one inactive If this won't allow because the HDD is ...
1,093,305
I have been trying to migrate a laptop from a HDD to an SSD. I initially cloned the drive with the latest version of TODO Backup and then tried with Macrium Reflect. Both have the same problem. The drive clones fine and all the files appear to be present, but Windows 10 won't boot. I have booted from a recovery disk, ...
2016/06/24
[ "https://superuser.com/questions/1093305", "https://superuser.com", "https://superuser.com/users/610073/" ]
Windows 10. Fix Error After Cloning HDD SSD - Error in file winload.efi * With Windows 10 installation/recovery media open the command prompt in advanced tools * `Diskpart` * `list volume` (take note of boot partition volume and windows partition letter) * `select volume #` (replace # with the partition responsible...
Fixed, here is what you do ... You f2 force boot with the SSD. You use the command prompt in admin to navigate disks with the following * `LIST DISK` * `SELECT DISK n` -- n is the disk you want (HDD storage) * `LIST PARTITION` * `SELECT PARTITION n` -- the system one inactive If this won't allow because the HDD is ...
1,093,305
I have been trying to migrate a laptop from a HDD to an SSD. I initially cloned the drive with the latest version of TODO Backup and then tried with Macrium Reflect. Both have the same problem. The drive clones fine and all the files appear to be present, but Windows 10 won't boot. I have booted from a recovery disk, ...
2016/06/24
[ "https://superuser.com/questions/1093305", "https://superuser.com", "https://superuser.com/users/610073/" ]
I struggle with similar problem with Windows 8.1. When cloning from HDD to SSD, partitions serial and GUID kept intact. But I not want to remove original HDD from system. So I needed to change GUID (in GPT for FAT EFI partition) and remove windows system partition from original HDD after cloning and before boot recove...
This answer may already be posted, however I did not see it. Too simple: Go into computer management: then to storage disk management, and identify the new cloned drive. My software does not return the cloned drive with a name, therefore add a name , usually C: and then the drive should be recognized, and boot proper...
1,093,305
I have been trying to migrate a laptop from a HDD to an SSD. I initially cloned the drive with the latest version of TODO Backup and then tried with Macrium Reflect. Both have the same problem. The drive clones fine and all the files appear to be present, but Windows 10 won't boot. I have booted from a recovery disk, ...
2016/06/24
[ "https://superuser.com/questions/1093305", "https://superuser.com", "https://superuser.com/users/610073/" ]
Windows 10. Fix Error After Cloning HDD SSD - Error in file winload.efi * With Windows 10 installation/recovery media open the command prompt in advanced tools * `Diskpart` * `list volume` (take note of boot partition volume and windows partition letter) * `select volume #` (replace # with the partition responsible...
I struggle with similar problem with Windows 8.1. When cloning from HDD to SSD, partitions serial and GUID kept intact. But I not want to remove original HDD from system. So I needed to change GUID (in GPT for FAT EFI partition) and remove windows system partition from original HDD after cloning and before boot recove...
1,093,305
I have been trying to migrate a laptop from a HDD to an SSD. I initially cloned the drive with the latest version of TODO Backup and then tried with Macrium Reflect. Both have the same problem. The drive clones fine and all the files appear to be present, but Windows 10 won't boot. I have booted from a recovery disk, ...
2016/06/24
[ "https://superuser.com/questions/1093305", "https://superuser.com", "https://superuser.com/users/610073/" ]
I struggle with similar problem with Windows 8.1. When cloning from HDD to SSD, partitions serial and GUID kept intact. But I not want to remove original HDD from system. So I needed to change GUID (in GPT for FAT EFI partition) and remove windows system partition from original HDD after cloning and before boot recove...
Fixed, here is what you do ... You f2 force boot with the SSD. You use the command prompt in admin to navigate disks with the following * `LIST DISK` * `SELECT DISK n` -- n is the disk you want (HDD storage) * `LIST PARTITION` * `SELECT PARTITION n` -- the system one inactive If this won't allow because the HDD is ...
1,093,305
I have been trying to migrate a laptop from a HDD to an SSD. I initially cloned the drive with the latest version of TODO Backup and then tried with Macrium Reflect. Both have the same problem. The drive clones fine and all the files appear to be present, but Windows 10 won't boot. I have booted from a recovery disk, ...
2016/06/24
[ "https://superuser.com/questions/1093305", "https://superuser.com", "https://superuser.com/users/610073/" ]
Windows 10. Fix Error After Cloning HDD SSD - Error in file winload.efi * With Windows 10 installation/recovery media open the command prompt in advanced tools * `Diskpart` * `list volume` (take note of boot partition volume and windows partition letter) * `select volume #` (replace # with the partition responsible...
just met the same problem, actually a small mistake on 2nd clone of 2nd new laptop. 1st laptop clone, connect alone and boot up ok, the default hard disk connect on 2nd boot and formatted without problem. But on 2nd laptop clone, connect newly clone SSD and original hard disk still with win10 in it, although choose b...
1,093,305
I have been trying to migrate a laptop from a HDD to an SSD. I initially cloned the drive with the latest version of TODO Backup and then tried with Macrium Reflect. Both have the same problem. The drive clones fine and all the files appear to be present, but Windows 10 won't boot. I have booted from a recovery disk, ...
2016/06/24
[ "https://superuser.com/questions/1093305", "https://superuser.com", "https://superuser.com/users/610073/" ]
I had this same problem, just create windows installation usb drive from official site, boot up from installation usb, then go to troubleshooting, start CMD there and copy all files (and folders) that start with boot\* and efi\* from installation usb to root directory of cloned SSD drive, after doing that my cloned SSD...
Fixed, here is what you do ... You f2 force boot with the SSD. You use the command prompt in admin to navigate disks with the following * `LIST DISK` * `SELECT DISK n` -- n is the disk you want (HDD storage) * `LIST PARTITION` * `SELECT PARTITION n` -- the system one inactive If this won't allow because the HDD is ...
1,093,305
I have been trying to migrate a laptop from a HDD to an SSD. I initially cloned the drive with the latest version of TODO Backup and then tried with Macrium Reflect. Both have the same problem. The drive clones fine and all the files appear to be present, but Windows 10 won't boot. I have booted from a recovery disk, ...
2016/06/24
[ "https://superuser.com/questions/1093305", "https://superuser.com", "https://superuser.com/users/610073/" ]
Since you have a way of booting into Windows on the SSD, you can do a [Repair install of Windows 10](http://www.tenforums.com/tutorials/16397-repair-install-windows-10-place-upgrade.html) by performing an in-place upgrade without losing anything. You should first verify the partition alignment as [described here](htt...
I think there is some problem with boot files or boot order. The first thing you can do is disable fast startup by going to power options. As fast startup uses a kind of hibernation techniques. If it doesn't work perform an in-place upgrade without loosing your data. This will create new boot files and settings.
1,093,305
I have been trying to migrate a laptop from a HDD to an SSD. I initially cloned the drive with the latest version of TODO Backup and then tried with Macrium Reflect. Both have the same problem. The drive clones fine and all the files appear to be present, but Windows 10 won't boot. I have booted from a recovery disk, ...
2016/06/24
[ "https://superuser.com/questions/1093305", "https://superuser.com", "https://superuser.com/users/610073/" ]
Windows 10. Fix Error After Cloning HDD SSD - Error in file winload.efi * With Windows 10 installation/recovery media open the command prompt in advanced tools * `Diskpart` * `list volume` (take note of boot partition volume and windows partition letter) * `select volume #` (replace # with the partition responsible...
I had this same problem, just create windows installation usb drive from official site, boot up from installation usb, then go to troubleshooting, start CMD there and copy all files (and folders) that start with boot\* and efi\* from installation usb to root directory of cloned SSD drive, after doing that my cloned SSD...
1,093,305
I have been trying to migrate a laptop from a HDD to an SSD. I initially cloned the drive with the latest version of TODO Backup and then tried with Macrium Reflect. Both have the same problem. The drive clones fine and all the files appear to be present, but Windows 10 won't boot. I have booted from a recovery disk, ...
2016/06/24
[ "https://superuser.com/questions/1093305", "https://superuser.com", "https://superuser.com/users/610073/" ]
just met the same problem, actually a small mistake on 2nd clone of 2nd new laptop. 1st laptop clone, connect alone and boot up ok, the default hard disk connect on 2nd boot and formatted without problem. But on 2nd laptop clone, connect newly clone SSD and original hard disk still with win10 in it, although choose b...
This answer may already be posted, however I did not see it. Too simple: Go into computer management: then to storage disk management, and identify the new cloned drive. My software does not return the cloned drive with a name, therefore add a name , usually C: and then the drive should be recognized, and boot proper...
537,455
**Update: The answer is 28ns for sure** Giving the following circuit and timing table: [![enter image description here](https://i.stack.imgur.com/csG1u.png)](https://i.stack.imgur.com/csG1u.png) **Question:** It's known that the time between positive-edge and negative-edge of the clock (which comes after) is require...
2020/12/15
[ "https://electronics.stackexchange.com/questions/537455", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/271194/" ]
> > what's the minimal value of clock cycle time so that the circuit works > with no problems? > > > Clearly, Setup is the relevant one for the analysis. Because Hold has no relation with clock period. However, you can crosscheck Hold in all paths with the given values to make sure that no path has hold violation....
**28ns is NOT the answer**. And the key point is in the OP Question **What's the minimal value of clock cycle time so that the circuit works with no problems?** From [Understanding Sequential Circuit Timing](http://www.ecs.umass.edu/ece/tessier/courses/221/lecture/timing-notes.pdf): [![enter image description here](h...
1,404,734
Let $\mathcal{B}$ be a full subcategory of a category $\mathcal{C}$. Is it possible that the inclusion functor does not preserve the pullbacks (or any limits) that exist in $\mathcal{B}$? I read this somewhere and looks to me like a typo. Is it not? The hom sets are the same, how is such a thing possible, if this is tr...
2015/08/21
[ "https://math.stackexchange.com/questions/1404734", "https://math.stackexchange.com", "https://math.stackexchange.com/users/263452/" ]
Another example, concrete in a different, informal sense than Hagen von Eitzen's example: Let $\mathcal B$ be the partially ordered set, viewed as a category in the usual way, consisting of three elements, say 0,1,and 2, with $0\leq1$ and $0\leq 2$ while 1 and 2 are incomparable. Let $\mathcal C$ be the partially order...
As a concrete example, you may know that the coproduct of groups is the free product and the coproduct of abelian groups is just the direct sum. The free product is never abelian (unless one factor is trivial), hence the inclusion from **Ab** to **Grp** certainly fails to preserve coproducts.
41,676,256
Let's say I have two create action methods, one for get method, one for post method: ``` [HttpGet] public ActionResult Create() { return View(); } [HttpPost] public ActionResult Create() { return View(); } ``` If I just add a view to Get method, so there is no view for Post action method, so when I invoke...
2017/01/16
[ "https://Stackoverflow.com/questions/41676256", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
When you create a View from a method, this view belongs to all methods with the same name and that share the same class. If you want to call another view (In this case, from the post method), just use ``` return View("nameOfTheView"); ```
The path to the view is inferred from the name of the controller and the name of the controller action. If you prefer, you can be explicit about the view. The following line of code returns a view named Foo: ``` return View("Foo"); ``` so, you should specify the name of view that you want to return
944,045
So in a typical model where you have a parent that can have many children and a child that can have only one parent, how do you manage the adding of children. I have been using this approach; ``` public class Parent { public Parent() { Children = new List<Child>(); } public IList<Child> Childr...
2009/06/03
[ "https://Stackoverflow.com/questions/944045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/85070/" ]
This is not an NHibernate problem at all. You should implement the AddChild method. The classes are responsible for their consistency, so they shouldn't expose anything that should not be available. For instance, the (mutable) Children list should be hidden. Exposing an IEnumerable is a good idea. Your second code i...
I don't like all the extra `AddXXX()` and `RemoveXXX()` methods cluttering my entity interfaces. Instead, I have a custom list that raises events when the `Add()` and `Remove()` methods are called. The linking then happens in the event handlers: ``` public class Course() { public Course() { this.Topics = n...
944,045
So in a typical model where you have a parent that can have many children and a child that can have only one parent, how do you manage the adding of children. I have been using this approach; ``` public class Parent { public Parent() { Children = new List<Child>(); } public IList<Child> Childr...
2009/06/03
[ "https://Stackoverflow.com/questions/944045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/85070/" ]
This is not an NHibernate problem at all. You should implement the AddChild method. The classes are responsible for their consistency, so they shouldn't expose anything that should not be available. For instance, the (mutable) Children list should be hidden. Exposing an IEnumerable is a good idea. Your second code i...
If you have a foreign key in your DB, and you are using Identity(SQL Server) to generate your primary keys, you are going to *NEED* the backlink from the child to the parent. Else, the insert will complain on child because nhibernate needs to do some back and forth for the parent ID, but it hasn't done it yet. What we...
944,045
So in a typical model where you have a parent that can have many children and a child that can have only one parent, how do you manage the adding of children. I have been using this approach; ``` public class Parent { public Parent() { Children = new List<Child>(); } public IList<Child> Childr...
2009/06/03
[ "https://Stackoverflow.com/questions/944045", "https://Stackoverflow.com", "https://Stackoverflow.com/users/85070/" ]
This is not an NHibernate problem at all. You should implement the AddChild method. The classes are responsible for their consistency, so they shouldn't expose anything that should not be available. For instance, the (mutable) Children list should be hidden. Exposing an IEnumerable is a good idea. Your second code i...
I support the accepted solution to this question, however the solution presented is not complete, as using private fields requires some extra configuration in the mappers. For the benefit of others, the following is the complete solution: ``` public partial class Test { private readonly IList<Child> children = new...