qid
int64
1
74.7M
question
stringlengths
0
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
2
48.3k
response_k
stringlengths
2
40.5k
35,387,137
I messed up badly my code and I want to revert it to the last commit. I'm doing `git status` and I see that I changed a lot of files. I don't want to see them at all. So I did `git log` and found out the hash of last commit. I used this hash in command: `git fetch origin this_hash` and got the message: ``` Mig-macb...
2016/02/14
[ "https://Stackoverflow.com/questions/35387137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3766930/" ]
`git fetch` just fetches more commits from a remote; it doesn't touch the working directory. You want `git checkout <commit-reference>`, which will check out that version into the working directory.
You have several options to do it: Read here all about the several ways how to do it: [How to move HEAD back to a previous location? (Detached head)](https://stackoverflow.com/questions/34519665/how-to-move-head-checkout-revert-reflog-reset/34519716#34519716)
35,387,137
I messed up badly my code and I want to revert it to the last commit. I'm doing `git status` and I see that I changed a lot of files. I don't want to see them at all. So I did `git log` and found out the hash of last commit. I used this hash in command: `git fetch origin this_hash` and got the message: ``` Mig-macb...
2016/02/14
[ "https://Stackoverflow.com/questions/35387137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3766930/" ]
If you see all the files when running `git status`, that means you have a lot of local changes that are **not** committed. If you are sure you want to get rid of those changes, run `git reset --hard head`.
You have several options to do it: Read here all about the several ways how to do it: [How to move HEAD back to a previous location? (Detached head)](https://stackoverflow.com/questions/34519665/how-to-move-head-checkout-revert-reflog-reset/34519716#34519716)
8,316,829
I have two applications written in C that include the same header. In this header I have the declaration of a struct. I use the GCC compiler to compile both applications. When I execute both applications, they produce different values of `sizeof(struct-defined-in-the-header)`. Why does this happen?
2011/11/29
[ "https://Stackoverflow.com/questions/8316829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1071901/" ]
First of all, make sure to do a clean build of everything. If the problem persists, this could mean that different compilation options have been used for the two translation units. I would capture the `gcc` command lines used for the two compilations, and would compare them, paying particular attention to any options ...
`sizeof` is **not** a function. It is a compile-time operator. You don't tell what header is giving you trouble. A possible guess might be that some obscure preprocessor trick is removing some field in it, or changing the real type of the field. For example, imagine that one header `foo.h` has ``` // in file foo.h ...
8,316,829
I have two applications written in C that include the same header. In this header I have the declaration of a struct. I use the GCC compiler to compile both applications. When I execute both applications, they produce different values of `sizeof(struct-defined-in-the-header)`. Why does this happen?
2011/11/29
[ "https://Stackoverflow.com/questions/8316829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1071901/" ]
First of all, make sure to do a clean build of everything. If the problem persists, this could mean that different compilation options have been used for the two translation units. I would capture the `gcc` command lines used for the two compilations, and would compare them, paying particular attention to any options ...
I use Eclipse to compile the programs. I checked flags of compilation. Look: ``` gcc -I/lib-header-directory-with-struct -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"program-a.d" -MT"program-a.d" -o"program-a.o" "../program-a.c" gcc -I/lib-header-directory-with-struct -O0 -g3 -Wall -c -fmessage-length=0 -...
8,316,829
I have two applications written in C that include the same header. In this header I have the declaration of a struct. I use the GCC compiler to compile both applications. When I execute both applications, they produce different values of `sizeof(struct-defined-in-the-header)`. Why does this happen?
2011/11/29
[ "https://Stackoverflow.com/questions/8316829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1071901/" ]
First of all, make sure to do a clean build of everything. If the problem persists, this could mean that different compilation options have been used for the two translation units. I would capture the `gcc` command lines used for the two compilations, and would compare them, paying particular attention to any options ...
As Doc Brown commented, there are several possibilities. You should show the code. Here's another guess, though. Maybe another variable is shadowing your `struct` in one of the cases? Like in: ``` extern struct { char foo; } bar; void baz(void) { long bar; sizeof bar; /* will be sizeof(long) */ } void qux(...
8,316,829
I have two applications written in C that include the same header. In this header I have the declaration of a struct. I use the GCC compiler to compile both applications. When I execute both applications, they produce different values of `sizeof(struct-defined-in-the-header)`. Why does this happen?
2011/11/29
[ "https://Stackoverflow.com/questions/8316829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1071901/" ]
First of all, make sure to do a clean build of everything. If the problem persists, this could mean that different compilation options have been used for the two translation units. I would capture the `gcc` command lines used for the two compilations, and would compare them, paying particular attention to any options ...
In my case it wasn't gcc and it was single application, but there were different results of sizeof(MyStruct) in different .c files. The reason was in different packing values for structures, because those .c files had included different sets of .h files before including header with declaration of MyStruct. The solution...
8,316,829
I have two applications written in C that include the same header. In this header I have the declaration of a struct. I use the GCC compiler to compile both applications. When I execute both applications, they produce different values of `sizeof(struct-defined-in-the-header)`. Why does this happen?
2011/11/29
[ "https://Stackoverflow.com/questions/8316829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1071901/" ]
In my case it wasn't gcc and it was single application, but there were different results of sizeof(MyStruct) in different .c files. The reason was in different packing values for structures, because those .c files had included different sets of .h files before including header with declaration of MyStruct. The solution...
`sizeof` is **not** a function. It is a compile-time operator. You don't tell what header is giving you trouble. A possible guess might be that some obscure preprocessor trick is removing some field in it, or changing the real type of the field. For example, imagine that one header `foo.h` has ``` // in file foo.h ...
8,316,829
I have two applications written in C that include the same header. In this header I have the declaration of a struct. I use the GCC compiler to compile both applications. When I execute both applications, they produce different values of `sizeof(struct-defined-in-the-header)`. Why does this happen?
2011/11/29
[ "https://Stackoverflow.com/questions/8316829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1071901/" ]
In my case it wasn't gcc and it was single application, but there were different results of sizeof(MyStruct) in different .c files. The reason was in different packing values for structures, because those .c files had included different sets of .h files before including header with declaration of MyStruct. The solution...
I use Eclipse to compile the programs. I checked flags of compilation. Look: ``` gcc -I/lib-header-directory-with-struct -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"program-a.d" -MT"program-a.d" -o"program-a.o" "../program-a.c" gcc -I/lib-header-directory-with-struct -O0 -g3 -Wall -c -fmessage-length=0 -...
8,316,829
I have two applications written in C that include the same header. In this header I have the declaration of a struct. I use the GCC compiler to compile both applications. When I execute both applications, they produce different values of `sizeof(struct-defined-in-the-header)`. Why does this happen?
2011/11/29
[ "https://Stackoverflow.com/questions/8316829", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1071901/" ]
In my case it wasn't gcc and it was single application, but there were different results of sizeof(MyStruct) in different .c files. The reason was in different packing values for structures, because those .c files had included different sets of .h files before including header with declaration of MyStruct. The solution...
As Doc Brown commented, there are several possibilities. You should show the code. Here's another guess, though. Maybe another variable is shadowing your `struct` in one of the cases? Like in: ``` extern struct { char foo; } bar; void baz(void) { long bar; sizeof bar; /* will be sizeof(long) */ } void qux(...
19,708,440
I'm creating a box containing some image links, and currently I've got something that looks great on Chrome and Safari, but wraps at Firefox's default zoom level. Zooming in makes the box look fine, but at the normal zoom level they're wrapped. Here's what it looks like normally, on Chrome: ![Chrome screenshot](https:...
2013/10/31
[ "https://Stackoverflow.com/questions/19708440", "https://Stackoverflow.com", "https://Stackoverflow.com/users/49128/" ]
Try this: ``` git pull-request -b org:master -h org:feature ``` --- Gift wrapped for `.bashrc` ``` function pull_request() { BASE="${1:-master}" HEAD=`git rev-parse --abbrev-ref HEAD` ORG=org hub pull-request -b ${ORG}:${BASE} -h ${ORG}:${HEAD} } ```
Have you tried `git request-pull origin/master develop`?
18,641,899
What is the fundamental difference between `bower` and `npm`? Just want something plain and simple. I've seen some of my colleagues use `bower` and `npm` interchangeably in their projects.
2013/09/05
[ "https://Stackoverflow.com/questions/18641899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1624921/" ]
This answer is an addition to the answer of Sindre Sorhus. The major difference between npm and Bower is the way they treat recursive dependencies. Note that they can be used together in a single project. **On the [npm FAQ](https://web.archive.org/web/20150906022540/https://docs.npmjs.com/misc/faq#why-can-t-npm-just-p...
2017-Oct update --------------- Bower has finally been [deprecated](https://bower.io/blog/2017/how-to-migrate-away-from-bower/). End of story. Older answer ------------ [From Mattias Petter Johansson, JavaScript developer at Spotify](https://www.quora.com/Why-use-Bower-when-there-is-npm/answer/Mattias-Petter-Johanss...
18,641,899
What is the fundamental difference between `bower` and `npm`? Just want something plain and simple. I've seen some of my colleagues use `bower` and `npm` interchangeably in their projects.
2013/09/05
[ "https://Stackoverflow.com/questions/18641899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1624921/" ]
2017-Oct update --------------- Bower has finally been [deprecated](https://bower.io/blog/2017/how-to-migrate-away-from-bower/). End of story. Older answer ------------ [From Mattias Petter Johansson, JavaScript developer at Spotify](https://www.quora.com/Why-use-Bower-when-there-is-npm/answer/Mattias-Petter-Johanss...
Bower maintains a single version of modules, it only tries to help you select the correct/best one for you. > > [Javascript dependency management : npm vs bower vs volo?](https://stackoverflow.com/questions/15092345/javascript-dependency-management-npm-vs-bower-vs-volo/22101165#22101165) > > > NPM is better for n...
18,641,899
What is the fundamental difference between `bower` and `npm`? Just want something plain and simple. I've seen some of my colleagues use `bower` and `npm` interchangeably in their projects.
2013/09/05
[ "https://Stackoverflow.com/questions/18641899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1624921/" ]
2017-Oct update --------------- Bower has finally been [deprecated](https://bower.io/blog/2017/how-to-migrate-away-from-bower/). End of story. Older answer ------------ [From Mattias Petter Johansson, JavaScript developer at Spotify](https://www.quora.com/Why-use-Bower-when-there-is-npm/answer/Mattias-Petter-Johanss...
Found this useful explanation from <http://ng-learn.org/2013/11/Bower-vs-npm/> > > On one hand npm was created to install modules used in a node.js environment, or development tools built using node.js such Karma, lint, minifiers and so on. npm can install modules locally in a project ( by default in node\_modules ) ...
18,641,899
What is the fundamental difference between `bower` and `npm`? Just want something plain and simple. I've seen some of my colleagues use `bower` and `npm` interchangeably in their projects.
2013/09/05
[ "https://Stackoverflow.com/questions/18641899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1624921/" ]
**TL;DR: The biggest difference in everyday use isn't nested dependencies... it's the difference between modules and globals.** I think the previous posters have covered well some of the basic distinctions. (npm's use of nested dependencies is indeed very helpful in managing large, complex applications, though I don't...
Found this useful explanation from <http://ng-learn.org/2013/11/Bower-vs-npm/> > > On one hand npm was created to install modules used in a node.js environment, or development tools built using node.js such Karma, lint, minifiers and so on. npm can install modules locally in a project ( by default in node\_modules ) ...
18,641,899
What is the fundamental difference between `bower` and `npm`? Just want something plain and simple. I've seen some of my colleagues use `bower` and `npm` interchangeably in their projects.
2013/09/05
[ "https://Stackoverflow.com/questions/18641899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1624921/" ]
All package managers have many downsides. You just have to pick which you can live with. History ------- [npm](https://www.npmjs.org) started out managing node.js modules (that's why packages go into `node_modules` by default), but it works for the front-end too when combined with [Browserify](http://browserify.org/)...
**TL;DR: The biggest difference in everyday use isn't nested dependencies... it's the difference between modules and globals.** I think the previous posters have covered well some of the basic distinctions. (npm's use of nested dependencies is indeed very helpful in managing large, complex applications, though I don't...
18,641,899
What is the fundamental difference between `bower` and `npm`? Just want something plain and simple. I've seen some of my colleagues use `bower` and `npm` interchangeably in their projects.
2013/09/05
[ "https://Stackoverflow.com/questions/18641899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1624921/" ]
This answer is an addition to the answer of Sindre Sorhus. The major difference between npm and Bower is the way they treat recursive dependencies. Note that they can be used together in a single project. **On the [npm FAQ](https://web.archive.org/web/20150906022540/https://docs.npmjs.com/misc/faq#why-can-t-npm-just-p...
Found this useful explanation from <http://ng-learn.org/2013/11/Bower-vs-npm/> > > On one hand npm was created to install modules used in a node.js environment, or development tools built using node.js such Karma, lint, minifiers and so on. npm can install modules locally in a project ( by default in node\_modules ) ...
18,641,899
What is the fundamental difference between `bower` and `npm`? Just want something plain and simple. I've seen some of my colleagues use `bower` and `npm` interchangeably in their projects.
2013/09/05
[ "https://Stackoverflow.com/questions/18641899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1624921/" ]
All package managers have many downsides. You just have to pick which you can live with. History ------- [npm](https://www.npmjs.org) started out managing node.js modules (that's why packages go into `node_modules` by default), but it works for the front-end too when combined with [Browserify](http://browserify.org/)...
For many people working with node.js, a major benefit of bower is for managing dependencies that are not javascript at all. If they are working with languages that compile to javascript, npm can be used to manage some of their dependencies. however, not all their dependencies are going to be node.js modules. Some of th...
18,641,899
What is the fundamental difference between `bower` and `npm`? Just want something plain and simple. I've seen some of my colleagues use `bower` and `npm` interchangeably in their projects.
2013/09/05
[ "https://Stackoverflow.com/questions/18641899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1624921/" ]
**TL;DR: The biggest difference in everyday use isn't nested dependencies... it's the difference between modules and globals.** I think the previous posters have covered well some of the basic distinctions. (npm's use of nested dependencies is indeed very helpful in managing large, complex applications, though I don't...
2017-Oct update --------------- Bower has finally been [deprecated](https://bower.io/blog/2017/how-to-migrate-away-from-bower/). End of story. Older answer ------------ [From Mattias Petter Johansson, JavaScript developer at Spotify](https://www.quora.com/Why-use-Bower-when-there-is-npm/answer/Mattias-Petter-Johanss...
18,641,899
What is the fundamental difference between `bower` and `npm`? Just want something plain and simple. I've seen some of my colleagues use `bower` and `npm` interchangeably in their projects.
2013/09/05
[ "https://Stackoverflow.com/questions/18641899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1624921/" ]
Bower maintains a single version of modules, it only tries to help you select the correct/best one for you. > > [Javascript dependency management : npm vs bower vs volo?](https://stackoverflow.com/questions/15092345/javascript-dependency-management-npm-vs-bower-vs-volo/22101165#22101165) > > > NPM is better for n...
My team moved away from Bower and migrated to npm because: * Programmatic usage was painful * Bower's interface kept changing * Some features, like the url shorthand, are entirely broken * Using both Bower and npm in the same project is painful * Keeping bower.json version field in sync with git tags is painful * Sour...
18,641,899
What is the fundamental difference between `bower` and `npm`? Just want something plain and simple. I've seen some of my colleagues use `bower` and `npm` interchangeably in their projects.
2013/09/05
[ "https://Stackoverflow.com/questions/18641899", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1624921/" ]
My team moved away from Bower and migrated to npm because: * Programmatic usage was painful * Bower's interface kept changing * Some features, like the url shorthand, are entirely broken * Using both Bower and npm in the same project is painful * Keeping bower.json version field in sync with git tags is painful * Sour...
For many people working with node.js, a major benefit of bower is for managing dependencies that are not javascript at all. If they are working with languages that compile to javascript, npm can be used to manage some of their dependencies. however, not all their dependencies are going to be node.js modules. Some of th...
25,584,626
I'm trying to write a Owin midleware component that would LOG every incoming request and response to the database. Here's how far I managed to get. I got stuck on reading the response.body. Says: > > Stream does not support reading. > > > How can I read the Response.Body ? ``` public class LoggingMiddlewar...
2014/08/30
[ "https://Stackoverflow.com/questions/25584626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/444149/" ]
Response body is a write-only network stream by default for Katana hosts. You will need to replace it with a `MemoryStream`, read the stream, log the content and then copy the memory stream content back into the original network stream. BTW, if your middleware reads the request body, downstream components cannot, unles...
I've solved the problem by applying an action attribute writing the request body to OWIN environment dictionary. After that, the logging middleware can access it by a key. ``` public class LogResponseBodyInterceptorAttribute : ActionFilterAttribute { public override async Task OnActionExecutedAsync(HttpActionExecu...
25,584,626
I'm trying to write a Owin midleware component that would LOG every incoming request and response to the database. Here's how far I managed to get. I got stuck on reading the response.body. Says: > > Stream does not support reading. > > > How can I read the Response.Body ? ``` public class LoggingMiddlewar...
2014/08/30
[ "https://Stackoverflow.com/questions/25584626", "https://Stackoverflow.com", "https://Stackoverflow.com/users/444149/" ]
Response Body can be logged in this manner: ``` public class LoggingMiddleware : OwinMiddleware { private static Logger log = LogManager.GetLogger("WebApi"); public LoggingMiddleware(OwinMiddleware next, IAppBuilder app) : base(next) { } public override async Task Invoke(IOwinContext cont...
I've solved the problem by applying an action attribute writing the request body to OWIN environment dictionary. After that, the logging middleware can access it by a key. ``` public class LogResponseBodyInterceptorAttribute : ActionFilterAttribute { public override async Task OnActionExecutedAsync(HttpActionExecu...
16,708
This `.emacs` file is sufficient to reproduce the problem. ``` (package-initialize) (setq evil-want-C-u-scroll t) (require 'evil) (define-key evil-normal-state-map (kbd "C-f") #'universal-argument) (evil-mode +1) ``` However, when I am applying multiple consecutive universal arguments while in normal mode, `C-u` is ...
2015/09/17
[ "https://emacs.stackexchange.com/questions/16708", "https://emacs.stackexchange.com", "https://emacs.stackexchange.com/users/8921/" ]
Remap `C-u` in both the global keymap and the transient one. Don't forget to map the freed `C-u` in both the global keymap and Evil's normal state keymap to something more useful and to poke a hole in Evil's normal state keymap for the universal argument to be picked up from the global keymap: ``` (define-key global-m...
Try using `define-key` instead of the variable approach ``` (define-key evil-normal-state-map "\C-u" 'evil-scroll-up) ```
2,199,131
The question is from a standardized test. It is based around a type of probability. I have not taken a class that involves probability, as it is not taught in our standard curriculum. I am not positive on if my partial efforts are correct, but I and many others I know would appreciate some clarification. The problem go...
2017/03/23
[ "https://math.stackexchange.com/questions/2199131", "https://math.stackexchange.com", "https://math.stackexchange.com/users/428427/" ]
As already pointed out in the comments, the respective cases are mutually exclusive. When events are mutually exclusive, lets call them events $A$ and $B$, the probability that $A$ or $B$ will occur is the sum of the probability of each event. $$P(A \;\text{or}\; B) = P(A) + P(B)$$ In any case, whenever we need to ...
> > From my very limited knowledge of probability, I cannot see a way to form one probability from three. You would take the probability of the first pick (for each type of cookie), 5/10, 3/10, and 2/10, and multiply them respectively by 4/9, 2/9, and 1/9. That would give you the probability of picking the same for ea...
224,918
Shopping Cart Price Rule - By using ZIP Code and Subtotal - Free shipping Not Working **Shipping Method : Webshop Matrix Rate** I am applied Shopping Cart Price Rule using zipcode, [![enter image description here](https://i.stack.imgur.com/37TXe.png)](https://i.stack.imgur.com/37TXe.png) [![enter image description h...
2018/05/07
[ "https://magento.stackexchange.com/questions/224918", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/57334/" ]
I am also facing the same issue for me a temporary fix is force deploying developer mode (even if you are already on it or not) **i.e. Executing the following command after di compile** ``` php bin/magento deploy:mode:set developer ``` It is a temporary / quick fix , i am still looking into issue will update answe...
***Windows 10 Env Run deploy and compilation*** As per discussion, you are already in ***developer*** mode. * Try to install ***git bash*** or you can use ***powershell*** My choice is ***git bash***. * Go to ***Magento*** Root directory. Need to give permission when you run: `php bin/magento setup:di:compi...
224,918
Shopping Cart Price Rule - By using ZIP Code and Subtotal - Free shipping Not Working **Shipping Method : Webshop Matrix Rate** I am applied Shopping Cart Price Rule using zipcode, [![enter image description here](https://i.stack.imgur.com/37TXe.png)](https://i.stack.imgur.com/37TXe.png) [![enter image description h...
2018/05/07
[ "https://magento.stackexchange.com/questions/224918", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/57334/" ]
I am also facing the same issue for me a temporary fix is force deploying developer mode (even if you are already on it or not) **i.e. Executing the following command after di compile** ``` php bin/magento deploy:mode:set developer ``` It is a temporary / quick fix , i am still looking into issue will update answe...
**I have fixed same issue on my Windows 10 system using below steps** > > 1) increase memory\_limit = 3000M > > > 2) new fresh installation Magento 2.1.8 with wamp server php v 7.0.32 > > > Now admin and front both working fine, please let me know if its work for you.
224,918
Shopping Cart Price Rule - By using ZIP Code and Subtotal - Free shipping Not Working **Shipping Method : Webshop Matrix Rate** I am applied Shopping Cart Price Rule using zipcode, [![enter image description here](https://i.stack.imgur.com/37TXe.png)](https://i.stack.imgur.com/37TXe.png) [![enter image description h...
2018/05/07
[ "https://magento.stackexchange.com/questions/224918", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/57334/" ]
I am also facing the same issue for me a temporary fix is force deploying developer mode (even if you are already on it or not) **i.e. Executing the following command after di compile** ``` php bin/magento deploy:mode:set developer ``` It is a temporary / quick fix , i am still looking into issue will update answe...
Please run following command : > > php bin/magento setup:upgrade > > > php bin/magento setup:static-content:deploy -f > > > php bin/magento cache:clean > > > php bin/magento cache:flush > > >
224,918
Shopping Cart Price Rule - By using ZIP Code and Subtotal - Free shipping Not Working **Shipping Method : Webshop Matrix Rate** I am applied Shopping Cart Price Rule using zipcode, [![enter image description here](https://i.stack.imgur.com/37TXe.png)](https://i.stack.imgur.com/37TXe.png) [![enter image description h...
2018/05/07
[ "https://magento.stackexchange.com/questions/224918", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/57334/" ]
**I have fixed same issue on my Windows 10 system using below steps** > > 1) increase memory\_limit = 3000M > > > 2) new fresh installation Magento 2.1.8 with wamp server php v 7.0.32 > > > Now admin and front both working fine, please let me know if its work for you.
***Windows 10 Env Run deploy and compilation*** As per discussion, you are already in ***developer*** mode. * Try to install ***git bash*** or you can use ***powershell*** My choice is ***git bash***. * Go to ***Magento*** Root directory. Need to give permission when you run: `php bin/magento setup:di:compi...
224,918
Shopping Cart Price Rule - By using ZIP Code and Subtotal - Free shipping Not Working **Shipping Method : Webshop Matrix Rate** I am applied Shopping Cart Price Rule using zipcode, [![enter image description here](https://i.stack.imgur.com/37TXe.png)](https://i.stack.imgur.com/37TXe.png) [![enter image description h...
2018/05/07
[ "https://magento.stackexchange.com/questions/224918", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/57334/" ]
***Windows 10 Env Run deploy and compilation*** As per discussion, you are already in ***developer*** mode. * Try to install ***git bash*** or you can use ***powershell*** My choice is ***git bash***. * Go to ***Magento*** Root directory. Need to give permission when you run: `php bin/magento setup:di:compi...
Please run following command : > > php bin/magento setup:upgrade > > > php bin/magento setup:static-content:deploy -f > > > php bin/magento cache:clean > > > php bin/magento cache:flush > > >
224,918
Shopping Cart Price Rule - By using ZIP Code and Subtotal - Free shipping Not Working **Shipping Method : Webshop Matrix Rate** I am applied Shopping Cart Price Rule using zipcode, [![enter image description here](https://i.stack.imgur.com/37TXe.png)](https://i.stack.imgur.com/37TXe.png) [![enter image description h...
2018/05/07
[ "https://magento.stackexchange.com/questions/224918", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/57334/" ]
First Open “Validator.php” file located as the following path. vendor\magento\framework\View\Element\Template\File\Validator.php find the function : ``` protected function isPathInDirectories($path, $directories) ``` Now inside this function find this line of code. ``` $realPath = $this->fileDriver->getRealPath($p...
***Windows 10 Env Run deploy and compilation*** As per discussion, you are already in ***developer*** mode. * Try to install ***git bash*** or you can use ***powershell*** My choice is ***git bash***. * Go to ***Magento*** Root directory. Need to give permission when you run: `php bin/magento setup:di:compi...
224,918
Shopping Cart Price Rule - By using ZIP Code and Subtotal - Free shipping Not Working **Shipping Method : Webshop Matrix Rate** I am applied Shopping Cart Price Rule using zipcode, [![enter image description here](https://i.stack.imgur.com/37TXe.png)](https://i.stack.imgur.com/37TXe.png) [![enter image description h...
2018/05/07
[ "https://magento.stackexchange.com/questions/224918", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/57334/" ]
**I have fixed same issue on my Windows 10 system using below steps** > > 1) increase memory\_limit = 3000M > > > 2) new fresh installation Magento 2.1.8 with wamp server php v 7.0.32 > > > Now admin and front both working fine, please let me know if its work for you.
Please run following command : > > php bin/magento setup:upgrade > > > php bin/magento setup:static-content:deploy -f > > > php bin/magento cache:clean > > > php bin/magento cache:flush > > >
224,918
Shopping Cart Price Rule - By using ZIP Code and Subtotal - Free shipping Not Working **Shipping Method : Webshop Matrix Rate** I am applied Shopping Cart Price Rule using zipcode, [![enter image description here](https://i.stack.imgur.com/37TXe.png)](https://i.stack.imgur.com/37TXe.png) [![enter image description h...
2018/05/07
[ "https://magento.stackexchange.com/questions/224918", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/57334/" ]
First Open “Validator.php” file located as the following path. vendor\magento\framework\View\Element\Template\File\Validator.php find the function : ``` protected function isPathInDirectories($path, $directories) ``` Now inside this function find this line of code. ``` $realPath = $this->fileDriver->getRealPath($p...
**I have fixed same issue on my Windows 10 system using below steps** > > 1) increase memory\_limit = 3000M > > > 2) new fresh installation Magento 2.1.8 with wamp server php v 7.0.32 > > > Now admin and front both working fine, please let me know if its work for you.
224,918
Shopping Cart Price Rule - By using ZIP Code and Subtotal - Free shipping Not Working **Shipping Method : Webshop Matrix Rate** I am applied Shopping Cart Price Rule using zipcode, [![enter image description here](https://i.stack.imgur.com/37TXe.png)](https://i.stack.imgur.com/37TXe.png) [![enter image description h...
2018/05/07
[ "https://magento.stackexchange.com/questions/224918", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/57334/" ]
First Open “Validator.php” file located as the following path. vendor\magento\framework\View\Element\Template\File\Validator.php find the function : ``` protected function isPathInDirectories($path, $directories) ``` Now inside this function find this line of code. ``` $realPath = $this->fileDriver->getRealPath($p...
Please run following command : > > php bin/magento setup:upgrade > > > php bin/magento setup:static-content:deploy -f > > > php bin/magento cache:clean > > > php bin/magento cache:flush > > >
78,301
I need to delete a schema in my PostgreSQL database. I would like to make sure that the schema is not used in another schema (for instance : this schema is used for a view in another one). Is there a way to list all the dependencies in the rest of the database ? I have tried `DROP SCHEMA mySchema ;` but the given list...
2014/10/03
[ "https://dba.stackexchange.com/questions/78301", "https://dba.stackexchange.com", "https://dba.stackexchange.com/users/48623/" ]
SQL Server service account don't have permission in the drive you are using to create database.Don't put you database in the root of drive. It would be problematic if you have UAC enabled, Create a folder in drive. Like `D:\Data` Check this <http://msdn.microsoft.com/en-us/library/windows/desktop/ms681382(v=vs.85).asp...
if you have installed your SQL server in your local machine, your name should be having the permission to the folder from which you are trying to retrieve the data file.
2,342
I have cracking knees especially in my left knee and sometimes in the right one too, but not much. I have checked it they said it's nothing but it's uncomfortable. I dont like the feeling when squatting and when I go up, the knee just pops back to its place in the knee cap area. I am afraid it will evolve into somethin...
2011/06/03
[ "https://fitness.stackexchange.com/questions/2342", "https://fitness.stackexchange.com", "https://fitness.stackexchange.com/users/1170/" ]
Since you said you had it checked out: I hate to say it, but one of the best exercises for your knees is the squat. I'd check out this [video with Mark Rippetoe](http://www.youtube.com/watch?v=kawBY5p29fQ) (a respected coach) for good information on proper form to get the most out of it. That said: * **Only squat wi...
I had the exact same problem when I started training and I could seriously improve the "cracking" noise and the related feeling over time. I read somewhere that this is caused by uneven distribution of fluids in the joints, but I can't find the source anymore. What's actually helped me was a lot of different leg relat...
19,498,907
I have a table which needs rows removing where two other columns match. So for example: ``` Apples | Size | Colour | Juiced 1 | big | red | Yes 2 | small | green | No ``` I want the query to remove all rows that have size big, and colour red, and juiced. the problem is I need to fi...
2013/10/21
[ "https://Stackoverflow.com/questions/19498907", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2890520/" ]
Conceptually - when you are thinking about **IN with multiple columns** your thinking about [EXISTS](http://technet.microsoft.com/enus/library/ms188336(v=sql.100).aspx): ``` SELECT * FROM table T WHERE (Juiced <> 'No') OR (Juiced LIKE 'yes' AND (EXISTS (SELECT Size, Colour...
You could do something like this: ``` SELECT * FROM table LEFT JOIN ( SELECT Size, Colour FROM anotherTable WHERE condition ) anotherTable ON table.Size = anotherTable.Size AND table.Colour = anotherTable.Colour WHERE (Juiced <> 'No') -- should this be (Juiced = 'No')? OR (Juiced LIKE 'yes' AND anotherTabl...
28,268,318
I would like to find out how you can tell if a character in a variable is a letter or number for example: if I used the code: ABC123 How would I find out if a variable followed that pattern so if a inputted code would be DNM567 it would print "correct" But if a code was DNM56T it would print "incorrect". Many thank...
2015/02/01
[ "https://Stackoverflow.com/questions/28268318", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4517997/" ]
The ***wrong*** way to do this: ``` val1 = 0 ... def lame(x): global val1 val1 = result_of_some_calculations_to_do_with(x) ``` The ***right*** way to do this: ``` def lame(x): return result_of_some_calculations_to_do_with(x) val1 = lame(x) ``` Contrary to what L3viathan said in the comments, Python...
Right after I posted this question I figured it out, and can confirm what Adam Smith has said. Here is the code I changed to get it working properly: ``` def lame(x): #set value of p, r, s choice to 1, 2 or 3 if x in("p","P"): return 1 elif x in("r","R"): return 2 elif x in("s","S"):...
36,909,084
I want to include Google Cloud in one of my webprojects which is based on Codeiginiter. Now my big question is, how to implement the Google API PHP client into CI? Since CI is a MVC framework it wouldn't make sense including it directly with `require_once` in the view, so I thought about creating a library but that mea...
2016/04/28
[ "https://Stackoverflow.com/questions/36909084", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5142371/" ]
This can be implemented by creating a simple library by extending the Google\_Api some thing like.. ``` require_once /path/to/Google_Api/file_name.php Class my_google_api extend Google_Api { // constructor } ``` Now load this library to your controller and the access all the methods from Google\_api
You can use [composer](https://getcomposer.org). CI supports [autoloading](https://www.codeigniter.com/user_guide/general/autoloader.html) of third party libraries with composer. Besides, usage of composer is a preferred method to install Google APIs Client Library. In this way you won't need to include the library wit...
10,550,137
i create a simple browser that can load a local file using UIWebview. At first,when i try to preview a html file, the uiwebview can load the source file and preview it. But after i minimize the app (the app enter background), and then open the app again, i've got this error : ``` Error Dict: { NSNetServicesErrorCo...
2012/05/11
[ "https://Stackoverflow.com/questions/10550137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/515986/" ]
If you look inside the `NSNetServices` header, you'll see the following enum that explains each error: ``` typedef NS_ENUM(NSInteger, NSNetServicesError) { /* An unknown error occured during resolution or publication. */ NSNetServicesUnknownError = -72000L, /* An NSNetService with the same domain, type and name ...
The problem seems to be the host you are trying to connect to: `http://localhost:9898/local/[..]` Localhost on your computer is your computer, localhost on your ipad is your ipad - for testing use resolvable domain name or ip address.
10,550,137
i create a simple browser that can load a local file using UIWebview. At first,when i try to preview a html file, the uiwebview can load the source file and preview it. But after i minimize the app (the app enter background), and then open the app again, i've got this error : ``` Error Dict: { NSNetServicesErrorCo...
2012/05/11
[ "https://Stackoverflow.com/questions/10550137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/515986/" ]
The problem seems to be the host you are trying to connect to: `http://localhost:9898/local/[..]` Localhost on your computer is your computer, localhost on your ipad is your ipad - for testing use resolvable domain name or ip address.
Sergiu Todirascu's comment in the question solved it for me. The Mac Sandbox was causing this, I had to turn on Networking, in my case Incoming and Outgoing network checkboxes, in the entitlements tab. Creating an answer so it is more easy to see.
10,550,137
i create a simple browser that can load a local file using UIWebview. At first,when i try to preview a html file, the uiwebview can load the source file and preview it. But after i minimize the app (the app enter background), and then open the app again, i've got this error : ``` Error Dict: { NSNetServicesErrorCo...
2012/05/11
[ "https://Stackoverflow.com/questions/10550137", "https://Stackoverflow.com", "https://Stackoverflow.com/users/515986/" ]
If you look inside the `NSNetServices` header, you'll see the following enum that explains each error: ``` typedef NS_ENUM(NSInteger, NSNetServicesError) { /* An unknown error occured during resolution or publication. */ NSNetServicesUnknownError = -72000L, /* An NSNetService with the same domain, type and name ...
Sergiu Todirascu's comment in the question solved it for me. The Mac Sandbox was causing this, I had to turn on Networking, in my case Incoming and Outgoing network checkboxes, in the entitlements tab. Creating an answer so it is more easy to see.
29,439
I'm getting the error: > > cache\_dir "‘tmp’" must be a directory > > > Trace: ``` #0 lib/Zend/Cache/Backend/File.php(178): Zend_Cache::throwException('cache_dir "???t...') #1 lib/Zend/Cache/Backend/File.php(129): Zend_Cache_Backend_File->setCacheDir('???tmp???') #2 lib/Zend/Cache.php(153): Zend_Cache_Backend_Fi...
2014/07/19
[ "https://magento.stackexchange.com/questions/29439", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/12348/" ]
Make sure that your var and `var/cache directories` are writable. The issue generally arises when `var directory` is not writable. For one guy he commented this as solution: **Finally I found a little strange solution. I just add a new directory magento/null (777) in magento and it's resolved my problem.** Go to th...
@RIZ KRUD ,`create a folder tmp under your magento` dir .It store magento zend cache here
29,439
I'm getting the error: > > cache\_dir "‘tmp’" must be a directory > > > Trace: ``` #0 lib/Zend/Cache/Backend/File.php(178): Zend_Cache::throwException('cache_dir "???t...') #1 lib/Zend/Cache/Backend/File.php(129): Zend_Cache_Backend_File->setCacheDir('???tmp???') #2 lib/Zend/Cache.php(153): Zend_Cache_Backend_Fi...
2014/07/19
[ "https://magento.stackexchange.com/questions/29439", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/12348/" ]
@RIZ KRUD ,`create a folder tmp under your magento` dir .It store magento zend cache here
Create the "tmp" folder (e.g `/magento/public_html/tmp`) Then run the command: ``` chmod 777 tmp ```
29,439
I'm getting the error: > > cache\_dir "‘tmp’" must be a directory > > > Trace: ``` #0 lib/Zend/Cache/Backend/File.php(178): Zend_Cache::throwException('cache_dir "???t...') #1 lib/Zend/Cache/Backend/File.php(129): Zend_Cache_Backend_File->setCacheDir('???tmp???') #2 lib/Zend/Cache.php(153): Zend_Cache_Backend_Fi...
2014/07/19
[ "https://magento.stackexchange.com/questions/29439", "https://magento.stackexchange.com", "https://magento.stackexchange.com/users/12348/" ]
Make sure that your var and `var/cache directories` are writable. The issue generally arises when `var directory` is not writable. For one guy he commented this as solution: **Finally I found a little strange solution. I just add a new directory magento/null (777) in magento and it's resolved my problem.** Go to th...
Create the "tmp" folder (e.g `/magento/public_html/tmp`) Then run the command: ``` chmod 777 tmp ```
51,877,627
Here is the XML file snippet that gives some currencies. All of them has values like "currency name", "forex buying", "forex selling" etc... ``` <?xml version="1.0" encoding="UTF-8"?> ``` ``` <Currency CrossOrder="1" Kod="AUD" CurrencyCode="AUD"> <Unit>1</Unit> <Isim>AVUSTRALYA DOLARI</Isim> ...
2018/08/16
[ "https://Stackoverflow.com/questions/51877627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9445965/" ]
The Issue is that your imports are not correct ``` import javax.lang.model.element.Element; ``` is not the same as ``` import org.w3c.dom.Element; ``` That is causing conflicts in your java Code. try with this Imports: ``` import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory...
I think you should do: ``` Element element = (org.w3c.dom.Element) node; ``` Because you are also importing `javax.lang.model.element.Element`, and I suspect that the casting is occurring with that type (as the stacktrace itself implies).
51,877,627
Here is the XML file snippet that gives some currencies. All of them has values like "currency name", "forex buying", "forex selling" etc... ``` <?xml version="1.0" encoding="UTF-8"?> ``` ``` <Currency CrossOrder="1" Kod="AUD" CurrencyCode="AUD"> <Unit>1</Unit> <Isim>AVUSTRALYA DOLARI</Isim> ...
2018/08/16
[ "https://Stackoverflow.com/questions/51877627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9445965/" ]
Would you try to run below code? Only the code in the for block was changed. ``` public static void main(String[] args) { try { File xmlFile = new File("TCMB2.xml"); DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder = do...
I think you should do: ``` Element element = (org.w3c.dom.Element) node; ``` Because you are also importing `javax.lang.model.element.Element`, and I suspect that the casting is occurring with that type (as the stacktrace itself implies).
51,877,627
Here is the XML file snippet that gives some currencies. All of them has values like "currency name", "forex buying", "forex selling" etc... ``` <?xml version="1.0" encoding="UTF-8"?> ``` ``` <Currency CrossOrder="1" Kod="AUD" CurrencyCode="AUD"> <Unit>1</Unit> <Isim>AVUSTRALYA DOLARI</Isim> ...
2018/08/16
[ "https://Stackoverflow.com/questions/51877627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9445965/" ]
The Issue is that your imports are not correct ``` import javax.lang.model.element.Element; ``` is not the same as ``` import org.w3c.dom.Element; ``` That is causing conflicts in your java Code. try with this Imports: ``` import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory...
Okay you had a few issues with your code involving imports which people have already brought up, but you had a few other changes that needed to be implemented to your code for it to work the way it looks like you want. First here is the XML I am using, you did not have a root element which messed up your code, but you...
51,877,627
Here is the XML file snippet that gives some currencies. All of them has values like "currency name", "forex buying", "forex selling" etc... ``` <?xml version="1.0" encoding="UTF-8"?> ``` ``` <Currency CrossOrder="1" Kod="AUD" CurrencyCode="AUD"> <Unit>1</Unit> <Isim>AVUSTRALYA DOLARI</Isim> ...
2018/08/16
[ "https://Stackoverflow.com/questions/51877627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9445965/" ]
Would you try to run below code? Only the code in the for block was changed. ``` public static void main(String[] args) { try { File xmlFile = new File("TCMB2.xml"); DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder = do...
The Issue is that your imports are not correct ``` import javax.lang.model.element.Element; ``` is not the same as ``` import org.w3c.dom.Element; ``` That is causing conflicts in your java Code. try with this Imports: ``` import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory...
51,877,627
Here is the XML file snippet that gives some currencies. All of them has values like "currency name", "forex buying", "forex selling" etc... ``` <?xml version="1.0" encoding="UTF-8"?> ``` ``` <Currency CrossOrder="1" Kod="AUD" CurrencyCode="AUD"> <Unit>1</Unit> <Isim>AVUSTRALYA DOLARI</Isim> ...
2018/08/16
[ "https://Stackoverflow.com/questions/51877627", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9445965/" ]
Would you try to run below code? Only the code in the for block was changed. ``` public static void main(String[] args) { try { File xmlFile = new File("TCMB2.xml"); DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder documentBuilder = do...
Okay you had a few issues with your code involving imports which people have already brought up, but you had a few other changes that needed to be implemented to your code for it to work the way it looks like you want. First here is the XML I am using, you did not have a root element which messed up your code, but you...
42,788,696
I was reading the [SVE whitepaper](https://developer.arm.com/hpc/a-sneak-peek-into-sve-and-vla-programming) from ARM and came across something that struck me as odd (in a non-SVE example): ``` mov x8, xzr ``` I didn't know what this `xzr` register was, so I looked it up and found [some content from ARM](https://comm...
2017/03/14
[ "https://Stackoverflow.com/questions/42788696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1816262/" ]
``` mov x8,xzr mov x8,#0 mov x8,0 ``` produces ``` 0000000000000000 <.text>: 0: aa1f03e8 mov x8, xzr 4: d2800008 mov x8, #0x0 // #0 8: d2800008 mov x8, #0x0 // #0 ``` No real surprise there other than it allowed an immediate without the pound sign. It i...
**TL;DR** It takes multiple instructions to load a 64 bit literal into a register, but only a single instruction to set to 0 using zxr. Therefore the code is shorter and faster. --- To move a literal to a register you would use the MOVL instruction, see this from the arm reference: > > MOVL pseudo-instruction > >...
42,788,696
I was reading the [SVE whitepaper](https://developer.arm.com/hpc/a-sneak-peek-into-sve-and-vla-programming) from ARM and came across something that struck me as odd (in a non-SVE example): ``` mov x8, xzr ``` I didn't know what this `xzr` register was, so I looked it up and found [some content from ARM](https://comm...
2017/03/14
[ "https://Stackoverflow.com/questions/42788696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1816262/" ]
These two instructions should be identical - both in terms of effect and expected performance. They're actually both *aliases* of more general purpose instructions. `mov x8, 0` is encoded as `orr x8, xzr, 0` `mov x8, xzr` is encoded as `orr x8, xzr, xzr` Aliases are useful because they make the ASM more readable. ...
**TL;DR** It takes multiple instructions to load a 64 bit literal into a register, but only a single instruction to set to 0 using zxr. Therefore the code is shorter and faster. --- To move a literal to a register you would use the MOVL instruction, see this from the arm reference: > > MOVL pseudo-instruction > >...
42,788,696
I was reading the [SVE whitepaper](https://developer.arm.com/hpc/a-sneak-peek-into-sve-and-vla-programming) from ARM and came across something that struck me as odd (in a non-SVE example): ``` mov x8, xzr ``` I didn't know what this `xzr` register was, so I looked it up and found [some content from ARM](https://comm...
2017/03/14
[ "https://Stackoverflow.com/questions/42788696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1816262/" ]
I think the `mov x8, xzr` vs `mov x8, #0` comparison is something of a red herring. As @old\_timer's answer shows, there is no encoding gain to be made, and quite likely (although admittedly I haven't checked) little or no pipeline performance gain. What `xzr` gives us, however - in addition to a dummy register as pe...
**TL;DR** It takes multiple instructions to load a 64 bit literal into a register, but only a single instruction to set to 0 using zxr. Therefore the code is shorter and faster. --- To move a literal to a register you would use the MOVL instruction, see this from the arm reference: > > MOVL pseudo-instruction > >...
42,788,696
I was reading the [SVE whitepaper](https://developer.arm.com/hpc/a-sneak-peek-into-sve-and-vla-programming) from ARM and came across something that struck me as odd (in a non-SVE example): ``` mov x8, xzr ``` I didn't know what this `xzr` register was, so I looked it up and found [some content from ARM](https://comm...
2017/03/14
[ "https://Stackoverflow.com/questions/42788696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1816262/" ]
``` mov x8,xzr mov x8,#0 mov x8,0 ``` produces ``` 0000000000000000 <.text>: 0: aa1f03e8 mov x8, xzr 4: d2800008 mov x8, #0x0 // #0 8: d2800008 mov x8, #0x0 // #0 ``` No real surprise there other than it allowed an immediate without the pound sign. It i...
These two instructions should be identical - both in terms of effect and expected performance. They're actually both *aliases* of more general purpose instructions. `mov x8, 0` is encoded as `orr x8, xzr, 0` `mov x8, xzr` is encoded as `orr x8, xzr, xzr` Aliases are useful because they make the ASM more readable. ...
42,788,696
I was reading the [SVE whitepaper](https://developer.arm.com/hpc/a-sneak-peek-into-sve-and-vla-programming) from ARM and came across something that struck me as odd (in a non-SVE example): ``` mov x8, xzr ``` I didn't know what this `xzr` register was, so I looked it up and found [some content from ARM](https://comm...
2017/03/14
[ "https://Stackoverflow.com/questions/42788696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1816262/" ]
``` mov x8,xzr mov x8,#0 mov x8,0 ``` produces ``` 0000000000000000 <.text>: 0: aa1f03e8 mov x8, xzr 4: d2800008 mov x8, #0x0 // #0 8: d2800008 mov x8, #0x0 // #0 ``` No real surprise there other than it allowed an immediate without the pound sign. It i...
This answer is not "on all fours" to the OP. XZR could be used to discard results; e.g., "ldr xzr, [sp], 16". See GDB below ``` 0x7fffffef40: 0x00000000 0x00000000 0x00400498 0x00000000 0x7fffffef50: 0x00000000 0x00000000 0x00000000 0x00000000 ldr x0,=0xdead (gdb) ...
42,788,696
I was reading the [SVE whitepaper](https://developer.arm.com/hpc/a-sneak-peek-into-sve-and-vla-programming) from ARM and came across something that struck me as odd (in a non-SVE example): ``` mov x8, xzr ``` I didn't know what this `xzr` register was, so I looked it up and found [some content from ARM](https://comm...
2017/03/14
[ "https://Stackoverflow.com/questions/42788696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1816262/" ]
I think the `mov x8, xzr` vs `mov x8, #0` comparison is something of a red herring. As @old\_timer's answer shows, there is no encoding gain to be made, and quite likely (although admittedly I haven't checked) little or no pipeline performance gain. What `xzr` gives us, however - in addition to a dummy register as pe...
``` mov x8,xzr mov x8,#0 mov x8,0 ``` produces ``` 0000000000000000 <.text>: 0: aa1f03e8 mov x8, xzr 4: d2800008 mov x8, #0x0 // #0 8: d2800008 mov x8, #0x0 // #0 ``` No real surprise there other than it allowed an immediate without the pound sign. It i...
42,788,696
I was reading the [SVE whitepaper](https://developer.arm.com/hpc/a-sneak-peek-into-sve-and-vla-programming) from ARM and came across something that struck me as odd (in a non-SVE example): ``` mov x8, xzr ``` I didn't know what this `xzr` register was, so I looked it up and found [some content from ARM](https://comm...
2017/03/14
[ "https://Stackoverflow.com/questions/42788696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1816262/" ]
These two instructions should be identical - both in terms of effect and expected performance. They're actually both *aliases* of more general purpose instructions. `mov x8, 0` is encoded as `orr x8, xzr, 0` `mov x8, xzr` is encoded as `orr x8, xzr, xzr` Aliases are useful because they make the ASM more readable. ...
This answer is not "on all fours" to the OP. XZR could be used to discard results; e.g., "ldr xzr, [sp], 16". See GDB below ``` 0x7fffffef40: 0x00000000 0x00000000 0x00400498 0x00000000 0x7fffffef50: 0x00000000 0x00000000 0x00000000 0x00000000 ldr x0,=0xdead (gdb) ...
42,788,696
I was reading the [SVE whitepaper](https://developer.arm.com/hpc/a-sneak-peek-into-sve-and-vla-programming) from ARM and came across something that struck me as odd (in a non-SVE example): ``` mov x8, xzr ``` I didn't know what this `xzr` register was, so I looked it up and found [some content from ARM](https://comm...
2017/03/14
[ "https://Stackoverflow.com/questions/42788696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1816262/" ]
I think the `mov x8, xzr` vs `mov x8, #0` comparison is something of a red herring. As @old\_timer's answer shows, there is no encoding gain to be made, and quite likely (although admittedly I haven't checked) little or no pipeline performance gain. What `xzr` gives us, however - in addition to a dummy register as pe...
These two instructions should be identical - both in terms of effect and expected performance. They're actually both *aliases* of more general purpose instructions. `mov x8, 0` is encoded as `orr x8, xzr, 0` `mov x8, xzr` is encoded as `orr x8, xzr, xzr` Aliases are useful because they make the ASM more readable. ...
42,788,696
I was reading the [SVE whitepaper](https://developer.arm.com/hpc/a-sneak-peek-into-sve-and-vla-programming) from ARM and came across something that struck me as odd (in a non-SVE example): ``` mov x8, xzr ``` I didn't know what this `xzr` register was, so I looked it up and found [some content from ARM](https://comm...
2017/03/14
[ "https://Stackoverflow.com/questions/42788696", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1816262/" ]
I think the `mov x8, xzr` vs `mov x8, #0` comparison is something of a red herring. As @old\_timer's answer shows, there is no encoding gain to be made, and quite likely (although admittedly I haven't checked) little or no pipeline performance gain. What `xzr` gives us, however - in addition to a dummy register as pe...
This answer is not "on all fours" to the OP. XZR could be used to discard results; e.g., "ldr xzr, [sp], 16". See GDB below ``` 0x7fffffef40: 0x00000000 0x00000000 0x00400498 0x00000000 0x7fffffef50: 0x00000000 0x00000000 0x00000000 0x00000000 ldr x0,=0xdead (gdb) ...
5,504,951
I've just started using Sweave on TeXShop ( which runs on OSX). Is it possible to have syntax coloring of the source code so that I can distinguish between raw text and R-code? For example, the following code snippet in my Sweave file is the same as the rest of the text, which makes it harder to read than an R editor...
2011/03/31
[ "https://Stackoverflow.com/questions/5504951", "https://Stackoverflow.com", "https://Stackoverflow.com/users/258755/" ]
I don't believe TexShop supports mode switching (e.g. highlighting in two different languages--R and LaTeX--within the same file), since it was designed around a single language (LaTeX). Editors that do and therefore properly handle Sweave are to my knowledge: * Eclipse with Stat/ET * RStudio * Emacs with ESS
Actually, you can use highlighted syntax out of the box. Use `pgfSweave` package. Just add `pgf=TRUE` (and `echo=TRUE`) to your Sweave chunk, and you're good to go. Install `pgfSweave`, and load a package vignette (`vignette("pgfSweave")`) for further assistance. > > Version 1.1.0 of pgfSweave introduced > the highl...
158,341
I've got a few sites with directories protected by http basic auth implemented via .htaccess files paired with .htpasswd files. I've noticed that with a password ending in "et!" I can get in by omitting the "t!", or replacing the ! with a 1. Contents of my .htaccess file: ``` AuthType Basic AuthName "administration" ...
2010/07/07
[ "https://serverfault.com/questions/158341", "https://serverfault.com", "https://serverfault.com/users/-1/" ]
Have a look at: <http://httpd.apache.org/docs/2.1/misc/password_encryptions.html> It sounds to me like you're using CRYPT format passwords (the default on most platforms). CRYPT passwords only use the first 8 characters of the password. I suspect your password exceeds 8 characters in length and the "slightly incorrec...
I would try erasing and recreating the .pw file first. This is a really strange problem... If that doesn't fix it, check for bug reports related your version of Apache. I *HIGHLY HIGHLY* doubt it is a bug, though. I wish I knew where to go from there. Hopefully when you remove/recreate the file it fixes the problem. ...
7,513,866
I have a MVC3 application with ASPX view engine. My page is having a dropdownlist created by ``` Html.DropdownListFor(m=>m.EmpId,(selectlist)Model.EmpDetails). ``` I update this dropdown on a situation where it would have only one item and make that disabled, by Jquery. Now when I go to form post, my model's `'EmpI...
2011/09/22
[ "https://Stackoverflow.com/questions/7513866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/958974/" ]
You can look at the `Content-Type` HTTP header to figure out what *type* of file you are getting — but you can't find out what the filename used on the server is (or even if there is a filename), and (in most cases) both index.html and default.asp will return an HTML document.
If example.com is a different server than the one PHP is running on, you can't. OPTION : you can bruteforce, that is trying different possible filenames (index.htm, index.html, index.php, index.asp, default.html, etc...)
7,513,866
I have a MVC3 application with ASPX view engine. My page is having a dropdownlist created by ``` Html.DropdownListFor(m=>m.EmpId,(selectlist)Model.EmpDetails). ``` I update this dropdown on a situation where it would have only one item and make that disabled, by Jquery. Now when I go to form post, my model's `'EmpI...
2011/09/22
[ "https://Stackoverflow.com/questions/7513866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/958974/" ]
You can look at the `Content-Type` HTTP header to figure out what *type* of file you are getting — but you can't find out what the filename used on the server is (or even if there is a filename), and (in most cases) both index.html and default.asp will return an HTML document.
Two points here: * Firstly, no it is not possible to work out the name of the file that was served if you just requested the root of a directory. This is handled internally by the web server, and it doesn't tell the client how it was handled. Sorry. * Secondly - surely you can just give all the files a `.html` extensi...
7,513,866
I have a MVC3 application with ASPX view engine. My page is having a dropdownlist created by ``` Html.DropdownListFor(m=>m.EmpId,(selectlist)Model.EmpDetails). ``` I update this dropdown on a situation where it would have only one item and make that disabled, by Jquery. Now when I go to form post, my model's `'EmpI...
2011/09/22
[ "https://Stackoverflow.com/questions/7513866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/958974/" ]
You can look at the `Content-Type` HTTP header to figure out what *type* of file you are getting — but you can't find out what the filename used on the server is (or even if there is a filename), and (in most cases) both index.html and default.asp will return an HTML document.
Well, anyway it will be HTML file. So always use HTML extension.
7,513,866
I have a MVC3 application with ASPX view engine. My page is having a dropdownlist created by ``` Html.DropdownListFor(m=>m.EmpId,(selectlist)Model.EmpDetails). ``` I update this dropdown on a situation where it would have only one item and make that disabled, by Jquery. Now when I go to form post, my model's `'EmpI...
2011/09/22
[ "https://Stackoverflow.com/questions/7513866", "https://Stackoverflow.com", "https://Stackoverflow.com/users/958974/" ]
You can look at the `Content-Type` HTTP header to figure out what *type* of file you are getting — but you can't find out what the filename used on the server is (or even if there is a filename), and (in most cases) both index.html and default.asp will return an HTML document.
You can't really use the URL to determine the type of response you get. What you need is the [MIME type](http://en.wikipedia.org/wiki/Internet_media_type) from the [Content-Type](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17) response header. You can extract this header from the automatically populat...
37,105,074
Hello I wrote this code for following question: Write a C program that reads a text file into an array of character. You may assume that the file contains no more than 1000 characters. But code prints only first character of text. Where do I make mistake? ``` FILE *wse; char a[1000]; int i; wse=fopen("21e.txt","...
2016/05/08
[ "https://Stackoverflow.com/questions/37105074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6301280/" ]
Your code has a *logical* error which makes it broken - very easy to fix. * Your for loop has *empty body* - that's why it only prints the first character. *Semicolon* deleted. There is also a style issue in checking the value of the counter: * Although *checking* `i` against *not* being `100` won't make your code f...
Just use `fgetc` and `putchar`, since you are reading character-by character ``` int c; while ((c = fgetc(fp)) != EOF) putchar(c); ``` Also, check the return value of `fopen`. It returns a `NULL` on failure.
37,105,074
Hello I wrote this code for following question: Write a C program that reads a text file into an array of character. You may assume that the file contains no more than 1000 characters. But code prints only first character of text. Where do I make mistake? ``` FILE *wse; char a[1000]; int i; wse=fopen("21e.txt","...
2016/05/08
[ "https://Stackoverflow.com/questions/37105074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6301280/" ]
Step back a minute and learn the alternatives you have for input in C. You have *character oriented* input functions (`getchar()`, `fgetc()`, etc..) which will read a file one-character-at-a-time. You then have *line-oriented* input functions (e.g. `fgets` and `getline`) which will read lines of input at a time, and fi...
Just use `fgetc` and `putchar`, since you are reading character-by character ``` int c; while ((c = fgetc(fp)) != EOF) putchar(c); ``` Also, check the return value of `fopen`. It returns a `NULL` on failure.
37,105,074
Hello I wrote this code for following question: Write a C program that reads a text file into an array of character. You may assume that the file contains no more than 1000 characters. But code prints only first character of text. Where do I make mistake? ``` FILE *wse; char a[1000]; int i; wse=fopen("21e.txt","...
2016/05/08
[ "https://Stackoverflow.com/questions/37105074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6301280/" ]
Your code has a *logical* error which makes it broken - very easy to fix. * Your for loop has *empty body* - that's why it only prints the first character. *Semicolon* deleted. There is also a style issue in checking the value of the counter: * Although *checking* `i` against *not* being `100` won't make your code f...
Please find the corrected code : ``` FILE *wse; char a[1000]; int i=0; wse=fopen("21e.txt","r"); while(fscanf(wse,"%c",&a[i]) == 1) { printf("%c",a[i]); i++; } ``` Firstly, I corrected the code by removing your semicolon after the for loop. And secondly, replaced for with while loop so that it reads till e...
37,105,074
Hello I wrote this code for following question: Write a C program that reads a text file into an array of character. You may assume that the file contains no more than 1000 characters. But code prints only first character of text. Where do I make mistake? ``` FILE *wse; char a[1000]; int i; wse=fopen("21e.txt","...
2016/05/08
[ "https://Stackoverflow.com/questions/37105074", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6301280/" ]
Step back a minute and learn the alternatives you have for input in C. You have *character oriented* input functions (`getchar()`, `fgetc()`, etc..) which will read a file one-character-at-a-time. You then have *line-oriented* input functions (e.g. `fgets` and `getline`) which will read lines of input at a time, and fi...
Please find the corrected code : ``` FILE *wse; char a[1000]; int i=0; wse=fopen("21e.txt","r"); while(fscanf(wse,"%c",&a[i]) == 1) { printf("%c",a[i]); i++; } ``` Firstly, I corrected the code by removing your semicolon after the for loop. And secondly, replaced for with while loop so that it reads till e...
31,134,013
I'm making my first step in to creating Universal applications - does anyone know what the top bar control is in the Alarms and Clock app? I noted that the middle section is a Pivot and it's switching between PivotItems - but when you change the top icons are highlighted based on the PivotItem ![Alarms and Clock](htt...
2015/06/30
[ "https://Stackoverflow.com/questions/31134013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/251671/" ]
They're just using a pivot with a custom header template. This should provide some insight: <https://msdn.microsoft.com/en-us/library/windows/apps/dn997788.aspx>
You can always debug any Win10 application by running visual studio and attaching the debugger to the process (app) you want to look into. This will also give you all of the styles available and give you a better understanding of the layout. I demo'd this as part of the //BUILD tour earlier this year.
31,134,013
I'm making my first step in to creating Universal applications - does anyone know what the top bar control is in the Alarms and Clock app? I noted that the middle section is a Pivot and it's switching between PivotItems - but when you change the top icons are highlighted based on the PivotItem ![Alarms and Clock](htt...
2015/06/30
[ "https://Stackoverflow.com/questions/31134013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/251671/" ]
They're just using a pivot with a custom header template. This should provide some insight: <https://msdn.microsoft.com/en-us/library/windows/apps/dn997788.aspx>
Have a look at the Pivot sample in the [Windows Universal Sample](https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/XamlPivot) repository on Github. Scenario 3 contains the customized pivot control with the style template. [![enter image description here](https://i.stack.imgur.com/YVS0t.png)](...
31,134,013
I'm making my first step in to creating Universal applications - does anyone know what the top bar control is in the Alarms and Clock app? I noted that the middle section is a Pivot and it's switching between PivotItems - but when you change the top icons are highlighted based on the PivotItem ![Alarms and Clock](htt...
2015/06/30
[ "https://Stackoverflow.com/questions/31134013", "https://Stackoverflow.com", "https://Stackoverflow.com/users/251671/" ]
Have a look at the Pivot sample in the [Windows Universal Sample](https://github.com/Microsoft/Windows-universal-samples/tree/master/Samples/XamlPivot) repository on Github. Scenario 3 contains the customized pivot control with the style template. [![enter image description here](https://i.stack.imgur.com/YVS0t.png)](...
You can always debug any Win10 application by running visual studio and attaching the debugger to the process (app) you want to look into. This will also give you all of the styles available and give you a better understanding of the layout. I demo'd this as part of the //BUILD tour earlier this year.
5,065,610
I'm getting a System.OutOfMemoryException when trying to fetch 185 records from DB using ASP.NET MVC and NHibernate. Here is the code snippet of the method from the Repository class: ``` public IList<RequestForm> GetForFullExport(RequestFormSearchCriteria searchCriteria, string[] restrictRoles) { ... DetachedCri...
2011/02/21
[ "https://Stackoverflow.com/questions/5065610", "https://Stackoverflow.com", "https://Stackoverflow.com/users/119883/" ]
I was facing same problem. You can use StatelessSession and set batch size. it solves the problem related bulk data insertion into database. for more reference : <http://nhforge.org/blogs/nhibernate/archive/2008/10/30/bulk-data-operations-with-nhibernate-s-stateless-sessions.aspx>
The problematic part of the code is `criteriaDoc` which is searching for DB records that contains MS Word files. Those files have large size and that is why I got this exception. I wasn't aware of this, because I took over this application recently. I found it out now, while investigating. Basically, my problem is so...
5,065,610
I'm getting a System.OutOfMemoryException when trying to fetch 185 records from DB using ASP.NET MVC and NHibernate. Here is the code snippet of the method from the Repository class: ``` public IList<RequestForm> GetForFullExport(RequestFormSearchCriteria searchCriteria, string[] restrictRoles) { ... DetachedCri...
2011/02/21
[ "https://Stackoverflow.com/questions/5065610", "https://Stackoverflow.com", "https://Stackoverflow.com/users/119883/" ]
I was facing same problem. You can use StatelessSession and set batch size. it solves the problem related bulk data insertion into database. for more reference : <http://nhforge.org/blogs/nhibernate/archive/2008/10/30/bulk-data-operations-with-nhibernate-s-stateless-sessions.aspx>
You need to setMaxResult so it doesn't fetch all the rows into the list.
26,131,101
Using bootstrap 2, what would be the simplest method of having a static width column on the left and have the right column be fluid. Something like this with 200 px width left column and the right to fill the browser window. ``` ====================== Hello ====================== A | B | 100% 200px| D | ...
2014/09/30
[ "https://Stackoverflow.com/questions/26131101", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2483724/" ]
Short answer to your question is **NO**. Bootstrap 2 uses media queries and percentual measures to achieve their responsive grid layouts. Trying to make an hybrid approach using Bootstrap 2 is completely redundant. You can try this approach. Use `float:left;` on the left column and give a `padding-left:200px;` to the ...
So you basically want the right column to fit the available space. You have 5 options that are not specific to bootstrap but general HTML/CSS: **1) use calc** ``` .left-col { width: 200px; } .right-col { width: calc(100% - 200px); } ``` That obviously excludes IE8 and other [browser...
36,816,896
Context ======= I'm trying to implement a EDSL that loosely resembles IBM's OLP (modelling language for linear programming). Code ==== ### Haskell EDSL Code ``` {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleInstances #-} -- Numbers at the type level data Peano...
2016/04/23
[ "https://Stackoverflow.com/questions/36816896", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3130191/" ]
In order to know what value is actually stored by `Iterate n [] Double`, you must know some information about `n`. This information is typically given by the indices of some GADT, which correspond to the inductive structure of the index itself (commonly known as a [singleton](https://hackage.haskell.org/package/singlet...
You have a few options, all of them amount to encoding the depth of iteration at the value level so that you can pattern match on it. ### GADT The simplest way to do this is to make a GADT for representing iteration of the application of a type constructor: ``` data IterateF peanoNum f a where ZeroF :: a ...
54,785,811
I am working with typescript for the first time and here is my problem. I have the following class: ``` class FileSystemStatistics{ public number: number; public name: string[]; public size: number; public used: number; public usedPercent: number; public physicalLocation: string; } ``` I ana...
2019/02/20
[ "https://Stackoverflow.com/questions/54785811", "https://Stackoverflow.com", "https://Stackoverflow.com/users/10490374/" ]
The problem is not actually in typescript, but in the way how you treat your class. You have to manually assign empty array to your name property, so instead of ``` class FileSystemStatistics{ public number: number; public name: string[]; public size: number; public used: number; public usedPercen...
The class `FileSystemStatistics` you've created don't have any initial value. Which means that `fsObject.name` is `undefined`. You can avoid this issue by providing an initial value to the `name` property. ``` class FileSystemStatistics{ public name: string[] = []; } ``` You can see the output inside [the TypeSc...
52,260,553
I am styling my paragraphs and I have line break after a certain amount of characters. I want to be able to make the line after the break to be aligned left rather than center. ```css .justify { text-align: justify; text-justify: inter-word; } .paragraph { text-align: center; max-width: 220px; word-w...
2018/09/10
[ "https://Stackoverflow.com/questions/52260553", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6141754/" ]
You can use `text-align-last` > > The text-align-last CSS property describes how the last line of a block or a line, right before a forced line break, is aligned. > > > [**MDN**](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align-last) > > > ```css .justify { text-align: justify; text-justify: inte...
```css .justify { text-align: justify; text-justify: inter-word; } .paragraph { text-align: left; max-width: 220px; word-wrap: break-word; word-break: break-all; } ``` ```html <div class='justify'> <p class="paragraph">Hello, my name is Taylor and welcome to my personal website!</p> </div> ```
13,835,309
I am trying the quite new descriptor FREAK from the latest version of OpenCV following the **freak\_demo.cpp** [example](https://github.com/kikohs/freak/blob/master/demo/freak_demo.cpp). Instead of using SURF I use FAST. My basic code is something like this: ``` std::vector<KeyPoint> keypointsA, keypointsB; Mat descri...
2012/12/12
[ "https://Stackoverflow.com/questions/13835309", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1524433/" ]
When doing **matching** there are always some refinement steps for getting rid out of outliers. What I usually do is discarding matches that have a **distance over a threshold**, for example: ``` for (int i = 0; i < matches.size(); i++ ) { if(matches[i].distance > 200) { matches.erase(matches.begin()...
You can also train the descriptor by giving your own selected pairs. And tune the parameters in the constructor. ``` explicit FREAK( bool orientationNormalized = true , bool scaleNormalized = true , float patternScale = 22.0f , int nbOctave = 4 , const vector<int>& selectedPairs = vector<in...
19,051,314
What's the correct form to set up a maven webapp project? It should be able to: * Run with the eclipse embedded tomcat (available in the servers tab). This way I can run/debug the application like a regular webapp. * Run with the maven plugin tomcat7. So far I can only run the run-war goal, couldnt make the "run" go...
2013/09/27
[ "https://Stackoverflow.com/questions/19051314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1607973/" ]
The [Xrm Tool Box](http://xrmtoolbox.codeplex.com/) has an access checker that would help in this situation. The way security works in CRM when querying data is that you do get an exception if the user attempts to perform a select on an entity that they have no read rights at all for. But, if the use has rights to vie...
From DavidJennaway at <http://social.microsoft.com/Forums/en-US/55c22571-0187-4a64-9cc1-94954fa8bdf7/how-to-find-which-security-permission-is-preventing-a-user-from-doing-something> Enable [tracing](http://support.microsoft.com/kb/907490?wa=wsignin1.0 "tracing") and the trace log will indicate the privilegeid and syst...
19,051,314
What's the correct form to set up a maven webapp project? It should be able to: * Run with the eclipse embedded tomcat (available in the servers tab). This way I can run/debug the application like a regular webapp. * Run with the maven plugin tomcat7. So far I can only run the run-war goal, couldnt make the "run" go...
2013/09/27
[ "https://Stackoverflow.com/questions/19051314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1607973/" ]
The [Xrm Tool Box](http://xrmtoolbox.codeplex.com/) has an access checker that would help in this situation. The way security works in CRM when querying data is that you do get an exception if the user attempts to perform a select on an entity that they have no read rights at all for. But, if the use has rights to vie...
From Roshan Mehta at <http://social.microsoft.com/Forums/en-US/55c22571-0187-4a64-9cc1-94954fa8bdf7/how-to-find-which-security-permission-is-preventing-a-user-from-doing-something> Check the Event Viewer. This usually gives sufficient information about missing privileges when a plugin fails to run under user context. ...
19,051,314
What's the correct form to set up a maven webapp project? It should be able to: * Run with the eclipse embedded tomcat (available in the servers tab). This way I can run/debug the application like a regular webapp. * Run with the maven plugin tomcat7. So far I can only run the run-war goal, couldnt make the "run" go...
2013/09/27
[ "https://Stackoverflow.com/questions/19051314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1607973/" ]
The [Xrm Tool Box](http://xrmtoolbox.codeplex.com/) has an access checker that would help in this situation. The way security works in CRM when querying data is that you do get an exception if the user attempts to perform a select on an entity that they have no read rights at all for. But, if the use has rights to vie...
From Imran I Abbasi at <http://social.microsoft.com/Forums/en-US/55c22571-0187-4a64-9cc1-94954fa8bdf7/how-to-find-which-security-permission-is-preventing-a-user-from-doing-something> David is right, there isn't any easier way to get to the root of your issue. Enable tracing and then use privilegeId (a GUID) from traci...
19,051,314
What's the correct form to set up a maven webapp project? It should be able to: * Run with the eclipse embedded tomcat (available in the servers tab). This way I can run/debug the application like a regular webapp. * Run with the maven plugin tomcat7. So far I can only run the run-war goal, couldnt make the "run" go...
2013/09/27
[ "https://Stackoverflow.com/questions/19051314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1607973/" ]
The [Xrm Tool Box](http://xrmtoolbox.codeplex.com/) has an access checker that would help in this situation. The way security works in CRM when querying data is that you do get an exception if the user attempts to perform a select on an entity that they have no read rights at all for. But, if the use has rights to vie...
From Suumit Bhatanagar at <https://community.dynamics.com/crm/f/117/p/113149/228873.aspx> You may collect verbose level of traces , would direct you in the right direction. Simply reproducing the issue by clicking on the button and then stop the traces. For traces , you may look into : <http://support.microsoft.com/k...
19,051,314
What's the correct form to set up a maven webapp project? It should be able to: * Run with the eclipse embedded tomcat (available in the servers tab). This way I can run/debug the application like a regular webapp. * Run with the maven plugin tomcat7. So far I can only run the run-war goal, couldnt make the "run" go...
2013/09/27
[ "https://Stackoverflow.com/questions/19051314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1607973/" ]
From Suumit Bhatanagar at <https://community.dynamics.com/crm/f/117/p/113149/228873.aspx> You may collect verbose level of traces , would direct you in the right direction. Simply reproducing the issue by clicking on the button and then stop the traces. For traces , you may look into : <http://support.microsoft.com/k...
From DavidJennaway at <http://social.microsoft.com/Forums/en-US/55c22571-0187-4a64-9cc1-94954fa8bdf7/how-to-find-which-security-permission-is-preventing-a-user-from-doing-something> Enable [tracing](http://support.microsoft.com/kb/907490?wa=wsignin1.0 "tracing") and the trace log will indicate the privilegeid and syst...
19,051,314
What's the correct form to set up a maven webapp project? It should be able to: * Run with the eclipse embedded tomcat (available in the servers tab). This way I can run/debug the application like a regular webapp. * Run with the maven plugin tomcat7. So far I can only run the run-war goal, couldnt make the "run" go...
2013/09/27
[ "https://Stackoverflow.com/questions/19051314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1607973/" ]
From Suumit Bhatanagar at <https://community.dynamics.com/crm/f/117/p/113149/228873.aspx> You may collect verbose level of traces , would direct you in the right direction. Simply reproducing the issue by clicking on the button and then stop the traces. For traces , you may look into : <http://support.microsoft.com/k...
From Roshan Mehta at <http://social.microsoft.com/Forums/en-US/55c22571-0187-4a64-9cc1-94954fa8bdf7/how-to-find-which-security-permission-is-preventing-a-user-from-doing-something> Check the Event Viewer. This usually gives sufficient information about missing privileges when a plugin fails to run under user context. ...
19,051,314
What's the correct form to set up a maven webapp project? It should be able to: * Run with the eclipse embedded tomcat (available in the servers tab). This way I can run/debug the application like a regular webapp. * Run with the maven plugin tomcat7. So far I can only run the run-war goal, couldnt make the "run" go...
2013/09/27
[ "https://Stackoverflow.com/questions/19051314", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1607973/" ]
From Suumit Bhatanagar at <https://community.dynamics.com/crm/f/117/p/113149/228873.aspx> You may collect verbose level of traces , would direct you in the right direction. Simply reproducing the issue by clicking on the button and then stop the traces. For traces , you may look into : <http://support.microsoft.com/k...
From Imran I Abbasi at <http://social.microsoft.com/Forums/en-US/55c22571-0187-4a64-9cc1-94954fa8bdf7/how-to-find-which-security-permission-is-preventing-a-user-from-doing-something> David is right, there isn't any easier way to get to the root of your issue. Enable tracing and then use privilegeId (a GUID) from traci...
77,187
Several months ago, I was in a session playing as a bard wanting to distract some bugbears while he snuck past. Understanding the goblinoid tongue, I heard one of them state he was starving. I used the phantasmal force spell on one of the bug bears, lets call him BugA. The desired effect was he would see one of the oth...
2016/03/16
[ "https://rpg.stackexchange.com/questions/77187", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/27898/" ]
There are problems with this use. --------------------------------- First, Phantasmal Force only *creates* illusory objects, not *replaces* real objects. You could have a pile of delicious food seemingly surround BugB, but if the BugB steps out of Phantasm's area of effect, he stops being affected at all by the obscur...
The victim will see a pile of food . . . and another bugbear. You are attempting to use give the spell a level of independent action that is well beyond the intent and capability of the spell. Although you are allowed to create a phantasm that moves, you are not allowed to create a phantasm that reacts intelligently a...
77,187
Several months ago, I was in a session playing as a bard wanting to distract some bugbears while he snuck past. Understanding the goblinoid tongue, I heard one of them state he was starving. I used the phantasmal force spell on one of the bug bears, lets call him BugA. The desired effect was he would see one of the oth...
2016/03/16
[ "https://rpg.stackexchange.com/questions/77187", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/27898/" ]
**Yes, the affected target can hear the other bug bear, but it might not matter because illogical outcomes are internally rationalized by the affected creature.** Source: PHB pg. 264, Phantasmal Force > > The target rationalizes any illogical outcomes from interacting with the > phantasm. > > > So if the other...
The victim will see a pile of food . . . and another bugbear. You are attempting to use give the spell a level of independent action that is well beyond the intent and capability of the spell. Although you are allowed to create a phantasm that moves, you are not allowed to create a phantasm that reacts intelligently a...
77,187
Several months ago, I was in a session playing as a bard wanting to distract some bugbears while he snuck past. Understanding the goblinoid tongue, I heard one of them state he was starving. I used the phantasmal force spell on one of the bug bears, lets call him BugA. The desired effect was he would see one of the oth...
2016/03/16
[ "https://rpg.stackexchange.com/questions/77187", "https://rpg.stackexchange.com", "https://rpg.stackexchange.com/users/27898/" ]
**Yes, the affected target can hear the other bug bear, but it might not matter because illogical outcomes are internally rationalized by the affected creature.** Source: PHB pg. 264, Phantasmal Force > > The target rationalizes any illogical outcomes from interacting with the > phantasm. > > > So if the other...
There are problems with this use. --------------------------------- First, Phantasmal Force only *creates* illusory objects, not *replaces* real objects. You could have a pile of delicious food seemingly surround BugB, but if the BugB steps out of Phantasm's area of effect, he stops being affected at all by the obscur...
71,626,779
I want to create a `User` which has multiple `Item`s but only one item of a specific type. The tables will look something like this. 1st table: `item` | id | type | name | | --- | --- | --- | | 1 | first | name1 | | 2 | first | name2 | | 3 | normal | name3 | | 4 | normal | name4 | | 5 | normal | name5 | 2nd table: `...
2022/03/26
[ "https://Stackoverflow.com/questions/71626779", "https://Stackoverflow.com", "https://Stackoverflow.com/users/16926827/" ]
If I understood you question correct, you are on a totally wrong path. You have User and you have items and you have items picked by users. That means you need three tables. User table has some columns like id, name etc… Items have columns like id, name, etc… Items picked by user have 3 attributes Userid (foreign k...
From what I read, I understood that a user can have multiple items but I didn't quite understand if the same item can be owned by different users. In the case where the same instance of an item can be owned by different users then you need a many-to-many relationship which will produce the following tables: Users, Ite...
24,368,436
I wanna do: ``` let Some(x) = bar in ... ``` but I can't do this unless I do ``` let Some(x) as idontcare = bar in ... ``` is there a better way to say "I don't care about the whole pattern, just match the inside" (I would use `_` but that doesn't parse so I am using `__` instead) Yes I know this is partial, I ...
2014/06/23
[ "https://Stackoverflow.com/questions/24368436", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3926/" ]
``` let Some(x) = bar ``` defines a new function `Some`, shadowing the existing constructor. Instead, you want: ``` let (Some(x)) = bar ```
You could use a `match`: ``` match bar with | Some(x) -> ... ``` if you're trying to match an option specifically you could use `Option.get`: ``` bar |> Option.get |> ... ```
29,013,249
I have a function, which will either return a cached template or if the template has not been cached - it will load it via AJAX and then return it. Here's what I've got: ``` var getTpl = function( name ) { var cached = cache.get( 'templates' ) || {}; if( cached.hasOwnProperty( name ) ) { console.log...
2015/03/12
[ "https://Stackoverflow.com/questions/29013249", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1704673/" ]
You can use promise/deferred concept to achieve your needs ``` var getTpl = function( name ) { var promise; var cached = cache.get( 'templates' ) || {}; if( cached.hasOwnProperty( name ) ) { console.log( 'template ' + name + '.mustache found in cache' ); var df = new $.Deferred(); ...
Since you appear to appear to already be using underscore/lodash, you can make use of memoization rather than maintaining your own cache. The beauty of promises is that you can access them again and again and they will always produce the same value: ``` var getTpl = _.memoize(function( name ) { console.log( 'req...
119,174
How can I automate a find & replace function to change the font colour of all suit symbols document wide? I write bridge articles (card game), and I need to automate this formatting constantly: Find all "♣" and color the text green (#00b700). Find all "♦" and color the text orange (#ff8100). Find all "♥" and color th...
2018/07/29
[ "https://webapps.stackexchange.com/questions/119174", "https://webapps.stackexchange.com", "https://webapps.stackexchange.com/users/191672/" ]
To do a find-and-replace with formatting, you will need to use Google Apps Script. I am going to assume you are already familiar with GAS, but if not please reply with a comment on this post. This script provides an example where you can change the background color of all 4 suits to the same color, by adding a menu to...
Use the Reversible Formulas add-on for your next article. In your doc, write for example: > > c = (["♣", {color: "#00B700"}]) > > d = (["♦", {color: "#FF8100"}]) > > s = (["♠", {color: "#0000FF"}]) > > h = (["♥", {color: "#FF0000"}]) > > > What can you do with =c =d =s and =h? > ==========================...
52,484,912
I have a **Posts Feed** (Something like Facebook News Feed) Activity and in it's layout I have an **EditText**, share **Button** at the top and a **RecyclerView** below it. The RecyclerView shows the Posts of all users by getting all the Posts from Server and binding data through Adapter in `OnCreate` Method. When a U...
2018/09/24
[ "https://Stackoverflow.com/questions/52484912", "https://Stackoverflow.com", "https://Stackoverflow.com/users/5631594/" ]
I solved the above problem with the help of [Arsalan Khan](https://stackoverflow.com/a/52496890/5631594) Answer. Actually the `initRecyclerView()` was not executing outside the `onResponse()` method. Including it inside the `onResponse()` method and using `notifyDataSetChanged()` instead of `initRecyclerView()` solved...
should call initRecyclerView here: ``` private void displayFeedPosts() { Call<FeedPosts> call = mAPIService.displayFeedPosts(apiKey); call.enqueue(new Callback<FeedPosts>() { @Override public void onResponse(@NonNull Call<FeedPosts> call, @NonNull Response<FeedPosts> response) {...
1,419,638
> > Suppose we toss a fair coin *until* we get exactly 2 heads. What is > the probability that exactly 5 tosses are required? > > > --- My try: We have to make sure that the first 4 tosses does not have 2 heads and the last toss must be a head. That is, the first 4 tosses need to contain 1 head and 3 tails. The...
2015/09/03
[ "https://math.stackexchange.com/questions/1419638", "https://math.stackexchange.com", "https://math.stackexchange.com/users/124358/" ]
If you look in a non-mathematical dictionary, you will often find both definitions. For example, <http://www.oxforddictionaries.com/us/definition/american_english/quartile> defines *quartile* as > > 1 Each of four equal groups into which a population can be divided according to the distribution of values of a particu...
Note: This is really just a long comment - but maybe it's helpful. This seems to me to be purely a matter of context. I have never seen anything like this before, with only 3 quartiles - it's written into the word itself that there should be 4 (QUART-iles). That said, this kind of thing happens in mathematics relative...
1,419,638
> > Suppose we toss a fair coin *until* we get exactly 2 heads. What is > the probability that exactly 5 tosses are required? > > > --- My try: We have to make sure that the first 4 tosses does not have 2 heads and the last toss must be a head. That is, the first 4 tosses need to contain 1 head and 3 tails. The...
2015/09/03
[ "https://math.stackexchange.com/questions/1419638", "https://math.stackexchange.com", "https://math.stackexchange.com/users/124358/" ]
If you look in a non-mathematical dictionary, you will often find both definitions. For example, <http://www.oxforddictionaries.com/us/definition/american_english/quartile> defines *quartile* as > > 1 Each of four equal groups into which a population can be divided according to the distribution of values of a particu...
The word quartile refers to *both* the four partitions (or quarters) of the data set, and to the three points that mark these divisions. After all, we can't have one without the other. When citing a *value* for a quartile, though, we are specifically referring to the three dividing points, else it'd be meaningless. T...
4,951,201
/controller/action but what if we have /controller/action/subaction How do you add this "subaction" to controller?
2011/02/09
[ "https://Stackoverflow.com/questions/4951201", "https://Stackoverflow.com", "https://Stackoverflow.com/users/177389/" ]
There are no sub-actions in an MVC design. What you can do is set "subaction" as a parameter or argument to the action. If you don't want to use the default `param/value` pairing, you would need to set up a custom route to recognise a single value. To choose a different view, you use the `ViewRenderer` action helper....
you can create Facades somewhere else, then write mod\_rewrite to redirect all ^/controller/.\* URLs to /controller/ and redirect all requests in init() method to correspondent method in Facade you can also try to create something like YourController that extends Zend\_Controller\_Action, and modify all controllers to...
14,257,054
I have some jQuery code that runs when an item with a certain ID is clicked on. It's working when the ID is part of an `<li>` element, but not when it's in an `<a>` element. Why would this be? I'd like to use an as it allows me to achieve some stuff if the user has JavaScript turned off. **EDIT:** Neither preventdefau...
2013/01/10
[ "https://Stackoverflow.com/questions/14257054", "https://Stackoverflow.com", "https://Stackoverflow.com/users/709443/" ]
i think you are not preventing the default event when using with `<a>` tags, so try doing: ``` $(function() { $("#OfficeNav-Bath").click(function(e){ e.preventDefault(); $('.office').removeClass('visible'); }); }); ```
You must add to click event a simple thing: ``` e.preventDefault(); ```
14,257,054
I have some jQuery code that runs when an item with a certain ID is clicked on. It's working when the ID is part of an `<li>` element, but not when it's in an `<a>` element. Why would this be? I'd like to use an as it allows me to achieve some stuff if the user has JavaScript turned off. **EDIT:** Neither preventdefau...
2013/01/10
[ "https://Stackoverflow.com/questions/14257054", "https://Stackoverflow.com", "https://Stackoverflow.com/users/709443/" ]
i think you are not preventing the default event when using with `<a>` tags, so try doing: ``` $(function() { $("#OfficeNav-Bath").click(function(e){ e.preventDefault(); $('.office').removeClass('visible'); }); }); ```
When an anchor element is clicked the browser tries to navigate to the URL to which the anchor's `href` attribute points. It's possible to override this behaviour using the method `preventDefault` on the `event` object that the event handler receives as paramenter. ``` $("#OfficeNav-Bath").click(function(event){ ...
288,767
Help me please with this question. Let $f(x)$ is a differentiable function in$ [a,b]$. How using Mean value theorem to show that if $f'(x)$ is bounded in $[a,b]$ then $f(x)$ is uniformly continuous in $[a,b]$? Thanks!
2013/01/28
[ "https://math.stackexchange.com/questions/288767", "https://math.stackexchange.com", "https://math.stackexchange.com/users/48369/" ]
Suppose $\left| f^\prime(x) \right| \leq B$ for all $x \in [a,b]$. Fix an $\varepsilon > 0$. We want to find a $\delta > 0$ that depends $\textit{only on }$ $\varepsilon$ such that, whenever $\left| x-y \right| < \delta$, then we have $\left| f(x) - f(y) \right| < \varepsilon$. [This is just the definition of uniform...
You can show that $f$ is Lipschitz: for $x<y \in [a,b]$, there exists $z \in [x,y]$ such that $f(x)-f(y)=f'(z)(x-y)$, hence $|f(x)-f(y)| \leq K|x-y|$ with $|f'| \leq K$.
288,767
Help me please with this question. Let $f(x)$ is a differentiable function in$ [a,b]$. How using Mean value theorem to show that if $f'(x)$ is bounded in $[a,b]$ then $f(x)$ is uniformly continuous in $[a,b]$? Thanks!
2013/01/28
[ "https://math.stackexchange.com/questions/288767", "https://math.stackexchange.com", "https://math.stackexchange.com/users/48369/" ]
Suppose $\left| f^\prime(x) \right| \leq B$ for all $x \in [a,b]$. Fix an $\varepsilon > 0$. We want to find a $\delta > 0$ that depends $\textit{only on }$ $\varepsilon$ such that, whenever $\left| x-y \right| < \delta$, then we have $\left| f(x) - f(y) \right| < \varepsilon$. [This is just the definition of uniform...
$f$ is uniformly continuous anyhow since $[a,b]$ is compact..