qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
43,024,508 | I am trying to implement aspnetcore identity without entity framework and using direct connection to SQL Server and I created identityuser, userstore and usertable so far. I am trying to register a new user using the default Register View and using default Accounts controller's Register method which calls \_usermanager... | 2017/03/26 | [
"https://Stackoverflow.com/questions/43024508",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2516189/"
] | My mistake, the UserStore.GetUserNameAsync should fetch the Username from the (Parameter)User object but I was trying to fetch it from the database and it becomes null at that instance, hence username was always blank and the validation failed | I had a similar situation, you have to override the default username in IdentityUser in the model class.
public override UserName {get; set;} |
50,268,694 | Hi I have a django application, and I was wondering if there was a better way to display my URLS after submitting a GET request.
```
urlpatterns = [
...
re_path(r'^reporting/$', ReportView.as_view(), name='report'),
]
```
When I got to localhost:8000/reporting which displays a form, and click on a radio butt... | 2018/05/10 | [
"https://Stackoverflow.com/questions/50268694",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5414307/"
] | Rather than trying to mangle URLs like that (and I'd challenge the assertion that your way is "cleaner"), you could preserve the existing parameters by outputting hidden fields within the form which would then be sent along with the visible ones:
```
<form method="GET">
{% for key, value in request.GET.items %}
<i... | @Daniel's answer is correct.
But the answer of your question
`Is this possible - would I have to have several different URLS relating to different views?`
is also YES.
Your `ReportView` is kind of `ListView`. I guess it shows all list from `Report`.
Then you can make `DetailView` from Report - which shows one ... |
30,059,492 | So I have a javascript function that basically calls another function. This other function returns true or false and then I have an if statement however the function does not wait for the value to be returned it just keeps plowing through the code. What is the solution around this?
So my first function has:
```
confi... | 2015/05/05 | [
"https://Stackoverflow.com/questions/30059492",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/755806/"
] | You should use a callback:
```
function show_confirmation(message, height, callback) {
// ...
$('#yesButton').click(function (e) {
e.preventDefault();
$('.confirmBox').hide("slow");
callback(true);
});
$('#noButton').click(function (e) {
e.preventDefault();
$('.... | The solution is to use callbacks. You can't feasibly have a blocking function in a browser.
Have your show\_confirmation function take in a function argument that gets called with the return value. |
30,059,492 | So I have a javascript function that basically calls another function. This other function returns true or false and then I have an if statement however the function does not wait for the value to be returned it just keeps plowing through the code. What is the solution around this?
So my first function has:
```
confi... | 2015/05/05 | [
"https://Stackoverflow.com/questions/30059492",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/755806/"
] | The solution is to use callbacks. You can't feasibly have a blocking function in a browser.
Have your show\_confirmation function take in a function argument that gets called with the return value. | ```
function show_confirmation(message, height, callback) {
var contentPosition = $('.content').position();
var contentHeight = $('.content').height();
var bottomPosition = contentPosition.top + contentHeight;
$('.confirmBox').css("top", (bottomPosition - ($('.confirmBox').outerHeight()+... |
30,059,492 | So I have a javascript function that basically calls another function. This other function returns true or false and then I have an if statement however the function does not wait for the value to be returned it just keeps plowing through the code. What is the solution around this?
So my first function has:
```
confi... | 2015/05/05 | [
"https://Stackoverflow.com/questions/30059492",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/755806/"
] | You should use a callback:
```
function show_confirmation(message, height, callback) {
// ...
$('#yesButton').click(function (e) {
e.preventDefault();
$('.confirmBox').hide("slow");
callback(true);
});
$('#noButton').click(function (e) {
e.preventDefault();
$('.... | ```
function show_confirmation(message, height, callback) {
var contentPosition = $('.content').position();
var contentHeight = $('.content').height();
var bottomPosition = contentPosition.top + contentHeight;
$('.confirmBox').css("top", (bottomPosition - ($('.confirmBox').outerHeight()+... |
24,726,896 | I have overridden the isCellEditable() method of class JTable in my code to make the cells of my JTable non-editable but selectable, but the cells are still editable. How do I solve this problem?
```
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JFrame;
import javax.swing.JSc... | 2014/07/13 | [
"https://Stackoverflow.com/questions/24726896",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3808922/"
] | I believe you need to override the isCellEditable() method of the TableModel rather than the JTable, like so:
```
public class NonEditableModel extends DefaultTableModel {
NonEditableModel(Object[][] data, String[] columnNames) {
super(data, columnNames);
}
@Override
public boolean isCellEdit... | You are adding another `JTable` in your code, you are confusing between the one extending and the other one added to the JFrame!
Add these invocations after fixing the above:
```
table.setFocusable(false);
table.setRowSelectionAllowed(true);
``` |
24,726,896 | I have overridden the isCellEditable() method of class JTable in my code to make the cells of my JTable non-editable but selectable, but the cells are still editable. How do I solve this problem?
```
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JFrame;
import javax.swing.JSc... | 2014/07/13 | [
"https://Stackoverflow.com/questions/24726896",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3808922/"
] | Your class extends JTable and you override the `isCellEditable(...)` method.
But then you create a new JTable that you add to the frame and you do NOT override the `isCellEditable(..)` method of that JTable.
If you want to extend JTable, then don't create a new JTable inside that class. | You are adding another `JTable` in your code, you are confusing between the one extending and the other one added to the JFrame!
Add these invocations after fixing the above:
```
table.setFocusable(false);
table.setRowSelectionAllowed(true);
``` |
24,726,896 | I have overridden the isCellEditable() method of class JTable in my code to make the cells of my JTable non-editable but selectable, but the cells are still editable. How do I solve this problem?
```
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JFrame;
import javax.swing.JSc... | 2014/07/13 | [
"https://Stackoverflow.com/questions/24726896",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3808922/"
] | I believe you need to override the isCellEditable() method of the TableModel rather than the JTable, like so:
```
public class NonEditableModel extends DefaultTableModel {
NonEditableModel(Object[][] data, String[] columnNames) {
super(data, columnNames);
}
@Override
public boolean isCellEdit... | Your class extends JTable and you override the `isCellEditable(...)` method.
But then you create a new JTable that you add to the frame and you do NOT override the `isCellEditable(..)` method of that JTable.
If you want to extend JTable, then don't create a new JTable inside that class. |
7,183,977 | ```
package testing.project;
public class PalindromeThreeDigits {
public static void main(String[] args) {
int value = 0;
for(int i = 100;i <=999;i++)
{
for(int j = i;j <=999;j++)
{
int value1 = i * j;
StringBuilder sb1 = new StringBu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7183977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/663148/"
] | We can translate the task into the language of mathematics.
For a short start, we use characters as digits:
```
abc * xyz = n
abc is a 3-digit number, and we deconstruct it as 100*a+10*b+c
xyz is a 3-digit number, and we deconstruct it as 100*x+10*y+z
```
Now we have two mathematical expressions, and can defi... | ```
public class ProjectEuler4 {
public static void main(String[] args) {
int x = 999; // largest 3-digit number
int largestProduct = 0;
for(int y=x; y>99; y--){
int product = x*y;
if(isPalindormic(x*y)){
if(product>largestProduct){
largestProduct = product;
... |
7,183,977 | ```
package testing.project;
public class PalindromeThreeDigits {
public static void main(String[] args) {
int value = 0;
for(int i = 100;i <=999;i++)
{
for(int j = i;j <=999;j++)
{
int value1 = i * j;
StringBuilder sb1 = new StringBu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7183977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/663148/"
] | ```
package ex;
public class Main {
public static void main(String[] args) {
int i = 0, j = 0, k = 0, l = 0, m = 0, n = 0, flag = 0;
for (i = 999; i >= 100; i--) {
for (j = i; j >= 100; j--) {
k = i * j;
// System.out.print... | Most probably it is replication of one of the other solution but it looks simple owing to pythonified code ,even it is a bit brute-force.
```
def largest_palindrome():
largest_palindrome = 0;
for i in reversed(range(1,1000,1)):
for j in reversed(range(1, i+1, 1)):
num = i*j
if c... |
7,183,977 | ```
package testing.project;
public class PalindromeThreeDigits {
public static void main(String[] args) {
int value = 0;
for(int i = 100;i <=999;i++)
{
for(int j = i;j <=999;j++)
{
int value1 = i * j;
StringBuilder sb1 = new StringBu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7183977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/663148/"
] | We can translate the task into the language of mathematics.
For a short start, we use characters as digits:
```
abc * xyz = n
abc is a 3-digit number, and we deconstruct it as 100*a+10*b+c
xyz is a 3-digit number, and we deconstruct it as 100*x+10*y+z
```
Now we have two mathematical expressions, and can defi... | You can use the fact that 11 is a multiple of the palindrome to cut down on the search space. We can get this since we can assume the palindrome will be 6 digits and >= 111111.
e.g. ( from projecteuler ;) )
```
P= xyzzyx = 100000x + 10000y + 1000z + 100z + 10y +x
P=100001x+10010y+1100z
P=11(9091x+910y+100z)
```
Che... |
7,183,977 | ```
package testing.project;
public class PalindromeThreeDigits {
public static void main(String[] args) {
int value = 0;
for(int i = 100;i <=999;i++)
{
for(int j = i;j <=999;j++)
{
int value1 = i * j;
StringBuilder sb1 = new StringBu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7183977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/663148/"
] | We suppose the largest such palindrome will have six digits rather than five, because 143\*777 = 111111 is a palindrome.
As noted elsewhere, a 6-digit base-10 palindrome abccba is a multiple of 11. This is true because a\*100001 + b\*010010 + c\*001100 is equal to 11\*a\*9091 + 11\*b\*910 + 11\*c\*100. So, in our inne... | A slightly different approach that can easily calculate the largest palindromic number made from the product of up to two 6-digit numbers.
The first part is to create a generator of palindrome numbers. So there is no need to check if a number is palindromic, the second part is a simple loop.
```
#include <memory>
#i... |
7,183,977 | ```
package testing.project;
public class PalindromeThreeDigits {
public static void main(String[] args) {
int value = 0;
for(int i = 100;i <=999;i++)
{
for(int j = i;j <=999;j++)
{
int value1 = i * j;
StringBuilder sb1 = new StringBu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7183977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/663148/"
] | ```
public class Pin
{
public static boolean isPalin(int num)
{
char[] val = (""+num).toCharArray();
for(int i=0;i<val.length;i++)
{
if(val[i] != val[val.length - i - 1])
{
return false;
}
}
return true;
}
publi... | You can try the following which prints
```
999 * 979 * 989 = 967262769
largest palindrome= 967262769 took 0.015
```
---
```
public static void main(String... args) throws IOException, ParseException {
long start = System.nanoTime();
int largestPalindrome = 0;
for (int i = 999; i > 100; i--) {
LOOP:
fo... |
7,183,977 | ```
package testing.project;
public class PalindromeThreeDigits {
public static void main(String[] args) {
int value = 0;
for(int i = 100;i <=999;i++)
{
for(int j = i;j <=999;j++)
{
int value1 = i * j;
StringBuilder sb1 = new StringBu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7183977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/663148/"
] | We can translate the task into the language of mathematics.
For a short start, we use characters as digits:
```
abc * xyz = n
abc is a 3-digit number, and we deconstruct it as 100*a+10*b+c
xyz is a 3-digit number, and we deconstruct it as 100*x+10*y+z
```
Now we have two mathematical expressions, and can defi... | ```
i did this my way , but m not sure if this is the most efficient way of doing this .
package problems;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class P_4 {
/**
* @param args
* @throws IOException
*/
static int[] arry = new int[6];
static int[] arry... |
7,183,977 | ```
package testing.project;
public class PalindromeThreeDigits {
public static void main(String[] args) {
int value = 0;
for(int i = 100;i <=999;i++)
{
for(int j = i;j <=999;j++)
{
int value1 = i * j;
StringBuilder sb1 = new StringBu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7183977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/663148/"
] | We suppose the largest such palindrome will have six digits rather than five, because 143\*777 = 111111 is a palindrome.
As noted elsewhere, a 6-digit base-10 palindrome abccba is a multiple of 11. This is true because a\*100001 + b\*010010 + c\*001100 is equal to 11\*a\*9091 + 11\*b\*910 + 11\*c\*100. So, in our inne... | You can try the following which prints
```
999 * 979 * 989 = 967262769
largest palindrome= 967262769 took 0.015
```
---
```
public static void main(String... args) throws IOException, ParseException {
long start = System.nanoTime();
int largestPalindrome = 0;
for (int i = 999; i > 100; i--) {
LOOP:
fo... |
7,183,977 | ```
package testing.project;
public class PalindromeThreeDigits {
public static void main(String[] args) {
int value = 0;
for(int i = 100;i <=999;i++)
{
for(int j = i;j <=999;j++)
{
int value1 = i * j;
StringBuilder sb1 = new StringBu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7183977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/663148/"
] | ```
public class Pin
{
public static boolean isPalin(int num)
{
char[] val = (""+num).toCharArray();
for(int i=0;i<val.length;i++)
{
if(val[i] != val[val.length - i - 1])
{
return false;
}
}
return true;
}
publi... | What about : in python
```
>>> for i in range((999*999),(100*100), -1):
... if str(i) == str(i)[::-1]:
... print i
... break
...
997799
>>>
``` |
7,183,977 | ```
package testing.project;
public class PalindromeThreeDigits {
public static void main(String[] args) {
int value = 0;
for(int i = 100;i <=999;i++)
{
for(int j = i;j <=999;j++)
{
int value1 = i * j;
StringBuilder sb1 = new StringBu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7183977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/663148/"
] | A slightly different approach that can easily calculate the largest palindromic number made from the product of up to two 6-digit numbers.
The first part is to create a generator of palindrome numbers. So there is no need to check if a number is palindromic, the second part is a simple loop.
```
#include <memory>
#i... | ```
i did this my way , but m not sure if this is the most efficient way of doing this .
package problems;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class P_4 {
/**
* @param args
* @throws IOException
*/
static int[] arry = new int[6];
static int[] arry... |
7,183,977 | ```
package testing.project;
public class PalindromeThreeDigits {
public static void main(String[] args) {
int value = 0;
for(int i = 100;i <=999;i++)
{
for(int j = i;j <=999;j++)
{
int value1 = i * j;
StringBuilder sb1 = new StringBu... | 2011/08/25 | [
"https://Stackoverflow.com/questions/7183977",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/663148/"
] | What I would do:
1. Start at 999, working my way backwards to 998, 997, etc
2. Create the palindrome for my current number.
3. Determine the prime factorization of this number (not all that expensive if you have a pre-generated list of primes.
4. Work through this prime factorization list to determine if I can use a c... | You can use the fact that 11 is a multiple of the palindrome to cut down on the search space. We can get this since we can assume the palindrome will be 6 digits and >= 111111.
e.g. ( from projecteuler ;) )
```
P= xyzzyx = 100000x + 10000y + 1000z + 100z + 10y +x
P=100001x+10010y+1100z
P=11(9091x+910y+100z)
```
Che... |
47,014,628 | How should I specify CSS (preferebly only CSS, or alternatively CSS + JS) for the "to top" button in the page, so that the button is visible only if the content of the page is longer than the height of the user's screen. I do not want to have the button visible if the content of the specific page fits in well in the si... | 2017/10/30 | [
"https://Stackoverflow.com/questions/47014628",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2005883/"
] | ```js
$(document).scroll(function() {
var y = $(this).scrollTop();
if (y > 100) {
$('.arrow-top').fadeIn();
} else {
$('.arrow-top').fadeOut();
}
});
```
```css
body{
height: 2000px;
}
.arrow-top{
display: none;
position: fixed;
bottom: 2px;
right: 10px;
padding: 10px;
background: #222;
color: #ddd... | ```js
if( $(window).height()<$("body").height()){
$(".arrow-top").show();
}
```
```css
.arrow-top {
position: fixed;
bottom: 6%;
right: 1.5%;
display: none;
z-index: 9999;
background: transparent;
border: 3px solid #e82a62;
border-radius: 50%;
height: 50px;
width: ... |
369,016 | I want to build into mt ASP.NET application the ability for users to fill up forms, but the forms are not something I can hard-code into my (Enterprise) software.
So I need one screen that lets end users create the forms. Doing it the 2.0 way, I just love what PollDaddy did in their survey editor (great job guys!). Ho... | 2008/12/15 | [
"https://Stackoverflow.com/questions/369016",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/350/"
] | The [AJAX control toolkit](http://www.asp.net/ajax/ajaxcontroltoolkit/samples/) is free and would work for some of this items shown in the video. However, JQuery has tons of plugins it is easy to extend and even easier to use. I would suggest starting there and extending it where needed.
Good Luck | You could build it yourself using an AJAX framework like ASP.NET AJAX or even telerik controls. You could use jQuery but ASP.NET AJAX is free and embeds well with ASP.NET pages. You could buy something, but I've yet to encounter packages as such. |
11,547,296 | >
> **Possible Duplicate:**
>
> [Add table row in jQuery](https://stackoverflow.com/questions/171027/add-table-row-in-jquery)
>
>
>
I want to add a new row to my table on a change event. Here is what I have so far:
```
$('#CourseID').change(function() {
$('#CourseListTable > tr > td:last').append('<td>...... | 2012/07/18 | [
"https://Stackoverflow.com/questions/11547296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/793468/"
] | ```
$('#CourseID').change(function() {
$('#CourseListTable > tbody > tr:eq(1)').append('<td>...</td>');
});
``` | You should use `after` instead, `append` will append the element inside the `tr`.
```
$('#CourseID').change(function() {
$('#CourseListTable tr:last').after('<tr><td>test</td><td>test</td><td>test</td></tr>');
});
``` |
11,547,296 | >
> **Possible Duplicate:**
>
> [Add table row in jQuery](https://stackoverflow.com/questions/171027/add-table-row-in-jquery)
>
>
>
I want to add a new row to my table on a change event. Here is what I have so far:
```
$('#CourseID').change(function() {
$('#CourseListTable > tr > td:last').append('<td>...... | 2012/07/18 | [
"https://Stackoverflow.com/questions/11547296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/793468/"
] | You mention append Row but in your code you are appending just cells.
If you need to actually append a full row, try this:
```
$('#CourseID').change(function() {
$('<tr/>').append('<td>...</td>').insertAfter('#CourseListTable tr:last');
});
``` | If you want to add a new row you have to add a `tr`
```
$('#CourseListTable tr:last').after('<tr><td>...</td><td>...</td><td>...</td></tr>');
``` |
11,547,296 | >
> **Possible Duplicate:**
>
> [Add table row in jQuery](https://stackoverflow.com/questions/171027/add-table-row-in-jquery)
>
>
>
I want to add a new row to my table on a change event. Here is what I have so far:
```
$('#CourseID').change(function() {
$('#CourseListTable > tr > td:last').append('<td>...... | 2012/07/18 | [
"https://Stackoverflow.com/questions/11547296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/793468/"
] | You mention append Row but in your code you are appending just cells.
If you need to actually append a full row, try this:
```
$('#CourseID').change(function() {
$('<tr/>').append('<td>...</td>').insertAfter('#CourseListTable tr:last');
});
``` | follow this:
[Customizing JQuery Cloned row attributes](https://stackoverflow.com/questions/6835342/customizing-jquery-cloned-row-attributes)
It lets you clone, append and then customize each cell.. very flexible. |
11,547,296 | >
> **Possible Duplicate:**
>
> [Add table row in jQuery](https://stackoverflow.com/questions/171027/add-table-row-in-jquery)
>
>
>
I want to add a new row to my table on a change event. Here is what I have so far:
```
$('#CourseID').change(function() {
$('#CourseListTable > tr > td:last').append('<td>...... | 2012/07/18 | [
"https://Stackoverflow.com/questions/11547296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/793468/"
] | This line:
```
$('#CourseListTable > tr > td:last').append('<td>...</td>');
```
appends a TD (`<td>...</td>`) to an existing TD (`td:last`); you want to append it to a TR, eg.
```
$('#CourseListTable > tr').append('<td>...</td>');
```
Of course, you mentioned wanting to add a new *row*, in which case you shouldn'... | ```
$('#CourseID').change(function() {
$('#CourseListTable > tbody > tr:eq(1)').append('<td>...</td>');
});
``` |
11,547,296 | >
> **Possible Duplicate:**
>
> [Add table row in jQuery](https://stackoverflow.com/questions/171027/add-table-row-in-jquery)
>
>
>
I want to add a new row to my table on a change event. Here is what I have so far:
```
$('#CourseID').change(function() {
$('#CourseListTable > tr > td:last').append('<td>...... | 2012/07/18 | [
"https://Stackoverflow.com/questions/11547296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/793468/"
] | You mention append Row but in your code you are appending just cells.
If you need to actually append a full row, try this:
```
$('#CourseID').change(function() {
$('<tr/>').append('<td>...</td>').insertAfter('#CourseListTable tr:last');
});
``` | You should use `after` instead, `append` will append the element inside the `tr`.
```
$('#CourseID').change(function() {
$('#CourseListTable tr:last').after('<tr><td>test</td><td>test</td><td>test</td></tr>');
});
``` |
11,547,296 | >
> **Possible Duplicate:**
>
> [Add table row in jQuery](https://stackoverflow.com/questions/171027/add-table-row-in-jquery)
>
>
>
I want to add a new row to my table on a change event. Here is what I have so far:
```
$('#CourseID').change(function() {
$('#CourseListTable > tr > td:last').append('<td>...... | 2012/07/18 | [
"https://Stackoverflow.com/questions/11547296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/793468/"
] | ```
$('#CourseID').change(function() {
$('#CourseListTable > tbody > tr:eq(1)').append('<td>...</td>');
});
``` | follow this:
[Customizing JQuery Cloned row attributes](https://stackoverflow.com/questions/6835342/customizing-jquery-cloned-row-attributes)
It lets you clone, append and then customize each cell.. very flexible. |
11,547,296 | >
> **Possible Duplicate:**
>
> [Add table row in jQuery](https://stackoverflow.com/questions/171027/add-table-row-in-jquery)
>
>
>
I want to add a new row to my table on a change event. Here is what I have so far:
```
$('#CourseID').change(function() {
$('#CourseListTable > tr > td:last').append('<td>...... | 2012/07/18 | [
"https://Stackoverflow.com/questions/11547296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/793468/"
] | This line:
```
$('#CourseListTable > tr > td:last').append('<td>...</td>');
```
appends a TD (`<td>...</td>`) to an existing TD (`td:last`); you want to append it to a TR, eg.
```
$('#CourseListTable > tr').append('<td>...</td>');
```
Of course, you mentioned wanting to add a new *row*, in which case you shouldn'... | follow this:
[Customizing JQuery Cloned row attributes](https://stackoverflow.com/questions/6835342/customizing-jquery-cloned-row-attributes)
It lets you clone, append and then customize each cell.. very flexible. |
11,547,296 | >
> **Possible Duplicate:**
>
> [Add table row in jQuery](https://stackoverflow.com/questions/171027/add-table-row-in-jquery)
>
>
>
I want to add a new row to my table on a change event. Here is what I have so far:
```
$('#CourseID').change(function() {
$('#CourseListTable > tr > td:last').append('<td>...... | 2012/07/18 | [
"https://Stackoverflow.com/questions/11547296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/793468/"
] | You mention append Row but in your code you are appending just cells.
If you need to actually append a full row, try this:
```
$('#CourseID').change(function() {
$('<tr/>').append('<td>...</td>').insertAfter('#CourseListTable tr:last');
});
``` | ```
$('#CourseID').change(function() {
$('#CourseListTable > tbody > tr:eq(1)').append('<td>...</td>');
});
``` |
11,547,296 | >
> **Possible Duplicate:**
>
> [Add table row in jQuery](https://stackoverflow.com/questions/171027/add-table-row-in-jquery)
>
>
>
I want to add a new row to my table on a change event. Here is what I have so far:
```
$('#CourseID').change(function() {
$('#CourseListTable > tr > td:last').append('<td>...... | 2012/07/18 | [
"https://Stackoverflow.com/questions/11547296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/793468/"
] | You mention append Row but in your code you are appending just cells.
If you need to actually append a full row, try this:
```
$('#CourseID').change(function() {
$('<tr/>').append('<td>...</td>').insertAfter('#CourseListTable tr:last');
});
``` | This line:
```
$('#CourseListTable > tr > td:last').append('<td>...</td>');
```
appends a TD (`<td>...</td>`) to an existing TD (`td:last`); you want to append it to a TR, eg.
```
$('#CourseListTable > tr').append('<td>...</td>');
```
Of course, you mentioned wanting to add a new *row*, in which case you shouldn'... |
11,547,296 | >
> **Possible Duplicate:**
>
> [Add table row in jQuery](https://stackoverflow.com/questions/171027/add-table-row-in-jquery)
>
>
>
I want to add a new row to my table on a change event. Here is what I have so far:
```
$('#CourseID').change(function() {
$('#CourseListTable > tr > td:last').append('<td>...... | 2012/07/18 | [
"https://Stackoverflow.com/questions/11547296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/793468/"
] | ```
$('#CourseID').change(function() {
$('#CourseListTable > tbody > tr:eq(1)').append('<td>...</td>');
});
``` | If you want to add a new row you have to add a `tr`
```
$('#CourseListTable tr:last').after('<tr><td>...</td><td>...</td><td>...</td></tr>');
``` |
19,596,458 | i want to give one number from the user like 3,
and then give 3 number from user
like this :
```
int n;
printf("insert one number");
scanf("%d", n);
int a;
for(int i = 1; i <=n; i++){
scanf("%d", a);
}
```
**and without using Array calculate this...
this is very important that u... | 2013/10/25 | [
"https://Stackoverflow.com/questions/19596458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2539457/"
] | I'm going to attempt to answer this without actually giving you the answer:
Since the first number of your input is the number of values you want to read in, you need to store that separately and use it to create a loop.
Your loop (using your example input) will need to compute:
>
> (1\*2 + 1\*3) + (2\*1 + 2\*3) + ... | Let's do some math. The original expression, in its complete form, based on the example you gave, is:
f(a, n) = Σa[i]a[j] (i < n, j < n, j ≠ i)
= Σa[i] (i < n) Σa[j] (j < n, j ≠ i)
When we replace n with n+1 we get:
f(a, n+1) = Σa[i] (i < n+1) Σa[j] (j < n + 1, j ≠ i)
= Σa[i] (i < n) Σa[j] (j < n + 1, j ≠ i) + a[n... |
4,343,107 | Dirac, Reference 1, pg 59, says
The most important property of $\delta(x)$ is exemplified by the following equation
\begin{equation\*}
\int\_{-\infty}^\infty f(x) \delta(x) dx =f(0),~~~~~~~~~~~~~~~~~~~(3)
\end{equation\*}
What you might consider, as really going on here, is that the left hand side is a notation for... | 2021/12/27 | [
"https://math.stackexchange.com/questions/4343107",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/553318/"
] | Let $a>0$ and $p>0$ and let $I(a,p)$ be given by
$$\begin{align}
I(a,p)&=\int\_{-\infty}^\infty \frac{\sin(px)}{\sinh(ax)}\,dx\\\\
&=\text{Im}\left(\text{PV}\int\_{-\infty}^\infty \frac{e^{ipx}}{\sinh(ax)}\,dx\right)\tag1
\end{align}$$
Next, we move to the complex plane. Let $J(a,p)$ be given by the contour integral
... | We can find it in
*Gradshteyn, I. S.; Ryzhik, I. M.; Zwillinger, Daniel (ed.); Moll, Victor (ed.)*, [**Table of integrals, series, and products. Translated from the Russian. Translation edited and with a preface by Victor Moll and Daniel Zwillinger**](http://www.sciencedirect.com/science/book/9780123849335), Amsterdam... |
4,343,107 | Dirac, Reference 1, pg 59, says
The most important property of $\delta(x)$ is exemplified by the following equation
\begin{equation\*}
\int\_{-\infty}^\infty f(x) \delta(x) dx =f(0),~~~~~~~~~~~~~~~~~~~(3)
\end{equation\*}
What you might consider, as really going on here, is that the left hand side is a notation for... | 2021/12/27 | [
"https://math.stackexchange.com/questions/4343107",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/553318/"
] | Let $a>0$ and $p>0$ and let $I(a,p)$ be given by
$$\begin{align}
I(a,p)&=\int\_{-\infty}^\infty \frac{\sin(px)}{\sinh(ax)}\,dx\\\\
&=\text{Im}\left(\text{PV}\int\_{-\infty}^\infty \frac{e^{ipx}}{\sinh(ax)}\,dx\right)\tag1
\end{align}$$
Next, we move to the complex plane. Let $J(a,p)$ be given by the contour integral
... | Let $ a,p\in\mathbb{R} $, let's start by using $ \frac{1}{1-x} $ series expansion, we'll then switch the sum and the integral signs, we can easily prove that we're allowed to do so.
\begin{aligned}\int\_{-\infty}^{+\infty}{\frac{\sin{\left(px\right)}}{\operatorname{e}^{ax}-\operatorname{e}^{-ax}}\,\mathrm{d}x}&=2\int\... |
10,162,893 | I have a problem, I seeked help in #documentcloud on Freenode and got some suggestions but still hasn't helped me fix my problem.
Basically I have a collection, very large up to 2-3 thousand items, and it -has- to be sorted, however it only has to be sorted at certain times. Using a comparator function is fine, it kee... | 2012/04/15 | [
"https://Stackoverflow.com/questions/10162893",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1223682/"
] | This can't be done simply because Collection.sort actually calls Collection.comparator.
You have basically three options
### Option One
You could force your sort method without comparator to the models itself ( basically the same as calling .sort of your collection, but without .comparator
```
// in your collectio... | Would it work to use [`_.sortedIndex()`](http://underscorejs.org/#sortedIndex) when individual items are added to the already sorted list?
You could easily figure out the `sortedIndex`, `slice` the list based on that index, then `splice`: part1 + new\_entry + part2.
This keeps you from sorting the entire list every ... |
10,162,893 | I have a problem, I seeked help in #documentcloud on Freenode and got some suggestions but still hasn't helped me fix my problem.
Basically I have a collection, very large up to 2-3 thousand items, and it -has- to be sorted, however it only has to be sorted at certain times. Using a comparator function is fine, it kee... | 2012/04/15 | [
"https://Stackoverflow.com/questions/10162893",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1223682/"
] | Try this:
```
collection.add(model, {sort: false});
``` | Would it work to use [`_.sortedIndex()`](http://underscorejs.org/#sortedIndex) when individual items are added to the already sorted list?
You could easily figure out the `sortedIndex`, `slice` the list based on that index, then `splice`: part1 + new\_entry + part2.
This keeps you from sorting the entire list every ... |
10,162,893 | I have a problem, I seeked help in #documentcloud on Freenode and got some suggestions but still hasn't helped me fix my problem.
Basically I have a collection, very large up to 2-3 thousand items, and it -has- to be sorted, however it only has to be sorted at certain times. Using a comparator function is fine, it kee... | 2012/04/15 | [
"https://Stackoverflow.com/questions/10162893",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1223682/"
] | This can't be done simply because Collection.sort actually calls Collection.comparator.
You have basically three options
### Option One
You could force your sort method without comparator to the models itself ( basically the same as calling .sort of your collection, but without .comparator
```
// in your collectio... | Try this:
```
collection.add(model, {sort: false});
``` |
66,460,775 | I have a dict with credentials like the following:
```
secret = {"password": "jdksal",
"user": "fjdklas",
"schema": "jfdaskl"}
```
I want to create a variable for password, user and schema. However, the secret dict can have other values for each key, so that I would have a list of possibles ways ... | 2021/03/03 | [
"https://Stackoverflow.com/questions/66460775",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9621172/"
] | As you have written it, `password` will get the last match if there is more than one overlap between `pass_word` and `secret`. I don't know is that is your intent.
You could use set operations if there is only one overlap:
```
>>> secret.keys() & pass_words
{'password'}
>>> secret.keys() & user_words
{'user'}
```
T... | I Think This Will Be Better:
```py
pass_words = ['password', 'pass', 'contraseña']
secret = {"password": pass_words,
"user": "fjdklas",
"schema": "jfdaskl"}
input_password = input("Enter Your Password: ")
for key,value in secret.items():
if input_password in value:
print("Correct Pass... |
21,144,023 | I'm having some troubles with my code, I want it to execute the php file whenever I enter something but it isn't working
```
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
... | 2014/01/15 | [
"https://Stackoverflow.com/questions/21144023",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3187651/"
] | From what I can see,you should change this
```
'%search%'
```
to
```
'%{$search}%'
```
in
```
$players = mysql_query("SELECT firstname FROM players WHERE firstname LIKE '%search%'");
```
**EDIT**
@user3187651 Assuming you've done everything right on the server side.
Change your javascript to:
```
fun... | There's something that is missing in your code:
```
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> //ur getting the jquery via online
<script>
$(document).ready(function(){
$("#textBoxId").change(function() //triggers wh... |
21,144,023 | I'm having some troubles with my code, I want it to execute the php file whenever I enter something but it isn't working
```
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
... | 2014/01/15 | [
"https://Stackoverflow.com/questions/21144023",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3187651/"
] | From what I can see,you should change this
```
'%search%'
```
to
```
'%{$search}%'
```
in
```
$players = mysql_query("SELECT firstname FROM players WHERE firstname LIKE '%search%'");
```
**EDIT**
@user3187651 Assuming you've done everything right on the server side.
Change your javascript to:
```
fun... | You are missing `{`. Just do:
```
function xyx(name) {
$.post("search.php", { name: value }, function(data) {
$("#results").html(data);
});
}
``` |
21,144,023 | I'm having some troubles with my code, I want it to execute the php file whenever I enter something but it isn't working
```
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
... | 2014/01/15 | [
"https://Stackoverflow.com/questions/21144023",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3187651/"
] | From what I can see,you should change this
```
'%search%'
```
to
```
'%{$search}%'
```
in
```
$players = mysql_query("SELECT firstname FROM players WHERE firstname LIKE '%search%'");
```
**EDIT**
@user3187651 Assuming you've done everything right on the server side.
Change your javascript to:
```
fun... | For more secure and creative back-end code, you can use this.
```
<?php
$host = 'localhost';
$user = 'root';
$password = '';
$database = 'dev_testing';
$mysqli = new mysqli($host, $user, $password, $database);
$username = $_GET['username'];
$username = trim(htmlspecialchars($username));
$like = '%' . strtolower($... |
21,144,023 | I'm having some troubles with my code, I want it to execute the php file whenever I enter something but it isn't working
```
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
... | 2014/01/15 | [
"https://Stackoverflow.com/questions/21144023",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3187651/"
] | You are missing `{`. Just do:
```
function xyx(name) {
$.post("search.php", { name: value }, function(data) {
$("#results").html(data);
});
}
``` | There's something that is missing in your code:
```
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> //ur getting the jquery via online
<script>
$(document).ready(function(){
$("#textBoxId").change(function() //triggers wh... |
21,144,023 | I'm having some troubles with my code, I want it to execute the php file whenever I enter something but it isn't working
```
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
... | 2014/01/15 | [
"https://Stackoverflow.com/questions/21144023",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3187651/"
] | You are missing `{`. Just do:
```
function xyx(name) {
$.post("search.php", { name: value }, function(data) {
$("#results").html(data);
});
}
``` | For more secure and creative back-end code, you can use this.
```
<?php
$host = 'localhost';
$user = 'root';
$password = '';
$database = 'dev_testing';
$mysqli = new mysqli($host, $user, $password, $database);
$username = $_GET['username'];
$username = trim(htmlspecialchars($username));
$like = '%' . strtolower($... |
36,822,370 | I'm having an issue with flexbox on IE11 and while I'm aware there's lots of known issue, I haven't been able to find a solution...
```
<div class="latest-posts">
<article class="post-grid">
<img src="http://lorempixel.com/image_output/cats-q-c-640-480-4.jpg" alt="" />
<div class="article-content">... | 2016/04/24 | [
"https://Stackoverflow.com/questions/36822370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2902414/"
] | I had a similar bug in IE11.
The styles were taken from Bootstrap 4.1, so for the fluid images I had:
```
.img-fluid {
border: none;
height: auto;
max-width: 100%;
}
```
In my case it appeared that the reason was in `max-width: 100%` so when I changed it to `width: 100%` the bug disappeared:
```
.img-fl... | I tried every solution here but nothing worked. The only thing I was using flexbox for was to vertically center an image shown when hovering another image. So I just used a more classic solution à la `top: 50%; transform: translateY(-50%)` and then it was ok. So essentially not using flexbox at all then.. #hateIE |
36,822,370 | I'm having an issue with flexbox on IE11 and while I'm aware there's lots of known issue, I haven't been able to find a solution...
```
<div class="latest-posts">
<article class="post-grid">
<img src="http://lorempixel.com/image_output/cats-q-c-640-480-4.jpg" alt="" />
<div class="article-content">... | 2016/04/24 | [
"https://Stackoverflow.com/questions/36822370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2902414/"
] | I had image stretch on the cross-axis (stretch in height, using flex-direction: row).
This Stack Overflow Q/A helped me solve it:
[Link here](https://stackoverflow.com/questions/37609642/why-does-flexbox-stretch-my-image/37610279)
I had to set the following CSS on my img:
```css
align-self: flex-start;
```
You mi... | in my case combination of "flex-shrink: 0" suggested by G-Cyr and "align-self: flex-begin" suggested by Rick Schoonbeek did the trick. I had a wrapper which was using flex box to center the image with a "justify-content: center;"
All was good in IE 11, Chrome, Safari except IE Edge was not able to display correctly. a... |
36,822,370 | I'm having an issue with flexbox on IE11 and while I'm aware there's lots of known issue, I haven't been able to find a solution...
```
<div class="latest-posts">
<article class="post-grid">
<img src="http://lorempixel.com/image_output/cats-q-c-640-480-4.jpg" alt="" />
<div class="article-content">... | 2016/04/24 | [
"https://Stackoverflow.com/questions/36822370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2902414/"
] | in my case combination of "flex-shrink: 0" suggested by G-Cyr and "align-self: flex-begin" suggested by Rick Schoonbeek did the trick. I had a wrapper which was using flex box to center the image with a "justify-content: center;"
All was good in IE 11, Chrome, Safari except IE Edge was not able to display correctly. a... | I tried every solution here but nothing worked. The only thing I was using flexbox for was to vertically center an image shown when hovering another image. So I just used a more classic solution à la `top: 50%; transform: translateY(-50%)` and then it was ok. So essentially not using flexbox at all then.. #hateIE |
36,822,370 | I'm having an issue with flexbox on IE11 and while I'm aware there's lots of known issue, I haven't been able to find a solution...
```
<div class="latest-posts">
<article class="post-grid">
<img src="http://lorempixel.com/image_output/cats-q-c-640-480-4.jpg" alt="" />
<div class="article-content">... | 2016/04/24 | [
"https://Stackoverflow.com/questions/36822370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2902414/"
] | to avoid this funny behavior, you may reset the `flex-shrink` property.
This looks like a bug, despite what Microsoft says:
>
> [<'flex-shrink'>](https://msdn.microsoft.com/en-us/library/dn254948(v=vs.85).aspx)
>
>
> Sets the flex shrink factor or negative flexibility for the flex item. The flex shrink factor dete... | in my case combination of "flex-shrink: 0" suggested by G-Cyr and "align-self: flex-begin" suggested by Rick Schoonbeek did the trick. I had a wrapper which was using flex box to center the image with a "justify-content: center;"
All was good in IE 11, Chrome, Safari except IE Edge was not able to display correctly. a... |
36,822,370 | I'm having an issue with flexbox on IE11 and while I'm aware there's lots of known issue, I haven't been able to find a solution...
```
<div class="latest-posts">
<article class="post-grid">
<img src="http://lorempixel.com/image_output/cats-q-c-640-480-4.jpg" alt="" />
<div class="article-content">... | 2016/04/24 | [
"https://Stackoverflow.com/questions/36822370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2902414/"
] | to avoid this funny behavior, you may reset the `flex-shrink` property.
This looks like a bug, despite what Microsoft says:
>
> [<'flex-shrink'>](https://msdn.microsoft.com/en-us/library/dn254948(v=vs.85).aspx)
>
>
> Sets the flex shrink factor or negative flexibility for the flex item. The flex shrink factor dete... | I had an issue with stretched product images in IE11, and I did some research and tried different things.
This was my code:
```
.productImage {
position: relative;
overflow: hidden;
img {
position: absolute;
display: block;
height: 100%;
object-fit: contain;
top: 0... |
36,822,370 | I'm having an issue with flexbox on IE11 and while I'm aware there's lots of known issue, I haven't been able to find a solution...
```
<div class="latest-posts">
<article class="post-grid">
<img src="http://lorempixel.com/image_output/cats-q-c-640-480-4.jpg" alt="" />
<div class="article-content">... | 2016/04/24 | [
"https://Stackoverflow.com/questions/36822370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2902414/"
] | in my case combination of "flex-shrink: 0" suggested by G-Cyr and "align-self: flex-begin" suggested by Rick Schoonbeek did the trick. I had a wrapper which was using flex box to center the image with a "justify-content: center;"
All was good in IE 11, Chrome, Safari except IE Edge was not able to display correctly. a... | I had an issue with stretched product images in IE11, and I did some research and tried different things.
This was my code:
```
.productImage {
position: relative;
overflow: hidden;
img {
position: absolute;
display: block;
height: 100%;
object-fit: contain;
top: 0... |
36,822,370 | I'm having an issue with flexbox on IE11 and while I'm aware there's lots of known issue, I haven't been able to find a solution...
```
<div class="latest-posts">
<article class="post-grid">
<img src="http://lorempixel.com/image_output/cats-q-c-640-480-4.jpg" alt="" />
<div class="article-content">... | 2016/04/24 | [
"https://Stackoverflow.com/questions/36822370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2902414/"
] | I had image stretch on the cross-axis (stretch in height, using flex-direction: row).
This Stack Overflow Q/A helped me solve it:
[Link here](https://stackoverflow.com/questions/37609642/why-does-flexbox-stretch-my-image/37610279)
I had to set the following CSS on my img:
```css
align-self: flex-start;
```
You mi... | I had a similar bug in IE11.
The styles were taken from Bootstrap 4.1, so for the fluid images I had:
```
.img-fluid {
border: none;
height: auto;
max-width: 100%;
}
```
In my case it appeared that the reason was in `max-width: 100%` so when I changed it to `width: 100%` the bug disappeared:
```
.img-fl... |
36,822,370 | I'm having an issue with flexbox on IE11 and while I'm aware there's lots of known issue, I haven't been able to find a solution...
```
<div class="latest-posts">
<article class="post-grid">
<img src="http://lorempixel.com/image_output/cats-q-c-640-480-4.jpg" alt="" />
<div class="article-content">... | 2016/04/24 | [
"https://Stackoverflow.com/questions/36822370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2902414/"
] | to avoid this funny behavior, you may reset the `flex-shrink` property.
This looks like a bug, despite what Microsoft says:
>
> [<'flex-shrink'>](https://msdn.microsoft.com/en-us/library/dn254948(v=vs.85).aspx)
>
>
> Sets the flex shrink factor or negative flexibility for the flex item. The flex shrink factor dete... | I tried every solution here but nothing worked. The only thing I was using flexbox for was to vertically center an image shown when hovering another image. So I just used a more classic solution à la `top: 50%; transform: translateY(-50%)` and then it was ok. So essentially not using flexbox at all then.. #hateIE |
36,822,370 | I'm having an issue with flexbox on IE11 and while I'm aware there's lots of known issue, I haven't been able to find a solution...
```
<div class="latest-posts">
<article class="post-grid">
<img src="http://lorempixel.com/image_output/cats-q-c-640-480-4.jpg" alt="" />
<div class="article-content">... | 2016/04/24 | [
"https://Stackoverflow.com/questions/36822370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2902414/"
] | I had image stretch on the cross-axis (stretch in height, using flex-direction: row).
This Stack Overflow Q/A helped me solve it:
[Link here](https://stackoverflow.com/questions/37609642/why-does-flexbox-stretch-my-image/37610279)
I had to set the following CSS on my img:
```css
align-self: flex-start;
```
You mi... | I had an issue with stretched product images in IE11, and I did some research and tried different things.
This was my code:
```
.productImage {
position: relative;
overflow: hidden;
img {
position: absolute;
display: block;
height: 100%;
object-fit: contain;
top: 0... |
36,822,370 | I'm having an issue with flexbox on IE11 and while I'm aware there's lots of known issue, I haven't been able to find a solution...
```
<div class="latest-posts">
<article class="post-grid">
<img src="http://lorempixel.com/image_output/cats-q-c-640-480-4.jpg" alt="" />
<div class="article-content">... | 2016/04/24 | [
"https://Stackoverflow.com/questions/36822370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2902414/"
] | I had a similar bug in IE11.
The styles were taken from Bootstrap 4.1, so for the fluid images I had:
```
.img-fluid {
border: none;
height: auto;
max-width: 100%;
}
```
In my case it appeared that the reason was in `max-width: 100%` so when I changed it to `width: 100%` the bug disappeared:
```
.img-fl... | I had an issue with stretched product images in IE11, and I did some research and tried different things.
This was my code:
```
.productImage {
position: relative;
overflow: hidden;
img {
position: absolute;
display: block;
height: 100%;
object-fit: contain;
top: 0... |
6,437 | The title of the character Shadow the Hedgehog is *The Ultimate Lifeform*. As for a translation of this, I *ultimately* decided upon "Ens Ultimatus." But, should "ens" be masculine or neuter? It seems to describe a particular masculine being, but perhaps it should be neuter to describe him as compared to other organism... | 2018/05/08 | [
"https://latin.stackexchange.com/questions/6437",
"https://latin.stackexchange.com",
"https://latin.stackexchange.com/users/1224/"
] | *Ens ut nomen* and *ens ut participium* are found in medieval works, used in both metaphysical and descriptive senses: "existence or reality thought of as things" as opposed to "existence or reality thought of as action/process".
But, as an attempt at classical Latin, your version looks completely wrong to me.
In clas... | Welcome back!
The word *ens* is a present participle of *esse*.
That tells what the word means ("being", "something that is", "thing") and how it's declined.
The declension is that of a participle: all genders look alike in singular nominative, so *ens* could be any gender.
Both genders are grammatical.
The question ... |
27,347,697 | I've got the following tree:
```
{:start_date "2014-12-07"
:data {
:people [
{:id 1
:projects [{:id 1} {:id 2}]}
{:id 2
:projects [{:id 1} {:id 3}]}
]
}
}
```
I want to update the `people` and `projects` subtrees by adding a `:name` key-value pair.
Assuming I have these maps to ... | 2014/12/07 | [
"https://Stackoverflow.com/questions/27347697",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/155175/"
] | The Neo4j gem doesn't have a seed command. The command you're trying to use is provided by ActiveRecord. We'd love to add this functionality in, though, and if you'd like to help, we'd gladly accept a PR and/or contribute to the process. For now, open up an issue at <https://github.com/neo4jrb/neo4j/issues> and we can ... | Check apps root directory, is there a Rakefile?
Make a file with name "Rakefile" and enter these line
>
> "#!/usr/bin/env rake
>
> require File.expand\_path('../config/application', **FILE**)
>
> APP\_NAME::Application.load\_tasks
>
>
> |
27,347,697 | I've got the following tree:
```
{:start_date "2014-12-07"
:data {
:people [
{:id 1
:projects [{:id 1} {:id 2}]}
{:id 2
:projects [{:id 1} {:id 3}]}
]
}
}
```
I want to update the `people` and `projects` subtrees by adding a `:name` key-value pair.
Assuming I have these maps to ... | 2014/12/07 | [
"https://Stackoverflow.com/questions/27347697",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/155175/"
] | Finally got the solutions.
Create a file **seed.rake** under **lib/tasks** and put the code
```
namespace :db do
desc 'Load the seed data from db/seeds.rb'
task :seed => :environment do
seed_file = File.join(Rails.root, 'db', 'seeds.rb')
load(seed_file) if File.exist?(seed_file)
end
end
``` | Check apps root directory, is there a Rakefile?
Make a file with name "Rakefile" and enter these line
>
> "#!/usr/bin/env rake
>
> require File.expand\_path('../config/application', **FILE**)
>
> APP\_NAME::Application.load\_tasks
>
>
> |
27,347,697 | I've got the following tree:
```
{:start_date "2014-12-07"
:data {
:people [
{:id 1
:projects [{:id 1} {:id 2}]}
{:id 2
:projects [{:id 1} {:id 3}]}
]
}
}
```
I want to update the `people` and `projects` subtrees by adding a `:name` key-value pair.
Assuming I have these maps to ... | 2014/12/07 | [
"https://Stackoverflow.com/questions/27347697",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/155175/"
] | The Neo4j gem doesn't have a seed command. The command you're trying to use is provided by ActiveRecord. We'd love to add this functionality in, though, and if you'd like to help, we'd gladly accept a PR and/or contribute to the process. For now, open up an issue at <https://github.com/neo4jrb/neo4j/issues> and we can ... | As others mentioned before, `rails db:seed` is a built-in feature backed by `ActiveRecord`. Assuming you are using neo4jrb without `ActiveRecord`, you won't be able to use this command to seed database any more.
However, you can use [seedbank](https://github.com/james2m/seedbank) gem to recover this ability.
It does... |
27,347,697 | I've got the following tree:
```
{:start_date "2014-12-07"
:data {
:people [
{:id 1
:projects [{:id 1} {:id 2}]}
{:id 2
:projects [{:id 1} {:id 3}]}
]
}
}
```
I want to update the `people` and `projects` subtrees by adding a `:name` key-value pair.
Assuming I have these maps to ... | 2014/12/07 | [
"https://Stackoverflow.com/questions/27347697",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/155175/"
] | Finally got the solutions.
Create a file **seed.rake** under **lib/tasks** and put the code
```
namespace :db do
desc 'Load the seed data from db/seeds.rb'
task :seed => :environment do
seed_file = File.join(Rails.root, 'db', 'seeds.rb')
load(seed_file) if File.exist?(seed_file)
end
end
``` | As others mentioned before, `rails db:seed` is a built-in feature backed by `ActiveRecord`. Assuming you are using neo4jrb without `ActiveRecord`, you won't be able to use this command to seed database any more.
However, you can use [seedbank](https://github.com/james2m/seedbank) gem to recover this ability.
It does... |
5,168,945 | I am using Ajax Comboboxes in my application. The controls are re-created dynamically on page\_load after postback.
I keep receiving this error when selecting an item from the ajax combobox when I run the application.
>
> Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: Script c... | 2011/03/02 | [
"https://Stackoverflow.com/questions/5168945",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/904173/"
] | I found out if you are storing AJAX controls in Session or Cache and trying to recreate them on Page\_Load you will get the Script control error. FYI, storing Standard asp.net controls in session and recreating works fine.
Here are some links to help better understand the issues.
[Link 1] <http://forums.asp.net/t/1649... | Try Page\_PreRender method instead of overriding OnPreRender method |
34,927,296 | My CSS in my Chrome Extension is not loading for some reason. I did everything the browser told me to do, fix this, fix that, done that, but still not working.
```
{
"manifest_version": 2,
"name": "Emoticons",
"description": "A collection of emoticons for Social Media, directly accessible in your browser!",
"... | 2016/01/21 | [
"https://Stackoverflow.com/questions/34927296",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5773853/"
] | Are you sure it doesn't load *where the [match pattern](https://developer.chrome.com/extensions/match_patterns) you specified actually should work*?
Your match pattern, `"http://*/"` matches, say, `http://example.com/`, but not `http://example.com/some/path` or `https://example.com/`.
A match patter to catch "any htt... | Probably problem in *match pattern*, see **@Xan** answer for that case...
In case if **js** loaded and css not follow suggestions below...
Might be situation that your css is loading but not applied.
Try to add `!important` to each css rule.
Another option is to inject the CSS via a content script, to do it add cod... |
69,998,380 | I have a pandas dataframe that I want to transform some columns and assign back the transformation into the existing dtaframe:
```
df.loc[:,df.columns != 'target'].pct_change(-1)
```
If I do:
```
df.loc[:,df.columns != 'target'] = df.loc[:,df.columns != 'target'].pct_change(-1)
```
I get a warning:
```
A value i... | 2021/11/17 | [
"https://Stackoverflow.com/questions/69998380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8176763/"
] | You can do `update`
```
df.update(df.loc[:,df.columns != 'target'].pct_change(-1))
``` | Filter out columns that have word target in them using df.filter
```
df[df.filter(regex='[^target]').columns]=df.loc[:,df.filter(regex='[^target]').columns].pct_change(-1)
``` |
69,998,380 | I have a pandas dataframe that I want to transform some columns and assign back the transformation into the existing dtaframe:
```
df.loc[:,df.columns != 'target'].pct_change(-1)
```
If I do:
```
df.loc[:,df.columns != 'target'] = df.loc[:,df.columns != 'target'].pct_change(-1)
```
I get a warning:
```
A value i... | 2021/11/17 | [
"https://Stackoverflow.com/questions/69998380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8176763/"
] | You can do `update`
```
df.update(df.loc[:,df.columns != 'target'].pct_change(-1))
``` | After some research I think I found the best way to do this:
`df.loc[:,df.columns != 'target'] = df[df.columns[:-1]].pct_change(-1).to_numpy()`
According to pandas <https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#basics> the best way to apply a transform in place to a subset of columns is by usi... |
69,998,380 | I have a pandas dataframe that I want to transform some columns and assign back the transformation into the existing dtaframe:
```
df.loc[:,df.columns != 'target'].pct_change(-1)
```
If I do:
```
df.loc[:,df.columns != 'target'] = df.loc[:,df.columns != 'target'].pct_change(-1)
```
I get a warning:
```
A value i... | 2021/11/17 | [
"https://Stackoverflow.com/questions/69998380",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8176763/"
] | Filter out columns that have word target in them using df.filter
```
df[df.filter(regex='[^target]').columns]=df.loc[:,df.filter(regex='[^target]').columns].pct_change(-1)
``` | After some research I think I found the best way to do this:
`df.loc[:,df.columns != 'target'] = df[df.columns[:-1]].pct_change(-1).to_numpy()`
According to pandas <https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#basics> the best way to apply a transform in place to a subset of columns is by usi... |
38,864,930 | I have a simple rails project that I've been playing around in with reactjs. To add some basic navigation, I brought the js-routes library in and it works great for urls that have a path parameter such as "localhost:3000/addresses/1".
The problem I am facing is I am trying to call a "new" resource method and it adds ... | 2016/08/10 | [
"https://Stackoverflow.com/questions/38864930",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3934687/"
] | Your **[`update`](https://docs.mongodb.com/manual/reference/method/db.collection.update/#db.collection.update)** statement is incorrect, it has misplaced arguments - you are putting multiple **[`$set`](https://docs.mongodb.com/manual/reference/operator/update/set/#up._S_set)** operations and options as different parame... | replace {upsert:true} -> {upsert:true,strict: false} |
45,366,687 | **.NET Framework Ver = 4.6.2
, Database = SQL Server 2016**
**App Type = Windows Service**
We are working on the "Always Encrypted" feature in the SQL 2016 db to perform the encryption on certain customer data columns. Our web application is built in the ASP.NET MVC architecture and is working fine with this new feat... | 2017/07/28 | [
"https://Stackoverflow.com/questions/45366687",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/86023/"
] | Always Encrypted functionality requires for the user that wants to access the database to have both public AND private key.
From the message `Keyset does not exist` I assume you have imported keys only partially or just one part of the set.
**Edit**
Do you have access to these items?
`%ALLUSERSPROFILE%\Microsoft\... | I was also facing this issue and resolved when changed user access level of account to Administrator. However running process as administrator can be a security issue, |
45,366,687 | **.NET Framework Ver = 4.6.2
, Database = SQL Server 2016**
**App Type = Windows Service**
We are working on the "Always Encrypted" feature in the SQL 2016 db to perform the encryption on certain customer data columns. Our web application is built in the ASP.NET MVC architecture and is working fine with this new feat... | 2017/07/28 | [
"https://Stackoverflow.com/questions/45366687",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/86023/"
] | Always Encrypted functionality requires for the user that wants to access the database to have both public AND private key.
From the message `Keyset does not exist` I assume you have imported keys only partially or just one part of the set.
**Edit**
Do you have access to these items?
`%ALLUSERSPROFILE%\Microsoft\... | Run MMC console and add **Local Machine** Certificate Snap-In
Search for Always Encrypted Certificate in Personal Folder, open the context menu and click Manage Private Keys.
Add the user who uses that certificate on Your DB and give him full control of that key.
[ using reflection in java?
I have something like the example below and am wondering how to find the size of the collection while I'm using reflection.
**edit:**
```
Class<?> clazz = node.getClass();
Field [] fields = clazz.getDeclaredFields();
for(Fiel... | 2012/06/20 | [
"https://Stackoverflow.com/questions/11128544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1470502/"
] | Assuming `node` is the collection instance.
```
int size;
try {
size = (Integer) node.getClass().getMethod("size").invoke(node);
} catch (Exception e) {
e.printStackTrace();
}
```
Doesn't make much sense to do this via reflection when you just can call `node.size()`, though. | I am not sure what you mean by using reflection. All classes that implement the `java.util.Collection` interface have the `size()` method that gives you the size of the collection. |
11,128,544 | How do you find the size of a Collection (ie a `Set` or `List`) using reflection in java?
I have something like the example below and am wondering how to find the size of the collection while I'm using reflection.
**edit:**
```
Class<?> clazz = node.getClass();
Field [] fields = clazz.getDeclaredFields();
for(Fiel... | 2012/06/20 | [
"https://Stackoverflow.com/questions/11128544",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1470502/"
] | Assuming `node` is the collection instance.
```
int size;
try {
size = (Integer) node.getClass().getMethod("size").invoke(node);
} catch (Exception e) {
e.printStackTrace();
}
```
Doesn't make much sense to do this via reflection when you just can call `node.size()`, though. | The Scenario would be implementing a generic class that gives you a brief summary of the fields for an object and for the collection instance, you just want to spit out the size.
I personally needed this to compare certain fields on two objects (o1 and o2) of the same type. I wanted to know if the collection instances... |
16,808,121 | Suppose I have something like
```
Expression<Func<SomeType, DateTime>> left = x => x.SomeDateProperty;
Expression<Func<SomeType, DateTime>> right = x => dateTimeConstant;
var binaryExpression = Expression.GreaterThan(left, right);
Expression<Func<SomeType, bool>> predicate =
x => x.SomeDateP... | 2013/05/29 | [
"https://Stackoverflow.com/questions/16808121",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/257771/"
] | 1 and 2: You need to build the expression tree manually to do this, the compiler cannot help because it only constructs ready-made expressions that represent functions *in their entirety*. That's not useful when you want to build functions piece by piece.
Here's one straightforward way to build the expression you want... | When you use `GreaterThan`, you need to specify the expression *bodies*, not the lambda itself. Unfortunately, there is a complication: the `x` in the two expressions *is not the same*.
In this **particular** case, you could just about get away with this, because the second expression *does not use `x`*
So; your "1" ... |
4,994,889 | I want to delete a record which contains `%` sign, for example:
>
> white%House, Den%mark, bengali%20Tiger, White%202.
>
>
>
I have this query but it doesn't work for me.
```
delete from nail where name like '%[%]%'
```
I am using C# and Access. | 2011/02/14 | [
"https://Stackoverflow.com/questions/4994889",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/589118/"
] | I think there is some confusion going on, so here is a complete code example that works for me:
```
using ( var conn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\users\john\desktop\Database11.accdb;Persist Security Info=False;"))
{
conn.Open();
OleDbCommand cmd =
new Ole... | try:
```
delete from nail where name like '%[[%]%'
``` |
4,994,889 | I want to delete a record which contains `%` sign, for example:
>
> white%House, Den%mark, bengali%20Tiger, White%202.
>
>
>
I have this query but it doesn't work for me.
```
delete from nail where name like '%[%]%'
```
I am using C# and Access. | 2011/02/14 | [
"https://Stackoverflow.com/questions/4994889",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/589118/"
] | I think there is some confusion going on, so here is a complete code example that works for me:
```
using ( var conn = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\users\john\desktop\Database11.accdb;Persist Security Info=False;"))
{
conn.Open();
OleDbCommand cmd =
new Ole... | For completeness sake:
Within MS Access running in its default SQL mode (ANSI 89), you would use:
```
Like "*%*"
```
Likewise, if you're using DAO to execute the SQL, you'd use that.
You only run into problems here when running in ANSI 92 mode, which is available within Access only if you have ANSI 92 turned on,... |
4,994,889 | I want to delete a record which contains `%` sign, for example:
>
> white%House, Den%mark, bengali%20Tiger, White%202.
>
>
>
I have this query but it doesn't work for me.
```
delete from nail where name like '%[%]%'
```
I am using C# and Access. | 2011/02/14 | [
"https://Stackoverflow.com/questions/4994889",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/589118/"
] | You can use `InStr()` to find if the name contains %
```
where InStr(name, '%') > 0
``` | try:
```
delete from nail where name like '%[[%]%'
``` |
4,994,889 | I want to delete a record which contains `%` sign, for example:
>
> white%House, Den%mark, bengali%20Tiger, White%202.
>
>
>
I have this query but it doesn't work for me.
```
delete from nail where name like '%[%]%'
```
I am using C# and Access. | 2011/02/14 | [
"https://Stackoverflow.com/questions/4994889",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/589118/"
] | You can use `InStr()` to find if the name contains %
```
where InStr(name, '%') > 0
``` | For completeness sake:
Within MS Access running in its default SQL mode (ANSI 89), you would use:
```
Like "*%*"
```
Likewise, if you're using DAO to execute the SQL, you'd use that.
You only run into problems here when running in ANSI 92 mode, which is available within Access only if you have ANSI 92 turned on,... |
4,994,889 | I want to delete a record which contains `%` sign, for example:
>
> white%House, Den%mark, bengali%20Tiger, White%202.
>
>
>
I have this query but it doesn't work for me.
```
delete from nail where name like '%[%]%'
```
I am using C# and Access. | 2011/02/14 | [
"https://Stackoverflow.com/questions/4994889",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/589118/"
] | The following worked for me native in MS Access
```
DELETE foo.foo1
FROM foo
WHERE (((foo.foo1) ALike "%[%]%"));
```
Maybe it's the double quotes instead of the apostrophes.
Perhaps in C# you need to do something like
```
bar = "DELETE foo.foo1 FROM foo WHERE (((foo.foo1) ALike \"%[%]%\"));";
``` | try:
```
delete from nail where name like '%[[%]%'
``` |
4,994,889 | I want to delete a record which contains `%` sign, for example:
>
> white%House, Den%mark, bengali%20Tiger, White%202.
>
>
>
I have this query but it doesn't work for me.
```
delete from nail where name like '%[%]%'
```
I am using C# and Access. | 2011/02/14 | [
"https://Stackoverflow.com/questions/4994889",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/589118/"
] | The following worked for me native in MS Access
```
DELETE foo.foo1
FROM foo
WHERE (((foo.foo1) ALike "%[%]%"));
```
Maybe it's the double quotes instead of the apostrophes.
Perhaps in C# you need to do something like
```
bar = "DELETE foo.foo1 FROM foo WHERE (((foo.foo1) ALike \"%[%]%\"));";
``` | For completeness sake:
Within MS Access running in its default SQL mode (ANSI 89), you would use:
```
Like "*%*"
```
Likewise, if you're using DAO to execute the SQL, you'd use that.
You only run into problems here when running in ANSI 92 mode, which is available within Access only if you have ANSI 92 turned on,... |
56,602,997 | I want to create a groups functionality for my app, so far when i set up the profile page of each user, i've used something like this :
```
DocumentReference documentReference =
_firestore.collection("users").document("$email");
await documentReference.get().then((DocumentSnapshot datasna... | 2019/06/14 | [
"https://Stackoverflow.com/questions/56602997",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11591300/"
] | The technical difference is that `get` only gets the document once, while the stream will get the current data straight away, and then continue to listen for changes.
I typically use a stream (or its underlying `onSnapshot()`) when I display the data straight into the UI, because that means the UI updates whenever the... | It all really comes down to whether you want the data to reload every time something changes in your database.
* If you want it to update as it changes in your database, **use a Stream (most likely with a StreamBuilder)**
* If you want it only to update when you reload the screen, **use get() like you are in your exam... |
2,951,630 | Why does a differential factor appear when going from discrete summation to continuous summation, what is the meaning of the differential factor that appears in the integral? i know its meaning from the point of view that a integral is the area under a curve, but if we are summing a bunch of numbers, why are we multipl... | 2018/10/11 | [
"https://math.stackexchange.com/questions/2951630",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/591478/"
] | I don't know how the notation $"\int \dots\,dx"$ came into use, although it makes some sense and fits well with [Leibniz's notation](https://en.wikipedia.org/wiki/Leibniz%27s_notation) for the derivative $"\frac{d\cdot}{dx}"$.
By your question, I assume you're talking about [Riemann integrals](https://en.wikipedia.org... | If you sum a finite "bunch" of numbers well, you are just doing a sum.
The problem comes when the bunch is infinite. Then you have a series. And you know under which conditions the series can result in a finite number: first terms can be finite, but those in the tail shall become smaller and smaller. We started and k... |
32,215,987 | I cannot figure out from [documentation](http://boto3.readthedocs.org/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances) and source code how to define size of the root device.
You can specify N additional block devices using BlockDeviceMappings section where you can declare their sizes. But th... | 2015/08/26 | [
"https://Stackoverflow.com/questions/32215987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/306488/"
] | Ran into this issue myself today, probably to late for the original poster, but in case anyone else stumbles across this question later I did the following:
```
import boto3
ec2 = boto3.resource('ec2',
region_name='eu-west-1',
aws_access_key_id='my-key',
a... | See [Stackoverflow: How to launch EC2 instance with Boto, specifying size of EBS?](https://stackoverflow.com/questions/13585857/how-to-launch-ec2-instance-with-boto-specifying-size-of-ebs)
Also, here's a way to do it from the [AWS Command-Line Interface (CLI)](http://aws.amazon.com/cli/):
```
aws ec2 run-instances --... |
32,215,987 | I cannot figure out from [documentation](http://boto3.readthedocs.org/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances) and source code how to define size of the root device.
You can specify N additional block devices using BlockDeviceMappings section where you can declare their sizes. But th... | 2015/08/26 | [
"https://Stackoverflow.com/questions/32215987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/306488/"
] | Same as Steve Jeffereies has mentioned, naming the DeviceName is the key. I was able to use /dev/sda1 which you would usually see on AWS console. The following is a working example using magnetic,
```
BlockDeviceMappings=[
{
'DeviceName': '/dev/sda1',
'Ebs': {
'VolumeSize': 30,
... | See [Stackoverflow: How to launch EC2 instance with Boto, specifying size of EBS?](https://stackoverflow.com/questions/13585857/how-to-launch-ec2-instance-with-boto-specifying-size-of-ebs)
Also, here's a way to do it from the [AWS Command-Line Interface (CLI)](http://aws.amazon.com/cli/):
```
aws ec2 run-instances --... |
32,215,987 | I cannot figure out from [documentation](http://boto3.readthedocs.org/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances) and source code how to define size of the root device.
You can specify N additional block devices using BlockDeviceMappings section where you can declare their sizes. But th... | 2015/08/26 | [
"https://Stackoverflow.com/questions/32215987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/306488/"
] | Follow is minimal required fields that have to be set the size of the root device:
```
import boto3
ec2_resource = boto3.resource('ec2')
reservations = ec2_resource.create_instances(
ImageId= "ami-xyz",
MinCount=1,
MaxCount=1,
InstanceType='xyz',
KeyName='key-pair',
... | See [Stackoverflow: How to launch EC2 instance with Boto, specifying size of EBS?](https://stackoverflow.com/questions/13585857/how-to-launch-ec2-instance-with-boto-specifying-size-of-ebs)
Also, here's a way to do it from the [AWS Command-Line Interface (CLI)](http://aws.amazon.com/cli/):
```
aws ec2 run-instances --... |
32,215,987 | I cannot figure out from [documentation](http://boto3.readthedocs.org/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances) and source code how to define size of the root device.
You can specify N additional block devices using BlockDeviceMappings section where you can declare their sizes. But th... | 2015/08/26 | [
"https://Stackoverflow.com/questions/32215987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/306488/"
] | Ran into this issue myself today, probably to late for the original poster, but in case anyone else stumbles across this question later I did the following:
```
import boto3
ec2 = boto3.resource('ec2',
region_name='eu-west-1',
aws_access_key_id='my-key',
a... | Same as Steve Jeffereies has mentioned, naming the DeviceName is the key. I was able to use /dev/sda1 which you would usually see on AWS console. The following is a working example using magnetic,
```
BlockDeviceMappings=[
{
'DeviceName': '/dev/sda1',
'Ebs': {
'VolumeSize': 30,
... |
32,215,987 | I cannot figure out from [documentation](http://boto3.readthedocs.org/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances) and source code how to define size of the root device.
You can specify N additional block devices using BlockDeviceMappings section where you can declare their sizes. But th... | 2015/08/26 | [
"https://Stackoverflow.com/questions/32215987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/306488/"
] | Ran into this issue myself today, probably to late for the original poster, but in case anyone else stumbles across this question later I did the following:
```
import boto3
ec2 = boto3.resource('ec2',
region_name='eu-west-1',
aws_access_key_id='my-key',
a... | Follow is minimal required fields that have to be set the size of the root device:
```
import boto3
ec2_resource = boto3.resource('ec2')
reservations = ec2_resource.create_instances(
ImageId= "ami-xyz",
MinCount=1,
MaxCount=1,
InstanceType='xyz',
KeyName='key-pair',
... |
32,215,987 | I cannot figure out from [documentation](http://boto3.readthedocs.org/en/latest/reference/services/ec2.html#EC2.ServiceResource.create_instances) and source code how to define size of the root device.
You can specify N additional block devices using BlockDeviceMappings section where you can declare their sizes. But th... | 2015/08/26 | [
"https://Stackoverflow.com/questions/32215987",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/306488/"
] | Same as Steve Jeffereies has mentioned, naming the DeviceName is the key. I was able to use /dev/sda1 which you would usually see on AWS console. The following is a working example using magnetic,
```
BlockDeviceMappings=[
{
'DeviceName': '/dev/sda1',
'Ebs': {
'VolumeSize': 30,
... | Follow is minimal required fields that have to be set the size of the root device:
```
import boto3
ec2_resource = boto3.resource('ec2')
reservations = ec2_resource.create_instances(
ImageId= "ami-xyz",
MinCount=1,
MaxCount=1,
InstanceType='xyz',
KeyName='key-pair',
... |
12,127,612 | I am populating a DDL with another DDL and i am getting the value from another page
```
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.DataSource = ProfileMasterDAL.bindcountry();
DropDownList1.DataBind();
DropDownList1.... | 2012/08/26 | [
"https://Stackoverflow.com/questions/12127612",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1565806/"
] | make sure all the variables all set correctly, especially `PATH` and `GEM_PATH`, you can use this code to set the environment for you:
```
source /usr/local/rvm/environments/ruby-1.9.3-p194
```
add it in the service before `chef-solr` is run | My problem was similar, and so was my answer:
My problem was
```
Permission denied - /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper
```
ruby\_noexec\_wrapper was in `ruby-1.9.3-p194@global` not in the listed path
My solution was
```
source /usr/local/rvm/environments/ruby-1.9.3-p194@global
```
I up... |
12,127,612 | I am populating a DDL with another DDL and i am getting the value from another page
```
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.DataSource = ProfileMasterDAL.bindcountry();
DropDownList1.DataBind();
DropDownList1.... | 2012/08/26 | [
"https://Stackoverflow.com/questions/12127612",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1565806/"
] | make sure all the variables all set correctly, especially `PATH` and `GEM_PATH`, you can use this code to set the environment for you:
```
source /usr/local/rvm/environments/ruby-1.9.3-p194
```
add it in the service before `chef-solr` is run | Answer not related to chef, but may help in future.
I had a similar issue, but since I was following a tutorial to setup thin in RVM. I fixed by using wrapper generated by RVM for thin service
```
/home/thin/.rvm/bin/bootup_thin
```
therefore changed line in init script
```
DAEMON=/home/thin/.rvm/gems/ree-1.8.7-20... |
12,127,612 | I am populating a DDL with another DDL and i am getting the value from another page
```
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.DataSource = ProfileMasterDAL.bindcountry();
DropDownList1.DataBind();
DropDownList1.... | 2012/08/26 | [
"https://Stackoverflow.com/questions/12127612",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1565806/"
] | make sure all the variables all set correctly, especially `PATH` and `GEM_PATH`, you can use this code to set the environment for you:
```
source /usr/local/rvm/environments/ruby-1.9.3-p194
```
add it in the service before `chef-solr` is run | I try all these answers, all failed. But I found another way to solve this problem, could be helpful:
```
gem install rubygems-bundler
```
You can also find answer from [noexec library](https://github.com/mpapis/rubygems-bundler) |
12,127,612 | I am populating a DDL with another DDL and i am getting the value from another page
```
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.DataSource = ProfileMasterDAL.bindcountry();
DropDownList1.DataBind();
DropDownList1.... | 2012/08/26 | [
"https://Stackoverflow.com/questions/12127612",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1565806/"
] | make sure all the variables all set correctly, especially `PATH` and `GEM_PATH`, you can use this code to set the environment for you:
```
source /usr/local/rvm/environments/ruby-1.9.3-p194
```
add it in the service before `chef-solr` is run | I got this problem after installing ruby 2.0 on my mac. Part of that was I installed the latest rvm
```
rvm get stable
```
Then I started getting this error. Maybe I ran some 'gemset pristine's after this.
In any event, for me, this worked. WARNING! If you proceed as I have done, your gemsets for the ruby in quest... |
12,127,612 | I am populating a DDL with another DDL and i am getting the value from another page
```
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.DataSource = ProfileMasterDAL.bindcountry();
DropDownList1.DataBind();
DropDownList1.... | 2012/08/26 | [
"https://Stackoverflow.com/questions/12127612",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1565806/"
] | My problem was similar, and so was my answer:
My problem was
```
Permission denied - /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper
```
ruby\_noexec\_wrapper was in `ruby-1.9.3-p194@global` not in the listed path
My solution was
```
source /usr/local/rvm/environments/ruby-1.9.3-p194@global
```
I up... | Answer not related to chef, but may help in future.
I had a similar issue, but since I was following a tutorial to setup thin in RVM. I fixed by using wrapper generated by RVM for thin service
```
/home/thin/.rvm/bin/bootup_thin
```
therefore changed line in init script
```
DAEMON=/home/thin/.rvm/gems/ree-1.8.7-20... |
12,127,612 | I am populating a DDL with another DDL and i am getting the value from another page
```
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.DataSource = ProfileMasterDAL.bindcountry();
DropDownList1.DataBind();
DropDownList1.... | 2012/08/26 | [
"https://Stackoverflow.com/questions/12127612",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1565806/"
] | My problem was similar, and so was my answer:
My problem was
```
Permission denied - /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper
```
ruby\_noexec\_wrapper was in `ruby-1.9.3-p194@global` not in the listed path
My solution was
```
source /usr/local/rvm/environments/ruby-1.9.3-p194@global
```
I up... | I try all these answers, all failed. But I found another way to solve this problem, could be helpful:
```
gem install rubygems-bundler
```
You can also find answer from [noexec library](https://github.com/mpapis/rubygems-bundler) |
12,127,612 | I am populating a DDL with another DDL and i am getting the value from another page
```
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.DataSource = ProfileMasterDAL.bindcountry();
DropDownList1.DataBind();
DropDownList1.... | 2012/08/26 | [
"https://Stackoverflow.com/questions/12127612",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1565806/"
] | My problem was similar, and so was my answer:
My problem was
```
Permission denied - /usr/local/rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper
```
ruby\_noexec\_wrapper was in `ruby-1.9.3-p194@global` not in the listed path
My solution was
```
source /usr/local/rvm/environments/ruby-1.9.3-p194@global
```
I up... | I got this problem after installing ruby 2.0 on my mac. Part of that was I installed the latest rvm
```
rvm get stable
```
Then I started getting this error. Maybe I ran some 'gemset pristine's after this.
In any event, for me, this worked. WARNING! If you proceed as I have done, your gemsets for the ruby in quest... |
12,127,612 | I am populating a DDL with another DDL and i am getting the value from another page
```
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.DataSource = ProfileMasterDAL.bindcountry();
DropDownList1.DataBind();
DropDownList1.... | 2012/08/26 | [
"https://Stackoverflow.com/questions/12127612",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1565806/"
] | Answer not related to chef, but may help in future.
I had a similar issue, but since I was following a tutorial to setup thin in RVM. I fixed by using wrapper generated by RVM for thin service
```
/home/thin/.rvm/bin/bootup_thin
```
therefore changed line in init script
```
DAEMON=/home/thin/.rvm/gems/ree-1.8.7-20... | I try all these answers, all failed. But I found another way to solve this problem, could be helpful:
```
gem install rubygems-bundler
```
You can also find answer from [noexec library](https://github.com/mpapis/rubygems-bundler) |
12,127,612 | I am populating a DDL with another DDL and i am getting the value from another page
```
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
DropDownList1.DataSource = ProfileMasterDAL.bindcountry();
DropDownList1.DataBind();
DropDownList1.... | 2012/08/26 | [
"https://Stackoverflow.com/questions/12127612",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1565806/"
] | Answer not related to chef, but may help in future.
I had a similar issue, but since I was following a tutorial to setup thin in RVM. I fixed by using wrapper generated by RVM for thin service
```
/home/thin/.rvm/bin/bootup_thin
```
therefore changed line in init script
```
DAEMON=/home/thin/.rvm/gems/ree-1.8.7-20... | I got this problem after installing ruby 2.0 on my mac. Part of that was I installed the latest rvm
```
rvm get stable
```
Then I started getting this error. Maybe I ran some 'gemset pristine's after this.
In any event, for me, this worked. WARNING! If you proceed as I have done, your gemsets for the ruby in quest... |
3,094,007 | Anywhere I've looked, the definition of solution of equation is root(s) of that equation. But why does a textbook say that equation $y=7-3x$ has infinite number of solutions?
Thanks | 2019/01/30 | [
"https://math.stackexchange.com/questions/3094007",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/610112/"
] | Equations have solutions, but not roots. Polynomials have roots, but not solutions.
* The equation $y=7-3x$ has infinitely many solutions.
* The equation $0=7-3x$ has only one solution.
* The polynomial $7-3x$ has only one root, which is the solution of the equation $0=7-3x$. | Solutions are not the same as roots.
A **root** is a value of $x$ where $y = 0$ and your equation is satisfied. In your equation, the root is $x = 7/3$.
A **solution** in general is a pair of values $(x,y)$ that satisfy the equation. Examples of solutions to your equation include, but are not limited to, $(7,-14)$, $... |
3,094,007 | Anywhere I've looked, the definition of solution of equation is root(s) of that equation. But why does a textbook say that equation $y=7-3x$ has infinite number of solutions?
Thanks | 2019/01/30 | [
"https://math.stackexchange.com/questions/3094007",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/610112/"
] | Equations have solutions, but not roots. Polynomials have roots, but not solutions.
* The equation $y=7-3x$ has infinitely many solutions.
* The equation $0=7-3x$ has only one solution.
* The polynomial $7-3x$ has only one root, which is the solution of the equation $0=7-3x$. | This is because a root is just setting the y value equal to 0 and solving for x, whereas the equation itself is just saying "how many points are there such that y = 7 - 3x", not "how many points are there such that the y value is 0". For example, (2, 1) would be a solution to this equation, but not a root.
Hope this h... |
3,094,007 | Anywhere I've looked, the definition of solution of equation is root(s) of that equation. But why does a textbook say that equation $y=7-3x$ has infinite number of solutions?
Thanks | 2019/01/30 | [
"https://math.stackexchange.com/questions/3094007",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/610112/"
] | Solutions are not the same as roots.
A **root** is a value of $x$ where $y = 0$ and your equation is satisfied. In your equation, the root is $x = 7/3$.
A **solution** in general is a pair of values $(x,y)$ that satisfy the equation. Examples of solutions to your equation include, but are not limited to, $(7,-14)$, $... | This is because a root is just setting the y value equal to 0 and solving for x, whereas the equation itself is just saying "how many points are there such that y = 7 - 3x", not "how many points are there such that the y value is 0". For example, (2, 1) would be a solution to this equation, but not a root.
Hope this h... |
3,982,072 | My question is a little bit strange but I "need" to internal purpose update the $.ajax function.
In the original jQuery code, there is:
```
ajax: function( origSettings ) {
// Some code
function success() {
// If a local callback was specified, fire it and pass it the data
if ( s.success ) {
... | 2010/10/20 | [
"https://Stackoverflow.com/questions/3982072",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/466227/"
] | I don't know why you wouldn't want to use google to find the answer. But, the specific problem is probably due to the fact that Tomcat now has it's own Servlet class. So try removing the servlet-api.jar file from the lib directory. Or make sure the version of Tomcat you are using with Eclipse matches the server you are... | You can use [Provenance](https://github.com/armhold/Provenance) to figure out where random jar files come from, and easily get some XML to help you convert to a Maven (or Ivy) project structure.
Disclaimer: this is my project. |
3,982,072 | My question is a little bit strange but I "need" to internal purpose update the $.ajax function.
In the original jQuery code, there is:
```
ajax: function( origSettings ) {
// Some code
function success() {
// If a local callback was specified, fire it and pass it the data
if ( s.success ) {
... | 2010/10/20 | [
"https://Stackoverflow.com/questions/3982072",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/466227/"
] | You can list the directory of the jar on the command line with
```
jar tvf servlet-api.jar
```
(jar is in the bin directory of your jdk).
Odds are that this is the standard servlet api specification jar. The jar itself likely contains no implementation, rather jboss is relied on for that, but the project needed ecl... | You can use [Provenance](https://github.com/armhold/Provenance) to figure out where random jar files come from, and easily get some XML to help you convert to a Maven (or Ivy) project structure.
Disclaimer: this is my project. |
4,277,344 | Suppose I have a line $y=1$. All points with rational coordinate x that are on this line are in set $X$. If $x$ is irrational, then only open interval from $(x,0)$ up to $(x,1)$ is in set $X$.
Question: is set $X$ connected?
It's clear to me that between any two intervals there is a rational number $y$ which "disconn... | 2021/10/15 | [
"https://math.stackexchange.com/questions/4277344",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/782769/"
] | The description of your subset $X$ of $\Bbb{R}^2$ is not very clear. I think you mean the following:
$$
X = \{ (x, y) \in \Bbb{R}^2 \mid (x \in \Bbb{Q} \land y = 1) \lor (x \not\in \Bbb{Q} \land 0 < y < 1)\}
$$
I.e., $X$ comprises the points $p\_x = (x, 1)$ on the line $y = 1$ where $x$ is rational, together with each ... | *Abuse of notation: Interval from $(x,0)$ to $(x,1)$ where $x\in\mathbb{Q}$ is identified as $(0,x)$. Point $(1,y)$ where $y\in\mathbb{R}\setminus\mathbb{Q}$ is identified as $(y)$.*
Assume $X$ isn't connected. Then it can be represented as disjoint union of two open sets
$$X=U\sqcup V$$
Fix $y\in\mathbb{R}\setminus\m... |
4,602,427 | On his blog Scott Kovatch writes:
>
> Without getting into too much detail, typing ‘java MyAWTCode’ from a Terminal window violates a whole lot of assumptions about what an application is on Mac OS X, and needs a lot of cooperation between the AWT and the Process Manager to sort it out.
> <http://skovatch.wordpress.... | 2011/01/05 | [
"https://Stackoverflow.com/questions/4602427",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15441/"
] | Sure, I can elaborate on that a bit.
The Process Manager starts with the assumption that all applications that present a UI on Mac OS X are bundled, are packaged in a folder named Application.app, binary in Contents/MacOS/Application, and most importantly, have an Info.plist to get things like the name of the applicat... | I am not sure what he had in mind, but I guess a big difference is the file structure: a normal MacOS X application is a bundle with the structure NameOfTheApp.app/Contents/MacOS/NameOfTheApp , and specific files in the Contents directory. When we use the terminal with a "java" command, the JVM has to create a "virtual... |
5,198 | With the legalization of moonshine in many US states I've been wondering what are the big differences between Moonshine and Vodka?
Both are clear spirits made from whatever grains/starches are available. Both can be fairly high proof.
Is it all just an Appalachian that is tied to their origin? | 2016/07/13 | [
"https://beer.stackexchange.com/questions/5198",
"https://beer.stackexchange.com",
"https://beer.stackexchange.com/users/4637/"
] | >
> Moonshine is any alcohol that is made illegally. It is usually make in
> small batches
>
>
>
In most cases if you are able to buy 'Moonshine' from a store it is generally not real moonshine
I believe that it's called moonshine because it was illegal to make, so it was usually distributed at night time under... | Moonshine derives (supposedly) its name from transporting it at night to avoid detection.
Moonshine was made a lot in the mountains because of the inaccessibility of where the mountain-folk would hide the Stills and the abundance of fresh mountain springs. They could also make the moonshine high proof to maximize cost... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.