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
140,783
> > **Possible Duplicate:** > > [Should users be penalized for answering bad questions?](https://meta.stackexchange.com/questions/98197/should-users-be-penalized-for-answering-bad-questions) > > > When I come across an SO question which is too broad or shows no research effort (the type that one google search ...
2012/07/23
[ "https://meta.stackexchange.com/questions/140783", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/180564/" ]
A good answer is a good answer regardless of where it is posted. If someone wants to spend their time posting answers to bad questions, why penalize them for it? In fact, there is [the gold Reversal badge](https://stackoverflow.com/badges/95/reversal) that rewards people who post great answers to bad questions. If it ...
A truly good answer to a bad question is one which explains why the question is inherently bad and also offers the "correct" alternative, whilst not necessarily answering the question literally. So, if the question was "How do I secure passwords using ROT-13?", a technically-correct literal answer would be something a...
140,783
> > **Possible Duplicate:** > > [Should users be penalized for answering bad questions?](https://meta.stackexchange.com/questions/98197/should-users-be-penalized-for-answering-bad-questions) > > > When I come across an SO question which is too broad or shows no research effort (the type that one google search ...
2012/07/23
[ "https://meta.stackexchange.com/questions/140783", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/180564/" ]
If you don't want to reward the user for answering a low-quality question it's best to leave the answer alone, not downvote it, especially if you know that it is a good, correct answer. However, if a question is so unclear that you can't even judge if the answer is correct, it's also best to leave it alone. Personally...
A truly good answer to a bad question is one which explains why the question is inherently bad and also offers the "correct" alternative, whilst not necessarily answering the question literally. So, if the question was "How do I secure passwords using ROT-13?", a technically-correct literal answer would be something a...
70,761
I've decided I want to take the plunge and leave Gmail for Mail, using my iCloud account. Why? I've lost trust in Google (incl. their search bias, how they handle my privacy, and how they treat the end-user as a commodity to sell rather than a customer to serve). I know there are others like me (I just found today: [ww...
2012/11/06
[ "https://apple.stackexchange.com/questions/70761", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/34189/" ]
That's pretty normal to see only the files for windows, when you are mounting the ISO image on a windows! Even if you have inserted a MAC OS Installation DVD (physical) into tray and openned it in a windows machine, you would have seen only the Windows files and not the MAC files.
Have you tried looking at the contents of the DVD from the cmd prompt under Windows? I suspect the explorer is hiding the Mac contents. In the same vein, put the DVD in a Mac and examine it there for the Mac files.
416,502
I know $P(B|A) = \frac{P(A|B)P(B)}{P(A)}$, where $P(B)$ is known as a prior probability, $P(B|A)$ is a posterior probability and $P(A|B)$ is called the likelihood. We can interpreting $B$ as the model parameters and $A$ as the data, to estimate the parameters of a model from a sample. What I am confused is why we can r...
2019/07/08
[ "https://stats.stackexchange.com/questions/416502", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/253052/" ]
Your link states *So assuming that sneezing has no impact on whether you're a builder, we can say that* $P(sneezing,builder|flu) = P(sneezing|flu)P(builder|flu) $. This statement should be stated more clearly either as 1) *The events "sneezing" and "builder" are independent.* OR 2)*The events "sneezing" and "build...
Let $S$ denote "$\text{sneezing}$", $B$ denote "$\text{builder}$" and $F$ denote "$\text{flu}$" for notational simplicity. In order for the following to be true, you need *conditional independence* (conditioned on $F$) of $B$ and $S$: $$P(B,S|F)=P(B|F)P(S|F)$$ And, this relation doesn't imply anything about the indepen...
25,373,351
I want to do two types of sorting, the first one is as follow: Given a set of distinct lines with two words separate with a space, order them in a way that the next line has a first word equal to the last word of the previous line. For example: * Pamela Luisa * Luis Angel * Pedro Luis * Luisa Elianny * Angel Pedro * ...
2014/08/18
[ "https://Stackoverflow.com/questions/25373351", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2516804/" ]
First, problem #2 can be reduced to problem #1. Replace each string with a string consisting of the first letter and the last letter, separated by space; e.g. `AEIOU` becomes `A U`. Then it's clear that solving problem #1 on these new strings will also give the solution to problem #2 on original strings. Second, this ...
There is probably a better approach than this, but I would start by going through all of the words and assigning them numbers 0 to n. Then each line can be represented as an ordered pair of numbers. Then if there are k lines, create a (k x k) matrix of bools. In each spot put true if the second word in the pai...
55,688,146
I want to calculate sum of last N elements in a database table for each row, I tried various approaches but i can;t find any way to do this in a single query. This is what I have, let's say N is 2, and I have this data, ``` day shop sales 1 A 10 2 A 20 3 A 30 4 A 40 5 A 50 1 B ...
2019/04/15
[ "https://Stackoverflow.com/questions/55688146", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8680925/" ]
In MySQL 8+, just use `lag()`: ``` select t.*, (t.sales + lag(t.sales, 1, 0) over (partition by t.shop order by t.day) ) as two_day_sales from t; ``` In older versions, use a `left join`: ``` select t.*, (t.sales + coalesce(tprev.sales, 0)) as two_day_sales from t left join t tprev on...
May I suggest the following idea: * Get all the `sales` ordered by `shop ASC, day ASC`. * Then in your back-end language (I use PHP), write the code that gets the total `sales` according to `numberOfDays` in an array. Here is the full example in PHP, but you can use any language that goes with MySQL as you like: ```...
26,127,102
I have the script partially working. It saves all the open psd as jpg into into a separate directory and it close some of the open files not all. The directory has five files. The script saves only three files, What am I doing wrong? ``` #target photoshop if (app.documents.length > 0) { //flatten the active docume...
2014/09/30
[ "https://Stackoverflow.com/questions/26127102", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1825922/" ]
The `app.documents` collection is dynamic so when you close a document this collection is changed accordingly. Because you are closing your document inside a for loop where you compare an incrementing index against `app.documents.length` you are not processing all files (as `app.documents.length` decreases by one each...
I think this two lines are wrong: ``` //save file to folder var myFile = new File(("~/Desktop/forum-test") + "/" + activeDocument.name); ``` and ``` //close the document activeDocument.close(SaveOptions.DONOTSAVECHANGES); ``` Shouldn't you be using `app.activeDocument` instead of `activeDocument`? What is `active...
30,838,006
following Java program fails in compilation with error “Static local variables are not allowed” ``` class Myclass { public static void main(String args[]) { System.out.println(Myfun()); } static int Myfun() { static int var= 10; return var += 1; } } ```
2015/06/15
[ "https://Stackoverflow.com/questions/30838006", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4858700/" ]
If you want a static variable (whose value will be reused in consecutive calls to the static method), declare it outside the method : ``` static int var= 10; static int Myfun() { return var += 1; } ``` Local variables can't be static, since a local variable exists only within the scope of a single execution of ...
inside static block what ever you declare becomes static. In your case, Myfun() is static and so if you want to make var as static then simply do int var=10 ``` class Myclass { public static void main(String args[]) { System.out.println(Myfun()); } static int Myfun() { int var= 10; re...
402,689
Can you prove or disprove the following claim: First, define the function $\xi(n)$ as follows: $$\xi(n)=\begin{cases}-1, & \text{if }\varphi(n) \equiv 0 \pmod{4} \\ 1, & \text{if }\varphi(n) \equiv 2 \pmod{4} \\ 0, & \text{if otherwise } \end{cases}$$ where $\varphi(n)$ denotes [Euler's totient function](https://en.wi...
2021/08/28
[ "https://mathoverflow.net/questions/402689", "https://mathoverflow.net", "https://mathoverflow.net/users/88804/" ]
The only odd values of $\phi(n)$ are $\phi(1)=\phi(2)=1$. $\phi(n)$ is even but not divisible by $4$ when: 1. $n=4$ 2. $n=2^{\left\{0,1\right\}}p^m$, where $p=4k+3$ is prime, $m=1,2,3,...$ We have $$ \frac{\pi^2}{6}=1+\frac14+\sum\_{\substack{n=1\\\phi(n)\equiv 0}}^\infty\frac{1}{n^2}+\sum\_{\substack{n=1\\\phi(n)\e...
Reinforcing Nemo's negative answer. $$ \sum\_{n=1}^{10^4} \frac{\xi(n)}{n^2} - \sum\_{n=10^4+1}^\infty \frac{1}{n^2} \leq \sum\_{n=1}^{\infty} \frac{\xi(n)}{n^2} \leq \sum\_{n=1}^{10^4} \frac{\xi(n)}{n^2} + \sum\_{n=10^4+1}^\infty \frac{1}{n^2} $$ The first and third of these are directly computable: $$ 0.13712{\dot...
69,201,112
I have a problem to write data on aws keyspace with spark conector. This message below shows: `ERROR QueryExecutor: Failed to execute: com.datastax.spark.connector.writer.RichBoundStatementWrapper@681c47f5 com.datastax.oss.driver.api.core.servererrors.WriteTimeoutException: Cassandra timeout during SIMPLE write query ...
2021/09/16
[ "https://Stackoverflow.com/questions/69201112", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7947987/" ]
When you get the WriteTimeout error with Amazon Keyspaces usually indicates when a write request fails due to insufficient capacity. To give more insight we recommend using the Cloud Watch Monitoring template that we’ve put on Github here: <https://github.com/aws-samples/amazon-keyspaces-cloudwatch-cloudformation-templ...
First please check the load on all nodes on the cluster means IO, CPU and memory statistics if all they are Ok. As a workaround you can also consider to increase the below timeout parameters in cassandra.conf. write\_request\_timeout\_in\_ms & read\_request\_timeout\_in\_ms
30,068,065
I am doing a simple jquery click operation and it is not working i don't the reason of why it is happening. I am seeing the output in the console (I also tried the alert) here is my code : ``` <script src="../jquery.min.js"></script> <script> $("#one").click(function(){ console.log("The paragraph was cl...
2015/05/06
[ "https://Stackoverflow.com/questions/30068065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4869080/" ]
Your DOM is not loaded. You should have your jquery events inside the documednt ready function **or** window load function **or** your should use the script just before closing the `</body>` tag as [nullpoiиteя](https://stackoverflow.com/users/1723893/nullpoi%D0%B8te%D1%8F) suggests ``` $(document).ready(function(){ /...
This is happen due to event have bind after control are render. You can try this also: ``` <script src="../jquery.min.js"></script> <button id='one'>Click Me</button> <script> $("#one").click(function(){ console.log("The paragraph was clicked."); }); </script> ```
30,068,065
I am doing a simple jquery click operation and it is not working i don't the reason of why it is happening. I am seeing the output in the console (I also tried the alert) here is my code : ``` <script src="../jquery.min.js"></script> <script> $("#one").click(function(){ console.log("The paragraph was cl...
2015/05/06
[ "https://Stackoverflow.com/questions/30068065", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4869080/" ]
Your DOM is not loaded. You should have your jquery events inside the documednt ready function **or** window load function **or** your should use the script just before closing the `</body>` tag as [nullpoiиteя](https://stackoverflow.com/users/1723893/nullpoi%D0%B8te%D1%8F) suggests ``` $(document).ready(function(){ /...
Case 1: Document has not fully loaded so the DOM has not found the button. ``` Place your click code inside <script> $(document).ready(function(){ // Click event here }); </script> <button id='one'>Click Me</button> ``` Case 2: In other case if you do want to place the code inside "ready" code just place your but...
53,056,140
The Integer register encoding corresponds to their numeric names (0-31, for x0-x31). What is this encoding for f0-f31? I am trying to write a disassembler.
2018/10/30
[ "https://Stackoverflow.com/questions/53056140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9855488/" ]
The floating-point registers are encoded in the same way. The processor knows whether to use an integer register or a floating-point register by the nature of the instruction. RISC-V specifications are at <https://riscv.org/specifications/>. As a sample for one type of instruction, in *The RISC-V Instruction Set Manua...
So a few things 1) there are the risc-v docs. 2) if you are writing the first assembler or disassembler for an instruction set then you work there and you can just go down one of the silicon engineers cubes and ask. 3) if not then there exists tools for this instruction set and you should use them as a reference: Taki...
7,444,953
``` #!/bin/bash VAR019='priusr' VAR901='pripasswd' echo "CREATE DATABASE ftp; GRANT SELECT, INSERT, UPDATE, DELETE ON ftp.* TO '${VAR019}'@'localhost' IDENTIFIED BY '${VAR901}'; ``` This will output ``` : command not found : command not found : command not found : command not found...
2011/09/16
[ "https://Stackoverflow.com/questions/7444953", "https://Stackoverflow.com", "https://Stackoverflow.com/users/435299/" ]
I suggest using a [*here document*](http://en.wikipedia.org/wiki/Here_document) to reduce complexity of quoting. ``` #!/bin/bash VAR019='priusr' VAR901='pripasswd' cat <<HERE CREATE DATABASE ftp; GRANT SELECT, INSERT, UPDATE, DELETE ON ftp.* TO '${VAR019}'@'localhost' IDENTIFIED BY '${VAR901}'; HERE ``` To the sk...
Make sure your file is using right [EOL](http://en.wikipedia.org/wiki/Newline) (newline separating). I had exactly the same problem some time ago and it was caused by newlines being `\r\n` (Windows-style) instead of `\n` (Linux style). In that case, Linux assumes that `\r` is a name of command and tries invoking it. ...
7,444,953
``` #!/bin/bash VAR019='priusr' VAR901='pripasswd' echo "CREATE DATABASE ftp; GRANT SELECT, INSERT, UPDATE, DELETE ON ftp.* TO '${VAR019}'@'localhost' IDENTIFIED BY '${VAR901}'; ``` This will output ``` : command not found : command not found : command not found : command not found...
2011/09/16
[ "https://Stackoverflow.com/questions/7444953", "https://Stackoverflow.com", "https://Stackoverflow.com/users/435299/" ]
I suggest using a [*here document*](http://en.wikipedia.org/wiki/Here_document) to reduce complexity of quoting. ``` #!/bin/bash VAR019='priusr' VAR901='pripasswd' cat <<HERE CREATE DATABASE ftp; GRANT SELECT, INSERT, UPDATE, DELETE ON ftp.* TO '${VAR019}'@'localhost' IDENTIFIED BY '${VAR901}'; HERE ``` To the sk...
I just cut and pasted what you put in your program. The only issue I had was the lack of a closing *double-quote* quotation mark. I got the following output: ``` CREATE DATABASE ftp; GRANT SELECT, INSERT, UPDATE, DELETE ON ftp.* TO 'priusr'@'localhost' IDENTIFIED BY 'pripasswd'; ``` Which seems to be what you want....
7,444,953
``` #!/bin/bash VAR019='priusr' VAR901='pripasswd' echo "CREATE DATABASE ftp; GRANT SELECT, INSERT, UPDATE, DELETE ON ftp.* TO '${VAR019}'@'localhost' IDENTIFIED BY '${VAR901}'; ``` This will output ``` : command not found : command not found : command not found : command not found...
2011/09/16
[ "https://Stackoverflow.com/questions/7444953", "https://Stackoverflow.com", "https://Stackoverflow.com/users/435299/" ]
Make sure your file is using right [EOL](http://en.wikipedia.org/wiki/Newline) (newline separating). I had exactly the same problem some time ago and it was caused by newlines being `\r\n` (Windows-style) instead of `\n` (Linux style). In that case, Linux assumes that `\r` is a name of command and tries invoking it. ...
I just cut and pasted what you put in your program. The only issue I had was the lack of a closing *double-quote* quotation mark. I got the following output: ``` CREATE DATABASE ftp; GRANT SELECT, INSERT, UPDATE, DELETE ON ftp.* TO 'priusr'@'localhost' IDENTIFIED BY 'pripasswd'; ``` Which seems to be what you want....
8,136
> > **Possible Duplicate:** > > [What IDEs are available for Ubuntu?](https://askubuntu.com/questions/48299/what-ides-are-available-for-ubuntu) > > > I know that asking for something like Visual Studio is too much but something that will let me write, debug and compile in a GUI instead of the command line is g...
2010/10/18
[ "https://askubuntu.com/questions/8136", "https://askubuntu.com", "https://askubuntu.com/users/4339/" ]
Code::Blocks ------------ ``` sudo apt install codeblocks ``` [![alt text](https://i.stack.imgur.com/TTNXt.png)](https://i.stack.imgur.com/TTNXt.png) Wikipedia: [Code::Blocks](https://en.wikipedia.org/wiki/Code::Blocks)
Anjuta ------ Anjuta is a versatile software development studio featuring a number of advanced programming facilities including project management, application wizard, interactive debugger, source editor, version control, GUI designer, profiler and many more tools. It focuses on providing simple and usable user interf...
8,136
> > **Possible Duplicate:** > > [What IDEs are available for Ubuntu?](https://askubuntu.com/questions/48299/what-ides-are-available-for-ubuntu) > > > I know that asking for something like Visual Studio is too much but something that will let me write, debug and compile in a GUI instead of the command line is g...
2010/10/18
[ "https://askubuntu.com/questions/8136", "https://askubuntu.com", "https://askubuntu.com/users/4339/" ]
[Eclipse](http://packages.ubuntu.com/eclipse) [Install eclipse](http://apt.ubuntu.com/p/eclipse) ================================================================================================ Eclipse with Eclipse IDE for C/C++ Developers. Some useful installation instructions [here on Ubuntu Geek](http://www.ubuntu...
[netbeans](http://packages.ubuntu.com/netbeans) [Install X](http://apt.ubuntu.com/p/netbeans) ============================================================================================= ``` sudo apt-get install netbeans ``` ![enter image description here](https://i.stack.imgur.com/PQwlu.png) Wikipedia: [Netbeans]...
8,136
> > **Possible Duplicate:** > > [What IDEs are available for Ubuntu?](https://askubuntu.com/questions/48299/what-ides-are-available-for-ubuntu) > > > I know that asking for something like Visual Studio is too much but something that will let me write, debug and compile in a GUI instead of the command line is g...
2010/10/18
[ "https://askubuntu.com/questions/8136", "https://askubuntu.com", "https://askubuntu.com/users/4339/" ]
[CodeLite](http://www.codelite.org/) [Install codelite](http://apt.ubuntu.com/p/codelite) ========================================================================================= [![alt text](https://i.stack.imgur.com/ny9qk.png)](https://i.stack.imgur.com/ny9qk.png) [More screenshots](http://codelite.org/gallery.php...
[qtcreator Install qtcreator](https://apps.ubuntu.com/cat/applications/qtcreator) --------------------------------------------------------------------------------- QT Creator is the best C/C++ IDE available for Ubuntu. > > Qt Creator is a cross-platform C++ integrated development environment which is part of the Qt ...
8,136
> > **Possible Duplicate:** > > [What IDEs are available for Ubuntu?](https://askubuntu.com/questions/48299/what-ides-are-available-for-ubuntu) > > > I know that asking for something like Visual Studio is too much but something that will let me write, debug and compile in a GUI instead of the command line is g...
2010/10/18
[ "https://askubuntu.com/questions/8136", "https://askubuntu.com", "https://askubuntu.com/users/4339/" ]
Anjuta ------ Anjuta is a versatile software development studio featuring a number of advanced programming facilities including project management, application wizard, interactive debugger, source editor, version control, GUI designer, profiler and many more tools. It focuses on providing simple and usable user interf...
[Eclipse](http://www.eclipse.org/) [Install eclipse](https://apps.ubuntu.com/cat/applications/eclipse) ====================================================================================================== Just for completeness I can suggest you have a look at Eclipse: ``` sudo apt-get install eclipse ``` which can...
8,136
> > **Possible Duplicate:** > > [What IDEs are available for Ubuntu?](https://askubuntu.com/questions/48299/what-ides-are-available-for-ubuntu) > > > I know that asking for something like Visual Studio is too much but something that will let me write, debug and compile in a GUI instead of the command line is g...
2010/10/18
[ "https://askubuntu.com/questions/8136", "https://askubuntu.com", "https://askubuntu.com/users/4339/" ]
Geany ----- Geany is a text editor using the GTK2 toolkit with basic features of an integrated development environment. It was developed to provide a small and fast IDE, which has only a few dependencies from other packages. It supports many filetypes and has some nice features. To install geany in all currently supp...
[vim Install vim](https://apps.ubuntu.com/cat/applications/vim) --------------------------------------------------------------- Vim is also a good choice for writing C programs. ![enter image description here](https://i.stack.imgur.com/EYHMk.png)
8,136
> > **Possible Duplicate:** > > [What IDEs are available for Ubuntu?](https://askubuntu.com/questions/48299/what-ides-are-available-for-ubuntu) > > > I know that asking for something like Visual Studio is too much but something that will let me write, debug and compile in a GUI instead of the command line is g...
2010/10/18
[ "https://askubuntu.com/questions/8136", "https://askubuntu.com", "https://askubuntu.com/users/4339/" ]
Anjuta ------ Anjuta is a versatile software development studio featuring a number of advanced programming facilities including project management, application wizard, interactive debugger, source editor, version control, GUI designer, profiler and many more tools. It focuses on providing simple and usable user interf...
One more good editor and awarded is [Komodo Edit](http://www.activestate.com/komodo-edit). You can use it with a lot languagies c, c++, python and more. Is free and croos platform. There is a [Komodo IDE](http://www.activestate.com/komodo-ide) but it is commercial and non-free. You can try it with a trial version. ![...
8,136
> > **Possible Duplicate:** > > [What IDEs are available for Ubuntu?](https://askubuntu.com/questions/48299/what-ides-are-available-for-ubuntu) > > > I know that asking for something like Visual Studio is too much but something that will let me write, debug and compile in a GUI instead of the command line is g...
2010/10/18
[ "https://askubuntu.com/questions/8136", "https://askubuntu.com", "https://askubuntu.com/users/4339/" ]
[KDevelop](http://www.kdevelop.org/) [Install kdevelop](https://apps.ubuntu.com/cat/applications/kdevelop) ---------------------------------------------------------------------------------------------------------- I very highly recommend KDevelop. It's a KDE program (*cough* KDE > gnome =P), but it will work under gno...
[Eclipse](http://www.eclipse.org/) [Install eclipse](https://apps.ubuntu.com/cat/applications/eclipse) ====================================================================================================== Just for completeness I can suggest you have a look at Eclipse: ``` sudo apt-get install eclipse ``` which can...
8,136
> > **Possible Duplicate:** > > [What IDEs are available for Ubuntu?](https://askubuntu.com/questions/48299/what-ides-are-available-for-ubuntu) > > > I know that asking for something like Visual Studio is too much but something that will let me write, debug and compile in a GUI instead of the command line is g...
2010/10/18
[ "https://askubuntu.com/questions/8136", "https://askubuntu.com", "https://askubuntu.com/users/4339/" ]
Geany ----- Geany is a text editor using the GTK2 toolkit with basic features of an integrated development environment. It was developed to provide a small and fast IDE, which has only a few dependencies from other packages. It supports many filetypes and has some nice features. To install geany in all currently supp...
Anjuta ------ Anjuta is a versatile software development studio featuring a number of advanced programming facilities including project management, application wizard, interactive debugger, source editor, version control, GUI designer, profiler and many more tools. It focuses on providing simple and usable user interf...
8,136
> > **Possible Duplicate:** > > [What IDEs are available for Ubuntu?](https://askubuntu.com/questions/48299/what-ides-are-available-for-ubuntu) > > > I know that asking for something like Visual Studio is too much but something that will let me write, debug and compile in a GUI instead of the command line is g...
2010/10/18
[ "https://askubuntu.com/questions/8136", "https://askubuntu.com", "https://askubuntu.com/users/4339/" ]
Geany ----- Geany is a text editor using the GTK2 toolkit with basic features of an integrated development environment. It was developed to provide a small and fast IDE, which has only a few dependencies from other packages. It supports many filetypes and has some nice features. To install geany in all currently supp...
Anjuta DevStudio ---------------- Anjuta IDE for C/C++ and GNOME/Gtk+ applications has features that enable easy debugging, management of code and GUI design by providing a simple and usable user interface. It also integrates with version control systems like CVS, Git or Subversion. To install Anjuta in all currently ...
8,136
> > **Possible Duplicate:** > > [What IDEs are available for Ubuntu?](https://askubuntu.com/questions/48299/what-ides-are-available-for-ubuntu) > > > I know that asking for something like Visual Studio is too much but something that will let me write, debug and compile in a GUI instead of the command line is g...
2010/10/18
[ "https://askubuntu.com/questions/8136", "https://askubuntu.com", "https://askubuntu.com/users/4339/" ]
Code::Blocks ------------ ``` sudo apt install codeblocks ``` [![alt text](https://i.stack.imgur.com/TTNXt.png)](https://i.stack.imgur.com/TTNXt.png) Wikipedia: [Code::Blocks](https://en.wikipedia.org/wiki/Code::Blocks)
Anjuta DevStudio ---------------- Anjuta IDE for C/C++ and GNOME/Gtk+ applications has features that enable easy debugging, management of code and GUI design by providing a simple and usable user interface. It also integrates with version control systems like CVS, Git or Subversion. To install Anjuta in all currently ...
340,079
I saw this formula in a book RC = ρε Can anyone tell me what is the significance of this formula or how is it derived? The capacitance and the resistivity seem to be pretty much unrelated quantities but there seems to be a straightforward relationship between them. When and where can I use this formula?
2017/06/18
[ "https://physics.stackexchange.com/questions/340079", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/139148/" ]
$R$ is given by: $$ R = \rho \frac{d}{A} $$ and $C$ by: $$ C = \epsilon \frac{A}{d} $$ Multiplying $R$ and $C$ gives us: $$ RC = \rho \epsilon $$ Capacitance and resistivity are unrelated, like Chemomechanics pointed out.
Think your question this way: You have a pipe and inside the pipe you have rocks randomly placed.Once you push one ball inside the pipe it will encounter the rocks and will scatter. The bigger the pipe is , the more balls you can push inside , without touching each other. And the wider the pipe is , the more rocks the ...
2,067,452
I have a very simple file upload that allows users to upload PDF files. On another page I then reference those files through an anchor tag. However, it seems that when a user upload a file that contains the pound sign (#) it breaks the anchor tag. It doesn't cause any type of Coldfusion error, it just can't find the fi...
2010/01/14
[ "https://Stackoverflow.com/questions/2067452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91632/" ]
If you control the file upload code try validating the string with ``` IsValid("url",usersFileName) or IsValid("regex",usersFileName,"[a-zA-Z0-9]") ``` Otherwise if you are comfortable with regex I would suggest something like the previous posters are commenting on ``` REReplace(usersfilename,"[^a-zA-Z0-9]","",...
Pound signs are not legal within filenames on the web. They are used for in-page anchor targets: ``` <a name="target"> ``` So if you have file#name.pdf, the browser is actually looking for the file "file" and the internal anchor "name.pdf". Yes, you will have to rename your files on upload.
2,067,452
I have a very simple file upload that allows users to upload PDF files. On another page I then reference those files through an anchor tag. However, it seems that when a user upload a file that contains the pound sign (#) it breaks the anchor tag. It doesn't cause any type of Coldfusion error, it just can't find the fi...
2010/01/14
[ "https://Stackoverflow.com/questions/2067452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91632/" ]
Pound signs are not legal within filenames on the web. They are used for in-page anchor targets: ``` <a name="target"> ``` So if you have file#name.pdf, the browser is actually looking for the file "file" and the internal anchor "name.pdf". Yes, you will have to rename your files on upload.
Probably you would have to replace # with ## to avoid this, I think this is caused because # is figured as Coldfusion keyword.
2,067,452
I have a very simple file upload that allows users to upload PDF files. On another page I then reference those files through an anchor tag. However, it seems that when a user upload a file that contains the pound sign (#) it breaks the anchor tag. It doesn't cause any type of Coldfusion error, it just can't find the fi...
2010/01/14
[ "https://Stackoverflow.com/questions/2067452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91632/" ]
If you control the file upload code try validating the string with ``` IsValid("url",usersFileName) or IsValid("regex",usersFileName,"[a-zA-Z0-9]") ``` Otherwise if you are comfortable with regex I would suggest something like the previous posters are commenting on ``` REReplace(usersfilename,"[^a-zA-Z0-9]","",...
Probably you would have to replace # with ## to avoid this, I think this is caused because # is figured as Coldfusion keyword.
2,067,452
I have a very simple file upload that allows users to upload PDF files. On another page I then reference those files through an anchor tag. However, it seems that when a user upload a file that contains the pound sign (#) it breaks the anchor tag. It doesn't cause any type of Coldfusion error, it just can't find the fi...
2010/01/14
[ "https://Stackoverflow.com/questions/2067452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91632/" ]
If you control the file upload code try validating the string with ``` IsValid("url",usersFileName) or IsValid("regex",usersFileName,"[a-zA-Z0-9]") ``` Otherwise if you are comfortable with regex I would suggest something like the previous posters are commenting on ``` REReplace(usersfilename,"[^a-zA-Z0-9]","",...
I can't comment yet, but Kevink's solution is good unless you need to perserve what you're replacing. We ran into an instance where we needed to rename the filename but the filename needed to be somewhat preserved (user requirement). Simply removing special characters wasn't an option. As a result we had to handle eac...
2,067,452
I have a very simple file upload that allows users to upload PDF files. On another page I then reference those files through an anchor tag. However, it seems that when a user upload a file that contains the pound sign (#) it breaks the anchor tag. It doesn't cause any type of Coldfusion error, it just can't find the fi...
2010/01/14
[ "https://Stackoverflow.com/questions/2067452", "https://Stackoverflow.com", "https://Stackoverflow.com/users/91632/" ]
I can't comment yet, but Kevink's solution is good unless you need to perserve what you're replacing. We ran into an instance where we needed to rename the filename but the filename needed to be somewhat preserved (user requirement). Simply removing special characters wasn't an option. As a result we had to handle eac...
Probably you would have to replace # with ## to avoid this, I think this is caused because # is figured as Coldfusion keyword.
51,511,278
I need to read the xml file and load it to DB2 database in AWS glue. Is it possible to establish connection to DB2 in AWS glue?
2018/07/25
[ "https://Stackoverflow.com/questions/51511278", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10120750/" ]
You can't create Glue Crawlers or build a data catalog for an IBM DB2 source but you can directly access DB2 tables using a JDBC driver. You won't create a connection. The IBM databases are directly connected via the Glue job. For more details and demo refer the following link : <https://aws.amazon.com/blogs/big-data/...
I don't think it is possible yet. The connection types supported are present here: <https://docs.aws.amazon.com/glue/latest/dg/aws-glue-programming-etl-connect.html>
23,872,306
TLDR: CDI isn't behaving as I would expect after migrating a web profile sample to a full blown EE application Let me start off by saying that I'm relatively new to CDI. I like to think that I understand the concept but the nuances of the implementation are yet to be conquered. I'm trying to EJB-ify and subsequently ...
2014/05/26
[ "https://Stackoverflow.com/questions/23872306", "https://Stackoverflow.com", "https://Stackoverflow.com/users/127278/" ]
A recent search directed me here so let me give a partial answer in spite of the age of the question. First, for background do a quick read on CDI's "bean discovery mode", e.g. see [here](https://blogs.oracle.com/theaquarium/entry/default_cdi_enablement_in_java). Now, the presence of an empty beans.xml at the 1.0 XSD...
I was in a very similar situation like yours, till I found a combination of things which worked for me, and I hope it will work for you as well. Note: I'm not an expert in CDI either. 1) You may add @Dependent (javax.enterprise.context.Dependent) with @Named. E.g.: ``` @Dependent @Named("SimpleItemProcessor") public...
33,734,998
I'm wondering why I still see a lot of apps (including fb & instagram) that use pull to refresh feature for updating content? I mean, they have notification system that can tell itself to refresh when there's new data. I see that FB for instance it has little bubble in the news feed section that tells me i have new fee...
2015/11/16
[ "https://Stackoverflow.com/questions/33734998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1955934/" ]
**I**t's usually better for a user to choose when to update the the news feed "like on the **Social Apps**". Since its not usually good to update the content **automatically** when the user is still reading it.This can bring about confusion to the user. And the pull to refresh is a qualified feature for doing the work ...
**Simple point by considering google's Do and Don't** > > [`Swipe-to-Refresh`](http://developer.android.com/training/swipe/add-swipe-interface.html) can be used to One-phased loading.We can use other type > progress bars ie , circular etc for loading content for the first > time and load and display all content at ...
33,734,998
I'm wondering why I still see a lot of apps (including fb & instagram) that use pull to refresh feature for updating content? I mean, they have notification system that can tell itself to refresh when there's new data. I see that FB for instance it has little bubble in the news feed section that tells me i have new fee...
2015/11/16
[ "https://Stackoverflow.com/questions/33734998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1955934/" ]
This is a great question. I'm interpreting it from the perspective of user experience. Fast Company [did an interview](http://www.fastcodesign.com/3023421/why-the-pull-to-refresh-gesture-must-die) with Kevin Systrom a few years ago when Instagram added pull-to-refresh. He wasn't into the idea. > > Systrom feels the ...
FYI: Pull to refresh was first used by Loren Brichter in the app Tweetie 2 which was acquired by Twitter later. I think his answer to how he had implemented Pull down to refresh gesture would be an apt answer for you question > > Tweetie 2 simply took this idea from Tweetie 1, that reloading was > simply “loading ...
33,734,998
I'm wondering why I still see a lot of apps (including fb & instagram) that use pull to refresh feature for updating content? I mean, they have notification system that can tell itself to refresh when there's new data. I see that FB for instance it has little bubble in the news feed section that tells me i have new fee...
2015/11/16
[ "https://Stackoverflow.com/questions/33734998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1955934/" ]
**I**t's usually better for a user to choose when to update the the news feed "like on the **Social Apps**". Since its not usually good to update the content **automatically** when the user is still reading it.This can bring about confusion to the user. And the pull to refresh is a qualified feature for doing the work ...
In my opinion this UI component is an equivalent of refresh button which does not occupy any space and it is user friendly because join scrollable + force refreshing + loading animation + finish event It is up to app's team to determine should they use it or not based on their possibilities
33,734,998
I'm wondering why I still see a lot of apps (including fb & instagram) that use pull to refresh feature for updating content? I mean, they have notification system that can tell itself to refresh when there's new data. I see that FB for instance it has little bubble in the news feed section that tells me i have new fee...
2015/11/16
[ "https://Stackoverflow.com/questions/33734998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1955934/" ]
This is a great question. I'm interpreting it from the perspective of user experience. Fast Company [did an interview](http://www.fastcodesign.com/3023421/why-the-pull-to-refresh-gesture-must-die) with Kevin Systrom a few years ago when Instagram added pull-to-refresh. He wasn't into the idea. > > Systrom feels the ...
your question is Awsome.. i have some R&D on it. see nowadays reach apps never use pull to refresh in android. because android have **service** that can run in **background** with wack-lock. but **ios** have no background service. service always consume battery best way when app is open you can one time use service a...
33,734,998
I'm wondering why I still see a lot of apps (including fb & instagram) that use pull to refresh feature for updating content? I mean, they have notification system that can tell itself to refresh when there's new data. I see that FB for instance it has little bubble in the news feed section that tells me i have new fee...
2015/11/16
[ "https://Stackoverflow.com/questions/33734998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1955934/" ]
**I**t's usually better for a user to choose when to update the the news feed "like on the **Social Apps**". Since its not usually good to update the content **automatically** when the user is still reading it.This can bring about confusion to the user. And the pull to refresh is a qualified feature for doing the work ...
your question is Awsome.. i have some R&D on it. see nowadays reach apps never use pull to refresh in android. because android have **service** that can run in **background** with wack-lock. but **ios** have no background service. service always consume battery best way when app is open you can one time use service a...
33,734,998
I'm wondering why I still see a lot of apps (including fb & instagram) that use pull to refresh feature for updating content? I mean, they have notification system that can tell itself to refresh when there's new data. I see that FB for instance it has little bubble in the news feed section that tells me i have new fee...
2015/11/16
[ "https://Stackoverflow.com/questions/33734998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1955934/" ]
**Simple point by considering google's Do and Don't** > > [`Swipe-to-Refresh`](http://developer.android.com/training/swipe/add-swipe-interface.html) can be used to One-phased loading.We can use other type > progress bars ie , circular etc for loading content for the first > time and load and display all content at ...
your question is Awsome.. i have some R&D on it. see nowadays reach apps never use pull to refresh in android. because android have **service** that can run in **background** with wack-lock. but **ios** have no background service. service always consume battery best way when app is open you can one time use service a...
33,734,998
I'm wondering why I still see a lot of apps (including fb & instagram) that use pull to refresh feature for updating content? I mean, they have notification system that can tell itself to refresh when there's new data. I see that FB for instance it has little bubble in the news feed section that tells me i have new fee...
2015/11/16
[ "https://Stackoverflow.com/questions/33734998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1955934/" ]
FYI: Pull to refresh was first used by Loren Brichter in the app Tweetie 2 which was acquired by Twitter later. I think his answer to how he had implemented Pull down to refresh gesture would be an apt answer for you question > > Tweetie 2 simply took this idea from Tweetie 1, that reloading was > simply “loading ...
**Simple point by considering google's Do and Don't** > > [`Swipe-to-Refresh`](http://developer.android.com/training/swipe/add-swipe-interface.html) can be used to One-phased loading.We can use other type > progress bars ie , circular etc for loading content for the first > time and load and display all content at ...
33,734,998
I'm wondering why I still see a lot of apps (including fb & instagram) that use pull to refresh feature for updating content? I mean, they have notification system that can tell itself to refresh when there's new data. I see that FB for instance it has little bubble in the news feed section that tells me i have new fee...
2015/11/16
[ "https://Stackoverflow.com/questions/33734998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1955934/" ]
This is a great question. I'm interpreting it from the perspective of user experience. Fast Company [did an interview](http://www.fastcodesign.com/3023421/why-the-pull-to-refresh-gesture-must-die) with Kevin Systrom a few years ago when Instagram added pull-to-refresh. He wasn't into the idea. > > Systrom feels the ...
In my opinion this UI component is an equivalent of refresh button which does not occupy any space and it is user friendly because join scrollable + force refreshing + loading animation + finish event It is up to app's team to determine should they use it or not based on their possibilities
33,734,998
I'm wondering why I still see a lot of apps (including fb & instagram) that use pull to refresh feature for updating content? I mean, they have notification system that can tell itself to refresh when there's new data. I see that FB for instance it has little bubble in the news feed section that tells me i have new fee...
2015/11/16
[ "https://Stackoverflow.com/questions/33734998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1955934/" ]
In my opinion this UI component is an equivalent of refresh button which does not occupy any space and it is user friendly because join scrollable + force refreshing + loading animation + finish event It is up to app's team to determine should they use it or not based on their possibilities
your question is Awsome.. i have some R&D on it. see nowadays reach apps never use pull to refresh in android. because android have **service** that can run in **background** with wack-lock. but **ios** have no background service. service always consume battery best way when app is open you can one time use service a...
33,734,998
I'm wondering why I still see a lot of apps (including fb & instagram) that use pull to refresh feature for updating content? I mean, they have notification system that can tell itself to refresh when there's new data. I see that FB for instance it has little bubble in the news feed section that tells me i have new fee...
2015/11/16
[ "https://Stackoverflow.com/questions/33734998", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1955934/" ]
This is a great question. I'm interpreting it from the perspective of user experience. Fast Company [did an interview](http://www.fastcodesign.com/3023421/why-the-pull-to-refresh-gesture-must-die) with Kevin Systrom a few years ago when Instagram added pull-to-refresh. He wasn't into the idea. > > Systrom feels the ...
**Simple point by considering google's Do and Don't** > > [`Swipe-to-Refresh`](http://developer.android.com/training/swipe/add-swipe-interface.html) can be used to One-phased loading.We can use other type > progress bars ie , circular etc for loading content for the first > time and load and display all content at ...
24,867,786
In fragment A i have functionality to retrivive url In fragment B i have functionality to proceed and display url. how fragment A can tell to fragment B that there is new data to proceed, where 2 fragments are placed side by side?
2014/07/21
[ "https://Stackoverflow.com/questions/24867786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1551603/" ]
You can get a list of all accounts: <https://developer.github.com/v3/users/#get-all-users> The `type` parameter will tell you if it's a user or organization. An alternative is to use the search API: <https://developer.github.com/v3/search/#search-users> You can specify `type:org` to get organizations only: <https...
[On June 17, 2015](https://developer.github.com/changes/2015-06-17-organizations-endpoint/) GitHub added a new API to get organizations: ``` curl https://api.github.com/organizations [ { "login": "github", "id": 9919, "url": "https://api.github.com/orgs/github", "repos_url": "https://api.github.com/o...
24,867,786
In fragment A i have functionality to retrivive url In fragment B i have functionality to proceed and display url. how fragment A can tell to fragment B that there is new data to proceed, where 2 fragments are placed side by side?
2014/07/21
[ "https://Stackoverflow.com/questions/24867786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1551603/" ]
You can get a list of all accounts: <https://developer.github.com/v3/users/#get-all-users> The `type` parameter will tell you if it's a user or organization. An alternative is to use the search API: <https://developer.github.com/v3/search/#search-users> You can specify `type:org` to get organizations only: <https...
I ran into similar problems with you and maybe I get an answer from github API doc now. Detail Doc in this: <https://developer.github.com/v3/search/#search-users> There are several parameters that can be used. 1. `q` : (string). The search terms. 2. `sort` : (string). The sort field. Can be `followers`, `repositorie...
24,867,786
In fragment A i have functionality to retrivive url In fragment B i have functionality to proceed and display url. how fragment A can tell to fragment B that there is new data to proceed, where 2 fragments are placed side by side?
2014/07/21
[ "https://Stackoverflow.com/questions/24867786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1551603/" ]
You can get a list of all accounts: <https://developer.github.com/v3/users/#get-all-users> The `type` parameter will tell you if it's a user or organization. An alternative is to use the search API: <https://developer.github.com/v3/search/#search-users> You can specify `type:org` to get organizations only: <https...
You can check this <https://medium.com/@harshitsinghai77/demystifying-github-api-to-fetch-the-top-3-repositories-by-stars-using-node-js-aef8818551cb> to have a clear understanding.
24,867,786
In fragment A i have functionality to retrivive url In fragment B i have functionality to proceed and display url. how fragment A can tell to fragment B that there is new data to proceed, where 2 fragments are placed side by side?
2014/07/21
[ "https://Stackoverflow.com/questions/24867786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1551603/" ]
You can get a list of all accounts: <https://developer.github.com/v3/users/#get-all-users> The `type` parameter will tell you if it's a user or organization. An alternative is to use the search API: <https://developer.github.com/v3/search/#search-users> You can specify `type:org` to get organizations only: <https...
Note that it's also possible to use [Github GraphQL v4](https://developer.github.com/v4/) to request organization using : ```graphql { search(query: "type:org", type: USER, first: 100) { userCount nodes { ... on Organization { name createdAt description } } } } ``` ...
24,867,786
In fragment A i have functionality to retrivive url In fragment B i have functionality to proceed and display url. how fragment A can tell to fragment B that there is new data to proceed, where 2 fragments are placed side by side?
2014/07/21
[ "https://Stackoverflow.com/questions/24867786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1551603/" ]
[On June 17, 2015](https://developer.github.com/changes/2015-06-17-organizations-endpoint/) GitHub added a new API to get organizations: ``` curl https://api.github.com/organizations [ { "login": "github", "id": 9919, "url": "https://api.github.com/orgs/github", "repos_url": "https://api.github.com/o...
I ran into similar problems with you and maybe I get an answer from github API doc now. Detail Doc in this: <https://developer.github.com/v3/search/#search-users> There are several parameters that can be used. 1. `q` : (string). The search terms. 2. `sort` : (string). The sort field. Can be `followers`, `repositorie...
24,867,786
In fragment A i have functionality to retrivive url In fragment B i have functionality to proceed and display url. how fragment A can tell to fragment B that there is new data to proceed, where 2 fragments are placed side by side?
2014/07/21
[ "https://Stackoverflow.com/questions/24867786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1551603/" ]
[On June 17, 2015](https://developer.github.com/changes/2015-06-17-organizations-endpoint/) GitHub added a new API to get organizations: ``` curl https://api.github.com/organizations [ { "login": "github", "id": 9919, "url": "https://api.github.com/orgs/github", "repos_url": "https://api.github.com/o...
You can check this <https://medium.com/@harshitsinghai77/demystifying-github-api-to-fetch-the-top-3-repositories-by-stars-using-node-js-aef8818551cb> to have a clear understanding.
24,867,786
In fragment A i have functionality to retrivive url In fragment B i have functionality to proceed and display url. how fragment A can tell to fragment B that there is new data to proceed, where 2 fragments are placed side by side?
2014/07/21
[ "https://Stackoverflow.com/questions/24867786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1551603/" ]
[On June 17, 2015](https://developer.github.com/changes/2015-06-17-organizations-endpoint/) GitHub added a new API to get organizations: ``` curl https://api.github.com/organizations [ { "login": "github", "id": 9919, "url": "https://api.github.com/orgs/github", "repos_url": "https://api.github.com/o...
Note that it's also possible to use [Github GraphQL v4](https://developer.github.com/v4/) to request organization using : ```graphql { search(query: "type:org", type: USER, first: 100) { userCount nodes { ... on Organization { name createdAt description } } } } ``` ...
24,867,786
In fragment A i have functionality to retrivive url In fragment B i have functionality to proceed and display url. how fragment A can tell to fragment B that there is new data to proceed, where 2 fragments are placed side by side?
2014/07/21
[ "https://Stackoverflow.com/questions/24867786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1551603/" ]
Note that it's also possible to use [Github GraphQL v4](https://developer.github.com/v4/) to request organization using : ```graphql { search(query: "type:org", type: USER, first: 100) { userCount nodes { ... on Organization { name createdAt description } } } } ``` ...
I ran into similar problems with you and maybe I get an answer from github API doc now. Detail Doc in this: <https://developer.github.com/v3/search/#search-users> There are several parameters that can be used. 1. `q` : (string). The search terms. 2. `sort` : (string). The sort field. Can be `followers`, `repositorie...
24,867,786
In fragment A i have functionality to retrivive url In fragment B i have functionality to proceed and display url. how fragment A can tell to fragment B that there is new data to proceed, where 2 fragments are placed side by side?
2014/07/21
[ "https://Stackoverflow.com/questions/24867786", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1551603/" ]
Note that it's also possible to use [Github GraphQL v4](https://developer.github.com/v4/) to request organization using : ```graphql { search(query: "type:org", type: USER, first: 100) { userCount nodes { ... on Organization { name createdAt description } } } } ``` ...
You can check this <https://medium.com/@harshitsinghai77/demystifying-github-api-to-fetch-the-top-3-repositories-by-stars-using-node-js-aef8818551cb> to have a clear understanding.
46,605,950
Sorry if this seems like a dumb question but I'm new to this kind of approach. What I have is a series of meal items that correspond with meals. At the moment my code links two tables together through the `meal_id` and runs through the selected records in a loop. What it's doing that I don't like is giving each meal it...
2017/10/06
[ "https://Stackoverflow.com/questions/46605950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8629823/" ]
Suppose we have two table - meal, meal\_item ``` $meal_data = 'select * from meal' echo '<table>'; while($row = mysqli_fetch_assoc($meal_data)){ ?> <tr> <td align='center'><?php echo($row['meal_id']);?></td> <td align='center'><?php echo($row['user_id']);?></td> <td align='center'><?ph...
For a first version, you can do an other database call for each meal. ``` Execute Query Meal While (Query Meal Results) { Echo html for meal Build Query Meal Item Execute Query Meal Item While (Query Meal Item Results) { Echo html for meal item } } ``` For better performance, an array can be create...
46,605,950
Sorry if this seems like a dumb question but I'm new to this kind of approach. What I have is a series of meal items that correspond with meals. At the moment my code links two tables together through the `meal_id` and runs through the selected records in a loop. What it's doing that I don't like is giving each meal it...
2017/10/06
[ "https://Stackoverflow.com/questions/46605950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8629823/" ]
I believe you are trying to create a multidimensional array where your `meal_id` would be the ID of each row, and the meals themselves would be stored in that ID. First of all, a little bit more setup is required. You should change your query a tiny bit. Your query needs to be sorted by the meal\_id column. `ORDER BY...
For a first version, you can do an other database call for each meal. ``` Execute Query Meal While (Query Meal Results) { Echo html for meal Build Query Meal Item Execute Query Meal Item While (Query Meal Item Results) { Echo html for meal item } } ``` For better performance, an array can be create...
46,605,950
Sorry if this seems like a dumb question but I'm new to this kind of approach. What I have is a series of meal items that correspond with meals. At the moment my code links two tables together through the `meal_id` and runs through the selected records in a loop. What it's doing that I don't like is giving each meal it...
2017/10/06
[ "https://Stackoverflow.com/questions/46605950", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8629823/" ]
I believe you are trying to create a multidimensional array where your `meal_id` would be the ID of each row, and the meals themselves would be stored in that ID. First of all, a little bit more setup is required. You should change your query a tiny bit. Your query needs to be sorted by the meal\_id column. `ORDER BY...
Suppose we have two table - meal, meal\_item ``` $meal_data = 'select * from meal' echo '<table>'; while($row = mysqli_fetch_assoc($meal_data)){ ?> <tr> <td align='center'><?php echo($row['meal_id']);?></td> <td align='center'><?php echo($row['user_id']);?></td> <td align='center'><?ph...
55,680,176
I am relatively new to python and I am working on creating a program in my fun time to automatically generate a sales sheet. It has several functions that pull the necessary data from a database, and reportlab and a few other tools to place the results onto the generated pdf. I am trying to round the results coming fro...
2019/04/14
[ "https://Stackoverflow.com/questions/55680176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11360413/" ]
Taking your original dataframe as input `df` dataframe, the following code will produce your desired output: ``` #dictionary assigning order of priority to status values priority_map = {'B':1,'BW':2,'W':3,'NF':4} #new temporary column that converts Status values to order of priority values df['rank'] = df['Status'].m...
I might be able to help you conceptually, by explaining some steps that I would do: 1. Create the new column Value, and fill it with zeros `np.zeros()` or `pd.fillna()` 2. Group the dataframe by Item with `groupby = pd.groupby('Item')` 3. Iterate through all the groups founds `for name, group in groupby:` 4. By using ...
55,680,176
I am relatively new to python and I am working on creating a program in my fun time to automatically generate a sales sheet. It has several functions that pull the necessary data from a database, and reportlab and a few other tools to place the results onto the generated pdf. I am trying to round the results coming fro...
2019/04/14
[ "https://Stackoverflow.com/questions/55680176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11360413/" ]
I would prefer an approach where the status is an ordered [`pd.Categorical`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Categorical.html), because a) that's what it is and b) it's much more readable: if you have that, you just compare if a value is equal to the `max` of its group: ``` df['Status...
I might be able to help you conceptually, by explaining some steps that I would do: 1. Create the new column Value, and fill it with zeros `np.zeros()` or `pd.fillna()` 2. Group the dataframe by Item with `groupby = pd.groupby('Item')` 3. Iterate through all the groups founds `for name, group in groupby:` 4. By using ...
55,680,176
I am relatively new to python and I am working on creating a program in my fun time to automatically generate a sales sheet. It has several functions that pull the necessary data from a database, and reportlab and a few other tools to place the results onto the generated pdf. I am trying to round the results coming fro...
2019/04/14
[ "https://Stackoverflow.com/questions/55680176", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11360413/" ]
Taking your original dataframe as input `df` dataframe, the following code will produce your desired output: ``` #dictionary assigning order of priority to status values priority_map = {'B':1,'BW':2,'W':3,'NF':4} #new temporary column that converts Status values to order of priority values df['rank'] = df['Status'].m...
I would prefer an approach where the status is an ordered [`pd.Categorical`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Categorical.html), because a) that's what it is and b) it's much more readable: if you have that, you just compare if a value is equal to the `max` of its group: ``` df['Status...
53,779,693
I want to preface this with the fact that I am still very much a noob at Paramiko, so this might all be completely impossible. I want to open a `.wav` file on a server from my computer in order to do some speech recognition on it. To do this, I create a Transport with Paramiko and use it to open the audio file on the...
2018/12/14
[ "https://Stackoverflow.com/questions/53779693", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10070726/" ]
[`adjust_for_ambient_noise`](https://github.com/Uberi/speech_recognition/blob/master/reference/library-reference.rst#recognizer_instanceadjust_for_ambient_noisesource-audiosource-duration-float--1---none) takes an implementation of [`AudioSource`](https://github.com/Uberi/speech_recognition/blob/master/reference/librar...
Try copying file from source to local and start processing it. ``` sftp.get(filepath, localpath) ```
14,936,606
I know this is a simple task but I can't seem to find the solution. I've got a date in the format: 20/02/2013 I just wanna replace the / by - I've got that so far but it only replaces the first slash... Don't know why not the second: ``` date = 20/02/2013; date.replace('/', '-'); ``` Thanks for any help.
2013/02/18
[ "https://Stackoverflow.com/questions/14936606", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2050847/" ]
You need a regular expression with [*global* flag](https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Regular_Expressions#Advanced_Searching_With_Flags): ``` "20/02/2013".replace(/\//g, "-"); // "20-02-2013" ``` Another way is to use [`split`](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Gl...
Use the global flag. ``` str.replace(/\//g, '-'); ```
3,002,837
So I am trying to make a tabs in a menu but cant make the whole width of each of the tabs 219px. it only allows me to make the li 219 but I wanna make the li a 219px. I cant seem to figure it out. Also is there a way to make a next button or would the best way to go to each tab and literally put in the next tab in a ty...
2010/06/09
[ "https://Stackoverflow.com/questions/3002837", "https://Stackoverflow.com", "https://Stackoverflow.com/users/348843/" ]
Width of Anchor --------------- Anchors are by default displayed as `inline` elements. An `inline` element will only be given the minimum amount of height and width necessary to display its contents. You could declare that they should be displayed as `block` elements. This way, the browser will honor the `width` dec...
You cannot set a width to inline elements. Try `li a {display:inline-block;}`
1,157,215
I have unattended-upgrades set up, but some packages are not being auto-updated. ``` root@survey:/home/martin# apt update root@survey:/home/martin# unattended-upgrade -v --dry-run Initial blacklisted packages: Initial whitelisted packages: Starting unattended upgrades script Allowed origins are: o=Ubuntu,a=xenial, o=...
2019/07/10
[ "https://askubuntu.com/questions/1157215", "https://askubuntu.com", "https://askubuntu.com/users/131923/" ]
A similar question was asked before: * [Why unattended-upgrades upgraded so few packages, seemingly?](https://askubuntu.com/questions/993470/why-unattended-upgrades-upgraded-so-few-packages-seemingly) The accept answer states: > > Most of the answer is in your unattended-upgrades logfile, located at > `/var/log/un...
Worth checking if you have marked to hold packages which might be preventing packages from upgrading. ``` sudo apt-mark showhold ```
1,157,215
I have unattended-upgrades set up, but some packages are not being auto-updated. ``` root@survey:/home/martin# apt update root@survey:/home/martin# unattended-upgrade -v --dry-run Initial blacklisted packages: Initial whitelisted packages: Starting unattended upgrades script Allowed origins are: o=Ubuntu,a=xenial, o=...
2019/07/10
[ "https://askubuntu.com/questions/1157215", "https://askubuntu.com", "https://askubuntu.com/users/131923/" ]
I believe you are missing `20auto-upgrades` and should first implement it properly to see if that fixes your issue before moving on. You can see that this is an important step in the [Automatic Upgrades](https://help.ubuntu.com/lts/serverguide/automatic-updates.html) documentation. ```bsh $ cat /etc/apt/apt.conf.d/20a...
A similar question was asked before: * [Why unattended-upgrades upgraded so few packages, seemingly?](https://askubuntu.com/questions/993470/why-unattended-upgrades-upgraded-so-few-packages-seemingly) The accept answer states: > > Most of the answer is in your unattended-upgrades logfile, located at > `/var/log/un...
1,157,215
I have unattended-upgrades set up, but some packages are not being auto-updated. ``` root@survey:/home/martin# apt update root@survey:/home/martin# unattended-upgrade -v --dry-run Initial blacklisted packages: Initial whitelisted packages: Starting unattended upgrades script Allowed origins are: o=Ubuntu,a=xenial, o=...
2019/07/10
[ "https://askubuntu.com/questions/1157215", "https://askubuntu.com", "https://askubuntu.com/users/131923/" ]
I believe you are missing `20auto-upgrades` and should first implement it properly to see if that fixes your issue before moving on. You can see that this is an important step in the [Automatic Upgrades](https://help.ubuntu.com/lts/serverguide/automatic-updates.html) documentation. ```bsh $ cat /etc/apt/apt.conf.d/20a...
Worth checking if you have marked to hold packages which might be preventing packages from upgrading. ``` sudo apt-mark showhold ```
19,154
I am copying a previous event but the registration page shows the old date and address. I have updated the event in Event Location, but it will not change. How can i change this? Thanks
2017/06/22
[ "https://civicrm.stackexchange.com/questions/19154", "https://civicrm.stackexchange.com", "https://civicrm.stackexchange.com/users/4778/" ]
Since you're using a `wget`-based cron, there should be a corresponding entry in the web server log for each cron run. Look to see the Apache value - does it return `404` or `500` or maybe something else? `404` would indicate a wrong URL; `403` would indicate it's blocked, perhaps because of the user agent (iThemes Sec...
I had an issue like this once. The cron was being run by logging in with a username and password and the password for that user had changed so the cron was not able to access properly.
13,612
I have documents in a file share, and need to do a bulk renaming before uploading them to SharePoint. The reason is that SharePoint doesn't accept some special characters, like &, /, etc. What's the easiest way to do this?
2011/05/31
[ "https://sharepoint.stackexchange.com/questions/13612", "https://sharepoint.stackexchange.com", "https://sharepoint.stackexchange.com/users/2904/" ]
Powershell is indeed a great way to bulk rename the files. Site which gives step-by-step instructions on how this can be done: <http://www.petestilgoe.com/2011/05/sharepoint-removing-illegal-characters-from-filenames-prior-to-bulk-uploading/>
I think Powershell would probably serve well here. You can read in the files and rename them, prior to uploading to SharePoint.
71,364
I'm interested to know if there is any reliance on system time (as defined by Linux or windows) when initiating a secure handshake. I'm aware that TCP typically uses a random number (RFC 1323) to provide a time stamp for message ordering, however I'm not sure of the TLS utilisation of *system time*. You can imagine thi...
2014/10/22
[ "https://security.stackexchange.com/questions/71364", "https://security.stackexchange.com", "https://security.stackexchange.com/users/35514/" ]
During the handshake, the client and server send each other "random values", which are sequences of 32 random bytes. The "client random" is part of the `ClientHello` message, while the "server random" is part of the `ServerHello` message. In both cases, the first four bytes of the random value encode the current date ...
TLS as a protocol does not depend on a the system time. The only point where the system time is used is in the Random field of the [Client Hello](https://www.rfc-editor.org/rfc/rfc5246.html#section-7.4.1.2) and Server Hello handshake messages. From [RFC 5246 (TLS 1.2)](https://www.rfc-editor.org/rfc/rfc5246.html#sectio...
55,258,531
I have seen an idiom for using Derived type traits in the base class of a CRTP pattern that looks like this: ``` template<typename Derived> struct traits; template<typename Derived> struct Base { using size_type = typename traits<Derived>::size_type; }; template <typename T> struct Derived1 : Base<Derived1<T>>{ ...
2019/03/20
[ "https://Stackoverflow.com/questions/55258531", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3309610/" ]
You need to return [getSingleResult()](https://docs.oracle.com/javaee/5/api/javax/persistence/Query.html#getSingleResult()) ``` return (String)em.createNativeQuery(sql).getSingleResult(); ``` > > Execute a SELECT query that returns a single result. > > >
Your method always returns null. Moreover, maybe this is just a snippet and there are things missing from your actual code, but when does `em` get instanciated ? (I'm assuming it's a class variable) Finally, you're calling `getSingleResult` but not doing anything with the actual result, which is what you should retur...
55,258,531
I have seen an idiom for using Derived type traits in the base class of a CRTP pattern that looks like this: ``` template<typename Derived> struct traits; template<typename Derived> struct Base { using size_type = typename traits<Derived>::size_type; }; template <typename T> struct Derived1 : Base<Derived1<T>>{ ...
2019/03/20
[ "https://Stackoverflow.com/questions/55258531", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3309610/" ]
You need to return [getSingleResult()](https://docs.oracle.com/javaee/5/api/javax/persistence/Query.html#getSingleResult()) ``` return (String)em.createNativeQuery(sql).getSingleResult(); ``` > > Execute a SELECT query that returns a single result. > > >
Just wrapp your code inside if else condition, i mean throw an exception when `em` is null or return a single string like following code snippet: ``` public String get_value(long nodeid,String ts) { try { String sql="Select URL FROM urllink WHERE URL='f0="+nodeid+"&ts="+ts + "'"; if (em == null) { ...
55,258,531
I have seen an idiom for using Derived type traits in the base class of a CRTP pattern that looks like this: ``` template<typename Derived> struct traits; template<typename Derived> struct Base { using size_type = typename traits<Derived>::size_type; }; template <typename T> struct Derived1 : Base<Derived1<T>>{ ...
2019/03/20
[ "https://Stackoverflow.com/questions/55258531", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3309610/" ]
Just wrapp your code inside if else condition, i mean throw an exception when `em` is null or return a single string like following code snippet: ``` public String get_value(long nodeid,String ts) { try { String sql="Select URL FROM urllink WHERE URL='f0="+nodeid+"&ts="+ts + "'"; if (em == null) { ...
Your method always returns null. Moreover, maybe this is just a snippet and there are things missing from your actual code, but when does `em` get instanciated ? (I'm assuming it's a class variable) Finally, you're calling `getSingleResult` but not doing anything with the actual result, which is what you should retur...
9,170,365
I've just deployed a commit to Heroku which adds a `portfolio` field to my `photos` table. I have set `default => true` on this. Here is an abbreviated look at my schema.rb: ``` create_table "photos", :force => true do |t| t.string "name" t.string "description" t.integer "user_id" t.datetime "cr...
2012/02/07
[ "https://Stackoverflow.com/questions/9170365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/634401/" ]
As amemus said, fat32 would be better for the external HDD. Even though it's Microsoft, fat32 is still, by far, the most supported HDD format. That said, what you said SHOULD work, given you use a new-ish distro of linux with new packages.
Ubuntu shouldn't have a problem reading from NTFS. Writing to NTFS used to be very difficult, but its gotten a lot better (a simple google search turns up [lots of results](https://www.google.com/search?sourceid=chrome&ie=UTF-8&q=ubuntu+write+to+ntfs)) As long as you aren't working with large (~4GB) files, FAT32 will...
9,170,365
I've just deployed a commit to Heroku which adds a `portfolio` field to my `photos` table. I have set `default => true` on this. Here is an abbreviated look at my schema.rb: ``` create_table "photos", :force => true do |t| t.string "name" t.string "description" t.integer "user_id" t.datetime "cr...
2012/02/07
[ "https://Stackoverflow.com/questions/9170365", "https://Stackoverflow.com", "https://Stackoverflow.com/users/634401/" ]
Ubuntu 8.04 is very old these days, but I believe it had good support for NTFS read (using the old `ntfs` driver). It will correctly copy your Windows files to the ext3 external hard drive, plus or minus some attributes/permissions which have no equivalent in ext3. Newer Ubuntu releases have full NTFS read/write suppo...
Ubuntu shouldn't have a problem reading from NTFS. Writing to NTFS used to be very difficult, but its gotten a lot better (a simple google search turns up [lots of results](https://www.google.com/search?sourceid=chrome&ie=UTF-8&q=ubuntu+write+to+ntfs)) As long as you aren't working with large (~4GB) files, FAT32 will...
35,689,051
At the end of my tests Capybara automatically navigates to "about:blank" in order to set up the next test. Sometimes the application I'm testing will throw a popup alert if the user leaves the page (which is expected). I have some code to handle this: ``` begin page.driver.browser.navigate.to("about:blank") ...
2016/02/28
[ "https://Stackoverflow.com/questions/35689051", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4099441/" ]
There is no simple workaround for this at this time in any version of Selenium language bindings. It is a known issue the Selenium team is not interested in resolving. Fundamentally, it is due to the architecture of Safari and consequently the architecture of the Safari Driver. The JavaScript of the Safari Driver exte...
You could try to confirm like this which I believe should work across browsers ``` # click ok to confirm page.evaluate_script('window.confirm = function() { return true; }') ```
44,723
As the question says, what other web browsers are available on the iPad? I would ideally like Chrome or Firefox.
2012/03/20
[ "https://apple.stackexchange.com/questions/44723", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/20442/" ]
[Dolphin Browser](http://itunes.apple.com/en/app/dolphin-browser-for-ipad/id460812023?mt=8) =========================================================================================== * Gestures: create a personal symbol to access the websites you use the most * Visit your favorite sites with one touch. * Tabbed brows...
Chrome and Firefox are not available for the iPad. If you want an interface which looks like Chrome, you might like [Diigo Browser](http://itunes.apple.com/us/app/ichromy-chrome-style-web-browser/id432838105?mt=8#). Here's a [review of the app](http://ipadinsight.com/ipad-app-reviews/ichromy-chrome-style-web-browser-fo...
44,723
As the question says, what other web browsers are available on the iPad? I would ideally like Chrome or Firefox.
2012/03/20
[ "https://apple.stackexchange.com/questions/44723", "https://apple.stackexchange.com", "https://apple.stackexchange.com/users/20442/" ]
[Dolphin Browser](http://itunes.apple.com/en/app/dolphin-browser-for-ipad/id460812023?mt=8) =========================================================================================== * Gestures: create a personal symbol to access the websites you use the most * Visit your favorite sites with one touch. * Tabbed brows...
Chrome and Firefox haven't been developed for iOS yet, but you could try Dolphin Browser. It's very similar to Chrome, and you can download extensions for it. Personally, Dolphin is my favorite. Opera Mini and Murcury Web Browser (quite similar to Desktop Safari) are another couple nice alternative to Mobile Safari, an...
111,472
I'm an admin of a domain and im trying to run a wmic script to copy a file on a remote pc from another remote pc. My command: ``` WMIC /NODE:@"C:\compList.txt" PROCESS CALL Create "xcopy \\networkPC\file.exe C:\" ``` it doesn't copy file.exe on the computers i've listed on compList.txt, I know it's not a privilage ...
2010/02/10
[ "https://serverfault.com/questions/111472", "https://serverfault.com", "https://serverfault.com/users/34544/" ]
Two thoughts: * Is `svn update` stopping to ask for a password? Commit hooks are non-interactive, so if svn update asks for a password, then there'll be no way to enter it. Try doing `svn update --username xxxx --password xxxx --non-interactive` (replacing as appropriate). * Try redircting the output of `svn update` t...
It sounds like you `svn update` is actually taking place and the post-commit hook is just waiting for it to complete (you don't say how long you wait for it to complete). This could be just because there's lots of content being updated, alternatively it could be that your update is blocked because there's a merge conf...
22,819,706
i want to send emails that contains text and variable values from the spreadsheet. For that i ran the sendemails-script which works well. But at the example the cell that was declared as "var message" didnt contain variable values but only text. Is it possible to add "references to values" to this text? Something lik...
2014/04/02
[ "https://Stackoverflow.com/questions/22819706", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3490684/" ]
Try using one of the most obscure methods of `UIImageView`. ``` UIImageView *myImageView = [[UIImageView alloc] initWithFrame:...]; myImageView.animationImages = images; myImageView.animationDuration = 3.0 * images.count; [self.view addSubview:myImageView]; ``` Then, when you wanna start animating ``` [myImageV...
The reason that your button remains pressed is **because you slept main thread for 3 seconds**, this means that nothing is going to happen to your application (at least the user interface) until thread is back to active. There are multiple ways to achieve what you wish, but you must put a timer on the background threa...
348,299
I accidentally removed arios-automount startup, so drives don't startup with the system any more, even with reinstalling the program, and i don't know the startup command for it. Any Help?
2013/09/21
[ "https://askubuntu.com/questions/348299", "https://askubuntu.com", "https://askubuntu.com/users/194849/" ]
I think that the command for the *arios-automount* package should be **"automount"** Make sure you have installed the package, there is a file name **"automount.desktop"** in the `/etc/xdg/autostart` or in `~/.config/autostart/` folder with the following content: ``` [Desktop Entry] # @location ~/.config/autostart/ N...
Even you have installed the Arios application , you have to set the application to be in startup list. I mean you have to add it to startup list. To add it to the startup list, Open your Unity dash and type as "startup" and it will list the application click to open it and then click at add . it will open the window ...
208,321
We're using Ola's script to run weekly full, nightly diff and hourly transaction logs. All the jobs are correctly creating their backups, and the full and diff jobs are cleaning up after a week, transaction logs are set to clean up after 48 hours (we backup the NAS that the files are stored on nightly so these files ar...
2018/05/31
[ "https://dba.stackexchange.com/questions/208321", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/152479/" ]
I just noticed that you are only providing information on the differential and transaction log backup steps of the backup procedure. What is with the FULL backup? Ola has implemented a fail-safe mechanism which will delete transaction log backups only if a FULL and/or DIFF backup is available. > > DatabaseBackup has...
A few things could be going on here. The files are in the wrong place, or have an unexpected extension ----------------------------------------------------------------- This one seems unlikely, since you've probably been using Ola's scripts for all your backups, but just in case you've changed a setting (like the dir...
208,321
We're using Ola's script to run weekly full, nightly diff and hourly transaction logs. All the jobs are correctly creating their backups, and the full and diff jobs are cleaning up after a week, transaction logs are set to clean up after 48 hours (we backup the NAS that the files are stored on nightly so these files ar...
2018/05/31
[ "https://dba.stackexchange.com/questions/208321", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/152479/" ]
I downloaded and ran the latest version of Ola's scripts and I'm no longer having the issue. Thanks to all responders! :)
A few things could be going on here. The files are in the wrong place, or have an unexpected extension ----------------------------------------------------------------- This one seems unlikely, since you've probably been using Ola's scripts for all your backups, but just in case you've changed a setting (like the dir...
344,537
I have tried every which way to authenticate a post request. 1. WP User Plugin - As per the [docs](http://wpuserplus.com/blog/doc/wordpress-rest-api-login-user/), I've logged in at `wp-json/wpuser/v1/user/login` and received my token. I've passed that token as a header called "Authorization" (also tried "authorization...
2019/08/06
[ "https://wordpress.stackexchange.com/questions/344537", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/164858/" ]
You don't need plugins for authentication unless you're making a cross domain request, and to get the nonce, you just create it as you would any other nonce. As the handbook states: > > For developers making manual Ajax requests, the nonce will need to be passed with each request. **The API uses nonces with the acti...
If anyone is looking for a solution with Fetch: ``` window .fetch(`${scriptVars.endpoint}`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'X-WP-Nonce': scriptVars.nonce }, credentials: 'same-origin', body: JSON.stringify(postData) }) .then(() => window.alert('success')); ```
30,364,222
I just wrote a bit of code where I wanted to do: ``` def foo(container) return any((some_obj.attr <= 0 for some_obj in container)) ``` where `foo` would return the first `some_obj` where `some_obj.attr` is zero or less. The alternative, I suppose, would be ``` def foo(container): return next((some_obj for s...
2015/05/21
[ "https://Stackoverflow.com/questions/30364222", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3058609/" ]
The docs for [`any`](https://docs.python.org/3/library/functions.html#any) explain that it's equivalent to: ``` def any(iterable): for element in iterable: if element: return True return False ``` So, I don't think your code is too deeply nested if it has exactly the same structure as cod...
`next(filter` should do it, and here's a funny way to test `<= 0`: ``` >>> next(filter((0).__ge__, [3,2,1,-1,-2]), False) -1 ``` Ha, even tricker: ``` >>> next(filter(0..__ge__, [3,2,1,-1,-2]), False) -1 ``` Or, as abarnert pointed out: ``` >>> next(filter(0 .__ge__, [3,2,1,-1,-2]), False) -1 ```
30,364,222
I just wrote a bit of code where I wanted to do: ``` def foo(container) return any((some_obj.attr <= 0 for some_obj in container)) ``` where `foo` would return the first `some_obj` where `some_obj.attr` is zero or less. The alternative, I suppose, would be ``` def foo(container): return next((some_obj for s...
2015/05/21
[ "https://Stackoverflow.com/questions/30364222", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3058609/" ]
The docs for [`any`](https://docs.python.org/3/library/functions.html#any) explain that it's equivalent to: ``` def any(iterable): for element in iterable: if element: return True return False ``` So, I don't think your code is too deeply nested if it has exactly the same structure as cod...
Just for fun, to extend [Stefan Pochmann's answer](https://stackoverflow.com/a/30364476/908494) to handle `obj.attr <= 0`, still without needing a lambda: ``` from operator import attrgetter from functional import compose next(filter(compose(0..__ge__, attrgetter('attr')), [3, 2, 1, -1, -2]), False) ``` If you don'...
30,364,222
I just wrote a bit of code where I wanted to do: ``` def foo(container) return any((some_obj.attr <= 0 for some_obj in container)) ``` where `foo` would return the first `some_obj` where `some_obj.attr` is zero or less. The alternative, I suppose, would be ``` def foo(container): return next((some_obj for s...
2015/05/21
[ "https://Stackoverflow.com/questions/30364222", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3058609/" ]
`next(filter` should do it, and here's a funny way to test `<= 0`: ``` >>> next(filter((0).__ge__, [3,2,1,-1,-2]), False) -1 ``` Ha, even tricker: ``` >>> next(filter(0..__ge__, [3,2,1,-1,-2]), False) -1 ``` Or, as abarnert pointed out: ``` >>> next(filter(0 .__ge__, [3,2,1,-1,-2]), False) -1 ```
Just for fun, to extend [Stefan Pochmann's answer](https://stackoverflow.com/a/30364476/908494) to handle `obj.attr <= 0`, still without needing a lambda: ``` from operator import attrgetter from functional import compose next(filter(compose(0..__ge__, attrgetter('attr')), [3, 2, 1, -1, -2]), False) ``` If you don'...
69,255,099
I am getting an error with the streambuilder in flutter. I'm not sure why I get this error. Please help me out with this problem. ``` Widget _galleryGrid() { return StreamBuilder( stream: imageUrlsController.stream, builder: (context, snapshot) { if (snapshot.hasData) { if (snapshot.data!.length != 0) { ...
2021/09/20
[ "https://Stackoverflow.com/questions/69255099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16752809/" ]
1. This requires the 'non-nullable' language feature to be enabled. 2. Try update your pubspec.yaml to set the minimum SDK constraint to 2.12.0 or higher. 3. Running 'pub get' **OR** replace this with ``` if (snapshot.data!.isNotEmpty) { ```
Simply specify your snapshot type in builder of stream as:- ``` builder: (context, AsyncSnapshot<QuerySnaphot> snapshot) { ```
69,255,099
I am getting an error with the streambuilder in flutter. I'm not sure why I get this error. Please help me out with this problem. ``` Widget _galleryGrid() { return StreamBuilder( stream: imageUrlsController.stream, builder: (context, snapshot) { if (snapshot.hasData) { if (snapshot.data!.length != 0) { ...
2021/09/20
[ "https://Stackoverflow.com/questions/69255099", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16752809/" ]
I solved this problem by ``` return StreamBuilder<dynamic> ```
Simply specify your snapshot type in builder of stream as:- ``` builder: (context, AsyncSnapshot<QuerySnaphot> snapshot) { ```
31,200
I have some 12 V motors, and the corresponding motors controlers like these here [http://imgur.com/XBEww](https://imgur.com/XBEww). Every other 12 V power supply I have seen is either very expensive or has extremely low amps, where even a $20 computer power supply will provide like 10 amps at 12 volts. Is it possible t...
2012/05/04
[ "https://electronics.stackexchange.com/questions/31200", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/9412/" ]
> > Is it possible to use a computer power supply to control some 12 V motors with my Arduino and these motor controllers? > > > Yes, you can use a PC power supply as a general 12V supply, but there **may** be some extra requirements. Some early PC supplies required a substantial minimum load on the 5V output to...
A computer power supply does power motors: those in disk drives and fans. It's a matter of matching the peak current delivery ability of the power supply to the peak current demands of the motors (inrush current), as well as under steady state conditions.
16,696
I was wondering what temperature is suitable to store honey bought from stores? Now in the summer, it can be around 30+ Celsius, and even nearly 40 on some day. Do you suggest keeping honey while being consumed in the refrigerator? If not, what harm can that cause?
2011/08/07
[ "https://cooking.stackexchange.com/questions/16696", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/2064/" ]
**Honey should be stored at 50-70 Degrees Fahrenheit** Honey is similar in to olive oil and should be storaged between 50-70 Degrees Fahrenheit according to [Max Shrem from Slashfood](http://www.slashfood.com/2008/08/30/tip-of-the-day-store-honey-appropriately/): > > Similar to olive oil, honey should be stored at a...
When I was a child, we used to keep honey (taken from our own bees, and not pasteurized or whipped or whatever) in the root cellar, where it was dark, and cool but not cold. This was a situation where some of it would be kept for years. Sometimes when honey gets cold it crystallizes, which is really no big deal - just ...
16,696
I was wondering what temperature is suitable to store honey bought from stores? Now in the summer, it can be around 30+ Celsius, and even nearly 40 on some day. Do you suggest keeping honey while being consumed in the refrigerator? If not, what harm can that cause?
2011/08/07
[ "https://cooking.stackexchange.com/questions/16696", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/2064/" ]
**Honey should be stored at 50-70 Degrees Fahrenheit** Honey is similar in to olive oil and should be storaged between 50-70 Degrees Fahrenheit according to [Max Shrem from Slashfood](http://www.slashfood.com/2008/08/30/tip-of-the-day-store-honey-appropriately/): > > Similar to olive oil, honey should be stored at a...
One of the wonderful properties of honey is that if it crystallizes all you need do is put it in a microwave (or warm it some other way) and it is just as good as it has ever been.
16,696
I was wondering what temperature is suitable to store honey bought from stores? Now in the summer, it can be around 30+ Celsius, and even nearly 40 on some day. Do you suggest keeping honey while being consumed in the refrigerator? If not, what harm can that cause?
2011/08/07
[ "https://cooking.stackexchange.com/questions/16696", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/2064/" ]
**Honey should be stored at 50-70 Degrees Fahrenheit** Honey is similar in to olive oil and should be storaged between 50-70 Degrees Fahrenheit according to [Max Shrem from Slashfood](http://www.slashfood.com/2008/08/30/tip-of-the-day-store-honey-appropriately/): > > Similar to olive oil, honey should be stored at a...
Honey crystallizes quickest at 14C (57F). Above this temperature the rate of crystallization decreases until by 32C (90F) it will stay runny. Similarly, below 14C the rate of crystallization decreases until by 0C (32F) it will be frozen solid and no crystallization can occur. You might deduce then that keeping it war...
16,696
I was wondering what temperature is suitable to store honey bought from stores? Now in the summer, it can be around 30+ Celsius, and even nearly 40 on some day. Do you suggest keeping honey while being consumed in the refrigerator? If not, what harm can that cause?
2011/08/07
[ "https://cooking.stackexchange.com/questions/16696", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/2064/" ]
**Honey should be stored at 50-70 Degrees Fahrenheit** Honey is similar in to olive oil and should be storaged between 50-70 Degrees Fahrenheit according to [Max Shrem from Slashfood](http://www.slashfood.com/2008/08/30/tip-of-the-day-store-honey-appropriately/): > > Similar to olive oil, honey should be stored at a...
I buy honey in 5lb. plastic jugs, 6 per case. if it crystallizes I warm it in my crock pot in water. a better way to store is on the top shelf In my pantry ( heat rises) so far none stored there has crystalised.
16,696
I was wondering what temperature is suitable to store honey bought from stores? Now in the summer, it can be around 30+ Celsius, and even nearly 40 on some day. Do you suggest keeping honey while being consumed in the refrigerator? If not, what harm can that cause?
2011/08/07
[ "https://cooking.stackexchange.com/questions/16696", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/2064/" ]
When I was a child, we used to keep honey (taken from our own bees, and not pasteurized or whipped or whatever) in the root cellar, where it was dark, and cool but not cold. This was a situation where some of it would be kept for years. Sometimes when honey gets cold it crystallizes, which is really no big deal - just ...
One of the wonderful properties of honey is that if it crystallizes all you need do is put it in a microwave (or warm it some other way) and it is just as good as it has ever been.
16,696
I was wondering what temperature is suitable to store honey bought from stores? Now in the summer, it can be around 30+ Celsius, and even nearly 40 on some day. Do you suggest keeping honey while being consumed in the refrigerator? If not, what harm can that cause?
2011/08/07
[ "https://cooking.stackexchange.com/questions/16696", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/2064/" ]
When I was a child, we used to keep honey (taken from our own bees, and not pasteurized or whipped or whatever) in the root cellar, where it was dark, and cool but not cold. This was a situation where some of it would be kept for years. Sometimes when honey gets cold it crystallizes, which is really no big deal - just ...
Honey crystallizes quickest at 14C (57F). Above this temperature the rate of crystallization decreases until by 32C (90F) it will stay runny. Similarly, below 14C the rate of crystallization decreases until by 0C (32F) it will be frozen solid and no crystallization can occur. You might deduce then that keeping it war...
16,696
I was wondering what temperature is suitable to store honey bought from stores? Now in the summer, it can be around 30+ Celsius, and even nearly 40 on some day. Do you suggest keeping honey while being consumed in the refrigerator? If not, what harm can that cause?
2011/08/07
[ "https://cooking.stackexchange.com/questions/16696", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/2064/" ]
When I was a child, we used to keep honey (taken from our own bees, and not pasteurized or whipped or whatever) in the root cellar, where it was dark, and cool but not cold. This was a situation where some of it would be kept for years. Sometimes when honey gets cold it crystallizes, which is really no big deal - just ...
I buy honey in 5lb. plastic jugs, 6 per case. if it crystallizes I warm it in my crock pot in water. a better way to store is on the top shelf In my pantry ( heat rises) so far none stored there has crystalised.
16,696
I was wondering what temperature is suitable to store honey bought from stores? Now in the summer, it can be around 30+ Celsius, and even nearly 40 on some day. Do you suggest keeping honey while being consumed in the refrigerator? If not, what harm can that cause?
2011/08/07
[ "https://cooking.stackexchange.com/questions/16696", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/2064/" ]
One of the wonderful properties of honey is that if it crystallizes all you need do is put it in a microwave (or warm it some other way) and it is just as good as it has ever been.
I buy honey in 5lb. plastic jugs, 6 per case. if it crystallizes I warm it in my crock pot in water. a better way to store is on the top shelf In my pantry ( heat rises) so far none stored there has crystalised.
16,696
I was wondering what temperature is suitable to store honey bought from stores? Now in the summer, it can be around 30+ Celsius, and even nearly 40 on some day. Do you suggest keeping honey while being consumed in the refrigerator? If not, what harm can that cause?
2011/08/07
[ "https://cooking.stackexchange.com/questions/16696", "https://cooking.stackexchange.com", "https://cooking.stackexchange.com/users/2064/" ]
Honey crystallizes quickest at 14C (57F). Above this temperature the rate of crystallization decreases until by 32C (90F) it will stay runny. Similarly, below 14C the rate of crystallization decreases until by 0C (32F) it will be frozen solid and no crystallization can occur. You might deduce then that keeping it war...
I buy honey in 5lb. plastic jugs, 6 per case. if it crystallizes I warm it in my crock pot in water. a better way to store is on the top shelf In my pantry ( heat rises) so far none stored there has crystalised.
37,210,115
Let's say I have an entity called X. Whenever a new `X` entry is added to the database in any part of my code (`db.Xs.Add(new_X_instance);`) I want to execute a specific sql query using entity framework. I wonder if this is possible. Just to let you know, I am not able to use SQL Server triggers.
2016/05/13
[ "https://Stackoverflow.com/questions/37210115", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1845408/" ]
You can override `SaveChanges()` method in `DbContext` class and in there you can get a list of new added entities. ``` public override int SaveChanges() { var AddedEntities = ChangeTracker.Entries<Entity>().Where(E => E.State == EntityState.Added).ToList(); AddedEntities.ForEach(E => { // Do wha...
You can do it with `ObjectContext`, like this: ``` var octx = ((IObjectContextAdapter)ctx).ObjectContext; // ctx is regular DbContext here octx.ObjectStateManager.ObjectStateManagerChanged += (sender, item) => { if (item.Action == CollectionChangeAction.Add) { // added var target = item...
4,557,468
I created this Sign-In page. I start by declaring variables for username/password & buttons. If user enters "test" as username & "test" as password and hits the login button, its supposed to go to the DrinksTwitter.class activity, else throw error message I created. To me the code and login makes perfect sense. I'm not...
2010/12/29
[ "https://Stackoverflow.com/questions/4557468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/554786/" ]
I only briefly looked at your code, but I don't understand what you're doing (in that order). You're checking the password & username on the OnCreate method, which, barring any autofilling, the textboxes will be blank. Then you declare your onClickListeners. Try restructuring it to be something like this (pseudo-cod...
I'm almost positive your problem is in setting an onClick() call instead of just starting the activity. It seems a bit complex of a call, and I think you're already checking the conditions in the appropriate place. Why do you need another onClick() call?
4,557,468
I created this Sign-In page. I start by declaring variables for username/password & buttons. If user enters "test" as username & "test" as password and hits the login button, its supposed to go to the DrinksTwitter.class activity, else throw error message I created. To me the code and login makes perfect sense. I'm not...
2010/12/29
[ "https://Stackoverflow.com/questions/4557468", "https://Stackoverflow.com", "https://Stackoverflow.com/users/554786/" ]
I only briefly looked at your code, but I don't understand what you're doing (in that order). You're checking the password & username on the OnCreate method, which, barring any autofilling, the textboxes will be blank. Then you declare your onClickListeners. Try restructuring it to be something like this (pseudo-cod...
You should indent your code correctly. That syntax error is because you don't have a closing brace around the `btnLogin.setOnClickListener`. You then miss at least a couple more closing brackets. Also, as others have posted, you check the edittext value before the onCreate() method even gives up control to the UI. Yo...