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 |
|---|---|---|---|---|---|
40,142,675 | The method I am using takes two sorted lists and returns a single list containing all of the elements in the two original lists, in sorted order.
For example, if the original lists are (1, 4, 5) and (2, 3, 6) then the result list would be (1, 2, 3, 4, 5, 6).
Is there something I am missing?
```
public static<E ext... | 2016/10/19 | [
"https://Stackoverflow.com/questions/40142675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5900887/"
] | In order to perform a merge, you need to peek at the next value, so see which next value to use.
Eventually, one of the lists will run out of values before the other, so you need to check for that.
One trick is to use `null` as an End-Of-Data marker, assuming that lists cannot contain `null` values, which is a fair a... | If you are willing to use a library, the cleanest solution would be to use Collection-utils4 and *IteratorUtils.collatedIterator()*.
You need to provide a *Comparator* in order to pick the right element. |
40,142,675 | The method I am using takes two sorted lists and returns a single list containing all of the elements in the two original lists, in sorted order.
For example, if the original lists are (1, 4, 5) and (2, 3, 6) then the result list would be (1, 2, 3, 4, 5, 6).
Is there something I am missing?
```
public static<E ext... | 2016/10/19 | [
"https://Stackoverflow.com/questions/40142675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5900887/"
] | I'm going to assume you intended something like this with your use of `PushbackIterator`:
```
while (aIter.hasNext() && bIter.hasNext()) {
E aElem = aIter.next();
E bElem = bIter.next();
if (aElem.compareTo(bElem) <= 0) {
result.add(aElem);
bIter.pushback(bElem);
} else {
result... | Same approach of merging 2 arrays can also be used with iterators tweaking a little bit. you can use adding elements instead of printing if needed.
```
static void printItr(Iterator<String> it1, Iterator<String> it2) {
String firstString=null,secondString = null;
boolean moveAheadIt1 = true, moveAheadIt2 = tru... |
40,142,675 | The method I am using takes two sorted lists and returns a single list containing all of the elements in the two original lists, in sorted order.
For example, if the original lists are (1, 4, 5) and (2, 3, 6) then the result list would be (1, 2, 3, 4, 5, 6).
Is there something I am missing?
```
public static<E ext... | 2016/10/19 | [
"https://Stackoverflow.com/questions/40142675",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5900887/"
] | I'm going to assume you intended something like this with your use of `PushbackIterator`:
```
while (aIter.hasNext() && bIter.hasNext()) {
E aElem = aIter.next();
E bElem = bIter.next();
if (aElem.compareTo(bElem) <= 0) {
result.add(aElem);
bIter.pushback(bElem);
} else {
result... | If you are willing to use a library, the cleanest solution would be to use Collection-utils4 and *IteratorUtils.collatedIterator()*.
You need to provide a *Comparator* in order to pick the right element. |
44,691,438 | I was trying to restore jenkins on a new machine by tacking up backup from old machine . I replaced the jenkins home directory of new machine from old one. When i launch jenkins it gives me this error.
```
Caused: java.io.IOException: Unable to read /var/lib/jenkins/config.xml
```
There is also
```
Caused: hudson... | 2017/06/22 | [
"https://Stackoverflow.com/questions/44691438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2991413/"
] | This usually happens when the plugin providing the authorization strategy is not installed or enabled.
Make sure the `matrix-auth` plugin is installed and that it's not disabled (no `matrix-auth.jpi.disabled` file (or similar) in `$JENKINS_HOME/plugins/`). | It can happen if a newer version of a plugin is incompatible with older version of Jenkins. It's recommended to upgrade Jenkins to latest version.
This is how I do it:
```
ssh jenkins "cd /tmp; wget https://updates.jenkins-ci.org/latest/jenkins.war"
ssh jenkins "cp /usr/share/jenkins/jenkins.war /tmp/jenkins.war.prev... |
44,691,438 | I was trying to restore jenkins on a new machine by tacking up backup from old machine . I replaced the jenkins home directory of new machine from old one. When i launch jenkins it gives me this error.
```
Caused: java.io.IOException: Unable to read /var/lib/jenkins/config.xml
```
There is also
```
Caused: hudson... | 2017/06/22 | [
"https://Stackoverflow.com/questions/44691438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2991413/"
] | This usually happens when the plugin providing the authorization strategy is not installed or enabled.
Make sure the `matrix-auth` plugin is installed and that it's not disabled (no `matrix-auth.jpi.disabled` file (or similar) in `$JENKINS_HOME/plugins/`). | usually, this error ours when there is a mismatch between Jenkins Version and Plugins version.
Best solution is always to keep updated Jenkins and plugin or installed appropriate versions of jenkins according to the Jenkins version.
For centos, Redhat, amazon Linux follow the below steps.
```
sudo rpm --import https... |
44,691,438 | I was trying to restore jenkins on a new machine by tacking up backup from old machine . I replaced the jenkins home directory of new machine from old one. When i launch jenkins it gives me this error.
```
Caused: java.io.IOException: Unable to read /var/lib/jenkins/config.xml
```
There is also
```
Caused: hudson... | 2017/06/22 | [
"https://Stackoverflow.com/questions/44691438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2991413/"
] | This usually happens when the plugin providing the authorization strategy is not installed or enabled.
Make sure the `matrix-auth` plugin is installed and that it's not disabled (no `matrix-auth.jpi.disabled` file (or similar) in `$JENKINS_HOME/plugins/`). | If you cannot even log in because of this error, you can disable security in jenkins config file /config.xml.
Search for `<useSecurity>true</useSecurity>` and change the value to `false`. Then restart jenkins from command line and you should be able to login and make change to plugin/auth configurations as suggested in... |
44,691,438 | I was trying to restore jenkins on a new machine by tacking up backup from old machine . I replaced the jenkins home directory of new machine from old one. When i launch jenkins it gives me this error.
```
Caused: java.io.IOException: Unable to read /var/lib/jenkins/config.xml
```
There is also
```
Caused: hudson... | 2017/06/22 | [
"https://Stackoverflow.com/questions/44691438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2991413/"
] | It can happen if a newer version of a plugin is incompatible with older version of Jenkins. It's recommended to upgrade Jenkins to latest version.
This is how I do it:
```
ssh jenkins "cd /tmp; wget https://updates.jenkins-ci.org/latest/jenkins.war"
ssh jenkins "cp /usr/share/jenkins/jenkins.war /tmp/jenkins.war.prev... | usually, this error ours when there is a mismatch between Jenkins Version and Plugins version.
Best solution is always to keep updated Jenkins and plugin or installed appropriate versions of jenkins according to the Jenkins version.
For centos, Redhat, amazon Linux follow the below steps.
```
sudo rpm --import https... |
44,691,438 | I was trying to restore jenkins on a new machine by tacking up backup from old machine . I replaced the jenkins home directory of new machine from old one. When i launch jenkins it gives me this error.
```
Caused: java.io.IOException: Unable to read /var/lib/jenkins/config.xml
```
There is also
```
Caused: hudson... | 2017/06/22 | [
"https://Stackoverflow.com/questions/44691438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2991413/"
] | If you cannot even log in because of this error, you can disable security in jenkins config file /config.xml.
Search for `<useSecurity>true</useSecurity>` and change the value to `false`. Then restart jenkins from command line and you should be able to login and make change to plugin/auth configurations as suggested in... | usually, this error ours when there is a mismatch between Jenkins Version and Plugins version.
Best solution is always to keep updated Jenkins and plugin or installed appropriate versions of jenkins according to the Jenkins version.
For centos, Redhat, amazon Linux follow the below steps.
```
sudo rpm --import https... |
52,205,476 | **Now Playing Activity**
```js
public class NowPlayingActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_nowplaying);
// The buttons on the screen
ImageB... | 2018/09/06 | [
"https://Stackoverflow.com/questions/52205476",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10256304/"
] | Installing @types/moment as a dev dependency solved it for me. | try to install Moment.js:
npm i moment |
20,764,375 | I have 2 videos. Each 7 seconds long. I need the top video to fadeout after it is halfway done playing, revealing the bottom video for 3.5 seconds, then fading back in, in an infinite loop.
I am unable to get the video to fade and not sure how to make it start at a specific time. This is what I have:
JS
```
<script t... | 2013/12/24 | [
"https://Stackoverflow.com/questions/20764375",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2482256/"
] | to track the time in the video and make decisions based on that, you'll want to track the `timeupdate` event on the video, and then use the `currentTime` property to decide what to do.
This fragment will allow you to swap one video out at the 2.5s mark, play the second for 3.5s then swap back to the first ... you can ... | ```
<div>Iteration: <span id="iteration"></span></div>
<video id="video-background" autoplay="" muted="" controls>
<source src="https://res.cloudinary.com/video/upload/ac_none,q_60/bgvid.mp4" type="video/mp4">
</video><div>Iteration: <span id="iteration"></span></div>
var iterations = 1;
var flag = false;
... |
237,697 | In my [previous question](https://worldbuilding.stackexchange.com/questions/234454/i-designed-a-maglev-space-propulsion-tube-on-mt-everest-do-you-see-any-issues), I was discussing about the possibility of using a mass-driver on Mt. Everest, to propel payloads to space, and reduce the amount of fuel needed (RIP bulky ro... | 2022/11/06 | [
"https://worldbuilding.stackexchange.com/questions/237697",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/97694/"
] | Impossibility 1: Ring magnets as depicted
-----------------------------------------
All magnetic fields need to be closed curves. The ring magnet as depicted would require a magnetic source at the very center of the ring, which is forbidden.
The problem can be alleviated by placing many magnets on the outside in the ... | >
> Is this design more better for propelling payloads/passengers to space? If no, then what flaws do I have to fix?
>
>
>
**Two Big Flaws**
1. How does it stay up?
2. How come it's so fast?
You claim the graphite stilts will support the track no problem. How are they so dang strong? I feel safe to assume that n... |
237,697 | In my [previous question](https://worldbuilding.stackexchange.com/questions/234454/i-designed-a-maglev-space-propulsion-tube-on-mt-everest-do-you-see-any-issues), I was discussing about the possibility of using a mass-driver on Mt. Everest, to propel payloads to space, and reduce the amount of fuel needed (RIP bulky ro... | 2022/11/06 | [
"https://worldbuilding.stackexchange.com/questions/237697",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/97694/"
] | Impossibility 1: Ring magnets as depicted
-----------------------------------------
All magnetic fields need to be closed curves. The ring magnet as depicted would require a magnetic source at the very center of the ring, which is forbidden.
The problem can be alleviated by placing many magnets on the outside in the ... | Ditch Everest. Switch to Chimborazo in Ecuador. Two reasons:
1. Because it is closer to the equator, it's peak is actually farther from the center of the Earth.
2. Because it is closer to the equator, you get more of a boost from rotation of the Earth. Everest at 29.59 degrees North loses almost 14% of the rotational ... |
237,697 | In my [previous question](https://worldbuilding.stackexchange.com/questions/234454/i-designed-a-maglev-space-propulsion-tube-on-mt-everest-do-you-see-any-issues), I was discussing about the possibility of using a mass-driver on Mt. Everest, to propel payloads to space, and reduce the amount of fuel needed (RIP bulky ro... | 2022/11/06 | [
"https://worldbuilding.stackexchange.com/questions/237697",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/97694/"
] | Though I don't see any reference to it in this question or your previous one, you should probably read about [StarTram](https://en.wikipedia.org/wiki/StarTram), because it was a project that considers many of the same things you're looking at. The StarTram authors used to have all their interesting stuff available for ... | >
> Is this design more better for propelling payloads/passengers to space? If no, then what flaws do I have to fix?
>
>
>
**Two Big Flaws**
1. How does it stay up?
2. How come it's so fast?
You claim the graphite stilts will support the track no problem. How are they so dang strong? I feel safe to assume that n... |
237,697 | In my [previous question](https://worldbuilding.stackexchange.com/questions/234454/i-designed-a-maglev-space-propulsion-tube-on-mt-everest-do-you-see-any-issues), I was discussing about the possibility of using a mass-driver on Mt. Everest, to propel payloads to space, and reduce the amount of fuel needed (RIP bulky ro... | 2022/11/06 | [
"https://worldbuilding.stackexchange.com/questions/237697",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/97694/"
] | >
> Is this design more better for propelling payloads/passengers to space? If no, then what flaws do I have to fix?
>
>
>
**Two Big Flaws**
1. How does it stay up?
2. How come it's so fast?
You claim the graphite stilts will support the track no problem. How are they so dang strong? I feel safe to assume that n... | Ditch Everest. Switch to Chimborazo in Ecuador. Two reasons:
1. Because it is closer to the equator, it's peak is actually farther from the center of the Earth.
2. Because it is closer to the equator, you get more of a boost from rotation of the Earth. Everest at 29.59 degrees North loses almost 14% of the rotational ... |
237,697 | In my [previous question](https://worldbuilding.stackexchange.com/questions/234454/i-designed-a-maglev-space-propulsion-tube-on-mt-everest-do-you-see-any-issues), I was discussing about the possibility of using a mass-driver on Mt. Everest, to propel payloads to space, and reduce the amount of fuel needed (RIP bulky ro... | 2022/11/06 | [
"https://worldbuilding.stackexchange.com/questions/237697",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/97694/"
] | Though I don't see any reference to it in this question or your previous one, you should probably read about [StarTram](https://en.wikipedia.org/wiki/StarTram), because it was a project that considers many of the same things you're looking at. The StarTram authors used to have all their interesting stuff available for ... | Ditch Everest. Switch to Chimborazo in Ecuador. Two reasons:
1. Because it is closer to the equator, it's peak is actually farther from the center of the Earth.
2. Because it is closer to the equator, you get more of a boost from rotation of the Earth. Everest at 29.59 degrees North loses almost 14% of the rotational ... |
72,630,214 | I have this laravel project, but due the specific version of it's dependencies it need php 8 to run, but I need it to run with php 7.4, is there a way so that we can downgrade the dependencies?
```
....
"require": {
"php": "^8.0.2",
"barryvdh/laravel-debugbar": "^3.6",
"fruitcake/lara... | 2022/06/15 | [
"https://Stackoverflow.com/questions/72630214",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7995302/"
] | Laravel 9 [works only](https://github.com/laravel/framework/blob/9.x/composer.json) on PHP 8, so you can't, unless you are up to downgrading Laravel version too. But installing newer PHP will be faster. | I recently did the same to one of my projects, so I did it like so
1. Backup your project (just C/P it so you have a reserve if something goes wrong);
2. Change the dependencies you need;
3. Delete the vendor folder;
4. I also deleted the `composer.lock` but I think you can actually skip this step;
5. Run `composer in... |
72,630,214 | I have this laravel project, but due the specific version of it's dependencies it need php 8 to run, but I need it to run with php 7.4, is there a way so that we can downgrade the dependencies?
```
....
"require": {
"php": "^8.0.2",
"barryvdh/laravel-debugbar": "^3.6",
"fruitcake/lara... | 2022/06/15 | [
"https://Stackoverflow.com/questions/72630214",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7995302/"
] | Laravel 9 works on > php8 so you can't downgrade php version to 7.4
[laravel support policy](https://laravel.com/docs/9.x/releases#support-policy) | I recently did the same to one of my projects, so I did it like so
1. Backup your project (just C/P it so you have a reserve if something goes wrong);
2. Change the dependencies you need;
3. Delete the vendor folder;
4. I also deleted the `composer.lock` but I think you can actually skip this step;
5. Run `composer in... |
279,607 | I've encountered the following notation several times (for example, when discussing Noether's Theorem):
$$\frac{\partial L}{\partial(\partial\_\mu \phi)}$$
And it's not immediately clear to me what this operator $\frac{\partial}{\partial(\partial\_\mu \phi)}$ refers to. Based on the answer to [this question](https://ph... | 2016/09/11 | [
"https://physics.stackexchange.com/questions/279607",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/52072/"
] | In field theory usually you have a Lagrangian density function of fields and first derivative of fields or
$$\mathscr{L}(\phi,\partial\_\mu\phi).$$ It is well know that higher derivative of field than first are in some way problematic (Hamiltonian not bounded from below). Field equations follow from Euler-Lagrange equa... | This article is a useful start.
<https://en.wikipedia.org/wiki/Matrix_calculus>
So throughout the discussions with the kind folks here I think that I've sorted out my confusion, although there wasn't any particular answer that did it. Here I'll analyze my confusion over this notation in case anyone comes to this threa... |
251,179 | How do I let a few specified non-subscriber email addresses post to an otherwise closed GNU Mailman mailing list? | 2011/03/24 | [
"https://serverfault.com/questions/251179",
"https://serverfault.com",
"https://serverfault.com/users/10813/"
] | I finally figured out how to do this!
Go to the list's Privacy Options, click on Sender Filters, then add the emails to the option called `accept_these_nonmembers`. | I'm not familiar with Mailman itself, but an external workaround would be to give them a dummy address to send to that will auto-forward to the list on their behalf. The dummy account can be a 'Subscriber", and restrict incoming mail to only accept from your desired contributors. |
23,374,985 | I'm using Susy 2 with breakpoint-sass to create my media queries.
It's outputting like:
```
@media (min-width: 1000px)
```
I'm wondering why the screen is missing? It should read:
```
@media screen (min-width: 1000px)
```
I'm trying to add css3-mediaqueries-js which isn't working and I think that might be why. | 2014/04/29 | [
"https://Stackoverflow.com/questions/23374985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/823239/"
] | If you want to use `HashSet`, you can override `hashCode` and `equals` to exclusively look at those two members.
Hash code: (`31` is just a prime popularly used for hashing in Java)
```
return 31*id_a + id_b;
```
Equals: (to which you'll obviously need to add `instanceof` checks and type conversion)
```
return id_... | See this, Here I override the equals() and hashcode() to ensure uniqueness on "name" field of a Person object
```
public class SetObjectEquals {
Person p1 = new Person("harley");
Person p2 = new Person("harley");
public void method1() {
Set<Person> set = new HashSet<Person>();
set.add(p1);... |
23,374,985 | I'm using Susy 2 with breakpoint-sass to create my media queries.
It's outputting like:
```
@media (min-width: 1000px)
```
I'm wondering why the screen is missing? It should read:
```
@media screen (min-width: 1000px)
```
I'm trying to add css3-mediaqueries-js which isn't working and I think that might be why. | 2014/04/29 | [
"https://Stackoverflow.com/questions/23374985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/823239/"
] | Not sure this is any more efficient or less kludgy. You could keep the original hashcode/equals using the main id (as per your comment) and then create a wrapper that has a hashcode/equals for the composite ida, idb. Maybe over the top for what you need though.
CompositeIdEntity.java
```
public interface CompositeIdE... | See this, Here I override the equals() and hashcode() to ensure uniqueness on "name" field of a Person object
```
public class SetObjectEquals {
Person p1 = new Person("harley");
Person p2 = new Person("harley");
public void method1() {
Set<Person> set = new HashSet<Person>();
set.add(p1);... |
23,374,985 | I'm using Susy 2 with breakpoint-sass to create my media queries.
It's outputting like:
```
@media (min-width: 1000px)
```
I'm wondering why the screen is missing? It should read:
```
@media screen (min-width: 1000px)
```
I'm trying to add css3-mediaqueries-js which isn't working and I think that might be why. | 2014/04/29 | [
"https://Stackoverflow.com/questions/23374985",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/823239/"
] | If you want to use `HashSet`, you can override `hashCode` and `equals` to exclusively look at those two members.
Hash code: (`31` is just a prime popularly used for hashing in Java)
```
return 31*id_a + id_b;
```
Equals: (to which you'll obviously need to add `instanceof` checks and type conversion)
```
return id_... | Not sure this is any more efficient or less kludgy. You could keep the original hashcode/equals using the main id (as per your comment) and then create a wrapper that has a hashcode/equals for the composite ida, idb. Maybe over the top for what you need though.
CompositeIdEntity.java
```
public interface CompositeIdE... |
49,929,034 | Trying to figure out this error. I am attempting to call on an API, and map the JSON data from the API call to a CurrencyModel. No issues with that, but when I am calling on a method that returns an observable (as it is waiting for two other API calls), it's throwing the following error to the provider property:
>
> ... | 2018/04/19 | [
"https://Stackoverflow.com/questions/49929034",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4008500/"
] | if you use the `elif` construct, it will be tested only when the previous condition was false, so in the end only one of the code blocks will run.
```
if some_condition:
# code
elif another_condition:
# code
elif yet_another_condition:
# code
else:
# code
``` | Create a list of sequences and messages, like below, activate a boolean flag if found and test only one for each sequence.
Look below.
For coloring and font choice, try to output results as HTML, for instance. You can get your results in a browser.
```
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 19 16:45:55 2... |
49,929,034 | Trying to figure out this error. I am attempting to call on an API, and map the JSON data from the API call to a CurrencyModel. No issues with that, but when I am calling on a method that returns an observable (as it is waiting for two other API calls), it's throwing the following error to the provider property:
>
> ... | 2018/04/19 | [
"https://Stackoverflow.com/questions/49929034",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4008500/"
] | You can't have multiple `if` statements and just one `else` block and have them work together. Each `if` part starts a separate, indepdendent statement, so the first `if` is one statement, and then `if...else` is another statement, independent from the first. It doesn't matter what happened in the first `if`, the secon... | Create a list of sequences and messages, like below, activate a boolean flag if found and test only one for each sequence.
Look below.
For coloring and font choice, try to output results as HTML, for instance. You can get your results in a browser.
```
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 19 16:45:55 2... |
2,185,846 | I just uploaded my application in the market, but I'm not able to purchase it (it's a pay app).
I saw [here](http://market.android.com/support/bin/answer.py?hl=en&answer=141659) that it seems to be *made by design*, but then why the error message is `Server Error try again` ?
Is there a way to bypass that ? | 2010/02/02 | [
"https://Stackoverflow.com/questions/2185846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/231417/"
] | Do you have an Android Developer Phone? If so, you can't purchase your own app by design. Since ADPs are unlocked, there's nothing preventing an ADP from easily pirating any app it downloads, so they are purposely cut off from downloading paid apps. | Yeah, I ran into the same problem. I uninstalled the APK from my phone so that I could download it from the market. It works fine for my free apps but not my paid apps. I guess there is no need for QA and the customer to use the same process lol |
2,185,846 | I just uploaded my application in the market, but I'm not able to purchase it (it's a pay app).
I saw [here](http://market.android.com/support/bin/answer.py?hl=en&answer=141659) that it seems to be *made by design*, but then why the error message is `Server Error try again` ?
Is there a way to bypass that ? | 2010/02/02 | [
"https://Stackoverflow.com/questions/2185846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/231417/"
] | Do you have an Android Developer Phone? If so, you can't purchase your own app by design. Since ADPs are unlocked, there's nothing preventing an ADP from easily pirating any app it downloads, so they are purposely cut off from downloading paid apps. | Yes, the Google account associated with your market seller account cannot purchase it's own apps.
Personally I think this is a mistake on Google's part. I found some issues I couldn't solve until I had a market downloaded copy of my app - for some reason the debug version worked with the license service all the time,... |
2,185,846 | I just uploaded my application in the market, but I'm not able to purchase it (it's a pay app).
I saw [here](http://market.android.com/support/bin/answer.py?hl=en&answer=141659) that it seems to be *made by design*, but then why the error message is `Server Error try again` ?
Is there a way to bypass that ? | 2010/02/02 | [
"https://Stackoverflow.com/questions/2185846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/231417/"
] | 'Please note that it is against Google Checkout's policies to purchase your own application. You will receive an error message when you try to purchase your own application.'
Doesn't look like it. Why are you wanting to buy your own app? | Yeah, I ran into the same problem. I uninstalled the APK from my phone so that I could download it from the market. It works fine for my free apps but not my paid apps. I guess there is no need for QA and the customer to use the same process lol |
2,185,846 | I just uploaded my application in the market, but I'm not able to purchase it (it's a pay app).
I saw [here](http://market.android.com/support/bin/answer.py?hl=en&answer=141659) that it seems to be *made by design*, but then why the error message is `Server Error try again` ?
Is there a way to bypass that ? | 2010/02/02 | [
"https://Stackoverflow.com/questions/2185846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/231417/"
] | 'Please note that it is against Google Checkout's policies to purchase your own application. You will receive an error message when you try to purchase your own application.'
Doesn't look like it. Why are you wanting to buy your own app? | Yes, the Google account associated with your market seller account cannot purchase it's own apps.
Personally I think this is a mistake on Google's part. I found some issues I couldn't solve until I had a market downloaded copy of my app - for some reason the debug version worked with the license service all the time,... |
2,185,846 | I just uploaded my application in the market, but I'm not able to purchase it (it's a pay app).
I saw [here](http://market.android.com/support/bin/answer.py?hl=en&answer=141659) that it seems to be *made by design*, but then why the error message is `Server Error try again` ?
Is there a way to bypass that ? | 2010/02/02 | [
"https://Stackoverflow.com/questions/2185846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/231417/"
] | Yes, the Google account associated with your market seller account cannot purchase it's own apps.
Personally I think this is a mistake on Google's part. I found some issues I couldn't solve until I had a market downloaded copy of my app - for some reason the debug version worked with the license service all the time,... | Yeah, I ran into the same problem. I uninstalled the APK from my phone so that I could download it from the market. It works fine for my free apps but not my paid apps. I guess there is no need for QA and the customer to use the same process lol |
2,185,846 | I just uploaded my application in the market, but I'm not able to purchase it (it's a pay app).
I saw [here](http://market.android.com/support/bin/answer.py?hl=en&answer=141659) that it seems to be *made by design*, but then why the error message is `Server Error try again` ?
Is there a way to bypass that ? | 2010/02/02 | [
"https://Stackoverflow.com/questions/2185846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/231417/"
] | There's definitely validity in trying to buy your own app, simply for the licensing service.
I tried to do the same thing, and received the same error on the server. My purpose for buying my own app is that even when I install the signed .apk file on my phone, the Licensing Verification Library that I use to check Lic... | Yeah, I ran into the same problem. I uninstalled the APK from my phone so that I could download it from the market. It works fine for my free apps but not my paid apps. I guess there is no need for QA and the customer to use the same process lol |
2,185,846 | I just uploaded my application in the market, but I'm not able to purchase it (it's a pay app).
I saw [here](http://market.android.com/support/bin/answer.py?hl=en&answer=141659) that it seems to be *made by design*, but then why the error message is `Server Error try again` ?
Is there a way to bypass that ? | 2010/02/02 | [
"https://Stackoverflow.com/questions/2185846",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/231417/"
] | There's definitely validity in trying to buy your own app, simply for the licensing service.
I tried to do the same thing, and received the same error on the server. My purpose for buying my own app is that even when I install the signed .apk file on my phone, the Licensing Verification Library that I use to check Lic... | Yes, the Google account associated with your market seller account cannot purchase it's own apps.
Personally I think this is a mistake on Google's part. I found some issues I couldn't solve until I had a market downloaded copy of my app - for some reason the debug version worked with the license service all the time,... |
50,046,938 | I'm working with places, and I need to get the latitude and longitude of my location. I successfully got it like this
```
mLatLang = placeLikelihood.getPlace().getLatLng();
```
where mLatLang is `LatLng mLatLang;`
Now, the output of this line is
```
(-31.54254542,62.56524)
```
but since I'm using an URL to que... | 2018/04/26 | [
"https://Stackoverflow.com/questions/50046938",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9164141/"
] | What you are missing in your logic is that `replaceAll` returns the resultant string. But you are not storing the result, and that's why it's not working. So try as following:
```
latlongshrink = latlongshrink.replaceAll("[\\\\[\\\\](){}]","");
```
Now try to print the result. It'll give the expected result. See [th... | If you have a String like "(abc)" and you want to get the content of parenthesis, maybe you can use substring to cut out first and last character.
Something likes that may work in your case (and you do not have to deal with regexp):
```
String withParenthesis = "(abc)";
String content = withParenthesis.substring(1, w... |
50,046,938 | I'm working with places, and I need to get the latitude and longitude of my location. I successfully got it like this
```
mLatLang = placeLikelihood.getPlace().getLatLng();
```
where mLatLang is `LatLng mLatLang;`
Now, the output of this line is
```
(-31.54254542,62.56524)
```
but since I'm using an URL to que... | 2018/04/26 | [
"https://Stackoverflow.com/questions/50046938",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9164141/"
] | What you are missing in your logic is that `replaceAll` returns the resultant string. But you are not storing the result, and that's why it's not working. So try as following:
```
latlongshrink = latlongshrink.replaceAll("[\\\\[\\\\](){}]","");
```
Now try to print the result. It'll give the expected result. See [th... | I just solved it with a Matcher
```
Matcher m = Pattern.compile("\\(([^)]+)\\)").matcher(latlongshrink);
while(m.find()) {
Log.e("Test",""+m.group(1));
latlongshrink = m.group(1);
}
``` |
41,196,867 | This is a question I always had, but now is the time to solve it:
I'm trying to implement the composition of objects using public attributes like:
```
Person {
public Car car;
}
Owner {
public Person person;
public Car car;
}
Car {
public Person person;
}
```
Really my question is: Is a good practice to se... | 2016/12/17 | [
"https://Stackoverflow.com/questions/41196867",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5900879/"
] | If you are doing OO, there should be no such thing as a "public" attribute. All the attributes are implementation details of the object, therefore are hidden from everybody. Only the methods associated with the object's responsibility are public.
So to answer the question:
* All "attributes" should be private
* *And*... | the short answer is that, except for very few cases, you want those variables to be private, and often technologies in the JVM will make access faster than you think it would be (and sometimes even faster than in C/C++).
For a bit more detailed answer:
The main question is: who should be able to modify those variab... |
1,015,017 | Simple as that, can we emulate the "protected" visibility in Javascript somehow? | 2009/06/18 | [
"https://Stackoverflow.com/questions/1015017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12540/"
] | Do this:
```
/* Note: Do not break/touch this object */
...code...
```
Or a bit of google found this on the first page:
<http://blog.blanquera.com/2009/03/javascript-protected-methods-and.html> | What could that possibly mean? You don't have *classes*.
I suppose you could analyze `caller` to determine whether it meets some set of criteria for being permitted to call a method. This will be hideously inefficient and your criteria will always be spoofable. |
1,015,017 | Simple as that, can we emulate the "protected" visibility in Javascript somehow? | 2009/06/18 | [
"https://Stackoverflow.com/questions/1015017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12540/"
] | Do this:
```
/* Note: Do not break/touch this object */
...code...
```
Or a bit of google found this on the first page:
<http://blog.blanquera.com/2009/03/javascript-protected-methods-and.html> | There's an interesting pattern worth mentioning here: a JavaScript contructor function may return any object (not necesserily *this*). One could create a constructor function, that returns a proxy object, that contains proxy methods to the "real" methods of the "real" instance object. This may sound complicated, but it... |
1,015,017 | Simple as that, can we emulate the "protected" visibility in Javascript somehow? | 2009/06/18 | [
"https://Stackoverflow.com/questions/1015017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12540/"
] | [Sure](http://webreflection.blogspot.com/2008/02/how-to-inject-protected-methods-in.html) you can. Here's another [example](http://blog.blanquera.com/2009/03/javascript-protected-methods-and.html). | What could that possibly mean? You don't have *classes*.
I suppose you could analyze `caller` to determine whether it meets some set of criteria for being permitted to call a method. This will be hideously inefficient and your criteria will always be spoofable. |
1,015,017 | Simple as that, can we emulate the "protected" visibility in Javascript somehow? | 2009/06/18 | [
"https://Stackoverflow.com/questions/1015017",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12540/"
] | [Sure](http://webreflection.blogspot.com/2008/02/how-to-inject-protected-methods-in.html) you can. Here's another [example](http://blog.blanquera.com/2009/03/javascript-protected-methods-and.html). | There's an interesting pattern worth mentioning here: a JavaScript contructor function may return any object (not necesserily *this*). One could create a constructor function, that returns a proxy object, that contains proxy methods to the "real" methods of the "real" instance object. This may sound complicated, but it... |
10,476,265 | I have a PDF form that needs to be filled out a bunch of times (it's a timesheet to be exact). Now since I don't want to do this by hand, I was looking for a way to fill them out using a python script or tools that could be used in a bash script.
Does anyone have experience with this? | 2012/05/07 | [
"https://Stackoverflow.com/questions/10476265",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/701409/"
] | **For Python you'll need the fdfgen lib and pdftk**
@Hugh Bothwell's comment is 100% correct so I'll extend that answer with a working implementation.
If you're in windows you'll also need to make sure both python and pdftk are contained in the system path (unless you want to use long folder names).
Here's the code ... | Replace Original File
```
os.system('pdftk "original.pdf" fill_form "data.fdf" output "output.pdf"')
os.remove("data.fdf")
os.remove("original.pdf")
os.rename("output.pdf","original.pdf")
``` |
10,476,265 | I have a PDF form that needs to be filled out a bunch of times (it's a timesheet to be exact). Now since I don't want to do this by hand, I was looking for a way to fill them out using a python script or tools that could be used in a bash script.
Does anyone have experience with this? | 2012/05/07 | [
"https://Stackoverflow.com/questions/10476265",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/701409/"
] | **For Python you'll need the fdfgen lib and pdftk**
@Hugh Bothwell's comment is 100% correct so I'll extend that answer with a working implementation.
If you're in windows you'll also need to make sure both python and pdftk are contained in the system path (unless you want to use long folder names).
Here's the code ... | I wrote a library built upon:'pdfrw', 'pdf2image', 'Pillow', 'PyPDF2' called fillpdf (`pip install fillpdf` and poppler dependency `conda install -c conda-forge poppler`)
Basic usage:
```
from fillpdf import fillpdfs
fillpdfs.get_form_fields("blank.pdf")
# returns a dictionary of fields
# Set the returned dictionar... |
10,476,265 | I have a PDF form that needs to be filled out a bunch of times (it's a timesheet to be exact). Now since I don't want to do this by hand, I was looking for a way to fill them out using a python script or tools that could be used in a bash script.
Does anyone have experience with this? | 2012/05/07 | [
"https://Stackoverflow.com/questions/10476265",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/701409/"
] | Much faster version, no pdftk nor fdfgen needed, pure Python 3.6+:
```
# -*- coding: utf-8 -*-
from collections import OrderedDict
from PyPDF2 import PdfFileWriter, PdfFileReader
def _getFields(obj, tree=None, retval=None, fileobj=None):
"""
Extracts field data if this PDF contains interactive form fields.
... | Replace Original File
```
os.system('pdftk "original.pdf" fill_form "data.fdf" output "output.pdf"')
os.remove("data.fdf")
os.remove("original.pdf")
os.rename("output.pdf","original.pdf")
``` |
10,476,265 | I have a PDF form that needs to be filled out a bunch of times (it's a timesheet to be exact). Now since I don't want to do this by hand, I was looking for a way to fill them out using a python script or tools that could be used in a bash script.
Does anyone have experience with this? | 2012/05/07 | [
"https://Stackoverflow.com/questions/10476265",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/701409/"
] | Much faster version, no pdftk nor fdfgen needed, pure Python 3.6+:
```
# -*- coding: utf-8 -*-
from collections import OrderedDict
from PyPDF2 import PdfFileWriter, PdfFileReader
def _getFields(obj, tree=None, retval=None, fileobj=None):
"""
Extracts field data if this PDF contains interactive form fields.
... | I wrote a library built upon:'pdfrw', 'pdf2image', 'Pillow', 'PyPDF2' called fillpdf (`pip install fillpdf` and poppler dependency `conda install -c conda-forge poppler`)
Basic usage:
```
from fillpdf import fillpdfs
fillpdfs.get_form_fields("blank.pdf")
# returns a dictionary of fields
# Set the returned dictionar... |
275,889 | In quantum mechanics it is usually the case that when degrees of freedom in a system are traced out (i.e. ignored), the evolution of the remaining system is no longer unitary and this is formally described as the entropy of the reduced density matrix ($S = Tr(\rho\ln{\rho}$)) attaining a nonzero value.
Why is it then... | 2016/08/23 | [
"https://physics.stackexchange.com/questions/275889",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/41152/"
] | The answer to your question is a bit subtle and has to do with the various ways we can ignore degrees of freedom in physics. One way, as you mentioned, is if you have a system interacting with its environment but you don't care about the state of the environment. Then you can perform a partial trace over environmental ... | Mathematically it is quite simple: If your overall system unitary $U\_{tot}$ can be expressed as $U\_{tot} = U\_1 \otimes U\_2$, then the subsystems 1 and 2 have unitary evolution even when you trace out the partner.
Parameter counting can give you some very rough idea of how easy or hard this is. For instance, in a 2... |
5,817,526 | So I was wondering, is there any feasible way in JavaScript to view information about scheduled timeouts and intervals that you don't explicitly know about (I know `setTimeout` and `setInterval` return a handle that can be used to refer to the scheduled instance, but say that this is unavailable for one reason or anoth... | 2011/04/28 | [
"https://Stackoverflow.com/questions/5817526",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/609251/"
] | how about simply rewriting the setTimeout function to sort of inject custom logging functionality?
like
```
var oldTimeout = setTimeout;
window.setTimeout = function(callback, timeout) {
console.log("timeout started");
return oldTimeout(function() {
console.log('timeout finished');
callback();
}, timeou... | No, even the [HTML5 spec](http://www.w3.org/TR/html5/timers.html#timers) (which is a rationalisation of the HTML 4.01 behaviour in current browsers, with additional features) doesn't specify a way to list the available callbacks. |
5,817,526 | So I was wondering, is there any feasible way in JavaScript to view information about scheduled timeouts and intervals that you don't explicitly know about (I know `setTimeout` and `setInterval` return a handle that can be used to refer to the scheduled instance, but say that this is unavailable for one reason or anoth... | 2011/04/28 | [
"https://Stackoverflow.com/questions/5817526",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/609251/"
] | No, even the [HTML5 spec](http://www.w3.org/TR/html5/timers.html#timers) (which is a rationalisation of the HTML 4.01 behaviour in current browsers, with additional features) doesn't specify a way to list the available callbacks. | We've just published a package solving this exact issue.
```
npm install time-events-manager
```
With that, you can view them via `timeoutCollection` & `intervalCollection` objects. |
5,817,526 | So I was wondering, is there any feasible way in JavaScript to view information about scheduled timeouts and intervals that you don't explicitly know about (I know `setTimeout` and `setInterval` return a handle that can be used to refer to the scheduled instance, but say that this is unavailable for one reason or anoth... | 2011/04/28 | [
"https://Stackoverflow.com/questions/5817526",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/609251/"
] | No, even the [HTML5 spec](http://www.w3.org/TR/html5/timers.html#timers) (which is a rationalisation of the HTML 4.01 behaviour in current browsers, with additional features) doesn't specify a way to list the available callbacks. | You could also create a *timer manager* module which will keep track of current timers and allow you to get, add, stop and stop all timers.
```js
var timers = (function() {
//
var timers = []
//
const getIndex = (array, attr, value) => {
for (let i = 0; i < array.length; i += 1) {
if (ar... |
5,817,526 | So I was wondering, is there any feasible way in JavaScript to view information about scheduled timeouts and intervals that you don't explicitly know about (I know `setTimeout` and `setInterval` return a handle that can be used to refer to the scheduled instance, but say that this is unavailable for one reason or anoth... | 2011/04/28 | [
"https://Stackoverflow.com/questions/5817526",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/609251/"
] | how about simply rewriting the setTimeout function to sort of inject custom logging functionality?
like
```
var oldTimeout = setTimeout;
window.setTimeout = function(callback, timeout) {
console.log("timeout started");
return oldTimeout(function() {
console.log('timeout finished');
callback();
}, timeou... | We've just published a package solving this exact issue.
```
npm install time-events-manager
```
With that, you can view them via `timeoutCollection` & `intervalCollection` objects. |
5,817,526 | So I was wondering, is there any feasible way in JavaScript to view information about scheduled timeouts and intervals that you don't explicitly know about (I know `setTimeout` and `setInterval` return a handle that can be used to refer to the scheduled instance, but say that this is unavailable for one reason or anoth... | 2011/04/28 | [
"https://Stackoverflow.com/questions/5817526",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/609251/"
] | how about simply rewriting the setTimeout function to sort of inject custom logging functionality?
like
```
var oldTimeout = setTimeout;
window.setTimeout = function(callback, timeout) {
console.log("timeout started");
return oldTimeout(function() {
console.log('timeout finished');
callback();
}, timeou... | You could also create a *timer manager* module which will keep track of current timers and allow you to get, add, stop and stop all timers.
```js
var timers = (function() {
//
var timers = []
//
const getIndex = (array, attr, value) => {
for (let i = 0; i < array.length; i += 1) {
if (ar... |
29,138,498 | Can I import RDBMS table data (table doesn't have a primary key) to hive using sqoop? If yes, then can you please give the sqoop import command.
I have tried with sqoop import general command, but it failed. | 2015/03/19 | [
"https://Stackoverflow.com/questions/29138498",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4688490/"
] | If your table has no primary key defined then you have to give `-m 1` option for importing the data or you have to provide `--split-by` argument with some column name, otherwise it gives the error:
```
ERROR tool.ImportTool: Error during import: No primary key could be found for table <table_name>. Please specify on... | In the first scenario using 1 Mapper ... If the size of the file is very large this process is going to take more time to respond or might fail. Check the size of the data before using mapper = 1 . |
29,138,498 | Can I import RDBMS table data (table doesn't have a primary key) to hive using sqoop? If yes, then can you please give the sqoop import command.
I have tried with sqoop import general command, but it failed. | 2015/03/19 | [
"https://Stackoverflow.com/questions/29138498",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4688490/"
] | If your table has no primary key defined then you have to give `-m 1` option for importing the data or you have to provide `--split-by` argument with some column name, otherwise it gives the error:
```
ERROR tool.ImportTool: Error during import: No primary key could be found for table <table_name>. Please specify on... | You can import data from RDBMS into hive without Primarykey.
First you need to create a table in hive.After that you need to write the following code:
```
sqoop import \
--connect jdbc:mysql://localhost/test_db \
--username root \
--password **** \
--table <RDBMS-Table-name> \
--target-dir /user/... |
29,138,498 | Can I import RDBMS table data (table doesn't have a primary key) to hive using sqoop? If yes, then can you please give the sqoop import command.
I have tried with sqoop import general command, but it failed. | 2015/03/19 | [
"https://Stackoverflow.com/questions/29138498",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4688490/"
] | If your table has no primary key defined then you have to give `-m 1` option for importing the data or you have to provide `--split-by` argument with some column name, otherwise it gives the error:
```
ERROR tool.ImportTool: Error during import: No primary key could be found for table <table_name>. Please specify on... | Quick view:
The Sqoop job fails and the error looks like this" Error during import: No primary key could be found for the table . Please specify one with --split-by or perform a sequential import with '-m 1' "
-------------------------------------------------------------------------------------------------------------... |
29,138,498 | Can I import RDBMS table data (table doesn't have a primary key) to hive using sqoop? If yes, then can you please give the sqoop import command.
I have tried with sqoop import general command, but it failed. | 2015/03/19 | [
"https://Stackoverflow.com/questions/29138498",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4688490/"
] | If your table has no primary key defined then you have to give `-m 1` option for importing the data or you have to provide `--split-by` argument with some column name, otherwise it gives the error:
```
ERROR tool.ImportTool: Error during import: No primary key could be found for table <table_name>. Please specify on... | Use the following in your command:
```
--autoreset-to-one-mapper
```
`Import` should use one mapper if a table has no primary key and no split-by column is provided. It cannot be used with `--split-by <col>` option. |
29,138,498 | Can I import RDBMS table data (table doesn't have a primary key) to hive using sqoop? If yes, then can you please give the sqoop import command.
I have tried with sqoop import general command, but it failed. | 2015/03/19 | [
"https://Stackoverflow.com/questions/29138498",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4688490/"
] | In the first scenario using 1 Mapper ... If the size of the file is very large this process is going to take more time to respond or might fail. Check the size of the data before using mapper = 1 . | Use the following in your command:
```
--autoreset-to-one-mapper
```
`Import` should use one mapper if a table has no primary key and no split-by column is provided. It cannot be used with `--split-by <col>` option. |
29,138,498 | Can I import RDBMS table data (table doesn't have a primary key) to hive using sqoop? If yes, then can you please give the sqoop import command.
I have tried with sqoop import general command, but it failed. | 2015/03/19 | [
"https://Stackoverflow.com/questions/29138498",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4688490/"
] | You can import data from RDBMS into hive without Primarykey.
First you need to create a table in hive.After that you need to write the following code:
```
sqoop import \
--connect jdbc:mysql://localhost/test_db \
--username root \
--password **** \
--table <RDBMS-Table-name> \
--target-dir /user/... | Use the following in your command:
```
--autoreset-to-one-mapper
```
`Import` should use one mapper if a table has no primary key and no split-by column is provided. It cannot be used with `--split-by <col>` option. |
29,138,498 | Can I import RDBMS table data (table doesn't have a primary key) to hive using sqoop? If yes, then can you please give the sqoop import command.
I have tried with sqoop import general command, but it failed. | 2015/03/19 | [
"https://Stackoverflow.com/questions/29138498",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4688490/"
] | Quick view:
The Sqoop job fails and the error looks like this" Error during import: No primary key could be found for the table . Please specify one with --split-by or perform a sequential import with '-m 1' "
-------------------------------------------------------------------------------------------------------------... | Use the following in your command:
```
--autoreset-to-one-mapper
```
`Import` should use one mapper if a table has no primary key and no split-by column is provided. It cannot be used with `--split-by <col>` option. |
3,585 | I have recently setup Wordpress Multisite and have that working well. Now to complete the branding, I want to use `feeds.mydomain.com` for the MyBrand integration to Feedburner. I have setup the CNAME to point to the server that Feedburner has specified, but when I visit the site (after ensuring the entry could propaga... | 2010/10/06 | [
"https://webmasters.stackexchange.com/questions/3585",
"https://webmasters.stackexchange.com",
"https://webmasters.stackexchange.com/users/835/"
] | This is probably a DNS issue. Make sure `feeds.mydomain.com` points to Feedburner. You can easily check it running a DNS query.
With Linux/MacOSX, use the `dig` command.
```
$ dig feeds.engadget.com
; <<>> DiG 9.6.0-APPLE-P2 <<>> feeds.engadget.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY... | It's definitely a DNS cache issue. I just tried a different computer and it worked. I didn't think about that until after I posted this. |
23,996 | Let me introduce my idea.
Given:
* sizeof( Blockchain ) = 16Gb
* Downloading of one avi film 16GB from the pirate bay ( 5mb/s ) = 2-3 hours
* Downloading of bitcoin's blockchain ( 5mb/s ) = 2-3 days
* One day = 6 \* 24 = 144 blocks.
* Drag - cryptography.
Task:
* Accelerate boot of fresh client to the torrent speed... | 2014/03/26 | [
"https://bitcoin.stackexchange.com/questions/23996",
"https://bitcoin.stackexchange.com",
"https://bitcoin.stackexchange.com/users/12645/"
] | When a node learns of a transaction, some validity tests are performed and if the transaction is not yet in the blockchain it knows of with the longest height and the transaction also is valid (i.e., not a double spend) then that transaction is added to that node's memory pool.
If a later transaction arrives at a node... | If chain X becomes dominant, all transactions in the now-orphan chain Y are returned to the "memory pool". When this happens, transaction 2 will not confirm because it spends an output that was already spent by transaction 1.
Likewise, if chain Y becomes dominant, all transactions in the now-orphan chain X are returne... |
23,996 | Let me introduce my idea.
Given:
* sizeof( Blockchain ) = 16Gb
* Downloading of one avi film 16GB from the pirate bay ( 5mb/s ) = 2-3 hours
* Downloading of bitcoin's blockchain ( 5mb/s ) = 2-3 days
* One day = 6 \* 24 = 144 blocks.
* Drag - cryptography.
Task:
* Accelerate boot of fresh client to the torrent speed... | 2014/03/26 | [
"https://bitcoin.stackexchange.com/questions/23996",
"https://bitcoin.stackexchange.com",
"https://bitcoin.stackexchange.com/users/12645/"
] | When a node learns of a transaction, some validity tests are performed and if the transaction is not yet in the blockchain it knows of with the longest height and the transaction also is valid (i.e., not a double spend) then that transaction is added to that node's memory pool.
If a later transaction arrives at a node... | It isn't! The only way to be sure that a transaction is permanent (and thus be sure that the recipient will be able to spend the funds he received) is to wait until a reasonable number of confirmations (blocks mined after the block containing the transaction) |
79,602 | I'm learning Salesforce Marketing Cloud and experienced some unexpected behavior today.
I sent a message to a number of data extensions. The number of recipients was upwards of 70,000. Before I sent the official email I sent a test specifically to my address. Everything looked good so I used Guided Send to send to the... | 2015/06/11 | [
"https://salesforce.stackexchange.com/questions/79602",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/21233/"
] | Also you can directly query in child object using relationship fields,
```
[select ISOOffice__Merchant_Location__c,Account__r.Name
from ISOOffice__Merchant_Opportunity__c where
ISOOffice__Opportunity_Type__c = 'New Merchant' AND
Account__r.Name = 'Goodwill of Southwestern Pennsylvania']
```
You need to prefix ... | Not sure I fully follow your data model, but a [parent-child relationship query](https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships_and_custom_objects.htm#sforce_api_calls_soql_relationships_and_custom_objects) would look like this:
```
Account a = [
... |
40,910,892 | I am trying to call Application insights API using pageviews Event and i get this error message
```
{
"error": {
"message": "Rate limit is exceeded",
"code": "ThrottledError",
"innererror": {
"code": "ThrottledError",
"message": "Rate limit of 0 per day is exceeded.",
"limitValue": 0,
... | 2016/12/01 | [
"https://Stackoverflow.com/questions/40910892",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/7236177/"
] | You get this issue if you are on the old pricing model, and you don't if you are on the new pricing model.
Unless you created a brand new Application Insights instance very recently, you are probably are on the old pricing model. Easiest way to tell is if you see "Features + pricing" in your Application Insights, you ... | according to the link in the result you got back:
<https://aka.ms/api-limits>
it depends on what the response code was, and what other headers you get back:
>
> If requests are being made at a rate higher than this, then these requests will receive a status code 429 (Too Many Requests) along with the header Retry-A... |
21,586,409 | I want to get notified when a test fails. Ideally, I want to know if the test is passed or failed in my @After annotated method. I understand that their is a RunListener which can be used for this purpose but it works only if we run the test with JunitCore. Is there a way to get notified if a test case fails or somethi... | 2014/02/05 | [
"https://Stackoverflow.com/questions/21586409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2943317/"
] | The Spring TestContext Framework provides a `TestExecutionListener` SPI that can be used to achieve this.
Basically, if you implement `TestExecutionListener` (or better yet extend `AbstractTestExecutionListener`), you can implement the `afterTestMethod(TestContext)` method. From the `TestContext` that is passed in you... | An alternative is JUnits builtin `TestWatcher` Rule.
The rule allows you to opt into what things you want to be notified for. Here is a compacted example from [JUnit Github Docs](https://github.com/junit-team/junit4/wiki/Rules#testwatchmantestwatcher-rules)
```
@Test
public class WatcherTest {
@Rule
public fina... |
25,324,860 | I have to link two containers so they can see each other. Of course the following...
```
docker run -i -t --name container1 --link container2:container2 ubuntu:trusty /bin/bash
docker run -i -t --name container2 --link container1:container1 ubuntu:trusty /bin/bash
```
...fails at line 1 because a container needs to ... | 2014/08/15 | [
"https://Stackoverflow.com/questions/25324860",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/644958/"
] | There is no bi-directional link since you can not link to a non-running container.
Unless you are [disabling inter-container communication](https://docs.docker.com/articles/networking/#between-containers), all containers on the same host can *see* any other containers on the network. All you need is to provide them th... | Here's how I've solved this for myself:
First, I go through all my containers (which need to know from each other) and create dnsmasq entries like so:
```
for f in container1 container2 container3; do
IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $f 2>/dev/null`
if [ -n "$IP" ]; then
echo $f ... |
25,324,860 | I have to link two containers so they can see each other. Of course the following...
```
docker run -i -t --name container1 --link container2:container2 ubuntu:trusty /bin/bash
docker run -i -t --name container2 --link container1:container1 ubuntu:trusty /bin/bash
```
...fails at line 1 because a container needs to ... | 2014/08/15 | [
"https://Stackoverflow.com/questions/25324860",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/644958/"
] | There is no bi-directional link since you can not link to a non-running container.
Unless you are [disabling inter-container communication](https://docs.docker.com/articles/networking/#between-containers), all containers on the same host can *see* any other containers on the network. All you need is to provide them th... | I solved this by appending an ip-table into /etc/hosts of each container, for
[example](https://github.com/Wei1234c/dockerfiles/blob/master/ARMv7/hadoop/cluster/start.sh) |
25,324,860 | I have to link two containers so they can see each other. Of course the following...
```
docker run -i -t --name container1 --link container2:container2 ubuntu:trusty /bin/bash
docker run -i -t --name container2 --link container1:container1 ubuntu:trusty /bin/bash
```
...fails at line 1 because a container needs to ... | 2014/08/15 | [
"https://Stackoverflow.com/questions/25324860",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/644958/"
] | Docker 1.10 addresses this very nicely by introducing advanced container networking.
(Details: <https://docs.docker.com/engine/userguide/networking/dockernetworks/> )
First, create a network. The example below creates a basic "bridge" network, which works on one host only. You can check out docker's more complete docu... | There is no bi-directional link since you can not link to a non-running container.
Unless you are [disabling inter-container communication](https://docs.docker.com/articles/networking/#between-containers), all containers on the same host can *see* any other containers on the network. All you need is to provide them th... |
25,324,860 | I have to link two containers so they can see each other. Of course the following...
```
docker run -i -t --name container1 --link container2:container2 ubuntu:trusty /bin/bash
docker run -i -t --name container2 --link container1:container1 ubuntu:trusty /bin/bash
```
...fails at line 1 because a container needs to ... | 2014/08/15 | [
"https://Stackoverflow.com/questions/25324860",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/644958/"
] | Since there is no bidirectional link I solved this issue with the [--net](https://docs.docker.com/reference/commandline/cli/#run) argument. That way they are using the same network stack and can therefore access each other over the loopback device (localhost).
```
docker run -d --name web me/myserver
docker run -d --n... | Here's how I've solved this for myself:
First, I go through all my containers (which need to know from each other) and create dnsmasq entries like so:
```
for f in container1 container2 container3; do
IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $f 2>/dev/null`
if [ -n "$IP" ]; then
echo $f ... |
25,324,860 | I have to link two containers so they can see each other. Of course the following...
```
docker run -i -t --name container1 --link container2:container2 ubuntu:trusty /bin/bash
docker run -i -t --name container2 --link container1:container1 ubuntu:trusty /bin/bash
```
...fails at line 1 because a container needs to ... | 2014/08/15 | [
"https://Stackoverflow.com/questions/25324860",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/644958/"
] | Here's how I've solved this for myself:
First, I go through all my containers (which need to know from each other) and create dnsmasq entries like so:
```
for f in container1 container2 container3; do
IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $f 2>/dev/null`
if [ -n "$IP" ]; then
echo $f ... | I solved this by appending an ip-table into /etc/hosts of each container, for
[example](https://github.com/Wei1234c/dockerfiles/blob/master/ARMv7/hadoop/cluster/start.sh) |
25,324,860 | I have to link two containers so they can see each other. Of course the following...
```
docker run -i -t --name container1 --link container2:container2 ubuntu:trusty /bin/bash
docker run -i -t --name container2 --link container1:container1 ubuntu:trusty /bin/bash
```
...fails at line 1 because a container needs to ... | 2014/08/15 | [
"https://Stackoverflow.com/questions/25324860",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/644958/"
] | Docker 1.10 addresses this very nicely by introducing advanced container networking.
(Details: <https://docs.docker.com/engine/userguide/networking/dockernetworks/> )
First, create a network. The example below creates a basic "bridge" network, which works on one host only. You can check out docker's more complete docu... | Here's how I've solved this for myself:
First, I go through all my containers (which need to know from each other) and create dnsmasq entries like so:
```
for f in container1 container2 container3; do
IP=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' $f 2>/dev/null`
if [ -n "$IP" ]; then
echo $f ... |
25,324,860 | I have to link two containers so they can see each other. Of course the following...
```
docker run -i -t --name container1 --link container2:container2 ubuntu:trusty /bin/bash
docker run -i -t --name container2 --link container1:container1 ubuntu:trusty /bin/bash
```
...fails at line 1 because a container needs to ... | 2014/08/15 | [
"https://Stackoverflow.com/questions/25324860",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/644958/"
] | Since there is no bidirectional link I solved this issue with the [--net](https://docs.docker.com/reference/commandline/cli/#run) argument. That way they are using the same network stack and can therefore access each other over the loopback device (localhost).
```
docker run -d --name web me/myserver
docker run -d --n... | I solved this by appending an ip-table into /etc/hosts of each container, for
[example](https://github.com/Wei1234c/dockerfiles/blob/master/ARMv7/hadoop/cluster/start.sh) |
25,324,860 | I have to link two containers so they can see each other. Of course the following...
```
docker run -i -t --name container1 --link container2:container2 ubuntu:trusty /bin/bash
docker run -i -t --name container2 --link container1:container1 ubuntu:trusty /bin/bash
```
...fails at line 1 because a container needs to ... | 2014/08/15 | [
"https://Stackoverflow.com/questions/25324860",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/644958/"
] | Docker 1.10 addresses this very nicely by introducing advanced container networking.
(Details: <https://docs.docker.com/engine/userguide/networking/dockernetworks/> )
First, create a network. The example below creates a basic "bridge" network, which works on one host only. You can check out docker's more complete docu... | Since there is no bidirectional link I solved this issue with the [--net](https://docs.docker.com/reference/commandline/cli/#run) argument. That way they are using the same network stack and can therefore access each other over the loopback device (localhost).
```
docker run -d --name web me/myserver
docker run -d --n... |
25,324,860 | I have to link two containers so they can see each other. Of course the following...
```
docker run -i -t --name container1 --link container2:container2 ubuntu:trusty /bin/bash
docker run -i -t --name container2 --link container1:container1 ubuntu:trusty /bin/bash
```
...fails at line 1 because a container needs to ... | 2014/08/15 | [
"https://Stackoverflow.com/questions/25324860",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/644958/"
] | Docker 1.10 addresses this very nicely by introducing advanced container networking.
(Details: <https://docs.docker.com/engine/userguide/networking/dockernetworks/> )
First, create a network. The example below creates a basic "bridge" network, which works on one host only. You can check out docker's more complete docu... | I solved this by appending an ip-table into /etc/hosts of each container, for
[example](https://github.com/Wei1234c/dockerfiles/blob/master/ARMv7/hadoop/cluster/start.sh) |
5,309,206 | I use HtmlUnit to fill form.
I have a select `SELECT_A`. After selecting option the additional elements must appear in the page. But it's not working! I simulate Firefox 3.6.
What do you think?
I tried to use `NicelyResynchronizingAjaxController()` but it does not help. | 2011/03/15 | [
"https://Stackoverflow.com/questions/5309206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/660203/"
] | One note: fireEvent should be called with `"change"` parameter, not `"onchange"`. Or `fireEvent(Event.TYPE_CHANGE);` is even better. | You can use the method `fireevent("EventName")` and pass eventname as a paramenter:
```
HtmlSelect fromselect = form.getSelectByName("droplist");
fromselect.fireEvent("onchange");
``` |
63,919,101 | I have one almost completed Java application with authentication and need to add to this project another one app to reuse auth code, for example.
As I heard there could be some kind of two "main activities" with different icons to launch them separately. Also I cannot check this info, because don't know how this named... | 2020/09/16 | [
"https://Stackoverflow.com/questions/63919101",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4974229/"
] | You should consider using flavors for your apps. This allows you setting different app name, icons, code for each flavor.
Here is an example for defining two flavors in your main module's build.gradle:
```
buildTypes {
debug{...}
release{...}
}
// Specifies one flavor dimension.
flavorDime... | Basically need to create two entrance points using activities and add icons inside them.
So left this here just in case.
```
<activity android:name=".MainActivity_1"
android:icon="@mipmap/icon_1">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<catego... |
43,355,774 | So i'm trying to generate all binaries of a size n but with the condition that only k 1s. i.e
for size n = 4, k=2, (there is 2 over 4 combinations)
```
1100
1010
1001
0110
0101
0011
```
I'm stuck and can't figure out how to generate this. | 2017/04/11 | [
"https://Stackoverflow.com/questions/43355774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6915563/"
] | Using the basic recursive method for printing all binary sequence all that remains is to enforce your constraints:
```
private static void binSeq(int n, int k, String seq) {
if (n == 0) {
System.out.println(seq);
return;
}
if (n > k) {
binSeq(n - 1, k, seq + "0");
}
if... | One approach is to generate all combinations of `k` values from the set of `n` numbers 0..`n-1`, and use these values to set the corresponding bits in the output.
[This Q&A](https://stackoverflow.com/q/127704/335858) explains how to generate all combinations of `k` elements from `n`. With these combinations in hand, u... |
43,355,774 | So i'm trying to generate all binaries of a size n but with the condition that only k 1s. i.e
for size n = 4, k=2, (there is 2 over 4 combinations)
```
1100
1010
1001
0110
0101
0011
```
I'm stuck and can't figure out how to generate this. | 2017/04/11 | [
"https://Stackoverflow.com/questions/43355774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6915563/"
] | Here's my non-recursive take on this algorithm. Because there are `2^n` permutations of binary strings, we can use a for-loop to iterate through every possible string and check if the amount of "1"s is not equal to `k`:
```
private static void generate(int n, int k) {
for (int i = 0; i < Math.pow(2, n); i++) {
... | One approach is to generate all combinations of `k` values from the set of `n` numbers 0..`n-1`, and use these values to set the corresponding bits in the output.
[This Q&A](https://stackoverflow.com/q/127704/335858) explains how to generate all combinations of `k` elements from `n`. With these combinations in hand, u... |
43,355,774 | So i'm trying to generate all binaries of a size n but with the condition that only k 1s. i.e
for size n = 4, k=2, (there is 2 over 4 combinations)
```
1100
1010
1001
0110
0101
0011
```
I'm stuck and can't figure out how to generate this. | 2017/04/11 | [
"https://Stackoverflow.com/questions/43355774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6915563/"
] | One approach is to generate all combinations of `k` values from the set of `n` numbers 0..`n-1`, and use these values to set the corresponding bits in the output.
[This Q&A](https://stackoverflow.com/q/127704/335858) explains how to generate all combinations of `k` elements from `n`. With these combinations in hand, u... | int n = 4, k=2;
```
for (int i = 0; i < Math.pow(2,n) ; i++) {
int a = Integer.bitCount(i);
if (a == k) System.out.println(Integer.toBinaryString(i));
}
```
I think this is the simplest answer. |
43,355,774 | So i'm trying to generate all binaries of a size n but with the condition that only k 1s. i.e
for size n = 4, k=2, (there is 2 over 4 combinations)
```
1100
1010
1001
0110
0101
0011
```
I'm stuck and can't figure out how to generate this. | 2017/04/11 | [
"https://Stackoverflow.com/questions/43355774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6915563/"
] | Using the basic recursive method for printing all binary sequence all that remains is to enforce your constraints:
```
private static void binSeq(int n, int k, String seq) {
if (n == 0) {
System.out.println(seq);
return;
}
if (n > k) {
binSeq(n - 1, k, seq + "0");
}
if... | int n = 4, k=2;
```
for (int i = 0; i < Math.pow(2,n) ; i++) {
int a = Integer.bitCount(i);
if (a == k) System.out.println(Integer.toBinaryString(i));
}
```
I think this is the simplest answer. |
43,355,774 | So i'm trying to generate all binaries of a size n but with the condition that only k 1s. i.e
for size n = 4, k=2, (there is 2 over 4 combinations)
```
1100
1010
1001
0110
0101
0011
```
I'm stuck and can't figure out how to generate this. | 2017/04/11 | [
"https://Stackoverflow.com/questions/43355774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6915563/"
] | Using the basic recursive method for printing all binary sequence all that remains is to enforce your constraints:
```
private static void binSeq(int n, int k, String seq) {
if (n == 0) {
System.out.println(seq);
return;
}
if (n > k) {
binSeq(n - 1, k, seq + "0");
}
if... | **Below is the solution using Recursion as an approach in java**
```
public class NumberOfBinaryPatternsSpecificOnes {
static int[] bitArray = new int[]{0,1}; // kept binary bits in array
public static void main(String args[])
{
System.out.println("Below are the patterns\n");
int n = 4... |
43,355,774 | So i'm trying to generate all binaries of a size n but with the condition that only k 1s. i.e
for size n = 4, k=2, (there is 2 over 4 combinations)
```
1100
1010
1001
0110
0101
0011
```
I'm stuck and can't figure out how to generate this. | 2017/04/11 | [
"https://Stackoverflow.com/questions/43355774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6915563/"
] | Here's my non-recursive take on this algorithm. Because there are `2^n` permutations of binary strings, we can use a for-loop to iterate through every possible string and check if the amount of "1"s is not equal to `k`:
```
private static void generate(int n, int k) {
for (int i = 0; i < Math.pow(2, n); i++) {
... | int n = 4, k=2;
```
for (int i = 0; i < Math.pow(2,n) ; i++) {
int a = Integer.bitCount(i);
if (a == k) System.out.println(Integer.toBinaryString(i));
}
```
I think this is the simplest answer. |
43,355,774 | So i'm trying to generate all binaries of a size n but with the condition that only k 1s. i.e
for size n = 4, k=2, (there is 2 over 4 combinations)
```
1100
1010
1001
0110
0101
0011
```
I'm stuck and can't figure out how to generate this. | 2017/04/11 | [
"https://Stackoverflow.com/questions/43355774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6915563/"
] | Here's my non-recursive take on this algorithm. Because there are `2^n` permutations of binary strings, we can use a for-loop to iterate through every possible string and check if the amount of "1"s is not equal to `k`:
```
private static void generate(int n, int k) {
for (int i = 0; i < Math.pow(2, n); i++) {
... | **Below is the solution using Recursion as an approach in java**
```
public class NumberOfBinaryPatternsSpecificOnes {
static int[] bitArray = new int[]{0,1}; // kept binary bits in array
public static void main(String args[])
{
System.out.println("Below are the patterns\n");
int n = 4... |
43,355,774 | So i'm trying to generate all binaries of a size n but with the condition that only k 1s. i.e
for size n = 4, k=2, (there is 2 over 4 combinations)
```
1100
1010
1001
0110
0101
0011
```
I'm stuck and can't figure out how to generate this. | 2017/04/11 | [
"https://Stackoverflow.com/questions/43355774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6915563/"
] | **Below is the solution using Recursion as an approach in java**
```
public class NumberOfBinaryPatternsSpecificOnes {
static int[] bitArray = new int[]{0,1}; // kept binary bits in array
public static void main(String args[])
{
System.out.println("Below are the patterns\n");
int n = 4... | int n = 4, k=2;
```
for (int i = 0; i < Math.pow(2,n) ; i++) {
int a = Integer.bitCount(i);
if (a == k) System.out.println(Integer.toBinaryString(i));
}
```
I think this is the simplest answer. |
989,381 | I have Intel NUC i5 with Latest OpenElec installed on it.
I would like to wake it up from suspend using Wake On Lan feature (sent from another device on my home network), but I am having difficulties with that.
I have verified WOL is enabled in the BIOS, and I have tried to use the WOL Windows GUI provided in Depicio... | 2015/10/20 | [
"https://superuser.com/questions/989381",
"https://superuser.com",
"https://superuser.com/users/511927/"
] | I was looking for an answer to this and just tested out a number of syncing services on my Mac by trying to copy an OSX framework. The only one that successfully copied the internal symbolic links between folders was...
* **[Copy.com](https://copy.com)** (Edit: **Service will shut down on May 1, 2016**. So that leaves... | BitTorrent sync will do what the OP requests. It will copy and sync symlinks as links, without following them. It differs somewhat from services like Dropbox in that there is no cloud involved - just peer to peer communication. There is a free service and a paid service. I dropped Dropbox for this very reason, and have... |
989,381 | I have Intel NUC i5 with Latest OpenElec installed on it.
I would like to wake it up from suspend using Wake On Lan feature (sent from another device on my home network), but I am having difficulties with that.
I have verified WOL is enabled in the BIOS, and I have tried to use the WOL Windows GUI provided in Depicio... | 2015/10/20 | [
"https://superuser.com/questions/989381",
"https://superuser.com",
"https://superuser.com/users/511927/"
] | I was looking for an answer to this and just tested out a number of syncing services on my Mac by trying to copy an OSX framework. The only one that successfully copied the internal symbolic links between folders was...
* **[Copy.com](https://copy.com)** (Edit: **Service will shut down on May 1, 2016**. So that leaves... | It seems syncthing will also handle symlinks correctly (symlinks are not followed but copied as symlinks);
see relevant discussions:
<https://github.com/syncthing/syncthing/issues/262>
<https://github.com/syncthing/syncthing/issues/2358>
But I'd love to see a cloud hosted solution (unlike bt sync and syncthing) that ... |
11,230,424 | I am uncompressing a .gz-file and putting the output into `tar` with php.
My code looks like
```
$tar = proc_open('tar -xvf -', array(0 => array('pipe', 'r'), 1 => array('pipe', 'w'), 2 => array('pipe', 'a')), &$pipes);
$datalen = filesize('archive.tar.gz');
$datapos = 0;
$data = gzopen('archive.tar.gz', 'rb');
while... | 2012/06/27 | [
"https://Stackoverflow.com/questions/11230424",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/522479/"
] | `1 => array('pipe', 'w')`
You have tar giving you data (file names) on stdout. You should empty that buffer. (I normally just read it.)
You can also send it to a file so you don't have to deal with it.
`1 => array('file', '[file for filelist output]', 'a')`
if you're on Linux, I like to do
`1 => array('file', '/de... | Your problem is one of buffer, like [@EPB](https://stackoverflow.com/a/11231062/492901) said. Empty the stream buffer (e.g.: using `fread` on `$pipes[1]` in non-blocking mode; or simply remove the `v` switch).
I want to point out however, that `$datalen` will contain the compressed length of the data, while `$datapos`... |
2,079,812 | What is the difference between WPF and Silverlight?
Is it just the same as winforms vs asp as in desktop apps versus web app or is there an overlap? | 2010/01/17 | [
"https://Stackoverflow.com/questions/2079812",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/231822/"
] | Silverlight is a subset of the functionality in WPF. WPF is desktops, silverlight is cross-platform web apps. Silverlight can run out-of-browser with limited functionality. if you want full blown WPF and access to everything WPF can access on the client, you can't do silverlight out-of-browser - just build a WPF app.
... | WPF is a desktop API that is a replacement to the venerable pixel-based GDI Winforms library. It uses XML layout (XAML) and binding, partial classes and is no longer pixel-based (it deals in units so apps still work where the user has the DPI set differently).
Silverlight is a subset of WPF that runs within a browser,... |
2,079,812 | What is the difference between WPF and Silverlight?
Is it just the same as winforms vs asp as in desktop apps versus web app or is there an overlap? | 2010/01/17 | [
"https://Stackoverflow.com/questions/2079812",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/231822/"
] | WPF is a desktop API that is a replacement to the venerable pixel-based GDI Winforms library. It uses XML layout (XAML) and binding, partial classes and is no longer pixel-based (it deals in units so apps still work where the user has the DPI set differently).
Silverlight is a subset of WPF that runs within a browser,... | [One](https://stackoverflow.com/questions/944608/wpf-vs-silverlight) and [two](https://stackoverflow.com/questions/629927/what-is-the-difference-between-wpf-and-silverlight-application). |
2,079,812 | What is the difference between WPF and Silverlight?
Is it just the same as winforms vs asp as in desktop apps versus web app or is there an overlap? | 2010/01/17 | [
"https://Stackoverflow.com/questions/2079812",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/231822/"
] | Silverlight is a subset of the functionality in WPF. WPF is desktops, silverlight is cross-platform web apps. Silverlight can run out-of-browser with limited functionality. if you want full blown WPF and access to everything WPF can access on the client, you can't do silverlight out-of-browser - just build a WPF app.
... | [One](https://stackoverflow.com/questions/944608/wpf-vs-silverlight) and [two](https://stackoverflow.com/questions/629927/what-is-the-difference-between-wpf-and-silverlight-application). |
45,149 | I imported some 2000 photos into Lightroom 5 on the Mac, and then removed most of the ones in them, bringing it down to 40 photos. I did this by selecting photos I didn't like, pressing the Delete button and selecting Remove (not Delete From Disk). These removed photos are still on the filesystem, taking up 30 GB. How ... | 2013/11/13 | [
"https://photo.stackexchange.com/questions/45149",
"https://photo.stackexchange.com",
"https://photo.stackexchange.com/users/22575/"
] | The problem is that Lightroom does not know about these images, so it cannot do anything about it. Essentially you want to know which photos are *not* in Lightroom. I have no idea how to do that but I think this will work:
From Lightroom, select the folder or tree where these photos are and synchronize it. It will pop... | You needed to use the Delete From Disk option. You removed your reference to the images in Lightroom and it now has no more idea about them than it does about your Word documents and internet browsing history.
One thing you could do since you have so few images is you could make a new folder, drag the photos to keep i... |
43,675,036 | I'm quite new to SQL and databases.
I'm trying to make a preference table of an user.
The fields will be `user_id`, `pref_no`, `prg_code`.
Now if I create the table making `pref_no` `auto_increment` then it will automatically increase irrespective of the `user_id`.
So, my question is - Is there a way to define the t... | 2017/04/28 | [
"https://Stackoverflow.com/questions/43675036",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5771617/"
] | Following what `Mjh` and `Fahmina` suggested, we can create a procedure for the insertion.
```
DELIMITER //
CREATE PROCEDURE test(IN u_id INT(7), p_code INT(5))
BEGIN
SELECT @pno:= MAX(pref_no) FROM temp_choice WHERE user_id = u_id;
IF @pno IS NULL THEN
SET @pno = 1;
ELSE
... | To manage user's preference, you don't need `user_id` to be auto\_incremented in this table, but `pref_no` has to be.
`user_id` will just be a refence (or foreign key in sql) to your user table (where `user_id` should be auto\_incremented).
And to request preference for a given user your request would be :
`SELECT *... |
34,278,600 | As per Java Concurrency in Practice below code can throw assertion Error:
If a thread other than the publishing thread were to call
assertSanity, it could throw AssertionError
```
public class Holder {
private int n;
public Holder(int n) { this.n = n; }
public void assertSanity() {
if (n != n)
throw new AssertionE... | 2015/12/14 | [
"https://Stackoverflow.com/questions/34278600",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4008171/"
] | Answering my own question, I should have read complete chapter before asking question. This is what later part of chapter says:
>
> Mutable objects: If an object may be modified after construction, safe
> publication ensures only the visibility of the as-published state.
> Synchronization must be used not only to p... | A ConcurrentHashMap guarantee that all operation with reference (link to object), that be saved in a ConcurrentHashMap, are thread-safe, however, of course, a ConcurrentHashMap can not guarantee a thread-safe every objects, with reference(link) be stored in a ConcurrentHashMap. |
4,968,504 | I am using spring tags to in my jsp page.
Now I have a situation where I am using form:select for a dropdown.
If I select first value in the dropdown "normal.jsp" page should be diaplayed. If I select second value "reverse.jsp" page should be displayed.
Both these jsp pages should be displayed in the main page below... | 2011/02/11 | [
"https://Stackoverflow.com/questions/4968504",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/557068/"
] | You've not been very clear with your problem description but I can give you a place to start looking. When ever any subview of a UIScrollView is made a first responder that UISCrollView calls scrollsRectToVisible. If the scrollView is scrolling to the wrong location that may be because the tap gesture is setting the wr... | I've answered to the same problem here: [Disable UIScrollView scrolling when UITextField becomes first responder](https://stackoverflow.com/questions/4585718/disable-uiscrollview-scrolling-when-uitextfield-becomes-first-responder/5673026#5673026)
Hope this helps! |
3,211,437 | HI
I have the following (apparently simple) problem: I have to install a simple website, made by someone else, on a web hosting account. The site consists of lot and lot of HTML pages, no dynamic content, created some in MS Word and saved as html, some in frontpage, etc. A mixed bag.
I uploaded initially on a test ac... | 2010/07/09 | [
"https://Stackoverflow.com/questions/3211437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/163124/"
] | Have you tried [mb-convert-encoding](http://php.net/manual/en/function.mb-convert-encoding.php) ?
Think it would be:
```
$str = mb_convert_encoding($str, "macintosh", "UTF-8");
``` | Just curious, have you tried copying the salt, saving as UTF-8 and then pasting the salt back in place and saving again? |
3,211,437 | HI
I have the following (apparently simple) problem: I have to install a simple website, made by someone else, on a web hosting account. The site consists of lot and lot of HTML pages, no dynamic content, created some in MS Word and saved as html, some in frontpage, etc. A mixed bag.
I uploaded initially on a test ac... | 2010/07/09 | [
"https://Stackoverflow.com/questions/3211437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/163124/"
] | You don't give enough information to confirm this, but I guess the salt is used in its binary form. In that case, changing the encoding of the file will corrupt the salt if this binary stream is changed, even if the characters are correctly converted.
Since the first 128 characters are similar in UTF-8 and Mac OS Roma... | Have you tried [mb-convert-encoding](http://php.net/manual/en/function.mb-convert-encoding.php) ?
Think it would be:
```
$str = mb_convert_encoding($str, "macintosh", "UTF-8");
``` |
3,211,437 | HI
I have the following (apparently simple) problem: I have to install a simple website, made by someone else, on a web hosting account. The site consists of lot and lot of HTML pages, no dynamic content, created some in MS Word and saved as html, some in frontpage, etc. A mixed bag.
I uploaded initially on a test ac... | 2010/07/09 | [
"https://Stackoverflow.com/questions/3211437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/163124/"
] | Thanks for the input, pointed me in the right direction. The solution is:
```
$salt = iconv('UTF-8', 'macintosh', $string);
``` | Have you tried [mb-convert-encoding](http://php.net/manual/en/function.mb-convert-encoding.php) ?
Think it would be:
```
$str = mb_convert_encoding($str, "macintosh", "UTF-8");
``` |
3,211,437 | HI
I have the following (apparently simple) problem: I have to install a simple website, made by someone else, on a web hosting account. The site consists of lot and lot of HTML pages, no dynamic content, created some in MS Word and saved as html, some in frontpage, etc. A mixed bag.
I uploaded initially on a test ac... | 2010/07/09 | [
"https://Stackoverflow.com/questions/3211437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/163124/"
] | For those who do not have access to iconv here is a function in PHP:
<http://sebastienguillon.com/test/jeux-de-caracteres/MacRoman_to_utf8.txt.php>
It will properly convert MacRoman text to UTF-8 and you can even decide how you want to break ligatures.
```
<?php
function MacRoman_to_utf8($str, $break_ligatures='none')... | Have you tried [mb-convert-encoding](http://php.net/manual/en/function.mb-convert-encoding.php) ?
Think it would be:
```
$str = mb_convert_encoding($str, "macintosh", "UTF-8");
``` |
3,211,437 | HI
I have the following (apparently simple) problem: I have to install a simple website, made by someone else, on a web hosting account. The site consists of lot and lot of HTML pages, no dynamic content, created some in MS Word and saved as html, some in frontpage, etc. A mixed bag.
I uploaded initially on a test ac... | 2010/07/09 | [
"https://Stackoverflow.com/questions/3211437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/163124/"
] | You don't give enough information to confirm this, but I guess the salt is used in its binary form. In that case, changing the encoding of the file will corrupt the salt if this binary stream is changed, even if the characters are correctly converted.
Since the first 128 characters are similar in UTF-8 and Mac OS Roma... | Just curious, have you tried copying the salt, saving as UTF-8 and then pasting the salt back in place and saving again? |
3,211,437 | HI
I have the following (apparently simple) problem: I have to install a simple website, made by someone else, on a web hosting account. The site consists of lot and lot of HTML pages, no dynamic content, created some in MS Word and saved as html, some in frontpage, etc. A mixed bag.
I uploaded initially on a test ac... | 2010/07/09 | [
"https://Stackoverflow.com/questions/3211437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/163124/"
] | Thanks for the input, pointed me in the right direction. The solution is:
```
$salt = iconv('UTF-8', 'macintosh', $string);
``` | Just curious, have you tried copying the salt, saving as UTF-8 and then pasting the salt back in place and saving again? |
3,211,437 | HI
I have the following (apparently simple) problem: I have to install a simple website, made by someone else, on a web hosting account. The site consists of lot and lot of HTML pages, no dynamic content, created some in MS Word and saved as html, some in frontpage, etc. A mixed bag.
I uploaded initially on a test ac... | 2010/07/09 | [
"https://Stackoverflow.com/questions/3211437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/163124/"
] | For those who do not have access to iconv here is a function in PHP:
<http://sebastienguillon.com/test/jeux-de-caracteres/MacRoman_to_utf8.txt.php>
It will properly convert MacRoman text to UTF-8 and you can even decide how you want to break ligatures.
```
<?php
function MacRoman_to_utf8($str, $break_ligatures='none')... | Just curious, have you tried copying the salt, saving as UTF-8 and then pasting the salt back in place and saving again? |
3,211,437 | HI
I have the following (apparently simple) problem: I have to install a simple website, made by someone else, on a web hosting account. The site consists of lot and lot of HTML pages, no dynamic content, created some in MS Word and saved as html, some in frontpage, etc. A mixed bag.
I uploaded initially on a test ac... | 2010/07/09 | [
"https://Stackoverflow.com/questions/3211437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/163124/"
] | You don't give enough information to confirm this, but I guess the salt is used in its binary form. In that case, changing the encoding of the file will corrupt the salt if this binary stream is changed, even if the characters are correctly converted.
Since the first 128 characters are similar in UTF-8 and Mac OS Roma... | Thanks for the input, pointed me in the right direction. The solution is:
```
$salt = iconv('UTF-8', 'macintosh', $string);
``` |
3,211,437 | HI
I have the following (apparently simple) problem: I have to install a simple website, made by someone else, on a web hosting account. The site consists of lot and lot of HTML pages, no dynamic content, created some in MS Word and saved as html, some in frontpage, etc. A mixed bag.
I uploaded initially on a test ac... | 2010/07/09 | [
"https://Stackoverflow.com/questions/3211437",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/163124/"
] | You don't give enough information to confirm this, but I guess the salt is used in its binary form. In that case, changing the encoding of the file will corrupt the salt if this binary stream is changed, even if the characters are correctly converted.
Since the first 128 characters are similar in UTF-8 and Mac OS Roma... | For those who do not have access to iconv here is a function in PHP:
<http://sebastienguillon.com/test/jeux-de-caracteres/MacRoman_to_utf8.txt.php>
It will properly convert MacRoman text to UTF-8 and you can even decide how you want to break ligatures.
```
<?php
function MacRoman_to_utf8($str, $break_ligatures='none')... |
289,429 | I just added a second user to my Exchange 2010 box, it is in coexistence with exc2003. My account is already set up and working with a personal archive folder.
The user I just set up however is unable to see the archive in Outlook. It is visible in OWA but not outlook. I have created a test profile on my PC with the ... | 2011/07/12 | [
"https://serverfault.com/questions/289429",
"https://serverfault.com",
"https://serverfault.com/users/87374/"
] | Change the configuration of the `origin` remote. See the **REMOTES** section of the `git-push(1)` man page for details. | If I understood the situation, the following commands should set the information that you desire in for git configuration.
```
git config --global user.name "Your Name Comes Here"
git config --global user.email you@yourdomain.example.com
``` |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.