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 |
|---|---|---|---|---|---|
19,915,303 | Why I get a `'__packed__' attribute ignored [-Wattributes]` warning in an android NDK Project?
Here is the code
```
mem_ = malloc(size_);
uint8_t* ui8_ptr = reinterpret_cast<uint8_t*>(mem_);
*ui8_ptr++ = packet_version;
//uint32_t* ui32_ptr = reinterpret_cast<uint32_t*>(ui8_ptr);
__packed uint32... | 2013/11/11 | [
"https://Stackoverflow.com/questions/19915303",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2877935/"
] | GCC doesn't seem to support the packed attribute for all variables. It is only supported for `struct`, `union`, and `enum` types. So you could try something like this instead:
```
mem_ = malloc(size_);
uint8_t* ui8_ptr = reinterpret_cast<uint8_t*>(mem_);
*ui8_ptr++ = packet_version;
struct unaligned32_t
{
uint32... | Link you referenced is for RVDS compiler (probably armcc) and GCC doesn't support [`packed`](http://gcc.gnu.org/onlinedocs/gcc/Type-Attributes.html) attribute on pointers for such usage. |
24,023,449 | I am trying to build the following function in a three dimensional domain.

where  is a constant vector,  is the p... | 2014/06/03 | [
"https://Stackoverflow.com/questions/24023449",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1227860/"
] | Depending on the browser support you're looking for, you can use the `:not()` pseudo selector. It's a CSS3 selector, so caniuse.com says it should work on IE9+ and all non-IE browsers. If you need more support, you might get it with a selector shim.
To use it:
```
.fooditem:not(.fooditem-selected):hover
``` | There is nothing particularly *wrong* with the way you have it and I wouldn't even consider it a hack, as you're using basic CSS. However I am a fan of having negative states.
```
.fooditem{
}
.fooditem-notselected {
}
.fooditem-notselected:hover {
}
.fooditem-selected {
}
```
And using [toggleClass()](http://api... |
24,023,449 | I am trying to build the following function in a three dimensional domain.

where  is a constant vector,  is the p... | 2014/06/03 | [
"https://Stackoverflow.com/questions/24023449",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1227860/"
] | <http://jsfiddle.net/96BHd/7/>
Simplified CSS and Javascript. Uses :not() to prevent superfluous classes. You really don't need vendor prefixes on box-shadow (<http://css-tricks.com/do-we-need-box-shadow-prefixes/>).
JS
```
$(".fooditem").click(function () {
$(this).toggleClass("selected");
});
```
CSS
```
.food... | There is nothing particularly *wrong* with the way you have it and I wouldn't even consider it a hack, as you're using basic CSS. However I am a fan of having negative states.
```
.fooditem{
}
.fooditem-notselected {
}
.fooditem-notselected:hover {
}
.fooditem-selected {
}
```
And using [toggleClass()](http://api... |
24,023,449 | I am trying to build the following function in a three dimensional domain.

where  is a constant vector,  is the p... | 2014/06/03 | [
"https://Stackoverflow.com/questions/24023449",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1227860/"
] | Depending on the browser support you're looking for, you can use the `:not()` pseudo selector. It's a CSS3 selector, so caniuse.com says it should work on IE9+ and all non-IE browsers. If you need more support, you might get it with a selector shim.
To use it:
```
.fooditem:not(.fooditem-selected):hover
``` | Add a nonActive class to the div, and change `fooditem:hover` to `fooditem-nonActive:hover`, than in the js , remove the `fooditem-nonActive` class , add the `fooditem-selected` class :
Add a nonActive class to the div:
```
<div class='fooditem nonActive'></div>
```
change the hover in css :
```
.nonActive:hover {... |
24,023,449 | I am trying to build the following function in a three dimensional domain.

where  is a constant vector,  is the p... | 2014/06/03 | [
"https://Stackoverflow.com/questions/24023449",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1227860/"
] | <http://jsfiddle.net/96BHd/7/>
Simplified CSS and Javascript. Uses :not() to prevent superfluous classes. You really don't need vendor prefixes on box-shadow (<http://css-tricks.com/do-we-need-box-shadow-prefixes/>).
JS
```
$(".fooditem").click(function () {
$(this).toggleClass("selected");
});
```
CSS
```
.food... | Add a nonActive class to the div, and change `fooditem:hover` to `fooditem-nonActive:hover`, than in the js , remove the `fooditem-nonActive` class , add the `fooditem-selected` class :
Add a nonActive class to the div:
```
<div class='fooditem nonActive'></div>
```
change the hover in css :
```
.nonActive:hover {... |
24,023,449 | I am trying to build the following function in a three dimensional domain.

where  is a constant vector,  is the p... | 2014/06/03 | [
"https://Stackoverflow.com/questions/24023449",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1227860/"
] | <http://jsfiddle.net/96BHd/7/>
Simplified CSS and Javascript. Uses :not() to prevent superfluous classes. You really don't need vendor prefixes on box-shadow (<http://css-tricks.com/do-we-need-box-shadow-prefixes/>).
JS
```
$(".fooditem").click(function () {
$(this).toggleClass("selected");
});
```
CSS
```
.food... | Depending on the browser support you're looking for, you can use the `:not()` pseudo selector. It's a CSS3 selector, so caniuse.com says it should work on IE9+ and all non-IE browsers. If you need more support, you might get it with a selector shim.
To use it:
```
.fooditem:not(.fooditem-selected):hover
``` |
5,011 | The [**right click (context) menu**](http://en.wikipedia.org/wiki/Context_menu) is minimal and clean on a fresh installation of Windows. Install a bunch of applications and soon the context menu is loaded with all kinds of opening options from various applications.
How do I **remove** items from the **right click (con... | 2009/07/16 | [
"https://superuser.com/questions/5011",
"https://superuser.com",
"https://superuser.com/users/1062/"
] | [From here](http://www.tech-recipes.com/rx/1174/remove-menu-items-under-right-click-or-context-menu/):
1. Click Start
2. Click Run
3. Type in regedit and click `ENTER`
4. Browse to the following: `HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers`
5. You simply delete or export then delete the keys you do not want
Ther... | To do this, I use [Glary Utls](http://www.glaryutilities.com/):
>
> Glary Utilities is the #1 free, powerful and all-in-one utility in the
> world market! It offers numerous powerful and easy-to-use system tools
> and utilities to fix, speed up, maintain and protect your PC.
>
>
> |
5,011 | The [**right click (context) menu**](http://en.wikipedia.org/wiki/Context_menu) is minimal and clean on a fresh installation of Windows. Install a bunch of applications and soon the context menu is loaded with all kinds of opening options from various applications.
How do I **remove** items from the **right click (con... | 2009/07/16 | [
"https://superuser.com/questions/5011",
"https://superuser.com",
"https://superuser.com/users/1062/"
] | I've written a lengthy explanation of how to clean up a messy context menu, using either the registry editor:
>
> If you want to clean things up the truly geeky way, you can open up regedit.exe through the start menu search or run box, and then browse down to one of the following keys…
>
>
> Most of the menu items ... | [From here](http://www.tech-recipes.com/rx/1174/remove-menu-items-under-right-click-or-context-menu/):
1. Click Start
2. Click Run
3. Type in regedit and click `ENTER`
4. Browse to the following: `HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers`
5. You simply delete or export then delete the keys you do not want
Ther... |
5,011 | The [**right click (context) menu**](http://en.wikipedia.org/wiki/Context_menu) is minimal and clean on a fresh installation of Windows. Install a bunch of applications and soon the context menu is loaded with all kinds of opening options from various applications.
How do I **remove** items from the **right click (con... | 2009/07/16 | [
"https://superuser.com/questions/5011",
"https://superuser.com",
"https://superuser.com/users/1062/"
] | [From here](http://www.tech-recipes.com/rx/1174/remove-menu-items-under-right-click-or-context-menu/):
1. Click Start
2. Click Run
3. Type in regedit and click `ENTER`
4. Browse to the following: `HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers`
5. You simply delete or export then delete the keys you do not want
Ther... | If you're running Windows XP, Microsoft has a free utility called Microsoft PowerToys for Windows XP. The specific "PowerToy" that has the remove menu items options is called "TweakUI".
**How to edit menu options with TweakUI:**
1. Download, install and open TweakUI.
2. Click on the the "Templates" option on the left... |
5,011 | The [**right click (context) menu**](http://en.wikipedia.org/wiki/Context_menu) is minimal and clean on a fresh installation of Windows. Install a bunch of applications and soon the context menu is loaded with all kinds of opening options from various applications.
How do I **remove** items from the **right click (con... | 2009/07/16 | [
"https://superuser.com/questions/5011",
"https://superuser.com",
"https://superuser.com/users/1062/"
] | [From here](http://www.tech-recipes.com/rx/1174/remove-menu-items-under-right-click-or-context-menu/):
1. Click Start
2. Click Run
3. Type in regedit and click `ENTER`
4. Browse to the following: `HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers`
5. You simply delete or export then delete the keys you do not want
Ther... | Oops. Didn't realize How-To-Geek had it covered. (Not used to the aero look & didn't even realize it was ShellExView.)
Direct link to nirsoft's page for reference, <http://www.nirsoft.net/utils/shexview.html>.
>
> "ShellExView - Shell Extensions Manager"
>
> http://www.nirsoft.net/utils/shexview.html
>
> Shell Ext... |
5,011 | The [**right click (context) menu**](http://en.wikipedia.org/wiki/Context_menu) is minimal and clean on a fresh installation of Windows. Install a bunch of applications and soon the context menu is loaded with all kinds of opening options from various applications.
How do I **remove** items from the **right click (con... | 2009/07/16 | [
"https://superuser.com/questions/5011",
"https://superuser.com",
"https://superuser.com/users/1062/"
] | [From here](http://www.tech-recipes.com/rx/1174/remove-menu-items-under-right-click-or-context-menu/):
1. Click Start
2. Click Run
3. Type in regedit and click `ENTER`
4. Browse to the following: `HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers`
5. You simply delete or export then delete the keys you do not want
Ther... | To add to the other answers, here are other software that can also edit the Context Menu:
* [Default Programs Editor](http://defaultprogramseditor.com/) - Its UI makes it easy to disable context menu of a specific file type.
* [MenuMaid](https://alternativeto.net/software/menumaid/) - Its UI makes it easy to disable a... |
5,011 | The [**right click (context) menu**](http://en.wikipedia.org/wiki/Context_menu) is minimal and clean on a fresh installation of Windows. Install a bunch of applications and soon the context menu is loaded with all kinds of opening options from various applications.
How do I **remove** items from the **right click (con... | 2009/07/16 | [
"https://superuser.com/questions/5011",
"https://superuser.com",
"https://superuser.com/users/1062/"
] | I've written a lengthy explanation of how to clean up a messy context menu, using either the registry editor:
>
> If you want to clean things up the truly geeky way, you can open up regedit.exe through the start menu search or run box, and then browse down to one of the following keys…
>
>
> Most of the menu items ... | To do this, I use [Glary Utls](http://www.glaryutilities.com/):
>
> Glary Utilities is the #1 free, powerful and all-in-one utility in the
> world market! It offers numerous powerful and easy-to-use system tools
> and utilities to fix, speed up, maintain and protect your PC.
>
>
> |
5,011 | The [**right click (context) menu**](http://en.wikipedia.org/wiki/Context_menu) is minimal and clean on a fresh installation of Windows. Install a bunch of applications and soon the context menu is loaded with all kinds of opening options from various applications.
How do I **remove** items from the **right click (con... | 2009/07/16 | [
"https://superuser.com/questions/5011",
"https://superuser.com",
"https://superuser.com/users/1062/"
] | I've written a lengthy explanation of how to clean up a messy context menu, using either the registry editor:
>
> If you want to clean things up the truly geeky way, you can open up regedit.exe through the start menu search or run box, and then browse down to one of the following keys…
>
>
> Most of the menu items ... | If you're running Windows XP, Microsoft has a free utility called Microsoft PowerToys for Windows XP. The specific "PowerToy" that has the remove menu items options is called "TweakUI".
**How to edit menu options with TweakUI:**
1. Download, install and open TweakUI.
2. Click on the the "Templates" option on the left... |
5,011 | The [**right click (context) menu**](http://en.wikipedia.org/wiki/Context_menu) is minimal and clean on a fresh installation of Windows. Install a bunch of applications and soon the context menu is loaded with all kinds of opening options from various applications.
How do I **remove** items from the **right click (con... | 2009/07/16 | [
"https://superuser.com/questions/5011",
"https://superuser.com",
"https://superuser.com/users/1062/"
] | I've written a lengthy explanation of how to clean up a messy context menu, using either the registry editor:
>
> If you want to clean things up the truly geeky way, you can open up regedit.exe through the start menu search or run box, and then browse down to one of the following keys…
>
>
> Most of the menu items ... | Oops. Didn't realize How-To-Geek had it covered. (Not used to the aero look & didn't even realize it was ShellExView.)
Direct link to nirsoft's page for reference, <http://www.nirsoft.net/utils/shexview.html>.
>
> "ShellExView - Shell Extensions Manager"
>
> http://www.nirsoft.net/utils/shexview.html
>
> Shell Ext... |
5,011 | The [**right click (context) menu**](http://en.wikipedia.org/wiki/Context_menu) is minimal and clean on a fresh installation of Windows. Install a bunch of applications and soon the context menu is loaded with all kinds of opening options from various applications.
How do I **remove** items from the **right click (con... | 2009/07/16 | [
"https://superuser.com/questions/5011",
"https://superuser.com",
"https://superuser.com/users/1062/"
] | I've written a lengthy explanation of how to clean up a messy context menu, using either the registry editor:
>
> If you want to clean things up the truly geeky way, you can open up regedit.exe through the start menu search or run box, and then browse down to one of the following keys…
>
>
> Most of the menu items ... | To add to the other answers, here are other software that can also edit the Context Menu:
* [Default Programs Editor](http://defaultprogramseditor.com/) - Its UI makes it easy to disable context menu of a specific file type.
* [MenuMaid](https://alternativeto.net/software/menumaid/) - Its UI makes it easy to disable a... |
1,588,374 | Am I a lazy developer?
Is it being lazy to use automated tools, such as code generators and such?
Now, I could, if I had to, create all the data layers and entities I needed, but I choose to use CodeSmith to generate my datalayers and entities.
I also use Resharper and I would say it fights with MSDeploy as to which g... | 2009/10/19 | [
"https://Stackoverflow.com/questions/1588374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/138096/"
] | It's not being lazy - it's being smart. There's nothing wrong with using every tool at your disposal...as long as it makes you more productive. Using tools for the sake of using tools is a bad idea.
However, if you don't know what your tool is doing under the hood, you should learn about it so if you don't have the to... | Programming is about being lazy, about automating repetitive tasks. If you can't do that inside your language, using code generators and similar things is a useful workaround. |
1,588,374 | Am I a lazy developer?
Is it being lazy to use automated tools, such as code generators and such?
Now, I could, if I had to, create all the data layers and entities I needed, but I choose to use CodeSmith to generate my datalayers and entities.
I also use Resharper and I would say it fights with MSDeploy as to which g... | 2009/10/19 | [
"https://Stackoverflow.com/questions/1588374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/138096/"
] | In programmers, [laziness is a virtue](http://c2.com/cgi/wiki?LazinessImpatienceHubris), so don't worry. | It's only lazy if you use a tool to produce code and use it as-is without verifying that the code meets your needs and abides by your standards. |
1,588,374 | Am I a lazy developer?
Is it being lazy to use automated tools, such as code generators and such?
Now, I could, if I had to, create all the data layers and entities I needed, but I choose to use CodeSmith to generate my datalayers and entities.
I also use Resharper and I would say it fights with MSDeploy as to which g... | 2009/10/19 | [
"https://Stackoverflow.com/questions/1588374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/138096/"
] | In programmers, [laziness is a virtue](http://c2.com/cgi/wiki?LazinessImpatienceHubris), so don't worry. | I think that's the wrong question. Laziness is a virtue. I've seen too many programmers who do things the hard way rather than sitting back and thinking for a few minutes to come up with an easier way. I've had so many times that I've said to a junior programmer something to the effect of, "Yes, I respect your diligenc... |
1,588,374 | Am I a lazy developer?
Is it being lazy to use automated tools, such as code generators and such?
Now, I could, if I had to, create all the data layers and entities I needed, but I choose to use CodeSmith to generate my datalayers and entities.
I also use Resharper and I would say it fights with MSDeploy as to which g... | 2009/10/19 | [
"https://Stackoverflow.com/questions/1588374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/138096/"
] | In programmers, [laziness is a virtue](http://c2.com/cgi/wiki?LazinessImpatienceHubris), so don't worry. | As everyone else already pointed out there's nothing wrong in your use of code generators.
Still I can see downsides and reasons to avoid it in certain particular sitations.
* **choice of language**. Sometimes the very same fact you need a code generator to get your coding started could imply you're using the **wrong... |
1,588,374 | Am I a lazy developer?
Is it being lazy to use automated tools, such as code generators and such?
Now, I could, if I had to, create all the data layers and entities I needed, but I choose to use CodeSmith to generate my datalayers and entities.
I also use Resharper and I would say it fights with MSDeploy as to which g... | 2009/10/19 | [
"https://Stackoverflow.com/questions/1588374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/138096/"
] | It's only lazy if you use a tool to produce code and use it as-is without verifying that the code meets your needs and abides by your standards. | Laziness is a trait that most good programmers have. [Unless they work for Adobe, in which case they are often lazy in a bad way.](http://blogbros.com/?p=21) |
1,588,374 | Am I a lazy developer?
Is it being lazy to use automated tools, such as code generators and such?
Now, I could, if I had to, create all the data layers and entities I needed, but I choose to use CodeSmith to generate my datalayers and entities.
I also use Resharper and I would say it fights with MSDeploy as to which g... | 2009/10/19 | [
"https://Stackoverflow.com/questions/1588374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/138096/"
] | In programmers, [laziness is a virtue](http://c2.com/cgi/wiki?LazinessImpatienceHubris), so don't worry. | I'd say you're more efficient rather than lazy. |
1,588,374 | Am I a lazy developer?
Is it being lazy to use automated tools, such as code generators and such?
Now, I could, if I had to, create all the data layers and entities I needed, but I choose to use CodeSmith to generate my datalayers and entities.
I also use Resharper and I would say it fights with MSDeploy as to which g... | 2009/10/19 | [
"https://Stackoverflow.com/questions/1588374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/138096/"
] | >
> Both these tools from my point of view are no brainers as they improve output massively.
>
>
>
This means you're not being lazy, you are using the appropriate tools to enable you to concentrate on the important aspects of the job. | >
> I'm sure there are purists out there that would say everything should be wirtten by you so you know what everything is doing
>
>
>
This might have been a viable point of view during the early days of programming. But nowadays, this is simply not feasible (or even preferable). After all, you've already obscured... |
1,588,374 | Am I a lazy developer?
Is it being lazy to use automated tools, such as code generators and such?
Now, I could, if I had to, create all the data layers and entities I needed, but I choose to use CodeSmith to generate my datalayers and entities.
I also use Resharper and I would say it fights with MSDeploy as to which g... | 2009/10/19 | [
"https://Stackoverflow.com/questions/1588374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/138096/"
] | You don'nt need to reinvent the wheel n times, this is done often enough. Briefly I'd state that using tools like the ones you mentioned (within reason) is absolutely no problem... | Programming is about being lazy, about automating repetitive tasks. If you can't do that inside your language, using code generators and similar things is a useful workaround. |
1,588,374 | Am I a lazy developer?
Is it being lazy to use automated tools, such as code generators and such?
Now, I could, if I had to, create all the data layers and entities I needed, but I choose to use CodeSmith to generate my datalayers and entities.
I also use Resharper and I would say it fights with MSDeploy as to which g... | 2009/10/19 | [
"https://Stackoverflow.com/questions/1588374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/138096/"
] | >
> Both these tools from my point of view are no brainers as they improve output massively.
>
>
>
This means you're not being lazy, you are using the appropriate tools to enable you to concentrate on the important aspects of the job. | It depends on what you're writing, of course. I am suprised nobody's brought this up. If you're writing device drivers, operating systems, protocols, or server software (web servers, tcp driven servers, etc), you should probably do it by hand.
But with what I do and probably what a lot of us do is implement business p... |
1,588,374 | Am I a lazy developer?
Is it being lazy to use automated tools, such as code generators and such?
Now, I could, if I had to, create all the data layers and entities I needed, but I choose to use CodeSmith to generate my datalayers and entities.
I also use Resharper and I would say it fights with MSDeploy as to which g... | 2009/10/19 | [
"https://Stackoverflow.com/questions/1588374",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/138096/"
] | Yes you are being a lazy developer, be honest to yourself, if you take the time to do it the hard way you can call yourself less lazy than you are now.
The point is, being lazy isn't inefficient at all.
Lazy people take time to look at the problems from different direction before acting upon it, this avoids unnecessar... | Laziness is a trait that most good programmers have. [Unless they work for Adobe, in which case they are often lazy in a bad way.](http://blogbros.com/?p=21) |
16,442,323 | I'm trying to set up a MvvmCross application project and run unit tests against it (namely the view models in it). I'm using Xamarin Studio on OS X (v. 4.0.4, latest at the time of writing).
The MvvmCross App is set up as a portable class library. The test assembly is set up as a plain Mono/.Net assembly (not PCL) ref... | 2013/05/08 | [
"https://Stackoverflow.com/questions/16442323",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/125407/"
] | This problem is linked to the fact that Xamarin and Mono don't yet properly support Portable Class Libraries - instead they compile and link against local fixed assemblies depending on what version of Mono (Xamarin.Android, Xamarin.iOS, etc) you have loaded - see <http://slodge.blogspot.co.uk/2013/01/almost-portable-bi... | In addition to @Stuart's answer (which is correct), I want to post a second workaround that I found allows me to achieve my desired scenario (PCL assembly testable on Mac OS and Windows).
This workaround relies on Xamarin Studio 4.0.5 (or later) that introduced support for wildcard includes.
Specifically, when comp... |
9,205 | I am looking for some more definitive and in depth information about record locking in Salesforce. I will admit I am quite a novice when it comes to the topic of record locking, and am not sure it is even going to solve my issue.
The reason I am investigating the feature is a difficult random bug that has been discove... | 2013/03/05 | [
"https://salesforce.stackexchange.com/questions/9205",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/80/"
] | FOR UPDATE will take an underlying database write lock on the selected rows, other requests that require the lock while another thread has it locked will wait a short amount of time (in the order of 5-10 seconds) for this lock, and then timeout if it wasn't able to get the lock (this lock timeout gets propagated as a U... | If you wish to test or look for some side effects in your application, a quick way to do it is via Execute Anonymous:
```
opportunity locked = [select id from opportunity where id ='a03q000000AAAAe' for update];
for (integer i= 0; i<999999999; i++)
system.debug('nothing '+i);
```
So you get about a minute until... |
9,205 | I am looking for some more definitive and in depth information about record locking in Salesforce. I will admit I am quite a novice when it comes to the topic of record locking, and am not sure it is even going to solve my issue.
The reason I am investigating the feature is a difficult random bug that has been discove... | 2013/03/05 | [
"https://salesforce.stackexchange.com/questions/9205",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/80/"
] | FOR UPDATE will take an underlying database write lock on the selected rows, other requests that require the lock while another thread has it locked will wait a short amount of time (in the order of 5-10 seconds) for this lock, and then timeout if it wasn't able to get the lock (this lock timeout gets propagated as a U... | I performed 4 experiments, take a look:
Experiment 1
------------
Description:
* User **A** SOQL for a record **without** FOR UPDATE statement and **has long running transaction**.
* User **B** SOQL for a record **without** FOR UPDATE statement and **tries to update record**.
Results:
* User **B** can update recor... |
9,205 | I am looking for some more definitive and in depth information about record locking in Salesforce. I will admit I am quite a novice when it comes to the topic of record locking, and am not sure it is even going to solve my issue.
The reason I am investigating the feature is a difficult random bug that has been discove... | 2013/03/05 | [
"https://salesforce.stackexchange.com/questions/9205",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/80/"
] | I performed 4 experiments, take a look:
Experiment 1
------------
Description:
* User **A** SOQL for a record **without** FOR UPDATE statement and **has long running transaction**.
* User **B** SOQL for a record **without** FOR UPDATE statement and **tries to update record**.
Results:
* User **B** can update recor... | If you wish to test or look for some side effects in your application, a quick way to do it is via Execute Anonymous:
```
opportunity locked = [select id from opportunity where id ='a03q000000AAAAe' for update];
for (integer i= 0; i<999999999; i++)
system.debug('nothing '+i);
```
So you get about a minute until... |
196,543 | An athame is a magical item that is created to reflect and direct psychic energy. To create this tool, one cannot simply enchant ordinary weapons to give them magical properties. Rather, these items must be built from the ground up, through special materials, ingredients, and rituals. The process can take months or eve... | 2021/02/23 | [
"https://worldbuilding.stackexchange.com/questions/196543",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/52361/"
] | Good works CAN cleanse a stained item, BUT...
---------------------------------------------
From an abstract perspective, a tainted item can be made less tainted by being used for noble ends, just like a holy item can be corrupted by being used for wicked ends. However, because a tainted item corrupts the user, the us... | It's because "user" is a loose concept when it comes to magic items. A magic sword does passively gain power from its wielder but it also gathers power from anyone it is used to kill or hurt. This power is almost always negative as there are very few people who enjoy being stabbed. In the case of holy and good aligned ... |
196,543 | An athame is a magical item that is created to reflect and direct psychic energy. To create this tool, one cannot simply enchant ordinary weapons to give them magical properties. Rather, these items must be built from the ground up, through special materials, ingredients, and rituals. The process can take months or eve... | 2021/02/23 | [
"https://worldbuilding.stackexchange.com/questions/196543",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/52361/"
] | I think an interesting approach to take is the view of entropy. In physics, entropy is the amount of disorder or randomness in a system. A chaotic and random state is seen as the natural state, while a highly ordered system requires a lot of energy and effort to create. Despite this energy and effort, though, entropy a... | **Items are fundamentally jerks.**
It sounds harsh but it is true. Magic swords find it humorous to trip their users. Magic books revel in causing paper cuts. Magic shotputs want to be dropped onto groins. Stuff is just mean and bad because god made it that way.
If you magic something up and force goodness into its p... |
196,543 | An athame is a magical item that is created to reflect and direct psychic energy. To create this tool, one cannot simply enchant ordinary weapons to give them magical properties. Rather, these items must be built from the ground up, through special materials, ingredients, and rituals. The process can take months or eve... | 2021/02/23 | [
"https://worldbuilding.stackexchange.com/questions/196543",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/52361/"
] | I think an interesting approach to take is the view of entropy. In physics, entropy is the amount of disorder or randomness in a system. A chaotic and random state is seen as the natural state, while a highly ordered system requires a lot of energy and effort to create. Despite this energy and effort, though, entropy a... | "Good" and "evil" are not equivalent in nature. A man who murders one is a murderer. Perhaps a man who lies once is not yet a liar, but certainly a man who tells a lie once out of every ten things is a liar.
Evil is a flaw in a good thing. As with a crack in a pail, little of it needs to be damaged to make the whole t... |
196,543 | An athame is a magical item that is created to reflect and direct psychic energy. To create this tool, one cannot simply enchant ordinary weapons to give them magical properties. Rather, these items must be built from the ground up, through special materials, ingredients, and rituals. The process can take months or eve... | 2021/02/23 | [
"https://worldbuilding.stackexchange.com/questions/196543",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/52361/"
] | I think an interesting approach to take is the view of entropy. In physics, entropy is the amount of disorder or randomness in a system. A chaotic and random state is seen as the natural state, while a highly ordered system requires a lot of energy and effort to create. Despite this energy and effort, though, entropy a... | Good and Evil aren't counterparts
---------------------------------
Many people speculated that good items should redeem evil users, or good users should redeem evil items... but the scholars in psychomechanics have determined that this idea is based on a flawed conception of what is good and what is evil.
Where popu... |
196,543 | An athame is a magical item that is created to reflect and direct psychic energy. To create this tool, one cannot simply enchant ordinary weapons to give them magical properties. Rather, these items must be built from the ground up, through special materials, ingredients, and rituals. The process can take months or eve... | 2021/02/23 | [
"https://worldbuilding.stackexchange.com/questions/196543",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/52361/"
] | Good works CAN cleanse a stained item, BUT...
---------------------------------------------
From an abstract perspective, a tainted item can be made less tainted by being used for noble ends, just like a holy item can be corrupted by being used for wicked ends. However, because a tainted item corrupts the user, the us... | Good and Evil aren't counterparts
---------------------------------
Many people speculated that good items should redeem evil users, or good users should redeem evil items... but the scholars in psychomechanics have determined that this idea is based on a flawed conception of what is good and what is evil.
Where popu... |
196,543 | An athame is a magical item that is created to reflect and direct psychic energy. To create this tool, one cannot simply enchant ordinary weapons to give them magical properties. Rather, these items must be built from the ground up, through special materials, ingredients, and rituals. The process can take months or eve... | 2021/02/23 | [
"https://worldbuilding.stackexchange.com/questions/196543",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/52361/"
] | I think an interesting approach to take is the view of entropy. In physics, entropy is the amount of disorder or randomness in a system. A chaotic and random state is seen as the natural state, while a highly ordered system requires a lot of energy and effort to create. Despite this energy and effort, though, entropy a... | "Good" and "evil" are merely human labels; psychic energy is just psychic energy.
A simplistic definition of "being good" requires adhering to certain rules (no killing unnecessarily, no stealing, no torture, etc.) even when it would be more convenient or pleasurable to do so. Wielding an "evil" weapon exposes the min... |
196,543 | An athame is a magical item that is created to reflect and direct psychic energy. To create this tool, one cannot simply enchant ordinary weapons to give them magical properties. Rather, these items must be built from the ground up, through special materials, ingredients, and rituals. The process can take months or eve... | 2021/02/23 | [
"https://worldbuilding.stackexchange.com/questions/196543",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/52361/"
] | Good works CAN cleanse a stained item, BUT...
---------------------------------------------
From an abstract perspective, a tainted item can be made less tainted by being used for noble ends, just like a holy item can be corrupted by being used for wicked ends. However, because a tainted item corrupts the user, the us... | "Good" and "evil" are merely human labels; psychic energy is just psychic energy.
A simplistic definition of "being good" requires adhering to certain rules (no killing unnecessarily, no stealing, no torture, etc.) even when it would be more convenient or pleasurable to do so. Wielding an "evil" weapon exposes the min... |
196,543 | An athame is a magical item that is created to reflect and direct psychic energy. To create this tool, one cannot simply enchant ordinary weapons to give them magical properties. Rather, these items must be built from the ground up, through special materials, ingredients, and rituals. The process can take months or eve... | 2021/02/23 | [
"https://worldbuilding.stackexchange.com/questions/196543",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/52361/"
] | I think an interesting approach to take is the view of entropy. In physics, entropy is the amount of disorder or randomness in a system. A chaotic and random state is seen as the natural state, while a highly ordered system requires a lot of energy and effort to create. Despite this energy and effort, though, entropy a... | Going to the negative states breaks the seal of positiveness of the items. There is no turning back.
It's like when you buy an action figure or another collectible item, and just cutting open the sealed package kills its values on the market of collectible (no matter if you actually used it or not). A seal is a seal, ... |
196,543 | An athame is a magical item that is created to reflect and direct psychic energy. To create this tool, one cannot simply enchant ordinary weapons to give them magical properties. Rather, these items must be built from the ground up, through special materials, ingredients, and rituals. The process can take months or eve... | 2021/02/23 | [
"https://worldbuilding.stackexchange.com/questions/196543",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/52361/"
] | I think an interesting approach to take is the view of entropy. In physics, entropy is the amount of disorder or randomness in a system. A chaotic and random state is seen as the natural state, while a highly ordered system requires a lot of energy and effort to create. Despite this energy and effort, though, entropy a... | It's because "user" is a loose concept when it comes to magic items. A magic sword does passively gain power from its wielder but it also gathers power from anyone it is used to kill or hurt. This power is almost always negative as there are very few people who enjoy being stabbed. In the case of holy and good aligned ... |
196,543 | An athame is a magical item that is created to reflect and direct psychic energy. To create this tool, one cannot simply enchant ordinary weapons to give them magical properties. Rather, these items must be built from the ground up, through special materials, ingredients, and rituals. The process can take months or eve... | 2021/02/23 | [
"https://worldbuilding.stackexchange.com/questions/196543",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/52361/"
] | Good works CAN cleanse a stained item, BUT...
---------------------------------------------
From an abstract perspective, a tainted item can be made less tainted by being used for noble ends, just like a holy item can be corrupted by being used for wicked ends. However, because a tainted item corrupts the user, the us... | Going to the negative states breaks the seal of positiveness of the items. There is no turning back.
It's like when you buy an action figure or another collectible item, and just cutting open the sealed package kills its values on the market of collectible (no matter if you actually used it or not). A seal is a seal, ... |
60,076,623 | I have activity stack
`A>B>C>D>E>F`
From `Αctivity` F I want to start `Αctivity` C again from fresh and close all C,D,E,F activities so the new `Αctivity` stack will be:
`A>B>C`(C as a Fresh activity)
I tried using `singleTask` to `Activity` C but it is not relaunching the `Activity` C. It is resuming the `Activit... | 2020/02/05 | [
"https://Stackoverflow.com/questions/60076623",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6657556/"
] | Your quote is incompletely copied. The text actually says
>
> Parsing of the `#!` switches starts wherever "perl" is mentioned in
> the line.
> The sequences `-*` and `-` are specifically ignored so that you could,
> if you were so inclined, say
>
>
>
> ```
> #!/bin/sh --
> #! -*- perl -*- -p
> eval 'exec perl... | It's an error in the documentation. The original line in the script was
```
# -*- perl -*- -p
```
See [this pull request](https://github.com/Perl/perl5/pull/17532). |
18,915,092 | I would like to show and hide the Status bar on some controllers. Can this be done or is it more of an overall app setting.
I have seen many posts/questions about the plist update:
```
View controller-based status bar appearance - NO
```
If this is completed what control is then given?
I am looking to show the sta... | 2013/09/20 | [
"https://Stackoverflow.com/questions/18915092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1523603/"
] | The plist setting `"View controller-based status bar appearance"` only controls if a per-controller based setting should be applied on iOS 7.
If you set this plist option to NO, you have to manually enable and disable the status bar like (as it was until iOS 6):
```
[[UIApplication sharedApplication] setStatusBarHid... | On iOS 7 and later, just implement `-prefersStatusBarHidden`, for example in a `UIViewController` that should hide the status bar:
```
- (BOOL)prefersStatusBarHidden {
return YES;
}
```
The default is `NO`. |
18,915,092 | I would like to show and hide the Status bar on some controllers. Can this be done or is it more of an overall app setting.
I have seen many posts/questions about the plist update:
```
View controller-based status bar appearance - NO
```
If this is completed what control is then given?
I am looking to show the sta... | 2013/09/20 | [
"https://Stackoverflow.com/questions/18915092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1523603/"
] | The plist setting `"View controller-based status bar appearance"` only controls if a per-controller based setting should be applied on iOS 7.
If you set this plist option to NO, you have to manually enable and disable the status bar like (as it was until iOS 6):
```
[[UIApplication sharedApplication] setStatusBarHid... | Swift version of [Mojo66](https://stackoverflow.com/users/1623781/mojo66)'s [answer](https://stackoverflow.com/a/32728623/3033149):
```
override func prefersStatusBarHidden() -> Bool {
return true
}
``` |
18,915,092 | I would like to show and hide the Status bar on some controllers. Can this be done or is it more of an overall app setting.
I have seen many posts/questions about the plist update:
```
View controller-based status bar appearance - NO
```
If this is completed what control is then given?
I am looking to show the sta... | 2013/09/20 | [
"https://Stackoverflow.com/questions/18915092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1523603/"
] | The plist setting `"View controller-based status bar appearance"` only controls if a per-controller based setting should be applied on iOS 7.
If you set this plist option to NO, you have to manually enable and disable the status bar like (as it was until iOS 6):
```
[[UIApplication sharedApplication] setStatusBarHid... | **Swift 3**:
```
override var prefersStatusBarHidden: Bool {
return true
}
``` |
18,915,092 | I would like to show and hide the Status bar on some controllers. Can this be done or is it more of an overall app setting.
I have seen many posts/questions about the plist update:
```
View controller-based status bar appearance - NO
```
If this is completed what control is then given?
I am looking to show the sta... | 2013/09/20 | [
"https://Stackoverflow.com/questions/18915092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1523603/"
] | The plist setting `"View controller-based status bar appearance"` only controls if a per-controller based setting should be applied on iOS 7.
If you set this plist option to NO, you have to manually enable and disable the status bar like (as it was until iOS 6):
```
[[UIApplication sharedApplication] setStatusBarHid... | You can also show/hide the status bar in an animation block, by putting animation code inside didSet property of variable that describes whether it should be shown or hidden. When you set a new value for the `statusBarHidden` Bool, this automatically triggers the animated updating of the status bar over the duration yo... |
18,915,092 | I would like to show and hide the Status bar on some controllers. Can this be done or is it more of an overall app setting.
I have seen many posts/questions about the plist update:
```
View controller-based status bar appearance - NO
```
If this is completed what control is then given?
I am looking to show the sta... | 2013/09/20 | [
"https://Stackoverflow.com/questions/18915092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1523603/"
] | On iOS 7 and later, just implement `-prefersStatusBarHidden`, for example in a `UIViewController` that should hide the status bar:
```
- (BOOL)prefersStatusBarHidden {
return YES;
}
```
The default is `NO`. | Swift version of [Mojo66](https://stackoverflow.com/users/1623781/mojo66)'s [answer](https://stackoverflow.com/a/32728623/3033149):
```
override func prefersStatusBarHidden() -> Bool {
return true
}
``` |
18,915,092 | I would like to show and hide the Status bar on some controllers. Can this be done or is it more of an overall app setting.
I have seen many posts/questions about the plist update:
```
View controller-based status bar appearance - NO
```
If this is completed what control is then given?
I am looking to show the sta... | 2013/09/20 | [
"https://Stackoverflow.com/questions/18915092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1523603/"
] | On iOS 7 and later, just implement `-prefersStatusBarHidden`, for example in a `UIViewController` that should hide the status bar:
```
- (BOOL)prefersStatusBarHidden {
return YES;
}
```
The default is `NO`. | You can also show/hide the status bar in an animation block, by putting animation code inside didSet property of variable that describes whether it should be shown or hidden. When you set a new value for the `statusBarHidden` Bool, this automatically triggers the animated updating of the status bar over the duration yo... |
18,915,092 | I would like to show and hide the Status bar on some controllers. Can this be done or is it more of an overall app setting.
I have seen many posts/questions about the plist update:
```
View controller-based status bar appearance - NO
```
If this is completed what control is then given?
I am looking to show the sta... | 2013/09/20 | [
"https://Stackoverflow.com/questions/18915092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1523603/"
] | **Swift 3**:
```
override var prefersStatusBarHidden: Bool {
return true
}
``` | Swift version of [Mojo66](https://stackoverflow.com/users/1623781/mojo66)'s [answer](https://stackoverflow.com/a/32728623/3033149):
```
override func prefersStatusBarHidden() -> Bool {
return true
}
``` |
18,915,092 | I would like to show and hide the Status bar on some controllers. Can this be done or is it more of an overall app setting.
I have seen many posts/questions about the plist update:
```
View controller-based status bar appearance - NO
```
If this is completed what control is then given?
I am looking to show the sta... | 2013/09/20 | [
"https://Stackoverflow.com/questions/18915092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1523603/"
] | You can also show/hide the status bar in an animation block, by putting animation code inside didSet property of variable that describes whether it should be shown or hidden. When you set a new value for the `statusBarHidden` Bool, this automatically triggers the animated updating of the status bar over the duration yo... | Swift version of [Mojo66](https://stackoverflow.com/users/1623781/mojo66)'s [answer](https://stackoverflow.com/a/32728623/3033149):
```
override func prefersStatusBarHidden() -> Bool {
return true
}
``` |
18,915,092 | I would like to show and hide the Status bar on some controllers. Can this be done or is it more of an overall app setting.
I have seen many posts/questions about the plist update:
```
View controller-based status bar appearance - NO
```
If this is completed what control is then given?
I am looking to show the sta... | 2013/09/20 | [
"https://Stackoverflow.com/questions/18915092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1523603/"
] | **Swift 3**:
```
override var prefersStatusBarHidden: Bool {
return true
}
``` | You can also show/hide the status bar in an animation block, by putting animation code inside didSet property of variable that describes whether it should be shown or hidden. When you set a new value for the `statusBarHidden` Bool, this automatically triggers the animated updating of the status bar over the duration yo... |
5,574,107 | I have successfully written a custom function and hooked it into my Solr engine. However, I am having problems passing parameters into that function from within the data-import.xml import definition file.
I have tried to methods, one which passes in a field from the current entity query, and the other approach which t... | 2011/04/06 | [
"https://Stackoverflow.com/questions/5574107",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/332523/"
] | I'm not exactly sure here, but it sounds to me like you want to:
Create a view;
add a "filter" which limits the view to only your desired content type;
add an "argument," and then expose this argument, for either title, body, or one of your text fields.
Unfortunately:
This alone will not search the whole node. If mos... | Have you tried [Custom Search](http://drupal.org/project/custom_search) module? |
5,574,107 | I have successfully written a custom function and hooked it into my Solr engine. However, I am having problems passing parameters into that function from within the data-import.xml import definition file.
I have tried to methods, one which passes in a field from the current entity query, and the other approach which t... | 2011/04/06 | [
"https://Stackoverflow.com/questions/5574107",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/332523/"
] | If anybody is interested, i have edited the header block view and load a custom\_search\_block inside it.
Thanks anyway | Have you tried [Custom Search](http://drupal.org/project/custom_search) module? |
5,574,107 | I have successfully written a custom function and hooked it into my Solr engine. However, I am having problems passing parameters into that function from within the data-import.xml import definition file.
I have tried to methods, one which passes in a field from the current entity query, and the other approach which t... | 2011/04/06 | [
"https://Stackoverflow.com/questions/5574107",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/332523/"
] | I'm not exactly sure here, but it sounds to me like you want to:
Create a view;
add a "filter" which limits the view to only your desired content type;
add an "argument," and then expose this argument, for either title, body, or one of your text fields.
Unfortunately:
This alone will not search the whole node. If mos... | create a view with the content you want and then filter it by content. Expose the filter.
<http://beeznest.wordpress.com/2011/11/01/create-a-view-to-search-on-content-title-in-7-steps-in-drupal-7/> |
5,574,107 | I have successfully written a custom function and hooked it into my Solr engine. However, I am having problems passing parameters into that function from within the data-import.xml import definition file.
I have tried to methods, one which passes in a field from the current entity query, and the other approach which t... | 2011/04/06 | [
"https://Stackoverflow.com/questions/5574107",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/332523/"
] | If anybody is interested, i have edited the header block view and load a custom\_search\_block inside it.
Thanks anyway | create a view with the content you want and then filter it by content. Expose the filter.
<http://beeznest.wordpress.com/2011/11/01/create-a-view-to-search-on-content-title-in-7-steps-in-drupal-7/> |
25,728,707 | I've been reading about UI automation using instruments, and the old documentation suggested that this is done using a javascript library to access frontmost app, then access UI view hierarchy.
I see that an iOS8 device has "Enable UI automation" option in the developer menu in settings. I also see that there's some d... | 2014/09/08 | [
"https://Stackoverflow.com/questions/25728707",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/967484/"
] | I believe UIAutomation is still a JavaScript only testing framework. We would have heard otherwise at WWDC or in the release notes, if any other language was supported.
Concrete evidence of this however, is that the "Automation" Instrument used when profiling an app has no language drop downs to indicate another lang... | You should look into Subliminal. It's a testing framework which is built on top of UIAutomation that allows you write your tests in Objective C or Swift.
<https://github.com/inkling/Subliminal> |
25,728,707 | I've been reading about UI automation using instruments, and the old documentation suggested that this is done using a javascript library to access frontmost app, then access UI view hierarchy.
I see that an iOS8 device has "Enable UI automation" option in the developer menu in settings. I also see that there's some d... | 2014/09/08 | [
"https://Stackoverflow.com/questions/25728707",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/967484/"
] | I believe UIAutomation is still a JavaScript only testing framework. We would have heard otherwise at WWDC or in the release notes, if any other language was supported.
Concrete evidence of this however, is that the "Automation" Instrument used when profiling an app has no language drop downs to indicate another lang... | We have UIAutomation working in iOS 8 using the [Illuminator](https://github.com/paypal/Illuminator) framework (which I wrote), and use it in our CI. It is a set of extensions to the Javascript that UIAutomation provides.
Currently, Javascript is the only language for UIAutomation that Apple supports. |
25,728,707 | I've been reading about UI automation using instruments, and the old documentation suggested that this is done using a javascript library to access frontmost app, then access UI view hierarchy.
I see that an iOS8 device has "Enable UI automation" option in the developer menu in settings. I also see that there's some d... | 2014/09/08 | [
"https://Stackoverflow.com/questions/25728707",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/967484/"
] | You should look into Subliminal. It's a testing framework which is built on top of UIAutomation that allows you write your tests in Objective C or Swift.
<https://github.com/inkling/Subliminal> | We have UIAutomation working in iOS 8 using the [Illuminator](https://github.com/paypal/Illuminator) framework (which I wrote), and use it in our CI. It is a set of extensions to the Javascript that UIAutomation provides.
Currently, Javascript is the only language for UIAutomation that Apple supports. |
20,274,099 | I have got a project that involves shell scripts and comparing values/variables within them. I have looked here and elsewhere on comparing variables and I have tried all the various examples given but I am running into something that is not as advertised. OS is Solaris10
I have created the following script as a learni... | 2013/11/28 | [
"https://Stackoverflow.com/questions/20274099",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3047191/"
] | After `if`, you need a shell command, like anywhere else. `$X = $Y` is parsed as a shell command, meaning `$X` is interpreted as a command name (provided that the value of the variable is a single word).
You can use the `[` command (also available as `test`) or the `[[ … ]]` special syntax to compare two variables. No... | This KornShell (ksh) script should work:
**soExample.ksh**
```
#!/bin/ksh
#Initialize Variables
X="a"
Y="a"
#Function to create File with Input
#Params: 1}
stest(){
if [ "${X}" == "${Y}" ]; then
echo "they're the same"
else
echo "they're not the same"
fi
}
#-----------
#---Main----
#-... |
10,601,972 | I want to implement a webapp - a feed that integrates data from various sources and displays them to users. A user should only be able to see the feed items that he has permissions to read (e.g. because they belong to a project that he is a member of). However, a feed item might (and will) be visible by many users.
I'... | 2012/05/15 | [
"https://Stackoverflow.com/questions/10601972",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/148450/"
] | You can enforce read permissions as described in [CouchDB Authorization on a Per-Database Basis](https://stackoverflow.com/questions/4055450/couchdb-authorization-on-a-per-database-basis).
For write permissions you can use validation functions as described on [CouchDB
The Definitive Guide - Security](http://guide.couc... | Other than (as [victorsavu3](https://stackoverflow.com/users/1557475/victorsavu3) has suggested already) handling your read auth in a proxy between your app and couch, there are only two other alternatives that I can think of.
First is to just not care, disk is cheap and having multiple copies of the data may seem lik... |
65,199,920 | I tried to build and distribute couple of Adhoc distribution build with bit code and without bitcode .. and generated build on both Diawi and installonair anyway the link installed on 2 devices without any problems. 1. iphone x - ios 14.1 and iPhone 6s - ios 14.2 but it's not installing on my manager's iPhone xs - iOS ... | 2020/12/08 | [
"https://Stackoverflow.com/questions/65199920",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/13657669/"
] | Remove anything you have in embedded framework and archive it again, It worked for me. I had Pods framework of my own project that generated by automatically after I removed that and archive again it worked. And also I used fresh distribution certificate and bundle identifier. Hope it will helps for some developers. | I was facing similar problems.
Enterprise app:
* installing smoothly from the current server.
* Change the server and some user-facing this problem.
Solving methods:
* Update the version number of the app.
* Change the build number of the app.
Its working fine. |
6,840,986 | Hi I am look for a proven java security web-library which is a bit more low-level and therefore less intrusive than the well known frameworks spring-security and apache shiro.
Just something which has best-practive utility-apis for example to encode a remember-me cookie or for dighest authentication, accessing ldap. A... | 2011/07/27 | [
"https://Stackoverflow.com/questions/6840986",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/657325/"
] | Well, you can always use the `HttpServletRequest.login()` method or `j_security_check` and implement an auth manager beneath it for your particular server, that's pretty much the default & low level standard thing... Your only real other choice is, as you mentioned, security frameworks. | If you don't want to use either of one, use container-managed security which both Tomcat and Jetty provide. |
6,840,986 | Hi I am look for a proven java security web-library which is a bit more low-level and therefore less intrusive than the well known frameworks spring-security and apache shiro.
Just something which has best-practive utility-apis for example to encode a remember-me cookie or for dighest authentication, accessing ldap. A... | 2011/07/27 | [
"https://Stackoverflow.com/questions/6840986",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/657325/"
] | Have a look at the [Apache Shiro](http://shiro.apache.org) project it does a lot more then the standard libraries, and makes it really easy. | If you don't want to use either of one, use container-managed security which both Tomcat and Jetty provide. |
18,057,109 | According to this [tutorial](http://coding.smashingmagazine.com/2011/09/09/an-introduction-to-less-and-comparison-to-sass/) my less code should work but it doesn't.
Can you please help me to get my less css to work.
Right now it does not working - Page loads with no applied styles. What am I doing wrong?
The error i... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18057109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1477816/"
] | If you are using IIS you have to add a ".less" extension to MIME type within IIS manager. when you add a new MIMI, enter ".less" as the extension and "text/css" as the MIME type. | It seems that your source location of your file is not correct.
```
<script src="_/script/less-1.4.1.min.js" type="text/javascript"></script>
```
I have never seen that "\_" could be used for navigation. Actually, if the script folder is in the same directory as the html page, then
```
<script src="script/less-1.4.... |
18,057,109 | According to this [tutorial](http://coding.smashingmagazine.com/2011/09/09/an-introduction-to-less-and-comparison-to-sass/) my less code should work but it doesn't.
Can you please help me to get my less css to work.
Right now it does not working - Page loads with no applied styles. What am I doing wrong?
The error i... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18057109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1477816/"
] | Assuming the website is hosted over iis express, Open the file
C:\Users\\Documents\IISExpress\config\applicationhost.config
and search for the tag
`<staticContent lockAttributes="isDocFooterFileName">`
and add the .less MIME as below
`<mimeMap fileExtension=".latex" mimeType="application/x-latex" />`
**`<mime... | In my case I already had the mimeType for .less on ISS, so I checked the Web.config file of my web and removed the following line because it was causing a duplication:
```
<mimeMap fileExtension=".less" mimeType="text/css" />
``` |
18,057,109 | According to this [tutorial](http://coding.smashingmagazine.com/2011/09/09/an-introduction-to-less-and-comparison-to-sass/) my less code should work but it doesn't.
Can you please help me to get my less css to work.
Right now it does not working - Page loads with no applied styles. What am I doing wrong?
The error i... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18057109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1477816/"
] | Assuming the website is hosted over iis express, Open the file
C:\Users\\Documents\IISExpress\config\applicationhost.config
and search for the tag
`<staticContent lockAttributes="isDocFooterFileName">`
and add the .less MIME as below
`<mimeMap fileExtension=".latex" mimeType="application/x-latex" />`
**`<mime... | Thanks for your help everyone - turns out the answer is that my localhost did not serve the mime type .less |
18,057,109 | According to this [tutorial](http://coding.smashingmagazine.com/2011/09/09/an-introduction-to-less-and-comparison-to-sass/) my less code should work but it doesn't.
Can you please help me to get my less css to work.
Right now it does not working - Page loads with no applied styles. What am I doing wrong?
The error i... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18057109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1477816/"
] | If you are using IIS you have to add a ".less" extension to MIME type within IIS manager. when you add a new MIMI, enter ".less" as the extension and "text/css" as the MIME type. | I'm using IIS 7.5 but this can be the same for other IIS versions:
The mime type for less must be added to IIS. But in my case, I have to add it to "Default Web Site" using IIS Manager, NOT to my application, to be able to load less file from browser. |
18,057,109 | According to this [tutorial](http://coding.smashingmagazine.com/2011/09/09/an-introduction-to-less-and-comparison-to-sass/) my less code should work but it doesn't.
Can you please help me to get my less css to work.
Right now it does not working - Page loads with no applied styles. What am I doing wrong?
The error i... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18057109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1477816/"
] | If you are using IIS you have to add a ".less" extension to MIME type within IIS manager. when you add a new MIMI, enter ".less" as the extension and "text/css" as the MIME type. | Thanks for your help everyone - turns out the answer is that my localhost did not serve the mime type .less |
18,057,109 | According to this [tutorial](http://coding.smashingmagazine.com/2011/09/09/an-introduction-to-less-and-comparison-to-sass/) my less code should work but it doesn't.
Can you please help me to get my less css to work.
Right now it does not working - Page loads with no applied styles. What am I doing wrong?
The error i... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18057109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1477816/"
] | Thanks for your help everyone - turns out the answer is that my localhost did not serve the mime type .less | I'm using IIS 7.5 but this can be the same for other IIS versions:
The mime type for less must be added to IIS. But in my case, I have to add it to "Default Web Site" using IIS Manager, NOT to my application, to be able to load less file from browser. |
18,057,109 | According to this [tutorial](http://coding.smashingmagazine.com/2011/09/09/an-introduction-to-less-and-comparison-to-sass/) my less code should work but it doesn't.
Can you please help me to get my less css to work.
Right now it does not working - Page loads with no applied styles. What am I doing wrong?
The error i... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18057109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1477816/"
] | Thanks for your help everyone - turns out the answer is that my localhost did not serve the mime type .less | In my case I already had the mimeType for .less on ISS, so I checked the Web.config file of my web and removed the following line because it was causing a duplication:
```
<mimeMap fileExtension=".less" mimeType="text/css" />
``` |
18,057,109 | According to this [tutorial](http://coding.smashingmagazine.com/2011/09/09/an-introduction-to-less-and-comparison-to-sass/) my less code should work but it doesn't.
Can you please help me to get my less css to work.
Right now it does not working - Page loads with no applied styles. What am I doing wrong?
The error i... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18057109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1477816/"
] | I encountered this issue too.
None of the above fixes worked, however I did manage to fix it when I checked the folder access that the less.css file was stored in.
Adding the IUSR user to have read rights to the folder allowed the file to be distributed correctly. | I'm using IIS 7.5 but this can be the same for other IIS versions:
The mime type for less must be added to IIS. But in my case, I have to add it to "Default Web Site" using IIS Manager, NOT to my application, to be able to load less file from browser. |
18,057,109 | According to this [tutorial](http://coding.smashingmagazine.com/2011/09/09/an-introduction-to-less-and-comparison-to-sass/) my less code should work but it doesn't.
Can you please help me to get my less css to work.
Right now it does not working - Page loads with no applied styles. What am I doing wrong?
The error i... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18057109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1477816/"
] | Assuming the website is hosted over iis express, Open the file
C:\Users\\Documents\IISExpress\config\applicationhost.config
and search for the tag
`<staticContent lockAttributes="isDocFooterFileName">`
and add the .less MIME as below
`<mimeMap fileExtension=".latex" mimeType="application/x-latex" />`
**`<mime... | I'm using IIS 7.5 but this can be the same for other IIS versions:
The mime type for less must be added to IIS. But in my case, I have to add it to "Default Web Site" using IIS Manager, NOT to my application, to be able to load less file from browser. |
18,057,109 | According to this [tutorial](http://coding.smashingmagazine.com/2011/09/09/an-introduction-to-less-and-comparison-to-sass/) my less code should work but it doesn't.
Can you please help me to get my less css to work.
Right now it does not working - Page loads with no applied styles. What am I doing wrong?
The error i... | 2013/08/05 | [
"https://Stackoverflow.com/questions/18057109",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1477816/"
] | Thanks for your help everyone - turns out the answer is that my localhost did not serve the mime type .less | I encountered this issue too.
None of the above fixes worked, however I did manage to fix it when I checked the folder access that the less.css file was stored in.
Adding the IUSR user to have read rights to the folder allowed the file to be distributed correctly. |
55,991 | When a dielectric is placed in an electric field,it gets polarized. The electric field in a polarized material is less than the applied field. Now my query is, when a paramagnetic substance is kept in a magnetic field, the field in the substance is more than the applied fiekd. What is the reason for this opposite behav... | 2013/03/05 | [
"https://physics.stackexchange.com/questions/55991",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/21068/"
] | As a contributor to, and user of, Matter & Interactions by Chabay and Sherwood (Wiley, 2010) (I coauthored the instructor's solution manual) I recognize this as a question from chapter 19 of the third edition. Specifically, see figure 19.51 of the text. I also now see that you have asked at least two questions straight... | Let's say that the round bulb has resistance $R\_r$ and the long bulb has resistance $R\_\ell$. Recall that the resistance $R$ of a resistor is related to it's length $\ell$, resistivity $\rho$, and cross sectional area $A$ by
$$
R = \frac{\ell\rho}{A}
$$
Let's assume, for simplicity that the filaments of the two bulb... |
23,525,519 | I want to be able to click on a specific element, and have it send a value to a textarea. However, I want it to append to a specific row/line of the textarea.
What I am trying to build is very similar to what happens when you click the notes of the fret board on this site: <http://www.guitartabcreator.com/version2/> ... | 2014/05/07 | [
"https://Stackoverflow.com/questions/23525519",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2556722/"
] | Tried to solve this only in JS.
What I did here is use an array to model each row of the textfield (note the array length is 6).
Then I used a jQuery selector to trigger any time a `<td>` element is clicked which calculates the fret and string that was clicked relative to the HTML tree then calls the updateNote funct... | I wrote the [guitartabcreator](http://www.guitartabcreator.com) website. Jacob Mattison is correct - I am using the text area for display purposes. Managing the data occurs in the backend. After seeing your site, it looks like you've got the basics of my idea down. |
203,415 | I am starting to "polish" the LAN here at my new work and since it's the 1st time I face sommething that big (almost 300 clients a switches, proxy) I would like to understand easily where I get weak points (read: 10mbit hubs hidden under desks) before starting to deploy important services like dhcp, dns and AD.
I remem... | 2010/11/18 | [
"https://serverfault.com/questions/203415",
"https://serverfault.com",
"https://serverfault.com/users/60311/"
] | There are many ways to define a weakpoint, I assume you are referring to bandwidth due to those 10mb hubs.
if you are running linux / osx you will want iperf (sudo port install needed on osx) setting up a a "listener" on the server and a client on the client machine
* iperf -s on server
* iperf -c on client
Outputs ... | Some advice to start with ( without knowing what is there )
Plan to Vlan each floor seperately ( preferably by department if you can )
**iperf**
i think is what you are looking for ( which will give you network throughput ) |
203,415 | I am starting to "polish" the LAN here at my new work and since it's the 1st time I face sommething that big (almost 300 clients a switches, proxy) I would like to understand easily where I get weak points (read: 10mbit hubs hidden under desks) before starting to deploy important services like dhcp, dns and AD.
I remem... | 2010/11/18 | [
"https://serverfault.com/questions/203415",
"https://serverfault.com",
"https://serverfault.com/users/60311/"
] | If you haven't done it yet (and you're referencing...if you're serious...10 mbit hubs that may be on your network...) you need to set aside time to actually physically trace and document your network cabling and equipment. Map everything.
Get documented what you have and what needs to be replaced. Check wiring for str... | Some advice to start with ( without knowing what is there )
Plan to Vlan each floor seperately ( preferably by department if you can )
**iperf**
i think is what you are looking for ( which will give you network throughput ) |
203,415 | I am starting to "polish" the LAN here at my new work and since it's the 1st time I face sommething that big (almost 300 clients a switches, proxy) I would like to understand easily where I get weak points (read: 10mbit hubs hidden under desks) before starting to deploy important services like dhcp, dns and AD.
I remem... | 2010/11/18 | [
"https://serverfault.com/questions/203415",
"https://serverfault.com",
"https://serverfault.com/users/60311/"
] | If you have managed client access switches, you can usually enter a command that will show what MAC addresses are reachable by specific ports. Armed with this data, you can fairly trivially find where to focus your attention first (multiple MACs on a port).
For example:
* Cisco: `show mac address-table dynamic`
* 3Co... | Some advice to start with ( without knowing what is there )
Plan to Vlan each floor seperately ( preferably by department if you can )
**iperf**
i think is what you are looking for ( which will give you network throughput ) |
203,415 | I am starting to "polish" the LAN here at my new work and since it's the 1st time I face sommething that big (almost 300 clients a switches, proxy) I would like to understand easily where I get weak points (read: 10mbit hubs hidden under desks) before starting to deploy important services like dhcp, dns and AD.
I remem... | 2010/11/18 | [
"https://serverfault.com/questions/203415",
"https://serverfault.com",
"https://serverfault.com/users/60311/"
] | If you haven't done it yet (and you're referencing...if you're serious...10 mbit hubs that may be on your network...) you need to set aside time to actually physically trace and document your network cabling and equipment. Map everything.
Get documented what you have and what needs to be replaced. Check wiring for str... | There are many ways to define a weakpoint, I assume you are referring to bandwidth due to those 10mb hubs.
if you are running linux / osx you will want iperf (sudo port install needed on osx) setting up a a "listener" on the server and a client on the client machine
* iperf -s on server
* iperf -c on client
Outputs ... |
203,415 | I am starting to "polish" the LAN here at my new work and since it's the 1st time I face sommething that big (almost 300 clients a switches, proxy) I would like to understand easily where I get weak points (read: 10mbit hubs hidden under desks) before starting to deploy important services like dhcp, dns and AD.
I remem... | 2010/11/18 | [
"https://serverfault.com/questions/203415",
"https://serverfault.com",
"https://serverfault.com/users/60311/"
] | There are many ways to define a weakpoint, I assume you are referring to bandwidth due to those 10mb hubs.
if you are running linux / osx you will want iperf (sudo port install needed on osx) setting up a a "listener" on the server and a client on the client machine
* iperf -s on server
* iperf -c on client
Outputs ... | [NetCPS](http://www.netchain.com/netcps/) is a similar tool for Windows. |
203,415 | I am starting to "polish" the LAN here at my new work and since it's the 1st time I face sommething that big (almost 300 clients a switches, proxy) I would like to understand easily where I get weak points (read: 10mbit hubs hidden under desks) before starting to deploy important services like dhcp, dns and AD.
I remem... | 2010/11/18 | [
"https://serverfault.com/questions/203415",
"https://serverfault.com",
"https://serverfault.com/users/60311/"
] | If you haven't done it yet (and you're referencing...if you're serious...10 mbit hubs that may be on your network...) you need to set aside time to actually physically trace and document your network cabling and equipment. Map everything.
Get documented what you have and what needs to be replaced. Check wiring for str... | [NetCPS](http://www.netchain.com/netcps/) is a similar tool for Windows. |
203,415 | I am starting to "polish" the LAN here at my new work and since it's the 1st time I face sommething that big (almost 300 clients a switches, proxy) I would like to understand easily where I get weak points (read: 10mbit hubs hidden under desks) before starting to deploy important services like dhcp, dns and AD.
I remem... | 2010/11/18 | [
"https://serverfault.com/questions/203415",
"https://serverfault.com",
"https://serverfault.com/users/60311/"
] | If you haven't done it yet (and you're referencing...if you're serious...10 mbit hubs that may be on your network...) you need to set aside time to actually physically trace and document your network cabling and equipment. Map everything.
Get documented what you have and what needs to be replaced. Check wiring for str... | If you have managed client access switches, you can usually enter a command that will show what MAC addresses are reachable by specific ports. Armed with this data, you can fairly trivially find where to focus your attention first (multiple MACs on a port).
For example:
* Cisco: `show mac address-table dynamic`
* 3Co... |
203,415 | I am starting to "polish" the LAN here at my new work and since it's the 1st time I face sommething that big (almost 300 clients a switches, proxy) I would like to understand easily where I get weak points (read: 10mbit hubs hidden under desks) before starting to deploy important services like dhcp, dns and AD.
I remem... | 2010/11/18 | [
"https://serverfault.com/questions/203415",
"https://serverfault.com",
"https://serverfault.com/users/60311/"
] | If you have managed client access switches, you can usually enter a command that will show what MAC addresses are reachable by specific ports. Armed with this data, you can fairly trivially find where to focus your attention first (multiple MACs on a port).
For example:
* Cisco: `show mac address-table dynamic`
* 3Co... | [NetCPS](http://www.netchain.com/netcps/) is a similar tool for Windows. |
350,854 | With the announcement and write-up of ReFS (Resilient File System) on places like [arstechnica](http://arstechnica.com/microsoft/news/2012/01/microsoft-introduces-new-robust-resilient-file-system-for-windows-server-8.ars), I am curious to know what technology, or technology stack, exists for Linux/Unix for a similar ou... | 2012/01/17 | [
"https://serverfault.com/questions/350854",
"https://serverfault.com",
"https://serverfault.com/users/2321/"
] | [zfs](/questions/tagged/zfs "show questions tagged 'zfs'")
When I first read the announcement, I immediately thought of ZFS, as it has had, for **years**, many of the features touted as groundbreaking by ReFS.
Don't get me wrong, though - Windows *badly* needs a new filesystem, and this seems to be going in the right... | [ZFS](http://en.wikipedia.org/wiki/ZFS) and [btrfs](http://en.wikipedia.org/wiki/Btrfs) both implement data and metadata integrity through checksums (as well as a some of other features which ReFS may have "borrowed" - the "scrubbing" sounds very familiar somehow) - the latter of which is not yet stable for general use... |
350,854 | With the announcement and write-up of ReFS (Resilient File System) on places like [arstechnica](http://arstechnica.com/microsoft/news/2012/01/microsoft-introduces-new-robust-resilient-file-system-for-windows-server-8.ars), I am curious to know what technology, or technology stack, exists for Linux/Unix for a similar ou... | 2012/01/17 | [
"https://serverfault.com/questions/350854",
"https://serverfault.com",
"https://serverfault.com/users/2321/"
] | [ZFS](http://en.wikipedia.org/wiki/ZFS) and [btrfs](http://en.wikipedia.org/wiki/Btrfs) both implement data and metadata integrity through checksums (as well as a some of other features which ReFS may have "borrowed" - the "scrubbing" sounds very familiar somehow) - the latter of which is not yet stable for general use... | There are also [`fossil`](http://en.wikipedia.org/wiki/Fossil_(file_system))+[`venti`](http://en.wikipedia.org/wiki/Venti) in [*Plan 9*](http://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs) world which implement content-addressed storage and a filesystem layer on top of that. It's there since 2002. |
350,854 | With the announcement and write-up of ReFS (Resilient File System) on places like [arstechnica](http://arstechnica.com/microsoft/news/2012/01/microsoft-introduces-new-robust-resilient-file-system-for-windows-server-8.ars), I am curious to know what technology, or technology stack, exists for Linux/Unix for a similar ou... | 2012/01/17 | [
"https://serverfault.com/questions/350854",
"https://serverfault.com",
"https://serverfault.com/users/2321/"
] | [zfs](/questions/tagged/zfs "show questions tagged 'zfs'")
When I first read the announcement, I immediately thought of ZFS, as it has had, for **years**, many of the features touted as groundbreaking by ReFS.
Don't get me wrong, though - Windows *badly* needs a new filesystem, and this seems to be going in the right... | There are also [`fossil`](http://en.wikipedia.org/wiki/Fossil_(file_system))+[`venti`](http://en.wikipedia.org/wiki/Venti) in [*Plan 9*](http://en.wikipedia.org/wiki/Plan_9_from_Bell_Labs) world which implement content-addressed storage and a filesystem layer on top of that. It's there since 2002. |
22,719,440 | I'm fairly new to SQL (~9 months or so) and so I'm stumped trying to figure out this problem, using SQL Server 2012.
I'm trying to match up two tables that look like this:
Table `Shift`:
```
Date | Name | Shift
01-01-2013 | Dan Smith | Night
01-02-2013 |John Johnson| Night
01-03-2013 |Jo... | 2014/03/28 | [
"https://Stackoverflow.com/questions/22719440",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2619712/"
] | Like this:
```
<#list custbody_deposit_number?split(',') as x>
- ${x}
</#list>
```
You may also want to remove space around the commas, either via `${x?trim}` or using `?split(r'\s*,\s*', 'r')` | this is how we finally solved this issue:
```
<#if record.custbody_deposit_numbers?has_content>
<#list record.custbody_deposit_numbers?string?split(",") as x>
<tr>
<td align="center">${x}</td>
<td align="center">
<#assign depositdate = record.custbody_deposit_dates?string?split(",")... |
49,600,679 | What is the best method to filter a collection by type ?
**I want that the resulting type is the filtered one.**
I found two possibile syntaxes, what is the better ?
```
val list = List(1,"two",3,"four")
//1) using "Typed" helper object
object Typed { def unapply[A](a: A) = Some(a) }
val list1 = for {
Typed(i: In... | 2018/04/01 | [
"https://Stackoverflow.com/questions/49600679",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3360759/"
] | Using `collect`
```
list.collect {
case a: Int => a
}
``` | In case you can't remember `collect`, using `filter` instead of `flatMap` should still be shorter & faster:
```
val list2 = lo.filter {
case i: Int => true
case _ => false
}.asInstanceOf[List[Int]]
```
If we don't pretend as if pattern matching does something significantly different than doing an `isInstance... |
31,040,576 | The below codes are from Outlook 2010 developer reference, explaining the use of " Exception.AppointmentItem Property"
However while pasting and runing it, it pops up "array index out of bounds (run time error -2147352567(80020009) , and debug points to
Set myException = myRecurrPatt.Exceptions.item(1)
```
'Get the... | 2015/06/25 | [
"https://Stackoverflow.com/questions/31040576",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5039763/"
] | Simply, there are zero elements in the array. The [online tutorial](https://msdn.microsoft.com/en-us/library/office/ff869544.aspx) probably had an exception on that example recurring patterned appointment. You on the other hand do not on your Outlook calendar.
Consider wrapping the Exceptions.Item() in a loop. This wa... | The Exceptions class provides the [Count](https://msdn.microsoft.com/EN-US/library/office/ff868300.aspx) property which you may check out before trying to access any item in the collection.
I'd suggest breaking the chain of property and method calls and declaring each property or method on a single line of code. Thus,... |
3,615 | Suppose a police officer commits a misdemeanor in the line of duty: Let's say that as an act of retaliation he seized something as "evidence," in such a way that he satisfies [the criteria for committing theft](https://law.stackexchange.com/q/1748/10) and will be found guilty of that crime for that incident.
My genera... | 2015/09/13 | [
"https://law.stackexchange.com/questions/3615",
"https://law.stackexchange.com",
"https://law.stackexchange.com/users/10/"
] | As far as the entity of a police department they can fall under a consent decree as a result of incidents within the department that the federal government has filed a lawsuit against.
Decrees by consent are more binding than those issued in invitum, or against an unwilling party, which are subject to modification by... | I think in your hypothetical, the only individual with liability is the first police officer. Unless there was a conspiracy.
I think the operative legal principle is ***ei incumbit probatio qui dicit*** (*Proof lies on him who asserts.*) A/k/a "Innocent until proven guilty." |
32,679,155 | On Windows 7, I'm following the steps in [this tutorial](https://www.elastic.co/guide/en/logstash/current/_how_to_write_a_logstash_filter_plugin.html) from elastic
When I use the command `bundle install` I get the following error
```
Fetching gem metadata from https://rubygems.org/..........
Fetching version metadata... | 2015/09/20 | [
"https://Stackoverflow.com/questions/32679155",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2980873/"
] | I had the same issue, and I believe this will fix the problem. In a nutshell, logstash-devutils needs jruby, so trying to use regular ruby won't work.
[Could not find gem 'logstash-devutils (>= 0) ruby' in any of the gem sources](https://stackoverflow.com/questions/29770821/could-not-find-gem-logstash-devutils-0-ruby-... | You have to add `gem 'logstash-devutils', '~> 0.0.10'` to your gemfile |
28,716,050 | I want to ask for help to deal with GUI testing of Web Application.
I'm looking for software where I can write script which will do this:
* Click (x,y)
* Write data (like login, password)
* Check radio and checkboxes
* Validate output data
And it'd be very big + if it can change between windows.
I was trying to tes... | 2015/02/25 | [
"https://Stackoverflow.com/questions/28716050",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3716085/"
] | This is because the ternary operator (`?:`) is [left associative](http://php.net/manual/en/language.operators.precedence.php) so this is how it's getting evaluated:
```
((1 == 1) ? "one" : (1 == 2)) ? "two" : "three"
```
So `1 == 1` -> `TRUE` means that then it's:
```
"one" ? "two" : "three"
```
And `"one"` -> `T... | ```
$chow = 1;
echo ($chow == 1) ? "one" : (($chow == 2) ? "two" : "three");
```
remember to use brackets when result of operation can be unclear
now output is one |
28,716,050 | I want to ask for help to deal with GUI testing of Web Application.
I'm looking for software where I can write script which will do this:
* Click (x,y)
* Write data (like login, password)
* Check radio and checkboxes
* Validate output data
And it'd be very big + if it can change between windows.
I was trying to tes... | 2015/02/25 | [
"https://Stackoverflow.com/questions/28716050",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3716085/"
] | ```
$chow = 1;
echo ($chow == 1) ? "one" : (($chow == 2) ? "two" : "three");
```
remember to use brackets when result of operation can be unclear
now output is one | The operator is confused, you need to put brackets around your second codition. use the code below
```
$chow = 1;
echo ($chow == 1) ? "one" : (($chow == 2) ? "two" : "three"); //returns 1
```
Hope this helps you |
28,716,050 | I want to ask for help to deal with GUI testing of Web Application.
I'm looking for software where I can write script which will do this:
* Click (x,y)
* Write data (like login, password)
* Check radio and checkboxes
* Validate output data
And it'd be very big + if it can change between windows.
I was trying to tes... | 2015/02/25 | [
"https://Stackoverflow.com/questions/28716050",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3716085/"
] | This is because the ternary operator (`?:`) is [left associative](http://php.net/manual/en/language.operators.precedence.php) so this is how it's getting evaluated:
```
((1 == 1) ? "one" : (1 == 2)) ? "two" : "three"
```
So `1 == 1` -> `TRUE` means that then it's:
```
"one" ? "two" : "three"
```
And `"one"` -> `T... | The operator is confused, you need to put brackets around your second codition. use the code below
```
$chow = 1;
echo ($chow == 1) ? "one" : (($chow == 2) ? "two" : "three"); //returns 1
```
Hope this helps you |
120,894 | In node.tpl.php, I have:
```
<a href="#" id="hideshow">Show </a>
<div id="comments" style="width: 300px; border" 1px solid #777; padding:10px;>
Some text in here
</div>
<script type="text/javascript" src="js/comments.js"></script>
```
And as you know node.tpl.php is i... | 2014/06/30 | [
"https://drupal.stackexchange.com/questions/120894",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/28517/"
] | Change your $ to JQuery, or have below code wrapper around
```
(function ($, Drupal, window, document, undefined) {
})(jQuery, Drupal, this, this.document);
```
In this case you can use $ .
Normally I put js file inside of my subtheme, unless it is module relate. | 1) unless you specifically allow for it, change the $ to jQuery. To avoid JS library conflict, Drupal by default turns this jQuery shortcut off.
2) your source path is wrong. It would be relative to the root, not the node. For example, if your node.tpl.php is in /sites/all/themes/THEMENAME/template/, and your comments... |
120,894 | In node.tpl.php, I have:
```
<a href="#" id="hideshow">Show </a>
<div id="comments" style="width: 300px; border" 1px solid #777; padding:10px;>
Some text in here
</div>
<script type="text/javascript" src="js/comments.js"></script>
```
And as you know node.tpl.php is i... | 2014/06/30 | [
"https://drupal.stackexchange.com/questions/120894",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/28517/"
] | Assuming you have confirmed your javascript file is actually being included in the page, your problem is likely that the javascript is running before the elements have been rendered on the page.
To avoid this you need to make sure that any custom js you have is inside a drupal behavior (or $(document).ready() at the v... | 1) unless you specifically allow for it, change the $ to jQuery. To avoid JS library conflict, Drupal by default turns this jQuery shortcut off.
2) your source path is wrong. It would be relative to the root, not the node. For example, if your node.tpl.php is in /sites/all/themes/THEMENAME/template/, and your comments... |
120,894 | In node.tpl.php, I have:
```
<a href="#" id="hideshow">Show </a>
<div id="comments" style="width: 300px; border" 1px solid #777; padding:10px;>
Some text in here
</div>
<script type="text/javascript" src="js/comments.js"></script>
```
And as you know node.tpl.php is i... | 2014/06/30 | [
"https://drupal.stackexchange.com/questions/120894",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/28517/"
] | Change your $ to JQuery, or have below code wrapper around
```
(function ($, Drupal, window, document, undefined) {
})(jQuery, Drupal, this, this.document);
```
In this case you can use $ .
Normally I put js file inside of my subtheme, unless it is module relate. | The code is correct. Make sure the js file is included with the correct path followed from the base url.
If it is then try this to replace the selector `$` with `jQuery`
```
jQuery('#hideshow').toggle(function() {
jQuery('#hideshow') . text('Hide');
},
function() {
jQuery('#hideshow'). text('Show');
});
```
I h... |
120,894 | In node.tpl.php, I have:
```
<a href="#" id="hideshow">Show </a>
<div id="comments" style="width: 300px; border" 1px solid #777; padding:10px;>
Some text in here
</div>
<script type="text/javascript" src="js/comments.js"></script>
```
And as you know node.tpl.php is i... | 2014/06/30 | [
"https://drupal.stackexchange.com/questions/120894",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/28517/"
] | Change your $ to JQuery, or have below code wrapper around
```
(function ($, Drupal, window, document, undefined) {
})(jQuery, Drupal, this, this.document);
```
In this case you can use $ .
Normally I put js file inside of my subtheme, unless it is module relate. | Assuming you have confirmed your javascript file is actually being included in the page, your problem is likely that the javascript is running before the elements have been rendered on the page.
To avoid this you need to make sure that any custom js you have is inside a drupal behavior (or $(document).ready() at the v... |
120,894 | In node.tpl.php, I have:
```
<a href="#" id="hideshow">Show </a>
<div id="comments" style="width: 300px; border" 1px solid #777; padding:10px;>
Some text in here
</div>
<script type="text/javascript" src="js/comments.js"></script>
```
And as you know node.tpl.php is i... | 2014/06/30 | [
"https://drupal.stackexchange.com/questions/120894",
"https://drupal.stackexchange.com",
"https://drupal.stackexchange.com/users/28517/"
] | Assuming you have confirmed your javascript file is actually being included in the page, your problem is likely that the javascript is running before the elements have been rendered on the page.
To avoid this you need to make sure that any custom js you have is inside a drupal behavior (or $(document).ready() at the v... | The code is correct. Make sure the js file is included with the correct path followed from the base url.
If it is then try this to replace the selector `$` with `jQuery`
```
jQuery('#hideshow').toggle(function() {
jQuery('#hideshow') . text('Hide');
},
function() {
jQuery('#hideshow'). text('Show');
});
```
I h... |
13,801,418 | I am working on graph using opengl, I want to set timer for 512 values per second I did like this:
```
self.animationTimer = [NSTimer scheduledTimerWithTimeInterval:1.0/512.0
target:self
selector:@selector(drawView)
userInfo... | 2012/12/10 | [
"https://Stackoverflow.com/questions/13801418",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1564844/"
] | That's just not going to work.
There are (at least) two reasons.
1. "[Because of the various input sources a typical run loop manages, the effective resolution of the time interval for a timer is limited to on the order of 50-100 milliseconds](http://developer.apple.com/library/ios/#documentation/cocoa/reference/Foun... | ```
[NSTimer scheduledTimerWithTimeInterval:1.0f/512.0f target:self selector:@selector(drawView) userInfo:nil repeats:YES];
```
try to use this one
let me know whether it is working or not!!!
Happy Coding!!!! |
13,801,418 | I am working on graph using opengl, I want to set timer for 512 values per second I did like this:
```
self.animationTimer = [NSTimer scheduledTimerWithTimeInterval:1.0/512.0
target:self
selector:@selector(drawView)
userInfo... | 2012/12/10 | [
"https://Stackoverflow.com/questions/13801418",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1564844/"
] | An NSTimer probably just can't fire that fast.
>
> A timer is not a real-time mechanism; it fires only when one of the run loop modes to which the timer has been added is running and able to check if the timer’s firing time has passed. Because of the various input sources a typical run loop manages, the effective res... | ```
[NSTimer scheduledTimerWithTimeInterval:1.0f/512.0f target:self selector:@selector(drawView) userInfo:nil repeats:YES];
```
try to use this one
let me know whether it is working or not!!!
Happy Coding!!!! |
13,801,418 | I am working on graph using opengl, I want to set timer for 512 values per second I did like this:
```
self.animationTimer = [NSTimer scheduledTimerWithTimeInterval:1.0/512.0
target:self
selector:@selector(drawView)
userInfo... | 2012/12/10 | [
"https://Stackoverflow.com/questions/13801418",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1564844/"
] | An NSTimer probably just can't fire that fast.
>
> A timer is not a real-time mechanism; it fires only when one of the run loop modes to which the timer has been added is running and able to check if the timer’s firing time has passed. Because of the various input sources a typical run loop manages, the effective res... | That's just not going to work.
There are (at least) two reasons.
1. "[Because of the various input sources a typical run loop manages, the effective resolution of the time interval for a timer is limited to on the order of 50-100 milliseconds](http://developer.apple.com/library/ios/#documentation/cocoa/reference/Foun... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.