qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
1,192,768 | What's the best way to detect the language of a string? | 2009/07/28 | [
"https://Stackoverflow.com/questions/1192768",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/140937/"
] | *Fast answer:* [**NTextCat**](https://github.com/ivanakcheurov/ntextcat) ([NuGet](http://www.nuget.org/packages/NTextCat/), [Online Demo](http://ivanakcheurov.github.io/ntextcat/))
*Long answer:*
Currently the best way seems to use classifiers **trained** to classify piece of text into one (or more) of languages from... | If you mean the natural (ie human) language, this is in general a Hard Problem. What language is "server" - English or Turkish? What language is "chat" - English or French? What language is "uno" - Italian or Spanish (or Latin!) ?
Without paying attention to context, and doing some hard **natural language processing**... |
1,617,971 | There is this quite annoying bug, which is probably related to Windows 10, which makes mobile CPUs clock down to 0.39 GHz/399 MHz. Just searching on Google for "0.39 GHz". There are so many results with this exact problem.
My brand new Lenovo ThinkPad T15 has this problem as well with its i7-10510U CPU. However, it ge... | 2021/01/15 | [
"https://superuser.com/questions/1617971",
"https://superuser.com",
"https://superuser.com/users/273242/"
] | **EDIT: Nope, this did not fix my issue. It seems to be somewhat more stable when the screen is on, however, so I'm keeping it up if someone stumbles upon it.**
So I think I managed to find a solution to my problem. Windows has introduced a feature called Modern Standby.
To check if Modern Standby is enabled, open CM... | Download hardware monitor and check temperatures of your CPU.
I have had the exact same problem.
The fan is not functioning and the CPU is forced to downgrade the frequency because of that.
[Why does my CPU utilization differ in Hardware Monitor and Task Manager?](https://superuser.com/questions/1618955/why-does-my-... |
1,617,971 | There is this quite annoying bug, which is probably related to Windows 10, which makes mobile CPUs clock down to 0.39 GHz/399 MHz. Just searching on Google for "0.39 GHz". There are so many results with this exact problem.
My brand new Lenovo ThinkPad T15 has this problem as well with its i7-10510U CPU. However, it ge... | 2021/01/15 | [
"https://superuser.com/questions/1617971",
"https://superuser.com",
"https://superuser.com/users/273242/"
] | Recently had this issue with one of my Lenovo laptops. Lenovo investigated and said it was an issue with the "Modern Standby" feature.
The fix was to update to the latest Lenovo Inteligent Thermal Solution driver (version: 2.0.369.1) and to disabled "Modern Standby" with this Registry Key:
**[HKEY\_LOCAL\_MACHINE\SYS... | If it can help, I solved this issue on my Thinkpad X270, which had the same issue, by booting the laptop plugged in.
That "disabled" the bug and now, even if I'm not plugged in (at boot or in general), no problem anymore. |
1,617,971 | There is this quite annoying bug, which is probably related to Windows 10, which makes mobile CPUs clock down to 0.39 GHz/399 MHz. Just searching on Google for "0.39 GHz". There are so many results with this exact problem.
My brand new Lenovo ThinkPad T15 has this problem as well with its i7-10510U CPU. However, it ge... | 2021/01/15 | [
"https://superuser.com/questions/1617971",
"https://superuser.com",
"https://superuser.com/users/273242/"
] | I had very similar issue at my Lenovo T14 gen.1 (windows 10 ver. 1909). I fixed it. Thanks a lot to @MortenMoulder and @Sendi !
I did the following changes:
1. BIOS upgraded from 1.17 to 1.19 (this fixed low clock freq. after wake-up)
2. Drivers upgraded (not sure which exactly helped as I applied many upgrades in on... | Download hardware monitor and check temperatures of your CPU.
I have had the exact same problem.
The fan is not functioning and the CPU is forced to downgrade the frequency because of that.
[Why does my CPU utilization differ in Hardware Monitor and Task Manager?](https://superuser.com/questions/1618955/why-does-my-... |
1,617,971 | There is this quite annoying bug, which is probably related to Windows 10, which makes mobile CPUs clock down to 0.39 GHz/399 MHz. Just searching on Google for "0.39 GHz". There are so many results with this exact problem.
My brand new Lenovo ThinkPad T15 has this problem as well with its i7-10510U CPU. However, it ge... | 2021/01/15 | [
"https://superuser.com/questions/1617971",
"https://superuser.com",
"https://superuser.com/users/273242/"
] | **EDIT: Nope, this did not fix my issue. It seems to be somewhat more stable when the screen is on, however, so I'm keeping it up if someone stumbles upon it.**
So I think I managed to find a solution to my problem. Windows has introduced a feature called Modern Standby.
To check if Modern Standby is enabled, open CM... | If it's a Lenovo laptop T15 pc make sure you have BIOS 1.34 or newer since the fix for "(Fix) Sync TX solution to fix BIOS does not issue ATA FreezeLock / BlockSID during resuming from Modern Standby" have been introduced. This should fix the problems for the slow PC 0.39Ghz problem. |
1,617,971 | There is this quite annoying bug, which is probably related to Windows 10, which makes mobile CPUs clock down to 0.39 GHz/399 MHz. Just searching on Google for "0.39 GHz". There are so many results with this exact problem.
My brand new Lenovo ThinkPad T15 has this problem as well with its i7-10510U CPU. However, it ge... | 2021/01/15 | [
"https://superuser.com/questions/1617971",
"https://superuser.com",
"https://superuser.com/users/273242/"
] | **EDIT: Nope, this did not fix my issue. It seems to be somewhat more stable when the screen is on, however, so I'm keeping it up if someone stumbles upon it.**
So I think I managed to find a solution to my problem. Windows has introduced a feature called Modern Standby.
To check if Modern Standby is enabled, open CM... | If it can help, I solved this issue on my Thinkpad X270, which had the same issue, by booting the laptop plugged in.
That "disabled" the bug and now, even if I'm not plugged in (at boot or in general), no problem anymore. |
1,617,971 | There is this quite annoying bug, which is probably related to Windows 10, which makes mobile CPUs clock down to 0.39 GHz/399 MHz. Just searching on Google for "0.39 GHz". There are so many results with this exact problem.
My brand new Lenovo ThinkPad T15 has this problem as well with its i7-10510U CPU. However, it ge... | 2021/01/15 | [
"https://superuser.com/questions/1617971",
"https://superuser.com",
"https://superuser.com/users/273242/"
] | I have the same issue when I RDP, but with a Carbon X1 Gen 9.
I did not have the registry key that Sendi mentioned after installing the Thermal Solution driver.
I have found that the CPU fan turns off when the Screen turns off, whether the laptop lid is open or closed. When the screen goes to sleep, you can wake up th... | If it can help, I solved this issue on my Thinkpad X270, which had the same issue, by booting the laptop plugged in.
That "disabled" the bug and now, even if I'm not plugged in (at boot or in general), no problem anymore. |
1,617,971 | There is this quite annoying bug, which is probably related to Windows 10, which makes mobile CPUs clock down to 0.39 GHz/399 MHz. Just searching on Google for "0.39 GHz". There are so many results with this exact problem.
My brand new Lenovo ThinkPad T15 has this problem as well with its i7-10510U CPU. However, it ge... | 2021/01/15 | [
"https://superuser.com/questions/1617971",
"https://superuser.com",
"https://superuser.com/users/273242/"
] | Recently had this issue with one of my Lenovo laptops. Lenovo investigated and said it was an issue with the "Modern Standby" feature.
The fix was to update to the latest Lenovo Inteligent Thermal Solution driver (version: 2.0.369.1) and to disabled "Modern Standby" with this Registry Key:
**[HKEY\_LOCAL\_MACHINE\SYS... | If it's a Lenovo laptop T15 pc make sure you have BIOS 1.34 or newer since the fix for "(Fix) Sync TX solution to fix BIOS does not issue ATA FreezeLock / BlockSID during resuming from Modern Standby" have been introduced. This should fix the problems for the slow PC 0.39Ghz problem. |
1,617,971 | There is this quite annoying bug, which is probably related to Windows 10, which makes mobile CPUs clock down to 0.39 GHz/399 MHz. Just searching on Google for "0.39 GHz". There are so many results with this exact problem.
My brand new Lenovo ThinkPad T15 has this problem as well with its i7-10510U CPU. However, it ge... | 2021/01/15 | [
"https://superuser.com/questions/1617971",
"https://superuser.com",
"https://superuser.com/users/273242/"
] | If it's a Lenovo laptop T15 pc make sure you have BIOS 1.34 or newer since the fix for "(Fix) Sync TX solution to fix BIOS does not issue ATA FreezeLock / BlockSID during resuming from Modern Standby" have been introduced. This should fix the problems for the slow PC 0.39Ghz problem. | If it can help, I solved this issue on my Thinkpad X270, which had the same issue, by booting the laptop plugged in.
That "disabled" the bug and now, even if I'm not plugged in (at boot or in general), no problem anymore. |
1,617,971 | There is this quite annoying bug, which is probably related to Windows 10, which makes mobile CPUs clock down to 0.39 GHz/399 MHz. Just searching on Google for "0.39 GHz". There are so many results with this exact problem.
My brand new Lenovo ThinkPad T15 has this problem as well with its i7-10510U CPU. However, it ge... | 2021/01/15 | [
"https://superuser.com/questions/1617971",
"https://superuser.com",
"https://superuser.com/users/273242/"
] | If it's a Lenovo laptop T15 pc make sure you have BIOS 1.34 or newer since the fix for "(Fix) Sync TX solution to fix BIOS does not issue ATA FreezeLock / BlockSID during resuming from Modern Standby" have been introduced. This should fix the problems for the slow PC 0.39Ghz problem. | For me.I use AMD cpu.I removeed intel and set amd registry but still not help.
I use internet from my phone(Samsung S21) vie usb tethering **connect with a type-c fast charge cable**. I found my CPU speed lock to 0.39GHz when I dont use internet and random lock when network running. **I guess** it because the phone sw... |
1,617,971 | There is this quite annoying bug, which is probably related to Windows 10, which makes mobile CPUs clock down to 0.39 GHz/399 MHz. Just searching on Google for "0.39 GHz". There are so many results with this exact problem.
My brand new Lenovo ThinkPad T15 has this problem as well with its i7-10510U CPU. However, it ge... | 2021/01/15 | [
"https://superuser.com/questions/1617971",
"https://superuser.com",
"https://superuser.com/users/273242/"
] | I had very similar issue at my Lenovo T14 gen.1 (windows 10 ver. 1909). I fixed it. Thanks a lot to @MortenMoulder and @Sendi !
I did the following changes:
1. BIOS upgraded from 1.17 to 1.19 (this fixed low clock freq. after wake-up)
2. Drivers upgraded (not sure which exactly helped as I applied many upgrades in on... | If it's a Lenovo laptop T15 pc make sure you have BIOS 1.34 or newer since the fix for "(Fix) Sync TX solution to fix BIOS does not issue ATA FreezeLock / BlockSID during resuming from Modern Standby" have been introduced. This should fix the problems for the slow PC 0.39Ghz problem. |
48,879,645 | I am trying ever so hard to get the Google Assistant on my Windows 10 PC. I am up to the "Register Device" part.
[Developers.google.com](https://developers.google.com/assistant/sdk/guides/library/python/embed/register-device)
Says to run the following command to register your device.
```
googlesamples-assistant-de... | 2018/02/20 | [
"https://Stackoverflow.com/questions/48879645",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | In the [devicetool](https://github.com/googlesamples/assistant-sdk-python/blob/master/google-assistant-sdk/googlesamples/assistant/grpc/devicetool.py), the [`--client-secrets`](https://github.com/googlesamples/assistant-sdk-python/blob/master/google-assistant-sdk/googlesamples/assistant/grpc/devicetool.py#L112) argumen... | A very commonly made error - By Google and by the End User - is the naming of your **C**lient **S**ecret file. Google automatically names your **CS** with a (1) appended to the end of your file name. To setup your G Assistant,
1. Delete the (1) in the name
2. Open CMD in the folder with your **CS** (best in a folder ... |
55,241,359 | I am making an app with Xamarin.iOS in Visual Studio on Windows. When uploading the app to the App Store I get following warning:
>
> Missing App Store Icon - iOS Apps must include a 1024x1024px App Store Icon in PNG format. Without providing the icon in the Asset Catalog or via App Store Connect, apps cannot be subm... | 2019/03/19 | [
"https://Stackoverflow.com/questions/55241359",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10894868/"
] | Was running into this issue today. This may not be the official fix/answer, but what worked for me was deleting all of the existing Assets and starting from scratch. After that I was able to add assets without any issues. | The solution for me was: **SAVE THE ASSET AFTER YOU RENAME IT - BEFORE UPLOADING FILES.**
When creating a new asset by pressing the add icon, it gives a default name. Then you normally rename it and start adding the files to the renamed asset (except it's not renamed yet in the file directory because you didn't save t... |
13,692 | Is there available information on how much of Earth surface is arid climate? | 2018/03/22 | [
"https://earthscience.stackexchange.com/questions/13692",
"https://earthscience.stackexchange.com",
"https://earthscience.stackexchange.com/users/9635/"
] | It will depend on the exact definition of "arid" and the period of time. But using the widely used and accepted [Köppen climate classification](https://en.wikipedia.org/wiki/K%C3%B6ppen_climate_classification), "arid" would correspond to the four climates in [climatic group B](https://en.wikipedia.org/wiki/K%C3%B6ppen_... | [ARID LANDS: CHALLENGES AND HOPES](https://docsbay.net/arid-lands-challenges-and-hopes) *by* EARTH SYSTEM: HISTORY AND NATURAL VARIABILITY – Vol. III - *Arid Lands: Challenges and Hopes - Barakat H.N.*
>
> Hyperarid zones cover 7.5% of Earth's land surface, arid zones cover
> 12.1%, while semiarid zones are more ex... |
4,697,660 | In phpMyAdmin under operations I can "Copy database to:" and select
* Structure and data
* CREATE DATABASE before copying
* Add AUTO\_INCREMENT value
I need to be able to do that without using phpMyAdmin.
I know how to create the database and user.
I have a source database that's a shell that I can work from so all ... | 2011/01/15 | [
"https://Stackoverflow.com/questions/4697660",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/99401/"
] | You can use mysql\_fetch\_assoc on SHOW TABLES and then for each result, store the output of mysql\_fetch\_result SHOW CREATE TABLE $table\_name and then issue mysql\_query on $show\_create\_table
Hope that helps ... more into helping than doing it for you. :) | Use SELECT INTO to accomplish this.
```
SELECT *
INTO destinationDB..newTable
FROM sourceDB..existingTable
``` |
70,073,584 | I need to calculate, for each ID and row, the mean of the last 3 periods (excluding the current one (where I would to enter the same value) and managing the case in which the period has no other 3 minor periods).
For example:
INPUT:
| ID | $ | TIME |
| --- | --- | --- |
| 1 | 100 | 20/11/2021 |
| 1 | 200 | 17/11/202... | 2021/11/22 | [
"https://Stackoverflow.com/questions/70073584",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14820295/"
] | [](https://i.stack.imgur.com/t9EFu.png)
Please refer below code
```
double _value = 0.0;
@override
Widget build(BuildContext context) {
return Stack(
overflow: Overflow.visible,
children: [
Container(
color: Col... | You can use the `stack` to create a **floating menu** and also show or hide the floating menu with the `Visibility` widget.
```
bool showMenu = false;
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: <Widget>[
Column(
children: <Widget>[
... |
241,729 | I was reading about encryption and had a question about it in general.
If I have a laptop with an encrypted SSD which I decrypt on boot up, it means it is all in plain text/data right?
If I do a hard shutdown or snatch that laptop while running, it means that the confidentiality of my data on that disk isn't ensured? ... | 2020/12/04 | [
"https://security.stackexchange.com/questions/241729",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/246817/"
] | The way hard disk encryption usually works is that the data stored on the disk is always encrypted. When you boot the system, the decryption key is loaded into memory by the kernel and when data is read off the disk, it is decrypted. As data is written back to the disk, it is encrypted first. Therefore, there is usuall... | Your SSD is likely much larger than your RAM. In order for the entire drive to be decrypted, it would need to fit in RAM. This is not feasible, so this doesn't happen. Data is decrypted and moved to RAM as it is needed (or cached). If you do a hard shutdown, any decrypted data in RAM will be discarded (with note to the... |
274,116 | Due to the setup of my template (and layout), I need to be able to place 4 different posts in 4 different divs.
For example, my structure would be like this
```
<div>Post 1</div>
<div>
<div>Post 2</div>
<div>
<div>Post 3</div>
<div>Post 4</div>
</div>
</div>
```
But I'm having some troub... | 2017/07/21 | [
"https://wordpress.stackexchange.com/questions/274116",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/17561/"
] | Your problem is that the variable passed to `setup_postdata()` *must* be the global `$post` variable, like this:
```
// Reference global $post variable.
global $post;
// Get posts.
$posts = get_posts(array(
'post_type' => 'post',
'post_count' => 4
));
// Set global post variable to first post.
$post = $pos... | Take it to your provinces
```
<?php foreach ($posts as $post) : setup_postdata( $post ); ?>
<div>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</div>
<?php endforeach; wp_reset_postdata(); ?>
```
[`wp_reset_postdata`](https://codex.wordpress.org/Function_Reference/wp_reset_postdata) ... |
274,116 | Due to the setup of my template (and layout), I need to be able to place 4 different posts in 4 different divs.
For example, my structure would be like this
```
<div>Post 1</div>
<div>
<div>Post 2</div>
<div>
<div>Post 3</div>
<div>Post 4</div>
</div>
</div>
```
But I'm having some troub... | 2017/07/21 | [
"https://wordpress.stackexchange.com/questions/274116",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/17561/"
] | Your problem is that the variable passed to `setup_postdata()` *must* be the global `$post` variable, like this:
```
// Reference global $post variable.
global $post;
// Get posts.
$posts = get_posts(array(
'post_type' => 'post',
'post_count' => 4
));
// Set global post variable to first post.
$post = $pos... | $posts wouldn't be available within context of post-thumbnail.php if you're using [get\_template\_part()](https://developer.wordpress.org/reference/functions/get_template_part/), so it will use the post ID found for the current page. You should use [locate\_template()](https://developer.wordpress.org/reference/function... |
274,116 | Due to the setup of my template (and layout), I need to be able to place 4 different posts in 4 different divs.
For example, my structure would be like this
```
<div>Post 1</div>
<div>
<div>Post 2</div>
<div>
<div>Post 3</div>
<div>Post 4</div>
</div>
</div>
```
But I'm having some troub... | 2017/07/21 | [
"https://wordpress.stackexchange.com/questions/274116",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/17561/"
] | Your problem is that the variable passed to `setup_postdata()` *must* be the global `$post` variable, like this:
```
// Reference global $post variable.
global $post;
// Get posts.
$posts = get_posts(array(
'post_type' => 'post',
'post_count' => 4
));
// Set global post variable to first post.
$post = $pos... | Other than messing with the globals, you can write a custom loop that requires absolutely no extra work to make your template part work. For example:
```
$args = array(
'post_type' => 'post',
'posts_per_page' => 4
);
$my_query = new WP_Query($args);
if ($my_query->have_posts()){
while ($my_query->have_pos... |
73,766,575 | I can't replace text inside Div or Containers. I just want to replace the text but it doesn't work for me. I've tried several ways but it still doesn't work.
I just want to replace the "-" with empty "". But it should just be the text without overriding the tag classes.
```
<div class="reemplazo-guion">
<div class=... | 2022/09/18 | [
"https://Stackoverflow.com/questions/73766575",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3557834/"
] | It looks like in order to get all the text nodes within `.reemplazo-guion` you will need to add a `*` to the selector (resulting in `".reemplazo-guion *"`) as `.contents()` will only pick up the *direct children* of the jQuery-selected element(s). With the `*` wildcard *all* "-"s can now be found and replaced by blanks... | You could try below code, it is working for the provided HTML content.
```
$(document).ready(function () {
var HTMLContent = $('.reemplazo-guion').html().replace(/-/g, '');
$('.reemplazo-guion').html(HTMLContent)
});
``` |
2,784,522 | It seems that Sum is not defined for `IEnumerable<uint>` (and other unsigned integers, for that matter)
```
var s = new int[] { 1, 2, 3 };
s.Sum(); //works fine
var us = new uint[] { 1, 2, 3 };
us.Sum(); //missing method
```
I would like to know:
* Have I done something fundamentally wrong/misunderstood the situat... | 2010/05/06 | [
"https://Stackoverflow.com/questions/2784522",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/55721/"
] | Just a guess: Because uint is not CLS-compliant. Not sure if that would weigh in their decision to not support it. | It might just be an oversight. I'm reminded of [ForEach](http://msdn.microsoft.com/en-us/library/bwabdf9z.aspx), which is available on Lists but not IEnumerable. I've written .ForEach as an extension method to IEnumerable in at least 3 projects. |
30,508,339 | I need help figuring out why a couple of my web applications are intermittently throwing 404 errors when trying to bring up a JSP. One of them has the JSP accessed directly and the other has a servlet that is forwarding to a JSP. The pages work most of the time, but occasionally will throw a 404. If the user refreshes ... | 2015/05/28 | [
"https://Stackoverflow.com/questions/30508339",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3937994/"
] | The Tomcat container caches .java and .class files generated by the JSP parser, which are used by the web application. Sometimes these get corrupted or cannot be found. This may occur after a patch or upgrade that contains modifications to JSPs.
Solution is to just simply delete the work directory and restart the tomc... | I had the same problem after deploying a **`.war`** on our live server. These are the steps that I followed to solve the problem:
**1)** Shut down the tomcat server
**2)** Go to **`<your tomcat directory> -> work -> Catalina -> localhost -> <your project> -> org -> apache -> jsp ->`**
**3)** Manually delete both **... |
30,508,339 | I need help figuring out why a couple of my web applications are intermittently throwing 404 errors when trying to bring up a JSP. One of them has the JSP accessed directly and the other has a servlet that is forwarding to a JSP. The pages work most of the time, but occasionally will throw a 404. If the user refreshes ... | 2015/05/28 | [
"https://Stackoverflow.com/questions/30508339",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3937994/"
] | The Tomcat container caches .java and .class files generated by the JSP parser, which are used by the web application. Sometimes these get corrupted or cannot be found. This may occur after a patch or upgrade that contains modifications to JSPs.
Solution is to just simply delete the work directory and restart the tomc... | Check the authority of this file or folder. Generally this problem is caused by lack of access to folders. |
18,645,870 | I am currently creating a responsive website. I noticed there is an issue with empty space on the right as you scrolling horizontally. I can remove the horizontal scroll by adding `overflow-x: hidden`. But it will not work on mobile devices such as iPhone and iPad.
So, I tried to add `min-width` because it will help t... | 2013/09/05 | [
"https://Stackoverflow.com/questions/18645870",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1717475/"
] | You Can hide the horizontal overflow using css code (and then the horizontal scroll bar will never show up again):
```
body{
overflow-x:hidden;
}
``` | 2020
====
If any of you using Boostrap and came across this question then here's the answer.
*for* Bootstrap Users
---------------------
Wrap your `.row` with `.container` or `.container-fluid` and it will solve the issue. |
18,645,870 | I am currently creating a responsive website. I noticed there is an issue with empty space on the right as you scrolling horizontally. I can remove the horizontal scroll by adding `overflow-x: hidden`. But it will not work on mobile devices such as iPhone and iPad.
So, I tried to add `min-width` because it will help t... | 2013/09/05 | [
"https://Stackoverflow.com/questions/18645870",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1717475/"
] | You Can hide the horizontal overflow using css code (and then the horizontal scroll bar will never show up again):
```
body{
overflow-x:hidden;
}
``` | You can Use
```css
#wrapper {
max-width:100%
width:100vw;
}
```
it work fine with me. |
18,645,870 | I am currently creating a responsive website. I noticed there is an issue with empty space on the right as you scrolling horizontally. I can remove the horizontal scroll by adding `overflow-x: hidden`. But it will not work on mobile devices such as iPhone and iPad.
So, I tried to add `min-width` because it will help t... | 2013/09/05 | [
"https://Stackoverflow.com/questions/18645870",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1717475/"
] | Every now and then I have this problem, and a big part of solving the problem is identifying the element that's the culprit. I just came up with this little jQuery script you can run in your browser's JavaScript console to find which elements are wider than the body width, causing that annoying scrollbar to appear.
``... | 2020
====
If any of you using Boostrap and came across this question then here's the answer.
*for* Bootstrap Users
---------------------
Wrap your `.row` with `.container` or `.container-fluid` and it will solve the issue. |
18,645,870 | I am currently creating a responsive website. I noticed there is an issue with empty space on the right as you scrolling horizontally. I can remove the horizontal scroll by adding `overflow-x: hidden`. But it will not work on mobile devices such as iPhone and iPad.
So, I tried to add `min-width` because it will help t... | 2013/09/05 | [
"https://Stackoverflow.com/questions/18645870",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1717475/"
] | You Can hide the horizontal overflow using css code (and then the horizontal scroll bar will never show up again):
```
body{
overflow-x:hidden;
}
``` | Referring to your issue, the code appears to be correct. However, some elements inside might also affect the exact width and overflow your boundary. Might check all inside elements as well. You can use Firebug or Chrome Inspect Element. |
18,645,870 | I am currently creating a responsive website. I noticed there is an issue with empty space on the right as you scrolling horizontally. I can remove the horizontal scroll by adding `overflow-x: hidden`. But it will not work on mobile devices such as iPhone and iPad.
So, I tried to add `min-width` because it will help t... | 2013/09/05 | [
"https://Stackoverflow.com/questions/18645870",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1717475/"
] | Every now and then I have this problem, and a big part of solving the problem is identifying the element that's the culprit. I just came up with this little jQuery script you can run in your browser's JavaScript console to find which elements are wider than the body width, causing that annoying scrollbar to appear.
``... | You Can hide the horizontal overflow using css code (and then the horizontal scroll bar will never show up again):
```
body{
overflow-x:hidden;
}
``` |
18,645,870 | I am currently creating a responsive website. I noticed there is an issue with empty space on the right as you scrolling horizontally. I can remove the horizontal scroll by adding `overflow-x: hidden`. But it will not work on mobile devices such as iPhone and iPad.
So, I tried to add `min-width` because it will help t... | 2013/09/05 | [
"https://Stackoverflow.com/questions/18645870",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1717475/"
] | Every now and then I have this problem, and a big part of solving the problem is identifying the element that's the culprit. I just came up with this little jQuery script you can run in your browser's JavaScript console to find which elements are wider than the body width, causing that annoying scrollbar to appear.
``... | Often times it's a matter of a single element which can cause the page to get the horizontal scrollbar. That can be a pain, but you can easily find out the offending element by this simple css trick
```
* {border:1px solid red}
```
You can also add the following properties if the element is hidden.
>
> opacity: 1 ... |
18,645,870 | I am currently creating a responsive website. I noticed there is an issue with empty space on the right as you scrolling horizontally. I can remove the horizontal scroll by adding `overflow-x: hidden`. But it will not work on mobile devices such as iPhone and iPad.
So, I tried to add `min-width` because it will help t... | 2013/09/05 | [
"https://Stackoverflow.com/questions/18645870",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1717475/"
] | Link to the page? Chances are there is some kind of element inside the wrapper that is breaking past the browser window.
Often times it is with padding and widths. Keep in mind if you have an element inside the wrapper that is set to say 100% width and you add padding on the left and right of 20px. It will create a ho... | No more than three steps are required here:
1. Scroll the horizontal bar to the right where you can see the extra empty padding.
2. Open an Inspect Element
>
> This is done by holding `ctrl + shift` then pressing `i`
>
>
>
3. Scroll over all your elements, the element with the extra padding should protrude your ... |
18,645,870 | I am currently creating a responsive website. I noticed there is an issue with empty space on the right as you scrolling horizontally. I can remove the horizontal scroll by adding `overflow-x: hidden`. But it will not work on mobile devices such as iPhone and iPad.
So, I tried to add `min-width` because it will help t... | 2013/09/05 | [
"https://Stackoverflow.com/questions/18645870",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1717475/"
] | Link to the page? Chances are there is some kind of element inside the wrapper that is breaking past the browser window.
Often times it is with padding and widths. Keep in mind if you have an element inside the wrapper that is set to say 100% width and you add padding on the left and right of 20px. It will create a ho... | Referring to your issue, the code appears to be correct. However, some elements inside might also affect the exact width and overflow your boundary. Might check all inside elements as well. You can use Firebug or Chrome Inspect Element. |
18,645,870 | I am currently creating a responsive website. I noticed there is an issue with empty space on the right as you scrolling horizontally. I can remove the horizontal scroll by adding `overflow-x: hidden`. But it will not work on mobile devices such as iPhone and iPad.
So, I tried to add `min-width` because it will help t... | 2013/09/05 | [
"https://Stackoverflow.com/questions/18645870",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1717475/"
] | Link to the page? Chances are there is some kind of element inside the wrapper that is breaking past the browser window.
Often times it is with padding and widths. Keep in mind if you have an element inside the wrapper that is set to say 100% width and you add padding on the left and right of 20px. It will create a ho... | 2020
====
If any of you using Boostrap and came across this question then here's the answer.
*for* Bootstrap Users
---------------------
Wrap your `.row` with `.container` or `.container-fluid` and it will solve the issue. |
18,645,870 | I am currently creating a responsive website. I noticed there is an issue with empty space on the right as you scrolling horizontally. I can remove the horizontal scroll by adding `overflow-x: hidden`. But it will not work on mobile devices such as iPhone and iPad.
So, I tried to add `min-width` because it will help t... | 2013/09/05 | [
"https://Stackoverflow.com/questions/18645870",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1717475/"
] | You Can hide the horizontal overflow using css code (and then the horizontal scroll bar will never show up again):
```
body{
overflow-x:hidden;
}
``` | Often times it's a matter of a single element which can cause the page to get the horizontal scrollbar. That can be a pain, but you can easily find out the offending element by this simple css trick
```
* {border:1px solid red}
```
You can also add the following properties if the element is hidden.
>
> opacity: 1 ... |
51,112,647 | I have install pod files for Lottie and downloaded the hello.json file from lottiefiles.com
```
LOTAnimationView *Hello_loader;
Hello_loader = [LOTAnimationView animationNamed:@"hello"];
[self.view addSubview:Hello_loader];
```
I had tried it in both `viewDidLoad()` and `viewDidAppear()` but still, it does not a... | 2018/06/30 | [
"https://Stackoverflow.com/questions/51112647",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9977565/"
] | **Swift 5 (with latest version of lottie)**
```
let animationView = AnimationView(name: "Bubbles") //Replace "Bubbles" with your animation file name.
animationView.frame = CGRect(x: 0, y: 0, width: 150, height: 150)
animationView.center = self.view.center
animationView.loopMode = .loop
animationVie... | try this
```
LOTAnimationView *hello_loader = [LOTAnimationView animationNamed:@"hello"];
[self.view addSubview:hello_loader];
[hello_loader play];
``` |
51,112,647 | I have install pod files for Lottie and downloaded the hello.json file from lottiefiles.com
```
LOTAnimationView *Hello_loader;
Hello_loader = [LOTAnimationView animationNamed:@"hello"];
[self.view addSubview:Hello_loader];
```
I had tried it in both `viewDidLoad()` and `viewDidAppear()` but still, it does not a... | 2018/06/30 | [
"https://Stackoverflow.com/questions/51112647",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9977565/"
] | In Lottie 3, the `Animation` class is Codable and is not available directly in Objective-C. So I created a wrapper that will allow a similar api to be used in Objevtice-C (inspired by [this](https://github.com/airbnb/lottie-ios/issues/845)) :
```
import Foundation
import UIKit
import Lottie
@objc(AnimationView) class... | try this
```
LOTAnimationView *hello_loader = [LOTAnimationView animationNamed:@"hello"];
[self.view addSubview:hello_loader];
[hello_loader play];
``` |
51,112,647 | I have install pod files for Lottie and downloaded the hello.json file from lottiefiles.com
```
LOTAnimationView *Hello_loader;
Hello_loader = [LOTAnimationView animationNamed:@"hello"];
[self.view addSubview:Hello_loader];
```
I had tried it in both `viewDidLoad()` and `viewDidAppear()` but still, it does not a... | 2018/06/30 | [
"https://Stackoverflow.com/questions/51112647",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9977565/"
] | In Lottie 3, the `Animation` class is Codable and is not available directly in Objective-C. So I created a wrapper that will allow a similar api to be used in Objevtice-C (inspired by [this](https://github.com/airbnb/lottie-ios/issues/845)) :
```
import Foundation
import UIKit
import Lottie
@objc(AnimationView) class... | **Swift 5 (with latest version of lottie)**
```
let animationView = AnimationView(name: "Bubbles") //Replace "Bubbles" with your animation file name.
animationView.frame = CGRect(x: 0, y: 0, width: 150, height: 150)
animationView.center = self.view.center
animationView.loopMode = .loop
animationVie... |
142 | The UK and US use numbered or lettered hook sizes in their patterns rather than a standardized measurement. What are the conversions between the hook sizes depending on whether I'm using US or UK patterns? | 2016/04/27 | [
"https://crafts.stackexchange.com/questions/142",
"https://crafts.stackexchange.com",
"https://crafts.stackexchange.com/users/52/"
] | For hook sizes, it's always best to refer to the size of the hook in mm, if possible. This should be standard across all countries. Metric sizes are used in many countries including Australia and New Zealand. UK sizes are generally used in the UK and Canada. US sizes are generally used only in the US.
The equivalents ... | Please note that in Canada metric sizing is the predominant measurement used for crochet hooks; i.e. 1.00mm, 1.30mm, 3.00mm, 4.25mm, 5.00mm, 6.50mm etc. Very rarely these days is the U.K. system used in Canada.
Certainly, it would be less confusing and more helpful if the metric system were for crochet hooks around ... |
142 | The UK and US use numbered or lettered hook sizes in their patterns rather than a standardized measurement. What are the conversions between the hook sizes depending on whether I'm using US or UK patterns? | 2016/04/27 | [
"https://crafts.stackexchange.com/questions/142",
"https://crafts.stackexchange.com",
"https://crafts.stackexchange.com/users/52/"
] | For hook sizes, it's always best to refer to the size of the hook in mm, if possible. This should be standard across all countries. Metric sizes are used in many countries including Australia and New Zealand. UK sizes are generally used in the UK and Canada. US sizes are generally used only in the US.
The equivalents ... | There are smaller crochet hooks as well, and they have a different numbering system. These are often called Steel Crochet Hooks, and are the type of hooks you'd use with crochet thread.
| Metric | US | UK |
| --- | --- | --- |
| 3.50 mm | 00 | |
| 3.25 mm | 0 | 0 |
| 2.75 mm | 1 | 1 |
| 2.25 mm | 2 | 1 1/2 |
| 2.10 m... |
142 | The UK and US use numbered or lettered hook sizes in their patterns rather than a standardized measurement. What are the conversions between the hook sizes depending on whether I'm using US or UK patterns? | 2016/04/27 | [
"https://crafts.stackexchange.com/questions/142",
"https://crafts.stackexchange.com",
"https://crafts.stackexchange.com/users/52/"
] | There are smaller crochet hooks as well, and they have a different numbering system. These are often called Steel Crochet Hooks, and are the type of hooks you'd use with crochet thread.
| Metric | US | UK |
| --- | --- | --- |
| 3.50 mm | 00 | |
| 3.25 mm | 0 | 0 |
| 2.75 mm | 1 | 1 |
| 2.25 mm | 2 | 1 1/2 |
| 2.10 m... | Please note that in Canada metric sizing is the predominant measurement used for crochet hooks; i.e. 1.00mm, 1.30mm, 3.00mm, 4.25mm, 5.00mm, 6.50mm etc. Very rarely these days is the U.K. system used in Canada.
Certainly, it would be less confusing and more helpful if the metric system were for crochet hooks around ... |
6,201,281 | The user is supposed to call `Player.close()` to release some critical resources managed by the native code and kill several internal java threads created for the player object. However,the user failed to call it ,resulting in some resource leak. Adding a Finalize method won't work because the finalize won't be called ... | 2011/06/01 | [
"https://Stackoverflow.com/questions/6201281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/115722/"
] | This is the only thing that works in Safari. Focus won't work.
```
<script type="text/javascript">
function SelectAll(id)
{
document.getElementById(id).focus();
document.getElementById(id).select();
}
</script>
Textarea:<br>
<textarea rows="3" id="txtarea" onclick="SelectAll('txtarea');" onfocus="SelectAll('t... | It seems that the focus event interferes with the select method. Call it after a short lag:
```
<textarea id="ta0" onfocus="
var inp=this;
setTimeout(function(){inp.select();},10);
">Here is some text</textarea>
```
Given this is for coping only, perhaps the textarea should be readonly. |
6,201,281 | The user is supposed to call `Player.close()` to release some critical resources managed by the native code and kill several internal java threads created for the player object. However,the user failed to call it ,resulting in some resource leak. Adding a Finalize method won't work because the finalize won't be called ... | 2011/06/01 | [
"https://Stackoverflow.com/questions/6201281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/115722/"
] | Tim Down's answer got me close, but it still didn't work when clicking & dragging in Chrome, so I did this (Coffeescript).
```
$.fn.extend
copyableInput: ->
@.each ->
$input = $(this)
# Prevent the input from being edited (but allow it to be selected)
$input.attr 'reado... | It seems that the focus event interferes with the select method. Call it after a short lag:
```
<textarea id="ta0" onfocus="
var inp=this;
setTimeout(function(){inp.select();},10);
">Here is some text</textarea>
```
Given this is for coping only, perhaps the textarea should be readonly. |
6,201,281 | The user is supposed to call `Player.close()` to release some critical resources managed by the native code and kill several internal java threads created for the player object. However,the user failed to call it ,resulting in some resource leak. Adding a Finalize method won't work because the finalize won't be called ... | 2011/06/01 | [
"https://Stackoverflow.com/questions/6201281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/115722/"
] | The simplest thing to do is to combine your existing code with a timer, since the `focus` event is generally too early in WebKit:
jsFiddle example: <http://jsfiddle.net/NWaav/2/>
Code:
```
$('textarea.automarkup').focus(function() {
var $this = $(this);
$this.select();
window.setTimeout(function() {
... | It seems that the focus event interferes with the select method. Call it after a short lag:
```
<textarea id="ta0" onfocus="
var inp=this;
setTimeout(function(){inp.select();},10);
">Here is some text</textarea>
```
Given this is for coping only, perhaps the textarea should be readonly. |
6,201,281 | The user is supposed to call `Player.close()` to release some critical resources managed by the native code and kill several internal java threads created for the player object. However,the user failed to call it ,resulting in some resource leak. Adding a Finalize method won't work because the finalize won't be called ... | 2011/06/01 | [
"https://Stackoverflow.com/questions/6201281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/115722/"
] | Tim Down's answer got me close, but it still didn't work when clicking & dragging in Chrome, so I did this (Coffeescript).
```
$.fn.extend
copyableInput: ->
@.each ->
$input = $(this)
# Prevent the input from being edited (but allow it to be selected)
$input.attr 'reado... | I don't have a Safari browser but I had the same issue with IE and using the following works there:
```
$(document).ready(function() {
$('body').delegate('textarea.automarkup', 'focus', function(e) {
var myText = $(this);
var mytxt = myText.text();
myText.text(mytxt + "\n event fired: " + e... |
6,201,281 | The user is supposed to call `Player.close()` to release some critical resources managed by the native code and kill several internal java threads created for the player object. However,the user failed to call it ,resulting in some resource leak. Adding a Finalize method won't work because the finalize won't be called ... | 2011/06/01 | [
"https://Stackoverflow.com/questions/6201281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/115722/"
] | ```
$("textarea").on("focus", function(event) {
event.preventDefault();
setTimeout(function() { $(event.target).select(); }, 1);
});
```
<http://jsfiddle.net/xCrN6/2/> | I don't have a Safari browser but I had the same issue with IE and using the following works there:
```
$(document).ready(function() {
$('body').delegate('textarea.automarkup', 'focus', function(e) {
var myText = $(this);
var mytxt = myText.text();
myText.text(mytxt + "\n event fired: " + e... |
6,201,281 | The user is supposed to call `Player.close()` to release some critical resources managed by the native code and kill several internal java threads created for the player object. However,the user failed to call it ,resulting in some resource leak. Adding a Finalize method won't work because the finalize won't be called ... | 2011/06/01 | [
"https://Stackoverflow.com/questions/6201281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/115722/"
] | This is the only thing that works in Safari. Focus won't work.
```
<script type="text/javascript">
function SelectAll(id)
{
document.getElementById(id).focus();
document.getElementById(id).select();
}
</script>
Textarea:<br>
<textarea rows="3" id="txtarea" onclick="SelectAll('txtarea');" onfocus="SelectAll('t... | I don't have a Safari browser but I had the same issue with IE and using the following works there:
```
$(document).ready(function() {
$('body').delegate('textarea.automarkup', 'focus', function(e) {
var myText = $(this);
var mytxt = myText.text();
myText.text(mytxt + "\n event fired: " + e... |
6,201,281 | The user is supposed to call `Player.close()` to release some critical resources managed by the native code and kill several internal java threads created for the player object. However,the user failed to call it ,resulting in some resource leak. Adding a Finalize method won't work because the finalize won't be called ... | 2011/06/01 | [
"https://Stackoverflow.com/questions/6201281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/115722/"
] | The simplest thing to do is to combine your existing code with a timer, since the `focus` event is generally too early in WebKit:
jsFiddle example: <http://jsfiddle.net/NWaav/2/>
Code:
```
$('textarea.automarkup').focus(function() {
var $this = $(this);
$this.select();
window.setTimeout(function() {
... | ```
$("textarea").on("focus", function(event) {
event.preventDefault();
setTimeout(function() { $(event.target).select(); }, 1);
});
```
<http://jsfiddle.net/xCrN6/2/> |
6,201,281 | The user is supposed to call `Player.close()` to release some critical resources managed by the native code and kill several internal java threads created for the player object. However,the user failed to call it ,resulting in some resource leak. Adding a Finalize method won't work because the finalize won't be called ... | 2011/06/01 | [
"https://Stackoverflow.com/questions/6201281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/115722/"
] | The simplest thing to do is to combine your existing code with a timer, since the `focus` event is generally too early in WebKit:
jsFiddle example: <http://jsfiddle.net/NWaav/2/>
Code:
```
$('textarea.automarkup').focus(function() {
var $this = $(this);
$this.select();
window.setTimeout(function() {
... | Tim Down's answer got me close, but it still didn't work when clicking & dragging in Chrome, so I did this (Coffeescript).
```
$.fn.extend
copyableInput: ->
@.each ->
$input = $(this)
# Prevent the input from being edited (but allow it to be selected)
$input.attr 'reado... |
6,201,281 | The user is supposed to call `Player.close()` to release some critical resources managed by the native code and kill several internal java threads created for the player object. However,the user failed to call it ,resulting in some resource leak. Adding a Finalize method won't work because the finalize won't be called ... | 2011/06/01 | [
"https://Stackoverflow.com/questions/6201281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/115722/"
] | This is the only thing that works in Safari. Focus won't work.
```
<script type="text/javascript">
function SelectAll(id)
{
document.getElementById(id).focus();
document.getElementById(id).select();
}
</script>
Textarea:<br>
<textarea rows="3" id="txtarea" onclick="SelectAll('txtarea');" onfocus="SelectAll('t... | ```
$("textarea").on("focus", function(event) {
event.preventDefault();
setTimeout(function() { $(event.target).select(); }, 1);
});
```
<http://jsfiddle.net/xCrN6/2/> |
6,201,281 | The user is supposed to call `Player.close()` to release some critical resources managed by the native code and kill several internal java threads created for the player object. However,the user failed to call it ,resulting in some resource leak. Adding a Finalize method won't work because the finalize won't be called ... | 2011/06/01 | [
"https://Stackoverflow.com/questions/6201281",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/115722/"
] | The simplest thing to do is to combine your existing code with a timer, since the `focus` event is generally too early in WebKit:
jsFiddle example: <http://jsfiddle.net/NWaav/2/>
Code:
```
$('textarea.automarkup').focus(function() {
var $this = $(this);
$this.select();
window.setTimeout(function() {
... | This is the only thing that works in Safari. Focus won't work.
```
<script type="text/javascript">
function SelectAll(id)
{
document.getElementById(id).focus();
document.getElementById(id).select();
}
</script>
Textarea:<br>
<textarea rows="3" id="txtarea" onclick="SelectAll('txtarea');" onfocus="SelectAll('t... |
6,703,689 | I am learning JQuery and today what I am making is a cascading dropdown (Country State and City).
My code so far is as under
```
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="JQuery/jquery-1.6.1.min.js"></script>
<script... | 2011/07/15 | [
"https://Stackoverflow.com/questions/6703689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/844314/"
] | `Internal Server Error` means that there's a bug in you server side code. Just launch the Visual Studio debugger and set a breakpoint in your `GetSelectedStates` method. You should then pinpoint the line that is causing you the trouble!
EDIT:
If you're not reaching the breakpoint in the method then it's probably a pr... | Try decorating your method with this:
```
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public List<State> GetSelectedStates(string countryID)
{
DataSource ds = new DataSource();
var stateList = ds.GetStateList();
var result = stateList.Where(i => i.CountryCode == countryID);
r... |
6,703,689 | I am learning JQuery and today what I am making is a cascading dropdown (Country State and City).
My code so far is as under
```
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="JQuery/jquery-1.6.1.min.js"></script>
<script... | 2011/07/15 | [
"https://Stackoverflow.com/questions/6703689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/844314/"
] | `Internal Server Error` means that there's a bug in you server side code. Just launch the Visual Studio debugger and set a breakpoint in your `GetSelectedStates` method. You should then pinpoint the line that is causing you the trouble!
EDIT:
If you're not reaching the breakpoint in the method then it's probably a pr... | Are you sure you don't want to use a PageMethod? These need to be marked static to work properly.
```
[WebMethod]
public static List<State> GetSelectedStates(string countryID)
{
DataSource ds = new DataSource();
var stateList = ds.GetStateList();
var result = stateList.Where(i => i.CountryCode == co... |
6,703,689 | I am learning JQuery and today what I am making is a cascading dropdown (Country State and City).
My code so far is as under
```
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="JQuery/jquery-1.6.1.min.js"></script>
<script... | 2011/07/15 | [
"https://Stackoverflow.com/questions/6703689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/844314/"
] | You need the keyword `static` in your signature. In VB.net you would use `shared`.
For example:
C#: `public static string DoSomething()`
VB: `Public Shared Function DoSomething()` | `Internal Server Error` means that there's a bug in you server side code. Just launch the Visual Studio debugger and set a breakpoint in your `GetSelectedStates` method. You should then pinpoint the line that is causing you the trouble!
EDIT:
If you're not reaching the breakpoint in the method then it's probably a pr... |
6,703,689 | I am learning JQuery and today what I am making is a cascading dropdown (Country State and City).
My code so far is as under
```
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="JQuery/jquery-1.6.1.min.js"></script>
<script... | 2011/07/15 | [
"https://Stackoverflow.com/questions/6703689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/844314/"
] | `Internal Server Error` means that there's a bug in you server side code. Just launch the Visual Studio debugger and set a breakpoint in your `GetSelectedStates` method. You should then pinpoint the line that is causing you the trouble!
EDIT:
If you're not reaching the breakpoint in the method then it's probably a pr... | I haven't seen an answer to this, so I'm going to post mine. You need to set `ArgementName` equal to something. At least that is what solved it for me.
Take a look at my javascript
```
var teamID = 123;
var playerID = 456;
var active = true;
var webMethod = 'Service1.asmx/HelloWorld'
... |
6,703,689 | I am learning JQuery and today what I am making is a cascading dropdown (Country State and City).
My code so far is as under
```
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="JQuery/jquery-1.6.1.min.js"></script>
<script... | 2011/07/15 | [
"https://Stackoverflow.com/questions/6703689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/844314/"
] | Try decorating your method with this:
```
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public List<State> GetSelectedStates(string countryID)
{
DataSource ds = new DataSource();
var stateList = ds.GetStateList();
var result = stateList.Where(i => i.CountryCode == countryID);
r... | Are you sure you don't want to use a PageMethod? These need to be marked static to work properly.
```
[WebMethod]
public static List<State> GetSelectedStates(string countryID)
{
DataSource ds = new DataSource();
var stateList = ds.GetStateList();
var result = stateList.Where(i => i.CountryCode == co... |
6,703,689 | I am learning JQuery and today what I am making is a cascading dropdown (Country State and City).
My code so far is as under
```
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="JQuery/jquery-1.6.1.min.js"></script>
<script... | 2011/07/15 | [
"https://Stackoverflow.com/questions/6703689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/844314/"
] | You need the keyword `static` in your signature. In VB.net you would use `shared`.
For example:
C#: `public static string DoSomething()`
VB: `Public Shared Function DoSomething()` | Try decorating your method with this:
```
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public List<State> GetSelectedStates(string countryID)
{
DataSource ds = new DataSource();
var stateList = ds.GetStateList();
var result = stateList.Where(i => i.CountryCode == countryID);
r... |
6,703,689 | I am learning JQuery and today what I am making is a cascading dropdown (Country State and City).
My code so far is as under
```
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="JQuery/jquery-1.6.1.min.js"></script>
<script... | 2011/07/15 | [
"https://Stackoverflow.com/questions/6703689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/844314/"
] | Try decorating your method with this:
```
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public List<State> GetSelectedStates(string countryID)
{
DataSource ds = new DataSource();
var stateList = ds.GetStateList();
var result = stateList.Where(i => i.CountryCode == countryID);
r... | I haven't seen an answer to this, so I'm going to post mine. You need to set `ArgementName` equal to something. At least that is what solved it for me.
Take a look at my javascript
```
var teamID = 123;
var playerID = 456;
var active = true;
var webMethod = 'Service1.asmx/HelloWorld'
... |
6,703,689 | I am learning JQuery and today what I am making is a cascading dropdown (Country State and City).
My code so far is as under
```
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="JQuery/jquery-1.6.1.min.js"></script>
<script... | 2011/07/15 | [
"https://Stackoverflow.com/questions/6703689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/844314/"
] | You need the keyword `static` in your signature. In VB.net you would use `shared`.
For example:
C#: `public static string DoSomething()`
VB: `Public Shared Function DoSomething()` | Are you sure you don't want to use a PageMethod? These need to be marked static to work properly.
```
[WebMethod]
public static List<State> GetSelectedStates(string countryID)
{
DataSource ds = new DataSource();
var stateList = ds.GetStateList();
var result = stateList.Where(i => i.CountryCode == co... |
6,703,689 | I am learning JQuery and today what I am making is a cascading dropdown (Country State and City).
My code so far is as under
```
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="JQuery/jquery-1.6.1.min.js"></script>
<script... | 2011/07/15 | [
"https://Stackoverflow.com/questions/6703689",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/844314/"
] | You need the keyword `static` in your signature. In VB.net you would use `shared`.
For example:
C#: `public static string DoSomething()`
VB: `Public Shared Function DoSomething()` | I haven't seen an answer to this, so I'm going to post mine. You need to set `ArgementName` equal to something. At least that is what solved it for me.
Take a look at my javascript
```
var teamID = 123;
var playerID = 456;
var active = true;
var webMethod = 'Service1.asmx/HelloWorld'
... |
14,340,658 | Is it possible to create a xsl variable using
```
<xsl:variable name="x"><xsl:value-of select="country" /></xsl:variable>
```
using a javascript variable?
The variable "country" is created in another javascript file, that is not embedded within the xslt. I am trying to get the country of user's location using ajax... | 2013/01/15 | [
"https://Stackoverflow.com/questions/14340658",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1980730/"
] | If you want to pass values into an XSL, the typical mechanism is to use a parameter. At the top level of your XSL, you would declare the parameter:
```
<xsl:stylesheet ....>
.....
<xsl:param name="country" />
.....
```
And then you would pass that value in from your external code, indicating that the value ... | The most common way of using client-side XSLT is for the XSLT to generate the HTML page, including its Javascript. With this approach, the XSLT stops executing before the JS starts executing, so there's no way the JS can influence the XSLT. But of course it is also possible to run an XSLT transformation programmaticall... |
817,156 | How many ordered pairs of integers $(x,y)$ satisfy the equation $x^2+6x + y^2 = 4$?
I can't approach this problem. Please help me. | 2014/06/01 | [
"https://math.stackexchange.com/questions/817156",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/112830/"
] | By completing the square we get $(x+3)^2+y^2=13$.
If $x$ and $y$ are integers, so are $x+3$ and $y$ so we require two square numbers that add to $13$. The only option is $9$ and $4$. We can choose which is $9$ and which is $4$ as well as whether we use the positive or negative square roots. Hence $8$ possibilities. | If you look at $f(x) = 4-x^2-6x$ you will see that $f(x) \ge 0 $ **iff** $x \in
[-3 -\sqrt{13}, -3+\sqrt{13}]$.
There are only a few integer $x$ values to try $\{-6,...,0\}$.
Any solution is of the form $y^2 = f(x)$. |
817,156 | How many ordered pairs of integers $(x,y)$ satisfy the equation $x^2+6x + y^2 = 4$?
I can't approach this problem. Please help me. | 2014/06/01 | [
"https://math.stackexchange.com/questions/817156",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/112830/"
] | Hint: You can "complete the square" - the object of which is to get rid of the $6x$ term which is awkward.
$$x^2+6x+y^2=x^2+6x+9-9+y^2=(x+3)^2+y^2-9$$
This transforms your original equation into the sum of two squares equals a positive integer. You then have only a few cases to try (remembering that integers can be n... | If you look at $f(x) = 4-x^2-6x$ you will see that $f(x) \ge 0 $ **iff** $x \in
[-3 -\sqrt{13}, -3+\sqrt{13}]$.
There are only a few integer $x$ values to try $\{-6,...,0\}$.
Any solution is of the form $y^2 = f(x)$. |
817,156 | How many ordered pairs of integers $(x,y)$ satisfy the equation $x^2+6x + y^2 = 4$?
I can't approach this problem. Please help me. | 2014/06/01 | [
"https://math.stackexchange.com/questions/817156",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/112830/"
] | If you look at $f(x) = 4-x^2-6x$ you will see that $f(x) \ge 0 $ **iff** $x \in
[-3 -\sqrt{13}, -3+\sqrt{13}]$.
There are only a few integer $x$ values to try $\{-6,...,0\}$.
Any solution is of the form $y^2 = f(x)$. | For all integer $x\gt0$, there is no $y$ that satisfy $y^2=-x^2-6x+4$. So, the only solutions are $(0, 2)$ and $(0, -2)$. For integer $x\lt0$, do the same and look for which $x$, the quadratic equation $-x^2-6x+4\ge0$ which are $x\in\{-6,-5,-4,-3,-2,-1\}$. Find $y$ now. |
817,156 | How many ordered pairs of integers $(x,y)$ satisfy the equation $x^2+6x + y^2 = 4$?
I can't approach this problem. Please help me. | 2014/06/01 | [
"https://math.stackexchange.com/questions/817156",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/112830/"
] | Hint: You can "complete the square" - the object of which is to get rid of the $6x$ term which is awkward.
$$x^2+6x+y^2=x^2+6x+9-9+y^2=(x+3)^2+y^2-9$$
This transforms your original equation into the sum of two squares equals a positive integer. You then have only a few cases to try (remembering that integers can be n... | By completing the square we get $(x+3)^2+y^2=13$.
If $x$ and $y$ are integers, so are $x+3$ and $y$ so we require two square numbers that add to $13$. The only option is $9$ and $4$. We can choose which is $9$ and which is $4$ as well as whether we use the positive or negative square roots. Hence $8$ possibilities. |
817,156 | How many ordered pairs of integers $(x,y)$ satisfy the equation $x^2+6x + y^2 = 4$?
I can't approach this problem. Please help me. | 2014/06/01 | [
"https://math.stackexchange.com/questions/817156",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/112830/"
] | By completing the square we get $(x+3)^2+y^2=13$.
If $x$ and $y$ are integers, so are $x+3$ and $y$ so we require two square numbers that add to $13$. The only option is $9$ and $4$. We can choose which is $9$ and which is $4$ as well as whether we use the positive or negative square roots. Hence $8$ possibilities. | For all integer $x\gt0$, there is no $y$ that satisfy $y^2=-x^2-6x+4$. So, the only solutions are $(0, 2)$ and $(0, -2)$. For integer $x\lt0$, do the same and look for which $x$, the quadratic equation $-x^2-6x+4\ge0$ which are $x\in\{-6,-5,-4,-3,-2,-1\}$. Find $y$ now. |
817,156 | How many ordered pairs of integers $(x,y)$ satisfy the equation $x^2+6x + y^2 = 4$?
I can't approach this problem. Please help me. | 2014/06/01 | [
"https://math.stackexchange.com/questions/817156",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/112830/"
] | Hint: You can "complete the square" - the object of which is to get rid of the $6x$ term which is awkward.
$$x^2+6x+y^2=x^2+6x+9-9+y^2=(x+3)^2+y^2-9$$
This transforms your original equation into the sum of two squares equals a positive integer. You then have only a few cases to try (remembering that integers can be n... | For all integer $x\gt0$, there is no $y$ that satisfy $y^2=-x^2-6x+4$. So, the only solutions are $(0, 2)$ and $(0, -2)$. For integer $x\lt0$, do the same and look for which $x$, the quadratic equation $-x^2-6x+4\ge0$ which are $x\in\{-6,-5,-4,-3,-2,-1\}$. Find $y$ now. |
18,749,059 | I am trying to write a script that will find strings that share an overlapping region of 5 letters at the beginning or end of each string (shown in example below).
```
facgakfjeakfjekfzpgghi
pgghiaewkfjaekfjkjakjfkj
kjfkjaejfaefkajewf
```
I am trying to create a n... | 2013/09/11 | [
"https://Stackoverflow.com/questions/18749059",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2767074/"
] | Create a dictionary mapping the first 5 characters of each string to its tail
```
strings = {s[:5]: s[5:] for s in x}
```
and a set of all the suffixes:
```
suffixes = set(s[-5:] for s in x)
```
Now find the string whose prefix does not match any suffix:
```
prefix = next(p for p in strings if p not in suffixes)... | Loop over each pair of candidates, reverse the second string and use the answer from [here](https://stackoverflow.com/questions/9114402) |
18,749,059 | I am trying to write a script that will find strings that share an overlapping region of 5 letters at the beginning or end of each string (shown in example below).
```
facgakfjeakfjekfzpgghi
pgghiaewkfjaekfjkjakjfkj
kjfkjaejfaefkajewf
```
I am trying to create a n... | 2013/09/11 | [
"https://Stackoverflow.com/questions/18749059",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2767074/"
] | A brute-force approach - do all combinations and return the first that matches linking terms:
```
def solution(x):
from itertools import permutations
for perm in permutations(x):
linked = [perm[i][:-5] for i in range(len(perm)-1)
if perm[i][-5:]==perm[i+1][:5]]
i... | Loop over each pair of candidates, reverse the second string and use the answer from [here](https://stackoverflow.com/questions/9114402) |
18,749,059 | I am trying to write a script that will find strings that share an overlapping region of 5 letters at the beginning or end of each string (shown in example below).
```
facgakfjeakfjekfzpgghi
pgghiaewkfjaekfjkjakjfkj
kjfkjaejfaefkajewf
```
I am trying to create a n... | 2013/09/11 | [
"https://Stackoverflow.com/questions/18749059",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2767074/"
] | Create a dictionary mapping the first 5 characters of each string to its tail
```
strings = {s[:5]: s[5:] for s in x}
```
and a set of all the suffixes:
```
suffixes = set(s[-5:] for s in x)
```
Now find the string whose prefix does not match any suffix:
```
prefix = next(p for p in strings if p not in suffixes)... | A brute-force approach - do all combinations and return the first that matches linking terms:
```
def solution(x):
from itertools import permutations
for perm in permutations(x):
linked = [perm[i][:-5] for i in range(len(perm)-1)
if perm[i][-5:]==perm[i+1][:5]]
i... |
56,881,082 | I am a beginner in asp.net and I'm trying to add a search bar with autocompletion.
I want the result to return a list of object, result of a stored procedure on two tables with more than 200.000 rows each (top 30 result for the autocompletion), with 2 fields : a label (Resultat) and an Id (IdRes).
I managed to call m... | 2019/07/04 | [
"https://Stackoverflow.com/questions/56881082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4661550/"
] | Better if you use switch case rather than if else if,
and you need to pass key from component to function.
```
import React, { Component } from "react";
import {
View,
Text,
TouchableOpacity,
StyleSheet,
FlatList,
item
} from "react-native";
export class Home extends Component {
onclick_item(key) {
... | You forgot to pass the variable to the render method.
try the following,
```
import React, { Component } from 'react';
import { View, Text ,TouchableOpacity,StyleSheet,FlatList,item}
from 'react-native';
export class Home extends Component {
onclick_item(item) {
let key = item.key
if(key == 'Devin')
{
// ... |
56,881,082 | I am a beginner in asp.net and I'm trying to add a search bar with autocompletion.
I want the result to return a list of object, result of a stored procedure on two tables with more than 200.000 rows each (top 30 result for the autocompletion), with 2 fields : a label (Resultat) and an Id (IdRes).
I managed to call m... | 2019/07/04 | [
"https://Stackoverflow.com/questions/56881082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4661550/"
] | Better if you use switch case rather than if else if,
and you need to pass key from component to function.
```
import React, { Component } from "react";
import {
View,
Text,
TouchableOpacity,
StyleSheet,
FlatList,
item
} from "react-native";
export class Home extends Component {
onclick_item(key) {
... | Assuming you will display same type of data, you should not create a page for every item. Just build one page and display the data you get from props. For example;
```
<View>
<Text>{item.name}</Text>
<Text>{item.surname}</Text>
<Text>{item.number} </Text>
</View>
```
and you should send dat... |
694,396 | I'd like to set umask to 002 for the php-fpm process. I'm reading [here](https://serverfault.com/questions/558963/how-to-set-umask-for-php5-fpm-in-ubuntu-13-10) and [here](http://www.fabianfier.de/blog1.php/set-creation-umask-for-php) that on Ubuntu/Debian it is supposed to be done by modifying the init script.
I'm ha... | 2015/05/26 | [
"https://serverfault.com/questions/694396",
"https://serverfault.com",
"https://serverfault.com/users/100857/"
] | I know this is old, but for anyone else who comes along modifying www.conf and adding env[UMASK] = 0002 solved the problem. Note the three 000 before the 2, no two as in the respondent's answer above. | [Corresponding to the debian maintainer](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=703121#10) you can use the */etc/apache2/envvars* for apache, so maybe there is a corresponding file for phpfpm? Also systemd has a umask setting in unit files, however I don't think it is honored if the service does not have a n... |
694,396 | I'd like to set umask to 002 for the php-fpm process. I'm reading [here](https://serverfault.com/questions/558963/how-to-set-umask-for-php5-fpm-in-ubuntu-13-10) and [here](http://www.fabianfier.de/blog1.php/set-creation-umask-for-php) that on Ubuntu/Debian it is supposed to be done by modifying the init script.
I'm ha... | 2015/05/26 | [
"https://serverfault.com/questions/694396",
"https://serverfault.com",
"https://serverfault.com/users/100857/"
] | I know this is old, but for anyone else who comes along modifying www.conf and adding env[UMASK] = 0002 solved the problem. Note the three 000 before the 2, no two as in the respondent's answer above. | You can always change Umask for whole Systemd service by adding config file `/etc/systemd/system/my-service-name-whatever.d/umask.conf` with content like:
```
[Service]
UMask=0002
``` |
4,538,225 | Let $(X, \tau)$ be a topological space and let $2^{X}:=\mathcal{C}\_X$ the family of closed sets in $X$. Prove if $(X, \tau)$ is compact then, $(2^{X}, \tau\_{2^{X}})$ is compact, where $\tau\_{2^{X}}$ is some topology for $2^{X}$.
**My attempt**. Let $U\_1, U\_2, \cdots, U\_n$ open sets in $X$ and let
$$\left< U\_1, ... | 2022/09/24 | [
"https://math.stackexchange.com/questions/4538225",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/798958/"
] | The result is only true if $G$ is finite, which you are assuming but never state explicitly. As Derek Holt points out in comment, that is bad practice: if you are considering only finite groups, you should say so (or, in this site, at least **tag it** as `[finite-groups]`).
You state that you only need to show that th... | **Hint**
1. Finite $p$- groups are nilpotent.
2. For any proper subgroup $H$ of a nilpotent group $G$, we have $N\_G(H)\supsetneq H$.
Both these results are well-known.
The result is false without requiring the $p$- group to be finite, as Tarski monsters show. |
44,505 | I made a formula field that takes the website and cuts off the beginning too make it easier to compare websites in reports. The one problem I ran into is if someone puts in a website as example.com instead of <http://example.com> Salesforce autofills the http:// but this causes problems with the formula because the for... | 2014/07/18 | [
"https://salesforce.stackexchange.com/questions/44505",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/10012/"
] | Although you cannot update trigger.new in the after context, you can still update the objects included in the trigger context variable. You just need to cache the values of trigger.new in a list. Then you can still update the values in that list.
**Will give you an error as you cannot perform DML on trigger.new**
```... | >
> But now I have to add this feature: when the field is set to true, another date field must be set to today date. Now my trigger is in after insert and upsert, therefore I cannot update the new case i am upserting.
>
>
>
I think the simplest solution would be to use workflow based on `ISCHANGED(Field_c) && PRIO... |
10,340,897 | >
> A vaguely related question seems to be: [Remove AddIn path from UDF in Excel formula](https://stackoverflow.com/questions/6414719/remove-addin-path-from-udf-in-excel-formula)
>
>
>
Hello,
I am having trouble keeping an excel vba add-in in sync between two computers.
Computer A
Windows 7 - Excel 2007
Path for... | 2012/04/26 | [
"https://Stackoverflow.com/questions/10340897",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1157013/"
] | One easy way is to store it in the same absolute path, for example c:\program files\addins\xxxx.xlam. | Get the absolute path from:
```
? Application.UserLibraryPath
``` |
8,510,653 | I need the proper php syntax to handle a situation with my website's breadcrum links for product pages. All of my items are derived from a MySQL database.
The inventory items are organized either by itemCategory or itemAuthor. Not all items have an itemCategory associated with them so in the database they are NULL. Al... | 2011/12/14 | [
"https://Stackoverflow.com/questions/8510653",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1060448/"
] | ```
if(empty($itemCategory)) {
echo $itemAuthor;
} else {
echo $itemCategory;
}
``` | The mysql solution:
```
SELECT ...
IFNULL(`itemCategory`, `itemAuthor`) AS `itemCategory`
FROM ...
```
In PHP You just echo itemCategory. No additional conditions. If it was NULL id database, it will be itemAuthor in PHP.
The php solution:
```
if ($r['itemCategory']):
echo $r['itemCategory'];
else:
ech... |
215,670 | I really want Ubuntu on a tablet, but the Nexus 7 is just to small for my tastes. I feel as though the Nexus 10 would be a much better fit. Should I just get the Nexus 7 or should I expect a Nexus 10 compatible installer in the near future? | 2012/11/11 | [
"https://askubuntu.com/questions/215670",
"https://askubuntu.com",
"https://askubuntu.com/users/86612/"
] | There are currently no plans to support the Nexus 10, as it is based on the Exynos chipset rather than Tegra 3, which is in the Nexus 7. | ***It has to work, before it can be supported on a larger range of devices.***
The **Nexus 10** is not simply a 'larger' variant, **but** from a different manufacturer **and** uses a different ARM chip.
---
**Note:** *It will more likely to be supported on the other **Tegra 3** based devices first.*
eg. [ASUS Eee P... |
15,816,274 | I'm having problems with a slideshow (the problem is almost the same as this one [Simple jQuery Slideshow Image Moving Downwards for a Split Second](https://stackoverflow.com/questions/14968715/simple-jquery-slideshow-image-moving-downwards-for-a-split-second) but its not working for me). The problem is with the `next(... | 2013/04/04 | [
"https://Stackoverflow.com/questions/15816274",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Try this:
```
setInterval(function() {
$('#slideshow > div:first')
.fadeOut(100,function(){
$(this).next().fadeIn(1000).end().appendTo('#slideshow');
});
}, 3000);
```
use a call back function on the fadeout and it will wait until it's completely gone before it appends the other one. | May be becouse in css you have class `slideShow`, but you wrapper has class `slidePromo`. This css block don't even apply on smth. Change class - it will work without jquery changes.
P.S. jquery code is awful. Try this:
```
function slider(id, fade, timer) {
var holder = $('#' + id);
holder.find(" > div:gt(0)... |
63,076,638 | **RabbitMq 3.8.5, C# RabbitMqClient v6.1.0, .Net Core 3.1**
I feel that I'm misunderstanding something with `RabbitMq` so I'm looking for clarification:
If I have a client sending a message to an exchange, and there's no consumer on the other side, what is meant to happen?
I had thought that it should sit in a queue... | 2020/07/24 | [
"https://Stackoverflow.com/questions/63076638",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5341937/"
] | In RabbitMQ, messages stay in queues, but they are published to exchanges. The way to link an exchange to a queue is through bindings (there are some default bindings).
If there are no queues, or the exchange's policy doesn't find any queue to forward the message, the message is lost.
Once a message is in a queue, th... | **Found the issue:** I was allowing the library to generate the queue names rather than using specific ones. This meant that `RabbitMq` was always having to deal with a shifting target each time.
If I use 'well defined' queue names AND the consumer has fired up at least once to define the queue on `RabbitMq`, then I d... |
139,823 | I recently implemented a binary reader/writer for my multiplayer game.
Now reading bytes looks like this:
```
static int32_t readInt32(std::vector<uint8_t>& msg, int *off)
{
if ((*off) > msg.size()) return 0;
int32_t result; int size = sizeof (result);
memcpy(&result, msg.data() + (*off), size); (*off) +=... | 2016/08/28 | [
"https://codereview.stackexchange.com/questions/139823",
"https://codereview.stackexchange.com",
"https://codereview.stackexchange.com/users/115671/"
] | I see a number of things that could help you improve your program.
Fix your formatting
-------------------
Crowding multiple statements on a single line makes your program harder to read and understand. So instead of this:
```
if ((*off) > msg.size()) return 0;
int32_t result; int size = sizeof (result);
```
Write... | When you compare `(*off) > msg.size()`, you should get a compiler warning about comparison between signed and unsigned. Enable more and more compiler warnings until you get it. Then change `int *off` to `std::size_t *off`.
The comparison is wrong. It must be `(*off) > msg.size() || *off + size > msg.size()` to properl... |
68,652,732 | What regex checks if there are at least two different letters in a string?
For instance:
* aa -> Not match
* ab -> Match
* a -> Not match
* 012 -> Not match | 2021/08/04 | [
"https://Stackoverflow.com/questions/68652732",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8248194/"
] | I have not tried to check out what's wrong with your code. But one option to achieve your desired result may look like so:
```r
library(reactable)
library(tidyr)
data = tibble(group = c("red","blue"),
month = rep("august", 2),
valueOne = c(500,1000),
valueTwo = c(200, 2000)... | A small admentment to Stefan's answer. If colums groups have similar name, e.g.
`data = tibble(group = c("red","red month"))`
Stefan's solution would not work (it will create a large columngroup named only 'red'). It can be easily fixed by adjusting Stefan's code with
`cols <- unlist(cols[grepl(paste0(x,"."), name... |
7,285 | I have a knife and a whetstone. One side of the whetstone is rough and the other is finely grained.
I occasionally sharpen my knife but I'm not 100% clear if I'm using it correctly. I normally move the knife in a circular motion trying to hold it at *an* angle.. o\_O
I usually use the rough side first then polish it ... | 2014/12/04 | [
"https://outdoors.stackexchange.com/questions/7285",
"https://outdoors.stackexchange.com",
"https://outdoors.stackexchange.com/users/-1/"
] | My advice is to always use the entire length of the the stone, to make sure wearing is even, and it's easier to be slow and steady.
Also, [some good information on cooking.SE](https://cooking.stackexchange.com/q/42539).
>
> How often you sharpen depends on how often you use them and the type
> of steel. I use Globa... | You are right about using the rough side first and then some polishing with the finer side.
Holding an angle is a real tricky part and needs some stability and skill.
To prevent the blade from getting damaged, you can run an ink marker over the cutting bevel. This way you'll have a reference to manage the amount of ti... |
7,285 | I have a knife and a whetstone. One side of the whetstone is rough and the other is finely grained.
I occasionally sharpen my knife but I'm not 100% clear if I'm using it correctly. I normally move the knife in a circular motion trying to hold it at *an* angle.. o\_O
I usually use the rough side first then polish it ... | 2014/12/04 | [
"https://outdoors.stackexchange.com/questions/7285",
"https://outdoors.stackexchange.com",
"https://outdoors.stackexchange.com/users/-1/"
] | My advice is to always use the entire length of the the stone, to make sure wearing is even, and it's easier to be slow and steady.
Also, [some good information on cooking.SE](https://cooking.stackexchange.com/q/42539).
>
> How often you sharpen depends on how often you use them and the type
> of steel. I use Globa... | Ray Mears has produced videos on sharpening knives. In particular, sharpening them [in camp](https://www.youtube.com/watch?v=Lm53mCOQTR8) and [in the field](https://www.youtube.com/watch?v=D4y8u_iJf1M).
The teqhnique is pretty much as @WedaPashi explains it, but it's good to see a video of the correct approach. |
7,285 | I have a knife and a whetstone. One side of the whetstone is rough and the other is finely grained.
I occasionally sharpen my knife but I'm not 100% clear if I'm using it correctly. I normally move the knife in a circular motion trying to hold it at *an* angle.. o\_O
I usually use the rough side first then polish it ... | 2014/12/04 | [
"https://outdoors.stackexchange.com/questions/7285",
"https://outdoors.stackexchange.com",
"https://outdoors.stackexchange.com/users/-1/"
] | My advice is to always use the entire length of the the stone, to make sure wearing is even, and it's easier to be slow and steady.
Also, [some good information on cooking.SE](https://cooking.stackexchange.com/q/42539).
>
> How often you sharpen depends on how often you use them and the type
> of steel. I use Globa... | Honestly it's pretty tricky. The other answers have good info but I thought I'd add a tip:
Once you think you've found the correct angle, you can use your thumb on the back of the blade as a guide to keep it at this angle against the stone. Rest the bottom of your thumb on the stone as you move the knife across it and... |
34,755,244 | Is there a way to apply `bincount` with "axis = 1"? The desired result would be the same as the list comprehension:
```
import numpy as np
A = np.array([[1,0],[0,0]])
np.array([np.bincount(r,minlength = np.max(A) + 1) for r in A])
#array([[1,1]
# [2,0]])
``` | 2016/01/12 | [
"https://Stackoverflow.com/questions/34755244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/839957/"
] | [`np.bincount`](http://docs.scipy.org/doc/numpy-1.10.0/reference/generated/numpy.bincount.html) doesn't work with a 2D array along a certain axis. To get the desired effect with a single vectorized call to `np.bincount`, one can create a 1D array of IDs such that different rows would have different IDs even if the elem... | If the data is too large for this to be efficient, then the issue is more likely to be the memory usage of the dense matrix rather than the numerical operations themself. Here is an example of using a sklearn Hashing Vectorizer on a matrix which is too large to use the `bincounts` method (the results are a sparse matri... |
34,755,244 | Is there a way to apply `bincount` with "axis = 1"? The desired result would be the same as the list comprehension:
```
import numpy as np
A = np.array([[1,0],[0,0]])
np.array([np.bincount(r,minlength = np.max(A) + 1) for r in A])
#array([[1,1]
# [2,0]])
``` | 2016/01/12 | [
"https://Stackoverflow.com/questions/34755244",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/839957/"
] | [`np.bincount`](http://docs.scipy.org/doc/numpy-1.10.0/reference/generated/numpy.bincount.html) doesn't work with a 2D array along a certain axis. To get the desired effect with a single vectorized call to `np.bincount`, one can create a 1D array of IDs such that different rows would have different IDs even if the elem... | You can use `apply_along_axis`, Here is an example
```
import numpy as np
test_array = np.array([[0, 0, 1], [0, 0, 1]])
print(test_array)
np.apply_along_axis(np.bincount, axis=1, arr= test_array,
minlength = np.max(test_array) +1)
```
Note the final shape of this array depen... |
6,145,997 | I want to be able to accept a `Message&` object which references either a `Message1` or `Message2` class. I want to be able to create a `MessageWithData<Message1>` or `MessageWithData<Message2>` based on the underlying type of the `Message&` object. For example, see below:
```
class Message {};
class Message1 : public... | 2011/05/26 | [
"https://Stackoverflow.com/questions/6145997",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/285883/"
] | You're trying to mix runtime and compile-time concepts, namely (runtime-)polymorphism and templates. Sorry, but that is not possible.
Templates operate on types at compile time, also called **static types**. The static type of `message` is `Message`, while its **dynamic type** might be either `Message1` or `Message2`... | As Xeo says, you probably shouldn't do this in this particular case - better design alternatives exist. That said, you *can* do it with RTTI, but it's generally frowned upon because your `process()` becomes a centralised maintenance point that needs to be updated as new derived classes are added. That's easily overlook... |
6,145,997 | I want to be able to accept a `Message&` object which references either a `Message1` or `Message2` class. I want to be able to create a `MessageWithData<Message1>` or `MessageWithData<Message2>` based on the underlying type of the `Message&` object. For example, see below:
```
class Message {};
class Message1 : public... | 2011/05/26 | [
"https://Stackoverflow.com/questions/6145997",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/285883/"
] | You have
```
void process(const Message& message, int x, int y)
{
// HERE
messageWithData.dispatch(...)
}
```
At HERE, you want to create either a `MessageWithData<Message1>` or a `MessageWithData<Message2>`, depending on whether `message` is an instance of `Message1` or `Message1`.
But you cannot do that, beca... | As Xeo says, you probably shouldn't do this in this particular case - better design alternatives exist. That said, you *can* do it with RTTI, but it's generally frowned upon because your `process()` becomes a centralised maintenance point that needs to be updated as new derived classes are added. That's easily overlook... |
6,145,997 | I want to be able to accept a `Message&` object which references either a `Message1` or `Message2` class. I want to be able to create a `MessageWithData<Message1>` or `MessageWithData<Message2>` based on the underlying type of the `Message&` object. For example, see below:
```
class Message {};
class Message1 : public... | 2011/05/26 | [
"https://Stackoverflow.com/questions/6145997",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/285883/"
] | As has been mentioned, it is not possible to build your template as is.
I do not see any issue with passing additional parameters, though I would perhaps pack them into a single structure, for ease of manipulation.
Certainly I find it more idiomatic to use a supplementary `Data` parameter, rather than extending a cla... | As Xeo says, you probably shouldn't do this in this particular case - better design alternatives exist. That said, you *can* do it with RTTI, but it's generally frowned upon because your `process()` becomes a centralised maintenance point that needs to be updated as new derived classes are added. That's easily overlook... |
2,886,716 | How can I use the random function (in Python) to choose a string from a txt list?
---
i want random from a list :
```
import random
import sys
filename = sys.argv[1]
f = open(filename)
f.close()
print random.choice(f)
```
is this code ok ? | 2010/05/22 | [
"https://Stackoverflow.com/questions/2886716",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/338110/"
] | ```
> import random
> list_of_strings = open(sys.argv[1]).readlines()
> randomly_chosen_string = random.choice(list_of_strings)
> help(random.choice)
Help on method choice in module random:
choice(self, seq) method of random.Random instance
Choose a random element from a non-empty sequence.
``` | ```
import random
file = open("file.txt", "r")
list = file.readlines()
def getline ():
return list[random.randint(0,(len(list) - 1))]
getline()
``` |
315,646 | If I want to rotate a vector $V$ from coordinate system $A$ to $B$, I could use the rotation matrix by $V\_B=R\cdot V\_A$, where $R$ is the rotation matrix. There are many rotation sequences for $R$, such as $xyz$ and $yzy$. But after constructing those matrices, I found that different rotation sequence are not the sam... | 2013/02/27 | [
"https://math.stackexchange.com/questions/315646",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/64170/"
] | You can rotate $(1,0,0)$ to $(0,1,0)$ by rotating a quarter-turn counterclockwise around the $z$-axis, or by rotating $(1,0,0)$ around the $y$-axis up to $(0,0,1)$ and then down around the $x$-axis to $(0,1,0)$. The first way, $(0,1,0)$ winds up at $(-1,0,0)$; the second way, it winds up at $(0,0,-1)$. So just knowing ... | Without seeing what the problem is, no, I can't tell you what it is. It is true that the rotation matrix from one coordinate system to another should be independent of how you describe the rotations. If you give the specifics of the rotation sequences we might be able to help. |
315,646 | If I want to rotate a vector $V$ from coordinate system $A$ to $B$, I could use the rotation matrix by $V\_B=R\cdot V\_A$, where $R$ is the rotation matrix. There are many rotation sequences for $R$, such as $xyz$ and $yzy$. But after constructing those matrices, I found that different rotation sequence are not the sam... | 2013/02/27 | [
"https://math.stackexchange.com/questions/315646",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/64170/"
] | You can rotate $(1,0,0)$ to $(0,1,0)$ by rotating a quarter-turn counterclockwise around the $z$-axis, or by rotating $(1,0,0)$ around the $y$-axis up to $(0,0,1)$ and then down around the $x$-axis to $(0,1,0)$. The first way, $(0,1,0)$ winds up at $(-1,0,0)$; the second way, it winds up at $(0,0,-1)$. So just knowing ... | $3$D rotations do not commute in general. Look up phenomena like Gimbal lock to see what can happen with Euler angles.
<http://en.wikipedia.org/wiki/Gimbal_lock#Gimbal_lock_in_applied_mathematics>
Also consider switching to representing your rotations by unit quaternions, you remove all the problems you get using Eu... |
35,809 | Following Kepler's publication of his [3rd law of planetary motion](http://en.wikipedia.org/wiki/Kepler%27s_laws_of_planetary_motion#Third_law)1,
$$p^2 / r^3 = 1$$
in 1619, it would have been possible to use telescopic observations to arrive at an estimate of the orbital radii the [Jovian moons observed](http://en.w... | 2012/09/06 | [
"https://physics.stackexchange.com/questions/35809",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/2540/"
] | No. Johannes Kepler published what is now known as his third law of planetary motion in 1619 (in his treatise *Harmonices Mundi*), but discovered it already on May 15, 1618. He simply related mean distance of a planet from the Sun to its mean angular motion, without a word about a mass, I think. He *did* write on gravi... | The origin of Kepler's law can be very easily grasped by a *modern* readership (Landau & Lifsitz, Vol.1 *Mechanics*). Considering Newton's inverse square law applied to a planet orbiting the Sun (omitting here the vector notations)
$$ \frac{d^2r}{dt^2}=-G \frac{M\_{Sun}}{r^2}$$
we can easily see that new *similar* orbi... |
68,698,574 | I am writing a python program, using BeautifulSoup. I want to make a web scraper that will retrieve information about E-journals. I used BeautifulSoup to retrieve the html class but it is returning None or "[]". I am a beginner who started studying python 2 weeks ago so I don't know what to do at all... please help me.... | 2021/08/08 | [
"https://Stackoverflow.com/questions/68698574",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16613055/"
] | Your http response was not successful. it received 403 not allowed response.
check,
```
print(JAGS7_result.status_code)
```
It should be 200. In your case it was 403.
Use request headers to overcome this issue.
```
h = {'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko... | I would also advise that you use spiders and scrapy for your work in future. It a great package for scraping since beautifulsoup often can’t succeed over JavaScript websites. |
68,698,574 | I am writing a python program, using BeautifulSoup. I want to make a web scraper that will retrieve information about E-journals. I used BeautifulSoup to retrieve the html class but it is returning None or "[]". I am a beginner who started studying python 2 weeks ago so I don't know what to do at all... please help me.... | 2021/08/08 | [
"https://Stackoverflow.com/questions/68698574",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16613055/"
] | Try to set `User-Agent` header during your request:
```py
import requests
from bs4 import BeautifulSoup
headers = {
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0"
}
JAGS7_result = requests.get(
"https://agsjournals.onlinelibrary.wiley.com/toc/15325415/2021/69/7",... | I would also advise that you use spiders and scrapy for your work in future. It a great package for scraping since beautifulsoup often can’t succeed over JavaScript websites. |
12,977,679 | in my application i want to add Tool-tips.
after configure the tool tip i want the option to distinguished between the label who activate the Tool tip in order to show the appropriate text so in the Tool tip function i am try to do it but got an error: **"The type 'Accessibility.IAccessible' is defined in an assembly t... | 2012/10/19 | [
"https://Stackoverflow.com/questions/12977679",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1269592/"
] | [From MSDN](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.accessibilityobject%28v=vs.100%29.aspx)
```
`To get or set the AccessibilityObject property, you must add a reference to the
Accessibility assembly installed with the .NET Framework`
```
So you just need to add this reference using t... | You don't need to reference the AccessibleObject. All you need is get the name of the AssociatedControl, like so:
```
private void toolTip1_Popup(object sender, PopupEventArgs e)
{
string st = e.AssociatedControl.Name;
}
```
As for your subquestion, to set the tooltip text dinamically you could try something lik... |
3,954,283 | I am not looking for a solution, since this is a task from my assignment - rather a sanity check, since I spent way too much time thinking about this and I am thinking that there is possibly something wrong. The task goes like this:
Prove that the function: $D f(X): \mathbb{R}^{n \times n} \rightarrow \mathbb{R}^{n \t... | 2020/12/18 | [
"https://math.stackexchange.com/questions/3954283",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/634477/"
] | If you take a collection $\Sigma=\{\mathfrak{a}\_i\}\_{i\in I}$ of ideals in a unital ring $A$, then $\bigcup\_{i\in I} \mathfrak{a}\_i$ is still an ideal if $\Sigma$ is a directed set under $\subseteq$. That is, if for any pair of indices $i,j$, there exists an index $k$ so that $\mathfrak{a}\_i\subseteq \mathfrak{a}\... | Let $\mathcal{C}:=\{I\_k : k \in K\}$ be a set of ideals in a ring $R$. Put $I:= \bigcup\_{k \in K} I\_k$. The question is: "When is $I$ an ideal of $R$?"
Here is a sufficient condition, which is a good exercise:
$\mathcal{C}$ is a chain, that is for all $k,l \in K$ we have either $I\_k \subseteq I\_l$ and $I\_l \sub... |
71,436 | I have installed "ProTeX" with "TeXstudio 2.3" & "Miktex 2.9".
I get an error
```
! The fontspec package requires either XeTeX or LuaTeX to function
```
when I attempt to run
```
\documentclass{article}
\usepackage{fontspec}
\begin{document}
Hello world!
\end{document}
```
MikTeX is said to come with some of t... | 2012/09/13 | [
"https://tex.stackexchange.com/questions/71436",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/18597/"
] | You have to reconfig TeXstudio to use `lualatex` or `xelatex` instead of `pdflatex` which is preconfigured in TeXstudio. You can change it under `options`, then `commands`.
You can also use the command line to test whether for example `lualatex` is running. `lualatex test` will compile `test.tex` with `lualatex`. | You should compile the document with `xelatex` or `lualatex` command.
For me, your document compiles with both with no errors. |
71,436 | I have installed "ProTeX" with "TeXstudio 2.3" & "Miktex 2.9".
I get an error
```
! The fontspec package requires either XeTeX or LuaTeX to function
```
when I attempt to run
```
\documentclass{article}
\usepackage{fontspec}
\begin{document}
Hello world!
\end{document}
```
MikTeX is said to come with some of t... | 2012/09/13 | [
"https://tex.stackexchange.com/questions/71436",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/18597/"
] | If you insist on TeXStudio you may now download [TeXStudio 2.4](http://texstudio.sourceforge.net/). You can now set up your `xelatex` and `lualatex` commands with this version.
I am using Ubuntu 12.04 but TeXStudio 2.4 must have the same features as the Windows version.
See in the picture below that there is already... | You should compile the document with `xelatex` or `lualatex` command.
For me, your document compiles with both with no errors. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.