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
16,173,025
i confuse why my this simple code is wrong. i just want to list json data in select when document is load. this is my jquery code : ``` <script> $(document).ready(function(){ $("#choose").load(function(event){ $.getJSON('data/colors.json', function(jd) { $('#choose').html('<option...
2013/04/23
[ "https://Stackoverflow.com/questions/16173025", "https://Stackoverflow.com", "https://Stackoverflow.com/users/553779/" ]
Try ``` $(function(){ $.getJSON('data.json', function(jd) { $.each(jd, function(i, v){ $('#choose').append('<option value="' + v.name + '">' + v.name + '</option>'); }) }) }); ``` Demo: [Fiddle](http://plnkr.co/edit/z5QQOBPvvcIC4ULs9qsJ?p=preview)
why do you wait for `$('#choose')` to be loading ? Your function is executed when `document` is ready, so `$('#choose')` is ready too.
30,344,041
Currently I'm having a trouble with instantiating an AbstractFactory. There are some classes: ``` abstract class ABase { } class A1 : ABase { } class A2 : ABase { } abstract class BBase { } class B1 : BBase { private readonly A1 _a; public B1(A1 a) { _a = a; } } class B2 : BBase { private ...
2015/05/20
[ "https://Stackoverflow.com/questions/30344041", "https://Stackoverflow.com", "https://Stackoverflow.com/users/788833/" ]
You have undefined variable chairs in ``` $dbchairs = $row[$chairs]; ``` If in DB is column called `chairs`, use: ``` $dbchairs = $row['chairs']; // key of $row array is column name ```
change this `$dbchairs = $row[$chairs];` to `$dbchairs = $row['chairs'];` You are using undefined variable `$chairs` as your index in `$row` array. syntax: `$row['name_of_the_column_in_database']`
26,677,289
I'm trying to make a tiny program that will read inputs from a file and print them out if they match a specific format which is: ``` Team Name : Another Team name : Score : Score ``` Here is what I've done so far, If you could point me in right direction I'd really appreciate it ``` import java.util.Scanner; import...
2014/10/31
[ "https://Stackoverflow.com/questions/26677289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4202863/" ]
It's very simple check using `String.matches(regexPattern)`. Use another variable to keep count of invalid lines. ``` int invalidLines = 0; String line =null; while (fileScan.hasNextLine()){ line = fileScan.nextLine(); if(!line.matches(regexPattern)){ invalidLines++; } co...
[String#split()](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#split(java.lang.String)) and the `length` property of arrays are the tools to use here. I leave to you, to find out how to use them properly.
26,677,289
I'm trying to make a tiny program that will read inputs from a file and print them out if they match a specific format which is: ``` Team Name : Another Team name : Score : Score ``` Here is what I've done so far, If you could point me in right direction I'd really appreciate it ``` import java.util.Scanner; import...
2014/10/31
[ "https://Stackoverflow.com/questions/26677289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4202863/" ]
It's very simple check using `String.matches(regexPattern)`. Use another variable to keep count of invalid lines. ``` int invalidLines = 0; String line =null; while (fileScan.hasNextLine()){ line = fileScan.nextLine(); if(!line.matches(regexPattern)){ invalidLines++; } co...
``` public static void main(String[] args) throws FileNotFoundException{ int invalidcount=0; String file; Scanner fileScan; fileScan = new Scanner (new File("document.txt")); int count = 0; String arrTeam[]={ "",""}; // create arrTeam array with the valid inputs in it while (fileS...
26,677,289
I'm trying to make a tiny program that will read inputs from a file and print them out if they match a specific format which is: ``` Team Name : Another Team name : Score : Score ``` Here is what I've done so far, If you could point me in right direction I'd really appreciate it ``` import java.util.Scanner; import...
2014/10/31
[ "https://Stackoverflow.com/questions/26677289", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4202863/" ]
It's very simple check using `String.matches(regexPattern)`. Use another variable to keep count of invalid lines. ``` int invalidLines = 0; String line =null; while (fileScan.hasNextLine()){ line = fileScan.nextLine(); if(!line.matches(regexPattern)){ invalidLines++; } co...
You can use regex to match your input if it returns true then your input matches if false then it doesn't match Ex. ``` String test = "TeamA:TeamB:44:99"; System.out.println("" + test.matches("\\D+[:]\\D+[:]\\d+[:]\\d+")); ``` This will match nondigits:nondigits:numbers:numbers
426,053
I want to evaluate a variable, whose name will need to dynamically evaluate another varuiable, i.e. the var `ENVIRONMENT` can be either `prod`, `stg`, or `test`, so I have 3 urls: ``` URL_PROD=https://myproduction.com URL_STG=https://mystaging.com URL_TEST=https://mytest.com ``` so I want to retrieve say the value o...
2018/02/23
[ "https://unix.stackexchange.com/questions/426053", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/136100/" ]
Besides the associative arrays' related answer proposed by @Kusalananda I also came up with this: ``` ENDPOINT=URL_${ENVIRONMENT^^} MY_URL="${!ENDPOINT}" ```
Using a recent `bash` or `ksh93`, create an associative array to hold the URLs: ``` URL=( [prod]=https://myproduction.com [stg]=https://mystaging.com [test]=https://mytest.com ) url_type=test echo "${URL[$url_type]}" ``` This will output the testing URL.
426,053
I want to evaluate a variable, whose name will need to dynamically evaluate another varuiable, i.e. the var `ENVIRONMENT` can be either `prod`, `stg`, or `test`, so I have 3 urls: ``` URL_PROD=https://myproduction.com URL_STG=https://mystaging.com URL_TEST=https://mytest.com ``` so I want to retrieve say the value o...
2018/02/23
[ "https://unix.stackexchange.com/questions/426053", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/136100/" ]
Using a recent `bash` or `ksh93`, create an associative array to hold the URLs: ``` URL=( [prod]=https://myproduction.com [stg]=https://mystaging.com [test]=https://mytest.com ) url_type=test echo "${URL[$url_type]}" ``` This will output the testing URL.
What works for me is: ``` eval echo \$URL_${ENVIRONMENT^^} ```
426,053
I want to evaluate a variable, whose name will need to dynamically evaluate another varuiable, i.e. the var `ENVIRONMENT` can be either `prod`, `stg`, or `test`, so I have 3 urls: ``` URL_PROD=https://myproduction.com URL_STG=https://mystaging.com URL_TEST=https://mytest.com ``` so I want to retrieve say the value o...
2018/02/23
[ "https://unix.stackexchange.com/questions/426053", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/136100/" ]
Besides the associative arrays' related answer proposed by @Kusalananda I also came up with this: ``` ENDPOINT=URL_${ENVIRONMENT^^} MY_URL="${!ENDPOINT}" ```
What works for me is: ``` eval echo \$URL_${ENVIRONMENT^^} ```
2,067,814
I want to experiment a bit with C++ as a server side language. I'm not looking for a framework, and simply want to achieve a silly old "Hello World" webapp using C++. Is there an Apache HTTP server module that I can install? If i can do the PHP equivalent of : ``` <?php $personName = "Peter Pan"; echo "Hell...
2010/01/14
[ "https://Stackoverflow.com/questions/2067814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/122835/" ]
"mod\_c++" doesn't make sense; Once you're talking about compiled programs, Apache doesn't care what language the binary comes from. mod\_cgi allows Apache to invoke such a binary (regardless of it's source language) in response to HTTP requests. Read more here: <http://library.thinkquest.org/16728/content/cgi/cpluspl...
I'm not saying there is no such thing, but if there is it would be monumentally inefficient. C++ is a compiled language, not an interpretive one, so the putative Apache C++ module would have to invoke the C++ compiler to compile the code before executing it. This would be very, very slow, apart from other problems.
2,067,814
I want to experiment a bit with C++ as a server side language. I'm not looking for a framework, and simply want to achieve a silly old "Hello World" webapp using C++. Is there an Apache HTTP server module that I can install? If i can do the PHP equivalent of : ``` <?php $personName = "Peter Pan"; echo "Hell...
2010/01/14
[ "https://Stackoverflow.com/questions/2067814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/122835/" ]
cgi would do this. Just have your C++ app spit its output to stdout and your mod\_cgi will handle it
I'm not saying there is no such thing, but if there is it would be monumentally inefficient. C++ is a compiled language, not an interpretive one, so the putative Apache C++ module would have to invoke the C++ compiler to compile the code before executing it. This would be very, very slow, apart from other problems.
2,067,814
I want to experiment a bit with C++ as a server side language. I'm not looking for a framework, and simply want to achieve a silly old "Hello World" webapp using C++. Is there an Apache HTTP server module that I can install? If i can do the PHP equivalent of : ``` <?php $personName = "Peter Pan"; echo "Hell...
2010/01/14
[ "https://Stackoverflow.com/questions/2067814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/122835/" ]
Suppose for the moment the OP wanted something that was "like mod\_php, mod\_perl". Given the right configuration, it would be monumentally easy for the "mod\_c++" to look at the source files, and compiled files and decide whether it had to do a "one off" compilation task. In fact this is how make works. I know the OP...
I'm not saying there is no such thing, but if there is it would be monumentally inefficient. C++ is a compiled language, not an interpretive one, so the putative Apache C++ module would have to invoke the C++ compiler to compile the code before executing it. This would be very, very slow, apart from other problems.
2,067,814
I want to experiment a bit with C++ as a server side language. I'm not looking for a framework, and simply want to achieve a silly old "Hello World" webapp using C++. Is there an Apache HTTP server module that I can install? If i can do the PHP equivalent of : ``` <?php $personName = "Peter Pan"; echo "Hell...
2010/01/14
[ "https://Stackoverflow.com/questions/2067814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/122835/" ]
You might want to have a look at <http://www.webtoolkit.eu/wt> or www.tntnet.org instead.
Suppose for the moment the OP wanted something that was "like mod\_php, mod\_perl". Given the right configuration, it would be monumentally easy for the "mod\_c++" to look at the source files, and compiled files and decide whether it had to do a "one off" compilation task. In fact this is how make works. I know the OP...
2,067,814
I want to experiment a bit with C++ as a server side language. I'm not looking for a framework, and simply want to achieve a silly old "Hello World" webapp using C++. Is there an Apache HTTP server module that I can install? If i can do the PHP equivalent of : ``` <?php $personName = "Peter Pan"; echo "Hell...
2010/01/14
[ "https://Stackoverflow.com/questions/2067814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/122835/" ]
cgi would do this. Just have your C++ app spit its output to stdout and your mod\_cgi will handle it
Suppose for the moment the OP wanted something that was "like mod\_php, mod\_perl". Given the right configuration, it would be monumentally easy for the "mod\_c++" to look at the source files, and compiled files and decide whether it had to do a "one off" compilation task. In fact this is how make works. I know the OP...
2,067,814
I want to experiment a bit with C++ as a server side language. I'm not looking for a framework, and simply want to achieve a silly old "Hello World" webapp using C++. Is there an Apache HTTP server module that I can install? If i can do the PHP equivalent of : ``` <?php $personName = "Peter Pan"; echo "Hell...
2010/01/14
[ "https://Stackoverflow.com/questions/2067814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/122835/" ]
cgi would do this. Just have your C++ app spit its output to stdout and your mod\_cgi will handle it
"mod\_c++" doesn't make sense; Once you're talking about compiled programs, Apache doesn't care what language the binary comes from. mod\_cgi allows Apache to invoke such a binary (regardless of it's source language) in response to HTTP requests. Read more here: <http://library.thinkquest.org/16728/content/cgi/cpluspl...
2,067,814
I want to experiment a bit with C++ as a server side language. I'm not looking for a framework, and simply want to achieve a silly old "Hello World" webapp using C++. Is there an Apache HTTP server module that I can install? If i can do the PHP equivalent of : ``` <?php $personName = "Peter Pan"; echo "Hell...
2010/01/14
[ "https://Stackoverflow.com/questions/2067814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/122835/" ]
You might want to have a look at <http://www.webtoolkit.eu/wt> or www.tntnet.org instead.
I did create a mod\_cpp once. It basically was written in c, but loaded a .so which was in turn written in C++. Its performance was really good, but lacked a lot of things that we take for granted in things like PHP (sessions, HTML un/escaping, etc). It did use a template engine to separate the HTML from the C++. I t...
2,067,814
I want to experiment a bit with C++ as a server side language. I'm not looking for a framework, and simply want to achieve a silly old "Hello World" webapp using C++. Is there an Apache HTTP server module that I can install? If i can do the PHP equivalent of : ``` <?php $personName = "Peter Pan"; echo "Hell...
2010/01/14
[ "https://Stackoverflow.com/questions/2067814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/122835/" ]
You might want to have a look at <http://www.webtoolkit.eu/wt> or www.tntnet.org instead.
I'm not saying there is no such thing, but if there is it would be monumentally inefficient. C++ is a compiled language, not an interpretive one, so the putative Apache C++ module would have to invoke the C++ compiler to compile the code before executing it. This would be very, very slow, apart from other problems.
2,067,814
I want to experiment a bit with C++ as a server side language. I'm not looking for a framework, and simply want to achieve a silly old "Hello World" webapp using C++. Is there an Apache HTTP server module that I can install? If i can do the PHP equivalent of : ``` <?php $personName = "Peter Pan"; echo "Hell...
2010/01/14
[ "https://Stackoverflow.com/questions/2067814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/122835/" ]
You might want to have a look at <http://www.webtoolkit.eu/wt> or www.tntnet.org instead.
"mod\_c++" doesn't make sense; Once you're talking about compiled programs, Apache doesn't care what language the binary comes from. mod\_cgi allows Apache to invoke such a binary (regardless of it's source language) in response to HTTP requests. Read more here: <http://library.thinkquest.org/16728/content/cgi/cpluspl...
2,067,814
I want to experiment a bit with C++ as a server side language. I'm not looking for a framework, and simply want to achieve a silly old "Hello World" webapp using C++. Is there an Apache HTTP server module that I can install? If i can do the PHP equivalent of : ``` <?php $personName = "Peter Pan"; echo "Hell...
2010/01/14
[ "https://Stackoverflow.com/questions/2067814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/122835/" ]
I did create a mod\_cpp once. It basically was written in c, but loaded a .so which was in turn written in C++. Its performance was really good, but lacked a lot of things that we take for granted in things like PHP (sessions, HTML un/escaping, etc). It did use a template engine to separate the HTML from the C++. I t...
I'm not saying there is no such thing, but if there is it would be monumentally inefficient. C++ is a compiled language, not an interpretive one, so the putative Apache C++ module would have to invoke the C++ compiler to compile the code before executing it. This would be very, very slow, apart from other problems.
67,976,803
In Notepad++, I was able to add "Double" to all variables in the list by pressing Ctrl+H using Regular Expression Mode and replacing "\d+" with "Double". Now I want to add a ";" to the end of each line. How would I do this? ``` Double Harness Infinity Double Hofri Ghostforge Double Humiliate Double Infuse with Vitali...
2021/06/14
[ "https://Stackoverflow.com/questions/67976803", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15966110/" ]
`CASE` would do that. For example: ``` create table new_table as select case when that_column is null then null else 1 end as that_column, other_column from the_original_table ```
Oracle offers the `nvl2()` function: ``` nvl2(col, null, 1) ``` If you want to change the value, though, you need to use an `update` or modify the data *somehow*.
2,497,585
How would I do this? I tried using contradiction, but got stuck halfway through. This unit is about induction, but I have no idea how I would use it to do this as it is not a sequence > > 4.6.15 (a) show that for any $k\in N$, if $2^{3k-1}+ 5\cdot 3^k$ is divisible by 11, then $2^{3(k+2)-1} + 5\cdot 3^{k+2}$ is also ...
2017/10/31
[ "https://math.stackexchange.com/questions/2497585", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
So as you seem to have surmised, you shouldn't try proving this by induction; essentially you are proving an inductive-type implication (true for $n$ implies true for $n+2$) and you don't need induction for that. (In fact, the statement is false for e.g. $k=1$: $4+5\cdot 3=19$ is not divisible by $11$. It is true for $...
\begin{align\*} 2^{3(k+2)-1}+5 \cdot 3^{k+2} &= 64 \cdot 2^{3k-1} + 9 \cdot 5 \cdot 3^k \\ &= (66-2)\cdot 2^{3k-1} + (11 -2)\cdot 5 \cdot 3^k\\ &= 66 \cdot 2^{3k-1} + 11 \cdot 3^k - 2(2^{3k-1} + 5 \cdot 3^{k+2}) \end{align\*} First term is a multiple of 11 and the second term is a multiple of 11 by hypothesis.
2,497,585
How would I do this? I tried using contradiction, but got stuck halfway through. This unit is about induction, but I have no idea how I would use it to do this as it is not a sequence > > 4.6.15 (a) show that for any $k\in N$, if $2^{3k-1}+ 5\cdot 3^k$ is divisible by 11, then $2^{3(k+2)-1} + 5\cdot 3^{k+2}$ is also ...
2017/10/31
[ "https://math.stackexchange.com/questions/2497585", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
\begin{align\*} 2^{3(k+2)-1}+5 \cdot 3^{k+2} &= 64 \cdot 2^{3k-1} + 9 \cdot 5 \cdot 3^k \\ &= (66-2)\cdot 2^{3k-1} + (11 -2)\cdot 5 \cdot 3^k\\ &= 66 \cdot 2^{3k-1} + 11 \cdot 3^k - 2(2^{3k-1} + 5 \cdot 3^{k+2}) \end{align\*} First term is a multiple of 11 and the second term is a multiple of 11 by hypothesis.
Hint: If $f(n)=2^{3n-1}+5\cdot3^n,$ eliminate $2^{3n}$ or $3^n$ to find either $$f(k+1)-2^3\cdot f(k)$$ or $$f(k+1)-3\cdot f(k)$$ to be divisible by $11$
2,497,585
How would I do this? I tried using contradiction, but got stuck halfway through. This unit is about induction, but I have no idea how I would use it to do this as it is not a sequence > > 4.6.15 (a) show that for any $k\in N$, if $2^{3k-1}+ 5\cdot 3^k$ is divisible by 11, then $2^{3(k+2)-1} + 5\cdot 3^{k+2}$ is also ...
2017/10/31
[ "https://math.stackexchange.com/questions/2497585", "https://math.stackexchange.com", "https://math.stackexchange.com/users/-1/" ]
So as you seem to have surmised, you shouldn't try proving this by induction; essentially you are proving an inductive-type implication (true for $n$ implies true for $n+2$) and you don't need induction for that. (In fact, the statement is false for e.g. $k=1$: $4+5\cdot 3=19$ is not divisible by $11$. It is true for $...
Hint: If $f(n)=2^{3n-1}+5\cdot3^n,$ eliminate $2^{3n}$ or $3^n$ to find either $$f(k+1)-2^3\cdot f(k)$$ or $$f(k+1)-3\cdot f(k)$$ to be divisible by $11$
48,470,872
Here's a sample csv file; ``` out_gate,uless_col,in_gate,n_con p,x,x,1 p,x,y,1 p,x,z,1 a_a,u,b,1 a_a,s,b,3 a_b,e,a,2 a_b,l,c,4 a_c,e,a,5 a_c,s,b,5 a_c,s,b,3 a_c,c,a,4 a_d,o,c,2 a_d,l,c,3 a_d,m,b,2 p,y,x,1 p,y,y,1 p,y,z,3 ``` I want to remove the useless columns (2nd column) and useless rows (first three and last thr...
2018/01/26
[ "https://Stackoverflow.com/questions/48470872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9261635/" ]
Assuming that you have one or more unwanted columns and the wanted rows start with "a\_". ``` import csv with open('filename.csv') as infile: reader = csv.reader(infile) header = next(reader) data = list(reader) useless = set(['uless_col', 'n_con']) # Let's say there are 2 useless columns mask, new_header...
Below solution uses Pandas. As the [pandas dataframe drop](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.drop.html) function suggests, you can do the following: ``` import pandas as pd df = pd.read_csv("csv_name.csv") df.drop(columns=['ulesscol']) ``` Above code is considering dropping col...
48,470,872
Here's a sample csv file; ``` out_gate,uless_col,in_gate,n_con p,x,x,1 p,x,y,1 p,x,z,1 a_a,u,b,1 a_a,s,b,3 a_b,e,a,2 a_b,l,c,4 a_c,e,a,5 a_c,s,b,5 a_c,s,b,3 a_c,c,a,4 a_d,o,c,2 a_d,l,c,3 a_d,m,b,2 p,y,x,1 p,y,y,1 p,y,z,3 ``` I want to remove the useless columns (2nd column) and useless rows (first three and last thr...
2018/01/26
[ "https://Stackoverflow.com/questions/48470872", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9261635/" ]
Assuming that you have one or more unwanted columns and the wanted rows start with "a\_". ``` import csv with open('filename.csv') as infile: reader = csv.reader(infile) header = next(reader) data = list(reader) useless = set(['uless_col', 'n_con']) # Let's say there are 2 useless columns mask, new_header...
You can try this: ``` import csv data = list(csv.reader(open('filename.csv'))) header = [data[0][0]]+data[0][2:] final_data = [[i[0]]+i[2:] for i in data[1:]][3:-3] with open('filename.csv', 'w') as f: write = csv.writer(f) write.writerows([header]+final_data) ``` Output: ``` out_gate,in_gate,n_con a,b,1 a,b,...
22,068,115
I am evolving a top navigation menu which will provide a different layout for fullsize screens and mobile screens. This intended to follow the usual convention of reducing the menu to a single full-width button on a mobile, and clicking that button will dropdown the menu choices. Broadly, it is working well but I am h...
2014/02/27
[ "https://Stackoverflow.com/questions/22068115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1298198/" ]
It's because you specified the height of the ul item .nav It will work if you remove the height and set overflow: hidden to get the background colour to fill the nav. ``` .nav{ display:block; list-style-type:none; margin:0; padding:0; overflow: hidden; font:12px Geneva, Arial, Helvetica,...
Also, if you add `text-align: center;` to the .mobile-nav class, then the "Menu" in the mobile version will align properly.
25,834,811
How do i prevent the error-message from showing before the 'submit'-button is clicked? For some reason the content of 'else'-statement is visible on pageload - the message "NO" should only appear after typing something else than 'a' in this.. what am i doing wrong? ``` <form method="POST"> <input type="text" class...
2014/09/14
[ "https://Stackoverflow.com/questions/25834811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1946044/" ]
Add this PHP code: ``` <?php if(isset($_POST['pass'])) { // your check here } ?> ```
Test to see if the submit button is in the submitted data. ``` if (isset( $_POST['submit'] )) { ```
25,834,811
How do i prevent the error-message from showing before the 'submit'-button is clicked? For some reason the content of 'else'-statement is visible on pageload - the message "NO" should only appear after typing something else than 'a' in this.. what am i doing wrong? ``` <form method="POST"> <input type="text" class...
2014/09/14
[ "https://Stackoverflow.com/questions/25834811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1946044/" ]
Add this PHP code: ``` <?php if(isset($_POST['pass'])) { // your check here } ?> ```
``` <form method="POST"> <input type="text" class="textfield" id="cursor" name="pass"> <input type="submit" class="button" name="submit" value="OK"> </form> <?php $pass = $_POST['pass']; //You need to check if the form is submitted if($_POST['submit']){ if(isset($pass) && !empty($pass) && $pass == 'a...
21,723,545
I have problem with handler. After create i want to send message to handler, but method sendEmptyMessage() cannot resolve. Handler must to update custom list adapter. There is my code: ``` private Handler mHandler; mHandler = new Handler() { @Override public void close() {} @Override ...
2014/02/12
[ "https://Stackoverflow.com/questions/21723545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2955515/" ]
I don't see why you cannot *resolve* the sendEmptyMessage method. Maybe you have got a wrong import, check that. On a side note, you just need to post a message to you handler as so : ``` new Handler(Looper.getMainLooper()).post( new Runnable() { @Override public void run() { catalogAdapter.notifyDa...
`mHandler.sendEmptyMessage(0);` is wrong, because there is no method: ``` public void handleMessage(int m); ``` Must be: ``` mHandler.sendEmptyMessage(null); ```
21,723,545
I have problem with handler. After create i want to send message to handler, but method sendEmptyMessage() cannot resolve. Handler must to update custom list adapter. There is my code: ``` private Handler mHandler; mHandler = new Handler() { @Override public void close() {} @Override ...
2014/02/12
[ "https://Stackoverflow.com/questions/21723545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2955515/" ]
`java.util.logging.Handler` is the wrong class to import. You want to make sure you import `android.os.Handler`
`mHandler.sendEmptyMessage(0);` is wrong, because there is no method: ``` public void handleMessage(int m); ``` Must be: ``` mHandler.sendEmptyMessage(null); ```
21,723,545
I have problem with handler. After create i want to send message to handler, but method sendEmptyMessage() cannot resolve. Handler must to update custom list adapter. There is my code: ``` private Handler mHandler; mHandler = new Handler() { @Override public void close() {} @Override ...
2014/02/12
[ "https://Stackoverflow.com/questions/21723545", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2955515/" ]
`java.util.logging.Handler` is the wrong class to import. You want to make sure you import `android.os.Handler`
I don't see why you cannot *resolve* the sendEmptyMessage method. Maybe you have got a wrong import, check that. On a side note, you just need to post a message to you handler as so : ``` new Handler(Looper.getMainLooper()).post( new Runnable() { @Override public void run() { catalogAdapter.notifyDa...
5,576
I want to distribute an IoT product commercially. The product is powered by LiPo battery (3.7V nominal) ‎which is charged by solar panel (6V, 2W). ‎ My question is can I ship the product (internationally) with LiPo battery included? Are there any ‎regulations against it? What is the usual practice in similar case?‎ Do ...
2021/03/03
[ "https://iot.stackexchange.com/questions/5576", "https://iot.stackexchange.com", "https://iot.stackexchange.com/users/12426/" ]
ICAO and IATA have quite a number of resources on the topic. <https://www.iata.org/en/programs/cargo/dgr/lithium-batteries/> is an intro page with links to many other documents, including the 2021 [Lithium Battery Guidance Document](https://www.iata.org/contentassets/05e6d8742b0047259bf3a700bc9d42b9/lithium-battery-gu...
Many millions of products are shipped with batteries every day. What rules will apply will depend on a factors you have not included (shipping method, size of battery, type of packing, number of units in a consignment...) I suggest you talk to the courier you intend to use.
5,576
I want to distribute an IoT product commercially. The product is powered by LiPo battery (3.7V nominal) ‎which is charged by solar panel (6V, 2W). ‎ My question is can I ship the product (internationally) with LiPo battery included? Are there any ‎regulations against it? What is the usual practice in similar case?‎ Do ...
2021/03/03
[ "https://iot.stackexchange.com/questions/5576", "https://iot.stackexchange.com", "https://iot.stackexchange.com/users/12426/" ]
Many millions of products are shipped with batteries every day. What rules will apply will depend on a factors you have not included (shipping method, size of battery, type of packing, number of units in a consignment...) I suggest you talk to the courier you intend to use.
You can ship as so many electronic devices shipped internationally, so that you too can but do it with proper safety measures, if you done that then you are free to grow your business, or else ***<https://batteryshipping.cc/how-to-ship-lithium-battery/?gclid=CjwKCAiAp4KCBhB6EiwAxRxbpNrD85WQahUOLKAwmY6aSeHGSkdeDNl47_Jdu...
5,576
I want to distribute an IoT product commercially. The product is powered by LiPo battery (3.7V nominal) ‎which is charged by solar panel (6V, 2W). ‎ My question is can I ship the product (internationally) with LiPo battery included? Are there any ‎regulations against it? What is the usual practice in similar case?‎ Do ...
2021/03/03
[ "https://iot.stackexchange.com/questions/5576", "https://iot.stackexchange.com", "https://iot.stackexchange.com/users/12426/" ]
ICAO and IATA have quite a number of resources on the topic. <https://www.iata.org/en/programs/cargo/dgr/lithium-batteries/> is an intro page with links to many other documents, including the 2021 [Lithium Battery Guidance Document](https://www.iata.org/contentassets/05e6d8742b0047259bf3a700bc9d42b9/lithium-battery-gu...
You can ship as so many electronic devices shipped internationally, so that you too can but do it with proper safety measures, if you done that then you are free to grow your business, or else ***<https://batteryshipping.cc/how-to-ship-lithium-battery/?gclid=CjwKCAiAp4KCBhB6EiwAxRxbpNrD85WQahUOLKAwmY6aSeHGSkdeDNl47_Jdu...
54,274,091
getting an array index out of a bound exception in below code. I have tried to put the error line inside try-catch, putting try catch also throwing an error in eclipse. can anyone pls tell me what I am doing wrong. Error: ``` "Multiple markers at this line - Syntax error on token "try", invalid Modifiers - Syntax ...
2019/01/20
[ "https://Stackoverflow.com/questions/54274091", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4813237/" ]
The syntax for a try / catch is like this: ``` try { // statements } catch(Exception e) { // more statements } ``` Your code *appears* to have a constructor declaration ``` public hashMapimpl() { table = new Entry[5]; } ``` where there should be statements. That's not valid Java. And it makes little ...
You can't have arrays of generic classes. Java simply doesn't support it. See this answer for using collections as a alternative. <https://stackoverflow.com/a/7131673/7260643>
27,260,140
I am attempting to make a table directive that will have some more advanced functionality but when I was writing the basic version to build from I came across something I don't understand. I have a directive named "njTable" When I use it as an Attribute it works: ``` <body ng-app="tableTest"> <div ng-controller="m...
2014/12/02
[ "https://Stackoverflow.com/questions/27260140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1558851/" ]
The reason your directive does not function as an element is because the browser renders the HTML before Angular runs and purges any invalidly placed elements. In your example you have: ``` <nj-body> <tr> ``` The above is invalid HTML because only a TABLE, THEAD, TFOOT, or TBODY element are a valid parent eleme...
When I looked at your (broken) plunker link chrome console was throwing this error: ``` Error: error:tplrt Invalid Template Root Template for directive 'njTable' must have exactly one root element. ``` which linked to this angularjs page: [Angularjs Error Link](https://docs.angularjs.org/error/$compile/tplrt?p0=njT...
70,036,347
I'm a beginner in HTML/CSS and I have 4 DIVs with some text and a button as in the picture below: [![Fullscreen](https://i.stack.imgur.com/GshEP.png)](https://i.stack.imgur.com/GshEP.png) When I resize the windows and the text goes on multiple lines the buttons aren't on the same line. How can I fix this? [![Halfscr...
2021/11/19
[ "https://Stackoverflow.com/questions/70036347", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11264787/" ]
if you want to apply RWD (Responsive Web Design) you *shouldn't* use floats. Use Flexbox or Grid instead. Also, try not to use fixed heights or widths because that prevents responsiveness and tend to overflow elements. Typically, we start showing stacked elements and progressively transform them in columns as the size...
First of all, you can add the font-size in your CSS. You nedd to add the media query even for your buttons. If you are a beginner, bootstrap is a nice solution for you to have responsiveness. But for your buttons, if you want that they be responsive, you can put the size in % and not in pixels. Your btn\_back class is ...
919,491
If we consider a function: $f\left(x\right)=\dfrac{x-1}{2x^2-7x+5}$ This function is not defined at x=1 and x=5/2. So if we differentiate this function by u/v method we have: $\dfrac{d}{dx}\left(\frac{x-1}{2x^2-7x+5}\right)$=$\dfrac{1\left(2x^2-7x+5\right)-\left(4x-7\right)\left(x-1\right)}{\left(2x^2-7x+5\right)^2}...
2014/09/04
[ "https://math.stackexchange.com/questions/919491", "https://math.stackexchange.com", "https://math.stackexchange.com/users/161425/" ]
The second derivative is not defined at $1$ because $f(x)$ is not defined at $1$. Your cancellation of the common term $x-1$ is allowed, provided $x\neq 1$. $$\frac{(x-1)}{(x-1)(2x-5)} \overset{x\neq 1}{ = }\frac 1{2x-5}$$ The left-hand side and the right-hand side agree everywhere *except at $x=1$*, where the denom...
However, this kind of point is of absolutely no use except when answering silly questions, because the limit as $x\to 1$ is the same in both cases. In practice if you have an oddball point $x\_0$ where a function is technically undefined, but the left and right limits as $x\to x\_0$ of $f(x)$ are the same, then you aut...
919,491
If we consider a function: $f\left(x\right)=\dfrac{x-1}{2x^2-7x+5}$ This function is not defined at x=1 and x=5/2. So if we differentiate this function by u/v method we have: $\dfrac{d}{dx}\left(\frac{x-1}{2x^2-7x+5}\right)$=$\dfrac{1\left(2x^2-7x+5\right)-\left(4x-7\right)\left(x-1\right)}{\left(2x^2-7x+5\right)^2}...
2014/09/04
[ "https://math.stackexchange.com/questions/919491", "https://math.stackexchange.com", "https://math.stackexchange.com/users/161425/" ]
The second derivative is not defined at $1$ because $f(x)$ is not defined at $1$. Your cancellation of the common term $x-1$ is allowed, provided $x\neq 1$. $$\frac{(x-1)}{(x-1)(2x-5)} \overset{x\neq 1}{ = }\frac 1{2x-5}$$ The left-hand side and the right-hand side agree everywhere *except at $x=1$*, where the denom...
Remembering two general principles may help in these situations that invariably come up in first calculus classes. (1) The common rules for differentiating functions are applicable *only* when a "well defined" qualifier holds: the independent variable (your x) must be restricted to values which lie in the domain of eac...
44,832,630
Swift Playground provided the following code. The code's return causes the image placed upon touch to be spaced out. How does the function work when the return value is not specified and the return keyword is not followed with anything? Is there a default return value and type when nothing is not specified? Also when I...
2017/06/29
[ "https://Stackoverflow.com/questions/44832630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7193580/" ]
The `return` here simply short-circuits the method so that it stops if the `previousPlaceDistance` is less than 50. It doesn't have to return a value; in fact, it *can't* return a value if no return type was specified for the function. It is precisely this kind of short-circuiting where `guard` would be ideal, i.e. `...
This function does not need to return anything in the function definition. So simply calling `return` in enough in this case. For example a function that need to return a string will look like this. In this case, you will have to return a string in your `return` statement. Functions without that `-> ...` line means th...
44,832,630
Swift Playground provided the following code. The code's return causes the image placed upon touch to be spaced out. How does the function work when the return value is not specified and the return keyword is not followed with anything? Is there a default return value and type when nothing is not specified? Also when I...
2017/06/29
[ "https://Stackoverflow.com/questions/44832630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7193580/" ]
The `return` here simply short-circuits the method so that it stops if the `previousPlaceDistance` is less than 50. It doesn't have to return a value; in fact, it *can't* return a value if no return type was specified for the function. It is precisely this kind of short-circuiting where `guard` would be ideal, i.e. `...
Where no explicit return type is given [a function or method returns Void](https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Functions.html) > > The type of this function is () -> Void, or “a function that has no > parameters, and returns Void.” > > > The retur...
44,832,630
Swift Playground provided the following code. The code's return causes the image placed upon touch to be spaced out. How does the function work when the return value is not specified and the return keyword is not followed with anything? Is there a default return value and type when nothing is not specified? Also when I...
2017/06/29
[ "https://Stackoverflow.com/questions/44832630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7193580/" ]
This function does not need to return anything in the function definition. So simply calling `return` in enough in this case. For example a function that need to return a string will look like this. In this case, you will have to return a string in your `return` statement. Functions without that `-> ...` line means th...
Where no explicit return type is given [a function or method returns Void](https://developer.apple.com/library/content/documentation/Swift/Conceptual/Swift_Programming_Language/Functions.html) > > The type of this function is () -> Void, or “a function that has no > parameters, and returns Void.” > > > The retur...
9,427,628
I'm trying to package a web application as a runnable JAR file with Maven. The *jar-with-dependencies* assembly takes care of including all the dependencies, but I still need to include *src/main/webapp*. I managed to add the directory to my JAR with a custom assembly: ``` <assembly xmlns="http://maven.apache.org/plu...
2012/02/24
[ "https://Stackoverflow.com/questions/9427628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/368405/" ]
> > My assembly is apparently removing them > > > I'm guessing it's the other way around, it's *not adding* them. Your class files are inside target/classes and they need to go inside target/webapp/WEB-INF/classes. I'm guessing you need another rule like this: ``` <fileSet> <directory>target/classes</directo...
You classes will be generated in **${project.build.directory}/classes** (/target/classes probably). Therefore, you should use that folder as source directory. Try to change `<directory>src/main/webapp</directory>` into `<directory>{project.build.directory}/classes</directory>`
9,427,628
I'm trying to package a web application as a runnable JAR file with Maven. The *jar-with-dependencies* assembly takes care of including all the dependencies, but I still need to include *src/main/webapp*. I managed to add the directory to my JAR with a custom assembly: ``` <assembly xmlns="http://maven.apache.org/plu...
2012/02/24
[ "https://Stackoverflow.com/questions/9427628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/368405/" ]
You classes will be generated in **${project.build.directory}/classes** (/target/classes probably). Therefore, you should use that folder as source directory. Try to change `<directory>src/main/webapp</directory>` into `<directory>{project.build.directory}/classes</directory>`
Alternately, you could add the following in your assembly descriptor. This would take care of not only putting the class files, but also the webapp contents, assuming your maven project is building a webapp. ``` ... <dependencySets> <dependencySet> <useProjectArtifact>true</useProjectArtifact> </depend...
9,427,628
I'm trying to package a web application as a runnable JAR file with Maven. The *jar-with-dependencies* assembly takes care of including all the dependencies, but I still need to include *src/main/webapp*. I managed to add the directory to my JAR with a custom assembly: ``` <assembly xmlns="http://maven.apache.org/plu...
2012/02/24
[ "https://Stackoverflow.com/questions/9427628", "https://Stackoverflow.com", "https://Stackoverflow.com/users/368405/" ]
> > My assembly is apparently removing them > > > I'm guessing it's the other way around, it's *not adding* them. Your class files are inside target/classes and they need to go inside target/webapp/WEB-INF/classes. I'm guessing you need another rule like this: ``` <fileSet> <directory>target/classes</directo...
Alternately, you could add the following in your assembly descriptor. This would take care of not only putting the class files, but also the webapp contents, assuming your maven project is building a webapp. ``` ... <dependencySets> <dependencySet> <useProjectArtifact>true</useProjectArtifact> </depend...
6,692,453
i am having this strange problem... i had to capture the screen data and convert it into an image using the following code..this code is working fine over iphone/ipad simulator and on iphone device but not on iPad only . iphone device is having ios version 3.1.1 and ipad is ios 4.2... ``` - (UIImage *)screenshotImage ...
2011/07/14
[ "https://Stackoverflow.com/questions/6692453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/683311/" ]
Those two lines don't match ``` NSInteger myDataLength = backingWidth * backingHeight * 4; glReadPixels(0, 0, backingWidth, backingHeight, GL_RGBA4, GL_UNSIGNED_BYTE, buffer); ``` `GL_RGB4` means *4 bits per channel*, however you're allocating for 8 bits per channel. The proper token is `GL_RGB8`. On the iPhone `GL...
for ios 4 or later i m using Multi-Sampling technique for anti-aliasing ....glReadpixels() cannot read directly from multiSampled FBO you need to resolve it to Single sampled buffer and then try reading it...Please refer to the following post :- [Reading data using glReadPixel() with multisampling](https://stackoverfl...
6,692,453
i am having this strange problem... i had to capture the screen data and convert it into an image using the following code..this code is working fine over iphone/ipad simulator and on iphone device but not on iPad only . iphone device is having ios version 3.1.1 and ipad is ios 4.2... ``` - (UIImage *)screenshotImage ...
2011/07/14
[ "https://Stackoverflow.com/questions/6692453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/683311/" ]
Those two lines don't match ``` NSInteger myDataLength = backingWidth * backingHeight * 4; glReadPixels(0, 0, backingWidth, backingHeight, GL_RGBA4, GL_UNSIGNED_BYTE, buffer); ``` `GL_RGB4` means *4 bits per channel*, however you're allocating for 8 bits per channel. The proper token is `GL_RGB8`. On the iPhone `GL...
Screenshot from openGL ES apple documentation ``` - (UIImage*)snapshot:(UIView*)eaglview { GLint backingWidth, backingHeight; // Bind the color renderbuffer used to render the OpenGL ES view // If your application only creates a single color renderbuffer which is already bound at this point, // this ...
51,815,542
I am currently doing a project and I am having issues with heroku. Here is the mistake that always pops up when I try to use a heroku command. [Error in question](https://i.stack.imgur.com/bEQ0m.png) For those of you who have had the same error, what is the possible cause for this? Thanks in advance!
2018/08/13
[ "https://Stackoverflow.com/questions/51815542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9867507/" ]
The error is for missing `app name`. You must provide your app name that you want to run. Your command should be like below: `heroku run -a YOUR_APP_NAME_HERE` or `heroku run --app YOUR_APP_NAME_HERE`
Simply Do this, **cd App\_name/** and then navigate to bash ***heroku run bash***
51,815,542
I am currently doing a project and I am having issues with heroku. Here is the mistake that always pops up when I try to use a heroku command. [Error in question](https://i.stack.imgur.com/bEQ0m.png) For those of you who have had the same error, what is the possible cause for this? Thanks in advance!
2018/08/13
[ "https://Stackoverflow.com/questions/51815542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9867507/" ]
The error is for missing `app name`. You must provide your app name that you want to run. Your command should be like below: `heroku run -a YOUR_APP_NAME_HERE` or `heroku run --app YOUR_APP_NAME_HERE`
The error is basically telling you `Heroku` needs to know which app you want to run. So you should provide the name of the app as in below: ``` heroku run -a app_name ``` or you can also use the flag `--app` like below: ``` heroku run --app app_name ```
51,815,542
I am currently doing a project and I am having issues with heroku. Here is the mistake that always pops up when I try to use a heroku command. [Error in question](https://i.stack.imgur.com/bEQ0m.png) For those of you who have had the same error, what is the possible cause for this? Thanks in advance!
2018/08/13
[ "https://Stackoverflow.com/questions/51815542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9867507/" ]
* Initialise with git: `git init` * Get the app name: `heroku apps` * Add remote: ``` heroku git:remote -a your_app_name ``` Edit: You can also run commands without permanently adding the app `heroku run -a your_app_name`
I was getting the same kind of error every time I tried creating a variable. I was able to fix it by running these commands: ``` heroku git:remote -a <your_heroku_app_name> heroku config:set <variable_name=value> ```
51,815,542
I am currently doing a project and I am having issues with heroku. Here is the mistake that always pops up when I try to use a heroku command. [Error in question](https://i.stack.imgur.com/bEQ0m.png) For those of you who have had the same error, what is the possible cause for this? Thanks in advance!
2018/08/13
[ "https://Stackoverflow.com/questions/51815542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9867507/" ]
* Initialise with git: `git init` * Get the app name: `heroku apps` * Add remote: ``` heroku git:remote -a your_app_name ``` Edit: You can also run commands without permanently adding the app `heroku run -a your_app_name`
The reason i got this error is that i am running heroku command out of my project location. After setting the project location in command prompt and run heroku command. Everything works perfectly
51,815,542
I am currently doing a project and I am having issues with heroku. Here is the mistake that always pops up when I try to use a heroku command. [Error in question](https://i.stack.imgur.com/bEQ0m.png) For those of you who have had the same error, what is the possible cause for this? Thanks in advance!
2018/08/13
[ "https://Stackoverflow.com/questions/51815542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9867507/" ]
Simply Do this, **cd App\_name/** and then navigate to bash ***heroku run bash***
I was getting the same kind of error every time I tried creating a variable. I was able to fix it by running these commands: ``` heroku git:remote -a <your_heroku_app_name> heroku config:set <variable_name=value> ```
51,815,542
I am currently doing a project and I am having issues with heroku. Here is the mistake that always pops up when I try to use a heroku command. [Error in question](https://i.stack.imgur.com/bEQ0m.png) For those of you who have had the same error, what is the possible cause for this? Thanks in advance!
2018/08/13
[ "https://Stackoverflow.com/questions/51815542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9867507/" ]
* Initialise with git: `git init` * Get the app name: `heroku apps` * Add remote: ``` heroku git:remote -a your_app_name ``` Edit: You can also run commands without permanently adding the app `heroku run -a your_app_name`
The error is basically telling you `Heroku` needs to know which app you want to run. So you should provide the name of the app as in below: ``` heroku run -a app_name ``` or you can also use the flag `--app` like below: ``` heroku run --app app_name ```
51,815,542
I am currently doing a project and I am having issues with heroku. Here is the mistake that always pops up when I try to use a heroku command. [Error in question](https://i.stack.imgur.com/bEQ0m.png) For those of you who have had the same error, what is the possible cause for this? Thanks in advance!
2018/08/13
[ "https://Stackoverflow.com/questions/51815542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9867507/" ]
Yeah this worked pretty fine for just type in: ``` heroku apps ``` the app name will appear then just type in: ``` heroku addons:add heroku-postgresql:hobby-dev --app YOUR_APP_NAME ``` You can also name it from the first beginning when creating it just provide the app name like so: ``` heroku create YOUR_APP_NAM...
I was getting the same kind of error every time I tried creating a variable. I was able to fix it by running these commands: ``` heroku git:remote -a <your_heroku_app_name> heroku config:set <variable_name=value> ```
51,815,542
I am currently doing a project and I am having issues with heroku. Here is the mistake that always pops up when I try to use a heroku command. [Error in question](https://i.stack.imgur.com/bEQ0m.png) For those of you who have had the same error, what is the possible cause for this? Thanks in advance!
2018/08/13
[ "https://Stackoverflow.com/questions/51815542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9867507/" ]
When you create a Heroku app with ``` heroku create my-app ``` you need to provide the flag (`-a`, `--app`) to the add-on installation ``` heroku addons:create heroku-postgresql:hobby-dev --app my-app ```
I was getting the same kind of error every time I tried creating a variable. I was able to fix it by running these commands: ``` heroku git:remote -a <your_heroku_app_name> heroku config:set <variable_name=value> ```
51,815,542
I am currently doing a project and I am having issues with heroku. Here is the mistake that always pops up when I try to use a heroku command. [Error in question](https://i.stack.imgur.com/bEQ0m.png) For those of you who have had the same error, what is the possible cause for this? Thanks in advance!
2018/08/13
[ "https://Stackoverflow.com/questions/51815542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9867507/" ]
* Initialise with git: `git init` * Get the app name: `heroku apps` * Add remote: ``` heroku git:remote -a your_app_name ``` Edit: You can also run commands without permanently adding the app `heroku run -a your_app_name`
I had the same problem and all it required was getting into the app directory, in the app.js level
51,815,542
I am currently doing a project and I am having issues with heroku. Here is the mistake that always pops up when I try to use a heroku command. [Error in question](https://i.stack.imgur.com/bEQ0m.png) For those of you who have had the same error, what is the possible cause for this? Thanks in advance!
2018/08/13
[ "https://Stackoverflow.com/questions/51815542", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9867507/" ]
I had the same problem and all it required was getting into the app directory, in the app.js level
adding postgres to your app: ``` heroku addons:add heroku-postgresql:hobby-dev --app PROJECT_NAME ```
171,901
Looking at buying a house that is on Sepctic and a private Well. Got the well inspection back, and failed for Total Coliform (Ecoli and Nitrate Level are fine). The septic is on the other side of the home, and has a ~20 foot elevation difference, so that isn't the major concern in my mind...How concerned would this fai...
2019/08/23
[ "https://diy.stackexchange.com/questions/171901", "https://diy.stackexchange.com", "https://diy.stackexchange.com/users/103064/" ]
The home I have also failed , we bleached the well heavily followed by a heavy flush, the new numbers came back ok but I also added a UV & filter system, the filter is a simple string filter that I change every 6 months. The UV lamp module I have changed 3 times. The UV lamps are kind of spendy so if you can check on r...
The failed test would bother me a lot. I live in a rural part of the country and we’ve installed a lot of septic and well systems. None fail. There’s a reason for the failed test. If the septic system is about to fail, it could be diverting sewer water towards the well. (Water flows in the direction of least resistan...
55,571,457
I've got an app that communicates with Drive (specifically TeamDrives) and I need to pull a hierarchical folder structure within a given TeamDrive. I can list my available TeamDrives then get the files (filter: folders mime type) within them but there doesn't seem to be any `parent` info to each folder so my structur...
2019/04/08
[ "https://Stackoverflow.com/questions/55571457", "https://Stackoverflow.com", "https://Stackoverflow.com/users/674906/" ]
You can use [`object-fit: cover`](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit). ```css div { width: 300px; height: 400px; background: lightgreen; } img { width: 100%; height: 400px; content: url(https://c81s22ku6ih1er8af18cv13c-wpengine.netdna-ssl.com/wp-content/uploads/2015/04/Lio...
Have you tried using % instead of px? And also, I would add a `margin: 0;` to the body. That would get rid of the white spaces around the image. ```css div { width: 100%; height: 100%; background: lightgreen; } img { width: 100%; height: 100%; content: url(https://c81s22ku6ih1er8af18cv13c-wpengine.ne...
1,150,368
I was just looking over EveryBlock's source code and I noticed this code in the alerts/models.py code: ``` def _get_user(self): if not hasattr(self, '_user_cache'): from ebpub.accounts.models import User try: self._user_cache = User.objects.get(id=self.user_id) except User.D...
2009/07/19
[ "https://Stackoverflow.com/questions/1150368", "https://Stackoverflow.com", "https://Stackoverflow.com/users/85271/" ]
I don't know why this is an IntegerField; it looks like it definitely should be a ForeignKey(User) field--you lose things like select\_related() here and other things because of that, too. As to the caching, many databases don't cache results--they (or rather, the OS) will cache the data on disk needed to get the resu...
Although databases do cache things internally, there's still an overhead in going back to the db every time you want to check the value of a related field - setting up the query within Django, the network latency in connecting to the db and returning the data over the network, instantiating the object in Django, etc. I...
48,278,204
I need to parse through a page by jsoup with elements tag `div`, `h3`, `a`, etc. I want to parse through the `div.g` element and get the text of these classes: `a class="l _PMs"` and `a class="_pJs"` to be displayed in `jList`. As an example taken from Google News, the page looks like this: ``` <div class="g"> <d...
2018/01/16
[ "https://Stackoverflow.com/questions/48278204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7146946/" ]
> > SOLUTION > > > Idk how I came to this solution, but it was quite simple! We don't really need this amount of crazy conditions, it requires just some time to achieve correctly math logic. ``` if(isset($request['minFilter']) && isset($request['maxFilter'])) { $minFilter = (int) $request['minFilter']; $maxFi...
If I understood you correctly, you want this: ``` if ($request->minSalary && $request->maxSalary) { $query->where(function($q) { $q->where('minSalary', '>=', request('minSalary')) ->where('maxSalary', '<=', request('minSalary')); }) ->orWhere(function($q) { $q->where('minSalary', ...
48,278,204
I need to parse through a page by jsoup with elements tag `div`, `h3`, `a`, etc. I want to parse through the `div.g` element and get the text of these classes: `a class="l _PMs"` and `a class="_pJs"` to be displayed in `jList`. As an example taken from Google News, the page looks like this: ``` <div class="g"> <d...
2018/01/16
[ "https://Stackoverflow.com/questions/48278204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7146946/" ]
> > SOLUTION > > > Idk how I came to this solution, but it was quite simple! We don't really need this amount of crazy conditions, it requires just some time to achieve correctly math logic. ``` if(isset($request['minFilter']) && isset($request['maxFilter'])) { $minFilter = (int) $request['minFilter']; $maxFi...
I am extending **@AlexeyMezenin's**, may be you are looking for this- ``` $query = $query->where((function ($q) use ($minFilter, $maxFilter) { $q->orWhereBetween('minSalary', [$minFilter, $maxFilter]); $q->orWhereBetween('maxSalary', [$minFilter, $maxFilter]); })) ->orWhere((function ($q) u...
48,278,204
I need to parse through a page by jsoup with elements tag `div`, `h3`, `a`, etc. I want to parse through the `div.g` element and get the text of these classes: `a class="l _PMs"` and `a class="_pJs"` to be displayed in `jList`. As an example taken from Google News, the page looks like this: ``` <div class="g"> <d...
2018/01/16
[ "https://Stackoverflow.com/questions/48278204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7146946/" ]
> > SOLUTION > > > Idk how I came to this solution, but it was quite simple! We don't really need this amount of crazy conditions, it requires just some time to achieve correctly math logic. ``` if(isset($request['minFilter']) && isset($request['maxFilter'])) { $minFilter = (int) $request['minFilter']; $maxFi...
Try this ``` $query->where(function($q) use($minSalary, $maxSalary){ $q->where('min_salary', '>=', $minSalary) ->orWhere('max_salary', '>=', $minSalary); } ->where('min_salary', '<=', $maxSalary) ->get() ``` It satisfy these four constraints 1. John : 3500-5500 - IS A MATCH because...
48,278,204
I need to parse through a page by jsoup with elements tag `div`, `h3`, `a`, etc. I want to parse through the `div.g` element and get the text of these classes: `a class="l _PMs"` and `a class="_pJs"` to be displayed in `jList`. As an example taken from Google News, the page looks like this: ``` <div class="g"> <d...
2018/01/16
[ "https://Stackoverflow.com/questions/48278204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7146946/" ]
> > SOLUTION > > > Idk how I came to this solution, but it was quite simple! We don't really need this amount of crazy conditions, it requires just some time to achieve correctly math logic. ``` if(isset($request['minFilter']) && isset($request['maxFilter'])) { $minFilter = (int) $request['minFilter']; $maxFi...
try this ``` $query->where(function($query) use($minSalary=0, $maxSalary=0){ if($minSalary){ $query->where('min_salary', '>=', $minSalary); } if($maxSalary){ $query->where('max_salary', '<=', $maxSalary); } })->get(); ```
6,307,388
I recently switched to IIS Express for asp.net developement but I don't understand that clicking on "Use IIS Express..." (contextual menu on project in Visual Studio) affects the .csproj file... The problem is when I commit changes (Source Control) I also commit the new IIS Express configuration and this is, in my opi...
2011/06/10
[ "https://Stackoverflow.com/questions/6307388", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146070/" ]
Unfortunately, these project settings are how VS can tell whether to use Cassini or IIS Express. However, you can choose to save the project server settings in the proj.user file, so that they will not be checked in to source control. Under project Properties -> Web, you can unselect the "Apply server settings to all u...
Just an extra comment to the accepted answer... You may find it difficult for Visual Studio 2010 to accept that change as relevant for check-in and have it annoyingly ignore your change saying that no relevant changes happened yadda yadda. In that case, just brute-force check it in using the Team Explorer (just the csp...
308,245
I'm trying to find a proper word for russian 'шатать' (to cause a wobble, to sway, to rock) in context of causing possible damage or instability due to unexpected movements. The literal meaning of the question I'm trying to translate is 'who make changes in the stand and unintentionally cause something to become unsta...
2022/01/27
[ "https://ell.stackexchange.com/questions/308245", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/13849/" ]
You're absolutely correct that 'wobble' is both a verb for the action of wobbling *and* causing something else to wobble. "I wobbled the stand" is fine. This is very common with English verbs: * I shook the tree / the tree shook * I moved the table / the table moved * I wobbled my tooth / my tooth is wobbling
A wobble is a specific type of cyclical, circular motion. A spinning plate wobbles as it settles down onto a flat surface. A spinning top wobbles as it slows down and no longer spins on a perfectly vertical axis. Just ask an astronomer -- the earth and many celestial bodies have a wobble, and these can be so precisely ...
308,245
I'm trying to find a proper word for russian 'шатать' (to cause a wobble, to sway, to rock) in context of causing possible damage or instability due to unexpected movements. The literal meaning of the question I'm trying to translate is 'who make changes in the stand and unintentionally cause something to become unsta...
2022/01/27
[ "https://ell.stackexchange.com/questions/308245", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/13849/" ]
You're absolutely correct that 'wobble' is both a verb for the action of wobbling *and* causing something else to wobble. "I wobbled the stand" is fine. This is very common with English verbs: * I shook the tree / the tree shook * I moved the table / the table moved * I wobbled my tooth / my tooth is wobbling
Further to @Fumble Fingers' comment - the Oxford English Dictionary lists five senses, and four sub-senses of the verb ***to wobble***. All of them are described as *intransitive*, save one - sense 1e - which is *transitive*. > > 1e. e. transitive. To cause to move or rock unsteadily from side to > side or backwards ...
308,245
I'm trying to find a proper word for russian 'шатать' (to cause a wobble, to sway, to rock) in context of causing possible damage or instability due to unexpected movements. The literal meaning of the question I'm trying to translate is 'who make changes in the stand and unintentionally cause something to become unsta...
2022/01/27
[ "https://ell.stackexchange.com/questions/308245", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/13849/" ]
Further to @Fumble Fingers' comment - the Oxford English Dictionary lists five senses, and four sub-senses of the verb ***to wobble***. All of them are described as *intransitive*, save one - sense 1e - which is *transitive*. > > 1e. e. transitive. To cause to move or rock unsteadily from side to > side or backwards ...
A wobble is a specific type of cyclical, circular motion. A spinning plate wobbles as it settles down onto a flat surface. A spinning top wobbles as it slows down and no longer spins on a perfectly vertical axis. Just ask an astronomer -- the earth and many celestial bodies have a wobble, and these can be so precisely ...
11,490,788
I'm writing a client-server program with Java RMI and I'm getting an error: > > java.security.AccessControlException: access denied ("java.net.SocketPermission" "127.0.0.1:1099" "connect,resolve") > > > My code looks like this: ``` package xxx; import java.rmi.Naming; import java.rmi.RemoteException; public cl...
2012/07/15
[ "https://Stackoverflow.com/questions/11490788", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1279334/" ]
I had forgot to add the registry and to implement Serializable. Problem solved. I also removed the SecurityManager.
You have installed a SecurityManager but you haven't granted yourself enough permissions to execute this code. Why do you think you need a SecurityManager at all? Unless you are planning to run uploaded code I would just get rid of it
32,622,851
I have to run automatically a batch file **once a week** to update a file. To do so I have created a task with Windows Task Scheduler on the company Server with the following options: * **Security Options:** user me, run only when user is logged in, Configure for Windows Server 2012 * **Trigger:** every Monday at 11.0...
2015/09/17
[ "https://Stackoverflow.com/questions/32622851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5091833/" ]
If you access it via .input or .uiTextareaAutogrow (knowing that these are the existing classes currently for the same element) you are gonna get your textarea in both cases but the selection set might differ since the elements of class input set might be different than the elements of the class uiTextareaAutogrow set.
It does not actually differ what class to access, `class` groups HTML elements for a certain reason like formatting or display or any specific business functionality to be applied for this set. So the class selection gets you all the elements having this class. If you access it via `.input` or `.uiTextareaAutogrow` (...
8,781,516
I'm trying to make a News Feed and I'm stuck. Let's say I have this MySQL table with some data called table `friends`: and let's say I have this for statuses called table `status` And for example, my user id corrolates with `friend_1` or `friend_2` on `friends` and `uid` for `status`. What MySQL query would I need t...
2012/01/08
[ "https://Stackoverflow.com/questions/8781516", "https://Stackoverflow.com", "https://Stackoverflow.com/users/272501/" ]
``` SELECT status.* FROM status, friends WHERE (friend_2 = uid AND friend_1 = <your_id>) OR (friend_1 = uid AND friend_2 = <your_id>); ``` In case on eevery friendship insert 2 rows ( and ) - you don't need the `OR (...)`
This will select all statuses for friends of current user. ``` SELECT s.* FROM status s INNER JOIN friends f ON f.friend_2 = s.uid WHERE f.friend_1 = your_current_user; ``` Also I recommend not to treat friendship links bidirectional. Make separate links. For example, if users 1 and 5 are friends, you'll have two re...
70,529
In order to know how many times a pattern exists in current buffer, I do: ``` :%s/pattern-here/pattern-here/g ``` It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status. Is there a more elegant way to count?
2008/09/16
[ "https://Stackoverflow.com/questions/70529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6984/" ]
``` :help count-items ``` In VIM 6.3, here's how you do it. ``` :set report=0 :%s/your_word/&/g # returns the count without substitution ``` In VIM 7.2, here's how you'd do it: ``` :%s/your_word/&/gn # returns the count, n flag avoids substitution ```
The vimscript [IndexedSearch](http://www.vim.org/scripts/script.php?script_id=1682) enhances the Vim search commands to display "At match #N out of M matches".
70,529
In order to know how many times a pattern exists in current buffer, I do: ``` :%s/pattern-here/pattern-here/g ``` It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status. Is there a more elegant way to count?
2008/09/16
[ "https://Stackoverflow.com/questions/70529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6984/" ]
Put the cursor on the word you want to count and execute the following. ``` :%s/<c-r><c-w>//gn ``` See `:h c_ctrl-r_ctrl-w`
vimgrep is your friend here: ``` vimgrep pattern % ``` Shows: ``` (1 of 37) ```
70,529
In order to know how many times a pattern exists in current buffer, I do: ``` :%s/pattern-here/pattern-here/g ``` It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status. Is there a more elegant way to count?
2008/09/16
[ "https://Stackoverflow.com/questions/70529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6984/" ]
``` :help count-items ``` In VIM 6.3, here's how you do it. ``` :set report=0 :%s/your_word/&/g # returns the count without substitution ``` In VIM 7.2, here's how you'd do it: ``` :%s/your_word/&/gn # returns the count, n flag avoids substitution ```
Put the cursor on the word you want to count and execute the following. ``` :%s/<c-r><c-w>//gn ``` See `:h c_ctrl-r_ctrl-w`
70,529
In order to know how many times a pattern exists in current buffer, I do: ``` :%s/pattern-here/pattern-here/g ``` It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status. Is there a more elegant way to count?
2008/09/16
[ "https://Stackoverflow.com/questions/70529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6984/" ]
To avoid the substitution, leave the second pattern empty, and add the “n” flag: ``` :%s/pattern-here//gn ``` This is described as [an official tip](http://vimdoc.sourceforge.net/htmldoc/tips.html#count-items).
The vimscript [IndexedSearch](http://www.vim.org/scripts/script.php?script_id=1682) enhances the Vim search commands to display "At match #N out of M matches".
70,529
In order to know how many times a pattern exists in current buffer, I do: ``` :%s/pattern-here/pattern-here/g ``` It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status. Is there a more elegant way to count?
2008/09/16
[ "https://Stackoverflow.com/questions/70529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6984/" ]
``` :!cat %| grep -c "pattern" ``` It's not exactly vim command, but it will give you what you need from vim. You can map it to the command if you need to use it frequently.
The vimscript [IndexedSearch](http://www.vim.org/scripts/script.php?script_id=1682) enhances the Vim search commands to display "At match #N out of M matches".
70,529
In order to know how many times a pattern exists in current buffer, I do: ``` :%s/pattern-here/pattern-here/g ``` It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status. Is there a more elegant way to count?
2008/09/16
[ "https://Stackoverflow.com/questions/70529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6984/" ]
``` :!cat %| grep -c "pattern" ``` It's not exactly vim command, but it will give you what you need from vim. You can map it to the command if you need to use it frequently.
Put the cursor on the word you want to count and execute the following. ``` :%s/<c-r><c-w>//gn ``` See `:h c_ctrl-r_ctrl-w`
70,529
In order to know how many times a pattern exists in current buffer, I do: ``` :%s/pattern-here/pattern-here/g ``` It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status. Is there a more elegant way to count?
2008/09/16
[ "https://Stackoverflow.com/questions/70529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6984/" ]
To avoid the substitution, leave the second pattern empty, and add the “n” flag: ``` :%s/pattern-here//gn ``` This is described as [an official tip](http://vimdoc.sourceforge.net/htmldoc/tips.html#count-items).
Put the cursor on the word you want to count and execute the following. ``` :%s/<c-r><c-w>//gn ``` See `:h c_ctrl-r_ctrl-w`
70,529
In order to know how many times a pattern exists in current buffer, I do: ``` :%s/pattern-here/pattern-here/g ``` It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status. Is there a more elegant way to count?
2008/09/16
[ "https://Stackoverflow.com/questions/70529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6984/" ]
The vimscript [IndexedSearch](http://www.vim.org/scripts/script.php?script_id=1682) enhances the Vim search commands to display "At match #N out of M matches".
vimgrep is your friend here: ``` vimgrep pattern % ``` Shows: ``` (1 of 37) ```
70,529
In order to know how many times a pattern exists in current buffer, I do: ``` :%s/pattern-here/pattern-here/g ``` It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status. Is there a more elegant way to count?
2008/09/16
[ "https://Stackoverflow.com/questions/70529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6984/" ]
To avoid the substitution, leave the second pattern empty, and add the “n” flag: ``` :%s/pattern-here//gn ``` This is described as [an official tip](http://vimdoc.sourceforge.net/htmldoc/tips.html#count-items).
vimgrep is your friend here: ``` vimgrep pattern % ``` Shows: ``` (1 of 37) ```
70,529
In order to know how many times a pattern exists in current buffer, I do: ``` :%s/pattern-here/pattern-here/g ``` It gives the number of occurrences of the pattern, but is obviously cumbersome and also has the side-effect of setting the 'changed' status. Is there a more elegant way to count?
2008/09/16
[ "https://Stackoverflow.com/questions/70529", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6984/" ]
To avoid the substitution, leave the second pattern empty, and add the “n” flag: ``` :%s/pattern-here//gn ``` This is described as [an official tip](http://vimdoc.sourceforge.net/htmldoc/tips.html#count-items).
``` :!cat %| grep -c "pattern" ``` It's not exactly vim command, but it will give you what you need from vim. You can map it to the command if you need to use it frequently.
1,908
So considering that the oldest copies of the gospels are dated to around 400 AD (I'm thinking of the Codex Sinaiticus), how do scholars go about estimating the date of composition of the gospels? I mean I'm sure there are some textual clues; I mean I assume the usage of Koine would probably change somewhat over 300+ ye...
2012/06/07
[ "https://hermeneutics.stackexchange.com/questions/1908", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/388/" ]
Manuscript Evidence ------------------- While the [*Codex Sinaiticus*](http://codexsinaiticus.org/en/codex/significance.aspx) dates from the 4th century, other manuscript fragments date much earlier. The [Greek unical codices](http://en.wikipedia.org/wiki/Great_uncial_codices) provide important clues to the developmen...
As a preterist, I believe the entire canon was completed before the destruction of the Temple. Throughout the Old Testament, beginning with Noah's ark, the new house, the new Covenant "shelter," is always constructed before the destruction of the old. In fact, it is persecution from the old that generally tempers and h...
1,908
So considering that the oldest copies of the gospels are dated to around 400 AD (I'm thinking of the Codex Sinaiticus), how do scholars go about estimating the date of composition of the gospels? I mean I'm sure there are some textual clues; I mean I assume the usage of Koine would probably change somewhat over 300+ ye...
2012/06/07
[ "https://hermeneutics.stackexchange.com/questions/1908", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/388/" ]
Manuscript Evidence ------------------- While the [*Codex Sinaiticus*](http://codexsinaiticus.org/en/codex/significance.aspx) dates from the 4th century, other manuscript fragments date much earlier. The [Greek unical codices](http://en.wikipedia.org/wiki/Great_uncial_codices) provide important clues to the developmen...
There are 9 principal means by which the Gospels are dated. (and perhaps a dozen less-utilized means—we’ll stick with the 9 for now) **1. Synoptic problem** If the synoptic problem can tell us the order of composition of Matthew, Mark, and Luke, that would provide a relative dating among those 3 Gospels. Note that t...
1,908
So considering that the oldest copies of the gospels are dated to around 400 AD (I'm thinking of the Codex Sinaiticus), how do scholars go about estimating the date of composition of the gospels? I mean I'm sure there are some textual clues; I mean I assume the usage of Koine would probably change somewhat over 300+ ye...
2012/06/07
[ "https://hermeneutics.stackexchange.com/questions/1908", "https://hermeneutics.stackexchange.com", "https://hermeneutics.stackexchange.com/users/388/" ]
There are 9 principal means by which the Gospels are dated. (and perhaps a dozen less-utilized means—we’ll stick with the 9 for now) **1. Synoptic problem** If the synoptic problem can tell us the order of composition of Matthew, Mark, and Luke, that would provide a relative dating among those 3 Gospels. Note that t...
As a preterist, I believe the entire canon was completed before the destruction of the Temple. Throughout the Old Testament, beginning with Noah's ark, the new house, the new Covenant "shelter," is always constructed before the destruction of the old. In fact, it is persecution from the old that generally tempers and h...
32,720,276
I'm trying to disable the Save button as long as three specific fields are empty. One field is a simple input text box, the other is a dropdown list, and the last is a datepicker. This is what I've done so far: HTML: ``` <select id="mySelect"> <option value="0">A</option> <option value="1">B</option> <option value="...
2015/09/22
[ "https://Stackoverflow.com/questions/32720276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3097112/" ]
If you want to get the name of a function, why not pass it as parameter ? You can get the [fully qualified name of a function](https://stackoverflow.com/questions/3761628/clojure-fully-qualified-name-of-a-function) by using [`resolve`](https://clojuredocs.org/clojure.core/resolve). Your code would then be called like t...
No, there is no way to get the name of a function. Why? Because functions do not *have* names. They might be *bound* to names in some instances, but even when you define a name for a function, the function itself does not have a name. For example, if you run: ``` (macroexpand '(defn foo [])) ``` You wil get: ``` (...
8,150,997
I have a Java `String` that contains javascript code, and i need to extract all the javascript `var`s' names. So, for the following javasctipt: ``` var x; var a,b,c,d; var y = "wow"; var z = y + 'x'; ``` I need to get `"x,a,b,c,d,y,z"` as a result. I dont need to get their values, just their names.
2011/11/16
[ "https://Stackoverflow.com/questions/8150997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/905619/" ]
Something like the following: ``` List<String> vars = new ArrayList<String>(); Pattern p = Pattern.compile("^\\s*var\\s+(.*?)\\s*;?$"); BifferedReader reader = .... // create the reader String line = null; while ((line = reader.readLine()) != null) { Matcher m = p.matcher(line); if (m.find()) { vars....
I'm not sure whether this would be too convoluted, but I would probably get the BNF for Javascript (see [SO: Repository of BNF Grammars?](https://stackoverflow.com/questions/334479/repository-of-bnf-grammars)) and then use something like [ANTLR](http://www.antlr.org/) to create a parser for Javascript, which you can th...
8,150,997
I have a Java `String` that contains javascript code, and i need to extract all the javascript `var`s' names. So, for the following javasctipt: ``` var x; var a,b,c,d; var y = "wow"; var z = y + 'x'; ``` I need to get `"x,a,b,c,d,y,z"` as a result. I dont need to get their values, just their names.
2011/11/16
[ "https://Stackoverflow.com/questions/8150997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/905619/" ]
Well you can try and get the bindings that the execution of the script creates: ``` ScriptEngineManager mgr = new ScriptEngineManager(); ScriptEngine se = mgr.getEngineByName("JavaScript"); try { se.eval("var x;var a,b,c,d;var y = \"wow\";var z = y+'x';"); Bindings bindings = se.getBindings(ScriptContext.ENGI...
I'm not sure whether this would be too convoluted, but I would probably get the BNF for Javascript (see [SO: Repository of BNF Grammars?](https://stackoverflow.com/questions/334479/repository-of-bnf-grammars)) and then use something like [ANTLR](http://www.antlr.org/) to create a parser for Javascript, which you can th...
8,150,997
I have a Java `String` that contains javascript code, and i need to extract all the javascript `var`s' names. So, for the following javasctipt: ``` var x; var a,b,c,d; var y = "wow"; var z = y + 'x'; ``` I need to get `"x,a,b,c,d,y,z"` as a result. I dont need to get their values, just their names.
2011/11/16
[ "https://Stackoverflow.com/questions/8150997", "https://Stackoverflow.com", "https://Stackoverflow.com/users/905619/" ]
Well you can try and get the bindings that the execution of the script creates: ``` ScriptEngineManager mgr = new ScriptEngineManager(); ScriptEngine se = mgr.getEngineByName("JavaScript"); try { se.eval("var x;var a,b,c,d;var y = \"wow\";var z = y+'x';"); Bindings bindings = se.getBindings(ScriptContext.ENGI...
Something like the following: ``` List<String> vars = new ArrayList<String>(); Pattern p = Pattern.compile("^\\s*var\\s+(.*?)\\s*;?$"); BifferedReader reader = .... // create the reader String line = null; while ((line = reader.readLine()) != null) { Matcher m = p.matcher(line); if (m.find()) { vars....
13,894,386
I am getting this error from Nginx, but can't seem to figure it out! I am using codeigniter and am using the database for sessions. So I'm wondering how the header can ever be too big. Is there anyway to check what the header is? or potentially see what I can do to fix this error? Let me know if you need me to put up...
2012/12/15
[ "https://Stackoverflow.com/questions/13894386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/614443/" ]
I have proven that this is also sent when an invalid header is transmitted. Invalid characters or formatting of the HTTP headers, cookie expiration set back by more than a month, etc will all cause: upstream sent too big header while reading response header from upstream
I encountered this problem in the past (not using codeigniter but it happens whenever the responses contain a lot of header data) and got used to tweaking the buffers as suggested here, but recently I got bitten by this issue again and the buffers were apparently okay. Turned out it was spdy's fault which I was using ...
13,894,386
I am getting this error from Nginx, but can't seem to figure it out! I am using codeigniter and am using the database for sessions. So I'm wondering how the header can ever be too big. Is there anyway to check what the header is? or potentially see what I can do to fix this error? Let me know if you need me to put up...
2012/12/15
[ "https://Stackoverflow.com/questions/13894386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/614443/" ]
I have proven that this is also sent when an invalid header is transmitted. Invalid characters or formatting of the HTTP headers, cookie expiration set back by more than a month, etc will all cause: upstream sent too big header while reading response header from upstream
``` Problem: upstream sent too big header while reading response header from upstream Nginx with Magento 2 ``` ``` Solution: Replace given below setting into /nginx.conf.sample File ``` * fastcgi\_buffer\_size 4k; with * fastcgi\_buffer\_size 128k; * fastcgi\_buffers 4 256k; * fastcgi\_busy\_buffers\_size 256k;
13,894,386
I am getting this error from Nginx, but can't seem to figure it out! I am using codeigniter and am using the database for sessions. So I'm wondering how the header can ever be too big. Is there anyway to check what the header is? or potentially see what I can do to fix this error? Let me know if you need me to put up...
2012/12/15
[ "https://Stackoverflow.com/questions/13894386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/614443/" ]
Add this to your `http {}` of the **nginx.conf** file normally located at **/etc/nginx/nginx.conf**: ``` proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; ``` Then add this to your php location block, this will be located in your vhost file look for the block that begins with **locati...
I have proven that this is also sent when an invalid header is transmitted. Invalid characters or formatting of the HTTP headers, cookie expiration set back by more than a month, etc will all cause: upstream sent too big header while reading response header from upstream
13,894,386
I am getting this error from Nginx, but can't seem to figure it out! I am using codeigniter and am using the database for sessions. So I'm wondering how the header can ever be too big. Is there anyway to check what the header is? or potentially see what I can do to fix this error? Let me know if you need me to put up...
2012/12/15
[ "https://Stackoverflow.com/questions/13894386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/614443/" ]
I encountered this problem in the past (not using codeigniter but it happens whenever the responses contain a lot of header data) and got used to tweaking the buffers as suggested here, but recently I got bitten by this issue again and the buffers were apparently okay. Turned out it was spdy's fault which I was using ...
``` Problem: upstream sent too big header while reading response header from upstream Nginx with Magento 2 ``` ``` Solution: Replace given below setting into /nginx.conf.sample File ``` * fastcgi\_buffer\_size 4k; with * fastcgi\_buffer\_size 128k; * fastcgi\_buffers 4 256k; * fastcgi\_busy\_buffers\_size 256k;
13,894,386
I am getting this error from Nginx, but can't seem to figure it out! I am using codeigniter and am using the database for sessions. So I'm wondering how the header can ever be too big. Is there anyway to check what the header is? or potentially see what I can do to fix this error? Let me know if you need me to put up...
2012/12/15
[ "https://Stackoverflow.com/questions/13894386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/614443/" ]
Modify your nginx configuration and change/set the following directives: ``` proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; ```
``` Problem: upstream sent too big header while reading response header from upstream Nginx with Magento 2 ``` ``` Solution: Replace given below setting into /nginx.conf.sample File ``` * fastcgi\_buffer\_size 4k; with * fastcgi\_buffer\_size 128k; * fastcgi\_buffers 4 256k; * fastcgi\_busy\_buffers\_size 256k;
13,894,386
I am getting this error from Nginx, but can't seem to figure it out! I am using codeigniter and am using the database for sessions. So I'm wondering how the header can ever be too big. Is there anyway to check what the header is? or potentially see what I can do to fix this error? Let me know if you need me to put up...
2012/12/15
[ "https://Stackoverflow.com/questions/13894386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/614443/" ]
using nginx + fcgiwrap + request too long ----------------------------------------- I had the same problem because I use a nginx + fcgiwrap configuration: ``` location ~ ^.*\.cgi$ { fastcgi_pass unix:/var/run/fcgiwrap.sock; fastcgi_index index.cgi; fastcgi_param SCRIPT_FILENAME /opt/nginx/bugzilla/$fastc...
``` Problem: upstream sent too big header while reading response header from upstream Nginx with Magento 2 ``` ``` Solution: Replace given below setting into /nginx.conf.sample File ``` * fastcgi\_buffer\_size 4k; with * fastcgi\_buffer\_size 128k; * fastcgi\_buffers 4 256k; * fastcgi\_busy\_buffers\_size 256k;
13,894,386
I am getting this error from Nginx, but can't seem to figure it out! I am using codeigniter and am using the database for sessions. So I'm wondering how the header can ever be too big. Is there anyway to check what the header is? or potentially see what I can do to fix this error? Let me know if you need me to put up...
2012/12/15
[ "https://Stackoverflow.com/questions/13894386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/614443/" ]
Add this to your `http {}` of the **nginx.conf** file normally located at **/etc/nginx/nginx.conf**: ``` proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; ``` Then add this to your php location block, this will be located in your vhost file look for the block that begins with **locati...
Modify your nginx configuration and change/set the following directives: ``` proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; ```
13,894,386
I am getting this error from Nginx, but can't seem to figure it out! I am using codeigniter and am using the database for sessions. So I'm wondering how the header can ever be too big. Is there anyway to check what the header is? or potentially see what I can do to fix this error? Let me know if you need me to put up...
2012/12/15
[ "https://Stackoverflow.com/questions/13894386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/614443/" ]
Add this to your `http {}` of the **nginx.conf** file normally located at **/etc/nginx/nginx.conf**: ``` proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; ``` Then add this to your php location block, this will be located in your vhost file look for the block that begins with **locati...
I encountered this problem in the past (not using codeigniter but it happens whenever the responses contain a lot of header data) and got used to tweaking the buffers as suggested here, but recently I got bitten by this issue again and the buffers were apparently okay. Turned out it was spdy's fault which I was using ...
13,894,386
I am getting this error from Nginx, but can't seem to figure it out! I am using codeigniter and am using the database for sessions. So I'm wondering how the header can ever be too big. Is there anyway to check what the header is? or potentially see what I can do to fix this error? Let me know if you need me to put up...
2012/12/15
[ "https://Stackoverflow.com/questions/13894386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/614443/" ]
Add this to your `http {}` of the **nginx.conf** file normally located at **/etc/nginx/nginx.conf**: ``` proxy_buffer_size 128k; proxy_buffers 4 256k; proxy_busy_buffers_size 256k; ``` Then add this to your php location block, this will be located in your vhost file look for the block that begins with **locati...
``` Problem: upstream sent too big header while reading response header from upstream Nginx with Magento 2 ``` ``` Solution: Replace given below setting into /nginx.conf.sample File ``` * fastcgi\_buffer\_size 4k; with * fastcgi\_buffer\_size 128k; * fastcgi\_buffers 4 256k; * fastcgi\_busy\_buffers\_size 256k;
13,894,386
I am getting this error from Nginx, but can't seem to figure it out! I am using codeigniter and am using the database for sessions. So I'm wondering how the header can ever be too big. Is there anyway to check what the header is? or potentially see what I can do to fix this error? Let me know if you need me to put up...
2012/12/15
[ "https://Stackoverflow.com/questions/13894386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/614443/" ]
using nginx + fcgiwrap + request too long ----------------------------------------- I had the same problem because I use a nginx + fcgiwrap configuration: ``` location ~ ^.*\.cgi$ { fastcgi_pass unix:/var/run/fcgiwrap.sock; fastcgi_index index.cgi; fastcgi_param SCRIPT_FILENAME /opt/nginx/bugzilla/$fastc...
I encountered this problem in the past (not using codeigniter but it happens whenever the responses contain a lot of header data) and got used to tweaking the buffers as suggested here, but recently I got bitten by this issue again and the buffers were apparently okay. Turned out it was spdy's fault which I was using ...
30,641,577
I'm well aware that there many similar question in SO to similar issues, but none of the solution helped, and also the error msg I get is different ![enter image description here](https://i.stack.imgur.com/rYRA6.png) Background: i've been submitting successfully many apps before (with much struggle...), my MAC crashed...
2015/06/04
[ "https://Stackoverflow.com/questions/30641577", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1406269/" ]
I found an old build.sh file in my www (from ancient phonegap time), deleted it and WALLA - problem solved.
I don't have any `.sh` file in my `www` directory, maybe because I didn't used PhoneGap, but directly started with Cordova. At the end, I solved my issue, too, even if I'm not sure about how. My app had some errors related to Cordova plugins; I noticed was that some Cordova variables were always undefined, and that w...
42,276,992
I managed to retrieve a dynamic element ID from inside a foreach and send it to a controller this way: ``` @using (Html.BeginForm("DeleteConfirmed", "Gifts", FormMethod.Post, new { @class = "form-content", id = "formDiv" })) { foreach (var item in Model.productList) { <input type="b...
2017/02/16
[ "https://Stackoverflow.com/questions/42276992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7575229/" ]
What you want to do is use jQuery to create an event handler: ``` $('input[type="button"]').on('click', function(event) { event.preventDefault(); var form = $('#formDiv'); var token = $('input[name="__RequestVerificationToken"]', form).val(); var itemID = $(this).data('assigned-id'); if (confirm('sure?'...
Try the 'on' event handler attachment (<http://api.jquery.com/on/>). The outer function is shorthand for DOM ready. ``` $(function() { $('.some-container').on('click', '.delete-btn', DeleteButtonClicked); }) ```
25,223,734
If a union in C is used to for example pack a variable into a byte array as in the type described below: ``` typedef union { uint16_t integer; byte binary[4]; } binaryInteger; ``` When is the actual union performed? Is it when the variables are assigned to any of the parts of the union. Or is it when that part i...
2014/08/09
[ "https://Stackoverflow.com/questions/25223734", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1743457/" ]
In C and C++ unions are passive, so technically they are never "performed". They tell the compiler how you want to do the memory layout for the type controlled by the union. The compiler computes, at compile time, the size of the `union` (which is the size of its largest member). Then the placement of data in memory h...
I am not clear what you mean saying to execute the union. Whenever you put data into one of the fields, the data is put into memory. And then, accessing another field, you read the same data with the respective field's interpretation. For example, your union in the question takes 4 bytes. The first 2 bytes are as wel...