qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
1,714,723 | If I send remote data from Zend\_Amf to Flex, if two array properties on the object have the same data values they are deserialized at the remote end with the same memory storage.
Example: AS3 object:
Snippet:
```
[RemoteClass(alias="TestVO")]
public class TestVO
{
public var test1:Array;
public var test2:Array;... | 2009/11/11 | [
"https://Stackoverflow.com/questions/1714723",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/208620/"
] | AMF does this to gain some compression over the wire. If you don't want this then you can switch to the AMF0 format instead of AMF3. But I'm not sure how to do that with ZendAMF. | Found bug ZF-7634 on Zend Framework implementation of AMF. It is serializing the arrays incorrectly.
<http://framework.zend.com/issues/browse/ZF-7634> |
63,698 | Imagine two groups of people exploring the same location, but at different times. For convenience, think of the group exploring first as the "ancestors" and the group exploring later as the "descendants." It is easy to invent ways for the ancestors to affect the descendants. For example, they leave treasure buried and ... | 2016/12/07 | [
"https://worldbuilding.stackexchange.com/questions/63698",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/30587/"
] | That is simply not possible. Cause always precedes effect. The only way to change that would be to time travel (which OP excluded) | If you leave a giant red flashing button, someone is sure to press it. If you don't want it to be used (action that may happen in future), you can't design it to look like that (action happening now, depending on actions by your ancestors).
We don't want future people to open bunkers with barrels full of radioactive ... |
63,698 | Imagine two groups of people exploring the same location, but at different times. For convenience, think of the group exploring first as the "ancestors" and the group exploring later as the "descendants." It is easy to invent ways for the ancestors to affect the descendants. For example, they leave treasure buried and ... | 2016/12/07 | [
"https://worldbuilding.stackexchange.com/questions/63698",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/30587/"
] | Don't do what we did
====================
I don't know what your technology or magic level is going to be, but the classic example would be that the ancestors wish the decedents to avoid the mistakes they made that lead to turning their farmland into a desert, releasing the Dark One, or destroying their homeworld.
Th... | The descendants already have by their very existence have had an impact on the ancestors.
Their existence implies that the ancestors did and all their descendants did not go extinct.
In short, self-consistency. Anything that the descendants experience must be consistent with what the ancestors left behind.
This is a... |
63,698 | Imagine two groups of people exploring the same location, but at different times. For convenience, think of the group exploring first as the "ancestors" and the group exploring later as the "descendants." It is easy to invent ways for the ancestors to affect the descendants. For example, they leave treasure buried and ... | 2016/12/07 | [
"https://worldbuilding.stackexchange.com/questions/63698",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/30587/"
] | Don't do what we did
====================
I don't know what your technology or magic level is going to be, but the classic example would be that the ancestors wish the decedents to avoid the mistakes they made that lead to turning their farmland into a desert, releasing the Dark One, or destroying their homeworld.
Th... | I see 2 possibilities:
1. precognition
This has already been mentioned. The ancestors somehow know about the descendants and their actions. This still involves some "magic" and possible paradoxes.
2. guessing
The ancestors may know (or at least guess), that some people will explore the same location in the future... |
63,698 | Imagine two groups of people exploring the same location, but at different times. For convenience, think of the group exploring first as the "ancestors" and the group exploring later as the "descendants." It is easy to invent ways for the ancestors to affect the descendants. For example, they leave treasure buried and ... | 2016/12/07 | [
"https://worldbuilding.stackexchange.com/questions/63698",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/30587/"
] | You don't want time travel in the conventional sense, but to get what you want, you need to mess with time. More specifically, you need to mess with causality. You would have to come up with an entirely new physics in which causality points **both ways**. The implications of that are staggering and thinking it through ... | Another perspective that is not being considered is this: some ancient mythologies (and even contemporary philosophers like Nietzsche) advocated for a circular timeline.
IOW the time would flow in cycles. At the end of each cycle, time would be reset and another similar cycle would begin. The ancestors and the descend... |
63,698 | Imagine two groups of people exploring the same location, but at different times. For convenience, think of the group exploring first as the "ancestors" and the group exploring later as the "descendants." It is easy to invent ways for the ancestors to affect the descendants. For example, they leave treasure buried and ... | 2016/12/07 | [
"https://worldbuilding.stackexchange.com/questions/63698",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/30587/"
] | You don't want time travel in the conventional sense, but to get what you want, you need to mess with time. More specifically, you need to mess with causality. You would have to come up with an entirely new physics in which causality points **both ways**. The implications of that are staggering and thinking it through ... | If you leave a giant red flashing button, someone is sure to press it. If you don't want it to be used (action that may happen in future), you can't design it to look like that (action happening now, depending on actions by your ancestors).
We don't want future people to open bunkers with barrels full of radioactive ... |
63,698 | Imagine two groups of people exploring the same location, but at different times. For convenience, think of the group exploring first as the "ancestors" and the group exploring later as the "descendants." It is easy to invent ways for the ancestors to affect the descendants. For example, they leave treasure buried and ... | 2016/12/07 | [
"https://worldbuilding.stackexchange.com/questions/63698",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/30587/"
] | Don't do what we did
====================
I don't know what your technology or magic level is going to be, but the classic example would be that the ancestors wish the decedents to avoid the mistakes they made that lead to turning their farmland into a desert, releasing the Dark One, or destroying their homeworld.
Th... | You listed narrative connection as an option. Use it.
It is fairly common for events that happen later to affect the interpretation the reader gives to earlier events. The trivial example would be the classic detective story. A classic detective story will first give the reader a description of the actual events that ... |
63,698 | Imagine two groups of people exploring the same location, but at different times. For convenience, think of the group exploring first as the "ancestors" and the group exploring later as the "descendants." It is easy to invent ways for the ancestors to affect the descendants. For example, they leave treasure buried and ... | 2016/12/07 | [
"https://worldbuilding.stackexchange.com/questions/63698",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/30587/"
] | That is simply not possible. Cause always precedes effect. The only way to change that would be to time travel (which OP excluded) | Technically, if the two groups were relatives of one another, since the term "Ancestor" is defined as anyone you are descended from usually more distant than a grandparent (but not necessarily dead even though it is implied), it is possible for the actions of the descendants to affect the ancestors without the applicat... |
63,698 | Imagine two groups of people exploring the same location, but at different times. For convenience, think of the group exploring first as the "ancestors" and the group exploring later as the "descendants." It is easy to invent ways for the ancestors to affect the descendants. For example, they leave treasure buried and ... | 2016/12/07 | [
"https://worldbuilding.stackexchange.com/questions/63698",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/30587/"
] | You can come up with novel ways to describe time travel besides the obvious “time machine”, but retro-causality as you described **is** explicitly the very meaning of time travel. So no, you can not have retro-causality without time travel.
In the spirit of what you’re getting at, you might look into [delayed choice](... | Imagine if you can an entity that exists outside of time.
50 years ago your father fought a dragon and it took his eye. today you are fighting a dragon in the same place you father fought one 50 years ago.
It is the same dragon though as it exists outside of linear time.
From your perspective the strike you made ... |
63,698 | Imagine two groups of people exploring the same location, but at different times. For convenience, think of the group exploring first as the "ancestors" and the group exploring later as the "descendants." It is easy to invent ways for the ancestors to affect the descendants. For example, they leave treasure buried and ... | 2016/12/07 | [
"https://worldbuilding.stackexchange.com/questions/63698",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/30587/"
] | One classic alternative to time travel is premonition.
One of the ancestors is a seer, a person who can peer into the future.
Given enough cooperation, the seer can replace the typical 'push' request (aka travel back in time) with a 'pull' request: the seer peers into the future and follows advice of the descendant.
... | Don't do what we did
====================
I don't know what your technology or magic level is going to be, but the classic example would be that the ancestors wish the decedents to avoid the mistakes they made that lead to turning their farmland into a desert, releasing the Dark One, or destroying their homeworld.
Th... |
63,698 | Imagine two groups of people exploring the same location, but at different times. For convenience, think of the group exploring first as the "ancestors" and the group exploring later as the "descendants." It is easy to invent ways for the ancestors to affect the descendants. For example, they leave treasure buried and ... | 2016/12/07 | [
"https://worldbuilding.stackexchange.com/questions/63698",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/30587/"
] | Another perspective that is not being considered is this: some ancient mythologies (and even contemporary philosophers like Nietzsche) advocated for a circular timeline.
IOW the time would flow in cycles. At the end of each cycle, time would be reset and another similar cycle would begin. The ancestors and the descend... | The descendants already have by their very existence have had an impact on the ancestors.
Their existence implies that the ancestors did and all their descendants did not go extinct.
In short, self-consistency. Anything that the descendants experience must be consistent with what the ancestors left behind.
This is a... |
27,687,892 | i am using mobilefirst platform for hybrid application development.
I created an application in and created .apk file of this application:
Generated Android project folder -> Android tools -> Export unassigned application
I then copied this apk file to android device and try to install this .apk file. At this time... | 2014/12/29 | [
"https://Stackoverflow.com/questions/27687892",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4345217/"
] | ```
#define IS_OS_8_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
if (IS_OS_8_OR_LATER)
{
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationType... | Maybe instead of this:
```
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
```
Try this:
```
[application registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNo... |
27,687,892 | i am using mobilefirst platform for hybrid application development.
I created an application in and created .apk file of this application:
Generated Android project folder -> Android tools -> Export unassigned application
I then copied this apk file to android device and try to install this .apk file. At this time... | 2014/12/29 | [
"https://Stackoverflow.com/questions/27687892",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4345217/"
] | ```
#define IS_OS_8_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
if (IS_OS_8_OR_LATER)
{
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationType... | ```
/*--- Setup Push Notification ---*/
//For iOS 8
if ([UIApplication instancesRespondToSelector:@selector(registerUserNotificationSettings:)] && [UIApplication instancesRespondToSelector:@selector(registerForRemoteNotifications)])
{
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsFo... |
27,687,892 | i am using mobilefirst platform for hybrid application development.
I created an application in and created .apk file of this application:
Generated Android project folder -> Android tools -> Export unassigned application
I then copied this apk file to android device and try to install this .apk file. At this time... | 2014/12/29 | [
"https://Stackoverflow.com/questions/27687892",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4345217/"
] | ```
#define IS_OS_8_OR_LATER ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
if (IS_OS_8_OR_LATER)
{
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationType... | ```
if ([application respondsToSelector:@selector(isRegisteredForRemoteNotifications)])
{
// iOS 8 Notifications
[application registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) cate... |
58,409,126 | Because of the very specific nature of this question, I could not find an answer anywhere. Basically I want to create a messaging conversation with a specific user, but only if a conversation with that user doesn't already exist. I am looping through an array of conversations, and for each conversation I fetch the iden... | 2019/10/16 | [
"https://Stackoverflow.com/questions/58409126",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2142112/"
] | The classic solution for this is using dispatch-group
<https://developer.apple.com/documentation/dispatch/dispatchgroup>
There are many code examples for this. The idea is that each network call should be in a separate task and the system lets you know when all tasks are done (this is where you check "found"). | How about create callback function that will called when the all the request to check the convos is done, or when the correct convo is found.
```
func checkConvoIfExist(convos: [Convo]){
var found = false
var countCheck = 0
for convo in convos {
HTTPManager.getOtherUserFromConversation(conversatio... |
564,525 | inspired by [this question](https://stackoverflow.com/questions/1644/what-good-technology-podcasts-are-out-there) since i do not find any good sql casts out there and i fail to find any good ones to this day online. | 2009/02/19 | [
"https://Stackoverflow.com/questions/564525",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/41424/"
] | I don't listen to it (or any SQL podcasts for that matter), but I know of Greg Low's [SQL Down Under](http://www.sqldownunder.com/) and I believe it has a pretty good reputation. | Excellent question, I am always on the look out for good contet.
There are some good podcasts by the likes of Brent Ozar and chums over at SQL Server Pedia.
<http://sqlserverpedia.com/wiki/SQL_Server_Tutorials>
Cheers, John |
37,741,553 | I'm using the [CryptSharp Library](https://github.com/ChrisMcKee/cryptsharp) in my .NET (C#) client to hash a user's password with a randomly generated salt (Blowfish).
I then proceed to send the hashed password to my remote server where it is stored in a MySQL database.
When I attempt to login with the same plain te... | 2016/06/10 | [
"https://Stackoverflow.com/questions/37741553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1954141/"
] | The test bank account numbers for Stripe Connect can be found [here in their documentation](https://stripe.com/docs/connect/testing); to get the numbers for a specific country there's a little dropdown for you to select the relevant one. For convenience, the standard test bank account numbers below:
* US - 00012345678... | I suspect your HashMap is handling the account number as an integer and truncating the leading zeroes. The test account set up by Stripe must contain all 12 digits, including the 3 leading zeroes.
Stripe returned the same error message for me when I used an invalid account number (ex: 123456). The request went through... |
37,741,553 | I'm using the [CryptSharp Library](https://github.com/ChrisMcKee/cryptsharp) in my .NET (C#) client to hash a user's password with a randomly generated salt (Blowfish).
I then proceed to send the hashed password to my remote server where it is stored in a MySQL database.
When I attempt to login with the same plain te... | 2016/06/10 | [
"https://Stackoverflow.com/questions/37741553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1954141/"
] | I suspect your HashMap is handling the account number as an integer and truncating the leading zeroes. The test account set up by Stripe must contain all 12 digits, including the 3 leading zeroes.
Stripe returned the same error message for me when I used an invalid account number (ex: 123456). The request went through... | Bank number for JP
ACCOUNT ROUTING
00012345 1100000 |
37,741,553 | I'm using the [CryptSharp Library](https://github.com/ChrisMcKee/cryptsharp) in my .NET (C#) client to hash a user's password with a randomly generated salt (Blowfish).
I then proceed to send the hashed password to my remote server where it is stored in a MySQL database.
When I attempt to login with the same plain te... | 2016/06/10 | [
"https://Stackoverflow.com/questions/37741553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1954141/"
] | I suspect your HashMap is handling the account number as an integer and truncating the leading zeroes. The test account set up by Stripe must contain all 12 digits, including the 3 leading zeroes.
Stripe returned the same error message for me when I used an invalid account number (ex: 123456). The request went through... | Stripe connect credentials for United Kingdom account:
```
SSN: 000000000
Date: Any previous date
Account Number: 00012345
Routing: 110000000
```
It works for me. Thanks for asking this question. |
37,741,553 | I'm using the [CryptSharp Library](https://github.com/ChrisMcKee/cryptsharp) in my .NET (C#) client to hash a user's password with a randomly generated salt (Blowfish).
I then proceed to send the hashed password to my remote server where it is stored in a MySQL database.
When I attempt to login with the same plain te... | 2016/06/10 | [
"https://Stackoverflow.com/questions/37741553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1954141/"
] | I suspect your HashMap is handling the account number as an integer and truncating the leading zeroes. The test account set up by Stripe must contain all 12 digits, including the 3 leading zeroes.
Stripe returned the same error message for me when I used an invalid account number (ex: 123456). The request went through... | If anyone testing Au Becs Debit for Australian accounts, test bank accounts are listed for Connect here (although you may not be working on Stripe Connect). Hope it saves you a bit of time.
<https://stripe.com/docs/connect/testing> |
37,741,553 | I'm using the [CryptSharp Library](https://github.com/ChrisMcKee/cryptsharp) in my .NET (C#) client to hash a user's password with a randomly generated salt (Blowfish).
I then proceed to send the hashed password to my remote server where it is stored in a MySQL database.
When I attempt to login with the same plain te... | 2016/06/10 | [
"https://Stackoverflow.com/questions/37741553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1954141/"
] | The test bank account numbers for Stripe Connect can be found [here in their documentation](https://stripe.com/docs/connect/testing); to get the numbers for a specific country there's a little dropdown for you to select the relevant one. For convenience, the standard test bank account numbers below:
* US - 00012345678... | Bank number for JP
ACCOUNT ROUTING
00012345 1100000 |
37,741,553 | I'm using the [CryptSharp Library](https://github.com/ChrisMcKee/cryptsharp) in my .NET (C#) client to hash a user's password with a randomly generated salt (Blowfish).
I then proceed to send the hashed password to my remote server where it is stored in a MySQL database.
When I attempt to login with the same plain te... | 2016/06/10 | [
"https://Stackoverflow.com/questions/37741553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1954141/"
] | The test bank account numbers for Stripe Connect can be found [here in their documentation](https://stripe.com/docs/connect/testing); to get the numbers for a specific country there's a little dropdown for you to select the relevant one. For convenience, the standard test bank account numbers below:
* US - 00012345678... | Stripe connect credentials for United Kingdom account:
```
SSN: 000000000
Date: Any previous date
Account Number: 00012345
Routing: 110000000
```
It works for me. Thanks for asking this question. |
37,741,553 | I'm using the [CryptSharp Library](https://github.com/ChrisMcKee/cryptsharp) in my .NET (C#) client to hash a user's password with a randomly generated salt (Blowfish).
I then proceed to send the hashed password to my remote server where it is stored in a MySQL database.
When I attempt to login with the same plain te... | 2016/06/10 | [
"https://Stackoverflow.com/questions/37741553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1954141/"
] | The test bank account numbers for Stripe Connect can be found [here in their documentation](https://stripe.com/docs/connect/testing); to get the numbers for a specific country there's a little dropdown for you to select the relevant one. For convenience, the standard test bank account numbers below:
* US - 00012345678... | If anyone testing Au Becs Debit for Australian accounts, test bank accounts are listed for Connect here (although you may not be working on Stripe Connect). Hope it saves you a bit of time.
<https://stripe.com/docs/connect/testing> |
37,741,553 | I'm using the [CryptSharp Library](https://github.com/ChrisMcKee/cryptsharp) in my .NET (C#) client to hash a user's password with a randomly generated salt (Blowfish).
I then proceed to send the hashed password to my remote server where it is stored in a MySQL database.
When I attempt to login with the same plain te... | 2016/06/10 | [
"https://Stackoverflow.com/questions/37741553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1954141/"
] | Stripe connect credentials for United Kingdom account:
```
SSN: 000000000
Date: Any previous date
Account Number: 00012345
Routing: 110000000
```
It works for me. Thanks for asking this question. | Bank number for JP
ACCOUNT ROUTING
00012345 1100000 |
37,741,553 | I'm using the [CryptSharp Library](https://github.com/ChrisMcKee/cryptsharp) in my .NET (C#) client to hash a user's password with a randomly generated salt (Blowfish).
I then proceed to send the hashed password to my remote server where it is stored in a MySQL database.
When I attempt to login with the same plain te... | 2016/06/10 | [
"https://Stackoverflow.com/questions/37741553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1954141/"
] | If anyone testing Au Becs Debit for Australian accounts, test bank accounts are listed for Connect here (although you may not be working on Stripe Connect). Hope it saves you a bit of time.
<https://stripe.com/docs/connect/testing> | Bank number for JP
ACCOUNT ROUTING
00012345 1100000 |
37,741,553 | I'm using the [CryptSharp Library](https://github.com/ChrisMcKee/cryptsharp) in my .NET (C#) client to hash a user's password with a randomly generated salt (Blowfish).
I then proceed to send the hashed password to my remote server where it is stored in a MySQL database.
When I attempt to login with the same plain te... | 2016/06/10 | [
"https://Stackoverflow.com/questions/37741553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1954141/"
] | Stripe connect credentials for United Kingdom account:
```
SSN: 000000000
Date: Any previous date
Account Number: 00012345
Routing: 110000000
```
It works for me. Thanks for asking this question. | If anyone testing Au Becs Debit for Australian accounts, test bank accounts are listed for Connect here (although you may not be working on Stripe Connect). Hope it saves you a bit of time.
<https://stripe.com/docs/connect/testing> |
19,731,385 | I'm trying to blit an image to the screen when the event `K_SPACE` is triggered.
However, when I press space nothing happens. I've tried moving where the screen is updated or flipped, but i've hit a brick wall.
Here is my code:
```python
def Play():
background = pygame.image.load(bifPlay).convert()
char = ... | 2013/11/01 | [
"https://Stackoverflow.com/questions/19731385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2233480/"
] | You could fill the map of stores in the first while loop.
The following program demonstrates how to fill the map and how to iterate over the items in the map.
```
#include <iostream>
#include <vector>
#include <string>
#include <map>
typedef std::vector<std::string> items_t;
typedef std::pair<std::string, items_t> st... | Try to simplify the answer:
CreateList() should return a pair:
```
pair<string, vector<string>>
```
which is store\_name(string), item\_list(vector).
So that in main function, you can insert it to map > list:
```
list.insert(pair<string, vector<string>>);
```
Your other code looks good for me. |
100,376 | all. I'm thinking of transferring my UK websites to a US hosting company, and they assure me they can host UK domains. However, as a bit of a n00b I don't understand the relationship between UK domain registration and US hosting. If anyone can explain this relationship I'd be very grateful. What pitfalls and problems s... | 2010/01/07 | [
"https://serverfault.com/questions/100376",
"https://serverfault.com",
"https://serverfault.com/users/30989/"
] | You can host your UK sites in US, as the DNS do its job : convert name (with UK) to IP address. The IP address can be where you want on the world.
In fact, the problem is in the network bandwidth : if your users are in Europe, I think it is better to have the servers in Europe. You don't need to cross the sea to see y... | If it is a country-specific domain (ie .uk) then see the other very good answers. If it is a global TLD (eg. it is a .com domain) then Google.co.uk *may* no longer recognise that the site is UK-specific. This would then mean you stop appearing in UK-specific searches and appear lower down in general searches on google.... |
100,376 | all. I'm thinking of transferring my UK websites to a US hosting company, and they assure me they can host UK domains. However, as a bit of a n00b I don't understand the relationship between UK domain registration and US hosting. If anyone can explain this relationship I'd be very grateful. What pitfalls and problems s... | 2010/01/07 | [
"https://serverfault.com/questions/100376",
"https://serverfault.com",
"https://serverfault.com/users/30989/"
] | Actually, probably the biggest issue with offshore hosting is legal: are you guaranteed that your hosting provider is bound by the same privacy laws as your own country, and are you liable for breaches if they're not, especially if they are legally required to disclose things that you are required not to?
Consult your... | You can host .uk (or .co.uk, etc.) domains anywhere in the world. Think of it this way, .com is supposed to only be for USA, but you can host them in UK? So the opposite is true aswell. |
100,376 | all. I'm thinking of transferring my UK websites to a US hosting company, and they assure me they can host UK domains. However, as a bit of a n00b I don't understand the relationship between UK domain registration and US hosting. If anyone can explain this relationship I'd be very grateful. What pitfalls and problems s... | 2010/01/07 | [
"https://serverfault.com/questions/100376",
"https://serverfault.com",
"https://serverfault.com/users/30989/"
] | There's no relationship that matters between UK domain registrations and US hosting.
The only involvement your registrar (the company you registered your .uk domain with) has is to set the right IP addresses for your DNS servers; those DNS servers can be located anywhere in the world. It's fairly common for your regi... | There is no relation between the domain name and where it's hosted. You can host an UK domain name anywhere in the world.
What you should consider is:
* The distance to your visitors. You would want most of your users to be fairly close to the server hosting.
* The local time of the server. If the server is hosted in... |
100,376 | all. I'm thinking of transferring my UK websites to a US hosting company, and they assure me they can host UK domains. However, as a bit of a n00b I don't understand the relationship between UK domain registration and US hosting. If anyone can explain this relationship I'd be very grateful. What pitfalls and problems s... | 2010/01/07 | [
"https://serverfault.com/questions/100376",
"https://serverfault.com",
"https://serverfault.com/users/30989/"
] | There's no relationship that matters between UK domain registrations and US hosting.
The only involvement your registrar (the company you registered your .uk domain with) has is to set the right IP addresses for your DNS servers; those DNS servers can be located anywhere in the world. It's fairly common for your regi... | Actually, probably the biggest issue with offshore hosting is legal: are you guaranteed that your hosting provider is bound by the same privacy laws as your own country, and are you liable for breaches if they're not, especially if they are legally required to disclose things that you are required not to?
Consult your... |
100,376 | all. I'm thinking of transferring my UK websites to a US hosting company, and they assure me they can host UK domains. However, as a bit of a n00b I don't understand the relationship between UK domain registration and US hosting. If anyone can explain this relationship I'd be very grateful. What pitfalls and problems s... | 2010/01/07 | [
"https://serverfault.com/questions/100376",
"https://serverfault.com",
"https://serverfault.com/users/30989/"
] | There is no relation between the domain name and where it's hosted. You can host an UK domain name anywhere in the world.
What you should consider is:
* The distance to your visitors. You would want most of your users to be fairly close to the server hosting.
* The local time of the server. If the server is hosted in... | If it is a country-specific domain (ie .uk) then see the other very good answers. If it is a global TLD (eg. it is a .com domain) then Google.co.uk *may* no longer recognise that the site is UK-specific. This would then mean you stop appearing in UK-specific searches and appear lower down in general searches on google.... |
100,376 | all. I'm thinking of transferring my UK websites to a US hosting company, and they assure me they can host UK domains. However, as a bit of a n00b I don't understand the relationship between UK domain registration and US hosting. If anyone can explain this relationship I'd be very grateful. What pitfalls and problems s... | 2010/01/07 | [
"https://serverfault.com/questions/100376",
"https://serverfault.com",
"https://serverfault.com/users/30989/"
] | There's no relationship that matters between UK domain registrations and US hosting.
The only involvement your registrar (the company you registered your .uk domain with) has is to set the right IP addresses for your DNS servers; those DNS servers can be located anywhere in the world. It's fairly common for your regi... | If it is a country-specific domain (ie .uk) then see the other very good answers. If it is a global TLD (eg. it is a .com domain) then Google.co.uk *may* no longer recognise that the site is UK-specific. This would then mean you stop appearing in UK-specific searches and appear lower down in general searches on google.... |
100,376 | all. I'm thinking of transferring my UK websites to a US hosting company, and they assure me they can host UK domains. However, as a bit of a n00b I don't understand the relationship between UK domain registration and US hosting. If anyone can explain this relationship I'd be very grateful. What pitfalls and problems s... | 2010/01/07 | [
"https://serverfault.com/questions/100376",
"https://serverfault.com",
"https://serverfault.com/users/30989/"
] | There's no relationship that matters between UK domain registrations and US hosting.
The only involvement your registrar (the company you registered your .uk domain with) has is to set the right IP addresses for your DNS servers; those DNS servers can be located anywhere in the world. It's fairly common for your regi... | You can host your UK sites in US, as the DNS do its job : convert name (with UK) to IP address. The IP address can be where you want on the world.
In fact, the problem is in the network bandwidth : if your users are in Europe, I think it is better to have the servers in Europe. You don't need to cross the sea to see y... |
100,376 | all. I'm thinking of transferring my UK websites to a US hosting company, and they assure me they can host UK domains. However, as a bit of a n00b I don't understand the relationship between UK domain registration and US hosting. If anyone can explain this relationship I'd be very grateful. What pitfalls and problems s... | 2010/01/07 | [
"https://serverfault.com/questions/100376",
"https://serverfault.com",
"https://serverfault.com/users/30989/"
] | Actually, probably the biggest issue with offshore hosting is legal: are you guaranteed that your hosting provider is bound by the same privacy laws as your own country, and are you liable for breaches if they're not, especially if they are legally required to disclose things that you are required not to?
Consult your... | You can host your UK sites in US, as the DNS do its job : convert name (with UK) to IP address. The IP address can be where you want on the world.
In fact, the problem is in the network bandwidth : if your users are in Europe, I think it is better to have the servers in Europe. You don't need to cross the sea to see y... |
100,376 | all. I'm thinking of transferring my UK websites to a US hosting company, and they assure me they can host UK domains. However, as a bit of a n00b I don't understand the relationship between UK domain registration and US hosting. If anyone can explain this relationship I'd be very grateful. What pitfalls and problems s... | 2010/01/07 | [
"https://serverfault.com/questions/100376",
"https://serverfault.com",
"https://serverfault.com/users/30989/"
] | You can host your UK sites in US, as the DNS do its job : convert name (with UK) to IP address. The IP address can be where you want on the world.
In fact, the problem is in the network bandwidth : if your users are in Europe, I think it is better to have the servers in Europe. You don't need to cross the sea to see y... | You can host .uk (or .co.uk, etc.) domains anywhere in the world. Think of it this way, .com is supposed to only be for USA, but you can host them in UK? So the opposite is true aswell. |
100,376 | all. I'm thinking of transferring my UK websites to a US hosting company, and they assure me they can host UK domains. However, as a bit of a n00b I don't understand the relationship between UK domain registration and US hosting. If anyone can explain this relationship I'd be very grateful. What pitfalls and problems s... | 2010/01/07 | [
"https://serverfault.com/questions/100376",
"https://serverfault.com",
"https://serverfault.com/users/30989/"
] | There is no relation between the domain name and where it's hosted. You can host an UK domain name anywhere in the world.
What you should consider is:
* The distance to your visitors. You would want most of your users to be fairly close to the server hosting.
* The local time of the server. If the server is hosted in... | You can host .uk (or .co.uk, etc.) domains anywhere in the world. Think of it this way, .com is supposed to only be for USA, but you can host them in UK? So the opposite is true aswell. |
36,854,054 | In the android source code I see they define four variables as
```
protected int mPaddingRight = 0;
protected int mPaddingLeft = 0;
protected int mPaddingTop;
protected int mPaddingBottom;
```
In Java, what is the difference in initializing a variable to 0 or not? I don’t understand that in some compilers I cannot d... | 2016/04/26 | [
"https://Stackoverflow.com/questions/36854054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5641865/"
] | According to [Java primitive data types turorial](http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html) , all primitive data types have a default value. So the initialization it's implicit. A good practice: initialize values before using to prevent unexpected behavior.
```
byte 0
short 0
int 0
... | As noted in the comments, *no there is no difference*. They'll be initalized with 0 implicitly. However if you use good IDE or have other tools, it would be really easy for you to search and replace `= 0;` with `= SomeOtherValueHere;`.
Also I think it is a good practice to always initialzie your variables before you ... |
36,854,054 | In the android source code I see they define four variables as
```
protected int mPaddingRight = 0;
protected int mPaddingLeft = 0;
protected int mPaddingTop;
protected int mPaddingBottom;
```
In Java, what is the difference in initializing a variable to 0 or not? I don’t understand that in some compilers I cannot d... | 2016/04/26 | [
"https://Stackoverflow.com/questions/36854054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5641865/"
] | According to [Java primitive data types turorial](http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html) , all primitive data types have a default value. So the initialization it's implicit. A good practice: initialize values before using to prevent unexpected behavior.
```
byte 0
short 0
int 0
... | It is a good coding practice to initialize variables.
From Oracle Docs:
>
> It's not always necessary to assign a value when a field is declared.
> Fields that are declared but not initialized will be set to a
> reasonable default by the compiler. Generally speaking, this default
> will be zero or null, depending... |
36,854,054 | In the android source code I see they define four variables as
```
protected int mPaddingRight = 0;
protected int mPaddingLeft = 0;
protected int mPaddingTop;
protected int mPaddingBottom;
```
In Java, what is the difference in initializing a variable to 0 or not? I don’t understand that in some compilers I cannot d... | 2016/04/26 | [
"https://Stackoverflow.com/questions/36854054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5641865/"
] | According to [Java primitive data types turorial](http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html) , all primitive data types have a default value. So the initialization it's implicit. A good practice: initialize values before using to prevent unexpected behavior.
```
byte 0
short 0
int 0
... | Others have pointed out that class properties are initialized to default values for you.
So, semantically, there is no difference if you set them explicitly to 0 (or, for object properties, set those to null.)
However, there may in fact be a difference at the bytecode level. There is no guarantee that code that diffe... |
36,854,054 | In the android source code I see they define four variables as
```
protected int mPaddingRight = 0;
protected int mPaddingLeft = 0;
protected int mPaddingTop;
protected int mPaddingBottom;
```
In Java, what is the difference in initializing a variable to 0 or not? I don’t understand that in some compilers I cannot d... | 2016/04/26 | [
"https://Stackoverflow.com/questions/36854054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5641865/"
] | According to [Java primitive data types turorial](http://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html) , all primitive data types have a default value. So the initialization it's implicit. A good practice: initialize values before using to prevent unexpected behavior.
```
byte 0
short 0
int 0
... | Local variables must be initialized before use.
```
class Main {
public static void main(String[] args) {
int x;
System.out.println(x);
}
}
```
This code does not compile. However instance variables (or class in case they are `static`) have default values. |
36,854,054 | In the android source code I see they define four variables as
```
protected int mPaddingRight = 0;
protected int mPaddingLeft = 0;
protected int mPaddingTop;
protected int mPaddingBottom;
```
In Java, what is the difference in initializing a variable to 0 or not? I don’t understand that in some compilers I cannot d... | 2016/04/26 | [
"https://Stackoverflow.com/questions/36854054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5641865/"
] | It is a good coding practice to initialize variables.
From Oracle Docs:
>
> It's not always necessary to assign a value when a field is declared.
> Fields that are declared but not initialized will be set to a
> reasonable default by the compiler. Generally speaking, this default
> will be zero or null, depending... | As noted in the comments, *no there is no difference*. They'll be initalized with 0 implicitly. However if you use good IDE or have other tools, it would be really easy for you to search and replace `= 0;` with `= SomeOtherValueHere;`.
Also I think it is a good practice to always initialzie your variables before you ... |
36,854,054 | In the android source code I see they define four variables as
```
protected int mPaddingRight = 0;
protected int mPaddingLeft = 0;
protected int mPaddingTop;
protected int mPaddingBottom;
```
In Java, what is the difference in initializing a variable to 0 or not? I don’t understand that in some compilers I cannot d... | 2016/04/26 | [
"https://Stackoverflow.com/questions/36854054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5641865/"
] | As noted in the comments, *no there is no difference*. They'll be initalized with 0 implicitly. However if you use good IDE or have other tools, it would be really easy for you to search and replace `= 0;` with `= SomeOtherValueHere;`.
Also I think it is a good practice to always initialzie your variables before you ... | Others have pointed out that class properties are initialized to default values for you.
So, semantically, there is no difference if you set them explicitly to 0 (or, for object properties, set those to null.)
However, there may in fact be a difference at the bytecode level. There is no guarantee that code that diffe... |
36,854,054 | In the android source code I see they define four variables as
```
protected int mPaddingRight = 0;
protected int mPaddingLeft = 0;
protected int mPaddingTop;
protected int mPaddingBottom;
```
In Java, what is the difference in initializing a variable to 0 or not? I don’t understand that in some compilers I cannot d... | 2016/04/26 | [
"https://Stackoverflow.com/questions/36854054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5641865/"
] | Local variables must be initialized before use.
```
class Main {
public static void main(String[] args) {
int x;
System.out.println(x);
}
}
```
This code does not compile. However instance variables (or class in case they are `static`) have default values. | As noted in the comments, *no there is no difference*. They'll be initalized with 0 implicitly. However if you use good IDE or have other tools, it would be really easy for you to search and replace `= 0;` with `= SomeOtherValueHere;`.
Also I think it is a good practice to always initialzie your variables before you ... |
36,854,054 | In the android source code I see they define four variables as
```
protected int mPaddingRight = 0;
protected int mPaddingLeft = 0;
protected int mPaddingTop;
protected int mPaddingBottom;
```
In Java, what is the difference in initializing a variable to 0 or not? I don’t understand that in some compilers I cannot d... | 2016/04/26 | [
"https://Stackoverflow.com/questions/36854054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5641865/"
] | It is a good coding practice to initialize variables.
From Oracle Docs:
>
> It's not always necessary to assign a value when a field is declared.
> Fields that are declared but not initialized will be set to a
> reasonable default by the compiler. Generally speaking, this default
> will be zero or null, depending... | Others have pointed out that class properties are initialized to default values for you.
So, semantically, there is no difference if you set them explicitly to 0 (or, for object properties, set those to null.)
However, there may in fact be a difference at the bytecode level. There is no guarantee that code that diffe... |
36,854,054 | In the android source code I see they define four variables as
```
protected int mPaddingRight = 0;
protected int mPaddingLeft = 0;
protected int mPaddingTop;
protected int mPaddingBottom;
```
In Java, what is the difference in initializing a variable to 0 or not? I don’t understand that in some compilers I cannot d... | 2016/04/26 | [
"https://Stackoverflow.com/questions/36854054",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5641865/"
] | Local variables must be initialized before use.
```
class Main {
public static void main(String[] args) {
int x;
System.out.println(x);
}
}
```
This code does not compile. However instance variables (or class in case they are `static`) have default values. | Others have pointed out that class properties are initialized to default values for you.
So, semantically, there is no difference if you set them explicitly to 0 (or, for object properties, set those to null.)
However, there may in fact be a difference at the bytecode level. There is no guarantee that code that diffe... |
59,952,726 | Having a very strange problem. I have two systems (my desktop and my laptop). Both are running Windows 10 and PowerShell 5.1. On my desktop, the division works without problem, but on my laptop, I get the below op\_Division error where it says that it is an object (but the division works fine on the other system). I tr... | 2020/01/28 | [
"https://Stackoverflow.com/questions/59952726",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/524587/"
] | This could be happening because `$width` is an array. If you run `$width.PsObject` you can see the `BaseObject` value will be a collection possibly containing `$null`. When you run `$width[0]` you may be returning the `$null` value. You will need to use another index with your current code.
However, you could filter o... | You have multiple monitors and Get-WMIObject is returning an array so use this:
```
Get-WmiObject -Class Win32_DesktopMonitor | Select-Object ScreenWidth | ForEach {
[Double]$width = [Double]$_.ScreenWidth[0]
$width = $width / 2
}
``` |
211,715 | I'm extremely new to home improvement and am seeking some input from people far more experienced than myself on the following project. In short, I want to install a punching bag in my garage. The bag (see [here](https://rads.stackoverflow.com/amzn/click/com/B08CGHKXW4)) itself will be attached to a Spider Mount (see [h... | 2020/12/20 | [
"https://diy.stackexchange.com/questions/211715",
"https://diy.stackexchange.com",
"https://diy.stackexchange.com/users/127406/"
] | You'd have to install some more supports to your framing in order to prevent damage to the existing framing members. I'd also suggest mounting the Heavy Bag as close to a wall as possible rather than mid-span.
The ceiling joists will be carrying most of the weight and jolts. The ideal support would include a vertical s... | I would strongly suggest that you use a couple of LONG planks (or a long beam) that **span at least 3 or 4** of your ceiling joists, set **on top** of them (since you don't indicate that *you* are using the space on top of the plywood for storage.)
That is a very lightly built structure - you'll want to load it as lig... |
15,699,522 | I have following loc in one of my view pages:
```
@* Html.Partial("Form")*@
@{
var role = Convert.ToInt32(Session["Role"]);
if (role == 2)
{
Html.Partial("Form");
}
}
```
The `Html.Partial("Form")` works fine when its outside any if statement and renders everything fine.
But when Inside a... | 2013/03/29 | [
"https://Stackoverflow.com/questions/15699522",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/971741/"
] | You should use RenderPartial method when you are inside a code block.
```
Html.RenderPartial("Form");
```
Html.Partial returns an HtmlString which would be rendered to the page if it wasn't inside a code block. In your case Razor parses your view and returns the result to your code. Since you don't do anything to re... | Try replacing:
```
Html.Partial("Form"); // <- this will return string
```
with:
```
Html.RenderPartial("Form"); // <- writes to response
```
[Html.Partial vs Html.RenderPartial & Html.Action vs Html.RenderAction](https://stackoverflow.com/questions/5248183/html-partial-vs-html-renderpartial-html-action-vs-html-r... |
28,165,452 | We have a WebApi2 project within a solution.
The solution has multiple startup projects and the WebApi2 project has a setting not to open any page. I set this settings and checkin the solution in TFS.
Other developers get the latest sources, but these settings are gone (or reset to default)?
Are these settings per-u... | 2015/01/27 | [
"https://Stackoverflow.com/questions/28165452",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/524861/"
] | No, you can't share those properties. Visual Studio thinks some properties are user based, like what project to start when debugging, the build mode, etc.
This is just something they found most useful on a user basis, not on a project basis. You could put the `*.user` files in your version control system too. Then all... | The startup project is stored in the .suo file in Visual Studio. However, the .suo files have a bunch of other user-specific (and probably machine specific) cruft in them that make them not suitable for committing to source control.
However, there might be some options for you:
* [The slnStartupProject on github](ht... |
67,330,740 | I'm having troubles with datatype inference and therefore I decided to map datatype manually, however I have discovered I can't recognize Pandas datatype as expected.
```
import pyarrow as pa
import pyarrow.parquet as pq
import pandas as pd
pd_to_pa_dtypes = {"object": pa.string(), "string": pa.string(), "double": pa... | 2021/04/30 | [
"https://Stackoverflow.com/questions/67330740",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12425142/"
] | The problem is:
```
type(df[0].dtype) # is numpy.dtype and not str
```
therefore when you try to access the value in `pd_to_pa_dtypes` dictionary you get an error as `df[0].dtype` it is not the same as the key `str` you have in `pd_to_pa_dtypes`.
Now to your next potential question, you get true when your run the f... | what happens if you try convert\_dtypes() in Pandas to Convert columns to best possible dtypes using dtype. <https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.convert_dtypes.html> |
2,928,019 | How do you know what are the top stories or hot topics just in RSS feed aggregator NewsNow for example??
Could you please explain?
I am new to Ruby on Rails. I want to build a RSS reader in Ruby on Rails. Could you suggest me some good tutorials or links??
Thanks
Gautam | 2010/05/28 | [
"https://Stackoverflow.com/questions/2928019",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/351132/"
] | I'm working with EhCache for Hibernate and for application level cache since 3 years ago.
We use it with RMI for cache invalidation and it works really good. If you use the cache for replication you should take care about the object graph, it could turn very heavy with high cardinality relations.
If you use EhCache fo... | Also check out [Hazelcast](http://www.hazelcast.com/documentation.jsp#HibernateSecondLevelCache), [Coherence](http://www.oracle.com/technology/products/coherence/index.html) and [GemStone](http://gemstone.com/products/gemfire). These are distributed caching solutions with Query support. They also have ready-to-go secon... |
324,062 | I purchased a game from Steam, but my computer storage is completely full, I've tried many methods to get rid of unwanted stuff taking up my storage, but nothing worked. If you have any suggestions, then please tell me them.) I have an extra USB drive but I don't know if it will work. | 2018/01/01 | [
"https://gaming.stackexchange.com/questions/324062",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/202796/"
] | You can use your USB drive as an external steam library just like any other drive. But beware, a mere 16GB (on a decent USB) or even 64GB on an expensive USB won't be able to store many games. USBs are also prone to corruption and data loss. Therefore it may be a short term solution but it won't be an effective strateg... | I mean if it's steam stuff, you can put them wherever you want but you do need steam to run them.
Getting rid of stuff, try using ccleaner, and uninstall stuff you don't need. If there's stuff you play once per year, just uninstall them and install them when you do need them.
Best Regards! |
5,787,130 | Scenario: building a RoR enviroment locally for development. Production is on EngineYard / GitHub. All now working ok, except DB isn't importing.
I have a .sql file that i've taken from my prod EY site. Now i need to import it to my MySQL locally. I'm using Workbench (as i'm new to this), but getting error below.
P... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5787130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/721628/"
] | Similar to brynn's answer, simply modify your SQL file and insert the following line at the very top:
```
use yourdatabasename
```
Replacing `yourdatabasename` with the database into which you are trying to import. Also, this database should already be created (albeit empty) before you import into it. | The above command line is correct. I found I have to do this when importing .sql files from older versions of MySQL. I also found I had to edit the .sql file (top of the file) and set the db name to be the same as the blank db you create before doing the import. |
5,787,130 | Scenario: building a RoR enviroment locally for development. Production is on EngineYard / GitHub. All now working ok, except DB isn't importing.
I have a .sql file that i've taken from my prod EY site. Now i need to import it to my MySQL locally. I'm using Workbench (as i'm new to this), but getting error below.
P... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5787130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/721628/"
] | Not used Workbench too much however it's easy enough to do from command line have a look at [this](http://www.techiecorner.com/31/how-to-restore-mysql-database-from-sql-dump-file/) (below phpMyAdmin instructions)
The command you're after is:
`mysql -u #username# -p #database# < #dump_file#` | Simply by choosing your target schema

**As I circled in above image** |
5,787,130 | Scenario: building a RoR enviroment locally for development. Production is on EngineYard / GitHub. All now working ok, except DB isn't importing.
I have a .sql file that i've taken from my prod EY site. Now i need to import it to my MySQL locally. I'm using Workbench (as i'm new to this), but getting error below.
P... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5787130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/721628/"
] | Workbench doesn't know the database (schema) you want to use.
In workbench, when using Data Import/Restore, just below where you choose the file to import, it asks "Default Schema to be Imported To"
Just choose the database (schema) you want it to use from the dropdown titled Default Target Schema. If you don't have ... | Simply by choosing your target schema

**As I circled in above image** |
5,787,130 | Scenario: building a RoR enviroment locally for development. Production is on EngineYard / GitHub. All now working ok, except DB isn't importing.
I have a .sql file that i've taken from my prod EY site. Now i need to import it to my MySQL locally. I'm using Workbench (as i'm new to this), but getting error below.
P... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5787130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/721628/"
] | Workbench doesn't know the database (schema) you want to use.
In workbench, when using Data Import/Restore, just below where you choose the file to import, it asks "Default Schema to be Imported To"
Just choose the database (schema) you want it to use from the dropdown titled Default Target Schema. If you don't have ... | Not used Workbench too much however it's easy enough to do from command line have a look at [this](http://www.techiecorner.com/31/how-to-restore-mysql-database-from-sql-dump-file/) (below phpMyAdmin instructions)
The command you're after is:
`mysql -u #username# -p #database# < #dump_file#` |
5,787,130 | Scenario: building a RoR enviroment locally for development. Production is on EngineYard / GitHub. All now working ok, except DB isn't importing.
I have a .sql file that i've taken from my prod EY site. Now i need to import it to my MySQL locally. I'm using Workbench (as i'm new to this), but getting error below.
P... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5787130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/721628/"
] | Not used Workbench too much however it's easy enough to do from command line have a look at [this](http://www.techiecorner.com/31/how-to-restore-mysql-database-from-sql-dump-file/) (below phpMyAdmin instructions)
The command you're after is:
`mysql -u #username# -p #database# < #dump_file#` | Here's another option that worked for me. I'm using MySQL 5.5 on a VM I set up for importing a large MySQL .sql dump that contained: 1). a create table statement 2). insert statements for inserting a large amount of data into the table.
at the MySQL command line client prompt type:
```
use yourdatabasename
source d:... |
5,787,130 | Scenario: building a RoR enviroment locally for development. Production is on EngineYard / GitHub. All now working ok, except DB isn't importing.
I have a .sql file that i've taken from my prod EY site. Now i need to import it to my MySQL locally. I'm using Workbench (as i'm new to this), but getting error below.
P... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5787130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/721628/"
] | Not used Workbench too much however it's easy enough to do from command line have a look at [this](http://www.techiecorner.com/31/how-to-restore-mysql-database-from-sql-dump-file/) (below phpMyAdmin instructions)
The command you're after is:
`mysql -u #username# -p #database# < #dump_file#` | The above command line is correct. I found I have to do this when importing .sql files from older versions of MySQL. I also found I had to edit the .sql file (top of the file) and set the db name to be the same as the blank db you create before doing the import. |
5,787,130 | Scenario: building a RoR enviroment locally for development. Production is on EngineYard / GitHub. All now working ok, except DB isn't importing.
I have a .sql file that i've taken from my prod EY site. Now i need to import it to my MySQL locally. I'm using Workbench (as i'm new to this), but getting error below.
P... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5787130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/721628/"
] | Not used Workbench too much however it's easy enough to do from command line have a look at [this](http://www.techiecorner.com/31/how-to-restore-mysql-database-from-sql-dump-file/) (below phpMyAdmin instructions)
The command you're after is:
`mysql -u #username# -p #database# < #dump_file#` | Similar to brynn's answer, simply modify your SQL file and insert the following line at the very top:
```
use yourdatabasename
```
Replacing `yourdatabasename` with the database into which you are trying to import. Also, this database should already be created (albeit empty) before you import into it. |
5,787,130 | Scenario: building a RoR enviroment locally for development. Production is on EngineYard / GitHub. All now working ok, except DB isn't importing.
I have a .sql file that i've taken from my prod EY site. Now i need to import it to my MySQL locally. I'm using Workbench (as i'm new to this), but getting error below.
P... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5787130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/721628/"
] | Simply by choosing your target schema

**As I circled in above image** | The above command line is correct. I found I have to do this when importing .sql files from older versions of MySQL. I also found I had to edit the .sql file (top of the file) and set the db name to be the same as the blank db you create before doing the import. |
5,787,130 | Scenario: building a RoR enviroment locally for development. Production is on EngineYard / GitHub. All now working ok, except DB isn't importing.
I have a .sql file that i've taken from my prod EY site. Now i need to import it to my MySQL locally. I'm using Workbench (as i'm new to this), but getting error below.
P... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5787130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/721628/"
] | Similar to brynn's answer, simply modify your SQL file and insert the following line at the very top:
```
use yourdatabasename
```
Replacing `yourdatabasename` with the database into which you are trying to import. Also, this database should already be created (albeit empty) before you import into it. | Here's another option that worked for me. I'm using MySQL 5.5 on a VM I set up for importing a large MySQL .sql dump that contained: 1). a create table statement 2). insert statements for inserting a large amount of data into the table.
at the MySQL command line client prompt type:
```
use yourdatabasename
source d:... |
5,787,130 | Scenario: building a RoR enviroment locally for development. Production is on EngineYard / GitHub. All now working ok, except DB isn't importing.
I have a .sql file that i've taken from my prod EY site. Now i need to import it to my MySQL locally. I'm using Workbench (as i'm new to this), but getting error below.
P... | 2011/04/26 | [
"https://Stackoverflow.com/questions/5787130",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/721628/"
] | Workbench doesn't know the database (schema) you want to use.
In workbench, when using Data Import/Restore, just below where you choose the file to import, it asks "Default Schema to be Imported To"
Just choose the database (schema) you want it to use from the dropdown titled Default Target Schema. If you don't have ... | The above command line is correct. I found I have to do this when importing .sql files from older versions of MySQL. I also found I had to edit the .sql file (top of the file) and set the db name to be the same as the blank db you create before doing the import. |
96,683 | I am the most junior software developer on a small team. Having less than a year of experience myself, I naturally spend much of my time trying to learn as much as I can from my mentors.
However, I'm having some trouble determining proper etiquette in asking "why?" without appearing unprofessional. To clarify, this is... | 2017/08/07 | [
"https://workplace.stackexchange.com/questions/96683",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/75202/"
] | >
> So are there any suggestions for diplomatically asking for rationale
> behind a decision without appearing to question someone's competence?
>
>
>
When you encounter this sort of situation, make it clear that you accept their suggestion, then also ask for the reasoning behind the suggestion.
>
> They: Do it... | Often phrasing can make it clear that you're trying to fill in gaps instead of challenging someone else's approach. It can help to start by declaring your confusion.
A PM I worked with early in my career would often phrase questions as, "Can you help me understand why we need to use ASCII mode for that transfer?". It ... |
96,683 | I am the most junior software developer on a small team. Having less than a year of experience myself, I naturally spend much of my time trying to learn as much as I can from my mentors.
However, I'm having some trouble determining proper etiquette in asking "why?" without appearing unprofessional. To clarify, this is... | 2017/08/07 | [
"https://workplace.stackexchange.com/questions/96683",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/75202/"
] | **Just be honest. Your colleagues probably understand.**
One of the most effective and admirable qualities of a critical thinker is the willingness to *Ask Why.* This is one of the most effective ways to learn, as well as the main way of leveraging the advantage of having a variety of different people with different i... | People understand learning curve, they all went through it too. Some are grumps, secretive, or too impatient, but most will tend to understand and know that if they explain reasoning once, and you listen, they most things they will not need to explain multiple times. Most experienced people in fact want you to ask ques... |
96,683 | I am the most junior software developer on a small team. Having less than a year of experience myself, I naturally spend much of my time trying to learn as much as I can from my mentors.
However, I'm having some trouble determining proper etiquette in asking "why?" without appearing unprofessional. To clarify, this is... | 2017/08/07 | [
"https://workplace.stackexchange.com/questions/96683",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/75202/"
] | People understand learning curve, they all went through it too. Some are grumps, secretive, or too impatient, but most will tend to understand and know that if they explain reasoning once, and you listen, they most things they will not need to explain multiple times. Most experienced people in fact want you to ask ques... | I don't there's any harm in questioning why, i do think you need to think in if it's the right time to make the question.
**State of mind / Crunch time / Stressfull sprint**
If people are stressed out with work or very busy, unless is crucial to understand why, i would take a note and ask the question on a more appro... |
96,683 | I am the most junior software developer on a small team. Having less than a year of experience myself, I naturally spend much of my time trying to learn as much as I can from my mentors.
However, I'm having some trouble determining proper etiquette in asking "why?" without appearing unprofessional. To clarify, this is... | 2017/08/07 | [
"https://workplace.stackexchange.com/questions/96683",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/75202/"
] | There are a few ways to deal with this, but for me I've found the best to be:
>
> * Can you explain that to me?
> * Can you quickly clarify what this part is for?
> * Is the purpose of this line here to ***do XYZ***? Or something else?
>
>
>
By framing questions like this, you're automatically putting your senior... | Firstly, accept positive feedback. If you're praised for something, with no caveats whatever, then keep doing it!
That said, the main thing you can do here to avoid causing offence or discomfort, is to be prepared for the possibility that the person making the decision *doesn't really know* why they prefer A to B, and... |
96,683 | I am the most junior software developer on a small team. Having less than a year of experience myself, I naturally spend much of my time trying to learn as much as I can from my mentors.
However, I'm having some trouble determining proper etiquette in asking "why?" without appearing unprofessional. To clarify, this is... | 2017/08/07 | [
"https://workplace.stackexchange.com/questions/96683",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/75202/"
] | Often phrasing can make it clear that you're trying to fill in gaps instead of challenging someone else's approach. It can help to start by declaring your confusion.
A PM I worked with early in my career would often phrase questions as, "Can you help me understand why we need to use ASCII mode for that transfer?". It ... | People understand learning curve, they all went through it too. Some are grumps, secretive, or too impatient, but most will tend to understand and know that if they explain reasoning once, and you listen, they most things they will not need to explain multiple times. Most experienced people in fact want you to ask ques... |
96,683 | I am the most junior software developer on a small team. Having less than a year of experience myself, I naturally spend much of my time trying to learn as much as I can from my mentors.
However, I'm having some trouble determining proper etiquette in asking "why?" without appearing unprofessional. To clarify, this is... | 2017/08/07 | [
"https://workplace.stackexchange.com/questions/96683",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/75202/"
] | Often phrasing can make it clear that you're trying to fill in gaps instead of challenging someone else's approach. It can help to start by declaring your confusion.
A PM I worked with early in my career would often phrase questions as, "Can you help me understand why we need to use ASCII mode for that transfer?". It ... | There are a few ways to deal with this, but for me I've found the best to be:
>
> * Can you explain that to me?
> * Can you quickly clarify what this part is for?
> * Is the purpose of this line here to ***do XYZ***? Or something else?
>
>
>
By framing questions like this, you're automatically putting your senior... |
96,683 | I am the most junior software developer on a small team. Having less than a year of experience myself, I naturally spend much of my time trying to learn as much as I can from my mentors.
However, I'm having some trouble determining proper etiquette in asking "why?" without appearing unprofessional. To clarify, this is... | 2017/08/07 | [
"https://workplace.stackexchange.com/questions/96683",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/75202/"
] | **Just be honest. Your colleagues probably understand.**
One of the most effective and admirable qualities of a critical thinker is the willingness to *Ask Why.* This is one of the most effective ways to learn, as well as the main way of leveraging the advantage of having a variety of different people with different i... | Often phrasing can make it clear that you're trying to fill in gaps instead of challenging someone else's approach. It can help to start by declaring your confusion.
A PM I worked with early in my career would often phrase questions as, "Can you help me understand why we need to use ASCII mode for that transfer?". It ... |
96,683 | I am the most junior software developer on a small team. Having less than a year of experience myself, I naturally spend much of my time trying to learn as much as I can from my mentors.
However, I'm having some trouble determining proper etiquette in asking "why?" without appearing unprofessional. To clarify, this is... | 2017/08/07 | [
"https://workplace.stackexchange.com/questions/96683",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/75202/"
] | There are a few ways to deal with this, but for me I've found the best to be:
>
> * Can you explain that to me?
> * Can you quickly clarify what this part is for?
> * Is the purpose of this line here to ***do XYZ***? Or something else?
>
>
>
By framing questions like this, you're automatically putting your senior... | People understand learning curve, they all went through it too. Some are grumps, secretive, or too impatient, but most will tend to understand and know that if they explain reasoning once, and you listen, they most things they will not need to explain multiple times. Most experienced people in fact want you to ask ques... |
96,683 | I am the most junior software developer on a small team. Having less than a year of experience myself, I naturally spend much of my time trying to learn as much as I can from my mentors.
However, I'm having some trouble determining proper etiquette in asking "why?" without appearing unprofessional. To clarify, this is... | 2017/08/07 | [
"https://workplace.stackexchange.com/questions/96683",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/75202/"
] | Firstly, accept positive feedback. If you're praised for something, with no caveats whatever, then keep doing it!
That said, the main thing you can do here to avoid causing offence or discomfort, is to be prepared for the possibility that the person making the decision *doesn't really know* why they prefer A to B, and... | Maybe to soften it a bit "Why do you do it that way?" or "Why that way?" In 25+ years, I haven't met many devs who take offense to "Why?" no matter how it is asked.
You run into problem is when you aren't asking "Why?" so much as implying "You are doing it wrong." This is the difference between "Why do you do it that ... |
96,683 | I am the most junior software developer on a small team. Having less than a year of experience myself, I naturally spend much of my time trying to learn as much as I can from my mentors.
However, I'm having some trouble determining proper etiquette in asking "why?" without appearing unprofessional. To clarify, this is... | 2017/08/07 | [
"https://workplace.stackexchange.com/questions/96683",
"https://workplace.stackexchange.com",
"https://workplace.stackexchange.com/users/75202/"
] | **Just be honest. Your colleagues probably understand.**
One of the most effective and admirable qualities of a critical thinker is the willingness to *Ask Why.* This is one of the most effective ways to learn, as well as the main way of leveraging the advantage of having a variety of different people with different i... | Firstly, accept positive feedback. If you're praised for something, with no caveats whatever, then keep doing it!
That said, the main thing you can do here to avoid causing offence or discomfort, is to be prepared for the possibility that the person making the decision *doesn't really know* why they prefer A to B, and... |
48,841,206 | I am trying to fill cells from A3 to A100 with numbers, as shown. Every three cells, the cell value increases of 1 digit. More than having the VBA snippet as an answer, which would be great, I would really appreciate if someone could be kind enough to make a step by step explanation of the logic behind building the cod... | 2018/02/17 | [
"https://Stackoverflow.com/questions/48841206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1500456/"
] | Put in
```
A3 = 1
A4 = 1
A5 = 1
A6 = A3 + 1
A7 = A4 + 1
A8 = A5 + 1
```
Then copy A6 to A8 down to A100 | Why do you need to use VBA here? You can use the following formula on the worksheet. It doesn't depend on cells above so it'll give you the right answer whichever row you place it on:
```
=INT((ROW()-3)/3)+1
```
If you really want VBA there's not much to explain about this. It just places the same formula in the cel... |
48,841,206 | I am trying to fill cells from A3 to A100 with numbers, as shown. Every three cells, the cell value increases of 1 digit. More than having the VBA snippet as an answer, which would be great, I would really appreciate if someone could be kind enough to make a step by step explanation of the logic behind building the cod... | 2018/02/17 | [
"https://Stackoverflow.com/questions/48841206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1500456/"
] | Manually, in **A3** enter:
```
=ROUNDUP(ROWS($1:1)/3,0)
```
and copy down.
So with *VBA*:
```
Sub qwerty()
Range("A3:A100").Formula = "=ROUNDUP(ROWS($1:1)/3,0)"
End Sub
```
If you did not want formulas in the final result:
```
Sub poiuyt()
With Range("A3:A100")
.Formula = "=ROUNDUP(ROWS($1:1)/3,... | Put in
```
A3 = 1
A4 = 1
A5 = 1
A6 = A3 + 1
A7 = A4 + 1
A8 = A5 + 1
```
Then copy A6 to A8 down to A100 |
48,841,206 | I am trying to fill cells from A3 to A100 with numbers, as shown. Every three cells, the cell value increases of 1 digit. More than having the VBA snippet as an answer, which would be great, I would really appreciate if someone could be kind enough to make a step by step explanation of the logic behind building the cod... | 2018/02/17 | [
"https://Stackoverflow.com/questions/48841206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1500456/"
] | **VBA approach via datafield array and flexible row settings**
Just to show another possible approach using a **datafield array** and allowing to define even ***individual start and end rows*** based on @CalumDa 's modified formula (assuming that you start always with *1, 1, 1* in the first three rows):
**Code**
```... | Put in
```
A3 = 1
A4 = 1
A5 = 1
A6 = A3 + 1
A7 = A4 + 1
A8 = A5 + 1
```
Then copy A6 to A8 down to A100 |
48,841,206 | I am trying to fill cells from A3 to A100 with numbers, as shown. Every three cells, the cell value increases of 1 digit. More than having the VBA snippet as an answer, which would be great, I would really appreciate if someone could be kind enough to make a step by step explanation of the logic behind building the cod... | 2018/02/17 | [
"https://Stackoverflow.com/questions/48841206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1500456/"
] | Manually, in **A3** enter:
```
=ROUNDUP(ROWS($1:1)/3,0)
```
and copy down.
So with *VBA*:
```
Sub qwerty()
Range("A3:A100").Formula = "=ROUNDUP(ROWS($1:1)/3,0)"
End Sub
```
If you did not want formulas in the final result:
```
Sub poiuyt()
With Range("A3:A100")
.Formula = "=ROUNDUP(ROWS($1:1)/3,... | Why do you need to use VBA here? You can use the following formula on the worksheet. It doesn't depend on cells above so it'll give you the right answer whichever row you place it on:
```
=INT((ROW()-3)/3)+1
```
If you really want VBA there's not much to explain about this. It just places the same formula in the cel... |
48,841,206 | I am trying to fill cells from A3 to A100 with numbers, as shown. Every three cells, the cell value increases of 1 digit. More than having the VBA snippet as an answer, which would be great, I would really appreciate if someone could be kind enough to make a step by step explanation of the logic behind building the cod... | 2018/02/17 | [
"https://Stackoverflow.com/questions/48841206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1500456/"
] | **VBA approach via datafield array and flexible row settings**
Just to show another possible approach using a **datafield array** and allowing to define even ***individual start and end rows*** based on @CalumDa 's modified formula (assuming that you start always with *1, 1, 1* in the first three rows):
**Code**
```... | Why do you need to use VBA here? You can use the following formula on the worksheet. It doesn't depend on cells above so it'll give you the right answer whichever row you place it on:
```
=INT((ROW()-3)/3)+1
```
If you really want VBA there's not much to explain about this. It just places the same formula in the cel... |
48,841,206 | I am trying to fill cells from A3 to A100 with numbers, as shown. Every three cells, the cell value increases of 1 digit. More than having the VBA snippet as an answer, which would be great, I would really appreciate if someone could be kind enough to make a step by step explanation of the logic behind building the cod... | 2018/02/17 | [
"https://Stackoverflow.com/questions/48841206",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1500456/"
] | Manually, in **A3** enter:
```
=ROUNDUP(ROWS($1:1)/3,0)
```
and copy down.
So with *VBA*:
```
Sub qwerty()
Range("A3:A100").Formula = "=ROUNDUP(ROWS($1:1)/3,0)"
End Sub
```
If you did not want formulas in the final result:
```
Sub poiuyt()
With Range("A3:A100")
.Formula = "=ROUNDUP(ROWS($1:1)/3,... | **VBA approach via datafield array and flexible row settings**
Just to show another possible approach using a **datafield array** and allowing to define even ***individual start and end rows*** based on @CalumDa 's modified formula (assuming that you start always with *1, 1, 1* in the first three rows):
**Code**
```... |
32,181,084 | So far I have started with this. I can't get the normal text from div.
```
from BeautifulSoup import BeautifulSoup
import urllib2
get = BeautifulSoup(urllib2.urlopen("https://example/com/").read()).findAll('div', {'class':'h4 entry-title'})
import sys
for i in get:
print i
```
How can I scrap data from this HTML pl... | 2015/08/24 | [
"https://Stackoverflow.com/questions/32181084",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5016906/"
] | Answering question one, write it like this:
```
for div in BeautifulSoup(urllib2.urlopen("https://example/com/").read()).findAll('div', {'class':'h4 entry-title'}):
for a in div.findAll('a'):
print a.text
for p in div.findAll('p'):
print p.text
``` | Try this solution:
```
from BeautifulSoup import BeautifulSoup
import urllib2
(...)
connection = ...
cursor = connection.cursor()
(...)
bs = BeautifulSoup(urllib2.urlopen("https://example/com/").read())
names = []
descriptions = []
for title in bs.findAll('div', {'class': 'h4 entry-title'}):
name = title.find('... |
74,081 | In many eukaryote species, there are several chromosomes. In humans, for example, there are 23 pairs of chromosomes.
**Why are there several chromosomes and not just a join of all chromosomes into a single big chromosome?** | 2018/06/11 | [
"https://biology.stackexchange.com/questions/74081",
"https://biology.stackexchange.com",
"https://biology.stackexchange.com/users/43228/"
] | The leading contender of "why" in my former lab, is that if a chromosome becomes too long, a cell cannot fully isolate the chromatid to a daughter cell. Ie in a giant chromosome, the chromosome arms trail so far behind centromere, that the arms are of two sister chromosome are still touching each other even through the... | Short Answer: Humans reproduce sexually and evolution, with some random effects, has led to 23 pairs of chromosomes.
Explained:
**Reproduce Sexually** - Bacteria do have one large piece of DNA. This works for bacteria because they will copy all their DNA, and split the two copies creating two "clones" of each other. ... |
46,242,710 | Not sure how to store a job on a database. Whenever I run my flask app it runs the first time and then when I shutdown the server and restart the app I get the error:
```
sqlalchemy.exc.IntegrityError: (sqlite3.IntegrityError) UNIQUE constraint failed: apscheduler_jobs.id [SQL: 'INSERT INTO apscheduler_jobs (id, next_... | 2017/09/15 | [
"https://Stackoverflow.com/questions/46242710",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1761521/"
] | If you are using a datastore, you should set `replace_existing` to `True` in the job parameters so that APScheduler will replace the existing job when it restarts. Here is an example cron job that works with SQLAlchemyJobStore:
```
'id': 'daily_email',
'func': send_daily_email,
'replace_existing': True,
... | The error you are getting because the job id "job1" is already exists in jobstore (in database) and you can't have the same job id for the different jobs. Job id should be unique. You can assign id as 'None' and the scheduler will automatically assign one id to it. The new job id will be in alphanumeric of length 32. Y... |
34,722,129 | The `.git/config` file has mysteriously disappeared from my working repo.
I have lost my remotes and the smudge/clean filters.
Is there a chance to recover the `.git/config` file?
I'm using Windows 7. | 2016/01/11 | [
"https://Stackoverflow.com/questions/34722129",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2020827/"
] | It has nothing to do with git, git does not have a cache mechanism for any of its content.
You will need to use 3rd party recovery tools.
Try [Piriform's Recuva](https://www.piriform.com/recuva) | `git clone` your remote repository (you could interrupt the process just after the file is created), or do a `git init` in an empty directory and copy the file in your working repository. It should be a good start.
Perhaps you will have to add some remotes or some other info but nothing very important... |
42,113,971 | I am using ESLint to check my javascript code on build and I am getting a no-unused-vars error followed by a no-undef error for the same variable. I can't undertand how the variable can be both unused and undefined.
```
export function count(){
if (counter > 3){
const a = 'big';
} else {
const ... | 2017/02/08 | [
"https://Stackoverflow.com/questions/42113971",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2295516/"
] | `const` is block-scoped. So what you're doing there is creating an `a` within whichever block gets executed, not using it, letting it go out of scope, and then trying to return a *different* `a` that the function closes over (which will cause a `ReferenceError` if there is no `a` being closed over). The `return a;` lin... | You define your const inside the if, it is not living in the function scope.
you need to define it like
```
export function count(){
let a;
if (counter > 3){
a = 'big';
} else {
a = 'small';
}
return a;
}
```
More info, read next chapters of
<https://github.com/getify/You-Dont-K... |
42,113,971 | I am using ESLint to check my javascript code on build and I am getting a no-unused-vars error followed by a no-undef error for the same variable. I can't undertand how the variable can be both unused and undefined.
```
export function count(){
if (counter > 3){
const a = 'big';
} else {
const ... | 2017/02/08 | [
"https://Stackoverflow.com/questions/42113971",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2295516/"
] | `const` is block-scoped. So what you're doing there is creating an `a` within whichever block gets executed, not using it, letting it go out of scope, and then trying to return a *different* `a` that the function closes over (which will cause a `ReferenceError` if there is no `a` being closed over). The `return a;` lin... | Constants are block-scoped, much like variables defined using the let statement. The value of a constant cannot change through re-assignment, and it can't be redeclared.
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const> |
42,113,971 | I am using ESLint to check my javascript code on build and I am getting a no-unused-vars error followed by a no-undef error for the same variable. I can't undertand how the variable can be both unused and undefined.
```
export function count(){
if (counter > 3){
const a = 'big';
} else {
const ... | 2017/02/08 | [
"https://Stackoverflow.com/questions/42113971",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2295516/"
] | You define your const inside the if, it is not living in the function scope.
you need to define it like
```
export function count(){
let a;
if (counter > 3){
a = 'big';
} else {
a = 'small';
}
return a;
}
```
More info, read next chapters of
<https://github.com/getify/You-Dont-K... | Constants are block-scoped, much like variables defined using the let statement. The value of a constant cannot change through re-assignment, and it can't be redeclared.
<https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const> |
281,098 | All I could manage to find on Google was this [link](http://www.programmerinterview.com/index.php/american-vocabulary/make-your-mark-meaning/):
>
> The phrase was originally used in archery – to “make your mark” was to hit the target with your arrow.
>
>
>
Is there a more in-depth description or perhaps a differ... | 2015/10/19 | [
"https://english.stackexchange.com/questions/281098",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/143403/"
] | Here is another guess.
To make one's mark (or leave it) was the way that illiterate people would provide a signature.
If you make your mark then you show up, you indicate your presence. Instead of being a no-one, you have registered your existence in some document. If you appear in court or join an illustrious compan... | I'm just basing this on a non-researched guess, but I would venture that it has to do with early trailblazing, when one would mark a path in a forest by carving a notch in a tree, at eye-level, to aid in direction. |
281,098 | All I could manage to find on Google was this [link](http://www.programmerinterview.com/index.php/american-vocabulary/make-your-mark-meaning/):
>
> The phrase was originally used in archery – to “make your mark” was to hit the target with your arrow.
>
>
>
Is there a more in-depth description or perhaps a differ... | 2015/10/19 | [
"https://english.stackexchange.com/questions/281098",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/143403/"
] | 'Chasly from UK' has made the point that to *'make your mark'* or *'leave your mark'* was essentially to sign your name. In an age when a great many people could not write their own names they used marks, and not just an 'X' as we'd see in movies or read about, but often quite elaborate drawings. From the Oxford Englis... | I'm just basing this on a non-researched guess, but I would venture that it has to do with early trailblazing, when one would mark a path in a forest by carving a notch in a tree, at eye-level, to aid in direction. |
281,098 | All I could manage to find on Google was this [link](http://www.programmerinterview.com/index.php/american-vocabulary/make-your-mark-meaning/):
>
> The phrase was originally used in archery – to “make your mark” was to hit the target with your arrow.
>
>
>
Is there a more in-depth description or perhaps a differ... | 2015/10/19 | [
"https://english.stackexchange.com/questions/281098",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/143403/"
] | Here is another guess.
To make one's mark (or leave it) was the way that illiterate people would provide a signature.
If you make your mark then you show up, you indicate your presence. Instead of being a no-one, you have registered your existence in some document. If you appear in court or join an illustrious compan... | 'Chasly from UK' has made the point that to *'make your mark'* or *'leave your mark'* was essentially to sign your name. In an age when a great many people could not write their own names they used marks, and not just an 'X' as we'd see in movies or read about, but often quite elaborate drawings. From the Oxford Englis... |
42,521,137 | following the [README](https://github.com/PHP-FFMpeg/PHP-FFMpeg/) I installed PHP FFmpeg through Composer and I downloaded binaries from <https://ffmpeg.zeranoe.com/builds/>
now I'm trying to run the "Basic Usage" example:
```
<?php
require("vendor/autoload.php");
$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg... | 2017/03/01 | [
"https://Stackoverflow.com/questions/42521137",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5215436/"
] | Sounds like the PATH you get via cron and the PATH you get through your login are different.
Either set the PATH in your script or use the absolute path to `slack-cleaner`
The PATH tells the shell which directories to search for executables (including scripts). You can `echo $PATH` to compare your path to the one cro... | ALWAYS use full path in crons and you'll save a lot of time.
If you don't like `export PATH=...` then just use `/path/to/slack-cleaner-dir` instead. |
42,521,137 | following the [README](https://github.com/PHP-FFMpeg/PHP-FFMpeg/) I installed PHP FFmpeg through Composer and I downloaded binaries from <https://ffmpeg.zeranoe.com/builds/>
now I'm trying to run the "Basic Usage" example:
```
<?php
require("vendor/autoload.php");
$ffmpeg = FFMpeg\FFMpeg::create();
$video = $ffmpeg... | 2017/03/01 | [
"https://Stackoverflow.com/questions/42521137",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5215436/"
] | Sounds like the PATH you get via cron and the PATH you get through your login are different.
Either set the PATH in your script or use the absolute path to `slack-cleaner`
The PATH tells the shell which directories to search for executables (including scripts). You can `echo $PATH` to compare your path to the one cro... | Just load your profile before running the command to be in the exact same situation as when you launch it from your shell :
```
* * * * * . ~/.profile;/home/ubuntu/delete_slack/delete_slack.sh >> /var/log/delete_slack.log 2>&1
```
As I read that you're a bit new to this, here are just some more explanations about th... |
20,849,597 | I'm trying to write a sqlplus command that creates a table from a query that is stored in an .sql file.
The particular .sql file that contains the query would be supplied to my sqlplus command as a variable (`&v_InputQuery`).
I've tried something like this, but it doesn't work.
```
CREATE TABLE &v_OutputTable AS
(
<... | 2013/12/30 | [
"https://Stackoverflow.com/questions/20849597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/811435/"
] | Unfortunately, You cannot create a SQL\*Plus command, but instead create a shell script to do it!
Lets say `my_script.sh` is below
```
#you can always complete the user interaction at unix/dos
USER=your_user
PASS=your_pass
DB=your_db
OUTPUT_TABLE=$1;
QUERY_FILE=$2;
SELECT_QUERY=`cat $QUERY_FILE`;
sqlplus -S ${USER}/... | Yes, you can do that. If your query is in a file called `v_InputQuery.sql`, you can do this:
```
CREATE TABLE &v_OutputTable AS (
@v_InputQuery.sql
) ;
```
It's important that the `@` is the first character on the line. SQL\*Plus will read the file and put its contents at that location. So make sure you don't have a... |
20,849,597 | I'm trying to write a sqlplus command that creates a table from a query that is stored in an .sql file.
The particular .sql file that contains the query would be supplied to my sqlplus command as a variable (`&v_InputQuery`).
I've tried something like this, but it doesn't work.
```
CREATE TABLE &v_OutputTable AS
(
<... | 2013/12/30 | [
"https://Stackoverflow.com/questions/20849597",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/811435/"
] | Unfortunately, You cannot create a SQL\*Plus command, but instead create a shell script to do it!
Lets say `my_script.sh` is below
```
#you can always complete the user interaction at unix/dos
USER=your_user
PASS=your_pass
DB=your_db
OUTPUT_TABLE=$1;
QUERY_FILE=$2;
SELECT_QUERY=`cat $QUERY_FILE`;
sqlplus -S ${USER}/... | Expanding a comment, @MaheswaranRavisankar's approach will work, but the dynamic SQL (i.e. `execute immediate`) isn't necessary, so the anonymous block isn't necessary either. It can be simplified somewhat to:
```
USER=your_user
PASS=your_pass
DB=your_db
OUTPUT_TABLE=$1;
QUERY_FILE=$2;
SELECT_QUERY=`cat $QUERY_FILE`;
... |
37,098,025 | I have a SQLite database created with SQLAlchemy which has the format below
```
Code Names Amt1 Amt2 Amt3 Amt4
502 Real Management 11.4 1.3 - -
5TG 80Commercial 85.8 152 4.845 4.12%
AZG Equipment Love 11.6 117.1 - -
```
But when I ... | 2016/05/08 | [
"https://Stackoverflow.com/questions/37098025",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4931657/"
] | Update all rows in `Amt3` with `-` (if you have set up your login auths and defined cursor) will be something like this:
```
cur.execute("UPDATE sqlite_table SET Amt3 = 0 WHERE Amt3 = '-'")
```
This seems to work fine for me, even with -, what is the type of your `Atm3`?
```
import pandas as pd
import sqlite3
co... | I know this question is old but I ran into the same problem recently and this was the first result on google. What solved my problem was just to change `pandas.read_sql('sqlite_table', con=engine)` to the full query `pandas.read_sql('SELECT * FROM sqlite_table', con=engine)` as it seems to bypass the conversion attempt... |
17,788,070 | Please see my code below. I want to auto refresh a `div` on a php page. I tried to refresh through javascript and html header, but it is slowly slowing down my computer.
page2.php
```
<?php
if($_GET['type']!='ajax'){
include 'header.php';
echo "<div id='main-content'>";
}
?>
Itm 1</br>
Itm 2
<img class="aj... | 2013/07/22 | [
"https://Stackoverflow.com/questions/17788070",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2606812/"
] | Try setTimeout:
```
function myTimer() {
$('.ajax-loader').show();
$.ajax({
url: pageUrl + '?type=ajax',
success: function (data) {
$('#main-content').html(data);
// hide ajax loader
$('.ajax-loader').hide();
setTimeout(myTimer,1000);//so that the request ends se... | You can use `setTimeout($.cergis.loadContent, 1000);` to refresh once or `setInterval($.cergis.loadContent, 1000);` to refresh each seconds (1000 milliseconds = 1second).
See <http://www.w3schools.com/js/js_timing.asp> |
16,857,365 | Imagine we have the following code in an HTML file:
```
<script id='tag-1'>
function foo(){
alert("this is foo-1");
}
</script>
<script id='tag-2'>
function foo(){
alert("this is foo-2");
}
</script>
<script id='tag-3'>
function foo(){
alert("this is foo-3");
}
</script>
```
Is it possible ... | 2013/05/31 | [
"https://Stackoverflow.com/questions/16857365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1353723/"
] | No, this isn't possible. All Javascript code in the same window shares the same namespace, so what you're doing in your example is simply overriding `foo`, meaning that in the end you only have "foo-3".
iframes each have their own namespace but it wouldn't make sense to use iframes for something like this.
If the fun... | Javascript doesn't have function overloading. Every next declaration with the same name(variable or function) just re-declares it with new value provided. So in your case function from tag-3 will always be executed.
Possible solution to what you want is
1. Give different names for each function.
or
2. If you ... |
16,857,365 | Imagine we have the following code in an HTML file:
```
<script id='tag-1'>
function foo(){
alert("this is foo-1");
}
</script>
<script id='tag-2'>
function foo(){
alert("this is foo-2");
}
</script>
<script id='tag-3'>
function foo(){
alert("this is foo-3");
}
</script>
```
Is it possible ... | 2013/05/31 | [
"https://Stackoverflow.com/questions/16857365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1353723/"
] | No, that's not possible without resorting to `eval()`.
As each script block is evaluated by the browser the previous versions of the function are overwritten.
You *can* access the text context of each `<script>` tag, but only if it's inline. Accessing the source of `<script src="...">` tags requires AJAX. | You could implement a javascript namespacing technique that is fairly common. This creates a new javascript object that is available, and you can reference via calls to CodeGuru.File1.Foo();
```
var CodeGuru = CodeGuru || {};
var CodeGuru.File1 = CodeGuru.File1 || {};
(function(CodeGuru) {
CodeGuru.File1.Foo = f... |
16,857,365 | Imagine we have the following code in an HTML file:
```
<script id='tag-1'>
function foo(){
alert("this is foo-1");
}
</script>
<script id='tag-2'>
function foo(){
alert("this is foo-2");
}
</script>
<script id='tag-3'>
function foo(){
alert("this is foo-3");
}
</script>
```
Is it possible ... | 2013/05/31 | [
"https://Stackoverflow.com/questions/16857365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1353723/"
] | Yes this is totally possible, but you should use a type other than text/javascript.
```
<script id='tag-1' type="myScriptHolder">
function foo(){
alert("this is foo-1");
}
</script>
<script id='tag-2' type="myScriptHolder">
function foo(){
alert("this is foo-2");
}
</script>
<script id='tag-3' type="... | No, this isn't possible. All Javascript code in the same window shares the same namespace, so what you're doing in your example is simply overriding `foo`, meaning that in the end you only have "foo-3".
iframes each have their own namespace but it wouldn't make sense to use iframes for something like this.
If the fun... |
16,857,365 | Imagine we have the following code in an HTML file:
```
<script id='tag-1'>
function foo(){
alert("this is foo-1");
}
</script>
<script id='tag-2'>
function foo(){
alert("this is foo-2");
}
</script>
<script id='tag-3'>
function foo(){
alert("this is foo-3");
}
</script>
```
Is it possible ... | 2013/05/31 | [
"https://Stackoverflow.com/questions/16857365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1353723/"
] | Yes this is totally possible, but you should use a type other than text/javascript.
```
<script id='tag-1' type="myScriptHolder">
function foo(){
alert("this is foo-1");
}
</script>
<script id='tag-2' type="myScriptHolder">
function foo(){
alert("this is foo-2");
}
</script>
<script id='tag-3' type="... | How about something like this:
```
if (typeof (GenLib) == "undefined") GenLib = {};
GenLib.Tag1 = {};
GenLib.Tag2 = {};
GenLib.Tag3= {};
GenLib.Tag1.Foo = function () {
alert("this is foo-1");
};
GenLib.Tag2.Foo = function () {
alert("this is foo-2");
};
GenLib.Tag3.... |
16,857,365 | Imagine we have the following code in an HTML file:
```
<script id='tag-1'>
function foo(){
alert("this is foo-1");
}
</script>
<script id='tag-2'>
function foo(){
alert("this is foo-2");
}
</script>
<script id='tag-3'>
function foo(){
alert("this is foo-3");
}
</script>
```
Is it possible ... | 2013/05/31 | [
"https://Stackoverflow.com/questions/16857365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1353723/"
] | Yes this is totally possible, but you should use a type other than text/javascript.
```
<script id='tag-1' type="myScriptHolder">
function foo(){
alert("this is foo-1");
}
</script>
<script id='tag-2' type="myScriptHolder">
function foo(){
alert("this is foo-2");
}
</script>
<script id='tag-3' type="... | You could implement a javascript namespacing technique that is fairly common. This creates a new javascript object that is available, and you can reference via calls to CodeGuru.File1.Foo();
```
var CodeGuru = CodeGuru || {};
var CodeGuru.File1 = CodeGuru.File1 || {};
(function(CodeGuru) {
CodeGuru.File1.Foo = f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.