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
50,376,116
I am quite new in C# and I found something unexpected in string comparison which I don't really understand. Can someone please explain me why the comparison between characters gave the opposite result as the comparison of one character length strings in the following code ? I expected that `"9" < "="` will be `true`...
2018/05/16
[ "https://Stackoverflow.com/questions/50376116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9801081/" ]
The default string comparison is doing a 'word sort'. [From the documentation](https://msdn.microsoft.com/en-us/library/system.globalization.compareoptions(v=vs.110).aspx), > > The .NET Framework uses three distinct ways of sorting: word sort, string sort, and ordinal sort. Word sort performs a culture-sensitive comp...
In the case of character comparison, the characters will be cast to an `int` corresponding to the ASCII value. `9` has an ASCII value of 57, and `=` has a value of 61. This means that string comparison and character comparison aren't comparing exactly the same thing (which is why they may have different results).
50,376,116
I am quite new in C# and I found something unexpected in string comparison which I don't really understand. Can someone please explain me why the comparison between characters gave the opposite result as the comparison of one character length strings in the following code ? I expected that `"9" < "="` will be `true`...
2018/05/16
[ "https://Stackoverflow.com/questions/50376116", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9801081/" ]
The default string comparison is doing a 'word sort'. [From the documentation](https://msdn.microsoft.com/en-us/library/system.globalization.compareoptions(v=vs.110).aspx), > > The .NET Framework uses three distinct ways of sorting: word sort, string sort, and ordinal sort. Word sort performs a culture-sensitive comp...
This is because [String.Compare](https://msdn.microsoft.com/en-us/library/84787k22(v=vs.110).aspx) uses word sort orders by default, rather than numeric values for characters. It just happens to be that for the culture being used, `9` comes before `=` in the sort order. If you specify Ordinal (binary) sort rules, ment...
66,356,156
I am using a transfer learning model is a ay very similar to that explained in [Chollet's keras Transfer learning guide](https://keras.io/guides/transfer_learning/). To avoid problems with the batch normalization layer, as stated in the guide and many other places, I have to insert the original pretrained base model as...
2021/02/24
[ "https://Stackoverflow.com/questions/66356156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10685631/" ]
You can slice the dataframe in a for loop and write the slices to sheets: ``` GROUP_LENGTH = 1000000 # set nr of rows to slice df with pd.ExcelWriter('output.xlsx') as writer: for i in range(0, len(df), GROUP_LENGTH): df[i : i+GROUP_LENGTH].to_excel(writer, sheet_name='Row {}'.format(i), index=False, header=T...
This depends on the total size of the dataframe as Excel has workbook size limits, but you can try something like; ``` GROUP_LENGTH = 1000000 writer = pd.ExcelWriter('test.xlsx') number_of_chunks = math.ceil(len(df)/GROUP_LENGTH) chunks = np.array_split(df,number_of_chunks) sheet_number = 0 for chunk in chunks: ch...
66,356,156
I am using a transfer learning model is a ay very similar to that explained in [Chollet's keras Transfer learning guide](https://keras.io/guides/transfer_learning/). To avoid problems with the batch normalization layer, as stated in the guide and many other places, I have to insert the original pretrained base model as...
2021/02/24
[ "https://Stackoverflow.com/questions/66356156", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10685631/" ]
You can slice the dataframe in a for loop and write the slices to sheets: ``` GROUP_LENGTH = 1000000 # set nr of rows to slice df with pd.ExcelWriter('output.xlsx') as writer: for i in range(0, len(df), GROUP_LENGTH): df[i : i+GROUP_LENGTH].to_excel(writer, sheet_name='Row {}'.format(i), index=False, header=T...
I know it's old but I was able to do it using [np.array\_split](https://numpy.org/doc/stable/reference/generated/numpy.array_split.html) ``` count = 1 splits = np.array_splits(df, length) for df in splits: df.to_excel(f'output {count}.xlsx', header=True, index=False) count += 1 ```
21,625,541
I have this `layout` ``` <ScrollView> <TextView android:id="@+id/textView" /> </ScrollView> ``` When I try to set a too long text, this `Textview` doesn't show that. ``` //OnCreate //... TextView textView = (TextView) findViewById(R.id.textView); textView.setText("..."); //Here is a text with more than 2500 ...
2014/02/07
[ "https://Stackoverflow.com/questions/21625541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1803735/" ]
you can set ``` android:maxLines="1" android:ellipsize="end" ``` to your textview, so the text which long than your textview will be hide.
Use this : ``` EditText thumbnailView = (EditText) findViewById(R.id.enterBearingNo_editText_id); TextView messageView = (TextView) findViewById(R.id.string2); String text = "LargeText"; Display display = getWindowManager().getDefaultDisplay(); FlowTextHelper.tryFlowText(text, thumbnailView, message...
21,625,541
I have this `layout` ``` <ScrollView> <TextView android:id="@+id/textView" /> </ScrollView> ``` When I try to set a too long text, this `Textview` doesn't show that. ``` //OnCreate //... TextView textView = (TextView) findViewById(R.id.textView); textView.setText("..."); //Here is a text with more than 2500 ...
2014/02/07
[ "https://Stackoverflow.com/questions/21625541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1803735/" ]
you can set ``` android:maxLines="1" android:ellipsize="end" ``` to your textview, so the text which long than your textview will be hide.
Because `android:singleLine="true"` attribute has been deprecated, set the following attributes to your TextView: ``` android:ellipsize="end" android:maxLines="1" ``` The TextView will then show only the text that can fit to your TextView, followed by an ellipsis `...`
21,625,541
I have this `layout` ``` <ScrollView> <TextView android:id="@+id/textView" /> </ScrollView> ``` When I try to set a too long text, this `Textview` doesn't show that. ``` //OnCreate //... TextView textView = (TextView) findViewById(R.id.textView); textView.setText("..."); //Here is a text with more than 2500 ...
2014/02/07
[ "https://Stackoverflow.com/questions/21625541", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1803735/" ]
you can set ``` android:maxLines="1" android:ellipsize="end" ``` to your textview, so the text which long than your textview will be hide.
i dont know if this will help you but saw this on developer.android... > > With Android 8.0 (API level 26) and higher, you can instruct a TextView to let the text size expand or contract automatically to fill its layout based on the TextView's characteristics and boundaries. This setting makes it easier to optimize t...
62,072,437
I am trying to get the URL for the image associated with a given URL. Using Apple's `LPLinkMetadata`, I am able to get the URL's `title` and `description`, but I cannot figure out how to access the metadata's image URL. I have access to `data.imageProvider` but I am not sure how to use it. ``` import LinkPresentation ...
2020/05/28
[ "https://Stackoverflow.com/questions/62072437", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7639373/" ]
Check below my code for get image URL from LPLinkMetadata. ``` let metadataProvider = LPMetadataProvider() let url = URL(string: "https://www.facebook.com/")! metadataProvider.startFetchingMetadata(for: url) { metadata, error in if error != nil { return } metadata?.imageProvider?.loadFi...
``` let _ = md.imageProvider?.loadObject(ofClass: UIImage.self, completionHandler: { image, err in DispatchQueue.main.async { self?.imageViewWebSite.image = image as? UIImage } }) ```
67,410,109
I'm writing a batch script that will check the MD5sum of all files in a folder and i found this script on this site for /r %%f in (\*) do (certutil -hashfile "%%f" MD5) >> output.txt This one is working but any idea how can i get the hash only, without the other text [Please see text highlighted on this image](https...
2021/05/05
[ "https://Stackoverflow.com/questions/67410109", "https://Stackoverflow.com", "https://Stackoverflow.com/users/15847598/" ]
Since the two lines that you don't want to include both contain the string `hash` somewhere in them, you can use `find` to filter those lines out. ``` for /r %%f in (*) do (certutil -hashfile "%%f" MD5 | find /v "hash") >> output.txt ``` `find /v` says "return all lines that do not contain this string."
DOS is hard to work with (compared to bash on linux, for example), but I managed to get something like this working locally: Simple example using just `:` as a deliminator (like in your example, where the MD5 hash is after the `:`): ``` $ @echo hello:me hello:me $ for /f "tokens=1,2 delims==:" %a in ('echo hello:me')...
722,991
Let us assume there is a car of mass $m\_1$ on top of which there is a block of mass $m\_2$. The car is moving with velocity $v$. If suddenly,the block falls down,then it is common sense that the speed of the car will increase since the car has become light. But how do we feel this using rigorous mathematics and conser...
2022/08/14
[ "https://physics.stackexchange.com/questions/722991", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/311011/" ]
When you look at a change in mass you always have to consider the conservation of the total momentum. Let's look at the car, but let's make it a car in space for simplicity, going at $ vM$, (this includes the brick with mass $m$). The mass you subtract will always have a momentum before and after the separation and you...
As explained in some of the answers, the car does not accelerate when the block falls. However there is a "if". The car's velocity does not change if the car is moving without its engine turned on. If the engine is on, providing a forward force F, then the car accelerates when its mass decreases. $ a= \frac{F}{m} $. Re...
722,991
Let us assume there is a car of mass $m\_1$ on top of which there is a block of mass $m\_2$. The car is moving with velocity $v$. If suddenly,the block falls down,then it is common sense that the speed of the car will increase since the car has become light. But how do we feel this using rigorous mathematics and conser...
2022/08/14
[ "https://physics.stackexchange.com/questions/722991", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/311011/" ]
When you look at a change in mass you always have to consider the conservation of the total momentum. Let's look at the car, but let's make it a car in space for simplicity, going at $ vM$, (this includes the brick with mass $m$). The mass you subtract will always have a momentum before and after the separation and you...
Here is your wrong assumption: "If suddenly,the block falls down,then it is common sense that the speed of the car will increase since the car has become light" There are two problems. The first is that Newton's First Law means that the block cannot simply "fall down." There has to be some force on it that causes it t...
722,991
Let us assume there is a car of mass $m\_1$ on top of which there is a block of mass $m\_2$. The car is moving with velocity $v$. If suddenly,the block falls down,then it is common sense that the speed of the car will increase since the car has become light. But how do we feel this using rigorous mathematics and conser...
2022/08/14
[ "https://physics.stackexchange.com/questions/722991", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/311011/" ]
When the object over the car falls down, it keeps at first the same horizontal velocity. The total linear momentum (car + object) doesn't change. So there is no reason to expect a change of the car velocity. Of course, as soon as the object hits the road, it will stop due to the friction, but that is another story.
Here is your wrong assumption: "If suddenly,the block falls down,then it is common sense that the speed of the car will increase since the car has become light" There are two problems. The first is that Newton's First Law means that the block cannot simply "fall down." There has to be some force on it that causes it t...
722,991
Let us assume there is a car of mass $m\_1$ on top of which there is a block of mass $m\_2$. The car is moving with velocity $v$. If suddenly,the block falls down,then it is common sense that the speed of the car will increase since the car has become light. But how do we feel this using rigorous mathematics and conser...
2022/08/14
[ "https://physics.stackexchange.com/questions/722991", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/311011/" ]
When the object over the car falls down, it keeps at first the same horizontal velocity. The total linear momentum (car + object) doesn't change. So there is no reason to expect a change of the car velocity. Of course, as soon as the object hits the road, it will stop due to the friction, but that is another story.
if an object is moving with a constant velocity in the absence of any forces, and apart of it self falls off. The momentum of the object decreases, only because of a loss of mass. the velocity of the object will not change as no forces are acting on it. With a car its slightly different. assuming no air resistance to ...
722,991
Let us assume there is a car of mass $m\_1$ on top of which there is a block of mass $m\_2$. The car is moving with velocity $v$. If suddenly,the block falls down,then it is common sense that the speed of the car will increase since the car has become light. But how do we feel this using rigorous mathematics and conser...
2022/08/14
[ "https://physics.stackexchange.com/questions/722991", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/311011/" ]
> > If suddenly, the block falls down, then it is common sense that the > speed of the car will increase since the car has become light. > > > It's not really common sense. For a real scenario the car will encounter external dissipative forces, primarily air drag, that needs to be matched by a forward static fric...
Here is your wrong assumption: "If suddenly,the block falls down,then it is common sense that the speed of the car will increase since the car has become light" There are two problems. The first is that Newton's First Law means that the block cannot simply "fall down." There has to be some force on it that causes it t...
722,991
Let us assume there is a car of mass $m\_1$ on top of which there is a block of mass $m\_2$. The car is moving with velocity $v$. If suddenly,the block falls down,then it is common sense that the speed of the car will increase since the car has become light. But how do we feel this using rigorous mathematics and conser...
2022/08/14
[ "https://physics.stackexchange.com/questions/722991", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/311011/" ]
> > If suddenly, the block falls down, then it is common sense that the > speed of the car will increase since the car has become light. > > > It's not really common sense. For a real scenario the car will encounter external dissipative forces, primarily air drag, that needs to be matched by a forward static fric...
if an object is moving with a constant velocity in the absence of any forces, and apart of it self falls off. The momentum of the object decreases, only because of a loss of mass. the velocity of the object will not change as no forces are acting on it. With a car its slightly different. assuming no air resistance to ...
722,991
Let us assume there is a car of mass $m\_1$ on top of which there is a block of mass $m\_2$. The car is moving with velocity $v$. If suddenly,the block falls down,then it is common sense that the speed of the car will increase since the car has become light. But how do we feel this using rigorous mathematics and conser...
2022/08/14
[ "https://physics.stackexchange.com/questions/722991", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/311011/" ]
When the object over the car falls down, it keeps at first the same horizontal velocity. The total linear momentum (car + object) doesn't change. So there is no reason to expect a change of the car velocity. Of course, as soon as the object hits the road, it will stop due to the friction, but that is another story.
When you look at a change in mass you always have to consider the conservation of the total momentum. Let's look at the car, but let's make it a car in space for simplicity, going at $ vM$, (this includes the brick with mass $m$). The mass you subtract will always have a momentum before and after the separation and you...
722,991
Let us assume there is a car of mass $m\_1$ on top of which there is a block of mass $m\_2$. The car is moving with velocity $v$. If suddenly,the block falls down,then it is common sense that the speed of the car will increase since the car has become light. But how do we feel this using rigorous mathematics and conser...
2022/08/14
[ "https://physics.stackexchange.com/questions/722991", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/311011/" ]
When you look at a change in mass you always have to consider the conservation of the total momentum. Let's look at the car, but let's make it a car in space for simplicity, going at $ vM$, (this includes the brick with mass $m$). The mass you subtract will always have a momentum before and after the separation and you...
if an object is moving with a constant velocity in the absence of any forces, and apart of it self falls off. The momentum of the object decreases, only because of a loss of mass. the velocity of the object will not change as no forces are acting on it. With a car its slightly different. assuming no air resistance to ...
722,991
Let us assume there is a car of mass $m\_1$ on top of which there is a block of mass $m\_2$. The car is moving with velocity $v$. If suddenly,the block falls down,then it is common sense that the speed of the car will increase since the car has become light. But how do we feel this using rigorous mathematics and conser...
2022/08/14
[ "https://physics.stackexchange.com/questions/722991", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/311011/" ]
When you look at a change in mass you always have to consider the conservation of the total momentum. Let's look at the car, but let's make it a car in space for simplicity, going at $ vM$, (this includes the brick with mass $m$). The mass you subtract will always have a momentum before and after the separation and you...
The car's environment is not fully indicated in the question. The word *falls* implies a gravity. Assuming the car travels on a road then the falling of the block is perpendicular to the cars motion. In this case the car and the block can be analyzed as separate systems. **For the car** the normal force is reduced thu...
722,991
Let us assume there is a car of mass $m\_1$ on top of which there is a block of mass $m\_2$. The car is moving with velocity $v$. If suddenly,the block falls down,then it is common sense that the speed of the car will increase since the car has become light. But how do we feel this using rigorous mathematics and conser...
2022/08/14
[ "https://physics.stackexchange.com/questions/722991", "https://physics.stackexchange.com", "https://physics.stackexchange.com/users/311011/" ]
> > If suddenly, the block falls down, then it is common sense that the > speed of the car will increase since the car has become light. > > > It's not really common sense. For a real scenario the car will encounter external dissipative forces, primarily air drag, that needs to be matched by a forward static fric...
As explained in some of the answers, the car does not accelerate when the block falls. However there is a "if". The car's velocity does not change if the car is moving without its engine turned on. If the engine is on, providing a forward force F, then the car accelerates when its mass decreases. $ a= \frac{F}{m} $. Re...
280,765
What precisely does the first few words of this sentence mean? > > For all Clark says, mental items that have Euler circles as their content could mean what they do by some naturalistic theory of content, just as we suppose that mental representations of natural objects do. > > > Would it have the same exact mean...
2015/10/17
[ "https://english.stackexchange.com/questions/280765", "https://english.stackexchange.com", "https://english.stackexchange.com/users/143203/" ]
There are actually two ways to understand "For all Clark says" in the OP's example. One is the interpretation that chasly from uk and Brian Donovan give of it: "For all Clark says" means something like "Notwithstanding all the information that Clark provides." A second (and contrary) interpretation sees "For all Clark ...
> > For all Clark says, mental items that have Euler circles as their content could mean what they do by some naturalistic theory of content... > > > Would it have the same exact meaning if it said: > > Clark is saying mental items that have Euler circles as their content could mean what they do by some naturali...
66,684
I plan on taking a new job that does not allow employee 401k contributions for the first 6 months. I am used to maxing out my 401k, and this seems like a dangerous amount of money that I don't want to get too comfortable with, only to have to part with it later when I can start contributing to the new 401k (by my calcu...
2016/06/28
[ "https://money.stackexchange.com/questions/66684", "https://money.stackexchange.com", "https://money.stackexchange.com/users/24189/" ]
$9000 over 6 months is great, I'd use it for long term savings regardless of the 401(k) situation. There's nothing wrong with a mix of pre and post tax money for retirement. In fact, it's a great way to avoid paying too much tax should your 401(k) withdrawals in retirement push you into a higher bracket. Just invest th...
I would open a taxable account with the same custodian that manages your Roth IRA (e.g., Vanguard, Fidelity, etc.). Then within the taxable account I would invest the extra money in low cost, broad market index funds that are tax efficient. Unlike in your 401(k) and Roth IRA, you will now have tax implications if your ...
66,684
I plan on taking a new job that does not allow employee 401k contributions for the first 6 months. I am used to maxing out my 401k, and this seems like a dangerous amount of money that I don't want to get too comfortable with, only to have to part with it later when I can start contributing to the new 401k (by my calcu...
2016/06/28
[ "https://money.stackexchange.com/questions/66684", "https://money.stackexchange.com", "https://money.stackexchange.com/users/24189/" ]
I'm a bit hesitant to put this in an answer as I don't know if specific investment advice is appropriate, but this has grown way too long for a comment. The typical answer given for people who don't have the time, experience, knowledge or inclination to pick specific stocks to hold should instead invest in ETFs ([excha...
If your main concern is simply the psychological effect of not seeing the money, rather than getting return on the money, you should look into whether your employer will allow you to have direct deposit into two different accounts. If so, have what would have gone into your 401(k) go into a new bank account that you ne...
66,684
I plan on taking a new job that does not allow employee 401k contributions for the first 6 months. I am used to maxing out my 401k, and this seems like a dangerous amount of money that I don't want to get too comfortable with, only to have to part with it later when I can start contributing to the new 401k (by my calcu...
2016/06/28
[ "https://money.stackexchange.com/questions/66684", "https://money.stackexchange.com", "https://money.stackexchange.com/users/24189/" ]
I'm a bit hesitant to put this in an answer as I don't know if specific investment advice is appropriate, but this has grown way too long for a comment. The typical answer given for people who don't have the time, experience, knowledge or inclination to pick specific stocks to hold should instead invest in ETFs ([excha...
Two options not mentioned: -No information about your emergency fund in your question. If you don't have 6 months of expenses saved up in a "safe" place (high yield savings account or money market fund) I'd add to that first. -Could you auto-withdraw the amount over six months, then when you can start contributing, c...
66,684
I plan on taking a new job that does not allow employee 401k contributions for the first 6 months. I am used to maxing out my 401k, and this seems like a dangerous amount of money that I don't want to get too comfortable with, only to have to part with it later when I can start contributing to the new 401k (by my calcu...
2016/06/28
[ "https://money.stackexchange.com/questions/66684", "https://money.stackexchange.com", "https://money.stackexchange.com/users/24189/" ]
I'm a bit hesitant to put this in an answer as I don't know if specific investment advice is appropriate, but this has grown way too long for a comment. The typical answer given for people who don't have the time, experience, knowledge or inclination to pick specific stocks to hold should instead invest in ETFs ([excha...
Short answer is fund a Roth. If you are under 50 then you can put in $5500 or $6500 if you are older. Great to have money in two buckets one pre tax and one post tax. Plus you can be aggressive putting money in it because you can always take money you put in the Roth out of the Roth with no tax or penalty. Taxes are...
66,684
I plan on taking a new job that does not allow employee 401k contributions for the first 6 months. I am used to maxing out my 401k, and this seems like a dangerous amount of money that I don't want to get too comfortable with, only to have to part with it later when I can start contributing to the new 401k (by my calcu...
2016/06/28
[ "https://money.stackexchange.com/questions/66684", "https://money.stackexchange.com", "https://money.stackexchange.com/users/24189/" ]
I would open a taxable account with the same custodian that manages your Roth IRA (e.g., Vanguard, Fidelity, etc.). Then within the taxable account I would invest the extra money in low cost, broad market index funds that are tax efficient. Unlike in your 401(k) and Roth IRA, you will now have tax implications if your ...
I'm a bit hesitant to put this in an answer as I don't know if specific investment advice is appropriate, but this has grown way too long for a comment. The typical answer given for people who don't have the time, experience, knowledge or inclination to pick specific stocks to hold should instead invest in ETFs ([excha...
66,684
I plan on taking a new job that does not allow employee 401k contributions for the first 6 months. I am used to maxing out my 401k, and this seems like a dangerous amount of money that I don't want to get too comfortable with, only to have to part with it later when I can start contributing to the new 401k (by my calcu...
2016/06/28
[ "https://money.stackexchange.com/questions/66684", "https://money.stackexchange.com", "https://money.stackexchange.com/users/24189/" ]
I would open a taxable account with the same custodian that manages your Roth IRA (e.g., Vanguard, Fidelity, etc.). Then within the taxable account I would invest the extra money in low cost, broad market index funds that are tax efficient. Unlike in your 401(k) and Roth IRA, you will now have tax implications if your ...
Short answer is fund a Roth. If you are under 50 then you can put in $5500 or $6500 if you are older. Great to have money in two buckets one pre tax and one post tax. Plus you can be aggressive putting money in it because you can always take money you put in the Roth out of the Roth with no tax or penalty. Taxes are...
66,684
I plan on taking a new job that does not allow employee 401k contributions for the first 6 months. I am used to maxing out my 401k, and this seems like a dangerous amount of money that I don't want to get too comfortable with, only to have to part with it later when I can start contributing to the new 401k (by my calcu...
2016/06/28
[ "https://money.stackexchange.com/questions/66684", "https://money.stackexchange.com", "https://money.stackexchange.com/users/24189/" ]
$9000 over 6 months is great, I'd use it for long term savings regardless of the 401(k) situation. There's nothing wrong with a mix of pre and post tax money for retirement. In fact, it's a great way to avoid paying too much tax should your 401(k) withdrawals in retirement push you into a higher bracket. Just invest th...
I'm a bit hesitant to put this in an answer as I don't know if specific investment advice is appropriate, but this has grown way too long for a comment. The typical answer given for people who don't have the time, experience, knowledge or inclination to pick specific stocks to hold should instead invest in ETFs ([excha...
66,684
I plan on taking a new job that does not allow employee 401k contributions for the first 6 months. I am used to maxing out my 401k, and this seems like a dangerous amount of money that I don't want to get too comfortable with, only to have to part with it later when I can start contributing to the new 401k (by my calcu...
2016/06/28
[ "https://money.stackexchange.com/questions/66684", "https://money.stackexchange.com", "https://money.stackexchange.com/users/24189/" ]
$9000 over 6 months is great, I'd use it for long term savings regardless of the 401(k) situation. There's nothing wrong with a mix of pre and post tax money for retirement. In fact, it's a great way to avoid paying too much tax should your 401(k) withdrawals in retirement push you into a higher bracket. Just invest th...
If your main concern is simply the psychological effect of not seeing the money, rather than getting return on the money, you should look into whether your employer will allow you to have direct deposit into two different accounts. If so, have what would have gone into your 401(k) go into a new bank account that you ne...
66,684
I plan on taking a new job that does not allow employee 401k contributions for the first 6 months. I am used to maxing out my 401k, and this seems like a dangerous amount of money that I don't want to get too comfortable with, only to have to part with it later when I can start contributing to the new 401k (by my calcu...
2016/06/28
[ "https://money.stackexchange.com/questions/66684", "https://money.stackexchange.com", "https://money.stackexchange.com/users/24189/" ]
$9000 over 6 months is great, I'd use it for long term savings regardless of the 401(k) situation. There's nothing wrong with a mix of pre and post tax money for retirement. In fact, it's a great way to avoid paying too much tax should your 401(k) withdrawals in retirement push you into a higher bracket. Just invest th...
Short answer is fund a Roth. If you are under 50 then you can put in $5500 or $6500 if you are older. Great to have money in two buckets one pre tax and one post tax. Plus you can be aggressive putting money in it because you can always take money you put in the Roth out of the Roth with no tax or penalty. Taxes are...
66,684
I plan on taking a new job that does not allow employee 401k contributions for the first 6 months. I am used to maxing out my 401k, and this seems like a dangerous amount of money that I don't want to get too comfortable with, only to have to part with it later when I can start contributing to the new 401k (by my calcu...
2016/06/28
[ "https://money.stackexchange.com/questions/66684", "https://money.stackexchange.com", "https://money.stackexchange.com/users/24189/" ]
$9000 over 6 months is great, I'd use it for long term savings regardless of the 401(k) situation. There's nothing wrong with a mix of pre and post tax money for retirement. In fact, it's a great way to avoid paying too much tax should your 401(k) withdrawals in retirement push you into a higher bracket. Just invest th...
Two options not mentioned: -No information about your emergency fund in your question. If you don't have 6 months of expenses saved up in a "safe" place (high yield savings account or money market fund) I'd add to that first. -Could you auto-withdraw the amount over six months, then when you can start contributing, c...
63,053,117
I am trying to connect to a google cloud VM instance having no external IP address via `cloud shell` and `cloud SDK`. Google document says that we can connect it using IAP Connecting through IAP: **refer** [using IAP](https://cloud.google.com/compute/docs/instances/connecting-advanced#bastion_host) a) Grant the `role...
2020/07/23
[ "https://Stackoverflow.com/questions/63053117", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10316689/" ]
It's exactly the same thing. Look at [this page](https://cloud.google.com/iap/docs/managing-access#roles) > > IAP-Secured Tunnel User (roles/iap.tunnelResourceAccessor) > > > You have the display name of the role: `IAP-Secured Tunnel User` that you see in the GUI, and you have the technical name of the role `role...
The link mentioned in the question ("refer [using IAP](https://cloud.google.com/compute/docs/instances/connecting-advanced#bastion_host)") actually points to the [Connecting to instances that do not have external IP addresses > Connecting through a bastion host](https://cloud.google.com/compute/docs/instances/connectin...
26,798,762
I used Laravel whereNotIn for exclude some project ids, for do that first i create exclude project id array like this $doNotDisplayThisProjectsIds = array(4, 6, 20); and exclude this projects using this query: ``` Project::whereNotIn('prject_id', $doNotDisplayThisProjectsIds)->get(); ``` Now I want to change proj...
2014/11/07
[ "https://Stackoverflow.com/questions/26798762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3099298/" ]
Your question is really complex because `console.log` needs a css string argument for every `%c` in your message. But since you do that dynamically, you cannot hard code your arguments for `console.log`, what leads to the problem, that you need to call `console.log` with an array of arguments. For this problem the `.ap...
Well try this, although you need still work on the regExp. This is just a tip ( how to display your message with a color ) , your question is more complex and bit messy. You trying to add several parameters into your function, you should try use 1 parameter color and make an array of it. Inside the function you would o...
26,798,762
I used Laravel whereNotIn for exclude some project ids, for do that first i create exclude project id array like this $doNotDisplayThisProjectsIds = array(4, 6, 20); and exclude this projects using this query: ``` Project::whereNotIn('prject_id', $doNotDisplayThisProjectsIds)->get(); ``` Now I want to change proj...
2014/11/07
[ "https://Stackoverflow.com/questions/26798762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3099298/" ]
Your question is really complex because `console.log` needs a css string argument for every `%c` in your message. But since you do that dynamically, you cannot hard code your arguments for `console.log`, what leads to the problem, that you need to call `console.log` with an array of arguments. For this problem the `.ap...
For every `%c` there needs to be a style. In your case, if you only want the numbers to be highlighted then you could make your function generic by passing the highlight and normal colors as parameters as well: ``` function colorLog(string, regexp, style, normalStyle) { var msg = string.replace(regexp, function (s...
26,798,762
I used Laravel whereNotIn for exclude some project ids, for do that first i create exclude project id array like this $doNotDisplayThisProjectsIds = array(4, 6, 20); and exclude this projects using this query: ``` Project::whereNotIn('prject_id', $doNotDisplayThisProjectsIds)->get(); ``` Now I want to change proj...
2014/11/07
[ "https://Stackoverflow.com/questions/26798762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3099298/" ]
Your question is really complex because `console.log` needs a css string argument for every `%c` in your message. But since you do that dynamically, you cannot hard code your arguments for `console.log`, what leads to the problem, that you need to call `console.log` with an array of arguments. For this problem the `.ap...
Thanks very much, @Markai and @abhitalks, "console.log.apply(console, args)" is indeed the key to my problem. Below is my solution inspired by Markai. ```js function colorLog(str, regExp, style, normalStyle) { if (str && regExp) { var css = [], i = 1, // css[0] is reserved for msg msg = str.r...
26,798,762
I used Laravel whereNotIn for exclude some project ids, for do that first i create exclude project id array like this $doNotDisplayThisProjectsIds = array(4, 6, 20); and exclude this projects using this query: ``` Project::whereNotIn('prject_id', $doNotDisplayThisProjectsIds)->get(); ``` Now I want to change proj...
2014/11/07
[ "https://Stackoverflow.com/questions/26798762", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3099298/" ]
Your question is really complex because `console.log` needs a css string argument for every `%c` in your message. But since you do that dynamically, you cannot hard code your arguments for `console.log`, what leads to the problem, that you need to call `console.log` with an array of arguments. For this problem the `.ap...
ะกan even shorter: ``` string='';//random string for painting //color classifier - 6 types of non-breaking space: for(let i=120;i--;) string+=`${'\u180E\u200B\u200C\u200D\u2060\uFEFF'[6*Math.random()^0]}${'+-0'[3*Math.random()^0]}`; css = [string];//preparing an array for spread //we are returning the replaced string ...
9,442,879
Query `Select 9/5` 'Showing output as `1` I want to get the exact ouput for 9/5 Expected Ouput ``` 1.8 instead of 1 ``` How to make a query
2012/02/25
[ "https://Stackoverflow.com/questions/9442879", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1157846/" ]
The problem is it is doing integer math. You can explicitly treat them as decimal numbers by adding `.0`: ``` SELECT 9.0 / 5.0 ``` You can also use CONVERT or CAST to be even more explicit: ``` SELECT CONVERT(DECIMAL(9,4), 9) / CONVERT(DECIMAL(9,4), 5) ``` Note: If either of the operands are decimal numbers, the ...
I don't have access to sql-server, and mysql seems to give the correct answer. However, I'd try forcing one or both of the arguments to be floats (i.e SELECT 9.0 /5.0)
244,496
Using cesium it is possible to pan the 2D map having Asia as the center? Example as shown in the image. [![enter image description here](https://i.stack.imgur.com/3sLUS.png)](https://i.stack.imgur.com/3sLUS.png)
2017/06/19
[ "https://gis.stackexchange.com/questions/244496", "https://gis.stackexchange.com", "https://gis.stackexchange.com/users/99353/" ]
solved the problem by using cesium 1.34 And the following codes ``` var target = new Cesium.Cartesian3.fromDegrees(103.85195, 1.290270, 35000000); viewer.camera.setView( { destination : target, orientation: { heading : Cesium.Math.toRadians(90.0), // east, default value is 0.0 (north) pitch : Ces...
Give this a try: ``` Cesium.Camera.DEFAULT_VIEW_RECTANGLE = Cesium.Rectangle.fromDegrees(0, -89, 170, 89); Cesium.Camera.DEFAULT_VIEW_FACTOR = 1.1; var viewer = new Cesium.Viewer('cesiumContainer'); viewer.scene.morphTo2D(0); ``` Note the `fromDegrees` parameters are: West, South, East, North. Also note this sets...
221,378
Here is my bash script that I just wrote to count line of code for JavaScript project. It will list number of: * Comment lines * Blank lines * All lines Here is my script: ``` #!/bin/bash fileExt="*.js" allFiles=$(find ./ -name "$fileExt") commentLines=$((perl -ne 'print "$1\n" while /(^\s+\/\/\s*\w+)/sg' $allFi...
2019/05/31
[ "https://codereview.stackexchange.com/questions/221378", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/188476/" ]
> > > ```bsh > fileExt="*.js" > allFiles=$(find ./ -name $fileExt) > > ``` > > This is a bug. The wildcard in `$fileExt` will be expanded by the shell, and cause a syntax error when the current directory has more than one matching file in it: ``` $ touch a.js b.js $ fileExt="*.js" $ find ./ -name $fileExt find: ...
General ======= Run `shellcheck` on this script - almost all variable expansions are unquoted, but need to be quoted. That will also highlight the non-portable `echo -e` (prefer `printf` instead) and a dodgy use of `$((` where `$( (` would be safer. I recommend setting `-u` and `-e` shell options to help you catch mo...
1,586,477
The common multiplication rules are $$(-1) \cdot (-1) = +1 \\ (+1) \cdot (+1) = +1$$ But these rules seem asymmetric. Because of these rules it is not possible e.g. to solve the equation $$x^2 = -1 $$ without introducing complex numbers. There would be two "more symmetric" alternatives: $$(-1) \cdot (-1) = -1 \\ ...
2015/12/23
[ "https://math.stackexchange.com/questions/1586477", "https://math.stackexchange.com", "https://math.stackexchange.com/users/27609/" ]
A lot of math would break down if you use that, yes. For example, with our multiplication, we have the property that for any three numbers $a,b,c$, we have $$a(b+c) = ab + bc$$ This would not hold anymore in your case, since $$0 = -1\cdot 0 = -1\cdot (1 + (-1)) \neq 1\cdot (-1) + (-1)\cdot (-1) = -1 -1 =-2$$ This is...
**Here is a very "naive" way of answering this question.** --- When trying to define the following: 1. Positive $\times$ Positive $=$? 2. Positive $\times$ Negative $=$? 3. Negative $\times$ Positive $=$? 4. Negative $\times$ Negative $=$? We first need to ensure that the answers to #2 and #3 are identical. This i...
1,586,477
The common multiplication rules are $$(-1) \cdot (-1) = +1 \\ (+1) \cdot (+1) = +1$$ But these rules seem asymmetric. Because of these rules it is not possible e.g. to solve the equation $$x^2 = -1 $$ without introducing complex numbers. There would be two "more symmetric" alternatives: $$(-1) \cdot (-1) = -1 \\ ...
2015/12/23
[ "https://math.stackexchange.com/questions/1586477", "https://math.stackexchange.com", "https://math.stackexchange.com/users/27609/" ]
A lot of math would break down if you use that, yes. For example, with our multiplication, we have the property that for any three numbers $a,b,c$, we have $$a(b+c) = ab + bc$$ This would not hold anymore in your case, since $$0 = -1\cdot 0 = -1\cdot (1 + (-1)) \neq 1\cdot (-1) + (-1)\cdot (-1) = -1 -1 =-2$$ This is...
Math would certainly break down, here's why. Assume that every number is equal to itself, addition is associative, multiplication distributes over addition , $1$ and $-1$ are additive inverses, $1$ is the multiplicative identity, and $0$ is the additive identity. Then it follows that: $$\begin{array}{lll} \bigg(1\cdot ...
1,586,477
The common multiplication rules are $$(-1) \cdot (-1) = +1 \\ (+1) \cdot (+1) = +1$$ But these rules seem asymmetric. Because of these rules it is not possible e.g. to solve the equation $$x^2 = -1 $$ without introducing complex numbers. There would be two "more symmetric" alternatives: $$(-1) \cdot (-1) = -1 \\ ...
2015/12/23
[ "https://math.stackexchange.com/questions/1586477", "https://math.stackexchange.com", "https://math.stackexchange.com/users/27609/" ]
A lot of math would break down if you use that, yes. For example, with our multiplication, we have the property that for any three numbers $a,b,c$, we have $$a(b+c) = ab + bc$$ This would not hold anymore in your case, since $$0 = -1\cdot 0 = -1\cdot (1 + (-1)) \neq 1\cdot (-1) + (-1)\cdot (-1) = -1 -1 =-2$$ This is...
The rules $(-1)\cdot(-1)=1$ and $1 \cdot 1 = 1$ aren't *conventions*. They are *consequences* of how we define our number system: specifically, of what multiplication is, and what the symbol $-1$ means. You can, if you like, define brand new operations, with different symbols, obeying different rules, and study the pr...
1,586,477
The common multiplication rules are $$(-1) \cdot (-1) = +1 \\ (+1) \cdot (+1) = +1$$ But these rules seem asymmetric. Because of these rules it is not possible e.g. to solve the equation $$x^2 = -1 $$ without introducing complex numbers. There would be two "more symmetric" alternatives: $$(-1) \cdot (-1) = -1 \\ ...
2015/12/23
[ "https://math.stackexchange.com/questions/1586477", "https://math.stackexchange.com", "https://math.stackexchange.com/users/27609/" ]
In some branches we do have that $1\cdot 1=-1$. However, the role of $1$ is *by definition* that of a neutral element of multiplication (like $0$ is neutral for addition), i.e., $1\cdot x=x\cdot 1=x$ holds (or is postulated to hold) for all $x$. So specifically $1\cdot 1=1$. This does not immediately contradict your id...
**Here is a very "naive" way of answering this question.** --- When trying to define the following: 1. Positive $\times$ Positive $=$? 2. Positive $\times$ Negative $=$? 3. Negative $\times$ Positive $=$? 4. Negative $\times$ Negative $=$? We first need to ensure that the answers to #2 and #3 are identical. This i...
1,586,477
The common multiplication rules are $$(-1) \cdot (-1) = +1 \\ (+1) \cdot (+1) = +1$$ But these rules seem asymmetric. Because of these rules it is not possible e.g. to solve the equation $$x^2 = -1 $$ without introducing complex numbers. There would be two "more symmetric" alternatives: $$(-1) \cdot (-1) = -1 \\ ...
2015/12/23
[ "https://math.stackexchange.com/questions/1586477", "https://math.stackexchange.com", "https://math.stackexchange.com/users/27609/" ]
In some branches we do have that $1\cdot 1=-1$. However, the role of $1$ is *by definition* that of a neutral element of multiplication (like $0$ is neutral for addition), i.e., $1\cdot x=x\cdot 1=x$ holds (or is postulated to hold) for all $x$. So specifically $1\cdot 1=1$. This does not immediately contradict your id...
Math would certainly break down, here's why. Assume that every number is equal to itself, addition is associative, multiplication distributes over addition , $1$ and $-1$ are additive inverses, $1$ is the multiplicative identity, and $0$ is the additive identity. Then it follows that: $$\begin{array}{lll} \bigg(1\cdot ...
1,586,477
The common multiplication rules are $$(-1) \cdot (-1) = +1 \\ (+1) \cdot (+1) = +1$$ But these rules seem asymmetric. Because of these rules it is not possible e.g. to solve the equation $$x^2 = -1 $$ without introducing complex numbers. There would be two "more symmetric" alternatives: $$(-1) \cdot (-1) = -1 \\ ...
2015/12/23
[ "https://math.stackexchange.com/questions/1586477", "https://math.stackexchange.com", "https://math.stackexchange.com/users/27609/" ]
In some branches we do have that $1\cdot 1=-1$. However, the role of $1$ is *by definition* that of a neutral element of multiplication (like $0$ is neutral for addition), i.e., $1\cdot x=x\cdot 1=x$ holds (or is postulated to hold) for all $x$. So specifically $1\cdot 1=1$. This does not immediately contradict your id...
The rules $(-1)\cdot(-1)=1$ and $1 \cdot 1 = 1$ aren't *conventions*. They are *consequences* of how we define our number system: specifically, of what multiplication is, and what the symbol $-1$ means. You can, if you like, define brand new operations, with different symbols, obeying different rules, and study the pr...
1,586,477
The common multiplication rules are $$(-1) \cdot (-1) = +1 \\ (+1) \cdot (+1) = +1$$ But these rules seem asymmetric. Because of these rules it is not possible e.g. to solve the equation $$x^2 = -1 $$ without introducing complex numbers. There would be two "more symmetric" alternatives: $$(-1) \cdot (-1) = -1 \\ ...
2015/12/23
[ "https://math.stackexchange.com/questions/1586477", "https://math.stackexchange.com", "https://math.stackexchange.com/users/27609/" ]
The rules $(-1)\cdot(-1)=1$ and $1 \cdot 1 = 1$ aren't *conventions*. They are *consequences* of how we define our number system: specifically, of what multiplication is, and what the symbol $-1$ means. You can, if you like, define brand new operations, with different symbols, obeying different rules, and study the pr...
**Here is a very "naive" way of answering this question.** --- When trying to define the following: 1. Positive $\times$ Positive $=$? 2. Positive $\times$ Negative $=$? 3. Negative $\times$ Positive $=$? 4. Negative $\times$ Negative $=$? We first need to ensure that the answers to #2 and #3 are identical. This i...
1,586,477
The common multiplication rules are $$(-1) \cdot (-1) = +1 \\ (+1) \cdot (+1) = +1$$ But these rules seem asymmetric. Because of these rules it is not possible e.g. to solve the equation $$x^2 = -1 $$ without introducing complex numbers. There would be two "more symmetric" alternatives: $$(-1) \cdot (-1) = -1 \\ ...
2015/12/23
[ "https://math.stackexchange.com/questions/1586477", "https://math.stackexchange.com", "https://math.stackexchange.com/users/27609/" ]
The rules $(-1)\cdot(-1)=1$ and $1 \cdot 1 = 1$ aren't *conventions*. They are *consequences* of how we define our number system: specifically, of what multiplication is, and what the symbol $-1$ means. You can, if you like, define brand new operations, with different symbols, obeying different rules, and study the pr...
Math would certainly break down, here's why. Assume that every number is equal to itself, addition is associative, multiplication distributes over addition , $1$ and $-1$ are additive inverses, $1$ is the multiplicative identity, and $0$ is the additive identity. Then it follows that: $$\begin{array}{lll} \bigg(1\cdot ...
15,523,000
In terms of x compared to y. * Does x comply with sql standards better? [apologies if subjective] * Is x more efficient than y? * Or are these scripts completely different and to be used in different contexts? x ``` SELECT * FROM a INNER JOIN b ON COALESCE(b.columntojoin, b.alterna...
2013/03/20
[ "https://Stackoverflow.com/questions/15523000", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1179880/" ]
`COALESCE` is essentially a shorthanded `CASE` statement. Both are **exactly** the same. There is also `ISNULL` in SQL Server (differs in other DBMSs), but that's actually a non-standard feature and is actually more limited that `COALESCE`.
In this case I would use `COALESCE` ( which provides more levels than `ISNULL`) rather than the `CASE` stement. The `CASE` statement seems a bit bulky here, seeing as you are only checking for `NULL`s anyway.
16,834,923
I try to invoke URL API at the best GPS location. User clicks the button that fires **findMe** method to set up *desiredAccuracy* and *distanceFilter* and run **`[self.locationManager startUpdatingLocation]`**. I check the best vertical and horizontal accuracy and if they don't change in the next iteration I run API a...
2013/05/30
[ "https://Stackoverflow.com/questions/16834923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2435994/" ]
Try by setting nil to your locationManagers delegate ``` _locationManager.delegate = nil; ```
Don't rely on the location manager calling your delegate method a specific number of times. You don't control the location manager, so depending on specific behavior beyond what's documented is always going to cause problems for you. You do control your own code, though, so make it do what you want: if you no longer wa...
16,834,923
I try to invoke URL API at the best GPS location. User clicks the button that fires **findMe** method to set up *desiredAccuracy* and *distanceFilter* and run **`[self.locationManager startUpdatingLocation]`**. I check the best vertical and horizontal accuracy and if they don't change in the next iteration I run API a...
2013/05/30
[ "https://Stackoverflow.com/questions/16834923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2435994/" ]
Try by setting nil to your locationManagers delegate ``` _locationManager.delegate = nil; ```
As suggested, adding it as answer. Two ways to do this, 1. Use a flag, check `flag=false` before making url request. After url request is sent set `flag=true`. 2. During view controller initialisation, start getting location updates, store the coords and in `findMe` method just make the URL request with stored coo...
16,834,923
I try to invoke URL API at the best GPS location. User clicks the button that fires **findMe** method to set up *desiredAccuracy* and *distanceFilter* and run **`[self.locationManager startUpdatingLocation]`**. I check the best vertical and horizontal accuracy and if they don't change in the next iteration I run API a...
2013/05/30
[ "https://Stackoverflow.com/questions/16834923", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2435994/" ]
Don't rely on the location manager calling your delegate method a specific number of times. You don't control the location manager, so depending on specific behavior beyond what's documented is always going to cause problems for you. You do control your own code, though, so make it do what you want: if you no longer wa...
As suggested, adding it as answer. Two ways to do this, 1. Use a flag, check `flag=false` before making url request. After url request is sent set `flag=true`. 2. During view controller initialisation, start getting location updates, store the coords and in `findMe` method just make the URL request with stored coo...
51,737
I subscribed in a 1Mbps broadband internet (data only). The provider said that customers would only get 60% of it which is approximately 600kbps of the 1Mbps, which is enough for me. But I've been observing my download speed and it is limited to only 12%, i can't get past 120kbps. Every time my DL speed exceeds 120kbps...
2009/10/06
[ "https://superuser.com/questions/51737", "https://superuser.com", "https://superuser.com/users/-1/" ]
1Mbps = 1 Mega **bit** per second and 1 [**byte**](http://en.wikipedia.org/wiki/Byte) = 8 [**bits**](http://en.wikipedia.org/wiki/Bit) so 1 Mbps = 0.125 Mega **byte** per second. Bit is typically represented by a lowercase `b`. While byte is typically represented by an uppercase `B` So 8 M**b**ps = 1 M**B**ps. This ...
Are you sure that you're not hitting 120 kilo**bytes** per second (kB/sec) (which is close enough to 1 mega**bit** per second [mbps])? 1 kB/sec is the same as 8 kilobits per second (kbps) See [Wikipedia for more explanation on data rate units](http://en.wikipedia.org/wiki/Data_rate_units). --- **To bring an end to a...
51,737
I subscribed in a 1Mbps broadband internet (data only). The provider said that customers would only get 60% of it which is approximately 600kbps of the 1Mbps, which is enough for me. But I've been observing my download speed and it is limited to only 12%, i can't get past 120kbps. Every time my DL speed exceeds 120kbps...
2009/10/06
[ "https://superuser.com/questions/51737", "https://superuser.com", "https://superuser.com/users/-1/" ]
1Mbps = 1 Mega **bit** per second and 1 [**byte**](http://en.wikipedia.org/wiki/Byte) = 8 [**bits**](http://en.wikipedia.org/wiki/Bit) so 1 Mbps = 0.125 Mega **byte** per second. Bit is typically represented by a lowercase `b`. While byte is typically represented by an uppercase `B` So 8 M**b**ps = 1 M**B**ps. This ...
Some ISPs do take measures to cap bandwidth. Some have even covertly resorted to [traffic shaping](http://en.wikipedia.org/wiki/Traffic_shaping) (limited speed based on the type of data). Whether they have the right to is debatable (see [net neutrality](http://en.wikipedia.org/wiki/Net_neutrality)). Comcast was recent...
51,737
I subscribed in a 1Mbps broadband internet (data only). The provider said that customers would only get 60% of it which is approximately 600kbps of the 1Mbps, which is enough for me. But I've been observing my download speed and it is limited to only 12%, i can't get past 120kbps. Every time my DL speed exceeds 120kbps...
2009/10/06
[ "https://superuser.com/questions/51737", "https://superuser.com", "https://superuser.com/users/-1/" ]
Are you sure that you're not hitting 120 kilo**bytes** per second (kB/sec) (which is close enough to 1 mega**bit** per second [mbps])? 1 kB/sec is the same as 8 kilobits per second (kbps) See [Wikipedia for more explanation on data rate units](http://en.wikipedia.org/wiki/Data_rate_units). --- **To bring an end to a...
Some ISPs do take measures to cap bandwidth. Some have even covertly resorted to [traffic shaping](http://en.wikipedia.org/wiki/Traffic_shaping) (limited speed based on the type of data). Whether they have the right to is debatable (see [net neutrality](http://en.wikipedia.org/wiki/Net_neutrality)). Comcast was recent...
51,737
I subscribed in a 1Mbps broadband internet (data only). The provider said that customers would only get 60% of it which is approximately 600kbps of the 1Mbps, which is enough for me. But I've been observing my download speed and it is limited to only 12%, i can't get past 120kbps. Every time my DL speed exceeds 120kbps...
2009/10/06
[ "https://superuser.com/questions/51737", "https://superuser.com", "https://superuser.com/users/-1/" ]
1Mbps = 1 Mega **bit** per second and 1 [**byte**](http://en.wikipedia.org/wiki/Byte) = 8 [**bits**](http://en.wikipedia.org/wiki/Bit) so 1 Mbps = 0.125 Mega **byte** per second. Bit is typically represented by a lowercase `b`. While byte is typically represented by an uppercase `B` So 8 M**b**ps = 1 M**B**ps. This ...
I think your question is about file transfer rate, not differences in in connection rates. It is not about bits or bytes or 1024. Your file transfer rate will not be synchronous with your connection rate, it will be about 1/8th of the connection rate. that is a MAX rate, so add to that the normal lag of the internet a...
51,737
I subscribed in a 1Mbps broadband internet (data only). The provider said that customers would only get 60% of it which is approximately 600kbps of the 1Mbps, which is enough for me. But I've been observing my download speed and it is limited to only 12%, i can't get past 120kbps. Every time my DL speed exceeds 120kbps...
2009/10/06
[ "https://superuser.com/questions/51737", "https://superuser.com", "https://superuser.com/users/-1/" ]
Actually, there are three things going on. One is the bits versus bytes issue that others have mentioned. Another is that line speeds are reported in decimal units, not binary units. And a third is that the line has to carry not just data but also address and control information. A 1Mbps line carries 1,000,000 bits pe...
To try to simplify the other answers, providers report in Bits because they give higher numbers. Most applications report in bytes. 1mbps connection = 128KB/s. When downloading in Firefox, Steam, uTorrent, etc. the highest speed you will ever see is 128KB/s. To reinforce what is happening, the difference between byte...
51,737
I subscribed in a 1Mbps broadband internet (data only). The provider said that customers would only get 60% of it which is approximately 600kbps of the 1Mbps, which is enough for me. But I've been observing my download speed and it is limited to only 12%, i can't get past 120kbps. Every time my DL speed exceeds 120kbps...
2009/10/06
[ "https://superuser.com/questions/51737", "https://superuser.com", "https://superuser.com/users/-1/" ]
1Mbps = 1 Mega **bit** per second and 1 [**byte**](http://en.wikipedia.org/wiki/Byte) = 8 [**bits**](http://en.wikipedia.org/wiki/Bit) so 1 Mbps = 0.125 Mega **byte** per second. Bit is typically represented by a lowercase `b`. While byte is typically represented by an uppercase `B` So 8 M**b**ps = 1 M**B**ps. This ...
Actually, there are three things going on. One is the bits versus bytes issue that others have mentioned. Another is that line speeds are reported in decimal units, not binary units. And a third is that the line has to carry not just data but also address and control information. A 1Mbps line carries 1,000,000 bits pe...
51,737
I subscribed in a 1Mbps broadband internet (data only). The provider said that customers would only get 60% of it which is approximately 600kbps of the 1Mbps, which is enough for me. But I've been observing my download speed and it is limited to only 12%, i can't get past 120kbps. Every time my DL speed exceeds 120kbps...
2009/10/06
[ "https://superuser.com/questions/51737", "https://superuser.com", "https://superuser.com/users/-1/" ]
Are you sure that you're not hitting 120 kilo**bytes** per second (kB/sec) (which is close enough to 1 mega**bit** per second [mbps])? 1 kB/sec is the same as 8 kilobits per second (kbps) See [Wikipedia for more explanation on data rate units](http://en.wikipedia.org/wiki/Data_rate_units). --- **To bring an end to a...
I think your question is about file transfer rate, not differences in in connection rates. It is not about bits or bytes or 1024. Your file transfer rate will not be synchronous with your connection rate, it will be about 1/8th of the connection rate. that is a MAX rate, so add to that the normal lag of the internet a...
51,737
I subscribed in a 1Mbps broadband internet (data only). The provider said that customers would only get 60% of it which is approximately 600kbps of the 1Mbps, which is enough for me. But I've been observing my download speed and it is limited to only 12%, i can't get past 120kbps. Every time my DL speed exceeds 120kbps...
2009/10/06
[ "https://superuser.com/questions/51737", "https://superuser.com", "https://superuser.com/users/-1/" ]
Actually, there are three things going on. One is the bits versus bytes issue that others have mentioned. Another is that line speeds are reported in decimal units, not binary units. And a third is that the line has to carry not just data but also address and control information. A 1Mbps line carries 1,000,000 bits pe...
I think your question is about file transfer rate, not differences in in connection rates. It is not about bits or bytes or 1024. Your file transfer rate will not be synchronous with your connection rate, it will be about 1/8th of the connection rate. that is a MAX rate, so add to that the normal lag of the internet a...
51,737
I subscribed in a 1Mbps broadband internet (data only). The provider said that customers would only get 60% of it which is approximately 600kbps of the 1Mbps, which is enough for me. But I've been observing my download speed and it is limited to only 12%, i can't get past 120kbps. Every time my DL speed exceeds 120kbps...
2009/10/06
[ "https://superuser.com/questions/51737", "https://superuser.com", "https://superuser.com/users/-1/" ]
Are you sure that you're not hitting 120 kilo**bytes** per second (kB/sec) (which is close enough to 1 mega**bit** per second [mbps])? 1 kB/sec is the same as 8 kilobits per second (kbps) See [Wikipedia for more explanation on data rate units](http://en.wikipedia.org/wiki/Data_rate_units). --- **To bring an end to a...
Actually, there are three things going on. One is the bits versus bytes issue that others have mentioned. Another is that line speeds are reported in decimal units, not binary units. And a third is that the line has to carry not just data but also address and control information. A 1Mbps line carries 1,000,000 bits pe...
51,737
I subscribed in a 1Mbps broadband internet (data only). The provider said that customers would only get 60% of it which is approximately 600kbps of the 1Mbps, which is enough for me. But I've been observing my download speed and it is limited to only 12%, i can't get past 120kbps. Every time my DL speed exceeds 120kbps...
2009/10/06
[ "https://superuser.com/questions/51737", "https://superuser.com", "https://superuser.com/users/-1/" ]
Actually, there are three things going on. One is the bits versus bytes issue that others have mentioned. Another is that line speeds are reported in decimal units, not binary units. And a third is that the line has to carry not just data but also address and control information. A 1Mbps line carries 1,000,000 bits pe...
Some ISPs do take measures to cap bandwidth. Some have even covertly resorted to [traffic shaping](http://en.wikipedia.org/wiki/Traffic_shaping) (limited speed based on the type of data). Whether they have the right to is debatable (see [net neutrality](http://en.wikipedia.org/wiki/Net_neutrality)). Comcast was recent...
10,211
Senator Ted Cruz [said](https://www.washingtonpost.com/news/post-politics/wp/2013/06/03/ted-cruz-abolish-the-irs/) > > I think we ought to abolish the IRS and instead move to a simple flat tax where the average American can fill out taxes on postcard. > > > What are the benefits the supporters of this plan ascri...
2016/03/14
[ "https://politics.stackexchange.com/questions/10211", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/6970/" ]
The "real" pros and cons are extremely complex, but the popular understanding of the plan is roughly as follows: **Pros:** It's fair for everyone because we all pay the same tax rate. No one gets disproportionately burdened or singled out. It's impossible for anyone to game the system or exploit loopholes because i...
The usually overlooked advantage is that the cost of collecting the tax is significantly reduced by such a system. Guesstimates currently place the cost of collecting one spendable tax dollar at over $5. Reducing that cost by even 20% means that there is an additional dollar in the economy for every single tax dollar t...
10,211
Senator Ted Cruz [said](https://www.washingtonpost.com/news/post-politics/wp/2013/06/03/ted-cruz-abolish-the-irs/) > > I think we ought to abolish the IRS and instead move to a simple flat tax where the average American can fill out taxes on postcard. > > > What are the benefits the supporters of this plan ascri...
2016/03/14
[ "https://politics.stackexchange.com/questions/10211", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/6970/" ]
The "real" pros and cons are extremely complex, but the popular understanding of the plan is roughly as follows: **Pros:** It's fair for everyone because we all pay the same tax rate. No one gets disproportionately burdened or singled out. It's impossible for anyone to game the system or exploit loopholes because i...
Before I get into the implications of the flat tax, let's define [progressive tax](https://en.wikipedia.org/wiki/Progressive_tax) and regressive tax. > > Progressive taxes are imposed in an attempt to reduce the tax incidence of people with a lower ability to pay, as such taxes shift the incidence increasingly to tho...
10,211
Senator Ted Cruz [said](https://www.washingtonpost.com/news/post-politics/wp/2013/06/03/ted-cruz-abolish-the-irs/) > > I think we ought to abolish the IRS and instead move to a simple flat tax where the average American can fill out taxes on postcard. > > > What are the benefits the supporters of this plan ascri...
2016/03/14
[ "https://politics.stackexchange.com/questions/10211", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/6970/" ]
The "real" pros and cons are extremely complex, but the popular understanding of the plan is roughly as follows: **Pros:** It's fair for everyone because we all pay the same tax rate. No one gets disproportionately burdened or singled out. It's impossible for anyone to game the system or exploit loopholes because i...
> > Senator Ted Cruz said "I think we ought to abolish the IRS and instead > move to a simple flat tax where the average American can fill out > taxes on postcard." What are the benefits the supporters of this plan > ascribe to it and what are the drawbacks of the plan in the eyes of > its opponents? > > > Ted Cru...
10,211
Senator Ted Cruz [said](https://www.washingtonpost.com/news/post-politics/wp/2013/06/03/ted-cruz-abolish-the-irs/) > > I think we ought to abolish the IRS and instead move to a simple flat tax where the average American can fill out taxes on postcard. > > > What are the benefits the supporters of this plan ascri...
2016/03/14
[ "https://politics.stackexchange.com/questions/10211", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/6970/" ]
The "real" pros and cons are extremely complex, but the popular understanding of the plan is roughly as follows: **Pros:** It's fair for everyone because we all pay the same tax rate. No one gets disproportionately burdened or singled out. It's impossible for anyone to game the system or exploit loopholes because i...
If you read the entire statement, he's not talking about eliminating the IRS itself, but going to a flat tax... eliminating the various tiers of taxation on income. The idea comes up every so often... but has one fundamental flaw. The US government, like most democratic governments, uses taxes to encourage or disco...
10,211
Senator Ted Cruz [said](https://www.washingtonpost.com/news/post-politics/wp/2013/06/03/ted-cruz-abolish-the-irs/) > > I think we ought to abolish the IRS and instead move to a simple flat tax where the average American can fill out taxes on postcard. > > > What are the benefits the supporters of this plan ascri...
2016/03/14
[ "https://politics.stackexchange.com/questions/10211", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/6970/" ]
Before I get into the implications of the flat tax, let's define [progressive tax](https://en.wikipedia.org/wiki/Progressive_tax) and regressive tax. > > Progressive taxes are imposed in an attempt to reduce the tax incidence of people with a lower ability to pay, as such taxes shift the incidence increasingly to tho...
The usually overlooked advantage is that the cost of collecting the tax is significantly reduced by such a system. Guesstimates currently place the cost of collecting one spendable tax dollar at over $5. Reducing that cost by even 20% means that there is an additional dollar in the economy for every single tax dollar t...
10,211
Senator Ted Cruz [said](https://www.washingtonpost.com/news/post-politics/wp/2013/06/03/ted-cruz-abolish-the-irs/) > > I think we ought to abolish the IRS and instead move to a simple flat tax where the average American can fill out taxes on postcard. > > > What are the benefits the supporters of this plan ascri...
2016/03/14
[ "https://politics.stackexchange.com/questions/10211", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/6970/" ]
> > Senator Ted Cruz said "I think we ought to abolish the IRS and instead > move to a simple flat tax where the average American can fill out > taxes on postcard." What are the benefits the supporters of this plan > ascribe to it and what are the drawbacks of the plan in the eyes of > its opponents? > > > Ted Cru...
The usually overlooked advantage is that the cost of collecting the tax is significantly reduced by such a system. Guesstimates currently place the cost of collecting one spendable tax dollar at over $5. Reducing that cost by even 20% means that there is an additional dollar in the economy for every single tax dollar t...
10,211
Senator Ted Cruz [said](https://www.washingtonpost.com/news/post-politics/wp/2013/06/03/ted-cruz-abolish-the-irs/) > > I think we ought to abolish the IRS and instead move to a simple flat tax where the average American can fill out taxes on postcard. > > > What are the benefits the supporters of this plan ascri...
2016/03/14
[ "https://politics.stackexchange.com/questions/10211", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/6970/" ]
If you read the entire statement, he's not talking about eliminating the IRS itself, but going to a flat tax... eliminating the various tiers of taxation on income. The idea comes up every so often... but has one fundamental flaw. The US government, like most democratic governments, uses taxes to encourage or disco...
The usually overlooked advantage is that the cost of collecting the tax is significantly reduced by such a system. Guesstimates currently place the cost of collecting one spendable tax dollar at over $5. Reducing that cost by even 20% means that there is an additional dollar in the economy for every single tax dollar t...
10,211
Senator Ted Cruz [said](https://www.washingtonpost.com/news/post-politics/wp/2013/06/03/ted-cruz-abolish-the-irs/) > > I think we ought to abolish the IRS and instead move to a simple flat tax where the average American can fill out taxes on postcard. > > > What are the benefits the supporters of this plan ascri...
2016/03/14
[ "https://politics.stackexchange.com/questions/10211", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/6970/" ]
Before I get into the implications of the flat tax, let's define [progressive tax](https://en.wikipedia.org/wiki/Progressive_tax) and regressive tax. > > Progressive taxes are imposed in an attempt to reduce the tax incidence of people with a lower ability to pay, as such taxes shift the incidence increasingly to tho...
If you read the entire statement, he's not talking about eliminating the IRS itself, but going to a flat tax... eliminating the various tiers of taxation on income. The idea comes up every so often... but has one fundamental flaw. The US government, like most democratic governments, uses taxes to encourage or disco...
10,211
Senator Ted Cruz [said](https://www.washingtonpost.com/news/post-politics/wp/2013/06/03/ted-cruz-abolish-the-irs/) > > I think we ought to abolish the IRS and instead move to a simple flat tax where the average American can fill out taxes on postcard. > > > What are the benefits the supporters of this plan ascri...
2016/03/14
[ "https://politics.stackexchange.com/questions/10211", "https://politics.stackexchange.com", "https://politics.stackexchange.com/users/6970/" ]
> > Senator Ted Cruz said "I think we ought to abolish the IRS and instead > move to a simple flat tax where the average American can fill out > taxes on postcard." What are the benefits the supporters of this plan > ascribe to it and what are the drawbacks of the plan in the eyes of > its opponents? > > > Ted Cru...
If you read the entire statement, he's not talking about eliminating the IRS itself, but going to a flat tax... eliminating the various tiers of taxation on income. The idea comes up every so often... but has one fundamental flaw. The US government, like most democratic governments, uses taxes to encourage or disco...
114,381
I don't remember much, but I recall reading a book with three short sci-fi stories like 20 years ago from my old school library. I just remember that one of the stories took place on the moon or some asteroid and the main character had some kind of encounter with some kind of ghosts/clones. Maybe another of the stori...
2016/01/10
[ "https://scifi.stackexchange.com/questions/114381", "https://scifi.stackexchange.com", "https://scifi.stackexchange.com/users/59065/" ]
[The Gods Themselves](https://en.wikipedia.org/wiki/The_Gods_Themselves) by Isaac Asimov? The book has three seemingly unrelated stories that turn out to be closely related to each other. The second story is set in a parallel universe where matter is able to pass through other matter, so some of the creatures are gh...
Kind of a shot in the dark, but maybe *The New Atlantis and Other Novellas of Science Fiction*? My limited evidence: 1) It does have exactly three stories 2) It is titled "story name and other stories" 3) The first story, Gene Wolfe's "Silhouette", does have to do with a ghost-like figure 4) It was publishe...
36,965,553
Is there any difference between following two methods? Which one is preferable and why? Prg1: ``` public static boolean test() throws Exception { try { doSomething(); return true; } catch (Exception e) { throw new Exception("No!"); } } ``` Prg2: ``` public static boolean te...
2016/05/01
[ "https://Stackoverflow.com/questions/36965553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6228520/" ]
Nope there is no difference between both the methods. It will return true value in both the cases effectively by resuming the flow of the program as soon an and exception is handled. Catch will be accessed only when an exception occurs.
There is no difference, but the first Prg1 is faster than the Prg2.
36,965,553
Is there any difference between following two methods? Which one is preferable and why? Prg1: ``` public static boolean test() throws Exception { try { doSomething(); return true; } catch (Exception e) { throw new Exception("No!"); } } ``` Prg2: ``` public static boolean te...
2016/05/01
[ "https://Stackoverflow.com/questions/36965553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6228520/" ]
Consider these cases where you're not returning a constant expression: Case 1: ``` public static Val test() throws Exception { try { return doSomething(); } catch (Exception e) { throw new Exception("No!"); } // Unreachable code goes here } ``` Case 2: ``` public static Val test() t...
Nope there is no difference between both the methods. It will return true value in both the cases effectively by resuming the flow of the program as soon an and exception is handled. Catch will be accessed only when an exception occurs.
36,965,553
Is there any difference between following two methods? Which one is preferable and why? Prg1: ``` public static boolean test() throws Exception { try { doSomething(); return true; } catch (Exception e) { throw new Exception("No!"); } } ``` Prg2: ``` public static boolean te...
2016/05/01
[ "https://Stackoverflow.com/questions/36965553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6228520/" ]
Consider these cases where you're not returning a constant expression: Case 1: ``` public static Val test() throws Exception { try { return doSomething(); } catch (Exception e) { throw new Exception("No!"); } // Unreachable code goes here } ``` Case 2: ``` public static Val test() t...
There is no difference, but the first Prg1 is faster than the Prg2.
36,965,553
Is there any difference between following two methods? Which one is preferable and why? Prg1: ``` public static boolean test() throws Exception { try { doSomething(); return true; } catch (Exception e) { throw new Exception("No!"); } } ``` Prg2: ``` public static boolean te...
2016/05/01
[ "https://Stackoverflow.com/questions/36965553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6228520/" ]
*I'm assuming this is a general question. Otherwise I might comment on other aspects of your method(s).* I think in the case or small methods like these it doesn't really matter. The method is short enough to understand immediately what's going on, what's related to what etc. However, in the case of longer methods th...
There is no difference, but the first Prg1 is faster than the Prg2.
36,965,553
Is there any difference between following two methods? Which one is preferable and why? Prg1: ``` public static boolean test() throws Exception { try { doSomething(); return true; } catch (Exception e) { throw new Exception("No!"); } } ``` Prg2: ``` public static boolean te...
2016/05/01
[ "https://Stackoverflow.com/questions/36965553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6228520/" ]
Consider these cases where you're not returning a constant expression: Case 1: ``` public static Val test() throws Exception { try { return doSomething(); } catch (Exception e) { throw new Exception("No!"); } // Unreachable code goes here } ``` Case 2: ``` public static Val test() t...
*I'm assuming this is a general question. Otherwise I might comment on other aspects of your method(s).* I think in the case or small methods like these it doesn't really matter. The method is short enough to understand immediately what's going on, what's related to what etc. However, in the case of longer methods th...
42,760,243
i was trying to follow [this](https://laravel.com/docs/5.1/quickstart#installation) tutorial on Laravel, even though most of the code & directories there were outdated, i managed to make the "Add Task" and also The Form to show up after a few errors. now the problem, the delete button. when i click on it, it shows a "...
2017/03/13
[ "https://Stackoverflow.com/questions/42760243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7702001/" ]
Change ``` <form action="{{ url('task/'.$task->id) }}" method="DELETE"> ``` to ``` <form action="{{ url('task/'.$task->id) }}" method="POST"> ``` Because form method DELETE does not exist, Laravel just "overwrites" this method with the hidden input "method" (you can place this input using "`{{ method_field('DELET...
Form dosent support method Delete or Put ... It support only get and post methods, if You want implement delete in laravel this article will help you [link](https://stackoverflow.com/questions/28634798/how-can-i-delete-a-post-resource-in-laravel-5)
42,760,243
i was trying to follow [this](https://laravel.com/docs/5.1/quickstart#installation) tutorial on Laravel, even though most of the code & directories there were outdated, i managed to make the "Add Task" and also The Form to show up after a few errors. now the problem, the delete button. when i click on it, it shows a "...
2017/03/13
[ "https://Stackoverflow.com/questions/42760243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7702001/" ]
Change ``` <form action="{{ url('task/'.$task->id) }}" method="DELETE"> ``` to ``` <form action="{{ url('task/'.$task->id) }}" method="POST"> ``` Because form method DELETE does not exist, Laravel just "overwrites" this method with the hidden input "method" (you can place this input using "`{{ method_field('DELET...
Answer : Turns out the problem lies in the Database-table itself, let me explain : i was referring to a 'tasks' table that is referred as 'task' in code (no problem) BUT, i was referring to a column called "ID" in my table as "id" in my code, creating the error (a rookie mistake). thanks to @Autista\_z for the pointer...
42,760,243
i was trying to follow [this](https://laravel.com/docs/5.1/quickstart#installation) tutorial on Laravel, even though most of the code & directories there were outdated, i managed to make the "Add Task" and also The Form to show up after a few errors. now the problem, the delete button. when i click on it, it shows a "...
2017/03/13
[ "https://Stackoverflow.com/questions/42760243", "https://Stackoverflow.com", "https://Stackoverflow.com/users/7702001/" ]
Answer : Turns out the problem lies in the Database-table itself, let me explain : i was referring to a 'tasks' table that is referred as 'task' in code (no problem) BUT, i was referring to a column called "ID" in my table as "id" in my code, creating the error (a rookie mistake). thanks to @Autista\_z for the pointer...
Form dosent support method Delete or Put ... It support only get and post methods, if You want implement delete in laravel this article will help you [link](https://stackoverflow.com/questions/28634798/how-can-i-delete-a-post-resource-in-laravel-5)
7,303,293
I am using MediaPlayer to try and stream video and audio from youtube. How do i go about doing this using the url: Example: ``` http://www.youtube.com/watch?v=SgGhtjKWLOE&feature=feedrec ``` EDIT: LogCat Error i get when using your methods. ``` 09-04 22:22:30.140: INFO/AwesomePlayer(85): setDataSource_l('http://w...
2011/09/05
[ "https://Stackoverflow.com/questions/7303293", "https://Stackoverflow.com", "https://Stackoverflow.com/users/867895/" ]
If you're wanting to use `MediaPlayer` object then the following calls will work for you: ``` MediaPlayer mp = new MediaPlayer(); mp.setDataSource("http://www.youtube.com/watch?v=SgGhtjKWLOE&feature=feedrec"); mp.prepare(); mp.start(); ``` Otherwise, if you don't mind having the YouTube app take over, you can use th...
``` Uri uri = Uri.parse("http://www.youtube.com/watch?v=SgGhtjKWLOE&feature=feedrec"); Intent i = new Intent("android.intent.action.VIEW"); i.setDataAndType(uri, "video/*"); startActivity(i); ```
523
My teacher recently rejected the idea of me using this site for a research paper, and I was wondering if you would think that this site could be considered a source.
2013/05/03
[ "https://history.meta.stackexchange.com/questions/523", "https://history.meta.stackexchange.com", "https://history.meta.stackexchange.com/users/2272/" ]
Your teacher was right to do so. This website would probably be a bad source to use as a primary reference in a paper. Any random moron in the world with internet access is free to post an answer here. (For exhibit A, click my name below...) However, if there's something that has you stumped in your research, I'd thin...
T.E.D. gave a really good answer! Here are my bits on this: If some answer in here really drives you in a new direction or brings up a new idea, you could of course give credit where credit should be given. Like "The following idea of sliced bread was brought up first by random moron in the world [1]: Sliced bread is ...
523
My teacher recently rejected the idea of me using this site for a research paper, and I was wondering if you would think that this site could be considered a source.
2013/05/03
[ "https://history.meta.stackexchange.com/questions/523", "https://history.meta.stackexchange.com", "https://history.meta.stackexchange.com/users/2272/" ]
Your teacher was right to do so. This website would probably be a bad source to use as a primary reference in a paper. Any random moron in the world with internet access is free to post an answer here. (For exhibit A, click my name below...) However, if there's something that has you stumped in your research, I'd thin...
No, this website is not an academic source, in the same way that Wikipedia is not. Your first stop when asking a question should be the [Reference Desk](https://en.wikipedia.org/wiki/Wikipedia%3aReference_desk/Humanities) on Wikipedia. Anyone can answer there and you will find about as many incompetent fools as are her...
523
My teacher recently rejected the idea of me using this site for a research paper, and I was wondering if you would think that this site could be considered a source.
2013/05/03
[ "https://history.meta.stackexchange.com/questions/523", "https://history.meta.stackexchange.com", "https://history.meta.stackexchange.com/users/2272/" ]
Your teacher was right to do so. This website would probably be a bad source to use as a primary reference in a paper. Any random moron in the world with internet access is free to post an answer here. (For exhibit A, click my name below...) However, if there's something that has you stumped in your research, I'd thin...
SE is even worse than Wikipedia, because it doesn't have such tight quality control and answers don't even need references. It's as much an academic source as instant messaging with people who claim to be experts.
63,950,846
I'm working to make my html responsiveness, I want to do something on IPhoneX(width:375px) when I write code: ``` @media(max-width:375px){ .news-posts-page .news-posts-section .elementor-posts{display: block;} } ``` this doesn't work for IPhoneX. but when I write this: ``` @media(max-width:980px){ .news-posts-p...
2020/09/18
[ "https://Stackoverflow.com/questions/63950846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11090255/" ]
I actually tried that with a Different Approach, where I created 2 different stacks `temp` and `temp1`, instead of recursively calling the function I had internal checks and printed the output at the end ``` static void deleteFirstHalf(Stack<Integer> stack) { Stack<Integer> temp = new Stack<Integer>(); Stack<I...
Your bug comes from the fact that you're supposed to delete the bottom `floor(n/2)` elements, but instead you're keeping the top `floor(n/2)` elements. The reason it works for some test cases is that when n is even, keeping the top n/2 elements is the same as deleting the bottom n/2 elements. When n is odd, the code sh...
63,950,846
I'm working to make my html responsiveness, I want to do something on IPhoneX(width:375px) when I write code: ``` @media(max-width:375px){ .news-posts-page .news-posts-section .elementor-posts{display: block;} } ``` this doesn't work for IPhoneX. but when I write this: ``` @media(max-width:980px){ .news-posts-p...
2020/09/18
[ "https://Stackoverflow.com/questions/63950846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11090255/" ]
I actually tried that with a Different Approach, where I created 2 different stacks `temp` and `temp1`, instead of recursively calling the function I had internal checks and printed the output at the end ``` static void deleteFirstHalf(Stack<Integer> stack) { Stack<Integer> temp = new Stack<Integer>(); Stack<I...
Instead of **curr<Math.floor(n/2)** try **n-curr > Math.floor(n/2)**
63,950,846
I'm working to make my html responsiveness, I want to do something on IPhoneX(width:375px) when I write code: ``` @media(max-width:375px){ .news-posts-page .news-posts-section .elementor-posts{display: block;} } ``` this doesn't work for IPhoneX. but when I write this: ``` @media(max-width:980px){ .news-posts-p...
2020/09/18
[ "https://Stackoverflow.com/questions/63950846", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11090255/" ]
I actually tried that with a Different Approach, where I created 2 different stacks `temp` and `temp1`, instead of recursively calling the function I had internal checks and printed the output at the end ``` static void deleteFirstHalf(Stack<Integer> stack) { Stack<Integer> temp = new Stack<Integer>(); Stack<I...
Instead of (curr<Math.floor(n/2)) try (curr < n-Math.floor(n/2))
4,163,043
I recently have been reading a book on proofs, and in the very first chapter it started to discuss implication. It gave implication's truth table and different ways of expressing implication, and it did attempt to explain it to the reader, but I still found myself confused on what implication actually is. [Implication...
2021/06/04
[ "https://math.stackexchange.com/questions/4163043", "https://math.stackexchange.com", "https://math.stackexchange.com/users/937566/" ]
You can think of $A \to B$ as asking *"If I give you $A$ can you return $B$?"*. This line of thinking is based on a [more general logic](https://en.wikipedia.org/wiki/Intuitionistic_logic) than classical logic, but here you don't need to know much about it except * *"$P$ is true"* should be understood as *"we have $P...
In a proof, an implication must be taken in its formal meaning and has little to do with an implied "cause-effect" relation. It is implicit that when you write an implication $P\implies Q$, the result of the evaluation of this boolean expression is *true*. The proposition $$n>0\implies n+1>0$$ can be true in three w...
101,640
**Task description** > > You are given a list and an item, find the length of the longest consecutive subsequence of the list containing only the item. > > > **Testcases** ``` [1, 1, 2, 3] 1 -> 2 [1, 0, 0, 2, 3, 0, 4, 0, 0, 0, 6] 0 -> 3 ``` This code is pretty readable in my opinion but I fear that the \$O(N^2...
2015/08/22
[ "https://codereview.stackexchange.com/questions/101640", "https://codereview.stackexchange.com", "https://codereview.stackexchange.com/users/54718/" ]
Yes, `chunk` is the way to go. I'd write it differently, though, using a list-comphehension approach (in Ruby: `map`+`if`+`compact`. Or with a [custom](https://stackoverflow.com/questions/310426/list-comprehension-in-ruby) method.) and taking in account the edge case (no elements `item` in the array): ``` def longest_...
After some more thinking, I realized that `Array.chunk` is `O(N)` and what I was looking for: ``` def longest_item_only_subsequence_len(arr, item) return 0 if ! arr.include?(item) arr .chunk(&:itself) .select{|kind, _| kind == item} .collect {|_, subseq| subseq} .max_by(&:length) .length end...
9,702,228
I have app with lot off activities and user can walk between activities. How to find if some activity is on stack ( just to call finish() ) or not on stack ?
2012/03/14
[ "https://Stackoverflow.com/questions/9702228", "https://Stackoverflow.com", "https://Stackoverflow.com/users/486578/" ]
I would say it is not overkill. Even if you are 100% certain (can you really be?) that you never need to provide your application in a different language, it makes the code much more readable, if it is not "littered" with strings/messages. Personally, I found out that I started writing much better (error) messages, on...
If you just use one language (i.e. English) now and in the future you can ignore ReSharper's internationalization features. But if it can happen that you will support other languages you should move all strings (that appear in user interface) to the Resources.
9,702,228
I have app with lot off activities and user can walk between activities. How to find if some activity is on stack ( just to call finish() ) or not on stack ?
2012/03/14
[ "https://Stackoverflow.com/questions/9702228", "https://Stackoverflow.com", "https://Stackoverflow.com/users/486578/" ]
I would say it is not overkill. Even if you are 100% certain (can you really be?) that you never need to provide your application in a different language, it makes the code much more readable, if it is not "littered" with strings/messages. Personally, I found out that I started writing much better (error) messages, on...
The `move to resource` feature was introduced to aid in internationalization. When R# detects a string which can be localized, it offers to move it to a resource file for you. The benefit of this is that the strings in the .resx can be changed to different languages without having to recompile any code. See the ReShar...
44,991
The mitzvah of V'nishmartem ([Devarim 4:15](http://www.mechon-mamre.org/p/pt/pt0504.htm#15)) requires a person to take care of their health (Shulchan Aruch C.M. 427:8, Kitzur Shulchan Aruch 32:1). How far does this go? Do I have to exercise daily? Do I need to be in peak physical condition? Am I required to stay curren...
2014/09/01
[ "https://judaism.stackexchange.com/questions/44991", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/4794/" ]
The official position of the Conservative movement can be found in [Women and the Minyan](http://www.rabbinicalassembly.org/sites/default/files/public/halakhah/teshuvot/19912000/oh_55_1_2002.pdf) by Rabbi David J. Fine. It was released in 2002 as an explanation of the 1983 decision by the Jewish Theological Seminary to...
there is not much discussion in halacha (talmud,rishonim,acharonim) on appointing female rabbis simply because it was never an issue until today due to several considerations. possibly among them: 1. the synagogue or study hall is dominated by the presence of men. men are commanded to pray in a minyan (congregation of...
44,991
The mitzvah of V'nishmartem ([Devarim 4:15](http://www.mechon-mamre.org/p/pt/pt0504.htm#15)) requires a person to take care of their health (Shulchan Aruch C.M. 427:8, Kitzur Shulchan Aruch 32:1). How far does this go? Do I have to exercise daily? Do I need to be in peak physical condition? Am I required to stay curren...
2014/09/01
[ "https://judaism.stackexchange.com/questions/44991", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/4794/" ]
The official position of the Conservative movement can be found in [Women and the Minyan](http://www.rabbinicalassembly.org/sites/default/files/public/halakhah/teshuvot/19912000/oh_55_1_2002.pdf) by Rabbi David J. Fine. It was released in 2002 as an explanation of the 1983 decision by the Jewish Theological Seminary to...
Being [called] a Rabbi can mean: 1. **Someone respectful in the Jewish community and be elected to run the community**: a female Rebbetzin can be very respectful and can be elected to run the community based on Hilchos Shutfim (partnership). 2. **Being knowledgeable in Judaic sources and give answers**: women can be v...
44,991
The mitzvah of V'nishmartem ([Devarim 4:15](http://www.mechon-mamre.org/p/pt/pt0504.htm#15)) requires a person to take care of their health (Shulchan Aruch C.M. 427:8, Kitzur Shulchan Aruch 32:1). How far does this go? Do I have to exercise daily? Do I need to be in peak physical condition? Am I required to stay curren...
2014/09/01
[ "https://judaism.stackexchange.com/questions/44991", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/4794/" ]
The same reason why there are no female masseurs - they're called masseuses! > > **Rabbi** (1) (*feminine: Rebbetzin*) A Torah scholar, teacher or authority. > > > **Rabbi** (2) (*feminine: Rabbi*) A scholar or teacher hired to lead a Jewish congregation. > > > In other words, the reason there are not female Or...
there is not much discussion in halacha (talmud,rishonim,acharonim) on appointing female rabbis simply because it was never an issue until today due to several considerations. possibly among them: 1. the synagogue or study hall is dominated by the presence of men. men are commanded to pray in a minyan (congregation of...
44,991
The mitzvah of V'nishmartem ([Devarim 4:15](http://www.mechon-mamre.org/p/pt/pt0504.htm#15)) requires a person to take care of their health (Shulchan Aruch C.M. 427:8, Kitzur Shulchan Aruch 32:1). How far does this go? Do I have to exercise daily? Do I need to be in peak physical condition? Am I required to stay curren...
2014/09/01
[ "https://judaism.stackexchange.com/questions/44991", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/4794/" ]
The same reason why there are no female masseurs - they're called masseuses! > > **Rabbi** (1) (*feminine: Rebbetzin*) A Torah scholar, teacher or authority. > > > **Rabbi** (2) (*feminine: Rabbi*) A scholar or teacher hired to lead a Jewish congregation. > > > In other words, the reason there are not female Or...
Being [called] a Rabbi can mean: 1. **Someone respectful in the Jewish community and be elected to run the community**: a female Rebbetzin can be very respectful and can be elected to run the community based on Hilchos Shutfim (partnership). 2. **Being knowledgeable in Judaic sources and give answers**: women can be v...
44,991
The mitzvah of V'nishmartem ([Devarim 4:15](http://www.mechon-mamre.org/p/pt/pt0504.htm#15)) requires a person to take care of their health (Shulchan Aruch C.M. 427:8, Kitzur Shulchan Aruch 32:1). How far does this go? Do I have to exercise daily? Do I need to be in peak physical condition? Am I required to stay curren...
2014/09/01
[ "https://judaism.stackexchange.com/questions/44991", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/4794/" ]
[Rav Hershel Shachter](http://www.hakirah.org/Vol%2011%20Schachter.pdf) intimates that , since certain non-masoretic groups ordain women as rabbis, it is a violation on the level of "yeharag v'lo yaavor" (i.e. one must give up ones life, rather than trangress) to give Orthodox smicha to women. > > ...we encourage one...
there is not much discussion in halacha (talmud,rishonim,acharonim) on appointing female rabbis simply because it was never an issue until today due to several considerations. possibly among them: 1. the synagogue or study hall is dominated by the presence of men. men are commanded to pray in a minyan (congregation of...
44,991
The mitzvah of V'nishmartem ([Devarim 4:15](http://www.mechon-mamre.org/p/pt/pt0504.htm#15)) requires a person to take care of their health (Shulchan Aruch C.M. 427:8, Kitzur Shulchan Aruch 32:1). How far does this go? Do I have to exercise daily? Do I need to be in peak physical condition? Am I required to stay curren...
2014/09/01
[ "https://judaism.stackexchange.com/questions/44991", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/4794/" ]
[Rav Hershel Shachter](http://www.hakirah.org/Vol%2011%20Schachter.pdf) intimates that , since certain non-masoretic groups ordain women as rabbis, it is a violation on the level of "yeharag v'lo yaavor" (i.e. one must give up ones life, rather than trangress) to give Orthodox smicha to women. > > ...we encourage one...
Being [called] a Rabbi can mean: 1. **Someone respectful in the Jewish community and be elected to run the community**: a female Rebbetzin can be very respectful and can be elected to run the community based on Hilchos Shutfim (partnership). 2. **Being knowledgeable in Judaic sources and give answers**: women can be v...
44,991
The mitzvah of V'nishmartem ([Devarim 4:15](http://www.mechon-mamre.org/p/pt/pt0504.htm#15)) requires a person to take care of their health (Shulchan Aruch C.M. 427:8, Kitzur Shulchan Aruch 32:1). How far does this go? Do I have to exercise daily? Do I need to be in peak physical condition? Am I required to stay curren...
2014/09/01
[ "https://judaism.stackexchange.com/questions/44991", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/4794/" ]
Being [called] a Rabbi can mean: 1. **Someone respectful in the Jewish community and be elected to run the community**: a female Rebbetzin can be very respectful and can be elected to run the community based on Hilchos Shutfim (partnership). 2. **Being knowledgeable in Judaic sources and give answers**: women can be v...
there is not much discussion in halacha (talmud,rishonim,acharonim) on appointing female rabbis simply because it was never an issue until today due to several considerations. possibly among them: 1. the synagogue or study hall is dominated by the presence of men. men are commanded to pray in a minyan (congregation of...
44,991
The mitzvah of V'nishmartem ([Devarim 4:15](http://www.mechon-mamre.org/p/pt/pt0504.htm#15)) requires a person to take care of their health (Shulchan Aruch C.M. 427:8, Kitzur Shulchan Aruch 32:1). How far does this go? Do I have to exercise daily? Do I need to be in peak physical condition? Am I required to stay curren...
2014/09/01
[ "https://judaism.stackexchange.com/questions/44991", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/4794/" ]
[On the first page of Yoreh Deah](https://www.themercava.com/app/books/source/1070104) - ื•ื›ืŸ ื”ืžื ื”ื’ ืฉืื™ืŸ ื”ื ืฉื™ื ืฉื•ื—ื˜ื•ืช - [Rav Schechter quoted from The Rav](http://www.hakirah.org/Vol%2011%20Schachter.pdf) (Rav Joseph B. Soloveitchik) that this is because the shochet would commonly act as an assistant rabbi, and since th...
there is not much discussion in halacha (talmud,rishonim,acharonim) on appointing female rabbis simply because it was never an issue until today due to several considerations. possibly among them: 1. the synagogue or study hall is dominated by the presence of men. men are commanded to pray in a minyan (congregation of...
44,991
The mitzvah of V'nishmartem ([Devarim 4:15](http://www.mechon-mamre.org/p/pt/pt0504.htm#15)) requires a person to take care of their health (Shulchan Aruch C.M. 427:8, Kitzur Shulchan Aruch 32:1). How far does this go? Do I have to exercise daily? Do I need to be in peak physical condition? Am I required to stay curren...
2014/09/01
[ "https://judaism.stackexchange.com/questions/44991", "https://judaism.stackexchange.com", "https://judaism.stackexchange.com/users/4794/" ]
[On the first page of Yoreh Deah](https://www.themercava.com/app/books/source/1070104) - ื•ื›ืŸ ื”ืžื ื”ื’ ืฉืื™ืŸ ื”ื ืฉื™ื ืฉื•ื—ื˜ื•ืช - [Rav Schechter quoted from The Rav](http://www.hakirah.org/Vol%2011%20Schachter.pdf) (Rav Joseph B. Soloveitchik) that this is because the shochet would commonly act as an assistant rabbi, and since th...
Being [called] a Rabbi can mean: 1. **Someone respectful in the Jewish community and be elected to run the community**: a female Rebbetzin can be very respectful and can be elected to run the community based on Hilchos Shutfim (partnership). 2. **Being knowledgeable in Judaic sources and give answers**: women can be v...
30,700,521
My script is not working, am I missing something? I just want my `navbar` to stay at the top. ``` $(document).ready(function(){ $(".navbar").affix({ offset: { top: 10 } }); }); ``` ```html <nav class="navbar navbar-fixed-top" id="my-navbar"> <div class="container"> <...
2015/06/08
[ "https://Stackoverflow.com/questions/30700521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4297055/" ]
Here you go Affix script working in uppercase ```js $(document).ready(function() { $(".navbar").affix({ offset: { top: 10 } }); }); ``` ```css .navbar { background: rgba(0, 0, 0, 0); font-size: 10pt; text-transform: uppercase; position: fixed; } ``` ```html <nav class="navbar nav...
Are you sure you want to use script for `navbar` staying at the top.. i recommend using `css` like this ```css .navbar { background: yellow; font-size: 10pt; text-transform: uppercase; position: fixed; width:100%; margin:0px; } .navbar li { display: inline-block; } ``` ```html <nav clas...
16,737,372
I Have a `gridview` in ASP, having `template Fields` containing `select`, `edit` and `delete` links each row, and the footer containing `insert` link. There are two `dropdownlists` in each row, let's say: `Category` and `sub-category`, when I change the contents of `category DropDownList` the `sub-category DropDownLis...
2013/05/24
[ "https://Stackoverflow.com/questions/16737372", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1522782/" ]
It sounds like you want to bind data to the subcategory dropdownlist using the value you have selected in the category dropdownlist. You can do: ``` protected void ddlCategory_SelectedIndexChanged(object sender, EventArgs e) { GridViewRow row = (GridViewRow)((DropDownList)sender).Parent.Parent; DropDownList dd...
FindControl is not recursive and you have a number of `TableCell` controls in the `Cells` property on your `GridViewRow` before you get to the level where your control is, so changing it to something like this will work: ``` TableCell cell = (TableCell)e.Row.FindControl("idOfMyCellIfItHasOne"); DropDownList ddlCategor...