qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
1,360,417
I used the VirtualBox Media Manager to resize the disk from 10gb to 50gb. I then used GParted Live to expand the partition to 50gb. When I boot into Ubuntu and run df -h it shows that ‘/dev/mapper/vg\_cloud-Log…’ which is mounted on ‘/‘ is at 100% usage. What do I need to do to get Ubuntu to see all the disk space? ...
2021/08/27
[ "https://askubuntu.com/questions/1360417", "https://askubuntu.com", "https://askubuntu.com/users/472224/" ]
Dailies are for pre-release testing. After release, there is no more daily respin. * The final release for 21.04 is at <https://cdimage.ubuntu.com/ubuntu-base/releases/21.04/>. * There are dailies for LTS releases (Bionic/18.04 and Focal/20.04) because there are still point releases being tested. WARNING: Ubuntu-base...
Ubuntu 21.04 (*hirsute hippo*) has been released, so no more dailies are produced. You can find mention of dailies here - <http://iso.qa.ubuntu.com/> but you'll note they report as "*Released*". For LTS releases, there are later *point* releases, eg. [Ubuntu 20.04.3 has just been released](https://fridge.ubuntu.com/2...
49,954,267
I am trying to generate a random number in c++ using a modern approach.However i get the same random number every time i call the function ``` int getRandomPixel() { std::random_device rd; // obtain a random number from hardware std::mt19937 eng(rd()); // seed the generator std::uniform_int_distribution<> ...
2018/04/21
[ "https://Stackoverflow.com/questions/49954267", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2650277/" ]
**Step 1: Check PATH of MAVEN and JAVA** ``` mvn -v ``` In the output check if "Java version" is pointing to 1.9 ``` Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T13:28:13+05:30) Maven home: /Maven/3.5.2 Java version: 9.0.4, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-9-oracle...
Sometimes the Maven source version (`1.9` is your particular case) and the Eclipse source version fall out of sync, especially if the source version in the `pom.xml` file is changed *after* the project has been created in Eclipse. To bring the two back into sync, perform the following: 1. Right click on the project 2....
42,521,580
I have been developing an application using firebase storage, I am currently using the free plan, yesterday I was testing and I noticed that on my firebase storage I gt the error > > You have exceeded your quota for this project. Please upgrade your plan. > > > I am really confused as to how this could have hap...
2017/03/01
[ "https://Stackoverflow.com/questions/42521580", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7638512/" ]
Firebase storage has a limitation for free usage which is 5GB storage and 1GB transfer daily you must pay to upgrade your limit you can check thier website <https://firebase.google.com/pricing/>
You must have exceeded it or someone purposely throttled your bandwidth. Show us the report of traffic and we'll calculate the math for you.
183,081
Mana is the substance that makes a human capable of performing spells. In the magitocracy, mages rule the kingdom. An individual capable of magic must learn to focus his power, solidifying and controlling the Mana in order to use it. Welding Mana in this way takes years of study. Mages are of various power levels, thos...
2020/08/04
[ "https://worldbuilding.stackexchange.com/questions/183081", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/52361/" ]
It causes elements to transmute into other forms. Turning lead into gold is a classic pursuit of magic, and so is turning carbon to silicon (through petrification), but both of these do not change the number of nucleons in the atom -- they change whether they are protons or neutrons. Very little change is needed to m...
Mages are not born with magic. Mages are those born with the ability to either negate the radiation or be immune to it. Thus wield mana and no die. Variations exist. Maybe mages are those evolved to produce a compound, or hormone or whatever, that allows them to handle the radiation. Maybe it is radioactive because m...
183,081
Mana is the substance that makes a human capable of performing spells. In the magitocracy, mages rule the kingdom. An individual capable of magic must learn to focus his power, solidifying and controlling the Mana in order to use it. Welding Mana in this way takes years of study. Mages are of various power levels, thos...
2020/08/04
[ "https://worldbuilding.stackexchange.com/questions/183081", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/52361/" ]
It causes elements to transmute into other forms. Turning lead into gold is a classic pursuit of magic, and so is turning carbon to silicon (through petrification), but both of these do not change the number of nucleons in the atom -- they change whether they are protons or neutrons. Very little change is needed to m...
Mana is energy. Even though some animals have organs that process mana, much like the electric eel does for electricity, in excessive amounts, it is *always* dangerous. Well-trained mages can supplement their own biological reserves by drawing from a low level of ambient mana, but excessive use can cause shock, organ f...
1,094
I found the book [Pairwise Independence and Derandomization](http://rads.stackoverflow.com/amzn/click/1933019220) on the subject, but it's more research-oriented than tutorial oriented. I'm new to the subject of "Derandomization," and as such, I wanted to know which reference to start from? I prefer one that discusse...
2010/09/08
[ "https://cstheory.stackexchange.com/questions/1094", "https://cstheory.stackexchange.com", "https://cstheory.stackexchange.com/users/873/" ]
The notes from Salil Vadhan's class, ["Pseudorandomness"](http://people.seas.harvard.edu/~salil/cs225/), are excellent for this purpose. He is writing a textbook based on these. The draft version of the book is available [online](http://people.seas.harvard.edu/~salil/pseudorandomness/).
I really like [Pseudorandom Generators: A Primer](http://www.wisdom.weizmann.ac.il/~oded/prg-primer.html) by Oded Goldreich. I think it's very well written and probably at the level you want. (Not very research oriented, but still has technical details.)
149,007
I foolishly let my child try Dragonvale... but on a Kindle Fire device I must now return. Can the world be packaged and transferred to an Android or iOS device account? On Kindle Fire specifically it appears each "Free Time" child gets their own world, are these parks transferable once the kids reach the age of majori...
2014/01/02
[ "https://gaming.stackexchange.com/questions/149007", "https://gaming.stackexchange.com", "https://gaming.stackexchange.com/users/65678/" ]
According to the Android Device [FAQ](http://www.backflipstudios.com/help/androidfaq/) from Backflip, you can transfer a "local" park to be a "facebook" park, using the options menu within the game. A "facebook" park can be signed into from a different Android device (but not from an iOS device). If you have an existi...
In Dragonvale, there are two modes of access: 1) local mode, and 2) server mode. For a user to use "server mode", they *must* connect to Facebook. If the user has played without doing so, their Dragonvale game information is stored only on local mode, and cannot be transferred. If the game was connected, then the user ...
259,723
I setup a system similar to the [tutorial here](http://vladgh.com/blog/varnish-nginx-and-php-533-ubuntu-1010). I'm having issues with nginx connecting to the php5-fpm socket, but from what I can tell the permissions on the socket are correct... can you give me a hand? ``` 2011/04/14 15:31:24 [crit] 13147#0: *1 conne...
2011/04/14
[ "https://serverfault.com/questions/259723", "https://serverfault.com", "https://serverfault.com/users/43626/" ]
This is a gotcha that many tutorials omit. the php user should be the owner of the socket. So you want to make sure that ``` chown www-data:www-data /var/run/php5-fpm.socket ```
I don't know what caused this exactly, probably some changes in PHP code, but I've found a way to fix this: 1) Open your pool configuration as root, mine is in: `/etc/php5/fpm/pool.d/www.conf` 2) Add the following lines: * `listen.owner = www-data` * `listen.group = www-data` Here's the [complete documentation](htt...
259,723
I setup a system similar to the [tutorial here](http://vladgh.com/blog/varnish-nginx-and-php-533-ubuntu-1010). I'm having issues with nginx connecting to the php5-fpm socket, but from what I can tell the permissions on the socket are correct... can you give me a hand? ``` 2011/04/14 15:31:24 [crit] 13147#0: *1 conne...
2011/04/14
[ "https://serverfault.com/questions/259723", "https://serverfault.com", "https://serverfault.com/users/43626/" ]
This is a gotcha that many tutorials omit. the php user should be the owner of the socket. So you want to make sure that ``` chown www-data:www-data /var/run/php5-fpm.socket ```
I had a similar problem. On my dev laptop (MacOS) I want to run everything in my own account, to keep it all simple. The socket i-node is owned by my own account. I just had to comment out listen.owner and listen.group in www.conf. I start everything in my own account with "brew services start --all". In www.conf, ...
259,723
I setup a system similar to the [tutorial here](http://vladgh.com/blog/varnish-nginx-and-php-533-ubuntu-1010). I'm having issues with nginx connecting to the php5-fpm socket, but from what I can tell the permissions on the socket are correct... can you give me a hand? ``` 2011/04/14 15:31:24 [crit] 13147#0: *1 conne...
2011/04/14
[ "https://serverfault.com/questions/259723", "https://serverfault.com", "https://serverfault.com/users/43626/" ]
I don't know what caused this exactly, probably some changes in PHP code, but I've found a way to fix this: 1) Open your pool configuration as root, mine is in: `/etc/php5/fpm/pool.d/www.conf` 2) Add the following lines: * `listen.owner = www-data` * `listen.group = www-data` Here's the [complete documentation](htt...
I had a similar problem. On my dev laptop (MacOS) I want to run everything in my own account, to keep it all simple. The socket i-node is owned by my own account. I just had to comment out listen.owner and listen.group in www.conf. I start everything in my own account with "brew services start --all". In www.conf, ...
586,288
I just install Debian 10 for the first time, and then dropbox, simply by downloading the `.deb` file and doing `dpkg -i`. I got dropbox to run just fine, but unfortunately the install "broke" my `apt`, which keeps complaining: ``` dropbox : Depends: libpango1.0-0 (>= 1.36.3) but it is not installable ``` Now it see...
2020/05/13
[ "https://unix.stackexchange.com/questions/586288", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/379347/" ]
I think the most straightforward solution is to use the installer packaged in Debian non-free, rather than the package provided by Dropbox: * remove the `dropbox` package; * edit `/etc/apt/sources.list` and ensure that your `buster` lines include `contrib` and `non-free`, along the lines of ``` deb http://deb.debian....
I tried above solution but it didn't work to me. I'm using Debian 10. Then, I looked for another solution and found this. The solution below was copied from "https://www.reddit.com/r/debian/comments/g13vxj/dropbox\_users\_in\_testingsid\_libpango100\_to/". **Dropbox users in Testing/Sid: libpango1.0-0 to libpango-1.0-...
17,595,302
I am facing trouble in displaying Ads in my Phonegap App, as getting the error message - "***you must have adactivity declared in androidmanifest.xml with configchanges***" Here is my manifest.xml file. ``` <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" ...
2013/07/11
[ "https://Stackoverflow.com/questions/17595302", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
This should solve your problem <https://github.com/sainttex/PhoneGap-Android-Native-AdMob>
old version admob sdk is not supported by android .you can try use other plugins. ref:<https://github.com/admob-google/admob-cordova> ### 1.install admob phonegap plugin use the cordova command download the plugin ,then install with local location ``` cordova plugin add c:\phonegap-admob-plugin ``` or instal...
27,385,955
I am trying to select elements in jQuery like this: `$("input[id*='FirstName']")` , but it's not working, it's not bringing the values I want from the page. The input is located nested deeply inside the DOM, like the child #30 from the root, and I think jQuery is not able to find it. Anyone faced an issue lik...
2014/12/09
[ "https://Stackoverflow.com/questions/27385955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4016720/" ]
Add `position:relative;` to `.half` and then add the following CSS to your `img` selector: ``` margin: auto; left: 0; right: 0; top: 0; bottom: 0; ``` [Updated Fiddle](http://jsfiddle.net/f16wpgpm/5/) =================================================
<http://jsfiddle.net/f16wpgpm/6/> you can use `display:table` and `display:table-cell` for this. ``` section { display:table; width:100%; } .half { width: 50%; display:table-cell; vertical-align:middle; } ```
27,385,955
I am trying to select elements in jQuery like this: `$("input[id*='FirstName']")` , but it's not working, it's not bringing the values I want from the page. The input is located nested deeply inside the DOM, like the child #30 from the root, and I think jQuery is not able to find it. Anyone faced an issue lik...
2014/12/09
[ "https://Stackoverflow.com/questions/27385955", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4016720/" ]
Add `position:relative;` to `.half` and then add the following CSS to your `img` selector: ``` margin: auto; left: 0; right: 0; top: 0; bottom: 0; ``` [Updated Fiddle](http://jsfiddle.net/f16wpgpm/5/) =================================================
You can use the table display method to vertically align responsively. However, this requires an inner `<div>` to act as the cell to align: ``` <div class="half first_half"> <div class="inner"> <img src="http://www.capitale-creativo.it/img/capcrea1.jpg" /> </div> </div> ``` Then by making `.half` dis...
56,772,390
I am trying to override the css but not working.How do it? ``` .component.img.white *:not(.btn){ color:#fff; } ``` trying to achive this: ``` .component.img.white *:not(.btn){ color:none !important; } ```
2019/06/26
[ "https://Stackoverflow.com/questions/56772390", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11159238/" ]
**None** is not **valid** css **color** ``` .component.img.white *:not(.btn){ color: transparent !important; } ``` or you can use ``` .component.img.white *:not(.btn){ color: unset !important; } ```
You can try ``` .component.img.white *:not(.btn){ color: inherit; } ``` it'll take a parent value or just set value explicitly
2,696,919
Is it true that for any real matrix, the complex eigenvalues occur in complex conjugate pairs? If yes, how does one prove that?
2018/03/18
[ "https://math.stackexchange.com/questions/2696919", "https://math.stackexchange.com", "https://math.stackexchange.com/users/470941/" ]
$det(A) = = det \left( \begin{matrix}a\_1 \\ \vdots \\ a\_{n-1}\\a\_n \end{matrix} \right) = det \left( \begin{matrix}a\_1 \\ \vdots \\ a\_{n-1} \\a\_1 + \cdots +a\_n \end{matrix} \right) = det \left( \begin{matrix}a\_1 \\ \vdots \\ a\_{n-1}\\0 \end{matrix} \right) = 0$ Where $a\_i$ are the row vectors of $A$. Of cou...
Suppose the matrix is $(a\_{ij}$, you have $a\_{ni}=\sum\_{j=1}^{j=n-1}-a\_{ji}$, if you sum the first $n-1$ line you have the last line with the opposite sign.
30,395,618
I'm working in Django 1.8. I'd like to test that there are four `<li>` elements in my page. This is my existing `test_views.py`: ``` def test_call_view_bnf_all(self): response = self.client.get('/bnf/') self.assertEqual(response.status_code, 200) context_sections = response.context['sections'] self.a...
2015/05/22
[ "https://Stackoverflow.com/questions/30395618", "https://Stackoverflow.com", "https://Stackoverflow.com/users/194000/" ]
[`assertContains()`](https://docs.djangoproject.com/en/1.8/topics/testing/tools/#django.test.SimpleTestCase.assertContains) has a `count` option built in: > > > ``` > assertContains(response, text, count=None, status_code=200, msg_prefix='', html=False) > > ``` > > If **count** is provided, **text** must occur exa...
I'd use [BeautifulSoup](http://www.crummy.com/software/BeautifulSoup/) to achieve this. Something along the lines of: ``` def test_call_view_bnf_all(self): response = self.client.get('/bnf/') response_soup = BeautifulSoup(response.content) li_elements = response_soup.find_all('li') self.assertEqual(le...
30,395,618
I'm working in Django 1.8. I'd like to test that there are four `<li>` elements in my page. This is my existing `test_views.py`: ``` def test_call_view_bnf_all(self): response = self.client.get('/bnf/') self.assertEqual(response.status_code, 200) context_sections = response.context['sections'] self.a...
2015/05/22
[ "https://Stackoverflow.com/questions/30395618", "https://Stackoverflow.com", "https://Stackoverflow.com/users/194000/" ]
[`assertContains()`](https://docs.djangoproject.com/en/1.8/topics/testing/tools/#django.test.SimpleTestCase.assertContains) has a `count` option built in: > > > ``` > assertContains(response, text, count=None, status_code=200, msg_prefix='', html=False) > > ``` > > If **count** is provided, **text** must occur exa...
I've been using [PyQuery](https://pypi.python.org/pypi/pyquery) to do this kind of stuff. Basically, you'd end up writing a jquery selector and then testing the result. The nice thing, being jquery-compatible is that you can test your selector in your browser first. Pretty happy with PyQuery so far, except that it has...
12,039,199
I need to call the id value from another function Here the code ``` $("p").hover(function() { var i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function() { $(".display").append(i); });​ ``` I need "i" value display on ".display" class div....
2012/08/20
[ "https://Stackoverflow.com/questions/12039199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1598053/" ]
Simply declare `i` outside.. ``` var i = ''; $("p").hover(function() { i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function() { $(".display").append(i); }); ```
To add to Vega's answer, I would wrap it in an anonymous function to avoid polluting the global scope. ``` (function() { var i = ''; $("p").hover(function() { i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function(...
12,039,199
I need to call the id value from another function Here the code ``` $("p").hover(function() { var i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function() { $(".display").append(i); });​ ``` I need "i" value display on ".display" class div....
2012/08/20
[ "https://Stackoverflow.com/questions/12039199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1598053/" ]
Simply declare `i` outside.. ``` var i = ''; $("p").hover(function() { i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function() { $(".display").append(i); }); ```
Create a closure instead of a global variable... ``` (function (i) { $("p").hover(function() { i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function() { $(".display").append(i); });​ }("")); ```
12,039,199
I need to call the id value from another function Here the code ``` $("p").hover(function() { var i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function() { $(".display").append(i); });​ ``` I need "i" value display on ".display" class div....
2012/08/20
[ "https://Stackoverflow.com/questions/12039199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1598053/" ]
Simply declare `i` outside.. ``` var i = ''; $("p").hover(function() { i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function() { $(".display").append(i); }); ```
Just use variable scope to your advantage by moving i outside of the functions. ``` var i; $("p").hover(function() { i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function() { $(".display").append(i); }); ```
12,039,199
I need to call the id value from another function Here the code ``` $("p").hover(function() { var i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function() { $(".display").append(i); });​ ``` I need "i" value display on ".display" class div....
2012/08/20
[ "https://Stackoverflow.com/questions/12039199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1598053/" ]
To add to Vega's answer, I would wrap it in an anonymous function to avoid polluting the global scope. ``` (function() { var i = ''; $("p").hover(function() { i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function(...
Just use variable scope to your advantage by moving i outside of the functions. ``` var i; $("p").hover(function() { i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function() { $(".display").append(i); }); ```
12,039,199
I need to call the id value from another function Here the code ``` $("p").hover(function() { var i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function() { $(".display").append(i); });​ ``` I need "i" value display on ".display" class div....
2012/08/20
[ "https://Stackoverflow.com/questions/12039199", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1598053/" ]
Create a closure instead of a global variable... ``` (function (i) { $("p").hover(function() { i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function() { $(".display").append(i); });​ }("")); ```
Just use variable scope to your advantage by moving i outside of the functions. ``` var i; $("p").hover(function() { i = $(this).text(); $("#o").show(); }, function() { $("#o").delay(2000).fadeOut("slow"); }); $("#o").click(function() { $(".display").append(i); }); ```
49,830,332
can anyone point the mistake as to why i am unable to read the data from the controller ? Link to plunker [Plunker](https://plnkr.co/edit/4jnawDJgdMM61GYfpxor?p=preview) ``` <!DOCTYPE html> <html ng-app> <head> <script data-require="angular.js.1.3@*" data-semver="1.5.2" src="https://cdnjs.cloudflare.com/ajax/...
2018/04/14
[ "https://Stackoverflow.com/questions/49830332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2389441/" ]
Where is the `ng-app` name ? Provide module name. ``` angular.module('myApp',[]) .controller('SomeCtrl',function($scope){ .. your code ...}) ``` Provide it in `.html` file ``` <html ng-app="myApp"> ``` Fixed your [Plunkr](https://plnkr.co/edit/W2N6yPR5fwN6ZZ3EMzou?p=preview) > > You are referring to older ...
Here you go!! ``` <!DOCTYPE html> <html ng-app="app"> <head> <script data-require="angular.js.1.3@*" data-semver="1.5.2" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.2/angular.js"></script> <script data-require="angular-route@*" data-semver="1.6.2" src="https://ajax.googleapis.com/aja...
49,830,332
can anyone point the mistake as to why i am unable to read the data from the controller ? Link to plunker [Plunker](https://plnkr.co/edit/4jnawDJgdMM61GYfpxor?p=preview) ``` <!DOCTYPE html> <html ng-app> <head> <script data-require="angular.js.1.3@*" data-semver="1.5.2" src="https://cdnjs.cloudflare.com/ajax/...
2018/04/14
[ "https://Stackoverflow.com/questions/49830332", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2389441/" ]
While your code may be correct, but it is prior to the versions `1.3.0` **Versions Before `1.3.0`:** > > Prior to 1.3.0, angular was able to automatically discover controllers > that were defined globally. > > > **Check Below I have created without module** ``` <div ng-app> <div ng-controller="MainControlle...
Here you go!! ``` <!DOCTYPE html> <html ng-app="app"> <head> <script data-require="angular.js.1.3@*" data-semver="1.5.2" src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.2/angular.js"></script> <script data-require="angular-route@*" data-semver="1.6.2" src="https://ajax.googleapis.com/aja...
26,462,914
I have vertical linear layout with multiline edit text and 2 buttons below. When I try to write something the keyboard hide these views. I tried to set `android:windowSoftInputMode="adjustResize"` and `android:windowSoftInputMode="adjustPan"` but its not help. Edit text rise above the keyboard but buttons are still not...
2014/10/20
[ "https://Stackoverflow.com/questions/26462914", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2462686/" ]
Put your LinearLayout inside a ScrollView. That way you can scroll to the other views after the EditText fields gain focus.
I experienced the same issue. Resolved it with 2 simple steps. 1. Put your view inside scroll ``` <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" ``` android:layout\_width="match\_parent" android:layout\_height="match\_parent" android:orientation="vertical" > ``` <LinearLayout your code `...
26,462,914
I have vertical linear layout with multiline edit text and 2 buttons below. When I try to write something the keyboard hide these views. I tried to set `android:windowSoftInputMode="adjustResize"` and `android:windowSoftInputMode="adjustPan"` but its not help. Edit text rise above the keyboard but buttons are still not...
2014/10/20
[ "https://Stackoverflow.com/questions/26462914", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2462686/" ]
When you go for edit text, the keyboard shows up for input and hides the button or other widget when you are editing. It should dismiss when you are done with edittext. This should work. ``` <activity android:name=".activityname" android:label="@string/app_name" android:windowSoftInputMode="adj...
I experienced the same issue. Resolved it with 2 simple steps. 1. Put your view inside scroll ``` <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" ``` android:layout\_width="match\_parent" android:layout\_height="match\_parent" android:orientation="vertical" > ``` <LinearLayout your code `...
2,618
Are questions on numismatics on-topic? Coins are, and have been for a very long time, quite literally, money. On the other hand, the value of rare coins stems from their rarity and the fact collectors want them, not from their face value. In that way, their value is no different from the value of rare stamps, which I ...
2018/10/13
[ "https://money.meta.stackexchange.com/questions/2618", "https://money.meta.stackexchange.com", "https://money.meta.stackexchange.com/users/9083/" ]
I personally have been a numismatist from the time I was 10 years old. I think that coin collector questions should be "off-topic" on this site. This site is titled "Personal Finance & Money", and most questions are about loans, taxes, stocks, banks accounts, IRS, ect... Coin collecting really has nothing to do with th...
The question might be on topic. We have tags for [collectibles](https://money.stackexchange.com/questions/tagged/collectibles "show questions tagged 'collectibles'") and [coins](https://money.stackexchange.com/questions/tagged/coins "show questions tagged 'coins'").
2,618
Are questions on numismatics on-topic? Coins are, and have been for a very long time, quite literally, money. On the other hand, the value of rare coins stems from their rarity and the fact collectors want them, not from their face value. In that way, their value is no different from the value of rare stamps, which I ...
2018/10/13
[ "https://money.meta.stackexchange.com/questions/2618", "https://money.meta.stackexchange.com", "https://money.meta.stackexchange.com/users/9083/" ]
I would like to see numismatics on-topic on our site. * Coins are usually legal tender, and we allow questions about physical currency, as these are certainly tied to personal finance and money. * We also allow questions about investing in precious metals, as investing is on-topic. * Questions about investing in rare...
The question might be on topic. We have tags for [collectibles](https://money.stackexchange.com/questions/tagged/collectibles "show questions tagged 'collectibles'") and [coins](https://money.stackexchange.com/questions/tagged/coins "show questions tagged 'coins'").
2,618
Are questions on numismatics on-topic? Coins are, and have been for a very long time, quite literally, money. On the other hand, the value of rare coins stems from their rarity and the fact collectors want them, not from their face value. In that way, their value is no different from the value of rare stamps, which I ...
2018/10/13
[ "https://money.meta.stackexchange.com/questions/2618", "https://money.meta.stackexchange.com", "https://money.meta.stackexchange.com/users/9083/" ]
I'm not aware of it ever having come up before, but I tend to agree with the "rare stamps" view.
I believe these questions need to be taken one at a time. I wouldn’t go so far as to say that “coin collecting” question are off-topic, but rather it depends on the question itself. Just like ‘bitcoin’ can be part of a PF question, or it can be off topic. The sample question strikes me as one that’s not particularl...
2,618
Are questions on numismatics on-topic? Coins are, and have been for a very long time, quite literally, money. On the other hand, the value of rare coins stems from their rarity and the fact collectors want them, not from their face value. In that way, their value is no different from the value of rare stamps, which I ...
2018/10/13
[ "https://money.meta.stackexchange.com/questions/2618", "https://money.meta.stackexchange.com", "https://money.meta.stackexchange.com/users/9083/" ]
I would like to see numismatics on-topic on our site. * Coins are usually legal tender, and we allow questions about physical currency, as these are certainly tied to personal finance and money. * We also allow questions about investing in precious metals, as investing is on-topic. * Questions about investing in rare...
I believe these questions need to be taken one at a time. I wouldn’t go so far as to say that “coin collecting” question are off-topic, but rather it depends on the question itself. Just like ‘bitcoin’ can be part of a PF question, or it can be off topic. The sample question strikes me as one that’s not particularl...
2,618
Are questions on numismatics on-topic? Coins are, and have been for a very long time, quite literally, money. On the other hand, the value of rare coins stems from their rarity and the fact collectors want them, not from their face value. In that way, their value is no different from the value of rare stamps, which I ...
2018/10/13
[ "https://money.meta.stackexchange.com/questions/2618", "https://money.meta.stackexchange.com", "https://money.meta.stackexchange.com/users/9083/" ]
I'm not aware of it ever having come up before, but I tend to agree with the "rare stamps" view.
The question might be on topic. We have tags for [collectibles](https://money.stackexchange.com/questions/tagged/collectibles "show questions tagged 'collectibles'") and [coins](https://money.stackexchange.com/questions/tagged/coins "show questions tagged 'coins'").
2,618
Are questions on numismatics on-topic? Coins are, and have been for a very long time, quite literally, money. On the other hand, the value of rare coins stems from their rarity and the fact collectors want them, not from their face value. In that way, their value is no different from the value of rare stamps, which I ...
2018/10/13
[ "https://money.meta.stackexchange.com/questions/2618", "https://money.meta.stackexchange.com", "https://money.meta.stackexchange.com/users/9083/" ]
I personally have been a numismatist from the time I was 10 years old. I think that coin collector questions should be "off-topic" on this site. This site is titled "Personal Finance & Money", and most questions are about loans, taxes, stocks, banks accounts, IRS, ect... Coin collecting really has nothing to do with th...
> > Are questions on numismatics on-topic? > > > This is quite broad. While some basic questions like what are the risks, or general questions can be on topic. A vast set of questions should be off-topic. For example questions related to identification of coin; why do specific coin have more value, or discussion a...
2,618
Are questions on numismatics on-topic? Coins are, and have been for a very long time, quite literally, money. On the other hand, the value of rare coins stems from their rarity and the fact collectors want them, not from their face value. In that way, their value is no different from the value of rare stamps, which I ...
2018/10/13
[ "https://money.meta.stackexchange.com/questions/2618", "https://money.meta.stackexchange.com", "https://money.meta.stackexchange.com/users/9083/" ]
I personally have been a numismatist from the time I was 10 years old. I think that coin collector questions should be "off-topic" on this site. This site is titled "Personal Finance & Money", and most questions are about loans, taxes, stocks, banks accounts, IRS, ect... Coin collecting really has nothing to do with th...
I'm not aware of it ever having come up before, but I tend to agree with the "rare stamps" view.
2,618
Are questions on numismatics on-topic? Coins are, and have been for a very long time, quite literally, money. On the other hand, the value of rare coins stems from their rarity and the fact collectors want them, not from their face value. In that way, their value is no different from the value of rare stamps, which I ...
2018/10/13
[ "https://money.meta.stackexchange.com/questions/2618", "https://money.meta.stackexchange.com", "https://money.meta.stackexchange.com/users/9083/" ]
I personally have been a numismatist from the time I was 10 years old. I think that coin collector questions should be "off-topic" on this site. This site is titled "Personal Finance & Money", and most questions are about loans, taxes, stocks, banks accounts, IRS, ect... Coin collecting really has nothing to do with th...
I believe these questions need to be taken one at a time. I wouldn’t go so far as to say that “coin collecting” question are off-topic, but rather it depends on the question itself. Just like ‘bitcoin’ can be part of a PF question, or it can be off topic. The sample question strikes me as one that’s not particularl...
2,618
Are questions on numismatics on-topic? Coins are, and have been for a very long time, quite literally, money. On the other hand, the value of rare coins stems from their rarity and the fact collectors want them, not from their face value. In that way, their value is no different from the value of rare stamps, which I ...
2018/10/13
[ "https://money.meta.stackexchange.com/questions/2618", "https://money.meta.stackexchange.com", "https://money.meta.stackexchange.com/users/9083/" ]
I would like to see numismatics on-topic on our site. * Coins are usually legal tender, and we allow questions about physical currency, as these are certainly tied to personal finance and money. * We also allow questions about investing in precious metals, as investing is on-topic. * Questions about investing in rare...
I'm not aware of it ever having come up before, but I tend to agree with the "rare stamps" view.
2,618
Are questions on numismatics on-topic? Coins are, and have been for a very long time, quite literally, money. On the other hand, the value of rare coins stems from their rarity and the fact collectors want them, not from their face value. In that way, their value is no different from the value of rare stamps, which I ...
2018/10/13
[ "https://money.meta.stackexchange.com/questions/2618", "https://money.meta.stackexchange.com", "https://money.meta.stackexchange.com/users/9083/" ]
I would like to see numismatics on-topic on our site. * Coins are usually legal tender, and we allow questions about physical currency, as these are certainly tied to personal finance and money. * We also allow questions about investing in precious metals, as investing is on-topic. * Questions about investing in rare...
> > Are questions on numismatics on-topic? > > > This is quite broad. While some basic questions like what are the risks, or general questions can be on topic. A vast set of questions should be off-topic. For example questions related to identification of coin; why do specific coin have more value, or discussion a...
5,714,479
I have an ASP.NET MVC 2 web-site. All the buisnes is in the databse stored procedures (MS SQL SERVER 2008). The task: Some user creates record, using web-site. Appropriate row inserts into the table. This row has foreign key to another table, its value sets in the procedure. Then I want application to reassign re...
2011/04/19
[ "https://Stackoverflow.com/questions/5714479", "https://Stackoverflow.com", "https://Stackoverflow.com/users/377133/" ]
I ended up writing my own function for logging on the device. ``` public static BufferedWriter out; private void createFileOnDevice(Boolean append) throws IOException { /* * Function to initially create the log file and it also writes the time of creation to file. */ ...
[Logcollector](http://code.google.com/p/android-log-collector/) is the option for you but you need to install it first on your device. Again you can save the activity log via adb Run `adb shell logcat > your_log_file.txt` from your command prompt.
1,957,747
Let $p$ be an odd prime. Is it true that $$-\left(\begin{array}{c}p+1\\ 2\end{array}\right)+\left(\begin{array}{c}p+1\\ 3\end{array}\right)\dots+\left(\begin{array}{c}p+1\\ p\end{array}\right)-\left(\begin{array}{c}p+1\\ p+1\end{array}\right)=p?$$ I could show that it is true for $p\in\{3,5\}$, but I could not prove i...
2016/10/07
[ "https://math.stackexchange.com/questions/1957747", "https://math.stackexchange.com", "https://math.stackexchange.com/users/49145/" ]
It isn’t true: for $p=3$ you have $-\binom42+\binom43=-6+4=-2$. You need to switch the signs, so that the first term is positive. Then it’s true much more generally. For any $n>0$ we have $$\sum\_{k=0}^n(-1)^k\binom{n}k=0\;;$$ you see this by recognizing the summation as the expanion of $\big((-1)+1\big)^n$ using th...
$$\sum\_{i=0}^{p+1}\binom{p+1}{i}(-1)^{i+1}=0$$ as $\binom{p+1}{i}=\binom{p+1}{i+2(i-\frac{p+1}{2})}\hspace{10mm}\forall i<\frac{p+1}{2}$ as the binom is symmetric and $p+1$ is even. From there you just take $$\sum\_{i=0}^{p+1}\binom{p+1}{i}(-1)^{i+1} + \binom{p+1}{1}-\binom{p+1}{0}=0+p+1-1=p$$ to eliminate the fi...
36,052,594
I have 4 blocks, each with the same wrapper class. Inside of each of these blocks is an image. I need to pull the src from the img of each of these blocks and apply them as the background for these blocks. Here is my code ``` $('.Home-Jump-Wrap').each(function() { var bannerImage = $(this).find(".Jump-Image img")...
2016/03/17
[ "https://Stackoverflow.com/questions/36052594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5762380/" ]
Remove the item from your model when `onClick` happens n call `notifyDatasetChanged()` for the same adapter and in your case you are passing cursor directly to your custom adapter which is a very bad practice as in this case your connection with the db will stay open and can lead to Memory and DB issues So you can cr...
The reason that bindView method doesn't refresh by the db change is : The cursor is steel the old cursor . You need to requery the data base get new cursor and then Call adapter.change cursor(passHereTheNewCursor)
36,052,594
I have 4 blocks, each with the same wrapper class. Inside of each of these blocks is an image. I need to pull the src from the img of each of these blocks and apply them as the background for these blocks. Here is my code ``` $('.Home-Jump-Wrap').each(function() { var bannerImage = $(this).find(".Jump-Image img")...
2016/03/17
[ "https://Stackoverflow.com/questions/36052594", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5762380/" ]
Remove the item from your model when `onClick` happens n call `notifyDatasetChanged()` for the same adapter and in your case you are passing cursor directly to your custom adapter which is a very bad practice as in this case your connection with the db will stay open and can lead to Memory and DB issues So you can cr...
Adding to above answer by Nitesh - To delete item from listview on button click, Either 1. first you need to delete item from listview's adapter like below - ``` deleteButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Object objToRe...
53,386,668
First time asking a question here. Hoping I do this right! I've recently heard of Alpaca for algorithmic trading, and thought it would be a cool opportunity to learn Julia and try to get an algo working! Super excited, but running into some trouble getting the initial API call to work. I'm hung up on the initial API ...
2018/11/20
[ "https://Stackoverflow.com/questions/53386668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10678199/" ]
I just resolved a similar issue using PyLiveTrader, although that uses a config.yaml for the API keys. I was able to solve it by using the proper syntax for yaml (four spaces after colon), as well as making sure that I was using the paper key when using the paper base\_url (originally I had the regular base\_url). Best...
From the linked documentation, you see the corresponding curl command: ``` curl -X GET \ -H "APCA-API-KEY-ID: {YOUR_API_KEY_ID}" \ -H "APCA-API-SECRET-KEY: {YOUR_API_SECRET_KEY}"\ https://{apiserver_domain}/v1/account ``` The option -H, means header. So the keys must go in the header, i.e. the 3rd parameter...
403,049
Application for which I'm writing service file expects its `STDIN` to be connected to the `tty`, or in other words to be run on the terminal. `Systemd` has the following settings which do the trick for my application, however here I use statically configured `tty` path, which could potentially already be used by other ...
2017/11/07
[ "https://unix.stackexchange.com/questions/403049", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/111103/" ]
**awk** solution: ``` awk -F';' 'BEGIN{ i=1004 }{ $1=i++ }1' OFS=';' file ``` * `-F';'` - input field separator * `i=1004` - starting *increment* The output: ``` 1004;03;07;30;35;43;01;03 1005;08;12;16;22;26;06;07 1006;02;20;28;29;44;03;09 1007;08;11;15;20;30;03;08 1008;09;11;12;19;30;04;09 1009;08;15;25;27;42;01;...
* With `awk`: ``` awk -v cnt=1004 '{ sub("^[^;]+", cnt++) } 1' file.csv ``` * With shell: ``` cnt=1004 while read -r line; do printf '%d;%s\n' $cnt "${line#*;}" let cnt++ done <file.csv ``` * With `jot`, `paste`, and a shell that can handle `<(...)` redirections: ``` paste -d\; <(jot $(wc -l <file.csv) 100...
403,049
Application for which I'm writing service file expects its `STDIN` to be connected to the `tty`, or in other words to be run on the terminal. `Systemd` has the following settings which do the trick for my application, however here I use statically configured `tty` path, which could potentially already be used by other ...
2017/11/07
[ "https://unix.stackexchange.com/questions/403049", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/111103/" ]
* With `awk`: ``` awk -v cnt=1004 '{ sub("^[^;]+", cnt++) } 1' file.csv ``` * With shell: ``` cnt=1004 while read -r line; do printf '%d;%s\n' $cnt "${line#*;}" let cnt++ done <file.csv ``` * With `jot`, `paste`, and a shell that can handle `<(...)` redirections: ``` paste -d\; <(jot $(wc -l <file.csv) 100...
Use Python, it's easy to read, understand, and maintain - and it's available on most Unix installations: ``` python - << "EOF" > outfilename for index, line in enumerate(open("filename"), start=1004): linedata = line.strip().split(';') linedata[0] = str(index) print(';'.join(linedata)) EOF ```
403,049
Application for which I'm writing service file expects its `STDIN` to be connected to the `tty`, or in other words to be run on the terminal. `Systemd` has the following settings which do the trick for my application, however here I use statically configured `tty` path, which could potentially already be used by other ...
2017/11/07
[ "https://unix.stackexchange.com/questions/403049", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/111103/" ]
**awk** solution: ``` awk -F';' 'BEGIN{ i=1004 }{ $1=i++ }1' OFS=';' file ``` * `-F';'` - input field separator * `i=1004` - starting *increment* The output: ``` 1004;03;07;30;35;43;01;03 1005;08;12;16;22;26;06;07 1006;02;20;28;29;44;03;09 1007;08;11;15;20;30;03;08 1008;09;11;12;19;30;04;09 1009;08;15;25;27;42;01;...
Use Python, it's easy to read, understand, and maintain - and it's available on most Unix installations: ``` python - << "EOF" > outfilename for index, line in enumerate(open("filename"), start=1004): linedata = line.strip().split(';') linedata[0] = str(index) print(';'.join(linedata)) EOF ```
21,393,509
I have this code: ``` class Test(object): def f1(self,*args,**kwargs): print args print kwargs self.f2(*args,**kwargs) def f2(self,*args,**kwargs): print "calling f2" print "args= ",args print "kwargs= ",kwargs t = Test() args = [1,2,3] kwargs= {'a':1,'b':2} t.f1(args,...
2014/01/27
[ "https://Stackoverflow.com/questions/21393509", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1988876/" ]
``` t = Test() args = [1,2,3] kwargs= {'a':1,'b':2} t.f1(args,kwargs) t.f1(kwargs) ``` Needs to be ``` t = Test() args = [1,2,3] kwargs= {'a':1,'b':2} t.f1(*args,**kwargs) t.f1(**kwargs) ``` Otherwise it passes `args` and `kwargs` as the first and second argument (which both get collapsed to `*args` inside the fun...
[You're doing it wrong.](http://docs.python.org/2/tutorial/controlflow.html#unpacking-argument-lists) ``` t.f1(*args, **kwargs) t.f1(**kwargs) ```
567,130
I have been trying to read a 4wire pressure transducer (M3021-000005-01KPG) with a microcontroller, but problems keep arising. First of all, I realized that the signal (0-100 mV) is differential, which means that we have to measure it between the 2 signal wires of the transducer, not between the ground of the circuit a...
2021/05/27
[ "https://electronics.stackexchange.com/questions/567130", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/286598/" ]
The part number you have, M3021, is a mV output device, so according to the datasheet should have a load resistance of minimum 1 Mohm. Offset voltages at the LM358 may result in a voltage close to or even below ground. Although the input common mode goes below 0 V, the output certainly doesn't. Your amplifier may not ...
With regard to the sensor-to-buffer amplifier end: many pressure sensors implement the Kelvin Wheatstone bridge in their design. The most secure way to connect *your* sensor to a data acquisition system is to follow instructions from the sensor manufacturer or your supplier, but there exist scenarios where you should s...
1,746,050
I've got unit tests (in maven) that use derby. At the end of the test run, there is a very long pause, with these log messages before the pause. ``` INFO: Closing Hibernate SessionFactory Nov 16, 2009 8:30:31 PM org.hibernate.impl.SessionFactoryImpl close INFO: closing Nov 16, 2009 8:30:31 PM org.hibernate.tool.hbm2d...
2009/11/17
[ "https://Stackoverflow.com/questions/1746050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/131433/" ]
What you're looking for is Set::flatten(). It's not documented in the CakePHP manual, but take a look at the [API definition](http://api.cakephp.org/class/set#method-Setflatten). It works something like this (the result might not be exact, this is from my head): ``` $array = array( 'Post' => array( 'id' =...
It's just a convention throughout Cake, but each part does its own, customized parsing. If you look at the function `ContainableBehavior::containments()` in `cake/libs/model/behaviors/containable.php`, you'll see a lot of `preg_matching` and `explode('.')ing` going on. At least in the case of Containable, the verbose `...
1,746,050
I've got unit tests (in maven) that use derby. At the end of the test run, there is a very long pause, with these log messages before the pause. ``` INFO: Closing Hibernate SessionFactory Nov 16, 2009 8:30:31 PM org.hibernate.impl.SessionFactoryImpl close INFO: closing Nov 16, 2009 8:30:31 PM org.hibernate.tool.hbm2d...
2009/11/17
[ "https://Stackoverflow.com/questions/1746050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/131433/" ]
I've actually figured my own way to get this working leveraging the built-in Set functions. Given: ``` $input = array ( 'Post.id' => 1, 'Post.title' => 'Some post title.', 'Post.Tag.0.id' => 4, 'Post.Tag.0.name' => 'cakephp', 'Post.Tag.1.id' => 7, 'Post.Tag.1.name' => 'mysql', ); ``` This co...
It's just a convention throughout Cake, but each part does its own, customized parsing. If you look at the function `ContainableBehavior::containments()` in `cake/libs/model/behaviors/containable.php`, you'll see a lot of `preg_matching` and `explode('.')ing` going on. At least in the case of Containable, the verbose `...
1,746,050
I've got unit tests (in maven) that use derby. At the end of the test run, there is a very long pause, with these log messages before the pause. ``` INFO: Closing Hibernate SessionFactory Nov 16, 2009 8:30:31 PM org.hibernate.impl.SessionFactoryImpl close INFO: closing Nov 16, 2009 8:30:31 PM org.hibernate.tool.hbm2d...
2009/11/17
[ "https://Stackoverflow.com/questions/1746050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/131433/" ]
I've actually figured my own way to get this working leveraging the built-in Set functions. Given: ``` $input = array ( 'Post.id' => 1, 'Post.title' => 'Some post title.', 'Post.Tag.0.id' => 4, 'Post.Tag.0.name' => 'cakephp', 'Post.Tag.1.id' => 7, 'Post.Tag.1.name' => 'mysql', ); ``` This co...
What you're looking for is Set::flatten(). It's not documented in the CakePHP manual, but take a look at the [API definition](http://api.cakephp.org/class/set#method-Setflatten). It works something like this (the result might not be exact, this is from my head): ``` $array = array( 'Post' => array( 'id' =...
1,746,050
I've got unit tests (in maven) that use derby. At the end of the test run, there is a very long pause, with these log messages before the pause. ``` INFO: Closing Hibernate SessionFactory Nov 16, 2009 8:30:31 PM org.hibernate.impl.SessionFactoryImpl close INFO: closing Nov 16, 2009 8:30:31 PM org.hibernate.tool.hbm2d...
2009/11/17
[ "https://Stackoverflow.com/questions/1746050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/131433/" ]
What you're looking for is Set::flatten(). It's not documented in the CakePHP manual, but take a look at the [API definition](http://api.cakephp.org/class/set#method-Setflatten). It works something like this (the result might not be exact, this is from my head): ``` $array = array( 'Post' => array( 'id' =...
Great question, I was just searching for the same thing. Apparently it's coming in Cake 2.2. The new `Hash` class (a new, improved version of the `Set` class) has an `expand()` function which does this. You can view the code on Github if you need to use it in the meantime: <https://github.com/cakephp/cakephp/blob/2.2...
1,746,050
I've got unit tests (in maven) that use derby. At the end of the test run, there is a very long pause, with these log messages before the pause. ``` INFO: Closing Hibernate SessionFactory Nov 16, 2009 8:30:31 PM org.hibernate.impl.SessionFactoryImpl close INFO: closing Nov 16, 2009 8:30:31 PM org.hibernate.tool.hbm2d...
2009/11/17
[ "https://Stackoverflow.com/questions/1746050", "https://Stackoverflow.com", "https://Stackoverflow.com/users/131433/" ]
I've actually figured my own way to get this working leveraging the built-in Set functions. Given: ``` $input = array ( 'Post.id' => 1, 'Post.title' => 'Some post title.', 'Post.Tag.0.id' => 4, 'Post.Tag.0.name' => 'cakephp', 'Post.Tag.1.id' => 7, 'Post.Tag.1.name' => 'mysql', ); ``` This co...
Great question, I was just searching for the same thing. Apparently it's coming in Cake 2.2. The new `Hash` class (a new, improved version of the `Set` class) has an `expand()` function which does this. You can view the code on Github if you need to use it in the meantime: <https://github.com/cakephp/cakephp/blob/2.2...
6,759,903
I wrote a simple program to test array pointer: ``` #include <iostream> using namespace std; int main(){ int (*array)[10]; int i, j; for (i = 0; i < 10; i++){ for (j = 0; j < 10; j++) array[i][j] = 1; } for (i = 0; i < 10; i++){ ...
2011/07/20
[ "https://Stackoverflow.com/questions/6759903", "https://Stackoverflow.com", "https://Stackoverflow.com/users/831096/" ]
`array` is a pointer to an array, which you apparently already know. However, you never allocated memory for the actual array, i.e. your pointer is pointing "nowhere". You are trying to access something that does not exist, which often leads to segmentation fault. For example, you can declare an actual array ``` int ...
You declare `array` as an array of pointers, then use it as an array of arrays. You must declare it as multi-dimensional instead : ``` int array[10][10]; ```
10,125,175
let's suppose we have two web applications under "webapps" folder; "abc" and "xyz". Is there a way to define a different classpath folder per application? In Tomcat something like "abc.classpath=Directory\_A; xyz.classpath=Directory\_B" would be greate. Thanks in advance...
2012/04/12
[ "https://Stackoverflow.com/questions/10125175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1153321/" ]
Your applications will all load the TOMCAT\_HOME/lib contents. Other than that each of your webapps will load whatever's in their own WEB-INF/lib & WEB-INF/classes folders.
i found a way... my expoloded web application' s name is "abc". I created "$CATALINA\_BASE/conf/Catalina/localhost/abc.xml" file and defined ``` <Context className="org.apache.catalina.core.StandardContext"> <Loader className="org.apache.catalina.loader.VirtualWebappLoader" virtualClasspath="/extern...
19,472,511
I'm using an ebean query in the play! framework to find a list of records based on a distinct column. It seems like a pretty simple query but the problem is the ebean method setDistinct(true) isn't actually setting the query to distinct. My query is: ``` List<Song> allSongs = Song.find.select("artistName").setDistinc...
2013/10/20
[ "https://Stackoverflow.com/questions/19472511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2170265/" ]
I just faced the same issue out of the blue and can not figure it out. As hfs said its been fixed in a later version but if you are stuck for a while you can use ``` findSet() ``` So in your example use ``` List<Song> allSongs = Song.find.select("artistName").setDistinct(true).findSet(); ```
According to [issue #158: Add support for using setDistinct (by excluding id property from generated sql)](https://github.com/ebean-orm/avaje-ebeanorm/issues/158) on the Ebean bug tracker, the problem is that an ID column is added to the beginning of the select query implicitly. That makes the distinct keyword act on t...
19,472,511
I'm using an ebean query in the play! framework to find a list of records based on a distinct column. It seems like a pretty simple query but the problem is the ebean method setDistinct(true) isn't actually setting the query to distinct. My query is: ``` List<Song> allSongs = Song.find.select("artistName").setDistinc...
2013/10/20
[ "https://Stackoverflow.com/questions/19472511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2170265/" ]
According to [issue #158: Add support for using setDistinct (by excluding id property from generated sql)](https://github.com/ebean-orm/avaje-ebeanorm/issues/158) on the Ebean bug tracker, the problem is that an ID column is added to the beginning of the select query implicitly. That makes the distinct keyword act on t...
As an alternative you can use a native SQL query (SqlQuery). The mechanism is described here: <https://ebean-orm.github.io/apidocs/com/avaje/ebean/SqlQuery.html> This is from the documentation: ``` public interface SqlQuery extends Serializable Query object for performing native SQL queries that return SqlRow's. Firs...
19,472,511
I'm using an ebean query in the play! framework to find a list of records based on a distinct column. It seems like a pretty simple query but the problem is the ebean method setDistinct(true) isn't actually setting the query to distinct. My query is: ``` List<Song> allSongs = Song.find.select("artistName").setDistinc...
2013/10/20
[ "https://Stackoverflow.com/questions/19472511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2170265/" ]
According to [issue #158: Add support for using setDistinct (by excluding id property from generated sql)](https://github.com/ebean-orm/avaje-ebeanorm/issues/158) on the Ebean bug tracker, the problem is that an ID column is added to the beginning of the select query implicitly. That makes the distinct keyword act on t...
i have a solution for it:- RawSql rawSql = RawSqlBuilder .parse("SELECT distinct CASE WHEN PARENT\_EQUIPMENT\_NUMBER IS NULL THEN EQUIPMENT\_NUMBER ELSE PARENT\_EQUIPMENT\_NUMBER END AS PARENT\_EQUIPMENT\_NUMBER " + "FROM TOOLS\_DETAILS").create(); ``` Query<ToolsDetail> query = Ebean.find(ToolsDetail.class); ...
19,472,511
I'm using an ebean query in the play! framework to find a list of records based on a distinct column. It seems like a pretty simple query but the problem is the ebean method setDistinct(true) isn't actually setting the query to distinct. My query is: ``` List<Song> allSongs = Song.find.select("artistName").setDistinc...
2013/10/20
[ "https://Stackoverflow.com/questions/19472511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2170265/" ]
I just faced the same issue out of the blue and can not figure it out. As hfs said its been fixed in a later version but if you are stuck for a while you can use ``` findSet() ``` So in your example use ``` List<Song> allSongs = Song.find.select("artistName").setDistinct(true).findSet(); ```
As an alternative you can use a native SQL query (SqlQuery). The mechanism is described here: <https://ebean-orm.github.io/apidocs/com/avaje/ebean/SqlQuery.html> This is from the documentation: ``` public interface SqlQuery extends Serializable Query object for performing native SQL queries that return SqlRow's. Firs...
19,472,511
I'm using an ebean query in the play! framework to find a list of records based on a distinct column. It seems like a pretty simple query but the problem is the ebean method setDistinct(true) isn't actually setting the query to distinct. My query is: ``` List<Song> allSongs = Song.find.select("artistName").setDistinc...
2013/10/20
[ "https://Stackoverflow.com/questions/19472511", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2170265/" ]
I just faced the same issue out of the blue and can not figure it out. As hfs said its been fixed in a later version but if you are stuck for a while you can use ``` findSet() ``` So in your example use ``` List<Song> allSongs = Song.find.select("artistName").setDistinct(true).findSet(); ```
i have a solution for it:- RawSql rawSql = RawSqlBuilder .parse("SELECT distinct CASE WHEN PARENT\_EQUIPMENT\_NUMBER IS NULL THEN EQUIPMENT\_NUMBER ELSE PARENT\_EQUIPMENT\_NUMBER END AS PARENT\_EQUIPMENT\_NUMBER " + "FROM TOOLS\_DETAILS").create(); ``` Query<ToolsDetail> query = Ebean.find(ToolsDetail.class); ...
22,680,774
I just encountered a problem with jquery accordion. What I am doing is loading new content from a php page "jobsload.php". After updating the page with new content, accordion doesnot work. I have tried the destroy property too but in vain. here is the code ``` $('#postjob').click(function () { //Get the data f...
2014/03/27
[ "https://Stackoverflow.com/questions/22680774", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2027932/" ]
If i'm correct the following code loads your new content: ``` $('#jobsload').load("jobsload.php"); ``` and not the post call. You need to re-initialize ajaxloaded content, because it's not in the dom, when jquery is initialized. In the answer Kuma, the accordion is triggered at the same time as the load is being...
You should apply the accordion inside your `success` function. ``` success: function (html) { //if process.php returned 1/true (send mail success) if (html==1) { //hide the form //show the success message $('.loading-contact').fadeOut('slow');...
20,718,386
``` jQuery("input[name=a.b.c]") ``` Executing this line using jQuery 1.10.2 or 1.9.1 results in the message: "Syntax error, unrecognized expression: input:hidden[name=a.b.c]". **I understand the core problem** which is that the dots are not escaped or quoted out. This would work: ``` jQuery("input[name='a.b.c']") ...
2013/12/21
[ "https://Stackoverflow.com/questions/20718386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/654495/" ]
The proper way of executing this selector is: ``` jQuery('input[name="a.b.c"]') ``` Obviously you need to edit the algorithm that creates this line, there's no way jquery will accept an invalid selector.
Why don't you change the name attribute yourself? ``` var el = $("input"); el.attr("name", el.attr("name").replace(/[\d\.]+/g, "")); console.log(el.attr("name")); ``` Then change it back if you need to. jsFiddle [here](http://jsfiddle.net/qksmG/)
20,718,386
``` jQuery("input[name=a.b.c]") ``` Executing this line using jQuery 1.10.2 or 1.9.1 results in the message: "Syntax error, unrecognized expression: input:hidden[name=a.b.c]". **I understand the core problem** which is that the dots are not escaped or quoted out. This would work: ``` jQuery("input[name='a.b.c']") ...
2013/12/21
[ "https://Stackoverflow.com/questions/20718386", "https://Stackoverflow.com", "https://Stackoverflow.com/users/654495/" ]
Take a look here. [How do I extend jQuery's selector engine to warn me when a selector is not found?](https://stackoverflow.com/questions/5744997/how-do-i-extend-jquerys-selector-engine-to-warn-me-when-a-selector-is-not-found) In your case I would do something like this. ``` var oldInit = $.fn.init; $.fn.init = fun...
Why don't you change the name attribute yourself? ``` var el = $("input"); el.attr("name", el.attr("name").replace(/[\d\.]+/g, "")); console.log(el.attr("name")); ``` Then change it back if you need to. jsFiddle [here](http://jsfiddle.net/qksmG/)
72,705,547
I want to be able to print a QList to a TextBox with setText(“ “), but I need to convert that list to a string. This may be trivial, but I’m new to cpp and Qt. essentially I want to do the following: ``` {1,2,3,4} -> “{1,2,3,4}” ```
2022/06/21
[ "https://Stackoverflow.com/questions/72705547", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19385363/" ]
Improving a bit on the answer by JarMan. This should be more performant and more Qt-ish. ``` // Assuming QList of integers QString list2String(const QList<int> &list) { QStringList strings; strings.reserve(list.size()); for (int i : list) { strings.append(QString::number(i)); } return...
QList is just a container. It doesn't know anything about strings. So you'll need to iterate over the list and append each value into the string. ``` // Assuming QList of integers QString list2String(const QList<int> &list) { QString s = "{"; for (auto &value : list) { s += QString("%1,").arg(valu...
122,192
In the document model for a rich messaging experience, my internal model is a hierarchy of Scenes and Nodes on them, with attached *Triggers* that invoke *Actions*. I'm exposing that hierarchy in a tree-like editor. It occurred to me that using the word *Trigger* out there in the hierarchy may bother some people. Fo...
2018/11/16
[ "https://ux.stackexchange.com/questions/122192", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/23228/" ]
I'm going to say no, there's not a catch-all, universal list of 'words to avoid'. A lot really depends on context. One person's trigger is another's completely serviceable, innocuous verb. If you're gut's telling you not to use a term, then use a different one. There are plenty of synonyms for 'trigger'.
There can't be a list of words to ban in all circumstances. General context changes the meaning of a word, sensitivity depends on your audience, etc. Ideally, you should test the functionality with different words with a number of potential user to see which word is the easiest to understand and the least problematic...
122,192
In the document model for a rich messaging experience, my internal model is a hierarchy of Scenes and Nodes on them, with attached *Triggers* that invoke *Actions*. I'm exposing that hierarchy in a tree-like editor. It occurred to me that using the word *Trigger* out there in the hierarchy may bother some people. Fo...
2018/11/16
[ "https://ux.stackexchange.com/questions/122192", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/23228/" ]
**Yes, the word "trigger" should be avoided.** It's a totally loaded word now. Like the word snowflake, it has a new primary meaning to a major portion of users. A meaning very different and very profound tied to politics, sexism, racism, etc. Once people adopt a word like this in this way, it makes no sense to use...
There can't be a list of words to ban in all circumstances. General context changes the meaning of a word, sensitivity depends on your audience, etc. Ideally, you should test the functionality with different words with a number of potential user to see which word is the easiest to understand and the least problematic...
49,610,042
[ 91%] Generate files for Java bindings Traceback (most recent call last): File "/home/fcemtopall/Masaüstü/opencv-3.4.1/modules/java/generator/../generator/gen\_java.py", line 1093, in copy\_java\_files(java\_files\_dir, target\_path) File "/home/fcemtopall/Masaüstü/opencv-3.4.1/modules/java/generator/../generator/...
2018/04/02
[ "https://Stackoverflow.com/questions/49610042", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9585692/" ]
``` @Override public Observable<User> findUser() { return Observable.create(new ObservableOnSubscribe<User>() { @Override public void subscribe(ObservableEmitter<User> emitter) throws Exception { try(Realm realm = Realm.getDefaultInstance()) { realm.refresh(); User user = realm...
As the error says > > Realm objects can only be accessed on the thread they were created > > > So just subscribe on the same thread you created Realm ``` userRepository.findUser() .subscribeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread()) ```
19,737,891
I am running my asp.net website through visual studio 2012. However when I click run I get this error in the browser: Http 403.14 error(the web server is configured to not list the contents of this directory) ! any suggestions to resolve this error?
2013/11/02
[ "https://Stackoverflow.com/questions/19737891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2467276/" ]
Try adding this to web.config: ``` <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> ```
Set default document for your home page or whatever your start page. Following link will help you with that <http://www.iis.net/learn/web-hosting/web-server-for-shared-hosting/default-documents>
19,737,891
I am running my asp.net website through visual studio 2012. However when I click run I get this error in the browser: Http 403.14 error(the web server is configured to not list the contents of this directory) ! any suggestions to resolve this error?
2013/11/02
[ "https://Stackoverflow.com/questions/19737891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2467276/" ]
I'm sure after years you probably have an answer already. But in case someone else is looking for an answer in the future. For my problem, I didn't have to at anything to the web.config. I didn't think I would need to either as it was working previously. Make sure no folder is named the same as your page, I had a fo...
Set default document for your home page or whatever your start page. Following link will help you with that <http://www.iis.net/learn/web-hosting/web-server-for-shared-hosting/default-documents>
19,737,891
I am running my asp.net website through visual studio 2012. However when I click run I get this error in the browser: Http 403.14 error(the web server is configured to not list the contents of this directory) ! any suggestions to resolve this error?
2013/11/02
[ "https://Stackoverflow.com/questions/19737891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2467276/" ]
Try adding this to web.config: ``` <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> ```
I was trying to add an agular folder into my existing VS 2015 project, and make all url starting with angular re-written with angular/index by adding rewrite element in web.config. But I was getting the error with the url localhost:49667/angular/ although all other urls starting with angular worked, e.g. angular/xxxx. ...
19,737,891
I am running my asp.net website through visual studio 2012. However when I click run I get this error in the browser: Http 403.14 error(the web server is configured to not list the contents of this directory) ! any suggestions to resolve this error?
2013/11/02
[ "https://Stackoverflow.com/questions/19737891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2467276/" ]
Try adding this to web.config: ``` <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> ```
I'm sure after years you probably have an answer already. But in case someone else is looking for an answer in the future. For my problem, I didn't have to at anything to the web.config. I didn't think I would need to either as it was working previously. Make sure no folder is named the same as your page, I had a fo...
19,737,891
I am running my asp.net website through visual studio 2012. However when I click run I get this error in the browser: Http 403.14 error(the web server is configured to not list the contents of this directory) ! any suggestions to resolve this error?
2013/11/02
[ "https://Stackoverflow.com/questions/19737891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2467276/" ]
I'm sure after years you probably have an answer already. But in case someone else is looking for an answer in the future. For my problem, I didn't have to at anything to the web.config. I didn't think I would need to either as it was working previously. Make sure no folder is named the same as your page, I had a fo...
I was trying to add an agular folder into my existing VS 2015 project, and make all url starting with angular re-written with angular/index by adding rewrite element in web.config. But I was getting the error with the url localhost:49667/angular/ although all other urls starting with angular worked, e.g. angular/xxxx. ...
55,830,445
I calculate a `var` like this: `var difference = new - old;` This outputs either a positive or negative number. Then: ``` if (difference => 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ``` With this code, even when the `difference` output is `-5000` for example, I stil...
2019/04/24
[ "https://Stackoverflow.com/questions/55830445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11041875/" ]
It seems that the right operator is >= and not =>
``` if (difference >= 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ```
55,830,445
I calculate a `var` like this: `var difference = new - old;` This outputs either a positive or negative number. Then: ``` if (difference => 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ``` With this code, even when the `difference` output is `-5000` for example, I stil...
2019/04/24
[ "https://Stackoverflow.com/questions/55830445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11041875/" ]
It seems that the right operator is >= and not =>
The `=>` is arrow function in js see [arrow function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) You should use this ``` if (difference >= 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ```
55,830,445
I calculate a `var` like this: `var difference = new - old;` This outputs either a positive or negative number. Then: ``` if (difference => 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ``` With this code, even when the `difference` output is `-5000` for example, I stil...
2019/04/24
[ "https://Stackoverflow.com/questions/55830445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11041875/" ]
It seems that the right operator is >= and not =>
Here's your code plugged into a function. Make sure you are using the math symbol for inequality `>=`. ```js function check(difference){ text = ""; if (difference >= 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind"; } return difference + ": " + text; } console.log(check...
55,830,445
I calculate a `var` like this: `var difference = new - old;` This outputs either a positive or negative number. Then: ``` if (difference => 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ``` With this code, even when the `difference` output is `-5000` for example, I stil...
2019/04/24
[ "https://Stackoverflow.com/questions/55830445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11041875/" ]
It seems that the right operator is >= and not =>
The correct way to use comparison operator is this >= ``` if (difference >= 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ```
55,830,445
I calculate a `var` like this: `var difference = new - old;` This outputs either a positive or negative number. Then: ``` if (difference => 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ``` With this code, even when the `difference` output is `-5000` for example, I stil...
2019/04/24
[ "https://Stackoverflow.com/questions/55830445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11041875/" ]
The `=>` is arrow function in js see [arrow function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) You should use this ``` if (difference >= 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ```
``` if (difference >= 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ```
55,830,445
I calculate a `var` like this: `var difference = new - old;` This outputs either a positive or negative number. Then: ``` if (difference => 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ``` With this code, even when the `difference` output is `-5000` for example, I stil...
2019/04/24
[ "https://Stackoverflow.com/questions/55830445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11041875/" ]
The `=>` is arrow function in js see [arrow function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) You should use this ``` if (difference >= 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ```
Here's your code plugged into a function. Make sure you are using the math symbol for inequality `>=`. ```js function check(difference){ text = ""; if (difference >= 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind"; } return difference + ": " + text; } console.log(check...
55,830,445
I calculate a `var` like this: `var difference = new - old;` This outputs either a positive or negative number. Then: ``` if (difference => 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ``` With this code, even when the `difference` output is `-5000` for example, I stil...
2019/04/24
[ "https://Stackoverflow.com/questions/55830445", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11041875/" ]
The `=>` is arrow function in js see [arrow function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions) You should use this ``` if (difference >= 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ```
The correct way to use comparison operator is this >= ``` if (difference >= 2) { text = "2 or more"; } else if (difference < -1) { text = "more than 1 behind; } ```
62,493,501
below is my code for a game I am trying to make in pygame. I am trying to run it to test it out, but whenever I press the play game button it quits on me. It's weird and I tried checking maybe I was doing something wrong in the game function, but I could not seem to find anything. I opened the rules, and the rules seem...
2020/06/21
[ "https://Stackoverflow.com/questions/62493501", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13682464/" ]
In drawGame: ``` def drawGame(screen, button, mx, my, state): global player scoreboardHeight = height // 5 draw.rect(screen, blue, (0, 0, width, height)) draw.rect(screen, black, (0, 0, width, height), 2) state = drawScoreboard(screen, mx, my, button) # reassignment # character drawing dra...
In your function drawGame, you have: ``` state = drawScoreboard(screen, mx, my, button) ``` You accidentally redefined state with the scoreboard. Use the following code for the drawGame function and your game should run as expected. ``` def drawGame(screen, button, mx, my, state): global player scoreboardHe...
17,824,197
I've been building a blog engine with flask and SqlAlchemy and I've reached a point where I have the following: * A generic base template which has a left & right sidebar along with footer areas that are dynamically generated based on queries. * A number of variables that are being passed in every view to populate sai...
2013/07/24
[ "https://Stackoverflow.com/questions/17824197", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2512551/" ]
`Zend_Pdf` uses the BOTTOM LEFT corner as the origin and uses points (1/72 of an inch) as the unit of measurement. I don't usually post links to my own stuff so blatantly, but I've seen a number of questions from you recently on how to use `Zend_Pdf` and I think you could benefit from reading this article: <http://ye...
`drawImage` function get as paramteters the location of the start point (top left) to draw the image and the end point (bottom right). By this coordinates, you can specify the location and the size of the image to draw. <http://framework.zend.com/manual/1.12/en/zend.pdf.drawing.html> ``` public function drawImage(Zen...
46,805,395
I'm trying to port the following C# method to PHP but I can't get the output right. ``` public static string Encrypt() { String text = "123456"; String key = "1r1ppl3x"; byte[] arrText = UTF8Encoding.UTF8.GetBytes(text); TripleDESCryptoServiceProvider tdes = new TripleDESCryptoServiceProvider()...
2017/10/18
[ "https://Stackoverflow.com/questions/46805395", "https://Stackoverflow.com", "https://Stackoverflow.com/users/376952/" ]
``` tdes.Key = (new UnicodeEncoding()).GetBytes(key); ``` That `UnicodeEncoding` constructor is for UTF-16, little-endian, "with BOM". The "with BOM" doesn't matter because nothing called `GetPreamble()`, so for all intents and purposes it's UTF-16LE. This means your key (`"1r1ppl3x"`) is actually: ``` 31 00 72 00 ...
1. The C# code is using PKCS#7 padding, the PHP MCRYPT code is using null padding. 2. There is an assumption that the key should be extended with nulls. 3. There is no point in using Triple DES with a single DES key of 8-bytes. Further only 56-bits of an 8-bit DES key are used. a 56-bit key is not considered secure.
14,147,821
I was browsing through some of the base Java objects when I found a section of code surrounded by a `scan: {}` block. The following code is from the toLowerCase() method inside the String class. ``` scan: { for (firstUpper = 0 ; firstUpper < len; ) { char c = value[firstUpper]; ...
2013/01/03
[ "https://Stackoverflow.com/questions/14147821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698473/" ]
Here, `scan:` is simply a [label](http://docs.oracle.com/javase/specs/jls/se7/html/jls-14.html#jls-14.7). The `break <label>` syntax allows one to break out of outer loops, and to simulate some forms of the `goto` statement. The syntax is documented in the [JLS](http://docs.oracle.com/javase/specs/jls/se7/html/jls-14.h...
It is a `labeled block.` where **scan:** is a **label**. It is commonly used when breaking/continue in case you have multiple loops. In this case `break scan;` simply breaks outta the **labeled block**(scan) when executed.
14,147,821
I was browsing through some of the base Java objects when I found a section of code surrounded by a `scan: {}` block. The following code is from the toLowerCase() method inside the String class. ``` scan: { for (firstUpper = 0 ; firstUpper < len; ) { char c = value[firstUpper]; ...
2013/01/03
[ "https://Stackoverflow.com/questions/14147821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698473/" ]
It is a `labeled block.` where **scan:** is a **label**. It is commonly used when breaking/continue in case you have multiple loops. In this case `break scan;` simply breaks outta the **labeled block**(scan) when executed.
It is a `label`. It is a indicator for flow control. If you look at your code, you see below ``` break scan; ``` When this happens, the flow exits completely the `scan` block. By the way, it can be any identifier, `scan` is not a keyword at all.
14,147,821
I was browsing through some of the base Java objects when I found a section of code surrounded by a `scan: {}` block. The following code is from the toLowerCase() method inside the String class. ``` scan: { for (firstUpper = 0 ; firstUpper < len; ) { char c = value[firstUpper]; ...
2013/01/03
[ "https://Stackoverflow.com/questions/14147821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698473/" ]
Here, `scan:` is simply a [label](http://docs.oracle.com/javase/specs/jls/se7/html/jls-14.html#jls-14.7). The `break <label>` syntax allows one to break out of outer loops, and to simulate some forms of the `goto` statement. The syntax is documented in the [JLS](http://docs.oracle.com/javase/specs/jls/se7/html/jls-14.h...
You can set a label to break / or continue from within multiple loops deep. Example ``` outer: for(int i=...){ for(int j=..){ ... break outer; // leaves both loops } } ```
14,147,821
I was browsing through some of the base Java objects when I found a section of code surrounded by a `scan: {}` block. The following code is from the toLowerCase() method inside the String class. ``` scan: { for (firstUpper = 0 ; firstUpper < len; ) { char c = value[firstUpper]; ...
2013/01/03
[ "https://Stackoverflow.com/questions/14147821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698473/" ]
Here, `scan:` is simply a [label](http://docs.oracle.com/javase/specs/jls/se7/html/jls-14.html#jls-14.7). The `break <label>` syntax allows one to break out of outer loops, and to simulate some forms of the `goto` statement. The syntax is documented in the [JLS](http://docs.oracle.com/javase/specs/jls/se7/html/jls-14.h...
It is a `label`. It is a indicator for flow control. If you look at your code, you see below ``` break scan; ``` When this happens, the flow exits completely the `scan` block. By the way, it can be any identifier, `scan` is not a keyword at all.
14,147,821
I was browsing through some of the base Java objects when I found a section of code surrounded by a `scan: {}` block. The following code is from the toLowerCase() method inside the String class. ``` scan: { for (firstUpper = 0 ; firstUpper < len; ) { char c = value[firstUpper]; ...
2013/01/03
[ "https://Stackoverflow.com/questions/14147821", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1698473/" ]
You can set a label to break / or continue from within multiple loops deep. Example ``` outer: for(int i=...){ for(int j=..){ ... break outer; // leaves both loops } } ```
It is a `label`. It is a indicator for flow control. If you look at your code, you see below ``` break scan; ``` When this happens, the flow exits completely the `scan` block. By the way, it can be any identifier, `scan` is not a keyword at all.
3,767,409
As I run my code I get these warnings, always in groups of four, sporadically. I have tried to locate the source by placing debug messages before and after certain statements to pin-point its origin. ``` Warning: invalid value encountered in double_scalars Warning: invalid value encountered in double_scalars Warning: ...
2010/09/22
[ "https://Stackoverflow.com/questions/3767409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/441337/" ]
In my case, I found out it was division by zero.
Whenever you are working with csv imports, try to use df.dropna() to avoid all such warnings or errors.
3,767,409
As I run my code I get these warnings, always in groups of four, sporadically. I have tried to locate the source by placing debug messages before and after certain statements to pin-point its origin. ``` Warning: invalid value encountered in double_scalars Warning: invalid value encountered in double_scalars Warning: ...
2010/09/22
[ "https://Stackoverflow.com/questions/3767409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/441337/" ]
It looks like a floating-point calculation error. Check the [numpy.seterr](http://docs.scipy.org/doc/numpy/reference/generated/numpy.seterr.html) function to get more information about where it happens.
Zero-size array passed to `numpy.mean` raises this warning (as indicated in several comments). For some other candidates: * `median` also raises this warning on zero-sized array. other candidates do not raise this warning: * `min,argmin` both raise `ValueError` on empty array * `randn` takes `*arg`; using `randn(*[...
3,767,409
As I run my code I get these warnings, always in groups of four, sporadically. I have tried to locate the source by placing debug messages before and after certain statements to pin-point its origin. ``` Warning: invalid value encountered in double_scalars Warning: invalid value encountered in double_scalars Warning: ...
2010/09/22
[ "https://Stackoverflow.com/questions/3767409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/441337/" ]
Sometimes NaNs or null values in data will generate this error with Numpy. If you are ingesting data from say, a CSV file or something like that, and then operating on the data using numpy arrays, the problem could have originated with your data ingest. You could try feeding your code a small set of data with known val...
Whenever you are working with csv imports, try to use df.dropna() to avoid all such warnings or errors.
3,767,409
As I run my code I get these warnings, always in groups of four, sporadically. I have tried to locate the source by placing debug messages before and after certain statements to pin-point its origin. ``` Warning: invalid value encountered in double_scalars Warning: invalid value encountered in double_scalars Warning: ...
2010/09/22
[ "https://Stackoverflow.com/questions/3767409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/441337/" ]
Zero-size array passed to `numpy.mean` raises this warning (as indicated in several comments). For some other candidates: * `median` also raises this warning on zero-sized array. other candidates do not raise this warning: * `min,argmin` both raise `ValueError` on empty array * `randn` takes `*arg`; using `randn(*[...
I encount this while I was calculating `np.var(np.array([]))`. `np.var` will divide size of the array which is zero in this case.
3,767,409
As I run my code I get these warnings, always in groups of four, sporadically. I have tried to locate the source by placing debug messages before and after certain statements to pin-point its origin. ``` Warning: invalid value encountered in double_scalars Warning: invalid value encountered in double_scalars Warning: ...
2010/09/22
[ "https://Stackoverflow.com/questions/3767409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/441337/" ]
Sometimes NaNs or null values in data will generate this error with Numpy. If you are ingesting data from say, a CSV file or something like that, and then operating on the data using numpy arrays, the problem could have originated with your data ingest. You could try feeding your code a small set of data with known val...
I ran into similar problem - Invalid value encountered in ... After spending a lot of time trying to figure out what is causing this error I believe in my case it was due to NaN in my dataframe. Check out working with missing data in pandas. None == None True np.nan == np.nan False When NaN is not equal to NaN then ...
3,767,409
As I run my code I get these warnings, always in groups of four, sporadically. I have tried to locate the source by placing debug messages before and after certain statements to pin-point its origin. ``` Warning: invalid value encountered in double_scalars Warning: invalid value encountered in double_scalars Warning: ...
2010/09/22
[ "https://Stackoverflow.com/questions/3767409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/441337/" ]
I ran into similar problem - Invalid value encountered in ... After spending a lot of time trying to figure out what is causing this error I believe in my case it was due to NaN in my dataframe. Check out working with missing data in pandas. None == None True np.nan == np.nan False When NaN is not equal to NaN then ...
Whenever you are working with csv imports, try to use df.dropna() to avoid all such warnings or errors.
3,767,409
As I run my code I get these warnings, always in groups of four, sporadically. I have tried to locate the source by placing debug messages before and after certain statements to pin-point its origin. ``` Warning: invalid value encountered in double_scalars Warning: invalid value encountered in double_scalars Warning: ...
2010/09/22
[ "https://Stackoverflow.com/questions/3767409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/441337/" ]
Zero-size array passed to `numpy.mean` raises this warning (as indicated in several comments). For some other candidates: * `median` also raises this warning on zero-sized array. other candidates do not raise this warning: * `min,argmin` both raise `ValueError` on empty array * `randn` takes `*arg`; using `randn(*[...
I ran into similar problem - Invalid value encountered in ... After spending a lot of time trying to figure out what is causing this error I believe in my case it was due to NaN in my dataframe. Check out working with missing data in pandas. None == None True np.nan == np.nan False When NaN is not equal to NaN then ...
3,767,409
As I run my code I get these warnings, always in groups of four, sporadically. I have tried to locate the source by placing debug messages before and after certain statements to pin-point its origin. ``` Warning: invalid value encountered in double_scalars Warning: invalid value encountered in double_scalars Warning: ...
2010/09/22
[ "https://Stackoverflow.com/questions/3767409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/441337/" ]
In my case, I found out it was division by zero.
I ran into similar problem - Invalid value encountered in ... After spending a lot of time trying to figure out what is causing this error I believe in my case it was due to NaN in my dataframe. Check out working with missing data in pandas. None == None True np.nan == np.nan False When NaN is not equal to NaN then ...
3,767,409
As I run my code I get these warnings, always in groups of four, sporadically. I have tried to locate the source by placing debug messages before and after certain statements to pin-point its origin. ``` Warning: invalid value encountered in double_scalars Warning: invalid value encountered in double_scalars Warning: ...
2010/09/22
[ "https://Stackoverflow.com/questions/3767409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/441337/" ]
It looks like a floating-point calculation error. Check the [numpy.seterr](http://docs.scipy.org/doc/numpy/reference/generated/numpy.seterr.html) function to get more information about where it happens.
I encount this while I was calculating `np.var(np.array([]))`. `np.var` will divide size of the array which is zero in this case.
3,767,409
As I run my code I get these warnings, always in groups of four, sporadically. I have tried to locate the source by placing debug messages before and after certain statements to pin-point its origin. ``` Warning: invalid value encountered in double_scalars Warning: invalid value encountered in double_scalars Warning: ...
2010/09/22
[ "https://Stackoverflow.com/questions/3767409", "https://Stackoverflow.com", "https://Stackoverflow.com/users/441337/" ]
It looks like a floating-point calculation error. Check the [numpy.seterr](http://docs.scipy.org/doc/numpy/reference/generated/numpy.seterr.html) function to get more information about where it happens.
Sometimes NaNs or null values in data will generate this error with Numpy. If you are ingesting data from say, a CSV file or something like that, and then operating on the data using numpy arrays, the problem could have originated with your data ingest. You could try feeding your code a small set of data with known val...
14,287,991
Is there a 64 bit type that in every OS(32/64 bit) and for every compiler has a size of 64? The same question is also for 32 bit type. (It should be int?) *The origin of the question is* : I am implementing the system which has 2 kinds of instructions : 1. 32 bit 2. 64 bit I want to write something like: ``` typed...
2013/01/11
[ "https://Stackoverflow.com/questions/14287991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/466056/" ]
You are looking for `int64_t` and `int32_t`, or their unsigned friends `uint64_t` and `uint32_t`. Include either [`cinttypes`](http://en.cppreference.com/w/cpp/header/cinttypes) or [`cstdint`](http://en.cppreference.com/w/cpp/header/cstdint).
Use `uint_least32_t` and `uint_least64_t`. The fixed-size types `uint32_t` and `uint64_t` will not exist on systems that don't have the exact sizes they describe.
14,287,991
Is there a 64 bit type that in every OS(32/64 bit) and for every compiler has a size of 64? The same question is also for 32 bit type. (It should be int?) *The origin of the question is* : I am implementing the system which has 2 kinds of instructions : 1. 32 bit 2. 64 bit I want to write something like: ``` typed...
2013/01/11
[ "https://Stackoverflow.com/questions/14287991", "https://Stackoverflow.com", "https://Stackoverflow.com/users/466056/" ]
If you want your code to be truly portable, then you probably want to typedef your own type, and use for example ``` typedef int32_t instruction32bit; typedef int64_t instruction64bit; ``` This will work MOST of the time, but if it doesn't for a particular system/compiler/whatever, you can add do something li...
Use `uint_least32_t` and `uint_least64_t`. The fixed-size types `uint32_t` and `uint64_t` will not exist on systems that don't have the exact sizes they describe.
17,748,801
Hi I am having a big headache trying to curl a REST web service I created locally over SSL. **I keep getting the message "curl: (60) SSL certificate problem: self signed certificate** More details here: <http://curl.haxx.se/docs/sslcerts.html> curl performs SSL certificate verification by default, using a "bundle" of ...
2013/07/19
[ "https://Stackoverflow.com/questions/17748801", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1544375/" ]
In case anyone runs into this in the future, I had to create the cert for `localhost.com` and add it to the end of my `/etc/hosts` file like this and then `curl --cacert cert.crt https://localhost.com`. ``` 127.0.0.1 localhost 127.0.0.1 localhost.com ``` If you are not on linux or mac, you can try this in a dock...
please refer to that following answer: * <https://stackoverflow.com/a/28927268/1290438> to sum up: ``` % openssl s_client -showcerts -connect example.com:443 </dev/null 2>/dev/null | sed -n '/-----BEGIN CERTIFICATE-----/,/-----END CERTIFICATE-----/p' | grep -m1 -B-1 -- '-----END CERTIFICATE-----' > cert.pem % curl ...
40,411,071
The top third of my page, including a graphic and headline, shows up just fine in Firefox and Explorer, but does not appear in Chrome when accessed from my server. It does appear in Chrome when viewing the page as a file. The graphic is defined in the CSS file as: ```css /** adbox **/ #adbox { background: #020a...
2016/11/03
[ "https://Stackoverflow.com/questions/40411071", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6411804/" ]
When you change the `left`/`top` property values on an element, it needs to have a position or else nothing happens, so .. ..give the `.animated` rule `position: relative;` and it will work fine. Updated codepen: <http://codepen.io/anon/pen/gLOrwy> *Side note, always put prefixed properties before non-prefixed in yo...
Just add to your paragraph. It's because it's not declared in relative that it doesn't move. (neither on firefox) ``` position: relative; ```