qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
14,823,876 | I've been playing with some code tonight and I coded a very simple algorithm that I think is a very good solution for a fibonacci recursive and for big numbers. I would like to know what you guys think about it and if you have any contribution for making it better, share with us... take a look at the code bellow
```
p... | 2013/02/12 | [
"https://Stackoverflow.com/questions/14823876",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/377336/"
] | The best way to compute the i-th Fibonacci is not by recursion. You can use these formulas:



phi is the golden... | Because F 9999999 has ~2089876 digits, you'll want to use an [approximation](http://en.wikipedia.org/wiki/Fibonacci_number). Also consider [memoization](https://stackoverflow.com/q/1799990/230513). |
5,482,062 | I have a script which takes in several arguments.
Now, I have modified the script to except multiple file names and operate on them.
I also want this script to execute when I am receiving input via a pipe (|) or a redirected input (<).
But, I do not want the script to wait for input on terminal when none of the a... | 2011/03/30 | [
"https://Stackoverflow.com/questions/5482062",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/478060/"
] | ```
if test -t 0; then
echo Ignoring terminal input.
else
process -
fi
```
The `-t` test takes a file descriptor as parameter (0 is stdin) and returns true if it is a terminal. | Please be aware that there are two different "test" commands: the built in bash command, and the "test" program which is often installed as /usr/bin/test, part of the coreutils package. The two provide the same functions.
```
[[ -t 0 ]]
```
is equivalent to
```
/usr/bin/test -t 0
```
You may run either of the ab... |
52,105,247 | I am trying to fit a function with multiple variables, my fit\_function returns two values, and I need to find best parameters that fit for both values.
Here is the sample code
```
import numpy as np
from scipy.optimize import curve_fit
# Fit function returns two values
def func(X, a, b, c):
x,y = X
val1 = n... | 2018/08/30 | [
"https://Stackoverflow.com/questions/52105247",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | As observed by others, your function needs to return something with the shape of the input data, so you would need to change the output shape of your error function. Since `scipy` does a least squares function, this is achieved by making your function return `np.sqrt(val1 ** 2 + val2 ** 2)`.
However, for this type of ... | scipy.optimize.curve\_fit is checking to see if you have at least as many data points as fitted parameters by comparing the length of func's parameter list (a,b,c) as 3 with the length of the dependent variable (z,v) as 2. Yes, both z and v have more than three data points, but the length of (z,v) is two. |
71,447,954 | My question can be pointed out regarding any programming language, but I wanna know regarding C++. I want to know where the intermediate value will store in C++? For example in the below code:
```
int func1(int);
int func2(int);
int func3(int);
int main(){
int a = 10;
int b = func1(func2(func3(a)));
cout<<... | 2022/03/12 | [
"https://Stackoverflow.com/questions/71447954",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10514096/"
] | Since you only declared the function I will assume they are in separate compilation units. So the compiler has to generate a function call for them. No inlineing or specialization of the functions possible (lookup link time optimization for how that isn't always true).
The way functions are called, arguments are passe... | This intermediate values are stored traditionally on the stack, but beware stack may overflow.com :) |
33,348 | My first question is what are the scriptures every Muslim (or Islam follower) should abide by? In other words, what scriptures are considered the fundamental/basic on which Islam is based on? Or What are the very important scriptures that are considered as highest/top? | 2016/07/10 | [
"https://islam.stackexchange.com/questions/33348",
"https://islam.stackexchange.com",
"https://islam.stackexchange.com/users/17673/"
] | All perfect praise be to Allah
------------------------------
When you say **scriptures**, than let us be all clear, that **Quran is the word of Allah, sent down on prophet Muhammad ﷺ by Jibrael A.s. And as Muslims this is the most important book we have to follow, indeed this book is basis and Allah promise will not ... | There is only one such scripture in Islam which is the Quran. If someone who claims to be Muslim says he doesn't belief in it then he wouldn't be regarded as one cause all Muslims agree that the anyone who rejects the Quran rejects Islam as well.
All the copies of the Quran are same. They are all written in the same w... |
33,348 | My first question is what are the scriptures every Muslim (or Islam follower) should abide by? In other words, what scriptures are considered the fundamental/basic on which Islam is based on? Or What are the very important scriptures that are considered as highest/top? | 2016/07/10 | [
"https://islam.stackexchange.com/questions/33348",
"https://islam.stackexchange.com",
"https://islam.stackexchange.com/users/17673/"
] | What are the scriptures which every Islam follower should abide by?
-------------------------------------------------------------------
There is only one which is the Quran. There are other scriptures in Islam but they were revealed before the Quran and no longer apply to Muslims. The Tawrat was revealed to mosses as ... | There is only one such scripture in Islam which is the Quran. If someone who claims to be Muslim says he doesn't belief in it then he wouldn't be regarded as one cause all Muslims agree that the anyone who rejects the Quran rejects Islam as well.
All the copies of the Quran are same. They are all written in the same w... |
26,912 | Much later, West Virginia broke off from Virginia as a result of the Civil War. Earlier than that, Maine became "independent" from Massachusetts as part of the Missouri Compromise.
But during and after the Revolution, Virginia claimed Kentucky as its "backland." In 1795, it relinquished this claim to let Kentucky spl... | 2015/12/22 | [
"https://history.stackexchange.com/questions/26912",
"https://history.stackexchange.com",
"https://history.stackexchange.com/users/120/"
] | Prior to the signing of the Constitution, most of the 13 colonies [ceded all territorial claims](https://en.wikipedia.org/wiki/State_cessions) to the Congressional Government in exchange for it assuming their debt. Virginia followed suit 3 years later. This made the Kentucky Territory under Federal jurisdiction, and la... | For a corollary explanation to [Oldcat's answer](https://history.stackexchange.com/questions/26912/why-did-virginia-let-kentucky-become-a-separate-state#answer-26919), try reading [The Division of Territory in Society](http://www.edstephan.org/Book/contents.html) by Ed Stephan. It's a very interesting read, even if you... |
26,912 | Much later, West Virginia broke off from Virginia as a result of the Civil War. Earlier than that, Maine became "independent" from Massachusetts as part of the Missouri Compromise.
But during and after the Revolution, Virginia claimed Kentucky as its "backland." In 1795, it relinquished this claim to let Kentucky spl... | 2015/12/22 | [
"https://history.stackexchange.com/questions/26912",
"https://history.stackexchange.com",
"https://history.stackexchange.com/users/120/"
] | Prior to the signing of the Constitution, most of the 13 colonies [ceded all territorial claims](https://en.wikipedia.org/wiki/State_cessions) to the Congressional Government in exchange for it assuming their debt. Virginia followed suit 3 years later. This made the Kentucky Territory under Federal jurisdiction, and la... | Kentucky was admitted on June 1, 1792, not 1795. It was a part of Virginia until it became a separate state. In that respect, it differed from Tennessee, which was a part of North Carolina that was ceded by the legislature to federal jurisdiction, and was an organized incorporated territory of the United states, called... |
25,414,816 | This:
```
$.ajax({
url: '/Merchant/SaveDirty',
type: 'POST',
dataType: 'json',
data: ko.toJSON(dirtyItems),
contentType: 'application/json; charset=utf-8',
success: function (data) {
// get the result and do some magic wit... | 2014/08/20 | [
"https://Stackoverflow.com/questions/25414816",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | @KillingsWorth, is there any specific reason for which you are posting a JSON string? If not then, you could create a class corresponding to dirtyitems type and in your controller method you can accept a list of dirtyItems.
```
Class DirtyItem
{ // dirty item properties }
[HttpPost]
public void SaveDirty(List<DirtyI... | This should works:
```
$.ajax({
url: '@Url.Action("SaveDirty", "Merchant")'
type: 'POST',
dataType: 'json',
data: JSON.stringify(dirtyItems),
contentType: 'application/json; charset=utf-8',
success: function (data) {
// get the res... |
25,414,816 | This:
```
$.ajax({
url: '/Merchant/SaveDirty',
type: 'POST',
dataType: 'json',
data: ko.toJSON(dirtyItems),
contentType: 'application/json; charset=utf-8',
success: function (data) {
// get the result and do some magic wit... | 2014/08/20 | [
"https://Stackoverflow.com/questions/25414816",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | you can use the following:
$.ajax({
```
url: '/Merchant/SaveDirty',
type: 'POST',
dataType: 'json',
data: JSON.stringify(dirtyItems),
contentType: 'application/json; charset=utf-8',
success: function (data) {
///
```
///
```
}
});
```
... | This should works:
```
$.ajax({
url: '@Url.Action("SaveDirty", "Merchant")'
type: 'POST',
dataType: 'json',
data: JSON.stringify(dirtyItems),
contentType: 'application/json; charset=utf-8',
success: function (data) {
// get the res... |
25,414,816 | This:
```
$.ajax({
url: '/Merchant/SaveDirty',
type: 'POST',
dataType: 'json',
data: ko.toJSON(dirtyItems),
contentType: 'application/json; charset=utf-8',
success: function (data) {
// get the result and do some magic wit... | 2014/08/20 | [
"https://Stackoverflow.com/questions/25414816",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | @KillingsWorth, is there any specific reason for which you are posting a JSON string? If not then, you could create a class corresponding to dirtyitems type and in your controller method you can accept a list of dirtyItems.
```
Class DirtyItem
{ // dirty item properties }
[HttpPost]
public void SaveDirty(List<DirtyI... | you can use the following:
$.ajax({
```
url: '/Merchant/SaveDirty',
type: 'POST',
dataType: 'json',
data: JSON.stringify(dirtyItems),
contentType: 'application/json; charset=utf-8',
success: function (data) {
///
```
///
```
}
});
```
... |
25,527,992 | I have a dictionary with all employee IDs and their names in it. Now I want the user to select a name using the UIPickerView. Problem is: if I sort the values (the names) of the dictionary, how do I know which name corresponds to its ID as there could be identical names in the dictionary.
e.g.
```
{"0001", "John Doe"... | 2014/08/27 | [
"https://Stackoverflow.com/questions/25527992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1139523/"
] | 1- In case you want to sort the values of dictionary you construct your dictionary values with with unique names as if you do for key.
2- If your are not be able to do that in case you have your simple dictionary let the user select *John Doe* out of 3.
3- If there are value duplication when showing in the picker yo... | You can get selected dictionary as bellow
```
NSDictionary *aDict = [yourArrayName objectAtIndex:[self.yourPickerName selectedRowInComponent:0]];
NSLog(@"%@", aDict);
``` |
25,527,992 | I have a dictionary with all employee IDs and their names in it. Now I want the user to select a name using the UIPickerView. Problem is: if I sort the values (the names) of the dictionary, how do I know which name corresponds to its ID as there could be identical names in the dictionary.
e.g.
```
{"0001", "John Doe"... | 2014/08/27 | [
"https://Stackoverflow.com/questions/25527992",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1139523/"
] | Instead of creating two separate arrays for Name and IDs I created (as suggested by iDev) a custom object 'Person' with these 2 properties. I created a new Person object and added each one to an array.
Then I sorted that array using
>
> sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2)
>
>
>
Then... | You can get selected dictionary as bellow
```
NSDictionary *aDict = [yourArrayName objectAtIndex:[self.yourPickerName selectedRowInComponent:0]];
NSLog(@"%@", aDict);
``` |
2,880,450 | I'm new to Android development and I couldn't find this in the Dev Guide.
I would like to create a background service so that any other app could connect to it and get some data from it. I saw android.app.Service, but it seems that it only allows other apps to ping the service, it doesn't allow them to register for so... | 2010/05/21 | [
"https://Stackoverflow.com/questions/2880450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/198131/"
] | You need pass in second argument the path where you want go
```
<%= link_to @person.company.companyname, @person.company %>
```
or with the full version :
```
<%= link_to @person.company.companyname, company_url(@person.company) %>
``` | The thing is, `link_to` cannot guess where you want it to lead to, if you give it only the text of the link :)
In order to have the link lead to the company page, you need to add a path:
```
<%= link_to @person.company.companyname, company_path(@person.company) %>
```
This assumes you have proper restful routes fo... |
6,750,201 | I am using `show()` and `hide()` in my jsp page, and it is working fine, but I am having trouble figuring out a way to hide my table once it is shown. HTML EX:
```
<button id="b1">show 1</button>
<button id="b2">show 2</button>
<div class="hidden" id="d1">
<div class="hidden" id="d2">
```
So basically I want to show... | 2011/07/19 | [
"https://Stackoverflow.com/questions/6750201",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/682431/"
] | I think you need this
```
$('#b1').click(function(){
$('#d2').hide();
$('#d1').toggle();
});
$('#b2').click(function(){
$('#d1').hide();
$('#d2').toggle();
});
``` | ```
$('#b1').click(function(){
$('#d1').toggle();
});
$('#b2').click(function(){
$('#d2').toggle();
});
``` |
6,750,201 | I am using `show()` and `hide()` in my jsp page, and it is working fine, but I am having trouble figuring out a way to hide my table once it is shown. HTML EX:
```
<button id="b1">show 1</button>
<button id="b2">show 2</button>
<div class="hidden" id="d1">
<div class="hidden" id="d2">
```
So basically I want to show... | 2011/07/19 | [
"https://Stackoverflow.com/questions/6750201",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/682431/"
] | if you don't use any animation, it is probably more useful to define a class in css, say, .hidden {display:"none"} and toggle it.
Thus, you code can be something like this:
```
$("#b1, #b2").click(function() { $("#d1, d2").toggleClass("hidden") })
```
Try this one, if you want, and tell us, whether it works ) | You can check if something is visible by this `$('#someDiv:visible')` and then do appropriate handling. |
6,750,201 | I am using `show()` and `hide()` in my jsp page, and it is working fine, but I am having trouble figuring out a way to hide my table once it is shown. HTML EX:
```
<button id="b1">show 1</button>
<button id="b2">show 2</button>
<div class="hidden" id="d1">
<div class="hidden" id="d2">
```
So basically I want to show... | 2011/07/19 | [
"https://Stackoverflow.com/questions/6750201",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/682431/"
] | I think you want this:
```
$('#b1').click(function(){
$('#d1').toggle();
});
$('#b2').click(function(){
$('#d2').toggle();
});
```
If you need to still make it so that only one can be shown then probably something like this:
```
$('#b1').click(function(){
if($('#d1').toggle().is(":visible")){
$(... | There's a `toggle()` method that you can use instead of show/hide that will do this for you.
>
> With no parameters, the .toggle() method simply toggles the visibility
> of elements:
>
>
>
Source: <http://api.jquery.com/toggle/> |
6,750,201 | I am using `show()` and `hide()` in my jsp page, and it is working fine, but I am having trouble figuring out a way to hide my table once it is shown. HTML EX:
```
<button id="b1">show 1</button>
<button id="b2">show 2</button>
<div class="hidden" id="d1">
<div class="hidden" id="d2">
```
So basically I want to show... | 2011/07/19 | [
"https://Stackoverflow.com/questions/6750201",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/682431/"
] | You don't need to check anything, just toggle the first one and always hide the other one
```
$('#b1').click(function(){
$('#d1').toggle();
$('#d2').hide();
});
$('#b2').click(function(){
$('#d2').toggle();
$('#d1').hide();
});
``` | if you don't use any animation, it is probably more useful to define a class in css, say, .hidden {display:"none"} and toggle it.
Thus, you code can be something like this:
```
$("#b1, #b2").click(function() { $("#d1, d2").toggleClass("hidden") })
```
Try this one, if you want, and tell us, whether it works ) |
6,750,201 | I am using `show()` and `hide()` in my jsp page, and it is working fine, but I am having trouble figuring out a way to hide my table once it is shown. HTML EX:
```
<button id="b1">show 1</button>
<button id="b2">show 2</button>
<div class="hidden" id="d1">
<div class="hidden" id="d2">
```
So basically I want to show... | 2011/07/19 | [
"https://Stackoverflow.com/questions/6750201",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/682431/"
] | I think you need this
```
$('#b1').click(function(){
$('#d2').hide();
$('#d1').toggle();
});
$('#b2').click(function(){
$('#d1').hide();
$('#d2').toggle();
});
``` | You can check if something is visible by this `$('#someDiv:visible')` and then do appropriate handling. |
6,750,201 | I am using `show()` and `hide()` in my jsp page, and it is working fine, but I am having trouble figuring out a way to hide my table once it is shown. HTML EX:
```
<button id="b1">show 1</button>
<button id="b2">show 2</button>
<div class="hidden" id="d1">
<div class="hidden" id="d2">
```
So basically I want to show... | 2011/07/19 | [
"https://Stackoverflow.com/questions/6750201",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/682431/"
] | You don't need to check anything, just toggle the first one and always hide the other one
```
$('#b1').click(function(){
$('#d1').toggle();
$('#d2').hide();
});
$('#b2').click(function(){
$('#d2').toggle();
$('#d1').hide();
});
``` | You can check if something is visible by this `$('#someDiv:visible')` and then do appropriate handling. |
6,750,201 | I am using `show()` and `hide()` in my jsp page, and it is working fine, but I am having trouble figuring out a way to hide my table once it is shown. HTML EX:
```
<button id="b1">show 1</button>
<button id="b2">show 2</button>
<div class="hidden" id="d1">
<div class="hidden" id="d2">
```
So basically I want to show... | 2011/07/19 | [
"https://Stackoverflow.com/questions/6750201",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/682431/"
] | ```
$('#b1').click(function(){
$('#d1').toggle();
});
$('#b2').click(function(){
$('#d2').toggle();
});
``` | You can check if something is visible by this `$('#someDiv:visible')` and then do appropriate handling. |
6,750,201 | I am using `show()` and `hide()` in my jsp page, and it is working fine, but I am having trouble figuring out a way to hide my table once it is shown. HTML EX:
```
<button id="b1">show 1</button>
<button id="b2">show 2</button>
<div class="hidden" id="d1">
<div class="hidden" id="d2">
```
So basically I want to show... | 2011/07/19 | [
"https://Stackoverflow.com/questions/6750201",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/682431/"
] | You don't need to check anything, just toggle the first one and always hide the other one
```
$('#b1').click(function(){
$('#d1').toggle();
$('#d2').hide();
});
$('#b2').click(function(){
$('#d2').toggle();
$('#d1').hide();
});
``` | There's a `toggle()` method that you can use instead of show/hide that will do this for you.
>
> With no parameters, the .toggle() method simply toggles the visibility
> of elements:
>
>
>
Source: <http://api.jquery.com/toggle/> |
6,750,201 | I am using `show()` and `hide()` in my jsp page, and it is working fine, but I am having trouble figuring out a way to hide my table once it is shown. HTML EX:
```
<button id="b1">show 1</button>
<button id="b2">show 2</button>
<div class="hidden" id="d1">
<div class="hidden" id="d2">
```
So basically I want to show... | 2011/07/19 | [
"https://Stackoverflow.com/questions/6750201",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/682431/"
] | I think you want this:
```
$('#b1').click(function(){
$('#d1').toggle();
});
$('#b2').click(function(){
$('#d2').toggle();
});
```
If you need to still make it so that only one can be shown then probably something like this:
```
$('#b1').click(function(){
if($('#d1').toggle().is(":visible")){
$(... | You don't need to check anything, just toggle the first one and always hide the other one
```
$('#b1').click(function(){
$('#d1').toggle();
$('#d2').hide();
});
$('#b2').click(function(){
$('#d2').toggle();
$('#d1').hide();
});
``` |
6,750,201 | I am using `show()` and `hide()` in my jsp page, and it is working fine, but I am having trouble figuring out a way to hide my table once it is shown. HTML EX:
```
<button id="b1">show 1</button>
<button id="b2">show 2</button>
<div class="hidden" id="d1">
<div class="hidden" id="d2">
```
So basically I want to show... | 2011/07/19 | [
"https://Stackoverflow.com/questions/6750201",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/682431/"
] | I think you want this:
```
$('#b1').click(function(){
$('#d1').toggle();
});
$('#b2').click(function(){
$('#d2').toggle();
});
```
If you need to still make it so that only one can be shown then probably something like this:
```
$('#b1').click(function(){
if($('#d1').toggle().is(":visible")){
$(... | You can check if something is visible by this `$('#someDiv:visible')` and then do appropriate handling. |
3,873,667 | I have encountered many mixing problem like this but I just can't answer this one.
Here is the problem,
>
> A mass of inert material containing $15 \text{ lb}$ of salt in its pores is agitated with $10 \text{ gal}$ of water initially fresh. The salt dissolves at a rate which varies jointly as the number of pounds of ... | 2020/10/20 | [
"https://math.stackexchange.com/questions/3873667",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/839791/"
] | $\frac{dP}{dt} = k (15-P) (3- \frac{P}{10})$ where $k$ is a constant multiplier.
$dt = \frac{10}{k(15-P)(30 - P)} dP$
$ \displaystyle \int dt = 10 = \frac{1}{k}\int\_0^9\frac{10}{k(15-P)(30 - P)} dP = \frac{1}{k} \frac{2}{3} \ln \frac{7}{4}$ (time taken is $10$ mins).
So, $k = \frac{1}{15} \ln \frac{7}{4} \approx 0.... | The setup is not quite right. The wording of the problem is a little poor, but ultimately it means that the rate of change of the amount of salt is *proportional* to the remaining salt and the difference between the concentrations. As such, our equations should read
$$\frac{dP}{dt}=k(15-P)\left(3-\frac{P}{10}\right)$$... |
273,293 | My macOS 10.12.3 crashed while suspended and I want to look in the log files to determine where the problem comes from.
I opened System Information and in the Logs I found a Kernel log entry linked to `/var/log/asl`. But this file is empty. Why? | 2017/02/16 | [
"https://apple.stackexchange.com/questions/273293",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/106452/"
] | As of 10.12, macOS no longer primarily logs to text files. However, you can interrogate the stored log data using the `log(1)` command on the command line in concert with the Console application (found in `/Applications/Utilities`).
For example, to see all log entries generated by the kernel during the last day in old... | Likely because on MacOS, this log is located at `/private/var/log/asl`
Here is a tip that I use: given symlinks and hidden folders (plus confusing Unix man), it can be a challenge to find these logs and system reports. Simply open Console, and you will see a list of all the logs and reports.(you will find the one you ... |
632,258 | Sadly, I am not able to recreate a MWE since I'm working on a fairly complex [template](https://www.overleaf.com/latex/templates/classical-format-thesis-scuola-di-ingegneria-industriale-e-dellinformazione-politecnico-di-milano/dkmvtndqkyxg). I cannot understand how LaTeX decides to break lines, I googled but I couldn't... | 2022/02/01 | [
"https://tex.stackexchange.com/questions/632258",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/262704/"
] | All that's necessary is to move the spaces out of the `\texttt` scope:
```
\documentclass{article}
\addtolength\textwidth{45pt}
\begin{document}
\begin{itemize}
\item A TOSCA requirement definition within a node type definition was
encoded with the term \texttt{requirement(}$RName$\texttt{,}
$RCap$\texttt{,} $R... | I wouldn't use math mode. instead, I'd use text mode thoughout, for both function names (e.g., `\texttt`) and variable names (e.g., `\textit`). And, if and where necessary, just insert `\-` discretionary hyphens.
[](https://i.stack.imgur.com/Iwj4K.jpg... |
632,258 | Sadly, I am not able to recreate a MWE since I'm working on a fairly complex [template](https://www.overleaf.com/latex/templates/classical-format-thesis-scuola-di-ingegneria-industriale-e-dellinformazione-politecnico-di-milano/dkmvtndqkyxg). I cannot understand how LaTeX decides to break lines, I googled but I couldn't... | 2022/02/01 | [
"https://tex.stackexchange.com/questions/632258",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/262704/"
] | All that's necessary is to move the spaces out of the `\texttt` scope:
```
\documentclass{article}
\addtolength\textwidth{45pt}
\begin{document}
\begin{itemize}
\item A TOSCA requirement definition within a node type definition was
encoded with the term \texttt{requirement(}$RName$\texttt{,}
$RCap$\texttt{,} $R... | If you use `\mathit` so the text is a bit mmore compressed (and readable) and allow the space after a comma in math some flexibility then it (almost) fits on one line without breaking, see thethird item below.
[](https://i.stack.imgur.com/hMw6N.png)
... |
33,766,559 | In a functional language, functions are first class citizens and thus *calling* them is not the only thing I can do. I can also store them away.
Now when I have a language, which is strict by default, then I am still not forced to evaluate a function call. I have the option to store the function and its parameters e.... | 2015/11/17 | [
"https://Stackoverflow.com/questions/33766559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2277395/"
] | Lazy evaluation, at the low level, is implemented by a concept called a **thunk**, which comprises two things:
1. A closure that computes the value of the deferred computation
2. A set-once mutable storage cell for memoizing the result.
The first part, the closure, can be modeled in an even simpler way than your tupl... | What you propose will work. The details for doing this in Scheme can be [found in SICP](https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-27.html#%25_sec_4.2). One could envisage a strict version of Haskell in which there is a "lazy" function which does the opposite of what "seq" does in Haskell. However adding thi... |
33,766,559 | In a functional language, functions are first class citizens and thus *calling* them is not the only thing I can do. I can also store them away.
Now when I have a language, which is strict by default, then I am still not forced to evaluate a function call. I have the option to store the function and its parameters e.... | 2015/11/17 | [
"https://Stackoverflow.com/questions/33766559",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2277395/"
] | The answer is a qualified yes. Your intuition that laziness can be implemented in a strict language where functions are first-class objects is correct. But going into the details reveals a number of subtleties.
Let's take a functional language (by which I mean a language where functions can be constructed and manipula... | What you propose will work. The details for doing this in Scheme can be [found in SICP](https://mitpress.mit.edu/sicp/full-text/book/book-Z-H-27.html#%25_sec_4.2). One could envisage a strict version of Haskell in which there is a "lazy" function which does the opposite of what "seq" does in Haskell. However adding thi... |
97,241 | Which of the following is grammatical?
>
> * I am deputizing for him/her.
> * I am deputizing him/her.
>
>
>
I think in the case of *covering* you have to use:
>
> I am covering for him/her.
>
>
>
...or do you? | 2013/01/09 | [
"https://english.stackexchange.com/questions/97241",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/43/"
] | [Merriam-Webster](http://www.merriam-webster.com/dictionary/deputize) shows a usage of *deputize* that somewhat agrees with your first sentence: *I deputize for the newspaper's editor on the weekends*. But it sounds strange to me. I'd say that I was *acting for* or *covering for* someone not available to do the work at... | I think both are correct but each has a different meaning:
**1-** I am **deputizing for** him/her. (*intransitive*)
**2-** I am **deputizing him/her**. (*transitive*)
The verb '**deputize**' is both transitive and intransitive.
**1-** In the transitive form (*second* example), the verb **deputize** would mean **ap... |
37,255,678 | How can I handle the `onSearch` event in my chrome devtools extension panel, which will fire when hitting `Ctrl` + `F` and typing some query string.
In my panel's background page I can listen for that event, but I don't know how to access it within the panel itself neither how to respond with the number of matches to ... | 2016/05/16 | [
"https://Stackoverflow.com/questions/37255678",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3637034/"
] | Maybe it is not clear, but still documented by the link you specified.
You can set listener when creating a dev panel:
```
chrome.devtools.panels.create("My Dev Panel", null, "panel.html", function(panel) {
panel.onSearch.addListener(function(action, querySearch) {
// action - May be:
// "perf... | You can use the `chrome.runtime` api to pass the message to your main script.
<https://developer.chrome.com/docs/extensions/mv3/messaging/>
```js
panel.onSearch.addListener((action, queryString) => {
chrome.runtime.sendMessage({
type: "search",
payload: { action, queryString },
});
});
```
Then inside yo... |
23,563,046 | I've written the following code.
```
import java.util.ArrayList;
import java.util.List;
import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.cont... | 2014/05/09 | [
"https://Stackoverflow.com/questions/23563046",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1820480/"
] | This is a [known bug](https://javafx-jira.kenai.com/browse/RT-35864) in JavaFX 8, which is fixed in the latest ea release (1.8.0\_20).
As a workaround, create the controls once and register handlers with them, then just update their state in the updateItem(...) method:
```
listView.setCellFactory(new Callback<Lis... | Could you add the code of `getIconAndResizeTo16( String s )`. I guess the node you return there consumes mouse clicks.
Here is a runnable example that demonstrates the issue. It is just a guess though.
```
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene... |
35,984,007 | I have the following datatrigger attached to a combobox:
```
<TextBlock Grid.Row="1" Grid.Column="0" Text="Vendor:" VerticalAlignment="Center" Margin="3,3,0,3"/>
<dxe:ComboBoxEdit Grid.Row="1" Grid.Column="1" Margin="3" ItemsSource="{Binding VendorList.Result}"
DisplayMember=... | 2016/03/14 | [
"https://Stackoverflow.com/questions/35984007",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3939022/"
] | Try referencing the enum value rather than the integer value.
```
<DataTrigger Binding="{Binding ElementName=cmbPogSetTypeList, Path=SelectedItem}"
Value="{x:Static mynamespace:POGResetType.Vendor}"/>
``` | I think you can use a IValueConverter
```
<StackPanel>
<TextBlock Grid.Row="0" Grid.Column="0" Text="Planogram Set Type:" VerticalAlignment="Center" Margin="3,3,0,3" />
<ComboBox Grid.Row="0" Grid.Column="1" Margin="3" ItemsSource="{Binding PogSetTypeList}" Name="cmbPogSetTypeList"/>
... |
12,511 | According to Revelation 5:11, there are many:
>
> 11 Then I looked and heard the voice of many angels, **numbering
> thousands upon thousands, and ten thousand times ten thousand**. They
> encircled the throne and the living creatures and the elders.
> 12 In a
> loud voice they were saying:
>
>
> “Worthy is th... | 2013/01/06 | [
"https://christianity.stackexchange.com/questions/12511",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/1839/"
] | None of the major branches do. All they say is that it is a large number, and most say that there are more than all humans who have ever existed:
[A Protestant view](http://christiananswers.net/q-acb/acb-t005.html#3): (Drawing from Scripture only)
>
> While the Scriptures give no definite figures, we are told that t... | "...behold a great red Dragon... And his tail drew
the THIRD PART OF THE STARS OF HEAVEN, and
did cast them to the earth..." (Rev.12:3-4).
assuming those stars to be angels. that means 1/3 of angels were cast out during the purge. I am a Catholic Christian from The Republic of India. we are outnumbered by Hindus by 40... |
12,511 | According to Revelation 5:11, there are many:
>
> 11 Then I looked and heard the voice of many angels, **numbering
> thousands upon thousands, and ten thousand times ten thousand**. They
> encircled the throne and the living creatures and the elders.
> 12 In a
> loud voice they were saying:
>
>
> “Worthy is th... | 2013/01/06 | [
"https://christianity.stackexchange.com/questions/12511",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/1839/"
] | None of the major branches do. All they say is that it is a large number, and most say that there are more than all humans who have ever existed:
[A Protestant view](http://christiananswers.net/q-acb/acb-t005.html#3): (Drawing from Scripture only)
>
> While the Scriptures give no definite figures, we are told that t... | TWELVE TRILLION! let me explain why.
God knew that for a long time mankind would not have a sophisticated enough number system to grasp the vastness of the Heavenly host so throughout the Bible His Holy Spirit inspires the metaphor "[like] stars in the sky" instead of a number. Today we know the number of stars in sp... |
12,511 | According to Revelation 5:11, there are many:
>
> 11 Then I looked and heard the voice of many angels, **numbering
> thousands upon thousands, and ten thousand times ten thousand**. They
> encircled the throne and the living creatures and the elders.
> 12 In a
> loud voice they were saying:
>
>
> “Worthy is th... | 2013/01/06 | [
"https://christianity.stackexchange.com/questions/12511",
"https://christianity.stackexchange.com",
"https://christianity.stackexchange.com/users/1839/"
] | "...behold a great red Dragon... And his tail drew
the THIRD PART OF THE STARS OF HEAVEN, and
did cast them to the earth..." (Rev.12:3-4).
assuming those stars to be angels. that means 1/3 of angels were cast out during the purge. I am a Catholic Christian from The Republic of India. we are outnumbered by Hindus by 40... | TWELVE TRILLION! let me explain why.
God knew that for a long time mankind would not have a sophisticated enough number system to grasp the vastness of the Heavenly host so throughout the Bible His Holy Spirit inspires the metaphor "[like] stars in the sky" instead of a number. Today we know the number of stars in sp... |
23,415,075 | I have database with table tbl\_employee. In the table I store usernames. I use the following code to save all the usernames into a List:
```
string name = txtUsername.Text;
List<string> lst = new List<string>();
NpgsqlConnection conn = new NpgsqlConnection("Server=127.0.0.1;Port=5432;Database=db;User Id=postg... | 2014/05/01 | [
"https://Stackoverflow.com/questions/23415075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2939293/"
] | You could just use `Contains`:
```
if (lst.Contains(name)) ...
```
But if this is *all* you're doing with the list, I'd recommend changing this code so it queries the `tbl_empoyee` table directly from the database. I'm not familiar with the `NpgsqlCommand` but it should look a bit like this:
```
bool result = false... | Try using `lst.Contains(name)`. |
23,415,075 | I have database with table tbl\_employee. In the table I store usernames. I use the following code to save all the usernames into a List:
```
string name = txtUsername.Text;
List<string> lst = new List<string>();
NpgsqlConnection conn = new NpgsqlConnection("Server=127.0.0.1;Port=5432;Database=db;User Id=postg... | 2014/05/01 | [
"https://Stackoverflow.com/questions/23415075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2939293/"
] | Try using `lst.Contains(name)`. | Thanks quys! I changed it to count, as you suggested. Here is my final code:
```
string name = txtUsername.Text;
NpgsqlConnection conn = new NpgsqlConnection("Server=127.0.0.1;Port=5432;Database=db;User Id=postgres;Password=postgres;");
conn.Open();
string sql = "SELECT COUNT(*) FROM tbl_employee WHERE usern... |
23,415,075 | I have database with table tbl\_employee. In the table I store usernames. I use the following code to save all the usernames into a List:
```
string name = txtUsername.Text;
List<string> lst = new List<string>();
NpgsqlConnection conn = new NpgsqlConnection("Server=127.0.0.1;Port=5432;Database=db;User Id=postg... | 2014/05/01 | [
"https://Stackoverflow.com/questions/23415075",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2939293/"
] | You could just use `Contains`:
```
if (lst.Contains(name)) ...
```
But if this is *all* you're doing with the list, I'd recommend changing this code so it queries the `tbl_empoyee` table directly from the database. I'm not familiar with the `NpgsqlCommand` but it should look a bit like this:
```
bool result = false... | Thanks quys! I changed it to count, as you suggested. Here is my final code:
```
string name = txtUsername.Text;
NpgsqlConnection conn = new NpgsqlConnection("Server=127.0.0.1;Port=5432;Database=db;User Id=postgres;Password=postgres;");
conn.Open();
string sql = "SELECT COUNT(*) FROM tbl_employee WHERE usern... |
8,325,450 | Is there a way to get cookies for specific domain (Facebook) and delete all them using JavaScript?
I want to delete cookies for oAuth (Facebook and Gmail) when the user logs out. | 2011/11/30 | [
"https://Stackoverflow.com/questions/8325450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1023476/"
] | No, that is not possible.
You can only access the cookies of your own domain. You can't even see the cookies from a different domain. | The [jQuery Cookie plugin](http://plugins.jquery.com/project/Cookie) is useful for getting the value of a cookie when you already know the name of the cookie you want to query, but provides no way to get a list of all the cookies that are set.
Refer this [DOC](http://www.electrictoolbox.com/javascript-get-all-cookies/... |
8,325,450 | Is there a way to get cookies for specific domain (Facebook) and delete all them using JavaScript?
I want to delete cookies for oAuth (Facebook and Gmail) when the user logs out. | 2011/11/30 | [
"https://Stackoverflow.com/questions/8325450",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1023476/"
] | No, that is not possible.
You can only access the cookies of your own domain. You can't even see the cookies from a different domain. | So if I understand this correctly you actually want to logout the user from FB... Have you tried using the [FB SDK logout()](http://developers.facebook.com/docs/reference/javascript/FB.logout/) function? That will successfully delete all FB cookies from your domain.
Hope this helps |
2,157,508 | [](https://i.stack.imgur.com/XWIA0.jpg)
[](https://i.stack.imgur.com/KmZLY.jpg)
How is $p\ '(x)$ written in that solution? I understand that $p\ '(x)$ will be some $4$ degree polynom... | 2017/02/23 | [
"https://math.stackexchange.com/questions/2157508",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/362725/"
] | By the Division Algorithm, we know that there are some degree $2$ polynomials $Q\_1, Q\_2$ such that:
$$
P(x) = Q\_1(x) \cdot (x - 2)^3 - 2 = Q\_2(x) \cdot (x + 2)^3 + 2
$$
Differentiating each equation with product rule, we get:
\begin{align\*}
P'(x) &= Q\_1'(x) \cdot (x - 2)^3 + Q\_1(x) \cdot 3(x - 2)^2
= (x - 2)^2 ... | Hint: Take derivative of that polynomial to get $16 - 8 x^2 + x^4=(x^2-4)^2$. |
220,290 | The center I volunteer for has received 22 Window 7 Professional PCs and a printer, all are networked to a 24 port D-Link switch.
What software could I use to configure multiple PCs at the same time. For example install software, configure system settings and also restrict access to certain websites (it is a children ... | 2011/01/09 | [
"https://serverfault.com/questions/220290",
"https://serverfault.com",
"https://serverfault.com/users/66158/"
] | Active Directory running on Windows Server would be your best bet. Failing that there are a mass of open source options for doing a lot of this stuff.
Microsoft offers discounts for registered non-profits, and if you can make friends with someone at Microsoft, you can probably get them to give you all sorts of good st... | Well you've basically got 2 problems there. Setting up the computers identically and restricting web access. My votes are for [FOG](http://www.fogproject.org/) to image all of the computers to a standard image and [OpenDNS](http://www.opendns.com/start/) to control web filtering.
As for keeping the kids from changing ... |
220,290 | The center I volunteer for has received 22 Window 7 Professional PCs and a printer, all are networked to a 24 port D-Link switch.
What software could I use to configure multiple PCs at the same time. For example install software, configure system settings and also restrict access to certain websites (it is a children ... | 2011/01/09 | [
"https://serverfault.com/questions/220290",
"https://serverfault.com",
"https://serverfault.com/users/66158/"
] | Active Directory running on Windows Server would be your best bet. Failing that there are a mass of open source options for doing a lot of this stuff.
Microsoft offers discounts for registered non-profits, and if you can make friends with someone at Microsoft, you can probably get them to give you all sorts of good st... | There is a microsoft free software [Microsoft SteadyState](http://www.microsoft.com/downloads/en/details.aspx?familyid=d077a52d-93e9-4b02-bd95-9d770ccdb431&displaylang=en) that can be used to lock down the configuration of the PC, i haven't used it in a production enviroment but it seemed ok so far, let us know how it ... |
220,290 | The center I volunteer for has received 22 Window 7 Professional PCs and a printer, all are networked to a 24 port D-Link switch.
What software could I use to configure multiple PCs at the same time. For example install software, configure system settings and also restrict access to certain websites (it is a children ... | 2011/01/09 | [
"https://serverfault.com/questions/220290",
"https://serverfault.com",
"https://serverfault.com/users/66158/"
] | Well you've basically got 2 problems there. Setting up the computers identically and restricting web access. My votes are for [FOG](http://www.fogproject.org/) to image all of the computers to a standard image and [OpenDNS](http://www.opendns.com/start/) to control web filtering.
As for keeping the kids from changing ... | There is a microsoft free software [Microsoft SteadyState](http://www.microsoft.com/downloads/en/details.aspx?familyid=d077a52d-93e9-4b02-bd95-9d770ccdb431&displaylang=en) that can be used to lock down the configuration of the PC, i haven't used it in a production enviroment but it seemed ok so far, let us know how it ... |
147,830 | I am developing a Java application and I need to do a symmetric encryption to secure some of my sensitive information. There are many algorithms like AES, DES 3DES in Java cryptography. What is the best algorithm should I use to encrypt my sensitive information?
Mostly I do have string values and there are couple of i... | 2017/01/09 | [
"https://security.stackexchange.com/questions/147830",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/-1/"
] | **AES-128 (or higher)** is the recommended algorithm.
You should also choose a good **Chaining Method** with a random **Initialization Vector**. Padding variable length source data is helpful since AES is a block algorithm. `AES/CBC/PKCS5Padding` is a good option.
The encryption **Key** should be generated from a **C... | DES and 3DES aren't really considered strong encryption anymore. Look at Rijndael AES, there is an implementation available for java ( just search stack overflow). Ensure you read up on how to use salts and how to securely store your key. |
147,830 | I am developing a Java application and I need to do a symmetric encryption to secure some of my sensitive information. There are many algorithms like AES, DES 3DES in Java cryptography. What is the best algorithm should I use to encrypt my sensitive information?
Mostly I do have string values and there are couple of i... | 2017/01/09 | [
"https://security.stackexchange.com/questions/147830",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/-1/"
] | If you want to secure a Java object you need to use [SealedObject](https://docs.oracle.com/javase/7/docs/api/javax/crypto/SealedObject.html) class.
Following is a sample code.
Using AES-128 bit and writing into a file as a sealed object.
```
try {
//Generate a key
KeyGenerator gen = KeyGenerator.getInstance(... | DES and 3DES aren't really considered strong encryption anymore. Look at Rijndael AES, there is an implementation available for java ( just search stack overflow). Ensure you read up on how to use salts and how to securely store your key. |
12,021,058 | E.g. Any combination of these 3 words [AB,CD,EF] should pass the regex. Also, it should not allow duplicates.
Thanks. | 2012/08/18 | [
"https://Stackoverflow.com/questions/12021058",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/609568/"
] | I would not recommend a regex for this. But it is possible:
```
boolean foundMatch = subjectString.matches(
"(?x) # Verbose regex:\n" +
"(?!.*(AB|CD|EF).*\\1) # Make sure there are no dupes in the string\n" +
"\\s* # Match optional whitespace.\n" +
"(?:AB|CD|EF) ... | Well, the obvious solution is just to enumerate all 15 possibilities in a regex -- with a little work, you can probably factor out some terms and get a slightly more compact regex -- but there's not going to be another way to express those constraints in a regular expression. |
12,021,058 | E.g. Any combination of these 3 words [AB,CD,EF] should pass the regex. Also, it should not allow duplicates.
Thanks. | 2012/08/18 | [
"https://Stackoverflow.com/questions/12021058",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/609568/"
] | I would not recommend a regex for this. But it is possible:
```
boolean foundMatch = subjectString.matches(
"(?x) # Verbose regex:\n" +
"(?!.*(AB|CD|EF).*\\1) # Make sure there are no dupes in the string\n" +
"\\s* # Match optional whitespace.\n" +
"(?:AB|CD|EF) ... | "No duplicates" means counting. Regular expressions in general cannot do that, so it is the wrong tool for the job. |
7,407,526 | 1.Do you have any ideas on how to test websites in firefox 3.6 if I have win7 and ff6 installed? I've tried to install 3.6 and alongside with ff 6 but it gets all messy.
Is there something like [Ie tester](http://www.my-debugbar.com/wiki/IETester/HomePage) for fire fox 3.6? Adobe lab-browser sucks because it's not "liv... | 2011/09/13 | [
"https://Stackoverflow.com/questions/7407526",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/938504/"
] | If you're using chrome or firefox you can just click in the html and click edit and then give a class or id to the html element and it updates it live.
 | * In **Chrome**, just hit `Ctrl`+`Shift`+`I` to bring up the developers tools
* In **IE8+** hit `F12`
* In **Firefox** install the `Firebug extension`. |
7,407,526 | 1.Do you have any ideas on how to test websites in firefox 3.6 if I have win7 and ff6 installed? I've tried to install 3.6 and alongside with ff 6 but it gets all messy.
Is there something like [Ie tester](http://www.my-debugbar.com/wiki/IETester/HomePage) for fire fox 3.6? Adobe lab-browser sucks because it's not "liv... | 2011/09/13 | [
"https://Stackoverflow.com/questions/7407526",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/938504/"
] | In `Firebug` for Firefox, you can inspect an element as you describe, and then copy either the `XPath` or `Css Path`. This gives you the entire path you need right from `html` down to the specific element.

For example say you are inspecting a link with id `myL... | * In **Chrome**, just hit `Ctrl`+`Shift`+`I` to bring up the developers tools
* In **IE8+** hit `F12`
* In **Firefox** install the `Firebug extension`. |
7,407,526 | 1.Do you have any ideas on how to test websites in firefox 3.6 if I have win7 and ff6 installed? I've tried to install 3.6 and alongside with ff 6 but it gets all messy.
Is there something like [Ie tester](http://www.my-debugbar.com/wiki/IETester/HomePage) for fire fox 3.6? Adobe lab-browser sucks because it's not "liv... | 2011/09/13 | [
"https://Stackoverflow.com/questions/7407526",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/938504/"
] | In Chrome, in 'inspect element", on the top where "element" and "console" are highlighted, click source and look through the nested files for the element you are looking for. I think as of today HTML files are color-coded white and CSS files are yellow, but that may change.
[](h... | * In **Chrome**, just hit `Ctrl`+`Shift`+`I` to bring up the developers tools
* In **IE8+** hit `F12`
* In **Firefox** install the `Firebug extension`. |
7,407,526 | 1.Do you have any ideas on how to test websites in firefox 3.6 if I have win7 and ff6 installed? I've tried to install 3.6 and alongside with ff 6 but it gets all messy.
Is there something like [Ie tester](http://www.my-debugbar.com/wiki/IETester/HomePage) for fire fox 3.6? Adobe lab-browser sucks because it's not "liv... | 2011/09/13 | [
"https://Stackoverflow.com/questions/7407526",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/938504/"
] | In `Firebug` for Firefox, you can inspect an element as you describe, and then copy either the `XPath` or `Css Path`. This gives you the entire path you need right from `html` down to the specific element.

For example say you are inspecting a link with id `myL... | If you're using chrome or firefox you can just click in the html and click edit and then give a class or id to the html element and it updates it live.
 |
7,407,526 | 1.Do you have any ideas on how to test websites in firefox 3.6 if I have win7 and ff6 installed? I've tried to install 3.6 and alongside with ff 6 but it gets all messy.
Is there something like [Ie tester](http://www.my-debugbar.com/wiki/IETester/HomePage) for fire fox 3.6? Adobe lab-browser sucks because it's not "liv... | 2011/09/13 | [
"https://Stackoverflow.com/questions/7407526",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/938504/"
] | In `Firebug` for Firefox, you can inspect an element as you describe, and then copy either the `XPath` or `Css Path`. This gives you the entire path you need right from `html` down to the specific element.

For example say you are inspecting a link with id `myL... | In Chrome, in 'inspect element", on the top where "element" and "console" are highlighted, click source and look through the nested files for the element you are looking for. I think as of today HTML files are color-coded white and CSS files are yellow, but that may change.
[](h... |
16,480,553 | I have been searching for a while to find a good answer to my problem.
I have a new server where I would like to run a script in `.php` which uses a database to store some data. What I have done so far is:
1. Place the .php file in the server with the help of Putty.
2. Create a database in phpmyadmin, export it and p... | 2013/05/10 | [
"https://Stackoverflow.com/questions/16480553",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/938285/"
] | You can use next open source class [Browser View Controller](https://github.com/tonisalae/TSMiniWebBrowser "Browser View Controller")
```
TSMiniWebBrowser *webBrowser = [[TSMiniWebBrowser alloc] initWithUrl:[NSURL URLWithString:@"http://indiedevstories.com"]];
[self.navigationController pushViewController:webBrowser ... | You can add segment control on you navigation bar....
```
- (IBAction)segment_control_index_changed:(id)sender {
switch (self.segment_control.selectedSegmentIndex) {
case 0:
if (self._webview.canGoBack) {
[self._webview goBack];
}
break;
case 1:
if (self._web... |
22,000,879 | I have seen one place that they had put Bootstrap 3 into Tiny MCE 4. That looked very nice and practical, and I now want to do that too.
I have searched through Google, but not been able to find how to do that.
Do you know? Please share :-) | 2014/02/24 | [
"https://Stackoverflow.com/questions/22000879",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3790579/"
] | If the Number is not always increasing and thus could have different MAx within each Record group, you have to do it in two steps i.e. first get MAX(Record) and then get MAX(Number).
```
SELECT T.[Order], Max(Number) AS MaxNumber, MaxRecord
FROM
(
SELECT [Order], Max(Record) AS MaxRecord
FROM Table1
GROUP ... | Order really isn't a good column name as it's a reserved word.
```
SELECT max(number), max(record), order
FROM Table1
group by order
```
This might not be right, I'll need some clarification. Your question is a bit confusing...this will return the max number and record for each order number. Were you looking for the... |
22,000,879 | I have seen one place that they had put Bootstrap 3 into Tiny MCE 4. That looked very nice and practical, and I now want to do that too.
I have searched through Google, but not been able to find how to do that.
Do you know? Please share :-) | 2014/02/24 | [
"https://Stackoverflow.com/questions/22000879",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3790579/"
] | If the Number is not always increasing and thus could have different MAx within each Record group, you have to do it in two steps i.e. first get MAX(Record) and then get MAX(Number).
```
SELECT T.[Order], Max(Number) AS MaxNumber, MaxRecord
FROM
(
SELECT [Order], Max(Record) AS MaxRecord
FROM Table1
GROUP ... | Assuming your table is called `Table1`, the following should give you what you are looking for:
```
SELECT MAX(number),
A.record,
[order]
FROM Table1 A
INNER JOIN ( SELECT MAX(record) record
FROM Table1) B ON A.record = b.record
GROUP BY A.record, [order]
```
This wil... |
22,000,879 | I have seen one place that they had put Bootstrap 3 into Tiny MCE 4. That looked very nice and practical, and I now want to do that too.
I have searched through Google, but not been able to find how to do that.
Do you know? Please share :-) | 2014/02/24 | [
"https://Stackoverflow.com/questions/22000879",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3790579/"
] | If the Number is not always increasing and thus could have different MAx within each Record group, you have to do it in two steps i.e. first get MAX(Record) and then get MAX(Number).
```
SELECT T.[Order], Max(Number) AS MaxNumber, MaxRecord
FROM
(
SELECT [Order], Max(Record) AS MaxRecord
FROM Table1
GROUP ... | Hi this is the another way to do to get the result
```
select MAX(t.number),MAX(t.record),t.ORDERNo from @table t
INNER JOIN @table tt
ON tt.ORDERNo = t.ORDERNo
AND tt.Number = t.Number
AND t.Record = tt.Record
GROUP BY t.ORDERNo
``` |
89,192 | [This answer](https://law.stackexchange.com/a/48892/36096) explains the difference between a void and voidable contract:
>
> Void means it never happened
>
>
>
>
> Voidable means someone has the right to declare it void (q.v.)
>
>
>
If a contract was signed due to illegal economic duress, I understand the co... | 2023/02/13 | [
"https://law.stackexchange.com/questions/89192",
"https://law.stackexchange.com",
"https://law.stackexchange.com/users/36096/"
] | >
> If a contract was signed due to economic duress, is it void or
> voidable?
>
>
>
No.
Economic duress is not a ground to find that a contract is void or voidable.
>
> is it automatically void or is it voidable by the victim if they
> choose?
>
>
>
Some kinds of conduct do give rise to a duress defense to... | Voidable
--------
[australia](/questions/tagged/australia "show questions tagged 'australia'")
[Duress](https://www.australiancontractlaw.info/law/duress) must be “illegitimate” pressure by one party on another and can include illegitimate [economic](http://lawcentral.com.au/LCNewsArchive/LCNewsIssueDetails_Public.as... |
12,647,829 | Suppose we have some fixed-length data type such as a C struct:
```
struct T
{
...;
}
```
One way to allocate T would be:
```
T* create_t() { return (T*) malloc(sizeof(T)); }
```
and deallocate:
```
void destroy_t(T* t) { free(t); }
```
Under the hood malloc uses a memory allocation algorithm that deals wi... | 2012/09/28 | [
"https://Stackoverflow.com/questions/12647829",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1131467/"
] | AS far as I know the memory management used is a kind of 'bucket' management.
`malloc` keeps the free memory segments in buckets and when called, tries to pass out one of the best fit blocks to the caller.
But just download the source of the libc and have alook yourself.
And writing memory management is quite tricky... | Q: Given that the memory required is of fixed size elements, is it possible to write a custom memory allocation scheme that is superior to the generic implementation of malloc.?
A: Maybe. It would probably be a nontrivial undertaking.
Any given OS is likely to have a different implementation of "malloc()". The standa... |
12,647,829 | Suppose we have some fixed-length data type such as a C struct:
```
struct T
{
...;
}
```
One way to allocate T would be:
```
T* create_t() { return (T*) malloc(sizeof(T)); }
```
and deallocate:
```
void destroy_t(T* t) { free(t); }
```
Under the hood malloc uses a memory allocation algorithm that deals wi... | 2012/09/28 | [
"https://Stackoverflow.com/questions/12647829",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1131467/"
] | First, you can have several implementations of `malloc`. For instance, Glibc malloc (explained [here](http://bardofschool.blogspot.fr/2009/09/glibc-malloc-implementation.html)) is [here](http://sourceware.org/git/?p=glibc.git;a=tree;f=malloc;hb=HEAD), but [musl libc](http://www.musl-libc.org/) malloc is [here](http://g... | Q: Given that the memory required is of fixed size elements, is it possible to write a custom memory allocation scheme that is superior to the generic implementation of malloc.?
A: Maybe. It would probably be a nontrivial undertaking.
Any given OS is likely to have a different implementation of "malloc()". The standa... |
12,647,829 | Suppose we have some fixed-length data type such as a C struct:
```
struct T
{
...;
}
```
One way to allocate T would be:
```
T* create_t() { return (T*) malloc(sizeof(T)); }
```
and deallocate:
```
void destroy_t(T* t) { free(t); }
```
Under the hood malloc uses a memory allocation algorithm that deals wi... | 2012/09/28 | [
"https://Stackoverflow.com/questions/12647829",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1131467/"
] | As for #1 — others have handled that, in short, glibc does a fairly good job, and other mallocs may do better under various circumstances.
However, as for your second question: How will a custom one perform?
• In general, a hand-coded, low-level implementation of a free-list-allocator that is aware of the application... | Q: Given that the memory required is of fixed size elements, is it possible to write a custom memory allocation scheme that is superior to the generic implementation of malloc.?
A: Maybe. It would probably be a nontrivial undertaking.
Any given OS is likely to have a different implementation of "malloc()". The standa... |
29,214,157 | I need to create Redmine issues through api. I have an xml draft, that is posted to the redmine by wget.exe. The xml looks like:
```
<?xml version="1.0" encoding="utf-8"?>
<issue>
<project_id>145</project_id>
<tracker_id>10</tracker_id>
<category_id>885</category_id>
<subject>subj</subject>
<description>desc... | 2015/03/23 | [
"https://Stackoverflow.com/questions/29214157",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3676858/"
] | I could not make this work at all with Redmine version 2.5.2.stable. The only thing that worked for me is:
POST /issues/[id]/watchers.[format]
where watchers.json is:
{"user\_id": "11"}
It makes sense since the watchers table references the issue and the issue contains no reference to watchers. | ```
<watcher_user_ids>1333</watcher_user_ids>
<watcher_user_ids>1614</watcher_user_ids>
``` |
29,214,157 | I need to create Redmine issues through api. I have an xml draft, that is posted to the redmine by wget.exe. The xml looks like:
```
<?xml version="1.0" encoding="utf-8"?>
<issue>
<project_id>145</project_id>
<tracker_id>10</tracker_id>
<category_id>885</category_id>
<subject>subj</subject>
<description>desc... | 2015/03/23 | [
"https://Stackoverflow.com/questions/29214157",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3676858/"
] | I could not make this work at all with Redmine version 2.5.2.stable. The only thing that worked for me is:
POST /issues/[id]/watchers.[format]
where watchers.json is:
{"user\_id": "11"}
It makes sense since the watchers table references the issue and the issue contains no reference to watchers. | I had the same problem. To solve I changed XML to JSON format and everything worked perfectly:
```
{
"issue": {
"project_id": 145,
"category_id": 885
"subject": "subj",
"description": "descript",
"watcher_user_ids": ["133","1614"]
}
}
``` |
29,214,157 | I need to create Redmine issues through api. I have an xml draft, that is posted to the redmine by wget.exe. The xml looks like:
```
<?xml version="1.0" encoding="utf-8"?>
<issue>
<project_id>145</project_id>
<tracker_id>10</tracker_id>
<category_id>885</category_id>
<subject>subj</subject>
<description>desc... | 2015/03/23 | [
"https://Stackoverflow.com/questions/29214157",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3676858/"
] | I could not make this work at all with Redmine version 2.5.2.stable. The only thing that worked for me is:
POST /issues/[id]/watchers.[format]
where watchers.json is:
{"user\_id": "11"}
It makes sense since the watchers table references the issue and the issue contains no reference to watchers. | You have to add a line for each watcher you want to add.
```
<watcher_user_ids>1333</watcher_user_ids>
<watcher_user_ids>1614</watcher_user_ids>
```
In this example 2 watchers will be added. |
1,355,169 | I am running Firefox 90.0 on Ubuntu Mate 18.04 32-bit. It seems that Firefox'es tabs and menu bar are optimized for smartphones as they are twice as high as the bars of all other programs. My netbook has a small screen and so I'd like to reduce them to ordinary size. How/is that possible? | 2021/07/31 | [
"https://askubuntu.com/questions/1355169",
"https://askubuntu.com",
"https://askubuntu.com/users/927284/"
] | **OPTION ONE:**
First, go to `about:config` in your URL bar.
Then, search for `browser.compactmode.show` and change the value to `true` .
Finally, go to the **Hamburger-Menu** > **More-tools** > **Customize-toolbar** and at the bottom of the page, click **Density** and select **Compact**.
---
**OPTION TWO (recomme... | If you are referring to the header bar in Firefox v90 then there are facilities to remove it.
* Click on the 3 lines (so called hamburger) icon to open Firefox menu.
* Click `More Tools` then `"Customise …`” menu option to open new Customise Firefox
tab.
* Finally un-check the “Title Bar” check-box in the bottom-left.... |
57,817,659 | I want to set `VersionSuffix` from `Build.Sourcebranch` but this fails since `SourceBranch` contains `refs/heads/<branchname>`.
```
- task: DotNetCoreCLI@2
condition: succeeded()
inputs:
command: 'pack'
versioningScheme: ByPrereleaseNumber
majorVersion: '0'
minorVersion: '1'
patchVersion: '1... | 2019/09/06 | [
"https://Stackoverflow.com/questions/57817659",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/72312/"
] | As @4c74356b41 pointed out. You can try adding powershell scripts to replace the Build.SourceBranch in your yaml build definition. And output the new sourcebranch to a new variable. Then you can use the new variable in the next steps.
Below is just a simple example. [Click here](https://learn.microsoft.com/en-us/azur... | I don't think you can do something like that natively yet, what I've been doing is the following:
```
- bash: |
date=$(date --rfc-3339=ns | sed "s/ /T/; s/\(\....\).*-/\1-/g")
echo "##vso[task.setvariable variable=CONTAINER_BUILD_TIME]$date"
```
basically using a script step to set a specific value for... |
57,817,659 | I want to set `VersionSuffix` from `Build.Sourcebranch` but this fails since `SourceBranch` contains `refs/heads/<branchname>`.
```
- task: DotNetCoreCLI@2
condition: succeeded()
inputs:
command: 'pack'
versioningScheme: ByPrereleaseNumber
majorVersion: '0'
minorVersion: '1'
patchVersion: '1... | 2019/09/06 | [
"https://Stackoverflow.com/questions/57817659",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/72312/"
] | For others finding this through searches, there is now a replace expression: [MS Doc](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/expressions?view=azure-devops#replace)
Roughly like this to replace underscores with hypens:
```
variables:
suffix: $[replace(variables['build.sourcebranchname... | I don't think you can do something like that natively yet, what I've been doing is the following:
```
- bash: |
date=$(date --rfc-3339=ns | sed "s/ /T/; s/\(\....\).*-/\1-/g")
echo "##vso[task.setvariable variable=CONTAINER_BUILD_TIME]$date"
```
basically using a script step to set a specific value for... |
57,817,659 | I want to set `VersionSuffix` from `Build.Sourcebranch` but this fails since `SourceBranch` contains `refs/heads/<branchname>`.
```
- task: DotNetCoreCLI@2
condition: succeeded()
inputs:
command: 'pack'
versioningScheme: ByPrereleaseNumber
majorVersion: '0'
minorVersion: '1'
patchVersion: '1... | 2019/09/06 | [
"https://Stackoverflow.com/questions/57817659",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/72312/"
] | For others finding this through searches, there is now a replace expression: [MS Doc](https://learn.microsoft.com/en-us/azure/devops/pipelines/process/expressions?view=azure-devops#replace)
Roughly like this to replace underscores with hypens:
```
variables:
suffix: $[replace(variables['build.sourcebranchname... | As @4c74356b41 pointed out. You can try adding powershell scripts to replace the Build.SourceBranch in your yaml build definition. And output the new sourcebranch to a new variable. Then you can use the new variable in the next steps.
Below is just a simple example. [Click here](https://learn.microsoft.com/en-us/azur... |
61,577 | What can I do to develop my muscle for generating themes, purposes, and content, as very often I haven't used it, focusing mostly on style? | 2022/03/11 | [
"https://writers.stackexchange.com/questions/61577",
"https://writers.stackexchange.com",
"https://writers.stackexchange.com/users/25421/"
] | Copyright protects an arrangement of words, a "work", not the ideas behind that work. Even characters, while potentially protected by trademark, are not covered by copyright (though in a commercially published fiction of any consequence, especially one of a well-selling series or franchise, it's pretty likely the chara... | I'm not a lawyer, but my understanding is copyright is about intellectual property. I created the idea, therefore I own it.
If a news outlet re-writes a story, they weren't there. They don't own the intellectual property. Somebody else does.
Why should I benefit from somebody else's work? If I re-write a novel using ... |
61,577 | What can I do to develop my muscle for generating themes, purposes, and content, as very often I haven't used it, focusing mostly on style? | 2022/03/11 | [
"https://writers.stackexchange.com/questions/61577",
"https://writers.stackexchange.com",
"https://writers.stackexchange.com/users/25421/"
] | Copyright attaches to a work by the act of publication, or sharing the work for the purpose of publication.
A newspapers/websites own their original stories. Those stories that they publish gain copyright protection.
If an organization reproduces other source articles verbatim and without permission, then they are at... | I'm not a lawyer, but my understanding is copyright is about intellectual property. I created the idea, therefore I own it.
If a news outlet re-writes a story, they weren't there. They don't own the intellectual property. Somebody else does.
Why should I benefit from somebody else's work? If I re-write a novel using ... |
412 | I think we're getting too many **"Game Like ..."** questions, like [this](https://boardgames.stackexchange.com/questions/3054/games-of-the-same-strategy-and-depth-as-puerto-rico-that-play-in-90-minutes-or-le) and [that](https://boardgames.stackexchange.com/questions/1619/games-of-the-same-depth-and-play-time-as-race-fo... | 2011/03/30 | [
"https://boardgames.meta.stackexchange.com/questions/412",
"https://boardgames.meta.stackexchange.com",
"https://boardgames.meta.stackexchange.com/users/96/"
] | Personally, I'm not a fan of any such questions.
I feel that there is no one objective answer to them and that makes such questions unsuitable for a Q&A site.
This site cannot compete straight up with BGG (and shouldn't). This isn't a forum, and extensive back and forth discussions aren't handled well, by design. If ... | I completely agree that the questions are very subjective, and I suppose they do not follow the guidelines of objective Q&A. But this site isn't really making itself very attractive for the casual viewer. I guess what it boils down to is that I don't really think there's a market for a site that does absolute nothing b... |
412 | I think we're getting too many **"Game Like ..."** questions, like [this](https://boardgames.stackexchange.com/questions/3054/games-of-the-same-strategy-and-depth-as-puerto-rico-that-play-in-90-minutes-or-le) and [that](https://boardgames.stackexchange.com/questions/1619/games-of-the-same-depth-and-play-time-as-race-fo... | 2011/03/30 | [
"https://boardgames.meta.stackexchange.com/questions/412",
"https://boardgames.meta.stackexchange.com",
"https://boardgames.meta.stackexchange.com/users/96/"
] | Personally, I'm not a fan of any such questions.
I feel that there is no one objective answer to them and that makes such questions unsuitable for a Q&A site.
This site cannot compete straight up with BGG (and shouldn't). This isn't a forum, and extensive back and forth discussions aren't handled well, by design. If ... | I believe recommendation questions were covered, primarily on Gaming.
<http://blog.stackoverflow.com/2010/11/the-pee-wee-herman-rule/>
>
> If we get an excellent user who asks a *good, thoughtful* ["game like..."] question and sticks around in our community to participate, then it’s worth allowing it in those rare c... |
412 | I think we're getting too many **"Game Like ..."** questions, like [this](https://boardgames.stackexchange.com/questions/3054/games-of-the-same-strategy-and-depth-as-puerto-rico-that-play-in-90-minutes-or-le) and [that](https://boardgames.stackexchange.com/questions/1619/games-of-the-same-depth-and-play-time-as-race-fo... | 2011/03/30 | [
"https://boardgames.meta.stackexchange.com/questions/412",
"https://boardgames.meta.stackexchange.com",
"https://boardgames.meta.stackexchange.com/users/96/"
] | Personally, I'm not a fan of any such questions.
I feel that there is no one objective answer to them and that makes such questions unsuitable for a Q&A site.
This site cannot compete straight up with BGG (and shouldn't). This isn't a forum, and extensive back and forth discussions aren't handled well, by design. If ... | **"Game Like"** questions can be objective if written properly. **"Game Like"** answers can be objective if answered properly.
I believe some criteria can be applied to these questions to help keep things objective. The ultimate goal is to have a good question with a definitive answer. And some of these questions do h... |
412 | I think we're getting too many **"Game Like ..."** questions, like [this](https://boardgames.stackexchange.com/questions/3054/games-of-the-same-strategy-and-depth-as-puerto-rico-that-play-in-90-minutes-or-le) and [that](https://boardgames.stackexchange.com/questions/1619/games-of-the-same-depth-and-play-time-as-race-fo... | 2011/03/30 | [
"https://boardgames.meta.stackexchange.com/questions/412",
"https://boardgames.meta.stackexchange.com",
"https://boardgames.meta.stackexchange.com/users/96/"
] | I believe recommendation questions were covered, primarily on Gaming.
<http://blog.stackoverflow.com/2010/11/the-pee-wee-herman-rule/>
>
> If we get an excellent user who asks a *good, thoughtful* ["game like..."] question and sticks around in our community to participate, then it’s worth allowing it in those rare c... | I completely agree that the questions are very subjective, and I suppose they do not follow the guidelines of objective Q&A. But this site isn't really making itself very attractive for the casual viewer. I guess what it boils down to is that I don't really think there's a market for a site that does absolute nothing b... |
412 | I think we're getting too many **"Game Like ..."** questions, like [this](https://boardgames.stackexchange.com/questions/3054/games-of-the-same-strategy-and-depth-as-puerto-rico-that-play-in-90-minutes-or-le) and [that](https://boardgames.stackexchange.com/questions/1619/games-of-the-same-depth-and-play-time-as-race-fo... | 2011/03/30 | [
"https://boardgames.meta.stackexchange.com/questions/412",
"https://boardgames.meta.stackexchange.com",
"https://boardgames.meta.stackexchange.com/users/96/"
] | I believe recommendation questions were covered, primarily on Gaming.
<http://blog.stackoverflow.com/2010/11/the-pee-wee-herman-rule/>
>
> If we get an excellent user who asks a *good, thoughtful* ["game like..."] question and sticks around in our community to participate, then it’s worth allowing it in those rare c... | **"Game Like"** questions can be objective if written properly. **"Game Like"** answers can be objective if answered properly.
I believe some criteria can be applied to these questions to help keep things objective. The ultimate goal is to have a good question with a definitive answer. And some of these questions do h... |
93,865 | As we now [know for certain](http://www.westeros.org/Citadel/SSM/Entry/1206/), the World of Ice and Fire (Game of Thrones) is round. Well, we note that the southernmost known or charted area - specifically Sothoryos - are tropical jungle lands. This suggests they're close to the equator, rather than to the south pole.
... | 2015/06/26 | [
"https://scifi.stackexchange.com/questions/93865",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/16835/"
] | **tl;dr:** The short answer is, we have no idea what's down there.
---
When *The Lands of Ice and Fire* was released, it included a map of what was considered the "known world" -- Westeros, Essos, and Sothoryos. It also included a fourth map of a place called Ulthos, which may or may not be a continent. Ulthos is eas... | This region is unexplored, so no one in the story really knows. GRRM touches on this in a series of answers [regarding geographical information](http://www.westeros.org/Citadel/SSM/Entry/Geographical_Information/):
>
> There will be new maps in each book, so the pieces will gradually come together... but I am not sur... |
93,865 | As we now [know for certain](http://www.westeros.org/Citadel/SSM/Entry/1206/), the World of Ice and Fire (Game of Thrones) is round. Well, we note that the southernmost known or charted area - specifically Sothoryos - are tropical jungle lands. This suggests they're close to the equator, rather than to the south pole.
... | 2015/06/26 | [
"https://scifi.stackexchange.com/questions/93865",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/16835/"
] | **tl;dr:** The short answer is, we have no idea what's down there.
---
When *The Lands of Ice and Fire* was released, it included a map of what was considered the "known world" -- Westeros, Essos, and Sothoryos. It also included a fourth map of a place called Ulthos, which may or may not be a continent. Ulthos is eas... | *[The Lands of Ice and Fire](http://awoiaf.westeros.org/index.php/The_Lands_of_Ice_and_Fire)* depicts a map of *The Known World*:
[](https://i.stack.imgur.com/oTBGx.jpg)
We can see that to the South of the known continents of Westeros and Essos, ther... |
3,315,088 | I need to serialize a color used in a WPF application to a database. I'd like to use the sRGB values, because they're more familiar to those of us that have spent the last few years doing web development.
How can a get an ARGB string (like #FFFFFFFF) from a System.Windows.Media.Color object?
**UPDATE**: I was misled ... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3315088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19112/"
] | This answer is for GDI colors, and not WPF, so might not be much help.
You can get the HTML color string (and back) like this
```
System.Drawing.Color c = System.Drawing.ColorTranslator.FromHtml("#F5F7F8");
String strHtmlColor = System.Drawing.ColorTranslator.ToHtml(c);
```
[here](http://msdn.microsoft.com/en-us/li... | You can get the A, R, G and B values from a Color instance as bytes, so you just need to convert the bytes to hex and concatenate the hex values as strings.
[byte[] to hex string](https://stackoverflow.com/questions/623104/c-byte-to-hex-string) |
3,315,088 | I need to serialize a color used in a WPF application to a database. I'd like to use the sRGB values, because they're more familiar to those of us that have spent the last few years doing web development.
How can a get an ARGB string (like #FFFFFFFF) from a System.Windows.Media.Color object?
**UPDATE**: I was misled ... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3315088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19112/"
] | You can also do it this way:
```
string myHex = new ColorConverter().ConvertToString(myColor);
``` | There is inbuild implementation for System.Windows.Media.Color toString() method which gives hexcode of the color.
Snippet from the class interface it self
```
//
// Summary:
// Creates a string representation of the color using the sRGB channels.
//
// Returns:
// ... |
3,315,088 | I need to serialize a color used in a WPF application to a database. I'd like to use the sRGB values, because they're more familiar to those of us that have spent the last few years doing web development.
How can a get an ARGB string (like #FFFFFFFF) from a System.Windows.Media.Color object?
**UPDATE**: I was misled ... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3315088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19112/"
] | There is inbuild implementation for System.Windows.Media.Color toString() method which gives hexcode of the color.
Snippet from the class interface it self
```
//
// Summary:
// Creates a string representation of the color using the sRGB channels.
//
// Returns:
// ... | You can get the A, R, G and B values from a Color instance as bytes, so you just need to convert the bytes to hex and concatenate the hex values as strings.
[byte[] to hex string](https://stackoverflow.com/questions/623104/c-byte-to-hex-string) |
3,315,088 | I need to serialize a color used in a WPF application to a database. I'd like to use the sRGB values, because they're more familiar to those of us that have spent the last few years doing web development.
How can a get an ARGB string (like #FFFFFFFF) from a System.Windows.Media.Color object?
**UPDATE**: I was misled ... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3315088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19112/"
] | If you create your colors using either Color.FromRgb or Color.FromArgb instead of FromScRgb you should get a hex string result from ToString.
If you want to do it manually
```
string.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", c.A, c.R, c.G, c.B);
```
You can use int.Parse(,NumberStyles.HexNumber) to go the other way.
No... | There is inbuild implementation for System.Windows.Media.Color toString() method which gives hexcode of the color.
Snippet from the class interface it self
```
//
// Summary:
// Creates a string representation of the color using the sRGB channels.
//
// Returns:
// ... |
3,315,088 | I need to serialize a color used in a WPF application to a database. I'd like to use the sRGB values, because they're more familiar to those of us that have spent the last few years doing web development.
How can a get an ARGB string (like #FFFFFFFF) from a System.Windows.Media.Color object?
**UPDATE**: I was misled ... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3315088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19112/"
] | If you create your colors using either Color.FromRgb or Color.FromArgb instead of FromScRgb you should get a hex string result from ToString.
If you want to do it manually
```
string.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", c.A, c.R, c.G, c.B);
```
You can use int.Parse(,NumberStyles.HexNumber) to go the other way.
No... | This answer is for GDI colors, and not WPF, so might not be much help.
You can get the HTML color string (and back) like this
```
System.Drawing.Color c = System.Drawing.ColorTranslator.FromHtml("#F5F7F8");
String strHtmlColor = System.Drawing.ColorTranslator.ToHtml(c);
```
[here](http://msdn.microsoft.com/en-us/li... |
3,315,088 | I need to serialize a color used in a WPF application to a database. I'd like to use the sRGB values, because they're more familiar to those of us that have spent the last few years doing web development.
How can a get an ARGB string (like #FFFFFFFF) from a System.Windows.Media.Color object?
**UPDATE**: I was misled ... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3315088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19112/"
] | If you create your colors using either Color.FromRgb or Color.FromArgb instead of FromScRgb you should get a hex string result from ToString.
If you want to do it manually
```
string.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", c.A, c.R, c.G, c.B);
```
You can use int.Parse(,NumberStyles.HexNumber) to go the other way.
No... | I created a struct to handle conversion and serialisation. It solves two problems for me: it is serialisable and it corrects the spelling ;)
```
[Serializable]
public struct Colour
{
public byte A;
public byte R;
public byte G;
public byte B;
public Colour(byte a, byte r, byte g, byte b)
... |
3,315,088 | I need to serialize a color used in a WPF application to a database. I'd like to use the sRGB values, because they're more familiar to those of us that have spent the last few years doing web development.
How can a get an ARGB string (like #FFFFFFFF) from a System.Windows.Media.Color object?
**UPDATE**: I was misled ... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3315088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19112/"
] | You can also do it this way:
```
string myHex = new ColorConverter().ConvertToString(myColor);
``` | You can get the A, R, G and B values from a Color instance as bytes, so you just need to convert the bytes to hex and concatenate the hex values as strings.
[byte[] to hex string](https://stackoverflow.com/questions/623104/c-byte-to-hex-string) |
3,315,088 | I need to serialize a color used in a WPF application to a database. I'd like to use the sRGB values, because they're more familiar to those of us that have spent the last few years doing web development.
How can a get an ARGB string (like #FFFFFFFF) from a System.Windows.Media.Color object?
**UPDATE**: I was misled ... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3315088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19112/"
] | I created a struct to handle conversion and serialisation. It solves two problems for me: it is serialisable and it corrects the spelling ;)
```
[Serializable]
public struct Colour
{
public byte A;
public byte R;
public byte G;
public byte B;
public Colour(byte a, byte r, byte g, byte b)
... | There is inbuild implementation for System.Windows.Media.Color toString() method which gives hexcode of the color.
Snippet from the class interface it self
```
//
// Summary:
// Creates a string representation of the color using the sRGB channels.
//
// Returns:
// ... |
3,315,088 | I need to serialize a color used in a WPF application to a database. I'd like to use the sRGB values, because they're more familiar to those of us that have spent the last few years doing web development.
How can a get an ARGB string (like #FFFFFFFF) from a System.Windows.Media.Color object?
**UPDATE**: I was misled ... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3315088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19112/"
] | If you create your colors using either Color.FromRgb or Color.FromArgb instead of FromScRgb you should get a hex string result from ToString.
If you want to do it manually
```
string.Format("#{0:X2}{1:X2}{2:X2}{3:X2}", c.A, c.R, c.G, c.B);
```
You can use int.Parse(,NumberStyles.HexNumber) to go the other way.
No... | You can also do it this way:
```
string myHex = new ColorConverter().ConvertToString(myColor);
``` |
3,315,088 | I need to serialize a color used in a WPF application to a database. I'd like to use the sRGB values, because they're more familiar to those of us that have spent the last few years doing web development.
How can a get an ARGB string (like #FFFFFFFF) from a System.Windows.Media.Color object?
**UPDATE**: I was misled ... | 2010/07/23 | [
"https://Stackoverflow.com/questions/3315088",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/19112/"
] | I created a struct to handle conversion and serialisation. It solves two problems for me: it is serialisable and it corrects the spelling ;)
```
[Serializable]
public struct Colour
{
public byte A;
public byte R;
public byte G;
public byte B;
public Colour(byte a, byte r, byte g, byte b)
... | This answer is for GDI colors, and not WPF, so might not be much help.
You can get the HTML color string (and back) like this
```
System.Drawing.Color c = System.Drawing.ColorTranslator.FromHtml("#F5F7F8");
String strHtmlColor = System.Drawing.ColorTranslator.ToHtml(c);
```
[here](http://msdn.microsoft.com/en-us/li... |
63,092,885 | Im making a test app for a friend, on the Samsung S20.
The Samsung S20 has a ToF (Time of Flight) camera facing the back.
I will like to display the ToF image preview & regular camera preview on a `TextureView` side by side.
Im able to get the ToF sensor and convert its raw output to visual output using a color mask... | 2020/07/25 | [
"https://Stackoverflow.com/questions/63092885",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1204749/"
] | If you want to actually covert an Image in JPEG format to a Bitmap, you can't just copy the bytes over, as you do with:
```
Log.i(TAG,"AFTER width:"+width+",height:"+height);
//***here bitmap is black
bitmap = Bitmap.createBitmap(width, height, Bitmap.Config.... | I don't quite understand what you're trying to achieve, but maybe I can push you in the right direction.
JPG is a compressed file format, so using it for a camera preview is a no-go. You generally want to let Camera directly draw onto the TextureView without any compression.
You did leave a comment that you need to d... |
50,955,547 | Here's my code so far:
```
import numpy as np
import pandas as pd
df = pd.read_excel(r'file.xlsx', index_col=0)
```
Here's what it looks like:
[](https://i.stack.imgur.com/RAWIj.png)
I want to rename the "Unnamed: \*" columns to the last valid name... | 2018/06/20 | [
"https://Stackoverflow.com/questions/50955547",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4443378/"
] | I did the following, i think it maintains the order you seek.
```
df = pd.read_excel('book1.xlsx')
print df
a b c Unnamed: 3 Unnamed: 4 d Unnamed: 6 e Unnamed: 8 f
0 34 13 73 nan nan 87 nan 76 nan 36
1 70 48 1 nan nan 88 nan 2 ... | Something that could work:
```
df.columns = df.columns.where(~df.columns.str.startswith('Unnamed')).to_series().ffill()
```
, full example:
```
import numpy as np
import pandas as pd
df = pd.DataFrame(columns=['First', 'Unnamed: 1', 'Unnamed: 2','Second', 'Unnamed: 3'])
df.columns = df.columns.where(~df.columns.s... |
50,955,547 | Here's my code so far:
```
import numpy as np
import pandas as pd
df = pd.read_excel(r'file.xlsx', index_col=0)
```
Here's what it looks like:
[](https://i.stack.imgur.com/RAWIj.png)
I want to rename the "Unnamed: \*" columns to the last valid name... | 2018/06/20 | [
"https://Stackoverflow.com/questions/50955547",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4443378/"
] | I did the following, i think it maintains the order you seek.
```
df = pd.read_excel('book1.xlsx')
print df
a b c Unnamed: 3 Unnamed: 4 d Unnamed: 6 e Unnamed: 8 f
0 34 13 73 nan nan 87 nan 76 nan 36
1 70 48 1 nan nan 88 nan 2 ... | The problem you are running into has to do with the fact that columns and the index are `pd.Index` objects. The fillna method of a pandas Index does not take the same arguments that the fillna methods for pandas Series or DataFrame take.
I made a toy example below:
```
import pandas as pd
import numpy as np
df = pd.D... |
12,840 | I got two answers to a story-identification question, pointing to the **same series**. And the time marked for the two answers is the very same minute.
I still have to check if it is right series, (at first sight it does look so, but I'll have to do some more checking).
But when and if I am convinced both answers are ... | 2019/12/18 | [
"https://scifi.meta.stackexchange.com/questions/12840",
"https://scifi.meta.stackexchange.com",
"https://scifi.meta.stackexchange.com/users/115682/"
] | You have several options:
* **Do nothing**
As the questioner you never have an obligation to do anything with answers. When you receive any answer you can choose to comment on it, vote on it, flag it, or accept it, but you don’t have to do any of those. Here too you can do nothing if you so desire.
* **Upvote both an... | Paulie\_D's answer was earlier by 11 seconds ([22:58:11 vs. 22:58:22](https://scifi.stackexchange.com/posts/224677/timeline)).
Assuming you feel that the two answers ***are of otherwise equal quality***, I'd suggest you reward the one that was sooner. |
3,099,535 | We have a fairly lengthy build process, and so its nice to be able to see the build output / log of the build while the build is in still in progress.
Is there any way of doing this with CruiseControl.Net / MSBuild? | 2010/06/23 | [
"https://Stackoverflow.com/questions/3099535",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/113141/"
] | I'm not sure there's a way of doing it in CruiseControl.Net. But have you tried [TeamCity](http://www.jetbrains.com/teamcity/)? As a long time CC fan, I've just switched to TeamCity (they have a free Professional version which supports 20 configurations and 3 build/test servers).
Continuous build log reporting is one ... | Change the verbosity on the MSBuild execution. Note the /v:normal below.
You'll get lots of detail with that:)
```
<msbuild>
<executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>c:\yada</workingDirectory>
<projectFile>yada.sln</projectFile>
<buildArgs>/... |
360,646 | I am having trouble finding the inverse Laplace transform of: $$\frac{1}{s^2-9s+20}$$
I tried writing it in a different way:
$L^{-1}\{\frac{1}{(s-\frac{9}{2})^2-(\frac{1}{2})^2}\}=2L^{-1}\{\frac{\frac{1}{2}}{(s-\frac{9}{2})^2-(\frac{1}{2})^2}\}$
Can someone help ? | 2013/04/13 | [
"https://math.stackexchange.com/questions/360646",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/-1/"
] | I'll give you a hint, because I think it might be useful for you to get practice. If you need more tell in comment: try rewriting this using partial fractions and then use the linearity of the inverse laplace. | I have done it:
$$\begin{array}{l}
X(s) = \frac{1}{{{s^2} - 9s + 20}} = \frac{1}{{(s - 4)(s - 5)}} = \frac{{ - 1}}{{s - 4}} + \frac{1}{{s - 5}} \\
= > x(t) = - {e^{4t}} + {e^{5t}} \\
\end{array}$$ |
30,740,002 | I am new to a WebSphere Commerce Enterprise v6.0 environment that has already been set up. I was wondering what would be the most definitive way for me to determine which servers are used as Production, which are used as Staging and which are used for Testing? | 2015/06/09 | [
"https://Stackoverflow.com/questions/30740002",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3777207/"
] | The error message is misleading, the problem is that
`SCNetworkReachabilityCreateWithAddress()` does not return an
unmanaged object anymore, so you must not call
`takeRetainedValue()`:
```
var zeroAddress = sockaddr_in()
zeroAddress.sin_len = UInt8(sizeofValue(zeroAddress))
zeroAddress.sin_family = sa_family_t(AF_IN... | Swift 3:
```
var zeroAddress = sockaddr_in()
zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress))
zeroAddress.sin_family = sa_family_t(AF_INET)
let defaultRouteReachability = withUnsafePointer(to: &zeroAddress, {
_ = $0.withMemoryRebound(to: sockaddr.self, capacity: 1) { zeroSockAddress in
... |
30,740,002 | I am new to a WebSphere Commerce Enterprise v6.0 environment that has already been set up. I was wondering what would be the most definitive way for me to determine which servers are used as Production, which are used as Staging and which are used for Testing? | 2015/06/09 | [
"https://Stackoverflow.com/questions/30740002",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3777207/"
] | The error message is misleading, the problem is that
`SCNetworkReachabilityCreateWithAddress()` does not return an
unmanaged object anymore, so you must not call
`takeRetainedValue()`:
```
var zeroAddress = sockaddr_in()
zeroAddress.sin_len = UInt8(sizeofValue(zeroAddress))
zeroAddress.sin_family = sa_family_t(AF_IN... | Swift3 use this
```
var zeroAddress = sockaddr_in(sin_len: 0, sin_family: 0, sin_port: 0, sin_addr: in_addr(s_addr: 0), sin_zero: (0, 0, 0, 0, 0, 0, 0, 0))
zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress))
zeroAddress.sin_family = sa_family_t(AF_INET)
let defaul... |
30,740,002 | I am new to a WebSphere Commerce Enterprise v6.0 environment that has already been set up. I was wondering what would be the most definitive way for me to determine which servers are used as Production, which are used as Staging and which are used for Testing? | 2015/06/09 | [
"https://Stackoverflow.com/questions/30740002",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3777207/"
] | Swift 3:
```
var zeroAddress = sockaddr_in()
zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress))
zeroAddress.sin_family = sa_family_t(AF_INET)
let defaultRouteReachability = withUnsafePointer(to: &zeroAddress, {
_ = $0.withMemoryRebound(to: sockaddr.self, capacity: 1) { zeroSockAddress in
... | Swift3 use this
```
var zeroAddress = sockaddr_in(sin_len: 0, sin_family: 0, sin_port: 0, sin_addr: in_addr(s_addr: 0), sin_zero: (0, 0, 0, 0, 0, 0, 0, 0))
zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress))
zeroAddress.sin_family = sa_family_t(AF_INET)
let defaul... |
14,656,712 | I'm attempting to read a file's datemodified value, but I've been unable to do so. I'm continually receiving "Inappropriate I/O control operation" errors. This is a windows directory structure that I'm attempting read. I've attempted to pass through the full file-path along with the file name ($outputFilePath."/".$file... | 2013/02/01 | [
"https://Stackoverflow.com/questions/14656712",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2030881/"
] | How about <https://github.com/vjeux/jParser> - This library looks promising. | This uses HTML5 typed arrays so it does require a [modern browser](http://caniuse.com/#feat=typedarrays)
```
function strToU32(str) {
var u8 = new Uint8Array(str.length);
str.split("").forEach(function(char,i){
var code = char.charCodeAt(0);
u8[i] = code;
})
var u32 = new Uint32Array... |
14,656,712 | I'm attempting to read a file's datemodified value, but I've been unable to do so. I'm continually receiving "Inappropriate I/O control operation" errors. This is a windows directory structure that I'm attempting read. I've attempted to pass through the full file-path along with the file name ($outputFilePath."/".$file... | 2013/02/01 | [
"https://Stackoverflow.com/questions/14656712",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2030881/"
] | Here's a slightly different approach - doesn't need the character types. Uses multiplication as a bit shifting technique. I wrote it so it will still work when str.length is not a multiple of 4 - but you did in fact state in your question that it would be...
Note - I did not try to do "clever coding" - so I made sure ... | How about <https://github.com/vjeux/jParser> - This library looks promising. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.