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 |
|---|---|---|---|---|---|
255,439 | Part of [**Code Golf Advent Calendar 2022**](https://codegolf.meta.stackexchange.com/questions/25251/announcing-code-golf-advent-calendar-2022-event-challenge-sandbox) event. See the linked meta post for details.
---
[You successfully route the laser into the sensor](https://codegolf.stackexchange.com/q/255405/78410)... | 2022/12/13 | [
"https://codegolf.stackexchange.com/questions/255439",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/78410/"
] | [Charcoal](https://github.com/somebody1234/Charcoal), 52 bytes
==============================================================
```
F²⊞υ¬ιFEθ⁺ι§ηκUMυ⁺××κ№α§ιλX³⁼§ι¬λG×§υ¬λ⬤ι№⁺§/\λGμI⊟υ
```
[Try it online!](https://tio.run/##TY9PC4MwDMXvforgKUKHsB13Ehmyw4aMHb0UdSi21n/d9u27pCIz0Bxefi95LRs5lUYq515mAjxGkNu5QSvgbhZso@gc@MF... | [PARI/GP](https://pari.math.u-bordeaux.fr), 84 bytes
====================================================
```
a->l=[1,0];[l*=[if(u%15%2,v*3%5),u*v%7<2;u*v%2,if(v%15%2,u*3%5)]|t<-a,[u,v]=t~];l[2]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=NY_BSsQwEIbv-xRDoJCUlLqVRaHtXjzk5KWIlyRIELsUstmQJgVh2RfxUhDxMXwO38... |
255,439 | Part of [**Code Golf Advent Calendar 2022**](https://codegolf.meta.stackexchange.com/questions/25251/announcing-code-golf-advent-calendar-2022-event-challenge-sandbox) event. See the linked meta post for details.
---
[You successfully route the laser into the sensor](https://codegolf.stackexchange.com/q/255405/78410)... | 2022/12/13 | [
"https://codegolf.stackexchange.com/questions/255439",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/78410/"
] | JavaScript (ES6), 86 bytes
==========================
This is a port of [loopy walt's answer](https://codegolf.stackexchange.com/a/255443/58563) with an extra layer of ASCII code trickery.
Expects a transposed matrix of ASCII codes, using upper case.
```javascript
m=>m.map(([T,B])=>[t,b]=[B*3%5*t*!(T&8)+T*B%2*b,T*3%... | [PARI/GP](https://pari.math.u-bordeaux.fr), 84 bytes
====================================================
```
a->l=[1,0];[l*=[if(u%15%2,v*3%5),u*v%7<2;u*v%2,if(v%15%2,u*3%5)]|t<-a,[u,v]=t~];l[2]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=NY_BSsQwEIbv-xRDoJCUlLqVRaHtXjzk5KWIlyRIELsUstmQJgVh2RfxUhDxMXwO38... |
255,439 | Part of [**Code Golf Advent Calendar 2022**](https://codegolf.meta.stackexchange.com/questions/25251/announcing-code-golf-advent-calendar-2022-event-challenge-sandbox) event. See the linked meta post for details.
---
[You successfully route the laser into the sensor](https://codegolf.stackexchange.com/q/255405/78410)... | 2022/12/13 | [
"https://codegolf.stackexchange.com/questions/255439",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/78410/"
] | [JavaScript (Node.js)](https://nodejs.org), 117 bytes
=====================================================
```javascript
f=(a,p=1,q=0,h=r=>!!a.match('^'+r))=>a?f(a.slice(2),h`\\w`*3**h`.g`*p+h`[g/]{2}`*q,h`.\\w`*3**h`g`*q+h`[S-g]{2}`*p):q
```
[Try it online!](https://tio.run/##RZBNb4MwDIbv/Ap6IoFgSvdx2BR2mDYuO61HYE... | [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 54 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
============================================================================================================================
```
1¾‚Iv©y`'GQ3smsa*y„/G2ãQà‚*y„\G2ãQày`as'GQ3sm*‚®*R‚O}θ
```
Port... |
255,439 | Part of [**Code Golf Advent Calendar 2022**](https://codegolf.meta.stackexchange.com/questions/25251/announcing-code-golf-advent-calendar-2022-event-challenge-sandbox) event. See the linked meta post for details.
---
[You successfully route the laser into the sensor](https://codegolf.stackexchange.com/q/255405/78410)... | 2022/12/13 | [
"https://codegolf.stackexchange.com/questions/255439",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/78410/"
] | [JavaScript (Node.js)](https://nodejs.org), 117 bytes
=====================================================
```javascript
f=(a,p=1,q=0,h=r=>!!a.match('^'+r))=>a?f(a.slice(2),h`\\w`*3**h`.g`*p+h`[g/]{2}`*q,h`.\\w`*3**h`g`*q+h`[S-g]{2}`*p):q
```
[Try it online!](https://tio.run/##RZBNb4MwDIbv/Ap6IoFgSvdx2BR2mDYuO61HYE... | JavaScript (ES6), 86 bytes
==========================
This is a port of [loopy walt's answer](https://codegolf.stackexchange.com/a/255443/58563) with an extra layer of ASCII code trickery.
Expects a transposed matrix of ASCII codes, using upper case.
```javascript
m=>m.map(([T,B])=>[t,b]=[B*3%5*t*!(T&8)+T*B%2*b,T*3%... |
255,439 | Part of [**Code Golf Advent Calendar 2022**](https://codegolf.meta.stackexchange.com/questions/25251/announcing-code-golf-advent-calendar-2022-event-challenge-sandbox) event. See the linked meta post for details.
---
[You successfully route the laser into the sensor](https://codegolf.stackexchange.com/q/255405/78410)... | 2022/12/13 | [
"https://codegolf.stackexchange.com/questions/255439",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/78410/"
] | [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 54 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
============================================================================================================================
```
1¾‚Iv©y`'GQ3smsa*y„/G2ãQà‚*y„\G2ãQày`as'GQ3sm*‚®*R‚O}θ
```
Port... | [PARI/GP](https://pari.math.u-bordeaux.fr), 84 bytes
====================================================
```
a->l=[1,0];[l*=[if(u%15%2,v*3%5),u*v%7<2;u*v%2,if(v%15%2,u*3%5)]|t<-a,[u,v]=t~];l[2]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=NY_BSsQwEIbv-xRDoJCUlLqVRaHtXjzk5KWIlyRIELsUstmQJgVh2RfxUhDxMXwO38... |
255,439 | Part of [**Code Golf Advent Calendar 2022**](https://codegolf.meta.stackexchange.com/questions/25251/announcing-code-golf-advent-calendar-2022-event-challenge-sandbox) event. See the linked meta post for details.
---
[You successfully route the laser into the sensor](https://codegolf.stackexchange.com/q/255405/78410)... | 2022/12/13 | [
"https://codegolf.stackexchange.com/questions/255439",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/78410/"
] | [Python](https://www.python.org), 97 bytes (@Arnauld)
=====================================================
```python
def f(a,t=1,b=0):
for T,B in a:t,b=B*3%5*t*(T&8<1)+T*B%2*b,T*3%5*b*(B&8<1)+t*(T*B%7<2)
return b
```
[Attempt This Online!](https://ato.pxeger.com/run?1=NY_PCoJAEMbv-xSDYOxs2z8jEtGLl-7hzTy46NKCqGzjo... | [PARI/GP](https://pari.math.u-bordeaux.fr), 84 bytes
====================================================
```
a->l=[1,0];[l*=[if(u%15%2,v*3%5),u*v%7<2;u*v%2,if(v%15%2,u*3%5)]|t<-a,[u,v]=t~];l[2]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=NY_BSsQwEIbv-xRDoJCUlLqVRaHtXjzk5KWIlyRIELsUstmQJgVh2RfxUhDxMXwO38... |
255,439 | Part of [**Code Golf Advent Calendar 2022**](https://codegolf.meta.stackexchange.com/questions/25251/announcing-code-golf-advent-calendar-2022-event-challenge-sandbox) event. See the linked meta post for details.
---
[You successfully route the laser into the sensor](https://codegolf.stackexchange.com/q/255405/78410)... | 2022/12/13 | [
"https://codegolf.stackexchange.com/questions/255439",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/78410/"
] | [Python](https://www.python.org), 97 bytes (@Arnauld)
=====================================================
```python
def f(a,t=1,b=0):
for T,B in a:t,b=B*3%5*t*(T&8<1)+T*B%2*b,T*3%5*b*(B&8<1)+t*(T*B%7<2)
return b
```
[Attempt This Online!](https://ato.pxeger.com/run?1=NY_PCoJAEMbv-xSDYOxs2z8jEtGLl-7hzTy46NKCqGzjo... | [Charcoal](https://github.com/somebody1234/Charcoal), 52 bytes
==============================================================
```
F²⊞υ¬ιFEθ⁺ι§ηκUMυ⁺××κ№α§ιλX³⁼§ι¬λG×§υ¬λ⬤ι№⁺§/\λGμI⊟υ
```
[Try it online!](https://tio.run/##TY9PC4MwDMXvforgKUKHsB13Ehmyw4aMHb0UdSi21n/d9u27pCIz0Bxefi95LRs5lUYq515mAjxGkNu5QSvgbhZso@gc@MF... |
255,439 | Part of [**Code Golf Advent Calendar 2022**](https://codegolf.meta.stackexchange.com/questions/25251/announcing-code-golf-advent-calendar-2022-event-challenge-sandbox) event. See the linked meta post for details.
---
[You successfully route the laser into the sensor](https://codegolf.stackexchange.com/q/255405/78410)... | 2022/12/13 | [
"https://codegolf.stackexchange.com/questions/255439",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/78410/"
] | [JavaScript (Node.js)](https://nodejs.org), 117 bytes
=====================================================
```javascript
f=(a,p=1,q=0,h=r=>!!a.match('^'+r))=>a?f(a.slice(2),h`\\w`*3**h`.g`*p+h`[g/]{2}`*q,h`.\\w`*3**h`g`*q+h`[S-g]{2}`*p):q
```
[Try it online!](https://tio.run/##RZBNb4MwDIbv/Ap6IoFgSvdx2BR2mDYuO61HYE... | [PARI/GP](https://pari.math.u-bordeaux.fr), 84 bytes
====================================================
```
a->l=[1,0];[l*=[if(u%15%2,v*3%5),u*v%7<2;u*v%2,if(v%15%2,u*3%5)]|t<-a,[u,v]=t~];l[2]
```
[Attempt This Online!](https://ato.pxeger.com/run?1=NY_BSsQwEIbv-xRDoJCUlLqVRaHtXjzk5KWIlyRIELsUstmQJgVh2RfxUhDxMXwO38... |
255,439 | Part of [**Code Golf Advent Calendar 2022**](https://codegolf.meta.stackexchange.com/questions/25251/announcing-code-golf-advent-calendar-2022-event-challenge-sandbox) event. See the linked meta post for details.
---
[You successfully route the laser into the sensor](https://codegolf.stackexchange.com/q/255405/78410)... | 2022/12/13 | [
"https://codegolf.stackexchange.com/questions/255439",
"https://codegolf.stackexchange.com",
"https://codegolf.stackexchange.com/users/78410/"
] | [Python](https://www.python.org), 97 bytes (@Arnauld)
=====================================================
```python
def f(a,t=1,b=0):
for T,B in a:t,b=B*3%5*t*(T&8<1)+T*B%2*b,T*3%5*b*(B&8<1)+t*(T*B%7<2)
return b
```
[Attempt This Online!](https://ato.pxeger.com/run?1=NY_PCoJAEMbv-xSDYOxs2z8jEtGLl-7hzTy46NKCqGzjo... | [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 54 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
============================================================================================================================
```
1¾‚Iv©y`'GQ3smsa*y„/G2ãQà‚*y„\G2ãQày`as'GQ3sm*‚®*R‚O}θ
```
Port... |
18,385,769 | I'm using the reveal modal plugin and have set it to load automatically on page open with a cookie activated, and it works great. It runs jquery v1.6. I have to implement it onto a page with Nivoslider which uses v1.9.
When put on the page with Nivoslider the trigger to open on page load now doesn't work anymore - bu... | 2013/08/22 | [
"https://Stackoverflow.com/questions/18385769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2708053/"
] | Why are you loading `2 versions of jquery` try this,
```
<link rel="stylesheet" href="popup/reveal.css">
<!-- Use only the new version only like 1.9.0 -->
<script type="text/javascript" src="slider/scripts/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="popup/jquery.reveal.js"></script>
<script t... | I would highly recomend only using one library on a page due to the reduced performance each one provides. I would recomend trying to update the reveal plugin to work with jquery v9, or finding a more up to date plugin the achieves the same goal.
That said, if this is not viable you can use jqueries no conflict option... |
18,385,769 | I'm using the reveal modal plugin and have set it to load automatically on page open with a cookie activated, and it works great. It runs jquery v1.6. I have to implement it onto a page with Nivoslider which uses v1.9.
When put on the page with Nivoslider the trigger to open on page load now doesn't work anymore - bu... | 2013/08/22 | [
"https://Stackoverflow.com/questions/18385769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2708053/"
] | I would highly recomend only using one library on a page due to the reduced performance each one provides. I would recomend trying to update the reveal plugin to work with jquery v9, or finding a more up to date plugin the achieves the same goal.
That said, if this is not viable you can use jqueries no conflict option... | The .live() method has been deprecated since jQuery 1.7 and has been removed in 1.9. We recommend upgrading code to use the .on() method instead. To exactly match $('a[data-reveal-id]').live('click', function(e), for example, you can write
```
$('a[data-reveal-id]').on('click', function(e) {
e.preventDefault(... |
18,385,769 | I'm using the reveal modal plugin and have set it to load automatically on page open with a cookie activated, and it works great. It runs jquery v1.6. I have to implement it onto a page with Nivoslider which uses v1.9.
When put on the page with Nivoslider the trigger to open on page load now doesn't work anymore - bu... | 2013/08/22 | [
"https://Stackoverflow.com/questions/18385769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2708053/"
] | Why are you loading `2 versions of jquery` try this,
```
<link rel="stylesheet" href="popup/reveal.css">
<!-- Use only the new version only like 1.9.0 -->
<script type="text/javascript" src="slider/scripts/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="popup/jquery.reveal.js"></script>
<script t... | The .live() method has been deprecated since jQuery 1.7 and has been removed in 1.9. We recommend upgrading code to use the .on() method instead. To exactly match $('a[data-reveal-id]').live('click', function(e), for example, you can write
```
$('a[data-reveal-id]').on('click', function(e) {
e.preventDefault(... |
15,497 | I was trying to transcribe my cat's noises into IPA. For example, her wanting to be petted is like [njæː] or [njaː]. But purring doesn't seem to fit any existing notation, except maybe [ʜ]. Has anyone ever mapped a cat's phonetic inventory? Their vocal tracts don't seem to be much different than ours. | 2016/01/12 | [
"https://linguistics.stackexchange.com/questions/15497",
"https://linguistics.stackexchange.com",
"https://linguistics.stackexchange.com/users/4943/"
] | Sure, why not? The main problem you will run into is establishing contrastiveness. I strongly recommend reading ch. 4 of the Handbook of the IPA. You can hear two different cats purring at the [wiki page](https://en.wikipedia.org/wiki/Purr), so the question is whether those are two different purr phonemes (technically ... | Aside from @user6726's answer this is my personal view:
Phonetic transcription is based on human's articulation (as human's produce for this case you can say for example the /k/ sound is palatal but do cats use hard palate to produce sounds?!) Imagine a hypothetical creature that makes a sound like modem's `(actually o... |
15,497 | I was trying to transcribe my cat's noises into IPA. For example, her wanting to be petted is like [njæː] or [njaː]. But purring doesn't seem to fit any existing notation, except maybe [ʜ]. Has anyone ever mapped a cat's phonetic inventory? Their vocal tracts don't seem to be much different than ours. | 2016/01/12 | [
"https://linguistics.stackexchange.com/questions/15497",
"https://linguistics.stackexchange.com",
"https://linguistics.stackexchange.com/users/4943/"
] | Sure, why not? The main problem you will run into is establishing contrastiveness. I strongly recommend reading ch. 4 of the Handbook of the IPA. You can hear two different cats purring at the [wiki page](https://en.wikipedia.org/wiki/Purr), so the question is whether those are two different purr phonemes (technically ... | If you'd like to transcribe how we perceive cat language (as opposed to how cats do), you might be interested in the corresponding problem for bird song, which has at least some literature. I found a reference to an LSA talk from 1977 by Donegan and Stampe, "Old Sam Peabody, Peabody, Peabody". |
15,497 | I was trying to transcribe my cat's noises into IPA. For example, her wanting to be petted is like [njæː] or [njaː]. But purring doesn't seem to fit any existing notation, except maybe [ʜ]. Has anyone ever mapped a cat's phonetic inventory? Their vocal tracts don't seem to be much different than ours. | 2016/01/12 | [
"https://linguistics.stackexchange.com/questions/15497",
"https://linguistics.stackexchange.com",
"https://linguistics.stackexchange.com/users/4943/"
] | Sure, why not? The main problem you will run into is establishing contrastiveness. I strongly recommend reading ch. 4 of the Handbook of the IPA. You can hear two different cats purring at the [wiki page](https://en.wikipedia.org/wiki/Purr), so the question is whether those are two different purr phonemes (technically ... | I would like to encourage you in your transcription efforts on cat's phoneme inventory! I am a student of linguistics (B.Sc.) and I have two cats, too - that's why I have been thinking of doing the same one day. We often face men, even scientists, who claim that speech as a unique feature to the human race. When it com... |
15,497 | I was trying to transcribe my cat's noises into IPA. For example, her wanting to be petted is like [njæː] or [njaː]. But purring doesn't seem to fit any existing notation, except maybe [ʜ]. Has anyone ever mapped a cat's phonetic inventory? Their vocal tracts don't seem to be much different than ours. | 2016/01/12 | [
"https://linguistics.stackexchange.com/questions/15497",
"https://linguistics.stackexchange.com",
"https://linguistics.stackexchange.com/users/4943/"
] | Sure, why not? The main problem you will run into is establishing contrastiveness. I strongly recommend reading ch. 4 of the Handbook of the IPA. You can hear two different cats purring at the [wiki page](https://en.wikipedia.org/wiki/Purr), so the question is whether those are two different purr phonemes (technically ... | The hiss sounds like an [x].
The best purring sound I can make is the Spanish trill [r] with my mouth almost closed, or modulating my mouth so that it fills with air, it leaks out, repeat. |
15,497 | I was trying to transcribe my cat's noises into IPA. For example, her wanting to be petted is like [njæː] or [njaː]. But purring doesn't seem to fit any existing notation, except maybe [ʜ]. Has anyone ever mapped a cat's phonetic inventory? Their vocal tracts don't seem to be much different than ours. | 2016/01/12 | [
"https://linguistics.stackexchange.com/questions/15497",
"https://linguistics.stackexchange.com",
"https://linguistics.stackexchange.com/users/4943/"
] | Aside from @user6726's answer this is my personal view:
Phonetic transcription is based on human's articulation (as human's produce for this case you can say for example the /k/ sound is palatal but do cats use hard palate to produce sounds?!) Imagine a hypothetical creature that makes a sound like modem's `(actually o... | I would like to encourage you in your transcription efforts on cat's phoneme inventory! I am a student of linguistics (B.Sc.) and I have two cats, too - that's why I have been thinking of doing the same one day. We often face men, even scientists, who claim that speech as a unique feature to the human race. When it com... |
15,497 | I was trying to transcribe my cat's noises into IPA. For example, her wanting to be petted is like [njæː] or [njaː]. But purring doesn't seem to fit any existing notation, except maybe [ʜ]. Has anyone ever mapped a cat's phonetic inventory? Their vocal tracts don't seem to be much different than ours. | 2016/01/12 | [
"https://linguistics.stackexchange.com/questions/15497",
"https://linguistics.stackexchange.com",
"https://linguistics.stackexchange.com/users/4943/"
] | Aside from @user6726's answer this is my personal view:
Phonetic transcription is based on human's articulation (as human's produce for this case you can say for example the /k/ sound is palatal but do cats use hard palate to produce sounds?!) Imagine a hypothetical creature that makes a sound like modem's `(actually o... | The hiss sounds like an [x].
The best purring sound I can make is the Spanish trill [r] with my mouth almost closed, or modulating my mouth so that it fills with air, it leaks out, repeat. |
15,497 | I was trying to transcribe my cat's noises into IPA. For example, her wanting to be petted is like [njæː] or [njaː]. But purring doesn't seem to fit any existing notation, except maybe [ʜ]. Has anyone ever mapped a cat's phonetic inventory? Their vocal tracts don't seem to be much different than ours. | 2016/01/12 | [
"https://linguistics.stackexchange.com/questions/15497",
"https://linguistics.stackexchange.com",
"https://linguistics.stackexchange.com/users/4943/"
] | If you'd like to transcribe how we perceive cat language (as opposed to how cats do), you might be interested in the corresponding problem for bird song, which has at least some literature. I found a reference to an LSA talk from 1977 by Donegan and Stampe, "Old Sam Peabody, Peabody, Peabody". | I would like to encourage you in your transcription efforts on cat's phoneme inventory! I am a student of linguistics (B.Sc.) and I have two cats, too - that's why I have been thinking of doing the same one day. We often face men, even scientists, who claim that speech as a unique feature to the human race. When it com... |
15,497 | I was trying to transcribe my cat's noises into IPA. For example, her wanting to be petted is like [njæː] or [njaː]. But purring doesn't seem to fit any existing notation, except maybe [ʜ]. Has anyone ever mapped a cat's phonetic inventory? Their vocal tracts don't seem to be much different than ours. | 2016/01/12 | [
"https://linguistics.stackexchange.com/questions/15497",
"https://linguistics.stackexchange.com",
"https://linguistics.stackexchange.com/users/4943/"
] | If you'd like to transcribe how we perceive cat language (as opposed to how cats do), you might be interested in the corresponding problem for bird song, which has at least some literature. I found a reference to an LSA talk from 1977 by Donegan and Stampe, "Old Sam Peabody, Peabody, Peabody". | The hiss sounds like an [x].
The best purring sound I can make is the Spanish trill [r] with my mouth almost closed, or modulating my mouth so that it fills with air, it leaks out, repeat. |
39,191,023 | i have to setup a Windows based file-sharing server for my work environment (500+ users in AD) and i wanted to automate things with powershell. I want to make folders based on OU's in AD hierarchy and after that assign permissions to groups of people actually working in these departments. Each ou = department and somet... | 2016/08/28 | [
"https://Stackoverflow.com/questions/39191023",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6766792/"
] | You'll find below an adaptation of the third solution from <http://stuart-moore.com/finding-bottom-folders-file-tree-using-powershell/> to fullfill the request *I need to see them in a list 1 by 1 so then i can make another foreach loop and add permissions based on them.*
```
Function Get-MostDepthDirectory {
[Cmd... | Here is an approach :
```
Get-ChildItem "C:\RootDirectory" -Directory -Recurse |
ForEach-Object {
if((Get-ChildItem $_.FullName -Directory).Count) {
$_.FullName
}
} | Sort-Object
``` |
17,476,657 | I have initialize masonry plugin - works OK,
than I destroy it for media width <= 767px - it was destroyed
but when I return back to media width > 767px and initialize masonry again it doesn't work.
why?
or is there any another solution to turn off masonry plugin and later turn it on on some event?
this is my code... | 2013/07/04 | [
"https://Stackoverflow.com/questions/17476657",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/999295/"
] | For what it's worth, I ended up solving this a different way. Masonry is just setting some styles. So using a media query, I set the following CSS to basically render masonry useless:
```
@media (max-width: 768px) {
.item {
position: relative !important;
left: auto !important;
top: auto !important;
}
}... | ```
$(document).ready(function() {
if ($(window).width() <= 767) {
$('#container').masonry( 'destroy' );
}
if ($(window).width() > 768) {
$('#container').masonry({
columnWidth: 350,
gutter: 20,
});
}
if ($(window).width() > 992) {
$('#container').masonry({
columnWidth: 300,
... |
17,476,657 | I have initialize masonry plugin - works OK,
than I destroy it for media width <= 767px - it was destroyed
but when I return back to media width > 767px and initialize masonry again it doesn't work.
why?
or is there any another solution to turn off masonry plugin and later turn it on on some event?
this is my code... | 2013/07/04 | [
"https://Stackoverflow.com/questions/17476657",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/999295/"
] | [Eli Gassert's answer](https://stackoverflow.com/a/25085828/2290316) might be more clever than going all javascript.
However, I found myself doing this quite successfully like this:
```
$(window).on('resize', function (event) {
var $window = $(window);
if ($window.width() < 768) {
var $masonryTarget = $('.ma... | ```
$(document).ready(function() {
if ($(window).width() <= 767) {
$('#container').masonry( 'destroy' );
}
if ($(window).width() > 768) {
$('#container').masonry({
columnWidth: 350,
gutter: 20,
});
}
if ($(window).width() > 992) {
$('#container').masonry({
columnWidth: 300,
... |
17,476,657 | I have initialize masonry plugin - works OK,
than I destroy it for media width <= 767px - it was destroyed
but when I return back to media width > 767px and initialize masonry again it doesn't work.
why?
or is there any another solution to turn off masonry plugin and later turn it on on some event?
this is my code... | 2013/07/04 | [
"https://Stackoverflow.com/questions/17476657",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/999295/"
] | Finally after hours of reading the docs, I found that masonry will make a $.data('masonry') to masonry element.
You can read more about it in masonry docs [here](https://masonry.desandro.com/methods.html#jquery-fn-data-masonry).
This data will affect the items position in masonry. So, we need to remove this data with... | ```
$(document).ready(function() {
if ($(window).width() <= 767) {
$('#container').masonry( 'destroy' );
}
if ($(window).width() > 768) {
$('#container').masonry({
columnWidth: 350,
gutter: 20,
});
}
if ($(window).width() > 992) {
$('#container').masonry({
columnWidth: 300,
... |
17,476,657 | I have initialize masonry plugin - works OK,
than I destroy it for media width <= 767px - it was destroyed
but when I return back to media width > 767px and initialize masonry again it doesn't work.
why?
or is there any another solution to turn off masonry plugin and later turn it on on some event?
this is my code... | 2013/07/04 | [
"https://Stackoverflow.com/questions/17476657",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/999295/"
] | For what it's worth, I ended up solving this a different way. Masonry is just setting some styles. So using a media query, I set the following CSS to basically render masonry useless:
```
@media (max-width: 768px) {
.item {
position: relative !important;
left: auto !important;
top: auto !important;
}
}... | [Eli Gassert's answer](https://stackoverflow.com/a/25085828/2290316) might be more clever than going all javascript.
However, I found myself doing this quite successfully like this:
```
$(window).on('resize', function (event) {
var $window = $(window);
if ($window.width() < 768) {
var $masonryTarget = $('.ma... |
17,476,657 | I have initialize masonry plugin - works OK,
than I destroy it for media width <= 767px - it was destroyed
but when I return back to media width > 767px and initialize masonry again it doesn't work.
why?
or is there any another solution to turn off masonry plugin and later turn it on on some event?
this is my code... | 2013/07/04 | [
"https://Stackoverflow.com/questions/17476657",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/999295/"
] | Finally after hours of reading the docs, I found that masonry will make a $.data('masonry') to masonry element.
You can read more about it in masonry docs [here](https://masonry.desandro.com/methods.html#jquery-fn-data-masonry).
This data will affect the items position in masonry. So, we need to remove this data with... | For what it's worth, I ended up solving this a different way. Masonry is just setting some styles. So using a media query, I set the following CSS to basically render masonry useless:
```
@media (max-width: 768px) {
.item {
position: relative !important;
left: auto !important;
top: auto !important;
}
}... |
17,476,657 | I have initialize masonry plugin - works OK,
than I destroy it for media width <= 767px - it was destroyed
but when I return back to media width > 767px and initialize masonry again it doesn't work.
why?
or is there any another solution to turn off masonry plugin and later turn it on on some event?
this is my code... | 2013/07/04 | [
"https://Stackoverflow.com/questions/17476657",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/999295/"
] | Finally after hours of reading the docs, I found that masonry will make a $.data('masonry') to masonry element.
You can read more about it in masonry docs [here](https://masonry.desandro.com/methods.html#jquery-fn-data-masonry).
This data will affect the items position in masonry. So, we need to remove this data with... | [Eli Gassert's answer](https://stackoverflow.com/a/25085828/2290316) might be more clever than going all javascript.
However, I found myself doing this quite successfully like this:
```
$(window).on('resize', function (event) {
var $window = $(window);
if ($window.width() < 768) {
var $masonryTarget = $('.ma... |
32,123,947 | I am very new to coding and it's been fun so far. But I've been trying to work a function and for loop together and have it print out with console.log. Is anything at all correct? Or am I just completely lost?
What I want it to do is have bottlesLeft have a value of 99.
Declare a function named 'bottleStockReporter'.... | 2015/08/20 | [
"https://Stackoverflow.com/questions/32123947",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5248491/"
] | Easy solution. Basically, you pass a number, bottlesLeft is set to that number, and we loop downwards and output to the console.
Here's your challenge: Test this function. What if you pass a non-number? What if a string is passed? What if a negative number is passed? How do you account for these cases?
```
var bottle... | But what about the grammatical concordance?
```
function bottleStockReporter(i) {
for(var i = 99; i>0; i--) {
var bottleOrBottles = (i > 1) ? " bottles" : " bottle";
console.log(i + bottleOrBottles + " of root beer on the wall.");
}
}
bottleStockReporter(99);
``` |
32,123,947 | I am very new to coding and it's been fun so far. But I've been trying to work a function and for loop together and have it print out with console.log. Is anything at all correct? Or am I just completely lost?
What I want it to do is have bottlesLeft have a value of 99.
Declare a function named 'bottleStockReporter'.... | 2015/08/20 | [
"https://Stackoverflow.com/questions/32123947",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5248491/"
] | You should probably change
`var bottlesLeft = 99;` to `var bottlesLeft = number;`. This way, when you call `bottleStockReporter(`some number`);`, `bottlesLeft` will not be set to 99 every time. In addition, your `for` loop will set `bottlesLeft` to 99 again, so you should change it to look like:
```
for (var num = bot... | But what about the grammatical concordance?
```
function bottleStockReporter(i) {
for(var i = 99; i>0; i--) {
var bottleOrBottles = (i > 1) ? " bottles" : " bottle";
console.log(i + bottleOrBottles + " of root beer on the wall.");
}
}
bottleStockReporter(99);
``` |
32,123,947 | I am very new to coding and it's been fun so far. But I've been trying to work a function and for loop together and have it print out with console.log. Is anything at all correct? Or am I just completely lost?
What I want it to do is have bottlesLeft have a value of 99.
Declare a function named 'bottleStockReporter'.... | 2015/08/20 | [
"https://Stackoverflow.com/questions/32123947",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5248491/"
] | You should first start by following the problem statement.
>
> Declare a function named `bottleStockReporter`
>
>
>
```
function bottleStockReporter() {
}
```
>
> Use console.log to print out how many bottles of root on the wall.
>
>
>
Kind of ambigous, but lets assume that the function `bottleStockReport... | But what about the grammatical concordance?
```
function bottleStockReporter(i) {
for(var i = 99; i>0; i--) {
var bottleOrBottles = (i > 1) ? " bottles" : " bottle";
console.log(i + bottleOrBottles + " of root beer on the wall.");
}
}
bottleStockReporter(99);
``` |
2,509,833 | What is the probability that a 5-card poker hand has at least one pair? Note that this is the same as: probability of exactly one pair + probability of exactly two pairs + probability of exactly 3 of a kind + probability of exaclty 4 of a kind.
Let us study a reduced example to help us figure out how to tackle the pro... | 2017/11/07 | [
"https://math.stackexchange.com/questions/2509833",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/115703/"
] | You can use the compliment rule.
$P$(at least one pair) $=$ $1-P$(no pairs) $= 1-(\frac{52}{52} \cdot \frac{48}{51} \cdot \frac{44}{50} \cdot \frac{40}{49} \cdot \frac{36}{48}) = .493$
Where $\frac{52}{52}$ comes from selecting any of the $52$ cards, but then the next cannot be of that same rank, so there are only $... | Unless I'm missing something, in all of the simplified examples, you were picking two balls, but then you jumped to picking *five* cards. Suppose you pick four balls from (R1,R2,R3,R4,B1,B2,B3,B4). There are four different pairs you can make. There will be six other balls left, of which you need to choose two. So are t... |
68,641 | I am trying to create a single document library that links to documents in the same library in SharePoint 2010 Server. I've created a multi-value lookup column that references the same library to allow this behavior.
For simplicity, this document library has 2 fields: Item (text) and RelatedDocs (multiple value looku... | 2013/05/20 | [
"https://sharepoint.stackexchange.com/questions/68641",
"https://sharepoint.stackexchange.com",
"https://sharepoint.stackexchange.com/users/17113/"
] | I have met a similar requirement in the past with a term set. Allow users to set keywords on the documents and then show all documents with the keyword in the PageFieldValue. Note that this will only work with multi-value keywords if your CQWP selects from a single library - though you can use a single-value keyword fr... | Interesting challenge so here is how I would solve it. (I built this in SharePoint 2013 but used a 2010 workflow so hopefully it works for you)
Summary: Add the "Predecessors" column to the document library and use a workflow to automatically update the "Item Title" filed when documents are added to the library. The P... |
16,727,163 | I have rails app, which has muptiple engines `users`, `companies`, etc.
```
#main_app: /config/routes.rb
Rails.application.routes.draw do
mount RailsAdmin::Engine, at: 'admin', as: 'rails_admin'
mount Users::Engine, at: "users", as: "users"
mount Companies::Engine, at: "companies", as: "companies"
...
end
``... | 2013/05/24 | [
"https://Stackoverflow.com/questions/16727163",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1374563/"
] | You can't do this, because RailsAdmin.config clears the previous setup. As a workaround you can configure RailsAdmin for the all engines in main app. | `config.actions` in Rails Admin overrides all default actions. You have to define them all again in the configuration like this:
```
users_engine: /config/initializers/rails_admin.rb
RailsAdmin.config do |config|
config.actions do
# root actions
dashboard # mandatory
# collection act... |
9,192 | I'm doing some Machine Learning in R using the `nnet` package. I want to estimate the generalisation performance of my classifier by using k-fold cross-validation.
How should I go about doing this? Are there some built-in functions that do this for me? I've seen `tune.nnet()` in the `e1071` package, but I'm not sure t... | 2011/04/05 | [
"https://stats.stackexchange.com/questions/9192",
"https://stats.stackexchange.com",
"https://stats.stackexchange.com/users/261/"
] | If you are planning to tune the network (e.g. select a value for the learning rate) on your training data and determine the error generalization on that same data set, you need to use a nested cross validation, where in each fold, you are tuning the model on that 9/10 of the data set (using 10 fold cv). See this post w... | Implementing k-fold CV (with or without nesting) is relatively straightforward in R; and stratified sampling (wrt. class membership or subjects' characteristics, e.g. age or gender) is not that difficult.
About the way to assess one's classifier performance, you can directly look at the R code for the `tune()` functi... |
3,058 | In Paul Simon's album Graceland there is a song, "[All Around the World](https://genius.com/Paul-simon-all-around-the-world-or-the-myth-of-fingerprints-lyrics)". This song has a repeating theme in its verses, always some variation of:
>
> There was no doubt about it,
>
> It was the myth of fingerprints
>
>
>
T... | 2017/07/20 | [
"https://literature.stackexchange.com/questions/3058",
"https://literature.stackexchange.com",
"https://literature.stackexchange.com/users/186/"
] | The "myth of fingerprints" is that by focusing on trivial aspects of ourselves, we appear to be very different when in fact we have much more in common with one another. It's also a literal myth: [fingerprints are highly differential but they are not unique](http://www.telegraph.co.uk/science/2016/03/14/why-your-finger... | Paul Simon was in South Africa during 1985 and 1986. There was a boycott against South Africa because of apartheid. For South Africans, the word associations arising from ‘fingerprints’ are typically police, passbooks and apartheid. The Myth of Fingerprints immediately suggests a political song with an anti-apartheid t... |
74,113,084 | ```
fun birthdayGreeting(name: String): String {
val nameGreeting = "Happy Birthday, $name!"
val ageGreeting = "You are now 5 years old!"
return "$nameGreeting\n$ageGreeting"
}
No main method found in project.
```
Can someone explain how to solve this, I've just started taking this code labs. thanx in advance. | 2022/10/18 | [
"https://Stackoverflow.com/questions/74113084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/20273928/"
] | It is possible to define column list definition when using CTAS:
Sample data:
```
CREATE TABLE bank_raw(id INT, col TEXT);
INSERT INTO bank_raw(id, col) VALUES (1, 'a'), (2,'b');
```
Query:
```
CREATE OR REPLACE TABLE bank_raw(id INT,
col TEXT,
create... | Since this is a DML operation not a DDL operation, the default keyword does not apply. You can simply remove it and instead project the column and name it:
```
create or replace table bank_raw as
select
*,
current_timestamp() as created_at
from bank_raw;
```
Edit: To enforce a default, you cannot alter a t... |
40,086,423 | I am just learning javascript.I am pretty confused with manipulating multidimensional arrays.
```
var myarr = [
[ 7, 9, 10 ],
[ 6, 9 ],
[ 5, 9 ]
]
```
I want to insert zero like this.What is the smart way to do this in javascript
```
[
[ 7, 9, 10 ],
[ 6, 9, ... | 2016/10/17 | [
"https://Stackoverflow.com/questions/40086423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5947166/"
] | You could get first the max length of the inner arrays and push zeroes until all inner arrays have the same length.
```js
var myarr = [[7, 9, 10], [6, 9], [5, 9]],
length = myarr.reduce(function (r, a) { return Math.max(r, a.length); }, 0);
myarr.forEach(function (a) {
while (a.length < length) {
... | ```
var myarr = [
[ 7, 9, 10 ],
[ 6, 9 ],
[ 5, 9 ]
]
for(var i = 0; i < myarr.length; i++) {
if(myarr[i].length < myarr.length){
myarr[i].push(0);
}
}
console.log(myarr);
``` |
40,086,423 | I am just learning javascript.I am pretty confused with manipulating multidimensional arrays.
```
var myarr = [
[ 7, 9, 10 ],
[ 6, 9 ],
[ 5, 9 ]
]
```
I want to insert zero like this.What is the smart way to do this in javascript
```
[
[ 7, 9, 10 ],
[ 6, 9, ... | 2016/10/17 | [
"https://Stackoverflow.com/questions/40086423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5947166/"
] | You could get first the max length of the inner arrays and push zeroes until all inner arrays have the same length.
```js
var myarr = [[7, 9, 10], [6, 9], [5, 9]],
length = myarr.reduce(function (r, a) { return Math.max(r, a.length); }, 0);
myarr.forEach(function (a) {
while (a.length < length) {
... | ```
var maxLength=0;
for(var i=0;i<myarr.length;i++){
if(myarr[i].length>maxLength){
maxLength=myarr[i].length
}
}
for(var i=0;i<myarr.length;i++){
if(myarr[i].length!=maxLength){
fillZeros(myarr[i])
}
}
function fillZeros(child){
while(child.length!=maxLength)
{child.push(0);}
}
``` |
40,086,423 | I am just learning javascript.I am pretty confused with manipulating multidimensional arrays.
```
var myarr = [
[ 7, 9, 10 ],
[ 6, 9 ],
[ 5, 9 ]
]
```
I want to insert zero like this.What is the smart way to do this in javascript
```
[
[ 7, 9, 10 ],
[ 6, 9, ... | 2016/10/17 | [
"https://Stackoverflow.com/questions/40086423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5947166/"
] | You could get first the max length of the inner arrays and push zeroes until all inner arrays have the same length.
```js
var myarr = [[7, 9, 10], [6, 9], [5, 9]],
length = myarr.reduce(function (r, a) { return Math.max(r, a.length); }, 0);
myarr.forEach(function (a) {
while (a.length < length) {
... | using map function
```
var arr = [
[ 7, 9, 10 ],
[ 6, 9],
[ 5, 9]
]
var arr1 = arr.map(function(e){
var arr2 = [];
if(e.length < 3)
e.push(0);
arr2.push(e);
return arr2;
});
alert(arr1);
``` |
40,086,423 | I am just learning javascript.I am pretty confused with manipulating multidimensional arrays.
```
var myarr = [
[ 7, 9, 10 ],
[ 6, 9 ],
[ 5, 9 ]
]
```
I want to insert zero like this.What is the smart way to do this in javascript
```
[
[ 7, 9, 10 ],
[ 6, 9, ... | 2016/10/17 | [
"https://Stackoverflow.com/questions/40086423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5947166/"
] | Here is a solution.
```js
var myarr = [
[7, 9, 10],
[6, 9],
[5, 9]
];
var rows = myarr.length;
var cols = 0;
for (var i in myarr) {
if (myarr[i].length > cols)
cols = myarr[i].length;
}
for (i = 0; i < rows; i++) {
for (j = 0; j < cols; j++) {
if (myarr[i][j] == undefined)
myar... | using map function
```
var arr = [
[ 7, 9, 10 ],
[ 6, 9],
[ 5, 9]
]
var arr1 = arr.map(function(e){
var arr2 = [];
if(e.length < 3)
e.push(0);
arr2.push(e);
return arr2;
});
alert(arr1);
``` |
40,086,423 | I am just learning javascript.I am pretty confused with manipulating multidimensional arrays.
```
var myarr = [
[ 7, 9, 10 ],
[ 6, 9 ],
[ 5, 9 ]
]
```
I want to insert zero like this.What is the smart way to do this in javascript
```
[
[ 7, 9, 10 ],
[ 6, 9, ... | 2016/10/17 | [
"https://Stackoverflow.com/questions/40086423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5947166/"
] | You could get first the max length of the inner arrays and push zeroes until all inner arrays have the same length.
```js
var myarr = [[7, 9, 10], [6, 9], [5, 9]],
length = myarr.reduce(function (r, a) { return Math.max(r, a.length); }, 0);
myarr.forEach(function (a) {
while (a.length < length) {
... | If your array is a numbers only arbitrarily nested filled array, you could use a recursive function like I have here:
```
function fillArray(array, val){
for(var i=0; i<array.length; i++){
if(typeof(array[i]) === 'number'){
array[i] = val;
}else{
fillArray(array[i], val);
}
}
}... |
40,086,423 | I am just learning javascript.I am pretty confused with manipulating multidimensional arrays.
```
var myarr = [
[ 7, 9, 10 ],
[ 6, 9 ],
[ 5, 9 ]
]
```
I want to insert zero like this.What is the smart way to do this in javascript
```
[
[ 7, 9, 10 ],
[ 6, 9, ... | 2016/10/17 | [
"https://Stackoverflow.com/questions/40086423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5947166/"
] | You could get first the max length of the inner arrays and push zeroes until all inner arrays have the same length.
```js
var myarr = [[7, 9, 10], [6, 9], [5, 9]],
length = myarr.reduce(function (r, a) { return Math.max(r, a.length); }, 0);
myarr.forEach(function (a) {
while (a.length < length) {
... | Seems like you need a square matrix from a 2 dimension array, so try this:
```js
var myarr = [
[7, 9, 10],
[6, 9],
[5, 9, 1, 2, 3, 4, 5, 6, 7] // <--- for example purpose
];
var rows = myarr.length;
var cols = 0;
for(var i = 0; i < myarr.length; i++){
if(myarr[i].length > cols)
cols = myarr[i].l... |
40,086,423 | I am just learning javascript.I am pretty confused with manipulating multidimensional arrays.
```
var myarr = [
[ 7, 9, 10 ],
[ 6, 9 ],
[ 5, 9 ]
]
```
I want to insert zero like this.What is the smart way to do this in javascript
```
[
[ 7, 9, 10 ],
[ 6, 9, ... | 2016/10/17 | [
"https://Stackoverflow.com/questions/40086423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5947166/"
] | Seems like you need a square matrix from a 2 dimension array, so try this:
```js
var myarr = [
[7, 9, 10],
[6, 9],
[5, 9, 1, 2, 3, 4, 5, 6, 7] // <--- for example purpose
];
var rows = myarr.length;
var cols = 0;
for(var i = 0; i < myarr.length; i++){
if(myarr[i].length > cols)
cols = myarr[i].l... | using map function
```
var arr = [
[ 7, 9, 10 ],
[ 6, 9],
[ 5, 9]
]
var arr1 = arr.map(function(e){
var arr2 = [];
if(e.length < 3)
e.push(0);
arr2.push(e);
return arr2;
});
alert(arr1);
``` |
40,086,423 | I am just learning javascript.I am pretty confused with manipulating multidimensional arrays.
```
var myarr = [
[ 7, 9, 10 ],
[ 6, 9 ],
[ 5, 9 ]
]
```
I want to insert zero like this.What is the smart way to do this in javascript
```
[
[ 7, 9, 10 ],
[ 6, 9, ... | 2016/10/17 | [
"https://Stackoverflow.com/questions/40086423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5947166/"
] | ```
var maxLength=0;
for(var i=0;i<myarr.length;i++){
if(myarr[i].length>maxLength){
maxLength=myarr[i].length
}
}
for(var i=0;i<myarr.length;i++){
if(myarr[i].length!=maxLength){
fillZeros(myarr[i])
}
}
function fillZeros(child){
while(child.length!=maxLength)
{child.push(0);}
}
``` | using map function
```
var arr = [
[ 7, 9, 10 ],
[ 6, 9],
[ 5, 9]
]
var arr1 = arr.map(function(e){
var arr2 = [];
if(e.length < 3)
e.push(0);
arr2.push(e);
return arr2;
});
alert(arr1);
``` |
40,086,423 | I am just learning javascript.I am pretty confused with manipulating multidimensional arrays.
```
var myarr = [
[ 7, 9, 10 ],
[ 6, 9 ],
[ 5, 9 ]
]
```
I want to insert zero like this.What is the smart way to do this in javascript
```
[
[ 7, 9, 10 ],
[ 6, 9, ... | 2016/10/17 | [
"https://Stackoverflow.com/questions/40086423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5947166/"
] | You could get first the max length of the inner arrays and push zeroes until all inner arrays have the same length.
```js
var myarr = [[7, 9, 10], [6, 9], [5, 9]],
length = myarr.reduce(function (r, a) { return Math.max(r, a.length); }, 0);
myarr.forEach(function (a) {
while (a.length < length) {
... | Best way would be first to calculate what the longest sub-array length you have, then you can pad the sub-arrays to make them all up to the same length.
The following includes a function for calculating the longest length, and another for performing the padding:
```js
function getMax(arr) {
var max = 0;
for (va... |
40,086,423 | I am just learning javascript.I am pretty confused with manipulating multidimensional arrays.
```
var myarr = [
[ 7, 9, 10 ],
[ 6, 9 ],
[ 5, 9 ]
]
```
I want to insert zero like this.What is the smart way to do this in javascript
```
[
[ 7, 9, 10 ],
[ 6, 9, ... | 2016/10/17 | [
"https://Stackoverflow.com/questions/40086423",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5947166/"
] | If your array is a numbers only arbitrarily nested filled array, you could use a recursive function like I have here:
```
function fillArray(array, val){
for(var i=0; i<array.length; i++){
if(typeof(array[i]) === 'number'){
array[i] = val;
}else{
fillArray(array[i], val);
}
}
}... | using map function
```
var arr = [
[ 7, 9, 10 ],
[ 6, 9],
[ 5, 9]
]
var arr1 = arr.map(function(e){
var arr2 = [];
if(e.length < 3)
e.push(0);
arr2.push(e);
return arr2;
});
alert(arr1);
``` |
9,411,954 | Is it possible to send a mms and a email in a single button click event, if the button is clicked mms as well as email has to go, is it possible or not | 2012/02/23 | [
"https://Stackoverflow.com/questions/9411954",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1201450/"
] | For SMS:
```
String phoneNo = txtPhoneNo.getText().toString();
String message = txtMessage.getText().toString();
if (phoneNo.length()>0 && message.length()>0)
sendSMS(phoneNo, message);
else
... | Yes. Simply, call relevant tasks each other. In your AndroidManifest.xml file give the required permissions.
the pseudo code would be;
```
void MyButtonClick(View v){
startMMSTask(parameters);
startEmailTask(parameters);
}
``` |
52,991,630 | How would I go about summing the values of one column for all rows containing a name that is part of a target group, as well as a specific year which is in another column?
Example: I would like to sum the values of a, b, c for 2015 to make a new Category, "e", and to do the same for 2016.
```
Year Category Value
2015... | 2018/10/25 | [
"https://Stackoverflow.com/questions/52991630",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9848600/"
] | I found the solution.
To hint NHibernate to use the proper UserType use: `MappedAs` extension method, like so:
```
using(var session = _factory.OpenSession()) {
var q = session.Query<SomeEntity>()
.Where(s => s.IpAddressField.InetEquals(
IPAddress.Parse("4.3.2.1").MappedAs(NHibernateUti... | The year is 2019 and I'm still stuck on version **3.3.2.GA of NHibernate** and the `MappedAs` extension method exists only on version **4.x** onwards.
My scenario was the need to pass a large string as a parameter to a supported method in an `HqlGeneratorForMethod`.
I created the following class to store any large st... |
3,321,913 | Goal here is to merge multiple arrays which are already sorted into a resultant array.
I've written the following solution and wondering if there is a way to improve the solution
```
/*
Goal is to merge all sorted arrays
*/
void mergeAll(const vector< vector<int> >& listOfIntegers, vector<int>& result)
{
in... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3321913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/373215/"
] | All you need is two pointers (or just int index counters), checking for minimum between array A and B, copying the value over to the resultant list, and incrementing the pointer of the array the minimum came from. If you run out of elements on one source array, copy the remainder of the second to the resultant and you'... | You could just stick them all into a multiset. That will handle the sorting for you. |
3,321,913 | Goal here is to merge multiple arrays which are already sorted into a resultant array.
I've written the following solution and wondering if there is a way to improve the solution
```
/*
Goal is to merge all sorted arrays
*/
void mergeAll(const vector< vector<int> >& listOfIntegers, vector<int>& result)
{
in... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3321913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/373215/"
] | If you want to take advantage of multi-threading then a fairly good solution would be to just merge 2 lists at a time.
ie suppose you have 9 lists.
merge list 0 with 1.
merge list 2 with 3.
merge list 4 with 5.
merge list 6 with 7.
These can be performed concurrently.
Then:
merge list 0&1 with 2&3
merge list 4&5 w... | If you are merging *very many* vector together, then you could speed up performance by using a sort of tree to determine which vector contains the smallest element. This is probably not necessary for your application, but comment if it is and I'll try to work it out. |
3,321,913 | Goal here is to merge multiple arrays which are already sorted into a resultant array.
I've written the following solution and wondering if there is a way to improve the solution
```
/*
Goal is to merge all sorted arrays
*/
void mergeAll(const vector< vector<int> >& listOfIntegers, vector<int>& result)
{
in... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3321913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/373215/"
] | I've seen some solution on the internet to merge two sorted arrays, but most of them were quite cumbersome. I changed some of the logic to provide the shortest version I can come up with:
```
void merge(const int list1[], int size1, const int list2[], int size2, int list3[]) {
// Declaration & Initialization
... | All you need is two pointers (or just int index counters), checking for minimum between array A and B, copying the value over to the resultant list, and incrementing the pointer of the array the minimum came from. If you run out of elements on one source array, copy the remainder of the second to the resultant and you'... |
3,321,913 | Goal here is to merge multiple arrays which are already sorted into a resultant array.
I've written the following solution and wondering if there is a way to improve the solution
```
/*
Goal is to merge all sorted arrays
*/
void mergeAll(const vector< vector<int> >& listOfIntegers, vector<int>& result)
{
in... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3321913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/373215/"
] | You can generalize Merge Sort algorithm and work with multiple pointers. Initially, all of them are pointing to the beginning of each array. You maintain these pointers sorted (by the values they point to) in a priority queue. In each step, you remove the smallest element in the heap in `O(log n)` (n is the number of a... | If you want to take advantage of multi-threading then a fairly good solution would be to just merge 2 lists at a time.
ie suppose you have 9 lists.
merge list 0 with 1.
merge list 2 with 3.
merge list 4 with 5.
merge list 6 with 7.
These can be performed concurrently.
Then:
merge list 0&1 with 2&3
merge list 4&5 w... |
3,321,913 | Goal here is to merge multiple arrays which are already sorted into a resultant array.
I've written the following solution and wondering if there is a way to improve the solution
```
/*
Goal is to merge all sorted arrays
*/
void mergeAll(const vector< vector<int> >& listOfIntegers, vector<int>& result)
{
in... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3321913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/373215/"
] | If you want to take advantage of multi-threading then a fairly good solution would be to just merge 2 lists at a time.
ie suppose you have 9 lists.
merge list 0 with 1.
merge list 2 with 3.
merge list 4 with 5.
merge list 6 with 7.
These can be performed concurrently.
Then:
merge list 0&1 with 2&3
merge list 4&5 w... | You could just stick them all into a multiset. That will handle the sorting for you. |
3,321,913 | Goal here is to merge multiple arrays which are already sorted into a resultant array.
I've written the following solution and wondering if there is a way to improve the solution
```
/*
Goal is to merge all sorted arrays
*/
void mergeAll(const vector< vector<int> >& listOfIntegers, vector<int>& result)
{
in... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3321913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/373215/"
] | Perhaps I'm misunderstanding the question...and I feel like I'm misunderstanding your solution.
That said, maybe this answer is totally off-base and not helpful.
But, especially with the number of `vector`s and `push_back`'s you're already using, why do you not just use `std::sort`?
```
#include <algorithm>
void mer... | If you are merging *very many* vector together, then you could speed up performance by using a sort of tree to determine which vector contains the smallest element. This is probably not necessary for your application, but comment if it is and I'll try to work it out. |
3,321,913 | Goal here is to merge multiple arrays which are already sorted into a resultant array.
I've written the following solution and wondering if there is a way to improve the solution
```
/*
Goal is to merge all sorted arrays
*/
void mergeAll(const vector< vector<int> >& listOfIntegers, vector<int>& result)
{
in... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3321913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/373215/"
] | You can generalize Merge Sort algorithm and work with multiple pointers. Initially, all of them are pointing to the beginning of each array. You maintain these pointers sorted (by the values they point to) in a priority queue. In each step, you remove the smallest element in the heap in `O(log n)` (n is the number of a... | You could just stick them all into a multiset. That will handle the sorting for you. |
3,321,913 | Goal here is to merge multiple arrays which are already sorted into a resultant array.
I've written the following solution and wondering if there is a way to improve the solution
```
/*
Goal is to merge all sorted arrays
*/
void mergeAll(const vector< vector<int> >& listOfIntegers, vector<int>& result)
{
in... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3321913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/373215/"
] | You can generalize Merge Sort algorithm and work with multiple pointers. Initially, all of them are pointing to the beginning of each array. You maintain these pointers sorted (by the values they point to) in a priority queue. In each step, you remove the smallest element in the heap in `O(log n)` (n is the number of a... | Consider the priority-queue implementation in this answer linked in a comment above: [Merging 8 sorted lists in c++, which algorithm should I use](https://stackoverflow.com/questions/886178/merging-8-sorted-lists-in-c-which-algorithm-should-i-use/886203#886203)
It's O(n lg m) time (where n = total number of items and ... |
3,321,913 | Goal here is to merge multiple arrays which are already sorted into a resultant array.
I've written the following solution and wondering if there is a way to improve the solution
```
/*
Goal is to merge all sorted arrays
*/
void mergeAll(const vector< vector<int> >& listOfIntegers, vector<int>& result)
{
in... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3321913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/373215/"
] | Perhaps I'm misunderstanding the question...and I feel like I'm misunderstanding your solution.
That said, maybe this answer is totally off-base and not helpful.
But, especially with the number of `vector`s and `push_back`'s you're already using, why do you not just use `std::sort`?
```
#include <algorithm>
void mer... | All you need is two pointers (or just int index counters), checking for minimum between array A and B, copying the value over to the resultant list, and incrementing the pointer of the array the minimum came from. If you run out of elements on one source array, copy the remainder of the second to the resultant and you'... |
3,321,913 | Goal here is to merge multiple arrays which are already sorted into a resultant array.
I've written the following solution and wondering if there is a way to improve the solution
```
/*
Goal is to merge all sorted arrays
*/
void mergeAll(const vector< vector<int> >& listOfIntegers, vector<int>& result)
{
in... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3321913",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/373215/"
] | All you need is two pointers (or just int index counters), checking for minimum between array A and B, copying the value over to the resultant list, and incrementing the pointer of the array the minimum came from. If you run out of elements on one source array, copy the remainder of the second to the resultant and you'... | If you are merging *very many* vector together, then you could speed up performance by using a sort of tree to determine which vector contains the smallest element. This is probably not necessary for your application, but comment if it is and I'll try to work it out. |
42,584,880 | We have a ReactNative app that uses redux, redux-persist and a HeadlessJS task. This task needs to have access to the store. As the task fires without booting the entire app (and so has no access by default), we thought we could simply create the store inside the task as well so that it would be rehydrated by redux-per... | 2017/03/03 | [
"https://Stackoverflow.com/questions/42584880",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7654795/"
] | For people looking for solution. I have found the solution in here.
The idea is to bind the store to async method.
<https://github.com/react-native-kit/react-native-track-player/issues/63>
Copy pasting the solution here.
```
// index
const store = ...
....registerHeadlessTask('TrackPlayer', () => require('event-han... | >
> simply create the store inside the task as well so that it would be rehydrated by redux-persist.
>
>
>
This did indeed happen.
You created two stores (not advisable with redux) which were both hydrate, but not linked, as there is no such thing as linked redux stores.
Every time you run createStore, it's a new... |
124,085 | I have been working in a research position in a DOE lab in the United States for the past year or so, and my mentor wrote me letters of recommendation for my graduate school application. I have been, to put it bluntly, worse at my job recently than I had been when he wrote the letter, and I would quite like to leave so... | 2019/01/31 | [
"https://academia.stackexchange.com/questions/124085",
"https://academia.stackexchange.com",
"https://academia.stackexchange.com/users/103786/"
] | Anything is possible, of course, but (warning - opinion coming), I think it would be very unlikely. First, I doubt that your mentor would do that, though I don't know the person so can't be definitive. I would not, anyway. Second, if you have been accepted (and told them you are coming) you have at least an informal co... | >
> Is this a real possibility?
>
>
>
I can only speak for myself, but I would have to be VERY angry before I would take the time and do something as drastic as this. At worst, I can imagine someone rescinding their letter without sending an update, but even that would be far beyond something I would consider doi... |
156,413 | Suppose I'm playing a character that has a flying speed (such as a [Variant (Winged) Tiefling](https://www.dndbeyond.com/races/tiefling#VariantTiefling) or an [Aarakocra](https://www.dndbeyond.com/races/aarakocra)) and get critically hit. The DM rolls on the [Lingering Injuries table](https://www.dndbeyond.com/sources/... | 2019/09/17 | [
"https://rpg.stackexchange.com/questions/156413",
"https://rpg.stackexchange.com",
"https://rpg.stackexchange.com/users/55869/"
] | The rules simply didn't take the flying case into account. You'll notice there is no reference in any of the entries in the table to losing a wing instead of an arm. I think it was simply written before these flying races became playable.
The highlighted text makes perfect sense if you are restricted to using your leg... | By Rules As Written, Probably.
==============================
Out of context, the sentence is unambiguous: *You fall prone after using the Dash action.* Done.
By Rules As Interpreted, Probably Not.
======================================
In context, the sentence derives from the title and preceding sentence about mov... |
37,791,241 | I'm editing the css for a module of prestashop but all the changes I set don't appear on my site. I tried to delete the CSS stylesheet to be sure i was working on the right CSS and all the properties were gone, so I tried to comment one by one all the strings to find out the problem but when I uploaded it the propertie... | 2016/06/13 | [
"https://Stackoverflow.com/questions/37791241",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5950740/"
] | All ecommerce shops are heavily cached so try disabling it.
>
> Prestashop version 1.4 and above caches data using Smarty. Cached data
> is stored in the following folders:
>
>
> /tools/smarty/cache
>
>
> /tools/smarty/compile
>
>
> /tools/smarty\_v2/cache
>
>
> /tools/smarty\_v2/compile
>
>
> all of which... | ```
#footer #newsletter_block_left .form-group .button-small {
color: #999999;
font-size: 17px;
border: 0;
background: transparent;
position: initial;
right: 0px;
top: 0px;
padding: 8px 10px;
}
```
This is exactly what I am seeing here on my browser so what you are experiencing is most likely... |
4,312,554 | I'm trying to use $.ajax to send some values to a php page which then sends an email,
I can't figure out how to get the values from $.ajax in my php file,
any help would be appreciated,
```
$(function() {
$('form#email input[type=image]').click(function() {
var name = $('form#email #name').val();
var enq = ... | 2010/11/30 | [
"https://Stackoverflow.com/questions/4312554",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/149738/"
] | You're checking for a variable you're not submitting, `submit_x`, you'll need to remove that outer `if` check. Also, it's better to let jQuery serialize your strings properly (what if there's a `&` in there?) like this:
```
$(function() {
$('#email input[type=image]').click(function() {
$.ajax({
type:'PO... | try sending 'submit\_x' to php :) |
4,312,554 | I'm trying to use $.ajax to send some values to a php page which then sends an email,
I can't figure out how to get the values from $.ajax in my php file,
any help would be appreciated,
```
$(function() {
$('form#email input[type=image]').click(function() {
var name = $('form#email #name').val();
var enq = ... | 2010/11/30 | [
"https://Stackoverflow.com/questions/4312554",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/149738/"
] | You're checking for a variable you're not submitting, `submit_x`, you'll need to remove that outer `if` check. Also, it's better to let jQuery serialize your strings properly (what if there's a `&` in there?) like this:
```
$(function() {
$('#email input[type=image]').click(function() {
$.ajax({
type:'PO... | You can use a data map to define your data:
```
var name = $('form#email #name').val();
var enq = $('form#email #enq').val();
$.ajax({
type: 'POST',
url: 'email.php',
dataType: 'html',
data: {
submit_x : 1,
name : name,
enq : enq
},
success: function(html){
$('... |
4,312,554 | I'm trying to use $.ajax to send some values to a php page which then sends an email,
I can't figure out how to get the values from $.ajax in my php file,
any help would be appreciated,
```
$(function() {
$('form#email input[type=image]').click(function() {
var name = $('form#email #name').val();
var enq = ... | 2010/11/30 | [
"https://Stackoverflow.com/questions/4312554",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/149738/"
] | try sending 'submit\_x' to php :) | You can use a data map to define your data:
```
var name = $('form#email #name').val();
var enq = $('form#email #enq').val();
$.ajax({
type: 'POST',
url: 'email.php',
dataType: 'html',
data: {
submit_x : 1,
name : name,
enq : enq
},
success: function(html){
$('... |
6,040,458 | I want to present a user with a form if he has not filled it out previously on login but redirect him to the homepage if he has filled in information previously.
How do i accomplish this?
Here's my view:
```
def makinginfo(request):
form = SongForm(request.POST or None)
songprofile = SongProfile.objects.get... | 2011/05/18 | [
"https://Stackoverflow.com/questions/6040458",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/547841/"
] | I'm assuming there is only one SongProfile object per user.
```
try:
songprofile = SongProfile.objects.get(user=request.user)
# Render song/show.html
except SongProfile.DoesNotExist:
if form.is_valid():
# Process post
# Render song/create.html
```
To create a new SongProfile object with the So... | You can, indeed, do a `try/catch` as Tim demonstrated and that will work. If you find that you are, in some cases, beginning to filter more fields or that you want a sensible default, you can do as the docs suggest and use the `get_or_create()` method, like so:
```
sp, created = SongProfile.objects.get_or_create(user=... |
38,906,344 | I'm not sure how to create an algorithm for a specific problem in my code, so I created this puzzle
* There are 3 cookie monsters.
* Each monster has a bag with a random number of cookies from 0 to a finite number (let's say 100).
* There are many different types of cookies, but we don't know how many (we can find out... | 2016/08/11 | [
"https://Stackoverflow.com/questions/38906344",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/412252/"
] | I find your question interesting, so I gave it a shot by creating this algorithm:
In words
========
1. For each monster, create an Array containing all cookie types in their bag (remove duplicates).
2. For each monster, count their choices (flavors available).
3. Take the monster with the smallest number of options.
... | This problem is called "A System of Distinct Representatives" and there are a few theorems about them and at least a couple of published algorithms for solving it. You may find [Hall's Marriage Theorem](http://en.wikipedia.org/wiki/Hall%27s_marriage_theorem) interesting. To summarize it in context:
>
> If, and only i... |
84,594 | I want to find the peak amplitude of an audio signal in a given frequency area.
My problem is that if the signal has a strong resonating frequency between 2 fft bins, then both bins are way below the actual amp.
I wrote this example python code, which:
1. Generates a sine with amp 1 at a frequency, which perfectly... | 2022/09/18 | [
"https://dsp.stackexchange.com/questions/84594",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/64503/"
] | You're experiencing the phenomenon called **spectral leakage**. There are plenty of questions/answers on this subject on this website. You can search for *spectral leakage* in the search bar (most recent: [Hilmar's answer to a similar question](https://dsp.stackexchange.com/a/84546/63763)).
Increase your fft size by z... | Zero padding in the time domain is a simple and effective way to interpolate between the existing frequency samples. This can be done directly in the fft command in python as follows:
```
fft.fft(wfm, m)
```
Where $m$ is the total length including that added zeros. The resulting fft will have m total samples as an i... |
84,594 | I want to find the peak amplitude of an audio signal in a given frequency area.
My problem is that if the signal has a strong resonating frequency between 2 fft bins, then both bins are way below the actual amp.
I wrote this example python code, which:
1. Generates a sine with amp 1 at a frequency, which perfectly... | 2022/09/18 | [
"https://dsp.stackexchange.com/questions/84594",
"https://dsp.stackexchange.com",
"https://dsp.stackexchange.com/users/64503/"
] | I would recommend multiplying the input to the FFT by a good window and zero-padding to double the length.. Perhaps a good Kaiser with $\beta \approx 6$ or $7$.
Perhaps a better window for this would be a Gaussian window with $\sigma \approx \frac{N}{10}$ with $N$ being the length of the FFT. Make $N$ good and large s... | Zero padding in the time domain is a simple and effective way to interpolate between the existing frequency samples. This can be done directly in the fft command in python as follows:
```
fft.fft(wfm, m)
```
Where $m$ is the total length including that added zeros. The resulting fft will have m total samples as an i... |
60,332,662 | I am using node-thermal-printer package from github ( <https://github.com/Klemen1337/node-thermal-printer> ) in order to print on Esc-pos printer.
When I try to print, I get error :
Unhandled Rejection (TypeError): Net.connect is not a function
I searched a lot and there was only one unanswered question like mine her... | 2020/02/21 | [
"https://Stackoverflow.com/questions/60332662",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5016608/"
] | It seems that this package is not designed to use from browser.
<https://github.com/Klemen1337/node-thermal-printer/issues/142> | This is not an escpos question. Please be more precise when categorizing your questions. |
60,332,662 | I am using node-thermal-printer package from github ( <https://github.com/Klemen1337/node-thermal-printer> ) in order to print on Esc-pos printer.
When I try to print, I get error :
Unhandled Rejection (TypeError): Net.connect is not a function
I searched a lot and there was only one unanswered question like mine her... | 2020/02/21 | [
"https://Stackoverflow.com/questions/60332662",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5016608/"
] | You can create a local middleware service in node using express that calls ThermalPrinter
```
const express = require('express')
const bodyParser = require('body-parser');
const cors = require('cors');
const ThermalPrinter = require("node-thermal-printer").printer;
const Types = require("node-thermal-printer").types;
... | This is not an escpos question. Please be more precise when categorizing your questions. |
43,986,327 | I am trying to determine why TypeScript allows you to overload the return type of a function to the type 'any' from a more specific type when implementing an interface.
In my case I am working in Angular and am injecting the implemented class.
My environment:
Visual Studio 2017
Angular Version 1.5.5
TypeScript V... | 2017/05/15 | [
"https://Stackoverflow.com/questions/43986327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5559484/"
] | I'm not an expert on Typescript but based on my understanding of `any`:
<https://www.typescriptlang.org/docs/handbook/basic-types.html>
We find this comment on that page:
"We want to opt-out of type-checking and let the values pass through compile-time checks."
So I'm guessing when the compilers sees `any`, it say... | As i see it there are two places that you could expect TypeScript compiler to fail. BarService returning any and Whatever class assigning return value from thing() function to myString.
The compiler doesn't fail when you return any in your BarService because in TypeScript you can use any as a substitude for any/all Ty... |
43,986,327 | I am trying to determine why TypeScript allows you to overload the return type of a function to the type 'any' from a more specific type when implementing an interface.
In my case I am working in Angular and am injecting the implemented class.
My environment:
Visual Studio 2017
Angular Version 1.5.5
TypeScript V... | 2017/05/15 | [
"https://Stackoverflow.com/questions/43986327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5559484/"
] | Here is what I have put together.
From <https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#3.1>:
>
> All types in TypeScript are subtypes of a single top type called the
> Any type. The any keyword references this type. The Any type is the
> one type that can represent any JavaScript value with no co... | As i see it there are two places that you could expect TypeScript compiler to fail. BarService returning any and Whatever class assigning return value from thing() function to myString.
The compiler doesn't fail when you return any in your BarService because in TypeScript you can use any as a substitude for any/all Ty... |
12,123,280 | Im working in a maven project. Atm I only have entities , mappings and a configuration files. Im trying to test my hibernate mappings with junit.
I cant find the problem. I can validate the xml files in netbeans, but when i run my test I get the following error.
**Validation in netbeans:**
```
XML validation started... | 2012/08/25 | [
"https://Stackoverflow.com/questions/12123280",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1568420/"
] | With Hibernate 4.x you should use the same DTD as 3.x:
```
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>... | You forgot to specify DTD.
Try keeping below code in both the xml files and let me know
```
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
``` |
12,123,280 | Im working in a maven project. Atm I only have entities , mappings and a configuration files. Im trying to test my hibernate mappings with junit.
I cant find the problem. I can validate the xml files in netbeans, but when i run my test I get the following error.
**Validation in netbeans:**
```
XML validation started... | 2012/08/25 | [
"https://Stackoverflow.com/questions/12123280",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1568420/"
] | You forgot to specify DTD.
Try keeping below code in both the xml files and let me know
```
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
``` | your forgot DTD in hibernate.cfg.xml file |
12,123,280 | Im working in a maven project. Atm I only have entities , mappings and a configuration files. Im trying to test my hibernate mappings with junit.
I cant find the problem. I can validate the xml files in netbeans, but when i run my test I get the following error.
**Validation in netbeans:**
```
XML validation started... | 2012/08/25 | [
"https://Stackoverflow.com/questions/12123280",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1568420/"
] | With Hibernate 4.x you should use the same DTD as 3.x:
```
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>... | your forgot DTD in hibernate.cfg.xml file |
6,831,848 | Has anyone been able to get p8 / table\_builder <https://github.com/p8/table_builder> gem to work for Rails 3.1?
I don't get any output at all. No error message, no content. Is it just me or does it not work?
Cheers | 2011/07/26 | [
"https://Stackoverflow.com/questions/6831848",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/258099/"
] | When calling the helper, you need to do so with <%= %>, not like <% %> (the documentation example)
In my case I had to update like this :
```
<% calendar_for ... %>
<% calendar.day ... %>
```
to :
```
<%= calendar_for ... %>
<%= calendar.day ... %>
``` | If your view file is just getting re-rendered you should kill your rails server and start a new instance of rails server. |
6,831,848 | Has anyone been able to get p8 / table\_builder <https://github.com/p8/table_builder> gem to work for Rails 3.1?
I don't get any output at all. No error message, no content. Is it just me or does it not work?
Cheers | 2011/07/26 | [
"https://Stackoverflow.com/questions/6831848",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/258099/"
] | When calling the helper, you need to do so with <%= %>, not like <% %> (the documentation example)
In my case I had to update like this :
```
<% calendar_for ... %>
<% calendar.day ... %>
```
to :
```
<%= calendar_for ... %>
<%= calendar.day ... %>
``` | The solution I found was to choose a different repository:
```
gem 'table_builder', '0.0.3', :git => 'git://github.com/jchunky/table_builder.git'
``` |
6,831,848 | Has anyone been able to get p8 / table\_builder <https://github.com/p8/table_builder> gem to work for Rails 3.1?
I don't get any output at all. No error message, no content. Is it just me or does it not work?
Cheers | 2011/07/26 | [
"https://Stackoverflow.com/questions/6831848",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/258099/"
] | The solution I found was to choose a different repository:
```
gem 'table_builder', '0.0.3', :git => 'git://github.com/jchunky/table_builder.git'
``` | If your view file is just getting re-rendered you should kill your rails server and start a new instance of rails server. |
54,369,129 | How to have conditionals in a PowerShell `switch` statement? This code below returns `0` when it should return `1000`.
```
$UsedSpaceMB = 8500
switch ($UsedSpaceMB) {
($UsedSpaceMB -gt 15000) { $FreeSpace = 2000 }
($UsedSpaceMB -in 8000..15000 ) { $FreeSpace = 1000 }
($UsedSpaceMB -in 1700..8000 ) { $Free... | 2019/01/25 | [
"https://Stackoverflow.com/questions/54369129",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/38211/"
] | The syntax is incorrect for a switch.
Please see [here](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_switch) for the documentation.
```
$UsedSpaceMB = 8500
switch ($UsedSpaceMB) {
{$_ -gt 15000} { $FreeSpace = 2000 }
{$_ -in 8000..15000 } { $FreeSpace = 1000 }
... | or you could use -contains
```
switch ($UsedSpaceMB) {
{$_ -gt 15000} { $FreeSpace = 2000 }
{8000..15000 -contains $_ } { $FreeSpace =1000 }
{1700..8000 -contains $_} { $FreeSpace = 500 }
{1000..1700 -contains $_ } { $FreeSpace = 200 }
{800..1000 -contains $_ } { $FreeSpace = 100 }
{$_ -lt 800 ... |
15,445,206 | I'm writing a JRPG style game at the moment, and am defining my items/enemies etc. in YAML files. Rather than load them at runtime (which is proving to be a pain in Scala, especially on Android) I decided to pre-compile them into a Scala object as lazy values.
My only worry is that eventually, as these values are acce... | 2013/03/16 | [
"https://Stackoverflow.com/questions/15445206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1457538/"
] | There is no such mechanism. Once a `lazy val` is accessed and its initializer is evaluated, the resulting value is held in a field of the instance of which it is a part like any other and only that instance becoming garbage itself will relinquish the reference to that "lazy" value and (possibly) allow it to be reclaime... | I think that there's no built-in mechanism for it, so you'll need to implement it yourself. The simplest solution would be to have some form of a cache with expiry after certain time passes - for example, as described in [Java time-based map/cache with expiring keys](https://stackoverflow.com/questions/3802370/java-tim... |
15,445,206 | I'm writing a JRPG style game at the moment, and am defining my items/enemies etc. in YAML files. Rather than load them at runtime (which is proving to be a pain in Scala, especially on Android) I decided to pre-compile them into a Scala object as lazy values.
My only worry is that eventually, as these values are acce... | 2013/03/16 | [
"https://Stackoverflow.com/questions/15445206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1457538/"
] | There is no such mechanism. Once a `lazy val` is accessed and its initializer is evaluated, the resulting value is held in a field of the instance of which it is a part like any other and only that instance becoming garbage itself will relinquish the reference to that "lazy" value and (possibly) allow it to be reclaime... | It depends if you have - let's call them "weak values" - for different types or weak values of one type but many objects involved. If you have the latter I'd go with the solution by Rogach using the map/cache.
However if you have the first - different classes or maybe a few big objects - one approach is surely to use ... |
15,445,206 | I'm writing a JRPG style game at the moment, and am defining my items/enemies etc. in YAML files. Rather than load them at runtime (which is proving to be a pain in Scala, especially on Android) I decided to pre-compile them into a Scala object as lazy values.
My only worry is that eventually, as these values are acce... | 2013/03/16 | [
"https://Stackoverflow.com/questions/15445206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1457538/"
] | I find soft (not weak) references very handy for this. Weak references get eaten every GC they're not needed, which can waste a lot of effort if they're repeatedly accessed. Soft references are only eaten when there's memory pressure (which formally may be every GC but at least the JVM can exercise a bit of discretion)... | There is no such mechanism. Once a `lazy val` is accessed and its initializer is evaluated, the resulting value is held in a field of the instance of which it is a part like any other and only that instance becoming garbage itself will relinquish the reference to that "lazy" value and (possibly) allow it to be reclaime... |
15,445,206 | I'm writing a JRPG style game at the moment, and am defining my items/enemies etc. in YAML files. Rather than load them at runtime (which is proving to be a pain in Scala, especially on Android) I decided to pre-compile them into a Scala object as lazy values.
My only worry is that eventually, as these values are acce... | 2013/03/16 | [
"https://Stackoverflow.com/questions/15445206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1457538/"
] | There is no such mechanism. Once a `lazy val` is accessed and its initializer is evaluated, the resulting value is held in a field of the instance of which it is a part like any other and only that instance becoming garbage itself will relinquish the reference to that "lazy" value and (possibly) allow it to be reclaime... | By using the code generation approach you will always have at least one copy of the objects in the form of code to contruct the object, and possibly another in the objects themselves. The code to construct the data is probably using more memory than the actual objects.
I suggest you ignore this memory management probl... |
15,445,206 | I'm writing a JRPG style game at the moment, and am defining my items/enemies etc. in YAML files. Rather than load them at runtime (which is proving to be a pain in Scala, especially on Android) I decided to pre-compile them into a Scala object as lazy values.
My only worry is that eventually, as these values are acce... | 2013/03/16 | [
"https://Stackoverflow.com/questions/15445206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1457538/"
] | I find soft (not weak) references very handy for this. Weak references get eaten every GC they're not needed, which can waste a lot of effort if they're repeatedly accessed. Soft references are only eaten when there's memory pressure (which formally may be every GC but at least the JVM can exercise a bit of discretion)... | I think that there's no built-in mechanism for it, so you'll need to implement it yourself. The simplest solution would be to have some form of a cache with expiry after certain time passes - for example, as described in [Java time-based map/cache with expiring keys](https://stackoverflow.com/questions/3802370/java-tim... |
15,445,206 | I'm writing a JRPG style game at the moment, and am defining my items/enemies etc. in YAML files. Rather than load them at runtime (which is proving to be a pain in Scala, especially on Android) I decided to pre-compile them into a Scala object as lazy values.
My only worry is that eventually, as these values are acce... | 2013/03/16 | [
"https://Stackoverflow.com/questions/15445206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1457538/"
] | I find soft (not weak) references very handy for this. Weak references get eaten every GC they're not needed, which can waste a lot of effort if they're repeatedly accessed. Soft references are only eaten when there's memory pressure (which formally may be every GC but at least the JVM can exercise a bit of discretion)... | It depends if you have - let's call them "weak values" - for different types or weak values of one type but many objects involved. If you have the latter I'd go with the solution by Rogach using the map/cache.
However if you have the first - different classes or maybe a few big objects - one approach is surely to use ... |
15,445,206 | I'm writing a JRPG style game at the moment, and am defining my items/enemies etc. in YAML files. Rather than load them at runtime (which is proving to be a pain in Scala, especially on Android) I decided to pre-compile them into a Scala object as lazy values.
My only worry is that eventually, as these values are acce... | 2013/03/16 | [
"https://Stackoverflow.com/questions/15445206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1457538/"
] | I find soft (not weak) references very handy for this. Weak references get eaten every GC they're not needed, which can waste a lot of effort if they're repeatedly accessed. Soft references are only eaten when there's memory pressure (which formally may be every GC but at least the JVM can exercise a bit of discretion)... | By using the code generation approach you will always have at least one copy of the objects in the form of code to contruct the object, and possibly another in the objects themselves. The code to construct the data is probably using more memory than the actual objects.
I suggest you ignore this memory management probl... |
235,882 | I have a directory on my server at
/home/dave/www/images/site (ext3)
which I want to mount directly to my Windows computer so that I can transfer data easily via command line tool. Is that something possible? | 2011/01/20 | [
"https://superuser.com/questions/235882",
"https://superuser.com",
"https://superuser.com/users/63319/"
] | If the server is located within your "local" network (i.e: not across the internet) it might actually be considerably less hassle to set up a SMB (i.e.: Windows) share on the Linux server and let your Windows box access it in that manner.
Depending on your server configuration, if may already have the necessary softwa... | Check out these links on using Samba:
[Install Samba Server on Ubuntu](http://www.howtogeek.com/howto/ubuntu/install-samba-server-on-ubuntu/)
[Configuring SAMBA](https://help.ubuntu.com/6.06/ubuntu/serverguide/C/configuring-samba.html)
[The Unofficial Samba HOWTO](http://www.oregontechsupport.com/samba/) |
235,882 | I have a directory on my server at
/home/dave/www/images/site (ext3)
which I want to mount directly to my Windows computer so that I can transfer data easily via command line tool. Is that something possible? | 2011/01/20 | [
"https://superuser.com/questions/235882",
"https://superuser.com",
"https://superuser.com/users/63319/"
] | If the server is located within your "local" network (i.e: not across the internet) it might actually be considerably less hassle to set up a SMB (i.e.: Windows) share on the Linux server and let your Windows box access it in that manner.
Depending on your server configuration, if may already have the necessary softwa... | Another approach would be scp/sftp. If you have an SSH server running on the Linux machine you can use scp/sftp tools to transfer files (such as putty - <http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html>):
```
C:\> pscp image.gif dave@linuxhost:www/images/site
``` |
235,882 | I have a directory on my server at
/home/dave/www/images/site (ext3)
which I want to mount directly to my Windows computer so that I can transfer data easily via command line tool. Is that something possible? | 2011/01/20 | [
"https://superuser.com/questions/235882",
"https://superuser.com",
"https://superuser.com/users/63319/"
] | If the server is local, you may want to look into creating Samba shares, which will behave exactly like a standard Windows share if configured correctly.
FTP and SCP also come to mind. If this server will be reached across the internet, I would highly recommend SCP.
[WinSCP](http://winscp.net/eng/docs/commandline) ha... | If the server is located within your "local" network (i.e: not across the internet) it might actually be considerably less hassle to set up a SMB (i.e.: Windows) share on the Linux server and let your Windows box access it in that manner.
Depending on your server configuration, if may already have the necessary softwa... |
235,882 | I have a directory on my server at
/home/dave/www/images/site (ext3)
which I want to mount directly to my Windows computer so that I can transfer data easily via command line tool. Is that something possible? | 2011/01/20 | [
"https://superuser.com/questions/235882",
"https://superuser.com",
"https://superuser.com/users/63319/"
] | If the server is local, you may want to look into creating Samba shares, which will behave exactly like a standard Windows share if configured correctly.
FTP and SCP also come to mind. If this server will be reached across the internet, I would highly recommend SCP.
[WinSCP](http://winscp.net/eng/docs/commandline) ha... | Check out these links on using Samba:
[Install Samba Server on Ubuntu](http://www.howtogeek.com/howto/ubuntu/install-samba-server-on-ubuntu/)
[Configuring SAMBA](https://help.ubuntu.com/6.06/ubuntu/serverguide/C/configuring-samba.html)
[The Unofficial Samba HOWTO](http://www.oregontechsupport.com/samba/) |
235,882 | I have a directory on my server at
/home/dave/www/images/site (ext3)
which I want to mount directly to my Windows computer so that I can transfer data easily via command line tool. Is that something possible? | 2011/01/20 | [
"https://superuser.com/questions/235882",
"https://superuser.com",
"https://superuser.com/users/63319/"
] | If the server is local, you may want to look into creating Samba shares, which will behave exactly like a standard Windows share if configured correctly.
FTP and SCP also come to mind. If this server will be reached across the internet, I would highly recommend SCP.
[WinSCP](http://winscp.net/eng/docs/commandline) ha... | Another approach would be scp/sftp. If you have an SSH server running on the Linux machine you can use scp/sftp tools to transfer files (such as putty - <http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html>):
```
C:\> pscp image.gif dave@linuxhost:www/images/site
``` |
448,713 | In QM and assuming you could repeat the same exact bond-breaking experiment arbitrary number of times, do bonds always break at the same stretch length, or does the uncertainty principle require some variability in the stretch length at which the atoms debond? | 2018/12/16 | [
"https://physics.stackexchange.com/questions/448713",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/128404/"
] | A direct answer to this question is not simple. The main difficulty is related to the formal definition of what a chemical bond is.
The most useful definitions of bond in the case of molecules and condensed matter either rely on the introduction of molecular orbitals, analyzing the role played by orbitals and their e... | The way quantum mechanics sees molecular bonding is the existence of a bound state (By the states I mean the energy eigenstates for the electrons in the potential provided by the protons ) which has energy lesser than the bound states in the constituent atoms. The potential between two atoms is usually modelled using m... |
3,415,993 | >
> **Possible Duplicate:**
>
> [`-': nil can’t be coerced into Fixnum (TypeError)](https://stackoverflow.com/questions/3407016/nil-cant-be-coerced-into-fixnum-typeerror)
>
>
>
Does anyone know how come guest.arrived can be nil?! This is a small part of my checkout method I have in my program. The error point... | 2010/08/05 | [
"https://Stackoverflow.com/questions/3415993",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/408705/"
] | You already asked this *exact same* question yesterday and the answer is still the *exact same* answer: the problem is that the `arrived` method of `guest` returns `nil` and unless you actually *show* the code of that method, there is nothing anyone can do about it. | Your problem is that `guest.arrived` is returning nil.
* If `guest` was the `nil`, then you'd have an error on line 90 saying
```
NoMethodError: undefined method `departure=' for nil:NilClass
```
* If `departureDate` was `nil` then you'd get an error on line 91 saying
```
NoMethodError: undefined method `-' for nil... |
29,993,615 | I am in the process of submitting my first Ionic application to the store. However I am receiving an error every single time that I try to submit my binary to the store:
**Invalid Signature** - A sealed resource is missing or invalid. The binary at path [Who Paid Last?.app/Who Paid Last?] contains an invalid signature... | 2015/05/01 | [
"https://Stackoverflow.com/questions/29993615",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2438309/"
] | The issue had to do with the name of my app. The name of my application is Who Paid Last?, and come to find out, the "?" in the name is what was causing the issue. As soon as I removed it, the app was submitted just fine with out any issues. | I had a similar issue, but my error message was "Invalid Signature. Code object is not signed at all. The binary at path [myApp.app/www/js/02\_jshint.js] contains an invalid signature...."
Deleting the #!/usr/bin/env directive from the top of my 02\_jshint.js file, then building the iOS version of your project from th... |
909,745 | **Summary**
The first line of shell-mode has an extra `bash-3.2$` prompt before my custom `dotfiles (master)$` prompt.
I tried writing `PROMPT_COMMAND=''` in my `~/.bashrc` according to an earlier [Stack Overflow](https://superuser.com/questions/31533/how-do-i-fix-my-prompt-in-emacs-shell-mode) post, but `bash-3.2$` ... | 2015/05/04 | [
"https://superuser.com/questions/909745",
"https://superuser.com",
"https://superuser.com/users/5142/"
] | August 2019 Windows 7 update caused this problem. This solution worked for me so I thought I would share:
1. Boot from a Clean Win 7 ISO.
2. Goto repair this PC and then go to the Command Prompt.
3. Type this to revert the changes:
```
dism.exe /image:c:\ /cleanup-image /revertpendingactions
``` | This is what worked for me: Perform `bootrec.exe /fixmbr` `bootrec.exe /fixboot` and `bootrec.exe /rebuildbcd` in that order from a windows 7 DVD or USB. Is a guide to help you make a USB windows 7 iso. <http://www.techverse.net/how-to-create-a-bootable-usb-pen-drive-for-windows-7/> |
909,745 | **Summary**
The first line of shell-mode has an extra `bash-3.2$` prompt before my custom `dotfiles (master)$` prompt.
I tried writing `PROMPT_COMMAND=''` in my `~/.bashrc` according to an earlier [Stack Overflow](https://superuser.com/questions/31533/how-do-i-fix-my-prompt-in-emacs-shell-mode) post, but `bash-3.2$` ... | 2015/05/04 | [
"https://superuser.com/questions/909745",
"https://superuser.com",
"https://superuser.com/users/5142/"
] | August 2019 Windows 7 update caused this problem. This solution worked for me so I thought I would share:
1. Boot from a Clean Win 7 ISO.
2. Goto repair this PC and then go to the Command Prompt.
3. Type this to revert the changes:
```
dism.exe /image:c:\ /cleanup-image /revertpendingactions
``` | I found these instructions on the [Microsoft forum](http://answers.microsoft.com/en-us/windows/forum/windows8_1-windows_install/total-identified-windows-installations-0/52359f87-de4a-41dc-b0c3-cc275e1d9fbf), which were posted by ***Vijay B***. I've formatted them in a way that makes more sense to me. *Since you've alre... |
9,084,552 | I have a requirement to produce PDF's for one my .Net web applications currently hosted on Appharbor.
Traditionally, I would simply install latex on the machine, and create PDF's on the fly with pdflatex. This requirement is to display sections in HTML to end users, but also have a downloadable PDF - so it's slightly ... | 2012/01/31 | [
"https://Stackoverflow.com/questions/9084552",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/892397/"
] | I'd recommend using something like [DocRaptor](http://docraptor.com/). Note that you can probably continue with your current scheme if you place the relevant pdflatex executable (and it doesn't require the entire Latex runtime) alongside the code you push to AppHarbor. AppHarbor will also be introducing [background wor... | Note that if you're trying to use Rotativa or using wkhtmltopdf with routes obtained from HttpContext you'll need to use this workaround:
<http://support.appharbor.com/kb/getting-started/workaround-for-generating-absolute-urls-without-port-number>
or install the premotion fix from Nuget:
<https://github.com/trilobyt... |
204,438 | So, I got a fancy new computer and I'd like to move adobe flash's saved data from computer a to computer b.
Side note: computer a is win 7 64 bit, and computer b is ubuntu 64 bit. However, I may fall back to win 7 so answering with the generic process of backing up and restoring the saved data is great. | 2010/10/28 | [
"https://superuser.com/questions/204438",
"https://superuser.com",
"https://superuser.com/users/4612/"
] | You are asking how to transfer flash cookies from one PC to another. That's answered in a previous SuperUser question: [Folder location of Flash cookies on Windows Vista](https://superuser.com/questions/31457/what-folder-contains-flash-cookies-on-vista). Just copy the contents of the appropriate folder from one PC to t... | If you're asking for what I think you're asking for, cached Flash files downloaded from the web, you'll want to look through your cache directory for `*.swf` files, and move those to wherever Machine B expects to find them.
I could, however, be misunderstanding the question ... |
32,251,067 | I have code like below because I would like to delete all rows which contain "Something" value but when I start it, it does not delete every row just some, I have click 5 times to delete every row, how to implement macro which will be deleted all rows which contain "Something" by one click ? Thanks in advance
```
Dim ... | 2015/08/27 | [
"https://Stackoverflow.com/questions/32251067",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5226510/"
] | If all the values are in column A, say, then:
```
Worksheets("Something").Activate
With ActiveSheet
Dim LastRow as Long
LastRow = .Cells(.Rows.Count,1).end(xlUp).Row
Dim i As Long
For i = LastRow to 1 Step -1
If .Cells(i,1).Value = "Something" Then
.Rows(i).Delete
End If
... | The `xlTextValues` is for the optional *value* parameter of the [Range.SpecialCells method](https://msdn.microsoft.com/en-us/library/office/ff196157.aspx), not the primary *Type* where you have it.
You will need to choose between `xlCellTypeConstants` and `xlCellTypeFormulas` with `xlTextValues` as the option. If you ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.