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
323,742
I got a calendaring app and a terminology question. An event that occurs just once, is a ***one-off*** If it occurs every second Monday, and/or 4th Friday of month it is ***regular*** If it happens on a random series of odd days, it is ***irregular*** But if it starts on 12-jan and runs every weekday until 3-mar an...
2016/05/05
[ "https://english.stackexchange.com/questions/323742", "https://english.stackexchange.com", "https://english.stackexchange.com/users/173795/" ]
I would use 'recurring' for this. [dictionary](http://www.dictionary.com/browse/recurring) > > recur > > > > > > > verb (used without object), recurred, recurring. > > > > > > > > > > > > 1. > > > to occur again, as an event, experience, etc. > > > 2. > > > to return to the mind: > > > The idea kept rec...
A bit late with this answer but here's how Google calendar describes it: ***Repeats*** every week on weekdays from \_\_\_ to \_\_\_\_\_\_. I expect they have carefully considered such scenarios, so I wouldn't reinvent the wheel unnecessarily. [![google](https://i.stack.imgur.com/RvZIL.png)](https://i.stack.imgur.c...
70,162,448
**Scenario** I'm using unity c# to re-invent a google-earth like experience as a project. New tiles are asynchronously loaded in from the web while a user pans the camera around the globe. So far I'm able to load in all the [TMS tiles](https://www.maptiler.com/google-maps-coordinates-tile-bounds-projection/#1/-14.55/-...
2021/11/29
[ "https://Stackoverflow.com/questions/70162448", "https://Stackoverflow.com", "https://Stackoverflow.com/users/332578/" ]
I was able to get your expected output with this script: ``` SELECT customer_key, store_location, store_key as fav_store FROM ( SELECT *, ROW_NUMBER() OVER(partition by customer_key order by visits desc) rn FROM mydataset.mytable ) t1 WHERE rn = 1 ORDER BY customer_key ``` Sample data: ``` customer_key ...
Consider below approach ``` select as value array_agg(t order by visits desc limit 1)[offset(0)] from your_table t group by customer_key ```
10,938,729
I have this text box here... ``` <input name="search" type="text" maxlength="512" id="search" class="searchField" autocomplete="off" title="" /> ``` and I also have this submit ``` <input type="submit" name="btnSearch" value="Search" onclick="location.href='http://www.website.com/search/';" id="btnSearch" class="bu...
2012/06/07
[ "https://Stackoverflow.com/questions/10938729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/979331/" ]
This should work: ``` onclick="location.href='http://www.website.com/search/'+document.getElementById('search').value;" ``` **But I wouldn't ever write that in one of my project as writing script directly on tags is a bad practice.**
You can add it to the onclick event like so ``` document.getEelementById("btnSearch").onclick = function(){ location.href='http://www.website.com/search/' + document.getEelementById("search").value; } ``` edit: aaaaand too slow... oh well. At least this is not inline.
10,938,729
I have this text box here... ``` <input name="search" type="text" maxlength="512" id="search" class="searchField" autocomplete="off" title="" /> ``` and I also have this submit ``` <input type="submit" name="btnSearch" value="Search" onclick="location.href='http://www.website.com/search/';" id="btnSearch" class="bu...
2012/06/07
[ "https://Stackoverflow.com/questions/10938729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/979331/" ]
This should work: ``` onclick="location.href='http://www.website.com/search/'+document.getElementById('search').value;" ``` **But I wouldn't ever write that in one of my project as writing script directly on tags is a bad practice.**
Here is [a working jsfiddle](http://jsfiddle.net/jyrL4/) I moved the event handler out of the button as it is more maintainable. Also I encode the search query so that it gets to the server properly. ``` var search = document.getElementById('search'); var submit = document.getElementById('btnSearch'); submit.addEven...
10,938,729
I have this text box here... ``` <input name="search" type="text" maxlength="512" id="search" class="searchField" autocomplete="off" title="" /> ``` and I also have this submit ``` <input type="submit" name="btnSearch" value="Search" onclick="location.href='http://www.website.com/search/';" id="btnSearch" class="bu...
2012/06/07
[ "https://Stackoverflow.com/questions/10938729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/979331/" ]
This should work: ``` onclick="location.href='http://www.website.com/search/'+document.getElementById('search').value;" ``` **But I wouldn't ever write that in one of my project as writing script directly on tags is a bad practice.**
You would be better off using the < script> tag for this task. Example: ``` <input name="search" type="text" maxlength="512" id="search" class="searchField" autocomplete="off" title="" /> ... <input type="submit" name="btnSearch" value="Search" id="btnSearch" class="buttonSearch" /> <script type="text/javascript"> va...
10,938,729
I have this text box here... ``` <input name="search" type="text" maxlength="512" id="search" class="searchField" autocomplete="off" title="" /> ``` and I also have this submit ``` <input type="submit" name="btnSearch" value="Search" onclick="location.href='http://www.website.com/search/';" id="btnSearch" class="bu...
2012/06/07
[ "https://Stackoverflow.com/questions/10938729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/979331/" ]
Here is [a working jsfiddle](http://jsfiddle.net/jyrL4/) I moved the event handler out of the button as it is more maintainable. Also I encode the search query so that it gets to the server properly. ``` var search = document.getElementById('search'); var submit = document.getElementById('btnSearch'); submit.addEven...
You can add it to the onclick event like so ``` document.getEelementById("btnSearch").onclick = function(){ location.href='http://www.website.com/search/' + document.getEelementById("search").value; } ``` edit: aaaaand too slow... oh well. At least this is not inline.
10,938,729
I have this text box here... ``` <input name="search" type="text" maxlength="512" id="search" class="searchField" autocomplete="off" title="" /> ``` and I also have this submit ``` <input type="submit" name="btnSearch" value="Search" onclick="location.href='http://www.website.com/search/';" id="btnSearch" class="bu...
2012/06/07
[ "https://Stackoverflow.com/questions/10938729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/979331/" ]
Please avoid mixing JavaScript and HTML. You can remove `onclick` attribute and replace it with this in plain JavaScript somewhere after the DOM has loaded: ``` document.getElementById('btnSearch').onclick = function() { var search = document.getElementById('search').value; var searchEncoded = encodeURICompone...
You can add it to the onclick event like so ``` document.getEelementById("btnSearch").onclick = function(){ location.href='http://www.website.com/search/' + document.getEelementById("search").value; } ``` edit: aaaaand too slow... oh well. At least this is not inline.
10,938,729
I have this text box here... ``` <input name="search" type="text" maxlength="512" id="search" class="searchField" autocomplete="off" title="" /> ``` and I also have this submit ``` <input type="submit" name="btnSearch" value="Search" onclick="location.href='http://www.website.com/search/';" id="btnSearch" class="bu...
2012/06/07
[ "https://Stackoverflow.com/questions/10938729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/979331/" ]
Please avoid mixing JavaScript and HTML. You can remove `onclick` attribute and replace it with this in plain JavaScript somewhere after the DOM has loaded: ``` document.getElementById('btnSearch').onclick = function() { var search = document.getElementById('search').value; var searchEncoded = encodeURICompone...
Here is [a working jsfiddle](http://jsfiddle.net/jyrL4/) I moved the event handler out of the button as it is more maintainable. Also I encode the search query so that it gets to the server properly. ``` var search = document.getElementById('search'); var submit = document.getElementById('btnSearch'); submit.addEven...
10,938,729
I have this text box here... ``` <input name="search" type="text" maxlength="512" id="search" class="searchField" autocomplete="off" title="" /> ``` and I also have this submit ``` <input type="submit" name="btnSearch" value="Search" onclick="location.href='http://www.website.com/search/';" id="btnSearch" class="bu...
2012/06/07
[ "https://Stackoverflow.com/questions/10938729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/979331/" ]
Here is [a working jsfiddle](http://jsfiddle.net/jyrL4/) I moved the event handler out of the button as it is more maintainable. Also I encode the search query so that it gets to the server properly. ``` var search = document.getElementById('search'); var submit = document.getElementById('btnSearch'); submit.addEven...
You would be better off using the < script> tag for this task. Example: ``` <input name="search" type="text" maxlength="512" id="search" class="searchField" autocomplete="off" title="" /> ... <input type="submit" name="btnSearch" value="Search" id="btnSearch" class="buttonSearch" /> <script type="text/javascript"> va...
10,938,729
I have this text box here... ``` <input name="search" type="text" maxlength="512" id="search" class="searchField" autocomplete="off" title="" /> ``` and I also have this submit ``` <input type="submit" name="btnSearch" value="Search" onclick="location.href='http://www.website.com/search/';" id="btnSearch" class="bu...
2012/06/07
[ "https://Stackoverflow.com/questions/10938729", "https://Stackoverflow.com", "https://Stackoverflow.com/users/979331/" ]
Please avoid mixing JavaScript and HTML. You can remove `onclick` attribute and replace it with this in plain JavaScript somewhere after the DOM has loaded: ``` document.getElementById('btnSearch').onclick = function() { var search = document.getElementById('search').value; var searchEncoded = encodeURICompone...
You would be better off using the < script> tag for this task. Example: ``` <input name="search" type="text" maxlength="512" id="search" class="searchField" autocomplete="off" title="" /> ... <input type="submit" name="btnSearch" value="Search" id="btnSearch" class="buttonSearch" /> <script type="text/javascript"> va...
63,988,272
i want to perform query like this on elastic search => select \* from orders where customerName = 'google' and Type = 'stackoverflow' and query\_string can be from any index. (i e query string can be 'google' or 'stackoverflow' or 'a' or 'b' or 'c 'or 'd' ``` table orders: customerName type column1 col...
2020/09/21
[ "https://Stackoverflow.com/questions/63988272", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10933899/" ]
You do not need the FileReader, you can set the image's source via `window.URL.createObjectURL`. I am not sure why your code does not work, but I refactored and this solution works: <https://jsfiddle.net/1pL4rqe2/> I also added a directive to use the file input with `ng-change` ;) That's the Angular way!
you should do that validation when the image file is selected. I'm assuming you have a "file" element: ``` $('input[type="file"]').change(function(e){ let imgfile = new Image() imgfile.src = window.URL.createObjectURL(e.target.files[0]) imgfile.onload = () => { imgWidth = imgfile.width; imgHeight = imgfile.heig...
284,292
I'm trying to write a bash script where part of a directory is a long, unknown string. I know the first part of the directory name. How do I combine the known string and the wildcard in the path? As of now, I have: ``` ID=$1; IMP="adam@ocelot.cs.edu:/data/"$ID"/EER_DATA/$ID"*"/ImpostorScores.txt" ``` but this passe...
2016/05/19
[ "https://unix.stackexchange.com/questions/284292", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/87878/" ]
There are several options, 1. Use NFS or FUSE-over-SSH or something to expose the remote filesystem locally, then let `bash` apply the default `FOO=/*/passwd` glob on that exported filesystem path. (ZSH has a `${~spec}` glob substitution parameter expansion, otherwise see your shell's manual.) 2. SSH over to the remot...
You can use tar over ssh, `tar cf - filename | ssh adam@ocelot.cs.edu "cd /data/$ID/EER_DATA/$ID*; tar xf -"` Make sure you have setup ssh-agent so it won't prompt you with the password. I don't think you can use wildcard dir with scp, not even working with a regular cp. I've tested this on bash and zsh.
284,292
I'm trying to write a bash script where part of a directory is a long, unknown string. I know the first part of the directory name. How do I combine the known string and the wildcard in the path? As of now, I have: ``` ID=$1; IMP="adam@ocelot.cs.edu:/data/"$ID"/EER_DATA/$ID"*"/ImpostorScores.txt" ``` but this passe...
2016/05/19
[ "https://unix.stackexchange.com/questions/284292", "https://unix.stackexchange.com", "https://unix.stackexchange.com/users/87878/" ]
There are several options, 1. Use NFS or FUSE-over-SSH or something to expose the remote filesystem locally, then let `bash` apply the default `FOO=/*/passwd` glob on that exported filesystem path. (ZSH has a `${~spec}` glob substitution parameter expansion, otherwise see your shell's manual.) 2. SSH over to the remot...
The right side of a "Variable Assignment" is considered quoted (no splitting or globing): ``` LESS=+'/A variable may be assigned' man bash ``` > > A variable may be assigned to by a statement of the form: > > name=[value] > > Word splitting is not performed, ... . Pathname expansion is not performed. > > ...
5,423,733
I'm doing some interop and need to pass some GUID's. Is there a way to add a GUID attribute to an enum value and when it is marshalled it has the appropriate value? Basically I'm trying to convert the code ``` #if !defined( STATIC_KSDATAFORMAT_SUBTYPE_PCM ) #define STATIC_KSDATAFORMAT_SUBTYPE_PCM\ DEFINE_WAVEFORM...
2011/03/24
[ "https://Stackoverflow.com/questions/5423733", "https://Stackoverflow.com", "https://Stackoverflow.com/users/576287/" ]
You are getting this compiling error because you are trying to use an *OrderBy* extension method that is only defined in **MvcContrib** and not in System.Linq. In order to fix it, you just need to use the following line: ``` using MvcContrib.Sorting; ``` And then you can use the *OrderBy* method as in your original...
The OrderBy extension method takes a delegate for getting the sort key, not a column and direction. So this line: ``` listOfRfidTags = listOfRfidTags.OrderBy(sort.Column, sort.Direction); ``` needs to look something like this: ``` listOfRfidTags = listOfRfidTags.OrderBy(r => r.SomeProperty); ``` (or OrderByDescen...
26,440,692
I have the following HTML code: ``` <div class="form-group"> <label class="radio radio-inline checked"> <input type="radio" name="searchOption" id="searchByCity" value="searchByCity"> City </label> <label class="radio radio-inline"> <input type="radio" name="searchOption" id="searchByZipCode" v...
2014/10/18
[ "https://Stackoverflow.com/questions/26440692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can access the value of radio button inside label having class `checked` as follows: ``` $(".form-group label.checked").find("input[name='searchOption']").val() ```
*How can I know which element has the checked class ?* Then probably you can try this selector ``` var elements = $('label.radio-inline.checked') ```
26,440,692
I have the following HTML code: ``` <div class="form-group"> <label class="radio radio-inline checked"> <input type="radio" name="searchOption" id="searchByCity" value="searchByCity"> City </label> <label class="radio radio-inline"> <input type="radio" name="searchOption" id="searchByZipCode" v...
2014/10/18
[ "https://Stackoverflow.com/questions/26440692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can access the value of radio button inside label having class `checked` as follows: ``` $(".form-group label.checked").find("input[name='searchOption']").val() ```
> > How can I know which element has the checked class ? > > > `$(".form-group").find("input[name='searchOption']:checked")` will get you the selected item. If you need to find out which one was clicked you could also use this to get the `id`: ``` $(".form-group").find("input[name='searchOption']:checked").attr...
26,440,692
I have the following HTML code: ``` <div class="form-group"> <label class="radio radio-inline checked"> <input type="radio" name="searchOption" id="searchByCity" value="searchByCity"> City </label> <label class="radio radio-inline"> <input type="radio" name="searchOption" id="searchByZipCode" v...
2014/10/18
[ "https://Stackoverflow.com/questions/26440692", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
You can access the value of radio button inside label having class `checked` as follows: ``` $(".form-group label.checked").find("input[name='searchOption']").val() ```
You can alternative use [.hasClass()](http://api.jquery.com/hasclass/) : ```js $("#getValues").on("click", function(){ var checkedValue = $("label").map(function(){ return $(this).hasClass("checked") ? $(this).children("input:radio:checked").val() : ""; }).get().join(""); alert(checkedVal...
16,518,596
I've a two column layout with a ListView in the left column. With the Left/Right Keys I can change focus between the two parts of the app. The **active focus** of the left column is delegated to the ListView and from there straight to one of it's rows. How can I check whether the ListView or one of it's children has ...
2013/05/13
[ "https://Stackoverflow.com/questions/16518596", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2013738/" ]
I think I found a workaround: ``` onActiveFocusChanged: { focusChanged(focus) } ``` This emits the *focusChanged* signal whenever the active focus changes. Using this, the property bindings (like *color: parent.focus ? "red" : "#E6E6E6"*) work as well. Full test code: ``` import QtQuick 1.1 FocusScope { width...
You are creating trouble for yourself in this code. Only one element can have focus at any given time so if you have every element's focus property set to true its not especially clear which element has focus when it is rendered(I believe its the last element rendered that has focus set). As to figuring out which eleme...
16,518,596
I've a two column layout with a ListView in the left column. With the Left/Right Keys I can change focus between the two parts of the app. The **active focus** of the left column is delegated to the ListView and from there straight to one of it's rows. How can I check whether the ListView or one of it's children has ...
2013/05/13
[ "https://Stackoverflow.com/questions/16518596", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2013738/" ]
I know that this is an old question, but I think it still deserves a proper explanation, as the same model of focus is still used in QtQuick 2. > > How can I check whether the ListView or one of it's children has focus? > > > The central problem here is that you appear to be a little confused about the meanings o...
You are creating trouble for yourself in this code. Only one element can have focus at any given time so if you have every element's focus property set to true its not especially clear which element has focus when it is rendered(I believe its the last element rendered that has focus set). As to figuring out which eleme...
66,674,562
Need some assistance with below accordion. When you click on the heading the accordion drops down, which is great and works well. However, when you click on the + / - the accordion doesn't dropdown. Not sure how to fix this and would greatly appreciate if someone to help. Not entirely sure how to amend the before/after...
2021/03/17
[ "https://Stackoverflow.com/questions/66674562", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1346671/" ]
Given a structure `T`, this type ``` type Pair<T> = { [K in keyof T]: [K, T[K]]; } [keyof T]; ``` creates a Union of all possible key-value pairs (that is, `['FIRST',string] | ['SECOND',number] | etc...` Thus, the parameter of `multiSet` should be `Array<Pair<localStorageType>>` Note that this type allows keys...
I would define two different types. Then use union type to differenciate them when you use them (as params of a function for example)
13,359,609
I am new to this but I have tried to put some code together, however I'm getting errors flagging up and it doesn't seem to work. I would like some input to help debug it. I have a cookie called "country" saved with a value of "AZ". I want to pull this cookie using javascript and store it as a variable, then use it in ...
2012/11/13
[ "https://Stackoverflow.com/questions/13359609", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1738522/" ]
Your problem doesn't come from PHP: your `"MY_CURRENCY"."SYMBOL"` column is probably defined as `VARCHAR2(4 byte)` instead of `VARCHAR2(4 CHAR)`. Since an unicode character may take more than one byte, you have to use `CHAR` when you define your tables **and** variables. This is why you are getting an Oracle error. Y...
First off, what version of Oracle XE are you using and what character set are you using? If you are using the 10g version of Oracle XE, there was an option to download a version that used a Western European character set in addition to a version that used a Unicode character set. What do these queries return? ``` SELE...
49,831,163
**Note:** Before marking this question as duplicate, please verify that the other question answers the topic for this setup: * OS: Windows 10, 64-bit * Python version: 3.6 or higher * Python Compiler: Nuitka, development version 0.5.30rc5 * MSVC compiler: Visual Studio 2017 Community, vcvars64.bat 1. How I build m...
2018/04/14
[ "https://Stackoverflow.com/questions/49831163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6178507/" ]
Easier than Nuitka for a single executable is e.g. PyInstaller: `pyinstaller --onefile program.py` (to disable the console window for GUI applications add the `-w` option). To create a single executable with Nuitka, you can create a SFX archive from the generated files. You can run Nuitka with the `--standalone` optio...
Open console and type: ``` nuitka --recurse-all program.py ``` An exe file will be created. Run it.
49,831,163
**Note:** Before marking this question as duplicate, please verify that the other question answers the topic for this setup: * OS: Windows 10, 64-bit * Python version: 3.6 or higher * Python Compiler: Nuitka, development version 0.5.30rc5 * MSVC compiler: Visual Studio 2017 Community, vcvars64.bat 1. How I build m...
2018/04/14
[ "https://Stackoverflow.com/questions/49831163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6178507/" ]
In your `buildscript.py` file use `--onefile` instead of `--standalone` All the files will still be created but you don't need them and you can delete them.
Open console and type: ``` nuitka --recurse-all program.py ``` An exe file will be created. Run it.
49,831,163
**Note:** Before marking this question as duplicate, please verify that the other question answers the topic for this setup: * OS: Windows 10, 64-bit * Python version: 3.6 or higher * Python Compiler: Nuitka, development version 0.5.30rc5 * MSVC compiler: Visual Studio 2017 Community, vcvars64.bat 1. How I build m...
2018/04/14
[ "https://Stackoverflow.com/questions/49831163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6178507/" ]
Easier than Nuitka for a single executable is e.g. PyInstaller: `pyinstaller --onefile program.py` (to disable the console window for GUI applications add the `-w` option). To create a single executable with Nuitka, you can create a SFX archive from the generated files. You can run Nuitka with the `--standalone` optio...
In your `buildscript.py` file use `--onefile` instead of `--standalone` All the files will still be created but you don't need them and you can delete them.
49,831,163
**Note:** Before marking this question as duplicate, please verify that the other question answers the topic for this setup: * OS: Windows 10, 64-bit * Python version: 3.6 or higher * Python Compiler: Nuitka, development version 0.5.30rc5 * MSVC compiler: Visual Studio 2017 Community, vcvars64.bat 1. How I build m...
2018/04/14
[ "https://Stackoverflow.com/questions/49831163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6178507/" ]
Easier than Nuitka for a single executable is e.g. PyInstaller: `pyinstaller --onefile program.py` (to disable the console window for GUI applications add the `-w` option). To create a single executable with Nuitka, you can create a SFX archive from the generated files. You can run Nuitka with the `--standalone` optio...
You need something like this, for windows ``` py -m nuitka --show-scons --show-progress --onefile --remove-output --warn-implicit-exceptions --warn-unusual-code --windows-disable-console ``` `--remove-output` takes care of removing the garbage `py -m nuitka --help` > > `--remove-output` Removes the build directory...
49,831,163
**Note:** Before marking this question as duplicate, please verify that the other question answers the topic for this setup: * OS: Windows 10, 64-bit * Python version: 3.6 or higher * Python Compiler: Nuitka, development version 0.5.30rc5 * MSVC compiler: Visual Studio 2017 Community, vcvars64.bat 1. How I build m...
2018/04/14
[ "https://Stackoverflow.com/questions/49831163", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6178507/" ]
In your `buildscript.py` file use `--onefile` instead of `--standalone` All the files will still be created but you don't need them and you can delete them.
You need something like this, for windows ``` py -m nuitka --show-scons --show-progress --onefile --remove-output --warn-implicit-exceptions --warn-unusual-code --windows-disable-console ``` `--remove-output` takes care of removing the garbage `py -m nuitka --help` > > `--remove-output` Removes the build directory...
38,811,615
I am currently working on an app and I have implement firebase Push Notification service into my app. I am recieving notification on my iphone but I am unable to set the custom alert sound that I want. * I added the sound as a .caf * I added the sound to the `Copy Bundle Resources` using `print (userInfo)` I have col...
2016/08/07
[ "https://Stackoverflow.com/questions/38811615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6414654/" ]
Problem with Firebase is that you can not send **sound parameter** like custom parameter with Firebase Console, if you try this as you do, you will get this parameter in app outside of aps Dictionary and the system will not recognize it as a sound to be played although the sound file is into the project. The only solu...
After much research I have not found any solution. Under [Firebase Messaging Docs](https://firebase.google.com/docs/cloud-messaging/xmpp-server-ref), and > > Table 2a. iOS — keys for notification messages > > > it is indicated that Firebase does allow for the Sound key to be included in the payload but as seen i...
38,811,615
I am currently working on an app and I have implement firebase Push Notification service into my app. I am recieving notification on my iphone but I am unable to set the custom alert sound that I want. * I added the sound as a .caf * I added the sound to the `Copy Bundle Resources` using `print (userInfo)` I have col...
2016/08/07
[ "https://Stackoverflow.com/questions/38811615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6414654/" ]
After much research I have not found any solution. Under [Firebase Messaging Docs](https://firebase.google.com/docs/cloud-messaging/xmpp-server-ref), and > > Table 2a. iOS — keys for notification messages > > > it is indicated that Firebase does allow for the Sound key to be included in the payload but as seen i...
It's been over 5 years, but if someone still looking for an answer, here is what I did. 1. Make sure you have configured Firebase Messaging & receiving Notifications. 2. Add .caf ( sound file ) to the app. It must be visible on 'Target' - > 'Build Phases' & then under 'Copy Bundle Resources' [![enter image descriptio...
38,811,615
I am currently working on an app and I have implement firebase Push Notification service into my app. I am recieving notification on my iphone but I am unable to set the custom alert sound that I want. * I added the sound as a .caf * I added the sound to the `Copy Bundle Resources` using `print (userInfo)` I have col...
2016/08/07
[ "https://Stackoverflow.com/questions/38811615", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6414654/" ]
Problem with Firebase is that you can not send **sound parameter** like custom parameter with Firebase Console, if you try this as you do, you will get this parameter in app outside of aps Dictionary and the system will not recognize it as a sound to be played although the sound file is into the project. The only solu...
It's been over 5 years, but if someone still looking for an answer, here is what I did. 1. Make sure you have configured Firebase Messaging & receiving Notifications. 2. Add .caf ( sound file ) to the app. It must be visible on 'Target' - > 'Build Phases' & then under 'Copy Bundle Resources' [![enter image descriptio...
28,152,393
I am trying to install pyHook with a wheel file (.whl) but for some reason it keeps giving me this error: ``` pyHook-1.5.1-cp34-none-win_amd64.whl is not a supported wheel on this platform. ``` I got the wheel file from this website: <http://www.lfd.uci.edu/~gohlke/pythonlibs/> The command I use is: ``` pip insta...
2015/01/26
[ "https://Stackoverflow.com/questions/28152393", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2753991/" ]
You are installing a Wheel created for Python 3.4, into Python 2.7. That won't work. Use the correct version and download the one with `cp27` in the name: ``` pyHook‑1.5.1‑cp27‑none‑win_amd64.whl ```
I ran into the same issues whilst trying to install pyhook on Python 3.4. I downloaded the correct version from [python software foundation](https://pypi.python.org/pypi/pyHook-3k-compiled/1.5.1). I had to manually change the name of the file from `pyHook_3k_compiled-1.5.1-cp34-cp34m-win_amd64.whl` to `pyHook-1.5.1-cp...
28,152,393
I am trying to install pyHook with a wheel file (.whl) but for some reason it keeps giving me this error: ``` pyHook-1.5.1-cp34-none-win_amd64.whl is not a supported wheel on this platform. ``` I got the wheel file from this website: <http://www.lfd.uci.edu/~gohlke/pythonlibs/> The command I use is: ``` pip insta...
2015/01/26
[ "https://Stackoverflow.com/questions/28152393", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2753991/" ]
You are installing a Wheel created for Python 3.4, into Python 2.7. That won't work. Use the correct version and download the one with `cp27` in the name: ``` pyHook‑1.5.1‑cp27‑none‑win_amd64.whl ```
You may not have installed the correct one for your operating system check whether it is the 32 bit or 64 bit variant and install it again
28,152,393
I am trying to install pyHook with a wheel file (.whl) but for some reason it keeps giving me this error: ``` pyHook-1.5.1-cp34-none-win_amd64.whl is not a supported wheel on this platform. ``` I got the wheel file from this website: <http://www.lfd.uci.edu/~gohlke/pythonlibs/> The command I use is: ``` pip insta...
2015/01/26
[ "https://Stackoverflow.com/questions/28152393", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2753991/" ]
I ran into the same issues whilst trying to install pyhook on Python 3.4. I downloaded the correct version from [python software foundation](https://pypi.python.org/pypi/pyHook-3k-compiled/1.5.1). I had to manually change the name of the file from `pyHook_3k_compiled-1.5.1-cp34-cp34m-win_amd64.whl` to `pyHook-1.5.1-cp...
You may not have installed the correct one for your operating system check whether it is the 32 bit or 64 bit variant and install it again
613,270
I'm getting the following error message from `/var/log/nginx/error.log`: ``` 2014/07/17 08:36:21 [alert] 8206#0: worker process 8207 exited on signal 11 (core dumped) 2014/07/17 08:36:21 [alert] 8206#0: worker process 8210 exited on signal 11 (core dumped) 2014/07/17 08:36:22 [alert] 8206#0: worker process 8208 exited...
2014/07/17
[ "https://serverfault.com/questions/613270", "https://serverfault.com", "https://serverfault.com/users/35000/" ]
This could be related to the ssl session cache issue that is described in this ticket for nginx, <http://trac.nginx.org/nginx/ticket/235>.
Workaround is to use the same session cache for all server blocks, e.g. to configure it on the http{} level.
114,302
There had been non-Jedi/non-Sith dabbling with lightsabers a bit. General Grievous swung a bunch around like crazy. And I do recall there had been some kind of stick weapon that the lightsaber bounced off in the prequels. But in Star Wars 7: > > Finn (no-force) battles Kylo (Sith) to a draw even injuring Kylo with a...
2016/01/10
[ "https://scifi.stackexchange.com/questions/114302", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/4398/" ]
There are a group of weapons called [Vibroblades](http://starwars.wikia.com/wiki/Vibroblade) in-universe that have the ability to parry and other wise act like a lightsaber whilst being a physical object. In the EU there were various daggers and axes in addition to swords. This is due to a method of weapon creation cal...
The light saber is a symbol mostly of Force-sensitivity. Also the fact that a lightsaber is not a common device in the galaxy. They are each individually designed, built and used by the same Force-user almost exclusively. The one exception is the Skywalker family as Anakin has his saber passed down to his son, from w...
114,302
There had been non-Jedi/non-Sith dabbling with lightsabers a bit. General Grievous swung a bunch around like crazy. And I do recall there had been some kind of stick weapon that the lightsaber bounced off in the prequels. But in Star Wars 7: > > Finn (no-force) battles Kylo (Sith) to a draw even injuring Kylo with a...
2016/01/10
[ "https://scifi.stackexchange.com/questions/114302", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/4398/" ]
There are a group of weapons called [Vibroblades](http://starwars.wikia.com/wiki/Vibroblade) in-universe that have the ability to parry and other wise act like a lightsaber whilst being a physical object. In the EU there were various daggers and axes in addition to swords. This is due to a method of weapon creation cal...
There are plenty of reasons that a Jedi *with a lightsaber* (as opposed to a different weapon) is something special: * Lightsabers have a power output that is out of proportion to their input, and may come from the Force: > > By rights lightsabers shouldn’t have been able to cut through > meter-thick durasteel and ...
192,479
I have a very large SQL Server table with a ColumnStore clustered index. The table is very fast to query, so this is good. However I need to do some updates to a large portion of records in the table. When I tried a conventional update statement, my transaction log filled up. Normally I would handle this by using a cur...
2017/12/05
[ "https://dba.stackexchange.com/questions/192479", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/140019/" ]
This answer is written from the point of view of SQL Server 2016, but I believe that most of the important details are the same. Updates are extremely expensive from a transaction logging point of view. They are implemented behind the scenes as a delete + insert. The delete has a fixed transaction log cost per row. If...
``` DECLARE @LargestKeyProcessed varchar(200) = 'A', @NextBatchMax varchar(200), @RC INT = 1; WHILE (@RC > 0) BEGIN SELECT distinct TOP (1) @NextBatchMax = injection_group FROM mytable where productgroup = 'Widget' and target_month = '1/1/2018' and injection_group > @LargestKeyProcessed ORDER BY injection_group AS...
192,479
I have a very large SQL Server table with a ColumnStore clustered index. The table is very fast to query, so this is good. However I need to do some updates to a large portion of records in the table. When I tried a conventional update statement, my transaction log filled up. Normally I would handle this by using a cur...
2017/12/05
[ "https://dba.stackexchange.com/questions/192479", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/140019/" ]
This answer is written from the point of view of SQL Server 2016, but I believe that most of the important details are the same. Updates are extremely expensive from a transaction logging point of view. They are implemented behind the scenes as a delete + insert. The delete has a fixed transaction log cost per row. If...
I just came across this for the first time in my own code. My work around was to use a temp table to load the cursor. ``` DROP TABLE IF EXISTS #mp SELECT DISTINCT(PeriodDateKey) INTO #mp FROM fact.SomeFact ORDER BY PeriodDateKey ASC DECLARE @loopPeriodDateKey INT DECLARE periodDateKeys CURSOR FAST_FORWARD FOR ...
2,280,456
So we all know that $\frac d{dx}e^x=e^x$ and that the $n$th derivative of $e^x$ is still $e^x$, but upon entering fractional calculus, this is ruined. Let $D^\alpha$ be the $\alpha$th derivative with respect to $x$. Then, [as we can see](https://math.stackexchange.com/questions/1322857/taking-the-half-derivative-of-ex)...
2017/05/14
[ "https://math.stackexchange.com/questions/2280456", "https://math.stackexchange.com", "https://math.stackexchange.com/users/272831/" ]
This is a (heuristic) answer for $\alpha=1/k$ for $k\in \mathbb{N}$. And assuming $Df$ exists. Note that I believe (see edit in the end) that we could extend this answer to any $\alpha$. Let $\alpha = 1/2$. Then, by definition of the fractional derivative, we have $$D^\alpha D^\alpha f = Df$$ Substituting on the LHS w...
IDK if $\alpha<1$ For special cases of $\alpha >1$, $f^\alpha=f$ gives: $f=\sum\_{k\leq\alpha} C\_ke^{e^{\frac{{2ki\pi}}{\alpha}}x}+\sum\_{n\leq\alpha} C\_ne^{e^{\frac{{2i\pi}}{n}}x}$ where $k,n\in\mathbb{N}^\*$
2,280,456
So we all know that $\frac d{dx}e^x=e^x$ and that the $n$th derivative of $e^x$ is still $e^x$, but upon entering fractional calculus, this is ruined. Let $D^\alpha$ be the $\alpha$th derivative with respect to $x$. Then, [as we can see](https://math.stackexchange.com/questions/1322857/taking-the-half-derivative-of-ex)...
2017/05/14
[ "https://math.stackexchange.com/questions/2280456", "https://math.stackexchange.com", "https://math.stackexchange.com/users/272831/" ]
The first part is not a strict answer to the question, but not far. The full answer is added in second part. Consider the series expansion : $$e^x=\sum\_{k=0}^\infty \frac{x^k}{k!} = \sum\_{k=0}^\infty \frac{x^k}{\Gamma(k+1)} \qquad |x|<1$$ Compare to the Mittag-Leffler function : $$E\_\alpha(x)=\sum\_{k=0}^\infty \f...
This is a (heuristic) answer for $\alpha=1/k$ for $k\in \mathbb{N}$. And assuming $Df$ exists. Note that I believe (see edit in the end) that we could extend this answer to any $\alpha$. Let $\alpha = 1/2$. Then, by definition of the fractional derivative, we have $$D^\alpha D^\alpha f = Df$$ Substituting on the LHS w...
2,280,456
So we all know that $\frac d{dx}e^x=e^x$ and that the $n$th derivative of $e^x$ is still $e^x$, but upon entering fractional calculus, this is ruined. Let $D^\alpha$ be the $\alpha$th derivative with respect to $x$. Then, [as we can see](https://math.stackexchange.com/questions/1322857/taking-the-half-derivative-of-ex)...
2017/05/14
[ "https://math.stackexchange.com/questions/2280456", "https://math.stackexchange.com", "https://math.stackexchange.com/users/272831/" ]
The first part is not a strict answer to the question, but not far. The full answer is added in second part. Consider the series expansion : $$e^x=\sum\_{k=0}^\infty \frac{x^k}{k!} = \sum\_{k=0}^\infty \frac{x^k}{\Gamma(k+1)} \qquad |x|<1$$ Compare to the Mittag-Leffler function : $$E\_\alpha(x)=\sum\_{k=0}^\infty \f...
IDK if $\alpha<1$ For special cases of $\alpha >1$, $f^\alpha=f$ gives: $f=\sum\_{k\leq\alpha} C\_ke^{e^{\frac{{2ki\pi}}{\alpha}}x}+\sum\_{n\leq\alpha} C\_ne^{e^{\frac{{2i\pi}}{n}}x}$ where $k,n\in\mathbb{N}^\*$
39,386,054
I want to get obvious message when Javascript has error and don't need to open ChromeDevTools. Anyway is ok,JS or Chrome Extension.
2016/09/08
[ "https://Stackoverflow.com/questions/39386054", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3577963/" ]
You can use this `JavaScript Errors Notifier` Chrome Extension to get that error message.
You can decorate the `Console` class... ```js function logger(type, $delegate, ...args) { $delegate("Called", type, args); } for(let prop in console) { if(console.hasOwnProperty(prop)) { let $original = console[prop]; if(!($original instanceof Function)) { continue; } console[prop]...
2,447,038
Consider the following series $$\sum\_{n=1}^{\infty}\dfrac{\log n}{n(n-1)}$$ I have tried to use the ratio test, but then I would get $$\dfrac{(n-1)\log(n+1)}{(n+1)\log n}$$ And taking the limit as $n \to \infty$ would yield 1 so I don't think it would help.
2017/09/27
[ "https://math.stackexchange.com/questions/2447038", "https://math.stackexchange.com", "https://math.stackexchange.com/users/192859/" ]
$\dfrac {4x}{x+1}=\dfrac{4x+4-4}{x+1}=4-\dfrac {4}{x+1}$ When $x$ tends to $0$ then $4-\dfrac {4}{x+1}$ tends to $0$. When $x$ tends to $+\infty$ then $4-\dfrac {4}{x+1}$ tends to $4$. So, because your function is continuous your image is $(0,4)$. Alternative approach: $\dfrac {y}{4-y} >0$ This is possible if and ...
$\frac{4x}{x+1} =\frac{4x+4-4}{x+1} =\frac{4(x+1)-4}{x+1} =4-\frac{4}{x+1} $ Now, the ranges. $\begin{array}\\ x+1: &(0, \infty)\to (1, \infty)\\ \frac1{x}: &(1, \infty) \to (0, 1)\\ 4x: &(0, 1)\to (0, 4)\\ 4-x: &(0, 4) \to 0, 4)\\ \end{array} $ So the range is $(0, 4)$.
12,972,671
How can I localize an button in the bottom appbar. I want to write on a german device 'Neu' under the button and on an english device 'Add'. ``` <Style x:Key="AddAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}"> <Setter Property="AutomationProperties.AutomationId" Value="AddA...
2012/10/19
[ "https://Stackoverflow.com/questions/12972671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1347924/" ]
So if you are using the button styles you could do something like this: ``` <Button Style="{StaticResource HomeAppBarButtonStyle}" x:Uid="HomeButton" /> ``` And then in your RESW you'd have: ``` HomeButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name ``` as your key value.
I think you're looking to use the `Multilingual App Toolkit` for Visual Studio which allows you to change the content in your application depending on the user prefered language. You can download it clicking this link: <http://msdn.microsoft.com/en-us/windows/apps/hh848309.aspx> and here is an short helpful video whi...
12,972,671
How can I localize an button in the bottom appbar. I want to write on a german device 'Neu' under the button and on an english device 'Add'. ``` <Style x:Key="AddAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}"> <Setter Property="AutomationProperties.AutomationId" Value="AddA...
2012/10/19
[ "https://Stackoverflow.com/questions/12972671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1347924/" ]
I think you're looking to use the `Multilingual App Toolkit` for Visual Studio which allows you to change the content in your application depending on the user prefered language. You can download it clicking this link: <http://msdn.microsoft.com/en-us/windows/apps/hh848309.aspx> and here is an short helpful video whi...
This is the recommended method from Windows 8: Example for a Button (C#) 1. Create a resource file: strings/de-de.resw In the Resource file you must type this: `desplay.Text` (first colum) `play the music here`(2th colum) 2. Then add this parameter `x:Uid` to get translation from Resource file. More informat...
12,972,671
How can I localize an button in the bottom appbar. I want to write on a german device 'Neu' under the button and on an english device 'Add'. ``` <Style x:Key="AddAppBarButtonStyle" TargetType="ButtonBase" BasedOn="{StaticResource AppBarButtonStyle}"> <Setter Property="AutomationProperties.AutomationId" Value="AddA...
2012/10/19
[ "https://Stackoverflow.com/questions/12972671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1347924/" ]
So if you are using the button styles you could do something like this: ``` <Button Style="{StaticResource HomeAppBarButtonStyle}" x:Uid="HomeButton" /> ``` And then in your RESW you'd have: ``` HomeButton.[using:Windows.UI.Xaml.Automation]AutomationProperties.Name ``` as your key value.
This is the recommended method from Windows 8: Example for a Button (C#) 1. Create a resource file: strings/de-de.resw In the Resource file you must type this: `desplay.Text` (first colum) `play the music here`(2th colum) 2. Then add this parameter `x:Uid` to get translation from Resource file. More informat...
9,766,731
I am trying to add an element to the DOM, and then working with this element, once clicked. However, I don't think the function below registers because this is a self invoking function (located at the end of the HTML), and is run only at the beginning. ``` (function (){ $('body').append('<span class="test">test</...
2012/03/19
[ "https://Stackoverflow.com/questions/9766731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/604114/" ]
or you can do this, ``` $(function() { $('body').append('<span class="test">test</span>'); $('.test').click(function() { console.log(this); }); }); ``` though `live` or `on` would be the better alternative if you don't know in advance when that element is going to get added to the DOM.
Change this - ``` $('.test').click(function() { console.log(this); }); ``` to this - ``` $('.test').live('click', function() { console.log(this); }); ``` [live](http://api.jquery.com/live/) documentation. **EDIT** As of jquery 1.7, `live` has been deprecated. Use `on` instead - ``` $('body').on('cli...
9,766,731
I am trying to add an element to the DOM, and then working with this element, once clicked. However, I don't think the function below registers because this is a self invoking function (located at the end of the HTML), and is run only at the beginning. ``` (function (){ $('body').append('<span class="test">test</...
2012/03/19
[ "https://Stackoverflow.com/questions/9766731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/604114/" ]
Since you're element is dynamically appended you can use `on()` or chain the `click()` event. ``` //Using on() $('body').on('click', '.test', function(){ // Bla }); //Chaining click() $('<span class="test">test</span>').click(function(){ // Bla }).appendTo('body'); ```
Change this - ``` $('.test').click(function() { console.log(this); }); ``` to this - ``` $('.test').live('click', function() { console.log(this); }); ``` [live](http://api.jquery.com/live/) documentation. **EDIT** As of jquery 1.7, `live` has been deprecated. Use `on` instead - ``` $('body').on('cli...
9,766,731
I am trying to add an element to the DOM, and then working with this element, once clicked. However, I don't think the function below registers because this is a self invoking function (located at the end of the HTML), and is run only at the beginning. ``` (function (){ $('body').append('<span class="test">test</...
2012/03/19
[ "https://Stackoverflow.com/questions/9766731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/604114/" ]
Since you're element is dynamically appended you can use `on()` or chain the `click()` event. ``` //Using on() $('body').on('click', '.test', function(){ // Bla }); //Chaining click() $('<span class="test">test</span>').click(function(){ // Bla }).appendTo('body'); ```
or you can do this, ``` $(function() { $('body').append('<span class="test">test</span>'); $('.test').click(function() { console.log(this); }); }); ``` though `live` or `on` would be the better alternative if you don't know in advance when that element is going to get added to the DOM.
9,766,731
I am trying to add an element to the DOM, and then working with this element, once clicked. However, I don't think the function below registers because this is a self invoking function (located at the end of the HTML), and is run only at the beginning. ``` (function (){ $('body').append('<span class="test">test</...
2012/03/19
[ "https://Stackoverflow.com/questions/9766731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/604114/" ]
or you can do this, ``` $(function() { $('body').append('<span class="test">test</span>'); $('.test').click(function() { console.log(this); }); }); ``` though `live` or `on` would be the better alternative if you don't know in advance when that element is going to get added to the DOM.
In your example code you are the closing the wrapper function after the span is added to the body, if you remove the `})` line, your code should work just fine: ``` (function (){ $('body').append('<span class="test">test</span>'); // }) <- remove this line $('.test').click(function(){ console.log(this); }...
9,766,731
I am trying to add an element to the DOM, and then working with this element, once clicked. However, I don't think the function below registers because this is a self invoking function (located at the end of the HTML), and is run only at the beginning. ``` (function (){ $('body').append('<span class="test">test</...
2012/03/19
[ "https://Stackoverflow.com/questions/9766731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/604114/" ]
or you can do this, ``` $(function() { $('body').append('<span class="test">test</span>'); $('.test').click(function() { console.log(this); }); }); ``` though `live` or `on` would be the better alternative if you don't know in advance when that element is going to get added to the DOM.
You were closing the function just after the append part thats why click handler wasn't working ``` $(function() { $('body').append('<span class="test">test</span>'); $('.test').click(function() { console.log(this); }); })(); ```
9,766,731
I am trying to add an element to the DOM, and then working with this element, once clicked. However, I don't think the function below registers because this is a self invoking function (located at the end of the HTML), and is run only at the beginning. ``` (function (){ $('body').append('<span class="test">test</...
2012/03/19
[ "https://Stackoverflow.com/questions/9766731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/604114/" ]
Since you're element is dynamically appended you can use `on()` or chain the `click()` event. ``` //Using on() $('body').on('click', '.test', function(){ // Bla }); //Chaining click() $('<span class="test">test</span>').click(function(){ // Bla }).appendTo('body'); ```
In your example code you are the closing the wrapper function after the span is added to the body, if you remove the `})` line, your code should work just fine: ``` (function (){ $('body').append('<span class="test">test</span>'); // }) <- remove this line $('.test').click(function(){ console.log(this); }...
9,766,731
I am trying to add an element to the DOM, and then working with this element, once clicked. However, I don't think the function below registers because this is a self invoking function (located at the end of the HTML), and is run only at the beginning. ``` (function (){ $('body').append('<span class="test">test</...
2012/03/19
[ "https://Stackoverflow.com/questions/9766731", "https://Stackoverflow.com", "https://Stackoverflow.com/users/604114/" ]
Since you're element is dynamically appended you can use `on()` or chain the `click()` event. ``` //Using on() $('body').on('click', '.test', function(){ // Bla }); //Chaining click() $('<span class="test">test</span>').click(function(){ // Bla }).appendTo('body'); ```
You were closing the function just after the append part thats why click handler wasn't working ``` $(function() { $('body').append('<span class="test">test</span>'); $('.test').click(function() { console.log(this); }); })(); ```
5,188,227
*I know the title may seem like apples & oranges, but hear me out... :)* I'm building the architecture of an MVC app and considering what to use for the core of the controller / services. This stack will also serve as a RESTful API which will be equally as important as the UI. I'm narrowing down my stack to be built ...
2011/03/04
[ "https://Stackoverflow.com/questions/5188227", "https://Stackoverflow.com", "https://Stackoverflow.com/users/43217/" ]
I wrote a small REST service prototype in several frameworks last year (namely Grails, Play!, Spring MVC, Jersey, Restlet). My feeling about Grails in this concern was that although Grails supports REST style architecture, it isn't really made for it. I don't want to get religious here, so if you only want to map resou...
Yeah, it does seem heavy to build on a MVC framework when you're not going to use the model or the view. While the autowiring and simplified configuration is super nice, Grails would still be providing a lot of extra stuff that you don't need. I'd personally take the lighter approach and leave Grails out, using any st...
49,912,125
I horizontally centered text on a hero image with `margin: 0 auto` but without specifying width. I've read in a bunch of places that this trick only works when width is specified; why is it working in this case? My guess is the width is simply set to the default image width. Here's the code I'm using (view [CodePen](...
2018/04/19
[ "https://Stackoverflow.com/questions/49912125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8888320/" ]
`Margin:0` auto works because of the default `font-size` I would recommend that you make the hero-text have a width of 100%. While using `text-align:center;` as that will always center the text. My Final Code ``` .hero-text { margin:0px; width:100%; text-align:center } ```
The text is centered because you have `body { text-align: center }`. The reason that the width of the hero text div is not the full width of the browser window is because `.hero-image` is `display: flex`. For the auto margin to do something the div needs to be less than 100% wide. It is, so it works but you don't reall...
49,912,125
I horizontally centered text on a hero image with `margin: 0 auto` but without specifying width. I've read in a bunch of places that this trick only works when width is specified; why is it working in this case? My guess is the width is simply set to the default image width. Here's the code I'm using (view [CodePen](...
2018/04/19
[ "https://Stackoverflow.com/questions/49912125", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8888320/" ]
Here it's not about the classic `margin:auto` but about flexbox. You container is set with `display:flex` and `.hero-image` is a flex item and it's width is **no more 100%** like a default div but it's equal to size of its content and that's why `margin:auto` is centering your element where you don't need to specify a ...
The text is centered because you have `body { text-align: center }`. The reason that the width of the hero text div is not the full width of the browser window is because `.hero-image` is `display: flex`. For the auto margin to do something the div needs to be less than 100% wide. It is, so it works but you don't reall...
2,626,500
> > If you have five blue, five red and five black pens (which show the differences by the colors), in how many ways you can put the pens in a row where there is never same color next to each other? > > > I've made a solution but I'm not sure it's the correct answer. Here is my solution: $$3\binom{10}5=756$$ $$7...
2018/01/29
[ "https://math.stackexchange.com/questions/2626500", "https://math.stackexchange.com", "https://math.stackexchange.com/users/526078/" ]
Here is an approach in terms of generating functions: Write $x$ for a blue, $y$ for a red, and $z$ for a black pen. An admissible arrangement looks as follows: $$\underline{\quad}\ z\ \underline{\quad}\ z\ \underline{\quad}\ z\ \underline{\quad}\ z\ \underline{\quad}\ z\ \underline{\quad}\ ,$$ whereby the six slots h...
OEIS sequence A110706 which gives a reference for the recurrence relation $$n(n+1)a\_n=(n+1)(7n-4)a\_{n-1}+8(n-2)^2a\_{n-2}$$ It is easy to get $a\_1=6,a\_2=30$ and then we can easily get $a\_3=174,a\_4=1092,a\_5=7188$. Note that the symmetry from permuting colours: $a\_n$ is 6 times the number starting with blue, red.
2,626,500
> > If you have five blue, five red and five black pens (which show the differences by the colors), in how many ways you can put the pens in a row where there is never same color next to each other? > > > I've made a solution but I'm not sure it's the correct answer. Here is my solution: $$3\binom{10}5=756$$ $$7...
2018/01/29
[ "https://math.stackexchange.com/questions/2626500", "https://math.stackexchange.com", "https://math.stackexchange.com/users/526078/" ]
Here is an approach in terms of generating functions: Write $x$ for a blue, $y$ for a red, and $z$ for a black pen. An admissible arrangement looks as follows: $$\underline{\quad}\ z\ \underline{\quad}\ z\ \underline{\quad}\ z\ \underline{\quad}\ z\ \underline{\quad}\ z\ \underline{\quad}\ ,$$ whereby the six slots h...
Another way, which can be used for even more complex situations, is the formula by [Jair Taylor](https://math.stackexchange.com/questions/129451/find-the-number-of-arrangements-of-k-mbox-1s-k-mbox-2s-cdots/129802#129802) Define polynomials for $k\geq 1$ by $q\_k(x) = \sum\_{i=1}^k \frac{(-1)^{i-k}}{i!} {k-1 \choose i-...
2,626,500
> > If you have five blue, five red and five black pens (which show the differences by the colors), in how many ways you can put the pens in a row where there is never same color next to each other? > > > I've made a solution but I'm not sure it's the correct answer. Here is my solution: $$3\binom{10}5=756$$ $$7...
2018/01/29
[ "https://math.stackexchange.com/questions/2626500", "https://math.stackexchange.com", "https://math.stackexchange.com/users/526078/" ]
This is a more basic explanation on how to build Blatter's generation function. Following the reasoning and convention in his answer, pretend the we have an unlimited supply of blue balls $($represented by $x)$ and of red balls $($represented by $y)$. A valid filling for one of the middle slots has one of the forms: $...
OEIS sequence A110706 which gives a reference for the recurrence relation $$n(n+1)a\_n=(n+1)(7n-4)a\_{n-1}+8(n-2)^2a\_{n-2}$$ It is easy to get $a\_1=6,a\_2=30$ and then we can easily get $a\_3=174,a\_4=1092,a\_5=7188$. Note that the symmetry from permuting colours: $a\_n$ is 6 times the number starting with blue, red.
2,626,500
> > If you have five blue, five red and five black pens (which show the differences by the colors), in how many ways you can put the pens in a row where there is never same color next to each other? > > > I've made a solution but I'm not sure it's the correct answer. Here is my solution: $$3\binom{10}5=756$$ $$7...
2018/01/29
[ "https://math.stackexchange.com/questions/2626500", "https://math.stackexchange.com", "https://math.stackexchange.com/users/526078/" ]
Let $\mathsf{B}$, $\mathsf{R}$, and $\mathsf{K}$ denote a Blue, Red, and blacK pen respectively. Then you're looking for “words” over the alphabet $\{\mathsf{B}, \mathsf{R}, \mathsf{K}\}$ in which no two consecutive letters are the same. These are called Smirnov words, and there's a really cool trick you can do here....
OEIS sequence A110706 which gives a reference for the recurrence relation $$n(n+1)a\_n=(n+1)(7n-4)a\_{n-1}+8(n-2)^2a\_{n-2}$$ It is easy to get $a\_1=6,a\_2=30$ and then we can easily get $a\_3=174,a\_4=1092,a\_5=7188$. Note that the symmetry from permuting colours: $a\_n$ is 6 times the number starting with blue, red.
2,626,500
> > If you have five blue, five red and five black pens (which show the differences by the colors), in how many ways you can put the pens in a row where there is never same color next to each other? > > > I've made a solution but I'm not sure it's the correct answer. Here is my solution: $$3\binom{10}5=756$$ $$7...
2018/01/29
[ "https://math.stackexchange.com/questions/2626500", "https://math.stackexchange.com", "https://math.stackexchange.com/users/526078/" ]
This is a more basic explanation on how to build Blatter's generation function. Following the reasoning and convention in his answer, pretend the we have an unlimited supply of blue balls $($represented by $x)$ and of red balls $($represented by $y)$. A valid filling for one of the middle slots has one of the forms: $...
Another way, which can be used for even more complex situations, is the formula by [Jair Taylor](https://math.stackexchange.com/questions/129451/find-the-number-of-arrangements-of-k-mbox-1s-k-mbox-2s-cdots/129802#129802) Define polynomials for $k\geq 1$ by $q\_k(x) = \sum\_{i=1}^k \frac{(-1)^{i-k}}{i!} {k-1 \choose i-...
2,626,500
> > If you have five blue, five red and five black pens (which show the differences by the colors), in how many ways you can put the pens in a row where there is never same color next to each other? > > > I've made a solution but I'm not sure it's the correct answer. Here is my solution: $$3\binom{10}5=756$$ $$7...
2018/01/29
[ "https://math.stackexchange.com/questions/2626500", "https://math.stackexchange.com", "https://math.stackexchange.com/users/526078/" ]
Let $\mathsf{B}$, $\mathsf{R}$, and $\mathsf{K}$ denote a Blue, Red, and blacK pen respectively. Then you're looking for “words” over the alphabet $\{\mathsf{B}, \mathsf{R}, \mathsf{K}\}$ in which no two consecutive letters are the same. These are called Smirnov words, and there's a really cool trick you can do here....
Another way, which can be used for even more complex situations, is the formula by [Jair Taylor](https://math.stackexchange.com/questions/129451/find-the-number-of-arrangements-of-k-mbox-1s-k-mbox-2s-cdots/129802#129802) Define polynomials for $k\geq 1$ by $q\_k(x) = \sum\_{i=1}^k \frac{(-1)^{i-k}}{i!} {k-1 \choose i-...
25,628,568
I have a problem with a menu on the following media query: ``` @media all and (min-device-width: 481px) { .flexnav-show { margin-top: 0px !important; } } ``` on line 633 in my style sheet. When the menu folds down, the div #sidebar (line 426)is still visible under the menu. The #sidebar div should be behind ...
2014/09/02
[ "https://Stackoverflow.com/questions/25628568", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2371684/" ]
You are trying to obtain a metadata that is only contained in image files, like JPEG. I had the same problem and I have not found a solution using standard API. Eventually I solve the problem using the [metadata-extractor](https://drewnoakes.com/code/exif) library that can extract EXIF metadata from image files. The l...
Windows files have 3 file times, all are exposed in the windows API. Creation Date, Modified Date, Last Accessed Date. Any other date is an extended property. There are S/O articles on [reading](https://stackoverflow.com/questions/220097/read-write-extended-file-properties-c) and [setting](https://stackoverflow.com/...
13,143
There are several cell towers on the hills around me. Usually I just walk around their base in a circle with [one](https://play.google.com/store/apps/details?id=com.parizene.netmonitor) of the many CellID apps to get their ID. Then I can impress my friends, "That's tower 4664! That's tower 5995!". You know, a sort of h...
2019/03/28
[ "https://ham.stackexchange.com/questions/13143", "https://ham.stackexchange.com", "https://ham.stackexchange.com/users/14566/" ]
What you are describing is a directional antenna for your phone. You can do this by placing the phone Inside the antenna, or by connecting the antenna to the phone. The pipe you describe is actually used as an antenna - google for the Cantenna wifi antenna made from a pringles can. A horn antenna like this might not ...
You could try a parabolic reflector, such as an old satellite dish, with your phone at the focus. We think of radio waves as travelling in straight lines, but that's not quite right; they also need some open space *around* the straight line, known as the [Fresnel zone](http://radiomobile.pe1mew.nl/?Calculations:Propag...
13,143
There are several cell towers on the hills around me. Usually I just walk around their base in a circle with [one](https://play.google.com/store/apps/details?id=com.parizene.netmonitor) of the many CellID apps to get their ID. Then I can impress my friends, "That's tower 4664! That's tower 5995!". You know, a sort of h...
2019/03/28
[ "https://ham.stackexchange.com/questions/13143", "https://ham.stackexchange.com", "https://ham.stackexchange.com/users/14566/" ]
What you are describing is a directional antenna for your phone. You can do this by placing the phone Inside the antenna, or by connecting the antenna to the phone. The pipe you describe is actually used as an antenna - google for the Cantenna wifi antenna made from a pringles can. A horn antenna like this might not ...
If the pipe is tied to the antenna you're essentially using the whole pipe as part of the antenna, so it's no wonder it doesn't isolate the signal -- and there's no effective way to prevent this when the pipe is smaller than the signal wavelength. So, make sure your pipe is big enough (maybe use a metal garbage can, o...
13,143
There are several cell towers on the hills around me. Usually I just walk around their base in a circle with [one](https://play.google.com/store/apps/details?id=com.parizene.netmonitor) of the many CellID apps to get their ID. Then I can impress my friends, "That's tower 4664! That's tower 5995!". You know, a sort of h...
2019/03/28
[ "https://ham.stackexchange.com/questions/13143", "https://ham.stackexchange.com", "https://ham.stackexchange.com/users/14566/" ]
What you are describing is a directional antenna for your phone. You can do this by placing the phone Inside the antenna, or by connecting the antenna to the phone. The pipe you describe is actually used as an antenna - google for the Cantenna wifi antenna made from a pringles can. A horn antenna like this might not ...
It would be nice if it were so simple to make a very narrow "cylinder-shaped" beam, but **a pipe is simply not going to do that**. [This answer](https://ham.stackexchange.com/a/13145/8717) has a considerably better chance of working than sticking a phone in a pipe.
15,357,630
In this below example why other than "NAME1" all giving null as result in oracle 11g. If I mention space explicitly it takes space otherwise null only not empty string.Please help me to clarify this. In NAME2 I specify the empty space but still it gives null. ``` select NVL(NAME,' ') AS NAME1, NVL(NAME,'') AS NAME2...
2013/03/12
[ "https://Stackoverflow.com/questions/15357630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1755242/" ]
Because in Oracle a ZERO length varchar is treated as NULL. In your example ``` NVL(NAME, ' ') AS NAME1 will evaluate to either NAME or ' ' - empty string. NVL(NAME, '') as NAME2 will evaluate to either NAME or a zero length string ```
The reason is that in Oracle an empty string is equivalent to `NULL`. You can see that this is true by executing the followig query ``` SELECT 'x' FROM DUAL WHERE '' IS NULL ``` This should return a single row, meaning that the condition `'' IS NULL` is `true`.
15,357,630
In this below example why other than "NAME1" all giving null as result in oracle 11g. If I mention space explicitly it takes space otherwise null only not empty string.Please help me to clarify this. In NAME2 I specify the empty space but still it gives null. ``` select NVL(NAME,' ') AS NAME1, NVL(NAME,'') AS NAME2...
2013/03/12
[ "https://Stackoverflow.com/questions/15357630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1755242/" ]
Because '' is equal with null in oracle. For example these two queries are same: ``` update test set name='' where id = 15 update test set name=null where id = 15 ```
The reason is that in Oracle an empty string is equivalent to `NULL`. You can see that this is true by executing the followig query ``` SELECT 'x' FROM DUAL WHERE '' IS NULL ``` This should return a single row, meaning that the condition `'' IS NULL` is `true`.
15,357,630
In this below example why other than "NAME1" all giving null as result in oracle 11g. If I mention space explicitly it takes space otherwise null only not empty string.Please help me to clarify this. In NAME2 I specify the empty space but still it gives null. ``` select NVL(NAME,' ') AS NAME1, NVL(NAME,'') AS NAME2...
2013/03/12
[ "https://Stackoverflow.com/questions/15357630", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1755242/" ]
Because in Oracle a ZERO length varchar is treated as NULL. In your example ``` NVL(NAME, ' ') AS NAME1 will evaluate to either NAME or ' ' - empty string. NVL(NAME, '') as NAME2 will evaluate to either NAME or a zero length string ```
Because '' is equal with null in oracle. For example these two queries are same: ``` update test set name='' where id = 15 update test set name=null where id = 15 ```
6,439,716
I have the following table TABLE A ======= ``` ID | QUANTITY ------------ 1 | 3 2 | 2 ``` What I need is TABLE B ======= ``` ID | Ref No. ------------ 1 | MyRef1 1 | MyRef2 1 | MyRef3 2 | AnotherRef1 2 | AnotherRef2 ``` i.e. I need to generate Table B with the same number of rows as the quantity in A wit...
2011/06/22
[ "https://Stackoverflow.com/questions/6439716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/196273/" ]
Following gives you the correct number of rows but my observation is the same as @Dems: How do you determine `MyRef` and `AnotherRef`? *Note that this requires at least SQL Server 2005* ### SQL Statement ``` ;WITH TableA (ID, Quantity) AS ( SELECT 1, 3 UNION ALL SELECT 2, 2 ) , q AS ( SELECT ID ...
Single select to generate rows by column TableA.quantity. Used only ISO/ANSI SQL Standard syntax 2003 (DB must support window function). TableA definition: ``` |----|----------|---------------| | id | quantity | another_value | |----|----------|---------------| | 1 | 3| value_a | | 2 | 2| ...
6,439,716
I have the following table TABLE A ======= ``` ID | QUANTITY ------------ 1 | 3 2 | 2 ``` What I need is TABLE B ======= ``` ID | Ref No. ------------ 1 | MyRef1 1 | MyRef2 1 | MyRef3 2 | AnotherRef1 2 | AnotherRef2 ``` i.e. I need to generate Table B with the same number of rows as the quantity in A wit...
2011/06/22
[ "https://Stackoverflow.com/questions/6439716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/196273/" ]
Following gives you the correct number of rows but my observation is the same as @Dems: How do you determine `MyRef` and `AnotherRef`? *Note that this requires at least SQL Server 2005* ### SQL Statement ``` ;WITH TableA (ID, Quantity) AS ( SELECT 1, 3 UNION ALL SELECT 2, 2 ) , q AS ( SELECT ID ...
A very simple way to generate @n lines is the following ``` DECLARE @n INT= 50 SELECT RowId = ROW_NUMBER()OVER(ORDER BY (SELECT 0)) FROM (VALUES(CAST(REPLICATE('<a/>',@n) AS XML)))xmlLines(xmlLines) CROSS APPLY xmlLines.nodes('*')Lines(Line) ``` This method has a limit. Since the REPLICATE function pr...
6,439,716
I have the following table TABLE A ======= ``` ID | QUANTITY ------------ 1 | 3 2 | 2 ``` What I need is TABLE B ======= ``` ID | Ref No. ------------ 1 | MyRef1 1 | MyRef2 1 | MyRef3 2 | AnotherRef1 2 | AnotherRef2 ``` i.e. I need to generate Table B with the same number of rows as the quantity in A wit...
2011/06/22
[ "https://Stackoverflow.com/questions/6439716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/196273/" ]
I'll assume 1. MyRef etc is a column in TableA 2. You have a [numbers](http://dataeducation.com/you-require-a-numbers-table/) table Something like: ``` SELECT * INTO #TableA FROM ( SELECT 1 AS ID, 3 AS QUANTITY, 'MyRef' AS refColumn UNION ALL SELECT 2, 2, 'AnotherRef' ) T ;WITH Nbrs ( Number ) AS ( ...
A Numbers table solution will work in MS Access as long as the number of records in tblNumbers exceeds the maximum of Quantity values found in TableA: `SELECT TableA.ID, TableA.Quantity, tblNumbers.RecNum FROM TableA LEFT JOIN tblNumbers ON tblNumbers.RecNum <= TableA.Quantity ORDER BY TableA.ID, tblNumbers.RecNum;`...
6,439,716
I have the following table TABLE A ======= ``` ID | QUANTITY ------------ 1 | 3 2 | 2 ``` What I need is TABLE B ======= ``` ID | Ref No. ------------ 1 | MyRef1 1 | MyRef2 1 | MyRef3 2 | AnotherRef1 2 | AnotherRef2 ``` i.e. I need to generate Table B with the same number of rows as the quantity in A wit...
2011/06/22
[ "https://Stackoverflow.com/questions/6439716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/196273/" ]
This will create the number of rows you want, in SQL Server 2005+, though I'm not sure exactly how you want to determine what MyRef and AnotherRef should be... ``` WITH expanded AS ( SELECT id, Quantity FROM myTable UNION ALL SELECT id, Quantity - 1 FROM expanded WHERE Quantity > 1 ) SELECT *, ROW_NUMBER(...
Following gives you the correct number of rows but my observation is the same as @Dems: How do you determine `MyRef` and `AnotherRef`? *Note that this requires at least SQL Server 2005* ### SQL Statement ``` ;WITH TableA (ID, Quantity) AS ( SELECT 1, 3 UNION ALL SELECT 2, 2 ) , q AS ( SELECT ID ...
6,439,716
I have the following table TABLE A ======= ``` ID | QUANTITY ------------ 1 | 3 2 | 2 ``` What I need is TABLE B ======= ``` ID | Ref No. ------------ 1 | MyRef1 1 | MyRef2 1 | MyRef3 2 | AnotherRef1 2 | AnotherRef2 ``` i.e. I need to generate Table B with the same number of rows as the quantity in A wit...
2011/06/22
[ "https://Stackoverflow.com/questions/6439716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/196273/" ]
I'll assume 1. MyRef etc is a column in TableA 2. You have a [numbers](http://dataeducation.com/you-require-a-numbers-table/) table Something like: ``` SELECT * INTO #TableA FROM ( SELECT 1 AS ID, 3 AS QUANTITY, 'MyRef' AS refColumn UNION ALL SELECT 2, 2, 'AnotherRef' ) T ;WITH Nbrs ( Number ) AS ( ...
Following gives you the correct number of rows but my observation is the same as @Dems: How do you determine `MyRef` and `AnotherRef`? *Note that this requires at least SQL Server 2005* ### SQL Statement ``` ;WITH TableA (ID, Quantity) AS ( SELECT 1, 3 UNION ALL SELECT 2, 2 ) , q AS ( SELECT ID ...
6,439,716
I have the following table TABLE A ======= ``` ID | QUANTITY ------------ 1 | 3 2 | 2 ``` What I need is TABLE B ======= ``` ID | Ref No. ------------ 1 | MyRef1 1 | MyRef2 1 | MyRef3 2 | AnotherRef1 2 | AnotherRef2 ``` i.e. I need to generate Table B with the same number of rows as the quantity in A wit...
2011/06/22
[ "https://Stackoverflow.com/questions/6439716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/196273/" ]
I'll assume 1. MyRef etc is a column in TableA 2. You have a [numbers](http://dataeducation.com/you-require-a-numbers-table/) table Something like: ``` SELECT * INTO #TableA FROM ( SELECT 1 AS ID, 3 AS QUANTITY, 'MyRef' AS refColumn UNION ALL SELECT 2, 2, 'AnotherRef' ) T ;WITH Nbrs ( Number ) AS ( ...
Single select to generate rows by column TableA.quantity. Used only ISO/ANSI SQL Standard syntax 2003 (DB must support window function). TableA definition: ``` |----|----------|---------------| | id | quantity | another_value | |----|----------|---------------| | 1 | 3| value_a | | 2 | 2| ...
6,439,716
I have the following table TABLE A ======= ``` ID | QUANTITY ------------ 1 | 3 2 | 2 ``` What I need is TABLE B ======= ``` ID | Ref No. ------------ 1 | MyRef1 1 | MyRef2 1 | MyRef3 2 | AnotherRef1 2 | AnotherRef2 ``` i.e. I need to generate Table B with the same number of rows as the quantity in A wit...
2011/06/22
[ "https://Stackoverflow.com/questions/6439716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/196273/" ]
This would also do the trick. It uses recursion, creates a table with rows 1-100. ``` WITH NBR ( NUM ) AS ( SELECT 1 UNION ALL SELECT 1 + NUM FROM NBR WHERE NUM < 100 ) SELECT * into NUMBERS from NBR ```
Single select to generate rows by column TableA.quantity. Used only ISO/ANSI SQL Standard syntax 2003 (DB must support window function). TableA definition: ``` |----|----------|---------------| | id | quantity | another_value | |----|----------|---------------| | 1 | 3| value_a | | 2 | 2| ...
6,439,716
I have the following table TABLE A ======= ``` ID | QUANTITY ------------ 1 | 3 2 | 2 ``` What I need is TABLE B ======= ``` ID | Ref No. ------------ 1 | MyRef1 1 | MyRef2 1 | MyRef3 2 | AnotherRef1 2 | AnotherRef2 ``` i.e. I need to generate Table B with the same number of rows as the quantity in A wit...
2011/06/22
[ "https://Stackoverflow.com/questions/6439716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/196273/" ]
This would also do the trick. It uses recursion, creates a table with rows 1-100. ``` WITH NBR ( NUM ) AS ( SELECT 1 UNION ALL SELECT 1 + NUM FROM NBR WHERE NUM < 100 ) SELECT * into NUMBERS from NBR ```
A very simple way to generate @n lines is the following ``` DECLARE @n INT= 50 SELECT RowId = ROW_NUMBER()OVER(ORDER BY (SELECT 0)) FROM (VALUES(CAST(REPLICATE('<a/>',@n) AS XML)))xmlLines(xmlLines) CROSS APPLY xmlLines.nodes('*')Lines(Line) ``` This method has a limit. Since the REPLICATE function pr...
6,439,716
I have the following table TABLE A ======= ``` ID | QUANTITY ------------ 1 | 3 2 | 2 ``` What I need is TABLE B ======= ``` ID | Ref No. ------------ 1 | MyRef1 1 | MyRef2 1 | MyRef3 2 | AnotherRef1 2 | AnotherRef2 ``` i.e. I need to generate Table B with the same number of rows as the quantity in A wit...
2011/06/22
[ "https://Stackoverflow.com/questions/6439716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/196273/" ]
A Numbers table solution will work in MS Access as long as the number of records in tblNumbers exceeds the maximum of Quantity values found in TableA: `SELECT TableA.ID, TableA.Quantity, tblNumbers.RecNum FROM TableA LEFT JOIN tblNumbers ON tblNumbers.RecNum <= TableA.Quantity ORDER BY TableA.ID, tblNumbers.RecNum;`...
A very simple way to generate @n lines is the following ``` DECLARE @n INT= 50 SELECT RowId = ROW_NUMBER()OVER(ORDER BY (SELECT 0)) FROM (VALUES(CAST(REPLICATE('<a/>',@n) AS XML)))xmlLines(xmlLines) CROSS APPLY xmlLines.nodes('*')Lines(Line) ``` This method has a limit. Since the REPLICATE function pr...
6,439,716
I have the following table TABLE A ======= ``` ID | QUANTITY ------------ 1 | 3 2 | 2 ``` What I need is TABLE B ======= ``` ID | Ref No. ------------ 1 | MyRef1 1 | MyRef2 1 | MyRef3 2 | AnotherRef1 2 | AnotherRef2 ``` i.e. I need to generate Table B with the same number of rows as the quantity in A wit...
2011/06/22
[ "https://Stackoverflow.com/questions/6439716", "https://Stackoverflow.com", "https://Stackoverflow.com/users/196273/" ]
This will create the number of rows you want, in SQL Server 2005+, though I'm not sure exactly how you want to determine what MyRef and AnotherRef should be... ``` WITH expanded AS ( SELECT id, Quantity FROM myTable UNION ALL SELECT id, Quantity - 1 FROM expanded WHERE Quantity > 1 ) SELECT *, ROW_NUMBER(...
Single select to generate rows by column TableA.quantity. Used only ISO/ANSI SQL Standard syntax 2003 (DB must support window function). TableA definition: ``` |----|----------|---------------| | id | quantity | another_value | |----|----------|---------------| | 1 | 3| value_a | | 2 | 2| ...
64,296,854
**Note:** I am using boostrap css for some other components. **ISSUE =>** I want the `text-area` and `image` to be side by side: > > **html :** > > > ```html <div class="card"> <div class="card__text"> <div> <h3 class="card__text-title">Leed guitarist</h3> <p>Some random lorem ...
2020/10/10
[ "https://Stackoverflow.com/questions/64296854", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12954914/" ]
I was able to replicate your issue here <https://codepen.io/dpogni/pen/bGedwbZ> You need to add `flex-direction: row;` to your card class.
I think you are missing a closing curly brace in scss. EDIT: I tried the same on codepen and the image is getting rendered on the right of the text already. Maybe some other css is overriding it
53,478,355
I'm traying to get product sku that are displayed on the website with the category of that product. Output: ``` +-------------+------------+ | sku | category_n | +-------------+------------+ | 855202 | test1 | | 87972_k | test2 | | 887997 | test1 | +-------------+------------+ ``...
2018/11/26
[ "https://Stackoverflow.com/questions/53478355", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8727252/" ]
You probably want to use [combineLatest](http://reactivex.io/documentation/operators/combinelatest.html) instead ``` BehaviorSubject<Map<int, String>> subject = BehaviorSubject(seedValue: { 1: "Hi from 1", 2: "Hi from 2", 3: "Hi from 3", 4: "Hi from 4", 5: "Hi from 5", }); void main() { Observable.combine...
**Edit**: shortly after posting this I realized that it completely depends on how the data is exposed: If you have a method which has a signature like `Observable<String> getStringForInt(int number)` and you have to call it for every item in the list, my solution is the one for you. **Note** if the above method always...
49,387,852
I have a public dictionnary within a public class as follow: ``` namespace ApiAssembly { public static class TypeStore { /// <summary> /// Initializes static members of the <see cref="TypeStore"/> class. /// </summary> static TypeStore() { Store = new Diction...
2018/03/20
[ "https://Stackoverflow.com/questions/49387852", "https://Stackoverflow.com", "https://Stackoverflow.com/users/837623/" ]
Expose it as: ``` IReadOnlyDictionary<string, Type> dictionary = new Dictionary<string, Type>(); ``` Or additionally use `ReadOnlyDictionary` wrapper to prevent casting back to `Dictionary`. Full example: ``` public static class TypeStore { private static Dictionary<string, Type> store; private static Rea...
You should separate the actual storage dictionary and the one you use for the outside world. An easy way would be: ``` private static Dictionary<string, Type> Storage { get; } = new Dictionary<string, Type>(); public static ReadOnlyDictionary<string, Type> Store => new ReadOnlyDictionary<string, Type>(...
1,404,124
What is the correct way of making nmcli commands persistent? For example: `nmcli device modify eth0 ipv4.method auto` works but if I reboot the machine this is lost. I know about interactive `nmcli> save` but I do not want to use interactive mode and I was not able to find the param neded to save these. What is the ...
2019/02/10
[ "https://superuser.com/questions/1404124", "https://superuser.com", "https://superuser.com/users/3004/" ]
I work without venv on Debian 10. I was searching for the misterious libplaidml.so and finally found it ! It's in `~/.local/lib/libplaidml.so` Now we want plaidml to be able to find it's own library and local configuration files which lie in `~/.local/share/plaidml/config.json`. It also can't find them. So it's kind of...
> > OSError: > /home/e1326196/plaidml/lib/python3.5/site-packages/plaidml/libplaidml.so: > cannot open shared object file: No such file or directory > > > I actually just ran into the same problem. From my limited understanding, this means when building something, the linker cannot find the shared library it bel...
17,021
Some time ago there was an advanced type of Google search, accessible via left panel (more search tools and time period limiting). The results of `latest` was almost realtime, and there was an autoupdater (new statuses were printed at top). Now I can't find this feature. How can I do a realtime Twitter search? The sea...
2011/07/08
[ "https://webapps.stackexchange.com/questions/17021", "https://webapps.stackexchange.com", "https://webapps.stackexchange.com/users/-1/" ]
Google "canceled" their Twitter realtime search recently: <http://blog.tweetsmarter.com/twitter-search/google-contract-with-twitter-expires-suspends-realtime-search/> Maybe they want to "push" Google+? ;)
You can do this with TweetDeck. Create a custom column for your search and it will update in real time.
40,166,938
Alright, my first question on SO, how exciting! :) I am trying to get MomentJS definitions to work with Typescript 2.0. I have no issues in getting Angular definitions to work, simply by doing `npm install @types/angular --save-dev`. However, MomentJS (2.15.1) already comes with `moment.d.ts` as part of the package ...
2016/10/21
[ "https://Stackoverflow.com/questions/40166938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1846266/" ]
I found somewhere else (but don't remember where), that you should change moment.d.ts by replacing export statement with ``` declare module 'moment' { export default moment; } ``` add dummy file fixmoment.ts to your project with following line ``` import * as moment from 'moment'; ``` Compiling with tsc direc...
I had same problem. I read this [comment](https://github.com/Microsoft/TypeScript/issues/10638#issuecomment-247478793) and add `declare var moment;` to `custom-typings.d.ts`. then it worked fine, but i don't understand why. VS2015 SP3 + TypeScript2.0.6.0, angular2-webpack-starter based project.
40,166,938
Alright, my first question on SO, how exciting! :) I am trying to get MomentJS definitions to work with Typescript 2.0. I have no issues in getting Angular definitions to work, simply by doing `npm install @types/angular --save-dev`. However, MomentJS (2.15.1) already comes with `moment.d.ts` as part of the package ...
2016/10/21
[ "https://Stackoverflow.com/questions/40166938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1846266/" ]
I found somewhere else (but don't remember where), that you should change moment.d.ts by replacing export statement with ``` declare module 'moment' { export default moment; } ``` add dummy file fixmoment.ts to your project with following line ``` import * as moment from 'moment'; ``` Compiling with tsc direc...
Doing the following in a `customer-typings.d.ts` file worked for me ``` ///<reference path="node_modules/moment/moment.d.ts"/> import moment = Moment; declare const moment: Moment; ``` I didn't even need to make any changes to ts `tsconfig.json` file
40,166,938
Alright, my first question on SO, how exciting! :) I am trying to get MomentJS definitions to work with Typescript 2.0. I have no issues in getting Angular definitions to work, simply by doing `npm install @types/angular --save-dev`. However, MomentJS (2.15.1) already comes with `moment.d.ts` as part of the package ...
2016/10/21
[ "https://Stackoverflow.com/questions/40166938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1846266/" ]
You will find the `moment.d.ts` file under `node_modules\moment` since it is packaged with the moment itself. With VS 2017 and TypeScript 2.2, you do not have to specify `typeRoots`; however, your environment may require specifying two or more of them such as: `typeRoots: [ 'node_modules/@types/', 'node_modules/momen...
I had same problem. I read this [comment](https://github.com/Microsoft/TypeScript/issues/10638#issuecomment-247478793) and add `declare var moment;` to `custom-typings.d.ts`. then it worked fine, but i don't understand why. VS2015 SP3 + TypeScript2.0.6.0, angular2-webpack-starter based project.
40,166,938
Alright, my first question on SO, how exciting! :) I am trying to get MomentJS definitions to work with Typescript 2.0. I have no issues in getting Angular definitions to work, simply by doing `npm install @types/angular --save-dev`. However, MomentJS (2.15.1) already comes with `moment.d.ts` as part of the package ...
2016/10/21
[ "https://Stackoverflow.com/questions/40166938", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1846266/" ]
You will find the `moment.d.ts` file under `node_modules\moment` since it is packaged with the moment itself. With VS 2017 and TypeScript 2.2, you do not have to specify `typeRoots`; however, your environment may require specifying two or more of them such as: `typeRoots: [ 'node_modules/@types/', 'node_modules/momen...
Doing the following in a `customer-typings.d.ts` file worked for me ``` ///<reference path="node_modules/moment/moment.d.ts"/> import moment = Moment; declare const moment: Moment; ``` I didn't even need to make any changes to ts `tsconfig.json` file
13,830,401
My problem is that I have an Activity and into there I want to take the result of the read\_list method. However the read\_list method takes a lot of time to complete, therefore I want to create a new Thread, and this to run this method and then return it to the main activity. I know that I can do smt similar with the...
2012/12/11
[ "https://Stackoverflow.com/questions/13830401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1375690/" ]
STart with line 1 of `app/assets/stylesheets/custom.css.scss` and look for an errant `>`. Also look to make sure that application.scss is what you expect. Also just rename `custom.css.scss` to just`custom.scss` Heck, that may do it.
The same thing happened to me as well, "Precompiling assets failed." while pushing to heroku, In my development environment I had an error in my css: "......... cursor: pointer color: #808080;" missing the ";" after the "pointer", the development environment didn't mind the error, but Heroku's...
13,830,401
My problem is that I have an Activity and into there I want to take the result of the read\_list method. However the read\_list method takes a lot of time to complete, therefore I want to create a new Thread, and this to run this method and then return it to the main activity. I know that I can do smt similar with the...
2012/12/11
[ "https://Stackoverflow.com/questions/13830401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1375690/" ]
STart with line 1 of `app/assets/stylesheets/custom.css.scss` and look for an errant `>`. Also look to make sure that application.scss is what you expect. Also just rename `custom.css.scss` to just`custom.scss` Heck, that may do it.
Try this in the terminal: ``` rake assets:precompile RAILS_ENV=production --trace ``` Better than trying to push on heroku. I just had the same errors. The problem was: * the config.secret\_key of devise was commented * syntax\_error in a javascript file ( an "of" instead of an "in" in a for loop)
13,830,401
My problem is that I have an Activity and into there I want to take the result of the read\_list method. However the read\_list method takes a lot of time to complete, therefore I want to create a new Thread, and this to run this method and then return it to the main activity. I know that I can do smt similar with the...
2012/12/11
[ "https://Stackoverflow.com/questions/13830401", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1375690/" ]
Try this in the terminal: ``` rake assets:precompile RAILS_ENV=production --trace ``` Better than trying to push on heroku. I just had the same errors. The problem was: * the config.secret\_key of devise was commented * syntax\_error in a javascript file ( an "of" instead of an "in" in a for loop)
The same thing happened to me as well, "Precompiling assets failed." while pushing to heroku, In my development environment I had an error in my css: "......... cursor: pointer color: #808080;" missing the ";" after the "pointer", the development environment didn't mind the error, but Heroku's...
32,754,506
I have the following `MainWindow` class: ``` using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; namespace mylibrary { public class MainWindow : Window { WorkSpaceView ws; public MainWindow() : ba...
2015/09/24
[ "https://Stackoverflow.com/questions/32754506", "https://Stackoverflow.com", "https://Stackoverflow.com/users/764809/" ]
A WPF window has a [`Content` property.](https://msdn.microsoft.com/en-us/library/system.windows.controls.contentcontrol.content(v=vs.110).aspx) Typically, a WPF control that can have only one child or content item has this property. If it can have multiple, it will likely use the `Children` property. adding your co...
If you have a grid in your xaml file then you can do something like ``` var myUsercontrol= new WorkSpaceView (); MyGrid.Children.Add(myUsercontrol); ```
2,493
Is there an equivalent to the yum "whatprovides" option in apt-get? For example on CentOS ``` yum whatprovides /usr/share/gdm/themes/TreeFlower/background.png ``` Tells me ``` redhat-logos-4.9.99-11.el5.centos.noarch : CentOS-related icons and pictures. Repo : base Matched from: Filename : /usr/share/g...
2010/08/17
[ "https://askubuntu.com/questions/2493", "https://askubuntu.com", "https://askubuntu.com/users/458/" ]
This depends on whether the package containing the file is already installed. If so, use `dpkg -S filename`. If your intention is to find out which package to install to get a certain file, one option is to use the online [packages.ubuntu.com](http://packages.ubuntu.com/): scroll down to "Search the contents of packag...
You want the 'apt-file' command. ``` apt-file search /usr/share/gdm/themes/TreeFlower/background.png ``` Before using it, you may need to create or update its database by running: ``` apt-file update ```
2,493
Is there an equivalent to the yum "whatprovides" option in apt-get? For example on CentOS ``` yum whatprovides /usr/share/gdm/themes/TreeFlower/background.png ``` Tells me ``` redhat-logos-4.9.99-11.el5.centos.noarch : CentOS-related icons and pictures. Repo : base Matched from: Filename : /usr/share/g...
2010/08/17
[ "https://askubuntu.com/questions/2493", "https://askubuntu.com", "https://askubuntu.com/users/458/" ]
This depends on whether the package containing the file is already installed. If so, use `dpkg -S filename`. If your intention is to find out which package to install to get a certain file, one option is to use the online [packages.ubuntu.com](http://packages.ubuntu.com/): scroll down to "Search the contents of packag...
`wajig whichpkg /usr/share/gdm/themes/TreeFlower/background.png` You'll have to install wajig, which is a frontend to a bunch of utilities related to apt. If you use wajig, you can use all of those tools without having to memorize their names.
2,493
Is there an equivalent to the yum "whatprovides" option in apt-get? For example on CentOS ``` yum whatprovides /usr/share/gdm/themes/TreeFlower/background.png ``` Tells me ``` redhat-logos-4.9.99-11.el5.centos.noarch : CentOS-related icons and pictures. Repo : base Matched from: Filename : /usr/share/g...
2010/08/17
[ "https://askubuntu.com/questions/2493", "https://askubuntu.com", "https://askubuntu.com/users/458/" ]
This depends on whether the package containing the file is already installed. If so, use `dpkg -S filename`. If your intention is to find out which package to install to get a certain file, one option is to use the online [packages.ubuntu.com](http://packages.ubuntu.com/): scroll down to "Search the contents of packag...
Isn't this the same question as this [How do I find the package that provides a file?](https://askubuntu.com/questions/481/how-do-i-find-the-package-that-provides-a-file) I prefer the `dpkg -S <filepath>` command
2,493
Is there an equivalent to the yum "whatprovides" option in apt-get? For example on CentOS ``` yum whatprovides /usr/share/gdm/themes/TreeFlower/background.png ``` Tells me ``` redhat-logos-4.9.99-11.el5.centos.noarch : CentOS-related icons and pictures. Repo : base Matched from: Filename : /usr/share/g...
2010/08/17
[ "https://askubuntu.com/questions/2493", "https://askubuntu.com", "https://askubuntu.com/users/458/" ]
You want the 'apt-file' command. ``` apt-file search /usr/share/gdm/themes/TreeFlower/background.png ``` Before using it, you may need to create or update its database by running: ``` apt-file update ```
`wajig whichpkg /usr/share/gdm/themes/TreeFlower/background.png` You'll have to install wajig, which is a frontend to a bunch of utilities related to apt. If you use wajig, you can use all of those tools without having to memorize their names.
2,493
Is there an equivalent to the yum "whatprovides" option in apt-get? For example on CentOS ``` yum whatprovides /usr/share/gdm/themes/TreeFlower/background.png ``` Tells me ``` redhat-logos-4.9.99-11.el5.centos.noarch : CentOS-related icons and pictures. Repo : base Matched from: Filename : /usr/share/g...
2010/08/17
[ "https://askubuntu.com/questions/2493", "https://askubuntu.com", "https://askubuntu.com/users/458/" ]
You want the 'apt-file' command. ``` apt-file search /usr/share/gdm/themes/TreeFlower/background.png ``` Before using it, you may need to create or update its database by running: ``` apt-file update ```
Isn't this the same question as this [How do I find the package that provides a file?](https://askubuntu.com/questions/481/how-do-i-find-the-package-that-provides-a-file) I prefer the `dpkg -S <filepath>` command
406,667
I was wondering if there is a word to describe a person who always is really quick at looking things up on etc. his phone. E.g when you just can't remember the characters name in the film you just saw and this guy quickly pulls his phone out and looks it up. I am looking for an adjective to fit: I was not sure about...
2017/08/20
[ "https://english.stackexchange.com/questions/406667", "https://english.stackexchange.com", "https://english.stackexchange.com/users/254135/" ]
I can't come up with a word that fits the bill. Depending on the context in which you wish to use the term, perhaps you could coin one along the lines of: *Googleholic,* *Googlemaniac,* *Wiki-it-all*, *Net-ref-nut* etc.
Inquisitive Fidgety Animated Detail obsessed /OCD Impolite Gullible?![enter image description here](https://i.stack.imgur.com/XcCXY.jpg)
406,667
I was wondering if there is a word to describe a person who always is really quick at looking things up on etc. his phone. E.g when you just can't remember the characters name in the film you just saw and this guy quickly pulls his phone out and looks it up. I am looking for an adjective to fit: I was not sure about...
2017/08/20
[ "https://english.stackexchange.com/questions/406667", "https://english.stackexchange.com", "https://english.stackexchange.com/users/254135/" ]
I wasn't sure about the meaning of the word, but my ***google-master*** friend quickly found the answer with his phone. I can't give you a definition or a source because I made it up.
Inquisitive Fidgety Animated Detail obsessed /OCD Impolite Gullible?![enter image description here](https://i.stack.imgur.com/XcCXY.jpg)
406,667
I was wondering if there is a word to describe a person who always is really quick at looking things up on etc. his phone. E.g when you just can't remember the characters name in the film you just saw and this guy quickly pulls his phone out and looks it up. I am looking for an adjective to fit: I was not sure about...
2017/08/20
[ "https://english.stackexchange.com/questions/406667", "https://english.stackexchange.com", "https://english.stackexchange.com/users/254135/" ]
The skill is known as [Google-fu](http://www.urbandictionary.com/define.php?term=google-fu), and is a [noun](https://en.wiktionary.org/wiki/Google-fu). So although you can't use it as a straight adjective (ie 'he is Google-fu'), you can say 'his Google-fu is very impressive'. In terms of your sample sentence, you cou...
Inquisitive Fidgety Animated Detail obsessed /OCD Impolite Gullible?![enter image description here](https://i.stack.imgur.com/XcCXY.jpg)
406,667
I was wondering if there is a word to describe a person who always is really quick at looking things up on etc. his phone. E.g when you just can't remember the characters name in the film you just saw and this guy quickly pulls his phone out and looks it up. I am looking for an adjective to fit: I was not sure about...
2017/08/20
[ "https://english.stackexchange.com/questions/406667", "https://english.stackexchange.com", "https://english.stackexchange.com/users/254135/" ]
The skill is known as [Google-fu](http://www.urbandictionary.com/define.php?term=google-fu), and is a [noun](https://en.wiktionary.org/wiki/Google-fu). So although you can't use it as a straight adjective (ie 'he is Google-fu'), you can say 'his Google-fu is very impressive'. In terms of your sample sentence, you cou...
I can't come up with a word that fits the bill. Depending on the context in which you wish to use the term, perhaps you could coin one along the lines of: *Googleholic,* *Googlemaniac,* *Wiki-it-all*, *Net-ref-nut* etc.