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
21,300,792
-Mac OSX 10.7.5 -Python 2.7 -PostgreSQL 9.3.2 (set up via Heroku) -Django 1.6 I've spent the entire day trying to solve this problem and have not been able to find a solution. I'm trying to get my Django app to recognize a Postgres database. The database setting in my django settings.py is ``` DATABASES = { 'defaul...
2014/01/23
[ "https://Stackoverflow.com/questions/21300792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961514/" ]
You should use the [enum.Parse](http://msdn.microsoft.com/en-us/library/essfb559(v=vs.110).aspx) Method: ``` MyEnum myEnum = (MyEnum)Enum.Parse(typeof(MyEnum), enumString); ``` I found the [code snippet](http://dotnet-snippets.de/snippet/string-zu-enum/1012).
The simples way to do this would be: 1) create an enum representing all possible preference key values, but add a 'invalid' with value -1. ``` enum PreferenceKey { INVALID = -1, SIX_E_SF_TYPE = 0, SIX_E_SF_VALUE = 1, ... } ``` 2) create a list of strings containing the string representations of all ...
21,300,792
-Mac OSX 10.7.5 -Python 2.7 -PostgreSQL 9.3.2 (set up via Heroku) -Django 1.6 I've spent the entire day trying to solve this problem and have not been able to find a solution. I'm trying to get my Django app to recognize a Postgres database. The database setting in my django settings.py is ``` DATABASES = { 'defaul...
2014/01/23
[ "https://Stackoverflow.com/questions/21300792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961514/" ]
Rohit, The value of `preferenceKey` could not easily be converted to an enum as you would expect. The strings could be parsed using Enum.Parse() method however the enum names must be different than what you have in the database. The problems are 1. Your string starts with a number 2. Your string contains the `-` char...
I really would recommend storing the numerical values rather than the text values in the database. If you want the text values in the database too then add a table for it. Regardless, the Enum.Parse and .TryParse methods will convert a String and the .ToObject method will convert either text or numbers.
21,300,792
-Mac OSX 10.7.5 -Python 2.7 -PostgreSQL 9.3.2 (set up via Heroku) -Django 1.6 I've spent the entire day trying to solve this problem and have not been able to find a solution. I'm trying to get my Django app to recognize a Postgres database. The database setting in my django settings.py is ``` DATABASES = { 'defaul...
2014/01/23
[ "https://Stackoverflow.com/questions/21300792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961514/" ]
I really would recommend storing the numerical values rather than the text values in the database. If you want the text values in the database too then add a table for it. Regardless, the Enum.Parse and .TryParse methods will convert a String and the .ToObject method will convert either text or numbers.
The simples way to do this would be: 1) create an enum representing all possible preference key values, but add a 'invalid' with value -1. ``` enum PreferenceKey { INVALID = -1, SIX_E_SF_TYPE = 0, SIX_E_SF_VALUE = 1, ... } ``` 2) create a list of strings containing the string representations of all ...
21,300,792
-Mac OSX 10.7.5 -Python 2.7 -PostgreSQL 9.3.2 (set up via Heroku) -Django 1.6 I've spent the entire day trying to solve this problem and have not been able to find a solution. I'm trying to get my Django app to recognize a Postgres database. The database setting in my django settings.py is ``` DATABASES = { 'defaul...
2014/01/23
[ "https://Stackoverflow.com/questions/21300792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961514/" ]
Rohit, The value of `preferenceKey` could not easily be converted to an enum as you would expect. The strings could be parsed using Enum.Parse() method however the enum names must be different than what you have in the database. The problems are 1. Your string starts with a number 2. Your string contains the `-` char...
> > How to make enum of preferencekey column which is string type in best optimized way > > > Well i am afraid you cannot use your preference key as enum for 2 reasons. 1. your preference key is starting with integer values making it an in-valid identifier. 2. it also contains **-** which is not allowed either. ...
21,300,792
-Mac OSX 10.7.5 -Python 2.7 -PostgreSQL 9.3.2 (set up via Heroku) -Django 1.6 I've spent the entire day trying to solve this problem and have not been able to find a solution. I'm trying to get my Django app to recognize a Postgres database. The database setting in my django settings.py is ``` DATABASES = { 'defaul...
2014/01/23
[ "https://Stackoverflow.com/questions/21300792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961514/" ]
> > How to make enum of preferencekey column which is string type in best optimized way > > > Well i am afraid you cannot use your preference key as enum for 2 reasons. 1. your preference key is starting with integer values making it an in-valid identifier. 2. it also contains **-** which is not allowed either. ...
The simples way to do this would be: 1) create an enum representing all possible preference key values, but add a 'invalid' with value -1. ``` enum PreferenceKey { INVALID = -1, SIX_E_SF_TYPE = 0, SIX_E_SF_VALUE = 1, ... } ``` 2) create a list of strings containing the string representations of all ...
21,300,792
-Mac OSX 10.7.5 -Python 2.7 -PostgreSQL 9.3.2 (set up via Heroku) -Django 1.6 I've spent the entire day trying to solve this problem and have not been able to find a solution. I'm trying to get my Django app to recognize a Postgres database. The database setting in my django settings.py is ``` DATABASES = { 'defaul...
2014/01/23
[ "https://Stackoverflow.com/questions/21300792", "https://Stackoverflow.com", "https://Stackoverflow.com/users/961514/" ]
Rohit, The value of `preferenceKey` could not easily be converted to an enum as you would expect. The strings could be parsed using Enum.Parse() method however the enum names must be different than what you have in the database. The problems are 1. Your string starts with a number 2. Your string contains the `-` char...
The simples way to do this would be: 1) create an enum representing all possible preference key values, but add a 'invalid' with value -1. ``` enum PreferenceKey { INVALID = -1, SIX_E_SF_TYPE = 0, SIX_E_SF_VALUE = 1, ... } ``` 2) create a list of strings containing the string representations of all ...
56,805,081
I have an SVG thermometer and I'm trying to animate filling it smoothly for each class. I did thermometer with toggle classes. I'm trying to animate smoothly up-down, and down-up animation for each class I have. <https://lore1ei.github.io/> -thermometer. ```js var firstStop = document.getElementById('F1gst1'); pe...
2019/06/28
[ "https://Stackoverflow.com/questions/56805081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11707220/" ]
One solution is to animate it using javascript only instead of using css and/or svg-props. For example: ``` function anim(fromPercentage) { var topLimit = 25; fromPercentage += 1; if(fromPercentage < topLimit) { $('#F1gst1').attr('offset', fromPercentage + '%'); setTimeout( function() { ...
> > @Thomas But i need this for ((CountChecked / CountAllCheckboxes) \* 100) + '%'. It will be so many mask and functions. > > > it's one mask and one function, here a quick snippet: ```js const scale = Array.from(Array(101), (_,i,a) => 90*(100-i)/100); document.querySelector("svg #scale").setAttributeNS(null, "...
56,805,081
I have an SVG thermometer and I'm trying to animate filling it smoothly for each class. I did thermometer with toggle classes. I'm trying to animate smoothly up-down, and down-up animation for each class I have. <https://lore1ei.github.io/> -thermometer. ```js var firstStop = document.getElementById('F1gst1'); pe...
2019/06/28
[ "https://Stackoverflow.com/questions/56805081", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11707220/" ]
One solution is to animate it using javascript only instead of using css and/or svg-props. For example: ``` function anim(fromPercentage) { var topLimit = 25; fromPercentage += 1; if(fromPercentage < topLimit) { $('#F1gst1').attr('offset', fromPercentage + '%'); setTimeout( function() { ...
``` <linearGradient y2="0%" x2="0%" y1="100%" x1="0%" id="F1g"> <stop stop-color="#00FF00" offset="0%" id="F1gst1"> <animate id="g0" attributeName="offset" to="5%" dur="0.5s" begin="indefinite" /> <animate id="g1" attributeName="offset" to="19.285714285714285%" dur="0.5s" begin="indefinite" /> <animate...
16,295,984
I have a requirement the user will register for watching videos. After the user has register then we need to hold the money for a period (varies depends on the video's ). Then after completing the period then we need to release the money to the end user. We are acting as a mediator for the user and the end user. How ca...
2013/04/30
[ "https://Stackoverflow.com/questions/16295984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1874886/" ]
Problem solved. This is what happens. When an app is running in background and and it is executed a task, this task is running in background as well but the system allows only a certain amount of time (10s apron.) in order to safe battery. So it is only for a specific tasks (localization, download, etc.). I my case I...
You can try with re-setting the delay value after it exceed 10s of the total delayed time or may be after it has played sound for certain amount of time.
16,295,984
I have a requirement the user will register for watching videos. After the user has register then we need to hold the money for a period (varies depends on the video's ). Then after completing the period then we need to release the money to the end user. We are acting as a mediator for the user and the end user. How ca...
2013/04/30
[ "https://Stackoverflow.com/questions/16295984", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1874886/" ]
Problem solved. This is what happens. When an app is running in background and and it is executed a task, this task is running in background as well but the system allows only a certain amount of time (10s apron.) in order to safe battery. So it is only for a specific tasks (localization, download, etc.). I my case I...
I suspect that chaining asynch blocks to play sounds at regular intervals is a bit of an overkill. Perhaps something simpler along the following lines would be easier to understand and maintain: ``` // To initiate the alarm: [self fiBGTemps: ALARM]; - (void)fiBGTemps:(int)sender { switch (sender) { ... ...
5,985,839
I've found what I believe to be a bug with Firefox and I'm wondering if this actually is a bug, as well as any workarounds for this. If you create a basic webpage with the following source: ``` <html> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></...
2011/05/12
[ "https://Stackoverflow.com/questions/5985839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/176677/" ]
This is a *"feature"* of Firefox which remembers form input values across page refreshes. To fix this behavior, you simply set `autocomplete="off"` on the form containing the inputs, or just directly to the input. This stops autocomplete from working and prevents the browser from remembering the state of input fields....
To deal with the back button, do this (from [here](https://bugzilla.mozilla.org/show_bug.cgi?id=443289)) ``` window.addEventListener('pageshow', PageShowHandler, false); window.addEventListener('unload', UnloadHandler, false); function PageShowHandler() { window.addEventListener('unload', UnloadHa...
5,985,839
I've found what I believe to be a bug with Firefox and I'm wondering if this actually is a bug, as well as any workarounds for this. If you create a basic webpage with the following source: ``` <html> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></...
2011/05/12
[ "https://Stackoverflow.com/questions/5985839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/176677/" ]
This is a *"feature"* of Firefox which remembers form input values across page refreshes. To fix this behavior, you simply set `autocomplete="off"` on the form containing the inputs, or just directly to the input. This stops autocomplete from working and prevents the browser from remembering the state of input fields....
As mentioned before you need to add `autocomplete="off"` to your buttons. Here is a `sh`+`perl` snippet to automate this in the case of `<button>`s in your HTML files/templates (under some assumptions): ```sh find /path/to/html/templates -type f -name '*.html' -exec perl -pi -e \ 's/(?<=<button )(.*?)(?=>)/@{[(inde...
5,985,839
I've found what I believe to be a bug with Firefox and I'm wondering if this actually is a bug, as well as any workarounds for this. If you create a basic webpage with the following source: ``` <html> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></...
2011/05/12
[ "https://Stackoverflow.com/questions/5985839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/176677/" ]
This is a *"feature"* of Firefox which remembers form input values across page refreshes. To fix this behavior, you simply set `autocomplete="off"` on the form containing the inputs, or just directly to the input. This stops autocomplete from working and prevents the browser from remembering the state of input fields....
This is indeed an open [bug](https://bugzilla.mozilla.org/show_bug.cgi?id=654072) in Firefox. There is also a note in [MDN: `autocomplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#Values) (scroll down to the second yellow box): > > Note: The `autocomplete` attribute also controls whe...
5,985,839
I've found what I believe to be a bug with Firefox and I'm wondering if this actually is a bug, as well as any workarounds for this. If you create a basic webpage with the following source: ``` <html> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></...
2011/05/12
[ "https://Stackoverflow.com/questions/5985839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/176677/" ]
To deal with the back button, do this (from [here](https://bugzilla.mozilla.org/show_bug.cgi?id=443289)) ``` window.addEventListener('pageshow', PageShowHandler, false); window.addEventListener('unload', UnloadHandler, false); function PageShowHandler() { window.addEventListener('unload', UnloadHa...
As mentioned before you need to add `autocomplete="off"` to your buttons. Here is a `sh`+`perl` snippet to automate this in the case of `<button>`s in your HTML files/templates (under some assumptions): ```sh find /path/to/html/templates -type f -name '*.html' -exec perl -pi -e \ 's/(?<=<button )(.*?)(?=>)/@{[(inde...
5,985,839
I've found what I believe to be a bug with Firefox and I'm wondering if this actually is a bug, as well as any workarounds for this. If you create a basic webpage with the following source: ``` <html> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></...
2011/05/12
[ "https://Stackoverflow.com/questions/5985839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/176677/" ]
To deal with the back button, do this (from [here](https://bugzilla.mozilla.org/show_bug.cgi?id=443289)) ``` window.addEventListener('pageshow', PageShowHandler, false); window.addEventListener('unload', UnloadHandler, false); function PageShowHandler() { window.addEventListener('unload', UnloadHa...
This is indeed an open [bug](https://bugzilla.mozilla.org/show_bug.cgi?id=654072) in Firefox. There is also a note in [MDN: `autocomplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#Values) (scroll down to the second yellow box): > > Note: The `autocomplete` attribute also controls whe...
5,985,839
I've found what I believe to be a bug with Firefox and I'm wondering if this actually is a bug, as well as any workarounds for this. If you create a basic webpage with the following source: ``` <html> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></...
2011/05/12
[ "https://Stackoverflow.com/questions/5985839", "https://Stackoverflow.com", "https://Stackoverflow.com/users/176677/" ]
As mentioned before you need to add `autocomplete="off"` to your buttons. Here is a `sh`+`perl` snippet to automate this in the case of `<button>`s in your HTML files/templates (under some assumptions): ```sh find /path/to/html/templates -type f -name '*.html' -exec perl -pi -e \ 's/(?<=<button )(.*?)(?=>)/@{[(inde...
This is indeed an open [bug](https://bugzilla.mozilla.org/show_bug.cgi?id=654072) in Firefox. There is also a note in [MDN: `autocomplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete#Values) (scroll down to the second yellow box): > > Note: The `autocomplete` attribute also controls whe...
23,150,301
Why does not this code compile with VC++ 15 in visual studio 2008? Errors: C2057: expected constant expression, C2466: cannot allocate an array of constant size 0. ``` void foo(int a, int b) { double arr[a][b] ... } ``` Although it works fine in GCC 4.4. I need compatibility between compilers.
2014/04/18
[ "https://Stackoverflow.com/questions/23150301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3548144/" ]
> > Why does not this code compile with VC++ 15 in visual studio 2008? > > > Because C-style *variable length arrays* are not part of the C++ language. GCC provides them as a non-standard extension; some compilers don't. > > I need compatibility between compilers. > > > Then you'll need a dynamic array, for ...
The compiler need to have the exact size of the class when compiling, you will have to use the new operator to dynamically allocate memory and the vectors are best choice for this kind of operations. For more information refer <http://gcc.gnu.org/onlinedocs/gcc/Variable-Length.html> <http://www.boost.org/doc/libs/1_3...
30,450,303
``` template <class T1, class T2> class A {}; template <class T1> class A {}; A<int, int> a; A<int> b; ``` This code generates > > error C2976: 'A' : too few template arguments > > > at the second diclaration of 'A' class.
2015/05/26
[ "https://Stackoverflow.com/questions/30450303", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3226675/" ]
Your first declaration defines a class `A` with 2 template arguments. Anything after that must either be a specialization of that or some other enabled version. If you want to allow either 1 or 2 template arguments you can use variadic templates as follows: ``` template <class... Args> class A; template <class T1, c...
There is no SFINAE going on here. You are redeclaring the class `A`, originally with 2 template parameters, to another one with only 1 template parameters, and hence the error. g++ gives a more explicit error: > > error: redeclared with 1 template parameter class A {}; > > > note: previous declaration 'template cla...
30,450,303
``` template <class T1, class T2> class A {}; template <class T1> class A {}; A<int, int> a; A<int> b; ``` This code generates > > error C2976: 'A' : too few template arguments > > > at the second diclaration of 'A' class.
2015/05/26
[ "https://Stackoverflow.com/questions/30450303", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3226675/" ]
There is no SFINAE going on here. You are redeclaring the class `A`, originally with 2 template parameters, to another one with only 1 template parameters, and hence the error. g++ gives a more explicit error: > > error: redeclared with 1 template parameter class A {}; > > > note: previous declaration 'template cla...
SFINAE is about a **substitution failure**; i.e. the problem must be a consequence of what types you are placing as template parameters. Not every error qualifies... as an extreme example consider ``` template<T> struct foo { !@#*&!%^@ }; ``` this is also an error, but not a substitution failure :-)
30,450,303
``` template <class T1, class T2> class A {}; template <class T1> class A {}; A<int, int> a; A<int> b; ``` This code generates > > error C2976: 'A' : too few template arguments > > > at the second diclaration of 'A' class.
2015/05/26
[ "https://Stackoverflow.com/questions/30450303", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3226675/" ]
Your first declaration defines a class `A` with 2 template arguments. Anything after that must either be a specialization of that or some other enabled version. If you want to allow either 1 or 2 template arguments you can use variadic templates as follows: ``` template <class... Args> class A; template <class T1, c...
SFINAE is about a **substitution failure**; i.e. the problem must be a consequence of what types you are placing as template parameters. Not every error qualifies... as an extreme example consider ``` template<T> struct foo { !@#*&!%^@ }; ``` this is also an error, but not a substitution failure :-)
59,266,175
I'm making a Lotto game for school, I'm stuck at checking the matching numbers. I've tried a nested for loop and although I can console.log out the matches, it gets overwritten in the next iteration of the loop and I don't understand how I can solve this. These are my picked numbers, stored here. ``` myNumbers=[1,2,...
2019/12/10
[ "https://Stackoverflow.com/questions/59266175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1047294/" ]
If you want to make `my_array` visible only in mylib.c, then you need to define it as `static` in that file and not put anything in the header file. So mylib.c should contain: ``` static char my_array[MY_ARRAY_SIZE]; ``` And mylib.h should not list this variable at all. Not that this means that `MY_ARRAY_SIZE` need...
No, you can't. Any file will easily be able to declare this variable and use it.
59,266,175
I'm making a Lotto game for school, I'm stuck at checking the matching numbers. I've tried a nested for loop and although I can console.log out the matches, it gets overwritten in the next iteration of the loop and I don't understand how I can solve this. These are my picked numbers, stored here. ``` myNumbers=[1,2,...
2019/12/10
[ "https://Stackoverflow.com/questions/59266175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1047294/" ]
If you want to make `my_array` visible only in mylib.c, then you need to define it as `static` in that file and not put anything in the header file. So mylib.c should contain: ``` static char my_array[MY_ARRAY_SIZE]; ``` And mylib.h should not list this variable at all. Not that this means that `MY_ARRAY_SIZE` need...
add `extern yourGlobal` in your header, then just declare yourGlobal in one of the file (it's been a while since i last used it, but look for the keyword 'extern' in any case) so you'll be able to use in any file using the header. Declare another header whitout to restrict it
59,266,175
I'm making a Lotto game for school, I'm stuck at checking the matching numbers. I've tried a nested for loop and although I can console.log out the matches, it gets overwritten in the next iteration of the loop and I don't understand how I can solve this. These are my picked numbers, stored here. ``` myNumbers=[1,2,...
2019/12/10
[ "https://Stackoverflow.com/questions/59266175", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1047294/" ]
If you want to make `my_array` visible only in mylib.c, then you need to define it as `static` in that file and not put anything in the header file. So mylib.c should contain: ``` static char my_array[MY_ARRAY_SIZE]; ``` And mylib.h should not list this variable at all. Not that this means that `MY_ARRAY_SIZE` need...
I've found a workaround: ```c #ifndef _MYLIB_H_ #define _MYLIB_H_ void test(); #ifndef _MYLIB_C_ char my_array[MY_ARRAY_SIZE]; #define my_array 0 #endif /* _MYLIB_C_ */ #endif /* _MYLIB_H_ */ ``` I just redefine name of array by zero after it declaration. So, if somebody try to use that name in `main.c` he is ob...
156,476
I am seeing that Google play books consumes 1.4 GB. I use Play Books only to view my PDF books and at most use 50MB of content. But I don't understand how it can consume so much space... Even a graphic game takes only 800MB. So can anyone point me out to why this happens??
2016/09/01
[ "https://android.stackexchange.com/questions/156476", "https://android.stackexchange.com", "https://android.stackexchange.com/users/185616/" ]
I can't tell you why it's using this much on **your** phone in particular. I just looked at Google Play Books on my phone, which is using 224 MB, of which only 32 MB is the app itself, and the rest is data (downloaded books). Some PDFs and e-books can be very big, because they can include large pictures. Some e-books ...
Google Play Books can also store cache and your data (includes your books). Try clearing the application's cache by going to the application's app info.
18,384,143
I am using Android lint with Jenkins and need to ignore library projects (specifically Action Bar Sherlock) that my team does not modify so that we can get useful results from Android lint. At the moment I am launching lint from the command line and saving the results to an XML file that can then be read by Jenkins. Wh...
2013/08/22
[ "https://Stackoverflow.com/questions/18384143", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2619793/" ]
I would first try to compare the lint configuration files when modified by eclipse to see if you find out what eclipse does. Maybe there's a way to modify the lint.xml file see to achieve what you want [this](http://tools.android.com/tips/lint/suppressing-lint-warnings) or [that](http://tools.android.com/recent/ignorin...
Put this in `lint.xml` in project root directory: ```xml <?xml version="1.0" encoding="UTF-8"?> <lint> <issue id="all"> <ignore path="path_to_library/**" /> </issue> </lint> ```
18,384,143
I am using Android lint with Jenkins and need to ignore library projects (specifically Action Bar Sherlock) that my team does not modify so that we can get useful results from Android lint. At the moment I am launching lint from the command line and saving the results to an XML file that can then be read by Jenkins. Wh...
2013/08/22
[ "https://Stackoverflow.com/questions/18384143", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2619793/" ]
This is how I do it with Jenkins and Gradle: * Configure the Jenkins post-build action "Publish Android Lint Results" to pick up only the lint-results.xml of the main project. The default is \*\*/lint-results.xml and includes lint results of library projects. * Set `abortOnError false` in the build.gradle file in libr...
Put this in `lint.xml` in project root directory: ```xml <?xml version="1.0" encoding="UTF-8"?> <lint> <issue id="all"> <ignore path="path_to_library/**" /> </issue> </lint> ```
19,405
I have two different pictures of the same object, one of which is taken from roughy the same angle but has a different scale and rotation. I want both images to overlap so that the upper one matches the lower one as exactly as possible. Is there any option in gimp where I can define a number of key points and gimp alig...
2012/01/20
[ "https://photo.stackexchange.com/questions/19405", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/8176/" ]
I don't believe there is anything in Gimp to auto align images. You can do it manually by putting the images in layers, setting the top opacity so you can see the underlying image and scaling/rotating one of them. Or you can use a tool like [Enfuse](http://enblend.sourceforge.net/)
click file>>>open as layers>>>select both of the images that you want to merge. click on the larger image, and click on the scale tool. Scale the larger image down to fit on the smaller image. Set the top layer's opacity down to a lower number so you can see how the two are aligning, kind of like it's done in this gi...
19,405
I have two different pictures of the same object, one of which is taken from roughy the same angle but has a different scale and rotation. I want both images to overlap so that the upper one matches the lower one as exactly as possible. Is there any option in gimp where I can define a number of key points and gimp alig...
2012/01/20
[ "https://photo.stackexchange.com/questions/19405", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/8176/" ]
I don't believe there is anything in Gimp to auto align images. You can do it manually by putting the images in layers, setting the top opacity so you can see the underlying image and scaling/rotating one of them. Or you can use a tool like [Enfuse](http://enblend.sourceforge.net/)
You can use Filter|G'MIC|Layers|Align Layers. You must select Input Layers: All before executing. Take into account that this is a time consuming operation.
19,405
I have two different pictures of the same object, one of which is taken from roughy the same angle but has a different scale and rotation. I want both images to overlap so that the upper one matches the lower one as exactly as possible. Is there any option in gimp where I can define a number of key points and gimp alig...
2012/01/20
[ "https://photo.stackexchange.com/questions/19405", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/8176/" ]
I don't believe there is anything in Gimp to auto align images. You can do it manually by putting the images in layers, setting the top opacity so you can see the underlying image and scaling/rotating one of them. Or you can use a tool like [Enfuse](http://enblend.sourceforge.net/)
I just did this in Gimp with no additional software. This method will easily and precisely produce the "3 point scale, rotate, translate" that you asked about. If there's other perspective issues though, one of the other methods in the other answers will be required. 1. Both images in their own layer. Select the ruler...
19,405
I have two different pictures of the same object, one of which is taken from roughy the same angle but has a different scale and rotation. I want both images to overlap so that the upper one matches the lower one as exactly as possible. Is there any option in gimp where I can define a number of key points and gimp alig...
2012/01/20
[ "https://photo.stackexchange.com/questions/19405", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/8176/" ]
It looks like [panotools](http://panotools.sourceforge.net/) has a [Gimp plugin](http://sourceforge.net/projects/panotools/files/gimp%20plugin/). I haven't used it, but it's there. Outside of GIMP, but still free, you might want to try going down different roads. [**Hugin**](http://hugin.sourceforge.net/) - Primarily...
click file>>>open as layers>>>select both of the images that you want to merge. click on the larger image, and click on the scale tool. Scale the larger image down to fit on the smaller image. Set the top layer's opacity down to a lower number so you can see how the two are aligning, kind of like it's done in this gi...
19,405
I have two different pictures of the same object, one of which is taken from roughy the same angle but has a different scale and rotation. I want both images to overlap so that the upper one matches the lower one as exactly as possible. Is there any option in gimp where I can define a number of key points and gimp alig...
2012/01/20
[ "https://photo.stackexchange.com/questions/19405", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/8176/" ]
It looks like [panotools](http://panotools.sourceforge.net/) has a [Gimp plugin](http://sourceforge.net/projects/panotools/files/gimp%20plugin/). I haven't used it, but it's there. Outside of GIMP, but still free, you might want to try going down different roads. [**Hugin**](http://hugin.sourceforge.net/) - Primarily...
You can use Filter|G'MIC|Layers|Align Layers. You must select Input Layers: All before executing. Take into account that this is a time consuming operation.
19,405
I have two different pictures of the same object, one of which is taken from roughy the same angle but has a different scale and rotation. I want both images to overlap so that the upper one matches the lower one as exactly as possible. Is there any option in gimp where I can define a number of key points and gimp alig...
2012/01/20
[ "https://photo.stackexchange.com/questions/19405", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/8176/" ]
It looks like [panotools](http://panotools.sourceforge.net/) has a [Gimp plugin](http://sourceforge.net/projects/panotools/files/gimp%20plugin/). I haven't used it, but it's there. Outside of GIMP, but still free, you might want to try going down different roads. [**Hugin**](http://hugin.sourceforge.net/) - Primarily...
I just did this in Gimp with no additional software. This method will easily and precisely produce the "3 point scale, rotate, translate" that you asked about. If there's other perspective issues though, one of the other methods in the other answers will be required. 1. Both images in their own layer. Select the ruler...
19,405
I have two different pictures of the same object, one of which is taken from roughy the same angle but has a different scale and rotation. I want both images to overlap so that the upper one matches the lower one as exactly as possible. Is there any option in gimp where I can define a number of key points and gimp alig...
2012/01/20
[ "https://photo.stackexchange.com/questions/19405", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/8176/" ]
You can use Filter|G'MIC|Layers|Align Layers. You must select Input Layers: All before executing. Take into account that this is a time consuming operation.
click file>>>open as layers>>>select both of the images that you want to merge. click on the larger image, and click on the scale tool. Scale the larger image down to fit on the smaller image. Set the top layer's opacity down to a lower number so you can see how the two are aligning, kind of like it's done in this gi...
19,405
I have two different pictures of the same object, one of which is taken from roughy the same angle but has a different scale and rotation. I want both images to overlap so that the upper one matches the lower one as exactly as possible. Is there any option in gimp where I can define a number of key points and gimp alig...
2012/01/20
[ "https://photo.stackexchange.com/questions/19405", "https://photo.stackexchange.com", "https://photo.stackexchange.com/users/8176/" ]
I just did this in Gimp with no additional software. This method will easily and precisely produce the "3 point scale, rotate, translate" that you asked about. If there's other perspective issues though, one of the other methods in the other answers will be required. 1. Both images in their own layer. Select the ruler...
click file>>>open as layers>>>select both of the images that you want to merge. click on the larger image, and click on the scale tool. Scale the larger image down to fit on the smaller image. Set the top layer's opacity down to a lower number so you can see how the two are aligning, kind of like it's done in this gi...
36,005,794
I am trying to build a script that should give you a list of the proper names of a text. I want to build a regular expression that matchs every word that starts with a capital letter and that doesn't start a stence. An example from the text: > > "But while he thought about these things, behold, an angel of the Lord >...
2016/03/15
[ "https://Stackoverflow.com/questions/36005794", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5337399/" ]
Regex ``` (?<=[a-z,;:] )([A-Z][a-z]+) ``` [Demo](https://regex101.com/r/mK8fO2/7) Output: ``` MATCH 1 1. [65-69] `Lord` MATCH 2 1. [106-112] `Joseph` MATCH 3 1. [121-126] `David` MATCH 4 1. [160-164] `Mary` MATCH 5 1. [221-225] `Holy` MATCH 6 1. [226-232] `Spirit` ```
You can try ``` (?<![.!?;]) ([A-Z]\w+) ``` [demo](https://regex101.com/r/lU9gT0/1)
21,539,534
``` select s.name,c.name,r.edition,r.grade from students s, courses c, registrations r where s.student_id=r.student_id and r.course_id=c.course_id and r.grade > 10 order by 1,2,3; ``` Creating and index in "grade" column will improve this query performance?
2014/02/03
[ "https://Stackoverflow.com/questions/21539534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/470664/" ]
The class name is already a namespace, so there's no reason to give the impl such a long name: ``` class LongDescriptiveClassName { public: // Stuff... private: struct Impl; // shared_ptr is also an option if that's // the semantics you want. std::unique_ptr<Impl> Data; }; // and off in the ...
I'm not completely sure to understand your problem but it seems that a proper use of the `using` keyword should help a lot. Isn't ``` using ShortName = LongDescriptiveClassName::LongDescriptiveClassNameData ``` what you are looking for ? Note this only work is `LongDescriptiveClassNameData` is a type not a data.
21,539,534
``` select s.name,c.name,r.edition,r.grade from students s, courses c, registrations r where s.student_id=r.student_id and r.course_id=c.course_id and r.grade > 10 order by 1,2,3; ``` Creating and index in "grade" column will improve this query performance?
2014/02/03
[ "https://Stackoverflow.com/questions/21539534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/470664/" ]
The class name is already a namespace, so there's no reason to give the impl such a long name: ``` class LongDescriptiveClassName { public: // Stuff... private: struct Impl; // shared_ptr is also an option if that's // the semantics you want. std::unique_ptr<Impl> Data; }; // and off in the ...
While @Pseudonym's solution is absolutely fine, I prefer to use names with initial upper case only for types, so I think I'd just do: ``` class LongDescriptiveClassName { private: struct Data; Data &data; }; ```
21,539,534
``` select s.name,c.name,r.edition,r.grade from students s, courses c, registrations r where s.student_id=r.student_id and r.course_id=c.course_id and r.grade > 10 order by 1,2,3; ``` Creating and index in "grade" column will improve this query performance?
2014/02/03
[ "https://Stackoverflow.com/questions/21539534", "https://Stackoverflow.com", "https://Stackoverflow.com/users/470664/" ]
The class name is already a namespace, so there's no reason to give the impl such a long name: ``` class LongDescriptiveClassName { public: // Stuff... private: struct Impl; // shared_ptr is also an option if that's // the semantics you want. std::unique_ptr<Impl> Data; }; // and off in the ...
I like to call it `Impl`, or `Detail` (though the latter is common as a `namespace detail`, also).
29,230
Title says all about the question. I have three guitars, electric and two other which i don't know if it's classical or acoustic. They both have same shape, guitars don't have cut at higher frets like electric does and also they have wide fretboards.
2015/01/29
[ "https://music.stackexchange.com/questions/29230", "https://music.stackexchange.com", "https://music.stackexchange.com/users/15465/" ]
Classical guitars are designed to be played primarily finger-style (fingerpicking). They generally use nylon strings which do not require near the same amount of tension as steel strings. Because of the lower tension, they do not require a truss rod to compensate for the string tension. Steel string or folk guitars u...
All classical guitars are acoustic. The differences come in when you consider the string material (classical acoustics usually have plastic strings in my experience) and a wider and bigger fretboard.
64,834,583
I am trying to get host name and IP address of hosts and save them to a file. I have this solution working; ```yaml - name: Create File with hosts and IP address. when: inventory_hostname in groups['local'] lineinfile: dest: "{{store_files_path}}/{{ansible_date_time.date}}/{{ansible_date_time.time}}/hosts.txt...
2020/11/14
[ "https://Stackoverflow.com/questions/64834583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12076640/" ]
I would use a jinja template for this : ```sh # hosts_file.j2 {% for server in groups['Servers'] %} {{hostvars[server]['ansible_facts']['hostname']}}:{{hostvars[server]['ansible_facts']['default_ipv4']['address']}} {% endfor %} ``` ```sh - hosts: localhost tasks: - name: create hosts file from template t...
You are making this extremely complicated for yourself. 1. You don't have to go via the `hostvars` in order to achieve what you want, the [special variables](https://docs.ansible.com/ansible/latest/reference_appendices/special_variables.html) are mostly giving you information on the host Ansible is currently acting on...
67,736,849
I downloaded and installed ruby from this <https://rubyinstaller.org/downloads/> -> Ruby+Devkit 2.7.3-1 (x64) and follow the installation steps. but I got a error when I tried to install mysql2 for rails using ``` gem install mysql2 ``` ruby version is 2.7.3p183 rails version is 6.1.3.2 gem version is 3.1.6 > > ...
2021/05/28
[ "https://Stackoverflow.com/questions/67736849", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6434472/" ]
Just count the first time a customer is seen. One method is two levels of aggregation: ``` select store, date_trunc('month', min_created_at), count(*) from (select store, customer_id, min(created_at) as min_created_at from a group by store, customer_id ) c group by 1, 2; ``` Note: `monthname()` is n...
Hope this sql statement helps! select store, monthname(created\_at), count(distinct customer\_id) from a where monthname(created\_at)=MONTHNAME(current\_date()) group by 1,2;
415,276
What is a single word to convey the sense of "inaccurate suspicion," but that tends to infer a bit of unfairness, such as > > It is immoral to use brutal force in response to [inaccurate suspicion]. > > >
2017/10/22
[ "https://english.stackexchange.com/questions/415276", "https://english.stackexchange.com", "https://english.stackexchange.com/users/164243/" ]
Inaccurate suspicion is supposition, but, as commented below, I think **misconception** is closer in meaning to the above question which is dealing not with a prior, unvoiced, suspicion but is about a suspicion that becomes active - so misconception would then be more appropriate, I feel. ***Misconception*** > > A v...
Suspicion is suspicion. Whether your suspicion is based on assumptions or not, it is always the feeling or belief that something may be possible or true. You can't have a bad suspicion nor a good suspicion. What you suspect to be possible is really what is at stake here, whether good or bad. The suspicion itself, howe...
415,276
What is a single word to convey the sense of "inaccurate suspicion," but that tends to infer a bit of unfairness, such as > > It is immoral to use brutal force in response to [inaccurate suspicion]. > > >
2017/10/22
[ "https://english.stackexchange.com/questions/415276", "https://english.stackexchange.com", "https://english.stackexchange.com/users/164243/" ]
Suspicion is suspicion. Whether your suspicion is based on assumptions or not, it is always the feeling or belief that something may be possible or true. You can't have a bad suspicion nor a good suspicion. What you suspect to be possible is really what is at stake here, whether good or bad. The suspicion itself, howe...
The precisest word in English to this concept is "surmise". * The OED defines: "To form a notion that the thing in question may be so, on slight grounds or without proof; to infer conjecturally." * A surmise is (obsoletely) "An allegation, charge, imputation; esp. a false, unfounded, or unproved charge or allegation."...
415,276
What is a single word to convey the sense of "inaccurate suspicion," but that tends to infer a bit of unfairness, such as > > It is immoral to use brutal force in response to [inaccurate suspicion]. > > >
2017/10/22
[ "https://english.stackexchange.com/questions/415276", "https://english.stackexchange.com", "https://english.stackexchange.com/users/164243/" ]
Suspicion is suspicion. Whether your suspicion is based on assumptions or not, it is always the feeling or belief that something may be possible or true. You can't have a bad suspicion nor a good suspicion. What you suspect to be possible is really what is at stake here, whether good or bad. The suspicion itself, howe...
**bogey** noun (FEAR) [ C usually singular ] (also bogie); (bogy) something that causes fear among a lot of people, often without reason: the bogey of unemployment <https://dictionary.cambridge.org/dictionary/english/bogey> "a mere bogey" gets the idea over even better but you wanted a single word.
415,276
What is a single word to convey the sense of "inaccurate suspicion," but that tends to infer a bit of unfairness, such as > > It is immoral to use brutal force in response to [inaccurate suspicion]. > > >
2017/10/22
[ "https://english.stackexchange.com/questions/415276", "https://english.stackexchange.com", "https://english.stackexchange.com/users/164243/" ]
Inaccurate suspicion is supposition, but, as commented below, I think **misconception** is closer in meaning to the above question which is dealing not with a prior, unvoiced, suspicion but is about a suspicion that becomes active - so misconception would then be more appropriate, I feel. ***Misconception*** > > A v...
The precisest word in English to this concept is "surmise". * The OED defines: "To form a notion that the thing in question may be so, on slight grounds or without proof; to infer conjecturally." * A surmise is (obsoletely) "An allegation, charge, imputation; esp. a false, unfounded, or unproved charge or allegation."...
415,276
What is a single word to convey the sense of "inaccurate suspicion," but that tends to infer a bit of unfairness, such as > > It is immoral to use brutal force in response to [inaccurate suspicion]. > > >
2017/10/22
[ "https://english.stackexchange.com/questions/415276", "https://english.stackexchange.com", "https://english.stackexchange.com/users/164243/" ]
Inaccurate suspicion is supposition, but, as commented below, I think **misconception** is closer in meaning to the above question which is dealing not with a prior, unvoiced, suspicion but is about a suspicion that becomes active - so misconception would then be more appropriate, I feel. ***Misconception*** > > A v...
**bogey** noun (FEAR) [ C usually singular ] (also bogie); (bogy) something that causes fear among a lot of people, often without reason: the bogey of unemployment <https://dictionary.cambridge.org/dictionary/english/bogey> "a mere bogey" gets the idea over even better but you wanted a single word.
415,276
What is a single word to convey the sense of "inaccurate suspicion," but that tends to infer a bit of unfairness, such as > > It is immoral to use brutal force in response to [inaccurate suspicion]. > > >
2017/10/22
[ "https://english.stackexchange.com/questions/415276", "https://english.stackexchange.com", "https://english.stackexchange.com/users/164243/" ]
The precisest word in English to this concept is "surmise". * The OED defines: "To form a notion that the thing in question may be so, on slight grounds or without proof; to infer conjecturally." * A surmise is (obsoletely) "An allegation, charge, imputation; esp. a false, unfounded, or unproved charge or allegation."...
**bogey** noun (FEAR) [ C usually singular ] (also bogie); (bogy) something that causes fear among a lot of people, often without reason: the bogey of unemployment <https://dictionary.cambridge.org/dictionary/english/bogey> "a mere bogey" gets the idea over even better but you wanted a single word.
40,134,939
I have the following code:`titledbApp.controller('TitleListController', ['$cookieStore', function($scope, $http, $cookieStore) {` It **won't** work - It basically cants detect $CookieStore and says it's `undefined` so all .get and .put requests fail. When I move `$cookieStore` in `function()` to the start (Before `$s...
2016/10/19
[ "https://Stackoverflow.com/questions/40134939", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6846750/" ]
``` titledbApp.controller('TitleListController', ['$cookieStore', function($cookieStore, $scope, $http) ``` Should be ``` titledbApp.controller('TitleListController', ['$cookieStore', '$scope', '$http', function($cookieStore, $scope, $http) ``` You have to inject them all before you can access them in your code.
According to angular js official documentation, the order and the no: of parameters of the dependencies should be same. ``` titledbApp.controller('TitleListController', ['$cookieStore','$scope', '$http', function($cookieStore, $scope, $http) { $cookieStore.put('ETag', 'test'); var etag = 't'; $http.get('ht...
3,421,740
I have got a DLL and a program, both written with Delphi 2007. The program passes an interface, which descends from IInterface and does not have a GUID (so no COM here) to the DLL which stores it for later use. This seems to work fine but sometimes I get access violations when the program is closed and the DLL is unlo...
2010/08/06
[ "https://Stackoverflow.com/questions/3421740", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49925/" ]
Yes, that should work just fine if it's all Delphi. You do have to make sure to compile both if the interface changes. C++ compilers seems to be compatible, but do watch out for other compilers. Normally a reference count reaching zero causes the creator of the object to free it. No problems in different memory manage...
There's nothing wrong with passing interfaces to and from DLLs. That's exactly what you're doing every time you use an interface from the Windows API, after all. Therefore, your problem lies deeper. Lacking a GUID is a simple problem to fix. Simply press Ctrl+Shift+G. Then you have no barriers to using COM. All interf...
37,365
The "officially" voiceless alveolar-palatine affricate does not exist in English. But I can clearly hear it in the sentence "Ouch that hurt" (when the computer reads this sentence and often when actors say it in the movies). I am Polish and for me the English "ouch" sounds the same as the Polish "auć" (and means exactl...
2020/10/13
[ "https://linguistics.stackexchange.com/questions/37365", "https://linguistics.stackexchange.com", "https://linguistics.stackexchange.com/users/30857/" ]
Co-editor of PHOIBLE here. In the feature system used in PHOIBLE, `a` is considered to have features `-front` and `-back` — i.e., a (low) central vowel, not a (low) front vowel. Therefore you would think that `a̟` should be considered as a low front vowel (as your instincts suggested). However, that featural specificat...
It isn't clearly established whether there are any phonetic categories of sounds, and it's possible that what exists in the phonetic component is all continua (that is certainly the case with physical realization, which is the other way that people think about "phonetics"). The term "front" is a phonological categories...
31,996,021
When I create a composite component with a facet in it and place a command link within that facet, I get an error message: `This link is disabled as it is not nested within a JSF form.` A commandButton does not behave in the same way, so I am inclined to this this is a bug. index.xhtml : ``` <?xml version='1.0' enco...
2015/08/13
[ "https://Stackoverflow.com/questions/31996021", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5153794/" ]
an old thread but i think the current behaviour is a bug, because the following works, and so it should work in a composite component: **component.xhtml:** ``` <?xml version='1.0' encoding='UTF-8' ?> <ui:component xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:cc="http://xmlns.jcp....
I'm doing the same thing, except I'm inserting a PrimeFaces' p:commandButton via the facet - the button works, the only problem are the warnings, so I'm providing a solution for those. Add a componentType: ``` <cc:interface componentType="myComponent"> ``` And a corresponing java class: ``` import javax.faces.comp...
27,715,491
How do you check if a port is open when you cannot use telnet or install Cacti? I want to see if a port is open between two Linux servers. Telnet isn't installed. I tried this command: ``` cat < /dev/tcp/x.x.x.x/6061 ``` where x.x.x.x was the remote IP address of the Linux server and port 6061 is the port that I wa...
2014/12/31
[ "https://Stackoverflow.com/questions/27715491", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4407164/" ]
Install nmap and than: ``` nmap x.x.x.x ```
Better use (if installed) : [netcat](/questions/tagged/netcat "show questions tagged 'netcat'") : ``` nc -zw3 <host> <port> ``` If you want to use the [bash](/questions/tagged/bash "show questions tagged 'bash'") feature *net redirection* : ``` cat < /dev/tcp/x.x.x.x/6061 ``` do it the right way : ``` { exec 3<>...
16,284,273
I want to run this .BAT file when a user logs into their windows account: ![enter image description here](https://i.stack.imgur.com/E5b6O.gif) [file.bat] ``` start http://www.google.ca ```
2013/04/29
[ "https://Stackoverflow.com/questions/16284273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2309648/" ]
They're equivalent in this case, but only because it's a pseudo-element, not a pseudo-class. The double-colon syntax was created in order to prevent the confusion arising from calling single-colon pseudo-elements "pseudo-classes" (which your question demonstrates, oddly enough). From the [spec](http://www.w3.org/TR/sel...
Checked the spec? > > This :: notation is introduced by the current document in order to > establish a discrimination between pseudo-classes and pseudo-elements. > For compatibility with existing style sheets, user agents must also > accept the previous one-colon notation for pseudo-elements introduced > in CSS l...
525,000
I'm trying to draw a (commutative) diagram using `tikz-cd`. The package manual, in section 3.2, describes how to use `to path` for fine-grained control of the shapes of arrows, but says little on how to then add labels to these arrows. I currently have the following diagram: ``` \documentclass{article} \usepackage{ti...
2020/01/20
[ "https://tex.stackexchange.com/questions/525000", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/158639/" ]
You can add a node at the second segment of the path. [![enter image description here](https://i.stack.imgur.com/Hr8C6.png)](https://i.stack.imgur.com/Hr8C6.png) ``` \begin{tikzcd} & K^n \arrow[r, "L^A_B(F)"] \arrow[dd, rounded corners, to path={ -- ([xshift=-10ex]\tikztostart.west) --node[...
Another option is to use `\tikztonodes` in `to path` and then use quotes to specify the labels. The labels specified using the quotes get stored into `\tikztonodes`. This is much more useful if you want to use the same "tikz to path" to draw multiple paths. ``` \documentclass{article} \usepackage{tikz-cd} \begin{docum...
525,000
I'm trying to draw a (commutative) diagram using `tikz-cd`. The package manual, in section 3.2, describes how to use `to path` for fine-grained control of the shapes of arrows, but says little on how to then add labels to these arrows. I currently have the following diagram: ``` \documentclass{article} \usepackage{ti...
2020/01/20
[ "https://tex.stackexchange.com/questions/525000", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/158639/" ]
You can add a node at the second segment of the path. [![enter image description here](https://i.stack.imgur.com/Hr8C6.png)](https://i.stack.imgur.com/Hr8C6.png) ``` \begin{tikzcd} & K^n \arrow[r, "L^A_B(F)"] \arrow[dd, rounded corners, to path={ -- ([xshift=-10ex]\tikztostart.west) --node[...
On encouragement by "Schrodinger's cat" I made a general key to do this. I called it "relay arrow" but if anyone has a better name, let me know. It works by saying e.g., `\ar[ur, relay arrow=10pt]`. This is strictly speaking not relevant to the question asked, but my hope is it might be useful to someone. Here's the...
525,000
I'm trying to draw a (commutative) diagram using `tikz-cd`. The package manual, in section 3.2, describes how to use `to path` for fine-grained control of the shapes of arrows, but says little on how to then add labels to these arrows. I currently have the following diagram: ``` \documentclass{article} \usepackage{ti...
2020/01/20
[ "https://tex.stackexchange.com/questions/525000", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/158639/" ]
You can add a node at the second segment of the path. [![enter image description here](https://i.stack.imgur.com/Hr8C6.png)](https://i.stack.imgur.com/Hr8C6.png) ``` \begin{tikzcd} & K^n \arrow[r, "L^A_B(F)"] \arrow[dd, rounded corners, to path={ -- ([xshift=-10ex]\tikztostart.west) --node[...
This uses plain TikZ. `pos=.25` is due to operation `++` that updated the new position for calculations. [![enter image description here](https://i.stack.imgur.com/Ia492.png)](https://i.stack.imgur.com/Ia492.png) ``` \documentclass[tikz,border=5mm]{standalone} \begin{document} \begin{tikzpicture} \def\a{2.5} \def\b{...
525,000
I'm trying to draw a (commutative) diagram using `tikz-cd`. The package manual, in section 3.2, describes how to use `to path` for fine-grained control of the shapes of arrows, but says little on how to then add labels to these arrows. I currently have the following diagram: ``` \documentclass{article} \usepackage{ti...
2020/01/20
[ "https://tex.stackexchange.com/questions/525000", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/158639/" ]
On encouragement by "Schrodinger's cat" I made a general key to do this. I called it "relay arrow" but if anyone has a better name, let me know. It works by saying e.g., `\ar[ur, relay arrow=10pt]`. This is strictly speaking not relevant to the question asked, but my hope is it might be useful to someone. Here's the...
Another option is to use `\tikztonodes` in `to path` and then use quotes to specify the labels. The labels specified using the quotes get stored into `\tikztonodes`. This is much more useful if you want to use the same "tikz to path" to draw multiple paths. ``` \documentclass{article} \usepackage{tikz-cd} \begin{docum...
525,000
I'm trying to draw a (commutative) diagram using `tikz-cd`. The package manual, in section 3.2, describes how to use `to path` for fine-grained control of the shapes of arrows, but says little on how to then add labels to these arrows. I currently have the following diagram: ``` \documentclass{article} \usepackage{ti...
2020/01/20
[ "https://tex.stackexchange.com/questions/525000", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/158639/" ]
On encouragement by "Schrodinger's cat" I made a general key to do this. I called it "relay arrow" but if anyone has a better name, let me know. It works by saying e.g., `\ar[ur, relay arrow=10pt]`. This is strictly speaking not relevant to the question asked, but my hope is it might be useful to someone. Here's the...
This uses plain TikZ. `pos=.25` is due to operation `++` that updated the new position for calculations. [![enter image description here](https://i.stack.imgur.com/Ia492.png)](https://i.stack.imgur.com/Ia492.png) ``` \documentclass[tikz,border=5mm]{standalone} \begin{document} \begin{tikzpicture} \def\a{2.5} \def\b{...
2,578
En [¿Cuáles son los mejores sitios para compartir enlaces y atraer tráfico?](https://spanish.meta.stackexchange.com/q/2509/1674), Carlos Alejo preguntaba cuáles pueden ser los mejores lugares donde publicitar este sitio, Spanish Language. Estuvimos comentando un poco y al cabo de unos meses recordé que existen los [Co...
2017/02/03
[ "https://spanish.meta.stackexchange.com/questions/2578", "https://spanish.meta.stackexchange.com", "https://spanish.meta.stackexchange.com/users/1674/" ]
[![Difference between "chiste" and "chanza"](https://i.stack.imgur.com/jOEfv.png)](https://spanish.stackexchange.com/q/10070/12637)
[!["Chinga" - common slang? Origin?](https://i.stack.imgur.com/ta2Ky.png)](https://spanish.stackexchange.com/q/3124/12637) La siguiente opción la pongo solo si al público mexicano no le importa (aunque la imagen del sombrero tiene una licencia Creative Commons que nos obliga a citar al autor en caso de que se elija): ...
2,578
En [¿Cuáles son los mejores sitios para compartir enlaces y atraer tráfico?](https://spanish.meta.stackexchange.com/q/2509/1674), Carlos Alejo preguntaba cuáles pueden ser los mejores lugares donde publicitar este sitio, Spanish Language. Estuvimos comentando un poco y al cabo de unos meses recordé que existen los [Co...
2017/02/03
[ "https://spanish.meta.stackexchange.com/questions/2578", "https://spanish.meta.stackexchange.com", "https://spanish.meta.stackexchange.com/users/1674/" ]
[![Difference between "chiste" and "chanza"](https://i.stack.imgur.com/jOEfv.png)](https://spanish.stackexchange.com/q/10070/12637)
Prueba de cargar la imagen con los bounties del sitio: [![Current Travel.SE bounties](https://i.stack.imgur.com/TtBHv.png)](https://spanish.stackexchange.com/questions?sort=featured) (fuente: [herokuapp.com](https://stack-exchange-dynamic-ads.herokuapp.com/spanish.stackexchange.com/bounty.png))
2,578
En [¿Cuáles son los mejores sitios para compartir enlaces y atraer tráfico?](https://spanish.meta.stackexchange.com/q/2509/1674), Carlos Alejo preguntaba cuáles pueden ser los mejores lugares donde publicitar este sitio, Spanish Language. Estuvimos comentando un poco y al cabo de unos meses recordé que existen los [Co...
2017/02/03
[ "https://spanish.meta.stackexchange.com/questions/2578", "https://spanish.meta.stackexchange.com", "https://spanish.meta.stackexchange.com/users/1674/" ]
[!["Chinga" - common slang? Origin?](https://i.stack.imgur.com/ta2Ky.png)](https://spanish.stackexchange.com/q/3124/12637) La siguiente opción la pongo solo si al público mexicano no le importa (aunque la imagen del sombrero tiene una licencia Creative Commons que nos obliga a citar al autor en caso de que se elija): ...
Prueba de cargar la imagen con los bounties del sitio: [![Current Travel.SE bounties](https://i.stack.imgur.com/TtBHv.png)](https://spanish.stackexchange.com/questions?sort=featured) (fuente: [herokuapp.com](https://stack-exchange-dynamic-ads.herokuapp.com/spanish.stackexchange.com/bounty.png))
272,101
I start to work with a dataset with more than 3000 samples, and realize that ACF plot does not make sense with respect of confidence intervals, see figure. [![enter image description here](https://i.stack.imgur.com/SXbla.png)](https://i.stack.imgur.com/SXbla.png) My purpose is to fit an ARIMA on this, however, I'm no...
2017/04/05
[ "https://stats.stackexchange.com/questions/272101", "https://stats.stackexchange.com", "https://stats.stackexchange.com/users/143783/" ]
From the ACF plot, it seems there is periodic behind it , try the seasonal difference. If possible, do the unit root test to make sure the series is stationary before chooses the parameters for arima .
In case of a large sample you don't need to do ACF, you can use spectral analysis with periodograms, FFT etc. ACF and ARIMA is a poor man's spectral analysis when the sample is small. Whether 3,000 is a large sample is a different question
38,496,387
This may be trivial. But I could not able to get my heads over this. ``` public class Manager { public int ID { get; set; } public List<Employee> Employees { get; set; } public bool IsAllEmpEngaged { get; set; } public void UpdateIsAllEmpEngaged() { IsAllEmpEngaged = Employees.All(emp => em...
2016/07/21
[ "https://Stackoverflow.com/questions/38496387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2819451/" ]
Simple solution is add **ManagerId** as well to the Employee model class and after your line of code that sets IsEngagedwithWork of the employee instance (say emp), do the below thing `Manager mngr = managers.Select(m => m.ID == emp.ManagerId).FirstOrDefault();` `if(mngr != null)` `mngr.IsAllEmpEngaged = mngr.IsAl...
What i would do : * make IsAllEmpEngaged private * make the collection Empoyess private and add a function that add a new employee: * Add a function that adds a new employee. And now two choiches : 1) after the employee is added, iterate the collection and update the IsAllEmpEngaged property ``` public void AddNew...
38,496,387
This may be trivial. But I could not able to get my heads over this. ``` public class Manager { public int ID { get; set; } public List<Employee> Employees { get; set; } public bool IsAllEmpEngaged { get; set; } public void UpdateIsAllEmpEngaged() { IsAllEmpEngaged = Employees.All(emp => em...
2016/07/21
[ "https://Stackoverflow.com/questions/38496387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2819451/" ]
Simple solution is add **ManagerId** as well to the Employee model class and after your line of code that sets IsEngagedwithWork of the employee instance (say emp), do the below thing `Manager mngr = managers.Select(m => m.ID == emp.ManagerId).FirstOrDefault();` `if(mngr != null)` `mngr.IsAllEmpEngaged = mngr.IsAl...
I can't say that this is any better, but surely this is a simple and easy way. Why not just make `IsAllEmpEngaged` a method? You don't even need the `set` property accessor, so a method should suffice. ``` public bool IsAllEmpEngaged() { if (Employees == null) { // throw error } return Employ...
38,496,387
This may be trivial. But I could not able to get my heads over this. ``` public class Manager { public int ID { get; set; } public List<Employee> Employees { get; set; } public bool IsAllEmpEngaged { get; set; } public void UpdateIsAllEmpEngaged() { IsAllEmpEngaged = Employees.All(emp => em...
2016/07/21
[ "https://Stackoverflow.com/questions/38496387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2819451/" ]
Simple solution is add **ManagerId** as well to the Employee model class and after your line of code that sets IsEngagedwithWork of the employee instance (say emp), do the below thing `Manager mngr = managers.Select(m => m.ID == emp.ManagerId).FirstOrDefault();` `if(mngr != null)` `mngr.IsAllEmpEngaged = mngr.IsAl...
Maybe it work's when you pass your Manager as parameter to Employee and then call your Method if IsEngagedWithWork is set to true. ``` public class Employee { private Manager _parentManager; public Employee(Manager parentManager) { _parentManager=parentManager; } public int ID { get; set;...
38,496,387
This may be trivial. But I could not able to get my heads over this. ``` public class Manager { public int ID { get; set; } public List<Employee> Employees { get; set; } public bool IsAllEmpEngaged { get; set; } public void UpdateIsAllEmpEngaged() { IsAllEmpEngaged = Employees.All(emp => em...
2016/07/21
[ "https://Stackoverflow.com/questions/38496387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2819451/" ]
I'd use the getter of the property like that ``` public bool IsAllEmpEngaged { get { return (Employees != null) && Employees.All(e => e.IsEngagedwithWork) } } ``` and you add the following method for the Manager Class ``` public void NotifyChanged() { OnPropertyChanged(() => IsAl...
What i would do : * make IsAllEmpEngaged private * make the collection Empoyess private and add a function that add a new employee: * Add a function that adds a new employee. And now two choiches : 1) after the employee is added, iterate the collection and update the IsAllEmpEngaged property ``` public void AddNew...
38,496,387
This may be trivial. But I could not able to get my heads over this. ``` public class Manager { public int ID { get; set; } public List<Employee> Employees { get; set; } public bool IsAllEmpEngaged { get; set; } public void UpdateIsAllEmpEngaged() { IsAllEmpEngaged = Employees.All(emp => em...
2016/07/21
[ "https://Stackoverflow.com/questions/38496387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2819451/" ]
I'd use the getter of the property like that ``` public bool IsAllEmpEngaged { get { return (Employees != null) && Employees.All(e => e.IsEngagedwithWork) } } ``` and you add the following method for the Manager Class ``` public void NotifyChanged() { OnPropertyChanged(() => IsAl...
I can't say that this is any better, but surely this is a simple and easy way. Why not just make `IsAllEmpEngaged` a method? You don't even need the `set` property accessor, so a method should suffice. ``` public bool IsAllEmpEngaged() { if (Employees == null) { // throw error } return Employ...
38,496,387
This may be trivial. But I could not able to get my heads over this. ``` public class Manager { public int ID { get; set; } public List<Employee> Employees { get; set; } public bool IsAllEmpEngaged { get; set; } public void UpdateIsAllEmpEngaged() { IsAllEmpEngaged = Employees.All(emp => em...
2016/07/21
[ "https://Stackoverflow.com/questions/38496387", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2819451/" ]
I'd use the getter of the property like that ``` public bool IsAllEmpEngaged { get { return (Employees != null) && Employees.All(e => e.IsEngagedwithWork) } } ``` and you add the following method for the Manager Class ``` public void NotifyChanged() { OnPropertyChanged(() => IsAl...
Maybe it work's when you pass your Manager as parameter to Employee and then call your Method if IsEngagedWithWork is set to true. ``` public class Employee { private Manager _parentManager; public Employee(Manager parentManager) { _parentManager=parentManager; } public int ID { get; set;...
442,864
On osx/linux I want to be able to run a command/script on the terminal from anywhere which links to a program. ie I want to be able to run: alloy that runs: `/usr/local/share/npm/lib/node_modules/alloy/bin/alloy` I'm guessing adding to .bashrc is the best way? I've tried running: `export PATH="$PATH:/usr/local/sh...
2012/10/26
[ "https://serverfault.com/questions/442864", "https://serverfault.com", "https://serverfault.com/users/22721/" ]
The best place to add to PATH is not the ~/.bashrc file, but the ~/.bash\_profile if it exists. If .bash\_profile does not exist, the best place is ~/.profile. The ~ part is automatically expanded to be your home directory (`/home/you`). When you login and execute bash as the "login shell", it reads .bash\_profile. If...
One simply solution to this that doesn't require manipulating the path is to simply create a symlink to the application in the `/usr/local/bin` or `/usr/local/sbin` folders, since those folders are already in your path. I often use this for programs that install to `/opt`, `/usr/local` or other places which are not in ...
42,426,244
I have the following JSON array : ``` { "list": [{ "name": "Assignment", "id": 67, "template": 0, "children": [{ "assignmentnumber": 1000, "fromCountry": "Sweden", "toCountry": "Spain", "fromCity": "Stockholm", "toCity": "Madrid" }, { "assignmentnumbe...
2017/02/23
[ "https://Stackoverflow.com/questions/42426244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7401578/" ]
You should use `map` method, which accepts as parameter a `callback` function. > > The map() method creates a new array with the results of calling a > provided function on every element in this array. > > > ``` var array=obj.list.map(callback); function callback(item){ return item.name; } ``` Or simply: ...
You can do this without lodash, using native Array APIs. ``` const obj = { /* The JSON in your question */ }; const names = obj.list.map(item => item.name); ``` `Array.map()` takes a function and calls that function on each item of an array, returning a new array containing the result of each item.
42,426,244
I have the following JSON array : ``` { "list": [{ "name": "Assignment", "id": 67, "template": 0, "children": [{ "assignmentnumber": 1000, "fromCountry": "Sweden", "toCountry": "Spain", "fromCity": "Stockholm", "toCity": "Madrid" }, { "assignmentnumbe...
2017/02/23
[ "https://Stackoverflow.com/questions/42426244", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7401578/" ]
You should use `map` method, which accepts as parameter a `callback` function. > > The map() method creates a new array with the results of calling a > provided function on every element in this array. > > > ``` var array=obj.list.map(callback); function callback(item){ return item.name; } ``` Or simply: ...
Map is the best way to go as everyone else stated. Another alternative is use a forEach loop, specially if you want to operate with them. ``` var children = obj.children; var array_of_names; children.forEach(function (item)){ array_of_names.push(item.name); //... Do more operations for each item } ```
24,433,586
I've got a script that I want to include a html file based on the list item's id. I've got two list items ``` <ul class="fruits"> <li id="0">Apples</li> <li id="1">Pears</li> </ul> ``` Now here's my script so far. Basically I want to check the `id` of the selected list item and insert a html file ...
2014/06/26
[ "https://Stackoverflow.com/questions/24433586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3779842/" ]
You could do something cleaner, like that : HTML part : ``` <ul class="fruits"> <li data-dest="blocktext/apple.html">Apples</li> <li data-dest="blocktext/pears.html" >Pears</li> </ul> ``` JS part : ``` $(document).ready(function() { $(".fruits li").click(function() { // you don't need IDs...
Try this: ``` $(document).ready(function () { $(".fruits li").click(function () { if ($(this).attr("id") == "0") { //alert("aa"); $(".fruit_copy").load("blocktext/apple.html"); } }); }); ``` Assuming your relative path is correct. Also, in `HTML 5` you can use ID's as numbers but `HTML 4...
24,433,586
I've got a script that I want to include a html file based on the list item's id. I've got two list items ``` <ul class="fruits"> <li id="0">Apples</li> <li id="1">Pears</li> </ul> ``` Now here's my script so far. Basically I want to check the `id` of the selected list item and insert a html file ...
2014/06/26
[ "https://Stackoverflow.com/questions/24433586", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3779842/" ]
You could do something cleaner, like that : HTML part : ``` <ul class="fruits"> <li data-dest="blocktext/apple.html">Apples</li> <li data-dest="blocktext/pears.html" >Pears</li> </ul> ``` JS part : ``` $(document).ready(function() { $(".fruits li").click(function() { // you don't need IDs...
* The options values are "falsey", they're strings whilst you're checking integers, help it by adding `.toString()`: We also append the `===` so we're not type checking - string to string. ``` if ( this.id.toString() === "0" ) { //Code } ``` * Lastly, check your console & use the network tab to see if your scrip...
458,644
I found a way to extend classes in VBScript, but are there any ways to pass in parameters or overload the constructor? I am currently using an Init function to initialize the properties, but would like to be able to do this when I create the object. This is my sample class: ``` Class Test Private strText P...
2009/01/19
[ "https://Stackoverflow.com/questions/458644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38695/" ]
You can work around it by having your Init function returning the object itself... ``` Class Test Private m_s Public Function Init(s) m_s = s Set Init = Me End Function Public Function Hello() Hello = m_s End Function End Class Dim o Set o = (New Test).Init("hello world") Echo o.Hello ```
You have to do it in two steps. VB Script doesn't support overloading so you can't modify the default constructor with new parameters. Same goes for Vb6
458,644
I found a way to extend classes in VBScript, but are there any ways to pass in parameters or overload the constructor? I am currently using an Init function to initialize the properties, but would like to be able to do this when I create the object. This is my sample class: ``` Class Test Private strText P...
2009/01/19
[ "https://Stackoverflow.com/questions/458644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38695/" ]
Just to alter slightly on svinto's method... ``` Class Test Private m_s Public Default Function Init(s) m_s = s Set Init = Me End Function Public Function Hello() Hello = m_s End Function End Class Dim o : Set o = (New Test)("hello world") ``` Is how I do it. Sadly no overloading though. [ed...
You have to do it in two steps. VB Script doesn't support overloading so you can't modify the default constructor with new parameters. Same goes for Vb6
458,644
I found a way to extend classes in VBScript, but are there any ways to pass in parameters or overload the constructor? I am currently using an Init function to initialize the properties, but would like to be able to do this when I create the object. This is my sample class: ``` Class Test Private strText P...
2009/01/19
[ "https://Stackoverflow.com/questions/458644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38695/" ]
You have to do it in two steps. VB Script doesn't support overloading so you can't modify the default constructor with new parameters. Same goes for Vb6
A bit hackish, for sure, but when I need varargs in calls, one of my parameters I pass in as an array, i.e. ``` Rem printf done poorly sub printf(fmt, args) dim fp, vap: dim outs: dim fini: fini = 0: vap = 0: while (not fini) fp = index(fmt,"%"): if (not(isNull(fp))) then ' do somet...
458,644
I found a way to extend classes in VBScript, but are there any ways to pass in parameters or overload the constructor? I am currently using an Init function to initialize the properties, but would like to be able to do this when I create the object. This is my sample class: ``` Class Test Private strText P...
2009/01/19
[ "https://Stackoverflow.com/questions/458644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38695/" ]
Just to alter slightly on svinto's method... ``` Class Test Private m_s Public Default Function Init(s) m_s = s Set Init = Me End Function Public Function Hello() Hello = m_s End Function End Class Dim o : Set o = (New Test)("hello world") ``` Is how I do it. Sadly no overloading though. [ed...
You can work around it by having your Init function returning the object itself... ``` Class Test Private m_s Public Function Init(s) m_s = s Set Init = Me End Function Public Function Hello() Hello = m_s End Function End Class Dim o Set o = (New Test).Init("hello world") Echo o.Hello ```
458,644
I found a way to extend classes in VBScript, but are there any ways to pass in parameters or overload the constructor? I am currently using an Init function to initialize the properties, but would like to be able to do this when I create the object. This is my sample class: ``` Class Test Private strText P...
2009/01/19
[ "https://Stackoverflow.com/questions/458644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38695/" ]
You can work around it by having your Init function returning the object itself... ``` Class Test Private m_s Public Function Init(s) m_s = s Set Init = Me End Function Public Function Hello() Hello = m_s End Function End Class Dim o Set o = (New Test).Init("hello world") Echo o.Hello ```
A bit hackish, for sure, but when I need varargs in calls, one of my parameters I pass in as an array, i.e. ``` Rem printf done poorly sub printf(fmt, args) dim fp, vap: dim outs: dim fini: fini = 0: vap = 0: while (not fini) fp = index(fmt,"%"): if (not(isNull(fp))) then ' do somet...
458,644
I found a way to extend classes in VBScript, but are there any ways to pass in parameters or overload the constructor? I am currently using an Init function to initialize the properties, but would like to be able to do this when I create the object. This is my sample class: ``` Class Test Private strText P...
2009/01/19
[ "https://Stackoverflow.com/questions/458644", "https://Stackoverflow.com", "https://Stackoverflow.com/users/38695/" ]
Just to alter slightly on svinto's method... ``` Class Test Private m_s Public Default Function Init(s) m_s = s Set Init = Me End Function Public Function Hello() Hello = m_s End Function End Class Dim o : Set o = (New Test)("hello world") ``` Is how I do it. Sadly no overloading though. [ed...
A bit hackish, for sure, but when I need varargs in calls, one of my parameters I pass in as an array, i.e. ``` Rem printf done poorly sub printf(fmt, args) dim fp, vap: dim outs: dim fini: fini = 0: vap = 0: while (not fini) fp = index(fmt,"%"): if (not(isNull(fp))) then ' do somet...
39,568,825
I want to create a complex User defined AIF Query service by using Visual studio and writing code for query service in C#. I am using two custom tables among which one is header and one is line table. I have added fields in the query by using both the tables and applies proper ranges as well and it works fine. Now I wa...
2016/09/19
[ "https://Stackoverflow.com/questions/39568825", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6847920/" ]
If you don't want your application to log anything, you can change the logging engine to use [Dancer2::Logger::Null](https://v1.metacpan.org/pod/distribution/Dancer2/lib/Dancer2/Logger/Null.pm). You do that by editing your *config.yml*, or in one of your environments. For example, to turn it off in producion, change *#...
You could use [select](http://perldoc.perl.org/functions/select.html) before redirecting to save it in a variable ``` my $oldfh = select(STDERR); ``` and then use it later ``` select($oldfh); ``` Also check out: * [Capture::Tiny::Extended](https://metacpan.org/pod/Capture::Tiny::Extended) * [How to redirect and ...
5,668,886
Is it possible to create a mysql select (directly or using a stored procedure) that will return blanks for repeating columns. For example, a select that would normally return these 7 records with 2 columns: ``` Bob 123 Bob 557 Bob 888 Joe 887 Joe 223 Tom 899 Tom 999 ``` I would prefer to see this direc...
2011/04/14
[ "https://Stackoverflow.com/questions/5668886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259538/" ]
Yes, it's possible, but it would be **very expensive** (subqueries!) and not at all efficient. Whatever language you use or however you transfer this data directly, it's not worth it to have SQL spare these few bytes.
It seems like it would be a huge waste of resources to not do it through your application, but one way that you could do this is to use [PL/SQL](http://en.wikipedia.org/wiki/PL/SQL) in a stored procedure or something similar to populate a some temporary table. With this you could declare a variable for if the name equa...
5,668,886
Is it possible to create a mysql select (directly or using a stored procedure) that will return blanks for repeating columns. For example, a select that would normally return these 7 records with 2 columns: ``` Bob 123 Bob 557 Bob 888 Joe 887 Joe 223 Tom 899 Tom 999 ``` I would prefer to see this direc...
2011/04/14
[ "https://Stackoverflow.com/questions/5668886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259538/" ]
Yes, it's possible, but it would be **very expensive** (subqueries!) and not at all efficient. Whatever language you use or however you transfer this data directly, it's not worth it to have SQL spare these few bytes.
Following should work but it doesn't return the results in the order you've used in your example. ``` SELECT IF(n.ID = nm.ID, n.Name, NULL) , n.ID FROM Names n INNER JOIN ( SELECT Name , ID = MIN(ID) FROM Names GROUP BY N...
5,668,886
Is it possible to create a mysql select (directly or using a stored procedure) that will return blanks for repeating columns. For example, a select that would normally return these 7 records with 2 columns: ``` Bob 123 Bob 557 Bob 888 Joe 887 Joe 223 Tom 899 Tom 999 ``` I would prefer to see this direc...
2011/04/14
[ "https://Stackoverflow.com/questions/5668886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259538/" ]
Yes, it's possible, but it would be **very expensive** (subqueries!) and not at all efficient. Whatever language you use or however you transfer this data directly, it's not worth it to have SQL spare these few bytes.
For MySQL (I guess it should be similar for other DBs), to avoid repeating a column value on every row, you can make good use of variables. No subqueries necessary: light and quick. ``` //Init a variable SET @previous:=""; //Remember previous row value SELECT IF(Name=@previous, "", @previous:=Name) AS GroupedName, V...
5,668,886
Is it possible to create a mysql select (directly or using a stored procedure) that will return blanks for repeating columns. For example, a select that would normally return these 7 records with 2 columns: ``` Bob 123 Bob 557 Bob 888 Joe 887 Joe 223 Tom 899 Tom 999 ``` I would prefer to see this direc...
2011/04/14
[ "https://Stackoverflow.com/questions/5668886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259538/" ]
Yes, it's possible, but it would be **very expensive** (subqueries!) and not at all efficient. Whatever language you use or however you transfer this data directly, it's not worth it to have SQL spare these few bytes.
For future readers, here is a select query that will return blanks for repeating column values. ``` SELECT IF(name=@previous, "", @previous:=name) as name_, value FROM (SELECT @previous:= '') AS temp, tableName ORDER BY name ```
5,668,886
Is it possible to create a mysql select (directly or using a stored procedure) that will return blanks for repeating columns. For example, a select that would normally return these 7 records with 2 columns: ``` Bob 123 Bob 557 Bob 888 Joe 887 Joe 223 Tom 899 Tom 999 ``` I would prefer to see this direc...
2011/04/14
[ "https://Stackoverflow.com/questions/5668886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259538/" ]
Following should work but it doesn't return the results in the order you've used in your example. ``` SELECT IF(n.ID = nm.ID, n.Name, NULL) , n.ID FROM Names n INNER JOIN ( SELECT Name , ID = MIN(ID) FROM Names GROUP BY N...
It seems like it would be a huge waste of resources to not do it through your application, but one way that you could do this is to use [PL/SQL](http://en.wikipedia.org/wiki/PL/SQL) in a stored procedure or something similar to populate a some temporary table. With this you could declare a variable for if the name equa...
5,668,886
Is it possible to create a mysql select (directly or using a stored procedure) that will return blanks for repeating columns. For example, a select that would normally return these 7 records with 2 columns: ``` Bob 123 Bob 557 Bob 888 Joe 887 Joe 223 Tom 899 Tom 999 ``` I would prefer to see this direc...
2011/04/14
[ "https://Stackoverflow.com/questions/5668886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259538/" ]
It seems like it would be a huge waste of resources to not do it through your application, but one way that you could do this is to use [PL/SQL](http://en.wikipedia.org/wiki/PL/SQL) in a stored procedure or something similar to populate a some temporary table. With this you could declare a variable for if the name equa...
For future readers, here is a select query that will return blanks for repeating column values. ``` SELECT IF(name=@previous, "", @previous:=name) as name_, value FROM (SELECT @previous:= '') AS temp, tableName ORDER BY name ```
5,668,886
Is it possible to create a mysql select (directly or using a stored procedure) that will return blanks for repeating columns. For example, a select that would normally return these 7 records with 2 columns: ``` Bob 123 Bob 557 Bob 888 Joe 887 Joe 223 Tom 899 Tom 999 ``` I would prefer to see this direc...
2011/04/14
[ "https://Stackoverflow.com/questions/5668886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259538/" ]
Following should work but it doesn't return the results in the order you've used in your example. ``` SELECT IF(n.ID = nm.ID, n.Name, NULL) , n.ID FROM Names n INNER JOIN ( SELECT Name , ID = MIN(ID) FROM Names GROUP BY N...
For MySQL (I guess it should be similar for other DBs), to avoid repeating a column value on every row, you can make good use of variables. No subqueries necessary: light and quick. ``` //Init a variable SET @previous:=""; //Remember previous row value SELECT IF(Name=@previous, "", @previous:=Name) AS GroupedName, V...
5,668,886
Is it possible to create a mysql select (directly or using a stored procedure) that will return blanks for repeating columns. For example, a select that would normally return these 7 records with 2 columns: ``` Bob 123 Bob 557 Bob 888 Joe 887 Joe 223 Tom 899 Tom 999 ``` I would prefer to see this direc...
2011/04/14
[ "https://Stackoverflow.com/questions/5668886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259538/" ]
Following should work but it doesn't return the results in the order you've used in your example. ``` SELECT IF(n.ID = nm.ID, n.Name, NULL) , n.ID FROM Names n INNER JOIN ( SELECT Name , ID = MIN(ID) FROM Names GROUP BY N...
For future readers, here is a select query that will return blanks for repeating column values. ``` SELECT IF(name=@previous, "", @previous:=name) as name_, value FROM (SELECT @previous:= '') AS temp, tableName ORDER BY name ```
5,668,886
Is it possible to create a mysql select (directly or using a stored procedure) that will return blanks for repeating columns. For example, a select that would normally return these 7 records with 2 columns: ``` Bob 123 Bob 557 Bob 888 Joe 887 Joe 223 Tom 899 Tom 999 ``` I would prefer to see this direc...
2011/04/14
[ "https://Stackoverflow.com/questions/5668886", "https://Stackoverflow.com", "https://Stackoverflow.com/users/259538/" ]
For MySQL (I guess it should be similar for other DBs), to avoid repeating a column value on every row, you can make good use of variables. No subqueries necessary: light and quick. ``` //Init a variable SET @previous:=""; //Remember previous row value SELECT IF(Name=@previous, "", @previous:=Name) AS GroupedName, V...
For future readers, here is a select query that will return blanks for repeating column values. ``` SELECT IF(name=@previous, "", @previous:=name) as name_, value FROM (SELECT @previous:= '') AS temp, tableName ORDER BY name ```
47,470,536
So here is my code ``` <button class="btn-new"><i class="ion-ios-plus-outline"></i>New game</button> <button class="btn-roll"><i class="ion-ios-loop"></i>Roll dice</button> <input type="text" placeholder="Target" class="target"> document.querySelector('button.btn-roll').addEventListener('click', function(){ var ...
2017/11/24
[ "https://Stackoverflow.com/questions/47470536", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3617493/" ]
Currently only NodeJs v6 is supported by SPFx. Please uninstall your current Node and install `v6.11.5`. Also, ensure that you have installed `npm` version 3. Reference - [Set up your SharePoint client-side web part development environment](https://learn.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development...
I just noticed the screenshot on you answer, it says that the Node Version is : v8.9.1 [![enter image description here](https://i.stack.imgur.com/Qyrlv.png)](https://i.stack.imgur.com/Qyrlv.png) While working with SPFx on Node.js v8 you have to run gulp serve as: `NODE_NO_HTTP2=1 gulp serve` Try to use it. Hope it ...
3,758,377
Can I set the following PHP configuration parameters as follows: max\_execution\_time = 360 max\_input\_time 360 Is that safe and efficient ? I actually need my user to upload large videos with the php-based Content Management System. So, each video upload takes some minutes. Do I need to change both and the values...
2010/09/21
[ "https://Stackoverflow.com/questions/3758377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/257022/" ]
In my understanding, you have to change neither. If you just store the video files using `move_uploaded_file`, you will not need to increase your `max_execution_time` as upload time does not count towards execution time. The [manual](http://www.php.net/manual/en/info.configuration.php#ini.max-input-time) says the fol...
By default my server has max\_input\_time as -1. I'm assuming that means infinite.
3,758,377
Can I set the following PHP configuration parameters as follows: max\_execution\_time = 360 max\_input\_time 360 Is that safe and efficient ? I actually need my user to upload large videos with the php-based Content Management System. So, each video upload takes some minutes. Do I need to change both and the values...
2010/09/21
[ "https://Stackoverflow.com/questions/3758377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/257022/" ]
In my understanding, you have to change neither. If you just store the video files using `move_uploaded_file`, you will not need to increase your `max_execution_time` as upload time does not count towards execution time. The [manual](http://www.php.net/manual/en/info.configuration.php#ini.max-input-time) says the fol...
In my case, `max_input_time` *does* affect my `move_uploaded_file` function. I failed to upload a 3GB file with default setting (`max_input_time=60`) but it succeeded with a larger value (`max_input_time=300`). My PHP version is *7.2.19* on *LAMP* enviroment.
3,758,377
Can I set the following PHP configuration parameters as follows: max\_execution\_time = 360 max\_input\_time 360 Is that safe and efficient ? I actually need my user to upload large videos with the php-based Content Management System. So, each video upload takes some minutes. Do I need to change both and the values...
2010/09/21
[ "https://Stackoverflow.com/questions/3758377", "https://Stackoverflow.com", "https://Stackoverflow.com/users/257022/" ]
In my case, `max_input_time` *does* affect my `move_uploaded_file` function. I failed to upload a 3GB file with default setting (`max_input_time=60`) but it succeeded with a larger value (`max_input_time=300`). My PHP version is *7.2.19* on *LAMP* enviroment.
By default my server has max\_input\_time as -1. I'm assuming that means infinite.
7,174,499
I'm trying to use a $ sign in my html page, in which i use the html code below ``` $dollar; ``` Although in IE it doesn't seem to render the dollar sign.... Any ideas?
2011/08/24
[ "https://Stackoverflow.com/questions/7174499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/884249/" ]
You don't need an HTML entity for the dollar sign since $ is already on your ASCII keyboard. Just type $ (usually as `Shift`+`4`). Anyway, HTML entities start with `&` (ampersand), not `$` (dollar).
There is no [named entity defined in HTML](http://www.w3.org/TR/html4/sgml/entities.html) for the `$` sign, but since the character appears in ASCII (and every other character encoding) and has no special meaning in HTML, you never need to use one.
7,174,499
I'm trying to use a $ sign in my html page, in which i use the html code below ``` $dollar; ``` Although in IE it doesn't seem to render the dollar sign.... Any ideas?
2011/08/24
[ "https://Stackoverflow.com/questions/7174499", "https://Stackoverflow.com", "https://Stackoverflow.com/users/884249/" ]
You should use the following HTML representation of `$`: ``` &#36; ```
There is no [named entity defined in HTML](http://www.w3.org/TR/html4/sgml/entities.html) for the `$` sign, but since the character appears in ASCII (and every other character encoding) and has no special meaning in HTML, you never need to use one.
48,175,672
I am currently using `UIDragInteraction` and `UIDropInteraction` made available in iOS 11 to make a simple drag and drop feature, where user could drag an UIImageView onto a UIView. I realized that one unintuitive element to this is that the `UIDragInteraction` requires a long press of at least a second to work. I was...
2018/01/09
[ "https://Stackoverflow.com/questions/48175672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1486261/" ]
There's no obvious way to do this, but I was just facing the same problem and took a peek into the gesture recognizers of the view that the dragInteraction is attached to. It a `_UIDragLiftGestureRecognizer` which is not part of the public API, but turns out this is just a subclass of `UILongPressGestureRecognizer`. S...
I was trying to do this from Xamarin.iOS inside an `UIView` implementing the `IUIDragInteractionDelegate` interface. In its constructor I made a `SetupDragNDrop` method that allows to drag the view without that default delay/latency to catch the view. I leave the code down below in case it's useful for somebody else: ...
48,175,672
I am currently using `UIDragInteraction` and `UIDropInteraction` made available in iOS 11 to make a simple drag and drop feature, where user could drag an UIImageView onto a UIView. I realized that one unintuitive element to this is that the `UIDragInteraction` requires a long press of at least a second to work. I was...
2018/01/09
[ "https://Stackoverflow.com/questions/48175672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1486261/" ]
There's no obvious way to do this, but I was just facing the same problem and took a peek into the gesture recognizers of the view that the dragInteraction is attached to. It a `_UIDragLiftGestureRecognizer` which is not part of the public API, but turns out this is just a subclass of `UILongPressGestureRecognizer`. S...
You can use this code to avoid affecting other gestures: ``` let gestureRecognizers = self.view.gestureRecognizers?.compactMap({ $0 as? UILongPressGestureRecognizer }) let liftGesture = gestureRecognizers?.filter({ String(describing: type(of: $0)) == "_UIDragLiftGestureRecognizer" }).first liftGesture?.minimumPressDur...
48,175,672
I am currently using `UIDragInteraction` and `UIDropInteraction` made available in iOS 11 to make a simple drag and drop feature, where user could drag an UIImageView onto a UIView. I realized that one unintuitive element to this is that the `UIDragInteraction` requires a long press of at least a second to work. I was...
2018/01/09
[ "https://Stackoverflow.com/questions/48175672", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1486261/" ]
I was trying to do this from Xamarin.iOS inside an `UIView` implementing the `IUIDragInteractionDelegate` interface. In its constructor I made a `SetupDragNDrop` method that allows to drag the view without that default delay/latency to catch the view. I leave the code down below in case it's useful for somebody else: ...
You can use this code to avoid affecting other gestures: ``` let gestureRecognizers = self.view.gestureRecognizers?.compactMap({ $0 as? UILongPressGestureRecognizer }) let liftGesture = gestureRecognizers?.filter({ String(describing: type(of: $0)) == "_UIDragLiftGestureRecognizer" }).first liftGesture?.minimumPressDur...
23,618,029
I'm using Spock and hate hard asserts for functional tests. I've written a SoftAssert class and everything works, I just want to make it look more like Groovy's power asserts. Here is my existing method: ``` public void verifyEquals(def expected, def actual, String message = '') { try { assert expected ==...
2014/05/12
[ "https://Stackoverflow.com/questions/23618029", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3233604/" ]
The `verify` method should accept a `Closure` (code block) containing the assertion, execute it, and store any exception thrown. Usage then looks as follows: `verify { assert 8 == (3 + x) * z }`. If you annotate the method with Spock's `@ConditionBlock` annotation and put it in a place where Spock can find it at comp...
Maybe my answer is a little bit off topic, but this question was the closest to what I was searching for here and I want to share my own findings. I found this pattern quite useful when using Spock: ``` try { assert myPage.myField.text() == "field valueXXX" } catch (ConditionNotSatisfiedError e) { // Enrich Groovy...
12,711,026
I am using key identifers in my foreach loop in order to control how I echo strings next to the data. For example The array ``` $array = array("name" => "Jim", "age" => 34); array(2) { ["name"]=> string(3) "Jim" ["age"]=> int(34) } ``` The loop ``` <?php foreach ($array as $value) { echo "Name " .$val...
2012/10/03
[ "https://Stackoverflow.com/questions/12711026", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1181234/" ]
Why are you using the `foreach` functionality? If you remove that you will get exactly what you want. And you will change `$value` to `$array`.
You can do that without a for loop... ``` <?php $array = array("name" => "Jim", "age" => 34); echo "Name " .$array["name"]."</br> Age ".$array["age"]. "</br>"; } ?> ```