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 |
|---|---|---|---|---|---|
24,171 | I am a 21 year old female living in Egypt and I am beyond terrified of my own father...at least I think he is my father. To say it shortly, I think I might have been adopted at a young age and no one told me about it.
In Egypt, daughters must carry the same name as the father, my name is different from my father's, he... | 2016/02/28 | [
"https://parenting.stackexchange.com/questions/24171",
"https://parenting.stackexchange.com",
"https://parenting.stackexchange.com/users/21063/"
] | You are the victim of abuse. You do not deserve to live in fear. You do not deserve to be hit, or to be shouted at. You father's behaviour is not acceptable.
You might want to look for organisations in your country that can provide help and advice to women in your situation.
I don't speak Arabic, and so I can't do a ... | You mentioned you are at University.... and have some English skills (and I gather some computer skills). So that is a great advantage. You already have some employable skills. A completed degree could also help.
Maybe you have to look to finish your degree then line-up a job in a different city and then off you go. P... |
24,171 | I am a 21 year old female living in Egypt and I am beyond terrified of my own father...at least I think he is my father. To say it shortly, I think I might have been adopted at a young age and no one told me about it.
In Egypt, daughters must carry the same name as the father, my name is different from my father's, he... | 2016/02/28 | [
"https://parenting.stackexchange.com/questions/24171",
"https://parenting.stackexchange.com",
"https://parenting.stackexchange.com/users/21063/"
] | I know what I am suggesting is extreme, but so is your situation and your fear.
Get out. At least out of the city. You have survived this far, and you DO have the strength to reach out with this question. That shows a lot of determination already.
I am not sure how you can best pull this off, because I don't know wh... | Your situation is a difficult one. But be strong and persevere. Every step you make, do it wisely and carefully after talking to various trusted people. **You will definitely need friends, or if not, go to some humanitarian organization** (search via web, and you can zoom down easily to places near your place) for help... |
24,171 | I am a 21 year old female living in Egypt and I am beyond terrified of my own father...at least I think he is my father. To say it shortly, I think I might have been adopted at a young age and no one told me about it.
In Egypt, daughters must carry the same name as the father, my name is different from my father's, he... | 2016/02/28 | [
"https://parenting.stackexchange.com/questions/24171",
"https://parenting.stackexchange.com",
"https://parenting.stackexchange.com/users/21063/"
] | sorry to hear about your situation. It is for sure a very difficult situation. The fact you are feeling anxiety is natural and very understandable, so don't be down on yourself for that. The fact you have survived shows your strength.
I think you are seeing the situation with great clarity.
Living with ongoing anxi... | Sounds scary.
I would advise you to join the army. The army in Egypt has a two year term of service which will go by in no time - as a woman, administrative and medical jobs are the only available role. If you join as a volunteer, you will get much better treatment than if you were conscripted and you might even becom... |
24,171 | I am a 21 year old female living in Egypt and I am beyond terrified of my own father...at least I think he is my father. To say it shortly, I think I might have been adopted at a young age and no one told me about it.
In Egypt, daughters must carry the same name as the father, my name is different from my father's, he... | 2016/02/28 | [
"https://parenting.stackexchange.com/questions/24171",
"https://parenting.stackexchange.com",
"https://parenting.stackexchange.com/users/21063/"
] | You are the victim of abuse. You do not deserve to live in fear. You do not deserve to be hit, or to be shouted at. You father's behaviour is not acceptable.
You might want to look for organisations in your country that can provide help and advice to women in your situation.
I don't speak Arabic, and so I can't do a ... | What your father is doing is wrong. The role of a man in a family is to serve his wife and protect his family. For a man to hit a woman is inexcusable. In the West, we teach this as fact. A man who strikes a woman is beneath contempt.
I know you are religious, but I'm going to go out on a limb. The one organisation I ... |
24,171 | I am a 21 year old female living in Egypt and I am beyond terrified of my own father...at least I think he is my father. To say it shortly, I think I might have been adopted at a young age and no one told me about it.
In Egypt, daughters must carry the same name as the father, my name is different from my father's, he... | 2016/02/28 | [
"https://parenting.stackexchange.com/questions/24171",
"https://parenting.stackexchange.com",
"https://parenting.stackexchange.com/users/21063/"
] | I know what I am suggesting is extreme, but so is your situation and your fear.
Get out. At least out of the city. You have survived this far, and you DO have the strength to reach out with this question. That shows a lot of determination already.
I am not sure how you can best pull this off, because I don't know wh... | So you don't like your father... but how much of a talking relationship do you have?
If he knows you are miserable, then nobody likes to cause misery. Sometimes such people try to exert authority and fix what they see as a problem. However, he may be willing to just agree to dismiss/disown you. If he does agree to that... |
24,171 | I am a 21 year old female living in Egypt and I am beyond terrified of my own father...at least I think he is my father. To say it shortly, I think I might have been adopted at a young age and no one told me about it.
In Egypt, daughters must carry the same name as the father, my name is different from my father's, he... | 2016/02/28 | [
"https://parenting.stackexchange.com/questions/24171",
"https://parenting.stackexchange.com",
"https://parenting.stackexchange.com/users/21063/"
] | I know what I am suggesting is extreme, but so is your situation and your fear.
Get out. At least out of the city. You have survived this far, and you DO have the strength to reach out with this question. That shows a lot of determination already.
I am not sure how you can best pull this off, because I don't know wh... | Are you able to leave your home alone. If so, perhaps you could contact a western aid organisation, and seek advice. If you're able to get out of Egypt, there may be places you could seek asylum, but getting out in the first place could be very difficult and very expensive.
Would there be any way you might be able to ... |
24,171 | I am a 21 year old female living in Egypt and I am beyond terrified of my own father...at least I think he is my father. To say it shortly, I think I might have been adopted at a young age and no one told me about it.
In Egypt, daughters must carry the same name as the father, my name is different from my father's, he... | 2016/02/28 | [
"https://parenting.stackexchange.com/questions/24171",
"https://parenting.stackexchange.com",
"https://parenting.stackexchange.com/users/21063/"
] | What your father is doing is wrong. The role of a man in a family is to serve his wife and protect his family. For a man to hit a woman is inexcusable. In the West, we teach this as fact. A man who strikes a woman is beneath contempt.
I know you are religious, but I'm going to go out on a limb. The one organisation I ... | Your situation is a difficult one. But be strong and persevere. Every step you make, do it wisely and carefully after talking to various trusted people. **You will definitely need friends, or if not, go to some humanitarian organization** (search via web, and you can zoom down easily to places near your place) for help... |
24,171 | I am a 21 year old female living in Egypt and I am beyond terrified of my own father...at least I think he is my father. To say it shortly, I think I might have been adopted at a young age and no one told me about it.
In Egypt, daughters must carry the same name as the father, my name is different from my father's, he... | 2016/02/28 | [
"https://parenting.stackexchange.com/questions/24171",
"https://parenting.stackexchange.com",
"https://parenting.stackexchange.com/users/21063/"
] | Are you able to leave your home alone. If so, perhaps you could contact a western aid organisation, and seek advice. If you're able to get out of Egypt, there may be places you could seek asylum, but getting out in the first place could be very difficult and very expensive.
Would there be any way you might be able to ... | So you don't like your father... but how much of a talking relationship do you have?
If he knows you are miserable, then nobody likes to cause misery. Sometimes such people try to exert authority and fix what they see as a problem. However, he may be willing to just agree to dismiss/disown you. If he does agree to that... |
24,171 | I am a 21 year old female living in Egypt and I am beyond terrified of my own father...at least I think he is my father. To say it shortly, I think I might have been adopted at a young age and no one told me about it.
In Egypt, daughters must carry the same name as the father, my name is different from my father's, he... | 2016/02/28 | [
"https://parenting.stackexchange.com/questions/24171",
"https://parenting.stackexchange.com",
"https://parenting.stackexchange.com/users/21063/"
] | You are 21. You are an adult under Egyptian law. If you need missing papers, you can apply for them without having a guardian. You only need someone to vouch that you live with them, which brings us to:
* Do you have any person you trust you can talk to? Can this person shelter you or provide you with shelter elsewher... | Are you able to leave your home alone. If so, perhaps you could contact a western aid organisation, and seek advice. If you're able to get out of Egypt, there may be places you could seek asylum, but getting out in the first place could be very difficult and very expensive.
Would there be any way you might be able to ... |
24,171 | I am a 21 year old female living in Egypt and I am beyond terrified of my own father...at least I think he is my father. To say it shortly, I think I might have been adopted at a young age and no one told me about it.
In Egypt, daughters must carry the same name as the father, my name is different from my father's, he... | 2016/02/28 | [
"https://parenting.stackexchange.com/questions/24171",
"https://parenting.stackexchange.com",
"https://parenting.stackexchange.com/users/21063/"
] | You are the victim of abuse. You do not deserve to live in fear. You do not deserve to be hit, or to be shouted at. You father's behaviour is not acceptable.
You might want to look for organisations in your country that can provide help and advice to women in your situation.
I don't speak Arabic, and so I can't do a ... | I know what I am suggesting is extreme, but so is your situation and your fear.
Get out. At least out of the city. You have survived this far, and you DO have the strength to reach out with this question. That shows a lot of determination already.
I am not sure how you can best pull this off, because I don't know wh... |
59,083 | The affinity of an enzyme or a protein transporter indicates the strenght of the binding of substrate/solute. An enzyme with higher affinity binds its substrate more strongly than a counterpart with a lower affinity. Is affinity always a function of the protein structure of enzyme? If the same enzyme in two different s... | 2017/04/30 | [
"https://biology.stackexchange.com/questions/59083",
"https://biology.stackexchange.com",
"https://biology.stackexchange.com/users/23288/"
] | In a reaction which follows a saturation kinetics, KM is basically the concentration of substrate/ligand at which the rate of the reaction is half of the maximum rate (or the binding sites are half saturated).
The biophysical meaning of KM would depend on the underlying model. For example, in the equilibrium approxima... | I will add to the answer by @WYSIWYG by turning your question round: “If you changed the amino acids at the binding site, would this affect the affinity of a protein for a ligand\*?”
The answer to this is *yes*, and for an enzyme you can change the substrate specificity entirely, as one can discover from reading this... |
65,375,081 | I'm having trouble writing a few strings into my .txt file without them overwriting each other
This is an example:
```
for i in 1..100{
fs::write("*PATH*", i.to_string()).expect("Unable to write file");
}
```
I'm thinking it should write every singe one right after each other but it doesn't! It overwrites ... | 2020/12/19 | [
"https://Stackoverflow.com/questions/65375081",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8315991/"
] | You can open the [`File`](https://doc.rust-lang.org/std/fs/struct.File.html) before entering the loop. You can further simplify writing to the file, by using the [`write!`](https://doc.rust-lang.org/std/macro.write.html) and [`writeln!`](https://doc.rust-lang.org/std/macro.writeln.html) macros. Which allows you to util... | >
> I couldn't find anything on the web since this way of writing into files seems to be rather new.
>
>
>
It's not rather new, it's rather wrong (for this use case). Open the file beforehand and write to that so it appends, instead of calling [`fs::write`](https://doc.rust-lang.org/std/fs/fn.write.html) every sin... |
21,160,028 | When compliment of 0 was found it turned out to be -1. Why the complement of 0 is -1? Is it always -1 or does it depend on compiler? | 2014/01/16 | [
"https://Stackoverflow.com/questions/21160028",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3202188/"
] | The bitwise negation of 0, written in C as `~0`, is -1 only if the compiler uses [two's complement](http://en.wikipedia.org/wiki/Two%27s_complement) to represent signed integers. So, it's a result of the way the compiler represents numbers and is not generally "true". | It is -1 in [Two's complement](http://en.wikipedia.org/wiki/Two%27s_complement). The compiler is free to choose other representations. |
7,092,276 | I want to save 2 UIImages that are moved, resized and rotated by user. The problem is i dont want to use such function as any 'printscreen one', because it makes both images to lose a lot from their quality (resolution).
Atm i use something like this:
```
UIGraphicsBeginImageContext(image1.size);
[image1 drawInRect:... | 2011/08/17 | [
"https://Stackoverflow.com/questions/7092276",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/849616/"
] | You have to set the transform of the context to match your imageView's transform *before* you start drawing into it.
i.e.,
```
CGAffineTransform transform = CGAffineTransformIdentity;
transform = CGAffineTransformTranslate(transform, boundingRect.size.width/2, boundingRect.size.height/2);
transform = CGAffineTransfor... | Try this:
```
UIImage *temp = [[UIImage alloc] initWithCGImage:image1 scale:1.0 orientation: yourOrientation];
[temp drawInRect:CGRectMake(0, 0, image1.size.width, image1.size.height)];
```
Similarly for image2. Rotation and resizing are handled by orientation and scale respectively. yourOrientation is a UIImageOrie... |
129,663 | I am using `tocloft` and `subcaption` package, and I would like to suppreess page numbers and dot line for subfigures in LOF.
I know, if one uses `tocloft` and `subfigure` package, this can be done with the next command:
```
\cftpagenumbersoff{subfigure}
```
So, I would like to emulate this command with `subcaption... | 2013/08/23 | [
"https://tex.stackexchange.com/questions/129663",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/21334/"
] | Here's one possibility which enables you to use all of `tocloft` features for subfigure entries when using the `subcaption` package; in particular, you can suppress the page numbers and the leaders (the dots from the entry to the page number):
```
\documentclass{article}
\usepackage[list=true]{subcaption}
\usepackage{... | The `tocloft` package can offer a bunch of useful macro to tweak the formatting of subfigures if you pass the option `subfigure` to it.
In this case the package will assume that you use the `subfigure` package and that the counters `lofdepth` and `lotdepth` are defined by the subfigure package.
But if you want to use... |
7,397,934 | Disclaimer: The following question probably is so easy that I might be shocked seeing the first answer. Furthermore, I want to apologize for any duplicate questions - syntactic problems are not always easy to identify be verbal explanation and thus searching for them is not as easy...
But enough of that. I have a two ... | 2011/09/13 | [
"https://Stackoverflow.com/questions/7397934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/601303/"
] | ```
obj.bar<double>(1,2); // This line is faulty.
```
The `template` keyword is required here, as `obj` is an instance of a type `Foo<T>` which *depends on* the template parameter `T`, and so the above should be written as:
```
obj.template bar<double>(1,2); //This line is corrected :-)
```
Read @Johannes's answer... | As so often: Once the question was posted, the answer came all by itself.
Correcting the faulty line to
```
return obj.template bar<double>(1,2);
```
yields the expected results.
Thanks for reading... |
7,397,934 | Disclaimer: The following question probably is so easy that I might be shocked seeing the first answer. Furthermore, I want to apologize for any duplicate questions - syntactic problems are not always easy to identify be verbal explanation and thus searching for them is not as easy...
But enough of that. I have a two ... | 2011/09/13 | [
"https://Stackoverflow.com/questions/7397934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/601303/"
] | As so often: Once the question was posted, the answer came all by itself.
Correcting the faulty line to
```
return obj.template bar<double>(1,2);
```
yields the expected results.
Thanks for reading... | Could this be a case of `foo.template bar‹ double >`? |
7,397,934 | Disclaimer: The following question probably is so easy that I might be shocked seeing the first answer. Furthermore, I want to apologize for any duplicate questions - syntactic problems are not always easy to identify be verbal explanation and thus searching for them is not as easy...
But enough of that. I have a two ... | 2011/09/13 | [
"https://Stackoverflow.com/questions/7397934",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/601303/"
] | ```
obj.bar<double>(1,2); // This line is faulty.
```
The `template` keyword is required here, as `obj` is an instance of a type `Foo<T>` which *depends on* the template parameter `T`, and so the above should be written as:
```
obj.template bar<double>(1,2); //This line is corrected :-)
```
Read @Johannes's answer... | Could this be a case of `foo.template bar‹ double >`? |
5,218,234 | I am trying to create my own shell that is a shell replacement for Windows.
I realize that by just setting the value in REGEDIT at:
```
HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon
```
will works in Windows 7. But, in Windows XP, it's not the case.
If I try to run Windows Explorer, it'll... | 2011/03/07 | [
"https://Stackoverflow.com/questions/5218234",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/427793/"
] | Explorer will look at the "Shell" string to see if it does not exist or is != "explorer[.exe]", but it only checks under HKEY\_LOCAL\_MACHINE on XP!
If you call one of the undocumented register as shell functions ([SetShellWindow](http://www.freelists.org/post/shell-coding/SetShellWindow), SetProgmanWindow, SetTaskman... | You need replace one key in `HKLM` and the other in `HKCU`.
see this for more info: <http://msdn.microsoft.com/en-us/library/ms838576.aspx> |
26,908,069 | Hello I wonder why I have 2 different return Values.
Here is the first query:
```
declare @currentcolumn_val varchar
declare @start integer
set @currentcolumn_val = 'state_val'
set @start =1
select @currentcolumn_val from z_skm where id = @start
```
the returned value is just "s"
Here is the second Query which g... | 2014/11/13 | [
"https://Stackoverflow.com/questions/26908069",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3445903/"
] | Your first query is returning a constant. The second is returning the value of the column.
You are returning `'s`' instead of `'state_val'` because of the declaration:
```
declare @currentcolumn_val varchar;
```
You have no length on `varchar()` and in this context, it defaults to a length of 1. *Always* use length... | You have declared `@currentcolumn_val` simply as `varchar`, which defaults to a length of 1.
if you replace it with `declare @currentcolumn_val varchar(10)` you will see the whole value |
26,908,069 | Hello I wonder why I have 2 different return Values.
Here is the first query:
```
declare @currentcolumn_val varchar
declare @start integer
set @currentcolumn_val = 'state_val'
set @start =1
select @currentcolumn_val from z_skm where id = @start
```
the returned value is just "s"
Here is the second Query which g... | 2014/11/13 | [
"https://Stackoverflow.com/questions/26908069",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3445903/"
] | You have declared `@currentcolumn_val` simply as `varchar`, which defaults to a length of 1.
if you replace it with `declare @currentcolumn_val varchar(10)` you will see the whole value | First you haven't given the `@currentcolumn_val` parameter a size so it is equivalent to a `VARCHAR(1)`. This means that this:
```
set @currentcolumn_val = 'state_val'
```
Is the essentially the same as:
```
set @currentcolumn_val = 's'
```
Then in your SELECT you are returning the value of that variable, not a c... |
26,908,069 | Hello I wonder why I have 2 different return Values.
Here is the first query:
```
declare @currentcolumn_val varchar
declare @start integer
set @currentcolumn_val = 'state_val'
set @start =1
select @currentcolumn_val from z_skm where id = @start
```
the returned value is just "s"
Here is the second Query which g... | 2014/11/13 | [
"https://Stackoverflow.com/questions/26908069",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3445903/"
] | Your first query is returning a constant. The second is returning the value of the column.
You are returning `'s`' instead of `'state_val'` because of the declaration:
```
declare @currentcolumn_val varchar;
```
You have no length on `varchar()` and in this context, it defaults to a length of 1. *Always* use length... | First you haven't given the `@currentcolumn_val` parameter a size so it is equivalent to a `VARCHAR(1)`. This means that this:
```
set @currentcolumn_val = 'state_val'
```
Is the essentially the same as:
```
set @currentcolumn_val = 's'
```
Then in your SELECT you are returning the value of that variable, not a c... |
1,277,776 | I'm trying to set the HTML of an Iframe at runtime, from code behind.
In my aspx page i have:
```
<asp:Button ID="btnChange" runat="server" Text="Change iframe content"
onclick="btnChange_Click" />
<br />
<iframe id="myIframe" runat="server" />
```
in the code behind:
```
protected void btnChange_Click(object s... | 2009/08/14 | [
"https://Stackoverflow.com/questions/1277776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/131809/"
] | You can try this:
```
protected void btnChange_Click(object sender, EventArgs e)
{
myIframe.Attributes["src"] = "pathtofilewith.html"
}
```
or maybe this will work too:
```
protected void btnChange_Click(object sender, EventArgs e)
{
myIframe.Attributes["innerHTML"] = "htmlgoeshere"
}
``` | You can not change iframe innerHTML property. It does not have innerHTML property at all. Try to RegisterStartupScript and use document.write to change the content of the iframe since it is a window.
By the way, i think HTML tag is better place for this. |
1,277,776 | I'm trying to set the HTML of an Iframe at runtime, from code behind.
In my aspx page i have:
```
<asp:Button ID="btnChange" runat="server" Text="Change iframe content"
onclick="btnChange_Click" />
<br />
<iframe id="myIframe" runat="server" />
```
in the code behind:
```
protected void btnChange_Click(object s... | 2009/08/14 | [
"https://Stackoverflow.com/questions/1277776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/131809/"
] | You can try this:
```
protected void btnChange_Click(object sender, EventArgs e)
{
myIframe.Attributes["src"] = "pathtofilewith.html"
}
```
or maybe this will work too:
```
protected void btnChange_Click(object sender, EventArgs e)
{
myIframe.Attributes["innerHTML"] = "htmlgoeshere"
}
``` | ```
<asp:Button ID="btnChange" runat="server" Text="Change iframe content" onclick="btnChange_Click" />
<br />
<asp:Literal id="myIframe" runat="server" />
in the code behind:
protected void btnChange_Click(object sender, EventArgs e){
myIframe.Text = "<h1>Contents Changed</h1>";
}
``` |
1,277,776 | I'm trying to set the HTML of an Iframe at runtime, from code behind.
In my aspx page i have:
```
<asp:Button ID="btnChange" runat="server" Text="Change iframe content"
onclick="btnChange_Click" />
<br />
<iframe id="myIframe" runat="server" />
```
in the code behind:
```
protected void btnChange_Click(object s... | 2009/08/14 | [
"https://Stackoverflow.com/questions/1277776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/131809/"
] | You can try this:
```
protected void btnChange_Click(object sender, EventArgs e)
{
myIframe.Attributes["src"] = "pathtofilewith.html"
}
```
or maybe this will work too:
```
protected void btnChange_Click(object sender, EventArgs e)
{
myIframe.Attributes["innerHTML"] = "htmlgoeshere"
}
``` | what you need to do is create a seperate aspx page that is empty and that gets the response and loads it in its own body, in other words replace itself, like
mypage.aspx:
```
<%@ Page contentType="text/html" %>
//... using your namespace that contains the required functionality
<% Response.Write(MyObject.CreateBody()... |
1,277,776 | I'm trying to set the HTML of an Iframe at runtime, from code behind.
In my aspx page i have:
```
<asp:Button ID="btnChange" runat="server" Text="Change iframe content"
onclick="btnChange_Click" />
<br />
<iframe id="myIframe" runat="server" />
```
in the code behind:
```
protected void btnChange_Click(object s... | 2009/08/14 | [
"https://Stackoverflow.com/questions/1277776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/131809/"
] | You can try this:
```
protected void btnChange_Click(object sender, EventArgs e)
{
myIframe.Attributes["src"] = "pathtofilewith.html"
}
```
or maybe this will work too:
```
protected void btnChange_Click(object sender, EventArgs e)
{
myIframe.Attributes["innerHTML"] = "htmlgoeshere"
}
``` | There's no innerHTML attribute for an iFrame. However, since HTML 5.0, there's a new **srcdoc** attribute. <http://www.w3schools.com/tags/tag_iframe.asp>
>
> Value: *HTML\_code*
>
>
> Description: Specifies the HTML content of the page to show in the < iframe >
>
>
>
Which you could use like this:
```
protecte... |
1,277,776 | I'm trying to set the HTML of an Iframe at runtime, from code behind.
In my aspx page i have:
```
<asp:Button ID="btnChange" runat="server" Text="Change iframe content"
onclick="btnChange_Click" />
<br />
<iframe id="myIframe" runat="server" />
```
in the code behind:
```
protected void btnChange_Click(object s... | 2009/08/14 | [
"https://Stackoverflow.com/questions/1277776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/131809/"
] | There's no innerHTML attribute for an iFrame. However, since HTML 5.0, there's a new **srcdoc** attribute. <http://www.w3schools.com/tags/tag_iframe.asp>
>
> Value: *HTML\_code*
>
>
> Description: Specifies the HTML content of the page to show in the < iframe >
>
>
>
Which you could use like this:
```
protecte... | You can not change iframe innerHTML property. It does not have innerHTML property at all. Try to RegisterStartupScript and use document.write to change the content of the iframe since it is a window.
By the way, i think HTML tag is better place for this. |
1,277,776 | I'm trying to set the HTML of an Iframe at runtime, from code behind.
In my aspx page i have:
```
<asp:Button ID="btnChange" runat="server" Text="Change iframe content"
onclick="btnChange_Click" />
<br />
<iframe id="myIframe" runat="server" />
```
in the code behind:
```
protected void btnChange_Click(object s... | 2009/08/14 | [
"https://Stackoverflow.com/questions/1277776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/131809/"
] | There's no innerHTML attribute for an iFrame. However, since HTML 5.0, there's a new **srcdoc** attribute. <http://www.w3schools.com/tags/tag_iframe.asp>
>
> Value: *HTML\_code*
>
>
> Description: Specifies the HTML content of the page to show in the < iframe >
>
>
>
Which you could use like this:
```
protecte... | ```
<asp:Button ID="btnChange" runat="server" Text="Change iframe content" onclick="btnChange_Click" />
<br />
<asp:Literal id="myIframe" runat="server" />
in the code behind:
protected void btnChange_Click(object sender, EventArgs e){
myIframe.Text = "<h1>Contents Changed</h1>";
}
``` |
1,277,776 | I'm trying to set the HTML of an Iframe at runtime, from code behind.
In my aspx page i have:
```
<asp:Button ID="btnChange" runat="server" Text="Change iframe content"
onclick="btnChange_Click" />
<br />
<iframe id="myIframe" runat="server" />
```
in the code behind:
```
protected void btnChange_Click(object s... | 2009/08/14 | [
"https://Stackoverflow.com/questions/1277776",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/131809/"
] | There's no innerHTML attribute for an iFrame. However, since HTML 5.0, there's a new **srcdoc** attribute. <http://www.w3schools.com/tags/tag_iframe.asp>
>
> Value: *HTML\_code*
>
>
> Description: Specifies the HTML content of the page to show in the < iframe >
>
>
>
Which you could use like this:
```
protecte... | what you need to do is create a seperate aspx page that is empty and that gets the response and loads it in its own body, in other words replace itself, like
mypage.aspx:
```
<%@ Page contentType="text/html" %>
//... using your namespace that contains the required functionality
<% Response.Write(MyObject.CreateBody()... |
53,426,876 | if this question is stupid, please understand.
I'm starting to learn scala with basic grammar.
But I don't understand why one is error other is not. I tested this with scala worksheet
```
val range = 1 to 10 by 3 toList
println(s"$range") //error
```
but the below is the List(actually Seq)
```
val range = (1 to... | 2018/11/22 | [
"https://Stackoverflow.com/questions/53426876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8392616/"
] | The issue is that the string you are trying to parse is not a valid JSON document. It is actually a concatenation of JSON documents. So the simple `json.loads()` will not work.
You can use instead something based on <https://docs.python.org/3/library/json.html#json.JSONDecoder.raw_decode> . E.g: (code is a bit ugly bu... | This works like a charm
```
import json
json_file = "myfile.json"
objects = json.load(open(json_file))
for person in objects:
name = person['name']
print(name)
``` |
37,763,404 | I have a dictionary of named entities, extracted from Wikipedia. I want to use it as the dictionary of an NER. I wanted to know how can I use Stanford-NER with this data of mine.
I have also downloaded Lingpipe, although I have no idea how can I use it. I would appreciate all kinds of information.
Thanks for your help... | 2016/06/11 | [
"https://Stackoverflow.com/questions/37763404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6333421/"
] | You can use dictionary (or regular expression-based) named entity recognition with Stanford CoreNLP. See the [RegexNER annotator](http://stanfordnlp.github.io/CoreNLP/regexner.html). For some applications, we run this with quite large dictionaries of entities. Nevertheless, for us this is typically a secondary tool to ... | Stanford-NER is based on CRFs, which is a statistic model. I'm afraid it doesn't support extra dictionary or lexicon. However, you can train a new model according to your own task. |
37,763,404 | I have a dictionary of named entities, extracted from Wikipedia. I want to use it as the dictionary of an NER. I wanted to know how can I use Stanford-NER with this data of mine.
I have also downloaded Lingpipe, although I have no idea how can I use it. I would appreciate all kinds of information.
Thanks for your help... | 2016/06/11 | [
"https://Stackoverflow.com/questions/37763404",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6333421/"
] | You can use dictionary (or regular expression-based) named entity recognition with Stanford CoreNLP. See the [RegexNER annotator](http://stanfordnlp.github.io/CoreNLP/regexner.html). For some applications, we run this with quite large dictionaries of entities. Nevertheless, for us this is typically a secondary tool to ... | you can use MER: <http://labs.fc.ul.pt/mer/>
a minimal entity recognizer developed in bash: <https://github.com/lasigeBioTM/MER>
that only requires a lexicon (text file) as input |
44,238,385 | I Have a BaseAdapter with a List of all requires permissions for use correctly the app.
I need to, after onClick in one of them, request the permission and check if is granted or not.
For request, I am using
>
> ActivityCompat.requestPermissions
>
>
>
but I do not know how to get the results.
Is it possible t... | 2017/05/29 | [
"https://Stackoverflow.com/questions/44238385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4718057/"
] | so first i implement in the Adapter
**implements ActivityCompat.OnRequestPermissionsResultCallback**
then it require one Overide method
```
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
// it is not work here onRequestPerm... | To check the permission (in this example it's a permission to use the camera):
```
int permissionCheck = ContextCompat.checkSelfPermission(this,
Manifest.permission.CAMERA);
if (permissionCheck == PackageManager.PERMISSION_DENIED) {
// permission is not granted yet, let's ask for it
... |
44,238,385 | I Have a BaseAdapter with a List of all requires permissions for use correctly the app.
I need to, after onClick in one of them, request the permission and check if is granted or not.
For request, I am using
>
> ActivityCompat.requestPermissions
>
>
>
but I do not know how to get the results.
Is it possible t... | 2017/05/29 | [
"https://Stackoverflow.com/questions/44238385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4718057/"
] | so first i implement in the Adapter
**implements ActivityCompat.OnRequestPermissionsResultCallback**
then it require one Overide method
```
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
// it is not work here onRequestPerm... | In your adapter class
```
class Adapter extends RecyclerView.Adapter<Your adapter.MyViewHolder> implements ActivityCompat.OnRequestPermissionsResultCallback{`//enter code here`}
```
It will override the onRequestPermissionsResult |
44,238,385 | I Have a BaseAdapter with a List of all requires permissions for use correctly the app.
I need to, after onClick in one of them, request the permission and check if is granted or not.
For request, I am using
>
> ActivityCompat.requestPermissions
>
>
>
but I do not know how to get the results.
Is it possible t... | 2017/05/29 | [
"https://Stackoverflow.com/questions/44238385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4718057/"
] | so first i implement in the Adapter
**implements ActivityCompat.OnRequestPermissionsResultCallback**
then it require one Overide method
```
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
// it is not work here onRequestPerm... | I have a same problem in RecylclerView.Adapter and I use this section in permission request method
```
private void requestCallPhonePerm() {
if (ContextCompat.checkSelfPermission(context,
Manifest.permission.CALL_PHONE)
!= PackageManager.PERMISSION_GRANTED) {
onItemCallListener.ite... |
44,238,385 | I Have a BaseAdapter with a List of all requires permissions for use correctly the app.
I need to, after onClick in one of them, request the permission and check if is granted or not.
For request, I am using
>
> ActivityCompat.requestPermissions
>
>
>
but I do not know how to get the results.
Is it possible t... | 2017/05/29 | [
"https://Stackoverflow.com/questions/44238385",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4718057/"
] | so first i implement in the Adapter
**implements ActivityCompat.OnRequestPermissionsResultCallback**
then it require one Overide method
```
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
// it is not work here onRequestPerm... | I solved this from custom class. My custom class is derived from `AppCompatActivity`. Also you need to pass Activity context to your custom class and do whatever you need with it.
```
public bool AreStorageAndCamPermissionsGranted(Activity context)
{
if (Build.VERSION.SdkInt >= Build.VERSION_CODES.... |
10,488,763 | I'd like to host some of my C# VisualStudio 2010 projects on github. I'm guessing that it's good practice to at least add a minimal `.git/info/exclude` file. For my [FluentWpf](https://github.com/dharmatech/FluentWpf) project, I've got this in my `exclude` file:
```
FluentWpf/bin/*
FluentWpf/obj/*
```
Are there any ... | 2012/05/07 | [
"https://Stackoverflow.com/questions/10488763",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/268581/"
] | You can use GitHub's default .gitignore for it:
<https://github.com/github/gitignore/blob/master/VisualStudio.gitignore> | If you happen to use Git Extensions, it has its own default .gitignore. In Visual Studio just go to Git menu->Edit .gitignore and click "Add default ignores".
Before making the initial commit I think it's also a good idea to decide on how you're going to treat line endings.
As you probably know, Windows uses a comb... |
22,547,708 | I have some F# code here for a recursive function that rotates a list to the left by `n` places. I am very new to F# and I'm looking for a way to modify this code to output not just one rotation by `n` positions, but all possible rotations.
For example, say I have the list:
```
let list1 = [1; 2; 3; 4]
```
I want t... | 2014/03/21 | [
"https://Stackoverflow.com/questions/22547708",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3306803/"
] | I would start off with making an infinite cyclic sequence off your original list. And then use `List.init` to get all the rotations.
```
let rotations list =
let rec cyclic sequence = seq {
yield! sequence
yield! cyclic sequence }
let cyclic = cyclic list
let length = List.length list
... | Using the `rotate` function you already wrote:
```
let rotations xs = List.init (List.length xs) (rotate xs)
```
By the way, you can shorten your `rotate` function to this:
```
let rec rotate xs k =
match xs, k with
|[], _ -> []
|xs, 0 -> xs
|x::xs, k -> rotate (xs @ [x]) (k-1)
```
P... |
22,547,708 | I have some F# code here for a recursive function that rotates a list to the left by `n` places. I am very new to F# and I'm looking for a way to modify this code to output not just one rotation by `n` positions, but all possible rotations.
For example, say I have the list:
```
let list1 = [1; 2; 3; 4]
```
I want t... | 2014/03/21 | [
"https://Stackoverflow.com/questions/22547708",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3306803/"
] | If I understand the question correctly, you can also write the function using the built-in `List.permute` function:
```
let rotate xs =
let length = xs |> List.length
let perm n = xs |> List.permute (fun index -> (index + n) % length)
[1 .. length] |> List.rev |> List.map perm
```
Example output (slight... | I would start off with making an infinite cyclic sequence off your original list. And then use `List.init` to get all the rotations.
```
let rotations list =
let rec cyclic sequence = seq {
yield! sequence
yield! cyclic sequence }
let cyclic = cyclic list
let length = List.length list
... |
22,547,708 | I have some F# code here for a recursive function that rotates a list to the left by `n` places. I am very new to F# and I'm looking for a way to modify this code to output not just one rotation by `n` positions, but all possible rotations.
For example, say I have the list:
```
let list1 = [1; 2; 3; 4]
```
I want t... | 2014/03/21 | [
"https://Stackoverflow.com/questions/22547708",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3306803/"
] | If I understand the question correctly, you can also write the function using the built-in `List.permute` function:
```
let rotate xs =
let length = xs |> List.length
let perm n = xs |> List.permute (fun index -> (index + n) % length)
[1 .. length] |> List.rev |> List.map perm
```
Example output (slight... | Using the `rotate` function you already wrote:
```
let rotations xs = List.init (List.length xs) (rotate xs)
```
By the way, you can shorten your `rotate` function to this:
```
let rec rotate xs k =
match xs, k with
|[], _ -> []
|xs, 0 -> xs
|x::xs, k -> rotate (xs @ [x]) (k-1)
```
P... |
22,547,708 | I have some F# code here for a recursive function that rotates a list to the left by `n` places. I am very new to F# and I'm looking for a way to modify this code to output not just one rotation by `n` positions, but all possible rotations.
For example, say I have the list:
```
let list1 = [1; 2; 3; 4]
```
I want t... | 2014/03/21 | [
"https://Stackoverflow.com/questions/22547708",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3306803/"
] | Since I wanted to do this specific question using recursion and matchings, I managed to figure it out and this is what I came up with:
```
let rotate xs =
let n = List.length xs
let rec rotation xs n =
match xs, n with
|[], _ -> []
|xs, 0 -> xs
|x::xs, n -> rotation (xs @ [x]) ... | Using the `rotate` function you already wrote:
```
let rotations xs = List.init (List.length xs) (rotate xs)
```
By the way, you can shorten your `rotate` function to this:
```
let rec rotate xs k =
match xs, k with
|[], _ -> []
|xs, 0 -> xs
|x::xs, k -> rotate (xs @ [x]) (k-1)
```
P... |
22,547,708 | I have some F# code here for a recursive function that rotates a list to the left by `n` places. I am very new to F# and I'm looking for a way to modify this code to output not just one rotation by `n` positions, but all possible rotations.
For example, say I have the list:
```
let list1 = [1; 2; 3; 4]
```
I want t... | 2014/03/21 | [
"https://Stackoverflow.com/questions/22547708",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3306803/"
] | If I understand the question correctly, you can also write the function using the built-in `List.permute` function:
```
let rotate xs =
let length = xs |> List.length
let perm n = xs |> List.permute (fun index -> (index + n) % length)
[1 .. length] |> List.rev |> List.map perm
```
Example output (slight... | Since I wanted to do this specific question using recursion and matchings, I managed to figure it out and this is what I came up with:
```
let rotate xs =
let n = List.length xs
let rec rotation xs n =
match xs, n with
|[], _ -> []
|xs, 0 -> xs
|x::xs, n -> rotation (xs @ [x]) ... |
50,751,857 | I have a sample code here which the multiple selection.
Now my question is how can i get this multiple data, then display it through mysql query in php.
Please help me!.
Thank you!
```html
<form id="form1" name="form1" method="get" action="display.php">
<table width="300" border="1">
<tr>
<... | 2018/06/08 | [
"https://Stackoverflow.com/questions/50751857",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9844239/"
] | In **onSubmit** method iterate through all form controls and simply mark them as touched
```
Object.keys(form.controls).forEach(key => {
form.controls[key].markAsTouched();
});
``` | Set a flag to be true when it's valid and use $ngIf:
HTML
```
<form #myForm="ngForm" (submit)="onSubmit(myForm)">
<input type="text" class="form-control" required [(ngModel)]="fullname" name="fullname" #input="ngModel">
<div style="color:red" *ngIf="submittedError">
Error
... |
50,751,857 | I have a sample code here which the multiple selection.
Now my question is how can i get this multiple data, then display it through mysql query in php.
Please help me!.
Thank you!
```html
<form id="form1" name="form1" method="get" action="display.php">
<table width="300" border="1">
<tr>
<... | 2018/06/08 | [
"https://Stackoverflow.com/questions/50751857",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9844239/"
] | In **onSubmit** method iterate through all form controls and simply mark them as touched
```
Object.keys(form.controls).forEach(key => {
form.controls[key].markAsTouched();
});
``` | You have to use an extra flag to do that.
Like below,
```
submitted = false;
onSubmit() { this.submitted = true; }
```
And insert `submitted` into `*ngIf` statement.
Reference :
<https://angular.io/guide/forms#toggle-two-form-regions-extra-credit> |
50,751,857 | I have a sample code here which the multiple selection.
Now my question is how can i get this multiple data, then display it through mysql query in php.
Please help me!.
Thank you!
```html
<form id="form1" name="form1" method="get" action="display.php">
<table width="300" border="1">
<tr>
<... | 2018/06/08 | [
"https://Stackoverflow.com/questions/50751857",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9844239/"
] | In **onSubmit** method iterate through all form controls and simply mark them as touched
```
Object.keys(form.controls).forEach(key => {
form.controls[key].markAsTouched();
});
``` | To add to the answers: ngForm has a submitted flag exposed. So, just create a template variable, and do a ngIf on the errors (ie. ngForm.submitted === true) |
136,501 | I am looking to calculate pricing and tax between 3 cells. Though if 1 of the cells is blank, I want the end result cell to be blank.
In this instance I have the: **(order total \* the tax rate) + the shipping quote**.
But if there is no shipping quote, it is still populating with the first part.
I would like to ... | 2019/11/21 | [
"https://webapps.stackexchange.com/questions/136501",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/232354/"
] | >
> =iferror(if(G4="","-",(F4\*0.25)+G4),"invalid shipping quote")
>
>
>
Dash when no quote, and message when quote has a value but is not a number (just in case there is an incorrect entry) | You need to inclose your formula within the [`IF`](https://support.google.com/docs/answer/3093364?hl=en-GB) function:
**```
=IF(G4<>"", (F4*0.25)+G4,"-")
```**
*(Of course you can change the dash to something more meaningful, like **No shipping quote**)*
As suggesteded at the [comment](https://webapps.stackexchange... |
136,501 | I am looking to calculate pricing and tax between 3 cells. Though if 1 of the cells is blank, I want the end result cell to be blank.
In this instance I have the: **(order total \* the tax rate) + the shipping quote**.
But if there is no shipping quote, it is still populating with the first part.
I would like to ... | 2019/11/21 | [
"https://webapps.stackexchange.com/questions/136501",
"https://webapps.stackexchange.com",
"https://webapps.stackexchange.com/users/232354/"
] | >
> =iferror(if(G4="","-",(F4\*0.25)+G4),"invalid shipping quote")
>
>
>
Dash when no quote, and message when quote has a value but is not a number (just in case there is an incorrect entry) | 1. Consider to use the IF function.
2. To return a blank, leave the IF corresponding parameter blank, i.e.:
```
=IF(ISBLANK(G4),,F4*0.25+G4)
``` |
19,753 | I want to search lines beginning with certain string in Vim, and then add something at the end of file. I have tried the following but it removed everything instead of appending
```
:%s/^12138/*something_at_end_of_file/g
```
This search all lines which begin with `12138` but it removes everything and add `something_... | 2019/04/26 | [
"https://vi.stackexchange.com/questions/19753",
"https://vi.stackexchange.com",
"https://vi.stackexchange.com/users/21179/"
] | use the `:g` command:
```
:g/^12138/s/something-at-the-end$/something-new-at-the-end/
```
More information on `:help :g` | You may try this:
```
%s/\v^(12138.*)/\1something_at_end_of_line/g
```
That means:
`%s` substitute on all lines
`/\v` starts search pattern and uses very-magic mode, saves you from the need to escape everything (see `:help \v`)
`^(12138.*)` starting from the beginning of the line, find all text that starts with `... |
19,753 | I want to search lines beginning with certain string in Vim, and then add something at the end of file. I have tried the following but it removed everything instead of appending
```
:%s/^12138/*something_at_end_of_file/g
```
This search all lines which begin with `12138` but it removes everything and add `something_... | 2019/04/26 | [
"https://vi.stackexchange.com/questions/19753",
"https://vi.stackexchange.com",
"https://vi.stackexchange.com/users/21179/"
] | use the `:g` command:
```
:g/^12138/s/something-at-the-end$/something-new-at-the-end/
```
More information on `:help :g` | Another similar alternative: use `:normal` and `A`ppend in a `:global` command:
```
:g/^12138/norm!Asomething_at_the_end
``` |
64,110,294 | So i seem to have found the ultimate problem that i believe has an easy way to get around, but me personally after 3h of research on all forums gave up XD.
So i visited an online React website that contained webplayer.js file. Inside this bundle, we have an incredibly large and nested array that stores all the variabl... | 2020/09/28 | [
"https://Stackoverflow.com/questions/64110294",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11141001/"
] | try==>
```
listAutoAdapter = new ArrayAdapter<String>( getApplicationContext(), R.layout.item_auto_search, autoBookNames );
atv_Search.setAdapter( listAutoAdapter );
atv_Search.addTextChangedListener( new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
l... | Do you think that your compare strings' index in **"SOME CODE TO GET NAMES"** is wrong (such as last index is smaller than the correct one 1 character) |
64,110,294 | So i seem to have found the ultimate problem that i believe has an easy way to get around, but me personally after 3h of research on all forums gave up XD.
So i visited an online React website that contained webplayer.js file. Inside this bundle, we have an incredibly large and nested array that stores all the variabl... | 2020/09/28 | [
"https://Stackoverflow.com/questions/64110294",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11141001/"
] | try==>
```
listAutoAdapter = new ArrayAdapter<String>( getApplicationContext(), R.layout.item_auto_search, autoBookNames );
atv_Search.setAdapter( listAutoAdapter );
atv_Search.addTextChangedListener( new TextWatcher() {
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
l... | **Move**
```
listAutoAdapter = new ArrayAdapter<String>( getApplicationContext(), R.layout.item_auto_search, autoBookNames );
atv_Search.setThreshold( 1 );
atv_Search.setAdapter( listAutoAdapter );
```
into onTextchanged and try once, Ben! |
4,316,893 | I have recently renamed the root folder of a development Drupal site from:
www.example.com/foo/
to
www.example.com/bar/
The site stayed on the same host. During this transition, I made sure to include the .htaccess file. I also updated $base\_url in sites/default/settings.php to the new filesystem path. As a resu... | 2010/11/30 | [
"https://Stackoverflow.com/questions/4316893",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/334855/"
] | Props to Shoaib Nawaz for suggesting that I look at my .htaccess file again. My RewriteBase variable within my .htaccess file was still referencing the old location.
Old configuration:
>
> # RewriteBase /foo
>
>
>
New configuration:
>
> RewriteBase /bar
>
>
>
Note that if 'foo' was a default directory nam... | Try clearing your cache. You may have to do it manually in the database. Here's a page that gives a few options: <http://drupal.org/node/42055>. Here's another way of doing it: <http://drupal.org/node/152983#d6>. |
4,316,893 | I have recently renamed the root folder of a development Drupal site from:
www.example.com/foo/
to
www.example.com/bar/
The site stayed on the same host. During this transition, I made sure to include the .htaccess file. I also updated $base\_url in sites/default/settings.php to the new filesystem path. As a resu... | 2010/11/30 | [
"https://Stackoverflow.com/questions/4316893",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/334855/"
] | I just looked around and found the error in my configuration.
There was a joomla Page before, and I wanted to replace it with my (local) new version (drupal) of the page.
I renamed the old directory and copied all files to the same directory again, so my vhost will work with the new drupal page.
Looking for hours, I... | Try clearing your cache. You may have to do it manually in the database. Here's a page that gives a few options: <http://drupal.org/node/42055>. Here's another way of doing it: <http://drupal.org/node/152983#d6>. |
4,316,893 | I have recently renamed the root folder of a development Drupal site from:
www.example.com/foo/
to
www.example.com/bar/
The site stayed on the same host. During this transition, I made sure to include the .htaccess file. I also updated $base\_url in sites/default/settings.php to the new filesystem path. As a resu... | 2010/11/30 | [
"https://Stackoverflow.com/questions/4316893",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/334855/"
] | Props to Shoaib Nawaz for suggesting that I look at my .htaccess file again. My RewriteBase variable within my .htaccess file was still referencing the old location.
Old configuration:
>
> # RewriteBase /foo
>
>
>
New configuration:
>
> RewriteBase /bar
>
>
>
Note that if 'foo' was a default directory nam... | Which OS and database are you using? Do you have access to the shell and a management interface for your database?
It sounds as through you have hardcoded /foo/ to various resources, and you'll have to search through your database and source files to find these settings.
I did a quick search on Google for "moving an ... |
4,316,893 | I have recently renamed the root folder of a development Drupal site from:
www.example.com/foo/
to
www.example.com/bar/
The site stayed on the same host. During this transition, I made sure to include the .htaccess file. I also updated $base\_url in sites/default/settings.php to the new filesystem path. As a resu... | 2010/11/30 | [
"https://Stackoverflow.com/questions/4316893",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/334855/"
] | Props to Shoaib Nawaz for suggesting that I look at my .htaccess file again. My RewriteBase variable within my .htaccess file was still referencing the old location.
Old configuration:
>
> # RewriteBase /foo
>
>
>
New configuration:
>
> RewriteBase /bar
>
>
>
Note that if 'foo' was a default directory nam... | I just looked around and found the error in my configuration.
There was a joomla Page before, and I wanted to replace it with my (local) new version (drupal) of the page.
I renamed the old directory and copied all files to the same directory again, so my vhost will work with the new drupal page.
Looking for hours, I... |
4,316,893 | I have recently renamed the root folder of a development Drupal site from:
www.example.com/foo/
to
www.example.com/bar/
The site stayed on the same host. During this transition, I made sure to include the .htaccess file. I also updated $base\_url in sites/default/settings.php to the new filesystem path. As a resu... | 2010/11/30 | [
"https://Stackoverflow.com/questions/4316893",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/334855/"
] | Props to Shoaib Nawaz for suggesting that I look at my .htaccess file again. My RewriteBase variable within my .htaccess file was still referencing the old location.
Old configuration:
>
> # RewriteBase /foo
>
>
>
New configuration:
>
> RewriteBase /bar
>
>
>
Note that if 'foo' was a default directory nam... | I just had the same problem. In addition to Max`s answer, Check the httpd.conf file in the apache settings directory if rewrite module is enabled or enable it from Cpanel.
Drupal site worked but when I tried to access Drupal's back-office, I couldn't, so, in order to solve thethis issue, I`ve also enabled in the produ... |
4,316,893 | I have recently renamed the root folder of a development Drupal site from:
www.example.com/foo/
to
www.example.com/bar/
The site stayed on the same host. During this transition, I made sure to include the .htaccess file. I also updated $base\_url in sites/default/settings.php to the new filesystem path. As a resu... | 2010/11/30 | [
"https://Stackoverflow.com/questions/4316893",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/334855/"
] | I just looked around and found the error in my configuration.
There was a joomla Page before, and I wanted to replace it with my (local) new version (drupal) of the page.
I renamed the old directory and copied all files to the same directory again, so my vhost will work with the new drupal page.
Looking for hours, I... | Which OS and database are you using? Do you have access to the shell and a management interface for your database?
It sounds as through you have hardcoded /foo/ to various resources, and you'll have to search through your database and source files to find these settings.
I did a quick search on Google for "moving an ... |
4,316,893 | I have recently renamed the root folder of a development Drupal site from:
www.example.com/foo/
to
www.example.com/bar/
The site stayed on the same host. During this transition, I made sure to include the .htaccess file. I also updated $base\_url in sites/default/settings.php to the new filesystem path. As a resu... | 2010/11/30 | [
"https://Stackoverflow.com/questions/4316893",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/334855/"
] | I just looked around and found the error in my configuration.
There was a joomla Page before, and I wanted to replace it with my (local) new version (drupal) of the page.
I renamed the old directory and copied all files to the same directory again, so my vhost will work with the new drupal page.
Looking for hours, I... | I just had the same problem. In addition to Max`s answer, Check the httpd.conf file in the apache settings directory if rewrite module is enabled or enable it from Cpanel.
Drupal site worked but when I tried to access Drupal's back-office, I couldn't, so, in order to solve thethis issue, I`ve also enabled in the produ... |
50,267,986 | For the below code snippet:
```
public class ThreadExample extends Thread {
static List<Integer> myList = new CopyOnWriteArrayList<Integer>();
public static void main(String[] args) throws InterruptedException {
myList.add(11);
myList.add(22);
myList.add(33);
myList.add(44);
... | 2018/05/10 | [
"https://Stackoverflow.com/questions/50267986",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6614056/"
] | A `CopyOnWriteArrayList` gives you thread-safe iterators, in that you can iterate the list while it is being concurrently modified, without throwing a `ConcurrentModificationException`.
*Logically* (not actually, because this is inefficient and not thread-safe), iterating a `CopyOnWriteArrayList` is like this:
```
Li... | That's because in your `for (Integer it : myList)` you're creating an `Iterator` over the `CopyOnWriteArrayList<Integer>` and from the Java doc:
>
> The "snapshot" style iterator method uses a reference to the state of
> the array at the point that the iterator was created. This array never
> changes during the lif... |
1,564,228 | Is it possible to draw more then one Hasse diagram for one/same poset ?
$ R = \{(1,1); (2,2); (3,3); (4,4); (1,3); (1,4); (2,4); (3,4)\} $
There is no the smallest element, the greatest element is 4.
Minimal elements are 1, 2.
Maximal element is 4.
I drew two Hasse diagrams for this relation.
```
... | 2015/12/07 | [
"https://math.stackexchange.com/questions/1564228",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/284901/"
] | The relation $R$, as it's defined, is a partial order on the set $A=\{1,2,3,4\}$. And the diagram seems to be like:
[](https://i.stack.imgur.com/EDfrm.png)
So what you got from it is right. Indeed, $1$ and $2$ are not comparable with respect to $R$ ... | Now, It should be like this:
```
4
/ \
/ \
3 \
/ \
/ \
1 2
``` |
23,915,134 | I'm generating a Perl code from Java code and try to simulate the `try` `catch` mechanism.
I cannot use external libraries. I found two possible methods to simulate this behavior:
First one:
```
eval {
...
};
if ($@) {
errorHandler($@);
}
```
Second:
```
unless(.....){
// handle the error
}
```
My ... | 2014/05/28 | [
"https://Stackoverflow.com/questions/23915134",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1034637/"
] | your second snippet doesn't catch exceptions at all, so it's not an option. Your options in core[1] are:
1. ```
my $rv;
if (!eval { $rv = f(); 1 } ) {
warn($@);
}
```
2. ```
my $rv = eval { f() };
if ($@) {
warn($@);
}
```
Downside: Before 5.14, an exception can go unnoticed if an object destructor cl... | Eval is the typical approach that we use at work, but [`Try::Tiny`](https://metacpan.org/pod/Try%3a%3aTiny) is a fairly small module and is simple to use. However, since you don't want to use any external modules.
`unless` isn't really a viable option because it won't capture pieces of code that `die` or `croak`. So y... |
326,448 | This object is found in Barilzar’s Tower in the Morrowind expansion to Elder Scrolls Online. Barilzar is a highly intelligent Dunmer wizard.
From the looks of it, it appears to be a fantasy equivalent to a cribbage board. I liken it to the “space chess” they had Spock playing on old Star Trek episodes.
I have not fou... | 2018/02/09 | [
"https://gaming.stackexchange.com/questions/326448",
"https://gaming.stackexchange.com",
"https://gaming.stackexchange.com/users/184836/"
] | This is the game [Foxes and Felines](https://eso.mmo-fashion.com/hlaalu-gaming-table-foxes-felines/). You can create it yourself if you purchase the blueprint `Blueprint: Hlaalu Gaming Table, “Foxes & Felines”` from Rolis Hlaalu, Mastercraft Mediator.
Unfortunately there are no known rules to this game. | As mentioned by Paul, the game's in-character/in-lore name is **Foxes and Felines** and for me it bears a striking resemblance to the real-world game [**Hounds and Jackals**](https://en.wikipedia.org/wiki/Hounds_and_Jackals), although it's important to note that this might not be the original name and most information ... |
69,178,055 | Does anyone know if there is a way in Wordpress's core functions to retrieve posts but not the full `WP_Post` object ? For example let's say only the post title and permalink ?
The full post object is very big and the standard queries quickly become slow as your site grows.
There is a return argument in the standard ... | 2021/09/14 | [
"https://Stackoverflow.com/questions/69178055",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8654928/"
] | You can use the **get\_results()** function. You can use simple SQL statements like SELECT x,y,z,... to get only the columns you need from a table of your choice.
Simple example:
```
function get_players() {
global $wpdb;
return $wpdb->get_results("SELECT a.id, a_name ROM player a");
```
} | The docs say that only 3 options are supported, and none of them allow an ad-hoc selection of fields. To do something more custom, you'd probably need to use the [wpdb class](https://developer.wordpress.org/reference/classes/wpdb/) |
69,178,055 | Does anyone know if there is a way in Wordpress's core functions to retrieve posts but not the full `WP_Post` object ? For example let's say only the post title and permalink ?
The full post object is very big and the standard queries quickly become slow as your site grows.
There is a return argument in the standard ... | 2021/09/14 | [
"https://Stackoverflow.com/questions/69178055",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8654928/"
] | The most appropriate solution I found to avoid big requests is to use the [WPGraphQL](https://wordpress.org/plugins/wp-graphql/) plugin.
It allows you to make GraphQL API calls on your Wordpress database, and directly specify in your request what you want in return. The server appears to be way less overloaded.
In my ... | The docs say that only 3 options are supported, and none of them allow an ad-hoc selection of fields. To do something more custom, you'd probably need to use the [wpdb class](https://developer.wordpress.org/reference/classes/wpdb/) |
498,469 | Is there any built in support in jQuery for basic assertion checking, primarily of things like 'expected number of returned elements'.
For instance I may have a simple statement like this :
```
$("#btnSignup").click(function() {
return validateForm();
);
```
Now theres plenty of reasons why `$("#btnSignup")`... | 2009/01/31 | [
"https://Stackoverflow.com/questions/498469",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16940/"
] | It doesn't look like there is anything built-in. But writing an extension isn't too hard:
```
$.fn.assertSize = function(size) {
if (this.length != size) {
alert("Expected " + size + " elements, but got " + this.length + ".");
// or whatever, maybe use console.log to be more unobtrusive
}
return this;
... | You probably want <http://docs.jquery.com/Traversing/eq#index>:
>
> Reduce the set of matched elements to a single element.
>
>
>
If your selector returns no objects then jQuery simply won't run the chained code as it has no elements to run them on |
498,469 | Is there any built in support in jQuery for basic assertion checking, primarily of things like 'expected number of returned elements'.
For instance I may have a simple statement like this :
```
$("#btnSignup").click(function() {
return validateForm();
);
```
Now theres plenty of reasons why `$("#btnSignup")`... | 2009/01/31 | [
"https://Stackoverflow.com/questions/498469",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16940/"
] | It doesn't look like there is anything built-in. But writing an extension isn't too hard:
```
$.fn.assertSize = function(size) {
if (this.length != size) {
alert("Expected " + size + " elements, but got " + this.length + ".");
// or whatever, maybe use console.log to be more unobtrusive
}
return this;
... | Enhancements to Tomalak’s answer: throw the error to halt execution, include the offending selector and add the `assertSingle` variant.
```
$.fn.assertSize = function(size) {
if (this.length != size) {
throw "Expected " + size + " elements, but selector '" + this.selector + "' found " + this.length + ".";... |
498,469 | Is there any built in support in jQuery for basic assertion checking, primarily of things like 'expected number of returned elements'.
For instance I may have a simple statement like this :
```
$("#btnSignup").click(function() {
return validateForm();
);
```
Now theres plenty of reasons why `$("#btnSignup")`... | 2009/01/31 | [
"https://Stackoverflow.com/questions/498469",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16940/"
] | It doesn't look like there is anything built-in. But writing an extension isn't too hard:
```
$.fn.assertSize = function(size) {
if (this.length != size) {
alert("Expected " + size + " elements, but got " + this.length + ".");
// or whatever, maybe use console.log to be more unobtrusive
}
return this;
... | I created a plugin for that: [jquery-assert](https://github.com/timbuethe/jquery-assert). You could use it like this:
Make sure, one or more elements were found, before calling the next function:
```
$('#element01').assertFound().val('x')
```
Assert that 1 element was selected:
```
$('#element01').assertOne(); // ... |
498,469 | Is there any built in support in jQuery for basic assertion checking, primarily of things like 'expected number of returned elements'.
For instance I may have a simple statement like this :
```
$("#btnSignup").click(function() {
return validateForm();
);
```
Now theres plenty of reasons why `$("#btnSignup")`... | 2009/01/31 | [
"https://Stackoverflow.com/questions/498469",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16940/"
] | Enhancements to Tomalak’s answer: throw the error to halt execution, include the offending selector and add the `assertSingle` variant.
```
$.fn.assertSize = function(size) {
if (this.length != size) {
throw "Expected " + size + " elements, but selector '" + this.selector + "' found " + this.length + ".";... | You probably want <http://docs.jquery.com/Traversing/eq#index>:
>
> Reduce the set of matched elements to a single element.
>
>
>
If your selector returns no objects then jQuery simply won't run the chained code as it has no elements to run them on |
498,469 | Is there any built in support in jQuery for basic assertion checking, primarily of things like 'expected number of returned elements'.
For instance I may have a simple statement like this :
```
$("#btnSignup").click(function() {
return validateForm();
);
```
Now theres plenty of reasons why `$("#btnSignup")`... | 2009/01/31 | [
"https://Stackoverflow.com/questions/498469",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16940/"
] | I created a plugin for that: [jquery-assert](https://github.com/timbuethe/jquery-assert). You could use it like this:
Make sure, one or more elements were found, before calling the next function:
```
$('#element01').assertFound().val('x')
```
Assert that 1 element was selected:
```
$('#element01').assertOne(); // ... | You probably want <http://docs.jquery.com/Traversing/eq#index>:
>
> Reduce the set of matched elements to a single element.
>
>
>
If your selector returns no objects then jQuery simply won't run the chained code as it has no elements to run them on |
498,469 | Is there any built in support in jQuery for basic assertion checking, primarily of things like 'expected number of returned elements'.
For instance I may have a simple statement like this :
```
$("#btnSignup").click(function() {
return validateForm();
);
```
Now theres plenty of reasons why `$("#btnSignup")`... | 2009/01/31 | [
"https://Stackoverflow.com/questions/498469",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16940/"
] | Enhancements to Tomalak’s answer: throw the error to halt execution, include the offending selector and add the `assertSingle` variant.
```
$.fn.assertSize = function(size) {
if (this.length != size) {
throw "Expected " + size + " elements, but selector '" + this.selector + "' found " + this.length + ".";... | I created a plugin for that: [jquery-assert](https://github.com/timbuethe/jquery-assert). You could use it like this:
Make sure, one or more elements were found, before calling the next function:
```
$('#element01').assertFound().val('x')
```
Assert that 1 element was selected:
```
$('#element01').assertOne(); // ... |
58,045,750 | ```
import pandas as pd
my_df = pd.DataFrame(columns=['b_code', 'c_code', 'name'], data = [[3401560221954, 6275442, 'name 1'], [987510, 987510, 'name 2'], [4473089, '', 'name 3'], ['', 9584362, 'name 4']])
```
The above dataframe is a sample set. My dataframe has 70 columns.
What I would like to do is to transform ... | 2019/09/22 | [
"https://Stackoverflow.com/questions/58045750",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3669801/"
] | Your code is perfect except for 2 things :)
1. You need to wrap this within a `onEdit(e)` function as that way, **e** gets defined (i'm assuming you're already doing that but your current code doesn't reflect that)
2. In the case of a checkbox, TRUE is not a string but a boolean value (need to be in lowercase) i.e. it... | Remove the quotes on the TRUE value |
3,578,637 | Let $A$ be an $m \times n$ matrix with $Rank(A)=m$ and let $B$ be an $n \times k$ matrix with $Rank(B)=k$. Assume $k \leq m$. Under what conditions is $Rank(AB)<k$ and under what conditions is $Rank(AB) = k$?
I originally thought it had to do with $AB\_i \neq 0$ but the solutions show that this is not correct.
**edit... | 2020/03/12 | [
"https://math.stackexchange.com/questions/3578637",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/103828/"
] | Try $m=k=2,\; n=3$:
$$A = \pmatrix{1 & 1 & 0\cr 1 & 1 & 1\cr},\
B = \pmatrix{1 & 0\cr 0 & 1\cr 0 & 0\cr},\
AB = \pmatrix{1 & 1\cr 1 & 1\cr} $$
$A$ and $B$ have rank $2$, and all $A B\_i = \pmatrix{1\cr 1\cr} \ne 0$, but $AB$ has rank $1$. | Here's an example:
$$\left[\begin{array}{ccc} 1&0&0\\ 0&1&0\end{array}\right]
\left[\begin{array}{c} 0 \\ 0 \\1\end{array}\right]=
\left[\begin{array}{c} 0 \\ 0 \end{array}\right]$$ |
89,826 | i'm building an embedded prototyp with a raspberry pi 3b+ and its booting via pxe from the network read only.
Multiple devices share the same root file system and just the boot folders are customized for every pi.
I want to configure all hostnames of the pis with the help of the cmdline.txt.
```
dwc_otg.lpm_enable=0... | 2018/10/10 | [
"https://raspberrypi.stackexchange.com/questions/89826",
"https://raspberrypi.stackexchange.com",
"https://raspberrypi.stackexchange.com/users/92692/"
] | You still can use the Raspberry Pi Zero by using an USB to Ethernet adaptor. If you need the USB port for other purposes. You can use the pretty cheap [ENC28J60](https://www.aliexpress.com/item/5pcs-lot-ENC28J60-SPI-interface-network-module-Ethernet-module-mini-version/32301387669.html) SPI to ethernet adaptor. The Ras... | If you really wanna have a small footprint with the least cost, invest any inexpensive OTG Male USB2 to Male Micro USB2 adapter ([[1]](https://www.aliexpress.com/item/High-Quality-USB-2-0-A-male-To-Mini-USB-B-5-Pin-Male-Plug/32849962161.html), [[2]](https://www.aliexpress.com/item/A-5-MINI-USB-2-0-OTG-Micro-SD-SDXC-TF-... |
89,826 | i'm building an embedded prototyp with a raspberry pi 3b+ and its booting via pxe from the network read only.
Multiple devices share the same root file system and just the boot folders are customized for every pi.
I want to configure all hostnames of the pis with the help of the cmdline.txt.
```
dwc_otg.lpm_enable=0... | 2018/10/10 | [
"https://raspberrypi.stackexchange.com/questions/89826",
"https://raspberrypi.stackexchange.com",
"https://raspberrypi.stackexchange.com/users/92692/"
] | You still can use the Raspberry Pi Zero by using an USB to Ethernet adaptor. If you need the USB port for other purposes. You can use the pretty cheap [ENC28J60](https://www.aliexpress.com/item/5pcs-lot-ENC28J60-SPI-interface-network-module-Ethernet-module-mini-version/32301387669.html) SPI to ethernet adaptor. The Ras... | As of Oct. 2018 all available variations of the models of the Raspberry Pi (Model A 1, 1+; Model B 1, 1+, 2, 3, 3+; Zero; Zero W) come with GPU and HDMI video output as well as HDMI connectors soldered to the boards. The only Raspberry boards that do not have any HDMI connectors attached are the Compute Modules (1, 3, ... |
4,820,234 | This page:
<http://www.ipjnet.talktalk.net/code/photos.html>
works in Opera11,Chrome, Firefox3 & IE8 locally.
The same page hosted only loads correctly in IE8 & Chrome
I'm new to galleria and jquery so please be gentle with me as I think I must be missing something very obvious.
Thank You very much | 2011/01/27 | [
"https://Stackoverflow.com/questions/4820234",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/592679/"
] | The slashes in your script files are the wrong ones...
```
<script src="galleria\src\jquery-1.4.4.js"></script>
<script src="galleria\src\galleria.js"></script>
```
should be:
```
<script src="galleria/src/jquery-1.4.4.js"></script>
<script src="galleria/src/galleria.js"></script>
```
IE on the "local" machine, (... | ```
<script src="galleria\src\jquery-1.4.4.js"></script>
<script src="galleria\src\galleria.js"></script>
```
should be (forward slash, not back slash)
```
<script src="galleria/src/jquery-1.4.4.js"></script>
<script src="galleria/src/galleria.js"></script>
```
surprising it works in chrome... |
4,820,234 | This page:
<http://www.ipjnet.talktalk.net/code/photos.html>
works in Opera11,Chrome, Firefox3 & IE8 locally.
The same page hosted only loads correctly in IE8 & Chrome
I'm new to galleria and jquery so please be gentle with me as I think I must be missing something very obvious.
Thank You very much | 2011/01/27 | [
"https://Stackoverflow.com/questions/4820234",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/592679/"
] | The slashes in your script files are the wrong ones...
```
<script src="galleria\src\jquery-1.4.4.js"></script>
<script src="galleria\src\galleria.js"></script>
```
should be:
```
<script src="galleria/src/jquery-1.4.4.js"></script>
<script src="galleria/src/galleria.js"></script>
```
IE on the "local" machine, (... | The javascript is not being sourced.
I'm guessing firefox doesn't like the backslashes, try forward slashes.
```
<script src="galleria/src/jquery-1.4.4.js"></script>
<script src="galleria/src/galleria.js"></script>
``` |
121,258 | Some recipes, particularly for salad dressings, have a step where you are expected to heat a minuscule amount (e.g. 2 Tbsps) of a vegetable oil and cook paprika in it for a brief period of time (e.g. 30 seconds).
It seems extremely impractical: trying to to get 2 Tbsps of oil out of a pan will leave half of that amoun... | 2022/08/05 | [
"https://cooking.stackexchange.com/questions/121258",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/20334/"
] | First of all, yes. If you think of it ahead of time, infusing oil with paprika at room temperature will work fine as long as you can do it overnight. While heat can in general be important to rupture cell walls and such to support dissolving, paprika is already pretty finely ground so it’s largely a matter of dissoluti... | If you have access to an isi whipper, you might try a rapid infusion, which would not require heat. [This recipe uses whole peppers](https://www.isi.com/en/culinary/recipes/detail/chilli-oil/), but you could probably experiment with ground paprika. You would also be left with quite a bit of infused oil.
Alternately, t... |
121,258 | Some recipes, particularly for salad dressings, have a step where you are expected to heat a minuscule amount (e.g. 2 Tbsps) of a vegetable oil and cook paprika in it for a brief period of time (e.g. 30 seconds).
It seems extremely impractical: trying to to get 2 Tbsps of oil out of a pan will leave half of that amoun... | 2022/08/05 | [
"https://cooking.stackexchange.com/questions/121258",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/20334/"
] | First of all, yes. If you think of it ahead of time, infusing oil with paprika at room temperature will work fine as long as you can do it overnight. While heat can in general be important to rupture cell walls and such to support dissolving, paprika is already pretty finely ground so it’s largely a matter of dissoluti... | My only reservation with this method is the possibility of illness if the paprika has been subjected to Salmonella contamination, something that seems to be on the increase with "Raw" herbs and spices.
If the dressing is to be served to vulnerable individuals, I would toast the paprika first of all in a dry, heavy bas... |
121,258 | Some recipes, particularly for salad dressings, have a step where you are expected to heat a minuscule amount (e.g. 2 Tbsps) of a vegetable oil and cook paprika in it for a brief period of time (e.g. 30 seconds).
It seems extremely impractical: trying to to get 2 Tbsps of oil out of a pan will leave half of that amoun... | 2022/08/05 | [
"https://cooking.stackexchange.com/questions/121258",
"https://cooking.stackexchange.com",
"https://cooking.stackexchange.com/users/20334/"
] | If you have access to an isi whipper, you might try a rapid infusion, which would not require heat. [This recipe uses whole peppers](https://www.isi.com/en/culinary/recipes/detail/chilli-oil/), but you could probably experiment with ground paprika. You would also be left with quite a bit of infused oil.
Alternately, t... | My only reservation with this method is the possibility of illness if the paprika has been subjected to Salmonella contamination, something that seems to be on the increase with "Raw" herbs and spices.
If the dressing is to be served to vulnerable individuals, I would toast the paprika first of all in a dry, heavy bas... |
17,536,388 | Im trying to create my own working template with php functions set for all mysqli commands
now here is my **config.php**
```
<?php
/** Configuration Variables **/
define ('DEVELOPMENT_ENVIRONMENT',true);
if (DEVELOPMENT_ENVIRONMENT == true) {
define('DB_NAME', 'rdb');
define('DB_USER', 'root');
define('DB_PASSWORD... | 2013/07/08 | [
"https://Stackoverflow.com/questions/17536388",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2491369/"
] | The problem is [variable scope](http://php.net/manual/en/language.variables.scope.php). The `disconnect()` function has no reference to `$connect`.
I wouldn't recommend doing it this way. And while I also don't recommend a wrapper class, it is better than such functions. Instead consider a [class, singleton, or global... | change your disconnect() function to be like this :
```
function disconnect()
{
mysqli_close();
}
```
or
```
function disconnect()
{
mysqli_close($connect);
}
```
if you define a function into a variable, the function won't be executed. may it help :D |
17,536,388 | Im trying to create my own working template with php functions set for all mysqli commands
now here is my **config.php**
```
<?php
/** Configuration Variables **/
define ('DEVELOPMENT_ENVIRONMENT',true);
if (DEVELOPMENT_ENVIRONMENT == true) {
define('DB_NAME', 'rdb');
define('DB_USER', 'root');
define('DB_PASSWORD... | 2013/07/08 | [
"https://Stackoverflow.com/questions/17536388",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2491369/"
] | The problem is [variable scope](http://php.net/manual/en/language.variables.scope.php). The `disconnect()` function has no reference to `$connect`.
I wouldn't recommend doing it this way. And while I also don't recommend a wrapper class, it is better than such functions. Instead consider a [class, singleton, or global... | This is my current solution however final will be in mysqli
config.php
```
<?php
/** Configuration Variables **/
define ('DEVELOPMENT_ENVIRONMENT',true);
class Dbconfig {
protected $host;
protected $username;
protected $password;
protected $database;
function Dbconfig(){
if (DEVELOPMENT_ENVIRONMENT == true) {
$t... |
17,536,388 | Im trying to create my own working template with php functions set for all mysqli commands
now here is my **config.php**
```
<?php
/** Configuration Variables **/
define ('DEVELOPMENT_ENVIRONMENT',true);
if (DEVELOPMENT_ENVIRONMENT == true) {
define('DB_NAME', 'rdb');
define('DB_USER', 'root');
define('DB_PASSWORD... | 2013/07/08 | [
"https://Stackoverflow.com/questions/17536388",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2491369/"
] | change your disconnect() function to be like this :
```
function disconnect()
{
mysqli_close();
}
```
or
```
function disconnect()
{
mysqli_close($connect);
}
```
if you define a function into a variable, the function won't be executed. may it help :D | This is my current solution however final will be in mysqli
config.php
```
<?php
/** Configuration Variables **/
define ('DEVELOPMENT_ENVIRONMENT',true);
class Dbconfig {
protected $host;
protected $username;
protected $password;
protected $database;
function Dbconfig(){
if (DEVELOPMENT_ENVIRONMENT == true) {
$t... |
59,252,213 | Using substitution, I want to replace
```
ones(var1.size,var2.size)
```
with
```
np.ones([var1.size,var2.size])
```
I tried using
```
%s/ones(\(\w\+\),\(\w\+\))/np.ones([\1,\2])/gc
```
based on other posts on Stack Overflow, however, Vim is unable to locate all occurrences of the search phrase.
It was able to... | 2019/12/09 | [
"https://Stackoverflow.com/questions/59252213",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8225166/"
] | You're making it too hard. Here's how I figure out what Vim's going to do, and break it down into simpler steps:
```
/ones(\(.\+\))
```
will select the contents inside the parenthesis, then press `Return` so Vim remembers the pattern.
```
:%s//np.ones([\1])/
```
takes the remembered pattern and replaces it. Adjus... | `\w\+` isn't going to match `xi.size` because the latter is two words with a non-word (`.`) in between. You could use `[^,]\+` instead for this narrow case. |
59,252,213 | Using substitution, I want to replace
```
ones(var1.size,var2.size)
```
with
```
np.ones([var1.size,var2.size])
```
I tried using
```
%s/ones(\(\w\+\),\(\w\+\))/np.ones([\1,\2])/gc
```
based on other posts on Stack Overflow, however, Vim is unable to locate all occurrences of the search phrase.
It was able to... | 2019/12/09 | [
"https://Stackoverflow.com/questions/59252213",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8225166/"
] | `\w\+` isn't going to match `xi.size` because the latter is two words with a non-word (`.`) in between. You could use `[^,]\+` instead for this narrow case. | I am using two functions for this:
```
:nnoremap <Leader>r :%s/\<<C-r><C-w>\>//g<Left><Left>
```
Which lets me press `leader+r` to initiate a search and replace the word under cursor.
And
```
:noremap <C-r> "hy:%s/<C-r>h//gc<left><left><left>
```
Which lets me press `ctrl+r` to initate search and replace on the ... |
59,252,213 | Using substitution, I want to replace
```
ones(var1.size,var2.size)
```
with
```
np.ones([var1.size,var2.size])
```
I tried using
```
%s/ones(\(\w\+\),\(\w\+\))/np.ones([\1,\2])/gc
```
based on other posts on Stack Overflow, however, Vim is unable to locate all occurrences of the search phrase.
It was able to... | 2019/12/09 | [
"https://Stackoverflow.com/questions/59252213",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8225166/"
] | You're making it too hard. Here's how I figure out what Vim's going to do, and break it down into simpler steps:
```
/ones(\(.\+\))
```
will select the contents inside the parenthesis, then press `Return` so Vim remembers the pattern.
```
:%s//np.ones([\1])/
```
takes the remembered pattern and replaces it. Adjus... | I am using two functions for this:
```
:nnoremap <Leader>r :%s/\<<C-r><C-w>\>//g<Left><Left>
```
Which lets me press `leader+r` to initiate a search and replace the word under cursor.
And
```
:noremap <C-r> "hy:%s/<C-r>h//gc<left><left><left>
```
Which lets me press `ctrl+r` to initate search and replace on the ... |
3,962,041 | Below are the steps I have done so far.
Find $a$ in terms of $c$
$$
ab = 432 \\
bc = 96 \\
\frac{ab}{bc} = \frac ac = \frac 92 \implies a = 4.5c.
$$
Find $b$ in terms of $c$
$$
ab = 432 \\
\implies 4.5c \cdot b = 432 \\
\implies b = \frac{96}c.
$$
Substituting, we get
$$
a + b + c = 4.5c + \frac{96}c + c = 5.5c ... | 2020/12/26 | [
"https://math.stackexchange.com/questions/3962041",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/716584/"
] | $bc=96$ and $c<9$ constrains $c$ to be one of $1,2,3,4,6,8$. Since $\gcd(432,96)=48$, $c$ cannot be $1$ or $3$, leaving four cases: $(a,b,c)=(9,48,2),(18,24,4),(27,16,6),(36,12,8)$. Of these, $(18,24,4)$ achieves the smallest $a+b+c$ of $46$. | The factors of $96$ that are less than $9$ are $\{1,2,3,4,6,8\}$
Plug these values of $c$ into your equation above to find the set of $a+b+c$ |
3,962,041 | Below are the steps I have done so far.
Find $a$ in terms of $c$
$$
ab = 432 \\
bc = 96 \\
\frac{ab}{bc} = \frac ac = \frac 92 \implies a = 4.5c.
$$
Find $b$ in terms of $c$
$$
ab = 432 \\
\implies 4.5c \cdot b = 432 \\
\implies b = \frac{96}c.
$$
Substituting, we get
$$
a + b + c = 4.5c + \frac{96}c + c = 5.5c ... | 2020/12/26 | [
"https://math.stackexchange.com/questions/3962041",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/716584/"
] | The constraint on $c$ mentioned in the other answers can be sharpened by noting that $a =4.5c$ is only an integer when $c$ is even, so you only have to consider $c \in \{2,4,6,8\}$. Unfortunately $b= \frac{96}c$ does not permit further constraint, so you have to test those four values.
If you're permitted calculus, yo... | The factors of $96$ that are less than $9$ are $\{1,2,3,4,6,8\}$
Plug these values of $c$ into your equation above to find the set of $a+b+c$ |
2,686,718 | Google App Engine says "Must authenticate first." while trying to deploy any app:
```
me@myhost /opt/google_appengine $ python appcfg.py update ~/sda2/workspace/lyapapam/
Application: lyapapam; version: 1.
Server: appengine.google.com.
Scanning files on local disk.
Scanned 500 files.
Scanned 1000 files.
Initiating up... | 2010/04/21 | [
"https://Stackoverflow.com/questions/2686718",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66473/"
] | it is very likely that, say you have account(s) that are in good standing, that the clock on your system is set incorrectly. this causes such authentication failures that you got.
here's a related post from last summer outlining this exact problem (and solution):
<http://groups.google.com/group/google-appengine-python... | It should prompt for your user and password. Are you running this from a script?
If so, you can use the option: `--passin`
>
> *If given, the tool accepts the Google account password in stdin instead of prompting for it interactively. This allows you to invoke the tool from a script without putting your password o... |
2,686,718 | Google App Engine says "Must authenticate first." while trying to deploy any app:
```
me@myhost /opt/google_appengine $ python appcfg.py update ~/sda2/workspace/lyapapam/
Application: lyapapam; version: 1.
Server: appengine.google.com.
Scanning files on local disk.
Scanned 500 files.
Scanned 1000 files.
Initiating up... | 2010/04/21 | [
"https://Stackoverflow.com/questions/2686718",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66473/"
] | It should prompt for your user and password. Are you running this from a script?
If so, you can use the option: `--passin`
>
> *If given, the tool accepts the Google account password in stdin instead of prompting for it interactively. This allows you to invoke the tool from a script without putting your password o... | This is also the same error message displayed some times when your password has special characters in it, like a `$`. |
2,686,718 | Google App Engine says "Must authenticate first." while trying to deploy any app:
```
me@myhost /opt/google_appengine $ python appcfg.py update ~/sda2/workspace/lyapapam/
Application: lyapapam; version: 1.
Server: appengine.google.com.
Scanning files on local disk.
Scanned 500 files.
Scanned 1000 files.
Initiating up... | 2010/04/21 | [
"https://Stackoverflow.com/questions/2686718",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/66473/"
] | it is very likely that, say you have account(s) that are in good standing, that the clock on your system is set incorrectly. this causes such authentication failures that you got.
here's a related post from last summer outlining this exact problem (and solution):
<http://groups.google.com/group/google-appengine-python... | This is also the same error message displayed some times when your password has special characters in it, like a `$`. |
29,379,906 | I am running couchbase server 3.0.1, with NodeJS SDK. I have set up a server with two buckets, and no documents. I opened a connections via:
`var dbCluster = new couchbase.Cluster([my_host]);
var db = dbCluster.openBucket( [my_bucket_name]);`
When I try to execute 'db.upsert', I get the following error:
`Error: Cou... | 2015/03/31 | [
"https://Stackoverflow.com/questions/29379906",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1748620/"
] | I had the same issue with CouchBase on AWS. I solved it by opening the following ports to anyone:
22 tcp 0.0.0.0/0
4369 tcp 0.0.0.0/0
4984 tcp 0.0.0.0/0
8080 tcp 0.0.0.0/0
8088 tcp 0.0.0.0/0
8091 tcp 0.0.0.0/0
8092 tcp 0.0.0.0/0
11209 tcp 0.0.0.0/0
11210 tcp 0.0.0.0/0
11211 tcp 0.0.0.0/0
11214 tcp 0.0.0.0/0
11215 tcp ... | So turns out the problem was in the cluster connection. As per the documentation, I specified my connection as:
```
"couchbase://my.domain.com", where "my.domain.com" pointed to 127.0.0.7.
```
Removing "couchbase://" solved my issue. So connecting via:
```
"my.domain.com"
```
solved the problem. Interestingly eno... |
1,293,539 | I'm on Ubuntu 20.04 LTS, trying to install GNOME Shell Extensions, GNOME Tweaks (both of which I think installed 'successfully'?) and the browser extension to the Shell extensions website, to use on Firefox/Chromium.
I have the browser shortcut installed, but I always get this message:
>
> Although GNOME Shell integ... | 2020/11/19 | [
"https://askubuntu.com/questions/1293539",
"https://askubuntu.com",
"https://askubuntu.com/users/1149602/"
] | You can easily install the connector (`chrome-gnome-shell`) from your package manager or terminal:
```
sudo apt-get install chrome-gnome-shell
```
Reference: [Wiki](https://wiki.gnome.org/Projects/GnomeShellIntegrationForChrome/Installation) | [GNOME Shell browser integration Installation Guide](https://wiki.gnome.org/action/show/Projects/GnomeShellIntegration/Installation?action=show&redirect=Projects%2FGnomeShellIntegrationForChrome%2FInstallation) says that latest releases of the *chrome-gnome-shell* connector, 10.1-5 at the time I am writing this answer,... |
23,643 | I draw on [this question](https://mathoverflow.net/questions/23614/math-history-books) to ask something that has always been a pet peeve of mine. It is very easy to find books about the history of mathematics, much less so if one wants books about the recent (say > 1850) one.
Of course I know that this is difficult be... | 2010/05/05 | [
"https://mathoverflow.net/questions/23643",
"https://mathoverflow.net",
"https://mathoverflow.net/users/828/"
] | A very enjoyable read of modern topic is Weibel's [A History of Homological Algebra](http://www.math.rutgers.edu/~weibel/HA-history.dvi) (40 pages). | The degree to which you like this answer is very dependent on the degree to which you find physics even in its own right of interest to mathematicians, but Abraham Pais is a wonderful historian of (relatively) recent physics; I'm most familiar with his biography of Einstein (Subtle is the Lord) and his history of parti... |
23,643 | I draw on [this question](https://mathoverflow.net/questions/23614/math-history-books) to ask something that has always been a pet peeve of mine. It is very easy to find books about the history of mathematics, much less so if one wants books about the recent (say > 1850) one.
Of course I know that this is difficult be... | 2010/05/05 | [
"https://mathoverflow.net/questions/23643",
"https://mathoverflow.net",
"https://mathoverflow.net/users/828/"
] | Here are a few books on the history of recent mathematics that I recommend:
*A History of Algebraic and Differential Topology, 1900 - 1960* by Jean Dieudonne.
*History of Topology* by I.M. James.
*Reciprocity Laws: From Euler to Eisenstein* by Franz Lemmermeyer.
*The Shaping of Arithmetic after C.F. Gauss's Disqui... | *The Nature and Growth of Modern Mathematics* written in 1970 by Edna E. Kramer is a good book that touches on a wide selection of topics - very similar to Kolmogorov, Aleksandrov, and Lavrent'ev's *Mathematics: its Content, Methods, and Meaning*. |
23,643 | I draw on [this question](https://mathoverflow.net/questions/23614/math-history-books) to ask something that has always been a pet peeve of mine. It is very easy to find books about the history of mathematics, much less so if one wants books about the recent (say > 1850) one.
Of course I know that this is difficult be... | 2010/05/05 | [
"https://mathoverflow.net/questions/23643",
"https://mathoverflow.net",
"https://mathoverflow.net/users/828/"
] | Here are a few books on the history of recent mathematics that I recommend:
*A History of Algebraic and Differential Topology, 1900 - 1960* by Jean Dieudonne.
*History of Topology* by I.M. James.
*Reciprocity Laws: From Euler to Eisenstein* by Franz Lemmermeyer.
*The Shaping of Arithmetic after C.F. Gauss's Disqui... | For a well-written historical presentation of the mathematical physics underlying basic quantum mechanics
The Rise of the New Physics by A. D'Abro
A detailed, fascinating presentation on some aspects of the evolution of mathematical physics is the book
Masters of Theory: Cambridge and the Rise of Mathematical Physic... |
23,643 | I draw on [this question](https://mathoverflow.net/questions/23614/math-history-books) to ask something that has always been a pet peeve of mine. It is very easy to find books about the history of mathematics, much less so if one wants books about the recent (say > 1850) one.
Of course I know that this is difficult be... | 2010/05/05 | [
"https://mathoverflow.net/questions/23643",
"https://mathoverflow.net",
"https://mathoverflow.net/users/828/"
] | Bit of a different direction: autobiographies or tributes written by mathematicians that favor mathematical events over personal ones, at least to some degree. So:
Saunders Mac Lane
A Mathematical Autobiography
<http://www.akpeters.com/product.asp?ProdCode=1500>
Kadison's article on Kaplansky in:
<http://www.ams.... | Another book which covers some recent history in its last chapters is The Queen of Mathematics: A Historically Motivated Guide to Number Theory. Also look at
A History of Abstract Algebra by Israel Kleiner
Episodes in the History of Modern Algebra (1800-1950)
You do not have to restrict yourself to books, there als... |
23,643 | I draw on [this question](https://mathoverflow.net/questions/23614/math-history-books) to ask something that has always been a pet peeve of mine. It is very easy to find books about the history of mathematics, much less so if one wants books about the recent (say > 1850) one.
Of course I know that this is difficult be... | 2010/05/05 | [
"https://mathoverflow.net/questions/23643",
"https://mathoverflow.net",
"https://mathoverflow.net/users/828/"
] | Here are a few books on the history of recent mathematics that I recommend:
*A History of Algebraic and Differential Topology, 1900 - 1960* by Jean Dieudonne.
*History of Topology* by I.M. James.
*Reciprocity Laws: From Euler to Eisenstein* by Franz Lemmermeyer.
*The Shaping of Arithmetic after C.F. Gauss's Disqui... | I would recommend
"The Mathematician Sophus Lie: It was the Audacity of My Thinking"
by Arild Stubhaug and R. Daly
(original in Norwegian, there is also a German translation). |
23,643 | I draw on [this question](https://mathoverflow.net/questions/23614/math-history-books) to ask something that has always been a pet peeve of mine. It is very easy to find books about the history of mathematics, much less so if one wants books about the recent (say > 1850) one.
Of course I know that this is difficult be... | 2010/05/05 | [
"https://mathoverflow.net/questions/23643",
"https://mathoverflow.net",
"https://mathoverflow.net/users/828/"
] | I don't think that there is a shortage of books on "recent" history of mathematics - if anything, the growth has been exponential here as well! There are many recent books dealing with more specialized areas written by eminent scholars, e.g.
> Charles Curtis, Pioneers of representation theory: Frobenius, Burnside, Sc... | *The Nature and Growth of Modern Mathematics* written in 1970 by Edna E. Kramer is a good book that touches on a wide selection of topics - very similar to Kolmogorov, Aleksandrov, and Lavrent'ev's *Mathematics: its Content, Methods, and Meaning*. |
23,643 | I draw on [this question](https://mathoverflow.net/questions/23614/math-history-books) to ask something that has always been a pet peeve of mine. It is very easy to find books about the history of mathematics, much less so if one wants books about the recent (say > 1850) one.
Of course I know that this is difficult be... | 2010/05/05 | [
"https://mathoverflow.net/questions/23643",
"https://mathoverflow.net",
"https://mathoverflow.net/users/828/"
] | My favorite parts of Sylvia Nasar's *A Beautiful Mind* (the book, not the movie) were the parts which described the Princeton math department in the 40s and 50s. | For a well-written historical presentation of the mathematical physics underlying basic quantum mechanics
The Rise of the New Physics by A. D'Abro
A detailed, fascinating presentation on some aspects of the evolution of mathematical physics is the book
Masters of Theory: Cambridge and the Rise of Mathematical Physic... |
23,643 | I draw on [this question](https://mathoverflow.net/questions/23614/math-history-books) to ask something that has always been a pet peeve of mine. It is very easy to find books about the history of mathematics, much less so if one wants books about the recent (say > 1850) one.
Of course I know that this is difficult be... | 2010/05/05 | [
"https://mathoverflow.net/questions/23643",
"https://mathoverflow.net",
"https://mathoverflow.net/users/828/"
] | Here are a few books on the history of recent mathematics that I recommend:
*A History of Algebraic and Differential Topology, 1900 - 1960* by Jean Dieudonne.
*History of Topology* by I.M. James.
*Reciprocity Laws: From Euler to Eisenstein* by Franz Lemmermeyer.
*The Shaping of Arithmetic after C.F. Gauss's Disqui... | [*The Shape of Inner Space: String Theory and the Geometry of the Universe's Hidden Dimensions*](http://www.shapeofinnerspace.com/)
(2010)
by Shing-Tung Yau and science writer Steve Nadis.
It is an interesting mixture of autobiography, history of a slice of mathematics (largely surrounding
Calabi-Yau manifolds), and p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.