qid int64 1 74.7M | question stringlengths 0 58.3k | date stringlengths 10 10 | metadata list | response_j stringlengths 2 48.3k | response_k stringlengths 2 40.5k |
|---|---|---|---|---|---|
12,406,461 | I own an rpg and want to add up all the levels of the users monster and get an end number.
So I narrowed it down for one user and works great.
```
$_SESSION['username'] = "smbisme";
$query = "SELECT belongsto, SUM(level) FROM user_pokemon WHERE `belongsto` = '".$_SESSION['username']."' ";
$result = mysql_query($qu... | 2012/09/13 | [
"https://Stackoverflow.com/questions/12406461",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1668621/"
] | Make a copy of a suitable number of characters:
```
char * substr = malloc(index + 2);
strncpy(substr, ch, index + 1);
substr[index + 1] = 0;
// ...
free(substr);
```
If you're happy to mutilate the original string, just insert a null byte:
```
ch[index + 1] = 0;
```
The odd `+ 1` comes from the fact that your ... | the same behavior of java substring (allocates new string)
```
char* res = (char*)malloc(index+2);
strncpy(res,ch,index+1);
res[index+1]='\0';
```
I see that you try to delimit by +, so easier is to use strtok :
```
char ch[] ="323+465";
char * res;
res = strtok (ch,"+");
// res= 323
``` |
12,406,461 | I own an rpg and want to add up all the levels of the users monster and get an end number.
So I narrowed it down for one user and works great.
```
$_SESSION['username'] = "smbisme";
$query = "SELECT belongsto, SUM(level) FROM user_pokemon WHERE `belongsto` = '".$_SESSION['username']."' ";
$result = mysql_query($qu... | 2012/09/13 | [
"https://Stackoverflow.com/questions/12406461",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1668621/"
] | You can't do that without creating 3 strings. The char point only marks the beginning of the string, so you would need to combine a pointer and an index into a new type. Remember you don't have strings in C. In languages like Java (and others) will create copies of the sub string anyway.
```
struct pseudo_string { cha... | You can't, because that would imply modifying the string literal, which is illegal.
Alternative:
```
char ch[]="323+465";
int index=2;
ch[index] = '\0';
``` |
12,406,461 | I own an rpg and want to add up all the levels of the users monster and get an end number.
So I narrowed it down for one user and works great.
```
$_SESSION['username'] = "smbisme";
$query = "SELECT belongsto, SUM(level) FROM user_pokemon WHERE `belongsto` = '".$_SESSION['username']."' ";
$result = mysql_query($qu... | 2012/09/13 | [
"https://Stackoverflow.com/questions/12406461",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1668621/"
] | You can't do that without creating 3 strings. The char point only marks the beginning of the string, so you would need to combine a pointer and an index into a new type. Remember you don't have strings in C. In languages like Java (and others) will create copies of the sub string anyway.
```
struct pseudo_string { cha... | First, make the string writable by using a char array instead of a pointer to a string literal. Then
```
char ch[] = "323+456";
int idx = 2;
ch[idx] = 0; /* Now ch holds the string "32" */
```
You should avoid an identifier clash with the classic BSD `index` function, that's why I used `idx` instead.
This solution... |
12,406,461 | I own an rpg and want to add up all the levels of the users monster and get an end number.
So I narrowed it down for one user and works great.
```
$_SESSION['username'] = "smbisme";
$query = "SELECT belongsto, SUM(level) FROM user_pokemon WHERE `belongsto` = '".$_SESSION['username']."' ";
$result = mysql_query($qu... | 2012/09/13 | [
"https://Stackoverflow.com/questions/12406461",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1668621/"
] | You can't do that without creating 3 strings. The char point only marks the beginning of the string, so you would need to combine a pointer and an index into a new type. Remember you don't have strings in C. In languages like Java (and others) will create copies of the sub string anyway.
```
struct pseudo_string { cha... | the same behavior of java substring (allocates new string)
```
char* res = (char*)malloc(index+2);
strncpy(res,ch,index+1);
res[index+1]='\0';
```
I see that you try to delimit by +, so easier is to use strtok :
```
char ch[] ="323+465";
char * res;
res = strtok (ch,"+");
// res= 323
``` |
649,647 | On my local network there are (among others) 5 machines (running
Debian Jessie or Arch) wirelessly connected to a Netgear WNDR4000
router. Below is a graph of the ping times to the router
from each of the machines, collected over a period of around half an hour.

Obse... | 2014/12/06 | [
"https://serverfault.com/questions/649647",
"https://serverfault.com",
"https://serverfault.com/users/257425/"
] | Clearly you have an interference problem. Interference can come from passive elements like aluminum wall studs or thick floors, but those are not likely to show the periodic pattern you see. So something electric or electronic is periodically emitting. Finding it may be expensive or tough, but you have a few options.
... | To me, the intermittent nature indicates a hardware problem. Wireless routers go bad often. I'd try a new router and see if that doesn't resolve it. Maybe you can replace under warranty with Netgear if it's not too old?
Or you could always run a bunch of cat-5 and mini switches everywhere, the wired part of the route... |
649,647 | On my local network there are (among others) 5 machines (running
Debian Jessie or Arch) wirelessly connected to a Netgear WNDR4000
router. Below is a graph of the ping times to the router
from each of the machines, collected over a period of around half an hour.

Obse... | 2014/12/06 | [
"https://serverfault.com/questions/649647",
"https://serverfault.com",
"https://serverfault.com/users/257425/"
] | To me, the intermittent nature indicates a hardware problem. Wireless routers go bad often. I'd try a new router and see if that doesn't resolve it. Maybe you can replace under warranty with Netgear if it's not too old?
Or you could always run a bunch of cat-5 and mini switches everywhere, the wired part of the route... | Go to Control Panel > Network and Sharing Center > Change adapter Settings > Right Click "Local Area Connection" > Properties
Disable "Internet protocol Version 6 (TCP/IPv6)"
Disable "Link-Layer Topology Discovery Mapper I/O Driver"
Disable "Link-Layer Topology Discovery Responder"
I had Ping spikes from 30ms up to 3... |
649,647 | On my local network there are (among others) 5 machines (running
Debian Jessie or Arch) wirelessly connected to a Netgear WNDR4000
router. Below is a graph of the ping times to the router
from each of the machines, collected over a period of around half an hour.

Obse... | 2014/12/06 | [
"https://serverfault.com/questions/649647",
"https://serverfault.com",
"https://serverfault.com/users/257425/"
] | Clearly you have an interference problem. Interference can come from passive elements like aluminum wall studs or thick floors, but those are not likely to show the periodic pattern you see. So something electric or electronic is periodically emitting. Finding it may be expensive or tough, but you have a few options.
... | I had it with an idle Wi-Fi network (Windows 7, various TP-LINK USB adapters). The ping fluctuates, making any remote terminal work a nightmare.
Solved by putting a constant load on the Wi-Fi network (e.g. fetching a small file from the router's web server in a loop). |
649,647 | On my local network there are (among others) 5 machines (running
Debian Jessie or Arch) wirelessly connected to a Netgear WNDR4000
router. Below is a graph of the ping times to the router
from each of the machines, collected over a period of around half an hour.

Obse... | 2014/12/06 | [
"https://serverfault.com/questions/649647",
"https://serverfault.com",
"https://serverfault.com/users/257425/"
] | Clearly you have an interference problem. Interference can come from passive elements like aluminum wall studs or thick floors, but those are not likely to show the periodic pattern you see. So something electric or electronic is periodically emitting. Finding it may be expensive or tough, but you have a few options.
... | Go to Control Panel > Network and Sharing Center > Change adapter Settings > Right Click "Local Area Connection" > Properties
Disable "Internet protocol Version 6 (TCP/IPv6)"
Disable "Link-Layer Topology Discovery Mapper I/O Driver"
Disable "Link-Layer Topology Discovery Responder"
I had Ping spikes from 30ms up to 3... |
649,647 | On my local network there are (among others) 5 machines (running
Debian Jessie or Arch) wirelessly connected to a Netgear WNDR4000
router. Below is a graph of the ping times to the router
from each of the machines, collected over a period of around half an hour.

Obse... | 2014/12/06 | [
"https://serverfault.com/questions/649647",
"https://serverfault.com",
"https://serverfault.com/users/257425/"
] | I had it with an idle Wi-Fi network (Windows 7, various TP-LINK USB adapters). The ping fluctuates, making any remote terminal work a nightmare.
Solved by putting a constant load on the Wi-Fi network (e.g. fetching a small file from the router's web server in a loop). | Go to Control Panel > Network and Sharing Center > Change adapter Settings > Right Click "Local Area Connection" > Properties
Disable "Internet protocol Version 6 (TCP/IPv6)"
Disable "Link-Layer Topology Discovery Mapper I/O Driver"
Disable "Link-Layer Topology Discovery Responder"
I had Ping spikes from 30ms up to 3... |
12,897,026 | I've "cached" a jQuery object that I use inside a loop called `$myElement`. I would like to use some native JavaScript functions on it (for better performance). However, my attempts below throws errors (the element is undefined). Is there any way to accomplish this?
```
$myElement.find('span')[0];
$myElement.find('sp... | 2012/10/15 | [
"https://Stackoverflow.com/questions/12897026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/598511/"
] | You seem to need
```
$myElement.find('span')[0].innerHTML = 'some text';
```
Because innerHTML isn't a function on basic DOM elements.
But there is nothing wrong, if you get your element using jQuery, to also use the html function :
```
$myElement.find('span').first().html('some text');
```
I don't think you're ... | The `.innerHTML` property is not a function. Just set its content using assignment.
```
.innerHTML = "foo";
```
But be careful with `.innerHTML` when using jQuery. If you clear content like that, and any of that content has any data or handlers assigned with jQuery, you'll have a memory leak.
A safer practice would... |
12,897,026 | I've "cached" a jQuery object that I use inside a loop called `$myElement`. I would like to use some native JavaScript functions on it (for better performance). However, my attempts below throws errors (the element is undefined). Is there any way to accomplish this?
```
$myElement.find('span')[0];
$myElement.find('sp... | 2012/10/15 | [
"https://Stackoverflow.com/questions/12897026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/598511/"
] | You seem to need
```
$myElement.find('span')[0].innerHTML = 'some text';
```
Because innerHTML isn't a function on basic DOM elements.
But there is nothing wrong, if you get your element using jQuery, to also use the html function :
```
$myElement.find('span').first().html('some text');
```
I don't think you're ... | You can use **[jQuery's "first"](http://api.jquery.com/first/)** function like this:
```
$myElement.find('span').first();
```
Or use to get an nth-child by an index using [**jQuery's "eq"**](http://api.jquery.com/eq-selector/) function, like this:
```
$myElement.find('span').eq(3);
```
Or you can also use **[jQue... |
12,897,026 | I've "cached" a jQuery object that I use inside a loop called `$myElement`. I would like to use some native JavaScript functions on it (for better performance). However, my attempts below throws errors (the element is undefined). Is there any way to accomplish this?
```
$myElement.find('span')[0];
$myElement.find('sp... | 2012/10/15 | [
"https://Stackoverflow.com/questions/12897026",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/598511/"
] | The `.innerHTML` property is not a function. Just set its content using assignment.
```
.innerHTML = "foo";
```
But be careful with `.innerHTML` when using jQuery. If you clear content like that, and any of that content has any data or handlers assigned with jQuery, you'll have a memory leak.
A safer practice would... | You can use **[jQuery's "first"](http://api.jquery.com/first/)** function like this:
```
$myElement.find('span').first();
```
Or use to get an nth-child by an index using [**jQuery's "eq"**](http://api.jquery.com/eq-selector/) function, like this:
```
$myElement.find('span').eq(3);
```
Or you can also use **[jQue... |
30,771,325 | What is a common-lisp analogue of python's argparse library for parsing command-line arguments? | 2015/06/11 | [
"https://Stackoverflow.com/questions/30771325",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1941755/"
] | There are a few including:
command-line-arguments -- <http://cliki.net/command-line-arguments>
getopt -- <https://github.com/keithj/getopt>
unix-options -- <https://github.com/astine/unix-options>
I haven't actually tried any of them but hopefully one of them fits your needs. | I have used `apply-argv` for our bundle-generator. |
254,592 | I am a self learner of continuum mechanic. I am confused about simple shear stress in situation similar to figure 1,
[](https://i.stack.imgur.com/On80J.jpg)
in case $F\_\textrm{ext}$ is caused by external perturbation by i.e., human, what are the forc... | 2016/05/07 | [
"https://physics.stackexchange.com/questions/254592",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/112617/"
] | Oscillating does not always mean vibrating. Oscillation simply means some measurable value is cycling back and forth. This *could* be a vibration, which would be a measurable change in position, back and forth (like a grandfather clock or your phone's vibrator), but oscillation is a more general concept. For example, i... | Some components such as resistors, most (but not all) capacitors, and semiconductors aren't very prone to vibration. Other components like transformers are and have to be constructed to prevent audible vibrations. Back when CRTs were very common, it was not unusual for the coil(s) in their flyback transformer to loosen... |
254,592 | I am a self learner of continuum mechanic. I am confused about simple shear stress in situation similar to figure 1,
[](https://i.stack.imgur.com/On80J.jpg)
in case $F\_\textrm{ext}$ is caused by external perturbation by i.e., human, what are the forc... | 2016/05/07 | [
"https://physics.stackexchange.com/questions/254592",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/112617/"
] | Some components such as resistors, most (but not all) capacitors, and semiconductors aren't very prone to vibration. Other components like transformers are and have to be constructed to prevent audible vibrations. Back when CRTs were very common, it was not unusual for the coil(s) in their flyback transformer to loosen... | today i was using my computer and noticed one of my post-it notes on my monitor vibrating a little. It was resting slightly on the power cord to the keyboard. I thought well isn't that odd and as i moved the keyboard the vibration stopped. I thought hmm AC current is oscillating so could it be causing a minute vibratio... |
254,592 | I am a self learner of continuum mechanic. I am confused about simple shear stress in situation similar to figure 1,
[](https://i.stack.imgur.com/On80J.jpg)
in case $F\_\textrm{ext}$ is caused by external perturbation by i.e., human, what are the forc... | 2016/05/07 | [
"https://physics.stackexchange.com/questions/254592",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/112617/"
] | Oscillating does not always mean vibrating. Oscillation simply means some measurable value is cycling back and forth. This *could* be a vibration, which would be a measurable change in position, back and forth (like a grandfather clock or your phone's vibrator), but oscillation is a more general concept. For example, i... | today i was using my computer and noticed one of my post-it notes on my monitor vibrating a little. It was resting slightly on the power cord to the keyboard. I thought well isn't that odd and as i moved the keyboard the vibration stopped. I thought hmm AC current is oscillating so could it be causing a minute vibratio... |
35,919,408 | Is it possible to have few .yml files and then read them as separate items for task?
Example:
```
- name: write templates
template: src=template.j2 dest=/some/path
with_items: ./configs/*.yml
``` | 2016/03/10 | [
"https://Stackoverflow.com/questions/35919408",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1675615/"
] | I have found pretty elegant solution:
```
---
- hosts: localhost
vars:
my_items: "{{ lookup('fileglob', './configs/*.yml', wantlist=True) }}"
tasks:
- name: write templates
template: src=template.j2 dest=/some/path/{{ (item | from_yaml).name }}
with_file: "{{ my_items }}"
```
And then in template ... | Well, yes and no. You can loop over files and even use their content as variables. But the `template` module does not take parameters. There is an ugly workaround by using an `include` statement. Includes do take parameters and if the `template` task is inside the included file it will have access to them.
Something l... |
546,496 | It is a well-known rule of English grammar that *either* takes *or* and *neither* takes *nor*. *Nary* comes from the phrase "ne'er a" and is considered a non-standard variant of *not*, e.g.:
>
> Nary a soul had I seen for three days... [(source)](https://books.google.ca/books?id=ncXvKmGXQAUC&pg=PA60&dq=%22nary+a+soul... | 2020/09/12 | [
"https://english.stackexchange.com/questions/546496",
"https://english.stackexchange.com",
"https://english.stackexchange.com/users/386505/"
] | *Merriam-Webster's Eleventh Collegiate Dictionary* (2003), a resource that tends to be parsimonious with its usage labels, identifies *nary* as a dialect word:
>
> **nary** *adj* {alter. of *ne'er a*} (1848) *dial* : not any: not one {I must have it back as I have *nary* other copy —Flannery O'Connor} — **nary a** *o... | In [COCA](https://www.english-corpora.org/coca/), there are 50 results for *nary* followed by *or*, but only 8 for *nary* followed by *nor*. The [iWeb](https://www.english-corpora.org/iweb/) corpus is similar: ~300 results for *nary*/*or* and ~50 for *nary*/*nor*.
I would say then that both are acceptable, but *or* is... |
612,902 | System: `Linux Debian-10-xxxx 4.19.0-11-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64 GNU/Linux.`
I've got an EFI Linux/Windows dual boot system with clonezilla and gparted entries.
I installed a memtest86 image, and made its grub related entry `43_custom`.
I'm trying to update my grub menu, but `update-grub`... | 2020/10/04 | [
"https://unix.stackexchange.com/questions/612902",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/435794/"
] | The reason your `grub.cfg` is not updated is because you have `grub-legacy` installed which uses `/boot/grub/menu.lst`.
The [`grub`](https://packages.debian.org/buster/grub) package is a virtual package for `grub-legacy`.
Purge the `grub-legacy` package and install [`grub-efi`](https://packages.debian.org/buster/grub-... | Thanks dude ! You nailed it ! But now , grub only shows my linux and windows entries.
what sould I do to get my clonezilla, gparted and memtest 86 options get shown on boot menu ?
Files 40 ,41 & 42\_custom are located in /etc/grub.d but update-grub is not detecting them.
And should I edit the files ?, because ... |
39,088,370 | I've got an issue with a simple web application I'm developing in C# using VS 2013. It's supposed to take some values from a grid view and export them to a .csv file, however when I test, it's just taking that information and displaying it as text on the page. I wrote a test page with a single link button and tried to ... | 2016/08/22 | [
"https://Stackoverflow.com/questions/39088370",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/6745149/"
] | Try
```
Response.AddHeader("Content-Disposition","attachment; filename=test.txt");
``` | I think it was the:
Response.AddHeader("Content-Dispostion","attachment; filename=test.txt")
That corrected the problem in test page so that it was prompting to save the text file. Then I changed the Content Type to text/csv and tried again and again it prompted to save a csv file. So I copied that code an used it th... |
11,763,774 | I have an elastic search river setup using the jdbc river plugin, that just does a simple select \* from and indexes that table.
But I would like to be able to trigger the river on demand via the API as well as at a standard time interval, so that I can have it index a document when its inserted into this table.
Anyb... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11763774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/333943/"
] | I don't see a good way for you to trigger the JDBC River into indexing your specific updated document in real time, and I'm not sure it's meant to be used for that anyways.
Instead of triggering the JDBC river to index your document, why don't you just index the document from the update code?
The JDBC river is a grea... | Thanks for your suggestion. You are very welcome for giving feedback, please join the elasticsearch community. I will open an issue for triggering a fetch at <https://github.com/jprante/elasticsearch-river-jdbc/issues> |
11,763,774 | I have an elastic search river setup using the jdbc river plugin, that just does a simple select \* from and indexes that table.
But I would like to be able to trigger the river on demand via the API as well as at a standard time interval, so that I can have it index a document when its inserted into this table.
Anyb... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11763774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/333943/"
] | I don't see a good way for you to trigger the JDBC River into indexing your specific updated document in real time, and I'm not sure it's meant to be used for that anyways.
Instead of triggering the JDBC river to index your document, why don't you just index the document from the update code?
The JDBC river is a grea... | It sounds like you are struggling with the classic "[push vs. pull](http://elasticsearch-users.115913.n3.nabble.com/keeping-datastore-and-index-in-sync-Push-Vs-Pull-best-approach-td4032591.html)" indexing problem. Rivers are designed to pull data out of the database at an interval. They're easy to set up, but like all ... |
11,763,774 | I have an elastic search river setup using the jdbc river plugin, that just does a simple select \* from and indexes that table.
But I would like to be able to trigger the river on demand via the API as well as at a standard time interval, so that I can have it index a document when its inserted into this table.
Anyb... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11763774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/333943/"
] | I don't see a good way for you to trigger the JDBC River into indexing your specific updated document in real time, and I'm not sure it's meant to be used for that anyways.
Instead of triggering the JDBC river to index your document, why don't you just index the document from the update code?
The JDBC river is a grea... | alernative would be use logstash with jdbc plugin
<https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html>
1. download logstash
2. install input-jdbc-plugin
example config:
```
input {
jdbc {
jdbc_connection_string => "jdbc:oracle:thin:@localhost:1521:XE"
... |
11,763,774 | I have an elastic search river setup using the jdbc river plugin, that just does a simple select \* from and indexes that table.
But I would like to be able to trigger the river on demand via the API as well as at a standard time interval, so that I can have it index a document when its inserted into this table.
Anyb... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11763774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/333943/"
] | Thanks for your suggestion. You are very welcome for giving feedback, please join the elasticsearch community. I will open an issue for triggering a fetch at <https://github.com/jprante/elasticsearch-river-jdbc/issues> | alernative would be use logstash with jdbc plugin
<https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html>
1. download logstash
2. install input-jdbc-plugin
example config:
```
input {
jdbc {
jdbc_connection_string => "jdbc:oracle:thin:@localhost:1521:XE"
... |
11,763,774 | I have an elastic search river setup using the jdbc river plugin, that just does a simple select \* from and indexes that table.
But I would like to be able to trigger the river on demand via the API as well as at a standard time interval, so that I can have it index a document when its inserted into this table.
Anyb... | 2012/08/01 | [
"https://Stackoverflow.com/questions/11763774",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/333943/"
] | It sounds like you are struggling with the classic "[push vs. pull](http://elasticsearch-users.115913.n3.nabble.com/keeping-datastore-and-index-in-sync-Push-Vs-Pull-best-approach-td4032591.html)" indexing problem. Rivers are designed to pull data out of the database at an interval. They're easy to set up, but like all ... | alernative would be use logstash with jdbc plugin
<https://www.elastic.co/guide/en/logstash/current/plugins-inputs-jdbc.html>
1. download logstash
2. install input-jdbc-plugin
example config:
```
input {
jdbc {
jdbc_connection_string => "jdbc:oracle:thin:@localhost:1521:XE"
... |
55,904,265 | My intention is to set two different max length values to two input fields, `notifTitle` and `notifDescribtion`.
So far I have:
```
extension CreateNotViewController: UITextFieldDelegate {
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool... | 2019/04/29 | [
"https://Stackoverflow.com/questions/55904265",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11397070/"
] | I think`[value]` only supports strings. Try `[ngValue]` instead.
[Differences between value and ngValue in Angular 5](https://stackoverflow.com/questions/49918687/differences-between-value-and-ngvalue-in-angular-5) | `[value]` always accepts **String** as an input, but `[ngValue]` accepts **Object**. Try using `[ngValue]` |
55,904,265 | My intention is to set two different max length values to two input fields, `notifTitle` and `notifDescribtion`.
So far I have:
```
extension CreateNotViewController: UITextFieldDelegate {
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool... | 2019/04/29 | [
"https://Stackoverflow.com/questions/55904265",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11397070/"
] | Since `[value]` needs a string, you could set its value to
```
[value]="period.month + '/' + period.year"
```
which resolves to a string. In your code, `period.month` is divided by `period.year` and resolves to `NaN` if at least one of them cannot be changed to a number. | I think`[value]` only supports strings. Try `[ngValue]` instead.
[Differences between value and ngValue in Angular 5](https://stackoverflow.com/questions/49918687/differences-between-value-and-ngvalue-in-angular-5) |
55,904,265 | My intention is to set two different max length values to two input fields, `notifTitle` and `notifDescribtion`.
So far I have:
```
extension CreateNotViewController: UITextFieldDelegate {
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool... | 2019/04/29 | [
"https://Stackoverflow.com/questions/55904265",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/11397070/"
] | Since `[value]` needs a string, you could set its value to
```
[value]="period.month + '/' + period.year"
```
which resolves to a string. In your code, `period.month` is divided by `period.year` and resolves to `NaN` if at least one of them cannot be changed to a number. | `[value]` always accepts **String** as an input, but `[ngValue]` accepts **Object**. Try using `[ngValue]` |
49,146,332 | Ques. I have this method wit return type as 'List Item Collection'and my list in SharePoint contains more than 5000 items. In order to overcome the threshold, I need to fetch items in batches by putting row limit but I do not know what to put in the place of ?? so that the return type is also 'ListItemCollection'(Share... | 2018/03/07 | [
"https://Stackoverflow.com/questions/49146332",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/9455204/"
] | I can't test the code without communication.dll, so please check if the following code is working for you:
```
import clr
import sys
sys.path.append("D:\\dll") # path to dll
clr.AddReference("communication") # add reference to communication.dll
from communication import test
ref_string_p1 = "----------"
out_string_p... | you can feed ref as a regular argument, and feed out arbitrarily. pythonnet will return them positionally as tuple.
assume `void test(ref string p1,out string p2)` in c#,
you get `p1, p2 = test(p1, None)` in python |
428,816 | If a massless observer is going at the speed of light, what speed will it measure of a light beam going parallel to it? | 2018/09/15 | [
"https://physics.stackexchange.com/questions/428816",
"https://physics.stackexchange.com",
"https://physics.stackexchange.com/users/206692/"
] | >
> what speed will it measure of a light beam going parallel to it ?
>
>
>
Suppose an entity $A$ has speed $c$ in *an* inertial frame of reference (IFR) then, *according to SR*, $A$ has speed $c$ in *all* IFRs, i.e., there is *no* IFR in which $A$ is at rest.
That is, there are no rulers and there are no clocks ... | It is not possible to attach a reference frame to anything moving at the speed of light. Anything traveling at that speed will not experience any time and will not be able to perform any observations. Thus, it is meaningless to ask about what one would see if he/she traveled at the speed of light.
However, it the obse... |
44,897,090 | ```js
$( document ).ready(function() {
$('#handler').on('click', '.selector', function(){
alert( $(this).text());
});
});
```
```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="handler">
handler content
<a href="#" class="selector">selector co... | 2017/07/04 | [
"https://Stackoverflow.com/questions/44897090",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/172637/"
] | In this specific case you can directly use the unique id you have
```
$("#handler").
```
In case if that is a class, you have `$(this).parent()` to the top level.
you can chain it to nth level , till you reach the top. `$(this).parent().parent()`...
or since you know the selector, you can do `$(this).parents("se... | Use [closest()](http://api.jquery.com/closest) if the parent has hierarchy,
```
$(this).closest('div')
```
and use [parent()](http://api.jquery.com/parent) if it is direct parent of target element,
```
$(this).parent('div');
```
And the selector is unique and has id like `handler` then the best option is
```
$(... |
44,897,090 | ```js
$( document ).ready(function() {
$('#handler').on('click', '.selector', function(){
alert( $(this).text());
});
});
```
```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="handler">
handler content
<a href="#" class="selector">selector co... | 2017/07/04 | [
"https://Stackoverflow.com/questions/44897090",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/172637/"
] | In this specific case you can directly use the unique id you have
```
$("#handler").
```
In case if that is a class, you have `$(this).parent()` to the top level.
you can chain it to nth level , till you reach the top. `$(this).parent().parent()`...
or since you know the selector, you can do `$(this).parents("se... | Change it to
```
$( document ).ready(function() {
$('#handler').on('click', function(){
//$(this) here will be #handler.
});
});
```
Or if you still want the function to fire when someone clicks on `.selector` then you can do the following
```
$( document ).ready(function() {
$('#handler').on('click', '... |
44,897,090 | ```js
$( document ).ready(function() {
$('#handler').on('click', '.selector', function(){
alert( $(this).text());
});
});
```
```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="handler">
handler content
<a href="#" class="selector">selector co... | 2017/07/04 | [
"https://Stackoverflow.com/questions/44897090",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/172637/"
] | Use the event "delegateTarget" property
```
$( document ).ready(function() {
$('#handler').on('click', '.selector', function(e){
console.log(e.delegateTarget);
});
});
```
Working example:-
```js
$( document ).ready(function() {
$('#handler').on('click', '.selector', function(e){
console.l... | In this specific case you can directly use the unique id you have
```
$("#handler").
```
In case if that is a class, you have `$(this).parent()` to the top level.
you can chain it to nth level , till you reach the top. `$(this).parent().parent()`...
or since you know the selector, you can do `$(this).parents("se... |
44,897,090 | ```js
$( document ).ready(function() {
$('#handler').on('click', '.selector', function(){
alert( $(this).text());
});
});
```
```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="handler">
handler content
<a href="#" class="selector">selector co... | 2017/07/04 | [
"https://Stackoverflow.com/questions/44897090",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/172637/"
] | Use [closest()](http://api.jquery.com/closest) if the parent has hierarchy,
```
$(this).closest('div')
```
and use [parent()](http://api.jquery.com/parent) if it is direct parent of target element,
```
$(this).parent('div');
```
And the selector is unique and has id like `handler` then the best option is
```
$(... | Change it to
```
$( document ).ready(function() {
$('#handler').on('click', function(){
//$(this) here will be #handler.
});
});
```
Or if you still want the function to fire when someone clicks on `.selector` then you can do the following
```
$( document ).ready(function() {
$('#handler').on('click', '... |
44,897,090 | ```js
$( document ).ready(function() {
$('#handler').on('click', '.selector', function(){
alert( $(this).text());
});
});
```
```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="handler">
handler content
<a href="#" class="selector">selector co... | 2017/07/04 | [
"https://Stackoverflow.com/questions/44897090",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/172637/"
] | Use the event "delegateTarget" property
```
$( document ).ready(function() {
$('#handler').on('click', '.selector', function(e){
console.log(e.delegateTarget);
});
});
```
Working example:-
```js
$( document ).ready(function() {
$('#handler').on('click', '.selector', function(e){
console.l... | Use [closest()](http://api.jquery.com/closest) if the parent has hierarchy,
```
$(this).closest('div')
```
and use [parent()](http://api.jquery.com/parent) if it is direct parent of target element,
```
$(this).parent('div');
```
And the selector is unique and has id like `handler` then the best option is
```
$(... |
44,897,090 | ```js
$( document ).ready(function() {
$('#handler').on('click', '.selector', function(){
alert( $(this).text());
});
});
```
```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div id="handler">
handler content
<a href="#" class="selector">selector co... | 2017/07/04 | [
"https://Stackoverflow.com/questions/44897090",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/172637/"
] | Use the event "delegateTarget" property
```
$( document ).ready(function() {
$('#handler').on('click', '.selector', function(e){
console.log(e.delegateTarget);
});
});
```
Working example:-
```js
$( document ).ready(function() {
$('#handler').on('click', '.selector', function(e){
console.l... | Change it to
```
$( document ).ready(function() {
$('#handler').on('click', function(){
//$(this) here will be #handler.
});
});
```
Or if you still want the function to fire when someone clicks on `.selector` then you can do the following
```
$( document ).ready(function() {
$('#handler').on('click', '... |
28,064,168 | What I'm talking about is:
```
Meteor.users.findOne() =
{
_id: "..."
...
followers: {
users: Array[], // ["someUserId1", "someUserId2"]
pages: Array[] // ["somePageId1", "somePageId2"]
}
}
```
vs.
```
Followings.findOne() =
{
_id: "..."
followeeId: "..."
followeeType: "user"
followerId: "..... | 2015/01/21 | [
"https://Stackoverflow.com/questions/28064168",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/3585619/"
] | As I recall in a NodeJS environment you must do something like this to actually create a record: `db.get('collectionName').insert({..something...});` or `db.get('collectionName').save({...something...});` but you don't get to use the collection name as a property of db.
The line you're mentioning is only used in Mongo... | In JavaScript there is a way to define a function that will be executed when an undefined method is called.
Example:
```
var o = {
__noSuchMethod__: function(id, args) { console.log(id, '(' + args.join(', ') + ')'); }
};
o.foo(1, 2, 3);
o.bar(4, 5);
o.baz();
// Output
// foo (1, 2, 3)
// bar (4, 5)
// baz ()
```... |
25,089,465 | I am trying to analyse some third party code and I am interested in all arrays that are declared+defined in the given source (.c and .h). This is interesting to know if some memory is wasted when porting to an embedded system.
I can assume that only standard types are used, i.e. char, int, long, float, double.
Here i... | 2014/08/01 | [
"https://Stackoverflow.com/questions/25089465",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | This will require some regex wizardry but it **will not be reliable enough**. You should use a proper C parser for such tasks.
But still, if you want to do it quick&dirty, here's a Perl (or Perl-compatible) regex that does the trick (it needs to be used with the `m` and `s` modifiers):
```
(?:\(.*\)|\/\*.*?\*\/)(*SKI... | You can try using this regex:
```
\w+\s\w+\[\w+\](?!,)
```
**[Working demo](http://regex101.com/r/pA7tZ4/1)**
 |
25,089,465 | I am trying to analyse some third party code and I am interested in all arrays that are declared+defined in the given source (.c and .h). This is interesting to know if some memory is wasted when porting to an embedded system.
I can assume that only standard types are used, i.e. char, int, long, float, double.
Here i... | 2014/08/01 | [
"https://Stackoverflow.com/questions/25089465",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | This will require some regex wizardry but it **will not be reliable enough**. You should use a proper C parser for such tasks.
But still, if you want to do it quick&dirty, here's a Perl (or Perl-compatible) regex that does the trick (it needs to be used with the `m` and `s` modifiers):
```
(?:\(.*\)|\/\*.*?\*\/)(*SKI... | Try:
```
(?:char|int|long|short|float|double)(?:\s+.*?)?\[.*?\].*?;
```
This regex matches the requirements, if:
* The array is of the type: char, int, long, short, float, double
* The Array declaration ends with ; |
25,089,465 | I am trying to analyse some third party code and I am interested in all arrays that are declared+defined in the given source (.c and .h). This is interesting to know if some memory is wasted when porting to an embedded system.
I can assume that only standard types are used, i.e. char, int, long, float, double.
Here i... | 2014/08/01 | [
"https://Stackoverflow.com/questions/25089465",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I suggest `clang-query` as an alternative to `regex`. Here's one example to show what `clang-query` can do.
Two files `test.h` and `test.cpp` similar to the question.
```
$ cat ~/CPP/test.h
1 int x[10], y, z[10];
$ cat ~/CPP/test.cpp
1 #include "test.h"
2
3 #define MY_PERSONAL_TAG_SIZE 10
4
5 struct My... | You can try using this regex:
```
\w+\s\w+\[\w+\](?!,)
```
**[Working demo](http://regex101.com/r/pA7tZ4/1)**
 |
25,089,465 | I am trying to analyse some third party code and I am interested in all arrays that are declared+defined in the given source (.c and .h). This is interesting to know if some memory is wasted when porting to an embedded system.
I can assume that only standard types are used, i.e. char, int, long, float, double.
Here i... | 2014/08/01 | [
"https://Stackoverflow.com/questions/25089465",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/-1/"
] | I suggest `clang-query` as an alternative to `regex`. Here's one example to show what `clang-query` can do.
Two files `test.h` and `test.cpp` similar to the question.
```
$ cat ~/CPP/test.h
1 int x[10], y, z[10];
$ cat ~/CPP/test.cpp
1 #include "test.h"
2
3 #define MY_PERSONAL_TAG_SIZE 10
4
5 struct My... | Try:
```
(?:char|int|long|short|float|double)(?:\s+.*?)?\[.*?\].*?;
```
This regex matches the requirements, if:
* The array is of the type: char, int, long, short, float, double
* The Array declaration ends with ; |
9,137,284 | How do I match the end of a regular expression by a word? For example:
```
<h1><a href=...></a>CONTENT</h1>
```
Given that `<h1>` is the start tag, how do I return `<a href=...></a>CONTENT`?
The expression `/< h1>(([<\/h1>\b])*/` does not seem to work | 2012/02/04 | [
"https://Stackoverflow.com/questions/9137284",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1124535/"
] | ```
/<h1>([\s\S]*)<\/h1>/
```
I think this should help you out. | What makes most regular expressions difficult, is the fact that they're greedy by default. By making them *ungreedy* using the [`U` modifier](http://php.net/manual/en/reference.pcre.pattern.modifiers.php), writing something like this becomes very trivial. The following should work.
```
/<h1>(.*)<\/h1>/U
``` |
120,360 | [Here are some antonyms for lonely](http://www.thesaurus.com/browse/lonely):
```
populated
sociable
befriended
close
frequented
inhabited
loved
unlonely
```
Basically, by lonely I mean someone who feels lonely even in a crowd. Such people are usually depressed. They feel happy if *anyone* gives them some positive at... | 2017/02/23 | [
"https://ell.stackexchange.com/questions/120360",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/5198/"
] | Now that I read your added description
>
> ...won't have to go on looking elsewhere for attention and love since they are enough for themselves
>
>
>
I'd suggest *a person who has a strong sense of [self-esteem](https://en.m.wikipedia.org/wiki/Self-esteem)*. Self-esteem is what the world desperately needs since m... | In dating speak, it's
>
> sociable
>
>
>
In corporate speak, it's
>
> a people person
>
>
>
It's basically a person who is comfortable interacting with people and possibly crowds. Not necessarily an *extrovert*, but definitely not an *introvert*. |
120,360 | [Here are some antonyms for lonely](http://www.thesaurus.com/browse/lonely):
```
populated
sociable
befriended
close
frequented
inhabited
loved
unlonely
```
Basically, by lonely I mean someone who feels lonely even in a crowd. Such people are usually depressed. They feel happy if *anyone* gives them some positive at... | 2017/02/23 | [
"https://ell.stackexchange.com/questions/120360",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/5198/"
] | It's hard to capture everything you want to say with a single word, but here is one suggestion:
>
> [**self-confident**](http://www.wordnik.com/words/self-confident) (*adj.*) showing poise and confidence in your own worth
>
>
>
You might be able to pinpoint what you're trying to say even more closely by pairing t... | In dating speak, it's
>
> sociable
>
>
>
In corporate speak, it's
>
> a people person
>
>
>
It's basically a person who is comfortable interacting with people and possibly crowds. Not necessarily an *extrovert*, but definitely not an *introvert*. |
120,360 | [Here are some antonyms for lonely](http://www.thesaurus.com/browse/lonely):
```
populated
sociable
befriended
close
frequented
inhabited
loved
unlonely
```
Basically, by lonely I mean someone who feels lonely even in a crowd. Such people are usually depressed. They feel happy if *anyone* gives them some positive at... | 2017/02/23 | [
"https://ell.stackexchange.com/questions/120360",
"https://ell.stackexchange.com",
"https://ell.stackexchange.com/users/5198/"
] | It's hard to capture everything you want to say with a single word, but here is one suggestion:
>
> [**self-confident**](http://www.wordnik.com/words/self-confident) (*adj.*) showing poise and confidence in your own worth
>
>
>
You might be able to pinpoint what you're trying to say even more closely by pairing t... | Now that I read your added description
>
> ...won't have to go on looking elsewhere for attention and love since they are enough for themselves
>
>
>
I'd suggest *a person who has a strong sense of [self-esteem](https://en.m.wikipedia.org/wiki/Self-esteem)*. Self-esteem is what the world desperately needs since m... |
52,879,573 | Sample data:
```
ID Goal Status applied_at
A A Ongoing 1-Jan
A B Applied 1-Feb
B C Ongoing 1-Mar
B D Rebalanced 1-Apr
B E Signed Paperwork 1-May
```
I am trying to pick a `status` per `ID` based on `min(applied_... | 2018/10/18 | [
"https://Stackoverflow.com/questions/52879573",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8834780/"
] | `row_number()` is a typical approach:
```
select id, status
from (select t.*, row_number() over (partition by id order by applied_at) as seqnum
from t
) t
where seqnum = 1;
``` | Other option would be to use subquery :
```
select t.id, t.status
from table t
where applied_at = (select min(t1.applied_at) from table t1 where t1.id = t.id);
``` |
52,879,573 | Sample data:
```
ID Goal Status applied_at
A A Ongoing 1-Jan
A B Applied 1-Feb
B C Ongoing 1-Mar
B D Rebalanced 1-Apr
B E Signed Paperwork 1-May
```
I am trying to pick a `status` per `ID` based on `min(applied_... | 2018/10/18 | [
"https://Stackoverflow.com/questions/52879573",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/8834780/"
] | `row_number()` is a typical approach:
```
select id, status
from (select t.*, row_number() over (partition by id order by applied_at) as seqnum
from t
) t
where seqnum = 1;
``` | use corelated subquery
```
select t.ID,t.status from your_table t where t.applied_at =
( select min(applied_at) from your_table t1
where t1.ID =t.ID
)
``` |
32,548,409 | ```
1 Byte = 8bits
1 Halfword = 16bits = 2 Bytes
1 Word = 32 bits = 4 Bytes
1 Long = 64 bits = 8 Bytes
```
But then in x86 Assembly (AT&T syntax), I use movw (move word) to move a Halfword to a 16 bit register, movl (move long) to move a word to a 32 bits register. I'm using a virtual machine on a 64 bits OS running ... | 2015/09/13 | [
"https://Stackoverflow.com/questions/32548409",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2271391/"
] | The term word size, or [machine word](https://en.wikipedia.org/wiki/Word_%28computer_architecture%29), usually refers to the size of a register, and the size of a native load/store. The wikipedia article mentions some of the same stuff I wrote in this answer.
For a 64-bit system, a word could mean 8 bytes, but yes it'... | In x86 a word is always 16 bits:
```
1 Byte = 8 bits
1 Word = 16 bits = 2 Bytes
1 Dword (long) = 32 bits = 8 Bytes
1 Qword = 64 bits = 16 Bytes
```
In GDB/real size (on a 32 bits computer):
```
1 Byte = 8bits
1 Halfword = 16bits = 2 Bytes
1 Word = 32 bits = 4 Bytes
1 Giant (long) = 64 bits = 8 Bytes
```
Intel "m... |
156,938 | I am learning Docker, and I quite like it.
However, I don't understand, why does docker need root privileges for making containers, reading logs, and so on.
I have read some articles like this one
<https://docs.docker.com/articles/security/>
but all I see there is "docker needs root priviledges, because it can have... | 2014/09/22 | [
"https://unix.stackexchange.com/questions/156938",
"https://unix.stackexchange.com",
"https://unix.stackexchange.com/users/10393/"
] | Some "cool" docker features like port binding, mounting filesystems etc. strictly requires `docker.io` *daemon* to be run with super-user privileges.
However, you *can* use `docker` *command line tool* without root privileges if `docker.io` daemon is listening to a network port or it's unix socket is accessible for us... | According to those links
* <https://github.com/docker/docker/issues/1034>
* <https://github.com/docker/docker/issues/2919>
* <http://s3hh.wordpress.com/2013/07/19/creating-and-using-containers-without-privilege/> (only slightly related)
dockers could not have networking, if it didn't have root priviledges, if I under... |
53,554 | I'm unable to get my Nexus 4 phone recognized by ADB on Ubuntu (12.04 with a newer kernel installed: 3.8.0-30-generic). Developer mode is enabled on the phone.
The device shows up in *lsusb*:
```
$ lsusb
...
Bus 003 Device 034: ID 18d1:4ee5 Google Inc.
...
```
But when I run *adb devices* I get an empty list. I f... | 2013/09/19 | [
"https://android.stackexchange.com/questions/53554",
"https://android.stackexchange.com",
"https://android.stackexchange.com/users/41742/"
] | It's not enough to make the **Developer options** page appear in the settings menu (by repeatedly tapping the build number). On that page, there's an option **USB debugging**, which defaults to off.
When USB Debugging is enabled, connecting your device to a PC using USB makes the "USB debugging connected" notification... | For a more complete instruction set of how to get the Nexus 4 udev rules on ubuntu configured follow these instructions:
How to find your device Vendor ID
=================================
You can find a Vendor ID for usb connected devices with the following linux command:
```
lsusb
```
This will generate a list o... |
53,554 | I'm unable to get my Nexus 4 phone recognized by ADB on Ubuntu (12.04 with a newer kernel installed: 3.8.0-30-generic). Developer mode is enabled on the phone.
The device shows up in *lsusb*:
```
$ lsusb
...
Bus 003 Device 034: ID 18d1:4ee5 Google Inc.
...
```
But when I run *adb devices* I get an empty list. I f... | 2013/09/19 | [
"https://android.stackexchange.com/questions/53554",
"https://android.stackexchange.com",
"https://android.stackexchange.com/users/41742/"
] | It's not enough to make the **Developer options** page appear in the settings menu (by repeatedly tapping the build number). On that page, there's an option **USB debugging**, which defaults to off.
When USB Debugging is enabled, connecting your device to a PC using USB makes the "USB debugging connected" notification... | I'm running Ubuntu 14.04 LTS and I've found that I have to run adb with root permissions for it to detect my phone. Just now I ran (from the platform-tools directory) `./adb devices` and came up with an empty list. I restarted adb as root by running `./adb kill-server` and then `sudo ./adb start-server`. Now `adb devic... |
53,554 | I'm unable to get my Nexus 4 phone recognized by ADB on Ubuntu (12.04 with a newer kernel installed: 3.8.0-30-generic). Developer mode is enabled on the phone.
The device shows up in *lsusb*:
```
$ lsusb
...
Bus 003 Device 034: ID 18d1:4ee5 Google Inc.
...
```
But when I run *adb devices* I get an empty list. I f... | 2013/09/19 | [
"https://android.stackexchange.com/questions/53554",
"https://android.stackexchange.com",
"https://android.stackexchange.com/users/41742/"
] | It's not enough to make the **Developer options** page appear in the settings menu (by repeatedly tapping the build number). On that page, there's an option **USB debugging**, which defaults to off.
When USB Debugging is enabled, connecting your device to a PC using USB makes the "USB debugging connected" notification... | FYI: I recently updated the android version from 4.4 to 5.0 on my phone and ADB would no longer show the device as connected. It seems where USB connection method **MTP** was correct before it *now has to be* **PTP**. |
53,554 | I'm unable to get my Nexus 4 phone recognized by ADB on Ubuntu (12.04 with a newer kernel installed: 3.8.0-30-generic). Developer mode is enabled on the phone.
The device shows up in *lsusb*:
```
$ lsusb
...
Bus 003 Device 034: ID 18d1:4ee5 Google Inc.
...
```
But when I run *adb devices* I get an empty list. I f... | 2013/09/19 | [
"https://android.stackexchange.com/questions/53554",
"https://android.stackexchange.com",
"https://android.stackexchange.com/users/41742/"
] | For a more complete instruction set of how to get the Nexus 4 udev rules on ubuntu configured follow these instructions:
How to find your device Vendor ID
=================================
You can find a Vendor ID for usb connected devices with the following linux command:
```
lsusb
```
This will generate a list o... | FYI: I recently updated the android version from 4.4 to 5.0 on my phone and ADB would no longer show the device as connected. It seems where USB connection method **MTP** was correct before it *now has to be* **PTP**. |
53,554 | I'm unable to get my Nexus 4 phone recognized by ADB on Ubuntu (12.04 with a newer kernel installed: 3.8.0-30-generic). Developer mode is enabled on the phone.
The device shows up in *lsusb*:
```
$ lsusb
...
Bus 003 Device 034: ID 18d1:4ee5 Google Inc.
...
```
But when I run *adb devices* I get an empty list. I f... | 2013/09/19 | [
"https://android.stackexchange.com/questions/53554",
"https://android.stackexchange.com",
"https://android.stackexchange.com/users/41742/"
] | I'm running Ubuntu 14.04 LTS and I've found that I have to run adb with root permissions for it to detect my phone. Just now I ran (from the platform-tools directory) `./adb devices` and came up with an empty list. I restarted adb as root by running `./adb kill-server` and then `sudo ./adb start-server`. Now `adb devic... | FYI: I recently updated the android version from 4.4 to 5.0 on my phone and ADB would no longer show the device as connected. It seems where USB connection method **MTP** was correct before it *now has to be* **PTP**. |
1,358,534 | >
> Well the question is to solve for $x$ in $$a^x+b^x=c \tag{a,b,c are constants}$$
>
>
>
Well as of me, I tried to put $\ln{}$ on both sides which does not seem to help. Apart from this I don't seem to have any other way to solve it.
I turned to WolframAlpha and the solution which was given was :
$$x=\dfrac{-i... | 2015/07/12 | [
"https://math.stackexchange.com/questions/1358534",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/134694/"
] | *See edit below*
I don't think the solution should be independent of $c$. Maybe you typed into Wolfram
$$
a^x+b^x=0
$$
In that case, it's not too hard to see where the solution comes from. Move $b^x$ to one side to get:
\begin{align}
b^x&=-a^x\\
&=(-1)\times a^x\\
&=e^{i\pi}a^x
\end{align}
Then take $\ln$ of both si... | Not a solve, just an idea. This is for $a^x+b^x=0$ by the way.
$$a^x=-b^x$$
$$\log\_ax=-\log\_bx$$
$$\frac{\ln x}{\ln a}=-\frac{\ln x}{\ln b}$$
$$\ln a=- \ln b$$
$$x=\frac{-i \pi}{ln(a)-ln(b)}$$
$$x=\frac{-i \pi}{2\ln(a)}$$
$$2x\ln (a)=-i \pi$$
$$e^{2x\ln (a)}=e^{-i \pi}$$
$$e^{2x\ln (a)}=-1$$ |
17,229 | Is there a way I can import my ReadItLater's exported html file into my Instapaper? | 2011/07/10 | [
"https://apple.stackexchange.com/questions/17229",
"https://apple.stackexchange.com",
"https://apple.stackexchange.com/users/3089/"
] | Though I don't have a tool now, I guess it can be done in couple of ways. Yes, no one click solution.
1. Email each url to your personal instapaper id ([Refer this Lifehacker article](http://lifehacker.com/5493449/instapaper-adds-email-functionality-for-easy-article-saving))
2. Can parse your export list and use simpl... | No, there is no way of doing this. *With those applications.* |
23,307,350 | i have following issues in c# code.
```
class Program
{
static void Main(string[] args)
{
string line="have a nice day with nice(songs)";
string pattern=@"\bnice\b";
string replaced_line=Regex.Replace(line, pattern, "Good", RegexOptions.IgnoreCase);
}
}
```
output-: have... | 2014/04/26 | [
"https://Stackoverflow.com/questions/23307350",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2605617/"
] | Can't verify since I'm on a mobile but have you tried....
```
<table>
<colgroup>
<col class="first" />
<col />
<col class="last" />
</colgroup>
<tbody>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
```
Then use t... | try this css
```
table{
width:100%;
}
```
it works. |
75,923 | Genesis 24:37 NASB
>
> My master made me swear, saying, ‘You shall not take a wife for my son from the daughters of the Canaanites, in whose land I live; 38 but you shall go to my father’s house and to my relatives, and take a wife for my son.’
>
>
>
If it were idolatry that Abraham wanted to shield Isaac from si... | 2022/04/26 | [
"https://hermeneutics.stackexchange.com/questions/75923",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/16527/"
] | "Bone and flesh" (or a slight variation) acts in Scripture as Hebraism with the meaning of biological relative. Sometimes a slight variation is a merism for the human body as a whole.
* Gen 2:23 - Then the man said, “This at last is bone of my bones and flesh of my flesh; she shall be called Woman, because she was tak... | The term "flesh and bones" in Job 2:5, did not referred to Job's wife nor Eve. It was exactly referred to Job, his physical body. There is no connection to Job 2:9.
In chapter 1, Satan suggested to strike everything Job had, then Job would surely curse the Lord (Job 1:11 NIV). So Job lost his children and his livestoc... |
75,923 | Genesis 24:37 NASB
>
> My master made me swear, saying, ‘You shall not take a wife for my son from the daughters of the Canaanites, in whose land I live; 38 but you shall go to my father’s house and to my relatives, and take a wife for my son.’
>
>
>
If it were idolatry that Abraham wanted to shield Isaac from si... | 2022/04/26 | [
"https://hermeneutics.stackexchange.com/questions/75923",
"https://hermeneutics.stackexchange.com",
"https://hermeneutics.stackexchange.com/users/16527/"
] | "Bone and flesh" (or a slight variation) acts in Scripture as Hebraism with the meaning of biological relative. Sometimes a slight variation is a merism for the human body as a whole.
* Gen 2:23 - Then the man said, “This at last is bone of my bones and flesh of my flesh; she shall be called Woman, because she was tak... | A great question! There is a lot going on here with bone (less so with flesh).
Some excerpts from TDOT[1] explain this:
>
> we find poetic usage in the figurative language of the Psalms and
> wisdom aphorisms.8 Since bones are “man’s most durable part—his core,
> so to speak,” **ʿeṣem takes on the meaning “self,”** ... |
29,970,843 | I have a doubt about lock statment
All examples that i see, lock statment is used for global variable in a same form, but in my case that no happend, then i don't know how avoid the error "file is used for another..."
My case.
User go to form1, and in the form1, add lines to XML. While, in second plane, a thread take... | 2015/04/30 | [
"https://Stackoverflow.com/questions/29970843",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4851077/"
] | I'd go with a `wrapper` class to access your XML
Sonce your two threads do not know when each other is accessing the file let a class do it on it's own.
I was thinking of something like this :
```
public class SynchronizedXMLAccess : IDisposable
{
private static readonly Mutex _access = new Mutex();
public F... | if you open the file with write permissions and "read" Sharing rights you should be fine
so processA opens for writeing
```
using(FileStream fs = File.Open("file.ext",FileMode.Open,FileAccess.Write,FileShare.Read))
```
and processB opens for reading
```
using(FileStream fs = File.Open("file.ext",FileMode.Open,File... |
29,970,843 | I have a doubt about lock statment
All examples that i see, lock statment is used for global variable in a same form, but in my case that no happend, then i don't know how avoid the error "file is used for another..."
My case.
User go to form1, and in the form1, add lines to XML. While, in second plane, a thread take... | 2015/04/30 | [
"https://Stackoverflow.com/questions/29970843",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/4851077/"
] | The basic problem is that your thread and form are not using the same lock object. I don't know how you are creating your thread but I've written up a little console app with 2 tasks that will lock and alternately write and read to a file. You have to pass in the same lock object to each task in order for this to work.... | if you open the file with write permissions and "read" Sharing rights you should be fine
so processA opens for writeing
```
using(FileStream fs = File.Open("file.ext",FileMode.Open,FileAccess.Write,FileShare.Read))
```
and processB opens for reading
```
using(FileStream fs = File.Open("file.ext",FileMode.Open,File... |
147,463 | My bank recently revamped its website, and it changed for the better as far as I’m concerned. Especially, security seems to have been dramatically enhanced.
Most importantly, they introduced a rather unusual (I’ve never seen this before) identification method, which they call the ‘electronic certificate’. Basically, y... | 2017/01/06 | [
"https://security.stackexchange.com/questions/147463",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/-1/"
] | It's most likely a device that pretends to be a keyboard and is thus recognized by any OS without requiring special drivers. Internally, it would probably use HOTP (or TOTP, if it had an RTC chip and a battery) and just "type" the OTP each time the button is pressed, like a [Yubikey](https://www.yubico.com/products/yub... | As some of the other answers mentioned, this is most likely a USB security token. Think of it as a smart card reader + embedded smart card (and sometimes they are actually implemented this way). Think [CAC card](https://en.wikipedia.org/wiki/Common_Access_Card) used by US defense organizations. Think PGP card. Some Yub... |
147,463 | My bank recently revamped its website, and it changed for the better as far as I’m concerned. Especially, security seems to have been dramatically enhanced.
Most importantly, they introduced a rather unusual (I’ve never seen this before) identification method, which they call the ‘electronic certificate’. Basically, y... | 2017/01/06 | [
"https://security.stackexchange.com/questions/147463",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/-1/"
] | It's probably just a USB smartcard reader, with inserted SIM sized smartcard.
Manual installation of drivers is not needed since at least generic drivers for both reader and card are already installed in most modern OSs.
See the image below for example of such device:
[ identification method, which they call the ‘electronic certificate’. Basically, y... | 2017/01/06 | [
"https://security.stackexchange.com/questions/147463",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/-1/"
] | It's most likely a device that pretends to be a keyboard and is thus recognized by any OS without requiring special drivers. Internally, it would probably use HOTP (or TOTP, if it had an RTC chip and a battery) and just "type" the OTP each time the button is pressed, like a [Yubikey](https://www.yubico.com/products/yub... | Sounds like a theoretical idea I had about a decade ago.
Pretty much every OS supports USB network devices. Your USB stick may pretend to be a network card, connected to a a local network, with a webserver on that network too. That webserver can have HTTPS certificates, too.
Your webbrowser can make HTTPS requests to... |
147,463 | My bank recently revamped its website, and it changed for the better as far as I’m concerned. Especially, security seems to have been dramatically enhanced.
Most importantly, they introduced a rather unusual (I’ve never seen this before) identification method, which they call the ‘electronic certificate’. Basically, y... | 2017/01/06 | [
"https://security.stackexchange.com/questions/147463",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/-1/"
] | One way it could work is that Chrome supports FIDO U2F without plugin. Given that now Chrome is now the most popular browser and that Chrome runs on Windows, Mac, and Linux, it's not totally incorrect to claim that "it works in any device that has a USB port, Windows, Mac, Linux and more, and to work out of the box".
... | It's probably just a USB smartcard reader, with inserted SIM sized smartcard.
Manual installation of drivers is not needed since at least generic drivers for both reader and card are already installed in most modern OSs.
See the image below for example of such device:
[ identification method, which they call the ‘electronic certificate’. Basically, y... | 2017/01/06 | [
"https://security.stackexchange.com/questions/147463",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/-1/"
] | It's probably just a USB smartcard reader, with inserted SIM sized smartcard.
Manual installation of drivers is not needed since at least generic drivers for both reader and card are already installed in most modern OSs.
See the image below for example of such device:
[. Think [CAC card](https://en.wikipedia.org/wiki/Common_Access_Card) used by US defense organizations. Think PGP card. Some Yub... |
147,463 | My bank recently revamped its website, and it changed for the better as far as I’m concerned. Especially, security seems to have been dramatically enhanced.
Most importantly, they introduced a rather unusual (I’ve never seen this before) identification method, which they call the ‘electronic certificate’. Basically, y... | 2017/01/06 | [
"https://security.stackexchange.com/questions/147463",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/-1/"
] | What your bank gave you is an [USB security token](https://en.wikipedia.org/wiki/Security_token) with a digital certificate ([like these](http://www.gemalto.com/readers/tokens)). These are [standardized](https://en.wikipedia.org/wiki/PC/SC) hardware devices which almost every operating system supports plug&play out of ... | Sounds like a theoretical idea I had about a decade ago.
Pretty much every OS supports USB network devices. Your USB stick may pretend to be a network card, connected to a a local network, with a webserver on that network too. That webserver can have HTTPS certificates, too.
Your webbrowser can make HTTPS requests to... |
147,463 | My bank recently revamped its website, and it changed for the better as far as I’m concerned. Especially, security seems to have been dramatically enhanced.
Most importantly, they introduced a rather unusual (I’ve never seen this before) identification method, which they call the ‘electronic certificate’. Basically, y... | 2017/01/06 | [
"https://security.stackexchange.com/questions/147463",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/-1/"
] | What your bank gave you is an [USB security token](https://en.wikipedia.org/wiki/Security_token) with a digital certificate ([like these](http://www.gemalto.com/readers/tokens)). These are [standardized](https://en.wikipedia.org/wiki/PC/SC) hardware devices which almost every operating system supports plug&play out of ... | It's most likely a device that pretends to be a keyboard and is thus recognized by any OS without requiring special drivers. Internally, it would probably use HOTP (or TOTP, if it had an RTC chip and a battery) and just "type" the OTP each time the button is pressed, like a [Yubikey](https://www.yubico.com/products/yub... |
147,463 | My bank recently revamped its website, and it changed for the better as far as I’m concerned. Especially, security seems to have been dramatically enhanced.
Most importantly, they introduced a rather unusual (I’ve never seen this before) identification method, which they call the ‘electronic certificate’. Basically, y... | 2017/01/06 | [
"https://security.stackexchange.com/questions/147463",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/-1/"
] | One way it could work is that Chrome supports FIDO U2F without plugin. Given that now Chrome is now the most popular browser and that Chrome runs on Windows, Mac, and Linux, it's not totally incorrect to claim that "it works in any device that has a USB port, Windows, Mac, Linux and more, and to work out of the box".
... | This sounds like a Yubikey. They're well known and work great.
<https://www.yubico.com/products/yubikey-hardware/yubikey4/>
* Regarding not needing drivers: The Yubikey identifies itself as a keyboard so any machine with a keyboard driver can read the text output from it.
* How it works: You push the button and the Yu... |
147,463 | My bank recently revamped its website, and it changed for the better as far as I’m concerned. Especially, security seems to have been dramatically enhanced.
Most importantly, they introduced a rather unusual (I’ve never seen this before) identification method, which they call the ‘electronic certificate’. Basically, y... | 2017/01/06 | [
"https://security.stackexchange.com/questions/147463",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/-1/"
] | One way it could work is that Chrome supports FIDO U2F without plugin. Given that now Chrome is now the most popular browser and that Chrome runs on Windows, Mac, and Linux, it's not totally incorrect to claim that "it works in any device that has a USB port, Windows, Mac, Linux and more, and to work out of the box".
... | As some of the other answers mentioned, this is most likely a USB security token. Think of it as a smart card reader + embedded smart card (and sometimes they are actually implemented this way). Think [CAC card](https://en.wikipedia.org/wiki/Common_Access_Card) used by US defense organizations. Think PGP card. Some Yub... |
147,463 | My bank recently revamped its website, and it changed for the better as far as I’m concerned. Especially, security seems to have been dramatically enhanced.
Most importantly, they introduced a rather unusual (I’ve never seen this before) identification method, which they call the ‘electronic certificate’. Basically, y... | 2017/01/06 | [
"https://security.stackexchange.com/questions/147463",
"https://security.stackexchange.com",
"https://security.stackexchange.com/users/-1/"
] | >
> ....they don’t require the user to install any software on the machine....
> I thought that the ability for a webpage to browse the file system freely without user action is too commonly restricted by default
>
>
>
Yes, that should definitely not be possible without smartcard drivers.
This is a fundamental ... | It's most likely a device that pretends to be a keyboard and is thus recognized by any OS without requiring special drivers. Internally, it would probably use HOTP (or TOTP, if it had an RTC chip and a battery) and just "type" the OTP each time the button is pressed, like a [Yubikey](https://www.yubico.com/products/yub... |
67,228,783 | I am trying to give unauthenticated access (timebound) to list and download objects in a Google Storage bucket, and found Signed URLs can do the trick. But Signed URLs are good for a single object, and they have mentioned in the documentation <https://cloud.google.com/storage/docs/access-control/signed-urls#considerati... | 2021/04/23 | [
"https://Stackoverflow.com/questions/67228783",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/2012163/"
] | The short answer is not.
But I can explain why. In fact, you have to understand why the signed URL are great and useful.
I will take an example. You have a file of 1Tb and a requester want to download it. You have 2 solutions
* Download the file locally on the server, and then let the user downloading the file from ... | You cannot use signed URLs for this. You could give the user's account real permission on the bucket, but use a [conditional IAM policy](https://cloud.google.com/iam/docs/conditions-overview) to make it temporary, like in [this example](https://cloud.google.com/iam/docs/policies#conditional-bindings). |
935,833 | I look for a book/resource which display the general idea of the proof of Fermat last theorem in a simple manner for the public.
I mean, books which is not for mathematicians but for the general public. Books like:
>
> *Gödel's Theorem: An Incomplete Guide to Its Use and Abuse* by Torkel Franzén
>
>
>
Do anyone ... | 2014/09/18 | [
"https://math.stackexchange.com/questions/935833",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/50948/"
] | Two books which *might* be what you're looking for (haven't read them myself) are [*Invitation to the Mathematics of Fermat-Wiles*](http://books.google.de/books/about/Invitation_to_the_Mathematics_of_Fermat.html?id=W1Nso5E6G3YC&redir_esc=y) by Yves Hellegouarch and the 3rd edition of [*Algebraic Number Theory and Ferma... | The upcoming book [Summing It Up](https://www.amazon.co.uk/Summing-Up-Modern-Number-Theory/dp/0691170193/) by Robert Gross and Avner Ash seems to be the type of book that you want. I believe the third section of the book will go into the topics relevant to understanding Fermat's Last Theorem, according to the descripti... |
935,833 | I look for a book/resource which display the general idea of the proof of Fermat last theorem in a simple manner for the public.
I mean, books which is not for mathematicians but for the general public. Books like:
>
> *Gödel's Theorem: An Incomplete Guide to Its Use and Abuse* by Torkel Franzén
>
>
>
Do anyone ... | 2014/09/18 | [
"https://math.stackexchange.com/questions/935833",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/50948/"
] | It's very hard, if not impossible, to write such a book. Gödel's theorems are about the foundations of math, and so they don't actually use any significant mathematical results other than what they introduce. The main ideas, such as Gödel numbering, are essentially self-contained, and you can explain them to an audienc... | Two books which *might* be what you're looking for (haven't read them myself) are [*Invitation to the Mathematics of Fermat-Wiles*](http://books.google.de/books/about/Invitation_to_the_Mathematics_of_Fermat.html?id=W1Nso5E6G3YC&redir_esc=y) by Yves Hellegouarch and the 3rd edition of [*Algebraic Number Theory and Ferma... |
935,833 | I look for a book/resource which display the general idea of the proof of Fermat last theorem in a simple manner for the public.
I mean, books which is not for mathematicians but for the general public. Books like:
>
> *Gödel's Theorem: An Incomplete Guide to Its Use and Abuse* by Torkel Franzén
>
>
>
Do anyone ... | 2014/09/18 | [
"https://math.stackexchange.com/questions/935833",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/50948/"
] | Simon Singh's book, creatively titled "Fermat's Last Theorem" ("Fermat's Enigma" in the US), was a very fun read for a 15 year-old me many years ago :) It gives a lot of the history, as well as a rough outline of the proof (at the "using-lines-of-dominoes-to-explain-proof-by-induction" level). | [Fearless symmetry](http://press.princeton.edu/titles/8755.html) by Avner Ash and Robert Gross is not specifically about Fermat's theorem, but goes through some theory behind the proof. It's quite involved for being a pop science book and I applaud the authors for even trying to present topics such as quadratic recipro... |
935,833 | I look for a book/resource which display the general idea of the proof of Fermat last theorem in a simple manner for the public.
I mean, books which is not for mathematicians but for the general public. Books like:
>
> *Gödel's Theorem: An Incomplete Guide to Its Use and Abuse* by Torkel Franzén
>
>
>
Do anyone ... | 2014/09/18 | [
"https://math.stackexchange.com/questions/935833",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/50948/"
] | [Fearless symmetry](http://press.princeton.edu/titles/8755.html) by Avner Ash and Robert Gross is not specifically about Fermat's theorem, but goes through some theory behind the proof. It's quite involved for being a pop science book and I applaud the authors for even trying to present topics such as quadratic recipro... | The Epilogue in Ribenboim's book *Fermat's Last Theorem for Amateurs* is about the closest you'll get, I think. Of course, it still requires some mathematical skill just to hang with the "overview" — but, as Prometheus pointed out, you can't talk about FLT without using "real math".
For the record, the whole Ribenboim... |
935,833 | I look for a book/resource which display the general idea of the proof of Fermat last theorem in a simple manner for the public.
I mean, books which is not for mathematicians but for the general public. Books like:
>
> *Gödel's Theorem: An Incomplete Guide to Its Use and Abuse* by Torkel Franzén
>
>
>
Do anyone ... | 2014/09/18 | [
"https://math.stackexchange.com/questions/935833",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/50948/"
] | Simon Singh's book, creatively titled "Fermat's Last Theorem" ("Fermat's Enigma" in the US), was a very fun read for a 15 year-old me many years ago :) It gives a lot of the history, as well as a rough outline of the proof (at the "using-lines-of-dominoes-to-explain-proof-by-induction" level). | The upcoming book [Summing It Up](https://www.amazon.co.uk/Summing-Up-Modern-Number-Theory/dp/0691170193/) by Robert Gross and Avner Ash seems to be the type of book that you want. I believe the third section of the book will go into the topics relevant to understanding Fermat's Last Theorem, according to the descripti... |
935,833 | I look for a book/resource which display the general idea of the proof of Fermat last theorem in a simple manner for the public.
I mean, books which is not for mathematicians but for the general public. Books like:
>
> *Gödel's Theorem: An Incomplete Guide to Its Use and Abuse* by Torkel Franzén
>
>
>
Do anyone ... | 2014/09/18 | [
"https://math.stackexchange.com/questions/935833",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/50948/"
] | The Epilogue in Ribenboim's book *Fermat's Last Theorem for Amateurs* is about the closest you'll get, I think. Of course, it still requires some mathematical skill just to hang with the "overview" — but, as Prometheus pointed out, you can't talk about FLT without using "real math".
For the record, the whole Ribenboim... | Two books which *might* be what you're looking for (haven't read them myself) are [*Invitation to the Mathematics of Fermat-Wiles*](http://books.google.de/books/about/Invitation_to_the_Mathematics_of_Fermat.html?id=W1Nso5E6G3YC&redir_esc=y) by Yves Hellegouarch and the 3rd edition of [*Algebraic Number Theory and Ferma... |
935,833 | I look for a book/resource which display the general idea of the proof of Fermat last theorem in a simple manner for the public.
I mean, books which is not for mathematicians but for the general public. Books like:
>
> *Gödel's Theorem: An Incomplete Guide to Its Use and Abuse* by Torkel Franzén
>
>
>
Do anyone ... | 2014/09/18 | [
"https://math.stackexchange.com/questions/935833",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/50948/"
] | It's very hard, if not impossible, to write such a book. Gödel's theorems are about the foundations of math, and so they don't actually use any significant mathematical results other than what they introduce. The main ideas, such as Gödel numbering, are essentially self-contained, and you can explain them to an audienc... | Perhaps the closest thing is this article:
>
> ["A marvelous proof"](http://www.jstor.org/stable/2975598), by Fernando Gouvêa,
>
> *The American Mathematical Monthly*, 101 (3), March 1994, pp. 203–222.
>
>
>
This article got the MAA Lester R. Ford Award in 1995.
This and other papers (with various degrees of... |
935,833 | I look for a book/resource which display the general idea of the proof of Fermat last theorem in a simple manner for the public.
I mean, books which is not for mathematicians but for the general public. Books like:
>
> *Gödel's Theorem: An Incomplete Guide to Its Use and Abuse* by Torkel Franzén
>
>
>
Do anyone ... | 2014/09/18 | [
"https://math.stackexchange.com/questions/935833",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/50948/"
] | Perhaps the closest thing is this article:
>
> ["A marvelous proof"](http://www.jstor.org/stable/2975598), by Fernando Gouvêa,
>
> *The American Mathematical Monthly*, 101 (3), March 1994, pp. 203–222.
>
>
>
This article got the MAA Lester R. Ford Award in 1995.
This and other papers (with various degrees of... | Two books which *might* be what you're looking for (haven't read them myself) are [*Invitation to the Mathematics of Fermat-Wiles*](http://books.google.de/books/about/Invitation_to_the_Mathematics_of_Fermat.html?id=W1Nso5E6G3YC&redir_esc=y) by Yves Hellegouarch and the 3rd edition of [*Algebraic Number Theory and Ferma... |
935,833 | I look for a book/resource which display the general idea of the proof of Fermat last theorem in a simple manner for the public.
I mean, books which is not for mathematicians but for the general public. Books like:
>
> *Gödel's Theorem: An Incomplete Guide to Its Use and Abuse* by Torkel Franzén
>
>
>
Do anyone ... | 2014/09/18 | [
"https://math.stackexchange.com/questions/935833",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/50948/"
] | Perhaps the closest thing is this article:
>
> ["A marvelous proof"](http://www.jstor.org/stable/2975598), by Fernando Gouvêa,
>
> *The American Mathematical Monthly*, 101 (3), March 1994, pp. 203–222.
>
>
>
This article got the MAA Lester R. Ford Award in 1995.
This and other papers (with various degrees of... | The upcoming book [Summing It Up](https://www.amazon.co.uk/Summing-Up-Modern-Number-Theory/dp/0691170193/) by Robert Gross and Avner Ash seems to be the type of book that you want. I believe the third section of the book will go into the topics relevant to understanding Fermat's Last Theorem, according to the descripti... |
935,833 | I look for a book/resource which display the general idea of the proof of Fermat last theorem in a simple manner for the public.
I mean, books which is not for mathematicians but for the general public. Books like:
>
> *Gödel's Theorem: An Incomplete Guide to Its Use and Abuse* by Torkel Franzén
>
>
>
Do anyone ... | 2014/09/18 | [
"https://math.stackexchange.com/questions/935833",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/50948/"
] | [Fearless symmetry](http://press.princeton.edu/titles/8755.html) by Avner Ash and Robert Gross is not specifically about Fermat's theorem, but goes through some theory behind the proof. It's quite involved for being a pop science book and I applaud the authors for even trying to present topics such as quadratic recipro... | The upcoming book [Summing It Up](https://www.amazon.co.uk/Summing-Up-Modern-Number-Theory/dp/0691170193/) by Robert Gross and Avner Ash seems to be the type of book that you want. I believe the third section of the book will go into the topics relevant to understanding Fermat's Last Theorem, according to the descripti... |
39,355,889 | I've got this error:
>
> Cannot resolve method 'put(java.lang.String, java.util.Date)'
>
>
>
In the code below:
[](https://i.stack.imgur.com/6mZgM.png)
`lsd` and `nsd` are the column names with data type DATE.
```
public void onCreate(SQLiteDat... | 2016/09/06 | [
"https://Stackoverflow.com/questions/39355889",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/5512621/"
] | Hi can you try something like this,
```
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
ContentValues contentValues=new ContentValues();
contentValues.put("lsd", dateFormat.format(lsd));
``` | **Akshay** shows the right solution to your problem.
The background information is that SQLite does not support a date type:
>
> SQLite does not have a storage class set aside for storing dates and/or times. Instead, the built-in Date And Time Functions of SQLite are capable of storing dates and times as TEXT, REAL,... |
17,076,870 | I don't understand why this method isn't working. when I put in a value that should pass the if statement it doesn't work.
```
def getBase
puts "What is the base URL for the test?"
x = gets
if (x.include? 'http://') && ((x.split('.').at(x.split('.').length - 1).length) == 3)
return x
else
... | 2013/06/12 | [
"https://Stackoverflow.com/questions/17076870",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1549155/"
] | When you get input with `gets` it includes the newline `\n` at the end (from the user hitting return). So your `x` is actually `"http://test.com\n"`.
To get rid of this use [`String#chomp`](http://www.ruby-doc.org/core-1.9.3/String.html#method-i-chomp):
```
x = gets.chomp
```
That should do it. | If the purpose is to enforce correct URL format and/or make sure it's an HTTP URL, why don't you use a tool designed to do that? Ruby's [URI](http://ruby-doc.org/stdlib-2.0/libdoc/uri/rdoc/index.html) class is your friend:
```
require 'uri'
URI.parse('http://foo.bar').is_a?(URI::HTTP)
=> true
URI.parse('ftp://foo.ba... |
45,835 | I have created a Leave Authorisation Form using Infopath 2010 and published it to Forms Library. I have also created a SharePoint designer 2010 custom approval workflow and published it to forms library.
User opens the leave form in browser and fills the info and submits the form and workflow is initiated and manager... | 2012/09/18 | [
"https://sharepoint.stackexchange.com/questions/45835",
"https://sharepoint.stackexchange.com",
"https://sharepoint.stackexchange.com/users/5888/"
] | You will need to configure the search box from the Site Collection > Site Settings > Search Settings page. Enable *Custom Scopes* and select the dropdown mode *Do not show scopes dropdown, and default to target results page*. These settings are, however, only available with SharePoint Server search features enabled on ... | If *sharepoint* the name of your application pool you could try to add the url to access mappings. |
15,959 | What is it? Is sex just for pleasure with your partner breaking a precept? Eg with a condom. And is being circumcised bad over personal preferences/ (hygiene,aesthetic)? is oral and anal sex bad? Is masturbation bad? And is circumcising your sons bad? | 2016/07/22 | [
"https://buddhism.stackexchange.com/questions/15959",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8734/"
] | Sexual misconduct is defined in the Pali scriptures as having sex with someone else's partner or fiancee and with those living under the protection of their parents or an institution (in the case parents, if the parents disapprove).
The purpose of refraining from sexual misconduct is to not harm/damage existing relat... | Generally speaking, sexual misconduct means any sexual conduct that involves violence or lying.
One kind of sex is no worse than the other. It all leads to suffering.
I have never heard of anything on circumcision in the Buddha's teaching but there is a rule that monastics can't cut the penis clear off. |
15,959 | What is it? Is sex just for pleasure with your partner breaking a precept? Eg with a condom. And is being circumcised bad over personal preferences/ (hygiene,aesthetic)? is oral and anal sex bad? Is masturbation bad? And is circumcising your sons bad? | 2016/07/22 | [
"https://buddhism.stackexchange.com/questions/15959",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8734/"
] | In general, the Pali Canon is quite exoteric and seems to equate sexual misconduct with various kinds of adulteries. Of course, for a monastic any sexual activity at all with the sole exception of involuntary nocturnal emissions is forbidden by the Vinaya. | Generally speaking, sexual misconduct means any sexual conduct that involves violence or lying.
One kind of sex is no worse than the other. It all leads to suffering.
I have never heard of anything on circumcision in the Buddha's teaching but there is a rule that monastics can't cut the penis clear off. |
15,959 | What is it? Is sex just for pleasure with your partner breaking a precept? Eg with a condom. And is being circumcised bad over personal preferences/ (hygiene,aesthetic)? is oral and anal sex bad? Is masturbation bad? And is circumcising your sons bad? | 2016/07/22 | [
"https://buddhism.stackexchange.com/questions/15959",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8734/"
] | Sexual misconduct is defined in the Pali scriptures as having sex with someone else's partner or fiancee and with those living under the protection of their parents or an institution (in the case parents, if the parents disapprove).
The purpose of refraining from sexual misconduct is to not harm/damage existing relat... | In general, the Pali Canon is quite exoteric and seems to equate sexual misconduct with various kinds of adulteries. Of course, for a monastic any sexual activity at all with the sole exception of involuntary nocturnal emissions is forbidden by the Vinaya. |
15,959 | What is it? Is sex just for pleasure with your partner breaking a precept? Eg with a condom. And is being circumcised bad over personal preferences/ (hygiene,aesthetic)? is oral and anal sex bad? Is masturbation bad? And is circumcising your sons bad? | 2016/07/22 | [
"https://buddhism.stackexchange.com/questions/15959",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8734/"
] | Sexual misconduct is defined in the Pali scriptures as having sex with someone else's partner or fiancee and with those living under the protection of their parents or an institution (in the case parents, if the parents disapprove).
The purpose of refraining from sexual misconduct is to not harm/damage existing relat... | Ideally, sexual pleasure should be avoided since it is craving. But Buddha knew that this was difficult for the laity. Therefore, he suggested that the laity should avoid sexual misconduct. Sexual misconduct is simply sexual behavior which is outside social acceptance. And you can interpret that according to your own s... |
15,959 | What is it? Is sex just for pleasure with your partner breaking a precept? Eg with a condom. And is being circumcised bad over personal preferences/ (hygiene,aesthetic)? is oral and anal sex bad? Is masturbation bad? And is circumcising your sons bad? | 2016/07/22 | [
"https://buddhism.stackexchange.com/questions/15959",
"https://buddhism.stackexchange.com",
"https://buddhism.stackexchange.com/users/8734/"
] | In general, the Pali Canon is quite exoteric and seems to equate sexual misconduct with various kinds of adulteries. Of course, for a monastic any sexual activity at all with the sole exception of involuntary nocturnal emissions is forbidden by the Vinaya. | Ideally, sexual pleasure should be avoided since it is craving. But Buddha knew that this was difficult for the laity. Therefore, he suggested that the laity should avoid sexual misconduct. Sexual misconduct is simply sexual behavior which is outside social acceptance. And you can interpret that according to your own s... |
205,454 | Very often, when using the command line or just programming, you want to express some kind of combination that you end up using a `for` - which is often verbose.
```
for (int i = 0; i<10; ++i)
std::cout << "img_" << i << std::endl;
for f in *; do echo "$f"; done
```
I always wondered if there is some kind of la... | 2013/07/19 | [
"https://softwareengineering.stackexchange.com/questions/205454",
"https://softwareengineering.stackexchange.com",
"https://softwareengineering.stackexchange.com/users/54384/"
] | In bash, you can write
```
mv img_{0..5} imgs/
```
which is expanded by the shell to
```
mv img_0 img_1 img_2 img_3 img_4 img_5 imgs/
```
You can also use a character class:
```
mv img_[0-5] imgs/
```
which would only work for those files that already exist and match the expression, while the former expands to... | To answer your immediate concern, bash can do some range-based actions on existing files.
```
$ ls
sample1.txt sample2.txt sample3.txt sample4.txt samples
$ mv sample[1-3].txt samples/
$ ls *
sample4.txt
samples:
sample1.txt sample2.txt sample3.txt
```
But there is a bigger trend at play here. [Array progra... |
46,154,120 | I am getting following error in c++ program :
>
> variable-sized array type ‘int [size]’ is not a valid template
> argument
>
>
>
for following program:
```
#include <iostream>
using namespace std;
template <typename T>
void func (T& Array)
{
cout << "Hi";
}
int main ()
{
int size = 100;
int arr [... | 2017/09/11 | [
"https://Stackoverflow.com/questions/46154120",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1307324/"
] | Replace:
```
int size = 100;
```
with
```
const int size = 100;
```
In this way, the compiler knows that `size` will not change and can properly allocate space for the static array `arr1` | In C++ you can't define array's size using variable.
I suggest you to replace this array with **vector** or define a **preprocessor macro** that will hold size for your array. |
15,010,674 | I have the following string:
```
$result = "category,date,product,cost
car,10/10/2005,toyota,3000
bike,12/12/2007,yamaha,1000";
```
I need to arrange the string into the best format to insert into a database (needs to be efficient as there might be lots of data also first row will not be needed).
The string is on n... | 2013/02/21 | [
"https://Stackoverflow.com/questions/15010674",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/787247/"
] | **You can easily push a GWT app (with normal restrictions) as a Chrome extension.**
For a Start Read these -
Tutorial 1 - <http://blog.tomtasche.at/2011/08/chromegwt-building-chrome-extensions.html>
Tutorial 2 - <http://tech-drum.blogspot.in/2012/06/building-chrome-extensions-with-gwt.html>
You can also try and use... | `The difference between a Packaged App and a Hosted App is the offline behavior`
a Packaged App is an install able application on browser and an Web App is hosted from a web server and wont offline.
But you are able to run the packaged when the browser is offline with help of .json file ..hardly calling as manifest.j... |
4,491,510 | When dealing with Euclidean vector spaces (such as those in physics) we consider that a vector $A$ with a tuple of scalar components $(a,b,c)$ is equal to a vector $B$ with the same components, however, we make a distinction between column and row vectors (namely that one is the transpose of the other) is it that for a... | 2022/07/12 | [
"https://math.stackexchange.com/questions/4491510",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/1077892/"
] | You are confusing notation and coordinate representation of vectors. That is, a vector space is an algebraic structure defined using four objects $(V, \mathbb{F}, \oplus ,\odot )$ where $(V, \oplus)$ is an Abelian group, $(\mathbb{F},+,\cdot )$ is a field and
$$
\odot :\mathbb{F}\times V\to V,\quad (\lambda ,\mathbf{v... | Given a vector space, V, over field F (typically R or C) we can define its "dual space", V\*, as the set of all linear functions from V to F. It can be shown that V and V\* are isomorphic so V\* is also a vector space.
In particlar, if V is finite dimensional, say dimension n, it is customary to represent each vector ... |
4,491,510 | When dealing with Euclidean vector spaces (such as those in physics) we consider that a vector $A$ with a tuple of scalar components $(a,b,c)$ is equal to a vector $B$ with the same components, however, we make a distinction between column and row vectors (namely that one is the transpose of the other) is it that for a... | 2022/07/12 | [
"https://math.stackexchange.com/questions/4491510",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/1077892/"
] | Let $n$ be a positive integer.
* A row vector with $n$ real components is a matrix with one row and $n$ columns, i.e. an element of $\mathbb R^{1\times n}$.
* A column vector with $n$ real components is a matrix with one column and $n$ rows, i.e. an element of $\mathbb R^{n\times 1}$.
* An element of $\mathbb R^n$ is ... | You are confusing notation and coordinate representation of vectors. That is, a vector space is an algebraic structure defined using four objects $(V, \mathbb{F}, \oplus ,\odot )$ where $(V, \oplus)$ is an Abelian group, $(\mathbb{F},+,\cdot )$ is a field and
$$
\odot :\mathbb{F}\times V\to V,\quad (\lambda ,\mathbf{v... |
4,491,510 | When dealing with Euclidean vector spaces (such as those in physics) we consider that a vector $A$ with a tuple of scalar components $(a,b,c)$ is equal to a vector $B$ with the same components, however, we make a distinction between column and row vectors (namely that one is the transpose of the other) is it that for a... | 2022/07/12 | [
"https://math.stackexchange.com/questions/4491510",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/1077892/"
] | You are confusing notation and coordinate representation of vectors. That is, a vector space is an algebraic structure defined using four objects $(V, \mathbb{F}, \oplus ,\odot )$ where $(V, \oplus)$ is an Abelian group, $(\mathbb{F},+,\cdot )$ is a field and
$$
\odot :\mathbb{F}\times V\to V,\quad (\lambda ,\mathbf{v... | The answers above already well clarify that there is an isomorphism
between lists (n-uples), row vectors and column vectorsand thus the choice is a matter of convenience.
In linear algebra the column notation is more common because more conforming to the way we write
systems of linear equations.
Instead the row not... |
4,491,510 | When dealing with Euclidean vector spaces (such as those in physics) we consider that a vector $A$ with a tuple of scalar components $(a,b,c)$ is equal to a vector $B$ with the same components, however, we make a distinction between column and row vectors (namely that one is the transpose of the other) is it that for a... | 2022/07/12 | [
"https://math.stackexchange.com/questions/4491510",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/1077892/"
] | Let $n$ be a positive integer.
* A row vector with $n$ real components is a matrix with one row and $n$ columns, i.e. an element of $\mathbb R^{1\times n}$.
* A column vector with $n$ real components is a matrix with one column and $n$ rows, i.e. an element of $\mathbb R^{n\times 1}$.
* An element of $\mathbb R^n$ is ... | Given a vector space, V, over field F (typically R or C) we can define its "dual space", V\*, as the set of all linear functions from V to F. It can be shown that V and V\* are isomorphic so V\* is also a vector space.
In particlar, if V is finite dimensional, say dimension n, it is customary to represent each vector ... |
4,491,510 | When dealing with Euclidean vector spaces (such as those in physics) we consider that a vector $A$ with a tuple of scalar components $(a,b,c)$ is equal to a vector $B$ with the same components, however, we make a distinction between column and row vectors (namely that one is the transpose of the other) is it that for a... | 2022/07/12 | [
"https://math.stackexchange.com/questions/4491510",
"https://math.stackexchange.com",
"https://math.stackexchange.com/users/1077892/"
] | Let $n$ be a positive integer.
* A row vector with $n$ real components is a matrix with one row and $n$ columns, i.e. an element of $\mathbb R^{1\times n}$.
* A column vector with $n$ real components is a matrix with one column and $n$ rows, i.e. an element of $\mathbb R^{n\times 1}$.
* An element of $\mathbb R^n$ is ... | The answers above already well clarify that there is an isomorphism
between lists (n-uples), row vectors and column vectorsand thus the choice is a matter of convenience.
In linear algebra the column notation is more common because more conforming to the way we write
systems of linear equations.
Instead the row not... |
8,254,383 | ```
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.login);
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
}
@Override
public void onSaveInstanceState(Bundle savedInstanceS... | 2011/11/24 | [
"https://Stackoverflow.com/questions/8254383",
"https://Stackoverflow.com",
"https://Stackoverflow.com/users/1059954/"
] | On simple way is to avoid having your activity recreated on rotation. Change your AndroidManifest.xml to include `android:configChanges="keyboardHidden|orientation"` like this:
```
<activity android:name="MyActivity" android:configChanges="keyboardHidden|orientation"></activity>
```
Your layout will need to support ... | try to move getting phone number from onRestoreInstanceState to onCreate method
or try something like this:
```
@Override
public Object onRetainNonConfigurationInstance()
{
return phoneNumberLogin.getText().toString();
}
```
and in onCreate
```
@Override
public void onCreate(Bundle savedInstanceState) {... |
15,081 | So I have a polygon feature classes with unique identifying names to them that I want to use to rename some other feature classes that are of the point feature type and have the same geography of one of the matching polygon feature classes. Basically the points from the second feature class fit within the polygon featu... | 2011/09/28 | [
"https://gis.stackexchange.com/questions/15081",
"https://gis.stackexchange.com",
"https://gis.stackexchange.com/users/405/"
] | Cartographic rules to represent the relief as contours are presented in [Imhof's famous book on relief representation, chapter C](http://esripress.esri.com/display/index.cfm?fuseaction=display&websiteID=118&moduleID=1). Some of these rules are given on [this wikipedia page](http://en.wikipedia.org/wiki/Cartographic_rel... | I want to second @whuber's comment. Quantitative Analysis is always better from a DEM directly and Visual Analysis is often better when done from a Hillshade rather than contours.
To answer the question directly:
In ArcGIS I would use either Focal Statistics or Aggregate [Spatial Analyst Toolbox] to smooth the result... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.