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
17,900,122
As it can be seen in the following fiddle, I have two `div`s, contained in a parent `div` that have stretched to contain the big div, my goal is to make those child `div`s equal in height. <http://fiddle.jshell.net/y9bM4/> ![](https://i.stack.imgur.com/cDpcM.png)
2013/07/27
[ "https://Stackoverflow.com/questions/17900122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1657309/" ]
Use `display: flex` to stretch your `div`s: ``` div#container { padding:20px; background:#F1F1F1; display: flex; } .content { width:150px; background:#ddd; padding:10px; margin-left: 10px; } ``` [JSFIDDLE](https://jsfiddle.net/lampt2509/m7tu4c25/4/)
<https://www.youtube.com/watch?v=jV8B24rSN5o> I think you can use display as grid: ``` .parent { display: grid }; ```
17,900,122
As it can be seen in the following fiddle, I have two `div`s, contained in a parent `div` that have stretched to contain the big div, my goal is to make those child `div`s equal in height. <http://fiddle.jshell.net/y9bM4/> ![](https://i.stack.imgur.com/cDpcM.png)
2013/07/27
[ "https://Stackoverflow.com/questions/17900122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1657309/" ]
Add the following CSS: For the parent div: ``` style="display: flex;" ``` For child div: ``` style="align-items: stretch;" ```
You can do it easily with a bit of jQuery ``` $(document).ready(function(){ var parentHeight = $("#parentDiv").parent().height(); $("#childDiv").height(parentHeight); }); ```
17,900,122
As it can be seen in the following fiddle, I have two `div`s, contained in a parent `div` that have stretched to contain the big div, my goal is to make those child `div`s equal in height. <http://fiddle.jshell.net/y9bM4/> ![](https://i.stack.imgur.com/cDpcM.png)
2013/07/27
[ "https://Stackoverflow.com/questions/17900122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1657309/" ]
<https://www.youtube.com/watch?v=jV8B24rSN5o> I think you can use display as grid: ``` .parent { display: grid }; ```
You can do it easily with a bit of jQuery ``` $(document).ready(function(){ var parentHeight = $("#parentDiv").parent().height(); $("#childDiv").height(parentHeight); }); ```
17,900,122
As it can be seen in the following fiddle, I have two `div`s, contained in a parent `div` that have stretched to contain the big div, my goal is to make those child `div`s equal in height. <http://fiddle.jshell.net/y9bM4/> ![](https://i.stack.imgur.com/cDpcM.png)
2013/07/27
[ "https://Stackoverflow.com/questions/17900122", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1657309/" ]
Add the following CSS: For the parent div: ``` style="display: flex;" ``` For child div: ``` style="align-items: stretch;" ```
<https://www.youtube.com/watch?v=jV8B24rSN5o> I think you can use display as grid: ``` .parent { display: grid }; ```
5,900,434
In eclipse I have an error related to my build path. The error: ``` Project 'XX' is missing required library: 'middlegen-2.1.jar' ``` But the library is deleted before the build path configuration. Is there perhaps a problem with cache or so? Has anyone an idea why eclipse say that the library is required even ...
2011/05/05
[ "https://Stackoverflow.com/questions/5900434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/740249/" ]
I guess you've deleted the library from a directory, but you've not updated the project *Build Path*. Right click on the project name, select "Properties", go to "Java Build Path", choose the "Libraries" tab, and see that your library is not in the list. If it's still in that list, remove it with the "Remove" button.
Your project configuration includes a reference to middlegen-2.1.jar on the build path. That file is missing. You can either a) put the file there, b) change the configuration to point to the file in another location, or c) remove the reference, cross your fingers, and hope the project compiles and runs without the jar...
5,900,434
In eclipse I have an error related to my build path. The error: ``` Project 'XX' is missing required library: 'middlegen-2.1.jar' ``` But the library is deleted before the build path configuration. Is there perhaps a problem with cache or so? Has anyone an idea why eclipse say that the library is required even ...
2011/05/05
[ "https://Stackoverflow.com/questions/5900434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/740249/" ]
I had this same problem, but the steps above didn't help. I did a search through files in the Eclipse workspace and found files named `.markers` and `.markers.snap` that contained the bad path names under the folders in `.projects` that were named for the projects that weren't building. I exited Eclipse, backed up thos...
Your project configuration includes a reference to middlegen-2.1.jar on the build path. That file is missing. You can either a) put the file there, b) change the configuration to point to the file in another location, or c) remove the reference, cross your fingers, and hope the project compiles and runs without the jar...
5,900,434
In eclipse I have an error related to my build path. The error: ``` Project 'XX' is missing required library: 'middlegen-2.1.jar' ``` But the library is deleted before the build path configuration. Is there perhaps a problem with cache or so? Has anyone an idea why eclipse say that the library is required even ...
2011/05/05
[ "https://Stackoverflow.com/questions/5900434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/740249/" ]
This error is due to probably either missing required library or due to caching of eclipse **Solution 1** 1. Open project explorer window. 2. Right click on the project and goto Buildpath -> ConfigureBuildPath 3. Under the libraries tab check whether all the used jar files are physically located in the directory/web ...
Your project configuration includes a reference to middlegen-2.1.jar on the build path. That file is missing. You can either a) put the file there, b) change the configuration to point to the file in another location, or c) remove the reference, cross your fingers, and hope the project compiles and runs without the jar...
5,900,434
In eclipse I have an error related to my build path. The error: ``` Project 'XX' is missing required library: 'middlegen-2.1.jar' ``` But the library is deleted before the build path configuration. Is there perhaps a problem with cache or so? Has anyone an idea why eclipse say that the library is required even ...
2011/05/05
[ "https://Stackoverflow.com/questions/5900434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/740249/" ]
I guess you've deleted the library from a directory, but you've not updated the project *Build Path*. Right click on the project name, select "Properties", go to "Java Build Path", choose the "Libraries" tab, and see that your library is not in the list. If it's still in that list, remove it with the "Remove" button.
I had this same problem, but the steps above didn't help. I did a search through files in the Eclipse workspace and found files named `.markers` and `.markers.snap` that contained the bad path names under the folders in `.projects` that were named for the projects that weren't building. I exited Eclipse, backed up thos...
5,900,434
In eclipse I have an error related to my build path. The error: ``` Project 'XX' is missing required library: 'middlegen-2.1.jar' ``` But the library is deleted before the build path configuration. Is there perhaps a problem with cache or so? Has anyone an idea why eclipse say that the library is required even ...
2011/05/05
[ "https://Stackoverflow.com/questions/5900434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/740249/" ]
I guess you've deleted the library from a directory, but you've not updated the project *Build Path*. Right click on the project name, select "Properties", go to "Java Build Path", choose the "Libraries" tab, and see that your library is not in the list. If it's still in that list, remove it with the "Remove" button.
This error is due to probably either missing required library or due to caching of eclipse **Solution 1** 1. Open project explorer window. 2. Right click on the project and goto Buildpath -> ConfigureBuildPath 3. Under the libraries tab check whether all the used jar files are physically located in the directory/web ...
5,900,434
In eclipse I have an error related to my build path. The error: ``` Project 'XX' is missing required library: 'middlegen-2.1.jar' ``` But the library is deleted before the build path configuration. Is there perhaps a problem with cache or so? Has anyone an idea why eclipse say that the library is required even ...
2011/05/05
[ "https://Stackoverflow.com/questions/5900434", "https://Stackoverflow.com", "https://Stackoverflow.com/users/740249/" ]
This error is due to probably either missing required library or due to caching of eclipse **Solution 1** 1. Open project explorer window. 2. Right click on the project and goto Buildpath -> ConfigureBuildPath 3. Under the libraries tab check whether all the used jar files are physically located in the directory/web ...
I had this same problem, but the steps above didn't help. I did a search through files in the Eclipse workspace and found files named `.markers` and `.markers.snap` that contained the bad path names under the folders in `.projects` that were named for the projects that weren't building. I exited Eclipse, backed up thos...
60,724,575
My HTML: ```html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Competition</title> <link href="css/style.css" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Noto+Sans+JP|Pacifico&display=swap" rel="stylesheet"> </head> <body> <div class="wrapper"> <header> ...
2020/03/17
[ "https://Stackoverflow.com/questions/60724575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13076854/" ]
You said you **cannot modify your HTML**, so this is the solution I found. You want to **prevent the form to submit**. You can do that with: ``` const myForm = document.querySelector('#registrar'); myForm.addEventListener("submit", function(evt) { evt.preventDefault(); }); ``` See working snippet: ```js function...
You only need to change the **submit button in html** and **add preventDefault for the submit eventListener** **HTML** ```html /* Replace the button to input as below */ <input type="submit" value="Submit"> ``` **JS** ```js /* Adding eventlistener for the form submit */ const form = document.getElementById('regist...
423,935
I have a problem with moving nodes of my timeline. I want the node to be positioned always like the first one in my example no matter how long the text is. How can I do that? I'm very new to LaTeX so please ELI5 if possible. Thanks in advance! Code: ``` \begin{tikzpicture} \draw[-stealth] (0,0) -- (25,0); \foreach \...
2018/03/29
[ "https://tex.stackexchange.com/questions/423935", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/158997/" ]
Use a `ROT` style, e.g., like this `ROT/.style={above,rotate=45,anchor=south west}`, and all nodes take the option `[ROT]` to follow the same behavior. You may choose `above=5pt` to lift the label up a bit as you wish. ``` \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}[ROT/.style={above,rotate...
You can use `event/.style={anchor=south west,rotate=45,outer sep=2pt}` ``` \documentclass[tikz,border=7pt]{standalone} \begin{document} \begin{tikzpicture}[event/.style={anchor=south west,rotate=45,outer sep=2pt}] \draw[-stealth] (2,0) -- +(25,0); \foreach[count=\i] \m in {Nov/Dez,445 v.Chr.,Jan/Feb,Feb/März...
15,010,031
I have an array of Active Record objects of the same class. That objects have a defined relation. Is there a way to read the related objects in a "bulk" manner after the "parent" objects was initialized? Example I have defined AR classes **Post**, **User**, **Comment** \**Post*\* have relation **owner** (BELONGS\_TO)...
2013/02/21
[ "https://Stackoverflow.com/questions/15010031", "https://Stackoverflow.com", "https://Stackoverflow.com/users/687379/" ]
If you're trying to optimize for large result sets like this you're almost always better off rolling your own. The Yii developers [even recommend](http://www.yiiframework.com/doc/guide/1.1/en/database.ar) not using activerecord for complex situations like this (very different loading order). Although ======== To begi...
I don't know about an extension which could do this. Maybe you can create one yii should know everything about the data to solve this task. Let's say `comment` has a `post_id` which links to the `id` in the `post` table. There are several options to load the related comments of the post. **Option 1**: Using the IDs ...
15,010,031
I have an array of Active Record objects of the same class. That objects have a defined relation. Is there a way to read the related objects in a "bulk" manner after the "parent" objects was initialized? Example I have defined AR classes **Post**, **User**, **Comment** \**Post*\* have relation **owner** (BELONGS\_TO)...
2013/02/21
[ "https://Stackoverflow.com/questions/15010031", "https://Stackoverflow.com", "https://Stackoverflow.com/users/687379/" ]
If you're trying to optimize for large result sets like this you're almost always better off rolling your own. The Yii developers [even recommend](http://www.yiiframework.com/doc/guide/1.1/en/database.ar) not using activerecord for complex situations like this (very different loading order). Although ======== To begi...
If your main concern is to avoid lazy loading and wanted to retrieve all Post with its related records of owner and comments. This maybe useful for you. ``` $criteria = new CDbCriteria(); $criteria->with = array('comments','owner'); $result = $Post->together()->findAll($criteria); ``` Reference: <http://www.yiifram...
93,589
This is a question from Cormen 3rd edition(exercise 10.1). I am of the opinion that the complexity should be O(1), as we just have to look into the next pointer of the current node. But the answers from the web suggest that it should be O(n). Where am I getting it wrong? Can someone please help me out??? Thanks in ...
2018/06/27
[ "https://cs.stackexchange.com/questions/93589", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/89097/" ]
Both answers look wrong. Time is indeed $O(1)$ because you can look into `prev` (not `next`) pointer of the node. The answers you found on the web are probably about single-linked lists.
I guess if you include the time it takes you to find a node X and its predecessor, then finding the node would be $O(n)$ and going back once will be $O(1)$, but this sounds unnecessary since we can directly find the predecessor.
66,440,069
The program window wont update when I try to draw a rectangle. It isn't the program not responding because I can still draw the background, but the rectangle wont update and I don't know what to change. There are no errors popping up, and the only warning is: > > Warning C28251 Inconsistent annotation for 'WinMain': ...
2021/03/02
[ "https://Stackoverflow.com/questions/66440069", "https://Stackoverflow.com", "https://Stackoverflow.com/users/14699592/" ]
In the `draw_rect` function, `pixel` is an unsigned int type. ``` for (int x = X; x < X2; ++x) { pixel += 0xf5500; } ``` `pixel += 0xf5500` will only increase the size of `pixel`, because pixel is not an address. This is the reason why square cannot be drawn =>`render_state.memory` has no color data. You need...
As stated in comments, the problem is that you are not handling the `WM_PAINT` message in your `windows_callback()` at all. You need to do something more like this instead: renderer.h ```cpp #ifndef renderer_H #define renderer_H #include <Windows.h> struct Render_State { int width; int hight; void* memo...
3,257,722
So, the supposed in the theorem is that $x\_0$ is a root of polynomial $P$ with multiplicity $m$. Then you can express the polynomial $P$ as $P(x)=(x-x\_0)^m\cdot Q(x)$, where $Q(x)$ is some polynomial and is not divisible by $x-x\_0$. My question is why $Q(x)$ is not divisible by $x-x\_0$?
2019/06/10
[ "https://math.stackexchange.com/questions/3257722", "https://math.stackexchange.com", "https://math.stackexchange.com/users/637210/" ]
If it was, then we could have written $P(x) = (x-x\_0)^{m+1}R(x)$ where $R(x) = \frac{Q(x)}{x-x\_0}$. This would contradict root $x\_0$ having multiplicity $m$.
Because the meaning of the expression “$x\_0$ is a root of $P(x)$ with multiplicity $m$” is that $(x-x\_0)^m$ divides $P(x)$ and that furthermore $x\_0$ is *not* a root of the quotient. So, if $Q(x)=\frac{P(x)}{(x-x\_0)^m}$, then $x\_0$ is not a root of $Q(x)$.
3,257,722
So, the supposed in the theorem is that $x\_0$ is a root of polynomial $P$ with multiplicity $m$. Then you can express the polynomial $P$ as $P(x)=(x-x\_0)^m\cdot Q(x)$, where $Q(x)$ is some polynomial and is not divisible by $x-x\_0$. My question is why $Q(x)$ is not divisible by $x-x\_0$?
2019/06/10
[ "https://math.stackexchange.com/questions/3257722", "https://math.stackexchange.com", "https://math.stackexchange.com/users/637210/" ]
If it was, then we could have written $P(x) = (x-x\_0)^{m+1}R(x)$ where $R(x) = \frac{Q(x)}{x-x\_0}$. This would contradict root $x\_0$ having multiplicity $m$.
$x\_0$ having multiplicity of exactly $m$ means that $x-x\_0$ divides $P(x)$ exactly $m$ times - $Q(x)$ had a factor of $x-x\_0$ then the multiplicity would be more than $m$.
35,122,327
Is it possible to catch taps on a React Native ScrollView while the keyboard is up? Or any React Native container for that matter? I see the ScrollView property [keyboardShouldPersistTaps](https://facebook.github.io/react-native/docs/scrollview.html#keyboardshouldpersisttaps) and [keyboardDismissMode](https://faceboo...
2016/02/01
[ "https://Stackoverflow.com/questions/35122327", "https://Stackoverflow.com", "https://Stackoverflow.com/users/586181/" ]
Looks like I answered my own question; setting [keyboardShouldPersistTaps](https://facebook.github.io/react-native/docs/scrollview.html#keyboardshouldpersisttaps) to `'always'` or `'handled'` on a ScrollView will pass taps to the components in that ScrollView even when the keyboard is up.
You need to add the keyboardShouldPersistTaps to 'always' on your list too. Check out this answer: <https://stackoverflow.com/a/42815548/2887460>
334,252
I am new to lightning components, I am displaying query result in a lightning component. While displaying the count(Id) in the lightning table, i am facing issue. Can anyone help me to correct the syntax. Apex class: ``` public class OmniChannelMonitoringClass { @AuraEnabled public static List < AggregateRes...
2021/02/15
[ "https://salesforce.stackexchange.com/questions/334252", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/27444/" ]
In order to get around this problem, you must first create a Permission Set that has access to the Apex Classes that are required for your Flow to function properly. After this is done, record the Permission Set Id (it's in the URL). After that, retrieve the System User Id, this is unique per org, but the easiest way ...
It's possible to assign Apex Classes to the profile of the System user using URL hacks. You'll need the profile ID of the System user. You can get this by making the following SOQL query, and replacing *{SystemUserID}* with the ID of your system user (which can be found in the Flow error email). ``` SELECT ProfileId ...
16,721
Erdős, Ginzburg and Ziv prove the following: Let $n \geq 1$ and $a\_1,\ldots, a\_{2n-1}\in \mathbb{Z}$. There exist distinct $i\_1,\ldots , i\_n$ such that $$ a\_{i\_1} + \cdots + a\_{i\_n} \equiv 0 \pmod{n}. $$ Is there a proof that doesn't use the Chevalley–Warning theorem (or a variant of its proof)?
2010/02/28
[ "https://mathoverflow.net/questions/16721", "https://mathoverflow.net", "https://mathoverflow.net/users/3958/" ]
The original proof used Cauchy-Davenport lemma. Several proofs are given in [this](http://www.tau.ac.il/~nogaa/PDFS/egz1.pdf) article of Alon-Dubiner (The proofs deal only with the case when $n$ is prime, but deducing the general case is straightforward from there). Note that the ideas behind most of these proofs could...
Here is what I remember from a proof I came up with long time ago (it appeared in some competitions). I am sure it is known, but since the proof is short, I will put it here: The statement can be reduced to the case when $n=p$ is prime. Now it will follow from the following: **Lemma**: Let $2\leq i\leq p$ and consid...
113,002
Yesterday I bought my first DSLR, a used Canon EOS Rebel T5 with a lot if accessories. It has been used 15 times, and I think I’m gonna take a lot of pictures with it, but what happens when I take too many pictures? Will the shutter stop working? Could I fix it?
2019/11/09
[ "https://photo.stackexchange.com/questions/113002", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/87783/" ]
The camera shutter is a mechanical part, and like all things in the universe, subject to eventual failure. You can see [How many actuations are "too many actuations"?](https://photo.stackexchange.com/questions/3813/how-many-actuations-are-too-many-actuations) for some information on just how many clicks a typical shutt...
A count of just 15 seems unlikely on a used camera! No, it won't turn off at some predetermined number. It's just, like an odometer on a car, an indicator of how much it's been used. Interesting when determining the resale price perhaps. But no, shutter replacement if it DOES fail is not a DIY job, and is very likely...
552,642
I want to ask about the interpretation of electric potential as it relates to this simple problem : " "A $0.800$ mm diameter ball bearing has $1.50 \times 10^9$ excess electrons. **What is the ball bearing's potential?**" The electric potential is the amount of work needed to move a unit of charge from one point to an...
2020/05/17
[ "https://physics.stackexchange.com/questions/552642", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/245449/" ]
To answer your main question, it makes sense to ask about the potential because the potential inside a pecfect conductor is constant and you can calculate it as the potential at the surface (radius $R$). For a bounded charge distribution like the one you say, the potential at $\vec{r}$ is the work that **you** have to...
*Well, everywhere on the ball bearing, the potential is same. So potential of the bearing is a justified statement, referring to anywhere on the sphere.* Though we cannot say potential. atba point, and only potential differences make sense, we usually take potential at $\infty$ to be zero and potential on any point on ...
49,672,992
I am running a Symfony 2.8 based web app which sends some form data back to a controller using Ajax. So far everything worked fine, but since the latest macOS update to version 10.13.4 users start to report, that submitting the form does not work anymore in Safari. Other macOS Versions and other browsers on 10.13.4 st...
2018/04/05
[ "https://Stackoverflow.com/questions/49672992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777861/" ]
Andrei Herford's solution will crash other browsers that do not support the entries() method of FormData - using try/catch will only find execution errors, not syntax errors. Our solution was to use plain JavaScript to remove the empty file input element **before** creating the FormData object, thus: ``` for (i = 0; ...
Meanwhile I found this quick and dirty solution. But actually I am looking for a real workaround. Any ideas? ``` // Filter out empty file just before the Ajax request // Use try/catch since Safari < 10.13.4 does not support FormData.entries() try { for (var pair of data.entries()) { if (pair[1] instanceof Fil...
49,672,992
I am running a Symfony 2.8 based web app which sends some form data back to a controller using Ajax. So far everything worked fine, but since the latest macOS update to version 10.13.4 users start to report, that submitting the form does not work anymore in Safari. Other macOS Versions and other browsers on 10.13.4 st...
2018/04/05
[ "https://Stackoverflow.com/questions/49672992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777861/" ]
Meanwhile I found this quick and dirty solution. But actually I am looking for a real workaround. Any ideas? ``` // Filter out empty file just before the Ajax request // Use try/catch since Safari < 10.13.4 does not support FormData.entries() try { for (var pair of data.entries()) { if (pair[1] instanceof Fil...
I used Andrei's suggestion, which worked for safari, but broke IE. The only solution I could find that would work in both browsers was to use eval(). Since this appears to be a bug only affecting safari 11 I also added a check on browser version. ``` if(dataObj instanceof FormData && navigator.userAgent.match(/versi...
49,672,992
I am running a Symfony 2.8 based web app which sends some form data back to a controller using Ajax. So far everything worked fine, but since the latest macOS update to version 10.13.4 users start to report, that submitting the form does not work anymore in Safari. Other macOS Versions and other browsers on 10.13.4 st...
2018/04/05
[ "https://Stackoverflow.com/questions/49672992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777861/" ]
I use FormData throughout my site and can verify that this is a problem with the latest version of Safari. Removing the empty file fixes the problem. Here's the code that worked for me: ``` var form = $('#formID'); var data = new FormData(form[0]) //hack to fix safari bug where upload fails if file input is emp...
Meanwhile I found this quick and dirty solution. But actually I am looking for a real workaround. Any ideas? ``` // Filter out empty file just before the Ajax request // Use try/catch since Safari < 10.13.4 does not support FormData.entries() try { for (var pair of data.entries()) { if (pair[1] instanceof Fil...
49,672,992
I am running a Symfony 2.8 based web app which sends some form data back to a controller using Ajax. So far everything worked fine, but since the latest macOS update to version 10.13.4 users start to report, that submitting the form does not work anymore in Safari. Other macOS Versions and other browsers on 10.13.4 st...
2018/04/05
[ "https://Stackoverflow.com/questions/49672992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777861/" ]
Andrei Herford's solution will crash other browsers that do not support the entries() method of FormData - using try/catch will only find execution errors, not syntax errors. Our solution was to use plain JavaScript to remove the empty file input element **before** creating the FormData object, thus: ``` for (i = 0; ...
I used Andrei's suggestion, which worked for safari, but broke IE. The only solution I could find that would work in both browsers was to use eval(). Since this appears to be a bug only affecting safari 11 I also added a check on browser version. ``` if(dataObj instanceof FormData && navigator.userAgent.match(/versi...
49,672,992
I am running a Symfony 2.8 based web app which sends some form data back to a controller using Ajax. So far everything worked fine, but since the latest macOS update to version 10.13.4 users start to report, that submitting the form does not work anymore in Safari. Other macOS Versions and other browsers on 10.13.4 st...
2018/04/05
[ "https://Stackoverflow.com/questions/49672992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777861/" ]
Andrei Herford's solution will crash other browsers that do not support the entries() method of FormData - using try/catch will only find execution errors, not syntax errors. Our solution was to use plain JavaScript to remove the empty file input element **before** creating the FormData object, thus: ``` for (i = 0; ...
I used this solution and works for me. ``` var $form = $('#website_settings_form'); var $inputs = $('input[type="file"]:not([disabled])', $form); //select input files $inputs.each(function(_, input) { if (input.files.length > 0) return $(input).prop('disabled', true) //if the input doesn't have up...
49,672,992
I am running a Symfony 2.8 based web app which sends some form data back to a controller using Ajax. So far everything worked fine, but since the latest macOS update to version 10.13.4 users start to report, that submitting the form does not work anymore in Safari. Other macOS Versions and other browsers on 10.13.4 st...
2018/04/05
[ "https://Stackoverflow.com/questions/49672992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777861/" ]
I use FormData throughout my site and can verify that this is a problem with the latest version of Safari. Removing the empty file fixes the problem. Here's the code that worked for me: ``` var form = $('#formID'); var data = new FormData(form[0]) //hack to fix safari bug where upload fails if file input is emp...
I used Andrei's suggestion, which worked for safari, but broke IE. The only solution I could find that would work in both browsers was to use eval(). Since this appears to be a bug only affecting safari 11 I also added a check on browser version. ``` if(dataObj instanceof FormData && navigator.userAgent.match(/versi...
49,672,992
I am running a Symfony 2.8 based web app which sends some form data back to a controller using Ajax. So far everything worked fine, but since the latest macOS update to version 10.13.4 users start to report, that submitting the form does not work anymore in Safari. Other macOS Versions and other browsers on 10.13.4 st...
2018/04/05
[ "https://Stackoverflow.com/questions/49672992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777861/" ]
I used this solution and works for me. ``` var $form = $('#website_settings_form'); var $inputs = $('input[type="file"]:not([disabled])', $form); //select input files $inputs.each(function(_, input) { if (input.files.length > 0) return $(input).prop('disabled', true) //if the input doesn't have up...
I used Andrei's suggestion, which worked for safari, but broke IE. The only solution I could find that would work in both browsers was to use eval(). Since this appears to be a bug only affecting safari 11 I also added a check on browser version. ``` if(dataObj instanceof FormData && navigator.userAgent.match(/versi...
49,672,992
I am running a Symfony 2.8 based web app which sends some form data back to a controller using Ajax. So far everything worked fine, but since the latest macOS update to version 10.13.4 users start to report, that submitting the form does not work anymore in Safari. Other macOS Versions and other browsers on 10.13.4 st...
2018/04/05
[ "https://Stackoverflow.com/questions/49672992", "https://Stackoverflow.com", "https://Stackoverflow.com/users/777861/" ]
I use FormData throughout my site and can verify that this is a problem with the latest version of Safari. Removing the empty file fixes the problem. Here's the code that worked for me: ``` var form = $('#formID'); var data = new FormData(form[0]) //hack to fix safari bug where upload fails if file input is emp...
I used this solution and works for me. ``` var $form = $('#website_settings_form'); var $inputs = $('input[type="file"]:not([disabled])', $form); //select input files $inputs.each(function(_, input) { if (input.files.length > 0) return $(input).prop('disabled', true) //if the input doesn't have up...
59,851,054
I am trying to query an entity with multiple levels of collections, and multiple collections at a single level. I'm using `Include()` and `ThenInclude()`, but not having much success. The examples I find don't have multiple collections on the same level and I haven't had any luck applying the technique to my use case. ...
2020/01/22
[ "https://Stackoverflow.com/questions/59851054", "https://Stackoverflow.com", "https://Stackoverflow.com/users/644558/" ]
You have to call `Include` for each level: ``` result = Home .Include(x => x.Areas) .ThenInclude(a => a.Categories) .ThenInclude(c => c.Subcategories) .ThenInclude(s => s.Recommendations) .Include(x => x.Areas) .ThenInclude(a => a.Recommendations) ```
You have to write your query as follows: ``` result = Home .Include(x => x.Areas) .ThenInclude(a => a.Categories) .ThenInclude(s => s.Recommendations) .Include(x => x.Areas) .ThenInclude(c => c.Subcategories) ```
14,048,420
I have 5 bits of text and i want that when you hover over one of the texts the css bellow will be applied to all the bits of text apart from the one you are hovering over. Could you go about doing this using jquery and the .siblings() attribute? Html: ``` <table width="1138" height="38" border="0" class="Home111"> ...
2012/12/27
[ "https://Stackoverflow.com/questions/14048420", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1857312/" ]
To do this, you can't simply use `.siblings()` because they're not strictly siblings, more like very distant cousins :) so to speed things up you should keep a list of all items in a variable and then use `.not(this)` to exclude the current item in the `hover()` callbacks. ``` var items = $('.Home111 a'); // all ancho...
Can't be specific without the HTML and not knowing which rules are supposed to be applied to the siblings ``` $('a.blur').hover(function(){ $(this).siblings().addClass('someclass'); }, function(){ $(this).siblings().removeClass('someclass'); }); ```
10,550,903
Given: * a dll which has been built in directory "A" * a debugging PC with source code put in directory "B" Then when debugging, VisualStudio will search for source code in "A", will not find it (as it is in "B"), and will display the dialog called "Find Source". Then you will browse to the correct location of source...
2012/05/11
[ "https://Stackoverflow.com/questions/10550903", "https://Stackoverflow.com", "https://Stackoverflow.com/users/25781/" ]
It seems that you have set some configuration related to debugging in project. This property page specifies where the debugger will look for source files when debugging the solution. To access the Debug Source Files property page, right-click on your Solution in Solution Explorer and select Properties from the shortc...
It is possible to automate the source code search using the autoHotKey scripting tool: it will open nicely the correct source code without any user input. The first time a file is search, it will take a few seconds, and then it will become instant. The script code is provided below. It's used with VS2010: ``` Sources...
8,908,287
Following this [python example](http://docs.python.org/release/3.1.3/library/base64.html), I encode a string as Base64 with: ``` >>> import base64 >>> encoded = base64.b64encode(b'data to be encoded') >>> encoded b'ZGF0YSB0byBiZSBlbmNvZGVk' ``` But, if I leave out the leading `b`: ``` >>> encoded = base64.b64encode...
2012/01/18
[ "https://Stackoverflow.com/questions/8908287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/835083/" ]
base64 encoding takes 8-bit binary byte data and encodes it uses only the characters `A-Z`, `a-z`, `0-9`, `+`, `/`\* so it can be transmitted over channels that do not preserve all 8-bits of data, such as email. Hence, it wants a string of 8-bit bytes. You create those in Python 3 with the `b''` syntax. If you remove...
There is all you need: ``` expected bytes, not str ``` The leading `b` makes your string binary. What version of Python do you use? 2.x or 3.x? **Edit:** See <http://docs.python.org/release/3.0.1/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit> for the gory details of strings in Python 3.x
8,908,287
Following this [python example](http://docs.python.org/release/3.1.3/library/base64.html), I encode a string as Base64 with: ``` >>> import base64 >>> encoded = base64.b64encode(b'data to be encoded') >>> encoded b'ZGF0YSB0byBiZSBlbmNvZGVk' ``` But, if I leave out the leading `b`: ``` >>> encoded = base64.b64encode...
2012/01/18
[ "https://Stackoverflow.com/questions/8908287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/835083/" ]
If the data to be encoded contains "exotic" characters, I think you have to encode in "UTF-8" ``` encoded = base64.b64encode (bytes('data to be encoded', "utf-8")) ```
There is all you need: ``` expected bytes, not str ``` The leading `b` makes your string binary. What version of Python do you use? 2.x or 3.x? **Edit:** See <http://docs.python.org/release/3.0.1/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit> for the gory details of strings in Python 3.x
8,908,287
Following this [python example](http://docs.python.org/release/3.1.3/library/base64.html), I encode a string as Base64 with: ``` >>> import base64 >>> encoded = base64.b64encode(b'data to be encoded') >>> encoded b'ZGF0YSB0byBiZSBlbmNvZGVk' ``` But, if I leave out the leading `b`: ``` >>> encoded = base64.b64encode...
2012/01/18
[ "https://Stackoverflow.com/questions/8908287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/835083/" ]
If the string is Unicode the easiest way is: ``` import base64 a = base64.b64encode(bytes(u'complex string: ñáéíóúÑ', "utf-8")) # a: b'Y29tcGxleCBzdHJpbmc6IMOxw6HDqcOtw7PDusOR' b = base64.b64decode(a).decode("utf-8", "ignore") print(b) # b...
There is all you need: ``` expected bytes, not str ``` The leading `b` makes your string binary. What version of Python do you use? 2.x or 3.x? **Edit:** See <http://docs.python.org/release/3.0.1/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit> for the gory details of strings in Python 3.x
8,908,287
Following this [python example](http://docs.python.org/release/3.1.3/library/base64.html), I encode a string as Base64 with: ``` >>> import base64 >>> encoded = base64.b64encode(b'data to be encoded') >>> encoded b'ZGF0YSB0byBiZSBlbmNvZGVk' ``` But, if I leave out the leading `b`: ``` >>> encoded = base64.b64encode...
2012/01/18
[ "https://Stackoverflow.com/questions/8908287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/835083/" ]
Short Answer ============ You need to push a `bytes-like` object (`bytes`, `bytearray`, etc) to the `base64.b64encode()` method. Here are two ways: ``` >>> import base64 >>> data = base64.b64encode(b'data to be encoded') >>> print(data) b'ZGF0YSB0byBiZSBlbmNvZGVk' ``` Or with a variable: ``` >>> import base64 >>> ...
There is all you need: ``` expected bytes, not str ``` The leading `b` makes your string binary. What version of Python do you use? 2.x or 3.x? **Edit:** See <http://docs.python.org/release/3.0.1/whatsnew/3.0.html#text-vs-data-instead-of-unicode-vs-8-bit> for the gory details of strings in Python 3.x
8,908,287
Following this [python example](http://docs.python.org/release/3.1.3/library/base64.html), I encode a string as Base64 with: ``` >>> import base64 >>> encoded = base64.b64encode(b'data to be encoded') >>> encoded b'ZGF0YSB0byBiZSBlbmNvZGVk' ``` But, if I leave out the leading `b`: ``` >>> encoded = base64.b64encode...
2012/01/18
[ "https://Stackoverflow.com/questions/8908287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/835083/" ]
base64 encoding takes 8-bit binary byte data and encodes it uses only the characters `A-Z`, `a-z`, `0-9`, `+`, `/`\* so it can be transmitted over channels that do not preserve all 8-bits of data, such as email. Hence, it wants a string of 8-bit bytes. You create those in Python 3 with the `b''` syntax. If you remove...
If the data to be encoded contains "exotic" characters, I think you have to encode in "UTF-8" ``` encoded = base64.b64encode (bytes('data to be encoded', "utf-8")) ```
8,908,287
Following this [python example](http://docs.python.org/release/3.1.3/library/base64.html), I encode a string as Base64 with: ``` >>> import base64 >>> encoded = base64.b64encode(b'data to be encoded') >>> encoded b'ZGF0YSB0byBiZSBlbmNvZGVk' ``` But, if I leave out the leading `b`: ``` >>> encoded = base64.b64encode...
2012/01/18
[ "https://Stackoverflow.com/questions/8908287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/835083/" ]
base64 encoding takes 8-bit binary byte data and encodes it uses only the characters `A-Z`, `a-z`, `0-9`, `+`, `/`\* so it can be transmitted over channels that do not preserve all 8-bits of data, such as email. Hence, it wants a string of 8-bit bytes. You create those in Python 3 with the `b''` syntax. If you remove...
If the string is Unicode the easiest way is: ``` import base64 a = base64.b64encode(bytes(u'complex string: ñáéíóúÑ', "utf-8")) # a: b'Y29tcGxleCBzdHJpbmc6IMOxw6HDqcOtw7PDusOR' b = base64.b64decode(a).decode("utf-8", "ignore") print(b) # b...
8,908,287
Following this [python example](http://docs.python.org/release/3.1.3/library/base64.html), I encode a string as Base64 with: ``` >>> import base64 >>> encoded = base64.b64encode(b'data to be encoded') >>> encoded b'ZGF0YSB0byBiZSBlbmNvZGVk' ``` But, if I leave out the leading `b`: ``` >>> encoded = base64.b64encode...
2012/01/18
[ "https://Stackoverflow.com/questions/8908287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/835083/" ]
base64 encoding takes 8-bit binary byte data and encodes it uses only the characters `A-Z`, `a-z`, `0-9`, `+`, `/`\* so it can be transmitted over channels that do not preserve all 8-bits of data, such as email. Hence, it wants a string of 8-bit bytes. You create those in Python 3 with the `b''` syntax. If you remove...
Short Answer ============ You need to push a `bytes-like` object (`bytes`, `bytearray`, etc) to the `base64.b64encode()` method. Here are two ways: ``` >>> import base64 >>> data = base64.b64encode(b'data to be encoded') >>> print(data) b'ZGF0YSB0byBiZSBlbmNvZGVk' ``` Or with a variable: ``` >>> import base64 >>> ...
8,908,287
Following this [python example](http://docs.python.org/release/3.1.3/library/base64.html), I encode a string as Base64 with: ``` >>> import base64 >>> encoded = base64.b64encode(b'data to be encoded') >>> encoded b'ZGF0YSB0byBiZSBlbmNvZGVk' ``` But, if I leave out the leading `b`: ``` >>> encoded = base64.b64encode...
2012/01/18
[ "https://Stackoverflow.com/questions/8908287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/835083/" ]
Short Answer ============ You need to push a `bytes-like` object (`bytes`, `bytearray`, etc) to the `base64.b64encode()` method. Here are two ways: ``` >>> import base64 >>> data = base64.b64encode(b'data to be encoded') >>> print(data) b'ZGF0YSB0byBiZSBlbmNvZGVk' ``` Or with a variable: ``` >>> import base64 >>> ...
If the data to be encoded contains "exotic" characters, I think you have to encode in "UTF-8" ``` encoded = base64.b64encode (bytes('data to be encoded', "utf-8")) ```
8,908,287
Following this [python example](http://docs.python.org/release/3.1.3/library/base64.html), I encode a string as Base64 with: ``` >>> import base64 >>> encoded = base64.b64encode(b'data to be encoded') >>> encoded b'ZGF0YSB0byBiZSBlbmNvZGVk' ``` But, if I leave out the leading `b`: ``` >>> encoded = base64.b64encode...
2012/01/18
[ "https://Stackoverflow.com/questions/8908287", "https://Stackoverflow.com", "https://Stackoverflow.com/users/835083/" ]
Short Answer ============ You need to push a `bytes-like` object (`bytes`, `bytearray`, etc) to the `base64.b64encode()` method. Here are two ways: ``` >>> import base64 >>> data = base64.b64encode(b'data to be encoded') >>> print(data) b'ZGF0YSB0byBiZSBlbmNvZGVk' ``` Or with a variable: ``` >>> import base64 >>> ...
If the string is Unicode the easiest way is: ``` import base64 a = base64.b64encode(bytes(u'complex string: ñáéíóúÑ', "utf-8")) # a: b'Y29tcGxleCBzdHJpbmc6IMOxw6HDqcOtw7PDusOR' b = base64.b64decode(a).decode("utf-8", "ignore") print(b) # b...
62,577,690
I need to draw a horizontal dotted line in pdf using TCPDF. I tried: ``` $style = array('width' => 0.1, 'cap' => 'butt', 'join' => 'miter', 'dash' => 1, 'color' => array(0, 0, 0)); $pdf->Line(5, 50, 100, 50, $style); ``` I used the dash parameter. When I set it to 1 it draws short dashes, but I need dots. I did not ...
2020/06/25
[ "https://Stackoverflow.com/questions/62577690", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5474790/" ]
Please use the below code for the draw horizontal dotted line in pdf using `TCPDF` and apply a style to it. [![enter image description here](https://i.stack.imgur.com/SmF65.png)](https://i.stack.imgur.com/SmF65.png) ``` <?php require_once('tcpdf.php'); // create new PDF document $pdf = new TCPDF(PDF_PAGE_ORIENTATIO...
You can have dots, if you want to. Just set the cap to **round** in the style properties: ``` $style = array('width' => 0.5, 'cap => 'round', 'dash' => '2,2,2,2', 'phase' => 0, 'color' => array(255, 0, 0)); ```
53,707
I would like some help in solving this problem. ![Height is 15 cm , base is 88 cm](https://i.stack.imgur.com/fjVLX.png) Height is 15 cm , base is 88 cm My attempt: $$(119.3 + m)(\sin(\theta)) = (88\*9.8)$$ $$ 15^2 + 88^2 = 89.269^2 $$ $$ \sin^{-1} = 15/89.269 $$ $$ (119.3 + m)(9.6733) = (88\*9.8) $$ $m = -30.14$...
2013/02/12
[ "https://physics.stackexchange.com/questions/53707", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/20741/" ]
user1530249, Your answer for a) seems fine. I personally would do this the following way: Newtons Laws give us this eqn of motion $$v\_{f}^{2}=v\_{i}^{2}+2ad \rightarrow ~=v\_{i}^{2}-2\*g\*85$$ Solving this gives $40.837 \frac{m}{s}$. For part b), I leave it to you to show the following. Using one of the eqns of mot...
Hello this is the my solution. $V\_y^2=2gh$ $\implies V\_y=40.82$ $\text{m/s}$ and then for second cannon $V\_x=V\_y=40.82$ $\text{m/s}$. I assumed second cannon only has horizontal velocity. Range of second cannon ball : $L = V\_x \times t$ and we know $h=(gt^2)/2$ Found $t= 4.16$ $s$ then $L=4.16 \times 40.82=...
53,707
I would like some help in solving this problem. ![Height is 15 cm , base is 88 cm](https://i.stack.imgur.com/fjVLX.png) Height is 15 cm , base is 88 cm My attempt: $$(119.3 + m)(\sin(\theta)) = (88\*9.8)$$ $$ 15^2 + 88^2 = 89.269^2 $$ $$ \sin^{-1} = 15/89.269 $$ $$ (119.3 + m)(9.6733) = (88\*9.8) $$ $m = -30.14$...
2013/02/12
[ "https://physics.stackexchange.com/questions/53707", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/20741/" ]
user1530249, Your answer for a) seems fine. I personally would do this the following way: Newtons Laws give us this eqn of motion $$v\_{f}^{2}=v\_{i}^{2}+2ad \rightarrow ~=v\_{i}^{2}-2\*g\*85$$ Solving this gives $40.837 \frac{m}{s}$. For part b), I leave it to you to show the following. Using one of the eqns of mot...
For part A, the velocity at the top of the cliff is $v=0$ because it 'just reaches' the top of the cliff.
53,707
I would like some help in solving this problem. ![Height is 15 cm , base is 88 cm](https://i.stack.imgur.com/fjVLX.png) Height is 15 cm , base is 88 cm My attempt: $$(119.3 + m)(\sin(\theta)) = (88\*9.8)$$ $$ 15^2 + 88^2 = 89.269^2 $$ $$ \sin^{-1} = 15/89.269 $$ $$ (119.3 + m)(9.6733) = (88\*9.8) $$ $m = -30.14$...
2013/02/12
[ "https://physics.stackexchange.com/questions/53707", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/20741/" ]
For part A, the velocity at the top of the cliff is $v=0$ because it 'just reaches' the top of the cliff.
Hello this is the my solution. $V\_y^2=2gh$ $\implies V\_y=40.82$ $\text{m/s}$ and then for second cannon $V\_x=V\_y=40.82$ $\text{m/s}$. I assumed second cannon only has horizontal velocity. Range of second cannon ball : $L = V\_x \times t$ and we know $h=(gt^2)/2$ Found $t= 4.16$ $s$ then $L=4.16 \times 40.82=...
198,992
On our high speed trains paper bags are provided to collect garbage. The following is printed on the bags: > > This may be used for waste or sickness > > > According to the Chinese words on the bags, 'sickness' means 'vomitus' here, but I've never seen usage like this and I cannot find that meaning in my dict. I...
2019/03/04
[ "https://ell.stackexchange.com/questions/198992", "https://ell.stackexchange.com", "https://ell.stackexchange.com/users/51792/" ]
Short answer: Yes 'sickness' here is being used to mean 'vomit' (I see 'vomitus' is in the dictionary, but I have never heard anyone say it other than perhaps a doctor). Long answer: Technically, 'sickness' does *not* mean 'vomit', according to the dictionary. It means: a) A particular illness or malady. b) The sta...
Yes, and my cleaner at university refused to clean up "sickness" from the bathroom. (Not mine, I hasten to add.) So the word has been used as such in (British) English.
256,895
I´m now trying to add a custom attribute for like 5 hours now. It drives me nuts that I dont find the solution hope you can help me. I want a custom attribute to be displayed and saved when the user wants to register in the frontend. What I did : 1. Create Module **module.xml** -> *app/code/Magento/CustomerAttribut...
2019/01/06
[ "https://magento.stackexchange.com/questions/256895", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/74201/" ]
Go to > > Configuration => General, set "Default Country" as "India". > > > Hope it will help you ! [![enter image description here](https://i.stack.imgur.com/dwm70.png)](https://i.stack.imgur.com/dwm70.png) [![enter image description here](https://i.stack.imgur.com/qmn35.png)](https://i.stack.imgur.com/qmn35....
Configuration => General, set "Default Country" as "India". and Allow Countries select India only.
2,644,221
> > Given > $$x^2 = \frac{x-y}{x+y},$$ calculate the derivative $y'$. > > > So I found the derivative by applying quotient rule on the right side, and power rule on the left and separated $dy/dx$. The answer was: $$y'(x) = -x^2 - 2 x y + \frac{y}{x} - y^2.$$ But, if I multiply $x+y$ on both sides, then calculate...
2018/02/10
[ "https://math.stackexchange.com/questions/2644221", "https://math.stackexchange.com", "https://math.stackexchange.com/users/529995/" ]
In order to ensure integrability in a right neighbourhood of the origin it is enough to have $n<2$. (Improper-Riemann-)Integrability in a left neighbourhood of the origin is a bit more subtle. By [Dirichlet's test](https://en.wikipedia.org/wiki/Dirichlet's_test) $$\lim\_{M\to +\infty}\int\_{1}^{M}\frac{\sin(x^2)}{x...
You have two limits to worry about: what happens when $x\to\infty$ and what happens when $x\to 0$. Everything in between "doesn't matter", as it contributes something finite. In the limit $x\to 0$ you are correct, and so any $n<2$ will do. In the limit $x\to \infty$ you can replace a $\sin\theta$ by $\exp i\theta$ whic...
13,345
I am using a C disassembler and I need to identify compiler-intrinsic functions (i.e. SEH\_prolog, SEH\_epilog etc.) within my C program. Right now, the only way I can do that is to use IDA's [FLIRT](https://www.hex-rays.com/products/ida/tech/flirt/in_depth.shtml) (Fast Library Identification and Recognition Technolog...
2016/08/23
[ "https://reverseengineering.stackexchange.com/questions/13345", "https://reverseengineering.stackexchange.com", "https://reverseengineering.stackexchange.com/users/17202/" ]
There is [radare2](http://rada.re) tool and framework, written in pure C, as an embeddable and a portable library - almost all functionality available via C API and r2pipe API. There are options to support: 1. FLIRT itself - r2 supports this format (see 'zF' commands) 2. Zignatures - internal format of r2 (see 'z?' ...
There is also [Sibyl](https://github.com/cea-sec/Sibyl), an open-source tool based on [Miasm2](https://github.com/cea-sec/miasm) that performs function divination.
73,155,635
This is the code I have, but it's not displaying properly ``` <TextField size="small" className="typing-container" defaultValue={thing.thingLastName} label="Last Name" onChange={(event) => setFirst(event.target.value)} requ...
2022/07/28
[ "https://Stackoverflow.com/questions/73155635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19580863/" ]
There is no `operator<<` for lists. You have to write a loop. For example ``` for (auto& item : menu) { std::cout << item << '\n'; } ``` If you think about it it's obvious why you have to do this yourself. How are you doing to separate the list items? I've chosen to put each item on a new line. You might choose...
The error message means that the operator << that you are trying to use with your object `menu` of the type `std::list<std::string>` is not defined for the class `std::list<std::string>`. Also you need to separate strings in the initializer list with commas. ``` std::list <std::string> menu = {"Black Coffee", "Espres...
73,155,635
This is the code I have, but it's not displaying properly ``` <TextField size="small" className="typing-container" defaultValue={thing.thingLastName} label="Last Name" onChange={(event) => setFirst(event.target.value)} requ...
2022/07/28
[ "https://Stackoverflow.com/questions/73155635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19580863/" ]
There is no `operator<<` for lists. You have to write a loop. For example ``` for (auto& item : menu) { std::cout << item << '\n'; } ``` If you think about it it's obvious why you have to do this yourself. How are you doing to separate the list items? I've chosen to put each item on a new line. You might choose...
All other answers are correct but here is the better way to do the same ``` #include <iostream> #include <algorithm> #include <list> template <typename T> std::ostream & operator << (std::ostream & os, const std::list<T> & vec){ std::for_each (vec.begin () , vec.end() , [&](const auto& val){ std::cout << val << ...
73,155,635
This is the code I have, but it's not displaying properly ``` <TextField size="small" className="typing-container" defaultValue={thing.thingLastName} label="Last Name" onChange={(event) => setFirst(event.target.value)} requ...
2022/07/28
[ "https://Stackoverflow.com/questions/73155635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19580863/" ]
There is no `operator<<` for lists. You have to write a loop. For example ``` for (auto& item : menu) { std::cout << item << '\n'; } ``` If you think about it it's obvious why you have to do this yourself. How are you doing to separate the list items? I've chosen to put each item on a new line. You might choose...
First thing, you didn't define a list: in the declaration of menu, initializer-list elems were not separated by comma (`,`). To make it reusable, I'd do it something like this: ``` #include <iostream> #include <list> static const std::string list_sep = ", "; template<typename C> struct FormattedContainer { Form...
73,155,635
This is the code I have, but it's not displaying properly ``` <TextField size="small" className="typing-container" defaultValue={thing.thingLastName} label="Last Name" onChange={(event) => setFirst(event.target.value)} requ...
2022/07/28
[ "https://Stackoverflow.com/questions/73155635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19580863/" ]
You should write code this way. In c++, you can't print a list directly. ``` #include <string> #include <list> using namespace std; int main() { cout << "Hello, welcome to Jay's Coffee!!\n"; string name; cout <<"What is your name "; cin >> name; cout <<"Hello " << name << ", th...
The error message means that the operator << that you are trying to use with your object `menu` of the type `std::list<std::string>` is not defined for the class `std::list<std::string>`. Also you need to separate strings in the initializer list with commas. ``` std::list <std::string> menu = {"Black Coffee", "Espres...
73,155,635
This is the code I have, but it's not displaying properly ``` <TextField size="small" className="typing-container" defaultValue={thing.thingLastName} label="Last Name" onChange={(event) => setFirst(event.target.value)} requ...
2022/07/28
[ "https://Stackoverflow.com/questions/73155635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19580863/" ]
The error message means that the operator << that you are trying to use with your object `menu` of the type `std::list<std::string>` is not defined for the class `std::list<std::string>`. Also you need to separate strings in the initializer list with commas. ``` std::list <std::string> menu = {"Black Coffee", "Espres...
All other answers are correct but here is the better way to do the same ``` #include <iostream> #include <algorithm> #include <list> template <typename T> std::ostream & operator << (std::ostream & os, const std::list<T> & vec){ std::for_each (vec.begin () , vec.end() , [&](const auto& val){ std::cout << val << ...
73,155,635
This is the code I have, but it's not displaying properly ``` <TextField size="small" className="typing-container" defaultValue={thing.thingLastName} label="Last Name" onChange={(event) => setFirst(event.target.value)} requ...
2022/07/28
[ "https://Stackoverflow.com/questions/73155635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19580863/" ]
The error message means that the operator << that you are trying to use with your object `menu` of the type `std::list<std::string>` is not defined for the class `std::list<std::string>`. Also you need to separate strings in the initializer list with commas. ``` std::list <std::string> menu = {"Black Coffee", "Espres...
First thing, you didn't define a list: in the declaration of menu, initializer-list elems were not separated by comma (`,`). To make it reusable, I'd do it something like this: ``` #include <iostream> #include <list> static const std::string list_sep = ", "; template<typename C> struct FormattedContainer { Form...
73,155,635
This is the code I have, but it's not displaying properly ``` <TextField size="small" className="typing-container" defaultValue={thing.thingLastName} label="Last Name" onChange={(event) => setFirst(event.target.value)} requ...
2022/07/28
[ "https://Stackoverflow.com/questions/73155635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19580863/" ]
You should write code this way. In c++, you can't print a list directly. ``` #include <string> #include <list> using namespace std; int main() { cout << "Hello, welcome to Jay's Coffee!!\n"; string name; cout <<"What is your name "; cin >> name; cout <<"Hello " << name << ", th...
All other answers are correct but here is the better way to do the same ``` #include <iostream> #include <algorithm> #include <list> template <typename T> std::ostream & operator << (std::ostream & os, const std::list<T> & vec){ std::for_each (vec.begin () , vec.end() , [&](const auto& val){ std::cout << val << ...
73,155,635
This is the code I have, but it's not displaying properly ``` <TextField size="small" className="typing-container" defaultValue={thing.thingLastName} label="Last Name" onChange={(event) => setFirst(event.target.value)} requ...
2022/07/28
[ "https://Stackoverflow.com/questions/73155635", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19580863/" ]
You should write code this way. In c++, you can't print a list directly. ``` #include <string> #include <list> using namespace std; int main() { cout << "Hello, welcome to Jay's Coffee!!\n"; string name; cout <<"What is your name "; cin >> name; cout <<"Hello " << name << ", th...
First thing, you didn't define a list: in the declaration of menu, initializer-list elems were not separated by comma (`,`). To make it reusable, I'd do it something like this: ``` #include <iostream> #include <list> static const std::string list_sep = ", "; template<typename C> struct FormattedContainer { Form...
51,808,979
In the code below, how do I filter `capital_listings` so to return listings only for capital cities? Also, is it possible to get rid of the intermediate `capitals_names` list? ``` capitals = City.objects.filter(status='capital') capitals_names = [capital.name for capital in capitals] capital_listings = Listing.objects...
2018/08/12
[ "https://Stackoverflow.com/questions/51808979", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8461786/" ]
``` capital_listings = Listing.objects.filter(city__in=capital_names) ```
If you change `Listings.city` to a foreignkey relationship, you can do your query in a single step. ``` class City(models.Model): name = models.CharField(max_length = 30, default = 'placeholder') status = models.CharField(max_length = 30, default = 'placeholder') class Listing(models.Model): city = models...
59,665,506
I have 2 queries. First gets the full name of a committee head if the committee has more that 1 member. ``` var result = await db.ExpertCommittees .Where(f => f.Id == committeeId) .Where(f => f.ExpertCommitteeMembers.Count > 1) .Select(f => f.ExpertCommitteeMembers .Where(m => m.IsCommitteeHead) .F...
2020/01/09
[ "https://Stackoverflow.com/questions/59665506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12264965/" ]
If I understand correctly you can try to let condition into inner linq`where` ``` var result = await db.ExpertCommittees .Where(f => f.Id == committeeId) .Select(f => f.ExpertCommitteeMembers.Where(m => (m.IsCommitteeHead && f.ExpertCommitteeMembers.Count > 1)||f.ExpertCommi...
you can Create a create anonymous object in linq query select. which will contain FullName and count. ``` var result = await db.ExpertCommittees .Where(f => f.Id == committeeId) .Where(f => f.ExpertCommitteeMembers.Count > 1) .Select(f => new { FullName = f.ExpertCommitteeMembers .Where(m =...
59,665,506
I have 2 queries. First gets the full name of a committee head if the committee has more that 1 member. ``` var result = await db.ExpertCommittees .Where(f => f.Id == committeeId) .Where(f => f.ExpertCommitteeMembers.Count > 1) .Select(f => f.ExpertCommitteeMembers .Where(m => m.IsCommitteeHead) .F...
2020/01/09
[ "https://Stackoverflow.com/questions/59665506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12264965/" ]
If I understand correctly you can try to let condition into inner linq`where` ``` var result = await db.ExpertCommittees .Where(f => f.Id == committeeId) .Select(f => f.ExpertCommitteeMembers.Where(m => (m.IsCommitteeHead && f.ExpertCommitteeMembers.Count > 1)||f.ExpertCommi...
A generated Join, as it is generated from ExpertCommittees to ExpertCommitteeMembers, with a Navigation-Collection, will always do a `Left Join`, what you want is an `Inner Join`. It will give you only items with entities in both tables. This will be something like ``` db.ExpertCommittees.Join(db.ExpertCommitteme...
59,665,506
I have 2 queries. First gets the full name of a committee head if the committee has more that 1 member. ``` var result = await db.ExpertCommittees .Where(f => f.Id == committeeId) .Where(f => f.ExpertCommitteeMembers.Count > 1) .Select(f => f.ExpertCommitteeMembers .Where(m => m.IsCommitteeHead) .F...
2020/01/09
[ "https://Stackoverflow.com/questions/59665506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12264965/" ]
you can Create a create anonymous object in linq query select. which will contain FullName and count. ``` var result = await db.ExpertCommittees .Where(f => f.Id == committeeId) .Where(f => f.ExpertCommitteeMembers.Count > 1) .Select(f => new { FullName = f.ExpertCommitteeMembers .Where(m =...
A generated Join, as it is generated from ExpertCommittees to ExpertCommitteeMembers, with a Navigation-Collection, will always do a `Left Join`, what you want is an `Inner Join`. It will give you only items with entities in both tables. This will be something like ``` db.ExpertCommittees.Join(db.ExpertCommitteme...
12,291,236
I haven't done any programming in a decade. I wanted to get back into it, so I made this little pointless program as practice. The easiest way to describe what it does is with output of my --help codeblock: ./prng\_bench --help ``` ./prng_bench: usage: ./prng_bench $N $B [$T] This program will generate an N digi...
2012/09/05
[ "https://Stackoverflow.com/questions/12291236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647491/" ]
Printing to the screen is very slow in comparison to a pipe or running without printing. Piping to grep keeps you from doing it.
Thank you Collin & Nemo. I was certain that because I wasn't calling std::cout between getting start & stop times that it wouldn't have an effect. Not so. I think this is due to optimizations that the compiler performs even with -O0 or 'defaults'. What I think is happening...? I think that as Collin suggested, the co...
12,291,236
I haven't done any programming in a decade. I wanted to get back into it, so I made this little pointless program as practice. The easiest way to describe what it does is with output of my --help codeblock: ./prng\_bench --help ``` ./prng_bench: usage: ./prng_bench $N $B [$T] This program will generate an N digi...
2012/09/05
[ "https://Stackoverflow.com/questions/12291236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647491/" ]
Printing to the screen is very slow in comparison to a pipe or running without printing. Piping to grep keeps you from doing it.
It is not about printing to the screen; it is about the output being a terminal (tty). According to [the POSIX spec](http://pubs.opengroup.org/onlinepubs/9699919799/functions/stdout.html): > > When opened, the standard error stream is not fully buffered; the > standard input and standard output streams are fully bu...
12,291,236
I haven't done any programming in a decade. I wanted to get back into it, so I made this little pointless program as practice. The easiest way to describe what it does is with output of my --help codeblock: ./prng\_bench --help ``` ./prng_bench: usage: ./prng_bench $N $B [$T] This program will generate an N digi...
2012/09/05
[ "https://Stackoverflow.com/questions/12291236", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1647491/" ]
It is not about printing to the screen; it is about the output being a terminal (tty). According to [the POSIX spec](http://pubs.opengroup.org/onlinepubs/9699919799/functions/stdout.html): > > When opened, the standard error stream is not fully buffered; the > standard input and standard output streams are fully bu...
Thank you Collin & Nemo. I was certain that because I wasn't calling std::cout between getting start & stop times that it wouldn't have an effect. Not so. I think this is due to optimizations that the compiler performs even with -O0 or 'defaults'. What I think is happening...? I think that as Collin suggested, the co...
2,557,187
If I add this to the ASPX page: ``` <input id="Text1" type="text" value="Text1Value" /> ``` I would expect to see "Text1" in the list of Request Form keys even WITHOUT setting the `runat=Server` property. ``` ? request.Form.AllKeys ``` I realize that if I do set that propery, then I will have a server-sided HTML ...
2010/03/31
[ "https://Stackoverflow.com/questions/2557187", "https://Stackoverflow.com", "https://Stackoverflow.com/users/109676/" ]
Because you need to add the name attribute. Try this `<input id="Text1" name="Text1" type="text" value="Text1Value" />`
The textbox on page1.aspx is available in teh Request.Forms collection on Page2 when posting from 2 to 1. But, when using a ASP.NET button to postback to Page1, it seems not to be. Dunno why yet...
25,215,509
I want to grep a multiline pattern from tcpdump output like the following: sudo tcpdump -A -s0 | grep -Pzo 'foo.\*\n.\*bar' However, it does not seem to work. But it works if I dump the data into a file and then grep the file. How can I make the command using pipe working?
2014/08/09
[ "https://Stackoverflow.com/questions/25215509", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3436033/" ]
Try to add `-l`: > > > ``` > -l Make stdout line buffered. Useful if you want to see the data while capturing it. > E.g., > tcpdump -l | tee dat > tcpdump -l > dat & tail -f dat > > ``` > >
I still don't get why the grep does not work above even with -l option for tcpdump, but I found this stackoverflow post [How to find patterns across multiple lines using grep?](https://stackoverflow.com/questions/2686147/how-to-find-patterns-across-multiple-lines-using-grep). So I tried pcregrep, and it worked. sudo tc...
25,215,509
I want to grep a multiline pattern from tcpdump output like the following: sudo tcpdump -A -s0 | grep -Pzo 'foo.\*\n.\*bar' However, it does not seem to work. But it works if I dump the data into a file and then grep the file. How can I make the command using pipe working?
2014/08/09
[ "https://Stackoverflow.com/questions/25215509", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3436033/" ]
Try to add `-l`: > > > ``` > -l Make stdout line buffered. Useful if you want to see the data while capturing it. > E.g., > tcpdump -l | tee dat > tcpdump -l > dat & tail -f dat > > ``` > >
I was having problems piping the output to tail even with the -l switch as well. I was able to solve my problem by using `multitail` instead of `tail -F`. This worked for me: `multitail -l "tcpdump -li eth0"`
39,948,034
I have a clickable div and I want to some how with javascript or jquery to be able to click on it automatically. My div is like this: ``` <div style="display:none;" id="button">Hello</div> ``` That is click able div when display changed to block I need some script to do that for me. I need some script like, when i...
2016/10/09
[ "https://Stackoverflow.com/questions/39948034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6889896/" ]
Your project directory (where app.yaml is) is probably in the GOPATH/src. It shouldn't be. The go-app-builder will take everything in the app.yaml folder (and below) and additionally merge your GOPATH into it, meaning now you have it twice. The solution is to move app.yaml out of the GOPATH/src folder. Additionally yo...
I just ran into this issue myself actually. The problem occurs when you're using the App Engine tools to build any package which imports something that is using vendoring, but the package you're trying to run doesn't have the import within it's vendor directory. So, for example, if I'm trying to run package `foo`, whi...
39,948,034
I have a clickable div and I want to some how with javascript or jquery to be able to click on it automatically. My div is like this: ``` <div style="display:none;" id="button">Hello</div> ``` That is click able div when display changed to block I need some script to do that for me. I need some script like, when i...
2016/10/09
[ "https://Stackoverflow.com/questions/39948034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6889896/" ]
I managed to resolve this error using govendor instead of Godeps. The root cause appears to have been that vendored references with their own vendored references was not resolved correctly by Godeps. The answer provided by Su-Au Hwang is also correct - you do have to keep app.yaml separate from your source.
I just ran into this issue myself actually. The problem occurs when you're using the App Engine tools to build any package which imports something that is using vendoring, but the package you're trying to run doesn't have the import within it's vendor directory. So, for example, if I'm trying to run package `foo`, whi...
39,948,034
I have a clickable div and I want to some how with javascript or jquery to be able to click on it automatically. My div is like this: ``` <div style="display:none;" id="button">Hello</div> ``` That is click able div when display changed to block I need some script to do that for me. I need some script like, when i...
2016/10/09
[ "https://Stackoverflow.com/questions/39948034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6889896/" ]
I use a Makefile to move the `vendor` directory to a temporary `GOPATH`: ``` TMPGOPATH := $(shell mktemp -d) deploy: mv vendor $(TMPGOPATH)/src GOPATH=$(TMPGOPATH) gcloud app deploy mv $(TMPGOPATH)/src vendor ``` I store this `Makefile` at the root of my service near the `vendor` directory and simply use `ma...
I just ran into this issue myself actually. The problem occurs when you're using the App Engine tools to build any package which imports something that is using vendoring, but the package you're trying to run doesn't have the import within it's vendor directory. So, for example, if I'm trying to run package `foo`, whi...
39,948,034
I have a clickable div and I want to some how with javascript or jquery to be able to click on it automatically. My div is like this: ``` <div style="display:none;" id="button">Hello</div> ``` That is click able div when display changed to block I need some script to do that for me. I need some script like, when i...
2016/10/09
[ "https://Stackoverflow.com/questions/39948034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6889896/" ]
Your project directory (where app.yaml is) is probably in the GOPATH/src. It shouldn't be. The go-app-builder will take everything in the app.yaml folder (and below) and additionally merge your GOPATH into it, meaning now you have it twice. The solution is to move app.yaml out of the GOPATH/src folder. Additionally yo...
I managed to resolve this error using govendor instead of Godeps. The root cause appears to have been that vendored references with their own vendored references was not resolved correctly by Godeps. The answer provided by Su-Au Hwang is also correct - you do have to keep app.yaml separate from your source.
39,948,034
I have a clickable div and I want to some how with javascript or jquery to be able to click on it automatically. My div is like this: ``` <div style="display:none;" id="button">Hello</div> ``` That is click able div when display changed to block I need some script to do that for me. I need some script like, when i...
2016/10/09
[ "https://Stackoverflow.com/questions/39948034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6889896/" ]
Your project directory (where app.yaml is) is probably in the GOPATH/src. It shouldn't be. The go-app-builder will take everything in the app.yaml folder (and below) and additionally merge your GOPATH into it, meaning now you have it twice. The solution is to move app.yaml out of the GOPATH/src folder. Additionally yo...
Also got the same problem. In the [docs](https://cloud.google.com/appengine/docs/flexible/go/using-go-libraries) Google suggests the following: > > For best results, we recommend the following: > > > * Create a separate directory in your app's directory for each service. > * Each service's directory should contain ...
39,948,034
I have a clickable div and I want to some how with javascript or jquery to be able to click on it automatically. My div is like this: ``` <div style="display:none;" id="button">Hello</div> ``` That is click able div when display changed to block I need some script to do that for me. I need some script like, when i...
2016/10/09
[ "https://Stackoverflow.com/questions/39948034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6889896/" ]
I managed to resolve this error using govendor instead of Godeps. The root cause appears to have been that vendored references with their own vendored references was not resolved correctly by Godeps. The answer provided by Su-Au Hwang is also correct - you do have to keep app.yaml separate from your source.
Also got the same problem. In the [docs](https://cloud.google.com/appengine/docs/flexible/go/using-go-libraries) Google suggests the following: > > For best results, we recommend the following: > > > * Create a separate directory in your app's directory for each service. > * Each service's directory should contain ...
39,948,034
I have a clickable div and I want to some how with javascript or jquery to be able to click on it automatically. My div is like this: ``` <div style="display:none;" id="button">Hello</div> ``` That is click able div when display changed to block I need some script to do that for me. I need some script like, when i...
2016/10/09
[ "https://Stackoverflow.com/questions/39948034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6889896/" ]
I use a Makefile to move the `vendor` directory to a temporary `GOPATH`: ``` TMPGOPATH := $(shell mktemp -d) deploy: mv vendor $(TMPGOPATH)/src GOPATH=$(TMPGOPATH) gcloud app deploy mv $(TMPGOPATH)/src vendor ``` I store this `Makefile` at the root of my service near the `vendor` directory and simply use `ma...
I managed to resolve this error using govendor instead of Godeps. The root cause appears to have been that vendored references with their own vendored references was not resolved correctly by Godeps. The answer provided by Su-Au Hwang is also correct - you do have to keep app.yaml separate from your source.
39,948,034
I have a clickable div and I want to some how with javascript or jquery to be able to click on it automatically. My div is like this: ``` <div style="display:none;" id="button">Hello</div> ``` That is click able div when display changed to block I need some script to do that for me. I need some script like, when i...
2016/10/09
[ "https://Stackoverflow.com/questions/39948034", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6889896/" ]
I use a Makefile to move the `vendor` directory to a temporary `GOPATH`: ``` TMPGOPATH := $(shell mktemp -d) deploy: mv vendor $(TMPGOPATH)/src GOPATH=$(TMPGOPATH) gcloud app deploy mv $(TMPGOPATH)/src vendor ``` I store this `Makefile` at the root of my service near the `vendor` directory and simply use `ma...
Also got the same problem. In the [docs](https://cloud.google.com/appengine/docs/flexible/go/using-go-libraries) Google suggests the following: > > For best results, we recommend the following: > > > * Create a separate directory in your app's directory for each service. > * Each service's directory should contain ...
54,670,729
I'm using [react-bootstrap-table](http://allenfang.github.io/react-bootstrap-table/index.html) for displaying my data.[![enter image description here](https://i.stack.imgur.com/tTXya.png)](https://i.stack.imgur.com/tTXya.png) On mouseOver any of the row, I need to dynamically add two buttons over the last two columns o...
2019/02/13
[ "https://Stackoverflow.com/questions/54670729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9333951/" ]
You can use a nested list comprehension **Ex:** ``` from bs4 import BeautifulSoup html = """<ul> <li> <div>Content1</div> </li> <li> <div>Content2</div> <div>Content3</div> <div>Content4</div> </li> <li> <div>Content5</div> <div>Content6</div> </li> </ul>""" soup = BeautifulSoup(html, "html.parser") pr...
You just need to create a new list for each `li`, like this: ``` divs = [[div.get_text(strip=True) for div in li.find_all("div")] for li in soup.select('li')] ```
72,287,636
I have an array `c`, another array `d`. how can I check if `d[1]`or`d[3]`or`d[5]`or`d[7]` is in array `c`? ``` c = np.array([[ 1, 1,0], [ 1,-1,0], [-1, 1,0], [-1,-1,0]]) d = np.array([[2,2,2], [1,1,0], [2,8,8], [6,8,8], [...
2022/05/18
[ "https://Stackoverflow.com/questions/72287636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18431524/" ]
Try this ``` # to check if a row in its entirety match a list, # use all on axis=1 first, then check if any rows match using any (c==[2,1,0]).all(1).any() False ``` For multiple checks ``` # use bit-wise | (instead of or) ((c==[2,1,0]) | (c==[3,1,0]) | (c==[5,5,0])).all(1).any() ```
The direct way should be to compare one by one: ``` any(any((i == j).all() for j in c) for i in d[1::2]) ``` Or use one or two layers of Broadcasting: ``` any((c == i).all(-1).any() for i in d[1::2]) (c[:, None] == d[None, 1::2]).all(-1).any() ``` Using broadcast can calculate faster, but it must first calculate ...
72,287,636
I have an array `c`, another array `d`. how can I check if `d[1]`or`d[3]`or`d[5]`or`d[7]` is in array `c`? ``` c = np.array([[ 1, 1,0], [ 1,-1,0], [-1, 1,0], [-1,-1,0]]) d = np.array([[2,2,2], [1,1,0], [2,8,8], [6,8,8], [...
2022/05/18
[ "https://Stackoverflow.com/questions/72287636", "https://Stackoverflow.com", "https://Stackoverflow.com/users/18431524/" ]
As you are using numpy use the function `isin` that is defined: <https://numpy.org/doc/stable/reference/generated/numpy.isin.html> ``` g = np.isin([ 2, 1,0],c) ``` Edit: As @Phoenix suggested to make all the vector checking you need to add all at the end `g = np.isin([ 2, 1,0],c).all()` this return `False`. Tested ...
The direct way should be to compare one by one: ``` any(any((i == j).all() for j in c) for i in d[1::2]) ``` Or use one or two layers of Broadcasting: ``` any((c == i).all(-1).any() for i in d[1::2]) (c[:, None] == d[None, 1::2]).all(-1).any() ``` Using broadcast can calculate faster, but it must first calculate ...
35,868,394
In the paper **Histograms of Oriented Gradients for Human Detection (Navneet Dalal and Bill Triggs)** (see link below), to visualize their results, they use a ROC curve, on which the Y axis is TP and the X axis is **FPPW (False Positives Per Window)**. What is the meaning of this phrase `FFPW`? I thought about 3 poss...
2016/03/08
[ "https://Stackoverflow.com/questions/35868394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3322273/" ]
It appears to be defined as `NUMBER_OF_FALSE_POSITIVES / NUMBER_OF_WINDOWS`, where the detection window is a `64x128` moving window. Notice in the last paragraph of section 4 it states: > > ... In a multiscale detector it corresponds to a raw error rate of about 0.8 false positives per 640×480 image tested. > > >
They have a window which they move across the image and evaluate if it shows a human or not. FPPW is a measure of how often they detect something else as a human within their detector window. It describes the quality of their classification in a way that is independent from image sizes or people counts on a particular ...
35,868,394
In the paper **Histograms of Oriented Gradients for Human Detection (Navneet Dalal and Bill Triggs)** (see link below), to visualize their results, they use a ROC curve, on which the Y axis is TP and the X axis is **FPPW (False Positives Per Window)**. What is the meaning of this phrase `FFPW`? I thought about 3 poss...
2016/03/08
[ "https://Stackoverflow.com/questions/35868394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3322273/" ]
It appears to be defined as `NUMBER_OF_FALSE_POSITIVES / NUMBER_OF_WINDOWS`, where the detection window is a `64x128` moving window. Notice in the last paragraph of section 4 it states: > > ... In a multiscale detector it corresponds to a raw error rate of about 0.8 false positives per 640×480 image tested. > > >
I had the same confusion. The authors state that they are using *DET curve*s. When you look at several [examples](https://en.wikipedia.org/wiki/Detection_error_tradeoff) about DET curves you see that x-axis is actually False Positive Rate. That means `FPPW` is `FALSE_POSITIVE_RATE`. Hence `FPPW = NUMBER_OF_FALSE_POSIT...
35,868,394
In the paper **Histograms of Oriented Gradients for Human Detection (Navneet Dalal and Bill Triggs)** (see link below), to visualize their results, they use a ROC curve, on which the Y axis is TP and the X axis is **FPPW (False Positives Per Window)**. What is the meaning of this phrase `FFPW`? I thought about 3 poss...
2016/03/08
[ "https://Stackoverflow.com/questions/35868394", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3322273/" ]
I had the same confusion. The authors state that they are using *DET curve*s. When you look at several [examples](https://en.wikipedia.org/wiki/Detection_error_tradeoff) about DET curves you see that x-axis is actually False Positive Rate. That means `FPPW` is `FALSE_POSITIVE_RATE`. Hence `FPPW = NUMBER_OF_FALSE_POSIT...
They have a window which they move across the image and evaluate if it shows a human or not. FPPW is a measure of how often they detect something else as a human within their detector window. It describes the quality of their classification in a way that is independent from image sizes or people counts on a particular ...
34,626,437
Is it possible to control order of ServletContextListener execution in different wars? Suppose there are 3 separate, independent modules A, B, and C in a web service. They can be initialized in any order, and there is no consequences. However, if an optional module D is present, it needs to be initialized first and ma...
2016/01/06
[ "https://Stackoverflow.com/questions/34626437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4988345/" ]
Managing the startup of applications can be done when they all WAR's are bundled in EAR. It can done by adding `<initialize-in-order>true</initialize-in-order>` in `application.xmkl`. If all WAR's are independent then there is no standard way of doing it. But, there are container specific features that allow you to do...
You can define ordering in web-fragment.xml or web.xml. refer the below link to understand more. <https://blogs.oracle.com/swchan/entry/servlet_3_0_web_fragment>
23,576,324
I have the following situation. Multiple forms that display information stored in a shared object. A background worker thread that is constantly updating the shared object. I thought about having the shared object be something like a singleton but I am worried about the multi threading concerns. What is the best way...
2014/05/10
[ "https://Stackoverflow.com/questions/23576324", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1579698/" ]
mod\_rewite, is a better approach than client side: ``` Options +FollowSymLinks RewriteEngine On RewriteCond %{QUERY_STRING} ^(.*&)?q=([^&]+)(&.*)?$ [NC] RewriteRule ^search/$ /%2? [R=301,L] ``` alternative if you care to test: ``` RewriteEngine On RewriteRule ^search/([^/]*)$ /search?q=$1 [L] ```
You can use javascript/jquery to do what you want. Simply add the submit event on the form and prevent default. In that event you get the search value and send the user to the new page search/hello. Let me know if you need help gretting started with the code. Notice the added id="searchForm" ``` <form id="searchForm"...
31,218,713
My fragment managed by ViewPagerAdapter implements LoaderCallbacks. It queries the database to obtain the Cursor with all the rows that contain favourite field equals 1 (true). When user deselects favourite-toggle\_button favourite field in the table updates to be 0 (false). I believe that then Loader call onLoadFinish...
2015/07/04
[ "https://Stackoverflow.com/questions/31218713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4656400/" ]
JS in a browser doesn't have that level of access to the OS. You can't do that.
I dont really understand your question, but this might help you. For dragging implemention: Try use interact.js <http://interactjs.io/> (JavaScript drag and drop, resizing and multi-touch gestures with inertia and snapping for modern browsers ) Here is an example similar to what you need. see here <http://nathanle...
31,218,713
My fragment managed by ViewPagerAdapter implements LoaderCallbacks. It queries the database to obtain the Cursor with all the rows that contain favourite field equals 1 (true). When user deselects favourite-toggle\_button favourite field in the table updates to be 0 (false). I believe that then Loader call onLoadFinish...
2015/07/04
[ "https://Stackoverflow.com/questions/31218713", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4656400/" ]
JS in a browser doesn't have that level of access to the OS. You can't do that.
Even if I do agree with @Quentin's answer that it is impossible, Here is the closest I can think of : - but I'm not sure it will open in the dropped screen, this is most likely really dependent of the os, - and users will need to click into the popup to get the page goes fullscreen. ```js var drag = document.g...
27,248,372
I have created a simple search engine : ``` public String search(Map<String, Object> params) { String result = /*search*/; return result; } ``` this method performs the search process and returns the result (JSON), but there is a big problem... since the search process is costly, if some users simultaneously...
2014/12/02
[ "https://Stackoverflow.com/questions/27248372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3767784/" ]
With your unit tests, you are testing Linq to Objects, not Linq to Entities. This, sometimes is a big difference and still can result in runtime errors if you're not querying a real database. For a long time, I did the same... testing my repositories against mocked DbSets seemed as a good practice to me. But not anymo...
For your method calls ending in `Async`, it doesn't look like it's really running `async` since I don't see that or the `await` modifiers being used. If you call the async call without awaiting it, you would probaby see 3 items in the database as the database add record operation *could* complete after that check. I th...
41,122,354
In the following snippet, I want to ask that if compile phase runs only once for all the instances of a directive, then why am I seeing console.log("compile") run 5 times? It should have run only once? Isn't it? ```js //module declaration var app = angular.module('myApp',[]); //controller declaration app.control...
2016/12/13
[ "https://Stackoverflow.com/questions/41122354", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2685914/" ]
Have you tried `git init` first? I would also recommend following a simple tutorial (at first) like this one: <http://rogerdudler.github.io/git-guide/>
That's not the command to 'add git'. That's the command to stage or 'add' files, namely looking at the working tree and adding new or modified files to your commit. You can try doing `git init`, but first check that you're in the folder with the git repository. For rails apps, this is usually the parent folder of the...
8,736,138
I have a big list with links and other date in it. I want to filter out all the data and have a list with just the links. Example of the current list: ``` 32,2012-01-04 06:44:44,http://link.com/link 33,2012-01-04 06:44:45,http://link.com/link,{Text|textext|text},http://link.com/link|http://link.com/link|http://link...
2012/01/05
[ "https://Stackoverflow.com/questions/8736138", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1131105/" ]
You could populate the text of the field yourself by defining the onChangeMonthYear callback function From the docs: onChangeMonthYear: Allows you to define your own event when the datepicker moves to a new month and/or year. The function receives the selected year, month (1-12), and the datepicker instance as paramet...
mybe you can use something like this: ``` $('.selector').datepicker({ onChangeMonthYear: function(year, month, inst) { var day = $(this).datepicker('getDate').getDate(); $(this).datepicker( "setDate", month+'/'+day+'/'+year); } }); ``` Be carefully with location date format. Complete example...
18,056,335
I would like to update the `User` model whenever `signIn` was **successful**. It includes the `id` assign by the backend which has not been present in the model before. ``` MyApp.module("User", function(User, App, Backbone, Marionette, $, _) { User.Controller = Backbone.Marionette.Controller.extend({ initializ...
2013/08/05
[ "https://Stackoverflow.com/questions/18056335", "https://Stackoverflow.com", "https://Stackoverflow.com/users/356895/" ]
* You are moving around a `Backbone.Model`, * [`Model.set`](http://backbonejs.org/#Model-set) accepts a hash of attributes, * you can convert a `Backbone.Model` to a hash of attributes with [`Model.toJSON`](http://backbonejs.org/#Model-toJSON) You could write your callback as ``` success: function(model, response, op...
You can use `this.model.set(model)` as @nikoshr said. Iterate over the attributes and setting each one will do the same thing as model.set already does. Refer to the backbone's `model.set` function: ``` // Set a hash of model attributes on the object, firing `"change"`. This is // the core primitive operation of a mod...
18,056,335
I would like to update the `User` model whenever `signIn` was **successful**. It includes the `id` assign by the backend which has not been present in the model before. ``` MyApp.module("User", function(User, App, Backbone, Marionette, $, _) { User.Controller = Backbone.Marionette.Controller.extend({ initializ...
2013/08/05
[ "https://Stackoverflow.com/questions/18056335", "https://Stackoverflow.com", "https://Stackoverflow.com/users/356895/" ]
You can simply use `set`, giving the other model's `attributes` property value (an object with all the attribute values) as an argument. `self.model.set(model.attributes);`
You can use `this.model.set(model)` as @nikoshr said. Iterate over the attributes and setting each one will do the same thing as model.set already does. Refer to the backbone's `model.set` function: ``` // Set a hash of model attributes on the object, firing `"change"`. This is // the core primitive operation of a mod...
18,056,335
I would like to update the `User` model whenever `signIn` was **successful**. It includes the `id` assign by the backend which has not been present in the model before. ``` MyApp.module("User", function(User, App, Backbone, Marionette, $, _) { User.Controller = Backbone.Marionette.Controller.extend({ initializ...
2013/08/05
[ "https://Stackoverflow.com/questions/18056335", "https://Stackoverflow.com", "https://Stackoverflow.com/users/356895/" ]
* You are moving around a `Backbone.Model`, * [`Model.set`](http://backbonejs.org/#Model-set) accepts a hash of attributes, * you can convert a `Backbone.Model` to a hash of attributes with [`Model.toJSON`](http://backbonejs.org/#Model-toJSON) You could write your callback as ``` success: function(model, response, op...
You can simply use `set`, giving the other model's `attributes` property value (an object with all the attribute values) as an argument. `self.model.set(model.attributes);`
241,874
In the book *The Integral Trees* by Larry Niven, he presents people living in a novel environment. There is a neutron star (quite old and so cooled off mostly) around a more ordinary star. And orbiting the neutron star their is a gas giant planet. The gas giant's atmosphere (and a little bit of rock and soil and such) ...
2023/02/09
[ "https://worldbuilding.stackexchange.com/questions/241874", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/99166/" ]
Orbiting between two gas giants might be possible, if some orbital resonances can happen to stabilize the orbits, something like the 4:2:1 orbital resonance between Ganymede, Europa and Io. However, for a rocky planet to form between two gas giant is very tricky, considering the disturbance that the two bodies will ex...
Not according to Accretion Theory --------------------------------- Accretion Theory states that the different kinds of planets form based on distance to the star. Rocky planets form close to the sun because most of the substances with lower boiling points either react with minerals forming silicates and such or they ...
241,874
In the book *The Integral Trees* by Larry Niven, he presents people living in a novel environment. There is a neutron star (quite old and so cooled off mostly) around a more ordinary star. And orbiting the neutron star their is a gas giant planet. The gas giant's atmosphere (and a little bit of rock and soil and such) ...
2023/02/09
[ "https://worldbuilding.stackexchange.com/questions/241874", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/99166/" ]
> > Is there a way for a rocky planet thats roughly earth-like in mass and composition to form or be thrown into a stable orbit as a planet proper, and not become a moon of one of the gas giants? > > > Yes === First, I just took a look in [the list of known multiplanery systems](https://en.wikipedia.org/wiki/List...
Orbiting between two gas giants might be possible, if some orbital resonances can happen to stabilize the orbits, something like the 4:2:1 orbital resonance between Ganymede, Europa and Io. However, for a rocky planet to form between two gas giant is very tricky, considering the disturbance that the two bodies will ex...
241,874
In the book *The Integral Trees* by Larry Niven, he presents people living in a novel environment. There is a neutron star (quite old and so cooled off mostly) around a more ordinary star. And orbiting the neutron star their is a gas giant planet. The gas giant's atmosphere (and a little bit of rock and soil and such) ...
2023/02/09
[ "https://worldbuilding.stackexchange.com/questions/241874", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/99166/" ]
> > Is there a way for a rocky planet thats roughly earth-like in mass and composition to form or be thrown into a stable orbit as a planet proper, and not become a moon of one of the gas giants? > > > Yes === First, I just took a look in [the list of known multiplanery systems](https://en.wikipedia.org/wiki/List...
Not according to Accretion Theory --------------------------------- Accretion Theory states that the different kinds of planets form based on distance to the star. Rocky planets form close to the sun because most of the substances with lower boiling points either react with minerals forming silicates and such or they ...
62,077,151
I have this code, it works but I soon realized standards is not something we do. In my code I am getting the Tags value for 'Name'. However, the way i do it, I am assuming it is the first tag at position 0. I am wrong to assume. How can I make it more robust to just look for value of the key 'Name' irrelevant of positi...
2020/05/29
[ "https://Stackoverflow.com/questions/62077151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10206370/" ]
If this is your practical exam: did your course material not cover this? As for #1: the method signature is [public boolean equals(Object obj)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-), so that's what you have to override. Any other signature and it's not an override, i...
Consider the following equals method for `C` class. ``` @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; C c= (C) o; return id == c.id; } ``` Explanation for 1 & 5 options: 1. If you declare th...
62,077,151
I have this code, it works but I soon realized standards is not something we do. In my code I am getting the Tags value for 'Name'. However, the way i do it, I am assuming it is the first tag at position 0. I am wrong to assume. How can I make it more robust to just look for value of the key 'Name' irrelevant of positi...
2020/05/29
[ "https://Stackoverflow.com/questions/62077151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10206370/" ]
> > I don't understand why #1 is wrong > > > Because: 1. `Object::equals` is defined as `public boolean equals(Object)`, and 2. `public boolean equals(SomeType)` does not override `public boolean equals(Object)`. This is actually an overload not an override. They are *different* operations. --- > > Can't subcl...
Consider the following equals method for `C` class. ``` @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; C c= (C) o; return id == c.id; } ``` Explanation for 1 & 5 options: 1. If you declare th...
62,077,151
I have this code, it works but I soon realized standards is not something we do. In my code I am getting the Tags value for 'Name'. However, the way i do it, I am assuming it is the first tag at position 0. I am wrong to assume. How can I make it more robust to just look for value of the key 'Name' irrelevant of positi...
2020/05/29
[ "https://Stackoverflow.com/questions/62077151", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10206370/" ]
> > I don't understand why #1 is wrong > > > Because: 1. `Object::equals` is defined as `public boolean equals(Object)`, and 2. `public boolean equals(SomeType)` does not override `public boolean equals(Object)`. This is actually an overload not an override. They are *different* operations. --- > > Can't subcl...
If this is your practical exam: did your course material not cover this? As for #1: the method signature is [public boolean equals(Object obj)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-), so that's what you have to override. Any other signature and it's not an override, i...
4,377
I bought a GB&A guitar almost an year ago. I play guitar mostly on the weekends. Recently I noted that my guitar bridge has got lifted off the body a bit. So I took it to the Guitar Shop. The owner of the shop suggested me that I should keep the guitar untuned if I am not using/playing it. I just want to know, should I...
2011/10/24
[ "https://music.stackexchange.com/questions/4377", "https://music.stackexchange.com", "https://music.stackexchange.com/users/1357/" ]
*Generally*, with a guitar in good condition, no. The only time I've detuned a guitar was when shipping one via air, where it might be in an unpressurized baggage compartment. I think the strings should be kept at pitch - but you should check and adjust them if they are getting sharp (which can happen with temperature ...
No. You shouldn't have to do that on a guitar that's made well. The fact that the bridge is coming up is indicative of an issue with the guitar itself and not the tuning / strings. You should try and get the bridge fixed, in general. However, a quick google of GB&A guitars shows that they are very cheap acoustic guit...