qid int64 1 74.7M | question stringlengths 15 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 4 30.2k | response_k stringlengths 11 36.5k |
|---|---|---|---|---|---|
90,805 | **Premise**
The motivation as to why one would want to give a tidal locked moon a spin is out of the scope of this question. I only want to focus on the feasibility. Suffice to say there could be a few hypothetical reasons such as a night/day cycle for prospective inhabitants.
**Question**
If there is a moon that is... | 2017/09/03 | [
"https://worldbuilding.stackexchange.com/questions/90805",
"https://worldbuilding.stackexchange.com",
"https://worldbuilding.stackexchange.com/users/32966/"
] | There are two contradictory conditions. With current and near future technology, spinning up a moon within 100 years simply isn't possible. We cannot command enough energy to bring in enough asteroids or comets to either strike the body and impart momentum, or arrange flypasts in an attempt to use gravitational torque ... | The only thing I can think of, for large moons, is asteroid bombing on a very low, almost tangential orbit.
That would change mass of the satellite, possibly in a noticeable way.
That would surely produce seismic activity, but that could be concentrated in areas far from settlements (if any) and reduced using many sm... |
59,382,405 | I am trying to load values from a database into a listview, but the listview doesn't seem to be showing the data. I first have a comment class which is in charge of getters and setters for the columns in the db.
```
package com.example.sqlite;
public class Comment {
private long id;
private String name;
p... | 2019/12/17 | [
"https://Stackoverflow.com/questions/59382405",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/12483557/"
] | I believ that the issue is that the **setName** setter is incorrect (you set the name using name which is null, when you should be using **comment** which is the variable passed to the setter).
Using :-
```
/*
public void setName( String comment ) {
this.name = name;
}
*/
public void setName( String comment ) {
... | I think you are using same `open()` method before calling `getAllComments()`
But writing in database and reading in database are not same.
you have to call
```
dbHelper.getReadableDatabase();
```
So you can create a method like
```
//Opening up the connction to the db
public void read() throws SQLException {
... |
51,578 | how to get values from a form(form is in admin panel page) and put that values in separate variables
```
<?php
/*
Plugin Name: calc plugin
*/
add_action('admin_menu', 'my_plugin_menu');
function my_plugin_menu() {
add_options_page('My Plugin Options', 'My Plugin', 8, 'your-unique-ide... | 2012/05/09 | [
"https://wordpress.stackexchange.com/questions/51578",
"https://wordpress.stackexchange.com",
"https://wordpress.stackexchange.com/users/15941/"
] | If you want to add an settings page, (or add options to and existing settings page) please use the [**settings api**](http://codex.wordpress.org/Settings_API):
* [`register_setting`](http://codex.wordpress.org/Function_Reference/register_setting)
* [`add_settings_section`](http://codex.wordpress.org/Function_Reference... | Use the `init` action to handle the posted form. See the [codex for init](http://codex.wordpress.org/Plugin_API/Action_Reference/init) for details and example.
Edit:
```
<?php
/*
Plugin Name: calc plugin
*/
add_action('admin_menu', 'my_plugin_menu');
function my_plugin_menu() {
add_options_page('My Plugin Opt... |
236,406 | Is one more preferred, or performs better over the other? | 2008/10/25 | [
"https://Stackoverflow.com/questions/236406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The last thing you should be worrying about is how fast one of these is. There is no way that checking a string for being an integer is going to be a bottleneck in your code. | If you don't really care if the argument is a int type or a string with numbers, use is\_numeric. It will return true for floats also, tho. |
236,406 | Is one more preferred, or performs better over the other? | 2008/10/25 | [
"https://Stackoverflow.com/questions/236406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | There is also [`is_numeric`](http://php.net/manual/en/function.is-numeric.php) which returns true if passed in value can be parsed as number.
[](https://i.stack.imgur.com/iwREU.png)
If I try to compare performance of functions on **PHP 5.5.30** here ... | ctype **not** always *return false* on integer type.
```
foreach(range(-1000 , 1000)as $num){
if(ctype_digit($num)){
echo $num . ", ";
}
}
```
ctype\_digit return true for the following integer type number.
-78,-77,-71,48,49,50,51,52,53,54,55,56,57,178,179,185,
256,257,258,259,260,261,262,263,26... |
236,406 | Is one more preferred, or performs better over the other? | 2008/10/25 | [
"https://Stackoverflow.com/questions/236406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | [`is_int()`](http://php.net/is_int) returns true if the argument is an integer type, [`ctype_digit()`](http://www.php.net/ctype_digit) takes a string argument and returns true if all the characters in the string are digits.
**Example:**
```
┌──────────┬───────────┬────────────────┐
│ │ is_int: │ ctype_dig... | ctype **not** always *return false* on integer type.
```
foreach(range(-1000 , 1000)as $num){
if(ctype_digit($num)){
echo $num . ", ";
}
}
```
ctype\_digit return true for the following integer type number.
-78,-77,-71,48,49,50,51,52,53,54,55,56,57,178,179,185,
256,257,258,259,260,261,262,263,26... |
236,406 | Is one more preferred, or performs better over the other? | 2008/10/25 | [
"https://Stackoverflow.com/questions/236406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | There is also [`is_numeric`](http://php.net/manual/en/function.is-numeric.php) which returns true if passed in value can be parsed as number.
[](https://i.stack.imgur.com/iwREU.png)
If I try to compare performance of functions on **PHP 5.5.30** here ... | If you don't really care if the argument is a int type or a string with numbers, use is\_numeric. It will return true for floats also, tho. |
236,406 | Is one more preferred, or performs better over the other? | 2008/10/25 | [
"https://Stackoverflow.com/questions/236406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | [`is_int()`](http://php.net/is_int) returns true if the argument is an integer type, [`ctype_digit()`](http://www.php.net/ctype_digit) takes a string argument and returns true if all the characters in the string are digits.
**Example:**
```
┌──────────┬───────────┬────────────────┐
│ │ is_int: │ ctype_dig... | The last thing you should be worrying about is how fast one of these is. There is no way that checking a string for being an integer is going to be a bottleneck in your code. |
236,406 | Is one more preferred, or performs better over the other? | 2008/10/25 | [
"https://Stackoverflow.com/questions/236406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Well it's very interesting :) Here is all story:
>
> **`is_numeric:`** — Finds whether a variable is a number or a numeric string, No matter value is negative or Boolean or String or any type
> of number, if value is purely number it will return **`'true'`** else **`'false'`**.
>
>
> **Remember: No Character Only ... | If you don't really care if the argument is a int type or a string with numbers, use is\_numeric. It will return true for floats also, tho. |
236,406 | Is one more preferred, or performs better over the other? | 2008/10/25 | [
"https://Stackoverflow.com/questions/236406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | There is also [`is_numeric`](http://php.net/manual/en/function.is-numeric.php) which returns true if passed in value can be parsed as number.
[](https://i.stack.imgur.com/iwREU.png)
If I try to compare performance of functions on **PHP 5.5.30** here ... | Ctype\_digit returns false if the range of integer is in negative range or between 0 and 47 or between 58 and 255. You can check ctype\_digit's behavior by using the following snippet.
```
setlocale(LC_ALL, 'en_US.UTF-8');
var_dump(
true === array_every(range(-1000, -1), 'ctype_digit_returns_false'),
true === ... |
236,406 | Is one more preferred, or performs better over the other? | 2008/10/25 | [
"https://Stackoverflow.com/questions/236406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | Well it's very interesting :) Here is all story:
>
> **`is_numeric:`** — Finds whether a variable is a number or a numeric string, No matter value is negative or Boolean or String or any type
> of number, if value is purely number it will return **`'true'`** else **`'false'`**.
>
>
> **Remember: No Character Only ... | Ctype\_digit returns false if the range of integer is in negative range or between 0 and 47 or between 58 and 255. You can check ctype\_digit's behavior by using the following snippet.
```
setlocale(LC_ALL, 'en_US.UTF-8');
var_dump(
true === array_every(range(-1000, -1), 'ctype_digit_returns_false'),
true === ... |
236,406 | Is one more preferred, or performs better over the other? | 2008/10/25 | [
"https://Stackoverflow.com/questions/236406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | There is also [`is_numeric`](http://php.net/manual/en/function.is-numeric.php) which returns true if passed in value can be parsed as number.
[](https://i.stack.imgur.com/iwREU.png)
If I try to compare performance of functions on **PHP 5.5.30** here ... | The last thing you should be worrying about is how fast one of these is. There is no way that checking a string for being an integer is going to be a bottleneck in your code. |
236,406 | Is one more preferred, or performs better over the other? | 2008/10/25 | [
"https://Stackoverflow.com/questions/236406",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | ctype **not** always *return false* on integer type.
```
foreach(range(-1000 , 1000)as $num){
if(ctype_digit($num)){
echo $num . ", ";
}
}
```
ctype\_digit return true for the following integer type number.
-78,-77,-71,48,49,50,51,52,53,54,55,56,57,178,179,185,
256,257,258,259,260,261,262,263,26... | Ctype\_digit returns false if the range of integer is in negative range or between 0 and 47 or between 58 and 255. You can check ctype\_digit's behavior by using the following snippet.
```
setlocale(LC_ALL, 'en_US.UTF-8');
var_dump(
true === array_every(range(-1000, -1), 'ctype_digit_returns_false'),
true === ... |
2,989,335 | I am getting this error when I try to send via the local server
```
CDO.Message.1 error '80070005'
Access is denied.
/mail.asp, line xxx
```
Here is the code I am using
```
MailBodyText = "TEST"
Set objNewMail = CreateObject("CDO.Message")
objNewMail.To = sSendTo
objNewMail.From = "webmaster@EXAMPLE... | 2010/06/07 | [
"https://Stackoverflow.com/questions/2989335",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3582/"
] | Use the `.configuration` property which allows for authentication and other fine tuning..
examples at : <http://www.paulsadowski.com/wsh/cdo.htm>
***update***
The `.configuration` property allows to set the pickup directory (*as you request*)
```
objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cd... | I am migrating some old classic asp sites to a new (windows 2008R2) server and I had "exactly" the same problem (well at least the same error and basically the same code). The solution presented by Gaby:
```
objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
objNewMail... |
2,989,335 | I am getting this error when I try to send via the local server
```
CDO.Message.1 error '80070005'
Access is denied.
/mail.asp, line xxx
```
Here is the code I am using
```
MailBodyText = "TEST"
Set objNewMail = CreateObject("CDO.Message")
objNewMail.To = sSendTo
objNewMail.From = "webmaster@EXAMPLE... | 2010/06/07 | [
"https://Stackoverflow.com/questions/2989335",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3582/"
] | Use the `.configuration` property which allows for authentication and other fine tuning..
examples at : <http://www.paulsadowski.com/wsh/cdo.htm>
***update***
The `.configuration` property allows to set the pickup directory (*as you request*)
```
objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cd... | **IF YOU DON'T WANT TO CHANGE YOUR CODE**
Grant **IIS\_IUSRS group** write access to **c:\inetpub\mailroot\Pickup** folder or whatever is your pickup dir.
It must be **IIS\_IUSRS Group**, not the **IUSR User** (you got it mispelled probably).
I was getting this error after performing steps specified in option 3 at [... |
2,989,335 | I am getting this error when I try to send via the local server
```
CDO.Message.1 error '80070005'
Access is denied.
/mail.asp, line xxx
```
Here is the code I am using
```
MailBodyText = "TEST"
Set objNewMail = CreateObject("CDO.Message")
objNewMail.To = sSendTo
objNewMail.From = "webmaster@EXAMPLE... | 2010/06/07 | [
"https://Stackoverflow.com/questions/2989335",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3582/"
] | **IF YOU DON'T WANT TO CHANGE YOUR CODE**
Grant **IIS\_IUSRS group** write access to **c:\inetpub\mailroot\Pickup** folder or whatever is your pickup dir.
It must be **IIS\_IUSRS Group**, not the **IUSR User** (you got it mispelled probably).
I was getting this error after performing steps specified in option 3 at [... | I am migrating some old classic asp sites to a new (windows 2008R2) server and I had "exactly" the same problem (well at least the same error and basically the same code). The solution presented by Gaby:
```
objNewMail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 1
objNewMail... |
21,409,700 | I was trying to create a script in php, for displaying messages. If the messages includes a web address, then this address I wanted to be displayed as a link. This is my code that works successfuly:
```
<?php
if( (substr( $message, 0, 8 ) === "https://") || (substr( $message, 0, 7 ) === "http://") ){
echo "<a hr... | 2014/01/28 | [
"https://Stackoverflow.com/questions/21409700",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2491321/"
] | You may use [filter\_var](http://php.net/filter_var) with `FILTER_VALIDATE_URL`:
```
$words = explode(" ", $message);
$_words = array();
foreach($words as $word){
if(filter_var($word, FILTER_VALIDATE_URL) === false){
$_words[] = $word;
}
else{
$_words[] = "<a href=\"$word\">$word</a>";
}
}
echo... | I use this within a class:
```
public static function CreateLinks($text) {
return preg_replace('@(https?://([-\w.]+[-\w])+(:\d+)?(/([\w-.~:/?#\[\]\@!$&\'()*+,;=%]*)?)?)@', '<a href="$1" target="_blank">$1</a>', $text);
}
```
To use it without a class, do this:
```
$message = preg_replace('@(https?://([-\w.]... |
21,409,700 | I was trying to create a script in php, for displaying messages. If the messages includes a web address, then this address I wanted to be displayed as a link. This is my code that works successfuly:
```
<?php
if( (substr( $message, 0, 8 ) === "https://") || (substr( $message, 0, 7 ) === "http://") ){
echo "<a hr... | 2014/01/28 | [
"https://Stackoverflow.com/questions/21409700",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2491321/"
] | I use this within a class:
```
public static function CreateLinks($text) {
return preg_replace('@(https?://([-\w.]+[-\w])+(:\d+)?(/([\w-.~:/?#\[\]\@!$&\'()*+,;=%]*)?)?)@', '<a href="$1" target="_blank">$1</a>', $text);
}
```
To use it without a class, do this:
```
$message = preg_replace('@(https?://([-\w.]... | Jan Goyvaerts, Regex Guru, describe pretty well in his blog
<http://www.regexguru.com/2008/11/detecting-urls-in-a-block-of-text/>
To find all matches in a multi-line string, use
```
preg_match_all('/\b(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)[-A-Z0-9+&@#\/%=~_|$?!:,.]*[A-Z0-9+&@#\/%=~_|$]/i', $subject, $result, PREG_... |
21,409,700 | I was trying to create a script in php, for displaying messages. If the messages includes a web address, then this address I wanted to be displayed as a link. This is my code that works successfuly:
```
<?php
if( (substr( $message, 0, 8 ) === "https://") || (substr( $message, 0, 7 ) === "http://") ){
echo "<a hr... | 2014/01/28 | [
"https://Stackoverflow.com/questions/21409700",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2491321/"
] | You may use [filter\_var](http://php.net/filter_var) with `FILTER_VALIDATE_URL`:
```
$words = explode(" ", $message);
$_words = array();
foreach($words as $word){
if(filter_var($word, FILTER_VALIDATE_URL) === false){
$_words[] = $word;
}
else{
$_words[] = "<a href=\"$word\">$word</a>";
}
}
echo... | Jan Goyvaerts, Regex Guru, describe pretty well in his blog
<http://www.regexguru.com/2008/11/detecting-urls-in-a-block-of-text/>
To find all matches in a multi-line string, use
```
preg_match_all('/\b(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)[-A-Z0-9+&@#\/%=~_|$?!:,.]*[A-Z0-9+&@#\/%=~_|$]/i', $subject, $result, PREG_... |
3,525 | In Sachin's farewell's match, I saw a quote in Cricinfo that Dhoni can hand-over the captaincy to Sachin to honour him like he did that for Saurav.

I searched about that and yes, it's true that Ganguly had led the team in the last moments of his fin... | 2013/11/17 | [
"https://sports.stackexchange.com/questions/3525",
"https://sports.stackexchange.com",
"https://sports.stackexchange.com/users/753/"
] | The captain can be changed at any time during any game, provided he/she is one of the playing eleven (not a substitute player). The law doesn't recognise "farewell matches", so that is immaterial. Dhoni could have made Mohammad Shami the captain if he wanted to.
Quoting:
>
> Law 1 (The players):
>
> 3. Captain
>... | From what I know, you cannot literally swap the designated captain, but that doesn't stop the captain handing over temporary charge to another player, similar to if a captain goes off the field and the vice captain takes over. An umpire cannot say to a player 'no, you can't change the fielding positions cause you're no... |
55,963,736 | I have heard that ARM processors can switch between little-endian and big-endian. What do processors need this for? Is it used on Android phones? | 2019/05/03 | [
"https://Stackoverflow.com/questions/55963736",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11445576/"
] | Depending on the processor, it can be possible to switch endianness on the fly. Older processors will boot up in one endian state, and be expected to stay there. In the latter case, the whole design will generally be set up for either big or little endian.
The primary reason for supporting mixed-endian operation is to... | You can switch endianness, but you wouldn't do that after the OS is up and running. It would only screw things up. If you were going to do it, you'd do it very early on in the boot sequence. By the time your app is running, the endianness is chosen and won't be changed.
Why would you do it? The only real reason would ... |
2,004,351 | I am working on an assignment that asks me to implement an AVL tree. I'm pretty sure I have the rotation methods correct, but I'm having trouble figuring out when to use them.
For example, the explanation in the book says that I should climb up the same path I went down to insert the node/element. However, I can't hav... | 2010/01/05 | [
"https://Stackoverflow.com/questions/2004351",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/243673/"
] | You code is climbing up the same path you went down. Consider this code:
```
if (this.getLeftChild() != null) {
return this.getLeftChild().insert(node);
}
```
and modify it slightly:
```
if (this.getLeftChild() != null) {
boolean b = this.getLeftChild().insert(node);
// do something here
return b;
... | You might try passing the parent pointer into the `insert` method, or you could convert `insert` into an iterative method and keep an explicit stack on which you record the path down the tree.
By the way, in order to choose which rotation to use, you can just know that a node is unbalanced, you have to know whether th... |
17,566,378 | I am struggeling a little to send a hex value to a device connected to my PHP socket server.
I have this code:
```
<?PHP
# 7e hex = 126 decimal
$str1 = "\x7e\x00MyData";
sendToDevice($str1); // works :-)
# will send "~<NUL>MyData" and the device sends expected result back
$dec = 126;
$hex = dechex($dec);
$str2 = $... | 2013/07/10 | [
"https://Stackoverflow.com/questions/17566378",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2028935/"
] | This is due to the way PHP parses the strings. When PHP parses the first string, it sees the "\x7e" and says "I need to convert this to the character who's code is 7e in hex. In the other scenarios, it sees the "\x", and tries to convert that before it gets the "7e", so it doesn't know what to do.
PHP doesn't parse th... | The 3rd approach is not so far away. But a remaining problem is, that the `\x` will be interpeted as an [escape sequence](http://php.net/manual/en/regexp.reference.escape.php) in double quoted strings. Workaround: Use single quotes:
```
$dec = 127;
$hex = dechex($dec);
$str3 = '\x' . $hex . '\x00MyData';
sendToDevice(... |
48,192,785 | I'm learning python and our teacher told us to write a function that will return the sum of a list no matter what the type of its values are.
If the list is Integers, then: `sum([1, 4, 5, 6]) = 16`
If the list is Strings, then: `sum(['a','b',c']) = 'abc'`
The list can also be made of tuples and lists inside of it.
... | 2018/01/10 | [
"https://Stackoverflow.com/questions/48192785",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4807436/"
] | Instead of the builtin `sum`, which requires integers or floats throughout the list or tuple, you can use `reduce`:
```
s1 = [1, 4, 5, 6]
s2 = ['a', 'b', 'c']
print(reduce(lambda x, y:x+y, s1))
print(reduce(lambda x, y:x+y, s2))
```
Output:
```
16
abc
```
In Python3, `functools` is required to use `reduce`:
```
... | Your code does not work because you are concatenating/summing first element twice
**example:-**
lets say `listy = [1, 2, 3, 4, 5]`
& `element = listy[0] = 1`
**Now for first iteration**
`element = element + thingy (1 + 1)`, since thingy for first iteration also points to `listy[0]`
Just check the type of elem... |
48,192,785 | I'm learning python and our teacher told us to write a function that will return the sum of a list no matter what the type of its values are.
If the list is Integers, then: `sum([1, 4, 5, 6]) = 16`
If the list is Strings, then: `sum(['a','b',c']) = 'abc'`
The list can also be made of tuples and lists inside of it.
... | 2018/01/10 | [
"https://Stackoverflow.com/questions/48192785",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4807436/"
] | First, I should point out your mistake with initialising `element` to `list[0]`... you'll be adding it *twice*.
So, to solve this problem, my first instinct is to start with -
```
def generic_sum(data):
return sum(data, type(data[0])())
```
But this only works for integers and floats, lists and tuples, and `C... | Instead of the builtin `sum`, which requires integers or floats throughout the list or tuple, you can use `reduce`:
```
s1 = [1, 4, 5, 6]
s2 = ['a', 'b', 'c']
print(reduce(lambda x, y:x+y, s1))
print(reduce(lambda x, y:x+y, s2))
```
Output:
```
16
abc
```
In Python3, `functools` is required to use `reduce`:
```
... |
48,192,785 | I'm learning python and our teacher told us to write a function that will return the sum of a list no matter what the type of its values are.
If the list is Integers, then: `sum([1, 4, 5, 6]) = 16`
If the list is Strings, then: `sum(['a','b',c']) = 'abc'`
The list can also be made of tuples and lists inside of it.
... | 2018/01/10 | [
"https://Stackoverflow.com/questions/48192785",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4807436/"
] | First, I should point out your mistake with initialising `element` to `list[0]`... you'll be adding it *twice*.
So, to solve this problem, my first instinct is to start with -
```
def generic_sum(data):
return sum(data, type(data[0])())
```
But this only works for integers and floats, lists and tuples, and `C... | Your code does not work because you are concatenating/summing first element twice
**example:-**
lets say `listy = [1, 2, 3, 4, 5]`
& `element = listy[0] = 1`
**Now for first iteration**
`element = element + thingy (1 + 1)`, since thingy for first iteration also points to `listy[0]`
Just check the type of elem... |
42,846,309 | I'm trying to use deepcopy on an ndarray, and the line looks like this:
```
foo = myArray.__deepcopy__()
```
I'm getting:
```
TypeError: function takes exactly 1 argument (0 given)
```
I need a deep copy, and I can't import copy. | 2017/03/16 | [
"https://Stackoverflow.com/questions/42846309",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The special `__deepcopy__` method takes a `memo` arg. You can pass an empty dict for this:
```
foo = myArray.__deepcopy__({})
``` | The [`copy` module](https://docs.python.org/library/copy.html) contains the documentation for `__deepcopy__`, and it is quite clear what the argument should be:
>
> In order for a class to define its own copy implementation, it can define special methods `__copy__()` and `__deepcopy__()`. The former is called to impl... |
42,846,309 | I'm trying to use deepcopy on an ndarray, and the line looks like this:
```
foo = myArray.__deepcopy__()
```
I'm getting:
```
TypeError: function takes exactly 1 argument (0 given)
```
I need a deep copy, and I can't import copy. | 2017/03/16 | [
"https://Stackoverflow.com/questions/42846309",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | The relevant code in `copy` is:
```
def deepcopy(x, memo=None, _nil=[]):
"""Deep copy operation on arbitrary Python objects.
See the module's __doc__ string for more info.
"""
if memo is None:
memo = {}
....
copier = getattr(x, "__deepcopy__", None)
if copier:
... | The [`copy` module](https://docs.python.org/library/copy.html) contains the documentation for `__deepcopy__`, and it is quite clear what the argument should be:
>
> In order for a class to define its own copy implementation, it can define special methods `__copy__()` and `__deepcopy__()`. The former is called to impl... |
23,014,168 | I have a column containing value like:
"AAAA\BBBBBBBB\CCC" (A, B, C part length are not fixed.)
I need to trim out the \CCC part if it exists, and leave it alone if not exist.
For example:
AAA\BBBBBB\CCC -> AAA\BBBBBB
AA\BBBB -> AA\BBBB
AA -> AA
**Sorry I am not clear enough, the A, B, C parts are not literally ... | 2014/04/11 | [
"https://Stackoverflow.com/questions/23014168",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/264052/"
] | While there's certainly a way to do it in pure T-SQL, it might not be as clear as it could be.
You may want to consider using a [SQLCLR](http://msdn.microsoft.com/en-us/library/ms254963%28v=vs.110%29.aspx)-based user defined function (UDF) instead. With that you'll be able to benefit from the power and clarity of [c#]... | Here is a solution to remove the last part if there are two or more parts (separated by \)
```
DECLARE @var VARCHAR(32) = 'AAAA\BBBBBBBB\CCC'
SELECT
LEN(@var) - LEN(REPLACE(@var, '\', '')) -- Number of occurences of the character \
, CHARINDEX('\', @var) -- Position of the first occurence
, LEN(@var) - C... |
23,014,168 | I have a column containing value like:
"AAAA\BBBBBBBB\CCC" (A, B, C part length are not fixed.)
I need to trim out the \CCC part if it exists, and leave it alone if not exist.
For example:
AAA\BBBBBB\CCC -> AAA\BBBBBB
AA\BBBB -> AA\BBBB
AA -> AA
**Sorry I am not clear enough, the A, B, C parts are not literally ... | 2014/04/11 | [
"https://Stackoverflow.com/questions/23014168",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/264052/"
] | While there's certainly a way to do it in pure T-SQL, it might not be as clear as it could be.
You may want to consider using a [SQLCLR](http://msdn.microsoft.com/en-us/library/ms254963%28v=vs.110%29.aspx)-based user defined function (UDF) instead. With that you'll be able to benefit from the power and clarity of [c#]... | You can use [`PATINDEX`](http://technet.microsoft.com/en-us/library/ms188395.aspx) to find out if the field has 3 (or more) parts, and then some string manipulation to chop off the last part:
```
select case
when PATINDEX(field, '%\%\%') > 0 then
/* Chop off last part */
LEFT(field, len(... |
23,014,168 | I have a column containing value like:
"AAAA\BBBBBBBB\CCC" (A, B, C part length are not fixed.)
I need to trim out the \CCC part if it exists, and leave it alone if not exist.
For example:
AAA\BBBBBB\CCC -> AAA\BBBBBB
AA\BBBB -> AA\BBBB
AA -> AA
**Sorry I am not clear enough, the A, B, C parts are not literally ... | 2014/04/11 | [
"https://Stackoverflow.com/questions/23014168",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/264052/"
] | While there's certainly a way to do it in pure T-SQL, it might not be as clear as it could be.
You may want to consider using a [SQLCLR](http://msdn.microsoft.com/en-us/library/ms254963%28v=vs.110%29.aspx)-based user defined function (UDF) instead. With that you'll be able to benefit from the power and clarity of [c#]... | This is how I would accomplish this task:
```
declare @temp varchar(50), @temp2 varchar(15), @temp3 varchar(15)
set @temp = 'aaaa\bbbb\cccc\dddd'
IF (SELECT LEFT(@temp,CHARINDEX('\',@temp, CHARINDEX('\',@temp,0)+1))) != ''
BEGIN
SELECT LEFT(LEFT(@temp,CHARINDEX('\',@temp, CHARINDEX('\',@temp,0)+1)),LEN(LEFT... |
23,014,168 | I have a column containing value like:
"AAAA\BBBBBBBB\CCC" (A, B, C part length are not fixed.)
I need to trim out the \CCC part if it exists, and leave it alone if not exist.
For example:
AAA\BBBBBB\CCC -> AAA\BBBBBB
AA\BBBB -> AA\BBBB
AA -> AA
**Sorry I am not clear enough, the A, B, C parts are not literally ... | 2014/04/11 | [
"https://Stackoverflow.com/questions/23014168",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/264052/"
] | Here is a solution to remove the last part if there are two or more parts (separated by \)
```
DECLARE @var VARCHAR(32) = 'AAAA\BBBBBBBB\CCC'
SELECT
LEN(@var) - LEN(REPLACE(@var, '\', '')) -- Number of occurences of the character \
, CHARINDEX('\', @var) -- Position of the first occurence
, LEN(@var) - C... | This is how I would accomplish this task:
```
declare @temp varchar(50), @temp2 varchar(15), @temp3 varchar(15)
set @temp = 'aaaa\bbbb\cccc\dddd'
IF (SELECT LEFT(@temp,CHARINDEX('\',@temp, CHARINDEX('\',@temp,0)+1))) != ''
BEGIN
SELECT LEFT(LEFT(@temp,CHARINDEX('\',@temp, CHARINDEX('\',@temp,0)+1)),LEN(LEFT... |
23,014,168 | I have a column containing value like:
"AAAA\BBBBBBBB\CCC" (A, B, C part length are not fixed.)
I need to trim out the \CCC part if it exists, and leave it alone if not exist.
For example:
AAA\BBBBBB\CCC -> AAA\BBBBBB
AA\BBBB -> AA\BBBB
AA -> AA
**Sorry I am not clear enough, the A, B, C parts are not literally ... | 2014/04/11 | [
"https://Stackoverflow.com/questions/23014168",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/264052/"
] | You can use [`PATINDEX`](http://technet.microsoft.com/en-us/library/ms188395.aspx) to find out if the field has 3 (or more) parts, and then some string manipulation to chop off the last part:
```
select case
when PATINDEX(field, '%\%\%') > 0 then
/* Chop off last part */
LEFT(field, len(... | This is how I would accomplish this task:
```
declare @temp varchar(50), @temp2 varchar(15), @temp3 varchar(15)
set @temp = 'aaaa\bbbb\cccc\dddd'
IF (SELECT LEFT(@temp,CHARINDEX('\',@temp, CHARINDEX('\',@temp,0)+1))) != ''
BEGIN
SELECT LEFT(LEFT(@temp,CHARINDEX('\',@temp, CHARINDEX('\',@temp,0)+1)),LEN(LEFT... |
31,617,589 | So I am having an issue where a certain piece of code is giving me this error `*** BUFFER OVERFLOW DETECTED ***` . This only started happening once I turned certain compiler optimization options on (*this isn't my program so I have to use these*). I've narrowed it down to which option it is. I also found a way to stop ... | 2015/07/24 | [
"https://Stackoverflow.com/questions/31617589",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4920579/"
] | Well, the second part has different input, so it happens to work well *by accident*. `realpath()` is a really broken function, even the [manpage](http://man7.org/linux/man-pages/man3/realpath.3.html) states that (see **BUGS**).
The best you can do ist rework the code so realpath is invoked with a `null` pointer as it'... | The man page for `realpath` specifies that the length of `resolved_path` must be at least PATH\_MAX. If the results of `realpath` is a string longer than 1024 bytes, and your buffer is not big enough, you're invoking [undefined behavior](https://en.wikipedia.org/wiki/Undefined_behavior). That means that a crash might (... |
2,632,579 | Prove that
$$\sum\_{i=0}^n {{n+i}\choose {i}} 2^{-(n+i)} = 1 $$
I tried a direct approach and proof by induction, but the dependence of the exponent on $i$ throws me off every time. | 2018/02/02 | [
"https://math.stackexchange.com/questions/2632579",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/114708/"
] | It is convenient to use the *coefficient of* operator $[z^n]$ to denote the coefficient of $z^n$ in a series. This way we can write for instance
\begin{align\*}
[z^k](1+z)^n=\binom{n}{k}
\end{align\*}
>
> We obtain
> \begin{align\*}
> \color{blue}{\sum\_{i=0}^n}&\color{blue}{\binom{n+i}{i}2^{-(i+n)}}\\
> &=\frac{1}{... | A nice way to visualise this problem is in terms of monotonic North/East (NE) [lattice paths](https://en.m.wikipedia.org/wiki/Lattice_path).
If the probability of a North step is $1/2$ and of and East step is $1/2$ then, starting at $O(0,0)$ the probability that a path which leaves the box takes the leg between lattic... |
26,108,082 | I am not sure how to make this work?
I wish to make a new column in a dataframe dependent on whether or not two other columns meet the following criteria:
if df$Cn\_LCIS and df$Cn\_ILC are both greater than '2' print '0'
if df$CN\_LCIS and df$Cn\_ILC are both smaller than '2' print '0'
and if they are the same also... | 2014/09/29 | [
"https://Stackoverflow.com/questions/26108082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3324491/"
] | ```
compareTo2 <- function(LCIS, ILC) {
as.numeric(!((LCIS > 2 & ILC > 2) | (LCIS < 2 & ILC < 2) | (LCIS == ILC) ))
}
compareTo2(df$Cn_LCIS, df$Cn_ILC)
# [1] 0 1 0 1 0 0 1 0 0 1 1
```
---
If your data is large, you might want to try the following
```
library(data.table)
DT <- as.data.table(df)
## different ... | The problem with your code is that your innermost `ifelse` doesn't have an "else" argument. If you just add `, 0` inside the innermost `ifelse`, your code will run. Thad said, some of the other answers are cleaner. |
26,108,082 | I am not sure how to make this work?
I wish to make a new column in a dataframe dependent on whether or not two other columns meet the following criteria:
if df$Cn\_LCIS and df$Cn\_ILC are both greater than '2' print '0'
if df$CN\_LCIS and df$Cn\_ILC are both smaller than '2' print '0'
and if they are the same also... | 2014/09/29 | [
"https://Stackoverflow.com/questions/26108082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3324491/"
] | ```
compareTo2 <- function(LCIS, ILC) {
as.numeric(!((LCIS > 2 & ILC > 2) | (LCIS < 2 & ILC < 2) | (LCIS == ILC) ))
}
compareTo2(df$Cn_LCIS, df$Cn_ILC)
# [1] 0 1 0 1 0 0 1 0 0 1 1
```
---
If your data is large, you might want to try the following
```
library(data.table)
DT <- as.data.table(df)
## different ... | And another possibility is to use `with` or `within`
```
with(df, {
cb <- cbind(Cn_LCIS, Cn_ILC)
aa <- (cb > 2) | (cb < 2) | (cb[1] == cb[2])
(!(aa[,1] == aa[,2]))+0
})
# [1] 0 1 0 1 0 0 1 0 0 1 1
``` |
26,108,082 | I am not sure how to make this work?
I wish to make a new column in a dataframe dependent on whether or not two other columns meet the following criteria:
if df$Cn\_LCIS and df$Cn\_ILC are both greater than '2' print '0'
if df$CN\_LCIS and df$Cn\_ILC are both smaller than '2' print '0'
and if they are the same also... | 2014/09/29 | [
"https://Stackoverflow.com/questions/26108082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3324491/"
] | ```
compareTo2 <- function(LCIS, ILC) {
as.numeric(!((LCIS > 2 & ILC > 2) | (LCIS < 2 & ILC < 2) | (LCIS == ILC) ))
}
compareTo2(df$Cn_LCIS, df$Cn_ILC)
# [1] 0 1 0 1 0 0 1 0 0 1 1
```
---
If your data is large, you might want to try the following
```
library(data.table)
DT <- as.data.table(df)
## different ... | More tersely:
```
with(df, sign((Cn_LCIS-2)*(Cn_ILC-2))-(Cn_ILC != Cn_LCIS) < 0)*1
# [1] 0 1 0 1 0 0 1 0 0 1 1
``` |
26,108,082 | I am not sure how to make this work?
I wish to make a new column in a dataframe dependent on whether or not two other columns meet the following criteria:
if df$Cn\_LCIS and df$Cn\_ILC are both greater than '2' print '0'
if df$CN\_LCIS and df$Cn\_ILC are both smaller than '2' print '0'
and if they are the same also... | 2014/09/29 | [
"https://Stackoverflow.com/questions/26108082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3324491/"
] | Or
```
transform(df, both = ifelse((Cn_LCIS > 2 & Cn_ILC > 2) |
(Cn_LCIS < 2 & Cn_ILC < 2) |
(Cn_LCIS == 2 & Cn_LCIS == 2), 0, 1))
# Chromosome Start End Cn_ILC mCn_ILC Cn_LCIS mCn_LCIS both
# chr1.1 chr1 0 11194349 2 ... | The problem with your code is that your innermost `ifelse` doesn't have an "else" argument. If you just add `, 0` inside the innermost `ifelse`, your code will run. Thad said, some of the other answers are cleaner. |
26,108,082 | I am not sure how to make this work?
I wish to make a new column in a dataframe dependent on whether or not two other columns meet the following criteria:
if df$Cn\_LCIS and df$Cn\_ILC are both greater than '2' print '0'
if df$CN\_LCIS and df$Cn\_ILC are both smaller than '2' print '0'
and if they are the same also... | 2014/09/29 | [
"https://Stackoverflow.com/questions/26108082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3324491/"
] | Or
```
transform(df, both = ifelse((Cn_LCIS > 2 & Cn_ILC > 2) |
(Cn_LCIS < 2 & Cn_ILC < 2) |
(Cn_LCIS == 2 & Cn_LCIS == 2), 0, 1))
# Chromosome Start End Cn_ILC mCn_ILC Cn_LCIS mCn_LCIS both
# chr1.1 chr1 0 11194349 2 ... | And another possibility is to use `with` or `within`
```
with(df, {
cb <- cbind(Cn_LCIS, Cn_ILC)
aa <- (cb > 2) | (cb < 2) | (cb[1] == cb[2])
(!(aa[,1] == aa[,2]))+0
})
# [1] 0 1 0 1 0 0 1 0 0 1 1
``` |
26,108,082 | I am not sure how to make this work?
I wish to make a new column in a dataframe dependent on whether or not two other columns meet the following criteria:
if df$Cn\_LCIS and df$Cn\_ILC are both greater than '2' print '0'
if df$CN\_LCIS and df$Cn\_ILC are both smaller than '2' print '0'
and if they are the same also... | 2014/09/29 | [
"https://Stackoverflow.com/questions/26108082",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3324491/"
] | Or
```
transform(df, both = ifelse((Cn_LCIS > 2 & Cn_ILC > 2) |
(Cn_LCIS < 2 & Cn_ILC < 2) |
(Cn_LCIS == 2 & Cn_LCIS == 2), 0, 1))
# Chromosome Start End Cn_ILC mCn_ILC Cn_LCIS mCn_LCIS both
# chr1.1 chr1 0 11194349 2 ... | More tersely:
```
with(df, sign((Cn_LCIS-2)*(Cn_ILC-2))-(Cn_ILC != Cn_LCIS) < 0)*1
# [1] 0 1 0 1 0 0 1 0 0 1 1
``` |
41,445,365 | Is there a way to set up file watcher in PhpStorm on one file, that will copy that file to different location in project after file change/save? | 2017/01/03 | [
"https://Stackoverflow.com/questions/41445365",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1835525/"
] | I think `max.poll.records` can solve this.It is to tune the number of records that must be handled on every loop iteration. In 0.10 there is `max.poll.records`, which places an upper bound on the number of records returned from each call.
Also as per Confluent, consumer.poll() should have fairly high session timeout f... | Consider upgrading to 0.10.1 or higher because the consumer was enhanced in these releases to better handle longer periods between calls to poll().
You can increase the new `max.poll.interval.ms` parameter if you are taking more than 5 minutes to put the results into HDFS. This will stop your consumer from being kicke... |
52,088,816 | I am having trouble with my code. Here is what I have so far:
```
#include <iostream>
using namespace std;
int main()
{
char word[128];
int x = 0;
int v;
int shift;
int sv;
cin >> shift;
cin >> word;
while (word[x] != '\0') // While the string isn't at the end...
{
cou... | 2018/08/30 | [
"https://Stackoverflow.com/questions/52088816",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5593474/"
] | Coffeescript will wrap all files in an anonymous function which is immediately executed. This means all variables you define are locally scoped unless explicitly placed in the global namespace (in browsers it is the `window` object, while in NodeJS it's `global`).
---
From [coffeescript.org](https://coffeescript.org/... | ```
@editfunction = editfunction = (id) ->
console.log 'Yeheyyy'
```
this will works :) |
3,069,921 | Let $x,y,z$ be elements of a group $G$ and $xyz=1$. I am trying to prove whether this implies $yzx=1$ or $yxz=1$.
My proof goes as follows: Let $x^{-1}$ denote the inverse of $x$, then $xx^{-1} = 1 = x(yz)$. By the cancellation property of groups, $x^{-1}= yz$. This implies $(yz)x = x^{-1}x = 1$. Therefore $xyz = 1 \i... | 2019/01/11 | [
"https://math.stackexchange.com/questions/3069921",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/418005/"
] | You just mixed up some letters. $xyz=1$ implies $yzx=1$ and $zxy=1,$ not $yxz=1.$ | Well, if $xyz=1$, then by multiplying with the inverse of $x$ from the left, $yz=x^{-1}$. Now multiply the equation with $x$ from the right. Then $yzx=1$. |
3,069,921 | Let $x,y,z$ be elements of a group $G$ and $xyz=1$. I am trying to prove whether this implies $yzx=1$ or $yxz=1$.
My proof goes as follows: Let $x^{-1}$ denote the inverse of $x$, then $xx^{-1} = 1 = x(yz)$. By the cancellation property of groups, $x^{-1}= yz$. This implies $(yz)x = x^{-1}x = 1$. Therefore $xyz = 1 \i... | 2019/01/11 | [
"https://math.stackexchange.com/questions/3069921",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/418005/"
] | Well, if $xyz=1$, then by multiplying with the inverse of $x$ from the left, $yz=x^{-1}$. Now multiply the equation with $x$ from the right. Then $yzx=1$. | Since $G$ is a group then if $x\in G$ , there exists $x^{-1}\in G$ such that $$x\cdot x^{-1}=x^{-1}\cdot x=e\in G$$having this result and exploiting the other properties of group we obtain $$x^{-1}\cdot (xyz)=(x^{-1}\cdot x)\cdot yz=e\cdot yz=yz=x^{-1}\cdot e=x^{-1}$$therefore $$yz\cdot x=yzx=x^{-1}\cdot x=1$$and the s... |
3,069,921 | Let $x,y,z$ be elements of a group $G$ and $xyz=1$. I am trying to prove whether this implies $yzx=1$ or $yxz=1$.
My proof goes as follows: Let $x^{-1}$ denote the inverse of $x$, then $xx^{-1} = 1 = x(yz)$. By the cancellation property of groups, $x^{-1}= yz$. This implies $(yz)x = x^{-1}x = 1$. Therefore $xyz = 1 \i... | 2019/01/11 | [
"https://math.stackexchange.com/questions/3069921",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/418005/"
] | Well, if $xyz=1$, then by multiplying with the inverse of $x$ from the left, $yz=x^{-1}$. Now multiply the equation with $x$ from the right. Then $yzx=1$. | Here $xyz=1$ gives
$$\begin{align}
x^{-1}xyz=x^{-1}1 & \iff yz=x^{-1} \\
&\iff yzx=x^{-1}x \\
& \iff yzx=1,
\end{align}$$
which gives
$$\begin{align}
y^{-1}yzx=y^{-1}1 & \iff zx=y^{-1} \\
& \iff zxy=y^{-1}y \\
&\iff zxy=1.
\end{align}$$ |
3,069,921 | Let $x,y,z$ be elements of a group $G$ and $xyz=1$. I am trying to prove whether this implies $yzx=1$ or $yxz=1$.
My proof goes as follows: Let $x^{-1}$ denote the inverse of $x$, then $xx^{-1} = 1 = x(yz)$. By the cancellation property of groups, $x^{-1}= yz$. This implies $(yz)x = x^{-1}x = 1$. Therefore $xyz = 1 \i... | 2019/01/11 | [
"https://math.stackexchange.com/questions/3069921",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/418005/"
] | You just mixed up some letters. $xyz=1$ implies $yzx=1$ and $zxy=1,$ not $yxz=1.$ | Since $G$ is a group then if $x\in G$ , there exists $x^{-1}\in G$ such that $$x\cdot x^{-1}=x^{-1}\cdot x=e\in G$$having this result and exploiting the other properties of group we obtain $$x^{-1}\cdot (xyz)=(x^{-1}\cdot x)\cdot yz=e\cdot yz=yz=x^{-1}\cdot e=x^{-1}$$therefore $$yz\cdot x=yzx=x^{-1}\cdot x=1$$and the s... |
3,069,921 | Let $x,y,z$ be elements of a group $G$ and $xyz=1$. I am trying to prove whether this implies $yzx=1$ or $yxz=1$.
My proof goes as follows: Let $x^{-1}$ denote the inverse of $x$, then $xx^{-1} = 1 = x(yz)$. By the cancellation property of groups, $x^{-1}= yz$. This implies $(yz)x = x^{-1}x = 1$. Therefore $xyz = 1 \i... | 2019/01/11 | [
"https://math.stackexchange.com/questions/3069921",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/418005/"
] | You just mixed up some letters. $xyz=1$ implies $yzx=1$ and $zxy=1,$ not $yxz=1.$ | For any group we have $aa^{-1}=a^{-1}a=1$. From $xyz=1$ we know that $(xy)z=1$, from where the first claim follows. |
3,069,921 | Let $x,y,z$ be elements of a group $G$ and $xyz=1$. I am trying to prove whether this implies $yzx=1$ or $yxz=1$.
My proof goes as follows: Let $x^{-1}$ denote the inverse of $x$, then $xx^{-1} = 1 = x(yz)$. By the cancellation property of groups, $x^{-1}= yz$. This implies $(yz)x = x^{-1}x = 1$. Therefore $xyz = 1 \i... | 2019/01/11 | [
"https://math.stackexchange.com/questions/3069921",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/418005/"
] | You just mixed up some letters. $xyz=1$ implies $yzx=1$ and $zxy=1,$ not $yxz=1.$ | Here $xyz=1$ gives
$$\begin{align}
x^{-1}xyz=x^{-1}1 & \iff yz=x^{-1} \\
&\iff yzx=x^{-1}x \\
& \iff yzx=1,
\end{align}$$
which gives
$$\begin{align}
y^{-1}yzx=y^{-1}1 & \iff zx=y^{-1} \\
& \iff zxy=y^{-1}y \\
&\iff zxy=1.
\end{align}$$ |
3,069,921 | Let $x,y,z$ be elements of a group $G$ and $xyz=1$. I am trying to prove whether this implies $yzx=1$ or $yxz=1$.
My proof goes as follows: Let $x^{-1}$ denote the inverse of $x$, then $xx^{-1} = 1 = x(yz)$. By the cancellation property of groups, $x^{-1}= yz$. This implies $(yz)x = x^{-1}x = 1$. Therefore $xyz = 1 \i... | 2019/01/11 | [
"https://math.stackexchange.com/questions/3069921",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/418005/"
] | For any group we have $aa^{-1}=a^{-1}a=1$. From $xyz=1$ we know that $(xy)z=1$, from where the first claim follows. | Since $G$ is a group then if $x\in G$ , there exists $x^{-1}\in G$ such that $$x\cdot x^{-1}=x^{-1}\cdot x=e\in G$$having this result and exploiting the other properties of group we obtain $$x^{-1}\cdot (xyz)=(x^{-1}\cdot x)\cdot yz=e\cdot yz=yz=x^{-1}\cdot e=x^{-1}$$therefore $$yz\cdot x=yzx=x^{-1}\cdot x=1$$and the s... |
3,069,921 | Let $x,y,z$ be elements of a group $G$ and $xyz=1$. I am trying to prove whether this implies $yzx=1$ or $yxz=1$.
My proof goes as follows: Let $x^{-1}$ denote the inverse of $x$, then $xx^{-1} = 1 = x(yz)$. By the cancellation property of groups, $x^{-1}= yz$. This implies $(yz)x = x^{-1}x = 1$. Therefore $xyz = 1 \i... | 2019/01/11 | [
"https://math.stackexchange.com/questions/3069921",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/418005/"
] | For any group we have $aa^{-1}=a^{-1}a=1$. From $xyz=1$ we know that $(xy)z=1$, from where the first claim follows. | Here $xyz=1$ gives
$$\begin{align}
x^{-1}xyz=x^{-1}1 & \iff yz=x^{-1} \\
&\iff yzx=x^{-1}x \\
& \iff yzx=1,
\end{align}$$
which gives
$$\begin{align}
y^{-1}yzx=y^{-1}1 & \iff zx=y^{-1} \\
& \iff zxy=y^{-1}y \\
&\iff zxy=1.
\end{align}$$ |
29,282,820 | Looking for some insight into an error I'm getting.
on transporter.sendmail(func(err, info){}), the err variable returns this:
```
{ [Error: getaddrinfo ENOTFOUND smtp.gmail.com]
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'smtp.gmail.com' }
```
I don't see any error documentat... | 2015/03/26 | [
"https://Stackoverflow.com/questions/29282820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3561961/"
] | Given the html fragment above I was able to come up with the XPath of:
```
//table/tr/td[.='Title']/following-sibling::td[1]
```
You can test the XPath with your provided html fragment at [Here](http://www.xpathtester.com/xpath/486f99272f2f000eb14bab6d790cd63a)
```
$html = '<table><tr><td>Event Title</td><td>The Ha... | Alright , what you can do is using a class in your :
`<td class="mytitle">The Harsh Face of Mother Nature</td>`
Which you will use to filter your crawler to get all your titles in an array like this :
```
$titles = $crawler->filter('td.mytitle')->extract(array('_text'));
```
where td.mytitle is a css selector, se... |
29,282,820 | Looking for some insight into an error I'm getting.
on transporter.sendmail(func(err, info){}), the err variable returns this:
```
{ [Error: getaddrinfo ENOTFOUND smtp.gmail.com]
code: 'ENOTFOUND',
errno: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'smtp.gmail.com' }
```
I don't see any error documentat... | 2015/03/26 | [
"https://Stackoverflow.com/questions/29282820",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3561961/"
] | Given the html fragment above I was able to come up with the XPath of:
```
//table/tr/td[.='Title']/following-sibling::td[1]
```
You can test the XPath with your provided html fragment at [Here](http://www.xpathtester.com/xpath/486f99272f2f000eb14bab6d790cd63a)
```
$html = '<table><tr><td>Event Title</td><td>The Ha... | Here is another answer for this question.
```
use Weidner\Goutte\GoutteFacade;
use Symfony\Component\DomCrawler\Crawler;
$crawler = GoutteFacade::request('GET','http://localhost/php_notes.php');
// find the parent table
$table = $crawler->filter('table')->each(function($table){
$tdText = $table->filter('td')->... |
38,186,799 | I tried to install <http://automapper.org/> but this resulted in an error.
`Install-Package : 'AutoMapper' already has a dependency defined for 'Microsoft.CSharp'.
At line:1 char:1
+ Install-Package AutoMapper
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException... | 2016/07/04 | [
"https://Stackoverflow.com/questions/38186799",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2604342/"
] | Check your version of nuget package manager is current and if the version of the .net framework you are using is supported by the nuget package you are trying to install | I was facing the same issue in VS2010 with NuGet package manager 2.8.60318.667 version. so, I have installed the older version of the Automapper 4.0.4 and its work for me.
try to install Install-Package Automapper -Version 4.0.4 |
39,837,796 | I created an AWS CodePipeline pipeline to pull from Github, build with Jenkins, and deploy to an ElasticBeanstalk project. I can deploy the war to beanStack directly and validate.
When i try to do the same from CodePipeLine i see the below error in AWS CodePipeline Polling Log of Jenkins -
>
> ERROR: Failed to recor... | 2016/10/03 | [
"https://Stackoverflow.com/questions/39837796",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/874722/"
] | Did you register the Jenkins custom action type in CodePipeline, in the same region you're polling?
Check your Jenkins job configuration for:
* AWS Region
* Category
* Provider
* Version
From your error message:
```
ActionType (Category: 'Build', Owner: 'Custom', Provider: 'MPiplelineProvider', Version: '1')
```
... | In our scenario:
Trigger: moving the Jenkins master (ec2) behind a Load Balancer.
Symptom: we started getting the same error (as above) after updating all security group setting so that load balancer does not get in the way.
Resolution:
On the Jenkins (ec2) box, we deleted the "project" and re-creating it with the ... |
70,925,438 | I am using Gradle and Lombok and Spring Boot and Mapstruct.
For some reason my mapper won't work.
It says, it cannot find an implementation for the mapper.
I already tried different approaches of adding Mapstruct to my Gradle build.
Maybe I am still importing it wrong?
When searching stack overflow I found several an... | 2022/01/31 | [
"https://Stackoverflow.com/questions/70925438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18080459/"
] | So, as a workaround I migrated to maven and now it works.
Seems like somehow the gradle inside my Spring Tool Suite did not work correctly. | You are missing what properties you are willing to map in the EinheitMapper.Java
Also, @Column is not required there.
I am sure you want to do the Mapping of Dto to Entity class and vice versa.
If you want to save your time for the inverse mapping from entity to dto
You can use :
```
@InheritInverseConfiguration
``... |
70,925,438 | I am using Gradle and Lombok and Spring Boot and Mapstruct.
For some reason my mapper won't work.
It says, it cannot find an implementation for the mapper.
I already tried different approaches of adding Mapstruct to my Gradle build.
Maybe I am still importing it wrong?
When searching stack overflow I found several an... | 2022/01/31 | [
"https://Stackoverflow.com/questions/70925438",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/18080459/"
] | So, as a workaround I migrated to maven and now it works.
Seems like somehow the gradle inside my Spring Tool Suite did not work correctly. | In order to make Lombok and Mapstruct work together you will need the Lombok plugin.
The Lombok plugin io.freefair.lombok plugin is required.
Here is my working configuration:
```
plugins {
id "io.freefair.lombok" version "6.5.0-rc1"
}
dependencies {
compileOnly "org.projectlombok:lombok:1.18.24"
annota... |
469,534 | This code:
```
\documentclass[tikz,border=1mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{backgrounds}
\begin{document}
\begin{tikzpicture}[scale=4]
\begin{scope}[on background layer]
\draw[fill, top color=black, bottom color=white, shading=axis, shading angle=-33.02]
(1,1) -- ... | 2019/01/10 | [
"https://tex.stackexchange.com/questions/469534",
"https://tex.stackexchange.com",
"https://tex.stackexchange.com/users/59393/"
] | You can also declare new layer:
```
\DeclareNewLayer[
background,
headsep,
contents={\parbox{\layerwidth}{\centering
Text directly under headsepline}}
]{headseplayer}
```
and add this layer to the pagestyle:
```
\AddLayersToPageStyle{scrheadings}{headseplayer}
```
Example:
```
\documentclass[fontsize=1... | ```
\documentclass[fontsize=14pt]{scrreprt}
\usepackage[margin=1.75cm,
includefoot, includehead,
showframe=false, %<--- comma was missing
headheight=2\baselineskip,
]{geometry}
\usepackage[ headsepline,footsepline]{scrlayer-scrpage}
\chead{Some stuff here... \\
Some stuff there}%
\ohead{\makebox[\textwidth]{... |
473,352 | Как следует оформить слова *добрый день* в данном предложении?
*Субъект перешёл из состояния бездействия в состояние умеренной активности и сказал «добрый день» собравшимся рабочим.* | 2023/02/21 | [
"https://rus.stackexchange.com/questions/473352",
"https://rus.stackexchange.com",
"https://rus.stackexchange.com/users/202471/"
] | Мне кажется, что можно оставить всё так, как есть у автора вопроса, тем более что структура предложения к этому располагает.
>
> **Примечание.** Подлинные выражения (цитаты), вставленные в текст в качестве элементов предложения, выделяются кавычками, но двоеточие перед ними не ставится:
>
> *Это **«не хочу»** пора... | **Дополнение** по поводу прописной-строчной
*А чего не с прописной? Всё-таки начало высказывания.*
У Розенталя в первом примере со строчной ("не хочу"; и мы не знаем, начало это высказывания или нет), а во втором примере — с прописной ("Спасайте детей!").
У Лопатина ([§ 143](https://orfogrammka.ru/%D0%BF%D1%80%D0%... |
33,590,436 | I'm building a simple website to let people at my work easily match employees names to their baby pictures, using Jquery draggable script.
I have two tables (USERS and ENTRIES). There is a 3rd table called PEOPLE but it's not important for this question.
In entries, the userid of "0" has the CORRECT ordering (i.e. p... | 2015/11/08 | [
"https://Stackoverflow.com/questions/33590436",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3304303/"
] | First of all, you have procedure that get
```
v_first_date_in DATE,
v_second_date_in DATE
```
*DATEs*, but you're trying to pass even not a string. Try something like this
```
BEGIN
sp_populate_dates(TO_DATE('01/01/2005', 'dd/mm/yyyy'), TO_DATE('01/01/2005', 'dd/mm/yyyy'));
END;
```
another thing is - you proces... | If you don't really need any date formatting and parsing, always use the SQL standard [`DATE` literal](http://blog.tanelpoder.com/2012/12/29/a-tip-for-lazy-oracle-users-type-less-with-ansi-date-and-timestamp-sql-syntax/):
```
BEGIN
sp_populate_dates(DATE '2005-01-01', DATE '2006-01-01');
END;
``` |
33,590,436 | I'm building a simple website to let people at my work easily match employees names to their baby pictures, using Jquery draggable script.
I have two tables (USERS and ENTRIES). There is a 3rd table called PEOPLE but it's not important for this question.
In entries, the userid of "0" has the CORRECT ordering (i.e. p... | 2015/11/08 | [
"https://Stackoverflow.com/questions/33590436",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3304303/"
] | First of all, you have procedure that get
```
v_first_date_in DATE,
v_second_date_in DATE
```
*DATEs*, but you're trying to pass even not a string. Try something like this
```
BEGIN
sp_populate_dates(TO_DATE('01/01/2005', 'dd/mm/yyyy'), TO_DATE('01/01/2005', 'dd/mm/yyyy'));
END;
```
another thing is - you proces... | You can populate such a table (for the dates between 2000-2030) by using the following query:
```
CREATE TABLE DIM_DATE
as
(
select
TO_NUMBER(TO_CHAR(DATE_D,'j')) as DATE_J,
DATE_D,
TO_CHAR(DATE_D,'YYYY-MM-DD') as DATE_V,
TO_NUMBER(TO_CHAR(DATE_D,'YYYY')) as YEAR_NUM,
TO_NUMBER(TO_CHAR(DATE_D,'Q')) as QUART... |
3,778,007 | Working on the book: Lang, Serge & Murrow, Gene. "Geometry - Second Edition" (p. 23)
>
> If two sides of a triangle are 12 cm and 20 cm, the third side must be larger than \_\_ cm, and smaller than \_\_ cm.
>
>
>
The answer given by the author is:
$20 - 12 < x < 12 + 20$, where x is the length of the third side.... | 2020/08/02 | [
"https://math.stackexchange.com/questions/3778007",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/560067/"
] | It's from $20\lt x+12$; subtract $12$ from both sides. | [](https://i.stack.imgur.com/I4juOm.png)
Let the triangle's vertices be $A,B,C$. If $B$ is $12$ cm from $A$, and $C$ is $20$ cm from $B$, then $C$ is $(+12)+(+20) = 12+20$ cm from $A$. This forms the extreme case, which is a degenerate triangle with ... |
22,263,691 | Since I updated to php 5.4 i get the error Call-time pass-by-reference has been removed, as i read, removing the `&` should solve it. It does, but now my code does not work anymore.
I need to make an Associative Array out of the string raw400, with the keys beeing t and f plus the number (example t410 and f410) and th... | 2014/03/08 | [
"https://Stackoverflow.com/questions/22263691",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3394848/"
] | Simply make use of [`parse_str()`](http://in1.php.net/manual/en/function.parse-str.php) for this trick.
```
<?php
$raw400 = 't410-1:06,f410-15.4,t390-1:06,f390-15.6,t370-1:05,f370-16.0,t350-1:05,f350-16.2,t330-1:04,f330-16.3,t310-1:00,f310-16.7';
parse_str(str_replace(array('-',','),array('=','&'),$raw400),$arr);
prin... | Use [**`preg_match_all()`**](http://in3.php.net/preg_match_all) and [**`array_combine`**](http://in3.php.net/manual/en/function.array-combine.php)
```
<?php
$raw400 = 't410-1:06,f410-15.4,t390-1:06,f390-15.6,t370-1:05,f370-16.0,t350-1:05,f350-16.2,t330-1:04,f330-16.3,t310-1:00,f310-16.7';
preg_match_all("/([^-, ]+)\,(... |
3,854,629 | Trying to get JQuery to post JSON to a server:
```
$.ajax({
url: "/path/to/url",
type: "POST",
dataType: "json",
contentType: "json",
data: {"foo": "bar"},
success: function(){
alert("success :-)");
},
error: function(){
alert("fail :-(");
}
});
```
Pro... | 2010/10/04 | [
"https://Stackoverflow.com/questions/3854629",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/124179/"
] | You could use [json2.js](https://github.com/douglascrockford/JSON-js):
```
data: JSON.stringify({"foo": "bar"})
``` | Datatype is for returned data. Contenttype is not applicable, see [here](http://api.jquery.com/jQuery.ajax/)
It can only send strings, I use `JSON.stringify` on my created javascript objects, in your case you could just manually code the string.
You will also need to access the string on server side, for that if you ... |
844,914 | How do I get form data from HTML page using c++, as far as the basics of post and get?
**EDIT:** CGI is using apache 2 on windows, I got c++ configured and tested with with apache already. | 2009/05/10 | [
"https://Stackoverflow.com/questions/844914",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/98204/"
] | The easiest way to access form data from an HTTP request is via [CGI](http://en.wikipedia.org/wiki/Common_Gateway_Interface). This involves reading environment variables which is done using the [getenv](http://www.cplusplus.com/reference/clibrary/cstdlib/getenv/) function. | First of all take a look at [webtoolkit](http://www.webtoolkit.eu/wt#/).
You might want to use that to make your life easier.
Second you can read about network protocols.
Third take a look at your webserver docs, they might provide such interface to create a [deamon](http://en.wikipedia.org/wiki/Daemon_(comput... |
844,914 | How do I get form data from HTML page using c++, as far as the basics of post and get?
**EDIT:** CGI is using apache 2 on windows, I got c++ configured and tested with with apache already. | 2009/05/10 | [
"https://Stackoverflow.com/questions/844914",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/98204/"
] | First of all take a look at [webtoolkit](http://www.webtoolkit.eu/wt#/).
You might want to use that to make your life easier.
Second you can read about network protocols.
Third take a look at your webserver docs, they might provide such interface to create a [deamon](http://en.wikipedia.org/wiki/Daemon_(comput... | You may use CgiCC library that gives you want you are looking for. You may also try some C++ web framework like CppCMS. |
844,914 | How do I get form data from HTML page using c++, as far as the basics of post and get?
**EDIT:** CGI is using apache 2 on windows, I got c++ configured and tested with with apache already. | 2009/05/10 | [
"https://Stackoverflow.com/questions/844914",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/98204/"
] | The easiest way to access form data from an HTTP request is via [CGI](http://en.wikipedia.org/wiki/Common_Gateway_Interface). This involves reading environment variables which is done using the [getenv](http://www.cplusplus.com/reference/clibrary/cstdlib/getenv/) function. | You may use CgiCC library that gives you want you are looking for. You may also try some C++ web framework like CppCMS. |
40,657,731 | I got a C++ source called 'MyCpp.cpp', it locates in: C:\MyCpp.cpp
```
...
5 string CplusplusWarningFunction()
6 {
7 int a = 69;
8 int b = a + 1;
9 a = b;
10 b = 69;
11 return "42 is the answer";
12 }
...
```
Now I want to write a C# function like this
```
void CodeAnalyzer()
{
string path = @"C:\MyCpp.... | 2016/11/17 | [
"https://Stackoverflow.com/questions/40657731",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4608491/"
] | You should use the method with brackets like this:
```
{{ $user->totalHours() }}
```
But it would be good if you use [Laravel Accessor](https://laravel.com/docs/5.3/eloquent-mutators#accessors-and-mutators) like this:
```
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class User extends Model
{
... | Try to use `$this->workedHours()` and call it with `$user->totalHours()` |
95,004 | So I have committed to making a German translation for the guys over at [Rubberduck](https://github.com/rubberduck-vba/Rubberduck), which is localized via .resx files.
Now these files are basically XML-Files with a certain, rather simple document structure:
```
<root>
<!-- Snip -->
<data name="Resource_Key">
... | 2015/06/28 | [
"https://codereview.stackexchange.com/questions/95004",
"https://codereview.stackexchange.com",
"https://codereview.stackexchange.com/users/37660/"
] | I wasn't originally going to post this answer as it seems like petty things, but alas, here it is. I mean no offense by any of it, sometimes I tend to type things out to seem that way, but it's all in good spirit. :)
---
Readability issues
------------------
I was reading through your code and couldn't figure out *w... | Your naming seems inconsistent.
```
public interface OverviewView {
void register(OverviewPresenter p);
void initialize();
void show();
void rebuildWith(List<Translation> translations);
void showError(String title, String errorMessage);
}
```
You have both a `show()` and a `showError(String title... |
95,004 | So I have committed to making a German translation for the guys over at [Rubberduck](https://github.com/rubberduck-vba/Rubberduck), which is localized via .resx files.
Now these files are basically XML-Files with a certain, rather simple document structure:
```
<root>
<!-- Snip -->
<data name="Resource_Key">
... | 2015/06/28 | [
"https://codereview.stackexchange.com/questions/95004",
"https://codereview.stackexchange.com",
"https://codereview.stackexchange.com/users/37660/"
] | I wasn't originally going to post this answer as it seems like petty things, but alas, here it is. I mean no offense by any of it, sometimes I tend to type things out to seem that way, but it's all in good spirit. :)
---
Readability issues
------------------
I was reading through your code and couldn't figure out *w... | There are a few minor things, nothing too serious, that I feel can be improved.
Java 8
------
From a Java 8 perspective, you have a function with significant side effects, which is bad practice. The `loadResxFile` modifies state outside the function which makes it a poor practice. Instead of modifying `originalLocale... |
439,545 | I started using logrotate a few days ago on a new server setup (actually three of them). My config is as follows.
```
/var/www/mywebsite.com/logs/*.log {
rotate 14
daily
dateext
compress
delaycompress
sharedscripts
postrotate
/usr/sbin/apache2ctl graceful > /dev/null
endscript
}... | 2012/10/05 | [
"https://serverfault.com/questions/439545",
"https://serverfault.com",
"https://serverfault.com/users/-1/"
] | Sure, why shouldn't it?
A server certificate identifies a host (by DNS name or IP), not a service. All services on a host can (IMHO even should) use the same certificate. | Yes you can without any issues. |
563,220 | I have the below command I'm running:
```
ping ldap.corp.XXXXX.com
```
LDAP Server up:
```
Pinging ldapeu.corp.XXXXX.com [XX.XXX.XXX.XX] with 32 bytes of data:
Reply from XX.XXX.XXX.XX: bytes=32 time<1ms TTL=252
```
LDAP Server down:
```
ping: ldap.corp.XXXXX.com: Name or service not known
```
how can I implem... | 2020/01/21 | [
"https://unix.stackexchange.com/questions/563220",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/365645/"
] | See : `help --help` or `help`
>
>
> ```
> Display information about builtin commands.
>
> ```
>
>
`help if`:
```
if: if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi
Execute commands based on conditional.
The `if COMMANDS' list is executed. If its exit status is z... | I am not sure where you may have seen this work, but `if` is a keyword of the shell and used for test constructs; it is not a command and hence cannot be called with the usual `--help` option. Instead, it will block and wait for further input (i.e. a test statement) until you press `Ctrl-C` to forcefully quit the start... |
3,741 | I've noticed a lot of questions where an individual has linked to external content to answer a question without bringing in the actual information. Some of these questions, the links are dead (even links to the official ubuntu wiki, for example). Is there a plan or policy for dealing with these types of "redirection" a... | 2012/07/21 | [
"https://meta.askubuntu.com/questions/3741",
"https://meta.askubuntu.com",
"https://meta.askubuntu.com/users/2638/"
] | I find that most answers with just links are pretty much the terms the person asked in the question put into google and then the link is regurgitated as an answer, which is usually incorrect and/or out of date in a place that we can't fix it.
This is the sort of junk this site set out to fix so I usually downvote this... | I am not a moderator and so I have no idea about any contingency plans regarding these "dead" links issue. Although I don't think that there is an existing policy, otherwise they would have dealt with it already.
I personally believe that only AU links (questions with useful answers) should be linked on answers or com... |
3,741 | I've noticed a lot of questions where an individual has linked to external content to answer a question without bringing in the actual information. Some of these questions, the links are dead (even links to the official ubuntu wiki, for example). Is there a plan or policy for dealing with these types of "redirection" a... | 2012/07/21 | [
"https://meta.askubuntu.com/questions/3741",
"https://meta.askubuntu.com",
"https://meta.askubuntu.com/users/2638/"
] | There is a policy, stated in the [how to answer](https://askubuntu.com/questions/how-to-answer) page which is linked from the [FAQ](https://askubuntu.com/faq):
>
> Provide context for links
>
>
> A link to a potential solution is always welcome, but please add context around the link so your fellow users will have ... | I am not a moderator and so I have no idea about any contingency plans regarding these "dead" links issue. Although I don't think that there is an existing policy, otherwise they would have dealt with it already.
I personally believe that only AU links (questions with useful answers) should be linked on answers or com... |
3,741 | I've noticed a lot of questions where an individual has linked to external content to answer a question without bringing in the actual information. Some of these questions, the links are dead (even links to the official ubuntu wiki, for example). Is there a plan or policy for dealing with these types of "redirection" a... | 2012/07/21 | [
"https://meta.askubuntu.com/questions/3741",
"https://meta.askubuntu.com",
"https://meta.askubuntu.com/users/2638/"
] | There is a policy, stated in the [how to answer](https://askubuntu.com/questions/how-to-answer) page which is linked from the [FAQ](https://askubuntu.com/faq):
>
> Provide context for links
>
>
> A link to a potential solution is always welcome, but please add context around the link so your fellow users will have ... | I find that most answers with just links are pretty much the terms the person asked in the question put into google and then the link is regurgitated as an answer, which is usually incorrect and/or out of date in a place that we can't fix it.
This is the sort of junk this site set out to fix so I usually downvote this... |
27,854,326 | I'm trying to get a list of authors on my site & their total posts.
All of this code is working, except the $count\_posts($author->ID) part in the loop.
I think there may also be issues with my array for get\_users - as I'm trying to more parts to the array.
```
function all_authors_list() {
$authors = get_... | 2015/01/09 | [
"https://Stackoverflow.com/questions/27854326",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4098317/"
] | ```
^[^.]*\.(?=[^.]*\.)
```
Try this.Replace by `empty string`.See demo.
<https://regex101.com/r/sH8aR8/36>
```
var re = /^[^.]*\.(?=[^.]*\.)/;
var str = 'abc.def.ghi\n\n';
var subst = '';
var result = str.replace(re, subst);
``` | Try this:
```
str = "abc.def.ghi"
newStr = str.replace(/^[^.]*\.(.*?\.)/, '$1') // def.ghi
```
[**Demo**](https://regex101.com/r/eH1pI3/1) |
24,339,050 | I've created a simple restful restful webservice that I've deployed on Glassfish. I've been able to use the webservice with SOAP UI but having problem doing the same thing with my presentation layer (simple html page).
This is the ajax function I'm using:
```
$(document).ready(function(){
$("#getAllCustomers").click(... | 2014/06/21 | [
"https://Stackoverflow.com/questions/24339050",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2455558/"
] | ```
We can send cross domain request via HTTP Request call(like in C#,JAVA) but as
you say you are using simple html page and try to make service call via ajax.
Earlier we couldn't make cross domain call using ajax call but now we can.
You just need to set crossDomain property true which false by default in ajax
cal... | ```
It seems your trying to make cross domain call.In that case you should need to make proper configuration for cross domain call(not just simple ajax call).
For testing your services, there are to many browser plugins are available which you can use. like Rest-client for fire-fox, Post-man in Chrome etc.
``` |
4,088,335 | ***Context/Motivation***
When studying a subject I usually like to create a document and make a kind of study guide, notes about the subject. I created the document and write using LaTeX. Also, besides learning about the subject itself (it is math or something related to robotics) I practice LaTeX and English because ... | 2021/04/03 | [
"https://math.stackexchange.com/questions/4088335",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/772122/"
] | Here are a couple of websites that may be of interest to you...
[The Forgotten Trigonometric Functions](http://jwilson.coe.uga.edu/EMAT6680Fa2013/Lively/Forgotten%20Trig/The_Forgotten_Trigonometric_Functions.pdf) dealing with trigonometric functions used for navigations, such as the versine, the coversine, the haversi... | If you are interested in some interesting and significant
trigonometric identities, then my file
[Special Algebraic Identities (ident04.gp)](http://grail.eecs.csuohio.edu/%7Esomos/ident04.gp)
may have what you are looking for. The file has over $600$
identities some of which have specific tags.
For example, the tag `[... |
4,088,335 | ***Context/Motivation***
When studying a subject I usually like to create a document and make a kind of study guide, notes about the subject. I created the document and write using LaTeX. Also, besides learning about the subject itself (it is math or something related to robotics) I practice LaTeX and English because ... | 2021/04/03 | [
"https://math.stackexchange.com/questions/4088335",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/772122/"
] | Here are a couple of websites that may be of interest to you...
[The Forgotten Trigonometric Functions](http://jwilson.coe.uga.edu/EMAT6680Fa2013/Lively/Forgotten%20Trig/The_Forgotten_Trigonometric_Functions.pdf) dealing with trigonometric functions used for navigations, such as the versine, the coversine, the haversi... | Trigonometry is based on relationships between
the side lengths $a,b,c$
and corresponding angles $\alpha,\beta,\gamma$
of triangle,
but sometimes it is more convenient to use
express these relations in terms of
another three linear properties of triangle,
namely semiperimeter $\rho=\tfrac12(a+b+c)$,
inradius $r$ and ci... |
4,088,335 | ***Context/Motivation***
When studying a subject I usually like to create a document and make a kind of study guide, notes about the subject. I created the document and write using LaTeX. Also, besides learning about the subject itself (it is math or something related to robotics) I practice LaTeX and English because ... | 2021/04/03 | [
"https://math.stackexchange.com/questions/4088335",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/772122/"
] | If you are interested in some interesting and significant
trigonometric identities, then my file
[Special Algebraic Identities (ident04.gp)](http://grail.eecs.csuohio.edu/%7Esomos/ident04.gp)
may have what you are looking for. The file has over $600$
identities some of which have specific tags.
For example, the tag `[... | Trigonometry is based on relationships between
the side lengths $a,b,c$
and corresponding angles $\alpha,\beta,\gamma$
of triangle,
but sometimes it is more convenient to use
express these relations in terms of
another three linear properties of triangle,
namely semiperimeter $\rho=\tfrac12(a+b+c)$,
inradius $r$ and ci... |
7,105,723 | I know that there are a number of tools for analysing .NET code and calculating the coverage, plus identifying classes/methods/properties etc that are never going to be hit.
However, I am trying to clean-up a legacy application that I am certain contains an amount of unused code - however a lot of code is accessed via... | 2011/08/18 | [
"https://Stackoverflow.com/questions/7105723",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/328848/"
] | You can use the VS2010 Code Coverage tools - they do use Instrumentation (which means reflection won't trick it). Syed Aslam Basha has a [post on it](http://blogs.msdn.com/b/syedab/archive/2011/03/11/c-code-coverage-using-vs2010.aspx) in his MSDN blog on how to enable it for manual testing (which it sounds like you wil... | Clover.NET can do this. But it is commercial and I didn't manage to find a link to the .NET version (I've used it several year ago). |
7,105,723 | I know that there are a number of tools for analysing .NET code and calculating the coverage, plus identifying classes/methods/properties etc that are never going to be hit.
However, I am trying to clean-up a legacy application that I am certain contains an amount of unused code - however a lot of code is accessed via... | 2011/08/18 | [
"https://Stackoverflow.com/questions/7105723",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/328848/"
] | we are using ncover, and it works really nicely: <http://www.ncover.com/>.
But it's commerical, or you use the trial version, if you just need it once. | Clover.NET can do this. But it is commercial and I didn't manage to find a link to the .NET version (I've used it several year ago). |
7,105,723 | I know that there are a number of tools for analysing .NET code and calculating the coverage, plus identifying classes/methods/properties etc that are never going to be hit.
However, I am trying to clean-up a legacy application that I am certain contains an amount of unused code - however a lot of code is accessed via... | 2011/08/18 | [
"https://Stackoverflow.com/questions/7105723",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/328848/"
] | Two open source versions currently exist that support .NET2 and .NET4 runtimes
[PartCover](https://github.com/sawilde/partcover.net4) - is the oldest but only supports 32 bit (supported by teamcity)
and
[OpenCover](https://github.com/sawilde/opencover) - is the latest, it again supports .NET2 and .NET4 but also sup... | Clover.NET can do this. But it is commercial and I didn't manage to find a link to the .NET version (I've used it several year ago). |
7,105,723 | I know that there are a number of tools for analysing .NET code and calculating the coverage, plus identifying classes/methods/properties etc that are never going to be hit.
However, I am trying to clean-up a legacy application that I am certain contains an amount of unused code - however a lot of code is accessed via... | 2011/08/18 | [
"https://Stackoverflow.com/questions/7105723",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/328848/"
] | You can use the VS2010 Code Coverage tools - they do use Instrumentation (which means reflection won't trick it). Syed Aslam Basha has a [post on it](http://blogs.msdn.com/b/syedab/archive/2011/03/11/c-code-coverage-using-vs2010.aspx) in his MSDN blog on how to enable it for manual testing (which it sounds like you wil... | Can't think of a tool other than a profiler, but how about using logging?
Use static analysis to discover static calls, and put logging into the reflective invocations to show what is being called. After a few runs you'll know what is being run.
After all the reflective invocation will know what's doing. |
7,105,723 | I know that there are a number of tools for analysing .NET code and calculating the coverage, plus identifying classes/methods/properties etc that are never going to be hit.
However, I am trying to clean-up a legacy application that I am certain contains an amount of unused code - however a lot of code is accessed via... | 2011/08/18 | [
"https://Stackoverflow.com/questions/7105723",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/328848/"
] | we are using ncover, and it works really nicely: <http://www.ncover.com/>.
But it's commerical, or you use the trial version, if you just need it once. | Can't think of a tool other than a profiler, but how about using logging?
Use static analysis to discover static calls, and put logging into the reflective invocations to show what is being called. After a few runs you'll know what is being run.
After all the reflective invocation will know what's doing. |
7,105,723 | I know that there are a number of tools for analysing .NET code and calculating the coverage, plus identifying classes/methods/properties etc that are never going to be hit.
However, I am trying to clean-up a legacy application that I am certain contains an amount of unused code - however a lot of code is accessed via... | 2011/08/18 | [
"https://Stackoverflow.com/questions/7105723",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/328848/"
] | Two open source versions currently exist that support .NET2 and .NET4 runtimes
[PartCover](https://github.com/sawilde/partcover.net4) - is the oldest but only supports 32 bit (supported by teamcity)
and
[OpenCover](https://github.com/sawilde/opencover) - is the latest, it again supports .NET2 and .NET4 but also sup... | Can't think of a tool other than a profiler, but how about using logging?
Use static analysis to discover static calls, and put logging into the reflective invocations to show what is being called. After a few runs you'll know what is being run.
After all the reflective invocation will know what's doing. |
7,105,723 | I know that there are a number of tools for analysing .NET code and calculating the coverage, plus identifying classes/methods/properties etc that are never going to be hit.
However, I am trying to clean-up a legacy application that I am certain contains an amount of unused code - however a lot of code is accessed via... | 2011/08/18 | [
"https://Stackoverflow.com/questions/7105723",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/328848/"
] | You can use the VS2010 Code Coverage tools - they do use Instrumentation (which means reflection won't trick it). Syed Aslam Basha has a [post on it](http://blogs.msdn.com/b/syedab/archive/2011/03/11/c-code-coverage-using-vs2010.aspx) in his MSDN blog on how to enable it for manual testing (which it sounds like you wil... | Two open source versions currently exist that support .NET2 and .NET4 runtimes
[PartCover](https://github.com/sawilde/partcover.net4) - is the oldest but only supports 32 bit (supported by teamcity)
and
[OpenCover](https://github.com/sawilde/opencover) - is the latest, it again supports .NET2 and .NET4 but also sup... |
7,105,723 | I know that there are a number of tools for analysing .NET code and calculating the coverage, plus identifying classes/methods/properties etc that are never going to be hit.
However, I am trying to clean-up a legacy application that I am certain contains an amount of unused code - however a lot of code is accessed via... | 2011/08/18 | [
"https://Stackoverflow.com/questions/7105723",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/328848/"
] | we are using ncover, and it works really nicely: <http://www.ncover.com/>.
But it's commerical, or you use the trial version, if you just need it once. | Two open source versions currently exist that support .NET2 and .NET4 runtimes
[PartCover](https://github.com/sawilde/partcover.net4) - is the oldest but only supports 32 bit (supported by teamcity)
and
[OpenCover](https://github.com/sawilde/opencover) - is the latest, it again supports .NET2 and .NET4 but also sup... |
42,611,342 | In Python, given a `N_1 x N_2 x N_3` matrix containing either 0s or 1s, I would be looking for a way to display the data in 3D as a `N_1 x N_2 x N_3` volume with volumic pixels (voxels) at the location of 1s.
For example, if the coordinates of 1s were `[[1, 1, 1], [4, 1, 2], [3, 4, 1]]`, the desired output would look ... | 2017/03/05 | [
"https://Stackoverflow.com/questions/42611342",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5614646/"
] | A. Using `voxels`
=================
From matplotlib 2.1 on, there is a [`Axes3D.voxels`](https://matplotlib.org/api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.html#mpl_toolkits.mplot3d.axes3d.Axes3D.voxels) function available, which pretty much does what's asked for here. It is however not very easily customized to di... | The upcomming matplotlib version 2.1 does have a function and [examples for 3D voxels](https://matplotlib.org/devdocs/gallery/mplot3d/voxels.html).
If you use anaconda you can install it through the conda-forge channel.
```
conda install -c conda-forge matplotlib
``` |
42,355,259 | Im using browser-sync with webpack, since there are some files in the build that webpack doesnt have rules for. For some reason browser-sync is not triggering reloads when my image files are modified/added/removed?
In the terminal its logging `[BS] File event [add] : image.png` and
`[BS] File event [change] : image.pn... | 2017/02/20 | [
"https://Stackoverflow.com/questions/42355259",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1413914/"
] | Turns out that I needed to pass a custom event handler to browserSync.init files option, that responded to any kind of events with a reload()
example:
```
browserSync.init({
files: [
{
match: ['./img/**'],
fn: function (event, file) {
this.rel... | if you want watch all HTML files in current directory use `./*.html` or `*.html`
`**` — it's subdirectory; `*` — it's files in directory
Examples:
* `./**/*.html` — watch in all subdirectory files with extension `html`
* `app/js/*.js` — watch in directory `app/js` all files with extension `js`
More information abo... |
42,355,259 | Im using browser-sync with webpack, since there are some files in the build that webpack doesnt have rules for. For some reason browser-sync is not triggering reloads when my image files are modified/added/removed?
In the terminal its logging `[BS] File event [add] : image.png` and
`[BS] File event [change] : image.pn... | 2017/02/20 | [
"https://Stackoverflow.com/questions/42355259",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1413914/"
] | By default BroswerSync only listens for `change` events. The [`watchEvents`](https://browsersync.io/docs/options#option-watchEvents) option can be changed to listen to `add`ing of files. Add `add`, `unlink`, `addDir` and `unlinkDir` to listen to adding and removing of files and directories.
```
browserSync.init({
... | if you want watch all HTML files in current directory use `./*.html` or `*.html`
`**` — it's subdirectory; `*` — it's files in directory
Examples:
* `./**/*.html` — watch in all subdirectory files with extension `html`
* `app/js/*.js` — watch in directory `app/js` all files with extension `js`
More information abo... |
42,355,259 | Im using browser-sync with webpack, since there are some files in the build that webpack doesnt have rules for. For some reason browser-sync is not triggering reloads when my image files are modified/added/removed?
In the terminal its logging `[BS] File event [add] : image.png` and
`[BS] File event [change] : image.pn... | 2017/02/20 | [
"https://Stackoverflow.com/questions/42355259",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1413914/"
] | I had the same problem and the solution that worked for me is `injectChanges:false`
Check docs page: <https://www.browsersync.io/docs/options#option-injectChanges>
so try this:
```
browserSync.init({
injectChanges: false,
files: ['./**.html', './**.png']
});
```
of for those who use Laravel Mix (like I do):
... | if you want watch all HTML files in current directory use `./*.html` or `*.html`
`**` — it's subdirectory; `*` — it's files in directory
Examples:
* `./**/*.html` — watch in all subdirectory files with extension `html`
* `app/js/*.js` — watch in directory `app/js` all files with extension `js`
More information abo... |
42,355,259 | Im using browser-sync with webpack, since there are some files in the build that webpack doesnt have rules for. For some reason browser-sync is not triggering reloads when my image files are modified/added/removed?
In the terminal its logging `[BS] File event [add] : image.png` and
`[BS] File event [change] : image.pn... | 2017/02/20 | [
"https://Stackoverflow.com/questions/42355259",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1413914/"
] | After looking at the browser-sync code base, BS will either perform a page refresh (aka browser reload) or the file changes will be injected. BS performs injection for files with the following extensions: "css", "gif", "jpg", "jpeg", "png", "svg", "webp", "map".
If you want to disable code injection for all file types... | if you want watch all HTML files in current directory use `./*.html` or `*.html`
`**` — it's subdirectory; `*` — it's files in directory
Examples:
* `./**/*.html` — watch in all subdirectory files with extension `html`
* `app/js/*.js` — watch in directory `app/js` all files with extension `js`
More information abo... |
42,355,259 | Im using browser-sync with webpack, since there are some files in the build that webpack doesnt have rules for. For some reason browser-sync is not triggering reloads when my image files are modified/added/removed?
In the terminal its logging `[BS] File event [add] : image.png` and
`[BS] File event [change] : image.pn... | 2017/02/20 | [
"https://Stackoverflow.com/questions/42355259",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1413914/"
] | Turns out that I needed to pass a custom event handler to browserSync.init files option, that responded to any kind of events with a reload()
example:
```
browserSync.init({
files: [
{
match: ['./img/**'],
fn: function (event, file) {
this.rel... | By default BroswerSync only listens for `change` events. The [`watchEvents`](https://browsersync.io/docs/options#option-watchEvents) option can be changed to listen to `add`ing of files. Add `add`, `unlink`, `addDir` and `unlinkDir` to listen to adding and removing of files and directories.
```
browserSync.init({
... |
42,355,259 | Im using browser-sync with webpack, since there are some files in the build that webpack doesnt have rules for. For some reason browser-sync is not triggering reloads when my image files are modified/added/removed?
In the terminal its logging `[BS] File event [add] : image.png` and
`[BS] File event [change] : image.pn... | 2017/02/20 | [
"https://Stackoverflow.com/questions/42355259",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1413914/"
] | Turns out that I needed to pass a custom event handler to browserSync.init files option, that responded to any kind of events with a reload()
example:
```
browserSync.init({
files: [
{
match: ['./img/**'],
fn: function (event, file) {
this.rel... | I had the same problem and the solution that worked for me is `injectChanges:false`
Check docs page: <https://www.browsersync.io/docs/options#option-injectChanges>
so try this:
```
browserSync.init({
injectChanges: false,
files: ['./**.html', './**.png']
});
```
of for those who use Laravel Mix (like I do):
... |
42,355,259 | Im using browser-sync with webpack, since there are some files in the build that webpack doesnt have rules for. For some reason browser-sync is not triggering reloads when my image files are modified/added/removed?
In the terminal its logging `[BS] File event [add] : image.png` and
`[BS] File event [change] : image.pn... | 2017/02/20 | [
"https://Stackoverflow.com/questions/42355259",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1413914/"
] | Turns out that I needed to pass a custom event handler to browserSync.init files option, that responded to any kind of events with a reload()
example:
```
browserSync.init({
files: [
{
match: ['./img/**'],
fn: function (event, file) {
this.rel... | After looking at the browser-sync code base, BS will either perform a page refresh (aka browser reload) or the file changes will be injected. BS performs injection for files with the following extensions: "css", "gif", "jpg", "jpeg", "png", "svg", "webp", "map".
If you want to disable code injection for all file types... |
42,355,259 | Im using browser-sync with webpack, since there are some files in the build that webpack doesnt have rules for. For some reason browser-sync is not triggering reloads when my image files are modified/added/removed?
In the terminal its logging `[BS] File event [add] : image.png` and
`[BS] File event [change] : image.pn... | 2017/02/20 | [
"https://Stackoverflow.com/questions/42355259",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1413914/"
] | By default BroswerSync only listens for `change` events. The [`watchEvents`](https://browsersync.io/docs/options#option-watchEvents) option can be changed to listen to `add`ing of files. Add `add`, `unlink`, `addDir` and `unlinkDir` to listen to adding and removing of files and directories.
```
browserSync.init({
... | I had the same problem and the solution that worked for me is `injectChanges:false`
Check docs page: <https://www.browsersync.io/docs/options#option-injectChanges>
so try this:
```
browserSync.init({
injectChanges: false,
files: ['./**.html', './**.png']
});
```
of for those who use Laravel Mix (like I do):
... |
42,355,259 | Im using browser-sync with webpack, since there are some files in the build that webpack doesnt have rules for. For some reason browser-sync is not triggering reloads when my image files are modified/added/removed?
In the terminal its logging `[BS] File event [add] : image.png` and
`[BS] File event [change] : image.pn... | 2017/02/20 | [
"https://Stackoverflow.com/questions/42355259",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1413914/"
] | After looking at the browser-sync code base, BS will either perform a page refresh (aka browser reload) or the file changes will be injected. BS performs injection for files with the following extensions: "css", "gif", "jpg", "jpeg", "png", "svg", "webp", "map".
If you want to disable code injection for all file types... | I had the same problem and the solution that worked for me is `injectChanges:false`
Check docs page: <https://www.browsersync.io/docs/options#option-injectChanges>
so try this:
```
browserSync.init({
injectChanges: false,
files: ['./**.html', './**.png']
});
```
of for those who use Laravel Mix (like I do):
... |
639,701 | I remember an old retro effect for a screen resolution of $320\times 240$. You would iterate the pixels in a linear fashion so there are $76800$ pixels. You could iterate then one by one starting at pixel $0$ and ending with pixel $76800-1$. However, there was some clever trick using an and mask and multiplication or a... | 2014/01/15 | [
"https://math.stackexchange.com/questions/639701",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/8011/"
] | Transform by subbing $u=e^x$, $dx=du/u$, to get
$$\int\_0^{\infty} du \frac{u^{a-1}}{1+u}$$
This is easily attacked in the complex plane by using a keyhole contour about the positive real axis. The result is that
$$\left (1-e^{i 2 \pi a} \right ) \int\_0^{\infty} du \frac{u^{a-1}}{1+u} = i 2 \pi e^{i \pi (a-1)}$$ | Another contour: you can forgo transforming the integrand if you use a rectangular contour whose horizontal components are the segment $[-R, R] \subset \mathbb{R}$ and $[- R, R] + 2 \pi i$. The vertical components vanish in the limit as $R \to \infty$, and there is a single simple pole in the interior region at $x = i ... |
639,701 | I remember an old retro effect for a screen resolution of $320\times 240$. You would iterate the pixels in a linear fashion so there are $76800$ pixels. You could iterate then one by one starting at pixel $0$ and ending with pixel $76800-1$. However, there was some clever trick using an and mask and multiplication or a... | 2014/01/15 | [
"https://math.stackexchange.com/questions/639701",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/8011/"
] | I'll develop the method involving the substitution $u=e^x$, $\mathrm{d}x = \mathrm{d}u / u$, which has already already been mentioned, hoping it can help.
Calling $\Gamma$ the standard keyhole contour about the positive real line and the origin we have:
$$
\oint\_{\Gamma}\frac{z^{a-1}}{z+1}\mathrm{d}z = 2\pi i e^{i\p... | Another contour: you can forgo transforming the integrand if you use a rectangular contour whose horizontal components are the segment $[-R, R] \subset \mathbb{R}$ and $[- R, R] + 2 \pi i$. The vertical components vanish in the limit as $R \to \infty$, and there is a single simple pole in the interior region at $x = i ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.