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 |
|---|---|---|---|---|---|
38,367,398 | Is there a way to set hangfire recurring jobs every few seconds?
I do not seek a solution where fire and forget task creates another fire and forget task, and if not, what are suggested alternatives? | 2016/07/14 | [
"https://Stackoverflow.com/questions/38367398",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3645827/"
] | Not sure when this became supported but tried this in ASP.NET Core 2.0 with Hangfire 1.7.0. The following code schedules a job every 20 seconds:
```
RecurringJob.AddOrUpdate<SomeJob>(
x => x.DoWork(),
"*/20 * * * * *");
```
If I am not mistaken 6 tokens (as opposed to standard 5 tokens) is supported due to H... | Hangfire doesn't support intervals of less than a minute for recurring jobs.
Why? Imagine if they allowed less than a minute: let say 1 sec. How frequently would hangfire check recurring jobs in the database? This would cause a lot of database IO.
See [this discussion](https://discuss.hangfire.io/t/recurring-job-ev... |
3,467,159 | Let $A \subseteq \mathbb{R}$. Let $f:A \rightarrow \mathbb{R}$ be continuous function.
If $A$ is bounded, is $f(A)$ necessarily bounded?
If $A$ is closed, is $f(A)$ necessarily closed?
Does $f$ must be uniformly continuous to preserve those properties? and not only continuous?
I manage to figure out that if $f$ uni... | 2019/12/07 | [
"https://math.stackexchange.com/questions/3467159",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/732563/"
] | **HINT**: Try an *unbounded* closed subset for $A$. | Let $f(x)=e^{-1/(x^{2}+1)}$ for $x\in\mathbb{R}$, $1$ is an accumulation point of $f(\mathbb{R})$ which does not belong to $f(\mathbb{R})$, so $f(\mathbb{R})$ is not closed. |
3,467,159 | Let $A \subseteq \mathbb{R}$. Let $f:A \rightarrow \mathbb{R}$ be continuous function.
If $A$ is bounded, is $f(A)$ necessarily bounded?
If $A$ is closed, is $f(A)$ necessarily closed?
Does $f$ must be uniformly continuous to preserve those properties? and not only continuous?
I manage to figure out that if $f$ uni... | 2019/12/07 | [
"https://math.stackexchange.com/questions/3467159",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/732563/"
] | $(0,1)$ is bounded and $f: (0,1)\to \mathbb{R}: x \mapsto \frac{1}{x}$ is unbounded.
---
$\mathbb{R}$ is closed and $\arctan: \mathbb{R} \to [\frac{-\pi}{2},\frac{\pi}{2}]$ maps $\mathbb{R}$ onto the set $(\frac{-\pi}{2},\frac{\pi}{2})$, which is not closed.
---
Interestingly, if $A \subseteq \mathbb{R}$ is closed ... | Let $f(x)=e^{-1/(x^{2}+1)}$ for $x\in\mathbb{R}$, $1$ is an accumulation point of $f(\mathbb{R})$ which does not belong to $f(\mathbb{R})$, so $f(\mathbb{R})$ is not closed. |
40,122,472 | I am stuck with issue of setting 'Maxlength' to Spring 'Form:Input' tag. It is not reflecting in HTML
Spring Code:
```
<form:input path="admin[${loop.index}].firstName" id="firstName${loop.index}" cssClass="required" maxlength="64" />
```
Output in Browser:
```
<input name="admin[0].firstName" type="text" class="... | 2016/10/19 | [
"https://Stackoverflow.com/questions/40122472",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1382647/"
] | Converting comment to answer
>
> Spring `<form input>` tag supports `maxlength` here is the [document](http://docs.spring.io/spring/docs/current/spring-framework-reference/html/spring-form-tld.html#spring-form.tld.input):
>
>
>
Spring tag library supports almost all the jsp attributes with some extra feature to ... | I think your web.xml file is for JSP 2.0. If you are having problems accessing EL on specific pages try adding the following to the top of the individual JSP page:
```
<%@ page isELIgnored="false" %>
```
if you are using JSP 2.0 I think that EL is ignored by default so you can can add the following to your web.xml t... |
72,343,003 | Roblox Leaderstats aren't updating correctly.
When told to update leaderstats, it sometimes doesn't update, and other times, it only updates once.
Code is below:
```
game.ReplicatedStorage.sleep.OnServerEvent:Connect(function(plr)
local en = plr.leaderstats.Energy
en.Value += 1
print(en.value)
wait()
... | 2022/05/23 | [
"https://Stackoverflow.com/questions/72343003",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/14918501/"
] | I completely forgot to answer this, but I am using +=, you would assume it would add to the current amount as the hint says, but it doesn't
Old Code: `en.Value += 1`
What I do now: `en.Value = en.Value + 1` | You are declaring the "en" variable right before you add one to the value in this function. This means that every time you run this code, you will reset the "en" variable. If you declare the variable outside of the scope of this function, it should get rid of your issues. |
6,881,650 | The following snippet of code is in php but I've seen developers of other web programming languages hash random numbers.
```
if ($loginValid=='yes') {
$token = sha256(generateRandomNumber());
$_SESSION["token"] = $token;
$_SESSION["userid"] = $id;
setcookie("authenticationtoken", $token, ...)
}
```
s... | 2011/07/30 | [
"https://Stackoverflow.com/questions/6881650",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/784637/"
] | My *guess* is that it's just a simple way of getting a hash of a known size, independently of the size that `generateRandomNumber()` returns. Obviously if `generateRandomNumber()` has a small range, that will be reflected in the number of distinct hashes returned too. | Assuming that GenerateRandomNumber does not have a random seed, i.e it is a truly cryptographically secure random number, a salt won't be required. Remember that the purpose of a salt is to ensure that if the same input is used to a hash function, it will return two different results.
If token simply needs to be a sec... |
365,280 | I recently marked over $100$ assignments for a multivariable calculus course. One question which a lot of people did poorly was proving a given set was open. Aside from issues relating to rigour and logic (or lack thereof), I noticed an issue that I wasn't as aware of before this experience. A lot of students used Engl... | 2013/04/18 | [
"https://math.stackexchange.com/questions/365280",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/39599/"
] | Charles Wells, *The Handbook of Mathematical Discourse*; it’s available as a PDF [here](https://www.abstractmath.org/Handbook/handbook.pdf). His site [abstractmath.org](http://www.abstractmath.org/MM/MMIntro.htm) may also be useful. | Again ('cos I've recommended it before) I can very warmly recommend getting your students to beg/borrow/buy and then **read** the excellent
>
> Daniel J. Velleman, *How to Prove it: A Structured Approach* (CUP, 1994 and much reprinted, and now into a second edition).
>
>
>
From the blurb: "Many students have trou... |
365,280 | I recently marked over $100$ assignments for a multivariable calculus course. One question which a lot of people did poorly was proving a given set was open. Aside from issues relating to rigour and logic (or lack thereof), I noticed an issue that I wasn't as aware of before this experience. A lot of students used Engl... | 2013/04/18 | [
"https://math.stackexchange.com/questions/365280",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/39599/"
] | Charles Wells, *The Handbook of Mathematical Discourse*; it’s available as a PDF [here](https://www.abstractmath.org/Handbook/handbook.pdf). His site [abstractmath.org](http://www.abstractmath.org/MM/MMIntro.htm) may also be useful. | I'm using
>
> Franco Vivaldi *Mathematical Writing* (Springer Undergraduate Mathematics Series)
>
>
>
which I find very useful. It contains many definitions of basic mathematical objects (sets, maps...) as well as examples of proves. |
365,280 | I recently marked over $100$ assignments for a multivariable calculus course. One question which a lot of people did poorly was proving a given set was open. Aside from issues relating to rigour and logic (or lack thereof), I noticed an issue that I wasn't as aware of before this experience. A lot of students used Engl... | 2013/04/18 | [
"https://math.stackexchange.com/questions/365280",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/39599/"
] | Again ('cos I've recommended it before) I can very warmly recommend getting your students to beg/borrow/buy and then **read** the excellent
>
> Daniel J. Velleman, *How to Prove it: A Structured Approach* (CUP, 1994 and much reprinted, and now into a second edition).
>
>
>
From the blurb: "Many students have trou... | I'm using
>
> Franco Vivaldi *Mathematical Writing* (Springer Undergraduate Mathematics Series)
>
>
>
which I find very useful. It contains many definitions of basic mathematical objects (sets, maps...) as well as examples of proves. |
15,549,591 | I just want to use `crypt()` to generate an encrypted password,and I write a demo which invoke the `crypt()` method.
Here is my code
```
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("%s\n",crypt("abc","ab"));
exit(0);
}
```
I compile it using `"gcc tem.c -lcrypt'` and when ... | 2013/03/21 | [
"https://Stackoverflow.com/questions/15549591",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1198331/"
] | You need this:
```
#define _XOPEN_SOURCE
```
at the top of your source file, before any `#include`.
Alternatively compile with the gcc option `-D_XOPEN_SOURCE`. | Looks like it could be related to crypto library support.
Try adding:
```
#include <crypt.h>
[mstanislav@pardalislabs ~]$ gcc tem.c -lcrypt
[mstanislav@pardalislabs ~]$ ./a.out
abFZSxKKdq5s6
```
Looks good for me! |
15,549,591 | I just want to use `crypt()` to generate an encrypted password,and I write a demo which invoke the `crypt()` method.
Here is my code
```
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("%s\n",crypt("abc","ab"));
exit(0);
}
```
I compile it using `"gcc tem.c -lcrypt'` and when ... | 2013/03/21 | [
"https://Stackoverflow.com/questions/15549591",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1198331/"
] | If you compile with the flag `-Wall` you will see why.
If you read the [manual page](http://linux.die.net/man/3/crypt) you will see that it uses `#define _XOPEN_SOURCE` before including `<unistd.h>`. It should actually be defined before including *any* header.
If you don't define `_XOPEN_SOURCE` then the `crypt` func... | You need this:
```
#define _XOPEN_SOURCE
```
at the top of your source file, before any `#include`.
Alternatively compile with the gcc option `-D_XOPEN_SOURCE`. |
15,549,591 | I just want to use `crypt()` to generate an encrypted password,and I write a demo which invoke the `crypt()` method.
Here is my code
```
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
printf("%s\n",crypt("abc","ab"));
exit(0);
}
```
I compile it using `"gcc tem.c -lcrypt'` and when ... | 2013/03/21 | [
"https://Stackoverflow.com/questions/15549591",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1198331/"
] | If you compile with the flag `-Wall` you will see why.
If you read the [manual page](http://linux.die.net/man/3/crypt) you will see that it uses `#define _XOPEN_SOURCE` before including `<unistd.h>`. It should actually be defined before including *any* header.
If you don't define `_XOPEN_SOURCE` then the `crypt` func... | Looks like it could be related to crypto library support.
Try adding:
```
#include <crypt.h>
[mstanislav@pardalislabs ~]$ gcc tem.c -lcrypt
[mstanislav@pardalislabs ~]$ ./a.out
abFZSxKKdq5s6
```
Looks good for me! |
29,032,714 | I am trying to use named route in another route like this, but it doesnt work.
```
Route::get('/home', ['as' => 'home', 'uses' => 'HomeController@index']);
Route::post(route('home'), '.....');
``` | 2015/03/13 | [
"https://Stackoverflow.com/questions/29032714",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4591381/"
] | You can use `Seq.map2` to compare corresponding values then sum the differences:
```
let hamming s1 s2 = Seq.map2((=)) s1 s2 |> Seq.sumBy(fun b -> if b then 0 else 1)
``` | Maybe consider this <http://davefancher.com/tag/hamming-distance/>? Or is there any particular reason that it is not meeting your requirements? From the linked page:
```
let hammingDistance (source : string) (target : string) =
if source.Length <> target.Length then failwith "Strings must be equal length"
Array.z... |
11,030,022 | Question
--------
What is a good way of assigning a default value to an optional parameter?
Background
----------
I'm playing around with *optional* parameters in JavaScript, and the idea of assigning a default value if a parameter is not specified. My method in question accepts two parameters, the latter of which I... | 2012/06/14 | [
"https://Stackoverflow.com/questions/11030022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259656/"
] | Better solution is to use named arguments wraped in a object. It keeps your code clean and prevents errors in case of complex functions (with many default and non-default arguments). Otherwise you need to remember about the order of arguments and assign default values based on the types of arguments present (that's wha... | **If** you consider `null`(as well as no args passed), `undefined` and `""`(empty string) as "*not an argument has passed to my function*" use this statement:
```
toggle = toggle&&toggle||default_value
```
Now if you pass `null`, `undefined` or `""` to your function as `toggle` arg, this line fills it with `default_... |
11,030,022 | Question
--------
What is a good way of assigning a default value to an optional parameter?
Background
----------
I'm playing around with *optional* parameters in JavaScript, and the idea of assigning a default value if a parameter is not specified. My method in question accepts two parameters, the latter of which I... | 2012/06/14 | [
"https://Stackoverflow.com/questions/11030022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259656/"
] | Better solution is to use named arguments wraped in a object. It keeps your code clean and prevents errors in case of complex functions (with many default and non-default arguments). Otherwise you need to remember about the order of arguments and assign default values based on the types of arguments present (that's wha... | Take a look at [jQuery extend](http://api.jquery.com/jQuery.extend/) and how they handle optional parameters. |
11,030,022 | Question
--------
What is a good way of assigning a default value to an optional parameter?
Background
----------
I'm playing around with *optional* parameters in JavaScript, and the idea of assigning a default value if a parameter is not specified. My method in question accepts two parameters, the latter of which I... | 2012/06/14 | [
"https://Stackoverflow.com/questions/11030022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259656/"
] | Better solution is to use named arguments wraped in a object. It keeps your code clean and prevents errors in case of complex functions (with many default and non-default arguments). Otherwise you need to remember about the order of arguments and assign default values based on the types of arguments present (that's wha... | You can use this construction for optional parameters in your code:
```
//...
optionalParam = optionalParam || 'some default value';
```
In your concrete exaple it would be something like this:
```
this.selectItem = function(item, toggle)
{
toggle = toggle || false;
// ...
}
```
But in your case you could ... |
11,030,022 | Question
--------
What is a good way of assigning a default value to an optional parameter?
Background
----------
I'm playing around with *optional* parameters in JavaScript, and the idea of assigning a default value if a parameter is not specified. My method in question accepts two parameters, the latter of which I... | 2012/06/14 | [
"https://Stackoverflow.com/questions/11030022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259656/"
] | You can use this construction for optional parameters in your code:
```
//...
optionalParam = optionalParam || 'some default value';
```
In your concrete exaple it would be something like this:
```
this.selectItem = function(item, toggle)
{
toggle = toggle || false;
// ...
}
```
But in your case you could ... | Try it the other way around:
```
param = typeof param === 'boolean' && param;
```
This will make sure all are a boolean, see [this fiddle](http://jsfiddle.net/nLAAt/3/) |
11,030,022 | Question
--------
What is a good way of assigning a default value to an optional parameter?
Background
----------
I'm playing around with *optional* parameters in JavaScript, and the idea of assigning a default value if a parameter is not specified. My method in question accepts two parameters, the latter of which I... | 2012/06/14 | [
"https://Stackoverflow.com/questions/11030022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259656/"
] | Better solution is to use named arguments wraped in a object. It keeps your code clean and prevents errors in case of complex functions (with many default and non-default arguments). Otherwise you need to remember about the order of arguments and assign default values based on the types of arguments present (that's wha... | You can replace
```
param = param && typeof param === 'boolean';
```
with
```
param = !!(param && typeof param === 'boolean');
```
This will convert the result of the statement to the boolean negate, and then negate it back again. |
11,030,022 | Question
--------
What is a good way of assigning a default value to an optional parameter?
Background
----------
I'm playing around with *optional* parameters in JavaScript, and the idea of assigning a default value if a parameter is not specified. My method in question accepts two parameters, the latter of which I... | 2012/06/14 | [
"https://Stackoverflow.com/questions/11030022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259656/"
] | Why do you check the parameter to be boolean, if you expect an other result? The usual way would be checking for `typeof toggle != "undefined"`, but in your case
```
toggle = Boolean(toggle);
```
should do the task. You can also use the shortcut `!!toggle`, or use it directly in the if-clause:
```
if (toggle) { // ... | It can easilly be done with [ArgueJS](https://github.com/zvictor/ArgueJs):
```
this.selectItem = function()
{
arguments = __({item: undefined, toggle: [Boolean, false})
if (arguments.toggle)
{
// ...
}
}
```
---
You can also check the type of `item` by changing `undefined` by the desired type. |
11,030,022 | Question
--------
What is a good way of assigning a default value to an optional parameter?
Background
----------
I'm playing around with *optional* parameters in JavaScript, and the idea of assigning a default value if a parameter is not specified. My method in question accepts two parameters, the latter of which I... | 2012/06/14 | [
"https://Stackoverflow.com/questions/11030022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259656/"
] | You can use this construction for optional parameters in your code:
```
//...
optionalParam = optionalParam || 'some default value';
```
In your concrete exaple it would be something like this:
```
this.selectItem = function(item, toggle)
{
toggle = toggle || false;
// ...
}
```
But in your case you could ... | It can easilly be done with [ArgueJS](https://github.com/zvictor/ArgueJs):
```
this.selectItem = function()
{
arguments = __({item: undefined, toggle: [Boolean, false})
if (arguments.toggle)
{
// ...
}
}
```
---
You can also check the type of `item` by changing `undefined` by the desired type. |
11,030,022 | Question
--------
What is a good way of assigning a default value to an optional parameter?
Background
----------
I'm playing around with *optional* parameters in JavaScript, and the idea of assigning a default value if a parameter is not specified. My method in question accepts two parameters, the latter of which I... | 2012/06/14 | [
"https://Stackoverflow.com/questions/11030022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259656/"
] | **If** you consider `null`(as well as no args passed), `undefined` and `""`(empty string) as "*not an argument has passed to my function*" use this statement:
```
toggle = toggle&&toggle||default_value
```
Now if you pass `null`, `undefined` or `""` to your function as `toggle` arg, this line fills it with `default_... | Take a look at [jQuery extend](http://api.jquery.com/jQuery.extend/) and how they handle optional parameters. |
11,030,022 | Question
--------
What is a good way of assigning a default value to an optional parameter?
Background
----------
I'm playing around with *optional* parameters in JavaScript, and the idea of assigning a default value if a parameter is not specified. My method in question accepts two parameters, the latter of which I... | 2012/06/14 | [
"https://Stackoverflow.com/questions/11030022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259656/"
] | A very simple way to check if toggle is undefined, and if it is then set a default value:
`if (toggle === undefined) toggle = "<your default value>";`
Note that this does not change `toggle` if it is specified but of another type than what you expected. | Why do you check the parameter to be boolean, if you expect an other result? The usual way would be checking for `typeof toggle != "undefined"`, but in your case
```
toggle = Boolean(toggle);
```
should do the task. You can also use the shortcut `!!toggle`, or use it directly in the if-clause:
```
if (toggle) { // ... |
11,030,022 | Question
--------
What is a good way of assigning a default value to an optional parameter?
Background
----------
I'm playing around with *optional* parameters in JavaScript, and the idea of assigning a default value if a parameter is not specified. My method in question accepts two parameters, the latter of which I... | 2012/06/14 | [
"https://Stackoverflow.com/questions/11030022",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/259656/"
] | Why do you check the parameter to be boolean, if you expect an other result? The usual way would be checking for `typeof toggle != "undefined"`, but in your case
```
toggle = Boolean(toggle);
```
should do the task. You can also use the shortcut `!!toggle`, or use it directly in the if-clause:
```
if (toggle) { // ... | Take a look at [jQuery extend](http://api.jquery.com/jQuery.extend/) and how they handle optional parameters. |
6,566,725 | C:\Users\ifcdu1\Desktop\MTWater\src\Fish.as:87: 1067: Implicit coercion of a value of type String to an unrelated type Food.
can someone tell me why i am getting this error? i am trying to access the x,y values of a object of type Food in my array which holds food objects
```
public function loop(e:Event):void
{
... | 2011/07/04 | [
"https://Stackoverflow.com/questions/6566725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/267738/"
] | ```
for each(var i:Food in foodDroppedArray)
{
if(getDistance(this.x - i.x , this.y - i.y) < 100)
{
if(!i.eaten)
moveToFood(newFood);
else if(i.eaten)
updatePosition();
else
updatePosition();
}
}
```
You forgot to add the `each` keyword after `fo... | You're just missing `each`:
```
for each (var i:Food in foodDroppedArray);
```
ActionScript has three for loops, `for`, `for..in`, and `for each..in`. The first loops through a counter. The second loops through keys of an object. The last loops through values in a collection. |
6,566,725 | C:\Users\ifcdu1\Desktop\MTWater\src\Fish.as:87: 1067: Implicit coercion of a value of type String to an unrelated type Food.
can someone tell me why i am getting this error? i am trying to access the x,y values of a object of type Food in my array which holds food objects
```
public function loop(e:Event):void
{
... | 2011/07/04 | [
"https://Stackoverflow.com/questions/6566725",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/267738/"
] | The "for each" loop needs the "each" part, and you should not put in a semi-colon(;) at the end of the line. So it should look like this:
```
for each (var i:Food in foodDroppedArray)
{
if (getDistance(this.x - foodDroppedArray[i].x , this.y - foodDroppedArray[i].y) < 100)
{
if(!i.eaten)
{
... | You're just missing `each`:
```
for each (var i:Food in foodDroppedArray);
```
ActionScript has three for loops, `for`, `for..in`, and `for each..in`. The first loops through a counter. The second loops through keys of an object. The last loops through values in a collection. |
24,938,769 | Code:
Header file:
```
@interface game : UIViewController
{
UIImageView *anh[8][8];
}
-(void)SwipeToMove:(id)sender;
@end
```
Implementation file:
```
- (void)viewDidLoad
{
[super viewDidLoad];
UISwipeGestureRecognizer *move = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selecto... | 2014/07/24 | [
"https://Stackoverflow.com/questions/24938769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3873672/"
] | Assuming you want the whole input line printed (if not, update your question):
```
awk '!seen[$5,$6]++' file1 file2
```
Given your updated question:
```
$ awk '{cnt[$0]++} END{for (rec in cnt) if (cnt[rec] == 1) print rec}' file
649963661 3
649963655 8
64963661 3
649963655 3
```
and if you care about preserving i... | Just tell sort to use columns 5 and 6 and to unique:
```
sort -u -k5,6 file1 file2
``` |
24,938,769 | Code:
Header file:
```
@interface game : UIViewController
{
UIImageView *anh[8][8];
}
-(void)SwipeToMove:(id)sender;
@end
```
Implementation file:
```
- (void)viewDidLoad
{
[super viewDidLoad];
UISwipeGestureRecognizer *move = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selecto... | 2014/07/24 | [
"https://Stackoverflow.com/questions/24938769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3873672/"
] | Just tell sort to use columns 5 and 6 and to unique:
```
sort -u -k5,6 file1 file2
``` | Try this `awk`:
```
awk '{ ++a[$5, $6]; b[$5, $6] = $0 } END { for (i in a) if (a[i] == 1) print b[i] }' file
```
And in order:
```
awk '{ key = $5 "|" $6 } !a[key]++ { b[key] = $0; keys[i++] = key } END { for (i = 0; i in keys; ++i) { key = keys[i]; if (a[key] == 1) print b[key] } }' file
``` |
24,938,769 | Code:
Header file:
```
@interface game : UIViewController
{
UIImageView *anh[8][8];
}
-(void)SwipeToMove:(id)sender;
@end
```
Implementation file:
```
- (void)viewDidLoad
{
[super viewDidLoad];
UISwipeGestureRecognizer *move = [[UISwipeGestureRecognizer alloc]initWithTarget:self action:@selecto... | 2014/07/24 | [
"https://Stackoverflow.com/questions/24938769",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3873672/"
] | Assuming you want the whole input line printed (if not, update your question):
```
awk '!seen[$5,$6]++' file1 file2
```
Given your updated question:
```
$ awk '{cnt[$0]++} END{for (rec in cnt) if (cnt[rec] == 1) print rec}' file
649963661 3
649963655 8
64963661 3
649963655 3
```
and if you care about preserving i... | Try this `awk`:
```
awk '{ ++a[$5, $6]; b[$5, $6] = $0 } END { for (i in a) if (a[i] == 1) print b[i] }' file
```
And in order:
```
awk '{ key = $5 "|" $6 } !a[key]++ { b[key] = $0; keys[i++] = key } END { for (i = 0; i in keys; ++i) { key = keys[i]; if (a[key] == 1) print b[key] } }' file
``` |
16,437,497 | I'm trying to customise my rails app navbar and have added the css to application.css. I know that application.css is being correctly referenced, because the app is picking up other styling from it. But the navbar css is trying to override what is already in bootstrap.css, and the app is not recognising it...
applicat... | 2013/05/08 | [
"https://Stackoverflow.com/questions/16437497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1109434/"
] | Try to let your application.css just for 'require' purposes, it will pave your way to track errors as well as take advantage of Rails3 assets pipeline stack.
In your app/assets/stylesheets/application.css:
```
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* ... | You need to load `bootstrap.css` and `bootstrap-responsive.css` and then override your styles. One way is to define a new `bootstrap_and_overrides.css.scss` like so:
```
@import "bootstrap";
@import "bootstrap-responsive";
.well {
box-shadow: 0 0 4px #888888;
border-radius: 0px 0px 0px 0px;
}
// more overrrides
... |
16,437,497 | I'm trying to customise my rails app navbar and have added the css to application.css. I know that application.css is being correctly referenced, because the app is picking up other styling from it. But the navbar css is trying to override what is already in bootstrap.css, and the app is not recognising it...
applicat... | 2013/05/08 | [
"https://Stackoverflow.com/questions/16437497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1109434/"
] | Try to let your application.css just for 'require' purposes, it will pave your way to track errors as well as take advantage of Rails3 assets pipeline stack.
In your app/assets/stylesheets/application.css:
```
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* ... | When you want to override bootstrap with your own style, then your application.css must be loaded after bootstrap definition. |
16,437,497 | I'm trying to customise my rails app navbar and have added the css to application.css. I know that application.css is being correctly referenced, because the app is picking up other styling from it. But the navbar css is trying to override what is already in bootstrap.css, and the app is not recognising it...
applicat... | 2013/05/08 | [
"https://Stackoverflow.com/questions/16437497",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1109434/"
] | When you want to override bootstrap with your own style, then your application.css must be loaded after bootstrap definition. | You need to load `bootstrap.css` and `bootstrap-responsive.css` and then override your styles. One way is to define a new `bootstrap_and_overrides.css.scss` like so:
```
@import "bootstrap";
@import "bootstrap-responsive";
.well {
box-shadow: 0 0 4px #888888;
border-radius: 0px 0px 0px 0px;
}
// more overrrides
... |
20,346,320 | I am trying to send a post request using the Postman chrome extension to my Ruby on Rails app, but i keep getting the error
>
>
> ```
> ActionController::ParameterMissing (param not found: order):
> app/controllers/orders_controller.rb:27:in order_params'
> app/controllers/orders_controller.rb:20:in create
>
> ```
... | 2013/12/03 | [
"https://Stackoverflow.com/questions/20346320",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1753441/"
] | For you to use `params.require(:order)`. the incoming parameters should be something like `{"order"=>...}`
Check the documentation at <http://edgeapi.rubyonrails.org/classes/ActionController/StrongParameters.html> to use Strong Parameters,.
Based on your information about the key-value pairs used, there is no key c... | Probably the params method is requiring something that you don't have. Inspect the params.
This worked for me:
Controller:
```
def progress_params
params.require(:progress).permit(:game_id, :level_id)
end
```
---
View:
```
<%= link_to "Completed", progresses_path(:progress =>{:game_id => @level.game_id.to_i... |
55,342,062 | I have a table with duplicate data in one or two columns. I want to delete duplicate data and keep one record only.
I tried the following code, but it deleted all of the data from my table.
```
DELETE from test del
WHERE EXISTS (
SELECT *
FROM test ex
WHERE ex.name= del.name
);... | 2019/03/25 | [
"https://Stackoverflow.com/questions/55342062",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/10985936/"
] | The solution is to use sshagent function in Jenkins Pipeline
```
sshagent(['SSH_JENKINS_CREDENTIALS_FOR_GIT']) {
sh("git archive --format=tar --remote git@myserver.com:myrepo master |tar xf -")
}
``` | There is no easy way to use a username and password for `ssh` in an automated script. OpenSSH only prompts for username and password on a TTY, which you won't have in an automated script unless you use something like `expect`. Moreover, even if you could do this, most Git servers will only accept an SSH key for authent... |
4,163,734 | I'm trying to do a 301 redirect with mod\_rewrite on a PHP script from an upper directory on my website. The URL I want to redirect looks like this (obviously the querystring is always different).
```
http://www.foo.com/bar/script.php?variable1=bar&variable2=foo
```
And I want to redirect script.php? to the lower le... | 2010/11/12 | [
"https://Stackoverflow.com/questions/4163734",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/490094/"
] | For a vhost config (which i prefer to a htaccess), it would be
```
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/bar/script.php
RewriteRule $ /index.php [R=301,NC]
```
for htaccess it should be
```
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/bar/script.php
RewriteRule $ /index.php [R=3... | You could try something like this:
```
RewriteEngine On
RewriteRule ^bar/script\.php$ http://%{HTTP_HOST}/script.php [QSA,L,R=301]
``` |
1,135 | I dropped my iPhone earlier today. The screen is now full of cracks but the phone still functioning. Is there any cases of DIY style repair being performed? Can anyone share their repair steps for this? | 2010/09/04 | [
"https://apple.stackexchange.com/questions/1135",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/-1/"
] | I went through this myself a couple of weeks ago. Stupid tile floor in my office wouldn't catch my phone at 9.81m/s2. I ended up taking my phone into a mobile repair shop and had them replace the screen (voiding my warranty in the process), but was a hell of a lot cheaper than doing it myself. Took all of about 15 minu... | eBay is a great option for repair kits, you can get them sent globally no matter where you are. Unless perhaps if you are a Nigerian businessman....
Otherwise you can choose an aftermarket iPhone screen repair service, if you are in Perth then www.buddhaiphonerepair.com is a fantastic way to go. |
3,171,887 | I wrote a C# application that is running well on my xp development machine.
When my client is running it on different PC, it seems to freeze on both vista and 7 machines.
I would like to know if there is any issue on running dotnet applications on vista/7.
I compiled the application for both framework 2.0 and 3.5 but i... | 2010/07/03 | [
"https://Stackoverflow.com/questions/3171887",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/382730/"
] | Generally, .NET application should run the same on any Windows version with .NET framework installed. Most common problem that occur are related to the new User Account Control policy in Vista and 7, which prevents applications from accessing areas requiring elevated privileges (which would otherwise run fine under an ... | You do not give much information in order for us to help a great deal.
I would start by trying to recreate the issue locally on a virtual machine (vista one available [here](http://www.microsoft.com/downloads/details.aspx?FamilyId=21EABB90-958F-4B64-B5F1-73D0A413C8EF&displaylang=en)) and then profiling the app with so... |
3,171,887 | I wrote a C# application that is running well on my xp development machine.
When my client is running it on different PC, it seems to freeze on both vista and 7 machines.
I would like to know if there is any issue on running dotnet applications on vista/7.
I compiled the application for both framework 2.0 and 3.5 but i... | 2010/07/03 | [
"https://Stackoverflow.com/questions/3171887",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/382730/"
] | Generally, .NET application should run the same on any Windows version with .NET framework installed. Most common problem that occur are related to the new User Account Control policy in Vista and 7, which prevents applications from accessing areas requiring elevated privileges (which would otherwise run fine under an ... | Ask your client to capture a process dump using Windows Task Manager,
1. In Task Manager, find the process that hangs.
2. Right click and capture a memory dump.
Then you can do some analysis on the dump to see why it hangs.
If you are not familiar with dump analysis, find someone who can help or open a support case... |
3,171,887 | I wrote a C# application that is running well on my xp development machine.
When my client is running it on different PC, it seems to freeze on both vista and 7 machines.
I would like to know if there is any issue on running dotnet applications on vista/7.
I compiled the application for both framework 2.0 and 3.5 but i... | 2010/07/03 | [
"https://Stackoverflow.com/questions/3171887",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/382730/"
] | Generally, .NET application should run the same on any Windows version with .NET framework installed. Most common problem that occur are related to the new User Account Control policy in Vista and 7, which prevents applications from accessing areas requiring elevated privileges (which would otherwise run fine under an ... | csharp applications are supposed to run on vista/win7. This is their home:)
Your problem is not the OS. its your application.
Most probably the application is looking for a file, a folder, something on the client side that is not there and its freezing. this is my experience.
Check for project **independencies** and ... |
559 | About
-----
[rubyoverflow](https://github.com/danmcclain/rubyoverflow) is an ruby wrapper for the Stack Exchange API.
Status
------
Middle of being rewritten. Handles /users/{id}/\* routes along with /sites and /users. Documentation forthcoming
### Known Issues
Not completed
### Documentation
Coming soon
### Li... | 2010/06/06 | [
"https://stackapps.com/questions/559",
"https://stackapps.com",
"https://stackapps.com/users/693/"
] | Its funny how some of the rubyoverflow's sourcecode is incredibly similar to pilha.
<http://github.com/phsr/rubyoverflow/blob/master/lib/rubyoverflow.rb>
<http://github.com/dlt/pilha/blob/master/lib/pilha.rb>
Why not send pull requests to pilha instead of making your own version of it? | Its not bad to borrow someone else's code since you give credit to the person you borrowed the code from. ;-)
The class << self its a shortcut to define a lot of class methods, so instead of doing something like:
```
class MyClass
def MyClass.a_method
end
def MyClass.another_method
end
end
```
You can do:... |
67,828,337 | I tested and copied the regex from <https://regex101.com/> but when I include in my function I get Invalid regular expression: //^[+]?[0-9]{0,1}[-. ]?(?([0-9]{3}))?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm/: Invalid group error
```js
public isPhoneValid(phone: string) : boolean {
if (!phone) {
return true;
... | 2021/06/03 | [
"https://Stackoverflow.com/questions/67828337",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/603380/"
] | The quotations around the regular expression is treating it as a string rather than as a regular expression. Removing them should do the trick. You can also drop the "new RegExp()" constructor all together.
```
const regExp = /^[+]?[0-9]{0,1}[-. ]?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm;
``` | You don't need such a complex statement - you can simply copy-paste the regex with the "/" and "/" characters as the delimiters.
```
const regExp = /^[+]?[0-9]{0,1}[-. ]?\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/gm;
``` |
47,771,008 | I have 2 tables: users and videos
* videos: videoID, userID, timestamp
* users : userID, timestamp
when I want to list all the videos that is created today, I want to limit user entries to 1. So that one user's video is returned from the query maximum. I don't want multiple videos to be returned from the same users. ... | 2017/12/12 | [
"https://Stackoverflow.com/questions/47771008",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4460318/"
] | Join the two tables on the common `userID`, and then use `ROW_NUMBER` with a partition on the user to find the latest video for each user.
```
SELECT videoID, userID, timestamp
FROM
(
SELECT u.userID, v.videoID, v.timestamp,
ROW_NUMBER() OVER (PARTITION BY u.userID ORDER BY v.timestamp DESC) rn
FROM us... | Postgres offers `distinct on`, which is the simplest method for this:
```
select distinct on (v.userid) v.*
from videos v
where timestamp >= current_date
order by v.userid;
```
Note: You do not need the users table, because you are not requesting any columns from this. Also, this assumes that there are no future dat... |
47,771,008 | I have 2 tables: users and videos
* videos: videoID, userID, timestamp
* users : userID, timestamp
when I want to list all the videos that is created today, I want to limit user entries to 1. So that one user's video is returned from the query maximum. I don't want multiple videos to be returned from the same users. ... | 2017/12/12 | [
"https://Stackoverflow.com/questions/47771008",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4460318/"
] | You may want to consider the `max` windowing function:
```
with videoz as (
select
v.*,
max (v.timestamp) over (partition by v.user_id) as max_timestamp
from
videos v
join users u on v.userid = u.user_id
)
select
videoid, userid, timestamp
from videoz
were
timestamp = max_timestamp
```
In the... | Postgres offers `distinct on`, which is the simplest method for this:
```
select distinct on (v.userid) v.*
from videos v
where timestamp >= current_date
order by v.userid;
```
Note: You do not need the users table, because you are not requesting any columns from this. Also, this assumes that there are no future dat... |
62,996,925 | I have a controller function that add columns to table 'custom\_fiels'.
Columns to add comes from table 'custom\_field\_descs'
I want to test that this function adds all expected columns to the table.
My test look like this :
```
describe 'GET /update_db' do
let(:custom_field) { CustomField.create! valid_attributes... | 2020/07/20 | [
"https://Stackoverflow.com/questions/62996925",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3825498/"
] | Javascripts `this` context changes inside event listeners. You can work around this by adding the this context to a seperate variable:
```
class Dialog{
constructor(id){
this._dialogBox = $('.dialog#'+this.id);
this._closeButton = this._dialogBox.find('span.closedialog');
const self = this... | I think this should work for you
```js
this._closeButton.on('click', this.hide.bind(this));
```
Context of this is different in event listener so you should bind your actual `this` to eventListener context |
62,996,925 | I have a controller function that add columns to table 'custom\_fiels'.
Columns to add comes from table 'custom\_field\_descs'
I want to test that this function adds all expected columns to the table.
My test look like this :
```
describe 'GET /update_db' do
let(:custom_field) { CustomField.create! valid_attributes... | 2020/07/20 | [
"https://Stackoverflow.com/questions/62996925",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3825498/"
] | Javascripts `this` context changes inside event listeners. You can work around this by adding the this context to a seperate variable:
```
class Dialog{
constructor(id){
this._dialogBox = $('.dialog#'+this.id);
this._closeButton = this._dialogBox.find('span.closedialog');
const self = this... | Change the onclick function's listener to arrow function if you are using es6+.. arrow functions don't override `this`
```
class Dialog{
constructor(id){
this._dialogBox = $('.dialog#'+this.id);
this._closeButton = this._dialogBox.find('span.closedialog');
this._closeButton.on('click', () ... |
24,698,217 | I have a .csv file with several columns, one of them filled with random numbers and I want to find duplicated values there. In case there are - strange case, but it's what I want to check after all -, I would like to display/store the complete row in which those values are stored.
To make it clear, I have sth like thi... | 2014/07/11 | [
"https://Stackoverflow.com/questions/24698217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3470435/"
] | try this may work for you.
```
entries = []
duplicate_entries = []
with open('in.txt', 'r') as my_file:
for line in my_file:
columns = line.strip().split(',')
if columns[2] not in entries:
entries.append(columns[2])
else:
duplicate_entries.append(columns[2])
if len... | You should create your dictionary like the following so duplicate entries don't overwrite eachother:
```
if(dict.has_key(num) == 0):
dict[num] = []
dict[num].append(val)
else:
dict[num].append(val)
```
Then loop through each list value in the dictionary, if the value for a certain key is greater than ... |
24,698,217 | I have a .csv file with several columns, one of them filled with random numbers and I want to find duplicated values there. In case there are - strange case, but it's what I want to check after all -, I would like to display/store the complete row in which those values are stored.
To make it clear, I have sth like thi... | 2014/07/11 | [
"https://Stackoverflow.com/questions/24698217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3470435/"
] | try this may work for you.
```
entries = []
duplicate_entries = []
with open('in.txt', 'r') as my_file:
for line in my_file:
columns = line.strip().split(',')
if columns[2] not in entries:
entries.append(columns[2])
else:
duplicate_entries.append(columns[2])
if len... | Let's just loop through the file twice:
* first keep track of how many times each single 3rd column is appearing.
* second loop through lines printing those containing a 3rd column that appeared more than once.
See:
```
awk -F, 'FNR==NR{a[$3]++; next}
{if (a[$3]>1) {print}}' file file
```
### Test
```
$ ... |
24,698,217 | I have a .csv file with several columns, one of them filled with random numbers and I want to find duplicated values there. In case there are - strange case, but it's what I want to check after all -, I would like to display/store the complete row in which those values are stored.
To make it clear, I have sth like thi... | 2014/07/11 | [
"https://Stackoverflow.com/questions/24698217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3470435/"
] | try this may work for you.
```
entries = []
duplicate_entries = []
with open('in.txt', 'r') as my_file:
for line in my_file:
columns = line.strip().split(',')
if columns[2] not in entries:
entries.append(columns[2])
else:
duplicate_entries.append(columns[2])
if len... | you can simply get the duplicates lines with `pandas`:
```
import pandas
df = pandas.read_csv(csv_file, names=fields, index_col=False)
df = df[df.duplicated([column_name], keep=False)]
df.to_csv(csv_file2, index=False)
``` |
24,698,217 | I have a .csv file with several columns, one of them filled with random numbers and I want to find duplicated values there. In case there are - strange case, but it's what I want to check after all -, I would like to display/store the complete row in which those values are stored.
To make it clear, I have sth like thi... | 2014/07/11 | [
"https://Stackoverflow.com/questions/24698217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3470435/"
] | You should create your dictionary like the following so duplicate entries don't overwrite eachother:
```
if(dict.has_key(num) == 0):
dict[num] = []
dict[num].append(val)
else:
dict[num].append(val)
```
Then loop through each list value in the dictionary, if the value for a certain key is greater than ... | Let's just loop through the file twice:
* first keep track of how many times each single 3rd column is appearing.
* second loop through lines printing those containing a 3rd column that appeared more than once.
See:
```
awk -F, 'FNR==NR{a[$3]++; next}
{if (a[$3]>1) {print}}' file file
```
### Test
```
$ ... |
24,698,217 | I have a .csv file with several columns, one of them filled with random numbers and I want to find duplicated values there. In case there are - strange case, but it's what I want to check after all -, I would like to display/store the complete row in which those values are stored.
To make it clear, I have sth like thi... | 2014/07/11 | [
"https://Stackoverflow.com/questions/24698217",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3470435/"
] | You should create your dictionary like the following so duplicate entries don't overwrite eachother:
```
if(dict.has_key(num) == 0):
dict[num] = []
dict[num].append(val)
else:
dict[num].append(val)
```
Then loop through each list value in the dictionary, if the value for a certain key is greater than ... | you can simply get the duplicates lines with `pandas`:
```
import pandas
df = pandas.read_csv(csv_file, names=fields, index_col=False)
df = df[df.duplicated([column_name], keep=False)]
df.to_csv(csv_file2, index=False)
``` |
41,021,646 | I'm trying to write a little program which uses realloc(), getchar() and some pointer arithmetic to store an array of characters in the memory.
I have a function called "inputArray" (in convert.c) which receives a pointer to a char (which is NULL to begin with, declared in main.c), then gets reallocated with one char... | 2016/12/07 | [
"https://Stackoverflow.com/questions/41021646",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6219523/"
] | The size of the new allocated array is incorrect. You have to allocate `count + 1` characters.
```
array = realloc(array, ( count + 1 ) * sizeof(char));
```
Take into account that it is more safe to use a temporary pointer to reallocate the memory. Otherwise the original address of the previously allocated memory wi... | You are missing one level of indirection in the inputArray function. It should be declared like
```
void inputArray(char **array)
```
and it should be realloc'd like this (you also need to increase the size of the array by multiplying with `count + 1`)
```
*array = realloc(*array, (count + 1) * sizeof(char));
```
... |
10,629 | We are working on porting our site to Sitecore 9 Update 1.
We have installed Sitecore 9 Update 1 with (WFFM) Web Forms For Marketers 9.0 Update-1 and Solr 6.6.2.
**Issue**:
The contacts are always shown as Unknown as shown below:
[](https://i.sta... | 2018/03/06 | [
"https://sitecore.stackexchange.com/questions/10629",
"https://sitecore.stackexchange.com",
"https://sitecore.stackexchange.com/users/2718/"
] | I had a similar issue. Make sure you follow the below steps exactly as-is and I am sure you will see a difference.
* Update ***IndexerSettings.xml*** file within ***[site\_prefix].xconnect\App\_data\jobs\continuous\IndexWorker\App\_data\Config\Sitecore\SearchIndexer*** to change ***IndexAnonymousContactData*** to true... | The Experience Profile uses facets to display the names and emails. So you will need to set the proper facet (of the correct type and filled data) into the XConnectClient object.
I've done something similar below, I had to create an EmailAddressList facet object in addition to the PersonalInformation facet object to f... |
10,629 | We are working on porting our site to Sitecore 9 Update 1.
We have installed Sitecore 9 Update 1 with (WFFM) Web Forms For Marketers 9.0 Update-1 and Solr 6.6.2.
**Issue**:
The contacts are always shown as Unknown as shown below:
[](https://i.sta... | 2018/03/06 | [
"https://sitecore.stackexchange.com/questions/10629",
"https://sitecore.stackexchange.com",
"https://sitecore.stackexchange.com/users/2718/"
] | I had a similar issue. Make sure you follow the below steps exactly as-is and I am sure you will see a difference.
* Update ***IndexerSettings.xml*** file within ***[site\_prefix].xconnect\App\_data\jobs\continuous\IndexWorker\App\_data\Config\Sitecore\SearchIndexer*** to change ***IndexAnonymousContactData*** to true... | You need to add new custom submit action which will map first name ,last name and email fields to XConnect facet values and store them in XConnect.
In order to achieve this, you need to create Speak dialog, custom submit action and custom class.
Follow this article in Sitecore documentation to achieve this:
<https://... |
47,157,726 | I want to show a Leaderboard (Place, Name, Level) in an embed TextBox.
The thing is, that I HAVE TO put name='smth' in the embed.add\_field function, otherwise it wont work.
But if I do so, it looks like this:
[](https://i.stack.imgur.com/LpXQS.png)
... | 2017/11/07 | [
"https://Stackoverflow.com/questions/47157726",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8608120/"
] | `embed.add_field(name='Title', value="\n".join([place,name,level]), inline=True)` | I fixed my problem doing the following method:
```
place = ''
name = ''
level = ''
for x in character_list:
place += x[0] + '\n'
name += x[1] + '\n'
level += x[2] + '\n'
embed.add_field(name='Platz', value=place, inline=True)
embed.add_field(name='Name', value=name, inline=True)
embed.add_field(name='Level... |
47,157,726 | I want to show a Leaderboard (Place, Name, Level) in an embed TextBox.
The thing is, that I HAVE TO put name='smth' in the embed.add\_field function, otherwise it wont work.
But if I do so, it looks like this:
[](https://i.stack.imgur.com/LpXQS.png)
... | 2017/11/07 | [
"https://Stackoverflow.com/questions/47157726",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8608120/"
] | There's a zero-width whitespace character, \u200b that, if you set the field header text to, the embed will not render the field header. | I fixed my problem doing the following method:
```
place = ''
name = ''
level = ''
for x in character_list:
place += x[0] + '\n'
name += x[1] + '\n'
level += x[2] + '\n'
embed.add_field(name='Platz', value=place, inline=True)
embed.add_field(name='Name', value=name, inline=True)
embed.add_field(name='Level... |
47,157,726 | I want to show a Leaderboard (Place, Name, Level) in an embed TextBox.
The thing is, that I HAVE TO put name='smth' in the embed.add\_field function, otherwise it wont work.
But if I do so, it looks like this:
[](https://i.stack.imgur.com/LpXQS.png)
... | 2017/11/07 | [
"https://Stackoverflow.com/questions/47157726",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8608120/"
] | I fixed my problem doing the following method:
```
place = ''
name = ''
level = ''
for x in character_list:
place += x[0] + '\n'
name += x[1] + '\n'
level += x[2] + '\n'
embed.add_field(name='Platz', value=place, inline=True)
embed.add_field(name='Name', value=name, inline=True)
embed.add_field(name='Level... | Just use the bold tags on a space, so something like this:
```
number = 0
for x in character_list:
if number == 0:
embed.add_field(name='Platz', value=x[0], inline=True)
embed.add_field(name='Name', value=x[1], inline=True)
embed.add_field(name='Level', value=x[2], inline=True)
numb... |
47,157,726 | I want to show a Leaderboard (Place, Name, Level) in an embed TextBox.
The thing is, that I HAVE TO put name='smth' in the embed.add\_field function, otherwise it wont work.
But if I do so, it looks like this:
[](https://i.stack.imgur.com/LpXQS.png)
... | 2017/11/07 | [
"https://Stackoverflow.com/questions/47157726",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8608120/"
] | There's a zero-width whitespace character, \u200b that, if you set the field header text to, the embed will not render the field header. | `embed.add_field(name='Title', value="\n".join([place,name,level]), inline=True)` |
47,157,726 | I want to show a Leaderboard (Place, Name, Level) in an embed TextBox.
The thing is, that I HAVE TO put name='smth' in the embed.add\_field function, otherwise it wont work.
But if I do so, it looks like this:
[](https://i.stack.imgur.com/LpXQS.png)
... | 2017/11/07 | [
"https://Stackoverflow.com/questions/47157726",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8608120/"
] | `embed.add_field(name='Title', value="\n".join([place,name,level]), inline=True)` | Just use the bold tags on a space, so something like this:
```
number = 0
for x in character_list:
if number == 0:
embed.add_field(name='Platz', value=x[0], inline=True)
embed.add_field(name='Name', value=x[1], inline=True)
embed.add_field(name='Level', value=x[2], inline=True)
numb... |
47,157,726 | I want to show a Leaderboard (Place, Name, Level) in an embed TextBox.
The thing is, that I HAVE TO put name='smth' in the embed.add\_field function, otherwise it wont work.
But if I do so, it looks like this:
[](https://i.stack.imgur.com/LpXQS.png)
... | 2017/11/07 | [
"https://Stackoverflow.com/questions/47157726",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8608120/"
] | There's a zero-width whitespace character, \u200b that, if you set the field header text to, the embed will not render the field header. | Just use the bold tags on a space, so something like this:
```
number = 0
for x in character_list:
if number == 0:
embed.add_field(name='Platz', value=x[0], inline=True)
embed.add_field(name='Name', value=x[1], inline=True)
embed.add_field(name='Level', value=x[2], inline=True)
numb... |
2,085,517 | Can anyone please tell me how can I add a new column of type enum to my schema in order to implement a Doctrine Migration? | 2010/01/18 | [
"https://Stackoverflow.com/questions/2085517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/221529/"
] | 1. modify your schema
2. run `./symfony doc:generate-migrations-diff`
this will generate one or more files in lib/migrations/doctrine/
3. run `./symfony doc:migrate`
this will apply the generated migrations to the database
4. run `./symfony doc:build --all-classes`
this works for symfony >= 1.3/1.4 and will rebuild ... | Modify your schema and don't build yet the model. run doctrine schema diff then a migration class will be generated for you. Finally you can rebuild your models/forms/filters |
2,085,517 | Can anyone please tell me how can I add a new column of type enum to my schema in order to implement a Doctrine Migration? | 2010/01/18 | [
"https://Stackoverflow.com/questions/2085517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/221529/"
] | Shortcut:
```
symfony doctrine:build --all-classes --and-migrate
``` | The simplest way to run it from a Doctrine Migration is to register a new mapping. Then you can enforce values inside your entity if need be. ([Doctrine MySQL Enums](http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/cookbook/mysql-enums.html))
```
public function up(Schema $schema)
{
$this->connection-... |
2,085,517 | Can anyone please tell me how can I add a new column of type enum to my schema in order to implement a Doctrine Migration? | 2010/01/18 | [
"https://Stackoverflow.com/questions/2085517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/221529/"
] | 1. modify your schema
2. run `./symfony doc:generate-migrations-diff`
this will generate one or more files in lib/migrations/doctrine/
3. run `./symfony doc:migrate`
this will apply the generated migrations to the database
4. run `./symfony doc:build --all-classes`
this works for symfony >= 1.3/1.4 and will rebuild ... | In case you need to write the migration script yourself, here's an example of the syntax -- I haven't found a proper specification for the syntax anywhere.
```
$this->addColumn('tablename', 'column_name', 'enum', false,
array('fixed' => 1,
'values' =>
... |
2,085,517 | Can anyone please tell me how can I add a new column of type enum to my schema in order to implement a Doctrine Migration? | 2010/01/18 | [
"https://Stackoverflow.com/questions/2085517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/221529/"
] | In case you need to write the migration script yourself, here's an example of the syntax -- I haven't found a proper specification for the syntax anywhere.
```
$this->addColumn('tablename', 'column_name', 'enum', false,
array('fixed' => 1,
'values' =>
... | I had the same problem and found a solution in set this flag in `ProjectConfiguration.class.php`
```
public function configureDoctrine(Doctrine_Manager $manager) {
$manager->setAttribute(Doctrine_Core::ATTR_USE_NATIVE_ENUM, true);
}
```
After that I used this method call and get a native mysql enum:
```
class M... |
2,085,517 | Can anyone please tell me how can I add a new column of type enum to my schema in order to implement a Doctrine Migration? | 2010/01/18 | [
"https://Stackoverflow.com/questions/2085517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/221529/"
] | I had the same problem and found a solution in set this flag in `ProjectConfiguration.class.php`
```
public function configureDoctrine(Doctrine_Manager $manager) {
$manager->setAttribute(Doctrine_Core::ATTR_USE_NATIVE_ENUM, true);
}
```
After that I used this method call and get a native mysql enum:
```
class M... | ```
Model:
column:
type: enum
values: [one, two, three]
(optional:)
notnull: false
default: one #or two or three
``` |
2,085,517 | Can anyone please tell me how can I add a new column of type enum to my schema in order to implement a Doctrine Migration? | 2010/01/18 | [
"https://Stackoverflow.com/questions/2085517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/221529/"
] | Shortcut:
```
symfony doctrine:build --all-classes --and-migrate
``` | I had the same problem and found a solution in set this flag in `ProjectConfiguration.class.php`
```
public function configureDoctrine(Doctrine_Manager $manager) {
$manager->setAttribute(Doctrine_Core::ATTR_USE_NATIVE_ENUM, true);
}
```
After that I used this method call and get a native mysql enum:
```
class M... |
2,085,517 | Can anyone please tell me how can I add a new column of type enum to my schema in order to implement a Doctrine Migration? | 2010/01/18 | [
"https://Stackoverflow.com/questions/2085517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/221529/"
] | 1. modify your schema
2. run `./symfony doc:generate-migrations-diff`
this will generate one or more files in lib/migrations/doctrine/
3. run `./symfony doc:migrate`
this will apply the generated migrations to the database
4. run `./symfony doc:build --all-classes`
this works for symfony >= 1.3/1.4 and will rebuild ... | Shortcut:
```
symfony doctrine:build --all-classes --and-migrate
``` |
2,085,517 | Can anyone please tell me how can I add a new column of type enum to my schema in order to implement a Doctrine Migration? | 2010/01/18 | [
"https://Stackoverflow.com/questions/2085517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/221529/"
] | In case you need to write the migration script yourself, here's an example of the syntax -- I haven't found a proper specification for the syntax anywhere.
```
$this->addColumn('tablename', 'column_name', 'enum', false,
array('fixed' => 1,
'values' =>
... | The simplest way to run it from a Doctrine Migration is to register a new mapping. Then you can enforce values inside your entity if need be. ([Doctrine MySQL Enums](http://docs.doctrine-project.org/projects/doctrine-orm/en/2.1/cookbook/mysql-enums.html))
```
public function up(Schema $schema)
{
$this->connection-... |
2,085,517 | Can anyone please tell me how can I add a new column of type enum to my schema in order to implement a Doctrine Migration? | 2010/01/18 | [
"https://Stackoverflow.com/questions/2085517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/221529/"
] | Shortcut:
```
symfony doctrine:build --all-classes --and-migrate
``` | ```
Model:
column:
type: enum
values: [one, two, three]
(optional:)
notnull: false
default: one #or two or three
``` |
2,085,517 | Can anyone please tell me how can I add a new column of type enum to my schema in order to implement a Doctrine Migration? | 2010/01/18 | [
"https://Stackoverflow.com/questions/2085517",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/221529/"
] | Modify your schema and don't build yet the model. run doctrine schema diff then a migration class will be generated for you. Finally you can rebuild your models/forms/filters | ```
Model:
column:
type: enum
values: [one, two, three]
(optional:)
notnull: false
default: one #or two or three
``` |
69,442,184 | I found several questions about converting the format of date or datetime but it doesn't work.
I used type datetime for 'rdate' and tried to do
SQL Convert Datetime to Date
It should be the easiest and fastest way to convert a DATETIME to a DATE and I used
*SELECT CONVERT(date, rdate) FROM sreservations*;
Unfortuna... | 2021/10/04 | [
"https://Stackoverflow.com/questions/69442184",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/16946256/"
] | From your image, you don't seem to have a datetime, just a date. You can format it (or a datetime, if you did have a datetime) into a string for display in mysql using date\_format:
```
select date_format(rdate, '%d.%m.%Y')
```
if you want it to appear as dd.mm.yyyy. | When creating your table columns which involve the column with date data type,
Use
```
SET DATEFORMAT DMY
```
This is for Microsoft SQL server. |
23,075,403 | I want to change the date format in mm/yyyy. My query like that.
```
select shipwynum,
IF (s.adjdeldat != '', s.adjdeldat,s.condeldat) as -- adjdeldat and condeldat are date type
deliverydate,
FROM ship
Result of that query come in yyyymmdd fromat but i want result in mm/yyyy format.
```
I use DATE... | 2014/04/15 | [
"https://Stackoverflow.com/questions/23075403",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3172670/"
] | ***From the comments and post***:
>
> *Data type is `varchar` for `adjdeldat` and `condeldat` and it save data in* ***`yyyymmdd`*** *or* ***`yyyymm`***
>
>
> *I want to change the date format in* ***`mm/yyyy`***
>
>
> *You mean some data is in* ***`20140415`*** *format and some in* ***`201404`*** *format?*
> ... | *try this:*
```
DATE_FORMAT(NOW(),'%m-%d-%Y')
```
***<http://www.w3schools.com/sql/func_date_format.asp>***
*your code as like:*
```
SELECT DATE_FORMAT(NOW(), '%M %Y');
SELECT DATE_FORMAT(a.date, '%M/%Y') FROM t1 AS a;
```
***<http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-for... |
69,014,269 | [](https://i.stack.imgur.com/0tzvR.png)
**I have tried all solutions on the internet and everywhere but nothing works so if someone can help me to solve this issue and this issue occurs when i try to make build for my Flutter App project**
this is my... | 2021/09/01 | [
"https://Stackoverflow.com/questions/69014269",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/15327167/"
] | It looks like you might be using an old version of the plugin\_platform\_interface package.
you should have a line like this in your pubspec.yaml file:
```
dependencies:
plugin_platform_interface: ^2.0.1
```
note that according to the instructions on pub.dev this package only supports null safety in version 2.0 a... | ```
flutter run --no-sound-null-safety
```
Check this:
[Cannot run with sound null safety because dependencies don't support null safety](https://stackoverflow.com/questions/64917744/cannot-run-with-sound-null-safety-because-dependencies-dont-support-null-safety) |
2,808,101 | I've googled around and only found solution where they suggest putting an apache httpd in front of glassfish. Sure, that works.
But what if I do not wish to/cannot put any thing in front of glassfish?
Without using the index.jsp in the docroot of the domain to have something like:
```
<%
String redirectURL = "ht... | 2010/05/11 | [
"https://Stackoverflow.com/questions/2808101",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/150703/"
] | Maybe you can use [UrlRweriteFilter](http://tuckey.org/urlrewrite/) to redirect users according to defined mappings. [Here](http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/3.2/guide.html) are some examples | Modify the DNS mapping for the given URL in your DNS Server (/etc/host on your local machine) . May not be a feasible solution for you - but it does the work of directing the user. |
2,808,101 | I've googled around and only found solution where they suggest putting an apache httpd in front of glassfish. Sure, that works.
But what if I do not wish to/cannot put any thing in front of glassfish?
Without using the index.jsp in the docroot of the domain to have something like:
```
<%
String redirectURL = "ht... | 2010/05/11 | [
"https://Stackoverflow.com/questions/2808101",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/150703/"
] | I think the solution you dismiss is actually the 'best'...
Write a jsp in the docroot for the server.
If you really have to do something fancier, due to complications that you haven't described, you may want to try creating a new DefaultServer. Look in your domain-dir/config/default-web.xml.
You may want to look at... | Modify the DNS mapping for the given URL in your DNS Server (/etc/host on your local machine) . May not be a feasible solution for you - but it does the work of directing the user. |
2,808,101 | I've googled around and only found solution where they suggest putting an apache httpd in front of glassfish. Sure, that works.
But what if I do not wish to/cannot put any thing in front of glassfish?
Without using the index.jsp in the docroot of the domain to have something like:
```
<%
String redirectURL = "ht... | 2010/05/11 | [
"https://Stackoverflow.com/questions/2808101",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/150703/"
] | Maybe you can use [UrlRweriteFilter](http://tuckey.org/urlrewrite/) to redirect users according to defined mappings. [Here](http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/3.2/guide.html) are some examples | No you can not. When a request comes to your server, there should be a page (HTML/JSP/Servlet) to process that page. That page should do whatever you wanted to do.
So you must create a HTML / JSP / Servlet.
Hope this helps. |
2,808,101 | I've googled around and only found solution where they suggest putting an apache httpd in front of glassfish. Sure, that works.
But what if I do not wish to/cannot put any thing in front of glassfish?
Without using the index.jsp in the docroot of the domain to have something like:
```
<%
String redirectURL = "ht... | 2010/05/11 | [
"https://Stackoverflow.com/questions/2808101",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/150703/"
] | Maybe you can use [UrlRweriteFilter](http://tuckey.org/urlrewrite/) to redirect users according to defined mappings. [Here](http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/3.2/guide.html) are some examples | I think the solution you dismiss is actually the 'best'...
Write a jsp in the docroot for the server.
If you really have to do something fancier, due to complications that you haven't described, you may want to try creating a new DefaultServer. Look in your domain-dir/config/default-web.xml.
You may want to look at... |
2,808,101 | I've googled around and only found solution where they suggest putting an apache httpd in front of glassfish. Sure, that works.
But what if I do not wish to/cannot put any thing in front of glassfish?
Without using the index.jsp in the docroot of the domain to have something like:
```
<%
String redirectURL = "ht... | 2010/05/11 | [
"https://Stackoverflow.com/questions/2808101",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/150703/"
] | I think the solution you dismiss is actually the 'best'...
Write a jsp in the docroot for the server.
If you really have to do something fancier, due to complications that you haven't described, you may want to try creating a new DefaultServer. Look in your domain-dir/config/default-web.xml.
You may want to look at... | No you can not. When a request comes to your server, there should be a page (HTML/JSP/Servlet) to process that page. That page should do whatever you wanted to do.
So you must create a HTML / JSP / Servlet.
Hope this helps. |
33,870,995 | What happens when we try to increment a string in C?
```
#include <stdio.h>
void foobar(char *str1, char *str2)
{
while (*((str1++)+6) == *((str2++)+8));
}
int main(){
char str1[] = "Hello World";
char str2[] = "Foo Bar Bar";
foobar(str1,str2);
printf``("%s %sn",str1, str2);
return 0;
}
```
The outp... | 2015/11/23 | [
"https://Stackoverflow.com/questions/33870995",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5595164/"
] | When you increment a pointer, it points to the next object. Since these are pointers to characters, incrementing them makes them point to the next character. Your `foobar` function just throws away the incremented values though. It doesn't return them. | Check your printf function, there is a letter 'n' that turns 'bar' into 'barn'.
Luckily, foobar function doesnt do anything, otherwise you'd be stuck in a loop, btw. it never enters the while loop but it does increment the two pointers once. :) |
33,870,995 | What happens when we try to increment a string in C?
```
#include <stdio.h>
void foobar(char *str1, char *str2)
{
while (*((str1++)+6) == *((str2++)+8));
}
int main(){
char str1[] = "Hello World";
char str2[] = "Foo Bar Bar";
foobar(str1,str2);
printf``("%s %sn",str1, str2);
return 0;
}
```
The outp... | 2015/11/23 | [
"https://Stackoverflow.com/questions/33870995",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5595164/"
] | I've no idea what you are trying to do but your function `foobar` does nothing as all you do is iterate through the strings on the local variables str1 - changes to which will not be passed back to main.
Well, that's not completely true. `Foobar` could potentially run off the end of the strings and crash the way it is... | Check your printf function, there is a letter 'n' that turns 'bar' into 'barn'.
Luckily, foobar function doesnt do anything, otherwise you'd be stuck in a loop, btw. it never enters the while loop but it does increment the two pointers once. :) |
43,834,159 | I have installed **minishift** on OSX with brew:
```
brew cask install minishift-beta
...
$ minishift version
Minishift version: 1.0.0
```
I have sucessfuly started minishift, and created *node-ex* example application and exported it:
```
$ oc get route
NAME HOST/PORT PATH ... | 2017/05/07 | [
"https://Stackoverflow.com/questions/43834159",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6158057/"
] | Is something on your machine or network blocking DNS queries to `nip.io`? | When playing with Minishift at home, where I am connected to the internet via **Deutsche Telekom**'s VDSL and Speedport-Router, I cannot resolve these **`xip.io`** or **`nip.io`** addresses.
My workaround is to put **`8.8.8.8`** into **`/etc/resolv.conf`** |
43,834,159 | I have installed **minishift** on OSX with brew:
```
brew cask install minishift-beta
...
$ minishift version
Minishift version: 1.0.0
```
I have sucessfuly started minishift, and created *node-ex* example application and exported it:
```
$ oc get route
NAME HOST/PORT PATH ... | 2017/05/07 | [
"https://Stackoverflow.com/questions/43834159",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6158057/"
] | Is something on your machine or network blocking DNS queries to `nip.io`? | I had the same issue on Windows 10. My workaround was to add an entry in `C:\Windows\System32\drivers\etc\hosts` file. Here is an example
`192.160.90.101 nodejs-ex-nodejs-echo.192.160.90.101.nip.io # needed for minishift to work` |
43,834,159 | I have installed **minishift** on OSX with brew:
```
brew cask install minishift-beta
...
$ minishift version
Minishift version: 1.0.0
```
I have sucessfuly started minishift, and created *node-ex* example application and exported it:
```
$ oc get route
NAME HOST/PORT PATH ... | 2017/05/07 | [
"https://Stackoverflow.com/questions/43834159",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6158057/"
] | Thank you @enj. The explanation at <http://nip.io> is clear about how it works.
I have seen that queries to `8.8.8.8` and to my ISP DNS are resolved to my private IP. But it is my router (my primary DNS) which do respond `nip.io`
My router run DD-WRT and has enabled
```
Rebind protection Discard upstream RFC1918 ... | When playing with Minishift at home, where I am connected to the internet via **Deutsche Telekom**'s VDSL and Speedport-Router, I cannot resolve these **`xip.io`** or **`nip.io`** addresses.
My workaround is to put **`8.8.8.8`** into **`/etc/resolv.conf`** |
43,834,159 | I have installed **minishift** on OSX with brew:
```
brew cask install minishift-beta
...
$ minishift version
Minishift version: 1.0.0
```
I have sucessfuly started minishift, and created *node-ex* example application and exported it:
```
$ oc get route
NAME HOST/PORT PATH ... | 2017/05/07 | [
"https://Stackoverflow.com/questions/43834159",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6158057/"
] | Thank you @enj. The explanation at <http://nip.io> is clear about how it works.
I have seen that queries to `8.8.8.8` and to my ISP DNS are resolved to my private IP. But it is my router (my primary DNS) which do respond `nip.io`
My router run DD-WRT and has enabled
```
Rebind protection Discard upstream RFC1918 ... | I had the same issue on Windows 10. My workaround was to add an entry in `C:\Windows\System32\drivers\etc\hosts` file. Here is an example
`192.160.90.101 nodejs-ex-nodejs-echo.192.160.90.101.nip.io # needed for minishift to work` |
9,816,761 | I believe they are the same, a file in XML format as shown in the example below:
```
<definitions name="HelloService"
targetNamespace="http://www.examples.com/wsdl/HelloService.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.ex... | 2012/03/22 | [
"https://Stackoverflow.com/questions/9816761",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1157070/"
] | The difference is subtle. One refers to the WSDL itself (document), the other refers to what the WSDL represents (contract).
WSDL is an XML format for describing web services. That XML content (saved in a file or not) represents the WSDL [document](http://www.webopedia.com/TERM/D/document.html). In a large sense, a do... | WSDL Contract is a concept and belongs to concept of WebService "Contract first approach".
The xml representation which is a concrete representation is known as WSDL document. It define all the details with predefined notations. |
9,816,761 | I believe they are the same, a file in XML format as shown in the example below:
```
<definitions name="HelloService"
targetNamespace="http://www.examples.com/wsdl/HelloService.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.ex... | 2012/03/22 | [
"https://Stackoverflow.com/questions/9816761",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1157070/"
] | The difference is subtle. One refers to the WSDL itself (document), the other refers to what the WSDL represents (contract).
WSDL is an XML format for describing web services. That XML content (saved in a file or not) represents the WSDL [document](http://www.webopedia.com/TERM/D/document.html). In a large sense, a do... | There is no such thing as a WSDL contract. There is a Web Services Contract, and, the WSDL is a part of its technical specification. There are other specifications that can be part of a Web Services contract, such as WS-I's Basic Profile or Basic Security Profile which are not reflected in the WSDL directly, but in how... |
9,816,761 | I believe they are the same, a file in XML format as shown in the example below:
```
<definitions name="HelloService"
targetNamespace="http://www.examples.com/wsdl/HelloService.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.ex... | 2012/03/22 | [
"https://Stackoverflow.com/questions/9816761",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1157070/"
] | WSDL Contract is a concept and belongs to concept of WebService "Contract first approach".
The xml representation which is a concrete representation is known as WSDL document. It define all the details with predefined notations. | There is no such thing as a WSDL contract. There is a Web Services Contract, and, the WSDL is a part of its technical specification. There are other specifications that can be part of a Web Services contract, such as WS-I's Basic Profile or Basic Security Profile which are not reflected in the WSDL directly, but in how... |
648,376 | I have several Amazon AWS EC2 virtual machines that I created on AWS EC2. They were not imported, they were created there. I would like to export these machines in order to achieve local backups, and a local testing environment.
I have looked a lot of places, and found tons of information that says you can only expor... | 2014/12/01 | [
"https://serverfault.com/questions/648376",
"https://serverfault.com",
"https://serverfault.com/users/155268/"
] | 1. Yes pfsense is the perfect tool what you are trying to accomplish, and much more.
2 & 3. pfsense has certain packages that can help e.g. squid proxy and squid guard.
[A simple howto to install squid, squid guard, ACL and blacklisting.](https://www.howtoforge.com/pfsense-squid-squidguard-traffic-shaping-tutorial) | Definitely use Squid proxy. It understands URL's.
Most free firewalls just understand IP addresses and ports right now.
You can do simple IP based filters for source IP's (admins vs normal users)
You can do regex based destination url filters (for blacklist/whitelists)
You can do use authentication to do mo... |
13,087,107 | I am trying to create a car-like thing in 2D using [box2dweb](http://code.google.com/p/box2dweb/). I have a box for the car body and two circles, connected to it by revolute joints, as the wheels. Everything works fine for a while, but gradually the gaps increase between the centers of the wheels and the points on the ... | 2012/10/26 | [
"https://Stackoverflow.com/questions/13087107",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/45269/"
] | It appears the problem was caused by zero position iterations:
```
world.Step(dt, iterations);
```
It seems that in older versions of Box2Djs the prototype of the function was exactly like that. In a newer version, however, it was changed to
```
function (dt, velocityIterations, positionIterations)
```
with all p... | Most likely, reason is in mass of the bodies.
>
> Box2D maunal says:
>
> Chains of bodies connected by joints may stretch if a lighter body is supporting a heavier body. For example, a wrecking ball connect to a chain of light weight bodies may not be stable. Stability degrades as the mass ratio passes 10:1.
>
... |
20,804,667 | I'm trying to implement the functionality for muting the local video `MediaStreamTrack` in my WebRTC application. Here's how I'm approaching this:
```
function muteVideo() {
if (this._localStream && this._localStream.getVideoTracks().length > 0) {
this._localStream.getVideoTracks()[0].enabled = false;
}
}
```... | 2013/12/27 | [
"https://Stackoverflow.com/questions/20804667",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1712145/"
] | I think you can make two requests for getuser media : <http://codepen.io/anon/pen/gjtpu> . Then you can really stop a stream. You will also have to use mutiple peer connection between user since renegociation (adding or removing stream during to an existing peer connection) is not supported by firefox | We solved this by tearing down the local media stream and creating it anew without the video track. Doing it mid-call requires either re-establishing the peer connection or performing renegotiation (triggered by sending a new offer). |
20,804,667 | I'm trying to implement the functionality for muting the local video `MediaStreamTrack` in my WebRTC application. Here's how I'm approaching this:
```
function muteVideo() {
if (this._localStream && this._localStream.getVideoTracks().length > 0) {
this._localStream.getVideoTracks()[0].enabled = false;
}
}
```... | 2013/12/27 | [
"https://Stackoverflow.com/questions/20804667",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1712145/"
] | ### Today
`track.stop()` works just fine in Firefox. Chrome's behind. Spec way to end a track ([https fiddle](https://jsfiddle.net/jib1/ho7kq7k9/)):
```js
navigator.mediaDevices.getUserMedia({video: true, audio: true})
.then(stream => video.srcObject = stream)
.catch(e => log(e.name + ": "+ e.message));
let s... | I think you can make two requests for getuser media : <http://codepen.io/anon/pen/gjtpu> . Then you can really stop a stream. You will also have to use mutiple peer connection between user since renegociation (adding or removing stream during to an existing peer connection) is not supported by firefox |
20,804,667 | I'm trying to implement the functionality for muting the local video `MediaStreamTrack` in my WebRTC application. Here's how I'm approaching this:
```
function muteVideo() {
if (this._localStream && this._localStream.getVideoTracks().length > 0) {
this._localStream.getVideoTracks()[0].enabled = false;
}
}
```... | 2013/12/27 | [
"https://Stackoverflow.com/questions/20804667",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1712145/"
] | ### Today
`track.stop()` works just fine in Firefox. Chrome's behind. Spec way to end a track ([https fiddle](https://jsfiddle.net/jib1/ho7kq7k9/)):
```js
navigator.mediaDevices.getUserMedia({video: true, audio: true})
.then(stream => video.srcObject = stream)
.catch(e => log(e.name + ": "+ e.message));
let s... | We solved this by tearing down the local media stream and creating it anew without the video track. Doing it mid-call requires either re-establishing the peer connection or performing renegotiation (triggered by sending a new offer). |
45,912 | I'm having issues since yesterday after an upgrade. GNOME session got messed up somehow and now i cannot install further upgrades nor new apps. Here is what i got from terminal after doing the recommended `apt-get install -f`;
```
(Reading database ... 166876 files and directories currently installed.)
Preparing to re... | 2011/05/29 | [
"https://askubuntu.com/questions/45912",
"https://askubuntu.com",
"https://askubuntu.com/users/15916/"
] | I disabled GNOME 3 PPA, ran the upgrade, let it use the Ubuntu's original `gnome-session`, and then enabled back GNOME 3 PPA and ran the upgrade again. This time there were no dependency errors. | This sounds like a case of broken packaging in the Gnome 3 packages you're using: The new version of `gnome-session` contains the file `/usr/share/xsessions/gnome-shell.desktop`, which is also owned by the current version of the `gnome-shell` package you've got installed. The error is because of this conflict.
Perhaps... |
39,631,557 | I am using Codeigniter to develop my site and it's running on Apache installed in Ubuntu.
I want to run a cron. I am using Codeigniter routing and I have also removed `index.php` from route.
My controller is home function is winner.
I tried following two ways but no one seems to be working.
```none
#49 5 * * * /usr... | 2016/09/22 | [
"https://Stackoverflow.com/questions/39631557",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3110655/"
] | 1. Check that lynx installed in your system (e.g. command "whereis lynx")
2. Then edit crontab's config (command "crontab -e")
3. Put this command with MAILTO option in your crontab's config (in the same order, on the first line "mailto" option, on the next line other options):
MAILTO=your@email.com
\*/5 \* \* \* \* ... | Try this in your cPanel cron job setup.
This is to run every 5 minutes:
```none
*/5 * * * * curl http://yoursite.com/class/function
```
<https://www.drupal.org/docs/7/setting-up-cron-for-drupal/configuring-cron-jobs-using-the-cron-command> |
22,876 | After the passing of Denethor, Gandalf says the following:
>
> Though the Stewards deemed that it was a secret kept only by themselves, long ago I guessed that here in the White Tower, one at least of the Seven Seeing Stones was preserved. In the days of his wisdom Denethor did not presume to use it, nor to challenge... | 2012/09/01 | [
"https://scifi.stackexchange.com/questions/22876",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/7910/"
] | Well, we have an obvious upper bound of TA 2988 (from Appendices A & B):
>
> 2988 Finduilas dies young.
>
>
> ‘After [Finduilas'] death Denethor became more grim and silent than before, and would sit long alone in his tower deep in thought, foreseeing that the assault of Mordor would come in his time. It was afterw... | Appendix A4 (“Gondor and the Heirs of Anárion”) does tell that story. Denethor's wife, [Finduilas](http://en.wikipedia.org/wiki/Finduilas_of_Dol_Amroth), died a few years he became Steward.
>
> After her death Denethor became more grim and silent than before, and would sit long alone in his tower deep in thought, for... |
22,876 | After the passing of Denethor, Gandalf says the following:
>
> Though the Stewards deemed that it was a secret kept only by themselves, long ago I guessed that here in the White Tower, one at least of the Seven Seeing Stones was preserved. In the days of his wisdom Denethor did not presume to use it, nor to challenge... | 2012/09/01 | [
"https://scifi.stackexchange.com/questions/22876",
"https://scifi.stackexchange.com",
"https://scifi.stackexchange.com/users/7910/"
] | Well, we have an obvious upper bound of TA 2988 (from Appendices A & B):
>
> 2988 Finduilas dies young.
>
>
> ‘After [Finduilas'] death Denethor became more grim and silent than before, and would sit long alone in his tower deep in thought, foreseeing that the assault of Mordor would come in his time. It was afterw... | More is said in Unfinished Tales concerning this matter.
>
> ...when and why Denethor had dared to use the Stone was and remains a matter of conjecture.
>
>
> His 'grimness' was first observable to others after his wife Finduilas died in 2988, but it seems fairly plain that he had at once turned to the Stone as soo... |
56,553,507 | I'm working on an assignment which involves updating the size of a dynamic array to store repeated inputs, with a value of -1 signifying the end of input. When I use this code:
```
bool end = false;
int curr;
int n = 0;
int* currArr = new int[n];
int* temp = NULL;
while (end == false) {
... | 2019/06/12 | [
"https://Stackoverflow.com/questions/56553507",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11600676/"
] | I have not used `xlsx2csv` before but why don't we try `pandas`.
Your requirement can be solved like this:
```
import pandas as pd
for sheet in ['Sheet1', 'Sheet2']:
df = pd.read_excel('my.xlsx', sheetname=sheet)
df.to_csv(sheet + '_output.csv', index=False)
``` | You can do something as the follows:
```
import pandas as pd
xls_file = pd.ExcelFile('<path_to_your_excel_file>')
sheet_names = xls_file.sheet_names
for sheet in sheet_names:
df = xls_file.parse(sheet)
``` |
56,553,507 | I'm working on an assignment which involves updating the size of a dynamic array to store repeated inputs, with a value of -1 signifying the end of input. When I use this code:
```
bool end = false;
int curr;
int n = 0;
int* currArr = new int[n];
int* temp = NULL;
while (end == false) {
... | 2019/06/12 | [
"https://Stackoverflow.com/questions/56553507",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11600676/"
] | I have not used `xlsx2csv` before but why don't we try `pandas`.
Your requirement can be solved like this:
```
import pandas as pd
for sheet in ['Sheet1', 'Sheet2']:
df = pd.read_excel('my.xlsx', sheetname=sheet)
df.to_csv(sheet + '_output.csv', index=False)
``` | Xlsx2csv python implementation:
Could only execute Xlsx2csv with sheetid parameter. In order to get sheet names and ids, [get\_sheet\_details](https://stackoverflow.com/a/63527474/13604080) was used.
csvfrmxlsx creates csv files for each sheet in csv folder under parent directory.
```
import pandas as pd
from pa... |
56,553,507 | I'm working on an assignment which involves updating the size of a dynamic array to store repeated inputs, with a value of -1 signifying the end of input. When I use this code:
```
bool end = false;
int curr;
int n = 0;
int* currArr = new int[n];
int* temp = NULL;
while (end == false) {
... | 2019/06/12 | [
"https://Stackoverflow.com/questions/56553507",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11600676/"
] | You can do something as the follows:
```
import pandas as pd
xls_file = pd.ExcelFile('<path_to_your_excel_file>')
sheet_names = xls_file.sheet_names
for sheet in sheet_names:
df = xls_file.parse(sheet)
``` | Xlsx2csv python implementation:
Could only execute Xlsx2csv with sheetid parameter. In order to get sheet names and ids, [get\_sheet\_details](https://stackoverflow.com/a/63527474/13604080) was used.
csvfrmxlsx creates csv files for each sheet in csv folder under parent directory.
```
import pandas as pd
from pa... |
2,301,505 | I am trying to create popup using the jqueryui dialog. I am trying to add a footer after the content in the dialog.
my dialog should look like
```
<popup>
header-html
content-html
footer-html
</popup>
```
The dialog already has header and i can put content in the div.
But, how can i add the footer html??
I wa... | 2010/02/20 | [
"https://Stackoverflow.com/questions/2301505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/201514/"
] | Just separate out your current content container into a content and footer div:
```
<div class="dialogContent">
<div class="content">Your existing content</div>
<div class="footer">The common footer stuff</div>
</div>
```
Then put that within the content of the dialog. | What does your Html look like? I'd imagine something like this:
```
<div class="popup">
<div class="header"></div>
<div class="content"></div>
<div class="footer"></div>
</div>
```
...and then the glib answer to your question is "the same way you put content into the header and content sections."
In JQuer... |
2,301,505 | I am trying to create popup using the jqueryui dialog. I am trying to add a footer after the content in the dialog.
my dialog should look like
```
<popup>
header-html
content-html
footer-html
</popup>
```
The dialog already has header and i can put content in the div.
But, how can i add the footer html??
I wa... | 2010/02/20 | [
"https://Stackoverflow.com/questions/2301505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/201514/"
] | here's how i do mine... it's not styled, but if you wanted to this is sorta how you could do it.
if you turn a layer with the class "mypopup" into a dialog, then you could do the following:
`$('.mypopup').parent().append('<div id="footer" style="position:absolute;display:none;bottom:0;float:left;width:98%;background-... | What does your Html look like? I'd imagine something like this:
```
<div class="popup">
<div class="header"></div>
<div class="content"></div>
<div class="footer"></div>
</div>
```
...and then the glib answer to your question is "the same way you put content into the header and content sections."
In JQuer... |
2,301,505 | I am trying to create popup using the jqueryui dialog. I am trying to add a footer after the content in the dialog.
my dialog should look like
```
<popup>
header-html
content-html
footer-html
</popup>
```
The dialog already has header and i can put content in the div.
But, how can i add the footer html??
I wa... | 2010/02/20 | [
"https://Stackoverflow.com/questions/2301505",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/201514/"
] | Just separate out your current content container into a content and footer div:
```
<div class="dialogContent">
<div class="content">Your existing content</div>
<div class="footer">The common footer stuff</div>
</div>
```
Then put that within the content of the dialog. | here's how i do mine... it's not styled, but if you wanted to this is sorta how you could do it.
if you turn a layer with the class "mypopup" into a dialog, then you could do the following:
`$('.mypopup').parent().append('<div id="footer" style="position:absolute;display:none;bottom:0;float:left;width:98%;background-... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.