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
19,773,500
I was looking at other questions about Spring custom validators but unfortunately I could not solve my problem with the proposed answers. My problem is the following: I have an entity (Account) and I created a custom validator (AccountValidator) which I use in a controller (RegisterController), but it is never invoked...
2013/11/04
[ "https://Stackoverflow.com/questions/19773500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1019997/" ]
I was facing the same issue and i fixed it by declaring the class **AccountValidator** in context xml file and using `@validated` in place of `@valid`.
I think you want to use `binder.addValidator(accountValidator);` instead of `binder.setValidator(accountValidator);`
44,596,775
Most of the programming languages do not have checked exceptions (like C# and Kotlin). So, I'm trying to find a better approach for a case that I have in my project without using checked exceptions. The project uses Java and we control the possible validation errors from a Remote EJB. Something like this: ``` lookup...
2017/06/16
[ "https://Stackoverflow.com/questions/44596775", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2387977/" ]
Using different checked exceptions has in deed a fundamental problem: it introduces version compatibility issues. In case the two sides can have different code levels, you have to worry about the ejb side using "newer" exceptions... Your question gives one potential solution (by using some return object). But there i...
For the types of exceptions you list: * DocumentoAlreadyExistsException(); * InvalidNameException(); * InvalidBirthDateException(); You could write a validation method that validates the input and returns a validation data value object. This validation method and data value object will evolve as the application evolv...
44,596,775
Most of the programming languages do not have checked exceptions (like C# and Kotlin). So, I'm trying to find a better approach for a case that I have in my project without using checked exceptions. The project uses Java and we control the possible validation errors from a Remote EJB. Something like this: ``` lookup...
2017/06/16
[ "https://Stackoverflow.com/questions/44596775", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2387977/" ]
Using different checked exceptions has in deed a fundamental problem: it introduces version compatibility issues. In case the two sides can have different code levels, you have to worry about the ejb side using "newer" exceptions... Your question gives one potential solution (by using some return object). But there i...
For checked exceptions, you could use only one generic **SystemException**. And this it would solve the 'catching multiple exceptions' problem. However **SystemException** need to have information about your exceptions like errorCodes and/or messages for the integrations (like Remote EJB) use them. For Legacy Code, I...
44,596,775
Most of the programming languages do not have checked exceptions (like C# and Kotlin). So, I'm trying to find a better approach for a case that I have in my project without using checked exceptions. The project uses Java and we control the possible validation errors from a Remote EJB. Something like this: ``` lookup...
2017/06/16
[ "https://Stackoverflow.com/questions/44596775", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2387977/" ]
For checked exceptions, you could use only one generic **SystemException**. And this it would solve the 'catching multiple exceptions' problem. However **SystemException** need to have information about your exceptions like errorCodes and/or messages for the integrations (like Remote EJB) use them. For Legacy Code, I...
For the types of exceptions you list: * DocumentoAlreadyExistsException(); * InvalidNameException(); * InvalidBirthDateException(); You could write a validation method that validates the input and returns a validation data value object. This validation method and data value object will evolve as the application evolv...
178,652
I am trying to understand the following code: ``` \pgfplotsset{ discard if not/.style 2 args={ x filter/.code={ \edef\tempa{\thisrow{#1}} \edef\tempb{#2} \ifx\tempa\tempb \else \def\pgfmathresult{inf} \fi } } } ``` He...
2014/05/17
[ "https://tex.stackexchange.com/questions/178652", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/23594/" ]
It is indeed correct but requires a few nuances to be clarified; 1. `\pgfplotsset` is used to set `key=value` pairs specific to the `pgfplots` key family. It can be seen in the pgfkeys section in the TikZ manual. The main idea to use this is to avoid every time entering `/pgfplots/` prefix to each key to be set. TikZ ...
Yes, you understood almost all of the code correctly. If I remember correctly, that code was first used in the answer to [Is it possible to change the color of a single bar when the bar plot is based on symbolic values?](https://tex.stackexchange.com/questions/58548/is-it-possible-to-change-the-color-of-a-single-bar-w...
68,208
I have correctly configured a dual monitor setup on Ubuntu Linux, Karmic 9.10. I use the Fn+CRT/LCD key to switch between modes, but I have to cycle through 5 modes before I get to the one that I use. The modes that it cycles through (one for each Fn+CRT/LCD keypress) are: 1. LCD only 2. CRT only 3. Both, with CRT be...
2009/11/09
[ "https://superuser.com/questions/68208", "https://superuser.com", "https://superuser.com/users/17430/" ]
In the mean time, to work around this problem, I ended up building custom xrandr commands that switch between the modes that I use, and created launchers for these xrandr commands on my doc/menu. * Dual-Monitor: `xrandr --output LVDS1 --mode 1280x800 --output VGA1 --below LVDS1 --mode 1280x1024` * Mirror Screens: `xra...
[The Ubuntu wiki has a page which should be a good starting point.](https://wiki.ubuntu.com/Hotkeys/Troubleshooting)
68,208
I have correctly configured a dual monitor setup on Ubuntu Linux, Karmic 9.10. I use the Fn+CRT/LCD key to switch between modes, but I have to cycle through 5 modes before I get to the one that I use. The modes that it cycles through (one for each Fn+CRT/LCD keypress) are: 1. LCD only 2. CRT only 3. Both, with CRT be...
2009/11/09
[ "https://superuser.com/questions/68208", "https://superuser.com", "https://superuser.com/users/17430/" ]
In the mean time, to work around this problem, I ended up building custom xrandr commands that switch between the modes that I use, and created launchers for these xrandr commands on my doc/menu. * Dual-Monitor: `xrandr --output LVDS1 --mode 1280x800 --output VGA1 --below LVDS1 --mode 1280x1024` * Mirror Screens: `xra...
So, I know this doesn't answer your question - yet. I was trying to find what code cycles through the 5 "modes" you mention in your question, and this is what I've found so far. It looks like you've found a bit of a can of karmic worms. It appears that the Fn-F8 key is getting ignored within dell-wmi.c - I see an err...
59,867,891
I am trying to get size of an array in C++ to be used for stuff later on. Why does this yield 16? ``` #include <iostream> using namespace std; int main() { int a[4]; cout << sizeof(a) << endl; return 0; } ``` Should it not give 20? Because there are basically 20 bytes in this array from a[0] through ...
2020/01/22
[ "https://Stackoverflow.com/questions/59867891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9271066/" ]
If you declare array `a[4]`, it means it has **4** elements. The only valid indicies are `a[0]`, `a[1]`, `a[2]`, and `a[3]`. Accessing `a[4]` is invalid. I don't know why you think `a[4`] would have 5 elements in it. This array has 4 elements, and its size is: ``` 4-elements * 4-bytes = 16 bytes. ```
``` int a[4]; ``` has four elements: `a[0]`,`a[1]`,`a[2]` and `a[3]`.
59,867,891
I am trying to get size of an array in C++ to be used for stuff later on. Why does this yield 16? ``` #include <iostream> using namespace std; int main() { int a[4]; cout << sizeof(a) << endl; return 0; } ``` Should it not give 20? Because there are basically 20 bytes in this array from a[0] through ...
2020/01/22
[ "https://Stackoverflow.com/questions/59867891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9271066/" ]
If you declare array `a[4]`, it means it has **4** elements. The only valid indicies are `a[0]`, `a[1]`, `a[2]`, and `a[3]`. Accessing `a[4]` is invalid. I don't know why you think `a[4`] would have 5 elements in it. This array has 4 elements, and its size is: ``` 4-elements * 4-bytes = 16 bytes. ```
The output is not wrong. When you declare an array `int a[4]`, it has 4 blocks of data `a[0]`, `a[1]`, `a[2]` and `a[3]`.
59,867,891
I am trying to get size of an array in C++ to be used for stuff later on. Why does this yield 16? ``` #include <iostream> using namespace std; int main() { int a[4]; cout << sizeof(a) << endl; return 0; } ``` Should it not give 20? Because there are basically 20 bytes in this array from a[0] through ...
2020/01/22
[ "https://Stackoverflow.com/questions/59867891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9271066/" ]
If you declare array `a[4]`, it means it has **4** elements. The only valid indicies are `a[0]`, `a[1]`, `a[2]`, and `a[3]`. Accessing `a[4]` is invalid. I don't know why you think `a[4`] would have 5 elements in it. This array has 4 elements, and its size is: ``` 4-elements * 4-bytes = 16 bytes. ```
When doing `int a[4];` you are declaring an array of `4` integers. Therefore the size of the whole vector is 4 times the size of one `int` (and if the `int` happens to be 4 bytes, then the product is 16 bytes). C/C++ (and many other languages) use a zero-based indexing. Which means that the elements of the array defin...
59,867,891
I am trying to get size of an array in C++ to be used for stuff later on. Why does this yield 16? ``` #include <iostream> using namespace std; int main() { int a[4]; cout << sizeof(a) << endl; return 0; } ``` Should it not give 20? Because there are basically 20 bytes in this array from a[0] through ...
2020/01/22
[ "https://Stackoverflow.com/questions/59867891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9271066/" ]
The output is not wrong. When you declare an array `int a[4]`, it has 4 blocks of data `a[0]`, `a[1]`, `a[2]` and `a[3]`.
``` int a[4]; ``` has four elements: `a[0]`,`a[1]`,`a[2]` and `a[3]`.
59,867,891
I am trying to get size of an array in C++ to be used for stuff later on. Why does this yield 16? ``` #include <iostream> using namespace std; int main() { int a[4]; cout << sizeof(a) << endl; return 0; } ``` Should it not give 20? Because there are basically 20 bytes in this array from a[0] through ...
2020/01/22
[ "https://Stackoverflow.com/questions/59867891", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9271066/" ]
When doing `int a[4];` you are declaring an array of `4` integers. Therefore the size of the whole vector is 4 times the size of one `int` (and if the `int` happens to be 4 bytes, then the product is 16 bytes). C/C++ (and many other languages) use a zero-based indexing. Which means that the elements of the array defin...
``` int a[4]; ``` has four elements: `a[0]`,`a[1]`,`a[2]` and `a[3]`.
51,810,085
I am looking for ways to refactor this: **nuxt.config.js** ``` const headConfig = require('./config/head') const modulesConfig = require('./config/modules') const config = { head: headConfig, (...) } module.exports = Object.assign({}, config, modulesConfig) ``` **config/head.js** ``` module.exports = { meta...
2018/08/12
[ "https://Stackoverflow.com/questions/51810085", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Probably your best bet would be to create a global [Mixin](https://v2.vuejs.org/v2/guide/mixins.html#Global-Mixin): **<https://v2.vuejs.org/v2/guide/mixins.html#Global-Mixin>** This should allow you to create a head mixin that will be auto-imported into every component, so you could define that `og:url` once and have...
this is my way **in nuxt.config.js:** ``` head: { title: 'default title', meta: [ { charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, { hid: 'description', name: 'description', content: 'default description' } ], link: [ { rel: 'icon', type: 'image/x-icon'...
815
So far I have seen some Perl modules; [Finance:MtGox](http://search.cpan.org/~mndrix/Finance-MtGox-0.01/lib/Finance/MtGox.pm) and [Webservice:MtGox](http://search.cpan.org/~beppu/WebService-MtGox-0.05/lib/WebService/MtGox.pm) for interacting with Mt.Gox, a [Ruby gem for Mt.Gox](http://rubygems.org/gems/mtgox) and a [Py...
2011/09/09
[ "https://bitcoin.stackexchange.com/questions/815", "https://bitcoin.stackexchange.com", "https://bitcoin.stackexchange.com/users/136/" ]
**There is now the [XChange](https://github.com/timmolter/XChange) library** This is a pure Java library that has been released under the MIT license. It currently supports Mt Gox, but there are simple hooks to allow other exchanges such as [Intersango](http://intersango.com) and [CryptoXChange](http://cryptoxchange.c...
I don't know of a currently existing Java API for Mt Gox - most folks will probably roll their own until Mt Gox issues their own demonstration client in Java. However, in the interests of helping you make some progress in this area here is a short tutorial that may be of some use. **How to build a Java API for Mt Go...
815
So far I have seen some Perl modules; [Finance:MtGox](http://search.cpan.org/~mndrix/Finance-MtGox-0.01/lib/Finance/MtGox.pm) and [Webservice:MtGox](http://search.cpan.org/~beppu/WebService-MtGox-0.05/lib/WebService/MtGox.pm) for interacting with Mt.Gox, a [Ruby gem for Mt.Gox](http://rubygems.org/gems/mtgox) and a [Py...
2011/09/09
[ "https://bitcoin.stackexchange.com/questions/815", "https://bitcoin.stackexchange.com", "https://bitcoin.stackexchange.com/users/136/" ]
**There is now the [XChange](https://github.com/timmolter/XChange) library** This is a pure Java library that has been released under the MIT license. It currently supports Mt Gox, but there are simple hooks to allow other exchanges such as [Intersango](http://intersango.com) and [CryptoXChange](http://cryptoxchange.c...
I have rolled my own mtgox api implementation in java. it is based on [google-Gson](http://code.google.com/p/google-gson/) and raw URL requests. i plan on releasing it eventually but the code is not yet on release quality level. if you have any specific questions, just ask in comments
48,511,579
there is a way to check wordpress cookie **wordpress\_logged\_in** using jquery? I'm using cloudflare full caching, so there is no way to check if user is logged or not than this cookie, I tried to read it using jquery but seems protected and not visible, I can access it only using PHP. Here is how I can read it righ...
2018/01/29
[ "https://Stackoverflow.com/questions/48511579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3308323/" ]
You can't access to wordpress cookies named `wordpress_logged_in` using `js/jquery` just because it's flagged as [`HttpOnly`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#Secure_and_HttpOnly_cookies): > > A secure cookie is only sent to the server with a encrypted request > over the HTTPS protocol... To...
You can create ajax request to check if user logged in: in functions.php: ``` function ajax_check_user_logged_in() { echo is_user_logged_in()?'yes':'no'; die(); } add_action('wp_ajax_is_user_logged_in', 'ajax_check_user_logged_in'); add_action('wp_ajax_nopriv_is_user_logged_in', 'ajax_check_user_logged_in'); ...
48,511,579
there is a way to check wordpress cookie **wordpress\_logged\_in** using jquery? I'm using cloudflare full caching, so there is no way to check if user is logged or not than this cookie, I tried to read it using jquery but seems protected and not visible, I can access it only using PHP. Here is how I can read it righ...
2018/01/29
[ "https://Stackoverflow.com/questions/48511579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3308323/" ]
You can create ajax request to check if user logged in: in functions.php: ``` function ajax_check_user_logged_in() { echo is_user_logged_in()?'yes':'no'; die(); } add_action('wp_ajax_is_user_logged_in', 'ajax_check_user_logged_in'); add_action('wp_ajax_nopriv_is_user_logged_in', 'ajax_check_user_logged_in'); ...
If you have access to your .HTACCESS File add this code. It checks if Wordpress default logged in cookie is present & if so it sets cookie "hello". If it detects "wordpress\_logged\_in" cookie is not present it removes/expires "hello" cookie. ``` <If "%{HTTP_COOKIE} =~ /wordpress_logged_in/"> Header add Set-...
48,511,579
there is a way to check wordpress cookie **wordpress\_logged\_in** using jquery? I'm using cloudflare full caching, so there is no way to check if user is logged or not than this cookie, I tried to read it using jquery but seems protected and not visible, I can access it only using PHP. Here is how I can read it righ...
2018/01/29
[ "https://Stackoverflow.com/questions/48511579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3308323/" ]
You can create ajax request to check if user logged in: in functions.php: ``` function ajax_check_user_logged_in() { echo is_user_logged_in()?'yes':'no'; die(); } add_action('wp_ajax_is_user_logged_in', 'ajax_check_user_logged_in'); add_action('wp_ajax_nopriv_is_user_logged_in', 'ajax_check_user_logged_in'); ...
Similar topic [here](https://wordpress.stackexchange.com/questions/69814/check-if-user-is-logged-in-using-jquery) This solution will work for you. Or you can add action on [login action](https://codex.wordpress.org/Plugin_API/Action_Reference/wp_login) and create js var for your file using `wp_localize_script()`.
48,511,579
there is a way to check wordpress cookie **wordpress\_logged\_in** using jquery? I'm using cloudflare full caching, so there is no way to check if user is logged or not than this cookie, I tried to read it using jquery but seems protected and not visible, I can access it only using PHP. Here is how I can read it righ...
2018/01/29
[ "https://Stackoverflow.com/questions/48511579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3308323/" ]
Similar topic [here](https://wordpress.stackexchange.com/questions/69814/check-if-user-is-logged-in-using-jquery) This solution will work for you. Or you can add action on [login action](https://codex.wordpress.org/Plugin_API/Action_Reference/wp_login) and create js var for your file using `wp_localize_script()`.
As mentioned in another answer, `wp_localize_script()` is a useful function. I use this, specifically: ``` wp_localize_script( 'site-js', 'siteVars', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'isMobile' => (wp_is_mobile() ? true : false), 'isHome' => (is_home() || is_front_...
48,511,579
there is a way to check wordpress cookie **wordpress\_logged\_in** using jquery? I'm using cloudflare full caching, so there is no way to check if user is logged or not than this cookie, I tried to read it using jquery but seems protected and not visible, I can access it only using PHP. Here is how I can read it righ...
2018/01/29
[ "https://Stackoverflow.com/questions/48511579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3308323/" ]
If you only want to know if a user is logged in you can check if the body element has class 'logged-in' i.e. ``` jQuery( 'body' ).hasClass( 'logged-in' ) ``` WordPress adds this class to the body element if a user is logged in.
Similar topic [here](https://wordpress.stackexchange.com/questions/69814/check-if-user-is-logged-in-using-jquery) This solution will work for you. Or you can add action on [login action](https://codex.wordpress.org/Plugin_API/Action_Reference/wp_login) and create js var for your file using `wp_localize_script()`.
48,511,579
there is a way to check wordpress cookie **wordpress\_logged\_in** using jquery? I'm using cloudflare full caching, so there is no way to check if user is logged or not than this cookie, I tried to read it using jquery but seems protected and not visible, I can access it only using PHP. Here is how I can read it righ...
2018/01/29
[ "https://Stackoverflow.com/questions/48511579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3308323/" ]
You can't access to wordpress cookies named `wordpress_logged_in` using `js/jquery` just because it's flagged as [`HttpOnly`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#Secure_and_HttpOnly_cookies): > > A secure cookie is only sent to the server with a encrypted request > over the HTTPS protocol... To...
Similar topic [here](https://wordpress.stackexchange.com/questions/69814/check-if-user-is-logged-in-using-jquery) This solution will work for you. Or you can add action on [login action](https://codex.wordpress.org/Plugin_API/Action_Reference/wp_login) and create js var for your file using `wp_localize_script()`.
48,511,579
there is a way to check wordpress cookie **wordpress\_logged\_in** using jquery? I'm using cloudflare full caching, so there is no way to check if user is logged or not than this cookie, I tried to read it using jquery but seems protected and not visible, I can access it only using PHP. Here is how I can read it righ...
2018/01/29
[ "https://Stackoverflow.com/questions/48511579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3308323/" ]
If you only want to know if a user is logged in you can check if the body element has class 'logged-in' i.e. ``` jQuery( 'body' ).hasClass( 'logged-in' ) ``` WordPress adds this class to the body element if a user is logged in.
As mentioned in another answer, `wp_localize_script()` is a useful function. I use this, specifically: ``` wp_localize_script( 'site-js', 'siteVars', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'isMobile' => (wp_is_mobile() ? true : false), 'isHome' => (is_home() || is_front_...
48,511,579
there is a way to check wordpress cookie **wordpress\_logged\_in** using jquery? I'm using cloudflare full caching, so there is no way to check if user is logged or not than this cookie, I tried to read it using jquery but seems protected and not visible, I can access it only using PHP. Here is how I can read it righ...
2018/01/29
[ "https://Stackoverflow.com/questions/48511579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3308323/" ]
You can't access to wordpress cookies named `wordpress_logged_in` using `js/jquery` just because it's flagged as [`HttpOnly`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#Secure_and_HttpOnly_cookies): > > A secure cookie is only sent to the server with a encrypted request > over the HTTPS protocol... To...
If you only want to know if a user is logged in you can check if the body element has class 'logged-in' i.e. ``` jQuery( 'body' ).hasClass( 'logged-in' ) ``` WordPress adds this class to the body element if a user is logged in.
48,511,579
there is a way to check wordpress cookie **wordpress\_logged\_in** using jquery? I'm using cloudflare full caching, so there is no way to check if user is logged or not than this cookie, I tried to read it using jquery but seems protected and not visible, I can access it only using PHP. Here is how I can read it righ...
2018/01/29
[ "https://Stackoverflow.com/questions/48511579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3308323/" ]
You can't access to wordpress cookies named `wordpress_logged_in` using `js/jquery` just because it's flagged as [`HttpOnly`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#Secure_and_HttpOnly_cookies): > > A secure cookie is only sent to the server with a encrypted request > over the HTTPS protocol... To...
As mentioned in another answer, `wp_localize_script()` is a useful function. I use this, specifically: ``` wp_localize_script( 'site-js', 'siteVars', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'isMobile' => (wp_is_mobile() ? true : false), 'isHome' => (is_home() || is_front_...
48,511,579
there is a way to check wordpress cookie **wordpress\_logged\_in** using jquery? I'm using cloudflare full caching, so there is no way to check if user is logged or not than this cookie, I tried to read it using jquery but seems protected and not visible, I can access it only using PHP. Here is how I can read it righ...
2018/01/29
[ "https://Stackoverflow.com/questions/48511579", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3308323/" ]
Similar topic [here](https://wordpress.stackexchange.com/questions/69814/check-if-user-is-logged-in-using-jquery) This solution will work for you. Or you can add action on [login action](https://codex.wordpress.org/Plugin_API/Action_Reference/wp_login) and create js var for your file using `wp_localize_script()`.
If you have access to your .HTACCESS File add this code. It checks if Wordpress default logged in cookie is present & if so it sets cookie "hello". If it detects "wordpress\_logged\_in" cookie is not present it removes/expires "hello" cookie. ``` <If "%{HTTP_COOKIE} =~ /wordpress_logged_in/"> Header add Set-...
54,084
Are there any guidelines as to when it's useful to have a touchscreen interface? My first experience was with my smartphone and I thought the touchscreen was great and a huge improvement on usability. I then bought a tablet and I find the touchscreen isn't as useful. This is because tablets have larger screen and it fe...
2014/03/15
[ "https://ux.stackexchange.com/questions/54084", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/25338/" ]
I don't know of any studies, but I do know that I was surprised to discover that I do use the touch screen on my windows 8 ultrabook a lot, frequently in desktop mode. I especially like to scroll by swiping my finger on the touch screen rather than by using two fingers on the track pad. Also it is often faster to just ...
I am not aware of any studies trying to argue touchscreens aren't useful and in any case it's either an addition or the only option. On laptops you can still use your mouse, and on tablets using a trackball or anything similar works terribly and mouses/keyboards are impossible. > > Also what is the point of multi tou...
54,084
Are there any guidelines as to when it's useful to have a touchscreen interface? My first experience was with my smartphone and I thought the touchscreen was great and a huge improvement on usability. I then bought a tablet and I find the touchscreen isn't as useful. This is because tablets have larger screen and it fe...
2014/03/15
[ "https://ux.stackexchange.com/questions/54084", "https://ux.stackexchange.com", "https://ux.stackexchange.com/users/25338/" ]
I don't know of any studies, but I do know that I was surprised to discover that I do use the touch screen on my windows 8 ultrabook a lot, frequently in desktop mode. I especially like to scroll by swiping my finger on the touch screen rather than by using two fingers on the track pad. Also it is often faster to just ...
One good use of a touchscreen is in public 'kiosks' ( such as interactive displays in museums ) As they can be built into a display they can be made more robust than other forms of interaction.
63,527
I just wanted to make sure I am approaching this correctly: I am working on a nonfiction historical biography about a missionary. When quoting sources which use archaic spellings of places/words, do I need to note the non-normative spelling at all? I assume that [sic] would be inappropriate in this case but am not sure...
2022/10/16
[ "https://writers.stackexchange.com/questions/63527", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/56739/" ]
What you do is write: > > We are continually being asked why we do not leave Hongkong[sic]... To say the least the Seed must be sown and the Lord will look after the developement [sic]." > > > "[sic]" literally means "Yes, this is not a typo but the original wording."
It's legible, comprehensible, no actual need to edit. I think it'll be best if you leave the quotes intact. I don't think you strictly need to note that you didn't make any edits, but if you're worried about it looking like your mistake, I'd suggest including a short note stating that you left the spelling of all quot...
51,394,080
I am facing weird Python Date Time Comparison issue. I am getting two date times in string format (From REST Call, JSON) start date time and end date time. I have to compare current date time and if it falls within this rage (start date time and end date time) take some action. It is known that the time zone of these d...
2018/07/18
[ "https://Stackoverflow.com/questions/51394080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4523970/" ]
You might need to add "myproject/other" to the system path like following: ``` import sys sys.path.append('yourpathstring') from model import BasicCNN ```
You need to add \_\_init\_\_.py file to every directory you want to import modules from. Good luck!
51,394,080
I am facing weird Python Date Time Comparison issue. I am getting two date times in string format (From REST Call, JSON) start date time and end date time. I have to compare current date time and if it falls within this rage (start date time and end date time) take some action. It is known that the time zone of these d...
2018/07/18
[ "https://Stackoverflow.com/questions/51394080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4523970/" ]
You might need to add "myproject/other" to the system path like following: ``` import sys sys.path.append('yourpathstring') from model import BasicCNN ```
Should have mentioned im using PyCharm. This also fixes issue : From PyCharm : "File" -> "Settings" -> "Project Structure" -> add myproject/other as a source folder.
3,972,686
``` class Foo @@default = "default" p instance_variables p class_variables class << self p instance_variables p class_variables # How do I access the @@default variable here? end end ```
2010/10/19
[ "https://Stackoverflow.com/questions/3972686", "https://Stackoverflow.com", "https://Stackoverflow.com/users/139089/" ]
The same way you do it in any other place: `@@default`. I'm not sure what `p ..` is supposed to do (Ruby isn't my native language), but this works ``` class Foo @@default = "default" class << self puts "#{@@default}" end end ```
This question is kind of interesting because it essentially asks "is there any way for the metaclass to reference its "real" class? And as far as I can tell, the answer is "no", because all of the "upward" ancestor pointers Ruby keeps also point to metaclasses, and so running `class_variables()` in one of them will te...
36,238,472
In my Login form, I try entering the values I inserted into the MySQL tables I connected with PHP, but no matter what values I enter into the input fields, I always get the error I set up when the Username and Password are incorrect: ``` die("The username or password is incorrect. Click <a href='http://growtapians.com...
2016/03/26
[ "https://Stackoverflow.com/questions/36238472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6116070/" ]
The problem here is different File Systems. `C:/Users/Cam/Desktop/mtd.jar` is a `File` in the `WindowsFileSystem`. Since it is a file, and not a directory, you cannot access a subdirectory inside the file; `C:/Users/Cam/Desktop/mtd.jar/resources` is only a valid `Path` if `mtd.jar` is actually a **directory** instead o...
I FINALLY FOUND THE ANSWER I don't want to type out a big, long explanation but for anyone looking for the solution, here it is ``` ` //on startup installDir(""); for (int i = 0; i < toInstall.size(); i++) { File f = toInstall.get(i); ...
36,238,472
In my Login form, I try entering the values I inserted into the MySQL tables I connected with PHP, but no matter what values I enter into the input fields, I always get the error I set up when the Username and Password are incorrect: ``` die("The username or password is incorrect. Click <a href='http://growtapians.com...
2016/03/26
[ "https://Stackoverflow.com/questions/36238472", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6116070/" ]
This was harder that I thought, but here is how to do it. here is my copy method Reference <https://examples.javacodegeeks.com/core-java/io/file/4-ways-to-copy-file-in-java/> ``` public void copyFile(String inputPath, String outputPath ) throws IOException { InputStream inputStream = null; OutputStream outp...
I FINALLY FOUND THE ANSWER I don't want to type out a big, long explanation but for anyone looking for the solution, here it is ``` ` //on startup installDir(""); for (int i = 0; i < toInstall.size(); i++) { File f = toInstall.get(i); ...
47,790,924
Hello in my tableView i added a refresh button to my custom tableViewCell [![enter image description here](https://i.stack.imgur.com/H1Fo0.png)](https://i.stack.imgur.com/H1Fo0.png) because i want to reload the single cell after the button tap, to do it (looking around the net) i created this func ``` @IBAction f...
2017/12/13
[ "https://Stackoverflow.com/questions/47790924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9090843/" ]
Look at disassemble (compiled with GCC -O3): It takes more instruction to implement tuple call. ``` 0000000000000000 <returnValues(int, int)>: 0: 83 c2 64 add $0x64,%edx 3: 83 c6 64 add $0x64,%esi 6: 48 89 f8 mov %rdi,%rax 9: 89 17 ...
Focus on what's more readable and which approach provides a better intuition to the reader, and please keep the performance issues you might think that arise in the background. A function that returns a tuple (or a pair, a struct, etc.) is yelling to the author that the function returns something, that almost always h...
47,790,924
Hello in my tableView i added a refresh button to my custom tableViewCell [![enter image description here](https://i.stack.imgur.com/H1Fo0.png)](https://i.stack.imgur.com/H1Fo0.png) because i want to reload the single cell after the button tap, to do it (looking around the net) i created this func ``` @IBAction f...
2017/12/13
[ "https://Stackoverflow.com/questions/47790924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9090843/" ]
Look at disassemble (compiled with GCC -O3): It takes more instruction to implement tuple call. ``` 0000000000000000 <returnValues(int, int)>: 0: 83 c2 64 add $0x64,%edx 3: 83 c6 64 add $0x64,%esi 6: 48 89 f8 mov %rdi,%rax 9: 89 17 ...
Using another compiler (VS 2017) the resulting code shows no difference, as the function calls are just optimized away. ``` int main() { 00007FF6A9C51E50 sub rsp,28h auto [x,y] = returnValues(10,20); std::cout << x ; 00007FF6A9C51E54 mov edx,0Ah 00007FF6A9C51E59 call std::basic_o...
47,790,924
Hello in my tableView i added a refresh button to my custom tableViewCell [![enter image description here](https://i.stack.imgur.com/H1Fo0.png)](https://i.stack.imgur.com/H1Fo0.png) because i want to reload the single cell after the button tap, to do it (looking around the net) i created this func ``` @IBAction f...
2017/12/13
[ "https://Stackoverflow.com/questions/47790924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9090843/" ]
Look at disassemble (compiled with GCC -O3): It takes more instruction to implement tuple call. ``` 0000000000000000 <returnValues(int, int)>: 0: 83 c2 64 add $0x64,%edx 3: 83 c6 64 add $0x64,%esi 6: 48 89 f8 mov %rdi,%rax 9: 89 17 ...
What Zang said is true but not up-to the point. I ran the code provided in question with `chrono` to measure time. I think the answer needs to be edited after observing what happened. For 1M iterations, time taken by function call via reference was 3ms while time taken by function call via `std::tie` combined with `st...
47,790,924
Hello in my tableView i added a refresh button to my custom tableViewCell [![enter image description here](https://i.stack.imgur.com/H1Fo0.png)](https://i.stack.imgur.com/H1Fo0.png) because i want to reload the single cell after the button tap, to do it (looking around the net) i created this func ``` @IBAction f...
2017/12/13
[ "https://Stackoverflow.com/questions/47790924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9090843/" ]
Focus on what's more readable and which approach provides a better intuition to the reader, and please keep the performance issues you might think that arise in the background. A function that returns a tuple (or a pair, a struct, etc.) is yelling to the author that the function returns something, that almost always h...
What Zang said is true but not up-to the point. I ran the code provided in question with `chrono` to measure time. I think the answer needs to be edited after observing what happened. For 1M iterations, time taken by function call via reference was 3ms while time taken by function call via `std::tie` combined with `st...
47,790,924
Hello in my tableView i added a refresh button to my custom tableViewCell [![enter image description here](https://i.stack.imgur.com/H1Fo0.png)](https://i.stack.imgur.com/H1Fo0.png) because i want to reload the single cell after the button tap, to do it (looking around the net) i created this func ``` @IBAction f...
2017/12/13
[ "https://Stackoverflow.com/questions/47790924", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9090843/" ]
Using another compiler (VS 2017) the resulting code shows no difference, as the function calls are just optimized away. ``` int main() { 00007FF6A9C51E50 sub rsp,28h auto [x,y] = returnValues(10,20); std::cout << x ; 00007FF6A9C51E54 mov edx,0Ah 00007FF6A9C51E59 call std::basic_o...
What Zang said is true but not up-to the point. I ran the code provided in question with `chrono` to measure time. I think the answer needs to be edited after observing what happened. For 1M iterations, time taken by function call via reference was 3ms while time taken by function call via `std::tie` combined with `st...
1,020,570
My bos insists that I configure our mail so that when a message is received sender will get a auto-reply message confirming that his message was indeed received by our company. So is it possible to mark such auto-reply message somehow in order to prevent sender's auto-reply mechanism from sending auto-replay to my aut...
2020/06/08
[ "https://serverfault.com/questions/1020570", "https://serverfault.com", "https://serverfault.com/users/578367/" ]
No. You need an adapter for the printer to have a network port ready. Where the serial female connector is remark there is a screw, it's usually on those model to remove a controller card. Check [there](https://www.youtube.com/watch?v=jCnk7wOu51I) for how to install the adapter. It seem a older device, just worth...
i setup tills so can confirm that this isnt possible, basicaly the RJ11 you are referring to is not to communicate to printer, this is for Till to be connected to Printer so EPOS can sent a message via printer to Till to open. RJ11 is only used to send a signal to till unit so it open and only pulses, not to receive a...
6,991,157
I am developing a windows form application. At one of my form i place a picture box control. Its working fine for majority of time. But sometime it displays red cross rather than displaying actual picture. I further explore this and came to know that this control handle exceptions internally. So i go to `Debug->Excep...
2011/08/09
[ "https://Stackoverflow.com/questions/6991157", "https://Stackoverflow.com", "https://Stackoverflow.com/users/586528/" ]
As pair to you comment that you are using multiple images in the `PictureBox`, You should "like @Jason suggested" *dispose* the old image before applying the new one, like: ``` private void ChangePictureBoxImage(Image image) { pictureBox.Image.Dispose();//dispose the old image. pictureBox.Image = image; } ``...
How much RAM does your target machine have? You got this exception because the call to allocate more memory for the image failed. If you are unable to increase the amount of memory on your computer, try reducing the image's size or close any other programs you have running.
10,981
I have installed libreoffice as a snap. In Ubuntu it uses th default gtk theme but in Elementary OS it doesn't. Is it possible to enable this or do i need to wait for the Elementary team to implement it. This is how it looks right now: [![Screnshot Libreoffice](https://i.stack.imgur.com/JxUx6.png)](https://i.stack....
2017/03/03
[ "https://elementaryos.stackexchange.com/questions/10981", "https://elementaryos.stackexchange.com", "https://elementaryos.stackexchange.com/users/8825/" ]
Snaps are what is called a "sandboxed" or "confined" package format. This means the amount of access that these apps have to your system is very limited. One of those limitations is that Snaps don't have access to the system stylesheet shipped with elementary OS. LibreOffice is able to use the Ubuntu stylesheet on Ubu...
use flatpak and run the bellow command, it will allow flatpak apps to use your theme, no idea why canonical doesn't expose the theme and icon folders already, snaps are doa just because of the theming, then again they are also perform much slower than any other option out there ``` flatpak override --filesystem=~/.the...
10,981
I have installed libreoffice as a snap. In Ubuntu it uses th default gtk theme but in Elementary OS it doesn't. Is it possible to enable this or do i need to wait for the Elementary team to implement it. This is how it looks right now: [![Screnshot Libreoffice](https://i.stack.imgur.com/JxUx6.png)](https://i.stack....
2017/03/03
[ "https://elementaryos.stackexchange.com/questions/10981", "https://elementaryos.stackexchange.com", "https://elementaryos.stackexchange.com/users/8825/" ]
Snaps don't always work with the system stylesheet. An easy alternative is to use Flatpak apps from Flathub when apps exist in both places, because Flatpak has a mechanism to work with the elementary stylesheet. To install an app from Flathub: 1. Visit the app's page on [Flathub](https://flathub.org/apps) 2. Click th...
use flatpak and run the bellow command, it will allow flatpak apps to use your theme, no idea why canonical doesn't expose the theme and icon folders already, snaps are doa just because of the theming, then again they are also perform much slower than any other option out there ``` flatpak override --filesystem=~/.the...
4,178,702
Preface: When I say "machine" below, I mean either a physical dedicated server, or a virtual private server. When I say "node" I mean, an instance of the erlang virtual machine, of which there could be multiple running as separate processes under a single unix kernel. I've got a project that involves multiple erlang/O...
2010/11/14
[ "https://Stackoverflow.com/questions/4178702", "https://Stackoverflow.com", "https://Stackoverflow.com/users/448866/" ]
The answer is: it depends. Advantages of using a single node: * Memory is controlled by a single Erlang VM. It is way easier. * Inter-application communication (if using erlang-messaging) is faster. * Less operating system context switches happens Advantages of using multiple nodes: * If the system is linking in C ...
Agree with @I GIVE CRAP ANSWERS I would go with one VM. Here is why: * dynamic handling of run time queues belonging to schedulers (with varied origin of CPU load its important) * fewer VMs to monitor * better understanding of memory allocation and easier to spot malicious process (can compare all of them at once) * ...
4,178,702
Preface: When I say "machine" below, I mean either a physical dedicated server, or a virtual private server. When I say "node" I mean, an instance of the erlang virtual machine, of which there could be multiple running as separate processes under a single unix kernel. I've got a project that involves multiple erlang/O...
2010/11/14
[ "https://Stackoverflow.com/questions/4178702", "https://Stackoverflow.com", "https://Stackoverflow.com/users/448866/" ]
The answer is: it depends. Advantages of using a single node: * Memory is controlled by a single Erlang VM. It is way easier. * Inter-application communication (if using erlang-messaging) is faster. * Less operating system context switches happens Advantages of using multiple nodes: * If the system is linking in C ...
We've always used one VM per application because it's easier to manage. The scheduler and SMP support in Erlang have come a long way in the past few years, so there isn't as much reason as there used to be to run multiple VMs on the same node.
4,178,702
Preface: When I say "machine" below, I mean either a physical dedicated server, or a virtual private server. When I say "node" I mean, an instance of the erlang virtual machine, of which there could be multiple running as separate processes under a single unix kernel. I've got a project that involves multiple erlang/O...
2010/11/14
[ "https://Stackoverflow.com/questions/4178702", "https://Stackoverflow.com", "https://Stackoverflow.com/users/448866/" ]
The answer is: it depends. Advantages of using a single node: * Memory is controlled by a single Erlang VM. It is way easier. * Inter-application communication (if using erlang-messaging) is faster. * Less operating system context switches happens Advantages of using multiple nodes: * If the system is linking in C ...
I Agree with previous answers but there is a case scenario where having multiple nodes per cpu is the answer: When a heavy task hits the node. A task may take multiple minutes to complete and in such case a gen server will hold the node until completion of the task.
4,178,702
Preface: When I say "machine" below, I mean either a physical dedicated server, or a virtual private server. When I say "node" I mean, an instance of the erlang virtual machine, of which there could be multiple running as separate processes under a single unix kernel. I've got a project that involves multiple erlang/O...
2010/11/14
[ "https://Stackoverflow.com/questions/4178702", "https://Stackoverflow.com", "https://Stackoverflow.com/users/448866/" ]
Agree with @I GIVE CRAP ANSWERS I would go with one VM. Here is why: * dynamic handling of run time queues belonging to schedulers (with varied origin of CPU load its important) * fewer VMs to monitor * better understanding of memory allocation and easier to spot malicious process (can compare all of them at once) * ...
I Agree with previous answers but there is a case scenario where having multiple nodes per cpu is the answer: When a heavy task hits the node. A task may take multiple minutes to complete and in such case a gen server will hold the node until completion of the task.
4,178,702
Preface: When I say "machine" below, I mean either a physical dedicated server, or a virtual private server. When I say "node" I mean, an instance of the erlang virtual machine, of which there could be multiple running as separate processes under a single unix kernel. I've got a project that involves multiple erlang/O...
2010/11/14
[ "https://Stackoverflow.com/questions/4178702", "https://Stackoverflow.com", "https://Stackoverflow.com/users/448866/" ]
We've always used one VM per application because it's easier to manage. The scheduler and SMP support in Erlang have come a long way in the past few years, so there isn't as much reason as there used to be to run multiple VMs on the same node.
I Agree with previous answers but there is a case scenario where having multiple nodes per cpu is the answer: When a heavy task hits the node. A task may take multiple minutes to complete and in such case a gen server will hold the node until completion of the task.
34,106,500
I'm making a website for dissemination with a logo, one spritezinho and a small text with a message. When you access it from the desktop, resolution, size, alignment, all OK! But when accessing the cell, everything went extremely small size. How to solve it? Website (If possible, access the cell to understand): <htt...
2015/12/05
[ "https://Stackoverflow.com/questions/34106500", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4731993/" ]
Try adding this meta tag to your head section: ``` <meta name="viewport" content="initial-scale=1.0"> ``` You can read about what it does and the options it provides here: <https://developer.mozilla.org/en/docs/Mozilla/Mobile/Viewport_meta_tag>
You're missing [the viewport meta tag](https://developer.mozilla.org/en/docs/Mozilla/Mobile/Viewport_meta_tag) in the `<head>`: ``` <head> ... <meta name="viewport" content="width=device-width, initial-scale=1"> </head> ```
207,345
In an audio circuit, such as a guitar's electronics (the only thing I ever dabble with!), I have always thought (probably simplistically) of every point along a continuous earth path being essentially all at the same voltage (a 'zero volt' reference voltage). However, I was wondering - if you extend an earth wire from...
2015/12/22
[ "https://electronics.stackexchange.com/questions/207345", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/95135/" ]
Yes, long ground connections can pick up noise, which means the ground in one place is a different voltage from the ground at another place. For single-ended signals, this ground offset voltage usually appears as part of the signal. There are two common strategies for avoiding this situation: - Use differential signa...
0V is only 0V at the point of reference - it gradually degrades as you move away from that physical position. It may be nano volts difference up close but can rapidly become milli volts and, if sensitive input circuits have 0V connections that are not at the same point, the several milli volt difference can be an AC no...
207,345
In an audio circuit, such as a guitar's electronics (the only thing I ever dabble with!), I have always thought (probably simplistically) of every point along a continuous earth path being essentially all at the same voltage (a 'zero volt' reference voltage). However, I was wondering - if you extend an earth wire from...
2015/12/22
[ "https://electronics.stackexchange.com/questions/207345", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/95135/" ]
Yes, long ground connections can pick up noise, which means the ground in one place is a different voltage from the ground at another place. For single-ended signals, this ground offset voltage usually appears as part of the signal. There are two common strategies for avoiding this situation: - Use differential signa...
The answer is YES if your application depends upon the the difference of voltage between the two ends of the wire to be close to zero. In other words if a functioning system is sensitive to signal levels at both ends of the wire at once then there can be reason to be aware that noise pickup can happen. On the other ha...
207,345
In an audio circuit, such as a guitar's electronics (the only thing I ever dabble with!), I have always thought (probably simplistically) of every point along a continuous earth path being essentially all at the same voltage (a 'zero volt' reference voltage). However, I was wondering - if you extend an earth wire from...
2015/12/22
[ "https://electronics.stackexchange.com/questions/207345", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/95135/" ]
0V is only 0V at the point of reference - it gradually degrades as you move away from that physical position. It may be nano volts difference up close but can rapidly become milli volts and, if sensitive input circuits have 0V connections that are not at the same point, the several milli volt difference can be an AC no...
The answer is YES if your application depends upon the the difference of voltage between the two ends of the wire to be close to zero. In other words if a functioning system is sensitive to signal levels at both ends of the wire at once then there can be reason to be aware that noise pickup can happen. On the other ha...
33,369,383
Configuration (hortonworks) * hive: BUILD hive-1.2.1.2.3.0.0 * Hadoop 2.7.1.2.3.0.0-2557 I'm trying to execute ``` lock table event_metadata EXCLUSIVE; ``` Hive response: > > Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Current transaction...
2015/10/27
[ "https://Stackoverflow.com/questions/33369383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1209159/" ]
You may set the concurrency parameter on the fly: ``` set hive.support.concurrency=true; ``` After this you may try executing your command
**`Hive`** includes a **`locking`** feature that uses **`Apache Zookeeper`** for **`locking`**. **`Zookeeper`** implements highly reliable distributed coordination. Other than some additional setup and configuration steps, **`Zookeeper`** is **invisible** to **`Hive`** users. In the **`$HIVE_HOME/hive-site.xml`** file...
33,369,383
Configuration (hortonworks) * hive: BUILD hive-1.2.1.2.3.0.0 * Hadoop 2.7.1.2.3.0.0-2557 I'm trying to execute ``` lock table event_metadata EXCLUSIVE; ``` Hive response: > > Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Current transaction...
2015/10/27
[ "https://Stackoverflow.com/questions/33369383", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1209159/" ]
You may set the concurrency parameter on the fly: ``` set hive.support.concurrency=true; ``` After this you may try executing your command
Try the following: set hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DummyTxnManager; unlock table *tablename*;
580,629
After reading for about 3 hours about the different problems and situations regarding very low and very high resistor values (source resistance / feedback resistance) with op-amps theoretically I understood all the mentioned facts. But converting this knowledge into practically constructing a real schematic is still a...
2021/08/07
[ "https://electronics.stackexchange.com/questions/580629", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/293017/" ]
The op-amp load in the case of the non-inverting amplifier is the sum of the two resistors. In general you want to stay well away from drawing the maximum load from the op-amp in most cases at low frequencies (and you've picked a 3MHz op-amp optimized for DC specifications so I assume a low frequency application- kHz)...
For Non-inverting gain 1+Rf/Rs=37.5 then Rf/Rs=36.5 and the current values are safe, but the R values may be scaled up by orders of magnitude until input currents create an input voltage offset then the Vin+ ought to have a series R= Rs//Rf to Vin+. The other factor is for RRIO, the output impedance is low for unity g...
451,446
I am trying to create a simple number pyramid like [this one](https://www.gut-erklaert.de/images/mathematik/zahlenpyramide-zahlenturm-zahlenmauer-1.jpg) using a tabularx table with six columns and `\multicolumn' commands. I tried ``` \begin{tabularx}{0.5\linewidth}{XXXXXX} \cline{3-4} \multicolumn{2}{...
2018/09/18
[ "https://tex.stackexchange.com/questions/451446", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/35640/" ]
drawing this number pyramid is much simpler than write it as table. especially if you like to use `tabularx` table environment. by use of the `tikz` package you can obtain: [![enter image description here](https://i.stack.imgur.com/i3UPb.png)](https://i.stack.imgur.com/i3UPb.png) ``` \documentclass[tikz, border=3mm]{...
This is really just for fun. Draw the pyramid via a recursion defined using `tikzmath`. If you want to increase `\nmax` even further, you need to make the list `\LstNum` longer. Of course, you can put in this list whatever numbers you like. ``` \documentclass[tikz,border=3.14mm]{standalone} \usetikzlibrary{math} \begi...
451,446
I am trying to create a simple number pyramid like [this one](https://www.gut-erklaert.de/images/mathematik/zahlenpyramide-zahlenturm-zahlenmauer-1.jpg) using a tabularx table with six columns and `\multicolumn' commands. I tried ``` \begin{tabularx}{0.5\linewidth}{XXXXXX} \cline{3-4} \multicolumn{2}{...
2018/09/18
[ "https://tex.stackexchange.com/questions/451446", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/35640/" ]
With some low level programming: ``` \documentclass{article} \usepackage{amsmath} \usepackage{varwidth} \newcommand{\block}[1]{% \begingroup \setlength{\fboxsep}{0pt}% \vrule width0pt height \blockdim \ooalign{% \framebox[\blockdim]{\rule{0pt}{\blockdim}}\cr \hidewidth\raisebox{0.5\dimexpr\blockdim-\h...
This is really just for fun. Draw the pyramid via a recursion defined using `tikzmath`. If you want to increase `\nmax` even further, you need to make the list `\LstNum` longer. Of course, you can put in this list whatever numbers you like. ``` \documentclass[tikz,border=3.14mm]{standalone} \usetikzlibrary{math} \begi...
24,987,910
In the code below it does not seem to be appending a new line of "item" to the three that I already have and I cannot seem to work out why: [Demo](http://jsfiddle.net/SDRum/1/) **HTML:** ``` <div class ="formBlock menuDetails"> <p><span class="bookingName">Menu<span class="required">*</span></span><sp...
2014/07/28
[ "https://Stackoverflow.com/questions/24987910", "https://Stackoverflow.com", "https://Stackoverflow.com/users/583916/" ]
Try simple\_form <https://github.com/plataformatec/simple_form/blob/master/README.md> What you're looking for is :collection and then :as
**Code Block** The refactoring you seek is basically that you need to use the `f.` with all your inputs Reason being that if you call [`form_for`](http://apidock.com/rails/ActionView/Helpers/FormHelper/form_for), it essentially means you're calling a huge code block, in which every `attribute` needs to be bound to yo...
5,907
Charo: "Elberich, sai che domani c'è pioggia?" Elberich: "Chissà, comunque Josh dice *di* sì." È corretto—o, per ragioni idiomatiche, magari necessario—quel *di* fra 'dice' e 'sì' o potrebbe essere omesso? E se lo si omette, ammesso non sia necessario, c'è qualche variazione di significato o enfasi?
2015/09/01
[ "https://italian.stackexchange.com/questions/5907", "https://italian.stackexchange.com", "https://italian.stackexchange.com/users/725/" ]
***[Dire di sì](http://www.treccani.it/vocabolario/dire/)*** è un'espressione idiomatica che significa: > > * acconsentire, dare risposta affermativa. (Treccani.it) > > > * Dicendo di sì Josh dice di essere anche lui del parere che domani piove. Omettendo la preposizione "di", l'espressione assume un significato...
Credo che abbiano significati diversi , si dice :"Josh dice "sì"" quando Josh chiaramente dice la parola "sì" , però si dice "Josh dice di sì" quando Josh dice quello che si riferisce all'approvazione.
26,886,453
I have my Django app pushed to heroku successfully, however when I try to open a shell such as `heroku run python manage.py shell` I get `django-no-module-named-django-core-management` error. My app also does not render properly when I visit the URL. I've checked all the settings and can't figure out I'm getting this e...
2014/11/12
[ "https://Stackoverflow.com/questions/26886453", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2587797/" ]
you need to activate your virtualenv ``` . bin/activate ``` only then your code has access to all modules inside virtualenv
I think you could check your requirements.txt file `psycopg2==2.5.3`
36,855,727
I have a Ruby 2.2.2 app that uses ActiveRecord as the ORM (similar to Rails). I have two tables, "users" and "accounts", where "accounts" have `belongs_to :user`. For a given user, I simply want to eager load the contents of the "accounts" table into a Ruby object (named `user_accounts`) so I can perform operations lik...
2016/04/26
[ "https://Stackoverflow.com/questions/36855727", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5076606/" ]
If you don't want the ORM to re-query the database, then I think you are better of using the `select` method added by the Enumerable mixin. Because if you try to use the `find_by_*` methods, I think it will always send another query. Here is an example of how it could be achieved. ``` # The accounts association will ...
I would store that accounts in a `hash` instead of an `array`, because lookups in a hash are much faster (in `O(1)`) than in an array which only allows `O(n)`. [`group_by`](http://ruby-doc.org/core-2.2.3/Enumerable.html#method-i-group_by) helps you building that hash. ``` # assuming that @user.accounts returns all a...
12,136,325
How much memory leak is negligible? In my program, I am using `Unity` and when I go through `Profile` > `Leaks` and work with the project it shows about total 16KB memory Leak caused by `Unity` and I cannot help that. EDIT: After a long play with the program it amounts to a 400KB leak. What should I do? Is this am...
2012/08/27
[ "https://Stackoverflow.com/questions/12136325", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1412565/" ]
It's not great, but it won't get your app rejected unless it causes a crash in front of a reviewer. The size is less important than how often it occurs. If it only occurs once every time the app is run, that's not a big deal. If it happens every time the user does something, then that's more of a problem. It's probabl...
First, look if you can use Unity in another way to circumvent the leak (if you have enough insight into the workings of this framework). Then, report the leakage to the Unity developers if not already done (by you or someone else). Third, if you absolutely rely on this framework, hope it get fixed ASAP, unless sw...
5,239,163
So when I create an account on my RoR app locally, and then push it to heroku with `heroku db:push` all is well. However, when I make my account an admin with `User.find(5).toggle!(:admin)` locally in the console and then push the db to heroku, I can no longer log into my account. I get an incorrect pw and email combo....
2011/03/08
[ "https://Stackoverflow.com/questions/5239163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/421109/" ]
I had this same problem with a tutorial. When you update that admin user with toggle, it also updates the password salt based on the logic of the tutorial. As a result, the password you setup correctly won't work. The solution is to check your password salting methods and change your salting logic or post it here. Y...
the database you use on your local computer is most likely the development.db, which depending on your configuration may or may not have been pushed to heroku. check out [this article](http://devcenter.heroku.com/articles/taps) for more info on how to specify which database you want to push to heroku.
5,471,515
I am having tough time in selecting value from drop down using C# binding of WebDriver. I have worked on neither C# nor WebDriver in past. I am using WebDriver - Selenium-dotnet2.0b3 with Visual Studio C# 2010 Express edition. I have added WebDriver.Common, WebDriver.Firefox and WebDriver.Remote to my solution. I tried...
2011/03/29
[ "https://Stackoverflow.com/questions/5471515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270835/" ]
1) Using a SelectElement as already commented - [How to select an option from drop down using Selenium WebDriver C#?](https://stackoverflow.com/questions/5278281/how-to-using-webdriver-selenium-for-selecting-an-option-in-c) The SelectElement belongs to the **OpenQA.Selenium.Support.UI** namespace. 2) You could also do...
Use the Following Class SelectElement defined in OpenQA.Selenium.Support.UI namespace the word `Select` is already used in C# that is why its implementation is changed and class is named differently. ``` // Summary: // Initializes a new instance of the SelectElement class. // // Parameters: element...
5,471,515
I am having tough time in selecting value from drop down using C# binding of WebDriver. I have worked on neither C# nor WebDriver in past. I am using WebDriver - Selenium-dotnet2.0b3 with Visual Studio C# 2010 Express edition. I have added WebDriver.Common, WebDriver.Firefox and WebDriver.Remote to my solution. I tried...
2011/03/29
[ "https://Stackoverflow.com/questions/5471515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270835/" ]
1) Using a SelectElement as already commented - [How to select an option from drop down using Selenium WebDriver C#?](https://stackoverflow.com/questions/5278281/how-to-using-webdriver-selenium-for-selecting-an-option-in-c) The SelectElement belongs to the **OpenQA.Selenium.Support.UI** namespace. 2) You could also do...
``` using System; using System.Collections.Generic; using OpenQA.Selenium; using OpenQA.Selenium.Firefox; using OpenQA.Selenium.Support.UI; namespace SeleniumTests { class DropDownListSelection { static void Main(string[] args) { IWebDriver driver = new FirefoxDriver(); driver.Navig...
5,471,515
I am having tough time in selecting value from drop down using C# binding of WebDriver. I have worked on neither C# nor WebDriver in past. I am using WebDriver - Selenium-dotnet2.0b3 with Visual Studio C# 2010 Express edition. I have added WebDriver.Common, WebDriver.Firefox and WebDriver.Remote to my solution. I tried...
2011/03/29
[ "https://Stackoverflow.com/questions/5471515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270835/" ]
1) Using a SelectElement as already commented - [How to select an option from drop down using Selenium WebDriver C#?](https://stackoverflow.com/questions/5278281/how-to-using-webdriver-selenium-for-selecting-an-option-in-c) The SelectElement belongs to the **OpenQA.Selenium.Support.UI** namespace. 2) You could also do...
To select an Option from Drop Down use the below code 1. To select a value based on Text ``` new SelectElement(driver.FindElement(By.XPath(""))).SelectByText(""); ``` 2. To select a value based on Value ``` new SelectElement(driver.FindElement(By.XPath(""))).SelectByValue(""); ``` 3. To select a value based on In...
5,471,515
I am having tough time in selecting value from drop down using C# binding of WebDriver. I have worked on neither C# nor WebDriver in past. I am using WebDriver - Selenium-dotnet2.0b3 with Visual Studio C# 2010 Express edition. I have added WebDriver.Common, WebDriver.Firefox and WebDriver.Remote to my solution. I tried...
2011/03/29
[ "https://Stackoverflow.com/questions/5471515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270835/" ]
Use the Following Class SelectElement defined in OpenQA.Selenium.Support.UI namespace the word `Select` is already used in C# that is why its implementation is changed and class is named differently. ``` // Summary: // Initializes a new instance of the SelectElement class. // // Parameters: element...
``` using System; using System.Collections.Generic; using OpenQA.Selenium; using OpenQA.Selenium.Firefox; using OpenQA.Selenium.Support.UI; namespace SeleniumTests { class DropDownListSelection { static void Main(string[] args) { IWebDriver driver = new FirefoxDriver(); driver.Navig...
5,471,515
I am having tough time in selecting value from drop down using C# binding of WebDriver. I have worked on neither C# nor WebDriver in past. I am using WebDriver - Selenium-dotnet2.0b3 with Visual Studio C# 2010 Express edition. I have added WebDriver.Common, WebDriver.Firefox and WebDriver.Remote to my solution. I tried...
2011/03/29
[ "https://Stackoverflow.com/questions/5471515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270835/" ]
To select an Option from Drop Down use the below code 1. To select a value based on Text ``` new SelectElement(driver.FindElement(By.XPath(""))).SelectByText(""); ``` 2. To select a value based on Value ``` new SelectElement(driver.FindElement(By.XPath(""))).SelectByValue(""); ``` 3. To select a value based on In...
Use the Following Class SelectElement defined in OpenQA.Selenium.Support.UI namespace the word `Select` is already used in C# that is why its implementation is changed and class is named differently. ``` // Summary: // Initializes a new instance of the SelectElement class. // // Parameters: element...
5,471,515
I am having tough time in selecting value from drop down using C# binding of WebDriver. I have worked on neither C# nor WebDriver in past. I am using WebDriver - Selenium-dotnet2.0b3 with Visual Studio C# 2010 Express edition. I have added WebDriver.Common, WebDriver.Firefox and WebDriver.Remote to my solution. I tried...
2011/03/29
[ "https://Stackoverflow.com/questions/5471515", "https://Stackoverflow.com", "https://Stackoverflow.com/users/270835/" ]
To select an Option from Drop Down use the below code 1. To select a value based on Text ``` new SelectElement(driver.FindElement(By.XPath(""))).SelectByText(""); ``` 2. To select a value based on Value ``` new SelectElement(driver.FindElement(By.XPath(""))).SelectByValue(""); ``` 3. To select a value based on In...
``` using System; using System.Collections.Generic; using OpenQA.Selenium; using OpenQA.Selenium.Firefox; using OpenQA.Selenium.Support.UI; namespace SeleniumTests { class DropDownListSelection { static void Main(string[] args) { IWebDriver driver = new FirefoxDriver(); driver.Navig...
42,915,831
I have listview which contains textview and a checkbox. I am showing the `ListView` in a `DialogFragment`. The problem is that the checkboxes do not show up for devices(emulator) running Android version 4.1 to 4.4.4. But they show up normally for Android 5.0+. I have been trying to fix this for hours. But no success....
2017/03/20
[ "https://Stackoverflow.com/questions/42915831", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7578795/" ]
Use the -O switch to not have an owner defined in the dump.
Not having an owner set is not normal Postgres design. To avoid having to login to your postgres database you can setup a .pgpass file. This is a plain text file and should be set with 600 permissions. The contents will look like: ``` hostname:port:database:username:password ``` Each connection can be on one line. ...
66,318,158
Java stream API offers a general `.reduce(identity, accumulator)` method. It is pretty clear from javadocs that accumulator should be a stateless function. However, I have a question about the `identity` object, namely should it be thread-safe? Lets say an `identity` is a java object and an `accumulator` modifies th...
2021/02/22
[ "https://Stackoverflow.com/questions/66318158", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7781169/" ]
Ordinarily, `accumulator` is an english word that means: "You are completely hosed if you want parallelism". It's right there in the word: To accumulate - to gather over time. There is no way to do it right except to start from the beginning, and apply accumulation until you are done. But, java gets around this by add...
This is covered by the documentation, but not directly, it is implied. > > The identity value must be an identity for the accumulator function. **This means that for all t, accumulator.apply(identity, t) is equal to t**. > > > As soon as `identity` is modified, like you say, even if in a thread-safe way, the rule...
18,048
I find myself using these words *all the time*. Now (<-- there's one!), to be clear the context I'm using them is in conversational style writing, on social commentary, or in forum posts like these. It's not formal academic writing, and it's not story telling. (In a fictional story, these words would be perfectly app...
2015/07/07
[ "https://writers.stackexchange.com/questions/18048", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/14366/" ]
I don't think soften is quite the right word for what these kinds of words do, nor is filler. I think of them as signal words. They indicate to the reader what direction the text is about to take. They are like the curve signs on the highway. The signs don't make the road curve. In this sense they don't add anything. B...
The answer to your question is yes, it can be an effective writing style; I myself do something similar when writing letters. It can come across as if you're in the room with the reader, talking to them. My personal experience is that they should be used sparingly, however. When every second or third sentence is a so,...
18,048
I find myself using these words *all the time*. Now (<-- there's one!), to be clear the context I'm using them is in conversational style writing, on social commentary, or in forum posts like these. It's not formal academic writing, and it's not story telling. (In a fictional story, these words would be perfectly app...
2015/07/07
[ "https://writers.stackexchange.com/questions/18048", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/14366/" ]
It really comes down to your discretion, and more will be said later in this answer about that. For now, let's take your example given. To get around using filler words such as **so**, just be more conscientious of it. If you don't want to use them, just cut them out in your editing process. The sentence makes perfec...
You could have arguments on either side about this idea. Some people will argue that using these words, as you say, will give the writing a more conversational style and make the audience feel more comfortable. I believe that this can be an appropriate style of writing for blogs, especially as they are known to be a mo...
18,048
I find myself using these words *all the time*. Now (<-- there's one!), to be clear the context I'm using them is in conversational style writing, on social commentary, or in forum posts like these. It's not formal academic writing, and it's not story telling. (In a fictional story, these words would be perfectly app...
2015/07/07
[ "https://writers.stackexchange.com/questions/18048", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/14366/" ]
Words like 'therefore', 'hence', can be used to replace "so". For replacing the adverb "anyways", there are many expressions and phrases that are able to be used in such a context such as: 'at any rate', 'in any case', 'at any manner', 'anyhow'. As for effectiveness, it is somewhat effective to use such words as 'so'...
You could have arguments on either side about this idea. Some people will argue that using these words, as you say, will give the writing a more conversational style and make the audience feel more comfortable. I believe that this can be an appropriate style of writing for blogs, especially as they are known to be a mo...
18,048
I find myself using these words *all the time*. Now (<-- there's one!), to be clear the context I'm using them is in conversational style writing, on social commentary, or in forum posts like these. It's not formal academic writing, and it's not story telling. (In a fictional story, these words would be perfectly app...
2015/07/07
[ "https://writers.stackexchange.com/questions/18048", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/14366/" ]
In your example, the word may soften up the sentence and paragraph, but it remains spoken English, and does give the impression you're not entirely sure of what you're saying. Consider the following: > > So on this point I'll just stress that (...) > > > vs. > > On this point I'll just stress that (..) > > > ...
Filler words can help you reach a higher word count, but if you want to be more concise, delete them. I find that filler words can help in rough drafts, but in final drafts, they sometimes detract from the power of the sentence. For example: > > This was founded. So people came. > > > is slightly less powerfu...
18,048
I find myself using these words *all the time*. Now (<-- there's one!), to be clear the context I'm using them is in conversational style writing, on social commentary, or in forum posts like these. It's not formal academic writing, and it's not story telling. (In a fictional story, these words would be perfectly app...
2015/07/07
[ "https://writers.stackexchange.com/questions/18048", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/14366/" ]
While I agree with the technical points that Nathaniel and Dale make, in that it does soften the tone of what is said, I don't think it is something that should immediately be avoided. To me that is akin to telling a carpenter to avoid using a chisel. I imagine a carpenter spends a good deal of time learning how to...
> > My question is - is this actually an effective writing style, in the sense of being easy to read and persuasive, and if not, how do I get around it? > > > Regarding ease of reading, it's a wash. These types of words can add a friendly tone but they also make the text less concise. Regarding persuasion, they r...
18,048
I find myself using these words *all the time*. Now (<-- there's one!), to be clear the context I'm using them is in conversational style writing, on social commentary, or in forum posts like these. It's not formal academic writing, and it's not story telling. (In a fictional story, these words would be perfectly app...
2015/07/07
[ "https://writers.stackexchange.com/questions/18048", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/14366/" ]
Dialog in writing is not the same as dialog in writing between two people. Usually the dialog is shorter. However, it is possible that to convey a specific character's attitude "filler" words like "so" can and should be used. I am sure that there are other reasons. However, I find myself using them much too often in d...
Filler words can help you reach a higher word count, but if you want to be more concise, delete them. I find that filler words can help in rough drafts, but in final drafts, they sometimes detract from the power of the sentence. For example: > > This was founded. So people came. > > > is slightly less powerfu...
18,048
I find myself using these words *all the time*. Now (<-- there's one!), to be clear the context I'm using them is in conversational style writing, on social commentary, or in forum posts like these. It's not formal academic writing, and it's not story telling. (In a fictional story, these words would be perfectly app...
2015/07/07
[ "https://writers.stackexchange.com/questions/18048", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/14366/" ]
While I agree with the technical points that Nathaniel and Dale make, in that it does soften the tone of what is said, I don't think it is something that should immediately be avoided. To me that is akin to telling a carpenter to avoid using a chisel. I imagine a carpenter spends a good deal of time learning how to...
Filler words can help you reach a higher word count, but if you want to be more concise, delete them. I find that filler words can help in rough drafts, but in final drafts, they sometimes detract from the power of the sentence. For example: > > This was founded. So people came. > > > is slightly less powerfu...
18,048
I find myself using these words *all the time*. Now (<-- there's one!), to be clear the context I'm using them is in conversational style writing, on social commentary, or in forum posts like these. It's not formal academic writing, and it's not story telling. (In a fictional story, these words would be perfectly app...
2015/07/07
[ "https://writers.stackexchange.com/questions/18048", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/14366/" ]
In general (and in your question and example) it makes the text feel friendlier and more conversational. In some contexts, a more conversational tone can make your ideas less persuasive. Whether it works depends on who is reading, and why they're reading. The word "just" in your example has the effect of discounting ...
While I agree with the technical points that Nathaniel and Dale make, in that it does soften the tone of what is said, I don't think it is something that should immediately be avoided. To me that is akin to telling a carpenter to avoid using a chisel. I imagine a carpenter spends a good deal of time learning how to...
18,048
I find myself using these words *all the time*. Now (<-- there's one!), to be clear the context I'm using them is in conversational style writing, on social commentary, or in forum posts like these. It's not formal academic writing, and it's not story telling. (In a fictional story, these words would be perfectly app...
2015/07/07
[ "https://writers.stackexchange.com/questions/18048", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/14366/" ]
> > My question is - is this actually an effective writing style, in the sense of being easy to read and persuasive, and if not, how do I get around it? > > > Regarding ease of reading, it's a wash. These types of words can add a friendly tone but they also make the text less concise. Regarding persuasion, they r...
Dialog in writing is not the same as dialog in writing between two people. Usually the dialog is shorter. However, it is possible that to convey a specific character's attitude "filler" words like "so" can and should be used. I am sure that there are other reasons. However, I find myself using them much too often in d...
18,048
I find myself using these words *all the time*. Now (<-- there's one!), to be clear the context I'm using them is in conversational style writing, on social commentary, or in forum posts like these. It's not formal academic writing, and it's not story telling. (In a fictional story, these words would be perfectly app...
2015/07/07
[ "https://writers.stackexchange.com/questions/18048", "https://writers.stackexchange.com", "https://writers.stackexchange.com/users/14366/" ]
In general (and in your question and example) it makes the text feel friendlier and more conversational. In some contexts, a more conversational tone can make your ideas less persuasive. Whether it works depends on who is reading, and why they're reading. The word "just" in your example has the effect of discounting ...
You could have arguments on either side about this idea. Some people will argue that using these words, as you say, will give the writing a more conversational style and make the audience feel more comfortable. I believe that this can be an appropriate style of writing for blogs, especially as they are known to be a mo...
165,650
I am new to communities in lightning and I am trying to figure out a way to directly fetch the URL parameters into the lightning component attributes using the {! urlParamName} expressions. for example : ``` https://www.someurl.com/page?name=somename&surname=somesurname ``` My lightning component will be : ``` ...
2017/03/23
[ "https://salesforce.stackexchange.com/questions/165650", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/43215/" ]
First thing first. You have written apex:attribute in your question which is not valid, you should use aura:attribute. Next, you have to declare the attributes in the app, not in the component in order to fetch them from the URL. ``` <aura:application > <aura:attribute name="name" type="String"/> <aura:attrib...
It is actually much easier to pass URL parameters to Lighning components in a community page. The "trick" is to expose your attributes at design time to the page, so they show up in the Lightning page designer as component properties. You do that in the design definition (the .design file): ``` <design:component label...
165,650
I am new to communities in lightning and I am trying to figure out a way to directly fetch the URL parameters into the lightning component attributes using the {! urlParamName} expressions. for example : ``` https://www.someurl.com/page?name=somename&surname=somesurname ``` My lightning component will be : ``` ...
2017/03/23
[ "https://salesforce.stackexchange.com/questions/165650", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/43215/" ]
First thing first. You have written apex:attribute in your question which is not valid, you should use aura:attribute. Next, you have to declare the attributes in the app, not in the component in order to fetch them from the URL. ``` <aura:application > <aura:attribute name="name" type="String"/> <aura:attrib...
Based on Damon Shaw's code, just add this helper method: ``` getUrlParameter : function(sParam) { var sPageURL = decodeURIComponent(window.location.search.substring(1)), sURLVariables = sPageURL.split('&'), sParameterName, i; for (i = 0; i < sURLVariables.length; i++) { sParame...
165,650
I am new to communities in lightning and I am trying to figure out a way to directly fetch the URL parameters into the lightning component attributes using the {! urlParamName} expressions. for example : ``` https://www.someurl.com/page?name=somename&surname=somesurname ``` My lightning component will be : ``` ...
2017/03/23
[ "https://salesforce.stackexchange.com/questions/165650", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/43215/" ]
After [Summer 18 release](https://releasenotes.docs.salesforce.com/en-us/summer18/release-notes/rn_lc_components_navigation.htm) (API version 43 and up) we can do this. Implement `lightning:isUrlAddressable` interface and use `pageReference` attribute. Example. - Component Assume url is *<https://<instance>.lightning...
First thing first. You have written apex:attribute in your question which is not valid, you should use aura:attribute. Next, you have to declare the attributes in the app, not in the component in order to fetch them from the URL. ``` <aura:application > <aura:attribute name="name" type="String"/> <aura:attrib...
165,650
I am new to communities in lightning and I am trying to figure out a way to directly fetch the URL parameters into the lightning component attributes using the {! urlParamName} expressions. for example : ``` https://www.someurl.com/page?name=somename&surname=somesurname ``` My lightning component will be : ``` ...
2017/03/23
[ "https://salesforce.stackexchange.com/questions/165650", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/43215/" ]
It is actually much easier to pass URL parameters to Lighning components in a community page. The "trick" is to expose your attributes at design time to the page, so they show up in the Lightning page designer as component properties. You do that in the design definition (the .design file): ``` <design:component label...
Based on Damon Shaw's code, just add this helper method: ``` getUrlParameter : function(sParam) { var sPageURL = decodeURIComponent(window.location.search.substring(1)), sURLVariables = sPageURL.split('&'), sParameterName, i; for (i = 0; i < sURLVariables.length; i++) { sParame...
165,650
I am new to communities in lightning and I am trying to figure out a way to directly fetch the URL parameters into the lightning component attributes using the {! urlParamName} expressions. for example : ``` https://www.someurl.com/page?name=somename&surname=somesurname ``` My lightning component will be : ``` ...
2017/03/23
[ "https://salesforce.stackexchange.com/questions/165650", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/43215/" ]
After [Summer 18 release](https://releasenotes.docs.salesforce.com/en-us/summer18/release-notes/rn_lc_components_navigation.htm) (API version 43 and up) we can do this. Implement `lightning:isUrlAddressable` interface and use `pageReference` attribute. Example. - Component Assume url is *<https://<instance>.lightning...
It is actually much easier to pass URL parameters to Lighning components in a community page. The "trick" is to expose your attributes at design time to the page, so they show up in the Lightning page designer as component properties. You do that in the design definition (the .design file): ``` <design:component label...
165,650
I am new to communities in lightning and I am trying to figure out a way to directly fetch the URL parameters into the lightning component attributes using the {! urlParamName} expressions. for example : ``` https://www.someurl.com/page?name=somename&surname=somesurname ``` My lightning component will be : ``` ...
2017/03/23
[ "https://salesforce.stackexchange.com/questions/165650", "https://salesforce.stackexchange.com", "https://salesforce.stackexchange.com/users/43215/" ]
After [Summer 18 release](https://releasenotes.docs.salesforce.com/en-us/summer18/release-notes/rn_lc_components_navigation.htm) (API version 43 and up) we can do this. Implement `lightning:isUrlAddressable` interface and use `pageReference` attribute. Example. - Component Assume url is *<https://<instance>.lightning...
Based on Damon Shaw's code, just add this helper method: ``` getUrlParameter : function(sParam) { var sPageURL = decodeURIComponent(window.location.search.substring(1)), sURLVariables = sPageURL.split('&'), sParameterName, i; for (i = 0; i < sURLVariables.length; i++) { sParame...
5,128,797
I need to make some changes to Qt 4.7.1, so I need to add it to my subversion server to track my changes. However, once it's added, the configure script fails. I'm guessing it's choking on the .svn files. I'm using Windows. Is there any way to add Qt to subversion, delete all the .svn folders, configure and build it,...
2011/02/26
[ "https://Stackoverflow.com/questions/5128797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39138/" ]
If `a` is an array of strings, ``` for (String s : a) outputFile.println(s); ``` will print the array line-by-line to `outputFile`.
``` // myDoc is the "array of string" foreach (String line : myDoc) { outputFile.println(line); } ```
5,128,797
I need to make some changes to Qt 4.7.1, so I need to add it to my subversion server to track my changes. However, once it's added, the configure script fails. I'm guessing it's choking on the .svn files. I'm using Windows. Is there any way to add Qt to subversion, delete all the .svn folders, configure and build it,...
2011/02/26
[ "https://Stackoverflow.com/questions/5128797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39138/" ]
If `a` is an array of strings, ``` for (String s : a) outputFile.println(s); ``` will print the array line-by-line to `outputFile`.
I might write it more like this: ``` import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.PrintStream; /** * FileDemo * @author Michael * @since 2/26/11 */ public class FileDemo { public static void main(String[] args) { try { FileDemo fd = new...
5,128,797
I need to make some changes to Qt 4.7.1, so I need to add it to my subversion server to track my changes. However, once it's added, the configure script fails. I'm guessing it's choking on the .svn files. I'm using Windows. Is there any way to add Qt to subversion, delete all the .svn folders, configure and build it,...
2011/02/26
[ "https://Stackoverflow.com/questions/5128797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39138/" ]
Iterator over the array, and write the current element. ``` String document[] = {"String1","String2","String3"}; PrintWriter outputFile = new PrintWriter(new BufferedWriter(new FileWriter(docName))); int lineNo = 1; for(int i = 0; i < document.length; i++) { outputFile.println(documen...
``` // myDoc is the "array of string" foreach (String line : myDoc) { outputFile.println(line); } ```
5,128,797
I need to make some changes to Qt 4.7.1, so I need to add it to my subversion server to track my changes. However, once it's added, the configure script fails. I'm guessing it's choking on the .svn files. I'm using Windows. Is there any way to add Qt to subversion, delete all the .svn folders, configure and build it,...
2011/02/26
[ "https://Stackoverflow.com/questions/5128797", "https://Stackoverflow.com", "https://Stackoverflow.com/users/39138/" ]
Iterator over the array, and write the current element. ``` String document[] = {"String1","String2","String3"}; PrintWriter outputFile = new PrintWriter(new BufferedWriter(new FileWriter(docName))); int lineNo = 1; for(int i = 0; i < document.length; i++) { outputFile.println(documen...
I might write it more like this: ``` import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.PrintStream; /** * FileDemo * @author Michael * @since 2/26/11 */ public class FileDemo { public static void main(String[] args) { try { FileDemo fd = new...
12,467
We are looking to roll out a deployment of Sitecore 9.0.2 in CMS only mode. Does it need all databases to run or can it work off: * Core * Master * Web I'm happy we can run session inProc (provided thats still a thing in sc9) but do we need e.g. exm.master, experienceforms, messaging and reporting? We don't plan to ...
2018/06/22
[ "https://sitecore.stackexchange.com/questions/12467", "https://sitecore.stackexchange.com", "https://sitecore.stackexchange.com/users/443/" ]
That would be an XM environment. You require: forms, core, web and master <https://doc.sitecore.net/sitecore_experience_platform/setting_up_and_maintaining/sitecore_on_azure/deploying/sitecore_configurations_and_topology_for_azure#_XMSingle> [![enter image description here](https://i.stack.imgur.com/WJFXC.png)](https...
I unziped the WDP zip file and I verify connection string file : Looks like you need next connection strings : ``` <?xml version="1.0" encoding="utf-8"?> <connectionStrings> <!-- Sitecore connection strings. All database connections for Sitecore are configured here. --> <add name="core" connectionStri...
9,326,503
I have two tables with a 1:M relationship: Account (Parent) and 'Payment' (Child). The 'Payment' table has a column 'Type' whose value could be 'Paid', 'will-Pay' or 'Not-paid'. Now I need to write a query which can fetch all Account tables record and it's child records. But in the child table it should first check i...
2012/02/17
[ "https://Stackoverflow.com/questions/9326503", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1173496/" ]
Assuming you have at least: ``` CREATE TABLE account ( id INTEGER NOT NULL PRIMARY KEY ); CREATE TABLE payment ( account_id INTEGER NOT NULL REFERENCES account(id), type ENUM ('Paid', 'will-Pay', 'Not-paid') ); ``` 'Paid' records and 'will-Pay' records in the same answer: ``` SELECT account.*, paym...
Try: ``` SELECT p.* FROM account a INNER JOIN payment p ON p.account_id = a.id WHERE p.type = 'Paid' or (p.type = 'will-Pay' and not exists (select null from payment p1 where p1.account_id = a.id and p1.type = 'Paid') ) ```
9,627,084
I'm creating a SMS fording app. I currently got two classes; a main Activity class which will be used to modify setting and smsListener class which uses BroardcastReceiver. However, I can not work out how to launch the smsListener class. Code of smsListener class for ref ``` package sms.pack; import java.io.BufferedW...
2012/03/09
[ "https://Stackoverflow.com/questions/9627084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1198200/" ]
You only use startActivity to launch an Activity. A [BroadcastReceiver](http://developer.android.com/reference/android/content/BroadcastReceiver.html) listens for broadcasted intents. Use sendBroadcast(intentToBroadcast). Make sure you put a [receiver](http://developer.android.com/reference/android/R.styleable.html#...
You must register your broadcast receiver first. ``` <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity .... </activity> <receiver android:name="SmsListener "> <intent-filter android:priority="100" > <action android:name="android.int...
50,316,720
I had previously written my `create` queries as follows, where the foreign keys were unnamed. ``` CREATE TABLE My_Table_Name ( USER_ID VARCHAR(255) NOT NULL, CONSENT_ID VARCHAR(255) NOT NULL, PRIMARY KEY (USER_ID, CONSENT_ID), FOREIGN KEY (CONSENT_ID) REFERENCES ANOTHER_TABLE_NAME (CONSENT_ID) ON DEL...
2018/05/13
[ "https://Stackoverflow.com/questions/50316720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3706638/" ]
You use the `constraint` keyword: ``` CREATE TABLE My_Table_Name ( USER_ID VARCHAR(255) NOT NULL, CONSENT_ID VARCHAR(255) NOT NULL, CONSTRAINT pk_mY_table_name PRIMARY KEY (USER_ID, CONSENT_ID), CONSTRAINT fk_my_table_name_consent_id FOREIGN KEY (CONSENT_ID) REFERENCES ANOTHER_TABLE_NAME (CONSENT_ID) ON DELET...
In MS SQL, anonymous constraints will get a system generated name. You could use the following query to fetch the generated constraint name: ``` SELECT FK.CONSTRAINT_NAME FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS RC INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS PK ON PK.CONSTRAINT_CATALOG ...
50,316,720
I had previously written my `create` queries as follows, where the foreign keys were unnamed. ``` CREATE TABLE My_Table_Name ( USER_ID VARCHAR(255) NOT NULL, CONSENT_ID VARCHAR(255) NOT NULL, PRIMARY KEY (USER_ID, CONSENT_ID), FOREIGN KEY (CONSENT_ID) REFERENCES ANOTHER_TABLE_NAME (CONSENT_ID) ON DEL...
2018/05/13
[ "https://Stackoverflow.com/questions/50316720", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3706638/" ]
Foreign key constraints in MySQL cannot be renamed once created. You will have to drop the constraint, then recreate it with the name you want. First you are going to have to go digging for the foreign key constraint name (there is one, you just don't know what it is): ``` SELECT constraint_name FROM information_sche...
In MS SQL, anonymous constraints will get a system generated name. You could use the following query to fetch the generated constraint name: ``` SELECT FK.CONSTRAINT_NAME FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS RC INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS PK ON PK.CONSTRAINT_CATALOG ...
5,907,183
I have a matrix, I = ``` 5 4 3 9 8 6 6 3 4 ``` How can I calculate differences between adjacent elements in a diagonal directions. I want these outputs(for first and last rows and columns I don't mind padding): ``` 5 4 3 5 5 6 2 -3 4 ``` and ``` 5 4 ...
2011/05/06
[ "https://Stackoverflow.com/questions/5907183", "https://Stackoverflow.com", "https://Stackoverflow.com/users/553023/" ]
You can do this by simple indexing (the following assumes zero padding around the edges as in your example): ``` >> diagDiffs = I; >> diagDiffs(2:end,2:end) = I(2:end,2:end)-I(1:end-1,1:end-1) diagDiffs = 5 4 3 9 3 2 6 -6 -4 >> antidiagDiffs = I; >> antidiagDiffs(2:end,1:end-1) ...
I am not quite sure how to do it syntactically in MATLAB, but in psudocode: The diagonal adjacent elements for element `i,j` are at positions: List of elements = `{(i+1,j+1),(i+1,j-1),(i-1,j+1),(i+1,j-1)}`. Basically, for each element position, find its "list of elements" in both matrices, and subtract. Sorry, I can...
50,485,964
When I tried to open play store listing of my app via intent, it is opening playstore app and shows this message, "to view this content, install and setup a web browsing app". Please see the screenshot. [![Screenshot](https://i.stack.imgur.com/YAgbw.jpg)](https://i.stack.imgur.com/YAgbw.jpg) I have set chrome as defa...
2018/05/23
[ "https://Stackoverflow.com/questions/50485964", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2449276/" ]
You are doubling up your ?id=packagename in your rate function. Just use the url you pass in. ``` private Intent rate(String url) { Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); ... ```
Try it ``` Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com")); ``` startActivity(browserIntent);
9,351,121
All the help I've been able to find from similar posts regarding this issue isn't working for how I set up my GridView. I've gotten my Gridview to have dynamically created columns, and was able to get sorting to work on it. My paging works also, but if I sort first and then go to another page, it loses the sort. What...
2012/02/19
[ "https://Stackoverflow.com/questions/9351121", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1218621/" ]
Here's a complete sample code including paging,sorting and databinding: ``` Sub Page_load(sender As Object, e As EventArgs) Handles Me.Load If Not Page.IsPostBack Then CreateGridColumns() BindGrid() End If End Sub Public Property SortExpression As String Get If ViewState("SortExpre...
After the "business" decided that a Web Forms application with gridview needed a specific "Page 2 for incidents etc..." With ALL the EVENTS, postbacks, REDIRECTS etc... I have come to the liberating conclusion. 1. I'm not maintaining this application for some heavy hit company with large amount of traffic (hence my so...
58,223,934
So I'm trying to rename columns for a tibble that displays summary statistics in my R code. But for columns I add to the tibble I can't seem to change their names completely Here's the code to get the median minimum and maximum from the dataframe 'UScereal': ``` UScereal %>% #get median group_by(mfr) %>% summaris...
2019/10/03
[ "https://Stackoverflow.com/questions/58223934", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12160479/" ]
You could use [sets](https://docs.python.org/3.7/library/stdtypes.html#set-types-set-frozenset), to look at the difference: ``` a = [1, 2, 3, 4, 5] b = [2, 4, 6] a = set(a) b = set(b) for i in a.difference(b): print(i) # even supports the arithmetic syntax :D for i in a - b: print(i) ```
What you have is fine. If you object to the `continue` statement, you can iterate over a generator: ``` for i in (x for x in a if x not in b): ``` though that is arguably worse in terms of readability.
58,223,934
So I'm trying to rename columns for a tibble that displays summary statistics in my R code. But for columns I add to the tibble I can't seem to change their names completely Here's the code to get the median minimum and maximum from the dataframe 'UScereal': ``` UScereal %>% #get median group_by(mfr) %>% summaris...
2019/10/03
[ "https://Stackoverflow.com/questions/58223934", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12160479/" ]
You could use [sets](https://docs.python.org/3.7/library/stdtypes.html#set-types-set-frozenset), to look at the difference: ``` a = [1, 2, 3, 4, 5] b = [2, 4, 6] a = set(a) b = set(b) for i in a.difference(b): print(i) # even supports the arithmetic syntax :D for i in a - b: print(i) ```
In terms of sets, the items in `a` but not in `b` would be the set difference, therefore this would be ``` for i in set(a).difference(b): # statements ```