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
97,845
This is for a book. An ancient, badly damaged, base has been found in the asteroid belt. The base has been open to the vacuum of space, although a large proportion of the base is within the body of the asteroid and not on the surface, so has been protected from solar radiations and micro-meteor impacts. I wanted the p...
2017/11/14
[ "https://worldbuilding.stackexchange.com/questions/97845", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/44392/" ]
Carbon dating is problematic, as you need to know level of Carbon 14 in the atmosphere at the time the animal or plant you are studying died. But there are other radiometric dating methods which might work. The simplest thing would perhaps be if they found a machine similar to a [radioisotope thermoelectric generator...
**[One option is to use meteorite impacts](https://pseudoastro.wordpress.com/2008/10/21/dating-planetary-surfaces-with-craters-why-there-is-no-crisis-in-crater-count-dating/)** miteorite [dating](https://pseudoastro.wordpress.com/2008/10/21/dating-planetary-surfaces-with-craters-why-there-is-no-crisis-in-crater-count-...
97,845
This is for a book. An ancient, badly damaged, base has been found in the asteroid belt. The base has been open to the vacuum of space, although a large proportion of the base is within the body of the asteroid and not on the surface, so has been protected from solar radiations and micro-meteor impacts. I wanted the p...
2017/11/14
[ "https://worldbuilding.stackexchange.com/questions/97845", "https://worldbuilding.stackexchange.com", "https://worldbuilding.stackexchange.com/users/44392/" ]
How about if an artifact is found that dates the base. Something like a calendar left by the occupants of the base and one of your characters puzzles out how to read it. Maybe something related to position of the stars relative to the solar system or something.
There are a large number of problems with this scenario. First things first Carbon-14 Dating tops out at around 50,000 years. Second Carbon-14 dating relies on the fact that Earth has a steady rate of Carbon-14 creation and terrestrial creatures have a predictable rate of carbon uptake, thus dates in the nuclear age ar...
1,027,608
So, I needed the [Semantics Engineering with PLT Redex](https://mitpress.mit.edu/books/semantics-engineering-plt-redex) textbook to complete a homework assignment this week. I needed it in a digital format because I'm going to [POPL 2016](http://conf.researchr.org/home/POPL-2016) tomorrow and I can't have it delivered ...
2016/01/17
[ "https://superuser.com/questions/1027608", "https://superuser.com", "https://superuser.com/users/328397/" ]
I will try to list all the solutions I've found. First one. Tested solution: working, and very easy. First install *Wine* on your Linux. Then download Adobe Digital editions. [Link to download Adobe Digital editions](https://www.adobe.com/fr/solutions/ebook/digital-editions/download.html) Then, install the file you ...
.acsm can only be used with Adobe Digital Editions and stands for Adobe Content Server Manager. For more information about Adobe Digital Editions please see <http://www.adobe.com/products/digitaleditions/faq/> Side note (may not be generally applicable to Digital Editions users): Stated in the agreement (may be of co...
1,027,608
So, I needed the [Semantics Engineering with PLT Redex](https://mitpress.mit.edu/books/semantics-engineering-plt-redex) textbook to complete a homework assignment this week. I needed it in a digital format because I'm going to [POPL 2016](http://conf.researchr.org/home/POPL-2016) tomorrow and I can't have it delivered ...
2016/01/17
[ "https://superuser.com/questions/1027608", "https://superuser.com", "https://superuser.com/users/328397/" ]
The question is quite old, but people like myself still trip up on DRM locked ebooks. I assume you want to get out of the acsm a DRM-free epub. My instruction is for Ubuntu/Debian using apt-get, but the tools exist for other distros as well. I need a couple of tools in particular: the [DeDRM tool](https://github.com/ap...
.acsm can only be used with Adobe Digital Editions and stands for Adobe Content Server Manager. For more information about Adobe Digital Editions please see <http://www.adobe.com/products/digitaleditions/faq/> Side note (may not be generally applicable to Digital Editions users): Stated in the agreement (may be of co...
1,027,608
So, I needed the [Semantics Engineering with PLT Redex](https://mitpress.mit.edu/books/semantics-engineering-plt-redex) textbook to complete a homework assignment this week. I needed it in a digital format because I'm going to [POPL 2016](http://conf.researchr.org/home/POPL-2016) tomorrow and I can't have it delivered ...
2016/01/17
[ "https://superuser.com/questions/1027608", "https://superuser.com", "https://superuser.com/users/328397/" ]
I created a program called [Knock](https://github.com/BentonEdmondson/knock) to convert ACSM files to DRM-free EPUB files at the command line: ``` [user@computer:~]$ knock ./example.acsm downloading the file from Adobe... removing DRM from the file... DRM-free EPUB file generated at ./example.epub ``` It doesn't use...
.acsm can only be used with Adobe Digital Editions and stands for Adobe Content Server Manager. For more information about Adobe Digital Editions please see <http://www.adobe.com/products/digitaleditions/faq/> Side note (may not be generally applicable to Digital Editions users): Stated in the agreement (may be of co...
1,027,608
So, I needed the [Semantics Engineering with PLT Redex](https://mitpress.mit.edu/books/semantics-engineering-plt-redex) textbook to complete a homework assignment this week. I needed it in a digital format because I'm going to [POPL 2016](http://conf.researchr.org/home/POPL-2016) tomorrow and I can't have it delivered ...
2016/01/17
[ "https://superuser.com/questions/1027608", "https://superuser.com", "https://superuser.com/users/328397/" ]
.acsm can only be used with Adobe Digital Editions and stands for Adobe Content Server Manager. For more information about Adobe Digital Editions please see <http://www.adobe.com/products/digitaleditions/faq/> Side note (may not be generally applicable to Digital Editions users): Stated in the agreement (may be of co...
I have also used release of 'knock' downloaded from Web Archive (<https://web.archive.org/web/20221020182238mp_/https://github.com/BentonEdmondson/knock/releases/download/1.3.1/knock-1.3.1-x86_64-linux>). Worked very well - thank you [@BentonEdmontson](https://superuser.com/users/1470682/bentonedmondson) !
1,027,608
So, I needed the [Semantics Engineering with PLT Redex](https://mitpress.mit.edu/books/semantics-engineering-plt-redex) textbook to complete a homework assignment this week. I needed it in a digital format because I'm going to [POPL 2016](http://conf.researchr.org/home/POPL-2016) tomorrow and I can't have it delivered ...
2016/01/17
[ "https://superuser.com/questions/1027608", "https://superuser.com", "https://superuser.com/users/328397/" ]
The question is quite old, but people like myself still trip up on DRM locked ebooks. I assume you want to get out of the acsm a DRM-free epub. My instruction is for Ubuntu/Debian using apt-get, but the tools exist for other distros as well. I need a couple of tools in particular: the [DeDRM tool](https://github.com/ap...
I will try to list all the solutions I've found. First one. Tested solution: working, and very easy. First install *Wine* on your Linux. Then download Adobe Digital editions. [Link to download Adobe Digital editions](https://www.adobe.com/fr/solutions/ebook/digital-editions/download.html) Then, install the file you ...
1,027,608
So, I needed the [Semantics Engineering with PLT Redex](https://mitpress.mit.edu/books/semantics-engineering-plt-redex) textbook to complete a homework assignment this week. I needed it in a digital format because I'm going to [POPL 2016](http://conf.researchr.org/home/POPL-2016) tomorrow and I can't have it delivered ...
2016/01/17
[ "https://superuser.com/questions/1027608", "https://superuser.com", "https://superuser.com/users/328397/" ]
I created a program called [Knock](https://github.com/BentonEdmondson/knock) to convert ACSM files to DRM-free EPUB files at the command line: ``` [user@computer:~]$ knock ./example.acsm downloading the file from Adobe... removing DRM from the file... DRM-free EPUB file generated at ./example.epub ``` It doesn't use...
I will try to list all the solutions I've found. First one. Tested solution: working, and very easy. First install *Wine* on your Linux. Then download Adobe Digital editions. [Link to download Adobe Digital editions](https://www.adobe.com/fr/solutions/ebook/digital-editions/download.html) Then, install the file you ...
1,027,608
So, I needed the [Semantics Engineering with PLT Redex](https://mitpress.mit.edu/books/semantics-engineering-plt-redex) textbook to complete a homework assignment this week. I needed it in a digital format because I'm going to [POPL 2016](http://conf.researchr.org/home/POPL-2016) tomorrow and I can't have it delivered ...
2016/01/17
[ "https://superuser.com/questions/1027608", "https://superuser.com", "https://superuser.com/users/328397/" ]
I will try to list all the solutions I've found. First one. Tested solution: working, and very easy. First install *Wine* on your Linux. Then download Adobe Digital editions. [Link to download Adobe Digital editions](https://www.adobe.com/fr/solutions/ebook/digital-editions/download.html) Then, install the file you ...
I have also used release of 'knock' downloaded from Web Archive (<https://web.archive.org/web/20221020182238mp_/https://github.com/BentonEdmondson/knock/releases/download/1.3.1/knock-1.3.1-x86_64-linux>). Worked very well - thank you [@BentonEdmontson](https://superuser.com/users/1470682/bentonedmondson) !
1,027,608
So, I needed the [Semantics Engineering with PLT Redex](https://mitpress.mit.edu/books/semantics-engineering-plt-redex) textbook to complete a homework assignment this week. I needed it in a digital format because I'm going to [POPL 2016](http://conf.researchr.org/home/POPL-2016) tomorrow and I can't have it delivered ...
2016/01/17
[ "https://superuser.com/questions/1027608", "https://superuser.com", "https://superuser.com/users/328397/" ]
I created a program called [Knock](https://github.com/BentonEdmondson/knock) to convert ACSM files to DRM-free EPUB files at the command line: ``` [user@computer:~]$ knock ./example.acsm downloading the file from Adobe... removing DRM from the file... DRM-free EPUB file generated at ./example.epub ``` It doesn't use...
The question is quite old, but people like myself still trip up on DRM locked ebooks. I assume you want to get out of the acsm a DRM-free epub. My instruction is for Ubuntu/Debian using apt-get, but the tools exist for other distros as well. I need a couple of tools in particular: the [DeDRM tool](https://github.com/ap...
1,027,608
So, I needed the [Semantics Engineering with PLT Redex](https://mitpress.mit.edu/books/semantics-engineering-plt-redex) textbook to complete a homework assignment this week. I needed it in a digital format because I'm going to [POPL 2016](http://conf.researchr.org/home/POPL-2016) tomorrow and I can't have it delivered ...
2016/01/17
[ "https://superuser.com/questions/1027608", "https://superuser.com", "https://superuser.com/users/328397/" ]
The question is quite old, but people like myself still trip up on DRM locked ebooks. I assume you want to get out of the acsm a DRM-free epub. My instruction is for Ubuntu/Debian using apt-get, but the tools exist for other distros as well. I need a couple of tools in particular: the [DeDRM tool](https://github.com/ap...
I have also used release of 'knock' downloaded from Web Archive (<https://web.archive.org/web/20221020182238mp_/https://github.com/BentonEdmondson/knock/releases/download/1.3.1/knock-1.3.1-x86_64-linux>). Worked very well - thank you [@BentonEdmontson](https://superuser.com/users/1470682/bentonedmondson) !
1,027,608
So, I needed the [Semantics Engineering with PLT Redex](https://mitpress.mit.edu/books/semantics-engineering-plt-redex) textbook to complete a homework assignment this week. I needed it in a digital format because I'm going to [POPL 2016](http://conf.researchr.org/home/POPL-2016) tomorrow and I can't have it delivered ...
2016/01/17
[ "https://superuser.com/questions/1027608", "https://superuser.com", "https://superuser.com/users/328397/" ]
I created a program called [Knock](https://github.com/BentonEdmondson/knock) to convert ACSM files to DRM-free EPUB files at the command line: ``` [user@computer:~]$ knock ./example.acsm downloading the file from Adobe... removing DRM from the file... DRM-free EPUB file generated at ./example.epub ``` It doesn't use...
I have also used release of 'knock' downloaded from Web Archive (<https://web.archive.org/web/20221020182238mp_/https://github.com/BentonEdmondson/knock/releases/download/1.3.1/knock-1.3.1-x86_64-linux>). Worked very well - thank you [@BentonEdmontson](https://superuser.com/users/1470682/bentonedmondson) !
52,380,746
I am trying to integrate [an eBay SDK](https://github.com/davidtsadler/ebay-sdk-examples) developed by David Sadler which is in GitHub. But I got stuck on connection part itself. I am getting app token with <http://localhost/ebay-sdk-examples/oauth-tokens/01-get-app-token.php> with my production credentials. But when ...
2018/09/18
[ "https://Stackoverflow.com/questions/52380746", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7333870/" ]
Try this html ``` <button type="button" (click)="check()"></button> ``` TS ``` check(){ let data = { id: id, // custom values here }; this._router.navigate([ 'custom-url' ], { queryParams:data }); } ```
To pass data from one component to another you can use query parameters. In home component, when form submitted - navigate to table route and pass query parameters: ```js onSubmit(): void { this.router.navigate(['/table'], { queryParams: { start: '2', end: '9' } }); } ``` In xxx component (e.g. table compo...
578,686
I use MAAS to make landscape openstack outopilot. I use `sudo openstack-install` but failed. This is my commands.log ``` INFO • 01-28 11:21:33 [LINE:156, FUNC:<module>] • cloudinstall • cloud-install $ DEBUG • 01-28 11:21:33 [LINE:111, FUNC:main_loop] • cloudinstall.install • loop$ INFO • 01-28 11:21:33 [LINE:71, FUNC...
2015/01/28
[ "https://askubuntu.com/questions/578686", "https://askubuntu.com", "https://askubuntu.com/users/186239/" ]
I've seen anecdotal evidence on the juju mailing list that using juju from the juju stable ppa resolved this issue for at least one person. Here's the [mailing list post](https://lists.ubuntu.com/archives/juju/2014-May/003849.html)
It could be issue like mine, described here [Failed to bootstrap during Openstack autopilot installation](https://askubuntu.com/questions/714767/faild-to-bootstrap-during-openstack-autopilot-installation) Update your libraries with these command and start landscape installation again: ``` sudo apt-get update sudo apt...
277,053
According to [answers to this question](https://electronics.stackexchange.com/questions/25055/slow-blow-vs-fast-acting-fuse) there seem to be a standardized notation on fuses. For example F8AL250V means that it's a 8A fast fuse. On the other hand there is [answers this question](https://electronics.stackexchange.com/q...
2016/12/27
[ "https://electronics.stackexchange.com/questions/277053", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/134268/" ]
Individual manufacturers may have a consistent naming systems to identify slow, really slow, fast, turbo fast, or whatever, within their product line. Some smaller manufacturers may have copied parts of the designations from a dominant manufacturer, but you shouldn't count on that. Ultimately, only the datasheet tells ...
Slow is a relative term. Fast is a relative term. I wouldn't expect exact meanings for these two words. More specific meanings of the words might be drawn from the context in which the term is used. When using the **science** of electrical engineering, it is natural that the specific meaning of slow or fast should ...
277,053
According to [answers to this question](https://electronics.stackexchange.com/questions/25055/slow-blow-vs-fast-acting-fuse) there seem to be a standardized notation on fuses. For example F8AL250V means that it's a 8A fast fuse. On the other hand there is [answers this question](https://electronics.stackexchange.com/q...
2016/12/27
[ "https://electronics.stackexchange.com/questions/277053", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/134268/" ]
Every manufacturer has their own numbering system. Some numbers tell more about the products than others. It seems fairly easy to interpret that F8AL250V means an 8 amp, 250 volt fast-blowing fuse. It is a little more difficult to tell that it is a 5 X 20 mm glass tube fuse. Littelfuse shows 217008 as a replacement and...
Slow is a relative term. Fast is a relative term. I wouldn't expect exact meanings for these two words. More specific meanings of the words might be drawn from the context in which the term is used. When using the **science** of electrical engineering, it is natural that the specific meaning of slow or fast should ...
12,579,301
I have three values that should in total come to 100 at all times the user can only change one value at a time (by increments think slider it might not be single increments at a time) when one value changes I want the others to also change to reflect the constant total, however on a pro rata basis The larger of the ...
2012/09/25
[ "https://Stackoverflow.com/questions/12579301", "https://Stackoverflow.com", "https://Stackoverflow.com/users/297042/" ]
Not sure what you mean by "but should decrease less than the smaller value" - this seems to indicate it's *not* pro-rata, especially if the ratios are maintained only in one direction. Assuming that's a mistake, the way to pro-rata the non-moving values `b` and `c` is simply to maintain their ratio when the moving val...
as B and C also need to be calculated posted here in pascal (first IDE to hand) to show complete solution ``` if inhibit then exit; { stop position changes in callback calling this! } inhibit:=true; if (sender=TrackBar1) then begin aDelta:= trunc(TrackBar1.Position)-a; bDelta:= -aDelta * b / (b + c); cDelta:= ...
17,164,004
I have a matrix named `xs`: ``` array([[1, 1, 1, 1, 1, 0, 1, 0, 0, 2, 1], [2, 1, 0, 0, 0, 1, 2, 1, 1, 2, 2]]) ``` Now I want to replace the zeros by the nearest previous element in the same row (Assuming that the first column must be nonzero.). The rough solution as following: ``` In [55]: row, col = xs.sha...
2013/06/18
[ "https://Stackoverflow.com/questions/17164004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172677/" ]
If you can use [pandas](http://pandas.pydata.org/), [`replace`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.replace.html) will explicitly show the replacement in one instruction: ``` import pandas as pd import numpy as np a = np.array([[1, 1, 1, 1, 1, 0, 1, 0, 0, 2, 1], [2, 1...
My version, based on step-by-step rolling and masking of initial array, no additional libraries required (except numpy): ``` import numpy as np a = np.array([[1, 1, 1, 1, 1, 0, 1, 0, 0, 2, 1], [2, 1, 0, 0, 0, 1, 2, 1, 1, 2, 2]]) for i in xrange(a.shape[1]): a[a == 0] = np.roll(a,i)[a == 0] if n...
17,164,004
I have a matrix named `xs`: ``` array([[1, 1, 1, 1, 1, 0, 1, 0, 0, 2, 1], [2, 1, 0, 0, 0, 1, 2, 1, 1, 2, 2]]) ``` Now I want to replace the zeros by the nearest previous element in the same row (Assuming that the first column must be nonzero.). The rough solution as following: ``` In [55]: row, col = xs.sha...
2013/06/18
[ "https://Stackoverflow.com/questions/17164004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172677/" ]
My version, based on step-by-step rolling and masking of initial array, no additional libraries required (except numpy): ``` import numpy as np a = np.array([[1, 1, 1, 1, 1, 0, 1, 0, 0, 2, 1], [2, 1, 0, 0, 0, 1, 2, 1, 1, 2, 2]]) for i in xrange(a.shape[1]): a[a == 0] = np.roll(a,i)[a == 0] if n...
Without going crazy with complicated indexing tricks that figure out consecutive zeros, you could have a `while` loop that goes for as many iterations as consecutive zeros there are in your array: ``` zero_rows, zero_cols = np.where(xs == 0) while zero_cols : xs[zero_rows, zero_cols] = xs[zero_rows, zero_cols-1] ...
17,164,004
I have a matrix named `xs`: ``` array([[1, 1, 1, 1, 1, 0, 1, 0, 0, 2, 1], [2, 1, 0, 0, 0, 1, 2, 1, 1, 2, 2]]) ``` Now I want to replace the zeros by the nearest previous element in the same row (Assuming that the first column must be nonzero.). The rough solution as following: ``` In [55]: row, col = xs.sha...
2013/06/18
[ "https://Stackoverflow.com/questions/17164004", "https://Stackoverflow.com", "https://Stackoverflow.com/users/172677/" ]
If you can use [pandas](http://pandas.pydata.org/), [`replace`](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.replace.html) will explicitly show the replacement in one instruction: ``` import pandas as pd import numpy as np a = np.array([[1, 1, 1, 1, 1, 0, 1, 0, 0, 2, 1], [2, 1...
Without going crazy with complicated indexing tricks that figure out consecutive zeros, you could have a `while` loop that goes for as many iterations as consecutive zeros there are in your array: ``` zero_rows, zero_cols = np.where(xs == 0) while zero_cols : xs[zero_rows, zero_cols] = xs[zero_rows, zero_cols-1] ...
34,937,273
I have the following JS which uses `fadeToggle()` which works fine however it does a `display:none` so the 3rd element which I always display jumps up so wondering if its possible to change to change the `opacity` to **`0`** so in theory the block is still there and nothing moves. JS ``` $('.ty-banner__image-item.gt-...
2016/01/22
[ "https://Stackoverflow.com/questions/34937273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4520308/" ]
Because your char array isn't null-terminated and is therefore not a string. If you omit the size altogether and specify the value as a string, not individual chars, the compiler will null-terminate it for you.
Read [the standard library](http://www.cplusplus.com/reference/string/basic_string/operator+/) which requires the C string when used with operator+ to be null terminated: "If of type charT\*, it shall point to a null-terminated character sequence." Yours is not null terminated. Try adding an extra element at the end of...
34,937,273
I have the following JS which uses `fadeToggle()` which works fine however it does a `display:none` so the 3rd element which I always display jumps up so wondering if its possible to change to change the `opacity` to **`0`** so in theory the block is still there and nothing moves. JS ``` $('.ty-banner__image-item.gt-...
2016/01/22
[ "https://Stackoverflow.com/questions/34937273", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4520308/" ]
Because your char array isn't null-terminated and is therefore not a string. If you omit the size altogether and specify the value as a string, not individual chars, the compiler will null-terminate it for you.
Your char array is not 0 terminated, but plain c-strings must be 0 terminated: ``` char someCharArray[7] = {'H', 'e', 'l', 'l', 'o', ' ', 0}; ``` This should work.
586,086
I use a virtual server (several similar cases) set up and registered by someone else. Its IP is `10.0.0.1` and name `a.example.com` (both handled by the "someone else" above). I manage the domain `sub.example.com` and would like to also register this server as `b.sub.example.com`. There are two ways of doing this in ...
2014/04/02
[ "https://serverfault.com/questions/586086", "https://serverfault.com", "https://serverfault.com/users/78319/" ]
The DNS isn't well-designed to handle changes in static IP addresses without manual intervention. There are technologies for allowing records to be propagated automatically, such as [TSIG](http://en.wikipedia.org/wiki/TSIG), but they require quite a lot of co-operative setup, and even then don't deal well with changes ...
The CNAME option will still work, as you say their infrastructure knows of the VPS's IP and they properly update their nameservers. EDIT: About the PTR record; the only thing you can do is ask them. I myself have a few hosted VMs and all my providers except for one agreed to it. If their policy allows it you are fine...
586,086
I use a virtual server (several similar cases) set up and registered by someone else. Its IP is `10.0.0.1` and name `a.example.com` (both handled by the "someone else" above). I manage the domain `sub.example.com` and would like to also register this server as `b.sub.example.com`. There are two ways of doing this in ...
2014/04/02
[ "https://serverfault.com/questions/586086", "https://serverfault.com", "https://serverfault.com/users/78319/" ]
I will finally **have** to use ``` b IN A 10.0.0.1 ``` because `b` is also referenced in the `NS` record (which I did not pay attention to intially) ``` IN NS b ``` It is illegal for `b` to be a `CNAME` so there is no choice but to go with the explicit `A` record.
The CNAME option will still work, as you say their infrastructure knows of the VPS's IP and they properly update their nameservers. EDIT: About the PTR record; the only thing you can do is ask them. I myself have a few hosted VMs and all my providers except for one agreed to it. If their policy allows it you are fine...
164,223
After loading the `lmroman10-regular` font in XeTeX, I can't access accents in TeX' good old ways: `\'` `\"` `\c` etc. I would need to write `Erd\H os` since because I don't have the appropriate "o" on my keyboard. Example: ``` Before: é, \'e \font\tenrm="[lmroman10-regular.otf]:mapping=tex-text" \tenrm After: é, \...
2014/03/07
[ "https://tex.stackexchange.com/questions/164223", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/24686/" ]
You should use combining characters, instead. Unfortunately, Latin Modern does not fully implement them; for instance, there's no combining cedilla, so with the code below you'd get only characters with cedilla which exist in the font. ``` Before: \c{e} \`{e} \'{e} \v{e} \u{e} \={e} \^{e} \.{e} \H{e} \~{e} \"{e} \fo...
By copying the definitions at page 356 of the TeXbook but changing the character codes, this fixes it: ``` Before: \c{e} \`{e} \'{e} \v{e} \u{e} \={e} \^{e} \.{e} \H{e} \~{e} \"{e} \font\tenrm="[lmroman10-regular.otf]:mapping=tex-text" \tenrm \def\`#1{{\accent768 #1}} \def\'#1{{\accent180 #1}} \def\v#1{{\accent711 #...
5,075,290
I am trying to get the grip on the Facebook SDK and at the same time transitioning from ASP.NET forms to MVC (finally). So please bear with me .. I have created two controller actions: FBLogon is execetued when the user clicks on the FB login button on the form. He is then redirected to the FB login page. Afterwar...
2011/02/22
[ "https://Stackoverflow.com/questions/5075290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/198402/" ]
Ok. The facebook docs say it quite clearly: > > Because the access token is passed in > an URI fragment, only client-side code > (such as JavaScript executing in the > browser or desktop code hosting a web > control) can retrieve the token. App > authentication is handled by verifying > that the redirect\_uri i...
I am in the same spot you are at the moment. We never get the Request.QueryString populated becasue of the "fragment" or # in the url. Love to know if you solved this and how. It does not look like the FacebookOAuthResult class was written to be used in web applications of any sort. you can change the response type ...
5,075,290
I am trying to get the grip on the Facebook SDK and at the same time transitioning from ASP.NET forms to MVC (finally). So please bear with me .. I have created two controller actions: FBLogon is execetued when the user clicks on the FB login button on the form. He is then redirected to the FB login page. Afterwar...
2011/02/22
[ "https://Stackoverflow.com/questions/5075290", "https://Stackoverflow.com", "https://Stackoverflow.com/users/198402/" ]
I found this post <http://facebooksdk.codeplex.com/discussions/244568> on codeplex. I think this is what you need. Note that instead of using the client-side flow, you need to use the server-side flow. This is what you should do Create a login link for server-side flow. After Authorization, facebook will return an ...
I am in the same spot you are at the moment. We never get the Request.QueryString populated becasue of the "fragment" or # in the url. Love to know if you solved this and how. It does not look like the FacebookOAuthResult class was written to be used in web applications of any sort. you can change the response type ...
26,014
According to MDBG and Ichiba, 后位 could mean after/post-something, so what's the difference of '之后' and '后位'? Which one is correct: - 葬礼之后 - 葬礼后位 Does 后位 have to follow a noun?
2017/08/15
[ "https://chinese.stackexchange.com/questions/26014", "https://chinese.stackexchange.com", "https://chinese.stackexchange.com/users/17496/" ]
...之后 is a normal term to express "after...". So, 葬礼之后 is correct in this context. 后位 is short for 后面的位置. It refers to positioning, not timing sequence. It is only used in some particular areas. Someone had given enough examples above. 后位 could also be understood as: 皇后之位 in 宫廷剧 (Chinese royal opera); Another 后卫: ...
“后位” is not a common term in daily usage, we barely hear it. As Dan described, it can mean the position of Queen. “之后” and “后面” is commonly mistaken, “之后” is usually used when something happens after something. “后面” is used when something is behind something.
69,218,591
I have seen a similar example with loops continuing after the last element to reset to first, which is great. However, I am unable to figure out how to add that PLUS start iterating from a specified index of the `IList` object. Assume we have this `IList` object with a count of 6. (To simplify I'm only using indices b...
2021/09/17
[ "https://Stackoverflow.com/questions/69218591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1027620/" ]
You could write the following extension method: ``` public static class Extensions { public static IEnumerable<T> Iterate<T>(this IList<T> input, int from, int length) { for(int i = from; i < from + length; i++) { yield return input[i % input.Count]; } } } ``` The modu...
You can use `Skip` to skip required number of first elements. For example: ``` public IEnumerable<T> GetRolledItems<T>(IList<T> source, int count, int startIndex) { return Enumerable.Repeat(source, (count + startIndex) / source.Count() + 1) .SelectMany(a => a) .Skip(startIndex) .Take(count); } ```
69,218,591
I have seen a similar example with loops continuing after the last element to reset to first, which is great. However, I am unable to figure out how to add that PLUS start iterating from a specified index of the `IList` object. Assume we have this `IList` object with a count of 6. (To simplify I'm only using indices b...
2021/09/17
[ "https://Stackoverflow.com/questions/69218591", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1027620/" ]
I suggest implementing an *extension method* for looping again and again: ``` // Let it be general case with IEnumerable<T> public static class EnumerableExtensions { public static IEnumerable<T> Loop<T>(this IEnumerable<T> source) { if (null == source) throw new ArgumentNullException(name(source)); L...
You can use `Skip` to skip required number of first elements. For example: ``` public IEnumerable<T> GetRolledItems<T>(IList<T> source, int count, int startIndex) { return Enumerable.Repeat(source, (count + startIndex) / source.Count() + 1) .SelectMany(a => a) .Skip(startIndex) .Take(count); } ```
27,403,397
I am trying to rework a query that is based on cursors. The query calculates certain stats based on multiple values. In the snippet below the first, second and third `CASE` works out the happiness of `Unit1`. Any of these fields are 0 (they can never be `NULL`) I will get a `Divide by Zero` error. I could just add 1 t...
2014/12/10
[ "https://Stackoverflow.com/questions/27403397", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1562451/" ]
put a `nullif(Unit1, 0)` around every divide by group ?
Something like this. The idea is to wrap your division in a UDF (scalar user defined function)....and use the "Max(v)" trick. The code below may not be perfect, I've supplying the idea. Cursors are horrible performers, 99.9% of the time. Try to solve this without cursors. ``` /* or Create */ ALTER FUNCTION dbo.udfS...
2,194,630
I have tried the question with $Rolle's$ theorem... Let the equation have $2$ unequal real roots $f'(x)= 4ax^3-4ax+1=0$ But cannot proceed after this.
2017/03/20
[ "https://math.stackexchange.com/questions/2194630", "https://math.stackexchange.com", "https://math.stackexchange.com/users/427385/" ]
**Hint:** Note that the equation can be factorised as $(x^2 + x - a)(x^2 - x + 1 -a)$, which reduces it to the condition for two standard quadratics to have real roots.
we can write above equation as $x^4-2ax^2+x+a^2-a=0$ as $a^2-(2x^2+1)a+x^4+x=0$ So $$\displaystyle a= \frac{(2x^2+1)\pm\sqrt{(2x^2+1)^2-4(x^4+x)}}{2}=\frac{(2x^2+1)\pm (2x-1)}{2}$$ So $x^2+x-a=0$ or $x^2-x+1-a=0$ So for real roots , $1+4a\geq 0$ and $1-4(1-a)\geq 0 $
279,422
I am building a power source for my astro-imaging gear using a 12V marine deep-cycle battery (120 amp-hours) stored in a battery box. The battery is supposed to power the [telescope mount](https://starizona.com/acb/Advanced-VX-Mount-P3550C761.aspx) (requires 12V DC, 3.5A) and my laptop (requires 19V, 2.4A). Later, I mi...
2017/01/10
[ "https://electronics.stackexchange.com/questions/279422", "https://electronics.stackexchange.com", "https://electronics.stackexchange.com/users/133974/" ]
A deep cycle battery is a good choice for this it will not "push" extra current to your loads. That does not happen unless the voltage is too high. Each cigar lighter plug should already have its own fuse this will be rated to protect the wire to the device and the device. For fuses in your box you are protecting th...
Please do research before posting, [Can a fuse be placed after a load?](https://electronics.stackexchange.com/questions/77958/can-a-fuse-be-placed-after-a-load/194473#194473) for the first fuse question. This for the second question: [Fuse rating and safety](https://electronics.stackexchange.com/questions/169818/fuse...
25,940,396
How do I export a security certificate from Chrome v37 on a Mac? Previously I could click on the little lock icon next to the URL, select "Connection," select the certificate, and an "Export" button would appear. Not so anymore!
2014/09/19
[ "https://Stackoverflow.com/questions/25940396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1526115/" ]
Just found out this does not work on Chrome Version 105.0.5195.125 on MacOS. The certificate viewer looks like this now: ![](https://i.stack.imgur.com/kDWqv.png) ![](https://i.stack.imgur.com/cA8rF.png) I haven't found a way how to save a certificate, but if you want to access the page just type the following while...
You could use Firefox or Safari instead of Chrome. ### Steps for Firefox 1. Click the lock icon 2. More information 3. View Certificate 4. In next screen each cert in chain can be exported as PEM [![enter image description here](https://i.stack.imgur.com/Qazbk.png)](https://i.stack.imgur.com/Qazbk.png) [![enter ima...
25,940,396
How do I export a security certificate from Chrome v37 on a Mac? Previously I could click on the little lock icon next to the URL, select "Connection," select the certificate, and an "Export" button would appear. Not so anymore!
2014/09/19
[ "https://Stackoverflow.com/questions/25940396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1526115/" ]
I found a workaround and tested by Chrome Version 73.0.3683.103 (Official Build) (64-bit) on Macos 10.14.3. When open the site with unsafe certificate, Chrome will show an error page 'Your connection is not private', follow the below steps: 1. Click the text 'NET::ERR\_CERT\_AUTHORITY\_INVALID', the content of the ce...
You could use Firefox or Safari instead of Chrome. ### Steps for Firefox 1. Click the lock icon 2. More information 3. View Certificate 4. In next screen each cert in chain can be exported as PEM [![enter image description here](https://i.stack.imgur.com/Qazbk.png)](https://i.stack.imgur.com/Qazbk.png) [![enter ima...
25,940,396
How do I export a security certificate from Chrome v37 on a Mac? Previously I could click on the little lock icon next to the URL, select "Connection," select the certificate, and an "Export" button would appear. Not so anymore!
2014/09/19
[ "https://Stackoverflow.com/questions/25940396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1526115/" ]
Edit 4/3/19: I have found a workaround. This is tested on Chrome for Mac 73.0.3686.86 64-bit, platform: macOS 10.14.4: 1. Open a new TextEdit document. 2. In TextEdit, click Format | Make Plain Text. 3. Arrange windows so that the TextEdit window and the Chrome window are both visible. 4. In Chrome, click the icon to ...
You should make flowing steps, show certificate detail on chrome browser on macOS ![domain-detail](https://i.stack.imgur.com/PjP7d.png) drag big certificate icon on certificate detail window ![certificate-detail](https://i.stack.imgur.com/pCvQC.png) drop the icon to desktop and ta-ta! created the domain certificat...
25,940,396
How do I export a security certificate from Chrome v37 on a Mac? Previously I could click on the little lock icon next to the URL, select "Connection," select the certificate, and an "Export" button would appear. Not so anymore!
2014/09/19
[ "https://Stackoverflow.com/questions/25940396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1526115/" ]
Edit 4/3/19: I have found a workaround. This is tested on Chrome for Mac 73.0.3686.86 64-bit, platform: macOS 10.14.4: 1. Open a new TextEdit document. 2. In TextEdit, click Format | Make Plain Text. 3. Arrange windows so that the TextEdit window and the Chrome window are both visible. 4. In Chrome, click the icon to ...
Just found out this does not work on Chrome Version 105.0.5195.125 on MacOS. The certificate viewer looks like this now: ![](https://i.stack.imgur.com/kDWqv.png) ![](https://i.stack.imgur.com/cA8rF.png) I haven't found a way how to save a certificate, but if you want to access the page just type the following while...
25,940,396
How do I export a security certificate from Chrome v37 on a Mac? Previously I could click on the little lock icon next to the URL, select "Connection," select the certificate, and an "Export" button would appear. Not so anymore!
2014/09/19
[ "https://Stackoverflow.com/questions/25940396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1526115/" ]
@Simon Zuckerbraun's answer is correct. My workaround is almost the same as Simon's. But don't need to use Text Editor, just drag the certificate to the Desktop Window then the certificate will be created immediately. Follow these steps : 1. Open Google Chrome, go to the site. 2. Click the icon to the left of the URL ...
You could use Firefox or Safari instead of Chrome. ### Steps for Firefox 1. Click the lock icon 2. More information 3. View Certificate 4. In next screen each cert in chain can be exported as PEM [![enter image description here](https://i.stack.imgur.com/Qazbk.png)](https://i.stack.imgur.com/Qazbk.png) [![enter ima...
25,940,396
How do I export a security certificate from Chrome v37 on a Mac? Previously I could click on the little lock icon next to the URL, select "Connection," select the certificate, and an "Export" button would appear. Not so anymore!
2014/09/19
[ "https://Stackoverflow.com/questions/25940396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1526115/" ]
You should make flowing steps, show certificate detail on chrome browser on macOS ![domain-detail](https://i.stack.imgur.com/PjP7d.png) drag big certificate icon on certificate detail window ![certificate-detail](https://i.stack.imgur.com/pCvQC.png) drop the icon to desktop and ta-ta! created the domain certificat...
As of Chrome 72 the certificate icon cannot be dragged/exported from Chrome as @RichardTopchiy stated in his comments. However Safari **does still allow the certificate icon to be dragged** from the browser. So the easiest way to export the certificate from Chrome is... to use a different browser to export the SSL ce...
25,940,396
How do I export a security certificate from Chrome v37 on a Mac? Previously I could click on the little lock icon next to the URL, select "Connection," select the certificate, and an "Export" button would appear. Not so anymore!
2014/09/19
[ "https://Stackoverflow.com/questions/25940396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1526115/" ]
Edit 4/3/19: I have found a workaround. This is tested on Chrome for Mac 73.0.3686.86 64-bit, platform: macOS 10.14.4: 1. Open a new TextEdit document. 2. In TextEdit, click Format | Make Plain Text. 3. Arrange windows so that the TextEdit window and the Chrome window are both visible. 4. In Chrome, click the icon to ...
New browsers process is different. Please follow the below steps Inspect the chrome browser-> You can find **Security** tab -> Click on the **View Ceritificate** button then i will open the popup [Click on the details tab and press Copy to file button](https://i.stack.imgur.com/M3ex0.png) Then press the buttton Next->...
25,940,396
How do I export a security certificate from Chrome v37 on a Mac? Previously I could click on the little lock icon next to the URL, select "Connection," select the certificate, and an "Export" button would appear. Not so anymore!
2014/09/19
[ "https://Stackoverflow.com/questions/25940396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1526115/" ]
Edit 4/3/19: I have found a workaround. This is tested on Chrome for Mac 73.0.3686.86 64-bit, platform: macOS 10.14.4: 1. Open a new TextEdit document. 2. In TextEdit, click Format | Make Plain Text. 3. Arrange windows so that the TextEdit window and the Chrome window are both visible. 4. In Chrome, click the icon to ...
I was able to start it with --ignore-certificate-errors --incognito. Incognito so that it doesn't use any open sessions.
25,940,396
How do I export a security certificate from Chrome v37 on a Mac? Previously I could click on the little lock icon next to the URL, select "Connection," select the certificate, and an "Export" button would appear. Not so anymore!
2014/09/19
[ "https://Stackoverflow.com/questions/25940396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1526115/" ]
You should make flowing steps, show certificate detail on chrome browser on macOS ![domain-detail](https://i.stack.imgur.com/PjP7d.png) drag big certificate icon on certificate detail window ![certificate-detail](https://i.stack.imgur.com/pCvQC.png) drop the icon to desktop and ta-ta! created the domain certificat...
New browsers process is different. Please follow the below steps Inspect the chrome browser-> You can find **Security** tab -> Click on the **View Ceritificate** button then i will open the popup [Click on the details tab and press Copy to file button](https://i.stack.imgur.com/M3ex0.png) Then press the buttton Next->...
25,940,396
How do I export a security certificate from Chrome v37 on a Mac? Previously I could click on the little lock icon next to the URL, select "Connection," select the certificate, and an "Export" button would appear. Not so anymore!
2014/09/19
[ "https://Stackoverflow.com/questions/25940396", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1526115/" ]
Just found out this does not work on Chrome Version 105.0.5195.125 on MacOS. The certificate viewer looks like this now: ![](https://i.stack.imgur.com/kDWqv.png) ![](https://i.stack.imgur.com/cA8rF.png) I haven't found a way how to save a certificate, but if you want to access the page just type the following while...
I was able to start it with --ignore-certificate-errors --incognito. Incognito so that it doesn't use any open sessions.
39,037,671
I have a simple node.js server and some app running on it, that should connect to Oracle database. For that reason I decided to use `node-oracledb` driver, but I'm having some problems with installation. I followed instructions on [Oracle webpage](https://community.oracle.com/docs/DOC-931127) and those on [github](http...
2016/08/19
[ "https://Stackoverflow.com/questions/39037671", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3394223/" ]
Modules like oracledb or node-oracledb needs compilations. Compilation requires software like C compiler, Python etc. I was facing the same issue with oracldb module. follow below instructions and it works like charm. <https://community.oracle.com/docs/DOC-931127>
try updating npm to the latest version: ``` npm install -g npm ``` if it still doesn't work, try including your VS version like so: ``` npm install oracledb --msvs_version=2013 ```
74,289,527
I wanted to host a API in WPF. I have tried implementing Self hosted api using below article. <https://learn.microsoft.com/en-us/aspnet/web-api/overview/hosting-aspnet-web-api/use-owin-to-self-host-web-api> When i have done the implementation for Console application. I was able to verify with PostMan tool to verify g...
2022/11/02
[ "https://Stackoverflow.com/questions/74289527", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8070342/" ]
Do you have a `DemoController`? If you copied the `ValuesController` class from the example, the URI should be "api/**values**" and nothing else: ``` string baseAddress = "http://localhost:4444/"; HttpClient client = new HttpClient(); var res = await client.GetStringAsync(baseAddress + "api/values"); ```
I got a solution from this article. <https://blog.codeinside.eu/2015/09/29/wpf-chrome-embedded-and-webapi-selfhosting/> Now i am able to host api in WPF.
52,323,898
I have to create a calculated column in a query (T2) based in a corresponding record in other table(T1) that attends to a certain condition, like this: **T1** - Contracts: [T1.Id] [T1.Conclusion] **T2** - Financial Entries: [T2.Id] [T2.ContractId] [**CALCULATED COLUMN** returning "ok" if a record exists in T1 wh...
2018/09/14
[ "https://Stackoverflow.com/questions/52323898", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10361224/" ]
You can use a correlated subquery and `EXISTS` in a `CASE` expression. ``` SELECT t2.id, t2.contractid, CASE WHEN EXISTS (SELECT * FROM t1 WHERE t1.id = t2.contractid AND t1.conclusion <= curdate()) THEN...
You can go ahead with simple LEFT join using below Query: ``` SELECT DISTINCT T2.*, T1.id FROM T2 LEFT JOIN T1 ON T1.Id = T2.ContractId AND T1.Conclusion <= TODAY ``` If you get NULL in T1.id then not data exists else "OK".
23,126,460
Problem with the order of retrieving rows. I have a table called documentfiles in that i have three columns filename filepath num i have a query which retrieves filename and filepath with respect to the num here is my query ``` rs=s.executeQuery("SELECT filename from documentfiles ...
2014/04/17
[ "https://Stackoverflow.com/questions/23126460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2318813/" ]
Adapt the query to: ``` SELECT filename from documentfiles where num in (2167, 2156, 1677,2149,1946,1511) order by case when num = 2167 then 1 when num = 2156 then 2 when num = 1677 then 3 when num = 2149 then 4 when num = 1946 then 5 when num = 1...
``` CREATE TABLE numbers ( ID int identity(1,1) primary key, number int ) CREATE PROCEDURE insertnumbers @number int AS BEGIN INSERT INTO numbers VALUES (@number); END ``` Now you add comma on beginning ``` ,2167, 2156, 1677, 7074, 2149, 7100, 7072, 2890, 2527, 2526, 1946, 1511, 7071, 7013, 7001, 6920, ...
23,126,460
Problem with the order of retrieving rows. I have a table called documentfiles in that i have three columns filename filepath num i have a query which retrieves filename and filepath with respect to the num here is my query ``` rs=s.executeQuery("SELECT filename from documentfiles ...
2014/04/17
[ "https://Stackoverflow.com/questions/23126460", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2318813/" ]
You didn't state your DBMS so this is ANSI SQL: ``` with numbers (num, sort_order) as ( values (2167,1), (2156,2), (1677,3), (2149,4), (1946,5), (1511, 6) ) select filename from documentfiles d join numbers n on d.num = n.num order by n.sort_order ```
``` CREATE TABLE numbers ( ID int identity(1,1) primary key, number int ) CREATE PROCEDURE insertnumbers @number int AS BEGIN INSERT INTO numbers VALUES (@number); END ``` Now you add comma on beginning ``` ,2167, 2156, 1677, 7074, 2149, 7100, 7072, 2890, 2527, 2526, 1946, 1511, 7071, 7013, 7001, 6920, ...
265,994
Hello I have this function that looks for nested value 3 levels deep currently ``` // This handle nested data to be applied to filter option which comes from filterProps.prop values // This is currently chained 3 level deep I.E clock.props.children to add more just keep chaineding const handleNestFilterProp = (p...
2021/08/12
[ "https://codereview.stackexchange.com/questions/265994", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/244349/" ]
``` const handleNestFilterProp = (prop: string, item: any, trim?: boolean) => { return trim ? _.get(item, prop).trim().length > 0 : _.get(item, prop); }; ``` \_.get just takes 'props.clock.children' and goes deep no matter how deep
For me, using nested conditional expression makes the code very hard to understand, I think you should use `if` and `switch` statements for readability. It's difficult to understand what your code returns in each case so I only write the structure of the code. ```javascript const handleNestFilterProp = (prop: any, ite...
265,994
Hello I have this function that looks for nested value 3 levels deep currently ``` // This handle nested data to be applied to filter option which comes from filterProps.prop values // This is currently chained 3 level deep I.E clock.props.children to add more just keep chaineding const handleNestFilterProp = (p...
2021/08/12
[ "https://codereview.stackexchange.com/questions/265994", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/244349/" ]
Undefined --------- Information is missing in regard to the function's possible inputs. I will make a guess as to what the possibilities are in the rewrites TypeScript ---------- To use TypeScript and gain any benefit you need to define the types of all variables. Using `any` is just lazy and degrades the code quali...
For me, using nested conditional expression makes the code very hard to understand, I think you should use `if` and `switch` statements for readability. It's difficult to understand what your code returns in each case so I only write the structure of the code. ```javascript const handleNestFilterProp = (prop: any, ite...
265,994
Hello I have this function that looks for nested value 3 levels deep currently ``` // This handle nested data to be applied to filter option which comes from filterProps.prop values // This is currently chained 3 level deep I.E clock.props.children to add more just keep chaineding const handleNestFilterProp = (p...
2021/08/12
[ "https://codereview.stackexchange.com/questions/265994", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/244349/" ]
Undefined --------- Information is missing in regard to the function's possible inputs. I will make a guess as to what the possibilities are in the rewrites TypeScript ---------- To use TypeScript and gain any benefit you need to define the types of all variables. Using `any` is just lazy and degrades the code quali...
``` const handleNestFilterProp = (prop: string, item: any, trim?: boolean) => { return trim ? _.get(item, prop).trim().length > 0 : _.get(item, prop); }; ``` \_.get just takes 'props.clock.children' and goes deep no matter how deep
14,102,055
I am in need for some design help. I have a class, let's call it a spaceship which can implement several behaviors. I've defined an interface to declare the operations each behavior supports. Until now this is the classic strategy pattern. However, the implemented strategies need to be able to call actions and methods...
2012/12/31
[ "https://Stackoverflow.com/questions/14102055", "https://Stackoverflow.com", "https://Stackoverflow.com/users/126015/" ]
What you are planning to do seems fine to me. One thing to hold into account is to not pass in too much to the method(s) of your behaviour class(es). For instance, if your spaceship has an `engine behaviour`, only pass it your `fuel tank` and `drive unit`, not the whole spaceship.
Depending on what your strategies need the context for, you could consider making it event-based using the Observer pattern as well so that your strategies not coupled to the context. An example could be if your strategies cause something in your context to change, these could be events that some intermediary (or you...
990,710
It is known that after exceeding amount of write procedures to a particular SSD sector this sector dies and is replaced with another one from reserved ones. Please, correct me if I'm wrong. I suppose it might be unsafe to use SSD disc for very long time. But I would like to know how much damaged is my disc, how many d...
2015/10/23
[ "https://superuser.com/questions/990710", "https://superuser.com", "https://superuser.com/users/178137/" ]
The idea that SSDs are fragile snowflakes that will melt under the white heat of data is a bit of a mistake. Many tests have been done where drives have been torture tested - tech report did one [with last generation drives](http://techreport.com/review/27909/the-ssd-endurance-experiment-theyre-all-dead) and basicall...
> > But I would like to know how deadly is my disc, how many damaged sectors it has? How to get such info? > > > This information is commonly available from [SMART](https://en.wikipedia.org/wiki/S.M.A.R.T.) data. Disk vendors often provide tools that will show this information in a reasonably user-friendly manner,...
6,968,523
I am working on a 3d game engine for the iPhone and Im currently working out how Im going to be handling all of my 3D objects. I have a class that holds information pertaining to each 3D object such as vertexdata, texture information, etc. I also have a method that is called once every x milleseconds that handles ren...
2011/08/06
[ "https://Stackoverflow.com/questions/6968523", "https://Stackoverflow.com", "https://Stackoverflow.com/users/882151/" ]
No, there's no built-in way to do this. If you wanted to implement it yourself, you'd still have to use an array to keep track of the objects. So I suggest you just use an array in the first place.
Just make an array and be some with it. For instance, UIKit uses the concept of subviews too, which are arrays in arrays.
922,766
Let $f$ be a not decreasing, Lebesgue integrable function with finite integral over $[0,+\infty)$. It seems obvious to me that $\lim\_{b\rightarrow\infty}\int\_b^{\infty}f(x)\,dx=0$ then. But how can one very formally show it? And assumption about monotonicity is crucial here, yes?
2014/09/07
[ "https://math.stackexchange.com/questions/922766", "https://math.stackexchange.com", "https://math.stackexchange.com/users/121568/" ]
Be $$F = \int\_0^\infty f(x)\,\mathrm dx.$$ We have from the general rules of integration: $$F = \int\_0^\infty f(x)\,\mathrm dx = \int\_0^b f(x) \,\mathrm dx + \int\_b^\infty f(x) \,\mathrm dx.$$ Therefore $$\int\_b^\infty f(x) \,\mathrm dx = F - \int\_0^b f(x) \,\mathrm dx$$ and thus $$\lim\_{b\to\infty} \int\_b^\inf...
Lebesgue dominated convergence theorem.
73,991,129
I have integrated the stripe Api in my website to process payments and It is working fine. The only problem is that after the a successfull payment, i don't get any response or an object to know if the payment is successful or not. Stripe does process the payment and everything is fine but the question is how would I k...
2022/10/07
[ "https://Stackoverflow.com/questions/73991129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/19535558/" ]
You can implement webhook in your application. After a payment is completed stripe will call webhook/callback of your application with the payment\_status and other details. Have a look at documentation here [Triggering actions with webhooks](https://stripe.com/docs/payments/handling-payment-events)
Using webhooks and events is definitely the right way to go. You can listen for successful payments, failed payments, and other event types, then add some server code to take some action based on those events. There's a mention of webhooks in Stripe's custom payments quickstart guide: <https://stripe.com/docs/payments...
445,604
Since Flash 10 was introduced, many of the popular 'copy to clipboard' scripts out there have stopped working due to new security restrictions. There is a Flash-only solution here: <http://cfruss.blogspot.com/2009/01/copy-to-clipboard-swf-button-cross.html> ...though I'm looking for the ability to trigger the copy fu...
2009/01/15
[ "https://Stackoverflow.com/questions/445604", "https://Stackoverflow.com", "https://Stackoverflow.com/users/22468/" ]
That's terrible news, I hadn't even noticed. I use the Flash trick extensively too. As far as I know that was the only way to get copy to work without having to install some other plugin (besides the ubiquitous Flash) due to browser security concerns. Update: After much panic, and a few google searches, I stumbled on ...
This solution only works for keystrokes that would invoke the desired operation. It works by moving the user's cursor into a textarea element before the user finishes the relevant keystroke. It only works for text input. I've got this working in firefox and chrome. IE can use the clipboardData object (which is preferab...
38,904
Warum muss man immer auch das weibliche Wort nennen, wenn man von einer bestimmten Gruppe von Menschen, Beruf usw. spricht? Wäre es denn nicht leichter bloß "Schüler" zu sagen? Und was hat es mit dieser Schreibweise "SchülerIn" auf sich? Ist sie korrekt oder nur umgangssprachlich verwendet?
2017/09/05
[ "https://german.stackexchange.com/questions/38904", "https://german.stackexchange.com", "https://german.stackexchange.com/users/29020/" ]
Man muss durchaus nicht immer eine männliche und eine weibliche Form parallel nennen. In der Belletristik - einem Roman etwa - wirst du diese Verwendung auch nie finden, und im etablierten Journalismus nur selten. Das pärchenweise Aufführen männlicher und weiblicher Formen hat sich jedoch in den letzten Jahren im behör...
Versuch einer knappen Erklärung, was hier die Intention einer [geschlechtergerechten Sprache](https://de.wikipedia.org/wiki/Geschlechtergerechte_Sprache) ist. In meinem Kopf enstehen nämlich beim Lesen geschlechterspezifische Bilder. Schüler ======= > > [![enter image description here](https://i.stack.imgur.com/Tu...
1,589,791
Looking for a simple diagram showing the constituent parts of the Flash player like AVM1,AVM2,graphics renderer, text layout engine, video player, etc. Can anyone help me out? Thanks.
2009/10/19
[ "https://Stackoverflow.com/questions/1589791", "https://Stackoverflow.com", "https://Stackoverflow.com/users/146543/" ]
The easiest option would be to just make your UserControl expose a click event, and pass through your Button's click event. In MyButton's xaml: ``` <Button Width="Auto" HorizontalAlignment="Center" Click="onButtonClick"> ``` In MyButton's code: ``` public event RoutedEventHandler Click; void onButtonClick(object ...
The answer really depends on what your goals are for the control. You may be able to get away with not creating a user or custom control if you can manipulate the data that you are binding to. If all you want to do is display a dynamic image and text, then you could create an ImageText object that contains two properti...
31,201,454
Solved, thanks. It's base64 and this works. ``` System.Convert.FromBase64String(columns[6]); ``` Thanks again. I got a TSV file, and inside this file there're audio stored as original string and related wave info. One wave and its info per line. What I need to do is to read each line, get the audio, and save them a...
2015/07/03
[ "https://Stackoverflow.com/questions/31201454", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4238769/" ]
There are quite a few redundancies with your code. ``` double average, count, orig = (double) 0; ``` can be written as: ``` double average, count, orig = 0.0d; ``` (you should consider checking float and decide which suits you better - doesn't really matter here) Since java 1.7, you can declare lists in a shor...
You cannot call size() method on primitive data type.It can be called on `java.util.List` ,etc. So your `double e = average.get(average.size() - 1);` makes no sense. You can directly write: ``` average = all/count; ```
31,201,454
Solved, thanks. It's base64 and this works. ``` System.Convert.FromBase64String(columns[6]); ``` Thanks again. I got a TSV file, and inside this file there're audio stored as original string and related wave info. One wave and its info per line. What I need to do is to read each line, get the audio, and save them a...
2015/07/03
[ "https://Stackoverflow.com/questions/31201454", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4238769/" ]
There are quite a few redundancies with your code. ``` double average, count, orig = (double) 0; ``` can be written as: ``` double average, count, orig = 0.0d; ``` (you should consider checking float and decide which suits you better - doesn't really matter here) Since java 1.7, you can declare lists in a shor...
You are keeping too much code in the loop. While you iterate over the list of doubles, you only need to keep a running total. Afterwards, you should then compute the average as the sum of doubles divided by the size of the list. Here is how to fix the loop: ``` for (Double x: list) { all += x; } aver...
31,201,454
Solved, thanks. It's base64 and this works. ``` System.Convert.FromBase64String(columns[6]); ``` Thanks again. I got a TSV file, and inside this file there're audio stored as original string and related wave info. One wave and its info per line. What I need to do is to read each line, get the audio, and save them a...
2015/07/03
[ "https://Stackoverflow.com/questions/31201454", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4238769/" ]
You cannot call size() method on primitive data type.It can be called on `java.util.List` ,etc. So your `double e = average.get(average.size() - 1);` makes no sense. You can directly write: ``` average = all/count; ```
You are keeping too much code in the loop. While you iterate over the list of doubles, you only need to keep a running total. Afterwards, you should then compute the average as the sum of doubles divided by the size of the list. Here is how to fix the loop: ``` for (Double x: list) { all += x; } aver...
62,307,237
I included Vuejs in my existing project but now it is affecting my original theme JavaScript files. Without app.js on my homepage, everything works fine. But when I include it, All UI effects and functionalities on my original theme js file including sliders, canvas, carousels, and dropdowns all stops working. How do ...
2020/06/10
[ "https://Stackoverflow.com/questions/62307237", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10367781/" ]
regarding CSS collisions... --------------------------- You can solve by making sure all your css is getting scoped. instead of ```html <style> /* global styles */ </style> ``` use ```html <style scoped> /* local styles */ </style> ``` Vue will then compile your css to have generated is like `h1[data-v-f3f3eg9...
I found the solution for this collision Put your `app.js` at the top of your script links like: ``` <script src="{{ asset('js/app.js') }}"></script> ``` Then ``` <script> $.noConflict(); /script> ``` After that put your other JavaScript it will work fine.
60,129,814
Below is a reproducible example, but you will need a google API to help. Here is a quick example of the behavior I am seeing. Given the following code: ``` test.1 <- data.frame(rbind("02908", "98144"), c("60612", "60612"), stringsAsFactors = FALSE) colnames(test.1) <- c("from", "to") library(ggma...
2020/02/08
[ "https://Stackoverflow.com/questions/60129814", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12864391/" ]
You can use [`number_format`](https://www.php.net/manual/en/function.number-format.php) for this. ``` echo number_format($item->price,2); ``` **Demo:** <https://3v4l.org/NnZlb> Just a side note that `number_format` also [`rounds silently`](https://www.php.net/manual/en/function.number-format.php#88424).
Try this: ``` $item->price= sprintf("%.2f", $item->price); ``` The underlying problem is that the original number cannot be represented as an exact floating point number on the system it was generated on. It was probably a floating point number that was converted to a string as part of JSON encoding. A number of f...
5,898,911
how can we log spring Transaction mechanism. i am showing below example shown in [Spring Doc sec 10.5.2](http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/transaction.html#tx-decl-explained).if i want to logging upto this level how to do that i am using Spring,Hibernate and Log4j. ``` ...
2011/05/05
[ "https://Stackoverflow.com/questions/5898911", "https://Stackoverflow.com", "https://Stackoverflow.com/users/692692/" ]
There's [a section about Logging](http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/overview.html#d0e743) in the Spring Reference. It shows how to configure different logging frameworks, among them [log4j](http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/o...
If you're just willing to set the log level of spring transaction support, try adding the following logger to your log4j.xml : ``` <logger name="org.springframework.transaction"> <level value="DEBUG" /> </logger> ```
12,686,490
I want to enumerate colors and use Color instances. Therefore I have created an enum with a private field and a get-function, but using it is cumbersome because of the need to call `getColor()`. Is there a better approach at directly using the enumeration constant without calling `getColor()`? ``` public class Color...
2012/10/02
[ "https://Stackoverflow.com/questions/12686490", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1671066/" ]
The only thing you can do which might be nicer is to use a static import. ``` import static mypackage.ColourList.*; public static void main(String[] args) { Color color = WHITE.getColor(); } ```
Use enumerators to define constants that you want to use. You can define the enumarator in a different class file and directly call the constants rather than defining it inside a class.
23,983,276
i have MainActivty and MyLocationListener classes. MyLocationListener extends AsyncTask implements LocationListener.. Here is code of the Location Listener Class: private class MyLocationListener extends AsyncTask implements LocationListener { ``` @Override public void onLocationChanged(Location location) ...
2014/06/01
[ "https://Stackoverflow.com/questions/23983276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/535556/" ]
Change this: ``` for ( var i in images) { code += '<img src="' + i + '" alt="image not available">'; } ``` To this: ``` for ( var i = 0; i < images.length; i++) { code += '<img src="' + images[i] + '" alt="image not available">'; } ``` The `for ( var foo in bar )` construct doesn't do what you think it does...
When you use `for (var i in images)`, `i` becomes the *index*, not the element itself. Try: ``` for (var i in images) { code += '<img src="' + images[i] + '" alt="image not available">'; } ```
23,983,276
i have MainActivty and MyLocationListener classes. MyLocationListener extends AsyncTask implements LocationListener.. Here is code of the Location Listener Class: private class MyLocationListener extends AsyncTask implements LocationListener { ``` @Override public void onLocationChanged(Location location) ...
2014/06/01
[ "https://Stackoverflow.com/questions/23983276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/535556/" ]
When you use `for (var i in images)`, `i` becomes the *index*, not the element itself. Try: ``` for (var i in images) { code += '<img src="' + images[i] + '" alt="image not available">'; } ```
Use the developer tools that come with the browser to further investigate - sometimes the paths get messed up depending on the url of the file loading the javascript. I would put the full URL to the pictures in the array - that way there isnt confusion.
23,983,276
i have MainActivty and MyLocationListener classes. MyLocationListener extends AsyncTask implements LocationListener.. Here is code of the Location Listener Class: private class MyLocationListener extends AsyncTask implements LocationListener { ``` @Override public void onLocationChanged(Location location) ...
2014/06/01
[ "https://Stackoverflow.com/questions/23983276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/535556/" ]
Change this: ``` for ( var i in images) { code += '<img src="' + i + '" alt="image not available">'; } ``` To this: ``` for ( var i = 0; i < images.length; i++) { code += '<img src="' + images[i] + '" alt="image not available">'; } ``` The `for ( var foo in bar )` construct doesn't do what you think it does...
Just Change: ``` for ( var i in images) { code += '<img src="' + i + '" alt="image not available">'; } ``` to ``` for ( var i in images) { code += '<img src="' + images[i] + '" alt="image not available">'; } ```
23,983,276
i have MainActivty and MyLocationListener classes. MyLocationListener extends AsyncTask implements LocationListener.. Here is code of the Location Listener Class: private class MyLocationListener extends AsyncTask implements LocationListener { ``` @Override public void onLocationChanged(Location location) ...
2014/06/01
[ "https://Stackoverflow.com/questions/23983276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/535556/" ]
Change this: ``` for ( var i in images) { code += '<img src="' + i + '" alt="image not available">'; } ``` To this: ``` for ( var i = 0; i < images.length; i++) { code += '<img src="' + images[i] + '" alt="image not available">'; } ``` The `for ( var foo in bar )` construct doesn't do what you think it does...
Use the developer tools that come with the browser to further investigate - sometimes the paths get messed up depending on the url of the file loading the javascript. I would put the full URL to the pictures in the array - that way there isnt confusion.
23,983,276
i have MainActivty and MyLocationListener classes. MyLocationListener extends AsyncTask implements LocationListener.. Here is code of the Location Listener Class: private class MyLocationListener extends AsyncTask implements LocationListener { ``` @Override public void onLocationChanged(Location location) ...
2014/06/01
[ "https://Stackoverflow.com/questions/23983276", "https://Stackoverflow.com", "https://Stackoverflow.com/users/535556/" ]
Just Change: ``` for ( var i in images) { code += '<img src="' + i + '" alt="image not available">'; } ``` to ``` for ( var i in images) { code += '<img src="' + images[i] + '" alt="image not available">'; } ```
Use the developer tools that come with the browser to further investigate - sometimes the paths get messed up depending on the url of the file loading the javascript. I would put the full URL to the pictures in the array - that way there isnt confusion.
58,302,969
I have created a matrix of binary digits from reading in a pgm file using the R package pixmap but I am trying to inverse the binary digits (making all 0s become 1s and all 1s become 0s) and outputting the matrix again. Is there an efficient way of doing this?
2019/10/09
[ "https://Stackoverflow.com/questions/58302969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12168692/" ]
If you have matrix with 1 and 0's and want to change 1's with 0's and vice versa you can do ``` +(mat == 0) # [,1] [,2] [,3] [,4] #[1,] 1 1 1 0 #[2,] 1 0 1 1 #[3,] 1 0 0 0 #[4,] 0 0 0 1 ``` **data** where original `mat` was : ``` set.seed(123) mat <- matrix(sam...
You could try ``` indOnes <- matrix == 1 indZeros <- matrix == 0 matrix[indOnes] <- 0 matrix[indZeros] <- 1 ```
58,302,969
I have created a matrix of binary digits from reading in a pgm file using the R package pixmap but I am trying to inverse the binary digits (making all 0s become 1s and all 1s become 0s) and outputting the matrix again. Is there an efficient way of doing this?
2019/10/09
[ "https://Stackoverflow.com/questions/58302969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12168692/" ]
``` matrix <- +(!matrix) ``` The `!` coerces it into a logical matrix and switches the 0s and 1s to TRUE and FALSE. The `+` coerces it back to 0s and 1s.
You could try ``` indOnes <- matrix == 1 indZeros <- matrix == 0 matrix[indOnes] <- 0 matrix[indZeros] <- 1 ```
58,302,969
I have created a matrix of binary digits from reading in a pgm file using the R package pixmap but I am trying to inverse the binary digits (making all 0s become 1s and all 1s become 0s) and outputting the matrix again. Is there an efficient way of doing this?
2019/10/09
[ "https://Stackoverflow.com/questions/58302969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12168692/" ]
If you have matrix with 1 and 0's and want to change 1's with 0's and vice versa you can do ``` +(mat == 0) # [,1] [,2] [,3] [,4] #[1,] 1 1 1 0 #[2,] 1 0 1 1 #[3,] 1 0 0 0 #[4,] 0 0 0 1 ``` **data** where original `mat` was : ``` set.seed(123) mat <- matrix(sam...
You can try `abs(1-your_matrix)` ``` mat <- matrix(as.numeric(runif(6) > 0.5), 3, 2) mat # [,1] [,2] [,3] #[1,] 1 0 1 #[2,] 1 0 1 abs(1-mat) # [,1] [,2] [,3] #[1,] 0 1 0 #[2,] 0 1 0 ```
58,302,969
I have created a matrix of binary digits from reading in a pgm file using the R package pixmap but I am trying to inverse the binary digits (making all 0s become 1s and all 1s become 0s) and outputting the matrix again. Is there an efficient way of doing this?
2019/10/09
[ "https://Stackoverflow.com/questions/58302969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12168692/" ]
``` matrix <- +(!matrix) ``` The `!` coerces it into a logical matrix and switches the 0s and 1s to TRUE and FALSE. The `+` coerces it back to 0s and 1s.
If you have matrix with 1 and 0's and want to change 1's with 0's and vice versa you can do ``` +(mat == 0) # [,1] [,2] [,3] [,4] #[1,] 1 1 1 0 #[2,] 1 0 1 1 #[3,] 1 0 0 0 #[4,] 0 0 0 1 ``` **data** where original `mat` was : ``` set.seed(123) mat <- matrix(sam...
58,302,969
I have created a matrix of binary digits from reading in a pgm file using the R package pixmap but I am trying to inverse the binary digits (making all 0s become 1s and all 1s become 0s) and outputting the matrix again. Is there an efficient way of doing this?
2019/10/09
[ "https://Stackoverflow.com/questions/58302969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12168692/" ]
If you have matrix with 1 and 0's and want to change 1's with 0's and vice versa you can do ``` +(mat == 0) # [,1] [,2] [,3] [,4] #[1,] 1 1 1 0 #[2,] 1 0 1 1 #[3,] 1 0 0 0 #[4,] 0 0 0 1 ``` **data** where original `mat` was : ``` set.seed(123) mat <- matrix(sam...
We can negate the `mat` to return a logical matrix and use `+` to coerce it to binary ``` +!(mat) # [,1] [,2] [,3] [,4] #[1,] 1 1 1 0 #[2,] 1 0 1 1 #[3,] 1 0 0 0 #[4,] 0 0 0 1 ``` ### data set.seed(123) mat <- matrix(sample(0:1, 16, replace = TRUE), 4)
58,302,969
I have created a matrix of binary digits from reading in a pgm file using the R package pixmap but I am trying to inverse the binary digits (making all 0s become 1s and all 1s become 0s) and outputting the matrix again. Is there an efficient way of doing this?
2019/10/09
[ "https://Stackoverflow.com/questions/58302969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12168692/" ]
``` matrix <- +(!matrix) ``` The `!` coerces it into a logical matrix and switches the 0s and 1s to TRUE and FALSE. The `+` coerces it back to 0s and 1s.
You can try `abs(1-your_matrix)` ``` mat <- matrix(as.numeric(runif(6) > 0.5), 3, 2) mat # [,1] [,2] [,3] #[1,] 1 0 1 #[2,] 1 0 1 abs(1-mat) # [,1] [,2] [,3] #[1,] 0 1 0 #[2,] 0 1 0 ```
58,302,969
I have created a matrix of binary digits from reading in a pgm file using the R package pixmap but I am trying to inverse the binary digits (making all 0s become 1s and all 1s become 0s) and outputting the matrix again. Is there an efficient way of doing this?
2019/10/09
[ "https://Stackoverflow.com/questions/58302969", "https://Stackoverflow.com", "https://Stackoverflow.com/users/12168692/" ]
``` matrix <- +(!matrix) ``` The `!` coerces it into a logical matrix and switches the 0s and 1s to TRUE and FALSE. The `+` coerces it back to 0s and 1s.
We can negate the `mat` to return a logical matrix and use `+` to coerce it to binary ``` +!(mat) # [,1] [,2] [,3] [,4] #[1,] 1 1 1 0 #[2,] 1 0 1 1 #[3,] 1 0 0 0 #[4,] 0 0 0 1 ``` ### data set.seed(123) mat <- matrix(sample(0:1, 16, replace = TRUE), 4)
43,628
Sorry for my bad english. I have WP 3.3.1 & wp-e-commerce.3.8.7.6.2. On the products page (which use wpsc-products\_page.php template) I have list of products. I want to group this products by category. For example: *\**\*Cat1 Product 1 Product 2 \**\** Cat2 Product 1 Product 2 \**\** Cat3 Prod...
2012/02/27
[ "https://wordpress.stackexchange.com/questions/43628", "https://wordpress.stackexchange.com", "https://wordpress.stackexchange.com/users/13568/" ]
You are very close. I had the same problem a while ago, and [blogged about it](http://snippets.webaware.com.au/snippets/sort-wp-e-commerce-products-by-category-and-product-title/). Your join is missing one more join table, wp\_terms, which has the term you want to sort on. Here is the code I used: ``` class OrderWpsc...
Here you can find a solution : <http://subharanjan.in/category-wise-products-display-in-wp-e-commerce/> I am not sure if this will solve your problem. Thanks!
9,873,954
I am trying to debug a large (1.1Gb) SQL dump file. The file says there was an error on line 14718. I have tried opening the file in VIM and gedit but the file was too big to load. Is there a quick way to get a small piece of the file so that I can correct the error and save the file?
2012/03/26
[ "https://Stackoverflow.com/questions/9873954", "https://Stackoverflow.com", "https://Stackoverflow.com/users/726543/" ]
Nick, not sure if this will, help, but I always end up using `less`. Give this a try and let me know if it helps: ``` less +j14718 -N aFile.txt ```
I'm using Geany to parse very large files. (like your sql dump) It runs under Linux, FreeBSD, NetBSD, OpenBSD, MacOS X, AIX, Solaris Express and Windows. And it's GPL: <http://www.geany.org/> (you may find it in most linux distribuitions as an IDE)
358,885
I was working on my home server remotely and wanted to make some changes to my .htaccess. I could not see this file using my FTP(filezilla) and thought there was none there. I decided to upload one I had in my computer to my server in public\_html and edit it.Although the upload was successful per FZ, this file is not ...
2012/02/10
[ "https://serverfault.com/questions/358885", "https://serverfault.com", "https://serverfault.com/users/110237/" ]
actually my own previous post wouldn't have worked. this works (and doesn't require 3rd party products): ``` $user = get-aduser jdoe Set-ADObject $user -Replace @{telephoneNumber=12345} ```
A room mailbox has an associated user that sets these properties. Using the Quest AD cmdlets, available [here](http://www.quest.com/powershell/activeroles-server.aspx), you could run the following - ``` Set-QADUser -Identity $RoomMailboxUser -Office "Location here" -PhoneNumber "Phone number here" ```
36,204,222
I am making a website in 2 languages. Is it possible to check it in which country the user is, so that I can switch the language automatically for the user? I also have a switch option in my menu with a \_GET. I have this piece of code in the beginning: ``` if (isset($_GET['taal'])) { $taal = $_GET['taal']; } else...
2016/03/24
[ "https://Stackoverflow.com/questions/36204222", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5585845/" ]
Found the solution. Following posts helped me in that: [Sailsjs view caching (bug ?)](https://stackoverflow.com/questions/28294429/sailsjs-view-caching-bug?rq=1) <https://github.com/balderdashy/sails/issues/3513> <http://expressjs.com/en/api.html> The reason is, express was cashing views in production mode, so on d...
You have to use a watcher like forever, nodemon, or something else... Install forever by running: ``` sudo npm install -g forever ``` Run it: ``` forever -w start app.js ```
48,632,583
**Laravel 5.5** I have a search view where users can type in the `text input` fields to search a table. The request goes to GET variables onto the results blade. Inside the results blade, there is a Laravel ajax table. <https://datatables.yajrabox.com/> I can't figure out how to get pass the GET variables in the URL...
2018/02/05
[ "https://Stackoverflow.com/questions/48632583", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5254224/" ]
No need to send by GET method , You can easily use the POST method in the following way : You should have a form on your page with the POST method and unique ID ``` <form method="POST" id="search-form" role="form"> {{csrf_field()}} <input type="text" name="lead_phone"> </form> ``` On your page, write th...
Please specify the `method` of sending data. ``` <script> $(function() { $('.datatable').DataTable({ processing: true, serverSide: true, method: post, ajax: '{{ route('SearchResults') }}', columns: [ { data: 'lead_name', name: 'leads.lead_name' }, { d...
472,119
Hope someone can help me with this. It's like this, my husband trying to be an IT, basically he's not and honestly I'm not too, installed MBAM anti malware to his Windows PC. It's the anti malware his company is using. Because of whatever reason he has, he installed it. After installing and running a PC scan, he can't ...
2014/05/25
[ "https://askubuntu.com/questions/472119", "https://askubuntu.com", "https://askubuntu.com/users/285272/" ]
Install Tweak Tool: <https://apps.ubuntu.com/cat/applications/gnome-tweak-tool/> then open it and go to Appearance and set the icons to Ubuntu-mono-dark (Ambiance) or Ubuntu-mono-light (Radiance). ![enter image description here](https://i.stack.imgur.com/6hAK3.png)
If you didn't uninstall unity, just log out, choose unity session from the login screen and it should be there. If you did uninstall unity, just do `sudo apt-get install unity*` then it should install it for you. To be honest you if you like the unity icons, you can just go to the theme settings and change it to the un...
42,179,392
I have made the following code in order to create something like a piano. When you click on a button (`#start_img`) each `.piano` div should get the `press` class and after a short break it should be removed from it again. Then the function should loop to the next `.piano` div and repeat the same actions there. Doesn...
2017/02/11
[ "https://Stackoverflow.com/questions/42179392", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7548524/" ]
Two reasons. 1. delay() will only work for methods that use the animation queue internally 2. The loop will run instantaneously and therefore add same delay to each instance making them all activate simultaneously You could do something like ``` piano.each(function(index){ var $el = $(this); setTimeout(functio...
You can use setTimeout with a delay at the particular index. ``` start.on('click', function() { var piano = $('.piano'); piano.each(function(index) { var _this = $(this); _this.addClass('press'); setTimeout(function() { _this.removeClass('press'); }, 900 * index); }); }); ```
37,318
I have a database called `example.mdf` with a total size of 1GB which suffers from performance issues. I checked the allocated hardware and it is higher than required, I double checked the design and every thing looks normal, when I look at the `.mdf` files in their physical location (`C:\Program Files\Microsoft SQL Se...
2013/03/22
[ "https://dba.stackexchange.com/questions/37318", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
Who ever created the database did this on purpose. Assuming that all the database files are part of the same file group (the database properties will tell you this) then all you need to do is do a DBCC SHRINKFILE any use the EMPTYFILE parameter. ``` DBCC SHRINKFILE (Example_1, EMPTYFILE) GO ALTER DATABASE MyDatabase R...
The .mdf extensions doesn't really matter and the same case with .ndf/.ldf extensions as well. Primary file/secondary file/log file can have any extension (something like .xyz) And NO it is not SQL Server that created multiple data files. For further clarity please refer here: [Can a Database have more than one mdf F...
37,318
I have a database called `example.mdf` with a total size of 1GB which suffers from performance issues. I checked the allocated hardware and it is higher than required, I double checked the design and every thing looks normal, when I look at the `.mdf` files in their physical location (`C:\Program Files\Microsoft SQL Se...
2013/03/22
[ "https://dba.stackexchange.com/questions/37318", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
Who ever created the database did this on purpose. Assuming that all the database files are part of the same file group (the database properties will tell you this) then all you need to do is do a DBCC SHRINKFILE any use the EMPTYFILE parameter. ``` DBCC SHRINKFILE (Example_1, EMPTYFILE) GO ALTER DATABASE MyDatabase R...
There are couple of things to check 1. Why is the database on System drive (C:\ ) ? Dont you have any other storage / SAN attached to the server ? 2. Where is the log location ? 3. How is the database being used - no of concurrent users, load on the server, RAM on the server, no of cpu's on the server ? 4. Why is a 1...
37,318
I have a database called `example.mdf` with a total size of 1GB which suffers from performance issues. I checked the allocated hardware and it is higher than required, I double checked the design and every thing looks normal, when I look at the `.mdf` files in their physical location (`C:\Program Files\Microsoft SQL Se...
2013/03/22
[ "https://dba.stackexchange.com/questions/37318", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
These mdf files can also be of other databases... to check your database files use script: ``` USE [DatabaseName] GO SELECT name, physical_name FROM sys.database_files GO ```
The .mdf extensions doesn't really matter and the same case with .ndf/.ldf extensions as well. Primary file/secondary file/log file can have any extension (something like .xyz) And NO it is not SQL Server that created multiple data files. For further clarity please refer here: [Can a Database have more than one mdf F...
37,318
I have a database called `example.mdf` with a total size of 1GB which suffers from performance issues. I checked the allocated hardware and it is higher than required, I double checked the design and every thing looks normal, when I look at the `.mdf` files in their physical location (`C:\Program Files\Microsoft SQL Se...
2013/03/22
[ "https://dba.stackexchange.com/questions/37318", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
These mdf files can also be of other databases... to check your database files use script: ``` USE [DatabaseName] GO SELECT name, physical_name FROM sys.database_files GO ```
There are couple of things to check 1. Why is the database on System drive (C:\ ) ? Dont you have any other storage / SAN attached to the server ? 2. Where is the log location ? 3. How is the database being used - no of concurrent users, load on the server, RAM on the server, no of cpu's on the server ? 4. Why is a 1...
37,318
I have a database called `example.mdf` with a total size of 1GB which suffers from performance issues. I checked the allocated hardware and it is higher than required, I double checked the design and every thing looks normal, when I look at the `.mdf` files in their physical location (`C:\Program Files\Microsoft SQL Se...
2013/03/22
[ "https://dba.stackexchange.com/questions/37318", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
Who ever created the database did this on purpose. Assuming that all the database files are part of the same file group (the database properties will tell you this) then all you need to do is do a DBCC SHRINKFILE any use the EMPTYFILE parameter. ``` DBCC SHRINKFILE (Example_1, EMPTYFILE) GO ALTER DATABASE MyDatabase R...
Not sure if you can merge files in existing database but you can create new database and then use some of the third party database comparison tools to migrate data and structure to new database. Just be careful when migrating schema not to migrate the part that tells SQL Server to split files ;)
37,318
I have a database called `example.mdf` with a total size of 1GB which suffers from performance issues. I checked the allocated hardware and it is higher than required, I double checked the design and every thing looks normal, when I look at the `.mdf` files in their physical location (`C:\Program Files\Microsoft SQL Se...
2013/03/22
[ "https://dba.stackexchange.com/questions/37318", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
These mdf files can also be of other databases... to check your database files use script: ``` USE [DatabaseName] GO SELECT name, physical_name FROM sys.database_files GO ```
Not sure if you can merge files in existing database but you can create new database and then use some of the third party database comparison tools to migrate data and structure to new database. Just be careful when migrating schema not to migrate the part that tells SQL Server to split files ;)
37,318
I have a database called `example.mdf` with a total size of 1GB which suffers from performance issues. I checked the allocated hardware and it is higher than required, I double checked the design and every thing looks normal, when I look at the `.mdf` files in their physical location (`C:\Program Files\Microsoft SQL Se...
2013/03/22
[ "https://dba.stackexchange.com/questions/37318", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
You want to recombine the files because you think that is the cause of your performance issue. Do you have any proof that it actually is? It is a lot more likely that the problem is somewhere else, as distributing a database across multiple files actually increases performance in many cases. Things to look at first: ...
There are couple of things to check 1. Why is the database on System drive (C:\ ) ? Dont you have any other storage / SAN attached to the server ? 2. Where is the log location ? 3. How is the database being used - no of concurrent users, load on the server, RAM on the server, no of cpu's on the server ? 4. Why is a 1...
37,318
I have a database called `example.mdf` with a total size of 1GB which suffers from performance issues. I checked the allocated hardware and it is higher than required, I double checked the design and every thing looks normal, when I look at the `.mdf` files in their physical location (`C:\Program Files\Microsoft SQL Se...
2013/03/22
[ "https://dba.stackexchange.com/questions/37318", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
The .mdf extensions doesn't really matter and the same case with .ndf/.ldf extensions as well. Primary file/secondary file/log file can have any extension (something like .xyz) And NO it is not SQL Server that created multiple data files. For further clarity please refer here: [Can a Database have more than one mdf F...
Not sure if you can merge files in existing database but you can create new database and then use some of the third party database comparison tools to migrate data and structure to new database. Just be careful when migrating schema not to migrate the part that tells SQL Server to split files ;)
37,318
I have a database called `example.mdf` with a total size of 1GB which suffers from performance issues. I checked the allocated hardware and it is higher than required, I double checked the design and every thing looks normal, when I look at the `.mdf` files in their physical location (`C:\Program Files\Microsoft SQL Se...
2013/03/22
[ "https://dba.stackexchange.com/questions/37318", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
Who ever created the database did this on purpose. Assuming that all the database files are part of the same file group (the database properties will tell you this) then all you need to do is do a DBCC SHRINKFILE any use the EMPTYFILE parameter. ``` DBCC SHRINKFILE (Example_1, EMPTYFILE) GO ALTER DATABASE MyDatabase R...
You want to recombine the files because you think that is the cause of your performance issue. Do you have any proof that it actually is? It is a lot more likely that the problem is somewhere else, as distributing a database across multiple files actually increases performance in many cases. Things to look at first: ...
37,318
I have a database called `example.mdf` with a total size of 1GB which suffers from performance issues. I checked the allocated hardware and it is higher than required, I double checked the design and every thing looks normal, when I look at the `.mdf` files in their physical location (`C:\Program Files\Microsoft SQL Se...
2013/03/22
[ "https://dba.stackexchange.com/questions/37318", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/-1/" ]
There are couple of things to check 1. Why is the database on System drive (C:\ ) ? Dont you have any other storage / SAN attached to the server ? 2. Where is the log location ? 3. How is the database being used - no of concurrent users, load on the server, RAM on the server, no of cpu's on the server ? 4. Why is a 1...
Not sure if you can merge files in existing database but you can create new database and then use some of the third party database comparison tools to migrate data and structure to new database. Just be careful when migrating schema not to migrate the part that tells SQL Server to split files ;)
34,472
I work as a sound designer. Sometimes I do dialogue recording for short films. But honestly, I never use a field mixer or portable mic preamp. I only ever use a handheld (Zoom H4n or Tascam DR) and a shotgun mic (Rode NTG 1). I've recently done a lot of research on the internet about field mixers, and I'm starting to...
2015/02/11
[ "https://sound.stackexchange.com/questions/34472", "https://sound.stackexchange.com", "https://sound.stackexchange.com/users/12962/" ]
A mixer will have multiple channels for your multiple inputs. Each channel will have a trim pot (gain knob) for adjusting the input level. (Sidenote: some channels may not have a trim, those are line-level inputs, not mic-level inputs, and they are meant for things that already at "line-level") You set your gain as...
The use of a field mixer is not restricted to mixing several sources into one track. It is often used to send individual sources to individual tracks. When you need to mix several sources into one track in a live dialogue recording situation, you have to dynamically deal with each of the sources as the shot goes by. H...
7,696,988
I am trying to show a border on the left side, but it doesn't show after the first div(breadCrumb). The HTML code is following :- ``` <div class="contentHolder"> <div class="breadCrumb"> <a href="http://www.pricetag.com">Store </a>>>&nbsp;Electronics </div> <div class="contentMainDiv"> <di...
2011/10/08
[ "https://Stackoverflow.com/questions/7696988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/570928/" ]
You need to [clear/contain the floated elements](http://www.quirksmode.org/css/clearing.html) in `.contentMainDiv`. One way to do that is to add `overflow: hidden`.
``` .contentHolder div.leftDiv{ float:left; width: 150px; } ``` remove float: left or use clearfix <http://perishablepress.com/press/2009/12/06/new-clearfix-hack/> for contentHolder class preview <http://jsfiddle.net/TrePF/> ```css .clearfix:after { visibility: hidden; display: block; font-size: 0; ...
7,696,988
I am trying to show a border on the left side, but it doesn't show after the first div(breadCrumb). The HTML code is following :- ``` <div class="contentHolder"> <div class="breadCrumb"> <a href="http://www.pricetag.com">Store </a>>>&nbsp;Electronics </div> <div class="contentMainDiv"> <di...
2011/10/08
[ "https://Stackoverflow.com/questions/7696988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/570928/" ]
You need to [clear/contain the floated elements](http://www.quirksmode.org/css/clearing.html) in `.contentMainDiv`. One way to do that is to add `overflow: hidden`.
You can add `float: left;` or `display: inline-block;` to `.contentHolder` ``` .contentHolder { padding: 10px 0 0 10px; border-left: 1px solid #CCC; float: left; } ``` Either should work.
7,696,988
I am trying to show a border on the left side, but it doesn't show after the first div(breadCrumb). The HTML code is following :- ``` <div class="contentHolder"> <div class="breadCrumb"> <a href="http://www.pricetag.com">Store </a>>>&nbsp;Electronics </div> <div class="contentMainDiv"> <di...
2011/10/08
[ "https://Stackoverflow.com/questions/7696988", "https://Stackoverflow.com", "https://Stackoverflow.com/users/570928/" ]
``` .contentHolder div.leftDiv{ float:left; width: 150px; } ``` remove float: left or use clearfix <http://perishablepress.com/press/2009/12/06/new-clearfix-hack/> for contentHolder class preview <http://jsfiddle.net/TrePF/> ```css .clearfix:after { visibility: hidden; display: block; font-size: 0; ...
You can add `float: left;` or `display: inline-block;` to `.contentHolder` ``` .contentHolder { padding: 10px 0 0 10px; border-left: 1px solid #CCC; float: left; } ``` Either should work.
37,862,419
I'm building an app which shows data from **firebase database** in `ListView` adapter, but the listview doesn't fill with data. Database works. I tried this with `textview.setText` method on specially created layout. ``` public class MainActivityListFragment extends ListFragment { private ArrayList<typ> typy; ...
2016/06/16
[ "https://Stackoverflow.com/questions/37862419", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6475203/" ]
If I understand your question right - you looking for "how to set config param", then you can use `Config::set($key, $value)`
Correct answer is above ``` Config::set($key, $value) ``` Example ``` //Not forget to add namespace using class. use Config; //Example to set config. (configFile.key) Config::set('auth.enable_verification', false); ```