qid
int64
1
74.7M
question
stringlengths
15
58.3k
date
stringlengths
10
10
metadata
list
response_j
stringlengths
4
30.2k
response_k
stringlengths
11
36.5k
32,426,603
I am using Crossbars dynamic authorization to authorize all RPCs in my application. Is it or will it be possible to access the arguments of the RPC in the authorizer?
2015/09/06
[ "https://Stackoverflow.com/questions/32426603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3595357/" ]
It is better to remove NodeJS and its modules manually because installation leaves a lot of files, links and modules behind and later this creates problems when we reconfigure another version of NodeJS and its modules. To remove the files, run the following commands: ```none sudo rm -rf /usr/local/bin/npm sudo rm -r...
> > It bothered me too much while updating node version from 8.1.0 to > 10.14.0 > > > Here is what worked for me: 1. Open terminal (`Ctrl`+`Alt`+`T`). 2. Type `which node`, which will give a path something like `/usr/local/bin/node` 3. Run the command `sudo rm /usr/local/bin/node` to remove the binary (adjust the...
32,426,603
I am using Crossbars dynamic authorization to authorize all RPCs in my application. Is it or will it be possible to access the arguments of the RPC in the authorizer?
2015/09/06
[ "https://Stackoverflow.com/questions/32426603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3595357/" ]
Note: This will completely remove nodejs from your system; then you can make a fresh install from the below commands. Removing Nodejs and Npm ```none sudo apt-get remove nodejs npm node sudo apt-get purge nodejs ``` Now remove `.node` and `.npm` folders from your system ```none sudo rm -rf /usr/local/bin/npm sudo...
I was crazy to delete node and npm and nodejs from my Ubuntu 14.04 but with this steps you will remove it: ```none sudo apt-get uninstall nodejs npm node sudo apt-get remove nodejs npm node ``` If you uninstall correctly and it is still there, check these links: * [Stack Overflow answer with more information](https...
32,426,603
I am using Crossbars dynamic authorization to authorize all RPCs in my application. Is it or will it be possible to access the arguments of the RPC in the authorizer?
2015/09/06
[ "https://Stackoverflow.com/questions/32426603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3595357/" ]
Note: This will completely remove nodejs from your system; then you can make a fresh install from the below commands. Removing Nodejs and Npm ```none sudo apt-get remove nodejs npm node sudo apt-get purge nodejs ``` Now remove `.node` and `.npm` folders from your system ```none sudo rm -rf /usr/local/bin/npm sudo...
Try the following commands: ```none $ sudo apt-get install nodejs $ sudo apt-get install aptitude $ sudo aptitude install npm ```
32,426,603
I am using Crossbars dynamic authorization to authorize all RPCs in my application. Is it or will it be possible to access the arguments of the RPC in the authorizer?
2015/09/06
[ "https://Stackoverflow.com/questions/32426603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3595357/" ]
Those who installed node.js via the package manager can just run: ```none sudo apt-get purge nodejs ``` Optionally if you have installed it by adding the official NodeSource repository as stated in [*Installing Node.js via package manager*](https://nodejs.org/en/download/package-manager/), do: ```none sudo rm /etc/...
Try the following commands: ```none $ sudo apt-get install nodejs $ sudo apt-get install aptitude $ sudo aptitude install npm ```
32,426,603
I am using Crossbars dynamic authorization to authorize all RPCs in my application. Is it or will it be possible to access the arguments of the RPC in the authorizer?
2015/09/06
[ "https://Stackoverflow.com/questions/32426603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3595357/" ]
It is better to remove NodeJS and its modules manually because installation leaves a lot of files, links and modules behind and later this creates problems when we reconfigure another version of NodeJS and its modules. To remove the files, run the following commands: ```none sudo rm -rf /usr/local/bin/npm sudo rm -r...
I was crazy to delete node and npm and nodejs from my Ubuntu 14.04 but with this steps you will remove it: ```none sudo apt-get uninstall nodejs npm node sudo apt-get remove nodejs npm node ``` If you uninstall correctly and it is still there, check these links: * [Stack Overflow answer with more information](https...
32,426,603
I am using Crossbars dynamic authorization to authorize all RPCs in my application. Is it or will it be possible to access the arguments of the RPC in the authorizer?
2015/09/06
[ "https://Stackoverflow.com/questions/32426603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3595357/" ]
```none sudo apt-get remove nodejs sudo apt-get remove npm ``` Then go to `/etc/apt/sources.list.d` and remove any node list if you have. Then do a ```none sudo apt-get update ``` **Check for any `.npm` or `.node` folder in your home folder and delete those.** If you type ```none which node ``` you can see the...
It is better to remove NodeJS and its modules manually because installation leaves a lot of files, links and modules behind and later this creates problems when we reconfigure another version of NodeJS and its modules. To remove the files, run the following commands: ```none sudo rm -rf /usr/local/bin/npm sudo rm -r...
32,426,603
I am using Crossbars dynamic authorization to authorize all RPCs in my application. Is it or will it be possible to access the arguments of the RPC in the authorizer?
2015/09/06
[ "https://Stackoverflow.com/questions/32426603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3595357/" ]
I was crazy to delete node and npm and nodejs from my Ubuntu 14.04 but with this steps you will remove it: ```none sudo apt-get uninstall nodejs npm node sudo apt-get remove nodejs npm node ``` If you uninstall correctly and it is still there, check these links: * [Stack Overflow answer with more information](https...
Try the following commands: ```none $ sudo apt-get install nodejs $ sudo apt-get install aptitude $ sudo aptitude install npm ```
32,426,603
I am using Crossbars dynamic authorization to authorize all RPCs in my application. Is it or will it be possible to access the arguments of the RPC in the authorizer?
2015/09/06
[ "https://Stackoverflow.com/questions/32426603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3595357/" ]
```none sudo apt-get remove nodejs sudo apt-get remove npm ``` Then go to `/etc/apt/sources.list.d` and remove any node list if you have. Then do a ```none sudo apt-get update ``` **Check for any `.npm` or `.node` folder in your home folder and delete those.** If you type ```none which node ``` you can see the...
Note: This will completely remove nodejs from your system; then you can make a fresh install from the below commands. Removing Nodejs and Npm ```none sudo apt-get remove nodejs npm node sudo apt-get purge nodejs ``` Now remove `.node` and `.npm` folders from your system ```none sudo rm -rf /usr/local/bin/npm sudo...
32,426,603
I am using Crossbars dynamic authorization to authorize all RPCs in my application. Is it or will it be possible to access the arguments of the RPC in the authorizer?
2015/09/06
[ "https://Stackoverflow.com/questions/32426603", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3595357/" ]
```none sudo apt-get remove nodejs sudo apt-get remove npm ``` Then go to `/etc/apt/sources.list.d` and remove any node list if you have. Then do a ```none sudo apt-get update ``` **Check for any `.npm` or `.node` folder in your home folder and delete those.** If you type ```none which node ``` you can see the...
Those who installed node.js via the package manager can just run: ```none sudo apt-get purge nodejs ``` Optionally if you have installed it by adding the official NodeSource repository as stated in [*Installing Node.js via package manager*](https://nodejs.org/en/download/package-manager/), do: ```none sudo rm /etc/...
19,697,216
I have an `IBAction` with a `UIButton` that enables the edit mode. I'd like to hit the same `UIButton` and cancel the edit mode. If I use an `if-else` statement, what do I check for : `if(editeModeEnabled)//turn it off, else turn it on` ... so I can use the same `UIButton` for both on and off. Thanks much.
2013/10/31
[ "https://Stackoverflow.com/questions/19697216", "https://Stackoverflow.com", "https://Stackoverflow.com/users/945398/" ]
You can check for the `tableView.editing == YES` eg: ``` if(self.tableView.editing) //Turn editing off/save changes else { //Turn editing on [self.tableView setEditing:YES animated:YES]; } ```
If the button is a bar button item, then the easiest way to toggle the edit button is to set the bar button item to the pre-configured editButtonItem. ``` - (void)viewDidLoad { [super viewDidLoad]; self.navigationItem.leftBarButtonItem = self.editButtonItem; } ``` This special button automatically toggles ...
8,410,204
Is this possible? I am using javascript, AJAX and JSON to pull data from a Java servlet and i'd like to display elements of the javascript array I create within my HTML (as opposed to creating large chunks of HTML within javascript). I know I can muck up my html using: ``` <script>document.write(arrayVar[0].firstName)...
2011/12/07
[ "https://Stackoverflow.com/questions/8410204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/838151/" ]
You could use any javascript templating library like <http://mustache.github.com/> or ones that come with [underscore.js](http://www.google.co.nz/url?sa=t&rct=j&q=underscore%20js&source=web&cd=1&ved=0CCUQFjAA&url=http://documentcloud.github.com/underscore/&ei=5OfeToOFJK-wiQf-x7iXBQ&usg=AFQjCNEXceoJ8inqUBK5IAIn9eJiHgrNv...
I do try to avoid `document.write` wherever possible as it can mess up pages when this call is returned in HTML through AJAX. Unfortunately, to answer your question, probably not - at least not in a way better than you're currently doing. `document.write` can be avoided by instead using the DOM methods, such as: ``` ...
8,410,204
Is this possible? I am using javascript, AJAX and JSON to pull data from a Java servlet and i'd like to display elements of the javascript array I create within my HTML (as opposed to creating large chunks of HTML within javascript). I know I can muck up my html using: ``` <script>document.write(arrayVar[0].firstName)...
2011/12/07
[ "https://Stackoverflow.com/questions/8410204", "https://Stackoverflow.com", "https://Stackoverflow.com/users/838151/" ]
You could use any javascript templating library like <http://mustache.github.com/> or ones that come with [underscore.js](http://www.google.co.nz/url?sa=t&rct=j&q=underscore%20js&source=web&cd=1&ved=0CCUQFjAA&url=http://documentcloud.github.com/underscore/&ei=5OfeToOFJK-wiQf-x7iXBQ&usg=AFQjCNEXceoJ8inqUBK5IAIn9eJiHgrNv...
Saxon-CE (currently an Alpha release) is an XSLT 2 processor with extensions for browser interaction - it's implemented in JavaScript and deployed in the same way as a JS library. With this, you could write a template to iterate the JavaScript array (by calling a JS function) and insert each value into an HTML literal...
53,854,416
I wrote a new method into my Controller of my ASP.Net MVC project and getting error below. I think `InvalidOperationException` coming from with Swagger. I marked it as "ignored Api" hoping it will skip the method but error still there: ``` [ApiExplorerSettings(IgnoreApi = true)] public decimal CalculatePriceWithCampai...
2018/12/19
[ "https://Stackoverflow.com/questions/53854416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4369951/" ]
The error is coming from model binding and is not related to Swagger (the presence of `ApiExplorerSettings` attribute has no impact on error). You have two complex parameters. i.e. of Complex types ``` BeverageCapacityCampaign BeverageCapacity ``` The **default** for **Model Binding** is to **bind complex parame...
I got this error by inheriting from BaseController instead of ControllerBase. It was a class from another library that is completely unrelated and I misremembered the name. The exception was a red herring for me.
53,854,416
I wrote a new method into my Controller of my ASP.Net MVC project and getting error below. I think `InvalidOperationException` coming from with Swagger. I marked it as "ignored Api" hoping it will skip the method but error still there: ``` [ApiExplorerSettings(IgnoreApi = true)] public decimal CalculatePriceWithCampai...
2018/12/19
[ "https://Stackoverflow.com/questions/53854416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4369951/" ]
The error is coming from model binding and is not related to Swagger (the presence of `ApiExplorerSettings` attribute has no impact on error). You have two complex parameters. i.e. of Complex types ``` BeverageCapacityCampaign BeverageCapacity ``` The **default** for **Model Binding** is to **bind complex parame...
I received error "has more than one parameter that was specified ..." for having mention of [ApiController] on top of class and then inheriting class from APIController. Corrected issue by inheriting the class from Controller. ``` [Authorize] [Route("api/the")] **[ApiController]** public class TheController : **Contr...
53,854,416
I wrote a new method into my Controller of my ASP.Net MVC project and getting error below. I think `InvalidOperationException` coming from with Swagger. I marked it as "ignored Api" hoping it will skip the method but error still there: ``` [ApiExplorerSettings(IgnoreApi = true)] public decimal CalculatePriceWithCampai...
2018/12/19
[ "https://Stackoverflow.com/questions/53854416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4369951/" ]
My controller has some refactored code whose methods are marked public. Looks like either moving them out of the controller or marking private corrects this problem. Or attributing the pesky methods with `[NonAction]` might also be a choice as asked at [asp.net Core mvc hide and exclude Web Api Controller Method](https...
I got this error by inheriting from BaseController instead of ControllerBase. It was a class from another library that is completely unrelated and I misremembered the name. The exception was a red herring for me.
53,854,416
I wrote a new method into my Controller of my ASP.Net MVC project and getting error below. I think `InvalidOperationException` coming from with Swagger. I marked it as "ignored Api" hoping it will skip the method but error still there: ``` [ApiExplorerSettings(IgnoreApi = true)] public decimal CalculatePriceWithCampai...
2018/12/19
[ "https://Stackoverflow.com/questions/53854416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4369951/" ]
For me in the definition of the a new controller automatically add this prerequisite. I removed it and it works ```cs [Route("api/[controller]")] [Apicontroller] //remove this line ```
Another possible solution is to nest the complex data types in a tuple: ```cs [ApiExplorerSettings(IgnoreApi = true)] public decimal CalculatePriceWithCampaign((BeverageCapacityCampaign campaign, BeverageCapacity capacity) data, int count = 1) { switch (data.campaign.DiscountType) { case DiscountType.F...
53,854,416
I wrote a new method into my Controller of my ASP.Net MVC project and getting error below. I think `InvalidOperationException` coming from with Swagger. I marked it as "ignored Api" hoping it will skip the method but error still there: ``` [ApiExplorerSettings(IgnoreApi = true)] public decimal CalculatePriceWithCampai...
2018/12/19
[ "https://Stackoverflow.com/questions/53854416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4369951/" ]
For me in the definition of the a new controller automatically add this prerequisite. I removed it and it works ```cs [Route("api/[controller]")] [Apicontroller] //remove this line ```
In my case, the problem was that in the controller I had public methods that are not endpoints. And the ASP.NET Core mapping for controllers treats all public methods as endpoints and tries to map the request model because it uses reflection.
53,854,416
I wrote a new method into my Controller of my ASP.Net MVC project and getting error below. I think `InvalidOperationException` coming from with Swagger. I marked it as "ignored Api" hoping it will skip the method but error still there: ``` [ApiExplorerSettings(IgnoreApi = true)] public decimal CalculatePriceWithCampai...
2018/12/19
[ "https://Stackoverflow.com/questions/53854416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4369951/" ]
The error is coming from model binding and is not related to Swagger (the presence of `ApiExplorerSettings` attribute has no impact on error). You have two complex parameters. i.e. of Complex types ``` BeverageCapacityCampaign BeverageCapacity ``` The **default** for **Model Binding** is to **bind complex parame...
My controller has some refactored code whose methods are marked public. Looks like either moving them out of the controller or marking private corrects this problem. Or attributing the pesky methods with `[NonAction]` might also be a choice as asked at [asp.net Core mvc hide and exclude Web Api Controller Method](https...
53,854,416
I wrote a new method into my Controller of my ASP.Net MVC project and getting error below. I think `InvalidOperationException` coming from with Swagger. I marked it as "ignored Api" hoping it will skip the method but error still there: ``` [ApiExplorerSettings(IgnoreApi = true)] public decimal CalculatePriceWithCampai...
2018/12/19
[ "https://Stackoverflow.com/questions/53854416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4369951/" ]
In my case, the problem was that in the controller I had public methods that are not endpoints. And the ASP.NET Core mapping for controllers treats all public methods as endpoints and tries to map the request model because it uses reflection.
Another possible solution is to nest the complex data types in a tuple: ```cs [ApiExplorerSettings(IgnoreApi = true)] public decimal CalculatePriceWithCampaign((BeverageCapacityCampaign campaign, BeverageCapacity capacity) data, int count = 1) { switch (data.campaign.DiscountType) { case DiscountType.F...
53,854,416
I wrote a new method into my Controller of my ASP.Net MVC project and getting error below. I think `InvalidOperationException` coming from with Swagger. I marked it as "ignored Api" hoping it will skip the method but error still there: ``` [ApiExplorerSettings(IgnoreApi = true)] public decimal CalculatePriceWithCampai...
2018/12/19
[ "https://Stackoverflow.com/questions/53854416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4369951/" ]
The error is coming from model binding and is not related to Swagger (the presence of `ApiExplorerSettings` attribute has no impact on error). You have two complex parameters. i.e. of Complex types ``` BeverageCapacityCampaign BeverageCapacity ``` The **default** for **Model Binding** is to **bind complex parame...
I had this problem but solved it by declaring my method as private.
53,854,416
I wrote a new method into my Controller of my ASP.Net MVC project and getting error below. I think `InvalidOperationException` coming from with Swagger. I marked it as "ignored Api" hoping it will skip the method but error still there: ``` [ApiExplorerSettings(IgnoreApi = true)] public decimal CalculatePriceWithCampai...
2018/12/19
[ "https://Stackoverflow.com/questions/53854416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4369951/" ]
The error is coming from model binding and is not related to Swagger (the presence of `ApiExplorerSettings` attribute has no impact on error). You have two complex parameters. i.e. of Complex types ``` BeverageCapacityCampaign BeverageCapacity ``` The **default** for **Model Binding** is to **bind complex parame...
For me in the definition of the a new controller automatically add this prerequisite. I removed it and it works ```cs [Route("api/[controller]")] [Apicontroller] //remove this line ```
53,854,416
I wrote a new method into my Controller of my ASP.Net MVC project and getting error below. I think `InvalidOperationException` coming from with Swagger. I marked it as "ignored Api" hoping it will skip the method but error still there: ``` [ApiExplorerSettings(IgnoreApi = true)] public decimal CalculatePriceWithCampai...
2018/12/19
[ "https://Stackoverflow.com/questions/53854416", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4369951/" ]
The error is coming from model binding and is not related to Swagger (the presence of `ApiExplorerSettings` attribute has no impact on error). You have two complex parameters. i.e. of Complex types ``` BeverageCapacityCampaign BeverageCapacity ``` The **default** for **Model Binding** is to **bind complex parame...
In my case, the problem was that in the controller I had public methods that are not endpoints. And the ASP.NET Core mapping for controllers treats all public methods as endpoints and tries to map the request model because it uses reflection.
550,880
I know the proper teaching of PEMDAS/PEDMAS/BODMAS/BOMDAS.. is that multiplication and division have equal priority and are evaluated going through the arithmetic expression left to right (So, doing division first if division is left of multiplication in the arithmetic expression, and multiplication first if it is to t...
2013/11/04
[ "https://math.stackexchange.com/questions/550880", "https://math.stackexchange.com", "https://math.stackexchange.com/users/8916/" ]
This question brings to light an excellent example of how we can introduce ambiguity into a language by removing one interpreter rule from a language/interpreter system. A language and the corresponding interpreter go hand in hand. When we construct a language, and the corresponding interpretation rules, the onus is ...
To expand on Losethegame's answer Losethegame answered "I got here by Googling the same question although I'm not sure if (m)any of the commenters have answered it specifically. I think you are right that your rule can't be broken. This can probably be proven algebraically because a\*(b/c)=(a/c)\*b and a+(b-c)=(a-c)+b...
550,880
I know the proper teaching of PEMDAS/PEDMAS/BODMAS/BOMDAS.. is that multiplication and division have equal priority and are evaluated going through the arithmetic expression left to right (So, doing division first if division is left of multiplication in the arithmetic expression, and multiplication first if it is to t...
2013/11/04
[ "https://math.stackexchange.com/questions/550880", "https://math.stackexchange.com", "https://math.stackexchange.com/users/8916/" ]
This question brings to light an excellent example of how we can introduce ambiguity into a language by removing one interpreter rule from a language/interpreter system. A language and the corresponding interpreter go hand in hand. When we construct a language, and the corresponding interpretation rules, the onus is ...
Most of this is above my head, but I take issue with the OP that 3-2+1 cannot be done with addition before subtraction. Subtraction is just adding a negative number, so that calculation is actually (+)3+(-2)+1 No matter what order you do that on your going to get the same result. 3+(-2)+1 = 2 3+1+(-2) = 2 (-2)+3+1...
550,880
I know the proper teaching of PEMDAS/PEDMAS/BODMAS/BOMDAS.. is that multiplication and division have equal priority and are evaluated going through the arithmetic expression left to right (So, doing division first if division is left of multiplication in the arithmetic expression, and multiplication first if it is to t...
2013/11/04
[ "https://math.stackexchange.com/questions/550880", "https://math.stackexchange.com", "https://math.stackexchange.com/users/8916/" ]
It is **false** that your PEDMSA rule (without the left-to-right rule) suffices to correctly evaluate any arithmetic expression. > > $(6/3)/2 \color{red}\ne 6/(3/2)$. > > > $2^{(1^2)} \color{red}\ne (2^1)^{^2}$. > > > This shows that you **still** need the left-to-right rule when processing each arithmetic oper...
To expand on Losethegame's answer Losethegame answered "I got here by Googling the same question although I'm not sure if (m)any of the commenters have answered it specifically. I think you are right that your rule can't be broken. This can probably be proven algebraically because a\*(b/c)=(a/c)\*b and a+(b-c)=(a-c)+b...
550,880
I know the proper teaching of PEMDAS/PEDMAS/BODMAS/BOMDAS.. is that multiplication and division have equal priority and are evaluated going through the arithmetic expression left to right (So, doing division first if division is left of multiplication in the arithmetic expression, and multiplication first if it is to t...
2013/11/04
[ "https://math.stackexchange.com/questions/550880", "https://math.stackexchange.com", "https://math.stackexchange.com/users/8916/" ]
To expand on Losethegame's answer Losethegame answered "I got here by Googling the same question although I'm not sure if (m)any of the commenters have answered it specifically. I think you are right that your rule can't be broken. This can probably be proven algebraically because a\*(b/c)=(a/c)\*b and a+(b-c)=(a-c)+b...
Most of this is above my head, but I take issue with the OP that 3-2+1 cannot be done with addition before subtraction. Subtraction is just adding a negative number, so that calculation is actually (+)3+(-2)+1 No matter what order you do that on your going to get the same result. 3+(-2)+1 = 2 3+1+(-2) = 2 (-2)+3+1...
550,880
I know the proper teaching of PEMDAS/PEDMAS/BODMAS/BOMDAS.. is that multiplication and division have equal priority and are evaluated going through the arithmetic expression left to right (So, doing division first if division is left of multiplication in the arithmetic expression, and multiplication first if it is to t...
2013/11/04
[ "https://math.stackexchange.com/questions/550880", "https://math.stackexchange.com", "https://math.stackexchange.com/users/8916/" ]
It is **false** that your PEDMSA rule (without the left-to-right rule) suffices to correctly evaluate any arithmetic expression. > > $(6/3)/2 \color{red}\ne 6/(3/2)$. > > > $2^{(1^2)} \color{red}\ne (2^1)^{^2}$. > > > This shows that you **still** need the left-to-right rule when processing each arithmetic oper...
Most of this is above my head, but I take issue with the OP that 3-2+1 cannot be done with addition before subtraction. Subtraction is just adding a negative number, so that calculation is actually (+)3+(-2)+1 No matter what order you do that on your going to get the same result. 3+(-2)+1 = 2 3+1+(-2) = 2 (-2)+3+1...
30,165,810
.NET 4.5 has a new namespace [System.Collections.Immutable](https://msdn.microsoft.com/en-us/library/system.collections.immutable(v=vs.111).aspx) > > This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections. > > > I'm confused. Isn't...
2015/05/11
[ "https://Stackoverflow.com/questions/30165810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284795/" ]
With a [`ReadOnlyCollection`](https://msdn.microsoft.com/en-us/library/ms132476(v=vs.110).aspx): > > A collection that is read-only is simply a collection with a wrapper > that prevents modifying the collection; therefore, if changes are made > to the underlying collection, the read-only collection reflects those >...
`ReadOnlyCollection<T>` doesn't solve any of the thread safety problems. It is merely a wrapper around `Ilist<T>`. It doesn't exposes members to modify the collection, but you can always modify it with the underlying collection reference. If the underlying collection is modified, it isn't safe to enumerate the `ReadOn...
30,165,810
.NET 4.5 has a new namespace [System.Collections.Immutable](https://msdn.microsoft.com/en-us/library/system.collections.immutable(v=vs.111).aspx) > > This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections. > > > I'm confused. Isn't...
2015/05/11
[ "https://Stackoverflow.com/questions/30165810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284795/" ]
`ReadOnlyCollection`, as the name suggests, can only be read. On the other hand, you can append/remove items to/from an `ImmutableList` by calling its `Add`/`Remove`/`Clear` methods, for example, which return a new immutable list.
The main benefit is memory efficiency, not thread-safety. The immutable collections in [System.Collections.Immutable](https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable?view=net-6.0) are designed in a way that allows modified versions of the collection to share data structures with un-modified c...
30,165,810
.NET 4.5 has a new namespace [System.Collections.Immutable](https://msdn.microsoft.com/en-us/library/system.collections.immutable(v=vs.111).aspx) > > This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections. > > > I'm confused. Isn't...
2015/05/11
[ "https://Stackoverflow.com/questions/30165810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284795/" ]
With a [`ReadOnlyCollection`](https://msdn.microsoft.com/en-us/library/ms132476(v=vs.110).aspx): > > A collection that is read-only is simply a collection with a wrapper > that prevents modifying the collection; therefore, if changes are made > to the underlying collection, the read-only collection reflects those >...
So far all technical aspects was told but no code. I created a small example shows main difference. ``` List<string> strings = new List<string>() { "Visual Studio 2017","Visual Studio 2019" }; ReadOnlyCollection<string> readOnlyStrings = strings.AsReadOnly(); var immutableList = strings.ToImmutableList(); strings....
30,165,810
.NET 4.5 has a new namespace [System.Collections.Immutable](https://msdn.microsoft.com/en-us/library/system.collections.immutable(v=vs.111).aspx) > > This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections. > > > I'm confused. Isn't...
2015/05/11
[ "https://Stackoverflow.com/questions/30165810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284795/" ]
With a [`ReadOnlyCollection`](https://msdn.microsoft.com/en-us/library/ms132476(v=vs.110).aspx): > > A collection that is read-only is simply a collection with a wrapper > that prevents modifying the collection; therefore, if changes are made > to the underlying collection, the read-only collection reflects those >...
In multi-threaded scenarios, be advised that read-only collections are still not thread-safe. From the `ReadOnlyCollection<T>` documentation: > > ... if changes are made to the underlying collection, the read-only collection reflects those changes > > > Since collections, like `List<T>` and others, are not threa...
30,165,810
.NET 4.5 has a new namespace [System.Collections.Immutable](https://msdn.microsoft.com/en-us/library/system.collections.immutable(v=vs.111).aspx) > > This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections. > > > I'm confused. Isn't...
2015/05/11
[ "https://Stackoverflow.com/questions/30165810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284795/" ]
`ReadOnlyCollection`, as the name suggests, can only be read. On the other hand, you can append/remove items to/from an `ImmutableList` by calling its `Add`/`Remove`/`Clear` methods, for example, which return a new immutable list.
So far all technical aspects was told but no code. I created a small example shows main difference. ``` List<string> strings = new List<string>() { "Visual Studio 2017","Visual Studio 2019" }; ReadOnlyCollection<string> readOnlyStrings = strings.AsReadOnly(); var immutableList = strings.ToImmutableList(); strings....
30,165,810
.NET 4.5 has a new namespace [System.Collections.Immutable](https://msdn.microsoft.com/en-us/library/system.collections.immutable(v=vs.111).aspx) > > This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections. > > > I'm confused. Isn't...
2015/05/11
[ "https://Stackoverflow.com/questions/30165810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284795/" ]
`ReadOnlyCollection<T>` doesn't solve any of the thread safety problems. It is merely a wrapper around `Ilist<T>`. It doesn't exposes members to modify the collection, but you can always modify it with the underlying collection reference. If the underlying collection is modified, it isn't safe to enumerate the `ReadOn...
So far all technical aspects was told but no code. I created a small example shows main difference. ``` List<string> strings = new List<string>() { "Visual Studio 2017","Visual Studio 2019" }; ReadOnlyCollection<string> readOnlyStrings = strings.AsReadOnly(); var immutableList = strings.ToImmutableList(); strings....
30,165,810
.NET 4.5 has a new namespace [System.Collections.Immutable](https://msdn.microsoft.com/en-us/library/system.collections.immutable(v=vs.111).aspx) > > This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections. > > > I'm confused. Isn't...
2015/05/11
[ "https://Stackoverflow.com/questions/30165810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284795/" ]
In multi-threaded scenarios, be advised that read-only collections are still not thread-safe. From the `ReadOnlyCollection<T>` documentation: > > ... if changes are made to the underlying collection, the read-only collection reflects those changes > > > Since collections, like `List<T>` and others, are not threa...
The main benefit is memory efficiency, not thread-safety. The immutable collections in [System.Collections.Immutable](https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable?view=net-6.0) are designed in a way that allows modified versions of the collection to share data structures with un-modified c...
30,165,810
.NET 4.5 has a new namespace [System.Collections.Immutable](https://msdn.microsoft.com/en-us/library/system.collections.immutable(v=vs.111).aspx) > > This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections. > > > I'm confused. Isn't...
2015/05/11
[ "https://Stackoverflow.com/questions/30165810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284795/" ]
`ReadOnlyCollection<T>` doesn't solve any of the thread safety problems. It is merely a wrapper around `Ilist<T>`. It doesn't exposes members to modify the collection, but you can always modify it with the underlying collection reference. If the underlying collection is modified, it isn't safe to enumerate the `ReadOn...
In multi-threaded scenarios, be advised that read-only collections are still not thread-safe. From the `ReadOnlyCollection<T>` documentation: > > ... if changes are made to the underlying collection, the read-only collection reflects those changes > > > Since collections, like `List<T>` and others, are not threa...
30,165,810
.NET 4.5 has a new namespace [System.Collections.Immutable](https://msdn.microsoft.com/en-us/library/system.collections.immutable(v=vs.111).aspx) > > This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections. > > > I'm confused. Isn't...
2015/05/11
[ "https://Stackoverflow.com/questions/30165810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284795/" ]
The main benefit is memory efficiency, not thread-safety. The immutable collections in [System.Collections.Immutable](https://learn.microsoft.com/en-us/dotnet/api/system.collections.immutable?view=net-6.0) are designed in a way that allows modified versions of the collection to share data structures with un-modified c...
So far all technical aspects was told but no code. I created a small example shows main difference. ``` List<string> strings = new List<string>() { "Visual Studio 2017","Visual Studio 2019" }; ReadOnlyCollection<string> readOnlyStrings = strings.AsReadOnly(); var immutableList = strings.ToImmutableList(); strings....
30,165,810
.NET 4.5 has a new namespace [System.Collections.Immutable](https://msdn.microsoft.com/en-us/library/system.collections.immutable(v=vs.111).aspx) > > This package provides collections that are thread safe and guaranteed to never change their contents, also known as immutable collections. > > > I'm confused. Isn't...
2015/05/11
[ "https://Stackoverflow.com/questions/30165810", "https://Stackoverflow.com", "https://Stackoverflow.com/users/284795/" ]
In multi-threaded scenarios, be advised that read-only collections are still not thread-safe. From the `ReadOnlyCollection<T>` documentation: > > ... if changes are made to the underlying collection, the read-only collection reflects those changes > > > Since collections, like `List<T>` and others, are not threa...
So far all technical aspects was told but no code. I created a small example shows main difference. ``` List<string> strings = new List<string>() { "Visual Studio 2017","Visual Studio 2019" }; ReadOnlyCollection<string> readOnlyStrings = strings.AsReadOnly(); var immutableList = strings.ToImmutableList(); strings....
53,846
Someone has been purchasing Bitcoins using my PayPal account - which was obviously hacked. PayPal won't let me close the account yet. I'm going to be charged NSF fees by my bank - I have the Bitcoin wallet address that the sale was made to: - > > Please confirm you want the Bitcoin deposited into Wallet: 1Jvgp9Qcr5D3...
2017/05/27
[ "https://bitcoin.stackexchange.com/questions/53846", "https://bitcoin.stackexchange.com", "https://bitcoin.stackexchange.com/users/50415/" ]
That is not possible. By the decentralized design of Bitcoin, nobody has the ability to "cancel" the coins in an address held by someone else. I'm sorry you were hacked, but it is almost certainly impossible to recover, block, or trace the funds at this point.
you can claim a chargeback from paypal or open ticket to paypal saying you were hacked. Besides that there is nothing else you can do.
50,613,129
I want to run a shell script that runs an application. The application prompts the user for a username and password. Is there a way to store and call the username and password in the shell script so that even if a user isn't present, it will run?
2018/05/30
[ "https://Stackoverflow.com/questions/50613129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4913108/" ]
Completely depends on the application being run. Some applications will take a plain-text command line argument for username and password. Obviously being plain-text, this is not secure, and it's program dependent. You could in theory use Auto Hot Key to mimic the execution of the application and the typing of the pas...
Does this work? Passing username and password to the app's stdin ``` /path/to/application <<'END' username password END ```
50,613,129
I want to run a shell script that runs an application. The application prompts the user for a username and password. Is there a way to store and call the username and password in the shell script so that even if a user isn't present, it will run?
2018/05/30
[ "https://Stackoverflow.com/questions/50613129", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4913108/" ]
Got it to work by adding `-u $UN -p $PWD` where `$UN` and `$PWD` are the username and password. I added the above text at the and of the line calling the app in the shell script.
Does this work? Passing username and password to the app's stdin ``` /path/to/application <<'END' username password END ```
52,807,263
*Python 3.7, Pycharm, Windows* I have a .py file where I read a json with pandas : ``` import pandas as pd data = pd.read_json("a.json") pd.DataFrame(data) ``` a.json : ``` [{"created_at": "Sun Oct 14 21:09:36 +0000 2018", "id": 1051580805624029189, "id_str": "1051580805624029189", "full_text": "@franceinfo \ud83...
2018/10/14
[ "https://Stackoverflow.com/questions/52807263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
For this, since you have to create a Singleton so that your class could not be instantiated more than one time and it will give you a global access to it. You can learn more about Singletons [here](https://www.geeksforgeeks.org/singleton-class-java/)
You can define all members of your object as static.
52,807,263
*Python 3.7, Pycharm, Windows* I have a .py file where I read a json with pandas : ``` import pandas as pd data = pd.read_json("a.json") pd.DataFrame(data) ``` a.json : ``` [{"created_at": "Sun Oct 14 21:09:36 +0000 2018", "id": 1051580805624029189, "id_str": "1051580805624029189", "full_text": "@franceinfo \ud83...
2018/10/14
[ "https://Stackoverflow.com/questions/52807263", "https://Stackoverflow.com", "https://Stackoverflow.com/users/-1/" ]
For this, since you have to create a Singleton so that your class could not be instantiated more than one time and it will give you a global access to it. You can learn more about Singletons [here](https://www.geeksforgeeks.org/singleton-class-java/)
Euh you can define your calendar object as a Global Variable by extending the Application class, and in mApplication create a static reference to it, and some statics methode to access your object and update it ``` public class MApplication extends Application { private static YoureObject yrobjct; public static void...
134,109
Let $\ f\_1, f\_2, ... f\_m : \{0, ..., m \} \rightarrow \mathbb Z $ my task is to find an algorithm that find a series of numbers $\ x\_1, x\_2, ..., x\_m \in \{ 0, ..., m \} $ that maximise $\ \sum\_{i=1}^m f\_i(x\_i) $ and subjects to $\ \sum\_i^m x\_i \le m $ To be honest I can't really wrap my head around this p...
2021/01/08
[ "https://cs.stackexchange.com/questions/134109", "https://cs.stackexchange.com", "https://cs.stackexchange.com/users/128255/" ]
Following is a trivial Dynamic Programming algorithm for your problem: Let $T$ denote a table of size $(m+1)$ x $(m+1)$. Here, $T[i][j]$ stores the maximum value of $\sum\_{t = 1}^{i}f\_{t}(x\_{t})$ such that $\sum\_{t = 1}^{i}x\_{t} \leq j$. **Induction Case:** Since there are $m+1$ possible choices for $x\_{i}$, ch...
This problem can be solved using dynamic programming. For $i \in \{1, \dots, m\}$ define $F\_i(x)$ as the maximum value $\sum\_{j=1}^i f\_j(x\_j)$ attainable for a suitable choice of $x\_1, \dots, x\_i$ such that $x\_1 + \dots + x\_i \le x$. That is: $$F\_i(x) = \max\_{\substack{x\_1, \dots, x\_i \in \{0, \dots, m\} \...
13,592,860
The following piece is not working properly: ``` QRegExp exp ("[À-Ÿà-ÿA-Za-z0-9\\-\\_]+"); if (!formatedName.contains(exp)) { success = false; } ``` This block of code is to validate input strings entered by users. It should only accept numbers, french and english characters, dash and underscore. Actually...
2012/11/27
[ "https://Stackoverflow.com/questions/13592860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/973908/" ]
I think that `bind` makes it *easier* to create slots (cfr. the ['preferred' syntax vs. the 'portable' syntax](http://www.boost.org/doc/libs/1_52_0/doc/html/signals/tutorial.html#id3284837) - that's all going away). The observer management, however, is not becoming less complex. But as @R. Martinho Fernandes mentions:...
I have had a go at this myself also. My efforts can be found at this gist, which will continue to evolve . . . <https://gist.github.com/4172757> I use a different style, more similar to the change notifications in JUCE than BOOST signals. Connection management is done using some lambda syntax that does some capture ...
13,592,860
The following piece is not working properly: ``` QRegExp exp ("[À-Ÿà-ÿA-Za-z0-9\\-\\_]+"); if (!formatedName.contains(exp)) { success = false; } ``` This block of code is to validate input strings entered by users. It should only accept numbers, french and english characters, dash and underscore. Actually...
2012/11/27
[ "https://Stackoverflow.com/questions/13592860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/973908/" ]
I think that `bind` makes it *easier* to create slots (cfr. the ['preferred' syntax vs. the 'portable' syntax](http://www.boost.org/doc/libs/1_52_0/doc/html/signals/tutorial.html#id3284837) - that's all going away). The observer management, however, is not becoming less complex. But as @R. Martinho Fernandes mentions:...
I wrote my own light weight Signal/Slot classes which return connection handles. The existing answer's key system is pretty fragile in the face of exceptions. You have to be exceptionally careful about deleting things with an explicit call. I much prefer using [RAII](http://en.wikipedia.org/wiki/Resource_Acquisition_Is...
13,592,860
The following piece is not working properly: ``` QRegExp exp ("[À-Ÿà-ÿA-Za-z0-9\\-\\_]+"); if (!formatedName.contains(exp)) { success = false; } ``` This block of code is to validate input strings entered by users. It should only accept numbers, french and english characters, dash and underscore. Actually...
2012/11/27
[ "https://Stackoverflow.com/questions/13592860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/973908/" ]
I think that `bind` makes it *easier* to create slots (cfr. the ['preferred' syntax vs. the 'portable' syntax](http://www.boost.org/doc/libs/1_52_0/doc/html/signals/tutorial.html#id3284837) - that's all going away). The observer management, however, is not becoming less complex. But as @R. Martinho Fernandes mentions:...
Since you're asking for code, my blog entry [Performance of a C++11 Signal System](https://testbit.eu/cpp11-signal-system-performance/) contains a single-file implementation of a fully functional signal system based on C++11 features without further dependencies (albeit single-threaded, which was a performance requirem...
13,592,860
The following piece is not working properly: ``` QRegExp exp ("[À-Ÿà-ÿA-Za-z0-9\\-\\_]+"); if (!formatedName.contains(exp)) { success = false; } ``` This block of code is to validate input strings entered by users. It should only accept numbers, french and english characters, dash and underscore. Actually...
2012/11/27
[ "https://Stackoverflow.com/questions/13592860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/973908/" ]
I think that `bind` makes it *easier* to create slots (cfr. the ['preferred' syntax vs. the 'portable' syntax](http://www.boost.org/doc/libs/1_52_0/doc/html/signals/tutorial.html#id3284837) - that's all going away). The observer management, however, is not becoming less complex. But as @R. Martinho Fernandes mentions:...
Here's what I came up with. This assumes no need to aggregate results from the listeners of a broadcast signal. Also, the "slot" or Signal::Listener is the owner of the callback. This ought to live with the object that your (I'm guessing...) lambda is probably capturing so that when that object goes out of scope, so d...
13,592,860
The following piece is not working properly: ``` QRegExp exp ("[À-Ÿà-ÿA-Za-z0-9\\-\\_]+"); if (!formatedName.contains(exp)) { success = false; } ``` This block of code is to validate input strings entered by users. It should only accept numbers, french and english characters, dash and underscore. Actually...
2012/11/27
[ "https://Stackoverflow.com/questions/13592860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/973908/" ]
I wrote my own light weight Signal/Slot classes which return connection handles. The existing answer's key system is pretty fragile in the face of exceptions. You have to be exceptionally careful about deleting things with an explicit call. I much prefer using [RAII](http://en.wikipedia.org/wiki/Resource_Acquisition_Is...
I have had a go at this myself also. My efforts can be found at this gist, which will continue to evolve . . . <https://gist.github.com/4172757> I use a different style, more similar to the change notifications in JUCE than BOOST signals. Connection management is done using some lambda syntax that does some capture ...
13,592,860
The following piece is not working properly: ``` QRegExp exp ("[À-Ÿà-ÿA-Za-z0-9\\-\\_]+"); if (!formatedName.contains(exp)) { success = false; } ``` This block of code is to validate input strings entered by users. It should only accept numbers, french and english characters, dash and underscore. Actually...
2012/11/27
[ "https://Stackoverflow.com/questions/13592860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/973908/" ]
Since you're asking for code, my blog entry [Performance of a C++11 Signal System](https://testbit.eu/cpp11-signal-system-performance/) contains a single-file implementation of a fully functional signal system based on C++11 features without further dependencies (albeit single-threaded, which was a performance requirem...
I have had a go at this myself also. My efforts can be found at this gist, which will continue to evolve . . . <https://gist.github.com/4172757> I use a different style, more similar to the change notifications in JUCE than BOOST signals. Connection management is done using some lambda syntax that does some capture ...
13,592,860
The following piece is not working properly: ``` QRegExp exp ("[À-Ÿà-ÿA-Za-z0-9\\-\\_]+"); if (!formatedName.contains(exp)) { success = false; } ``` This block of code is to validate input strings entered by users. It should only accept numbers, french and english characters, dash and underscore. Actually...
2012/11/27
[ "https://Stackoverflow.com/questions/13592860", "https://Stackoverflow.com", "https://Stackoverflow.com/users/973908/" ]
Here's what I came up with. This assumes no need to aggregate results from the listeners of a broadcast signal. Also, the "slot" or Signal::Listener is the owner of the callback. This ought to live with the object that your (I'm guessing...) lambda is probably capturing so that when that object goes out of scope, so d...
I have had a go at this myself also. My efforts can be found at this gist, which will continue to evolve . . . <https://gist.github.com/4172757> I use a different style, more similar to the change notifications in JUCE than BOOST signals. Connection management is done using some lambda syntax that does some capture ...
36,665,320
I am **migrating** my Server from **Tomcat-6** to **Tomcat-9**. My website is designed for the protocol of HTTP/1.1 . The server.xml file contains the Connector Protocol of **org.apache.coyote.http11.Http11NioProtocol** . The server starts up normally without generating any errors. However, when I try to access my webs...
2016/04/16
[ "https://Stackoverflow.com/questions/36665320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3494590/" ]
I found the API deployed on tomcat able to grab the cookies when I send a cURL request, though there was tomcat warning. ``` curl -XPOST -H "Content-Type: application/json" --cookie "userId=64ad960c-bb7e-48dd-8191-4f31539bc2c2,accessToken=64ad960c-bb7e-48dd-8191-4f31539bc2c2" -d '{"message":"play porcupine tree"}' ht...
Fwiw: I somehow got my Chrome browser into a really b0rken state, getting it to send a malformed cookie with mismatched quotes: `"XSRF-TOKEN=93926112-aa12-440e-8e06-02b7fbce27d5;` Just clearing the cookie from the developer tools wasn't sufficient, but `Clear storage` from the sidebar of the `Application` tab seems to...
36,665,320
I am **migrating** my Server from **Tomcat-6** to **Tomcat-9**. My website is designed for the protocol of HTTP/1.1 . The server.xml file contains the Connector Protocol of **org.apache.coyote.http11.Http11NioProtocol** . The server starts up normally without generating any errors. However, when I try to access my webs...
2016/04/16
[ "https://Stackoverflow.com/questions/36665320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3494590/" ]
I found the API deployed on tomcat able to grab the cookies when I send a cURL request, though there was tomcat warning. ``` curl -XPOST -H "Content-Type: application/json" --cookie "userId=64ad960c-bb7e-48dd-8191-4f31539bc2c2,accessToken=64ad960c-bb7e-48dd-8191-4f31539bc2c2" -d '{"message":"play porcupine tree"}' ht...
i was getting this issue with spring boot of version above 2.2.x it got fixed after adding below bean ``` public WebServerFactoryCustomizer<TomcatServletWebServerFactory> cookieProcessorCustomizer() { return tomcatServletWebServerFactory -> tomcatServletWebServerFactory.addContextCustomizers((TomcatContextCustomi...
36,665,320
I am **migrating** my Server from **Tomcat-6** to **Tomcat-9**. My website is designed for the protocol of HTTP/1.1 . The server.xml file contains the Connector Protocol of **org.apache.coyote.http11.Http11NioProtocol** . The server starts up normally without generating any errors. However, when I try to access my webs...
2016/04/16
[ "https://Stackoverflow.com/questions/36665320", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3494590/" ]
i was getting this issue with spring boot of version above 2.2.x it got fixed after adding below bean ``` public WebServerFactoryCustomizer<TomcatServletWebServerFactory> cookieProcessorCustomizer() { return tomcatServletWebServerFactory -> tomcatServletWebServerFactory.addContextCustomizers((TomcatContextCustomi...
Fwiw: I somehow got my Chrome browser into a really b0rken state, getting it to send a malformed cookie with mismatched quotes: `"XSRF-TOKEN=93926112-aa12-440e-8e06-02b7fbce27d5;` Just clearing the cookie from the developer tools wasn't sufficient, but `Clear storage` from the sidebar of the `Application` tab seems to...
24,784,722
I need help to change the letters of the alphabet and numbers (from 0-9) another character like \* so that when I type the password people can't look over my shoulder and find out the password. can anyone help?
2014/07/16
[ "https://Stackoverflow.com/questions/24784722", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3845706/" ]
in your `onClickListener` , check if the slidingPanelLayout is opened or not, ``` if (opened){ return ; } ``` you may assume it is opened/ closed , when the offset of the slidingPanelLayout is 0 or equal to the screen width.
in your .java file implement what ever you wanna do with pane in onPanelClosed and onPanelOpened methods. ``` public static View _View; public static SlidingPaneLayout _Pane; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { _View = inflater.infla...
34,151,202
We're working with OpenGL 4.3. However, we're afraid that we're using features that are working with our graphics card, but not in the "minimal" required specs for OpenGL 4.3. **Is there any possibility to emulate the minimum behaviour?** For example, to make the graphics card reject any non-standard texture formats e...
2015/12/08
[ "https://Stackoverflow.com/questions/34151202", "https://Stackoverflow.com", "https://Stackoverflow.com/users/369009/" ]
There is a [reference GLSL compiler](https://www.khronos.org/opengles/sdk/tools/Reference-Compiler/) that will solve half of this problem. But, as for the rest ... AMD, NV and Intel all have their own compliance issues and policies regarding how loosely they believe in following the specification. I have seen each one...
There are a number of [OpenGL Loading Libraries](https://www.opengl.org/wiki/OpenGL_Loading_Library) that will do what you need to some degree. GLEW just gives you everything and lets you pick and choose what you want. But there are others which generate more specific loaders. [GL3w](https://github.com/skaslev/gl3w) f...
11,007
I am having a few problems with my BLTouch. I have calibrated it several times using different methods and get the nozzle being 1.3 mm lower than the BLTouch pin so a Z offset of -1.3 mm. This works fine for auto homing, bed levelling and using code `G1 Z0` to lower to where needed. However when using Cura to print the...
2019/09/13
[ "https://3dprinting.stackexchange.com/questions/11007", "https://3dprinting.stackexchange.com", "https://3dprinting.stackexchange.com/users/18553/" ]
This answer is intended to be a generic answer for Z-offset determination. The question is not clear on how the Z-offset has been determined. It appears as if this distance is measured, while in reality this cannot be measured. A touch (or a inductive or capacitive) probe uses a trigger point to determine the distance...
You should be able to offset this with a `G54 Z-1.3` - **if your setup accepts these gcodes**. If you do this, always add a `G53` to the very start and just before the `M30` to clear all offsets after job finish (or in the event of a cancel, at the start of the next job). I'm not experienced with a wide variety of p...
19,193,851
Pretty new to sqlite3, so bear with me here.. I'd like to have a function to which I can pass the table name, and the values to update. I initially started with something like this: ``` def add_to_table(table_name, string): cursor.execute('INSERT INTO {table} VALUES ({var})' .format( table...
2013/10/05
[ "https://Stackoverflow.com/questions/19193851", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2014962/" ]
Its not the dynamic string substitution *per-se* thats the problem. Its dynamic string substitution with an user-supplied string thats the big problem because that opens you to SQL-injection attacks. If you are absolutely 100% sure that the tablename is a safe string that you control then splicing it into the SQL query...
Composing SQL statements using string manipulation is odd not only because of security implications, but also because strings are "dumb" objects. Using sqlalchemy core (you don't even need the ORM part) is almost like using strings, but each fragment will be a lot smarter and allow for easier composition. Take a look a...
15,135,905
Locally I use mysql, so when I use ``` @Column(columnDefinition = "TEXT") ``` Unfortunately application have to run at different databases too, I've not been told which ones just "at all". Is it possible to make something with similar effect, but working at most of databases? How can I achieve it?
2013/02/28
[ "https://Stackoverflow.com/questions/15135905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1892267/" ]
What about something like this: ``` @Lob private String someString; ``` I think it's more portable and should effectively generate TEXT or LONGTEXT data type.
If you use @LOB you'll have ORA-00932 exception with SQL containing DISTINCT (<http://ora-00932.ora-code.com/>) I think that the solution depends on the bytes size of your string. If its < 4000 bytes, you can try using @Column(name = "...", length = 4000) I suggest 4000 bytes for DB comptibility reason : * In oracle...
15,135,905
Locally I use mysql, so when I use ``` @Column(columnDefinition = "TEXT") ``` Unfortunately application have to run at different databases too, I've not been told which ones just "at all". Is it possible to make something with similar effect, but working at most of databases? How can I achieve it?
2013/02/28
[ "https://Stackoverflow.com/questions/15135905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1892267/" ]
What about something like this: ``` @Lob private String someString; ``` I think it's more portable and should effectively generate TEXT or LONGTEXT data type.
I had the same problem and it was resolved only adding a parameter to MySQL Url on application.properties: ``` spring.datasource.url=jdbc:mysql://localhost:3306/database?jdbcCompliantTruncation=false ``` The parameter is jdbcCompliantTruncation=false Looks like a workaround but only it works...
15,135,905
Locally I use mysql, so when I use ``` @Column(columnDefinition = "TEXT") ``` Unfortunately application have to run at different databases too, I've not been told which ones just "at all". Is it possible to make something with similar effect, but working at most of databases? How can I achieve it?
2013/02/28
[ "https://Stackoverflow.com/questions/15135905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1892267/" ]
What about something like this: ``` @Lob private String someString; ``` I think it's more portable and should effectively generate TEXT or LONGTEXT data type.
Similiar Problem I was getting error while uploading an image into the mysql database, **@Column(columnDefinition = “TEXT”).** You can use in postgresql as well as mysql database's. Just I've changed to ``` @Lob @Column(name=imageFiie) private String image; ``` **Note:** When working with PostgresSQL we may, per...
15,135,905
Locally I use mysql, so when I use ``` @Column(columnDefinition = "TEXT") ``` Unfortunately application have to run at different databases too, I've not been told which ones just "at all". Is it possible to make something with similar effect, but working at most of databases? How can I achieve it?
2013/02/28
[ "https://Stackoverflow.com/questions/15135905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1892267/" ]
If you use @LOB you'll have ORA-00932 exception with SQL containing DISTINCT (<http://ora-00932.ora-code.com/>) I think that the solution depends on the bytes size of your string. If its < 4000 bytes, you can try using @Column(name = "...", length = 4000) I suggest 4000 bytes for DB comptibility reason : * In oracle...
I had the same problem and it was resolved only adding a parameter to MySQL Url on application.properties: ``` spring.datasource.url=jdbc:mysql://localhost:3306/database?jdbcCompliantTruncation=false ``` The parameter is jdbcCompliantTruncation=false Looks like a workaround but only it works...
15,135,905
Locally I use mysql, so when I use ``` @Column(columnDefinition = "TEXT") ``` Unfortunately application have to run at different databases too, I've not been told which ones just "at all". Is it possible to make something with similar effect, but working at most of databases? How can I achieve it?
2013/02/28
[ "https://Stackoverflow.com/questions/15135905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1892267/" ]
If you use @LOB you'll have ORA-00932 exception with SQL containing DISTINCT (<http://ora-00932.ora-code.com/>) I think that the solution depends on the bytes size of your string. If its < 4000 bytes, you can try using @Column(name = "...", length = 4000) I suggest 4000 bytes for DB comptibility reason : * In oracle...
Similiar Problem I was getting error while uploading an image into the mysql database, **@Column(columnDefinition = “TEXT”).** You can use in postgresql as well as mysql database's. Just I've changed to ``` @Lob @Column(name=imageFiie) private String image; ``` **Note:** When working with PostgresSQL we may, per...
15,135,905
Locally I use mysql, so when I use ``` @Column(columnDefinition = "TEXT") ``` Unfortunately application have to run at different databases too, I've not been told which ones just "at all". Is it possible to make something with similar effect, but working at most of databases? How can I achieve it?
2013/02/28
[ "https://Stackoverflow.com/questions/15135905", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1892267/" ]
Similiar Problem I was getting error while uploading an image into the mysql database, **@Column(columnDefinition = “TEXT”).** You can use in postgresql as well as mysql database's. Just I've changed to ``` @Lob @Column(name=imageFiie) private String image; ``` **Note:** When working with PostgresSQL we may, per...
I had the same problem and it was resolved only adding a parameter to MySQL Url on application.properties: ``` spring.datasource.url=jdbc:mysql://localhost:3306/database?jdbcCompliantTruncation=false ``` The parameter is jdbcCompliantTruncation=false Looks like a workaround but only it works...
30,083,575
I am going through the Django tutorial (version 1.8) and when I try to create the databases for INSTALLED\_APPS using the cmd `python manage.py migrate` I end up getting the following Import Error: ``` File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "C:\Python27\lib\site-packages\djang...
2015/05/06
[ "https://Stackoverflow.com/questions/30083575", "https://Stackoverflow.com", "https://Stackoverflow.com/users/3148242/" ]
The error is not actually with INSTALLED\_APPS; if you notice, the error is occurring on `mod = importlib.import_module(self.SETTINGS_MODULE)`, meaning it's unable to import your settings module. The problem, in this case, is that your `DJANGO_SETTINGS_MODULE` needs to be a dotted Python path, rather than a filesystem...
``` ImportError: Import by filename is not supported. ``` Looks like you're trying to import an app and specify the filename instead of the name. Could you post the settings.py? You have to write something like this: ``` INSTALLED_APPS = ( ... snip ... 'polls', ) ``` and not something like this: ``` INSTALLE...
42,910,754
We occasionally have the need to restart services that are deployed with AWS CodeDeploy. Is it possible to have the CodeDeploy agent do this directly, without having to create a new deployment?
2017/03/20
[ "https://Stackoverflow.com/questions/42910754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2581396/" ]
The AWS service you're looking for is [AWS Systems Manager](https://aws.amazon.com/systems-manager/). You can run arbitrary commands or scripts on instances with this[2](https://docs.aws.amazon.com/systems-manager/latest/userguide/execute-remote-commands.html). All recent Ubuntu and Amazon Linux instances have AWS SSM ...
No, you need to have a deployment to restart. The agent does not take actions on its own. It receives commands from the CodeDeploy service. Depending on your usecase you can have your application emit CloudWatch event and have that trigger a deployment in the deploymentGroup. Note that it will create a deployment that...
42,910,754
We occasionally have the need to restart services that are deployed with AWS CodeDeploy. Is it possible to have the CodeDeploy agent do this directly, without having to create a new deployment?
2017/03/20
[ "https://Stackoverflow.com/questions/42910754", "https://Stackoverflow.com", "https://Stackoverflow.com/users/2581396/" ]
The AWS service you're looking for is [AWS Systems Manager](https://aws.amazon.com/systems-manager/). You can run arbitrary commands or scripts on instances with this[2](https://docs.aws.amazon.com/systems-manager/latest/userguide/execute-remote-commands.html). All recent Ubuntu and Amazon Linux instances have AWS SSM ...
To expand on eternaltyro's answer, you could leverage [CodeDeploy's CLI tool](https://docs.aws.amazon.com/codedeploy/latest/userguide/deployments-local.html) via SSM to run the same CodeDeploy event hooks that were/are used to start and stop your application.
11,207,749
I want to prompt for the confirmation [yes/no] for every the commands git push and pull which contacts the git server. Is there a way to include any commands/scripts to make this happen? so User can able to given the input, after that only git proceeds for that operation.
2012/06/26
[ "https://Stackoverflow.com/questions/11207749", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1482764/" ]
First of all, I don't think that you will make much friends with that change. If someone types in `git pull`, he already proved that he's willing to contact the remote server. In my opinion, there's no need to annoy the user with confirm dialogs in that case. Anyway, if you **want** to confirm every `pull` and `push`,...
I believe you're looking for [Git hooks](http://git-scm.com/book/en/Customizing-Git-Git-Hooks#Client-Side-Hooks). You will have to put the hooks there yourself though. I don't think you can make the user pull the (client-side) hooks along with the rest of the code.
61,666,974
When I go to my web page, it has a drop down list with a name already selected. I want that it to default to a blank value every time someone goes to that page. They will need to type in that blank space. ``` <select asp-for="OwnerId" class="form-control" asp-items="@Model.OwnerList"></select> ```
2020/05/07
[ "https://Stackoverflow.com/questions/61666974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13493796/" ]
Use append/prepend or appendTo/prependTo to add new empty option to the beginning or end of the list with jquery. Make sure to run the script after document loaded: ```js $(function () { $("#OwnerId").prepend('<option></option>').val(''); }); ``` or ```js $(function () { $('<option>', { value: '' }).appen...
1) Make sure `Model.OwnerList` first value is an empty value (so it is the default value for the list). Heres an example of creating an empty `SelectListItem` to place as your first item in `Model.OwnerList` ``` var empty = new SelectListItem() { Text = "", Value = "" }; ``` 2) Make sure `OwnerId` doesn't a...
61,666,974
When I go to my web page, it has a drop down list with a name already selected. I want that it to default to a blank value every time someone goes to that page. They will need to type in that blank space. ``` <select asp-for="OwnerId" class="form-control" asp-items="@Model.OwnerList"></select> ```
2020/05/07
[ "https://Stackoverflow.com/questions/61666974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13493796/" ]
``` <select asp-for="OwnerId" class="form-control" asp-items="@Model.OwnerList"></select> ``` The way i found to have that empty space in the drop down show first was this: ``` <select asp-for="OwnerId" class="form-control" asp-items="@Model.OwnerList"> <option value=""></option> </select> ``` Thanks for the h...
1) Make sure `Model.OwnerList` first value is an empty value (so it is the default value for the list). Heres an example of creating an empty `SelectListItem` to place as your first item in `Model.OwnerList` ``` var empty = new SelectListItem() { Text = "", Value = "" }; ``` 2) Make sure `OwnerId` doesn't a...
61,666,974
When I go to my web page, it has a drop down list with a name already selected. I want that it to default to a blank value every time someone goes to that page. They will need to type in that blank space. ``` <select asp-for="OwnerId" class="form-control" asp-items="@Model.OwnerList"></select> ```
2020/05/07
[ "https://Stackoverflow.com/questions/61666974", "https://Stackoverflow.com", "https://Stackoverflow.com/users/13493796/" ]
``` <select asp-for="OwnerId" class="form-control" asp-items="@Model.OwnerList"></select> ``` The way i found to have that empty space in the drop down show first was this: ``` <select asp-for="OwnerId" class="form-control" asp-items="@Model.OwnerList"> <option value=""></option> </select> ``` Thanks for the h...
Use append/prepend or appendTo/prependTo to add new empty option to the beginning or end of the list with jquery. Make sure to run the script after document loaded: ```js $(function () { $("#OwnerId").prepend('<option></option>').val(''); }); ``` or ```js $(function () { $('<option>', { value: '' }).appen...
65,312,936
I have a floating widget (that draws over all the apps) that on long click (mouse hold) will show a relative layout (`remove_relativelayout`) from the bottom so that the user can close the widget and the service will be destroyed. On most Samsung phones I get this crash: ``` Fatal Exception: java.lang.IllegalArgument...
2020/12/15
[ "https://Stackoverflow.com/questions/65312936", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4438044/" ]
For standalone inference in 3rd party projects or repos importing your model into the python workspace with PyTorch Hub is the recommended method. See YOLOv5 PyTorch Hub tutorial here, specifically the section on loading custom models. <https://github.com/ultralytics/yolov5#tutorials> Custom Models ------------- This...
``` import cv2 import torch from mss import mss import numpy as np model = torch.hub.load("/yolov5", 'custom', path="yolov5/best.pt", source='local') sct = mss() while 1: w, h = 1920, 1080 monitor = {'top': 0, 'left': 0, 'width': w, 'height': h} img = Image.frombytes('RGB', (w, h), sct.grab(monitor).rgb)...
65,312,936
I have a floating widget (that draws over all the apps) that on long click (mouse hold) will show a relative layout (`remove_relativelayout`) from the bottom so that the user can close the widget and the service will be destroyed. On most Samsung phones I get this crash: ``` Fatal Exception: java.lang.IllegalArgument...
2020/12/15
[ "https://Stackoverflow.com/questions/65312936", "https://Stackoverflow.com", "https://Stackoverflow.com/users/4438044/" ]
For standalone inference in 3rd party projects or repos importing your model into the python workspace with PyTorch Hub is the recommended method. See YOLOv5 PyTorch Hub tutorial here, specifically the section on loading custom models. <https://github.com/ultralytics/yolov5#tutorials> Custom Models ------------- This...
im a noob in programming and using desktop screen to run inference can be found in yolov5's github page <https://github.com/ultralytics/yolov5/issues/36> ``` import cv2 import numpy import torch from mss import mss from PIL import ImageGrab im = numpy.array(ImageGrab.grab(bbox=(0,0,1920,1080))) model = torch.hub.load...
2,839,521
I'm building a Rails app that does conversion tracking on outside sites. I'd like to allow users to paste an image tag in their conversion pages (like AdWords), and whenever that image is requested, a conversion registers in my app. ``` respond_to do |format| if @conversion.save flash[:notice] = 'Conversion was...
2010/05/15
[ "https://Stackoverflow.com/questions/2839521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76735/" ]
Simple option: format.gif { redirect\_to '/images/1x1.gif' } I think in /really/ old browsers (IE5, Netscape maybe?) this may not work, so if you need to support those, the old school solution was to actually load in the binary data of the gif and spit it out back to the browser directly with the correct content typ...
Here is my solution ``` format.gif { send_data Rails.root.join('app', 'assets', 'images', '1x1.gif') } ```
2,839,521
I'm building a Rails app that does conversion tracking on outside sites. I'd like to allow users to paste an image tag in their conversion pages (like AdWords), and whenever that image is requested, a conversion registers in my app. ``` respond_to do |format| if @conversion.save flash[:notice] = 'Conversion was...
2010/05/15
[ "https://Stackoverflow.com/questions/2839521", "https://Stackoverflow.com", "https://Stackoverflow.com/users/76735/" ]
This seems to be a simpler solution Source: ``` http://forrst.com/posts/Render_a_1x1_Transparent_GIF_with_Rails-eV4 ``` instead of rendering, call ``` send_data(Base64.decode64("R0lGODlhAQABAPAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="), :type => "image/gif", :disposition => "inline") ```
Here is my solution ``` format.gif { send_data Rails.root.join('app', 'assets', 'images', '1x1.gif') } ```
30,140
I have come across an essay title asking us to critique the evidence of language being processed as either “abstract phonemes” or “surface exemplars”. (Specifically in phonology) Is this a rewording of the debate between OT vs RBT? Rules vs. constraints? Generativism/Chomsky vs. ? ? I feel lost with what to plan. Cou...
2019/01/04
[ "https://linguistics.stackexchange.com/questions/30140", "https://linguistics.stackexchange.com", "https://linguistics.stackexchange.com/users/23583/" ]
Firstly, even though Sumerian had died out by the time Hittite was spoken, the Akkadian priesthood kept using it for religious purposes, and so they would have preserved some knowledge of its pronunciation. The answer to your question lies elsewhere, however. The words represented in the Olympiad questions as »dumumeš...
dumumeššu and dingirmešša are not Hittite, nor are they Sumerian. They are Sumero-Akkadian heterograms for Hittite words.
56,703,356
I am trying to run multiple functions and inserting the same value into those functions as I type in a specific text box that updates a search list as you type in it. This works fine if I stick to just one function, however if I try and include multiple functions to be run onclick of the search button I attached and se...
2019/06/21
[ "https://Stackoverflow.com/questions/56703356", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6262269/" ]
To "poll" the status of a `JobExecution` you should obtain a new instance from the JobOperator each time you check its status. So get the JobExecution *inside* the while-loop, NOT outside. So it should be more like, for example: ``` do { Thread.sleep(300); // log or whatever BatchStatus status = jobOperator....
JobExecution points to the parent job, even though its been setup with the child job execution id. Not sure why batch behaves in this way. ``` JobExecution jobExecution = jobOperator.getJobExecution(execId); jobExecution.getBatchStatus(); //Parent job status ``` But If we go with the BatchRuntime class, we can get t...
56,703,356
I am trying to run multiple functions and inserting the same value into those functions as I type in a specific text box that updates a search list as you type in it. This works fine if I stick to just one function, however if I try and include multiple functions to be run onclick of the search button I attached and se...
2019/06/21
[ "https://Stackoverflow.com/questions/56703356", "https://Stackoverflow.com", "https://Stackoverflow.com/users/6262269/" ]
To "poll" the status of a `JobExecution` you should obtain a new instance from the JobOperator each time you check its status. So get the JobExecution *inside* the while-loop, NOT outside. So it should be more like, for example: ``` do { Thread.sleep(300); // log or whatever BatchStatus status = jobOperator....
I would recommend to poll the [Exitstatus](https://docs.oracle.com/javaee/7/api/javax/batch/runtime/JobExecution.html#getExitStatus--) of the job instead of the BatchStatus itself: ``` for (int i = 1; i <= rsList; i++) { long execId = jobOperator.start("gah-history-chunk-archive-job",jobParamProperties); JobIn...
18,277,668
What would be the possible solution if I want to sign outgoing response, using Springs Dispatcher Servlet using MappingJacksonConverter. My aim is to add md5 of body contents in header, to validate response. By I cannot access headers after reading the response. What are the suggestions?
2013/08/16
[ "https://Stackoverflow.com/questions/18277668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1797171/" ]
The problem is that you are adding the same object to each index of your ArrayList. Every time you modify it, you are modifying the same object. To solve the problem, you have to pass references to different objects. ``` String[] t2 = new String[2]; ArrayList<String[]> list2 = new ArrayList<String[]>(); t2[0]="0"; ...
You are adding the same array `t2` over and over. You need to add distinct arrays. ``` ArrayList<String[]> list2 = new ArrayList<String[]>(); list2.add(new String[] {"0", "0"}); list2.add(new String[] {"0", "1"}); list2.add(new String[] {"1", "0"}); list2.add(new String[] {"1", "1"}); ``` As an aside: you can use `...
18,277,668
What would be the possible solution if I want to sign outgoing response, using Springs Dispatcher Servlet using MappingJacksonConverter. My aim is to add md5 of body contents in header, to validate response. By I cannot access headers after reading the response. What are the suggestions?
2013/08/16
[ "https://Stackoverflow.com/questions/18277668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1797171/" ]
You are adding the same array `t2` over and over. You need to add distinct arrays. ``` ArrayList<String[]> list2 = new ArrayList<String[]>(); list2.add(new String[] {"0", "0"}); list2.add(new String[] {"0", "1"}); list2.add(new String[] {"1", "0"}); list2.add(new String[] {"1", "1"}); ``` As an aside: you can use `...
You are only creating one array, and putting its reference repeatedly into the ArrayList. Instead, you can create a new array for each element in the List: ``` ArrayList<String[]> list2 = new ArrayList<String[]>(); String[] t2; t2 = new String[2]; t2[0]="0"; t2[1]="0"; list2.add(t2); t2 = new String[2]; ...
18,277,668
What would be the possible solution if I want to sign outgoing response, using Springs Dispatcher Servlet using MappingJacksonConverter. My aim is to add md5 of body contents in header, to validate response. By I cannot access headers after reading the response. What are the suggestions?
2013/08/16
[ "https://Stackoverflow.com/questions/18277668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1797171/" ]
You are adding the same array `t2` over and over. You need to add distinct arrays. ``` ArrayList<String[]> list2 = new ArrayList<String[]>(); list2.add(new String[] {"0", "0"}); list2.add(new String[] {"0", "1"}); list2.add(new String[] {"1", "0"}); list2.add(new String[] {"1", "1"}); ``` As an aside: you can use `...
You have just one item (t2) and each time you add it to the ArrayList . actually the reference of t2 is going to be saved in ArrayList so when you change the t2 value all of references in the ArrayList take effect.
18,277,668
What would be the possible solution if I want to sign outgoing response, using Springs Dispatcher Servlet using MappingJacksonConverter. My aim is to add md5 of body contents in header, to validate response. By I cannot access headers after reading the response. What are the suggestions?
2013/08/16
[ "https://Stackoverflow.com/questions/18277668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1797171/" ]
The problem is that you are adding the same object to each index of your ArrayList. Every time you modify it, you are modifying the same object. To solve the problem, you have to pass references to different objects. ``` String[] t2 = new String[2]; ArrayList<String[]> list2 = new ArrayList<String[]>(); t2[0]="0"; ...
You are only creating one array, and putting its reference repeatedly into the ArrayList. Instead, you can create a new array for each element in the List: ``` ArrayList<String[]> list2 = new ArrayList<String[]>(); String[] t2; t2 = new String[2]; t2[0]="0"; t2[1]="0"; list2.add(t2); t2 = new String[2]; ...
18,277,668
What would be the possible solution if I want to sign outgoing response, using Springs Dispatcher Servlet using MappingJacksonConverter. My aim is to add md5 of body contents in header, to validate response. By I cannot access headers after reading the response. What are the suggestions?
2013/08/16
[ "https://Stackoverflow.com/questions/18277668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1797171/" ]
The problem is that you are adding the same object to each index of your ArrayList. Every time you modify it, you are modifying the same object. To solve the problem, you have to pass references to different objects. ``` String[] t2 = new String[2]; ArrayList<String[]> list2 = new ArrayList<String[]>(); t2[0]="0"; ...
This is because you're adding t2 to all of the entries. Each time you overwrite t2 you're changing all the values. This is because t2 isn't being passed by value, it is being passed by reference and saved by reference.
18,277,668
What would be the possible solution if I want to sign outgoing response, using Springs Dispatcher Servlet using MappingJacksonConverter. My aim is to add md5 of body contents in header, to validate response. By I cannot access headers after reading the response. What are the suggestions?
2013/08/16
[ "https://Stackoverflow.com/questions/18277668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1797171/" ]
The problem is that you are adding the same object to each index of your ArrayList. Every time you modify it, you are modifying the same object. To solve the problem, you have to pass references to different objects. ``` String[] t2 = new String[2]; ArrayList<String[]> list2 = new ArrayList<String[]>(); t2[0]="0"; ...
You have just one item (t2) and each time you add it to the ArrayList . actually the reference of t2 is going to be saved in ArrayList so when you change the t2 value all of references in the ArrayList take effect.
18,277,668
What would be the possible solution if I want to sign outgoing response, using Springs Dispatcher Servlet using MappingJacksonConverter. My aim is to add md5 of body contents in header, to validate response. By I cannot access headers after reading the response. What are the suggestions?
2013/08/16
[ "https://Stackoverflow.com/questions/18277668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1797171/" ]
This is because you're adding t2 to all of the entries. Each time you overwrite t2 you're changing all the values. This is because t2 isn't being passed by value, it is being passed by reference and saved by reference.
You are only creating one array, and putting its reference repeatedly into the ArrayList. Instead, you can create a new array for each element in the List: ``` ArrayList<String[]> list2 = new ArrayList<String[]>(); String[] t2; t2 = new String[2]; t2[0]="0"; t2[1]="0"; list2.add(t2); t2 = new String[2]; ...
18,277,668
What would be the possible solution if I want to sign outgoing response, using Springs Dispatcher Servlet using MappingJacksonConverter. My aim is to add md5 of body contents in header, to validate response. By I cannot access headers after reading the response. What are the suggestions?
2013/08/16
[ "https://Stackoverflow.com/questions/18277668", "https://Stackoverflow.com", "https://Stackoverflow.com/users/1797171/" ]
This is because you're adding t2 to all of the entries. Each time you overwrite t2 you're changing all the values. This is because t2 isn't being passed by value, it is being passed by reference and saved by reference.
You have just one item (t2) and each time you add it to the ArrayList . actually the reference of t2 is going to be saved in ArrayList so when you change the t2 value all of references in the ArrayList take effect.
51,686,090
[![enter image description here](https://i.stack.imgur.com/pTv2K.jpg)](https://i.stack.imgur.com/pTv2K.jpg) How can i get a count of the number of arrays of the attached screenshot. In this scenario the number i want is **2** ``` public function update(Request $request, $jobId) { //dd($request); /...
2018/08/04
[ "https://Stackoverflow.com/questions/51686090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8077896/" ]
The thing is the way how you are sending the data to your backend. As it seems, your are grouping by attribute (an array of `id`s then an array of `name`s and so on) instead than by "class" (an array of elements that contains all the attributes in it: `id`, `name`, ...). So, you could solve this issue in two ways. 1....
Maybe try count($collection->items)
51,686,090
[![enter image description here](https://i.stack.imgur.com/pTv2K.jpg)](https://i.stack.imgur.com/pTv2K.jpg) How can i get a count of the number of arrays of the attached screenshot. In this scenario the number i want is **2** ``` public function update(Request $request, $jobId) { //dd($request); /...
2018/08/04
[ "https://Stackoverflow.com/questions/51686090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8077896/" ]
Maybe try count($collection->items)
Straight from your question "How can I get a count of the number of arrays of the attached screenshot" here is how you do it, according to your question ``` $arrayCount = 0; foreach ($request->request as $req) { // this will check for array and check the array has 2 elements if (is_array($req) && is_array($...
51,686,090
[![enter image description here](https://i.stack.imgur.com/pTv2K.jpg)](https://i.stack.imgur.com/pTv2K.jpg) How can i get a count of the number of arrays of the attached screenshot. In this scenario the number i want is **2** ``` public function update(Request $request, $jobId) { //dd($request); /...
2018/08/04
[ "https://Stackoverflow.com/questions/51686090", "https://Stackoverflow.com", "https://Stackoverflow.com/users/8077896/" ]
The thing is the way how you are sending the data to your backend. As it seems, your are grouping by attribute (an array of `id`s then an array of `name`s and so on) instead than by "class" (an array of elements that contains all the attributes in it: `id`, `name`, ...). So, you could solve this issue in two ways. 1....
Straight from your question "How can I get a count of the number of arrays of the attached screenshot" here is how you do it, according to your question ``` $arrayCount = 0; foreach ($request->request as $req) { // this will check for array and check the array has 2 elements if (is_array($req) && is_array($...
338,680
Is voting still sustainable? ============================ * The number of votes going down and the dynamics changing towards questions and answers only being relevant during the first few days. * This makes the rating system, by means of a system that measures popularity (counts votes/likes), not very useful. Or at le...
2019/11/19
[ "https://meta.stackexchange.com/questions/338680", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/389297/" ]
There will probably no single answer that covers *all* aspects that have to be considered here. But some thoughts: Interestingly, the title asked about voting and *reputation*. But in the question itself, you did not mention reputation *at all*. I think that there is not much doubt that *voting per se* is useful. So I...
**Allow an explicit blank vote as well** This change to the voting *mechanism* which will: * Not change the game-play of the gamification that voting brings (reputation will still be based on the +1 and -1 votes). * Yet, it will be able to provide extra information and make the votes more meaningful in differentiatin...
338,680
Is voting still sustainable? ============================ * The number of votes going down and the dynamics changing towards questions and answers only being relevant during the first few days. * This makes the rating system, by means of a system that measures popularity (counts votes/likes), not very useful. Or at le...
2019/11/19
[ "https://meta.stackexchange.com/questions/338680", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/389297/" ]
The idea is that voting means the best answers get promoted, and the reputation system attracts experts. But experts do not affect the voting. Check [this comment](https://stackoverflow.com/questions/398871/update-all-objects-in-a-collection-using-linq#comment98566051_399073) to an answer - 18 upvotes to it, yet 786 u...
**Allow an explicit blank vote as well** This change to the voting *mechanism* which will: * Not change the game-play of the gamification that voting brings (reputation will still be based on the +1 and -1 votes). * Yet, it will be able to provide extra information and make the votes more meaningful in differentiatin...
338,680
Is voting still sustainable? ============================ * The number of votes going down and the dynamics changing towards questions and answers only being relevant during the first few days. * This makes the rating system, by means of a system that measures popularity (counts votes/likes), not very useful. Or at le...
2019/11/19
[ "https://meta.stackexchange.com/questions/338680", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/389297/" ]
Disclaimer: There was a time when I was the [most active voter on all of SE](http://english.stackexchange.com/questions/81404/short-description-of-an-accomplishment) and the first person to vote on questions and answers ~~50,000~~ 100,000 times, so I tend to see "more voting" as the cure-all for a lot of SE's problems....
I know I'm out of my depth here, I tried to decipher the graphs but I found them confusing. All I know is, when a site such as Stack Overflow, attracts millions of visitors daily and the number of users between 1 and 50 rep swamp the site with boring repetitive Googleable questions, and users who are only interested ...
338,680
Is voting still sustainable? ============================ * The number of votes going down and the dynamics changing towards questions and answers only being relevant during the first few days. * This makes the rating system, by means of a system that measures popularity (counts votes/likes), not very useful. Or at le...
2019/11/19
[ "https://meta.stackexchange.com/questions/338680", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/389297/" ]
I know I'm out of my depth here, I tried to decipher the graphs but I found them confusing. All I know is, when a site such as Stack Overflow, attracts millions of visitors daily and the number of users between 1 and 50 rep swamp the site with boring repetitive Googleable questions, and users who are only interested ...
### Allow No-Account visitors to somehow Vote or contribute Reputation *and / or* ### Gain Reputation based on Views --- * [Getting feedback from anonymous users](https://meta.stackexchange.com/questions/27618/getting-feedback-from-anonymous-users) * [Anonymous user feedback now in testing](https://meta.stackexchan...
338,680
Is voting still sustainable? ============================ * The number of votes going down and the dynamics changing towards questions and answers only being relevant during the first few days. * This makes the rating system, by means of a system that measures popularity (counts votes/likes), not very useful. Or at le...
2019/11/19
[ "https://meta.stackexchange.com/questions/338680", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/389297/" ]
I know I'm out of my depth here, I tried to decipher the graphs but I found them confusing. All I know is, when a site such as Stack Overflow, attracts millions of visitors daily and the number of users between 1 and 50 rep swamp the site with boring repetitive Googleable questions, and users who are only interested ...
**Allow an explicit blank vote as well** This change to the voting *mechanism* which will: * Not change the game-play of the gamification that voting brings (reputation will still be based on the +1 and -1 votes). * Yet, it will be able to provide extra information and make the votes more meaningful in differentiatin...
338,680
Is voting still sustainable? ============================ * The number of votes going down and the dynamics changing towards questions and answers only being relevant during the first few days. * This makes the rating system, by means of a system that measures popularity (counts votes/likes), not very useful. Or at le...
2019/11/19
[ "https://meta.stackexchange.com/questions/338680", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/389297/" ]
Disclaimer: There was a time when I was the [most active voter on all of SE](http://english.stackexchange.com/questions/81404/short-description-of-an-accomplishment) and the first person to vote on questions and answers ~~50,000~~ 100,000 times, so I tend to see "more voting" as the cure-all for a lot of SE's problems....
### Allow No-Account visitors to somehow Vote or contribute Reputation *and / or* ### Gain Reputation based on Views --- * [Getting feedback from anonymous users](https://meta.stackexchange.com/questions/27618/getting-feedback-from-anonymous-users) * [Anonymous user feedback now in testing](https://meta.stackexchan...
338,680
Is voting still sustainable? ============================ * The number of votes going down and the dynamics changing towards questions and answers only being relevant during the first few days. * This makes the rating system, by means of a system that measures popularity (counts votes/likes), not very useful. Or at le...
2019/11/19
[ "https://meta.stackexchange.com/questions/338680", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/389297/" ]
The voting system can be sustainable provided SE is able to **attract and retain knowledgeable subject matter experts**. A loose working definition of such a person might be someone who is capable of hitting 20k on a medium volume site. A voting system built around usefulness and quality of questions and answers absol...
### Allow No-Account visitors to somehow Vote or contribute Reputation *and / or* ### Gain Reputation based on Views --- * [Getting feedback from anonymous users](https://meta.stackexchange.com/questions/27618/getting-feedback-from-anonymous-users) * [Anonymous user feedback now in testing](https://meta.stackexchan...
338,680
Is voting still sustainable? ============================ * The number of votes going down and the dynamics changing towards questions and answers only being relevant during the first few days. * This makes the rating system, by means of a system that measures popularity (counts votes/likes), not very useful. Or at le...
2019/11/19
[ "https://meta.stackexchange.com/questions/338680", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/389297/" ]
The gamification has led to some detrimental effects: * The first answers always receive more votes than later answers, rewarding quick, sloppy answering. * The site has become addictive for many users who answer questions they are not truly qualified to answer, because even one upvote will still get you more reputati...
**Allow an explicit blank vote as well** This change to the voting *mechanism* which will: * Not change the game-play of the gamification that voting brings (reputation will still be based on the +1 and -1 votes). * Yet, it will be able to provide extra information and make the votes more meaningful in differentiatin...
338,680
Is voting still sustainable? ============================ * The number of votes going down and the dynamics changing towards questions and answers only being relevant during the first few days. * This makes the rating system, by means of a system that measures popularity (counts votes/likes), not very useful. Or at le...
2019/11/19
[ "https://meta.stackexchange.com/questions/338680", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/389297/" ]
Disclaimer: There was a time when I was the [most active voter on all of SE](http://english.stackexchange.com/questions/81404/short-description-of-an-accomplishment) and the first person to vote on questions and answers ~~50,000~~ 100,000 times, so I tend to see "more voting" as the cure-all for a lot of SE's problems....
There will probably no single answer that covers *all* aspects that have to be considered here. But some thoughts: Interestingly, the title asked about voting and *reputation*. But in the question itself, you did not mention reputation *at all*. I think that there is not much doubt that *voting per se* is useful. So I...
338,680
Is voting still sustainable? ============================ * The number of votes going down and the dynamics changing towards questions and answers only being relevant during the first few days. * This makes the rating system, by means of a system that measures popularity (counts votes/likes), not very useful. Or at le...
2019/11/19
[ "https://meta.stackexchange.com/questions/338680", "https://meta.stackexchange.com", "https://meta.stackexchange.com/users/389297/" ]
There will probably no single answer that covers *all* aspects that have to be considered here. But some thoughts: Interestingly, the title asked about voting and *reputation*. But in the question itself, you did not mention reputation *at all*. I think that there is not much doubt that *voting per se* is useful. So I...
It seems our current voting system is like democracy; it's not the best system we can create, but all others are worse. Now, it does not mean that we cannot improve the current system. I, for one, do not like the valuation increase of points for a question. Questions are easy, good questions are harder, and good answe...
73,479,035
I have a table where I have the value of this `RBC's`. I want to use my choose statement to search for that specific value. ```sql SELECT * FROM MyTable mt WHERE mt.MICROSCOPYRESULTNAME = '' ``` How can I search that particular value using my above query? Thank you...
2022/08/24
[ "https://Stackoverflow.com/questions/73479035", "https://Stackoverflow.com", "https://Stackoverflow.com/users/9517539/" ]
For SQL, when you have a string literal that includes a single quote, you escape the single quote with itself: ``` SELECT * FROM MyTable mt WHERE mt.MICROSCOPYRESULTNAME = 'RBC''s' ``` Note that when building these queries from code in a client language like java, php, etc, you should **NEVER** do this. Instead, in...
In Oracle, empty string `''` represents `NULL`, so that condition should be `is null`. ``` SQL> select * from mytable; MICROSCOPYRESULTNAME ID -------------------- ---------- 1 ABC 2 RBC's 3 SQL> select * from mytable where micro...
27,092,758
I'm playing around with [Google's managed VM feature](https://cloud.google.com/appengine/docs/managed-vms/) and finding you can fairly easily create some interesting setups. However, I have yet to figure out whether it's possible to use [persistent disks](https://cloud.google.com/compute/docs/disks) to mount a volume o...
2014/11/23
[ "https://Stackoverflow.com/questions/27092758", "https://Stackoverflow.com", "https://Stackoverflow.com/users/68909/" ]
Attaching a persistent disk to a Google Compute Engine instance --------------------------------------------------------------- Follow [the official persistent-disk](https://cloud.google.com/compute/docs/disks/persistent-disks) guide: * Create a disk * Attach to an instance [during instance creation](https://cloud.go...
If your persistent disk is attached and mounted already to the instance, I believe you can use it as a data volume with your docker container. I was able to find docker [documentation](https://docs.docker.com/userguide/dockervolumes/) which explains the steps on how to manage data in containers.