qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
216,432 | I have tried hard to look for a solution to my problems, but I can't manage to find it on this site or with Google. I have tried: `minipage`, `multicol`, `longtable`, `tabu`. I've read the documentation on `glossaries` and I can not make head or tails from it.
I've got a glossary, with linguistic gloss abbreviations i... | 2014/12/10 | [
"https://tex.stackexchange.com/questions/216432",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/10367/"
] | Here is a way of using `multicol` with `\parbox` commands to format the glossary. The `section=section` package option is used to prevent a page break before the glossary by altering the sectioning level from the default chapter to section (which doesn't start a new page).
```
\documentclass[openright,12pt,dutch]{repo... | I'll add an answer for leipzig 2.0 (which has just been added to CTAN, 2017-06-16). It's too late for your thesis, but might help someone else.
I have included a pre-defined multicolumn glossary style in this version of leipzig. After a lot of experimentation, I ultimately decided that any style based on a tabular for... |
871,546 | Instead of using the normal copy and paste function, is there a way to lookup data in an entire column (rather than an individual cell) in one spreadsheet and put it in another - minus the blank cells - so it's condensed? | 2015/01/30 | [
"https://superuser.com/questions/871546",
"https://superuser.com",
"https://superuser.com/users/413867/"
] | This is another way without macros or VBA:
1. Select the column
2. Go to Home -> Find & Select -> Go To Special
3. Choose Constants & OK
4. Now, only the cells with a value are selected.
5. Copy & Paste. It's done !!!! | This small macro will copy column **A** from *Sheet1* to column **A** of *Sheet2* omitting the blanks. Adjust the code for your own columns and sheet names:
```
Sub CopyNoBanks()
Dim sh1 As Worksheet, s2 As Worksheet, i As Long
Dim j As Long, N As Long, r1 As Range
Set sh1 = Sheets("Sheet1")
Set sh2 =... |
2,771,972 | I've got a TextBox in which user can input a their desired username.
Underneath I've got a checkbox that once clicked it copies the user's email adress into the textfield and then disable it to prevent further changes. This feature is implemented by using jQuery.
The problem is that I've got a RequiredFieldValidator o... | 2010/05/05 | [
"https://Stackoverflow.com/questions/2771972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/333262/"
] | Just for future reference: I fixed this by setting the property "readonly" instead of "disabled". | You could use a custom validator control like in this sample:
<http://asp.net-tutorials.com/validation/custom-validator/> |
7,667,756 | I am working on a client's site, and I'm writing an amortization schedule calculator in in ruby on rails. For longer loan term calculations, it doesn't seem to be breaking when the balance reaches 0
Here is my code:
```
def calculate_amortization_results
p = params[:price].to_i
i = params[:rate].to_d
l = ... | 2011/10/05 | [
"https://Stackoverflow.com/questions/7667756",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/434598/"
] | in Ruby the default for numerical values is Fixnum ... e.g.:
```
> 15 / 4
=> 3
```
You will see weird rounding errors if you try to use Fixnum values and divide them.
To make sure that you use Floats, at least one of the numbers in the calculation needs to be a Float
```
> 15.0 / 4
=> 3.75
> 15 / 4.0
=> 3.75 ... | I think it has something to do with the floating point operations precision. It has already been discussed here: [Ruby number precision with simple arithmetic](https://stackoverflow.com/questions/5419839/ruby-number-precision-with-simple-arithmetic) and it would be better to use decimal format for financial purposes.
... |
33,040,426 | I will give You two slices of code from the SQL script I'm currently working with, but they will suffice.
Firstly, I am declaring a variable:
```
FUNCTION Run
( i_PlafId IN INTEGER
)
RETURN INTEGER
IS
l_tables_excl VARCHAR2(256) := 'TABLE_1,TABLE_2';
```
Later I would like to use it in some place, like this:
```
... | 2015/10/09 | [
"https://Stackoverflow.com/questions/33040426",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4012392/"
] | The best way to deal with a list of values like this is to use an array:
```
create or replace type t_table_list as table of varchar2(50);
FUNCTION Run
( i_PlafId IN INTEGER
)
RETURN INTEGER
IS
l_tables_excl t_table_list := t_table_list('TABLE_1','TABLE_2');
...
AND cos.table_name NOT IN (select * from table(l_tabl... | **Option A - Use LIKE**
You can do a `LIKE` to see if the table name is in the string. Whether or not this works will depend on how similar your table names are.
```
/* Returns true if table name isn't a substring of l_tables.excl */
AND l_tables_excl NOT LIKE '%' || cos.table_name || '%'
```
**Option B - Split str... |
33,040,426 | I will give You two slices of code from the SQL script I'm currently working with, but they will suffice.
Firstly, I am declaring a variable:
```
FUNCTION Run
( i_PlafId IN INTEGER
)
RETURN INTEGER
IS
l_tables_excl VARCHAR2(256) := 'TABLE_1,TABLE_2';
```
Later I would like to use it in some place, like this:
```
... | 2015/10/09 | [
"https://Stackoverflow.com/questions/33040426",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4012392/"
] | The best way to deal with a list of values like this is to use an array:
```
create or replace type t_table_list as table of varchar2(50);
FUNCTION Run
( i_PlafId IN INTEGER
)
RETURN INTEGER
IS
l_tables_excl t_table_list := t_table_list('TABLE_1','TABLE_2');
...
AND cos.table_name NOT IN (select * from table(l_tabl... | You can use the REGEXP\_LIKE function to simulate the in clause:
```
WHERE NOT REGEXP_LIKE(l_tables_excl, '(^|,)'||cos.table_name||'(,|$)')
``` |
111,818 | I have a Thinkpad T61p with Quadro FX570M. I just installed the Ubuntu 11.10.
I have tried to download the driver LINUX DISPLAY DRIVER - X86 version 295.20 from NVIDIA, but I do not manage to install it. If I open System > Screens, there is an unknovn screen driver.
My installation works fine except, fails on resume w... | 2012/03/10 | [
"https://askubuntu.com/questions/111818",
"https://askubuntu.com",
"https://askubuntu.com/users/50001/"
] | You can install the latest drivers for NVidia doing this:
```
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nvidia-current nvidia-settings
```
if anything goes wrong, simply purge the ppa:
```
sudo apt-get install ppa-purge
sudo ppa-purge ppa:ubunt... | launch jockey-gtk by pressing `alt`+`f2` and then typing in `jockey-gtk`. It will list the drivers that apply for your hardware. Activate the Nvidia ones.
Otherwise, to install it from the Nvidia download, you would need to exit X-Server and run it there, which is more complicated and shouldn't be necessary. If you in... |
111,818 | I have a Thinkpad T61p with Quadro FX570M. I just installed the Ubuntu 11.10.
I have tried to download the driver LINUX DISPLAY DRIVER - X86 version 295.20 from NVIDIA, but I do not manage to install it. If I open System > Screens, there is an unknovn screen driver.
My installation works fine except, fails on resume w... | 2012/03/10 | [
"https://askubuntu.com/questions/111818",
"https://askubuntu.com",
"https://askubuntu.com/users/50001/"
] | You can install the latest drivers for NVidia doing this:
```
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install nvidia-current nvidia-settings
```
if anything goes wrong, simply purge the ppa:
```
sudo apt-get install ppa-purge
sudo ppa-purge ppa:ubunt... | I had similar issue with my ThinkPad t510 that had Intel display driver and Nvidia GT218 [NVS 3100M} driver. This is how I was able to switch default display driver to NVIDIA.
First clean-up any third-party NVIDIA drivers (in case you have them)
```
sudo apt-get purge xserver-xorg-video-nouveau
```
Then perform the... |
10,593,132 | iv created a program which works really well with MySQL. However, when I convert it to SQLlite, everything works such as Creating tables, getConnection() to the database and such EXCEPT inserting values to the table??
I am unable to insert value to the table using Java (Netbeans) to SQLite database. I can only insert ... | 2012/05/15 | [
"https://Stackoverflow.com/questions/10593132",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1394982/"
] | It's possible that the SQLite JDBC driver doesn't support the multi-insert syntax. This syntax is also not standard, though many databases do support it.
Another option for doing multiple inserts like this is to use the batching mechanism of PreparedStatement.
```
Connection conn = ....;
PreparedStatement stmt =
c... | Multi row insert is not standard according to the SQL92 standard.
SQLite suports it since version 3.7.11.
If you have a version under this one, you need to make one insert for each row... |
50,464,483 | Expected:
find the number files in the folder, and collect the absolute path for each file in the directory.
```
File certificatePath = new File("resources/NPL");
String absolutePath = certificatePath.getAbsolutePath();
File directory = new File(absolutePath);
int fileCount=directory.list().length;
```
From the a... | 2018/05/22 | [
"https://Stackoverflow.com/questions/50464483",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2257288/"
] | In HTML neither `CR`, `LF` nor `CRLF` matters really. That's why `<br />` tag exists and you need to use it instead or display your content in `<pre>` block or similar which is one of a few exceptions when `CR`/`LF` thing actually works as elsewhere. | file\_put\_contents($file, $someData . PUT THE BREAK HERE IN INVERTED COMMAS . PHP\_EOL, FILE\_APPEND);
It was as simple as that on Chrome. I think I might have (gulp) forgotten to upload a file when i was trying this earlier. |
13,885,783 | I couldn't find or come up with a generic and elegant algorithm that would let me populate the tree-like structure.
The simplest example is a blog archive: I have a bunch of records which can be selected and sorted by date.
I want to have a tree where years may be top level, months are next level and actual post titles... | 2012/12/14 | [
"https://Stackoverflow.com/questions/13885783",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/26447/"
] | I've created a test example, to check the correctness of the logic. I think this is what you need.
```
public class BlogEntyTreeItem
{
public string Text { set; get; }
public string URL { set; get; }
public List<BlogEntyTreeItem> Children { set; get; }
public List<BlogEntyTreeItem> GetTree()
{
N... | using the link [Playing with Linq grouping: GroupByMany ?](http://blogs.msdn.com/b/mitsu/archive/2007/12/22/playing-with-linq-grouping-groupbymany.aspx)
suggested in [How can I hierarchically group data using LINQ?](https://stackoverflow.com/questions/2230202/how-can-i-hierarchically-group-data-using-linq)
I first re... |
26,320,321 | ```
$ip = $_SERVER['REMOTE_ADDR']; //get IP
$referer = $_SERVER['HTTP_REFERER']; //get referer
$time = time(); //extracting timestamp
$date = date('d-m-y H:i:s',$time); //generating date
$f = fopen("log.php", "a"); ... | 2014/10/11 | [
"https://Stackoverflow.com/questions/26320321",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4133417/"
] | You'll wanna use
```
fwrite($f2, ++$counter);
```
instead of
```
fwrite($f2, $counter++);
```
What's happening is that your incrementing the variable after it's been written to file and not before. The solution will increment the variable before writing it. | Your final code would be:
```
$ip = $_SERVER['REMOTE_ADDR']; //get IP
$referer = $_SERVER['HTTP_REFERER']; //get referer
$time = time(); //extracting timestamp
$date = date('d-m-y H:i:s',$time); //generating date
$f = fopen("l... |
27,768 | In Twelve Monkeys, Cole hears someone who calls him as "Bob"... He hears him in the past and also in the future... Who or what is he? | 2012/12/07 | [
"https://scifi.stackexchange.com/questions/27768",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/4742/"
] | Well, I was thinking, maybe it was Cole himself. Come of think of it, Cole removed his teeth too, right? And the old man had his teeth removed too. He always knew what Cole was thinking, because he probably had been through it. He thought the same things because he is Cole himself, now an old man and he knows what the ... | I thought that the man in the mental hospital wearing the suit and the bunny slippers was the voice that called Cole bob.
But I can only base that on the tapping of his foot. In the scene where we see the man in the suit in the mental hospital he explains that he is not from outer space etc. After he is finished telli... |
27,768 | In Twelve Monkeys, Cole hears someone who calls him as "Bob"... He hears him in the past and also in the future... Who or what is he? | 2012/12/07 | [
"https://scifi.stackexchange.com/questions/27768",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/4742/"
] | In short, there's no definitive answer to this question. The film's themes of psychology and chaotic treatment of time travel make it difficult to pin down a solid answer. Still...
The voice Cole hears calling him Bob is mostly unexplained, but the homeless man he and Kathyrn run into multiple times shares the voice. ... | I thought that the man in the mental hospital wearing the suit and the bunny slippers was the voice that called Cole bob.
But I can only base that on the tapping of his foot. In the scene where we see the man in the suit in the mental hospital he explains that he is not from outer space etc. After he is finished telli... |
27,768 | In Twelve Monkeys, Cole hears someone who calls him as "Bob"... He hears him in the past and also in the future... Who or what is he? | 2012/12/07 | [
"https://scifi.stackexchange.com/questions/27768",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/4742/"
] | In short, there's no definitive answer to this question. The film's themes of psychology and chaotic treatment of time travel make it difficult to pin down a solid answer. Still...
The voice Cole hears calling him Bob is mostly unexplained, but the homeless man he and Kathyrn run into multiple times shares the voice. ... | *12 Monkeys* follows the structure of a Greek tragedy, with the idea of *hamartia* - a sort of mixture of fate and human fallibility - literally 'however much you try to escape, you are always there'. In traditional tragedy, there is always a chorus who reminds both audience and protagonist of this at key intervals, kn... |
27,768 | In Twelve Monkeys, Cole hears someone who calls him as "Bob"... He hears him in the past and also in the future... Who or what is he? | 2012/12/07 | [
"https://scifi.stackexchange.com/questions/27768",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/4742/"
] | The voice that calls Cole "Bob" **seems to be a communication from the authorities in the future. First the voice interrogates, then it manipulates, and finally it is hostile:**
-In its first scene, the voice interrogates Cole, asking him what happened during his time travel. *"Hey, Bob, you do the job? Did you find o... | *12 Monkeys* follows the structure of a Greek tragedy, with the idea of *hamartia* - a sort of mixture of fate and human fallibility - literally 'however much you try to escape, you are always there'. In traditional tragedy, there is always a chorus who reminds both audience and protagonist of this at key intervals, kn... |
27,768 | In Twelve Monkeys, Cole hears someone who calls him as "Bob"... He hears him in the past and also in the future... Who or what is he? | 2012/12/07 | [
"https://scifi.stackexchange.com/questions/27768",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/4742/"
] | After seeing Gilliam's new film, Zero Theorem- I believe the mysterious voice in 12 Monkeys to be 'Bob' from Zero Theorom. He is introduced as Bob and that he calls everyone else Bob because it's quicker and uses less memory. He is also the son of 'Management' and seems to know an awful lot about what's going on...all ... | Bob is ambiguous and up to the viewer, I like to think of Bob as fate personafied and it has capacity to be anywhere and anytime. Also a tinge of karma for the human race, it has a mission to rebalance human Vs earth war and nothing will change it. Essentially Bob is the Cassandra virus with a voice, capacity and tenac... |
27,768 | In Twelve Monkeys, Cole hears someone who calls him as "Bob"... He hears him in the past and also in the future... Who or what is he? | 2012/12/07 | [
"https://scifi.stackexchange.com/questions/27768",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/4742/"
] | Well, I was thinking, maybe it was Cole himself. Come of think of it, Cole removed his teeth too, right? And the old man had his teeth removed too. He always knew what Cole was thinking, because he probably had been through it. He thought the same things because he is Cole himself, now an old man and he knows what the ... | Bob is ambiguous and up to the viewer, I like to think of Bob as fate personafied and it has capacity to be anywhere and anytime. Also a tinge of karma for the human race, it has a mission to rebalance human Vs earth war and nothing will change it. Essentially Bob is the Cassandra virus with a voice, capacity and tenac... |
27,768 | In Twelve Monkeys, Cole hears someone who calls him as "Bob"... He hears him in the past and also in the future... Who or what is he? | 2012/12/07 | [
"https://scifi.stackexchange.com/questions/27768",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/4742/"
] | I think the overall theme of this movie is that fate exists and any attempt to subvert it will only backfire. I think the Bob voice is a symptom of his insanity and his repressed guilt as, on some level, he feels responsible for the end of the world. I think it ultimately serves to preserve ambiguity concerning his ins... | I thought that the man in the mental hospital wearing the suit and the bunny slippers was the voice that called Cole bob.
But I can only base that on the tapping of his foot. In the scene where we see the man in the suit in the mental hospital he explains that he is not from outer space etc. After he is finished telli... |
27,768 | In Twelve Monkeys, Cole hears someone who calls him as "Bob"... He hears him in the past and also in the future... Who or what is he? | 2012/12/07 | [
"https://scifi.stackexchange.com/questions/27768",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/4742/"
] | *12 Monkeys* follows the structure of a Greek tragedy, with the idea of *hamartia* - a sort of mixture of fate and human fallibility - literally 'however much you try to escape, you are always there'. In traditional tragedy, there is always a chorus who reminds both audience and protagonist of this at key intervals, kn... | I thought that the man in the mental hospital wearing the suit and the bunny slippers was the voice that called Cole bob.
But I can only base that on the tapping of his foot. In the scene where we see the man in the suit in the mental hospital he explains that he is not from outer space etc. After he is finished telli... |
27,768 | In Twelve Monkeys, Cole hears someone who calls him as "Bob"... He hears him in the past and also in the future... Who or what is he? | 2012/12/07 | [
"https://scifi.stackexchange.com/questions/27768",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/4742/"
] | In short, there's no definitive answer to this question. The film's themes of psychology and chaotic treatment of time travel make it difficult to pin down a solid answer. Still...
The voice Cole hears calling him Bob is mostly unexplained, but the homeless man he and Kathyrn run into multiple times shares the voice. ... | Well, I was thinking, maybe it was Cole himself. Come of think of it, Cole removed his teeth too, right? And the old man had his teeth removed too. He always knew what Cole was thinking, because he probably had been through it. He thought the same things because he is Cole himself, now an old man and he knows what the ... |
27,768 | In Twelve Monkeys, Cole hears someone who calls him as "Bob"... He hears him in the past and also in the future... Who or what is he? | 2012/12/07 | [
"https://scifi.stackexchange.com/questions/27768",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/4742/"
] | The voice that calls Cole "Bob" **seems to be a communication from the authorities in the future. First the voice interrogates, then it manipulates, and finally it is hostile:**
-In its first scene, the voice interrogates Cole, asking him what happened during his time travel. *"Hey, Bob, you do the job? Did you find o... | After seeing Gilliam's new film, Zero Theorem- I believe the mysterious voice in 12 Monkeys to be 'Bob' from Zero Theorom. He is introduced as Bob and that he calls everyone else Bob because it's quicker and uses less memory. He is also the son of 'Management' and seems to know an awful lot about what's going on...all ... |
199,736 | I know that the tax rate varies based on how happy the Sims are. Let's say my Sims are 99% happy. The tax rate is 20%. But 20% of what?
City hall says I get a tax rate of 20%, which equals §12075 every 24 hours.
If the tax rate were based on population, my population is 104184, so times 20% = §20837. That can't be ... | 2015/01/06 | [
"https://gaming.stackexchange.com/questions/199736",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/29603/"
] | Here is what I received from EA:
>
> Please note - the figure of 20% tax is calculated from levels and ratios for happiness and population, it's not as simple as happiness multiplied by population! A 20% tax rate is not simply 20% of your total population number in Simoleon form. If it were this simple an equation, e... | One thing which is quite obvious is that the tax is good at lower levels but exponentially decreases with every population. I was able to raise the tax to 10k when I had 100k population, but now I am at 150k population and the tax is only 12k. (Both at 99% happiness)
This seems to be a well designed trick by EA. Peopl... |
199,736 | I know that the tax rate varies based on how happy the Sims are. Let's say my Sims are 99% happy. The tax rate is 20%. But 20% of what?
City hall says I get a tax rate of 20%, which equals §12075 every 24 hours.
If the tax rate were based on population, my population is 104184, so times 20% = §20837. That can't be ... | 2015/01/06 | [
"https://gaming.stackexchange.com/questions/199736",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/29603/"
] | Here is what I received from EA:
>
> Please note - the figure of 20% tax is calculated from levels and ratios for happiness and population, it's not as simple as happiness multiplied by population! A 20% tax rate is not simply 20% of your total population number in Simoleon form. If it were this simple an equation, e... | Actually, what I noticed is that it seems to be 20% of your base population based on number of residences without the adders for parks, transport etc. So even though I have a population of 350,000 without all of the population boosters my population should be around 72,000. Big difference, but that makes my sense for w... |
199,736 | I know that the tax rate varies based on how happy the Sims are. Let's say my Sims are 99% happy. The tax rate is 20%. But 20% of what?
City hall says I get a tax rate of 20%, which equals §12075 every 24 hours.
If the tax rate were based on population, my population is 104184, so times 20% = §20837. That can't be ... | 2015/01/06 | [
"https://gaming.stackexchange.com/questions/199736",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/29603/"
] | Here is what I received from EA:
>
> Please note - the figure of 20% tax is calculated from levels and ratios for happiness and population, it's not as simple as happiness multiplied by population! A 20% tax rate is not simply 20% of your total population number in Simoleon form. If it were this simple an equation, e... | I got the same BS answer from EA. if you really want to know how your paid the 20 percent is absolutely meaningless. using regression trend lines on Excel I have formulated the equations, note this is with 100% happiness. Y=.018x+10199 I started this with my population at 110704. This tells you how much money one will ... |
199,736 | I know that the tax rate varies based on how happy the Sims are. Let's say my Sims are 99% happy. The tax rate is 20%. But 20% of what?
City hall says I get a tax rate of 20%, which equals §12075 every 24 hours.
If the tax rate were based on population, my population is 104184, so times 20% = §20837. That can't be ... | 2015/01/06 | [
"https://gaming.stackexchange.com/questions/199736",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/29603/"
] | Actually, what I noticed is that it seems to be 20% of your base population based on number of residences without the adders for parks, transport etc. So even though I have a population of 350,000 without all of the population boosters my population should be around 72,000. Big difference, but that makes my sense for w... | One thing which is quite obvious is that the tax is good at lower levels but exponentially decreases with every population. I was able to raise the tax to 10k when I had 100k population, but now I am at 150k population and the tax is only 12k. (Both at 99% happiness)
This seems to be a well designed trick by EA. Peopl... |
199,736 | I know that the tax rate varies based on how happy the Sims are. Let's say my Sims are 99% happy. The tax rate is 20%. But 20% of what?
City hall says I get a tax rate of 20%, which equals §12075 every 24 hours.
If the tax rate were based on population, my population is 104184, so times 20% = §20837. That can't be ... | 2015/01/06 | [
"https://gaming.stackexchange.com/questions/199736",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/29603/"
] | Actually, what I noticed is that it seems to be 20% of your base population based on number of residences without the adders for parks, transport etc. So even though I have a population of 350,000 without all of the population boosters my population should be around 72,000. Big difference, but that makes my sense for w... | I got the same BS answer from EA. if you really want to know how your paid the 20 percent is absolutely meaningless. using regression trend lines on Excel I have formulated the equations, note this is with 100% happiness. Y=.018x+10199 I started this with my population at 110704. This tells you how much money one will ... |
5,145,324 | I have some old tables with, what I think, are nearly worthless indexes. How can I easily be sure that are not ever being used before I drop them. | 2011/02/28 | [
"https://Stackoverflow.com/questions/5145324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/626960/"
] | Based on Joe's answer I came up with this:
```
SELECT
row_number() over(order by user_seeks,user_lookups,user_scans),
[Database] = d.name,
[Schema]= s.name,
[Table]= o.name,
[Index]= x.name,
[Scans] = user_scans,
[Seeks] = user_seeks,
[Lookups] = user_lookups,
[Las... | Take a look at the [sys.dm\_db\_index\_usage\_stats](http://msdn.microsoft.com/en-us/library/ms188755.aspx) DMV. Just be careful to keep in mind that these counters are reset every time SQL Server is restarted. |
5,145,324 | I have some old tables with, what I think, are nearly worthless indexes. How can I easily be sure that are not ever being used before I drop them. | 2011/02/28 | [
"https://Stackoverflow.com/questions/5145324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/626960/"
] | Take a look at the [sys.dm\_db\_index\_usage\_stats](http://msdn.microsoft.com/en-us/library/ms188755.aspx) DMV. Just be careful to keep in mind that these counters are reset every time SQL Server is restarted. | Check out [this section](http://msdn.microsoft.com/en-us/magazine/cc135978.aspx#S5) of [this article](http://msdn.microsoft.com/en-us/magazine/cc135978.aspx) by Ian Stirk in 2007. Very nice set of tools, including finding your unused indexes. |
5,145,324 | I have some old tables with, what I think, are nearly worthless indexes. How can I easily be sure that are not ever being used before I drop them. | 2011/02/28 | [
"https://Stackoverflow.com/questions/5145324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/626960/"
] | Take a look at the [sys.dm\_db\_index\_usage\_stats](http://msdn.microsoft.com/en-us/library/ms188755.aspx) DMV. Just be careful to keep in mind that these counters are reset every time SQL Server is restarted. | Check if the user seeks of the index are increasing with every select on the table u r using unless the server is restarted this will give you a clear idea which index is being used or not.
```
SELECT DISTINCT OBJECT_NAME(sis.OBJECT_ID) TableName, si.name AS IndexName, sc.Name AS ColumnName,
sic.Index_ID, sis.user_see... |
5,145,324 | I have some old tables with, what I think, are nearly worthless indexes. How can I easily be sure that are not ever being used before I drop them. | 2011/02/28 | [
"https://Stackoverflow.com/questions/5145324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/626960/"
] | Based on Joe's answer I came up with this:
```
SELECT
row_number() over(order by user_seeks,user_lookups,user_scans),
[Database] = d.name,
[Schema]= s.name,
[Table]= o.name,
[Index]= x.name,
[Scans] = user_scans,
[Seeks] = user_seeks,
[Lookups] = user_lookups,
[Las... | Check out [this section](http://msdn.microsoft.com/en-us/magazine/cc135978.aspx#S5) of [this article](http://msdn.microsoft.com/en-us/magazine/cc135978.aspx) by Ian Stirk in 2007. Very nice set of tools, including finding your unused indexes. |
5,145,324 | I have some old tables with, what I think, are nearly worthless indexes. How can I easily be sure that are not ever being used before I drop them. | 2011/02/28 | [
"https://Stackoverflow.com/questions/5145324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/626960/"
] | Based on Joe's answer I came up with this:
```
SELECT
row_number() over(order by user_seeks,user_lookups,user_scans),
[Database] = d.name,
[Schema]= s.name,
[Table]= o.name,
[Index]= x.name,
[Scans] = user_scans,
[Seeks] = user_seeks,
[Lookups] = user_lookups,
[Las... | Check if the user seeks of the index are increasing with every select on the table u r using unless the server is restarted this will give you a clear idea which index is being used or not.
```
SELECT DISTINCT OBJECT_NAME(sis.OBJECT_ID) TableName, si.name AS IndexName, sc.Name AS ColumnName,
sic.Index_ID, sis.user_see... |
5,145,324 | I have some old tables with, what I think, are nearly worthless indexes. How can I easily be sure that are not ever being used before I drop them. | 2011/02/28 | [
"https://Stackoverflow.com/questions/5145324",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/626960/"
] | Check if the user seeks of the index are increasing with every select on the table u r using unless the server is restarted this will give you a clear idea which index is being used or not.
```
SELECT DISTINCT OBJECT_NAME(sis.OBJECT_ID) TableName, si.name AS IndexName, sc.Name AS ColumnName,
sic.Index_ID, sis.user_see... | Check out [this section](http://msdn.microsoft.com/en-us/magazine/cc135978.aspx#S5) of [this article](http://msdn.microsoft.com/en-us/magazine/cc135978.aspx) by Ian Stirk in 2007. Very nice set of tools, including finding your unused indexes. |
13,893,803 | I have a plain text file with some data in it, that I'm trying to open and read using a Python (ver 3.2) program, and trying to load that data into a data structure within the program.
Here's what my text file looks like (file is called "data.txt")
```
NAME: Joe Smith
CLASS: Fighter
STR: 14
DEX: 7
```
Here's what ... | 2012/12/15 | [
"https://Stackoverflow.com/questions/13893803",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/348408/"
] | ```
player = {}
f = open("data.txt")
data = f.readlines()
for line in data:
# parse input, assign values to variables
key, value = line.split(":")
player[key.strip()] = value.strip()
f.close()
```
now the name of your player will be `player['name']`, and the same goes for all other properties in your file... | ```
import re
pattern = re.compile(r'([\w]+): ([\w\s]+)')
f = open("data.txt")
v = dict(pattern.findall(f.read()))
player_name = v.get("name")
plater_class = v.get('class')
# ...
f.close()
``` |
13,893,803 | I have a plain text file with some data in it, that I'm trying to open and read using a Python (ver 3.2) program, and trying to load that data into a data structure within the program.
Here's what my text file looks like (file is called "data.txt")
```
NAME: Joe Smith
CLASS: Fighter
STR: 14
DEX: 7
```
Here's what ... | 2012/12/15 | [
"https://Stackoverflow.com/questions/13893803",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/348408/"
] | ```
player = {}
f = open("data.txt")
data = f.readlines()
for line in data:
# parse input, assign values to variables
key, value = line.split(":")
player[key.strip()] = value.strip()
f.close()
```
now the name of your player will be `player['name']`, and the same goes for all other properties in your file... | The most direct way to do it is to assign the variables one at a time:
```
f = open("data.txt")
for line in f: # loop over the file directly
line = line.rstrip() # remove the trailing newline
if line.startswith('NAME: '):
player_name = line[6:]
elif l... |
13,893,803 | I have a plain text file with some data in it, that I'm trying to open and read using a Python (ver 3.2) program, and trying to load that data into a data structure within the program.
Here's what my text file looks like (file is called "data.txt")
```
NAME: Joe Smith
CLASS: Fighter
STR: 14
DEX: 7
```
Here's what ... | 2012/12/15 | [
"https://Stackoverflow.com/questions/13893803",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/348408/"
] | ```
import re
pattern = re.compile(r'([\w]+): ([\w\s]+)')
f = open("data.txt")
v = dict(pattern.findall(f.read()))
player_name = v.get("name")
plater_class = v.get('class')
# ...
f.close()
``` | The most direct way to do it is to assign the variables one at a time:
```
f = open("data.txt")
for line in f: # loop over the file directly
line = line.rstrip() # remove the trailing newline
if line.startswith('NAME: '):
player_name = line[6:]
elif l... |
70,692,034 | I'm in the middle of a port to the newest c++ Builder 11 (Clang) compiler and I ran into a warning that I don't understand
The warning:
```
'dllimport' attribute only applies to variables, functions and classes
```
The simplified code:
```
class Test
{
public:
Test() ;
int __declspec(dllimport) (*DllFun... | 2022/01/13 | [
"https://Stackoverflow.com/questions/70692034",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2650419/"
] | As the error message says, `dllimport` cannot be used to import individual class methods. Only *standalone* variables and functions, and *whole* classes. However, `dllimport` is meant for **static linking** only, but you are using **dynamic loading** instead, so there is no need to use `dllimport` in this code at all. | You can't `dllimport` a member function without `dllimport`-ing the whole class - this is where your `dllimport` should be. |
2,474,477 | I am trying to solve the equation $x^2 + y^2 + z^2 = n$ for $n = 1.2 \times 10^6 $
I have counted 131 solutions, which is certainly wrong. I think:
$$ r\_3( 1.2 \times 10^6) = r\_3(2^7) \times r\_3(3) \times r\_3(5^6) $$
Certainly the middle one is easy:
$$ r\_3(3) = 1 \text{ e.g. } 3 = 1^2 + 1^2 + 1^2 $$
I don't... | 2017/10/16 | [
"https://math.stackexchange.com/questions/2474477",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/4997/"
] | Hint:
For any integer $x,$ $$x^2\equiv0,1\pmod4$$
So, $a,b,c$ must be even
Check for $\pmod3,\pmod5$ | 1488....................................................
```
1471. 1040 344 -8
1472. 1040 344 8
1473. 1064 -248 -80
1474. 1064 -248 80
1475. 1064 -80 -248
1476. 1064 -80 248
1477. 1064 80 -248
1478. 1064 80 248
14... |
2,474,477 | I am trying to solve the equation $x^2 + y^2 + z^2 = n$ for $n = 1.2 \times 10^6 $
I have counted 131 solutions, which is certainly wrong. I think:
$$ r\_3( 1.2 \times 10^6) = r\_3(2^7) \times r\_3(3) \times r\_3(5^6) $$
Certainly the middle one is easy:
$$ r\_3(3) = 1 \text{ e.g. } 3 = 1^2 + 1^2 + 1^2 $$
I don't... | 2017/10/16 | [
"https://math.stackexchange.com/questions/2474477",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/4997/"
] | The number of solutions $(x,y)\in\mathbb{Z}^2$ of $x^2+y^2=m$ is given by
$$ 4\left(\chi\_4 \* 1\right)(m) = 4\sum\_{d\mid m}\chi\_4(d) = 4\!\!\!\!\!\!\sum\_{\substack{d\mid m\\ d\equiv 1\!\!\pmod{4}}}\!\!\!\!\!1-4\!\!\!\!\!\!\sum\_{\substack{d\mid m\\ d\equiv 3\!\!\pmod{4}}}\!\!\!\!\!1 $$
hence the number of solution... | Hint:
For any integer $x,$ $$x^2\equiv0,1\pmod4$$
So, $a,b,c$ must be even
Check for $\pmod3,\pmod5$ |
2,474,477 | I am trying to solve the equation $x^2 + y^2 + z^2 = n$ for $n = 1.2 \times 10^6 $
I have counted 131 solutions, which is certainly wrong. I think:
$$ r\_3( 1.2 \times 10^6) = r\_3(2^7) \times r\_3(3) \times r\_3(5^6) $$
Certainly the middle one is easy:
$$ r\_3(3) = 1 \text{ e.g. } 3 = 1^2 + 1^2 + 1^2 $$
I don't... | 2017/10/16 | [
"https://math.stackexchange.com/questions/2474477",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/4997/"
] | The number of solutions $(x,y)\in\mathbb{Z}^2$ of $x^2+y^2=m$ is given by
$$ 4\left(\chi\_4 \* 1\right)(m) = 4\sum\_{d\mid m}\chi\_4(d) = 4\!\!\!\!\!\!\sum\_{\substack{d\mid m\\ d\equiv 1\!\!\pmod{4}}}\!\!\!\!\!1-4\!\!\!\!\!\!\sum\_{\substack{d\mid m\\ d\equiv 3\!\!\pmod{4}}}\!\!\!\!\!1 $$
hence the number of solution... | 1488....................................................
```
1471. 1040 344 -8
1472. 1040 344 8
1473. 1064 -248 -80
1474. 1064 -248 80
1475. 1064 -80 -248
1476. 1064 -80 248
1477. 1064 80 -248
1478. 1064 80 248
14... |
52,576,835 | I have a matrix as below:
```
array([[1, 0, 1, 1, 0],
[1, 0, 0, 0, 0],
[0, 0, 0, 1, 0],
[0, 0, 0, 0, 0],
[1, 0, 0, 0, 0]])
```
I want to choose randomly 3 position in this matrix, and change labels in those position and the position next to it. The result should be like this:
```
array(... | 2018/09/30 | [
"https://Stackoverflow.com/questions/52576835",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6482143/"
] | this can be achieved using a similar & classic problem solving ([Flatten an irregular list of lists](https://stackoverflow.com/questions/2158395/flatten-an-irregular-list-of-lists)), no need to reinvent the wheel, just use some working method & post-process:
Flatten the list of lists, then take min & max of it.
```
i... | You can use the following recursive function that returns the maximum and minimum among the items in the current list and the maximum and minimum of the sublists:
```
def high_low(l):
try:
l.extend(high_low(l.pop()))
except AttributeError:
return [l]
except IndexError:
return []
... |
52,576,835 | I have a matrix as below:
```
array([[1, 0, 1, 1, 0],
[1, 0, 0, 0, 0],
[0, 0, 0, 1, 0],
[0, 0, 0, 0, 0],
[1, 0, 0, 0, 0]])
```
I want to choose randomly 3 position in this matrix, and change labels in those position and the position next to it. The result should be like this:
```
array(... | 2018/09/30 | [
"https://Stackoverflow.com/questions/52576835",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6482143/"
] | Here's one possibility to write the code with only one pass, no need for external library or python's `min/max`:
```
def high_low(list_or_number):
if isinstance(list_or_number, list):
current_min = float('inf')
current_max = float('-inf')
for x in list_or_number:
x_max, x_min = ... | You can use the following recursive function that returns the maximum and minimum among the items in the current list and the maximum and minimum of the sublists:
```
def high_low(l):
try:
l.extend(high_low(l.pop()))
except AttributeError:
return [l]
except IndexError:
return []
... |
53,278,552 | I have been reading the [Introduction to POM](https://maven.apache.org/pom.html) and don't understand the following. In the pom.xml you can configure dependencies, let's say we configure dependency `maven-embedder`. Then you can exclude a dependencies of your dependency, let's say we want to exclude `maven-core` from t... | 2018/11/13 | [
"https://Stackoverflow.com/questions/53278552",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7943988/"
] | So I managed to find what the issue was. The problem lies with CORS. In particular, the middleware works as expected however due to CORS a preflight request is sent which does not have the JWT token which is why I got the error in the first example. I have updated the middleware to skip the preflight requests:
```
... | I'm guessing this to be a problem of `req.headers['x-access-token']`. Once `next()` is called, the control goes to the next endpoint route. You should provide JWT as initials to the token. |
8,620,068 | I'm writing an Android application that has a scrollview which contains a linearlayout:
```
<ScrollView android:id="@+id/ScrollView01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity=top"
android:layout_marginTop="240dip"
android:... | 2011/12/23 | [
"https://Stackoverflow.com/questions/8620068",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1015002/"
] | What do you mean that you "can't do this". You would have to do `params.top=100;` and then `scrollView.setLayoutParams(params);`.
But you could change it to:
```
ScrollView scrollView=(ScrollView)findViewById(R.id.ScrollView01);
FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(scrollView.getLayoutParams... | Try
```
params.gravity = Gravity.LEFT | Gravity.TOP;
```
without the line you will have problems. |
11,633,823 | I am trying to run a JSF 2.0 webapp using Apache MyFaces 2.1.7 on a Tomcat 6 webserver. The App uses Tomahawk 1.1.11 and expression language 2.2 (el-impl-2.2.jar). For that purpose I've put the myfaces-api and myfaces-impl into Tomcats lib folder and exchanged Tomcats el-api.jar for the 2.2 variant.
When I call the fi... | 2012/07/24 | [
"https://Stackoverflow.com/questions/11633823",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/367391/"
] | Ok
I found the problem. The error results from having the myfaces-api.jar twice on your classpath. So for me the problem was I placed the myfaces-api.jar in the tomcat lib folder and in the WEB-INF/lib folder of the webapp.
While using an embedded tomcat with maven I had the myfaces-api.jar in the dependencies of the... | I think it could be solved just adding an empty faces-config.xml file under /WEB-INF/ folder, to indicate the application uses JSF and MyFaces continue the initialization step. See the class org.apache.myfaces.ee6.MyFacesContainerInitializer for details. |
47,272 | My 3 wall lights are hard wired and have on-off switches on the units. There is no wall switch for any of them. The trouble is they are all different fixtures and all pretty ugly. I'm looking to replace them without spending a fortune (ideally something with a Mission feel for under $100 apiece), but finding a good rep... | 2014/08/08 | [
"https://diy.stackexchange.com/questions/47272",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/11086/"
] | How about a "smart bulb" product such as an [Insteon LED bulb](http://www.insteon.com/267x-led-bulbs.html)? I've used these to replace old pull-chain ceiling sockets with more attractive fixtures. A single bulb is around $50 and you can buy a [wall mount remote](http://www.insteon.com/2342-x32-mini-remote.html) for aro... | I would install a wall switch.
**Diagnosis.**
1. Turn the lights on.
2. Flip breakers until the lights go off.
3. Find a receptacle near the lights that also went off.
Now, chances are, that there is a cord running up the wall from that receptacle that powers the lights.
1. Remove the receptacle. (Power still off!... |
47,272 | My 3 wall lights are hard wired and have on-off switches on the units. There is no wall switch for any of them. The trouble is they are all different fixtures and all pretty ugly. I'm looking to replace them without spending a fortune (ideally something with a Mission feel for under $100 apiece), but finding a good rep... | 2014/08/08 | [
"https://diy.stackexchange.com/questions/47272",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/11086/"
] | How about a "smart bulb" product such as an [Insteon LED bulb](http://www.insteon.com/267x-led-bulbs.html)? I've used these to replace old pull-chain ceiling sockets with more attractive fixtures. A single bulb is around $50 and you can buy a [wall mount remote](http://www.insteon.com/2342-x32-mini-remote.html) for aro... | One option would be to [go wireless](https://www.google.com/?gws_rd=ssl#q=wireless%20switch&tbm=shop). Find some fixtures that you like that would accommodate a screw in wireless adapter, and just wire them like the existing fixtures:

For some reaso... |
48,705,172 | Since ResponseBodyAdvice interface is in web.servlet package
How could I implement such functions in webflux? | 2018/02/09 | [
"https://Stackoverflow.com/questions/48705172",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3435786/"
] | I also have this problem, i found it can be done by HandlerResultHandler.
For Example, I extend `ResponseBodyResultHandler` to wrap all my response
First, you should write `ResponseWrapper.java`
```
public class ResponseWrapper extends ResponseBodyResultHandler {
private static MethodParameter param;
static... | i used ResponseBodyAdvise before spring 5.0. i think ResponseBodyResultHandler suport webflux since spring5.0. |
7,359,154 | I'm writing an IDE for [DWScript](http://code.google.com/p/dwscript/) and have got it stepping through code using the debugger. I now wish to add a display of 'local variables' (i.e those in scope). Can someone give me a pointer to the means of doing this? I can get a list of all symbols but do not understand how to ge... | 2011/09/09 | [
"https://Stackoverflow.com/questions/7359154",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/47012/"
] | Cast the *IdwsProgramExecution* to *TdwsProgramExecution*, you'll gain access to a "*CurrentProg*", property, a *TdwsProgram* which is either a *TdwsMainProgram* (if you're in the main) or a *TdwsProcedure* (if you're in a proc/func/method). Those will have a *Table* property, which lists the local symbols, that's the ... | For any others reading this question, I will show some supplementary info concerned with getting the value of a symbol. The symbol is found as described by Eric above but it is hard to work out how to get the actual value of the symbol. The code below is a procedure that populates a TMemo (memLocalVariables) with local... |
47,047,376 | I have a Jupyter notebook (python3) which is a batch job -- it runs three separate python3 notebooks using `%run`. I want to invoke a fourth Jupyter R-kernel notebook from my batch.
**Is there a way to execute an external R notebook from a Python notebook in Jupyter / iPython?**
Current setup:
`run_all.ipynb`: (pyth... | 2017/11/01 | [
"https://Stackoverflow.com/questions/47047376",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7207622/"
] | I don't think you can use the `%run` magic command that way as it executes the file in the current kernel.
Nbconvert has an execution API that allows you to execute notebooks. So you could create a shell script that executes all your notebooks like so:
```
#!/bin/bash
jupyter nbconvert --to notebook --execute 1_py3.i... | I was able to use [the answer](https://stackoverflow.com/a/47053020/7207622) to implement two solutions to running an R notebook from a python3 notebook.
### 1. call nbconvert from `!` shell command
Adding a simple `!` shell command to the python3 notebook:
`!jupyter nbconvert --to notebook --execute r.ipynb`
So th... |
26,300,077 | ```
string = "@ABlue , @Red , @GYellow, @Yellow, @GGreen"
new = re.sub('(@[A-Z][A-Z])', "########" , string)
```
I need a regular expression which is able to check for an @ following by two uppercase letters and than remove the @ and the first uppercase character.cc | 2014/10/10 | [
"https://Stackoverflow.com/questions/26300077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2631152/"
] | Using capturing group and backreference:
```
>>> import re
>>> string = "@ABlue , @Red , @GYellow, @Yellow, @GGreen"
>>> re.sub('@[A-Z]([A-Z])', r"\1" , string)
'Blue , @Red , Yellow, @Yellow, Green'
```
`\1` in the substitution string will be replaced with the first capturing group (The second uppercase letter).
*... | ```
>>> new = re.sub(r"@[A-Z]([A-Z])", r"\1" , string)
>>> new
'Blue , @Red , Yellow, @Yellow, Green'
``` |
50,806,427 | I am parsing python bytecodes (co\_code). For some operation I want to know the length of python opcodes in bytes. Where can I find the length of python opcodes? | 2018/06/11 | [
"https://Stackoverflow.com/questions/50806427",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3425984/"
] | All CPython bytecode opcodes are 1 byte long. On CPython 3.6+, all opcodes additionally take a 1-byte argument, for a total of 2 bytes per instruction. On previous versions, opcodes less than the special value [HAVE\_ARGUMENT](https://docs.python.org/3/library/dis.html#opcode-HAVE_ARGUMENT) take no argument, and opcode... | A simple function like this may help:
```
def compute_size(opcode):
if sys.version_info >= (3, 6):
return 2
return (1, 3)[opcode < dis.HAVE_ARGUMENT]
``` |
83,157 | The description of the [*green-flame blade*](https://www.dndbeyond.com/spells/green-flame-blade) cantrip (SCAG, p. 143) reads:
>
> As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell’s range, otherwise the spell fails. On a hit, the target su... | 2016/06/25 | [
"https://rpg.stackexchange.com/questions/83157",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/29608/"
] | No, you don't have to cause the green fire to leap to another creature, as of the 2020 errata
---------------------------------------------------------------------------------------------
The *green-flame blade* cantrip was updated when it was reprinted in *Tasha's Cauldron of Everything* (p. 107), and the version in ... | [Mike Mearls leaves the choice to the caster](https://www.sageadvice.eu/2016/07/04/green-flame-blade-no-target-creatures/).
As always, every DM can rule differently.
Please note that, while they could make their way into erratas, [tweets should not be treated as RAW](https://rpg.meta.stackexchange.com/questions/6250/... |
83,157 | The description of the [*green-flame blade*](https://www.dndbeyond.com/spells/green-flame-blade) cantrip (SCAG, p. 143) reads:
>
> As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell’s range, otherwise the spell fails. On a hit, the target su... | 2016/06/25 | [
"https://rpg.stackexchange.com/questions/83157",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/29608/"
] | No, you don't have to cause the green fire to leap to another creature, as of the 2020 errata
---------------------------------------------------------------------------------------------
The *green-flame blade* cantrip was updated when it was reprinted in *Tasha's Cauldron of Everything* (p. 107), and the version in ... | It's up to the DM, there is no official ruling
----------------------------------------------
As noted in Sent\_'s answer, [Mike Mearls](http://www.sageadvice.eu/2015/11/09/green-flame-blade-no-target-creatures/) tells us that you needn't target yourself.
While Mike Mearls is a lead designer of DnD 5e -- as nitsua60 ... |
83,157 | The description of the [*green-flame blade*](https://www.dndbeyond.com/spells/green-flame-blade) cantrip (SCAG, p. 143) reads:
>
> As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell’s range, otherwise the spell fails. On a hit, the target su... | 2016/06/25 | [
"https://rpg.stackexchange.com/questions/83157",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/29608/"
] | It's up to the DM, there is no official ruling
----------------------------------------------
As noted in Sent\_'s answer, [Mike Mearls](http://www.sageadvice.eu/2015/11/09/green-flame-blade-no-target-creatures/) tells us that you needn't target yourself.
While Mike Mearls is a lead designer of DnD 5e -- as nitsua60 ... | I would say no. PHB p. 204
>
> Targeting Yourself
>
>
> If a spell targets a creature of your choice, you can choose yourself, **unless the creature must be hostile** or specifically a creature other than you. If you are in the area of effect of a spell you cast, **you can target yourself**.
>
>
>
It seems to m... |
83,157 | The description of the [*green-flame blade*](https://www.dndbeyond.com/spells/green-flame-blade) cantrip (SCAG, p. 143) reads:
>
> As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell’s range, otherwise the spell fails. On a hit, the target su... | 2016/06/25 | [
"https://rpg.stackexchange.com/questions/83157",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/29608/"
] | As of November 2020, [SCAG has received errata](https://media.wizards.com/2020/dnd/downloads/SCAG-Errata.pdf) to fix this inconsistency. The description of the *green-flame blade* spell now says that you "can" do it (emphasis mine):
>
> You brandish the weapon used in the spell’s casting and make
> a melee attack wit... | >
> ...and green fire leaps from the target to a different creature of your choice that **you can see** within 5 feet of it.
>
>
>
Emphasis mine.
Even if your DM rules that it will jump back and hit you against your will, just close your eyes at the right moment so you're unable to see a target; The spell subsequ... |
83,157 | The description of the [*green-flame blade*](https://www.dndbeyond.com/spells/green-flame-blade) cantrip (SCAG, p. 143) reads:
>
> As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell’s range, otherwise the spell fails. On a hit, the target su... | 2016/06/25 | [
"https://rpg.stackexchange.com/questions/83157",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/29608/"
] | [Mike Mearls leaves the choice to the caster](https://www.sageadvice.eu/2016/07/04/green-flame-blade-no-target-creatures/).
As always, every DM can rule differently.
Please note that, while they could make their way into erratas, [tweets should not be treated as RAW](https://rpg.meta.stackexchange.com/questions/6250/... | It's up to the DM, there is no official ruling
----------------------------------------------
As noted in Sent\_'s answer, [Mike Mearls](http://www.sageadvice.eu/2015/11/09/green-flame-blade-no-target-creatures/) tells us that you needn't target yourself.
While Mike Mearls is a lead designer of DnD 5e -- as nitsua60 ... |
83,157 | The description of the [*green-flame blade*](https://www.dndbeyond.com/spells/green-flame-blade) cantrip (SCAG, p. 143) reads:
>
> As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell’s range, otherwise the spell fails. On a hit, the target su... | 2016/06/25 | [
"https://rpg.stackexchange.com/questions/83157",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/29608/"
] | >
> ...and green fire leaps from the target to a different creature of your choice that **you can see** within 5 feet of it.
>
>
>
Emphasis mine.
Even if your DM rules that it will jump back and hit you against your will, just close your eyes at the right moment so you're unable to see a target; The spell subsequ... | I would say no. PHB p. 204
>
> Targeting Yourself
>
>
> If a spell targets a creature of your choice, you can choose yourself, **unless the creature must be hostile** or specifically a creature other than you. If you are in the area of effect of a spell you cast, **you can target yourself**.
>
>
>
It seems to m... |
83,157 | The description of the [*green-flame blade*](https://www.dndbeyond.com/spells/green-flame-blade) cantrip (SCAG, p. 143) reads:
>
> As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell’s range, otherwise the spell fails. On a hit, the target su... | 2016/06/25 | [
"https://rpg.stackexchange.com/questions/83157",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/29608/"
] | No, you don't have to cause the green fire to leap to another creature, as of the 2020 errata
---------------------------------------------------------------------------------------------
The *green-flame blade* cantrip was updated when it was reprinted in *Tasha's Cauldron of Everything* (p. 107), and the version in ... | I would say no. PHB p. 204
>
> Targeting Yourself
>
>
> If a spell targets a creature of your choice, you can choose yourself, **unless the creature must be hostile** or specifically a creature other than you. If you are in the area of effect of a spell you cast, **you can target yourself**.
>
>
>
It seems to m... |
83,157 | The description of the [*green-flame blade*](https://www.dndbeyond.com/spells/green-flame-blade) cantrip (SCAG, p. 143) reads:
>
> As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell’s range, otherwise the spell fails. On a hit, the target su... | 2016/06/25 | [
"https://rpg.stackexchange.com/questions/83157",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/29608/"
] | [Mike Mearls leaves the choice to the caster](https://www.sageadvice.eu/2016/07/04/green-flame-blade-no-target-creatures/).
As always, every DM can rule differently.
Please note that, while they could make their way into erratas, [tweets should not be treated as RAW](https://rpg.meta.stackexchange.com/questions/6250/... | I would say no. PHB p. 204
>
> Targeting Yourself
>
>
> If a spell targets a creature of your choice, you can choose yourself, **unless the creature must be hostile** or specifically a creature other than you. If you are in the area of effect of a spell you cast, **you can target yourself**.
>
>
>
It seems to m... |
83,157 | The description of the [*green-flame blade*](https://www.dndbeyond.com/spells/green-flame-blade) cantrip (SCAG, p. 143) reads:
>
> As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell’s range, otherwise the spell fails. On a hit, the target su... | 2016/06/25 | [
"https://rpg.stackexchange.com/questions/83157",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/29608/"
] | As of November 2020, [SCAG has received errata](https://media.wizards.com/2020/dnd/downloads/SCAG-Errata.pdf) to fix this inconsistency. The description of the *green-flame blade* spell now says that you "can" do it (emphasis mine):
>
> You brandish the weapon used in the spell’s casting and make
> a melee attack wit... | It's up to the DM, there is no official ruling
----------------------------------------------
As noted in Sent\_'s answer, [Mike Mearls](http://www.sageadvice.eu/2015/11/09/green-flame-blade-no-target-creatures/) tells us that you needn't target yourself.
While Mike Mearls is a lead designer of DnD 5e -- as nitsua60 ... |
83,157 | The description of the [*green-flame blade*](https://www.dndbeyond.com/spells/green-flame-blade) cantrip (SCAG, p. 143) reads:
>
> As part of the action used to cast this spell, you must make a melee attack with a weapon against one creature within the spell’s range, otherwise the spell fails. On a hit, the target su... | 2016/06/25 | [
"https://rpg.stackexchange.com/questions/83157",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/29608/"
] | As of November 2020, [SCAG has received errata](https://media.wizards.com/2020/dnd/downloads/SCAG-Errata.pdf) to fix this inconsistency. The description of the *green-flame blade* spell now says that you "can" do it (emphasis mine):
>
> You brandish the weapon used in the spell’s casting and make
> a melee attack wit... | I would say no. PHB p. 204
>
> Targeting Yourself
>
>
> If a spell targets a creature of your choice, you can choose yourself, **unless the creature must be hostile** or specifically a creature other than you. If you are in the area of effect of a spell you cast, **you can target yourself**.
>
>
>
It seems to m... |
28,952,218 | I am building an application that uses a child process to make mathematical calculations:
```
var child = exec('get_hrv -M -R rr.txt', function(error, stdout) {
if (error !== null) {
console.log('exec error: ' + error);
} else {
res.send(stdout);
}
});
```
The output (stdout) look... | 2015/03/09 | [
"https://Stackoverflow.com/questions/28952218",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2607404/"
] | I solved this issue by editing a method "ResideMenu.java" in ResideMenu library.
I made a few changes in a method called "fitSystemWindows"
before I made changes:
```
@Override
protected boolean fitSystemWindows(Rect insets) {
this.setPadding(viewActivity.getPaddingLeft() + insets.left, viewActivity.ge... | I had this same issue and I solved this by editing a method in ResideMenu library.
Inside the library, you can acess a java class named "ResideMenu.java".
Edit the method as like this.
```
private void setScaleDirection(int direction){
int screenWidth = getScreenWidth();
float pivotX;
float pivotY = ge... |
28,952,218 | I am building an application that uses a child process to make mathematical calculations:
```
var child = exec('get_hrv -M -R rr.txt', function(error, stdout) {
if (error !== null) {
console.log('exec error: ' + error);
} else {
res.send(stdout);
}
});
```
The output (stdout) look... | 2015/03/09 | [
"https://Stackoverflow.com/questions/28952218",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2607404/"
] | Found Most stable solution
```
public Point getNavigationBarSize(Context context) {
Point appUsableSize = getAppUsableScreenSize(context);
Point realScreenSize = getRealScreenSize(context);
// navigation bar on the right
if (appUsableSize.x < realScreenSize.x) {
return new Point(realS... | I had this same issue and I solved this by editing a method in ResideMenu library.
Inside the library, you can acess a java class named "ResideMenu.java".
Edit the method as like this.
```
private void setScaleDirection(int direction){
int screenWidth = getScreenWidth();
float pivotX;
float pivotY = ge... |
28,952,218 | I am building an application that uses a child process to make mathematical calculations:
```
var child = exec('get_hrv -M -R rr.txt', function(error, stdout) {
if (error !== null) {
console.log('exec error: ' + error);
} else {
res.send(stdout);
}
});
```
The output (stdout) look... | 2015/03/09 | [
"https://Stackoverflow.com/questions/28952218",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2607404/"
] | I solved this issue by editing a method "ResideMenu.java" in ResideMenu library.
I made a few changes in a method called "fitSystemWindows"
before I made changes:
```
@Override
protected boolean fitSystemWindows(Rect insets) {
this.setPadding(viewActivity.getPaddingLeft() + insets.left, viewActivity.ge... | Found Most stable solution
```
public Point getNavigationBarSize(Context context) {
Point appUsableSize = getAppUsableScreenSize(context);
Point realScreenSize = getRealScreenSize(context);
// navigation bar on the right
if (appUsableSize.x < realScreenSize.x) {
return new Point(realS... |
53,715,077 | I am working on a asp page and I would like to override "meta http-equiv="X-UA-Compatible" content="IE=8"" with "meta http-equiv="X-UA-Compatible" content="IE=10"" in one of the pages using JavaScript. Is it possible? I have tried the following with no success.
```
window.onload = function(e){
$('meta[http-e... | 2018/12/10 | [
"https://Stackoverflow.com/questions/53715077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9808783/"
] | Keep track of the enum object, not its label
============================================
Keep a reference to the [enum object](https://docs.oracle.com/javase/tutorial/java/javaOO/enum.html) selected by the user, rather than a reference to the string of the enum object’s display name.
```
// Display combobox
// User ... | You don't need to iterate on all the values because you can easily get the enum value in O(1) with [Enum.valueOf(String name)](https://docs.oracle.com/javase/10/docs/api/java/lang/Enum.html#valueOf(java.lang.Class,java.lang.String)).
In your case, `Ford.valueOf(comboBox1.getSelectedItem().toString()).getCarId()`
shoul... |
53,715,077 | I am working on a asp page and I would like to override "meta http-equiv="X-UA-Compatible" content="IE=8"" with "meta http-equiv="X-UA-Compatible" content="IE=10"" in one of the pages using JavaScript. Is it possible? I have tried the following with no success.
```
window.onload = function(e){
$('meta[http-e... | 2018/12/10 | [
"https://Stackoverflow.com/questions/53715077",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9808783/"
] | Keep track of the enum object, not its label
============================================
Keep a reference to the [enum object](https://docs.oracle.com/javase/tutorial/java/javaOO/enum.html) selected by the user, rather than a reference to the string of the enum object’s display name.
```
// Display combobox
// User ... | You are using it correctly enough already, just some minor changes
```
public enum Ford {
FOCUS("Ford", 26),
MONDEO("Mondeo", 6),
FIESTA("Fiesta", 13);
private final String name; //Good
private final int carId; //Good
/** This is a constructor for the enum variable */
Ford(String nam... |
70,263 | Does Blizzard allow one user to play multiple accounts simultaneously? I know it is hard to verify if one or two players are currently playing, but would Blizzard ban my accounts if they knew I am multiboxing? | 2012/05/27 | [
"https://gaming.stackexchange.com/questions/70263",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/10933/"
] | If you're looking for a clear-cut yes-or-no answer from Blizzard, unfortunately you won't be able to get it at the present time; every recent inquiry about the subject on the official forums has been met with a generic "read the ToS" response.
There *was*, however, a post earlier this month by Blizzard representative ... | From a World of Warcraft and Starcraft 2 perspective, Blizzard has long allowed multiple accounts to play simultaneously.
The only concern is that you are careful if you are using software to play multiple characters at once simultaneously. Anything that emulates botting (keyboard emulation, packet duplicating, etc) ... |
21,117,048 | I have made this database. It looks like it is working fine, except that I was told that my table "event" is not in third normal form. I do not see why it is not in the third normal form. I thought it is maybe because of the city and the zip code, which should be always the same, but large cities can have multiple zip ... | 2014/01/14 | [
"https://Stackoverflow.com/questions/21117048",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3137926/"
] | If you want to keep using that design, you're gonna run into all sorts of problems.
* What if the translated word doesn't have the letter shortcut you applied to your other language?
* If a user gets used to a set of shortcuts and changes the language, are all the shortcuts he is used to going to change?
For example... | It seems that you would have to use a little bit of RegEx (regular expressions) and .split to be able to grab that letter, store it in a variable and then style it with jquery's .css method. |
21,117,048 | I have made this database. It looks like it is working fine, except that I was told that my table "event" is not in third normal form. I do not see why it is not in the third normal form. I thought it is maybe because of the city and the zip code, which should be always the same, but large cities can have multiple zip ... | 2014/01/14 | [
"https://Stackoverflow.com/questions/21117048",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3137926/"
] | What letter is "active" is language-dependent, so this info has to be stored in each language specific config file (translation table file):
```
English:
RUN: "Run"
RUN_ACTION: "R"
French:
RUN: "Courir"
RUN_ACTION: "C"
```
Then use this information (and meta-infromation) to generate your HTML:
```
function buildAc... | It seems that you would have to use a little bit of RegEx (regular expressions) and .split to be able to grab that letter, store it in a variable and then style it with jquery's .css method. |
21,117,048 | I have made this database. It looks like it is working fine, except that I was told that my table "event" is not in third normal form. I do not see why it is not in the third normal form. I thought it is maybe because of the city and the zip code, which should be always the same, but large cities can have multiple zip ... | 2014/01/14 | [
"https://Stackoverflow.com/questions/21117048",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3137926/"
] | If you want to keep using that design, you're gonna run into all sorts of problems.
* What if the translated word doesn't have the letter shortcut you applied to your other language?
* If a user gets used to a set of shortcuts and changes the language, are all the shortcuts he is used to going to change?
For example... | It is an admirable goal to separate data from presentation.
I don't think pure CSS will get you all the way there, without also having some supporting HTML markup.
You actually need the hotkey information in two places:
1. In the UI markup
2. In the code that processes key presses
I would suggest that you store the... |
21,117,048 | I have made this database. It looks like it is working fine, except that I was told that my table "event" is not in third normal form. I do not see why it is not in the third normal form. I thought it is maybe because of the city and the zip code, which should be always the same, but large cities can have multiple zip ... | 2014/01/14 | [
"https://Stackoverflow.com/questions/21117048",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3137926/"
] | What letter is "active" is language-dependent, so this info has to be stored in each language specific config file (translation table file):
```
English:
RUN: "Run"
RUN_ACTION: "R"
French:
RUN: "Courir"
RUN_ACTION: "C"
```
Then use this information (and meta-infromation) to generate your HTML:
```
function buildAc... | It is an admirable goal to separate data from presentation.
I don't think pure CSS will get you all the way there, without also having some supporting HTML markup.
You actually need the hotkey information in two places:
1. In the UI markup
2. In the code that processes key presses
I would suggest that you store the... |
339,071 | I have Windows 7 Professional. I would like to see the users that have administrative access on my PC.
But I do not have administrative access to my PC. | 2011/09/23 | [
"https://superuser.com/questions/339071",
"https://superuser.com",
"https://superuser.com/users/67858/"
] | Open the command prompt and type:
>
> net user
>
>
>
It will display a list of all the users who are present.
To see if a user is a administrator, type
>
> net user [username]
>
>
>
and look at the Local Group Memberships. | <http://www.sevenforums.com/tutorials/7539-local-users-groups-manager-open.html>
mmc compmgmt.msc
Who is member of Administrators groups that users has administrative access. |
339,071 | I have Windows 7 Professional. I would like to see the users that have administrative access on my PC.
But I do not have administrative access to my PC. | 2011/09/23 | [
"https://superuser.com/questions/339071",
"https://superuser.com",
"https://superuser.com/users/67858/"
] | To get the list of local administrators from the command line:
```
net localgroup administrators
```
You don't need to have administrator rights to execute this command. | <http://www.sevenforums.com/tutorials/7539-local-users-groups-manager-open.html>
mmc compmgmt.msc
Who is member of Administrators groups that users has administrative access. |
339,071 | I have Windows 7 Professional. I would like to see the users that have administrative access on my PC.
But I do not have administrative access to my PC. | 2011/09/23 | [
"https://superuser.com/questions/339071",
"https://superuser.com",
"https://superuser.com/users/67858/"
] | Open the command prompt and type:
>
> net user
>
>
>
It will display a list of all the users who are present.
To see if a user is a administrator, type
>
> net user [username]
>
>
>
and look at the Local Group Memberships. | To get the list of local administrators from the command line:
```
net localgroup administrators
```
You don't need to have administrator rights to execute this command. |
8,927,910 | I've been looking for a solution all day, but I'm still seeing this error.
It's a Expression Engine setup for a client of ours and we want to implement ajax-navigation. For this we are using the default $.load() function and this works perfectly in ie9, FF, Safari, Chrome, Opera... but it doesn't work in ie8 and belo... | 2012/01/19 | [
"https://Stackoverflow.com/questions/8927910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/383731/"
] | `$.load()` **works** in IE8. My guess is you have a previous JS error, triggered only in IE8-, which prevents it from functioning properly, or being called altogether. | The problem is some functions are supported in one and not the others. For example one of my personal hates is how innertext is only supported in ie7,8 but not fox or chrome. Here is the compatability chart if you are interested <http://www.quirksmode.org/dom/w3c_html.html> .
Bottom line, unless you plan on changing t... |
8,927,910 | I've been looking for a solution all day, but I'm still seeing this error.
It's a Expression Engine setup for a client of ours and we want to implement ajax-navigation. For this we are using the default $.load() function and this works perfectly in ie9, FF, Safari, Chrome, Opera... but it doesn't work in ie8 and belo... | 2012/01/19 | [
"https://Stackoverflow.com/questions/8927910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/383731/"
] | The only thing I can see wrong with this code is you are missing a closing bracket
```
load_page: function(url, func){
$('#content').load(url+' #content>div', function(data, textStatus, jqXHR){
console.log('page loaded!');
} // <-- this one
});
``` | The problem is some functions are supported in one and not the others. For example one of my personal hates is how innertext is only supported in ie7,8 but not fox or chrome. Here is the compatability chart if you are interested <http://www.quirksmode.org/dom/w3c_html.html> .
Bottom line, unless you plan on changing t... |
8,927,910 | I've been looking for a solution all day, but I'm still seeing this error.
It's a Expression Engine setup for a client of ours and we want to implement ajax-navigation. For this we are using the default $.load() function and this works perfectly in ie9, FF, Safari, Chrome, Opera... but it doesn't work in ie8 and belo... | 2012/01/19 | [
"https://Stackoverflow.com/questions/8927910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/383731/"
] | I had the same problem and I noticed that if the url returns invalid HTML (eg. extra end tag) it can stop it from loading or finding the correct element.
In my example all I had to do was correct the HTML from the URL and then it worked correctly. | The problem is some functions are supported in one and not the others. For example one of my personal hates is how innertext is only supported in ie7,8 but not fox or chrome. Here is the compatability chart if you are interested <http://www.quirksmode.org/dom/w3c_html.html> .
Bottom line, unless you plan on changing t... |
8,927,910 | I've been looking for a solution all day, but I'm still seeing this error.
It's a Expression Engine setup for a client of ours and we want to implement ajax-navigation. For this we are using the default $.load() function and this works perfectly in ie9, FF, Safari, Chrome, Opera... but it doesn't work in ie8 and belo... | 2012/01/19 | [
"https://Stackoverflow.com/questions/8927910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/383731/"
] | ajax requests are cached in IE8, so just a little magic of
$.ajaxSettings.cache = false;
before the using load function
<http://zacster.blogspot.in/2008/10/jquery-ie7-load-url-problem.html>
<http://api.jquery.com/jQuery.ajax/>
cache (default: true, false for dataType 'script' and 'jsonp')
Type: Boolean
If s... | The problem is some functions are supported in one and not the others. For example one of my personal hates is how innertext is only supported in ie7,8 but not fox or chrome. Here is the compatability chart if you are interested <http://www.quirksmode.org/dom/w3c_html.html> .
Bottom line, unless you plan on changing t... |
8,927,910 | I've been looking for a solution all day, but I'm still seeing this error.
It's a Expression Engine setup for a client of ours and we want to implement ajax-navigation. For this we are using the default $.load() function and this works perfectly in ie9, FF, Safari, Chrome, Opera... but it doesn't work in ie8 and belo... | 2012/01/19 | [
"https://Stackoverflow.com/questions/8927910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/383731/"
] | The only thing I can see wrong with this code is you are missing a closing bracket
```
load_page: function(url, func){
$('#content').load(url+' #content>div', function(data, textStatus, jqXHR){
console.log('page loaded!');
} // <-- this one
});
``` | `$.load()` **works** in IE8. My guess is you have a previous JS error, triggered only in IE8-, which prevents it from functioning properly, or being called altogether. |
8,927,910 | I've been looking for a solution all day, but I'm still seeing this error.
It's a Expression Engine setup for a client of ours and we want to implement ajax-navigation. For this we are using the default $.load() function and this works perfectly in ie9, FF, Safari, Chrome, Opera... but it doesn't work in ie8 and belo... | 2012/01/19 | [
"https://Stackoverflow.com/questions/8927910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/383731/"
] | I had the same problem and I noticed that if the url returns invalid HTML (eg. extra end tag) it can stop it from loading or finding the correct element.
In my example all I had to do was correct the HTML from the URL and then it worked correctly. | `$.load()` **works** in IE8. My guess is you have a previous JS error, triggered only in IE8-, which prevents it from functioning properly, or being called altogether. |
8,927,910 | I've been looking for a solution all day, but I'm still seeing this error.
It's a Expression Engine setup for a client of ours and we want to implement ajax-navigation. For this we are using the default $.load() function and this works perfectly in ie9, FF, Safari, Chrome, Opera... but it doesn't work in ie8 and belo... | 2012/01/19 | [
"https://Stackoverflow.com/questions/8927910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/383731/"
] | ajax requests are cached in IE8, so just a little magic of
$.ajaxSettings.cache = false;
before the using load function
<http://zacster.blogspot.in/2008/10/jquery-ie7-load-url-problem.html>
<http://api.jquery.com/jQuery.ajax/>
cache (default: true, false for dataType 'script' and 'jsonp')
Type: Boolean
If s... | `$.load()` **works** in IE8. My guess is you have a previous JS error, triggered only in IE8-, which prevents it from functioning properly, or being called altogether. |
8,927,910 | I've been looking for a solution all day, but I'm still seeing this error.
It's a Expression Engine setup for a client of ours and we want to implement ajax-navigation. For this we are using the default $.load() function and this works perfectly in ie9, FF, Safari, Chrome, Opera... but it doesn't work in ie8 and belo... | 2012/01/19 | [
"https://Stackoverflow.com/questions/8927910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/383731/"
] | I had the same problem and I noticed that if the url returns invalid HTML (eg. extra end tag) it can stop it from loading or finding the correct element.
In my example all I had to do was correct the HTML from the URL and then it worked correctly. | The only thing I can see wrong with this code is you are missing a closing bracket
```
load_page: function(url, func){
$('#content').load(url+' #content>div', function(data, textStatus, jqXHR){
console.log('page loaded!');
} // <-- this one
});
``` |
8,927,910 | I've been looking for a solution all day, but I'm still seeing this error.
It's a Expression Engine setup for a client of ours and we want to implement ajax-navigation. For this we are using the default $.load() function and this works perfectly in ie9, FF, Safari, Chrome, Opera... but it doesn't work in ie8 and belo... | 2012/01/19 | [
"https://Stackoverflow.com/questions/8927910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/383731/"
] | ajax requests are cached in IE8, so just a little magic of
$.ajaxSettings.cache = false;
before the using load function
<http://zacster.blogspot.in/2008/10/jquery-ie7-load-url-problem.html>
<http://api.jquery.com/jQuery.ajax/>
cache (default: true, false for dataType 'script' and 'jsonp')
Type: Boolean
If s... | The only thing I can see wrong with this code is you are missing a closing bracket
```
load_page: function(url, func){
$('#content').load(url+' #content>div', function(data, textStatus, jqXHR){
console.log('page loaded!');
} // <-- this one
});
``` |
8,927,910 | I've been looking for a solution all day, but I'm still seeing this error.
It's a Expression Engine setup for a client of ours and we want to implement ajax-navigation. For this we are using the default $.load() function and this works perfectly in ie9, FF, Safari, Chrome, Opera... but it doesn't work in ie8 and belo... | 2012/01/19 | [
"https://Stackoverflow.com/questions/8927910",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/383731/"
] | I had the same problem and I noticed that if the url returns invalid HTML (eg. extra end tag) it can stop it from loading or finding the correct element.
In my example all I had to do was correct the HTML from the URL and then it worked correctly. | ajax requests are cached in IE8, so just a little magic of
$.ajaxSettings.cache = false;
before the using load function
<http://zacster.blogspot.in/2008/10/jquery-ie7-load-url-problem.html>
<http://api.jquery.com/jQuery.ajax/>
cache (default: true, false for dataType 'script' and 'jsonp')
Type: Boolean
If s... |
33,571,312 | I have a class `K` and I am constructing an object in a call to function `test`. So I believe that the constructed `K` is called an *r-value*. (Is that true?)
But I am puzzled, and bothered that the `K` object is apparently *const*, not *mutable*. I don't want it to be.
Simple test program:
====================
```
... | 2015/11/06 | [
"https://Stackoverflow.com/questions/33571312",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3918508/"
] | A reference cannot bind to a temporary object but a `const T&` can. Since `K{}` is a temporary `std::string test (const K &k) {return "const";}` is chosen.
If you really want to be able to modify the temporary then you can use and r-value reference
```
std::string test (K &&k) {return "r-value";}
```
`[Live Example... | In standard C++, you can not bind temporary object to non-const reference. You can bind it to rvalue references, though. Users of MSVC enjoy the 'extension' of binding temporaries to non-const references. |
33,571,312 | I have a class `K` and I am constructing an object in a call to function `test`. So I believe that the constructed `K` is called an *r-value*. (Is that true?)
But I am puzzled, and bothered that the `K` object is apparently *const*, not *mutable*. I don't want it to be.
Simple test program:
====================
```
... | 2015/11/06 | [
"https://Stackoverflow.com/questions/33571312",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3918508/"
] | A reference cannot bind to a temporary object but a `const T&` can. Since `K{}` is a temporary `std::string test (const K &k) {return "const";}` is chosen.
If you really want to be able to modify the temporary then you can use and r-value reference
```
std::string test (K &&k) {return "r-value";}
```
`[Live Example... | It looks like you got your syntax mixed up between l-value references and r-value references.
`K& k` : this is a non-const l-value reference. It can usually only be bound to variables that have names. This syntax implies (typically) you are taking in `k` and *modifying inside your function*, such that `k` is also the ... |
33,571,312 | I have a class `K` and I am constructing an object in a call to function `test`. So I believe that the constructed `K` is called an *r-value*. (Is that true?)
But I am puzzled, and bothered that the `K` object is apparently *const*, not *mutable*. I don't want it to be.
Simple test program:
====================
```
... | 2015/11/06 | [
"https://Stackoverflow.com/questions/33571312",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3918508/"
] | In standard C++, you can not bind temporary object to non-const reference. You can bind it to rvalue references, though. Users of MSVC enjoy the 'extension' of binding temporaries to non-const references. | It looks like you got your syntax mixed up between l-value references and r-value references.
`K& k` : this is a non-const l-value reference. It can usually only be bound to variables that have names. This syntax implies (typically) you are taking in `k` and *modifying inside your function*, such that `k` is also the ... |
3,460,251 | >
> Let $f \in \mathbb{Z}[X]$ be a monic irreducible polynomial, n its degree, $\alpha$ a zero of $f$ in some extension field of $\mathbb{Q}$, and $p$ a prime number not dividing the discriminant $\Delta(f)$ of $f$. Denote by $t$ the number of prime ideals $\mathfrak{p}$ of $\mathbb{Z}[\alpha]$ with $p \in \mathfrak{p... | 2019/12/02 | [
"https://math.stackexchange.com/questions/3460251",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/424581/"
] | This is known as Stickelberger's Theorem, and the proof is not exactly straightforward. Here is how it goes: by Dedekind criterion the number of primes above $p$ is exactly the number of irreducible factors of $f$ modulo $p$, because $p$ does not divide $\Delta(f)$. So write $f=g\_1\ldots g\_r$ in $\mathbb F\_p[x]$. If... | Factoring $f\in \Bbb{F}\_p[x]$ we have
$$f(x)= \prod\_{k\le t} g\_k(x)=\prod\_{k \le t} \prod\_{l=1}^{d\_k} (x-a\_k^{p^l}), \qquad \qquad a\_k^{p^{d\_k}} =a\_k$$
Put an ordering on the set of roots : $a\_k^{p^l} <a\_{k\_2}^{p^{l\_2}}$ if $k< k\_2$ or $k=k\_2,1\le l<l\_2\le d\_k$, we obtain
$$\Delta(f)^{1/2} = \prod\_{a... |
37,440,097 | I want to create the same thing as **Uber** did with seek bar
[](https://i.stack.imgur.com/HfbtJ.jpg)
Is there any library that can help me achieve this? | 2016/05/25 | [
"https://Stackoverflow.com/questions/37440097",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4966197/"
] | Try implementing a custom `Seekbar` with your own "`progressDrawable`" and "`thumb`" drawable. Then manage the specific behaviors programatically.
That's what i'm using to achieve something similar:
```
<SeekBar
android:id="@+id/seekbar_task"
android:layout_width="330dp"
android:layout_height="40dp"
a... | Have a look [**here**](https://android-arsenal.com/search?q=seek) there are a lot of different libraries.
[This one](https://android-arsenal.com/details/1/919) might be similar to what you are searching for. |
19,311,535 | I want to write the data from my `DataGridView` to a textfile.
The following code writes the data but it is not formatted correctly.
```
StreamWriter sW = new StreamWriter(dirLocationString);
string lines = "";
for (int row = 0; row< numRows1; row++){
for (int col = 0; col < 4; col++)
{
li... | 2013/10/11 | [
"https://Stackoverflow.com/questions/19311535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1731312/"
] | Init `lines` in first loop :
```
StreamWriter sW = new StreamWriter(dirLocationString);
for (int row = 0; row< numRows1; row++){
string lines = "";
for (int col = 0; col < 4; col++)
{
lines += (string.IsNullOrEmpty(lines) ? " " : ", ") + dataGridView1.Rows[row].Cells[col].Value.ToString();
}
... | Unfortunately looping through rows and columns is prone to errors and not very succinct. Here is a little hack that takes advantage of `Windows.Forms.Clipboard` and `DataGridView.GetClipboardContent()` to do all the dirty work for you. `DataGridView.GetClipboardContent()` returns all the selected data cells as a DataOb... |
114,106 | **Context:**
I'm currently helping out my friend, who is full on into creating his own cryptocurrencies business, by creating simple landing pages for him, installing WordPress, etc. As we are friends (not that close but still), we do not have any contract or anything written down on paper.
**Problem:**
Once we deci... | 2018/06/15 | [
"https://workplace.stackexchange.com/questions/114106",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/88149/"
] | I have dealt with 'clients' like this in the past.
As others have said, first **get a contract**.
But in my experience, for clients that behave this way, the contract still doesn't guarentee prompt payment. It just gets you the privilege of spending months in various legal processes to get your money (maybe).
So fo... | Question: You are OK (or seemed to have been OK in the past) with your friend delaying your payment due to personal issues. What would your friend say if you were to delay construction of his project due to your own personal issues?
I'd try that. Just say to him one day something like "I understand how important this ... |
114,106 | **Context:**
I'm currently helping out my friend, who is full on into creating his own cryptocurrencies business, by creating simple landing pages for him, installing WordPress, etc. As we are friends (not that close but still), we do not have any contract or anything written down on paper.
**Problem:**
Once we deci... | 2018/06/15 | [
"https://workplace.stackexchange.com/questions/114106",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/88149/"
] | Business is business, friendship is friendship. Don't mix them up.
You do the work for him. You get paid from him. Simple as that.
The things you need to do? Get him sign a contract which states the rate, how much time you work every week, when you get paid after delivery, etc. **Insist on** him signing the contract ... | Point out to him that you have a family to feed and a mortgage to pay (or rent, or board, or whatever). If he doesn't enable you to feed your family and pay your mortgage, then you'll need to find a job that *does* enable you to do those things.
In short, if he doesn't pay you, then stop working. If he needs the work ... |
114,106 | **Context:**
I'm currently helping out my friend, who is full on into creating his own cryptocurrencies business, by creating simple landing pages for him, installing WordPress, etc. As we are friends (not that close but still), we do not have any contract or anything written down on paper.
**Problem:**
Once we deci... | 2018/06/15 | [
"https://workplace.stackexchange.com/questions/114106",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/88149/"
] | You're about to be ripped off. And because you don't have a contract, you'll have a hard fight to get paid.
Your 'friend' is putting a 'business manager' between you and he. The usual reason for that is to provide someone else to blame - "I'd love to pay you, but the business manager says that the work was not to spec... | Point out to him that you have a family to feed and a mortgage to pay (or rent, or board, or whatever). If he doesn't enable you to feed your family and pay your mortgage, then you'll need to find a job that *does* enable you to do those things.
In short, if he doesn't pay you, then stop working. If he needs the work ... |
114,106 | **Context:**
I'm currently helping out my friend, who is full on into creating his own cryptocurrencies business, by creating simple landing pages for him, installing WordPress, etc. As we are friends (not that close but still), we do not have any contract or anything written down on paper.
**Problem:**
Once we deci... | 2018/06/15 | [
"https://workplace.stackexchange.com/questions/114106",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/88149/"
] | >
> we do not have any contract or anything written down on paper
>
>
>
This is not just the context, **it's part of the problem**.
Don't get me wrong, not every favor you do a friend should be documented. But what you're doing now is much more than just a favor.
You need to reevaluate what "friend" means in thi... | Business is business, friendship is friendship. Don't mix them up.
You do the work for him. You get paid from him. Simple as that.
The things you need to do? Get him sign a contract which states the rate, how much time you work every week, when you get paid after delivery, etc. **Insist on** him signing the contract ... |
114,106 | **Context:**
I'm currently helping out my friend, who is full on into creating his own cryptocurrencies business, by creating simple landing pages for him, installing WordPress, etc. As we are friends (not that close but still), we do not have any contract or anything written down on paper.
**Problem:**
Once we deci... | 2018/06/15 | [
"https://workplace.stackexchange.com/questions/114106",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/88149/"
] | >
> we do not have any contract or anything written down on paper
>
>
>
This is not just the context, **it's part of the problem**.
Don't get me wrong, not every favor you do a friend should be documented. But what you're doing now is much more than just a favor.
You need to reevaluate what "friend" means in thi... | You're about to be ripped off. And because you don't have a contract, you'll have a hard fight to get paid.
Your 'friend' is putting a 'business manager' between you and he. The usual reason for that is to provide someone else to blame - "I'd love to pay you, but the business manager says that the work was not to spec... |
114,106 | **Context:**
I'm currently helping out my friend, who is full on into creating his own cryptocurrencies business, by creating simple landing pages for him, installing WordPress, etc. As we are friends (not that close but still), we do not have any contract or anything written down on paper.
**Problem:**
Once we deci... | 2018/06/15 | [
"https://workplace.stackexchange.com/questions/114106",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/88149/"
] | I have dealt with 'clients' like this in the past.
As others have said, first **get a contract**.
But in my experience, for clients that behave this way, the contract still doesn't guarentee prompt payment. It just gets you the privilege of spending months in various legal processes to get your money (maybe).
So fo... | You will never get paid what you are owed. This guy is trying to build a cryptocurrencies business with very little capital. Cryptocurrencies start-ups are all over the place at the moment, so to make a go of this without any investment he has to be very smart and be a very good business person. From reading your story... |
114,106 | **Context:**
I'm currently helping out my friend, who is full on into creating his own cryptocurrencies business, by creating simple landing pages for him, installing WordPress, etc. As we are friends (not that close but still), we do not have any contract or anything written down on paper.
**Problem:**
Once we deci... | 2018/06/15 | [
"https://workplace.stackexchange.com/questions/114106",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/88149/"
] | You're about to be ripped off. And because you don't have a contract, you'll have a hard fight to get paid.
Your 'friend' is putting a 'business manager' between you and he. The usual reason for that is to provide someone else to blame - "I'd love to pay you, but the business manager says that the work was not to spec... | You will never get paid what you are owed. This guy is trying to build a cryptocurrencies business with very little capital. Cryptocurrencies start-ups are all over the place at the moment, so to make a go of this without any investment he has to be very smart and be a very good business person. From reading your story... |
114,106 | **Context:**
I'm currently helping out my friend, who is full on into creating his own cryptocurrencies business, by creating simple landing pages for him, installing WordPress, etc. As we are friends (not that close but still), we do not have any contract or anything written down on paper.
**Problem:**
Once we deci... | 2018/06/15 | [
"https://workplace.stackexchange.com/questions/114106",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/88149/"
] | I have dealt with 'clients' like this in the past.
As others have said, first **get a contract**.
But in my experience, for clients that behave this way, the contract still doesn't guarentee prompt payment. It just gets you the privilege of spending months in various legal processes to get your money (maybe).
So fo... | Point out to him that you have a family to feed and a mortgage to pay (or rent, or board, or whatever). If he doesn't enable you to feed your family and pay your mortgage, then you'll need to find a job that *does* enable you to do those things.
In short, if he doesn't pay you, then stop working. If he needs the work ... |
114,106 | **Context:**
I'm currently helping out my friend, who is full on into creating his own cryptocurrencies business, by creating simple landing pages for him, installing WordPress, etc. As we are friends (not that close but still), we do not have any contract or anything written down on paper.
**Problem:**
Once we deci... | 2018/06/15 | [
"https://workplace.stackexchange.com/questions/114106",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/88149/"
] | >
> we do not have any contract or anything written down on paper
>
>
>
This is not just the context, **it's part of the problem**.
Don't get me wrong, not every favor you do a friend should be documented. But what you're doing now is much more than just a favor.
You need to reevaluate what "friend" means in thi... | You will never get paid what you are owed. This guy is trying to build a cryptocurrencies business with very little capital. Cryptocurrencies start-ups are all over the place at the moment, so to make a go of this without any investment he has to be very smart and be a very good business person. From reading your story... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.