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 |
|---|---|---|---|---|---|
57,854,100 | In HyperLedger Fabric why can't we use the same PKI for Peer Identity and as well as TLS !? | 2019/09/09 | [
"https://Stackoverflow.com/questions/57854100",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4570490/"
] | You can define a base url for your application like this
```
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "ClientApp/{controller}/{action=Index}/{id?}");
});
``` | You can also use
```
app.Map(new PathString("/MyPrefix"), appMember =>
{
appMember.UseSpa(spa =>
{
spa.Options.SourcePath = "ClientApp";
if (env.IsDevelopment())
{
spa.UseAngularCliServer(npmScript: "st... |
57,854,100 | In HyperLedger Fabric why can't we use the same PKI for Peer Identity and as well as TLS !? | 2019/09/09 | [
"https://Stackoverflow.com/questions/57854100",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4570490/"
] | If you want to specify base URL for view from Angular ClientApp folder , try to set `href` attribute of `base` by going to **ClientApp** > **src** > **index.html** like below :
```
<head>
<meta charset="utf-8">
<title>ClientApp</title>
<base href="/ClientApp">
<meta name="viewport" content="width=device-width, in... | You can also use
```
app.Map(new PathString("/MyPrefix"), appMember =>
{
appMember.UseSpa(spa =>
{
spa.Options.SourcePath = "ClientApp";
if (env.IsDevelopment())
{
spa.UseAngularCliServer(npmScript: "st... |
57,854,100 | In HyperLedger Fabric why can't we use the same PKI for Peer Identity and as well as TLS !? | 2019/09/09 | [
"https://Stackoverflow.com/questions/57854100",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4570490/"
] | Eventually I found a function that pretty much achieves this:
```
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
app.UsePathBase("/MyPrefix/");
if (env.IsDevelopment())
.......
```
See <https://www.billbogaiv.com/posts/net-core-hosted-on-subdirectories-in-nginx> for more info. | You can also use
```
app.Map(new PathString("/MyPrefix"), appMember =>
{
appMember.UseSpa(spa =>
{
spa.Options.SourcePath = "ClientApp";
if (env.IsDevelopment())
{
spa.UseAngularCliServer(npmScript: "st... |
8,406,459 | I need to re-order via form submission rows in a table with the following structure for a nested page layout
**Columns:** (table name is: sourcedocs3)
```
sort1 | sort2 | type
```
---
```
1 | 1 | parent
1 | 2 | child
2 | 1 | no nesting
3 | 1 | parent
3 | 2 | child
3 | 3 | child
4 | 1 | no nesting
```
I nee... | 2011/12/06 | [
"https://Stackoverflow.com/questions/8406459",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/967604/"
] | ```
START TRANSACTION;
UPDATE `why_do_people_never_give_the_table_name` SET sort1 = 999
WHERE sort1 = 3;
UPDATE `why_do_people_never_give_the_table_name` SET sort1 = sort1 + 1
WHERE sort1 BETWEEN 1 AND 3
ORDER BY sort1 DESC;
UPDATE `why_do_people_never_give_the_table_name` SET sort1 = 1
WHERE sort1 = 999;
COMMIT... | The answer from Bill was spot on - but didn't include the PHP code necessary to perform the operation so here is what I ended up with:
```
<?php
//if new sort number is less than old sortnum
if ($newsortnum < $oldsortnum){
//RUN SEPARATE QUERIES
$sql_rename="UPDATE `sourcedocs` SET sort1 = '... |
40,388,947 | I have some iOS code where I need to be able to display 2 back to back alerts. When the user clicks "ok" on the first alert then I need to display the second alert. Because displaying an alert does not "pause" the code, my second alert tries to display at almost the same time as my first alert and things break (second ... | 2016/11/02 | [
"https://Stackoverflow.com/questions/40388947",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6263435/"
] | All you have to do is but the second alert in the handler for the first:
```
UIAlertController* alert;
UIAlertAction* defaultAction;
CLAuthorizationStatus status = [CLLocationManager authorizationStatus];
if(status != kCLAuthorizationStatusAuthorizedAlways) {
alert = [UIAlertController alertControllerWithTitle:@"W... | You can set a variable in the @interface and set it to 0 in viewDidLoad
```
@interface ViewController ()
@property (nonatomic) int number;
@end
- (void)viewDidLoad {
[super viewDidLoad];
self.number = 0;
}
```
Then create function to show alert and call other alert by switch(self.number) or you can cal... |
20,240,092 | Currently I am using reflection to search my assemblies for classes that implement an interface, I then check the names of these classes to see that it matches the one that is been searched for.
My next task is to add to this code a way to search DLL files in the directory, my only hint is that I could use "System.En... | 2013/11/27 | [
"https://Stackoverflow.com/questions/20240092",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1379704/"
] | Something like this should get you started, it will attempt to load all .dll files in the current directory and return all types they contain that have the short name contained in `opcode`;
```
private static IEnumerable<Type> GetMatchingTypes(string opcode)
{
var files = Directory.GetFiles(Environment.CurrentDire... | Use `Assembly.LoadFile` method on found dlls:
```
foreach (var dllPath in Directory.EnumerateFiles(Environment.CurrentDirectory, "*.dll"))
{
try
{
var assembly = Assembly.LoadFile(dllPath);
var types = assembly.GetTypes();
}
catch (System.BadImageFormatException ex)
{
// thi... |
30,865,617 | I am using a nested form gem in which i have two fields, the view is given as
```
<%= f.fields_for :round_questions do |question| %>
<%= question.label :question %>
<%= question.text_field :question %>
Rate the Answer</br></br>
... | 2015/06/16 | [
"https://Stackoverflow.com/questions/30865617",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4965201/"
] | This query will give you the required `Marks` value:
```
SELECT ID, Marks, ROUND(Marks * 1.1) AS updMarks
FROM mytable
```
If you want to update, then try:
```
UPDATE mytable
SET Marks = ROUND(Marks * 1.1)
```
[**Demo here**](http://sqlfiddle.com/#!9/4db26/1) | ```
SELECT ID, SUB, Marks + (Marks * 0.10) AS Marks FROM Table
``` |
47,929,122 | I'm sure i have seen this done with a short formula but i am struggling to remember how to do it.
I am trying to find where a date falls in an interval and sum another column, from that point in the interval, to the end of all specified date intervals.
So, in the image below the intervals are in columns D and E and t... | 2017/12/21 | [
"https://Stackoverflow.com/questions/47929122",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6241235/"
] | Can this be done? Yes. But don't do it.
**Make it an integer.**
Incrementing is then trivial - automatic if you make this the primary key. For searching, you convert the string to an integer and search the integer - that way you don't have to worry how many leading zeros were actually included as they will all be ign... | ```
number = int('00000150')
('0'*7 + str(number+1))[-8:]
```
This takes any number, adds 1, concatenates/joins it to a string of several (at least 7 in your case) zeros, and then slices to return the last 8 characters.
IMHO simpler and more elegant than measuring length and working out how many zeros to add. |
47,929,122 | I'm sure i have seen this done with a short formula but i am struggling to remember how to do it.
I am trying to find where a date falls in an interval and sum another column, from that point in the interval, to the end of all specified date intervals.
So, in the image below the intervals are in columns D and E and t... | 2017/12/21 | [
"https://Stackoverflow.com/questions/47929122",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6241235/"
] | Can this be done? Yes. But don't do it.
**Make it an integer.**
Incrementing is then trivial - automatic if you make this the primary key. For searching, you convert the string to an integer and search the integer - that way you don't have to worry how many leading zeros were actually included as they will all be ign... | For those who want to just increase the last number in a string.
>
> Import re
>
>
>
```
a1 = 'name 1'
num0_m = re.search(r'\d+', str(a1))
if num0_m:
rx = r'(?<!\d){}(?!\d)'.format(num0_m.group())
print(re.sub(rx, lambda x: str(int(x.group()) + 1), a1))
``` |
47,929,122 | I'm sure i have seen this done with a short formula but i am struggling to remember how to do it.
I am trying to find where a date falls in an interval and sum another column, from that point in the interval, to the end of all specified date intervals.
So, in the image below the intervals are in columns D and E and t... | 2017/12/21 | [
"https://Stackoverflow.com/questions/47929122",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6241235/"
] | A times ago I made something similar
You have to convert your string to int and then you must to get its length and then you have to calculate the number of zeros that you need
```
code = "00000"
code = str(int(code) + 1 )
code_length = len(code)
if code_length < 5: # number five is the max length of your code
co... | ```
number = int('00000150')
('0'*7 + str(number+1))[-8:]
```
This takes any number, adds 1, concatenates/joins it to a string of several (at least 7 in your case) zeros, and then slices to return the last 8 characters.
IMHO simpler and more elegant than measuring length and working out how many zeros to add. |
47,929,122 | I'm sure i have seen this done with a short formula but i am struggling to remember how to do it.
I am trying to find where a date falls in an interval and sum another column, from that point in the interval, to the end of all specified date intervals.
So, in the image below the intervals are in columns D and E and t... | 2017/12/21 | [
"https://Stackoverflow.com/questions/47929122",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6241235/"
] | A times ago I made something similar
You have to convert your string to int and then you must to get its length and then you have to calculate the number of zeros that you need
```
code = "00000"
code = str(int(code) + 1 )
code_length = len(code)
if code_length < 5: # number five is the max length of your code
co... | For those who want to just increase the last number in a string.
>
> Import re
>
>
>
```
a1 = 'name 1'
num0_m = re.search(r'\d+', str(a1))
if num0_m:
rx = r'(?<!\d){}(?!\d)'.format(num0_m.group())
print(re.sub(rx, lambda x: str(int(x.group()) + 1), a1))
``` |
55,986,089 | I am trying to copy binary files from `src` to `dst`. This script seems to copy all of the bytes. BUT when I open both files in Hex Workshop I see that `dst` file is always missing 3 bytes at the end of the file. These 3 bytes should have been `00 00 00`, this problem prevents me from opening `dst` file.
```
void bina... | 2019/05/04 | [
"https://Stackoverflow.com/questions/55986089",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11453074/"
] | First thing you need to have to be able to write queries in the laravel way is something called `Model`. Example of a model would be like so
```
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Flight extends Model
{
//
}
```
You can read more about it [here](https://laravel.com/docs/5.8/elo... | ```
$result=DB::table('investment_investor')
->select('users.wallet_address as wallet_address','projects.id AS project_id')
->join('users','users.id','=','investment_investor.user_id')
->join('projects','projects.id','=','investment_investor.project_id')
->where('users.wallet_address','!=','')
->wh... |
9,015,960 | At the moment I am checking `if(!is_null($foo))` although this is breaking when the mysql column is a date and defaults to 0000-00-00.
Is there any way to get around this problem without adding `!= "0000-00-00"` | 2012/01/26 | [
"https://Stackoverflow.com/questions/9015960",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/560287/"
] | For date fields you can use [strtotime](http://www.php.net/manual/en/function.strtotime.php). This function returns `false` if the `date` passed to it is not a `date`.
I am not sure about your specific needs as there is very little info in your question. | I guess you can use something like this:
```
if(!(int)$foo)
{
echo ' this is either a default value or a NULL';
}
``` |
9,015,960 | At the moment I am checking `if(!is_null($foo))` although this is breaking when the mysql column is a date and defaults to 0000-00-00.
Is there any way to get around this problem without adding `!= "0000-00-00"` | 2012/01/26 | [
"https://Stackoverflow.com/questions/9015960",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/560287/"
] | If you do not want to solve it in code, solve it in the data.
You should let MySQL default to `NULL` not `0000-00-00` | I guess you can use something like this:
```
if(!(int)$foo)
{
echo ' this is either a default value or a NULL';
}
``` |
9,015,960 | At the moment I am checking `if(!is_null($foo))` although this is breaking when the mysql column is a date and defaults to 0000-00-00.
Is there any way to get around this problem without adding `!= "0000-00-00"` | 2012/01/26 | [
"https://Stackoverflow.com/questions/9015960",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/560287/"
] | Change your table definition for the date column
```
`date` DATE NULL DEFAULT NULL
```
I always suggest to allow `NULL` for optional fields and to soundly distinguish between valid values like `0` and empty strings on the one hand and `NULL` (=not stated) on the other hand. | I guess you can use something like this:
```
if(!(int)$foo)
{
echo ' this is either a default value or a NULL';
}
``` |
1,997 | At the company I work for we are developing an app for use within the company. The company consists of numerous branches across the world, all other legal entities. For testing we would like to send a tablet with pre-installed software from the Dutch branch office to the Chinese branch office.
Does the software has to... | 2015/10/20 | [
"https://opensource.stackexchange.com/questions/1997",
"https://opensource.stackexchange.com",
"https://opensource.stackexchange.com/users/3070/"
] | The FSF addresses this in [their FAQ](http://www.gnu.org/licenses/gpl-faq.en.html#InternalDistribution), where they say that making copies for different people within an organisation does not count as "distribution":
>
> Is making and using multiple copies within one organization or company “distribution”?
>
>
> No... | If the software is only for use by those within the company, then there should be no barriers to fully complying with the licenses. Even the GPL, the most extreme license, does not require you to publish your source code for the whole world to access, but only to distribute it to those who get a compiled version.
Wher... |
1,997 | At the company I work for we are developing an app for use within the company. The company consists of numerous branches across the world, all other legal entities. For testing we would like to send a tablet with pre-installed software from the Dutch branch office to the Chinese branch office.
Does the software has to... | 2015/10/20 | [
"https://opensource.stackexchange.com/questions/1997",
"https://opensource.stackexchange.com",
"https://opensource.stackexchange.com/users/3070/"
] | The FSF addresses this in [their FAQ](http://www.gnu.org/licenses/gpl-faq.en.html#InternalDistribution), where they say that making copies for different people within an organisation does not count as "distribution":
>
> Is making and using multiple copies within one organization or company “distribution”?
>
>
> No... | If you are developing the application in-house, any rights reside fully with you to do as you please.
If it uses pieces from elsewhere, you might set up some script to build up the whole for the "customer". It won't matter too much if it is a real mess for a one-off use.
You could ask the owners of the rights for a t... |
1,997 | At the company I work for we are developing an app for use within the company. The company consists of numerous branches across the world, all other legal entities. For testing we would like to send a tablet with pre-installed software from the Dutch branch office to the Chinese branch office.
Does the software has to... | 2015/10/20 | [
"https://opensource.stackexchange.com/questions/1997",
"https://opensource.stackexchange.com",
"https://opensource.stackexchange.com/users/3070/"
] | You've found yourself a bit of a gray area. As Martijn notes, the FSF have addressed *nearly* this issue in their FAQ. The following is certainly true for single-entity companies:
* You can make copies for internal use
* You can send those copies to anyone, anywhere in the world, as long as they're part of the company... | If the software is only for use by those within the company, then there should be no barriers to fully complying with the licenses. Even the GPL, the most extreme license, does not require you to publish your source code for the whole world to access, but only to distribute it to those who get a compiled version.
Wher... |
1,997 | At the company I work for we are developing an app for use within the company. The company consists of numerous branches across the world, all other legal entities. For testing we would like to send a tablet with pre-installed software from the Dutch branch office to the Chinese branch office.
Does the software has to... | 2015/10/20 | [
"https://opensource.stackexchange.com/questions/1997",
"https://opensource.stackexchange.com",
"https://opensource.stackexchange.com/users/3070/"
] | You've found yourself a bit of a gray area. As Martijn notes, the FSF have addressed *nearly* this issue in their FAQ. The following is certainly true for single-entity companies:
* You can make copies for internal use
* You can send those copies to anyone, anywhere in the world, as long as they're part of the company... | If you are developing the application in-house, any rights reside fully with you to do as you please.
If it uses pieces from elsewhere, you might set up some script to build up the whole for the "customer". It won't matter too much if it is a real mess for a one-off use.
You could ask the owners of the rights for a t... |
22,773,970 | I am trying to store a value obtained from a URL variable into a SESSION variable.
Here is the URL:
```
<a href="webpage.php?store=<?php echo 'Ace'; ?>">Ace Hardware</a>
```
Here is the SESSION coding, which retrieves the variable, but loses the variable value upon leaving the page.
```
$_SESSION["store"] = $_GET... | 2014/03/31 | [
"https://Stackoverflow.com/questions/22773970",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2716023/"
] | The problem is that you need to 'clear' the floated elements inside `#extensive_look`.
To do that you can either use:
```
#extensive_look {
overflow: hidden
}
```
Or you can create a clearfix class with the following styles and add that class to the extensive\_look div.
`<div id="extensive_look" class="clearfix... | ```
.content2 {
padding:20px;
background-color:#e0e0e0;
min-height:500px;
height:auto;
width:100%;
overflow-y:auto;
}
```
"Min-height" is your culprit, I believe. The computed height of the div is exactly 540px--which is the min-height plus 20px padding on top and bottom. Adding "overflow-y:au... |
21,887,687 | I'm tring to create a web app that create a fan tabs for facebook pages ...
my problem is ...
I tried this :-
```
FB.api(
"/{page-id}/feed",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
```
);
How to get facebook page id inside page fan tab using facebook javascript... | 2014/02/19 | [
"https://Stackoverflow.com/questions/21887687",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3329129/"
] | In order to get the page id of fan page, you need to get the signed\_request from Facebook.
<https://developers.facebook.com/docs/facebook-login/using-login-with-games#checklogin>
In fact, this link talk about the cavas page, but it's the same principle for the fan page.
But if you look carefully the way to get this v... | You can use fql to get everything you want.
<https://developers.facebook.com/docs/reference/fql/>
I think this will work for you :
```
var currentPageID;
var url = window.top.location;
FB.api(
{
method: 'fql.query',
query: "SELECT id FROM object_url WHERE url = '" + url + "'"
},
function(... |
21,887,687 | I'm tring to create a web app that create a fan tabs for facebook pages ...
my problem is ...
I tried this :-
```
FB.api(
"/{page-id}/feed",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
```
);
How to get facebook page id inside page fan tab using facebook javascript... | 2014/02/19 | [
"https://Stackoverflow.com/questions/21887687",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3329129/"
] | In order to get the page id of fan page, you need to get the signed\_request from Facebook.
<https://developers.facebook.com/docs/facebook-login/using-login-with-games#checklogin>
In fact, this link talk about the cavas page, but it's the same principle for the fan page.
But if you look carefully the way to get this v... | <http://www.wtttc.com/image.php?id=25>
```
window.top.location;
```
Dose not work inside the facebook page tab ... I traied that before and now ...
Any new Ideas :) |
21,887,687 | I'm tring to create a web app that create a fan tabs for facebook pages ...
my problem is ...
I tried this :-
```
FB.api(
"/{page-id}/feed",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
```
);
How to get facebook page id inside page fan tab using facebook javascript... | 2014/02/19 | [
"https://Stackoverflow.com/questions/21887687",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3329129/"
] | In order to get the page id of fan page, you need to get the signed\_request from Facebook.
<https://developers.facebook.com/docs/facebook-login/using-login-with-games#checklogin>
In fact, this link talk about the cavas page, but it's the same principle for the fan page.
But if you look carefully the way to get this v... | This is a tested solution that uses Facebook Javascript SDK and its undocumented parseSignedRequest method.
**Note:** you will have to use a bit of server code and this example is for PHP, but it's the easiest I've been able to find out.
Your html page (or whatever you're serving):
```
<head>
.....
<script type="tex... |
21,887,687 | I'm tring to create a web app that create a fan tabs for facebook pages ...
my problem is ...
I tried this :-
```
FB.api(
"/{page-id}/feed",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
```
);
How to get facebook page id inside page fan tab using facebook javascript... | 2014/02/19 | [
"https://Stackoverflow.com/questions/21887687",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3329129/"
] | In order to get the page id of fan page, you need to get the signed\_request from Facebook.
<https://developers.facebook.com/docs/facebook-login/using-login-with-games#checklogin>
In fact, this link talk about the cavas page, but it's the same principle for the fan page.
But if you look carefully the way to get this v... | You have to get signed\_request POSTed to your app from server side.
<https://developers.facebook.com/docs/pages/tabs>
Go through the link get some idea about the page tab and page id. |
34,244,782 | I'm trying to check if a string is a valid math expression. Allowed operations are +,-,\*,/ and ^. I tried this and don't know why it doesn't work:
```
a = raw_input("Unesite izraz")
if len( re.findall(r'(\d+(?:.\d+)?(?: [\+\-\/\*\^]\d+(?:.\d+) )* )', a ) ) != 0:
```
But this regex expression returns [] for valid ex... | 2015/12/12 | [
"https://Stackoverflow.com/questions/34244782",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3619625/"
] | A validator for a simple symbol math expression could be something like this.
This would be a 1 time match of the entire string.
`^\s*[+-]?\s*(?:\d+(?:\.\d*)?|\.\d+)(?:\s*[-+/*^]\s*\s*[+-]?\s*(?:\d+(?:\.\d*)?|\.\d+))*\s*$`
Formatted:
```
^ # BOS
\s* [+-]? \s* # whi... | You have spaces in the wrong places.
```
# yours / fixed
r'(\d+(?:.\d+)?(?: [\+\-\/\*\^]\d+(?:.\d+) )* )'
r'(\d+(?:.\d+)?(?: [\+\-\/\*\^] \d+(?:.\d+) )*)'
```
You can try them at [pythex.org](http://pythex.org/) |
34,244,782 | I'm trying to check if a string is a valid math expression. Allowed operations are +,-,\*,/ and ^. I tried this and don't know why it doesn't work:
```
a = raw_input("Unesite izraz")
if len( re.findall(r'(\d+(?:.\d+)?(?: [\+\-\/\*\^]\d+(?:.\d+) )* )', a ) ) != 0:
```
But this regex expression returns [] for valid ex... | 2015/12/12 | [
"https://Stackoverflow.com/questions/34244782",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3619625/"
] | A validator for a simple symbol math expression could be something like this.
This would be a 1 time match of the entire string.
`^\s*[+-]?\s*(?:\d+(?:\.\d*)?|\.\d+)(?:\s*[-+/*^]\s*\s*[+-]?\s*(?:\d+(?:\.\d*)?|\.\d+))*\s*$`
Formatted:
```
^ # BOS
\s* [+-]? \s* # whi... | You can simplify your regexp.
There is the operator "except": `[^abc]`
Thus, it will take whatever is not the characters "a", "b" or "c".
```
import re
e1 = '1 + 2' # correct
e2 = '1 + 3 * 3 / 6 ^ 2' # correct
e3 = '1 + 3 x 3' # wrong
el = [e1, e2, e3]
regexp = re.compile(r'[^+\-*\/^0-9\s]')
for i in el:
if len... |
11,018,404 | Our client is asking to encrypt the URL because it is passing values in the query string. We have used encryption and are able to encrypt the URL; however, existing code uses `querystring["var"]` in so many places and fails because of the encrypted URL. Hence, on page load, we will have to decrypt the URL. If I decrypt... | 2012/06/13 | [
"https://Stackoverflow.com/questions/11018404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/448131/"
] | [Google is your friend, so use it.](http://javapapers.com/core-java/abstract-and-interface-core-java-2/difference-between-a-java-interface-and-a-java-abstract-class/) | An abstract class can contain method implementation while an interface can't. |
11,018,404 | Our client is asking to encrypt the URL because it is passing values in the query string. We have used encryption and are able to encrypt the URL; however, existing code uses `querystring["var"]` in so many places and fails because of the encrypted URL. Hence, on page load, we will have to decrypt the URL. If I decrypt... | 2012/06/13 | [
"https://Stackoverflow.com/questions/11018404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/448131/"
] | [Google is your friend, so use it.](http://javapapers.com/core-java/abstract-and-interface-core-java-2/difference-between-a-java-interface-and-a-java-abstract-class/) | [READ THE JAVA DOCUMENTATION!](http://docs.oracle.com/javase/tutorial/java/IandI/abstract.html)
>
> Abstract Classes versus Interfaces
>
>
> Unlike interfaces, abstract classes can contain fields that are not static and final, and they can contain implemented methods. Such abstract classes are similar to interfaces... |
11,018,404 | Our client is asking to encrypt the URL because it is passing values in the query string. We have used encryption and are able to encrypt the URL; however, existing code uses `querystring["var"]` in so many places and fails because of the encrypted URL. Hence, on page load, we will have to decrypt the URL. If I decrypt... | 2012/06/13 | [
"https://Stackoverflow.com/questions/11018404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/448131/"
] | [Google is your friend, so use it.](http://javapapers.com/core-java/abstract-and-interface-core-java-2/difference-between-a-java-interface-and-a-java-abstract-class/) | In Interface :
you can only declare the variables, Methods but no defination is written in this interface
Abstract class :
while a class is declared as Abstract class then the declarations may or may not include abstract methods.In abstract class we can write the definitions also. Unlike interfaces, abstract classes ... |
11,018,404 | Our client is asking to encrypt the URL because it is passing values in the query string. We have used encryption and are able to encrypt the URL; however, existing code uses `querystring["var"]` in so many places and fails because of the encrypted URL. Hence, on page load, we will have to decrypt the URL. If I decrypt... | 2012/06/13 | [
"https://Stackoverflow.com/questions/11018404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/448131/"
] | There certainly are differences. The first few that I can think of are
* You can not inherit multiple abstract classes, where you can implement multiple interfaces
* You can write a decorator for an interface but not for an abstract class
* You can provide default implementations in an abstract class, but not in an in... | An abstract class can contain method implementation while an interface can't. |
11,018,404 | Our client is asking to encrypt the URL because it is passing values in the query string. We have used encryption and are able to encrypt the URL; however, existing code uses `querystring["var"]` in so many places and fails because of the encrypted URL. Hence, on page load, we will have to decrypt the URL. If I decrypt... | 2012/06/13 | [
"https://Stackoverflow.com/questions/11018404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/448131/"
] | There certainly are differences. The first few that I can think of are
* You can not inherit multiple abstract classes, where you can implement multiple interfaces
* You can write a decorator for an interface but not for an abstract class
* You can provide default implementations in an abstract class, but not in an in... | [READ THE JAVA DOCUMENTATION!](http://docs.oracle.com/javase/tutorial/java/IandI/abstract.html)
>
> Abstract Classes versus Interfaces
>
>
> Unlike interfaces, abstract classes can contain fields that are not static and final, and they can contain implemented methods. Such abstract classes are similar to interfaces... |
11,018,404 | Our client is asking to encrypt the URL because it is passing values in the query string. We have used encryption and are able to encrypt the URL; however, existing code uses `querystring["var"]` in so many places and fails because of the encrypted URL. Hence, on page load, we will have to decrypt the URL. If I decrypt... | 2012/06/13 | [
"https://Stackoverflow.com/questions/11018404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/448131/"
] | There certainly are differences. The first few that I can think of are
* You can not inherit multiple abstract classes, where you can implement multiple interfaces
* You can write a decorator for an interface but not for an abstract class
* You can provide default implementations in an abstract class, but not in an in... | In Interface :
you can only declare the variables, Methods but no defination is written in this interface
Abstract class :
while a class is declared as Abstract class then the declarations may or may not include abstract methods.In abstract class we can write the definitions also. Unlike interfaces, abstract classes ... |
77,057 | We have implemented a real-time dashboard in SharePoint Online. While the web part is updating [the screen refreshes every 5 minutes] we can see the underlying html (1st Screenshot) before it is fully rendered into a graphically representation (2nd Screenshot).

![Sc... | 2013/09/11 | [
"https://sharepoint.stackexchange.com/questions/77057",
"https://sharepoint.stackexchange.com",
"https://sharepoint.stackexchange.com/users/17967/"
] | Neither of the previous links actually allows you to create a recurring reminder for a recurring calendar event in a SharePoint (calendar) list.
I have been searching the web and every site I have found so far (so I may not have actually hit the one that does! If you have found a solution I would like to see the link ... | You need to create designer WF to send reminder on interval because OOTB WF will not help you send reminder.
Please refer the below blogs:
<http://www.petestilgoe.com/tag/email-reminder-workflow/>
<http://sp365.co.uk/2011/09/sharepoint-designer-2010-reminder-email-workflow/> |
2,930,853 | I'm pretty new to regular expressions, and MAN do they give me a headache. They are so intimidating! For an email campaign I'm doing, a user will click a link out of the email with a few URL parameters filled in for them, to make filling out a form easier. I want to prevent any injection hacks or whatever it's called, ... | 2010/05/28 | [
"https://Stackoverflow.com/questions/2930853",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/202821/"
] | If you have a multi-line string, you could use a RegExp with the `m` flag:
```
var str = 'line1\n'+
'line2\n'+
'#RemoveMe line3\n'+
'line4';
str.replace(/^.*#RemoveMe.*$/mg, "");
```
The `m` flag will treat the `^` and `$` meta characters as the beginning and end of each line, not the beginning or end of the whole ... | As suggested by @CMS , it simply replaces the line with "", still there is an extra line.
For String:
```
var str = 'line1\n'+
'line2\n'+
'#RemoveMe line3\n'+
'line4';
```
If you want the output like this :
```
line1
line2
line4
```
instead of
```
line1
line2
line4
```
Try this :
```
str.split('\n').filte... |
51,165,327 | I'm trying to add the `© All rights reserved` text in my footer. I've done that but when I physically put the `©` in the `index.html` file it displays this instead `© All rights reserved`.
I'm not putting the `Â` symbol myself. It auto generates it on the website. In the file itself, it does not exist. It doesn't eve... | 2018/07/04 | [
"https://Stackoverflow.com/questions/51165327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9908636/"
] | Click the "Run code snippet" button to check output.
```html
<!DOCTYPE html>
<html>
<style>
body {
font-size: 20px;
}
</style>
<body>
<p>I will display ©</p>
<p>I will display ©</p>
<p>I will display ©</p>
</body>
</html>
``` | Try adding this to the HTML head. This issue is related to character encoding
```
<head>
...
<meta charset="utf-8">
...
</head>
``` |
51,165,327 | I'm trying to add the `© All rights reserved` text in my footer. I've done that but when I physically put the `©` in the `index.html` file it displays this instead `© All rights reserved`.
I'm not putting the `Â` symbol myself. It auto generates it on the website. In the file itself, it does not exist. It doesn't eve... | 2018/07/04 | [
"https://Stackoverflow.com/questions/51165327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9908636/"
] | Inorder to incorporate the copyright symbol, you can use © in your code
try this -
```
© All rights reserved
``` | Try adding this to the HTML head. This issue is related to character encoding
```
<head>
...
<meta charset="utf-8">
...
</head>
``` |
51,165,327 | I'm trying to add the `© All rights reserved` text in my footer. I've done that but when I physically put the `©` in the `index.html` file it displays this instead `© All rights reserved`.
I'm not putting the `Â` symbol myself. It auto generates it on the website. In the file itself, it does not exist. It doesn't eve... | 2018/07/04 | [
"https://Stackoverflow.com/questions/51165327",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9908636/"
] | Click the "Run code snippet" button to check output.
```html
<!DOCTYPE html>
<html>
<style>
body {
font-size: 20px;
}
</style>
<body>
<p>I will display ©</p>
<p>I will display ©</p>
<p>I will display ©</p>
</body>
</html>
``` | Inorder to incorporate the copyright symbol, you can use © in your code
try this -
```
© All rights reserved
``` |
25,023,684 | How would I create an `ID3` column for any overlapping `ID1/ID2` column? (Not just the intersection, but for the union set.
For example, `ID2` is an account number online, and `ID2` is an IP address that a person used to log on. I would like to specify that as long as it was a same IP address OR the log-on ID, the ro... | 2014/07/29 | [
"https://Stackoverflow.com/questions/25023684",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2548225/"
] | This is a problem that's generally considered solved, but different problems have different more efficient solutions depending on the likelihood of multiple linkages.
An example (fairly clunky and not particularly efficient, but hopefully explains the general solution) follows. Basically, you need to go through the da... | Here is an answer which I think will work for all cases, although I don't know how efficient it is:
I'm starting with a data set with a few more observations added to show how the code can handle more difficult cases.
```
data have;
input year id2 id1;
datalines;
2010 1 201
2010 1 202
2010 2 ... |
2,137,772 | $$2\tan^{-1}\sqrt{x-x^2}=\tan^{-1}x+\tan^{-1}(1-x)$$
I wasn't sure on how to go from here because I tried to draw triangles for each tangent function but that didnt work and I know that I can't distribute via doing tangent on both sides.
(though I do enjoy complex methods in solving this, I do appreciate a high school... | 2017/02/10 | [
"https://math.stackexchange.com/questions/2137772",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/352368/"
] | *I assume you want to prove equality between both sides. I show that your equality is almost correct but off by a constant of $\pi/4$*
This is easy enough with calculus. If we differentiate either side we get
$$\frac{2 - 4 x}{x^4 - 2 x^3 + x^2 + 1}$$
and thus our functions differ by at most a constant. Setting $x=0... | HINT:
We need $x-x^2\ge0\iff 0\le x\le1$
Again, $x-x^2=\dfrac{1-(2x-1)^2}4\le\dfrac14$
$\implies0\le x-x^2\le\dfrac14$
Now use my answer [here](https://math.stackexchange.com/questions/523625/showing-arctan-frac23-frac12-arctan-frac125) to find $x=\dfrac12$ |
2,137,772 | $$2\tan^{-1}\sqrt{x-x^2}=\tan^{-1}x+\tan^{-1}(1-x)$$
I wasn't sure on how to go from here because I tried to draw triangles for each tangent function but that didnt work and I know that I can't distribute via doing tangent on both sides.
(though I do enjoy complex methods in solving this, I do appreciate a high school... | 2017/02/10 | [
"https://math.stackexchange.com/questions/2137772",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/352368/"
] | Letting $u = 1-x,v=x,$ you need to solve $2\arctan \sqrt{uv} = \arctan u + \arctan v.$
Taking tangents on both sides and applying tangent addition and double angle formulae gives $\frac{2\sqrt{uv}}{1-uv}=\frac{u+v}{1-uv}\implies 2\sqrt{uv}=u+v\implies 2\sqrt{x-x^2}=1\implies 4(x-x^2)=1$ which is a simple quadratic to... | HINT:
We need $x-x^2\ge0\iff 0\le x\le1$
Again, $x-x^2=\dfrac{1-(2x-1)^2}4\le\dfrac14$
$\implies0\le x-x^2\le\dfrac14$
Now use my answer [here](https://math.stackexchange.com/questions/523625/showing-arctan-frac23-frac12-arctan-frac125) to find $x=\dfrac12$ |
2,137,772 | $$2\tan^{-1}\sqrt{x-x^2}=\tan^{-1}x+\tan^{-1}(1-x)$$
I wasn't sure on how to go from here because I tried to draw triangles for each tangent function but that didnt work and I know that I can't distribute via doing tangent on both sides.
(though I do enjoy complex methods in solving this, I do appreciate a high school... | 2017/02/10 | [
"https://math.stackexchange.com/questions/2137772",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/352368/"
] | Letting $u = 1-x,v=x,$ you need to solve $2\arctan \sqrt{uv} = \arctan u + \arctan v.$
Taking tangents on both sides and applying tangent addition and double angle formulae gives $\frac{2\sqrt{uv}}{1-uv}=\frac{u+v}{1-uv}\implies 2\sqrt{uv}=u+v\implies 2\sqrt{x-x^2}=1\implies 4(x-x^2)=1$ which is a simple quadratic to... | *I assume you want to prove equality between both sides. I show that your equality is almost correct but off by a constant of $\pi/4$*
This is easy enough with calculus. If we differentiate either side we get
$$\frac{2 - 4 x}{x^4 - 2 x^3 + x^2 + 1}$$
and thus our functions differ by at most a constant. Setting $x=0... |
11,656,822 | Just to clarify something first. I am **not** trying to convert a byte array to a single string. I am trying to convert a byte-array to a string-array.
I am fetching some data from the clipboard using the `GetClipboardData` API, and then I'm copying the data from the memory as a byte array. When you're copying multipl... | 2012/07/25 | [
"https://Stackoverflow.com/questions/11656822",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1161003/"
] | If the data came through the Win32 API then a string array will just be a sequence of null-terminated strings with a double-null-terminator at the end. (Note that the strings will be UTF-16, so *two* bytes per character). You'll basically need to pull the strings out one at a time into an array.
The method you're look... | How about this:
```
var strings = Encoding.Unicode
.GetString(buffer)
.Split(new[] { '\0' }, StringSplitOptions.RemoveEmptyEntries);
``` |
32,207,736 | Objects in my class `Deal` have an attribute `relatedContacts` which is an array of pointers to `Contact` objects. I'm running the following query to determine whether the current `Contact` object is the target of a pointer in any `Deal`, prior to deleting the `Contact`.
```
let relatedContactObjects:NSArray = [self.... | 2015/08/25 | [
"https://Stackoverflow.com/questions/32207736",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4139760/"
] | Parse.com overloads equalTo: by allowing it to mean either: (a) a singular property equals the operand, or (b) an array property contains the operand. So you're objective is easily stated as follows:
```
relatedContactQuery.fromPinWithName("Deals")
relatedContactQuery.whereKey("user", equalTo: PFUser.currentUser()!)
r... | Prior to the accepted answer, I also tried using loops to go through the arrays and identify whether they contained the current object, then incremented a count.
```
var dealsPointingToContactCount:Int = 0
func countDealsRelatedToContact() {
let dealsWithRelatedContactQuery:PFQuery = PFQuery(className: "Deal")
... |
18,423,274 | In Joomla 2.5.14, when I create a query to MySQL using PHP, like:
```
$query = "SELECT id FROM xmb9d_content WHERE state=1" ;
```
It all works fine, but if I don't want a specific reference to the database prefix (xmb9d\_) and use:
```
$query = "SELECT id FROM #__content WHERE state=1" ;
```
The query isn't execu... | 2013/08/24 | [
"https://Stackoverflow.com/questions/18423274",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | You need to use the database prefix and also stick to Joomla 2.5 coding standards. There shouldn't be any problems with the prefix, providing your query is correct.
This is how it should look:
```
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('id')
->from('#__content')
->where('state = 1')... | `xmb9d_content` is the name of the table by replacing it with `#__content` you are attempting to run the query on a table that doesn't exist (i assume) so it wont work.
What is the issue with the prefix? I don't understand how it could cause you an problems |
26,457,096 | I'm using Android Studio and when I add `compile "com.android.support:appcompat-v7:21.0.0"` to my Gradle file, I'm getting a ton of errors:
```
C:\Users\WindowsSucks\AndroidStudioProjects\MMMeds\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
Error:(36, 21) No res... | 2014/10/20 | [
"https://Stackoverflow.com/questions/26457096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4155973/"
] | changing the complie SDk version to API level 21 fixed it for me. then i ran into others issues of deploying the app to my device. i changed the minimun API level to target to what i want and that fixed it.
incase someone is experiencing this again. | my solucion is compile with other version
build.gradle (app)
```
compileSdkVersion 21
```
Good Luck |
26,457,096 | I'm using Android Studio and when I add `compile "com.android.support:appcompat-v7:21.0.0"` to my Gradle file, I'm getting a ton of errors:
```
C:\Users\WindowsSucks\AndroidStudioProjects\MMMeds\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
Error:(36, 21) No res... | 2014/10/20 | [
"https://Stackoverflow.com/questions/26457096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4155973/"
] | changing the complie SDk version to API level 21 fixed it for me. then i ran into others issues of deploying the app to my device. i changed the minimun API level to target to what i want and that fixed it.
incase someone is experiencing this again. | I ran into the same issue and had the right API level values in my build.gradle **compileSdkVersion 21, targetSdkVersion 21 and a buildToolsVersion of 21.0.1**
However, I was including this as a module in my project so I had to make sure the other module gradle settings matched API 21. After that it all worked for me. |
26,457,096 | I'm using Android Studio and when I add `compile "com.android.support:appcompat-v7:21.0.0"` to my Gradle file, I'm getting a ton of errors:
```
C:\Users\WindowsSucks\AndroidStudioProjects\MMMeds\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
Error:(36, 21) No res... | 2014/10/20 | [
"https://Stackoverflow.com/questions/26457096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4155973/"
] | Make sure the value for **target** (which tells the target android version) in **project.properties** file of **both** **your project folder and appcompat\_v7** folder is same (preferably the latest).
: inside 'your\_project'/project.properties
`target=**android-21**
android.library.reference.1=../appcompat_v7`
and... | Change your **compile sdk** to **23**.This fixed it for me. |
26,457,096 | I'm using Android Studio and when I add `compile "com.android.support:appcompat-v7:21.0.0"` to my Gradle file, I'm getting a ton of errors:
```
C:\Users\WindowsSucks\AndroidStudioProjects\MMMeds\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
Error:(36, 21) No res... | 2014/10/20 | [
"https://Stackoverflow.com/questions/26457096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4155973/"
] | I have updated the build.gradle(Module: app):
Old Code:
```
compile 'com.android.support:appcompat-v7:23.0.1'
```
New Code:
```
compile 'com.android.support:appcompat-v7:22.2.0'
```
Works for me in android studio. | I was facing this problem when I imported google-services.json file to implement Analytics. I already had global\_tracker.xml file in the xml folder. During build, while merging contents from google-services.json file, the error was started occurring. For time being, the error is resolved after removing the goolgle-ser... |
26,457,096 | I'm using Android Studio and when I add `compile "com.android.support:appcompat-v7:21.0.0"` to my Gradle file, I'm getting a ton of errors:
```
C:\Users\WindowsSucks\AndroidStudioProjects\MMMeds\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
Error:(36, 21) No res... | 2014/10/20 | [
"https://Stackoverflow.com/questions/26457096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4155973/"
] | changing the complie SDk version to API level 21 fixed it for me. then i ran into others issues of deploying the app to my device. i changed the minimun API level to target to what i want and that fixed it.
incase someone is experiencing this again. | For me works this:
```
android {
compileSdkVersion 21
buildToolsVersion '23.0'
defaultConfig {
applicationId "nl.changer.polypickerdemo"
minSdkVersion 15
targetSdkVersion 21
---------
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
}
```... |
26,457,096 | I'm using Android Studio and when I add `compile "com.android.support:appcompat-v7:21.0.0"` to my Gradle file, I'm getting a ton of errors:
```
C:\Users\WindowsSucks\AndroidStudioProjects\MMMeds\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
Error:(36, 21) No res... | 2014/10/20 | [
"https://Stackoverflow.com/questions/26457096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4155973/"
] | Change your **compile sdk** to **23**.This fixed it for me. | I ran into the same issue and had the right API level values in my build.gradle **compileSdkVersion 21, targetSdkVersion 21 and a buildToolsVersion of 21.0.1**
However, I was including this as a module in my project so I had to make sure the other module gradle settings matched API 21. After that it all worked for me. |
26,457,096 | I'm using Android Studio and when I add `compile "com.android.support:appcompat-v7:21.0.0"` to my Gradle file, I'm getting a ton of errors:
```
C:\Users\WindowsSucks\AndroidStudioProjects\MMMeds\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
Error:(36, 21) No res... | 2014/10/20 | [
"https://Stackoverflow.com/questions/26457096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4155973/"
] | AppCompat v21 builds themes that require the new APIs provided in API 21 (Android 5.0). To compile your application with AppCompat, you must also compile against API 21. The recommended setup for compiling/building with API 21 is a `compileSdkVersion` of `21` and a `buildToolsVersion` of `21.0.1` (which is the highest ... | I vote whoever can solve like me.
I had this same problem as u , I spent many hours to get correct .
Please test .
Upgrade entire SDK , the update 21.0.2 build also has updates from Google Services play .
Upgrade everything.
In your workspace delete folders ( android -support- v7 - AppCompat ) and ( google -play - ser... |
26,457,096 | I'm using Android Studio and when I add `compile "com.android.support:appcompat-v7:21.0.0"` to my Gradle file, I'm getting a ton of errors:
```
C:\Users\WindowsSucks\AndroidStudioProjects\MMMeds\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
Error:(36, 21) No res... | 2014/10/20 | [
"https://Stackoverflow.com/questions/26457096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4155973/"
] | Change your **compile sdk** to **23**.This fixed it for me. | I was facing this problem when I imported google-services.json file to implement Analytics. I already had global\_tracker.xml file in the xml folder. During build, while merging contents from google-services.json file, the error was started occurring. For time being, the error is resolved after removing the goolgle-ser... |
26,457,096 | I'm using Android Studio and when I add `compile "com.android.support:appcompat-v7:21.0.0"` to my Gradle file, I'm getting a ton of errors:
```
C:\Users\WindowsSucks\AndroidStudioProjects\MMMeds\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
Error:(36, 21) No res... | 2014/10/20 | [
"https://Stackoverflow.com/questions/26457096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4155973/"
] | changing the complie SDk version to API level 21 fixed it for me. then i ran into others issues of deploying the app to my device. i changed the minimun API level to target to what i want and that fixed it.
incase someone is experiencing this again. | I was facing this problem when I imported google-services.json file to implement Analytics. I already had global\_tracker.xml file in the xml folder. During build, while merging contents from google-services.json file, the error was started occurring. For time being, the error is resolved after removing the goolgle-ser... |
26,457,096 | I'm using Android Studio and when I add `compile "com.android.support:appcompat-v7:21.0.0"` to my Gradle file, I'm getting a ton of errors:
```
C:\Users\WindowsSucks\AndroidStudioProjects\MMMeds\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.0\res\values-v11\values.xml
Error:(36, 21) No res... | 2014/10/20 | [
"https://Stackoverflow.com/questions/26457096",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4155973/"
] | Changing `compile 'com.android.support:appcompat-v7:21.0.0'` into `compile 'com.android.support:appcompat-v7:20.0.0'` in gradle.build works for me. | my solucion is compile with other version
build.gradle (app)
```
compileSdkVersion 21
```
Good Luck |
4,401,613 | I'm getting this error in Windows 7 64 bits:
An error occurred creating the configuration section handler for '': That assembly does not allow partially trusted callers.
This happens when I try to read a config section, the section is mapped to a class that is in a DLL in the GAC, I'm using Visual Studio 2010 targeti... | 2010/12/09 | [
"https://Stackoverflow.com/questions/4401613",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15058/"
] | I Fixed using this command:
caspol -cg 1.2 FullTrust
The Intranet Zone had the LocalIntranet permissions set, (don't know why it was LocalIntranet, it should be FullTrust).
Thanks to dreynold. | Having bumped into similar trouble when our IT department did a stealth upgrade of users' machines to Windows 7, I suspect you may need to update the trust level with caspol.exe
For XP we would normally run:
```
%windir%\Microsoft.NET\Framework\v2.0.50727\CasPol.exe -q -m -ag 1.2 -url file:\\s:\* FullTrust
```
but ... |
66,051 | I have downloaded Aptana and **[ArcGIS Code Assist](https://developers.arcgis.com/en/javascript/jsapi/api_codeassist.html)** but I don't know how to "DRAG" the vsDOC into Aptana.
>
> Aptana 3 Installation Instructions
> Download the zip file that contains the VSDoc file for the version of the ArcGIS API for JavaScri... | 2013/07/15 | [
"https://gis.stackexchange.com/questions/66051",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/4126/"
] | You should use only Aptana 2 to get code assist and the higher version is not compatible. Please check this link <http://joelmccune.com/2012/03/22/an-ide-with-code-assist-for-the-arcgis-javascript-api/> | Download the file from here: <https://developers.arcgis.com/en/javascript/jsapi/api_codeassist.html> and it to your project like you would any other file. |
14,684,761 | When using Tcl C++ API **Tcl\_Eval**, if it returns **TCL\_ERROR**, the error message can be retrieved from `Tcl_GetStringResult(interp)`. However, when executing a bunch of tcl script, the error message doesn't indicate which line the script fails.
Eg:
```
can't find package foobar
while executing
"package requi... | 2013/02/04 | [
"https://Stackoverflow.com/questions/14684761",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/248430/"
] | It's because you are calling `OnPropertyChanged();` after you `return _plcIp;`.
It should be called after you set the value. i.e.:
```
public string plcIp
{
get
{
return _plcIp;
}
set
{
if (value != _plcIp)
{
_plcIp = value;
OnPropertyChanged();
... | This contains the error :
```
public string plcIp
{
get
{
return _plcIp;
OnPropertyChanged(); //This row..
}
set { _plcIp = value; }
}
```
It's in the Set method you want the update in the UI, not when you get the value.
Something like this :
```
p... |
14,684,761 | When using Tcl C++ API **Tcl\_Eval**, if it returns **TCL\_ERROR**, the error message can be retrieved from `Tcl_GetStringResult(interp)`. However, when executing a bunch of tcl script, the error message doesn't indicate which line the script fails.
Eg:
```
can't find package foobar
while executing
"package requi... | 2013/02/04 | [
"https://Stackoverflow.com/questions/14684761",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/248430/"
] | It's because you are calling `OnPropertyChanged();` after you `return _plcIp;`.
It should be called after you set the value. i.e.:
```
public string plcIp
{
get
{
return _plcIp;
}
set
{
if (value != _plcIp)
{
_plcIp = value;
OnPropertyChanged();
... | There are several issues in your code:
* if you are implementing singleton, then constructor of class should be private
* use fields instead of private properties
* properties should not be static (you are using singleton)
* verify if property value really changed before raising OnPropertyChanged event
* raise event b... |
14,684,761 | When using Tcl C++ API **Tcl\_Eval**, if it returns **TCL\_ERROR**, the error message can be retrieved from `Tcl_GetStringResult(interp)`. However, when executing a bunch of tcl script, the error message doesn't indicate which line the script fails.
Eg:
```
can't find package foobar
while executing
"package requi... | 2013/02/04 | [
"https://Stackoverflow.com/questions/14684761",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/248430/"
] | There are several issues in your code:
* if you are implementing singleton, then constructor of class should be private
* use fields instead of private properties
* properties should not be static (you are using singleton)
* verify if property value really changed before raising OnPropertyChanged event
* raise event b... | This contains the error :
```
public string plcIp
{
get
{
return _plcIp;
OnPropertyChanged(); //This row..
}
set { _plcIp = value; }
}
```
It's in the Set method you want the update in the UI, not when you get the value.
Something like this :
```
p... |
2,472,721 | In your experience as a developer, what kinds of things have turned away users and prospective users from using your programs? Also, what kinds of things turn **you** away from using someone else's programs?
For example, one thing that really bugs me is when someone provides free software, but require you to enter you... | 2010/03/18 | [
"https://Stackoverflow.com/questions/2472721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/77914/"
] | Here are a few annoyances that I haven't seen anyone else mention:
* Programs that auto-launch one or more processes at system startup that run constantly in the background (invisibly, in the clock tray, or otherwise).
+ While some of these are necessary, most would either be better implemented with a utility that ru... | How much pain am I going to endure to develop a conscious competence in using the program? Some computer games I tried to play but after a few hours if I haven't figured things out, I'll stop playing. If a program is hard to use and I don't have a really good motivation to resolve it, that will stop me right there.
Ho... |
2,472,721 | In your experience as a developer, what kinds of things have turned away users and prospective users from using your programs? Also, what kinds of things turn **you** away from using someone else's programs?
For example, one thing that really bugs me is when someone provides free software, but require you to enter you... | 2010/03/18 | [
"https://Stackoverflow.com/questions/2472721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/77914/"
] | Setup programs that come bundled with all sorts of freeware (even things like Google toolbar) that are selected by default. I just want the program I downloaded, not all sorts of other programs. I can understand that developers might get something in return for including these add-ons in their setups but I hate it when... | One of the things that bugs me the most (using, not downloading to try in the first place...):
I download or buy software it is because I want to USE it for something. If it is so friendly that it is 100% intuitive and needs no documentation before being useful, great! If it has comprehensive on-line or other help tha... |
2,472,721 | In your experience as a developer, what kinds of things have turned away users and prospective users from using your programs? Also, what kinds of things turn **you** away from using someone else's programs?
For example, one thing that really bugs me is when someone provides free software, but require you to enter you... | 2010/03/18 | [
"https://Stackoverflow.com/questions/2472721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/77914/"
] | Automatic updates and "information" screens that pop up every single system startup.
Yes, you updated yourself good job but I don't care nor want to know that you have. Do I really have to click "No, I don't want to upgrade to the pricier version" every single time I start my computer?
Ad infections. You know the ki... | One of the things that bugs me the most (using, not downloading to try in the first place...):
I download or buy software it is because I want to USE it for something. If it is so friendly that it is 100% intuitive and needs no documentation before being useful, great! If it has comprehensive on-line or other help tha... |
2,472,721 | In your experience as a developer, what kinds of things have turned away users and prospective users from using your programs? Also, what kinds of things turn **you** away from using someone else's programs?
For example, one thing that really bugs me is when someone provides free software, but require you to enter you... | 2010/03/18 | [
"https://Stackoverflow.com/questions/2472721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/77914/"
] | Setup programs that come bundled with all sorts of freeware (even things like Google toolbar) that are selected by default. I just want the program I downloaded, not all sorts of other programs. I can understand that developers might get something in return for including these add-ons in their setups but I hate it when... | Putting an icon in the taskbar when I don't want it there.
I installed an app called Pamella that records Skype calls. I'm fine with 1 icon in the taskbar -- Skype's icon -- but Pamela adding a second just got me angry and I uninstalled it. |
2,472,721 | In your experience as a developer, what kinds of things have turned away users and prospective users from using your programs? Also, what kinds of things turn **you** away from using someone else's programs?
For example, one thing that really bugs me is when someone provides free software, but require you to enter you... | 2010/03/18 | [
"https://Stackoverflow.com/questions/2472721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/77914/"
] | Here are a few annoyances that I haven't seen anyone else mention:
* Programs that auto-launch one or more processes at system startup that run constantly in the background (invisibly, in the clock tray, or otherwise).
+ While some of these are necessary, most would either be better implemented with a utility that ru... | Putting an icon in the taskbar when I don't want it there.
I installed an app called Pamella that records Skype calls. I'm fine with 1 icon in the taskbar -- Skype's icon -- but Pamela adding a second just got me angry and I uninstalled it. |
2,472,721 | In your experience as a developer, what kinds of things have turned away users and prospective users from using your programs? Also, what kinds of things turn **you** away from using someone else's programs?
For example, one thing that really bugs me is when someone provides free software, but require you to enter you... | 2010/03/18 | [
"https://Stackoverflow.com/questions/2472721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/77914/"
] | Automatic updates and "information" screens that pop up every single system startup.
Yes, you updated yourself good job but I don't care nor want to know that you have. Do I really have to click "No, I don't want to upgrade to the pricier version" every single time I start my computer?
Ad infections. You know the ki... | The info needed for free things gets me too, but other than that:
* Bundled software, most of the time adware or browser bars
* Having to click too many times to do a simple action |
2,472,721 | In your experience as a developer, what kinds of things have turned away users and prospective users from using your programs? Also, what kinds of things turn **you** away from using someone else's programs?
For example, one thing that really bugs me is when someone provides free software, but require you to enter you... | 2010/03/18 | [
"https://Stackoverflow.com/questions/2472721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/77914/"
] | * Requiring lots of information when signing up -- name and email is bad enough, as you say, but some registration forms have many many fields. The fewer the better.
* Charging money but refusing to disclose the price unless you speak to a sales rep
* Having a web site that only works in certain browsers
* No releases ... | I will rethink downloading something if I think they will start sending me SPAM if I give them my e-mail address.
At a previous employer we had a program I helped write that was online as a "free" download. They had to put something in for Name, address, phone, and e-mail. Oh, and no opt-out checkbox. It annoys me wh... |
2,472,721 | In your experience as a developer, what kinds of things have turned away users and prospective users from using your programs? Also, what kinds of things turn **you** away from using someone else's programs?
For example, one thing that really bugs me is when someone provides free software, but require you to enter you... | 2010/03/18 | [
"https://Stackoverflow.com/questions/2472721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/77914/"
] | * Requiring lots of information when signing up -- name and email is bad enough, as you say, but some registration forms have many many fields. The fewer the better.
* Charging money but refusing to disclose the price unless you speak to a sales rep
* Having a web site that only works in certain browsers
* No releases ... | Setup programs that come bundled with all sorts of freeware (even things like Google toolbar) that are selected by default. I just want the program I downloaded, not all sorts of other programs. I can understand that developers might get something in return for including these add-ons in their setups but I hate it when... |
2,472,721 | In your experience as a developer, what kinds of things have turned away users and prospective users from using your programs? Also, what kinds of things turn **you** away from using someone else's programs?
For example, one thing that really bugs me is when someone provides free software, but require you to enter you... | 2010/03/18 | [
"https://Stackoverflow.com/questions/2472721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/77914/"
] | * Requiring lots of information when signing up -- name and email is bad enough, as you say, but some registration forms have many many fields. The fewer the better.
* Charging money but refusing to disclose the price unless you speak to a sales rep
* Having a web site that only works in certain browsers
* No releases ... | I left this on my list but it's a big enough annoyance that it probably stands on its own:
Software that requires users to pay for bug fixes, security patches, or critical updates.
If you have a patch that adds some new feature that I want, I don't mind paying for it. If *you* made a mistake and you are trying to get... |
2,472,721 | In your experience as a developer, what kinds of things have turned away users and prospective users from using your programs? Also, what kinds of things turn **you** away from using someone else's programs?
For example, one thing that really bugs me is when someone provides free software, but require you to enter you... | 2010/03/18 | [
"https://Stackoverflow.com/questions/2472721",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/77914/"
] | * Requiring lots of information when signing up -- name and email is bad enough, as you say, but some registration forms have many many fields. The fewer the better.
* Charging money but refusing to disclose the price unless you speak to a sales rep
* Having a web site that only works in certain browsers
* No releases ... | The info needed for free things gets me too, but other than that:
* Bundled software, most of the time adware or browser bars
* Having to click too many times to do a simple action |
25,038,169 | From the Qt5 reference on QUuid:
>
> QUuid QUuid::createUuid() [static]
>
>
> On any platform other than Windows, this function returns a new UUID
> with variant QUuid::DCE and version QUuid::Random. If the /dev/urandom
> device exists, then the numbers used to construct the UUID will be of
> cryptographic quali... | 2014/07/30 | [
"https://Stackoverflow.com/questions/25038169",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1035897/"
] | 
Your output on line 4 is almost certainly just random chance. 6 UUIDs is not a large enough sample to provide any indication of randomness, if you really wanted to know for sure you would need to test a massive number of UUIDs (more than is realistic... | In general you can try it on console this way
```
random="$(dd if=/dev/urandom bs=10 count=1)";
echo $random
```
If this gives you 10 characters, `urandom` is working. If everything is OK with your setup, Qt also will use it.
As far as I know, this is also just a psedo random number generator working with the entro... |
28,870,939 | At scrapy.core.engine
ExecutionEngine method start
```
@defer.inlineCallbacks
def start(self):
"""Start the execution engine"""
assert not self.running, "Engine already running"
self.start_time = time()
yield self.signals.send_catch_log_deferred(signal=signals.engine_started)
self.running = True
... | 2015/03/05 | [
"https://Stackoverflow.com/questions/28870939",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4523350/"
] | >
> Why don't use `self.signals.send_catch_log_deferred(signal=signals.engine_started)` directly but instead of a yield ?
>
>
>
Because `send_catch_log_deferred` returns a `Deferred` object. If you want to avoid a `yield` there, then you should use `send_catch_log` but the point of using `send_catch_log_deferred` ... | **@defer.inlineCallbacks** expects the decorated function to be a generator function and calling a generator function inside decorated function (even returning one) doesn't make the function, a generator function. An investigation:
```
def gen():
yield 1
def func(): return gen
import dis
dis.dis(gen)
2 ... |
46,097,868 | I am getting the following error --
Run-time error '424' : Object required
Here is the code where I am getting the error message. The line where the error appears has been highlighted with \*\*\*\*
```
Sub LoadDropdown_Click()
Dim cnt As ADODB.Connection
Dim rst As ADODB.Recordset
Dim stDB As String, stSQL As S... | 2017/09/07 | [
"https://Stackoverflow.com/questions/46097868",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8574747/"
] | Please change your code:
```
With ComboBox21
.Clear ' **** the error comes at this line since ComboBox21 is empty ******
.BoundColumn = k
.List = Application.Transpose(vaData)
.ListIndex = -1
End With
'With the below:
Sheet1.ComboBox21.Clear
With Shee... | Basically, you just add "On Error Resume Next" to avoid those annoying error messages popping up and then add "Err.Clear" to clear the error flag just in case.
```
Private Sub ComboBox1_Change()
On Error Resume Next
ComboBox5.List = Sheets("Data").Range("B1:B6").Value
Err.Clear
End Sub
```
***NOTE: Th... |
57,794,706 | I am looking to join data from one table to another. The problem I have is in table two, the data I need is in the same column.
This is using wordpress/woocommerce DB so as you may be aware a lot of the user data is stored in the user meta table and you extract it by selecting the meta value where meta key = *somethi... | 2019/09/04 | [
"https://Stackoverflow.com/questions/57794706",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2389087/"
] | Apparently the Spatie Medialibrary has a function called `addMultipleMediaFromRequest`. The full code is now
```
public function store(Request $request)
{
$request->validate([
'name' => 'required',
'slug' => 'required',
'description' => 'required',
... | I managed to upload multiple files like this:
```
if($request->file('photos')) {
foreach ($request->file('photos') as $photo) {
$post->addMedia($photo)->toMediaCollection('post');
}
}
```
Check this out:
<https://github.com/spatie/laravel-medialibrary/issues/227#issuecomment-220794240> |
57,794,706 | I am looking to join data from one table to another. The problem I have is in table two, the data I need is in the same column.
This is using wordpress/woocommerce DB so as you may be aware a lot of the user data is stored in the user meta table and you extract it by selecting the meta value where meta key = *somethi... | 2019/09/04 | [
"https://Stackoverflow.com/questions/57794706",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2389087/"
] | Apparently the Spatie Medialibrary has a function called `addMultipleMediaFromRequest`. The full code is now
```
public function store(Request $request)
{
$request->validate([
'name' => 'required',
'slug' => 'required',
'description' => 'required',
... | **This code is working for me.**
View
----
```
<input type="file" name="photo[]" multiple />
```
ListingController
-----------------
```
public function store(Request $request)
{
if ($request->hasFile('photo')) {
$fileAdders = $listing->addMultipleMediaFromRequest(['photo'])
... |
10,515,199 | I need an example of code or project with one DataGridView Form and one DataTable so I can edit DataGridView cells and then all the changes are automatically commited into the DataTable. Also how can I create DataTable with the same columns with DataGridView other way that manually?
I tried to create DataGridView and ... | 2012/05/09 | [
"https://Stackoverflow.com/questions/10515199",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/781269/"
] | There's no way to create a table automatically from the `DataGridView` columns (**EDIT** To refine this: There are ways to automatically create database structures - ORM would be a good keyword here - but I guess that's not what you need). The other way round works well: Create the table and assign it to the `DataGridV... | I hope you this links from codeproject might help:
<http://www.codeproject.com/Questions/80935/save-datagrid-data-to-database>
<http://www.codeproject.com/Articles/12846/Auto-Saving-DataGridView-Rows-to-a-SQL-Server-Data> |
10,515,199 | I need an example of code or project with one DataGridView Form and one DataTable so I can edit DataGridView cells and then all the changes are automatically commited into the DataTable. Also how can I create DataTable with the same columns with DataGridView other way that manually?
I tried to create DataGridView and ... | 2012/05/09 | [
"https://Stackoverflow.com/questions/10515199",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/781269/"
] | There's no way to create a table automatically from the `DataGridView` columns (**EDIT** To refine this: There are ways to automatically create database structures - ORM would be a good keyword here - but I guess that's not what you need). The other way round works well: Create the table and assign it to the `DataGridV... | Convert `DatagridView` To `DataTable`.
In C#.NET:
```
DataTable dt = ((DataView)this.dataGridView1.DataSource).Table;
```
VB.NET:
```
Dim dt As DataTable = CType(Me.dataGridView1.DataSource,DataView).Table
``` |
10,515,199 | I need an example of code or project with one DataGridView Form and one DataTable so I can edit DataGridView cells and then all the changes are automatically commited into the DataTable. Also how can I create DataTable with the same columns with DataGridView other way that manually?
I tried to create DataGridView and ... | 2012/05/09 | [
"https://Stackoverflow.com/questions/10515199",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/781269/"
] | There's no way to create a table automatically from the `DataGridView` columns (**EDIT** To refine this: There are ways to automatically create database structures - ORM would be a good keyword here - but I guess that's not what you need). The other way round works well: Create the table and assign it to the `DataGridV... | If your DataTable is set as the DataSource for the dataGridView, the contents in the dataGridView will reflect the data in the DataTable and vice versa. Therefore, if you make changes to the dataGridView, those changes are already in the DataTable. |
10,515,199 | I need an example of code or project with one DataGridView Form and one DataTable so I can edit DataGridView cells and then all the changes are automatically commited into the DataTable. Also how can I create DataTable with the same columns with DataGridView other way that manually?
I tried to create DataGridView and ... | 2012/05/09 | [
"https://Stackoverflow.com/questions/10515199",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/781269/"
] | I hope you this links from codeproject might help:
<http://www.codeproject.com/Questions/80935/save-datagrid-data-to-database>
<http://www.codeproject.com/Articles/12846/Auto-Saving-DataGridView-Rows-to-a-SQL-Server-Data> | Convert `DatagridView` To `DataTable`.
In C#.NET:
```
DataTable dt = ((DataView)this.dataGridView1.DataSource).Table;
```
VB.NET:
```
Dim dt As DataTable = CType(Me.dataGridView1.DataSource,DataView).Table
``` |
10,515,199 | I need an example of code or project with one DataGridView Form and one DataTable so I can edit DataGridView cells and then all the changes are automatically commited into the DataTable. Also how can I create DataTable with the same columns with DataGridView other way that manually?
I tried to create DataGridView and ... | 2012/05/09 | [
"https://Stackoverflow.com/questions/10515199",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/781269/"
] | If your DataTable is set as the DataSource for the dataGridView, the contents in the dataGridView will reflect the data in the DataTable and vice versa. Therefore, if you make changes to the dataGridView, those changes are already in the DataTable. | Convert `DatagridView` To `DataTable`.
In C#.NET:
```
DataTable dt = ((DataView)this.dataGridView1.DataSource).Table;
```
VB.NET:
```
Dim dt As DataTable = CType(Me.dataGridView1.DataSource,DataView).Table
``` |
25,971,241 | I am trying to understand how can I get a particular event in a function.
Below is my HTML code:
```
<select id="mySelect" multiple="multiple" width="50">
</select>
Remove Item<input type="button" id="removeItem" value="click" disabled="disabled"/>
```
My jQuery function looks like:
```
$('#removeItem').click(f... | 2014/09/22 | [
"https://Stackoverflow.com/questions/25971241",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3599032/"
] | Very well, I'll bite (though not even trying is quite lazy on your part):
From the [jQuery docs](http://api.jquery.com/ajaxstop/):
>
> Whenever an Ajax request completes, jQuery checks whether there are any other outstanding Ajax requests. If none remain, jQuery triggers the ajaxStop event. Any and all handlers that... | javascript `abort();` method
for reference
<http://help.dottoro.com/ljomfaxv.php>
```
var httpRequest = null;
function sentReq() {
if (!httpRequest) {
httpRequest = CreateHTTPRequestObject ();
}
if (httpRequest) {
var url = "file.php";
... |
39,005,839 | Ember **findBy** method is returning **undefined**, i'm new to ember and not able to figure out what am i doing wrong. I see that **user** and **account** data is present in store when viewed through Ember Inspector. Using the 2.7.0 version of ember and ember data.
```
this.get('store').findRecord('user', userId,{'inc... | 2016/08/17 | [
"https://Stackoverflow.com/questions/39005839",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1045831/"
] | I suggest using simple `grep -o` (show only matching text):
```
grep -o "0x[^']*" file
0x66
0x66
0x137
0xa9
0x148
0x11a
0x167
0x151
0xe6
0x171
0xe2
0x174
``` | How about piping to this:
```
| tr -d "[]' " | tr ',' '\n' | sed -n '/^.\+$/p'
```
It first deletes useless chars, then "splits" the fields to their own lines and then removes any empty ones. |
39,005,839 | Ember **findBy** method is returning **undefined**, i'm new to ember and not able to figure out what am i doing wrong. I see that **user** and **account** data is present in store when viewed through Ember Inspector. Using the 2.7.0 version of ember and ember data.
```
this.get('store').findRecord('user', userId,{'inc... | 2016/08/17 | [
"https://Stackoverflow.com/questions/39005839",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1045831/"
] | I suggest using simple `grep -o` (show only matching text):
```
grep -o "0x[^']*" file
0x66
0x66
0x137
0xa9
0x148
0x11a
0x167
0x151
0xe6
0x171
0xe2
0x174
``` | With `tr` and a little help from `sed`:
```
tr -d "[]' " <file.txt | sed -n '/./ p' | tr ',' '\n'
```
* `tr -d "[]' " removes all`[`,`]`, space and single quotes from the data
* `sed` part matches lines with at least one character to leave out empty lines
* Then `tr ',' '\n'` converts all commas to newlines
... |
11,333,941 | Java EE app container provide "failover" support for EJBs, in their docs never cite any reasons why you would *need* to failover an EJB in the first place!
When do these "failover" conditions take place and what causes them? Is this just a situation where an exception is thrown? Or is it possible for an app container ... | 2012/07/04 | [
"https://Stackoverflow.com/questions/11333941",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/892029/"
] | You may try this:
```
JSON.stringify(myArray,null,'\t')
``` | You are looking for something like PHP's `printr()` - this is not part of standard JS, but tons of libraries will rovide you with that functionality. Start googling with a JSON encoder. |
11,333,941 | Java EE app container provide "failover" support for EJBs, in their docs never cite any reasons why you would *need* to failover an EJB in the first place!
When do these "failover" conditions take place and what causes them? Is this just a situation where an exception is thrown? Or is it possible for an app container ... | 2012/07/04 | [
"https://Stackoverflow.com/questions/11333941",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/892029/"
] | You may try this:
```
JSON.stringify(myArray,null,'\t')
``` | ```
alert('var myArray = [\n' + myArray.join("\n") + '\n];')
``` |
161,317 | I need to get the portal id of a portal user in apex
I have the userId, but I cannot find a way to get it's portal id
Is that through the User? Profile?
does anyone know?
Thanks | 2017/02/21 | [
"https://salesforce.stackexchange.com/questions/161317",
"https://salesforce.stackexchange.com",
"https://salesforce.stackexchange.com/users/33798/"
] | Don't know if you found the solution and here is how I solved it. It basically involves 2 clicks.
1. Click on the `<a>` element to bring the list of `<li>` options to be
visible
2. Click on `<li>` element to pick the value
```
WebElement element = driver.findElement(By.xpath("//div//a[@class='select']"));
JavascriptE... | ```
Select sel = new Select(driver.findElement(By.*locator*("")));
sel.SelectByVisibleText("Information Technology");
``` |
16,905,605 | I would like to execute different methods in a separate thread depending on the parameters that are given to the constructor. However, the Callable interface only allows one kind of return parameter.
It should work like this:
```
Future<String> result =
executor.submit(ClassThatImplementsCallable(RETURN_STRIN... | 2013/06/03 | [
"https://Stackoverflow.com/questions/16905605",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1812379/"
] | >
> I would like to execute different methods in a separate thread depending on the parameters that are given to the constructor.
>
>
>
So when you submit a `Callable` to an `ExecutorService`, you get a future with the same type:
```
Future<String> stringResult = executor.submit(new MyCallable<String>());
Future<... | you could use the Command pattern together with Visitor pattern.
Define a command class and wrap your processing logic together with parameters and return types in it. then pass this command object as parameter and also use it as result type.
Later in your code you can use visitor pattern in order to deal with the tw... |
32,966,576 | I have some `html` content that I want to align and distribute as `two columns` beneath each other, of equal content.
But on mobile divices, I'd like the content to be stacked as one column.
How could I achieve this using `bootstrap` css?
I tried as follows, which did not work:
```
<div class="row">
... | 2015/10/06 | [
"https://Stackoverflow.com/questions/32966576",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1194415/"
] | ```
<div class="row">
<div class="col-xs-12 col-sm-6">
//first half
</div>
<div class="col-xs-12 col-sm-6">
//second half
</div>
</div>
```
The col-xs-12 tell the column to be at full screen when using mobile phones (or small screens).
The col-sm-6 tell the column to be at half size of the row when... | hi you can use this i think please take a look
```css
.tt{
border : 2px solid grey;
}
```
```html
<div class="container">
<div class="row-fluid">
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-6 tt">
first half
</div>
<div class="col-xs-12 col-sm-12 col-md-6 col-lg-... |
220,776 | Considering the fact that LaTeX has extraordinary typesetting capabilities, you would think that some publishers of novels would use it. Yet most of those I have checked out seem to use InDesign or a similar program. Does anyone have an impression of whether some do use LaTeX, and about how common it is?
A **side ques... | 2015/01/05 | [
"https://tex.stackexchange.com/questions/220776",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/19809/"
] | Should you use LaTeX? With Indesign you have a blank slate. You can make any decision you want with respect to layout, design and typography. For most people, that is the problem. There are reasons why books have developed design conventions. Since the days of the incunabula, publishers have been dealing with and solvi... | Definitely, yes, by all means, use LaTeX.
Not all publishers will agree to this because they do not want to invest the time to produce typographically good documents. I suspect some publishers of high quality books must be using a typesetting system – but that is a small minority of $100+ academically commented novels... |
220,776 | Considering the fact that LaTeX has extraordinary typesetting capabilities, you would think that some publishers of novels would use it. Yet most of those I have checked out seem to use InDesign or a similar program. Does anyone have an impression of whether some do use LaTeX, and about how common it is?
A **side ques... | 2015/01/05 | [
"https://tex.stackexchange.com/questions/220776",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/19809/"
] | Though I would like to praise TeX even for fixing the world hunger, things are not so smooth when it comes to publishing professionally.
There is this fact:
>
> You can create any document with absolutely all kinds of quirks (except grid typesetting) with TeX.
>
>
>
Now this is the technical part of the story, ... | This is too long for a comment, so I decided to provide an (opinion-based) answer
The question itself is basically too broad and provokes such answers.
On the other hand, one should ask people having published novels using TeX (LaTeX etc. you know of the huge varieties then) -- I know personally none of such authors.... |
220,776 | Considering the fact that LaTeX has extraordinary typesetting capabilities, you would think that some publishers of novels would use it. Yet most of those I have checked out seem to use InDesign or a similar program. Does anyone have an impression of whether some do use LaTeX, and about how common it is?
A **side ques... | 2015/01/05 | [
"https://tex.stackexchange.com/questions/220776",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/19809/"
] | If you read the instructions for manuscript preparation in *The Chicago Manual of Style* (which are like those for many publishers), they are emphatic that they want the plainest source document you can provide them. **"We want your keystrokes,"** it says, not your formatting.
In the case of the University of Chicago... | Definitely, yes, by all means, use LaTeX.
Not all publishers will agree to this because they do not want to invest the time to produce typographically good documents. I suspect some publishers of high quality books must be using a typesetting system – but that is a small minority of $100+ academically commented novels... |
220,776 | Considering the fact that LaTeX has extraordinary typesetting capabilities, you would think that some publishers of novels would use it. Yet most of those I have checked out seem to use InDesign or a similar program. Does anyone have an impression of whether some do use LaTeX, and about how common it is?
A **side ques... | 2015/01/05 | [
"https://tex.stackexchange.com/questions/220776",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/19809/"
] | Though I would like to praise TeX even for fixing the world hunger, things are not so smooth when it comes to publishing professionally.
There is this fact:
>
> You can create any document with absolutely all kinds of quirks (except grid typesetting) with TeX.
>
>
>
Now this is the technical part of the story, ... | If you read the instructions for manuscript preparation in *The Chicago Manual of Style* (which are like those for many publishers), they are emphatic that they want the plainest source document you can provide them. **"We want your keystrokes,"** it says, not your formatting.
In the case of the University of Chicago... |
220,776 | Considering the fact that LaTeX has extraordinary typesetting capabilities, you would think that some publishers of novels would use it. Yet most of those I have checked out seem to use InDesign or a similar program. Does anyone have an impression of whether some do use LaTeX, and about how common it is?
A **side ques... | 2015/01/05 | [
"https://tex.stackexchange.com/questions/220776",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/19809/"
] | Yes, it's possible, and yes, it would possibly even save the publishers significant amounts of money, but they appear to be largely unaware that TeX can be used as a general-purpose typesetter. | This is too long for a comment, so I decided to provide an (opinion-based) answer
The question itself is basically too broad and provokes such answers.
On the other hand, one should ask people having published novels using TeX (LaTeX etc. you know of the huge varieties then) -- I know personally none of such authors.... |
220,776 | Considering the fact that LaTeX has extraordinary typesetting capabilities, you would think that some publishers of novels would use it. Yet most of those I have checked out seem to use InDesign or a similar program. Does anyone have an impression of whether some do use LaTeX, and about how common it is?
A **side ques... | 2015/01/05 | [
"https://tex.stackexchange.com/questions/220776",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/19809/"
] | Though I would like to praise TeX even for fixing the world hunger, things are not so smooth when it comes to publishing professionally.
There is this fact:
>
> You can create any document with absolutely all kinds of quirks (except grid typesetting) with TeX.
>
>
>
Now this is the technical part of the story, ... | Should you use LaTeX? With Indesign you have a blank slate. You can make any decision you want with respect to layout, design and typography. For most people, that is the problem. There are reasons why books have developed design conventions. Since the days of the incunabula, publishers have been dealing with and solvi... |
220,776 | Considering the fact that LaTeX has extraordinary typesetting capabilities, you would think that some publishers of novels would use it. Yet most of those I have checked out seem to use InDesign or a similar program. Does anyone have an impression of whether some do use LaTeX, and about how common it is?
A **side ques... | 2015/01/05 | [
"https://tex.stackexchange.com/questions/220776",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/19809/"
] | Yes, it's possible, and yes, it would possibly even save the publishers significant amounts of money, but they appear to be largely unaware that TeX can be used as a general-purpose typesetter. | Definitely, yes, by all means, use LaTeX.
Not all publishers will agree to this because they do not want to invest the time to produce typographically good documents. I suspect some publishers of high quality books must be using a typesetting system – but that is a small minority of $100+ academically commented novels... |
220,776 | Considering the fact that LaTeX has extraordinary typesetting capabilities, you would think that some publishers of novels would use it. Yet most of those I have checked out seem to use InDesign or a similar program. Does anyone have an impression of whether some do use LaTeX, and about how common it is?
A **side ques... | 2015/01/05 | [
"https://tex.stackexchange.com/questions/220776",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/19809/"
] | Should you use LaTeX? With Indesign you have a blank slate. You can make any decision you want with respect to layout, design and typography. For most people, that is the problem. There are reasons why books have developed design conventions. Since the days of the incunabula, publishers have been dealing with and solvi... | This is too long for a comment, so I decided to provide an (opinion-based) answer
The question itself is basically too broad and provokes such answers.
On the other hand, one should ask people having published novels using TeX (LaTeX etc. you know of the huge varieties then) -- I know personally none of such authors.... |
220,776 | Considering the fact that LaTeX has extraordinary typesetting capabilities, you would think that some publishers of novels would use it. Yet most of those I have checked out seem to use InDesign or a similar program. Does anyone have an impression of whether some do use LaTeX, and about how common it is?
A **side ques... | 2015/01/05 | [
"https://tex.stackexchange.com/questions/220776",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/19809/"
] | Though I would like to praise TeX even for fixing the world hunger, things are not so smooth when it comes to publishing professionally.
There is this fact:
>
> You can create any document with absolutely all kinds of quirks (except grid typesetting) with TeX.
>
>
>
Now this is the technical part of the story, ... | Yes, it's possible, and yes, it would possibly even save the publishers significant amounts of money, but they appear to be largely unaware that TeX can be used as a general-purpose typesetter. |
220,776 | Considering the fact that LaTeX has extraordinary typesetting capabilities, you would think that some publishers of novels would use it. Yet most of those I have checked out seem to use InDesign or a similar program. Does anyone have an impression of whether some do use LaTeX, and about how common it is?
A **side ques... | 2015/01/05 | [
"https://tex.stackexchange.com/questions/220776",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/19809/"
] | If you read the instructions for manuscript preparation in *The Chicago Manual of Style* (which are like those for many publishers), they are emphatic that they want the plainest source document you can provide them. **"We want your keystrokes,"** it says, not your formatting.
In the case of the University of Chicago... | This is too long for a comment, so I decided to provide an (opinion-based) answer
The question itself is basically too broad and provokes such answers.
On the other hand, one should ask people having published novels using TeX (LaTeX etc. you know of the huge varieties then) -- I know personally none of such authors.... |
55,747,797 | Sorry for the confusing title. I'm a complete beginner in Python and don't even know the language for asking this question.
I'm trying to do some data scrubbing of the website Box Office Mojo. I'm looking to create a csv file that pulls the table for each countries top box office hits for each year (see <https://www.... | 2019/04/18 | [
"https://Stackoverflow.com/questions/55747797",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11262224/"
] | Remove the `padding-top`
```
<td style="padding-top: 20px;padding-right: 5px;padding-bottom: 20px;padding-left: 5px;background-color: #ffffff;color: #000000;" valign="top" bgcolor="#ffffff">
``` | This is why we avoid inline styles because it's difficult to debug, However after some fiddling around, i found some problems
**First:** certain `p` elements have the following styles, And some others don't
```
p {
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
padding: 0;
}
``... |
3,050 | I'm starting a new online business which focuses heavily on media, but I'm not sure the best way to communicate with my audience and clients via social media.
A rough plan is to have multiple social networks for business purposes, but to have a single account to for making contact with people and communicating what's ... | 2019/04/06 | [
"https://moderators.stackexchange.com/questions/3050",
"https://moderators.stackexchange.com",
"https://moderators.stackexchange.com/users/3854/"
] | There's two different situations where one might be better than another: if you're sending the email *personally* or for your business.
**If you're speaking on behalf of the business:** use `@business_media_???`. This way it's clearer that it's coming from the company and not *just* you.
**If you're speaking on behal... | It really depends on whether you want to build the brand around your name or your company. For freelancing, I personally think that using your own self as the brand has more advantage. Search for Chase Jarvis Photography or Neil Patel for SEO. If you are able to establish yourself as a leader in your field, **people wi... |
44,716,347 | As you know due to genius rounding rule in `C#` we are getting the following values:
```
decimal d = 2.155M;
var r = Math.Round(d, 2); //2.16
decimal d = 2.145M;
var r = Math.Round(d, 2); //2.14
```
Now on client side in `Javascript` I am getting:
```
2.155.toFixed(2)
"2.15"
2.145.toFixed(2)
"2.15"
kendo.toStrin... | 2017/06/23 | [
"https://Stackoverflow.com/questions/44716347",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1651298/"
] | There´s an [overload in C#´s Math.Round](https://msdn.microsoft.com/library/ms131275(v=vs.110).aspx) accepting an indicator to detmerine how to round when number is half-way between two others. E.g. MidPointToEven rounds the 0.5 to zero as zero is the neartest even number:
```
decimal d = 2.155M;
var r = Math.Round(d,... | You can specify the [midpoint rounding](https://msdn.microsoft.com/en-us/library/system.midpointrounding.aspx) rule to be used in C#:
```
decimal d = 2.145M;
var r = Math.Round(d, 2, MidpointRounding.AwayFromZero); //2.15
```
The default value for decimals is `MidpointRounding.ToEven` AKA [banker's rounding](https:/... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.