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
132,064
> > A blast furnace makes pig iron containing $3.6\% \; \ce{C}$, $1.4\% \; \ce{Si}$, and $95\% \; \ce{Fe}$. The ore is $80\% \; \ce{Fe2O3}$, $12\% \; \ce{SiO2}$, and $\ce{Al2O3}$. The blast furnace gas contains $28\% \; \ce{CO}$ and $12\% \; \ce{CO2}$. Assume that there is no iron loss through the slag. The atomic mas...
2020/04/18
[ "https://chemistry.stackexchange.com/questions/132064", "https://chemistry.stackexchange.com", "https://chemistry.stackexchange.com/users/71058/" ]
The double bond consists of a sigma and pi bond, which is formed between two p orbitals. When the molecule has enough energy, obtained by random collisions in solution, the pi bond can break leaving just the single sigma bond. At this point should the double bond reform it is as if nothing has happened, however, if the...
The breaking of double bond requires a sufficently large energy which may also dissociate the compound also first breaking double bond and then again reforming through a reduction reaction is not feasible...pls comment if this helps you
538,545
I am interested in recursively grepping for a string in a directory for a pattern and then cp'ing the matching file to a destination directory. I thought I could do something like the following, but it doesn't seem to make sense with linux's find tool: `find . -type f -exec grep -ilR "MY PATTERN" | xargs cp /dest/dir`...
2013/09/12
[ "https://serverfault.com/questions/538545", "https://serverfault.com", "https://serverfault.com/users/19432/" ]
Do `man xargs` and look at the `-I` flag. ``` find . -type f -exec grep -ilR "MY PATTERN" {} \; | xargs -I % cp % /dest/dir/ ``` Also, `find` expects a `\;` or `+` after the `-exec` flag.
`xargs` reads its standard input and puts them at the end of the command to be executed. As you've written it, you would end up executing ``` cp /dest/dir sourcefile1 sourcefile2 sourcefile3 ``` which is backwards from what you want. You could use the `-I` option to specify a placeholder for `xargs`, like this: `xa...
538,545
I am interested in recursively grepping for a string in a directory for a pattern and then cp'ing the matching file to a destination directory. I thought I could do something like the following, but it doesn't seem to make sense with linux's find tool: `find . -type f -exec grep -ilR "MY PATTERN" | xargs cp /dest/dir`...
2013/09/12
[ "https://serverfault.com/questions/538545", "https://serverfault.com", "https://serverfault.com/users/19432/" ]
Do `man xargs` and look at the `-I` flag. ``` find . -type f -exec grep -ilR "MY PATTERN" {} \; | xargs -I % cp % /dest/dir/ ``` Also, `find` expects a `\;` or `+` after the `-exec` flag.
I don't think you need find. Recursive grep: ``` grep -rl "MY PATTERN" . ```
538,545
I am interested in recursively grepping for a string in a directory for a pattern and then cp'ing the matching file to a destination directory. I thought I could do something like the following, but it doesn't seem to make sense with linux's find tool: `find . -type f -exec grep -ilR "MY PATTERN" | xargs cp /dest/dir`...
2013/09/12
[ "https://serverfault.com/questions/538545", "https://serverfault.com", "https://serverfault.com/users/19432/" ]
Do `man xargs` and look at the `-I` flag. ``` find . -type f -exec grep -ilR "MY PATTERN" {} \; | xargs -I % cp % /dest/dir/ ``` Also, `find` expects a `\;` or `+` after the `-exec` flag.
None of the examples above takes into account the possibility of `grep`'s `-l` generating duplicated results (files with the same name, but in different places), and therefore `find`'s `exec`'s hook overwriting files in the destination directory. An attempt to solve this: ``` $ tree foo foo ├── bar │   ├── baz │   │ ...
555,474
I was asking myself how I can ease writing of long commands/phrases that are used very often in the exact same way. Example: How can I write the following: ``` \begin{mdframed}\begin{lstlisting}[style=mystyle] bla bla bla \end{lstlisting}\end{mdframed} ``` In a shorter way like: ``` \mycommand{ bla bla bla } ``` ...
2020/07/29
[ "https://tex.stackexchange.com/questions/555474", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/214232/" ]
I'd not recommend making the `mdframed`–`lstlisting` into a command with argument instead of a proper environment. For one thing, line breaks ***cannot*** be preserved in the argument version. I'd also suggest `tcolorbox` rather than `mdframed`, because it offers better integration with `listings`. Anyway, you can do...
In general, you can do something like this: ``` \newcommand{\mycommand}[1]{ \begin{environment} #1 \end{environment} } ``` However, the `lstlisting` environment relies on changing category codes to work so the category codes won't be what they need to be when the argument is expanded. Fortunately, this is so...
555,474
I was asking myself how I can ease writing of long commands/phrases that are used very often in the exact same way. Example: How can I write the following: ``` \begin{mdframed}\begin{lstlisting}[style=mystyle] bla bla bla \end{lstlisting}\end{mdframed} ``` In a shorter way like: ``` \mycommand{ bla bla bla } ``` ...
2020/07/29
[ "https://tex.stackexchange.com/questions/555474", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/214232/" ]
With the upcoming LaTeX kernel, due to be released in October, you can add to 'hooks' to achieve this. For example ``` \documentclass{article} \usepackage{listings} \usepackage{mdframed} \AddToHook{env/lstlisting/before}{\begin{mdframed}} \AddToHook{env/lstlisting/after}{\end{mdframed}} \begin{document} \begin{lstlist...
In general, you can do something like this: ``` \newcommand{\mycommand}[1]{ \begin{environment} #1 \end{environment} } ``` However, the `lstlisting` environment relies on changing category codes to work so the category codes won't be what they need to be when the argument is expanded. Fortunately, this is so...
555,474
I was asking myself how I can ease writing of long commands/phrases that are used very often in the exact same way. Example: How can I write the following: ``` \begin{mdframed}\begin{lstlisting}[style=mystyle] bla bla bla \end{lstlisting}\end{mdframed} ``` In a shorter way like: ``` \mycommand{ bla bla bla } ``` ...
2020/07/29
[ "https://tex.stackexchange.com/questions/555474", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/214232/" ]
I'd not recommend making the `mdframed`–`lstlisting` into a command with argument instead of a proper environment. For one thing, line breaks ***cannot*** be preserved in the argument version. I'd also suggest `tcolorbox` rather than `mdframed`, because it offers better integration with `listings`. Anyway, you can do...
With the upcoming LaTeX kernel, due to be released in October, you can add to 'hooks' to achieve this. For example ``` \documentclass{article} \usepackage{listings} \usepackage{mdframed} \AddToHook{env/lstlisting/before}{\begin{mdframed}} \AddToHook{env/lstlisting/after}{\end{mdframed}} \begin{document} \begin{lstlist...
555,474
I was asking myself how I can ease writing of long commands/phrases that are used very often in the exact same way. Example: How can I write the following: ``` \begin{mdframed}\begin{lstlisting}[style=mystyle] bla bla bla \end{lstlisting}\end{mdframed} ``` In a shorter way like: ``` \mycommand{ bla bla bla } ``` ...
2020/07/29
[ "https://tex.stackexchange.com/questions/555474", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/214232/" ]
I'd not recommend making the `mdframed`–`lstlisting` into a command with argument instead of a proper environment. For one thing, line breaks ***cannot*** be preserved in the argument version. I'd also suggest `tcolorbox` rather than `mdframed`, because it offers better integration with `listings`. Anyway, you can do...
As long as `\mycommand` is used on document-level only, not from within arguments of other macros, not from within definition-texts of other macros, not from within token-registers, not as part of a a moving argument, you can have LaTeX read things as verbatim-arguments and pass these to `\scantokens`. But I cannot re...
555,474
I was asking myself how I can ease writing of long commands/phrases that are used very often in the exact same way. Example: How can I write the following: ``` \begin{mdframed}\begin{lstlisting}[style=mystyle] bla bla bla \end{lstlisting}\end{mdframed} ``` In a shorter way like: ``` \mycommand{ bla bla bla } ``` ...
2020/07/29
[ "https://tex.stackexchange.com/questions/555474", "https://tex.stackexchange.com", "https://tex.stackexchange.com/users/214232/" ]
With the upcoming LaTeX kernel, due to be released in October, you can add to 'hooks' to achieve this. For example ``` \documentclass{article} \usepackage{listings} \usepackage{mdframed} \AddToHook{env/lstlisting/before}{\begin{mdframed}} \AddToHook{env/lstlisting/after}{\end{mdframed}} \begin{document} \begin{lstlist...
As long as `\mycommand` is used on document-level only, not from within arguments of other macros, not from within definition-texts of other macros, not from within token-registers, not as part of a a moving argument, you can have LaTeX read things as verbatim-arguments and pass these to `\scantokens`. But I cannot re...
71,820,908
I want to hit an API inside my cloud functions so I'm using `axios` to make my http multipart/form-data post request. When I by-pass my cloud functions and put my endpoint API directly inside Postman, everything works as expected. But when I put the function endpoint in Postman, it fails. I also took a look at the nod...
2022/04/10
[ "https://Stackoverflow.com/questions/71820908", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13775978/" ]
Ok, so after one whole day lost looking for the solution, for others facing the same issue, this is my workaround : As my logs pointed out showing an axios error `isAxiosError: true`, I decided to replace `axios` by `unirest` npm package. There is couple of HTTP librairies in npm using approximatively the same methodo...
Faced with same behaviour. In my case problew was with my lambda function. I declared variables like `API_LINK, REQ_FORM_DATA` and etc. outside `exports.handler`. So, first time on lambda init i got success response with correct data, and then all next requests failed with ***socket hang up*** because alive lambda did ...
33,376,795
This used to work fine: ``` <?xml version="1.0" encoding="UTF-8"?> <web-bnd xmlns="http://websphere.ibm.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://websphere.ibm.com/xml/ns/javaee http://websphere.ibm.com/xml/ns/javaee/ibm-web-bnd_1_0.xsd" version="1.0"> ...
2015/10/27
[ "https://Stackoverflow.com/questions/33376795", "https://Stackoverflow.com", "https://Stackoverflow.com/users/231350/" ]
Install WebSphere Developer Tools via Eclipse Marketplace. It will add required schema to the XML Catalog in the Eclipse. You can check if you have them via `Preferences > XML > XML catalog`. These schemas are in one of the jars from plugin (the exact filename can be different depending on tools version) ``` Location:...
For Websphere Application Server: You can find all the schemas here... **WAS\_INSTALL\_ROOT/properties/schemas**
28,396,650
Say for example I have a data frame with a column `a` and I want to create columns `a^i` for several values of `i`. ``` > dat <- data.frame(a=1:5) > dat a 1 1 2 2 3 3 4 4 5 5 ``` As an example, the output I want for `i=2:5`: ``` a power_2 power_3 power_4 power_5 1 1 1 1 1 1 2...
2015/02/08
[ "https://Stackoverflow.com/questions/28396650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1100107/" ]
Here's an option using `do`: ``` i <- 2:5 n <- c(names(dat), paste0("power_", i)) dat %>% do(data.frame(., sapply(i, function(x) .$a^x))) %>% setNames(n) # a power_2 power_3 power_4 power_5 #1 1 1 1 1 1 #2 2 4 8 16 32 #3 3 9 27 81 243 #4 4 16 ...
One possibility is to use `outer` in `do`, and then set the names with `setNames` ``` i <- 2:5 dat %>% do(data.frame(., outer(.$a, i, `^`))) %>% setNames(., c("a", paste0("power_", i))) # a power_2 power_3 power_4 power_5 # 1 1 1 1 1 1 # 2 2 4 8 16 32 # 3 3 9 ...
28,396,650
Say for example I have a data frame with a column `a` and I want to create columns `a^i` for several values of `i`. ``` > dat <- data.frame(a=1:5) > dat a 1 1 2 2 3 3 4 4 5 5 ``` As an example, the output I want for `i=2:5`: ``` a power_2 power_3 power_4 power_5 1 1 1 1 1 1 2...
2015/02/08
[ "https://Stackoverflow.com/questions/28396650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1100107/" ]
Here's an option using `do`: ``` i <- 2:5 n <- c(names(dat), paste0("power_", i)) dat %>% do(data.frame(., sapply(i, function(x) .$a^x))) %>% setNames(n) # a power_2 power_3 power_4 power_5 #1 1 1 1 1 1 #2 2 4 8 16 32 #3 3 9 27 81 243 #4 4 16 ...
May be this also helps ``` nm1 <- paste('power', 2:5, sep="_") lst <- setNames(as.list(2:5), nm1) dat1 <- setNames(as.data.frame(replicate(4, 1:5)),c('a', nm1) ) mutate_each_(dat1, funs(.^lst$.), nm1) # a power_2 power_3 power_4 power_5 #1 1 1 1 1 1 #2 2 4 8 16 32 #3 3 ...
28,396,650
Say for example I have a data frame with a column `a` and I want to create columns `a^i` for several values of `i`. ``` > dat <- data.frame(a=1:5) > dat a 1 1 2 2 3 3 4 4 5 5 ``` As an example, the output I want for `i=2:5`: ``` a power_2 power_3 power_4 power_5 1 1 1 1 1 1 2...
2015/02/08
[ "https://Stackoverflow.com/questions/28396650", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1100107/" ]
One possibility is to use `outer` in `do`, and then set the names with `setNames` ``` i <- 2:5 dat %>% do(data.frame(., outer(.$a, i, `^`))) %>% setNames(., c("a", paste0("power_", i))) # a power_2 power_3 power_4 power_5 # 1 1 1 1 1 1 # 2 2 4 8 16 32 # 3 3 9 ...
May be this also helps ``` nm1 <- paste('power', 2:5, sep="_") lst <- setNames(as.list(2:5), nm1) dat1 <- setNames(as.data.frame(replicate(4, 1:5)),c('a', nm1) ) mutate_each_(dat1, funs(.^lst$.), nm1) # a power_2 power_3 power_4 power_5 #1 1 1 1 1 1 #2 2 4 8 16 32 #3 3 ...
5,595,566
For this implementation, should I be using a MotionEvent or DragEvent for moving the ball in the meter? ![enter image description here](https://i.stack.imgur.com/NdXx6.png)
2011/04/08
[ "https://Stackoverflow.com/questions/5595566", "https://Stackoverflow.com", "https://Stackoverflow.com/users/448005/" ]
instead of manipulating the visibility of the span, if an error message is to come up you could add the `er` class to the parent `section` element itself from there you can control the visibility of the actual `li` that contains your message e.g. ``` section li:first-child {display: none;} section.er li:first-child {...
``` $('form').mouseover(function (){ $('span.er').css('opacty':1); if(!$("span.er:visible")){ $('form').css({'opacity',0.5}); } }); ``` And you are very difficult to understand you have confused the hell out of us, put it on bullet points the actions and their priority if you find it that difficult as for...
11,800
Dark mode was introduced to StackOverflow about a year ago ([blog post](https://stackoverflow.blog/2020/03/30/introducing-dark-mode-for-stack-overflow/)), but as of now, it still isn't available on our site (or any other site as far as I know). Back then, it was stated that > > For now, we have no plans to bring dar...
2021/10/25
[ "https://rpg.meta.stackexchange.com/questions/11800", "https://rpg.meta.stackexchange.com", "https://rpg.meta.stackexchange.com/users/38495/" ]
### Yes, I want dark mode on RPG.SE I don't really have anything else interesting to say, nor do I have any knowledge about what it takes to implement it. I'm leaving this answer to simply measure support for "Yes, I want dark mode".
### RPG SE is almost-certainly one of those sites that “would require redoing the artwork completely” Our banner includes material that probably cannot be “automagically” converted to a darker background. It includes gradients that fade into the light site background, and which will probably not “just work” against a ...
11,800
Dark mode was introduced to StackOverflow about a year ago ([blog post](https://stackoverflow.blog/2020/03/30/introducing-dark-mode-for-stack-overflow/)), but as of now, it still isn't available on our site (or any other site as far as I know). Back then, it was stated that > > For now, we have no plans to bring dar...
2021/10/25
[ "https://rpg.meta.stackexchange.com/questions/11800", "https://rpg.meta.stackexchange.com", "https://rpg.meta.stackexchange.com/users/38495/" ]
### Yes, I want dark mode on RPG.SE I don't really have anything else interesting to say, nor do I have any knowledge about what it takes to implement it. I'm leaving this answer to simply measure support for "Yes, I want dark mode".
*Disclaimer since there seems to have been some confusion: yes, the proof of concept is fairly ugly. That doesn't matter, it's just a proof of concept - it doesn't have to look nice, just prove that the styling is possible. For a real theme, obviously, more effort than the 15-30 minutes of work I spent on the POC is re...
11,800
Dark mode was introduced to StackOverflow about a year ago ([blog post](https://stackoverflow.blog/2020/03/30/introducing-dark-mode-for-stack-overflow/)), but as of now, it still isn't available on our site (or any other site as far as I know). Back then, it was stated that > > For now, we have no plans to bring dar...
2021/10/25
[ "https://rpg.meta.stackexchange.com/questions/11800", "https://rpg.meta.stackexchange.com", "https://rpg.meta.stackexchange.com/users/38495/" ]
*Disclaimer since there seems to have been some confusion: yes, the proof of concept is fairly ugly. That doesn't matter, it's just a proof of concept - it doesn't have to look nice, just prove that the styling is possible. For a real theme, obviously, more effort than the 15-30 minutes of work I spent on the POC is re...
### RPG SE is almost-certainly one of those sites that “would require redoing the artwork completely” Our banner includes material that probably cannot be “automagically” converted to a darker background. It includes gradients that fade into the light site background, and which will probably not “just work” against a ...
26,007,915
I have a regular expression now that matches any number: ``` /(\d)/ ``` Now I'd like to modify it to not pick up 1, so it should capture 238, 12, 41, but not 1. Does anyone see a way to do that? Thanks
2014/09/24
[ "https://Stackoverflow.com/questions/26007915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1008834/" ]
Assuming Negative Lookahead is supported you could do: ``` ^(?!1$)\d+$ ``` Or simply use the alternation operator in context placing what you want to exclude on the left-hand side, and place what you want to match in a capturing group on the right-hand side. ``` \b1\b|(\d+) ``` [Live Demo](http://regex101.com/r/n...
You can use `/(?!1$)\d+/` Try this code in PHP: ``` $a ="1"; $b ="2"; $reg = "/(?!1$)\d+/"; echo preg_match($reg, $a); echo preg_match($reg, $b); ```
26,007,915
I have a regular expression now that matches any number: ``` /(\d)/ ``` Now I'd like to modify it to not pick up 1, so it should capture 238, 12, 41, but not 1. Does anyone see a way to do that? Thanks
2014/09/24
[ "https://Stackoverflow.com/questions/26007915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1008834/" ]
Use this regular expression ``` \b[02-9]\b|\d{2,} ```
You can use `/(?!1$)\d+/` Try this code in PHP: ``` $a ="1"; $b ="2"; $reg = "/(?!1$)\d+/"; echo preg_match($reg, $a); echo preg_match($reg, $b); ```
26,007,915
I have a regular expression now that matches any number: ``` /(\d)/ ``` Now I'd like to modify it to not pick up 1, so it should capture 238, 12, 41, but not 1. Does anyone see a way to do that? Thanks
2014/09/24
[ "https://Stackoverflow.com/questions/26007915", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1008834/" ]
Assuming Negative Lookahead is supported you could do: ``` ^(?!1$)\d+$ ``` Or simply use the alternation operator in context placing what you want to exclude on the left-hand side, and place what you want to match in a capturing group on the right-hand side. ``` \b1\b|(\d+) ``` [Live Demo](http://regex101.com/r/n...
Use this regular expression ``` \b[02-9]\b|\d{2,} ```
20,755,896
``` def OnClick(self,event): print "a:", a os.system('iperf -s -w a') ``` Here a is displayed correctly. But in the `os.system` command the value of a is taken as 0. Could you please help me on this?
2013/12/24
[ "https://Stackoverflow.com/questions/20755896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3131595/" ]
You are not passing the value of `a`, but you are passing `a` as it is. So, you might want to do this ``` os.system('iperf -s -w {}'.format(a)) ``` Now, the value of `a` will be substituted at `{}`. You can see the difference between both the versions by printing them ``` print 'iperf -s -w {}'.format(a) print 'ipe...
``` os.system('iperf -s -w a') ``` takes literal a and not the value of the variable. I would use: ``` cmd = 'iperf -s -w %d' %a os.system (cmd) ``` Refer [input output formatting in python](http://docs.python.org/2/tutorial/inputoutput.html)
54,372,976
I am trying to display some json data and keep getting this error: **ERROR Error: Error trying to diff 'Leanne Graham'. Only arrays and iterables are allowed** Here is the code: The Data ``` {id: 1, name: "Leanne Graham"} ``` app.component.html ``` <ul> <li *ngFor="let element of data"> {{element.name}} ...
2019/01/25
[ "https://Stackoverflow.com/questions/54372976", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
Since you are just getting an *object*, not an array, try changing your code like this: **Layout the structure of the returned data** ``` export interface User { id: number; name: string; } ``` This defines the structure that the received data is mapped to. **Retrieve the data into that structure (service)** ...
Do check out the [keyvalue](https://angular.io/api/common/KeyValuePipe) pipe. Using `keyvalue` pipe: ``` <ul> <ng-container *ngFor="let element of data | keyvalue"> <li *ngIf="element.key === 'name'"> <span>{{element.value }}</span> </li> </ng-container> </ul> ``` Working demo: <https://stackblitz....
52,769,758
I am building an Angular 6 application that will be able to make CRUD operation on Azure Blob Storage. I'm however using postman to test requests before implementing them inside the app and copy-pasting the token that I get from Angular for that resource. When trying to read a file that I have inside the storage for t...
2018/10/11
[ "https://Stackoverflow.com/questions/52769758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10064334/" ]
I found it's not enough for the app and account to be added as owners. I would go into your storage account > IAM > Add role assignment, and add the special permissions for this type of request: * Storage Blob Data Contributor * Storage Queue Data Contributor
Be aware that if you want to apply "STORAGE BLOB DATA XXXX" role at the subscription level it will not work if your subscription has Azure DataBricks namespaces: > > If your subscription includes an Azure DataBricks namespace, roles assigned at the subscription scope will be blocked from granting access to blob and q...
52,769,758
I am building an Angular 6 application that will be able to make CRUD operation on Azure Blob Storage. I'm however using postman to test requests before implementing them inside the app and copy-pasting the token that I get from Angular for that resource. When trying to read a file that I have inside the storage for t...
2018/10/11
[ "https://Stackoverflow.com/questions/52769758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10064334/" ]
I've just solved this by changing the resource requested in the GetAccessTokenAsync method from "<https://storage.azure.com>" to the url of my storage blob as in this snippet: ``` public async Task<StorageCredentials> CreateStorageCredentialsAsync() { var provider = new AzureServiceTokenProvider(); ...
Used the following to connect using Azure AD to blob storage: This is code uses SDK V11 since V12 still has issues with multi AD accounts See this issue <https://github.com/Azure/azure-sdk-for-net/issues/8658> For further reading on V12 and V11 SDK <https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quick...
52,769,758
I am building an Angular 6 application that will be able to make CRUD operation on Azure Blob Storage. I'm however using postman to test requests before implementing them inside the app and copy-pasting the token that I get from Angular for that resource. When trying to read a file that I have inside the storage for t...
2018/10/11
[ "https://Stackoverflow.com/questions/52769758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10064334/" ]
I found it's not enough for the app and account to be added as owners. I would go into your storage account > IAM > Add role assignment, and add the special permissions for this type of request: * Storage Blob Data Contributor * Storage Queue Data Contributor
Used the following to connect using Azure AD to blob storage: This is code uses SDK V11 since V12 still has issues with multi AD accounts See this issue <https://github.com/Azure/azure-sdk-for-net/issues/8658> For further reading on V12 and V11 SDK <https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quick...
52,769,758
I am building an Angular 6 application that will be able to make CRUD operation on Azure Blob Storage. I'm however using postman to test requests before implementing them inside the app and copy-pasting the token that I get from Angular for that resource. When trying to read a file that I have inside the storage for t...
2018/10/11
[ "https://Stackoverflow.com/questions/52769758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10064334/" ]
Make sure to use Storage Blob Data Contributor and NOT Storage Account Contributor where the latter is only for managing the actual Storage Account and not the data in it.
Used the following to connect using Azure AD to blob storage: This is code uses SDK V11 since V12 still has issues with multi AD accounts See this issue <https://github.com/Azure/azure-sdk-for-net/issues/8658> For further reading on V12 and V11 SDK <https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quick...
52,769,758
I am building an Angular 6 application that will be able to make CRUD operation on Azure Blob Storage. I'm however using postman to test requests before implementing them inside the app and copy-pasting the token that I get from Angular for that resource. When trying to read a file that I have inside the storage for t...
2018/10/11
[ "https://Stackoverflow.com/questions/52769758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10064334/" ]
I found it's not enough for the app and account to be added as owners. I would go into your storage account > IAM > Add role assignment, and add the special permissions for this type of request: * Storage Blob Data Contributor * Storage Queue Data Contributor
I've just solved this by changing the resource requested in the GetAccessTokenAsync method from "<https://storage.azure.com>" to the url of my storage blob as in this snippet: ``` public async Task<StorageCredentials> CreateStorageCredentialsAsync() { var provider = new AzureServiceTokenProvider(); ...
52,769,758
I am building an Angular 6 application that will be able to make CRUD operation on Azure Blob Storage. I'm however using postman to test requests before implementing them inside the app and copy-pasting the token that I get from Angular for that resource. When trying to read a file that I have inside the storage for t...
2018/10/11
[ "https://Stackoverflow.com/questions/52769758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10064334/" ]
Make sure you add the `/Y` at the end of the command.
Used the following to connect using Azure AD to blob storage: This is code uses SDK V11 since V12 still has issues with multi AD accounts See this issue <https://github.com/Azure/azure-sdk-for-net/issues/8658> For further reading on V12 and V11 SDK <https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quick...
52,769,758
I am building an Angular 6 application that will be able to make CRUD operation on Azure Blob Storage. I'm however using postman to test requests before implementing them inside the app and copy-pasting the token that I get from Angular for that resource. When trying to read a file that I have inside the storage for t...
2018/10/11
[ "https://Stackoverflow.com/questions/52769758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10064334/" ]
Be aware that if you want to apply "STORAGE BLOB DATA XXXX" role at the subscription level it will not work if your subscription has Azure DataBricks namespaces: > > If your subscription includes an Azure DataBricks namespace, roles assigned at the subscription scope will be blocked from granting access to blob and q...
Used the following to connect using Azure AD to blob storage: This is code uses SDK V11 since V12 still has issues with multi AD accounts See this issue <https://github.com/Azure/azure-sdk-for-net/issues/8658> For further reading on V12 and V11 SDK <https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quick...
52,769,758
I am building an Angular 6 application that will be able to make CRUD operation on Azure Blob Storage. I'm however using postman to test requests before implementing them inside the app and copy-pasting the token that I get from Angular for that resource. When trying to read a file that I have inside the storage for t...
2018/10/11
[ "https://Stackoverflow.com/questions/52769758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10064334/" ]
Make sure to use Storage Blob Data Contributor and NOT Storage Account Contributor where the latter is only for managing the actual Storage Account and not the data in it.
Be aware that if you want to apply "STORAGE BLOB DATA XXXX" role at the subscription level it will not work if your subscription has Azure DataBricks namespaces: > > If your subscription includes an Azure DataBricks namespace, roles assigned at the subscription scope will be blocked from granting access to blob and q...
52,769,758
I am building an Angular 6 application that will be able to make CRUD operation on Azure Blob Storage. I'm however using postman to test requests before implementing them inside the app and copy-pasting the token that I get from Angular for that resource. When trying to read a file that I have inside the storage for t...
2018/10/11
[ "https://Stackoverflow.com/questions/52769758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10064334/" ]
I found it's not enough for the app and account to be added as owners. I would go into your storage account > IAM > Add role assignment, and add the special permissions for this type of request: * Storage Blob Data Contributor * Storage Queue Data Contributor
Make sure to use Storage Blob Data Contributor and NOT Storage Account Contributor where the latter is only for managing the actual Storage Account and not the data in it.
52,769,758
I am building an Angular 6 application that will be able to make CRUD operation on Azure Blob Storage. I'm however using postman to test requests before implementing them inside the app and copy-pasting the token that I get from Angular for that resource. When trying to read a file that I have inside the storage for t...
2018/10/11
[ "https://Stackoverflow.com/questions/52769758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10064334/" ]
Make sure to use Storage Blob Data Contributor and NOT Storage Account Contributor where the latter is only for managing the actual Storage Account and not the data in it.
I've just solved this by changing the resource requested in the GetAccessTokenAsync method from "<https://storage.azure.com>" to the url of my storage blob as in this snippet: ``` public async Task<StorageCredentials> CreateStorageCredentialsAsync() { var provider = new AzureServiceTokenProvider(); ...
1,779,428
We have an application that has been deployed to 50+ websites. Across these sites we have noticed a piece of strange behaviour, we have now tracked this to one specific query. Very occasionally, once or twice a day usually, one of our debugging scripts reports ``` 2006 : MySQL server has gone away ``` I know there a...
2009/11/22
[ "https://Stackoverflow.com/questions/1779428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/112451/" ]
This is kind of in left field, but you should check your harddisk SMART for any errors. If there are issues reading from "that" sector then there may be issues. If you have a raid unit I wouldn't worry too much about this. I wouldn't give a high probability to this being the problem, but if you are really stumped then ...
on <http://bugs.mysql.com/bug.php?id=1011> the second comment says that: "the 'MySQL server has gone away' error is caused by a query longer than the max\_allowed\_packet." there is some more information on fixing it here: <http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html>
1,779,428
We have an application that has been deployed to 50+ websites. Across these sites we have noticed a piece of strange behaviour, we have now tracked this to one specific query. Very occasionally, once or twice a day usually, one of our debugging scripts reports ``` 2006 : MySQL server has gone away ``` I know there a...
2009/11/22
[ "https://Stackoverflow.com/questions/1779428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/112451/" ]
on <http://bugs.mysql.com/bug.php?id=1011> the second comment says that: "the 'MySQL server has gone away' error is caused by a query longer than the max\_allowed\_packet." there is some more information on fixing it here: <http://bogdan.org.ua/2008/12/25/how-to-fix-mysql-server-has-gone-away-error-2006.html>
That means that sql connection was idle for too long. Check if there are some slow operations performed before your sql-query.
1,779,428
We have an application that has been deployed to 50+ websites. Across these sites we have noticed a piece of strange behaviour, we have now tracked this to one specific query. Very occasionally, once or twice a day usually, one of our debugging scripts reports ``` 2006 : MySQL server has gone away ``` I know there a...
2009/11/22
[ "https://Stackoverflow.com/questions/1779428", "https://Stackoverflow.com", "https://Stackoverflow.com/users/112451/" ]
This is kind of in left field, but you should check your harddisk SMART for any errors. If there are issues reading from "that" sector then there may be issues. If you have a raid unit I wouldn't worry too much about this. I wouldn't give a high probability to this being the problem, but if you are really stumped then ...
That means that sql connection was idle for too long. Check if there are some slow operations performed before your sql-query.
9,280,649
I have a page that mostly consists of HTML in a WebBrowser control. I was able to set the background quite easily using the PhoneLightThemeVisibility Resource because it's either Black or White. I was wondering how to get the Accent brush and turn it into a HTML code so I can use it in my HTML.
2012/02/14
[ "https://Stackoverflow.com/questions/9280649", "https://Stackoverflow.com", "https://Stackoverflow.com/users/200015/" ]
``` var brush = (App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush); string fullColourCode = brush.Color.ToString(); string HTMLColourCode = "#" + fullColourCode.Substring(3); ``` or access the component values individually and build from there.... ``` string RedComponent = brush.Color.R.ToString(); strin...
I think you could use the following (assuming that `AppWorkspaceColor` is the one required): ``` Color appColor = SystemColors.AppWorkspaceColor; string strColorAsHTML = appColor.ToString(); ``` Hope this helps.
3,742,674
18 diplomats sit on a rectangular table. Three are from China, four are from Japan, six are from the United States and five are from France. In how many ways can we seat the diplomats at the table so that both the Chinese and the Japanese stay together, but separated from each other? I thought I had this sorted out, b...
2020/07/02
[ "https://math.stackexchange.com/questions/3742674", "https://math.stackexchange.com", "https://math.stackexchange.com/users/439683/" ]
**Long solution** The cartesian equation of the plane is $$\pi: 2x-5y-z-4=0$$ The parametric equations of the line $r$ which is perpendicular to $\pi$ and contains $A=(10,0,20)$ are $$r:\begin{cases}x=10+2t\\y=-5t\\z=20-t\end{cases}$$. This line also contains $B$ so the coordinates of $B$ are $(10+t,-5t,20-t)$ for so...
An equation of the plane is \begin{equation} x = 2 + 3 y + (z-y)/2 \Longleftrightarrow 2 x - 5 y -z -4 = 0 \end{equation} Let $A = (x\_0,y\_0,z\_0) = (10, 0, 20)$ and $B = (x\_1, y\_1, z\_1)= A + t (2, -5, -1)$ because the vector $(2, -5, -1)$ is perpendicular to the plane. We have $2 x\_0-5 y\_0 -z\_0 - 4 = -4$, hence...
63,171,131
When enabling screens in `react-native-screens`, and having a screen which renders an `<HTML />` component passed with an `iframe` HTML element, the app crashes while pressing the back button to return to the home screen. [Full reproduction here](https://github.com/drb1/DemoForVideoCrashHtml). Environment ----------- ...
2020/07/30
[ "https://Stackoverflow.com/questions/63171131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13369047/" ]
This was caused by an incompatibility between `react-native-webview` and `react-native-screens`, which you must depend on if you are using `@react-navigation/*` packages. **EDIT**: there seems to have been a regression since. [It's being tracked here](https://github.com/react-navigation/react-navigation/issues/9755). ...
Disabling the navigation animation for the screen worked for me. I just added `animationEnabled: false,` as shown below. ``` const StackNavigator = props => { return ( <Stack.Navigator> ... <Stack.Screen name="WebViewScreen" component={WebViewScreen} options={{ anima...
63,171,131
When enabling screens in `react-native-screens`, and having a screen which renders an `<HTML />` component passed with an `iframe` HTML element, the app crashes while pressing the back button to return to the home screen. [Full reproduction here](https://github.com/drb1/DemoForVideoCrashHtml). Environment ----------- ...
2020/07/30
[ "https://Stackoverflow.com/questions/63171131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13369047/" ]
This was caused by an incompatibility between `react-native-webview` and `react-native-screens`, which you must depend on if you are using `@react-navigation/*` packages. **EDIT**: there seems to have been a regression since. [It's being tracked here](https://github.com/react-navigation/react-navigation/issues/9755). ...
For me the error was triggered by social media iframes. Applying `style = {{ opacity: 0.99 }}` was the only thing that worked for me: ``` <WebView useWebKit={true} scrollEnabled={false} scalesPageToFit={true} source={{ html: html }} javaScriptEnabled={true} bounces={false} overScrollMode={...
63,171,131
When enabling screens in `react-native-screens`, and having a screen which renders an `<HTML />` component passed with an `iframe` HTML element, the app crashes while pressing the back button to return to the home screen. [Full reproduction here](https://github.com/drb1/DemoForVideoCrashHtml). Environment ----------- ...
2020/07/30
[ "https://Stackoverflow.com/questions/63171131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13369047/" ]
The updated solution for this is **androidLayerType="software"**, since **androidHardwareAccelerationDisabled** is now deprecated. ex:- ``` <AutoHeightWebView androidHardwareAccelerationDisabled // update here androidLayerType="software" ... /> ```
Disabling the navigation animation for the screen worked for me. I just added `animationEnabled: false,` as shown below. ``` const StackNavigator = props => { return ( <Stack.Navigator> ... <Stack.Screen name="WebViewScreen" component={WebViewScreen} options={{ anima...
63,171,131
When enabling screens in `react-native-screens`, and having a screen which renders an `<HTML />` component passed with an `iframe` HTML element, the app crashes while pressing the back button to return to the home screen. [Full reproduction here](https://github.com/drb1/DemoForVideoCrashHtml). Environment ----------- ...
2020/07/30
[ "https://Stackoverflow.com/questions/63171131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13369047/" ]
One more fix is to disable animation for react-navigation in navigationOptions. ``` static navigationOptions = () => ({ animationEnabled: false, }); ```
Another workaround is to add `androidLayerType: 'software'` in `webViewProps` inside `htmlProps` which pass to render HTML table as mentioned below. ``` const webViewProps = { androidLayerType: 'software', } const htmlProps = { WebView, renderers: { table: TableRenderer, }, renderersPro...
63,171,131
When enabling screens in `react-native-screens`, and having a screen which renders an `<HTML />` component passed with an `iframe` HTML element, the app crashes while pressing the back button to return to the home screen. [Full reproduction here](https://github.com/drb1/DemoForVideoCrashHtml). Environment ----------- ...
2020/07/30
[ "https://Stackoverflow.com/questions/63171131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13369047/" ]
The updated solution for this is **androidLayerType="software"**, since **androidHardwareAccelerationDisabled** is now deprecated. ex:- ``` <AutoHeightWebView androidHardwareAccelerationDisabled // update here androidLayerType="software" ... /> ```
Another workaround is to add `androidLayerType: 'software'` in `webViewProps` inside `htmlProps` which pass to render HTML table as mentioned below. ``` const webViewProps = { androidLayerType: 'software', } const htmlProps = { WebView, renderers: { table: TableRenderer, }, renderersPro...
63,171,131
When enabling screens in `react-native-screens`, and having a screen which renders an `<HTML />` component passed with an `iframe` HTML element, the app crashes while pressing the back button to return to the home screen. [Full reproduction here](https://github.com/drb1/DemoForVideoCrashHtml). Environment ----------- ...
2020/07/30
[ "https://Stackoverflow.com/questions/63171131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13369047/" ]
This was caused by an incompatibility between `react-native-webview` and `react-native-screens`, which you must depend on if you are using `@react-navigation/*` packages. **EDIT**: there seems to have been a regression since. [It's being tracked here](https://github.com/react-navigation/react-navigation/issues/9755). ...
The updated solution for this is **androidLayerType="software"**, since **androidHardwareAccelerationDisabled** is now deprecated. ex:- ``` <AutoHeightWebView androidHardwareAccelerationDisabled // update here androidLayerType="software" ... /> ```
63,171,131
When enabling screens in `react-native-screens`, and having a screen which renders an `<HTML />` component passed with an `iframe` HTML element, the app crashes while pressing the back button to return to the home screen. [Full reproduction here](https://github.com/drb1/DemoForVideoCrashHtml). Environment ----------- ...
2020/07/30
[ "https://Stackoverflow.com/questions/63171131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13369047/" ]
One more fix is to disable animation for react-navigation in navigationOptions. ``` static navigationOptions = () => ({ animationEnabled: false, }); ```
For me the error was triggered by social media iframes. Applying `style = {{ opacity: 0.99 }}` was the only thing that worked for me: ``` <WebView useWebKit={true} scrollEnabled={false} scalesPageToFit={true} source={{ html: html }} javaScriptEnabled={true} bounces={false} overScrollMode={...
63,171,131
When enabling screens in `react-native-screens`, and having a screen which renders an `<HTML />` component passed with an `iframe` HTML element, the app crashes while pressing the back button to return to the home screen. [Full reproduction here](https://github.com/drb1/DemoForVideoCrashHtml). Environment ----------- ...
2020/07/30
[ "https://Stackoverflow.com/questions/63171131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13369047/" ]
The updated solution for this is **androidLayerType="software"**, since **androidHardwareAccelerationDisabled** is now deprecated. ex:- ``` <AutoHeightWebView androidHardwareAccelerationDisabled // update here androidLayerType="software" ... /> ```
For me the error was triggered by social media iframes. Applying `style = {{ opacity: 0.99 }}` was the only thing that worked for me: ``` <WebView useWebKit={true} scrollEnabled={false} scalesPageToFit={true} source={{ html: html }} javaScriptEnabled={true} bounces={false} overScrollMode={...
63,171,131
When enabling screens in `react-native-screens`, and having a screen which renders an `<HTML />` component passed with an `iframe` HTML element, the app crashes while pressing the back button to return to the home screen. [Full reproduction here](https://github.com/drb1/DemoForVideoCrashHtml). Environment ----------- ...
2020/07/30
[ "https://Stackoverflow.com/questions/63171131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13369047/" ]
One more fix is to disable animation for react-navigation in navigationOptions. ``` static navigationOptions = () => ({ animationEnabled: false, }); ```
The updated solution for this is **androidLayerType="software"**, since **androidHardwareAccelerationDisabled** is now deprecated. ex:- ``` <AutoHeightWebView androidHardwareAccelerationDisabled // update here androidLayerType="software" ... /> ```
63,171,131
When enabling screens in `react-native-screens`, and having a screen which renders an `<HTML />` component passed with an `iframe` HTML element, the app crashes while pressing the back button to return to the home screen. [Full reproduction here](https://github.com/drb1/DemoForVideoCrashHtml). Environment ----------- ...
2020/07/30
[ "https://Stackoverflow.com/questions/63171131", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13369047/" ]
One more fix is to disable animation for react-navigation in navigationOptions. ``` static navigationOptions = () => ({ animationEnabled: false, }); ```
Disabling the navigation animation for the screen worked for me. I just added `animationEnabled: false,` as shown below. ``` const StackNavigator = props => { return ( <Stack.Navigator> ... <Stack.Screen name="WebViewScreen" component={WebViewScreen} options={{ anima...
59,829,930
I am trying to write unit test for the React functional component which has router hooks `useLocation()` like below. ``` //index.js function MyComponent(props) { const useQuery = () => new URLSearchParams(useLocation().search); const status = useQuery().get('status'); if (status === 'success') { return <Sh...
2020/01/20
[ "https://Stackoverflow.com/questions/59829930", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4035943/" ]
Use [MemoryRouter](https://reactrouter.com/web/api/MemoryRouter) component wraps your component is better than stub `useLocation` hook. > > keeps the history of your “URL” in memory (does not read or write to the address bar). Useful in tests and non-browser environments like React Native. > > > We can provide th...
Have you got this to work? Its very similar to what I am doing and asked the question here: [How do you mock useLocation() pathname using shallow test enzyme Reactjs?](https://stackoverflow.com/questions/59949052/how-do-you-mock-uselocation-pathname-using-shallow-test-enzyme-reactjs)
35,026,459
I have gone through the .trigger() document <http://api.jquery.com/trigger/> . But still not sure how this fiddle works. The link: <https://jsfiddle.net/LanceShi/s7pm43f3/2/> **HTML:** ``` <input id="theInput"/> ``` **Javascript** ``` $(document).ready(function() { $("#theInput").trigger("input"); }); $("#t...
2016/01/27
[ "https://Stackoverflow.com/questions/35026459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4018268/" ]
It's not trigger doing that. Your trigger is only being fired once. The reason is that `input` event encompasses numerous other events such as keyup, change, paste and a few others also As noted by others you need to correct your order of calling trigger before adding listener
You need to `register` the event before you can `invoke`. Since you have declare a DOM event ( something which is not registered as a jquery event ) , you need to use the function `trigger()`. For the ones which are pre-defined in jquery ( like `click`, `change` ) , you can invoke them directly without the need of `tri...
35,026,459
I have gone through the .trigger() document <http://api.jquery.com/trigger/> . But still not sure how this fiddle works. The link: <https://jsfiddle.net/LanceShi/s7pm43f3/2/> **HTML:** ``` <input id="theInput"/> ``` **Javascript** ``` $(document).ready(function() { $("#theInput").trigger("input"); }); $("#t...
2016/01/27
[ "https://Stackoverflow.com/questions/35026459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4018268/" ]
It's not trigger doing that. Your trigger is only being fired once. The reason is that `input` event encompasses numerous other events such as keyup, change, paste and a few others also As noted by others you need to correct your order of calling trigger before adding listener
In your code, `.trigger()` have no any effect because your `trigger()` will fire before `input` event attached. So your code should be like this ``` $(document).ready(function() { $("#theInput").on("input", function() { alert("Here"); }).trigger('input'); }); ``` **[Fiddle](https://jsfiddle.net/s7pm43f3/4/)...
35,026,459
I have gone through the .trigger() document <http://api.jquery.com/trigger/> . But still not sure how this fiddle works. The link: <https://jsfiddle.net/LanceShi/s7pm43f3/2/> **HTML:** ``` <input id="theInput"/> ``` **Javascript** ``` $(document).ready(function() { $("#theInput").trigger("input"); }); $("#t...
2016/01/27
[ "https://Stackoverflow.com/questions/35026459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4018268/" ]
It's not trigger doing that. Your trigger is only being fired once. The reason is that `input` event encompasses numerous other events such as keyup, change, paste and a few others also As noted by others you need to correct your order of calling trigger before adding listener
Here the explanation As you have read in the documentation of jQuery, the Trigger function execute a custom event, well see here is executed ``` $("#theInput").trigger("input"); ``` And where the hanlder is added was here ``` $("#theInput").on("input", function() { alert("Here"); }); ``` include what you say...
35,026,459
I have gone through the .trigger() document <http://api.jquery.com/trigger/> . But still not sure how this fiddle works. The link: <https://jsfiddle.net/LanceShi/s7pm43f3/2/> **HTML:** ``` <input id="theInput"/> ``` **Javascript** ``` $(document).ready(function() { $("#theInput").trigger("input"); }); $("#t...
2016/01/27
[ "https://Stackoverflow.com/questions/35026459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4018268/" ]
You need to `register` the event before you can `invoke`. Since you have declare a DOM event ( something which is not registered as a jquery event ) , you need to use the function `trigger()`. For the ones which are pre-defined in jquery ( like `click`, `change` ) , you can invoke them directly without the need of `tri...
In your code, `.trigger()` have no any effect because your `trigger()` will fire before `input` event attached. So your code should be like this ``` $(document).ready(function() { $("#theInput").on("input", function() { alert("Here"); }).trigger('input'); }); ``` **[Fiddle](https://jsfiddle.net/s7pm43f3/4/)...
35,026,459
I have gone through the .trigger() document <http://api.jquery.com/trigger/> . But still not sure how this fiddle works. The link: <https://jsfiddle.net/LanceShi/s7pm43f3/2/> **HTML:** ``` <input id="theInput"/> ``` **Javascript** ``` $(document).ready(function() { $("#theInput").trigger("input"); }); $("#t...
2016/01/27
[ "https://Stackoverflow.com/questions/35026459", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4018268/" ]
You need to `register` the event before you can `invoke`. Since you have declare a DOM event ( something which is not registered as a jquery event ) , you need to use the function `trigger()`. For the ones which are pre-defined in jquery ( like `click`, `change` ) , you can invoke them directly without the need of `tri...
Here the explanation As you have read in the documentation of jQuery, the Trigger function execute a custom event, well see here is executed ``` $("#theInput").trigger("input"); ``` And where the hanlder is added was here ``` $("#theInput").on("input", function() { alert("Here"); }); ``` include what you say...
29,549,141
I am looking to learn about using the Java CountDownLatch to control the execution of a thread. I have two classes. One is called `Poller` and the other is `Referendum`. The threads are created in the `Referendum` class and their `run()` methods are contained in the `Poller` class. In the Poller and Referendum classe...
2015/04/09
[ "https://Stackoverflow.com/questions/29549141", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3554289/" ]
The question mark at the beginning of the regex doesn't follow anything that can be made optional. If you want to match a literal question mark there, write `\?`: ``` x = int(re.findall(r"\?ent\s*took\s*([^m]*)",message)[0]) ```
First of all you need to escape `?` at the leading of your pattern, because the `?` mark is a regex character and make a string optional and must precede by a string! so if you want to math `?` you need to use `\?` also as a more efficient way you can use `re.search` and `\d+` in your pattern,and refuse from extra inde...
29,549,141
I am looking to learn about using the Java CountDownLatch to control the execution of a thread. I have two classes. One is called `Poller` and the other is `Referendum`. The threads are created in the `Referendum` class and their `run()` methods are contained in the `Poller` class. In the Poller and Referendum classe...
2015/04/09
[ "https://Stackoverflow.com/questions/29549141", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3554289/" ]
This one matches both patterns in one go and extracts the desired number: ``` tt = int(re.search(r"\?ent took (too long \()?(?P<num>\d+)",message).group('num')) ```
First of all you need to escape `?` at the leading of your pattern, because the `?` mark is a regex character and make a string optional and must precede by a string! so if you want to math `?` you need to use `\?` also as a more efficient way you can use `re.search` and `\d+` in your pattern,and refuse from extra inde...
3,024,091
Let $\mathbb{F}\_q$ be a field of order $q = p^m$, where $p$ is the characteristic of the field; a prime. Consider the ring $$R\_n = \mathbb{F}\_q[x]/\langle x^n - 1 \rangle $$ Now, I've read that this ring is semi-simple when $p$ does not divide $n$, but no proof was given. Does anyone know how to prove it or somewh...
2018/12/03
[ "https://math.stackexchange.com/questions/3024091", "https://math.stackexchange.com", "https://math.stackexchange.com/users/285167/" ]
One way to look at it is that if $C=\{1, c, c^2,\ldots, c^{n-1}\}$ is the cyclic group of order $n$, then $x\mapsto c$ is an isomorphism of $R\_n\to F\_q[C]$, the group ring of $C$ over $F\_q$. [Maschke's theorem](https://en.wikipedia.org/wiki/Maschke%27s_theorem) says that if $|G|=n<\infty$, then $F[G]$ is semisimple...
I'll give a proof. First we'll need some facts. **Fact 1** A commutative ring (possibly without identity) is semisimple if and only if it is a direct sum of fields. *Proof:* It is clear that a direct sum of fields is semisimple, so assume $R$ is a commutative semisimple ring. Then note that since $R$ is commutative...
14,294,798
I have a datatable webpage that shows a list of user in a datatable. On the user page there is a button create new user. On clicking this launches a modal jQuery dialog box for the user to enter details off the new user. There is a Cancel button which just closes the dialog box and a Save User button which on clicking ...
2013/01/12
[ "https://Stackoverflow.com/questions/14294798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/846565/" ]
> > this computation is very expensive > > > I assume this is the reason you created the cache and this should be your primary concern. While the speed of the solutions might be slightly different << 100 ns, I suspect it is more important that you be able to share results between threads. i.e. ConcurrentHashMap i...
The lookup speed is probably similar in both solutions. If there are no other concerns, I'd prefer ThreadLocal, since the best solution to multi-threading problems is single-threading. However, your main problem is you don't want concurrent calculations for the same key; so there should be a lock per key; such locks c...
14,294,798
I have a datatable webpage that shows a list of user in a datatable. On the user page there is a button create new user. On clicking this launches a modal jQuery dialog box for the user to enter details off the new user. There is a Cancel button which just closes the dialog box and a Save User button which on clicking ...
2013/01/12
[ "https://Stackoverflow.com/questions/14294798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/846565/" ]
Note that your ConcurrentHashMap implementation is not thread safe and could lead to one item being computed twice. It is actually quite complicated to get it right if you store the results directly without using explicit locking, which you certainly want to avoid if performance is a concern. It is worth noting that C...
Given that it's relatively easy to implement both of these, I would suggest you try them both and test *at steady state load* to see which one performs the best for your application. My guess is that the the `ConcurrentHashMap` will be a little faster since it does not have to make native calls to `Thread.currentThrea...
14,294,798
I have a datatable webpage that shows a list of user in a datatable. On the user page there is a button create new user. On clicking this launches a modal jQuery dialog box for the user to enter details off the new user. There is a Cancel button which just closes the dialog box and a Save User button which on clicking ...
2013/01/12
[ "https://Stackoverflow.com/questions/14294798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/846565/" ]
use ThreadLocal as cache is a not good practice In most containers, threads are reused via thread pools and thus are never gc. this would lead something wired use ConcurrentHashMap you have to manage it in order to prevent mem leak if you insist, i suggest using week or soft ref and evict after rich maxsize if you ...
Given that it's relatively easy to implement both of these, I would suggest you try them both and test *at steady state load* to see which one performs the best for your application. My guess is that the the `ConcurrentHashMap` will be a little faster since it does not have to make native calls to `Thread.currentThrea...
14,294,798
I have a datatable webpage that shows a list of user in a datatable. On the user page there is a button create new user. On clicking this launches a modal jQuery dialog box for the user to enter details off the new user. There is a Cancel button which just closes the dialog box and a Save User button which on clicking ...
2013/01/12
[ "https://Stackoverflow.com/questions/14294798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/846565/" ]
Note that your ConcurrentHashMap implementation is not thread safe and could lead to one item being computed twice. It is actually quite complicated to get it right if you store the results directly without using explicit locking, which you certainly want to avoid if performance is a concern. It is worth noting that C...
The lookup speed is probably similar in both solutions. If there are no other concerns, I'd prefer ThreadLocal, since the best solution to multi-threading problems is single-threading. However, your main problem is you don't want concurrent calculations for the same key; so there should be a lock per key; such locks c...
14,294,798
I have a datatable webpage that shows a list of user in a datatable. On the user page there is a button create new user. On clicking this launches a modal jQuery dialog box for the user to enter details off the new user. There is a Cancel button which just closes the dialog box and a Save User button which on clicking ...
2013/01/12
[ "https://Stackoverflow.com/questions/14294798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/846565/" ]
Note that your ConcurrentHashMap implementation is not thread safe and could lead to one item being computed twice. It is actually quite complicated to get it right if you store the results directly without using explicit locking, which you certainly want to avoid if performance is a concern. It is worth noting that C...
The performance question is irrelevant, as the solutions are not equivalent. The ThreadLocal hash map isn't shared between threads, so the question of thread safety doesn't even arise, but it also doesn't meet your specification, which doesn't say anything about each thread having its own cache. The requirement for t...
14,294,798
I have a datatable webpage that shows a list of user in a datatable. On the user page there is a button create new user. On clicking this launches a modal jQuery dialog box for the user to enter details off the new user. There is a Cancel button which just closes the dialog box and a Save User button which on clicking ...
2013/01/12
[ "https://Stackoverflow.com/questions/14294798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/846565/" ]
> > this computation is very expensive > > > I assume this is the reason you created the cache and this should be your primary concern. While the speed of the solutions might be slightly different << 100 ns, I suspect it is more important that you be able to share results between threads. i.e. ConcurrentHashMap i...
The performance question is irrelevant, as the solutions are not equivalent. The ThreadLocal hash map isn't shared between threads, so the question of thread safety doesn't even arise, but it also doesn't meet your specification, which doesn't say anything about each thread having its own cache. The requirement for t...
14,294,798
I have a datatable webpage that shows a list of user in a datatable. On the user page there is a button create new user. On clicking this launches a modal jQuery dialog box for the user to enter details off the new user. There is a Cancel button which just closes the dialog box and a Save User button which on clicking ...
2013/01/12
[ "https://Stackoverflow.com/questions/14294798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/846565/" ]
use ThreadLocal as cache is a not good practice In most containers, threads are reused via thread pools and thus are never gc. this would lead something wired use ConcurrentHashMap you have to manage it in order to prevent mem leak if you insist, i suggest using week or soft ref and evict after rich maxsize if you ...
Note that your ConcurrentHashMap implementation is not thread safe and could lead to one item being computed twice. It is actually quite complicated to get it right if you store the results directly without using explicit locking, which you certainly want to avoid if performance is a concern. It is worth noting that C...
14,294,798
I have a datatable webpage that shows a list of user in a datatable. On the user page there is a button create new user. On clicking this launches a modal jQuery dialog box for the user to enter details off the new user. There is a Cancel button which just closes the dialog box and a Save User button which on clicking ...
2013/01/12
[ "https://Stackoverflow.com/questions/14294798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/846565/" ]
use ThreadLocal as cache is a not good practice In most containers, threads are reused via thread pools and thus are never gc. this would lead something wired use ConcurrentHashMap you have to manage it in order to prevent mem leak if you insist, i suggest using week or soft ref and evict after rich maxsize if you ...
The performance question is irrelevant, as the solutions are not equivalent. The ThreadLocal hash map isn't shared between threads, so the question of thread safety doesn't even arise, but it also doesn't meet your specification, which doesn't say anything about each thread having its own cache. The requirement for t...
14,294,798
I have a datatable webpage that shows a list of user in a datatable. On the user page there is a button create new user. On clicking this launches a modal jQuery dialog box for the user to enter details off the new user. There is a Cancel button which just closes the dialog box and a Save User button which on clicking ...
2013/01/12
[ "https://Stackoverflow.com/questions/14294798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/846565/" ]
use ThreadLocal as cache is a not good practice In most containers, threads are reused via thread pools and thus are never gc. this would lead something wired use ConcurrentHashMap you have to manage it in order to prevent mem leak if you insist, i suggest using week or soft ref and evict after rich maxsize if you ...
The lookup speed is probably similar in both solutions. If there are no other concerns, I'd prefer ThreadLocal, since the best solution to multi-threading problems is single-threading. However, your main problem is you don't want concurrent calculations for the same key; so there should be a lock per key; such locks c...
14,294,798
I have a datatable webpage that shows a list of user in a datatable. On the user page there is a button create new user. On clicking this launches a modal jQuery dialog box for the user to enter details off the new user. There is a Cancel button which just closes the dialog box and a Save User button which on clicking ...
2013/01/12
[ "https://Stackoverflow.com/questions/14294798", "https://Stackoverflow.com", "https://Stackoverflow.com/users/846565/" ]
> > this computation is very expensive > > > I assume this is the reason you created the cache and this should be your primary concern. While the speed of the solutions might be slightly different << 100 ns, I suspect it is more important that you be able to share results between threads. i.e. ConcurrentHashMap i...
Given that it's relatively easy to implement both of these, I would suggest you try them both and test *at steady state load* to see which one performs the best for your application. My guess is that the the `ConcurrentHashMap` will be a little faster since it does not have to make native calls to `Thread.currentThrea...
68,888,423
I have this sample data. What I am trying to do get p values and compare each Person in each dataframe. I tried piping the dataframe list in `kruskal.test()` and it worked but when passing the same data frame using `lapply()` in `aov()`, I am not getting the result. I am sorry I am new to R. I'm just trying to learn ho...
2021/08/23
[ "https://Stackoverflow.com/questions/68888423", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16685342/" ]
If your file contains mixed encodings, you can read it into memory as binary, or as a hack, open it as Latin-1 and then decode the *Title* field individually on each line. If the majority of the data is encoded as UTF-8, you can attempt to decode it with ``` title.encode('latin-1').decode('utf-8 ) ``` but fall back...
If you want to exclude the column `title` alone, read all the columns and drop the column `title`. Eg. ```py df = pd.read_csv('filename') df = data.drop('title', axis = 1) ``` To give the column a default value, use: ```py df['title'] = 0 #(the value you want to provide by default) ``` or use: ```py df['title'...
17,036,225
I want to do some layout change when the devices rotate. So I implement `- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration` method to do the work. But I realize when this method is called the self.view.frame and self.view.bounds are differ...
2013/06/11
[ "https://Stackoverflow.com/questions/17036225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1544790/" ]
**I wonder why these values are different? They shouldn't be always the same?** The ***bounds*** of an UIView is the rectangle, expressed as a location (x, y) and size (width, height) *relative to its own coordinate system (0,0)*. The ***frame*** of an UIView is the rectangle, expressed as a location (x, y) and siz...
please note that frame.size is not equal to bounds.size when the simulator is rotated refer to this one [UIView frame, bounds and center](https://stackoverflow.com/questions/5361369/ios-programming-frame-bounds-and-center)
17,036,225
I want to do some layout change when the devices rotate. So I implement `- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration` method to do the work. But I realize when this method is called the self.view.frame and self.view.bounds are differ...
2013/06/11
[ "https://Stackoverflow.com/questions/17036225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1544790/" ]
Look at the [answer by "tc."](https://stackoverflow.com/questions/3536253/self-view-frame-changed-size-ifself-unexpectedly-in-landscape-mode), which is accepted as of now. Copying few lines from that answer to here. So, the "frame" is relative to the parent view, which in this case is the UIWindow. When you rotate d...
please note that frame.size is not equal to bounds.size when the simulator is rotated refer to this one [UIView frame, bounds and center](https://stackoverflow.com/questions/5361369/ios-programming-frame-bounds-and-center)
17,036,225
I want to do some layout change when the devices rotate. So I implement `- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration` method to do the work. But I realize when this method is called the self.view.frame and self.view.bounds are differ...
2013/06/11
[ "https://Stackoverflow.com/questions/17036225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1544790/" ]
Look at the [answer by "tc."](https://stackoverflow.com/questions/3536253/self-view-frame-changed-size-ifself-unexpectedly-in-landscape-mode), which is accepted as of now. Copying few lines from that answer to here. So, the "frame" is relative to the parent view, which in this case is the UIWindow. When you rotate d...
**I wonder why these values are different? They shouldn't be always the same?** The ***bounds*** of an UIView is the rectangle, expressed as a location (x, y) and size (width, height) *relative to its own coordinate system (0,0)*. The ***frame*** of an UIView is the rectangle, expressed as a location (x, y) and siz...
17,036,225
I want to do some layout change when the devices rotate. So I implement `- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration` method to do the work. But I realize when this method is called the self.view.frame and self.view.bounds are differ...
2013/06/11
[ "https://Stackoverflow.com/questions/17036225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1544790/" ]
**I wonder why these values are different? They shouldn't be always the same?** The ***bounds*** of an UIView is the rectangle, expressed as a location (x, y) and size (width, height) *relative to its own coordinate system (0,0)*. The ***frame*** of an UIView is the rectangle, expressed as a location (x, y) and siz...
Just use method did(The size is new) not will(The size is same as was in parent controller) ``` - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; [halfView setFrame:CGRectMake(0, 0, self.view.bounds....
17,036,225
I want to do some layout change when the devices rotate. So I implement `- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration` method to do the work. But I realize when this method is called the self.view.frame and self.view.bounds are differ...
2013/06/11
[ "https://Stackoverflow.com/questions/17036225", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1544790/" ]
Look at the [answer by "tc."](https://stackoverflow.com/questions/3536253/self-view-frame-changed-size-ifself-unexpectedly-in-landscape-mode), which is accepted as of now. Copying few lines from that answer to here. So, the "frame" is relative to the parent view, which in this case is the UIWindow. When you rotate d...
Just use method did(The size is new) not will(The size is same as was in parent controller) ``` - (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; [halfView setFrame:CGRectMake(0, 0, self.view.bounds....
59,403,140
I'm running a Jenkins declarative pipeline in which a stage runs on a docker container and outputs a file. I would like to copy this file from the container onto the host's git init path, so that I can commit the newly outputted file to the source git repository. In-order to copy the outputted file from container to h...
2019/12/19
[ "https://Stackoverflow.com/questions/59403140", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2101043/" ]
Generally you don't do either of these things. Docker is an isolation system that's intended to hide most of the details of the host system from the container (and *vice versa*); also the container filesystem tends to not be stored on the host in a way that's easy to extract. When you're [Using Docker with Pipeline](h...
you can get docker container ID inside the container by this cmd: ``` cat /proc/self/cgroup | grep -o -e "docker-.*.scope" | head -n 1 | sed "s/docker-\(.*\).scope/\\1/" ```
33,226,860
I have to write a page like the following, however, the scroll bar don't show in IE 11 and FireFox. What should I do to solve the problem? ```html <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; ...
2015/10/20
[ "https://Stackoverflow.com/questions/33226860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5465132/" ]
I think a nice solution for this one is to not try to recover "how many steps we still need to do" from the list getting constructed, but instead, to use `until` on a pair of the list and the number of remaining elements to be added: ``` (5, []) -> (4, 5:[]) = (4, [5]) -> (3, 4:[5]) ...
Thanks for the replies. I found out another way of solving it: ``` seq :: Int -> [Int] seq a = until (\l -> (length l) >= a) (\x -> x ++ [((last x) + 1)]) [1] ```
403,613
I'm on 12.04LTS. I have an external USB HD cam that I run as default (preferably). To do this, after every reboot I have to run ``` sudo su -c 'echo "0" > /sys/bus/usb/devices/1-1.4/bConfigurationValue' ``` (1-1.4 is my laptop cam) This disables my laptop cam. Then in GUVCview I get: ![screenshot](https://i.stack...
2014/01/10
[ "https://askubuntu.com/questions/403613", "https://askubuntu.com", "https://askubuntu.com/users/192473/" ]
Boot from the live CD and see if you can make a connection that way. If wireless does work via the live CD, then you can try reconfiguring your network, or just copying over the network-manager config files: * Re-configuring the network: [Open a terminal](https://askubuntu.com/questions/183775/how-do-i-open-a-termin...
Not sure if it works but you can try connecting through `Connect to a hidden Wi-Fi Network...` under the Network applet menu. Even if the connection is not hidden but you can connect to a specific Wi-Fi network. I tried this method with my wifi which is not hidden and it worked.
403,613
I'm on 12.04LTS. I have an external USB HD cam that I run as default (preferably). To do this, after every reboot I have to run ``` sudo su -c 'echo "0" > /sys/bus/usb/devices/1-1.4/bConfigurationValue' ``` (1-1.4 is my laptop cam) This disables my laptop cam. Then in GUVCview I get: ![screenshot](https://i.stack...
2014/01/10
[ "https://askubuntu.com/questions/403613", "https://askubuntu.com", "https://askubuntu.com/users/192473/" ]
You could just try to manually add it. Go under your internet and click "edit connections" and add a server from there manually. Note you have to know the server's name and password in order to add it.
Not sure if it works but you can try connecting through `Connect to a hidden Wi-Fi Network...` under the Network applet menu. Even if the connection is not hidden but you can connect to a specific Wi-Fi network. I tried this method with my wifi which is not hidden and it worked.
403,613
I'm on 12.04LTS. I have an external USB HD cam that I run as default (preferably). To do this, after every reboot I have to run ``` sudo su -c 'echo "0" > /sys/bus/usb/devices/1-1.4/bConfigurationValue' ``` (1-1.4 is my laptop cam) This disables my laptop cam. Then in GUVCview I get: ![screenshot](https://i.stack...
2014/01/10
[ "https://askubuntu.com/questions/403613", "https://askubuntu.com", "https://askubuntu.com/users/192473/" ]
Boot from the live CD and see if you can make a connection that way. If wireless does work via the live CD, then you can try reconfiguring your network, or just copying over the network-manager config files: * Re-configuring the network: [Open a terminal](https://askubuntu.com/questions/183775/how-do-i-open-a-termin...
Install ndiswrapper ``` sudo install ndiswrapper-common ndiswrapper-modules-1.9 ndiswrapper-utils-1.9 ``` Install the WiFi driver (from Windows): ``` sudo ndiswrapper -i yourdriver.inf ``` Check the driver is working: ``` sudo ndiswrapper -l ``` Load the module: ``` sudo depmod -a sudo modprobe ndiswrapper ...
403,613
I'm on 12.04LTS. I have an external USB HD cam that I run as default (preferably). To do this, after every reboot I have to run ``` sudo su -c 'echo "0" > /sys/bus/usb/devices/1-1.4/bConfigurationValue' ``` (1-1.4 is my laptop cam) This disables my laptop cam. Then in GUVCview I get: ![screenshot](https://i.stack...
2014/01/10
[ "https://askubuntu.com/questions/403613", "https://askubuntu.com", "https://askubuntu.com/users/192473/" ]
You could just try to manually add it. Go under your internet and click "edit connections" and add a server from there manually. Note you have to know the server's name and password in order to add it.
Install ndiswrapper ``` sudo install ndiswrapper-common ndiswrapper-modules-1.9 ndiswrapper-utils-1.9 ``` Install the WiFi driver (from Windows): ``` sudo ndiswrapper -i yourdriver.inf ``` Check the driver is working: ``` sudo ndiswrapper -l ``` Load the module: ``` sudo depmod -a sudo modprobe ndiswrapper ...
403,613
I'm on 12.04LTS. I have an external USB HD cam that I run as default (preferably). To do this, after every reboot I have to run ``` sudo su -c 'echo "0" > /sys/bus/usb/devices/1-1.4/bConfigurationValue' ``` (1-1.4 is my laptop cam) This disables my laptop cam. Then in GUVCview I get: ![screenshot](https://i.stack...
2014/01/10
[ "https://askubuntu.com/questions/403613", "https://askubuntu.com", "https://askubuntu.com/users/192473/" ]
Boot from the live CD and see if you can make a connection that way. If wireless does work via the live CD, then you can try reconfiguring your network, or just copying over the network-manager config files: * Re-configuring the network: [Open a terminal](https://askubuntu.com/questions/183775/how-do-i-open-a-termin...
Wireless drivers are updated from kernel to kernel, version to version - I remember 9.04 had poor support compared to 10.x and newer, for example. You may need to install/upgrade 13.10 (or 14.04 in a couple months) and make sure you have the latest updates installed, for best support - especially if it's a newer lapto...
403,613
I'm on 12.04LTS. I have an external USB HD cam that I run as default (preferably). To do this, after every reboot I have to run ``` sudo su -c 'echo "0" > /sys/bus/usb/devices/1-1.4/bConfigurationValue' ``` (1-1.4 is my laptop cam) This disables my laptop cam. Then in GUVCview I get: ![screenshot](https://i.stack...
2014/01/10
[ "https://askubuntu.com/questions/403613", "https://askubuntu.com", "https://askubuntu.com/users/192473/" ]
You could just try to manually add it. Go under your internet and click "edit connections" and add a server from there manually. Note you have to know the server's name and password in order to add it.
Wireless drivers are updated from kernel to kernel, version to version - I remember 9.04 had poor support compared to 10.x and newer, for example. You may need to install/upgrade 13.10 (or 14.04 in a couple months) and make sure you have the latest updates installed, for best support - especially if it's a newer lapto...
77,050
I hit the edge of a cone yesterday when biking and had a pretty hard fall. Was looking at my bike to see what damage it took. Saw this crack on the rim, is this something really serious that I should be worried about? Last thing I want is to take another hard fall This is the bike I have. <https://archive.fujibikes.co...
2021/05/27
[ "https://bicycles.stackexchange.com/questions/77050", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/57002/" ]
It may be worth glancing at [this more detailed answer](https://bicycles.stackexchange.com/questions/64829/what-is-this-aluminum-plate-that-started-rattling-inside-my-ksyrium-rims/64832#64832) that discussed how aluminum rims were constructed. But in brief, aluminum rims are first extruded in a flat bar, then they’re c...
I suspect the rim will be just fine based on your description. A cone is presumably an orange plastic road cone, which are fairly soft and squishy. You as the rider had a hard fall, but the bike's wheel rim was already on the ground, and probably did not take much of an impact. As long as the brake track is still fl...
77,050
I hit the edge of a cone yesterday when biking and had a pretty hard fall. Was looking at my bike to see what damage it took. Saw this crack on the rim, is this something really serious that I should be worried about? Last thing I want is to take another hard fall This is the bike I have. <https://archive.fujibikes.co...
2021/05/27
[ "https://bicycles.stackexchange.com/questions/77050", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/57002/" ]
It may be worth glancing at [this more detailed answer](https://bicycles.stackexchange.com/questions/64829/what-is-this-aluminum-plate-that-started-rattling-inside-my-ksyrium-rims/64832#64832) that discussed how aluminum rims were constructed. But in brief, aluminum rims are first extruded in a flat bar, then they’re c...
This is a seam from where the rim was manufactured. You are safe. There is no possible way a crack would be perfectly straight. Check other rims ( even new ones ) and you will see this seam.
77,050
I hit the edge of a cone yesterday when biking and had a pretty hard fall. Was looking at my bike to see what damage it took. Saw this crack on the rim, is this something really serious that I should be worried about? Last thing I want is to take another hard fall This is the bike I have. <https://archive.fujibikes.co...
2021/05/27
[ "https://bicycles.stackexchange.com/questions/77050", "https://bicycles.stackexchange.com", "https://bicycles.stackexchange.com/users/57002/" ]
I suspect the rim will be just fine based on your description. A cone is presumably an orange plastic road cone, which are fairly soft and squishy. You as the rider had a hard fall, but the bike's wheel rim was already on the ground, and probably did not take much of an impact. As long as the brake track is still fl...
This is a seam from where the rim was manufactured. You are safe. There is no possible way a crack would be perfectly straight. Check other rims ( even new ones ) and you will see this seam.
59,395,080
I got a method which receives 2 parameters: ``` function func(param1, param2){... ``` I got a React component which receives a function as a parameter and it has the information about the 2nd parameter, and I want to set the first parameter in this case as a constant. What I'm doing is: ``` let myFuncToPass = func...
2019/12/18
[ "https://Stackoverflow.com/questions/59395080", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1164004/" ]
There's some confusion in your code. You can properly use Javafx in the version 2 of Graphstream, but in this version, you can't do ``` Viewer viewer = new Viewer(graph, Viewer.ThreadingModel.GRAPH_IN_GUI_THREAD); ``` because Viewer became an abstract class as you can see [here](https://github.com/graphstream/gs-co...
**Important Note:** If you want to use Maven to import the needed libraries (highly recommended) you need to first import the jitpack.io repository to maven.
109,348
In the puzzle game [Pipes](https://www.puzzle-pipes.com/), a space-filling [tree](https://en.wikipedia.org/wiki/Tree_(graph_theory)) of pipes (which may have either one, two, or three neighboring connections each, but not four) is scrambled by a series of tile rotations, and the goal is to reconstruct the solution. To ...
2021/04/09
[ "https://puzzling.stackexchange.com/questions/109348", "https://puzzling.stackexchange.com", "https://puzzling.stackexchange.com/users/10562/" ]
**Answer to the "more difficult" question:** -------------------------------------------- I claim that > > yes, it is possible > > > and here's why: > > [![enter image description here](https://i.stack.imgur.com/uS5Cl.png)](https://i.stack.imgur.com/uS5Cl.png) > > Here are two solutions to a Pipes puzzle...
Here’s a solution that has only some non-unique pipes. My strategy is having that sort of outer parity loop, and filling in the middle in any way. This can be made for any odd square, and I believe the inner fill for a 5x5 is impossible using this strategy. Wouldn’t be shocked if you could do something similar with a 6...
54,689,111
I want 2 dropdown lists: 1. university 2. college If someone select the university according to that college name is shown to the user in second dropdown list and One more thing both university and college name are stored in one table like ```none id,University_name,College_name ``` and we have fetch data from th...
2019/02/14
[ "https://Stackoverflow.com/questions/54689111", "https://Stackoverflow.com", "https://Stackoverflow.com/users/11016263/" ]
> > Are the messages getting buffered somewhere? > > > Yes, when resource alarm is set, messages will be published into network buffers. * Tiny messages will take some time to fill up Network buffer and then block publishers. * Less network buffer size will block publishers soon.
It's better to ask questions about the behavior of RabbitMQ itself (and the Java client that Spring uses) on the rabbitmq-users Google group; that's where the RabbitMQ engineers hang out. > > (2) Spring Cloud Stream document says below. Does it mean the above behaviour? > > > That change was made so that if prod...
35,714,070
I'm trying to select the positions of some value and print the parts of that value by position in java when I'm working on android app. for example if I have some number four-digit, 4375 if I select the 3rd one system will print 7, 4th one system will print 5..
2016/03/01
[ "https://Stackoverflow.com/questions/35714070", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4273929/" ]
Use a countif, if it's greater than zero then you know it exists in the list: ``` If Application.WorksheetFunction.CountIf(Sheets("Sheet1").Range("NamedRange"), Sheets("Sheet2").Cells(i, 2).Value) > 0 Then Sheets("Sheet2").Cells(i, 2).EntireRow.Delete End If ```
Here is how you can achieve it in just one line ``` If Not IsError(Application.Match(ValueToSearchFor, RangeToSearchIn, 0)) Then // Value found End If ``` **Example:** Search for Blah-Blah in column A of Sheet5 ``` If Not IsError(Application.Match("Blah-Blah", Sheets("Sheet5").Range("A:A"), 0)) Then 'The value p...
333,798
When I am viewing a question, and it has been closed, this message will pop up: > > This question has been closed - no more answers will be accepted. > > > What it actually means is that I can't post an answer anymore. But don't you think the word `accepted` is ambiguous? "no more answers will be accepted" can al...
2016/09/03
[ "https://meta.stackoverflow.com/questions/333798", "https://meta.stackoverflow.com", "https://meta.stackoverflow.com/users/5133585/" ]
Yes, *"accepted"* is ambiguous. Virtually any of the commentators' proposed replacements would be better. Suggested rewording: > > This question has been closed -- answers cannot be added to closed questions. > > > Or, more curtly: > > Question closed: answers can't be added. > > > Note: the word "*more*" i...
During the downtime a few moments ago, SE told me "This site is currently not accepting new answers." Seemed like good phrasing. Maybe we should use that here, too? > > This question has been closed - no new answers may be posted. > > >
4,807,152
Let's say I want to sent an int parameter to a background worker, how can this be accomplished? ``` private void worker_DoWork(object sender, DoWorkEventArgs e) { } ``` I know when this is worker.RunWorkerAsync();, I don't understand how to define in worker\_DoWork that it should take an int parameter.
2011/01/26
[ "https://Stackoverflow.com/questions/4807152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/281671/" ]
you can try this out if you want to pass more than one type of arguments, first add them all to an array of type Object and pass that object to RunWorkerAsync() here is an example : ``` some_Method(){ List<string> excludeList = new List<string>(); // list of strings string newPath ="some path"; // normal str...
You should always try to use a composite object with concrete types (using composite design pattern) rather than a list of object types. Who would remember what the heck each of those objects is? Think about maintenance of your code later on... Instead, try something like this: ``` Public (Class or Structure) MyPerson...
4,807,152
Let's say I want to sent an int parameter to a background worker, how can this be accomplished? ``` private void worker_DoWork(object sender, DoWorkEventArgs e) { } ``` I know when this is worker.RunWorkerAsync();, I don't understand how to define in worker\_DoWork that it should take an int parameter.
2011/01/26
[ "https://Stackoverflow.com/questions/4807152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/281671/" ]
You start it like this: ``` int value = 123; bgw1.RunWorkerAsync(argument: value); // the int will be boxed ``` and then ``` private void worker_DoWork(object sender, DoWorkEventArgs e) { int value = (int) e.Argument; // the 'argument' parameter resurfaces here ... // and to transport a result back ...
Check out the [DoWorkEventArgs.Argument Property](http://msdn.microsoft.com/en-us/library/system.componentmodel.doworkeventargs.argument%28VS.90%29.aspx): ``` ... backgroundWorker1.RunWorkerAsync(yourInt); ... private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { // Do not access the form's Ba...
4,807,152
Let's say I want to sent an int parameter to a background worker, how can this be accomplished? ``` private void worker_DoWork(object sender, DoWorkEventArgs e) { } ``` I know when this is worker.RunWorkerAsync();, I don't understand how to define in worker\_DoWork that it should take an int parameter.
2011/01/26
[ "https://Stackoverflow.com/questions/4807152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/281671/" ]
Even though this is an already answered question, I'd leave another option that IMO is a lot easier to read: ``` BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += (obj, e) => WorkerDoWork(value, text); worker.RunWorkerAsync(); ``` And on the handler method: ``` private void WorkerDoWork(int value, ...
you can try this out if you want to pass more than one type of arguments, first add them all to an array of type Object and pass that object to RunWorkerAsync() here is an example : ``` some_Method(){ List<string> excludeList = new List<string>(); // list of strings string newPath ="some path"; // normal str...
4,807,152
Let's say I want to sent an int parameter to a background worker, how can this be accomplished? ``` private void worker_DoWork(object sender, DoWorkEventArgs e) { } ``` I know when this is worker.RunWorkerAsync();, I don't understand how to define in worker\_DoWork that it should take an int parameter.
2011/01/26
[ "https://Stackoverflow.com/questions/4807152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/281671/" ]
Even though this is an already answered question, I'd leave another option that IMO is a lot easier to read: ``` BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += (obj, e) => WorkerDoWork(value, text); worker.RunWorkerAsync(); ``` And on the handler method: ``` private void WorkerDoWork(int value, ...
You need [RunWorkerAsync(object)](http://msdn.microsoft.com/en-us/library/f00zz5b2.aspx) method and [DoWorkEventArgs.Argument](http://msdn.microsoft.com/en-us/library/system.componentmodel.doworkeventargs.argument.aspx) property. ``` worker.RunWorkerAsync(5); private void worker_DoWork(object sender, DoWorkEventArgs ...
4,807,152
Let's say I want to sent an int parameter to a background worker, how can this be accomplished? ``` private void worker_DoWork(object sender, DoWorkEventArgs e) { } ``` I know when this is worker.RunWorkerAsync();, I don't understand how to define in worker\_DoWork that it should take an int parameter.
2011/01/26
[ "https://Stackoverflow.com/questions/4807152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/281671/" ]
You start it like this: ``` int value = 123; bgw1.RunWorkerAsync(argument: value); // the int will be boxed ``` and then ``` private void worker_DoWork(object sender, DoWorkEventArgs e) { int value = (int) e.Argument; // the 'argument' parameter resurfaces here ... // and to transport a result back ...
You need [RunWorkerAsync(object)](http://msdn.microsoft.com/en-us/library/f00zz5b2.aspx) method and [DoWorkEventArgs.Argument](http://msdn.microsoft.com/en-us/library/system.componentmodel.doworkeventargs.argument.aspx) property. ``` worker.RunWorkerAsync(5); private void worker_DoWork(object sender, DoWorkEventArgs ...
4,807,152
Let's say I want to sent an int parameter to a background worker, how can this be accomplished? ``` private void worker_DoWork(object sender, DoWorkEventArgs e) { } ``` I know when this is worker.RunWorkerAsync();, I don't understand how to define in worker\_DoWork that it should take an int parameter.
2011/01/26
[ "https://Stackoverflow.com/questions/4807152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/281671/" ]
You start it like this: ``` int value = 123; bgw1.RunWorkerAsync(argument: value); // the int will be boxed ``` and then ``` private void worker_DoWork(object sender, DoWorkEventArgs e) { int value = (int) e.Argument; // the 'argument' parameter resurfaces here ... // and to transport a result back ...
You can use the `DoWorkEventArgs.Argument` property. A full example (even using an int argument) can be found on Microsoft's site: * [How to: Run an Operation in the Background](http://msdn.microsoft.com/en-us/library/hybbz6ke.aspx)
4,807,152
Let's say I want to sent an int parameter to a background worker, how can this be accomplished? ``` private void worker_DoWork(object sender, DoWorkEventArgs e) { } ``` I know when this is worker.RunWorkerAsync();, I don't understand how to define in worker\_DoWork that it should take an int parameter.
2011/01/26
[ "https://Stackoverflow.com/questions/4807152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/281671/" ]
Even though this is an already answered question, I'd leave another option that IMO is a lot easier to read: ``` BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += (obj, e) => WorkerDoWork(value, text); worker.RunWorkerAsync(); ``` And on the handler method: ``` private void WorkerDoWork(int value, ...
You should always try to use a composite object with concrete types (using composite design pattern) rather than a list of object types. Who would remember what the heck each of those objects is? Think about maintenance of your code later on... Instead, try something like this: ``` Public (Class or Structure) MyPerson...
4,807,152
Let's say I want to sent an int parameter to a background worker, how can this be accomplished? ``` private void worker_DoWork(object sender, DoWorkEventArgs e) { } ``` I know when this is worker.RunWorkerAsync();, I don't understand how to define in worker\_DoWork that it should take an int parameter.
2011/01/26
[ "https://Stackoverflow.com/questions/4807152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/281671/" ]
You need [RunWorkerAsync(object)](http://msdn.microsoft.com/en-us/library/f00zz5b2.aspx) method and [DoWorkEventArgs.Argument](http://msdn.microsoft.com/en-us/library/system.componentmodel.doworkeventargs.argument.aspx) property. ``` worker.RunWorkerAsync(5); private void worker_DoWork(object sender, DoWorkEventArgs ...
You should always try to use a composite object with concrete types (using composite design pattern) rather than a list of object types. Who would remember what the heck each of those objects is? Think about maintenance of your code later on... Instead, try something like this: ``` Public (Class or Structure) MyPerson...
4,807,152
Let's say I want to sent an int parameter to a background worker, how can this be accomplished? ``` private void worker_DoWork(object sender, DoWorkEventArgs e) { } ``` I know when this is worker.RunWorkerAsync();, I don't understand how to define in worker\_DoWork that it should take an int parameter.
2011/01/26
[ "https://Stackoverflow.com/questions/4807152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/281671/" ]
You start it like this: ``` int value = 123; bgw1.RunWorkerAsync(argument: value); // the int will be boxed ``` and then ``` private void worker_DoWork(object sender, DoWorkEventArgs e) { int value = (int) e.Argument; // the 'argument' parameter resurfaces here ... // and to transport a result back ...
You can pass multiple arguments like this. ``` List<object> arguments = new List<object>(); arguments.Add("first"); //argument 1 arguments.Add(new Object()); //argument 2 // ... arguments.Add(10); //argument n backgroundWorker.RunWorkerAsync(arguments); private void worker_DoWork(object sender, DoWork...
4,807,152
Let's say I want to sent an int parameter to a background worker, how can this be accomplished? ``` private void worker_DoWork(object sender, DoWorkEventArgs e) { } ``` I know when this is worker.RunWorkerAsync();, I don't understand how to define in worker\_DoWork that it should take an int parameter.
2011/01/26
[ "https://Stackoverflow.com/questions/4807152", "https://Stackoverflow.com", "https://Stackoverflow.com/users/281671/" ]
Even though this is an already answered question, I'd leave another option that IMO is a lot easier to read: ``` BackgroundWorker worker = new BackgroundWorker(); worker.DoWork += (obj, e) => WorkerDoWork(value, text); worker.RunWorkerAsync(); ``` And on the handler method: ``` private void WorkerDoWork(int value, ...
Check out the [DoWorkEventArgs.Argument Property](http://msdn.microsoft.com/en-us/library/system.componentmodel.doworkeventargs.argument%28VS.90%29.aspx): ``` ... backgroundWorker1.RunWorkerAsync(yourInt); ... private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e) { // Do not access the form's Ba...
25,682,963
I'm trying to mimic Windows 8 sidescrolling and multiple column layout using CSS3 columns, but I want columns to have a fixed width, or as I'm doing in [my fiddle](http://jsfiddle.net/noquierouser/u0u6k5ke/5/), viewport width. Now, no matter what kind of unit I use, it seems columns auto-fit themselves into the contai...
2014/09/05
[ "https://Stackoverflow.com/questions/25682963", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1061340/" ]
The timer works so that `TON.Q` goes high only if `TON.IN` is continuously high for at least the duration of `TON.PT`. This makes sure that `TON.Q` only goes high if `TON.IN` is in a stable high state. This could be useful for instance to ensure that the output is only enabled if a button is pressed for at least a du...
We also have built our own timer structure with using milliseconds counter provided by PLC, so we could make arrays of timer (Schneider Electric) when we need and exceed PLC limitation. ``` TTIMER Count: UINT timclock :INT OUT :BOOL IN: BOOL END_STRUCT; TIM_SOD=ARRAY[0..1] OF TTIMER; (*This part runs every cy...